VRROOOOOMMM VROOOOOOOOOMMMMM
-
I found this year-old code.
for(var _i=0; _i < arrSendForms.length; _i++) {
}
msg = 'The forms have been sent!';I checked the VSS history. This loop, and a small condition snippet around it, were simply implemented and then left like this.
-
for(var _i=0; _i < arrSendForms.length; _i++) {
}
msg = 'The forms have NOT been sent!';Change it to this and commit it.
-
Hey, but I wrote this to check the form cont... oh.
-
for(var _i=0; _i < arrSendForms.length; _i++) {
}
msg = 'The forms have been counted!';Change it to this and commit it.
-
I get it. TRWTF is using
_i++
instead of++_i
.
-
@boomzilla said:
I get it. TRWTF is using
_i++
instead of++_i
.actually ++_i is faster on some machines
-
@Helix said:
Not since the early 90s. m68k series is the only CPU I'm aware of that was ever in common use for which that held in any way true, because it had underlying post-increment and pre-decrement indirect addressing modes, but not post-decrement or pre-increment.@boomzilla said:
I get it. TRWTF is using
_i++
instead of++_i
.actually ++_i is faster on some machines
-
for(var _i=0; _i < arrSendForms.length; _i++) {
MessageBox.Show(getRandomTagFromTDWTF()); }
msg = 'The forms have been sent!';
-
@mott555 said:
FTFY.for(var _i=0; _i < arrSendForms.length; _i++) {
MessageBox.Show(getRandomTagFromTDWTF()); }
msg = 'The forms have been sent!';Change it to this and commit it.
-
@Helix said:
@boomzilla said:
I get it. TRWTF is using
actually ++_i is faster on some machines_i++
instead of++_i
.I was deciding whether to go with "not this shit again" or to make a deadpan sarcastic remark. I think I'll do the later:
Yes. That is definitely a worthwhile optimization to make.
-
for (var _i in arrSendForms) { } msg = 'The forms have been sent!';
There ya go. Much more readable now. Change it to this and commit it.
-
for (var _i in Integer.IntegerCache) {
var _x = 1 / i;
}
msg = 'OH SHI-';Change it to this and commit it.
-
@DaveK said:
@Helix said:
Not since the early 90s. m68k series is the only CPU I'm aware of that was ever in common use for which that held in any way true, because it had underlying post-increment and pre-decrement indirect addressing modes, but not post-decrement or pre-increment.@boomzilla said:
I get it. TRWTF is using
_i++
instead of++_i
.actually ++_i is faster on some machines
millions of devices are using 68k core - and still used in designs today
-
Maybe I should put a SELECT DISTINCT query in it. On the application's main table. With ~500,000 rows.
-
500k is not enough. Two copies of the main table, cartesian joined.