MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/pw0mk8/was_feeling_lazy/
r/badcode • u/Audratia • Sep 26 '21
12 comments sorted by
65
(; ;)
I ain't no shrink but I'm pretty sure that's a Freudian expression of tears.
28
It’s the for…of with the manually incremented index for me
1 u/pytness Sep 27 '21 I would create the enumerator func from python
1
I would create the enumerator func from python
23
Image Transcription: Code
async _buildDom() { this.attachShadow({ mode: 'open' }); const rootElement = this._rootFragment.content.cloneNode(true); const table = rootElement.querySelector(`[data-val="root"]`); this.shadowRoot.appendChild(rootElement); let i = 0; for (const val of this._model) { const rowElement = this._rowFragment.content.cloneNode(true); populateFragment(rowElement, val); table.appendChild(rowElement); i++; if (i % 100 === 0) { await awaitNextFrame(); for (; ;) { const rect = table.getBoundingClientRect(); if (Math.abs(rect.bottom - window.innerHeight) < 400) { break; } else { await pause(300); } } } }
I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!
8 u/Sir_Applecheese Sep 27 '21 You should be awarded for having to read this disgusting shit. 3 u/Master_Sifo_Dyas Sep 27 '21 Good human
8
You should be awarded for having to read this disgusting shit.
3
Good human
5
Wow code that isn't written eloquently but works and nobody is going to notice.
6 u/Sir_Applecheese Sep 27 '21 The worst kind of code.
6
The worst kind of code.
You can imprive it at the marked line by removing math.abs and replacing it by a sqrt of a pow 2 of your value
4 u/Flyberius Sep 26 '21 I used to do this. God help me
4
I used to do this. God help me
Anybody know what font that is?
65
u/Notimecelduv Sep 26 '21
I ain't no shrink but I'm pretty sure that's a Freudian expression of tears.
28
u/iahmbt Sep 26 '21
It’s the for…of with the manually incremented index for me
23
u/MurdoMaclachlan public boolean isInt(int i) { return true; } Sep 26 '21
Image Transcription: Code
I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!
5
u/YoungVoxelWizard Sep 27 '21
Wow code that isn't written eloquently but works and nobody is going to notice.
5
u/Nsber Sep 26 '21
You can imprive it at the marked line by removing math.abs and replacing it by a sqrt of a pow 2 of your value
1
u/rxvf Sep 27 '21
Anybody know what font that is?