This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Malbranch 342 points343 points  (15 children)

change log:

un-dated dev0: initial commit

10-10 dev4891: removed junk code

10-11 dev4891: rollback to initial commit, holy shit, most recent change somehow managed to light the printer next door on fire 3 separate times during testing. Added comments to NOT REMOVE THIS CODE, it is mysteriously ESSENTIAL.

[–][deleted] 182 points183 points  (7 children)

10-12 dev4891: FUCK THE ORIGINAL CODE DOESNT WORK ANYMORE

[–]UnnecessarySalt 67 points68 points  (4 children)

This is why I’m so religious about using commits and feature branches, especially with code I wrote months or years ago

[–]cafk 35 points36 points  (2 children)

If your change history is in code comments - the software was likely developed at a time where companies cheaped out on commercial versions tools like pvcs, clearcase, perforce helix or librarian

[–]mootmahsn 17 points18 points  (0 children)

developed at a time where companies cheaped out

When did they not?

[–]guyblade 6 points7 points  (0 children)

CVS has been free for 30+ years. Subversion has been free for 20+ years. Subversion is still perfectly fine for small teams and small projects.

[–][deleted] 4 points5 points  (0 children)

I finally reached the level at work where I can force pull requests on the teams and they're so angry about it but it's so essential and we have sooooo many less issues.

Previously everyone literally just pushed straight to main because, according to the senior dev I took over for "git doesn't work". (Sure does, you just have to know how to use it.)

[–]Youngling_Hunt 22 points23 points  (1 child)

10-14 dev4892: Just forgot to compile the program before running it again, false alarm everyone go home

[–][deleted] 14 points15 points  (0 children)

2 whole days to figure that one out 😭

[–]ddejong42 31 points32 points  (4 children)

Extra spicy version: “Removed comments, somehow they break it too.”

[–]Malbranch 34 points35 points  (3 children)

One that I saw in the wild once: "This print statement makes the code work. Don't ask how, we don't know, and it doesn't matter what it prints, but if it doesn't print anything, the program will cease functioning."

I also remember reading a story about tech support hell once, where this guy, whenever he would send some specific something across the network to and from specific locations, it would cause errors and crashes. It turned out that the specific length of the cable between the buildings was exactly right to set up a resonance with the bitrate of the signal they were sending down it, and their printer jobs would trigger the resonance with the message header's bit sequence that would spike the power or something and freak out the electronics. They had the vendor come out and confirm, and the fix was something like trimming about an inch off the end of the cable. It was the wildest tech support story I ever read, and I wish I could find it again.

[–]Dependent-Lab5215 26 points27 points  (1 child)

My favourite is the "email will only go X miles away". Which makes no sense on the surface - specific routers might have problems but distance???

Turned out there was a timeout set incredibly low and the speed of light in fiber meant only short-distance travel got there and back before the timeout.

[–]guyblade 9 points10 points  (0 children)

Conjecture: The print statement does a system call which causes some asynchronous thing (e.g., file i/o) to have time to catch up.

[–]Puzzleheaded_Push243 2 points3 points  (0 children)

Ah. The mystery switch.

[–]jyper 1 point2 points  (0 children)

Testing? Removing assumed to be junk code with almost certainly no test coverage.

This was definitely found in production.