- Feature Articles
- CodeSOD
-
Error'd
- Most Recent Articles
- Stop Poking Me!
- Operation Erred Successfully
- A Dark Turn
- Nothing Doing
- Home By Another Way
- Coast Star
- Forsooth
- Epic
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
REPLACE_COMMENT('First','Frist');
Admin
I’m reminded of a tiny assembly language program (for testing printer controllers) that o broke by adding an instruction and changing a jump amount to compensate. Turned out that constant was also used as a bit mask elsewhere, to save one 25-bit word.
Admin
Uh, it was a 16 bit word.
Admin
Regrettably believable. Our Java code used to have a big static-singleton class which cached SQL strings, on the basis that string concatenation was an expensive operation... which might have been true in the earliest versions of the language when this code was written, but certainly not to an extent where an SQL-heavy app would have noticed (and in any Java version I've used, most of it would have been resolved at compile time anyway).
And we definitely had a few cases of this kind of bug... places where someone had defined an SQL in one place, and in some other place, someone had reused it with modifications. Bonus points if they then stored the modified version of the SQL back in the same mutable field that they borrowed it from, changing the behaviour of another function.
It took me nearly a week to safely burn this thing out of existence a few years ago. Mostly trivial work, but enough hidden landmines to keep me on my toes.
Admin
I'm genuinely amazed they have a CI in place; I know of a pipeline not having been executed for at least 4 months and nobody but me seems to be interested.
Happy ~~2004~~. 2024!
Admin
I once (almost 40 years ago) spent over a month trying to save 11 bytes of memory.... Ahh those were the good old days [no users - grin]
Admin
TRWTF is to discuss these things over dinner. That time could have been spent talking about things that are more relevant to a cordial friendship.
Admin
@Domin Abbus: You must not be an American. Thinking about work and/or bitching about work are what we (well, most of we) do to relax when not working. And to save you some typing: no, it's not mentally healthy. It is however depressingly commonplace.
Admin
I have had to modify strings in the past, but did this by searching for text and replacing it, so this was stable against trivial changes.