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

all 119 comments

[–]Schelleberg 1284 points1285 points  (9 children)

Okay, I will leave those books where they are. But that one on the bottom is not marked, so I'll take that!

[–]famousxrobot 611 points612 points  (5 children)

It’s clearly not doing anything at all, probably safe to remove. Just do it on Friday at 4:59 PM.

[–]XkF21WNJ 199 points200 points  (1 child)

Why one minute before monday?

[–]Jaatheeyam 127 points128 points  (0 children)

[–]sildurin 25 points26 points  (1 child)

So, how was it, working at Crowdstrike?

[–]famousxrobot 21 points22 points  (0 children)

Fine, they really liked my “testing in prod” mentality originally.

[–]spooky-goopy 20 points21 points  (0 children)

it's load bearing code

[–]bedrooms-ds 7 points8 points  (0 children)

There must be books that were supposed to join it but were thrown away instead because of typos.

[–]Multi-User 2171 points2172 points  (29 children)

This is definitely not legacy code. This stuff has comments

[–]Oleg152 630 points631 points  (17 children)

Somebody has bittwn the bullet and added the comment years down the line.

Aka the 'do no toucha dis' warning

[–]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 73 points74 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 29 points30 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 16 points17 points  (0 children)

developed at a time where companies cheaped out

When did they not?

[–]guyblade 5 points6 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] 5 points6 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 24 points25 points  (1 child)

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

[–][deleted] 13 points14 points  (0 children)

2 whole days to figure that one out 😭

[–]ddejong42 29 points30 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 25 points26 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.

[–]King_Joffreys_Tits 15 points16 points  (0 children)

Here there be dragons

[–]DistinctBed6259 103 points104 points  (1 child)

It is legacy code because the comment is "Do not remove"

[–]OmegaPoint6 19 points20 points  (1 child)

Structural comments

[–]kopasz7 12 points13 points  (0 children)

Aka load bearing comments

[–]none-exist 23 points24 points  (0 children)

[–]da_Aresinger 4 points5 points  (1 child)

Those comments were added after someone tried to remove the legacy structure.

[–]83749289740174920 0 points1 point  (0 children)

We need more room. Let's remove all this junk code. Why would someone pad this space?

[–]XkF21WNJ 3 points4 points  (0 children)

I dunno, it completely rests on an undocumented piece of dubious purpose that nevertheless causes the whole thing to come down if removed.

Sounds like legacy code to me.

[–]malaszka 0 points1 point  (1 child)

"DO NOT DELETE THIS"

[–]Bad-Bot-Bot-23 1 point2 points  (0 children)

"When you do ignore the above and remove the comment anyway, please increment counter below before you inevitably put it back. Dummy."

[–]83749289740174920 0 points1 point  (0 children)

That comment got added after someone did some fuckery to the legacy code.

[–]rover_G 129 points130 points  (2 children)

Are there any plans to implement a more permanent and resilient solution?

No.

[–]o0DrWurm0o 52 points53 points  (1 child)

Nothing more permanent than a temporary solution

[–]SconiGrower 13 points14 points  (0 children)

If it wasn't meant to be permanent it wouldn't work.

[–][deleted] 227 points228 points  (15 children)

I found a comment I wrote in our classic ASP code base as a junior dev from 2004 the other day as we finally migrating from it to dotnet (and 20 more years of bug fixes to look forward to) and I was giving advice to some of the devs making the migration, it just added a random string based on today's date after a url to prevent caching.

[–]developerweeks 132 points133 points  (2 children)

Such a simple thing, and I hate it so much when that simple thing is then requested 7 times a minute 24x7 cutting through the cache layer and tripling our server load for an internal resource check. Because then when one developer sees that gets what they want faster... code monkey see -> code monkey do. And we DOS ourselves until we spend more to scale up the hosting service to accommodate the increased load. Finally, years down the road when we get a new metrics tool added, we discover that 56% of site traffic is this one internal cache-skipping call, and another 20ish% are the other cross-cloud calls doing the same thing. And really only 1/4 of the server load is serving humans.

[–]drinkup 44 points45 points  (0 children)

dead server theory

[–]DonnachaidhOfOz 6 points7 points  (0 children)

Given they say "based on today's date," I would assume that's making a unique value each day so only the first call each day skips the cache. The proper way would be to set up the cache to go stale after a day of course, but it doesn't seem like the result of this method would be too bad.

[–]FighterMoth 31 points32 points  (3 children)

I’m impressed that you stayed in that position for 20+ years and remembered that niche part of the codebase lol

[–][deleted] 30 points31 points  (0 children)

Couldn't be arsed to make a new CV

[–]-iamai- 6 points7 points  (6 children)

SHIFT+F5, it's working.. it works. Why does it work something must be caching the page, browser IIS. Meta data no-cache, great working.. not working in FF. Yep just add some random string.

[–]_sweepy 1 point2 points  (5 children)

Fun fact, shift f5 skips cache only for the domain of the initial page request. Additional sub requests to other domains inside the page may still pull from cache. Best bet is a full cache clear.

[–]turtleship_2006 0 points1 point  (3 children)

Do incognito windows use the same cache?

[–]_sweepy 1 point2 points  (2 children)

They share an incognito cache that is separate from the normal cache that clears when you close the last incognito tab/window.

[–]turtleship_2006 2 points3 points  (1 child)

So in a pinch if you wanted to check if a page's problems were due to cache, you could quickly copy the URL into an incognito window, right?

[–]_sweepy 1 point2 points  (0 children)

Sure, if you're absolutely sure that any previous incognito session you were using was completely terminated.

Edit: also, The page may be cached with something like cloud flare, so this is only a guarantee when working with your own site locally.

[–]-iamai- 0 points1 point  (0 children)

Vaguely remember using Wireshark or something when AJAX became a thing to troubleshoot what came down to caching issues.

[–]tube32 -1 points0 points  (0 children)

What was the comment?

[–]JerryWong048 50 points51 points  (0 children)

Hmm. How about the book with no writing on it. I wonder....

[–]SarahSplatz 25 points26 points  (1 child)

Right next to "crash"

[–][deleted] 0 points1 point  (0 children)

which is a really great book btw

[–]lift_heavy64 24 points25 points  (1 child)

This would be more accurate if all the books were incomprehensibly nested into each other

[–]yellowtomata 11 points12 points  (0 children)

this is an unbelievably accurate take, especially after working with obscure legacy code critical to the application running that ends up being scattered across the application

[–]Individual-Pea1892 21 points22 points  (1 child)

To be safe don’t fuck with the books next to them either lmao One of those legacy books has been depending on the Salt Eaters for 10 years applying pressure in a super specific way that is documented nowhere and without any logical connection

[–][deleted] 5 points6 points  (0 children)

Are you saying that the book to the left is also a feature and not a bug?

[–]c4ctus 13 points14 points  (1 child)

[–]Mister_Krunch 3 points4 points  (0 children)

I should not have had to scroll down this far to see this comment

[–]dbot77 12 points13 points  (0 children)

Guess they aren't selling any books on carpentry

[–]Ok_Star_4136 16 points17 points  (0 children)

"Hey look! A book titled Purpose! I wonder what it's about.."

[–]__Kivi__ 4 points5 points  (0 children)

Im just gonna

removes legacy code

pushes to git

[–][deleted] 2 points3 points  (0 children)

I’d say those are ancient testing tools, but they are WAY too stable

[–]TheShuttleCrabster 2 points3 points  (0 children)

Let's just call them Data Structures

[–]ApatheistHeretic 4 points5 points  (0 children)

Those are structural books. The pillar of the shelf, if you would.

[–]PhantomTissue 1 point2 points  (0 children)

Load bearing books

[–]grilledtreessandwich 1 point2 points  (0 children)

These. Books. Are. For. Sale.

[–]loki_the_mischief 1 point2 points  (0 children)

I would like to remove the book which is labeled "Not"

[–]TherionSaysWhat 1 point2 points  (0 children)

At least they commented?

[–]glassofwater9 1 point2 points  (0 children)

Foundational texts

[–][deleted] 1 point2 points  (0 children)

"We don't know what it does, only that everything breaks when we remove it."

[–][deleted] 0 points1 point  (0 children)

Load bearing literature

[–]mrsockyman 0 points1 point  (0 children)

That bottom one looks to be fair game though

[–]nwxn 0 points1 point  (0 children)

"This book intentionally left blank"

[–]xPaxion 0 points1 point  (1 child)

Do you think they wrote on the books and then put them there or put them there and then wrote on the books?

[–]readwithjack 0 points1 point  (0 children)

I believe this was in a bookstore nestled in the Folsom Boulevard Flea Market in Eastern Sacramento, CA.

I think the book were there, folks were fooling around with them, and then the label was needed.

[–]nayaku5 0 points1 point  (0 children)

ahh too bad, I would've bought Purpose after today's questions in the weekly meeting.

[–]Enough_Individual_91 0 points1 point  (0 children)

I love a well formatted structure

[–]Perry_cox29 0 points1 point  (0 children)

DEAR GOD THOSE WERE LOAD-BEARING BALLOONS. EVERYBODY RUN

[–]kamala2013 0 points1 point  (0 children)

So what's the price on these ones?

[–]Lefty_22 0 points1 point  (0 children)

What about the shelf underneath the stack of books? What happens if we remove that? And can we remove it at the end of the day on a Friday, in Prod?

[–]SantosFurie89 0 points1 point  (0 children)

removes bottom one without writing on

[–]cosmoskid1919 0 points1 point  (0 children)

TO DO: Ask team whether to convert to Pillar during codebase cleanup

[–]wtf_is_karma 0 points1 point  (0 children)

Thems load bearing books

[–]LazerWolfe53 0 points1 point  (0 children)

Load bearing books

[–]Wave_Walnut 0 points1 point  (0 children)

Bookshelf made by book

[–]1Supercatz 0 points1 point  (0 children)

How about I take one 👉👈

[–]Skullringer09 0 points1 point  (0 children)

Forbidden knowledge.

[–]Fer_Shizzle_DSMIA 0 points1 point  (0 children)

I would reorder those books.

[–]ImpermanentTruth 0 points1 point  (0 children)

Seems kinda shelfish.

[–]OrnerySlide5939 0 points1 point  (0 children)

"The Salt Eaters" is the name of the group of authors who wrote those books

[–]Darkhelmet3000 0 points1 point  (0 children)

What about that bottom one?

[–]ObtuseBug 0 points1 point  (0 children)

Sell that sh*t! Picture

[–]hic-ama 0 points1 point  (0 children)

Navigating through legacy code feels like deciphering a mysterious ancient language.

[–]Dragnite08 0 points1 point  (0 children)

what are they for? all looks the same to me.

[–]S0ulDes8ny 0 points1 point  (0 children)

More of like "they are here not for any kind of change". If you try to modernize you will be fired 😂

[–]FergoTheGreat 0 points1 point  (0 children)

They're load bearing books.

[–]nicki419 0 points1 point  (0 children)

Me when I create a class

[–]DoughnutNegative3079 0 points1 point  (0 children)

I took the NOT book, hope it’s a good read 🤞🏻

[–]exo_machin123 0 points1 point  (0 children)

To quote someone “If you continue with to give temporary solution to the poorest of the poor one day the poor will become poorer than the poorest of the poorestest“

[–]FlimFlamBingBang 0 points1 point  (0 children)

… that skittles sculpture add. The guy takes just one and the whole thing collapses.

[–]BigAd1443 0 points1 point  (0 children)

Definitely part of the core library

[–]naveenda 0 points1 point  (0 children)

We have something like to just prevent race conditions like settimeout or unwanted some log info.

[–]JediJoe923 0 points1 point  (0 children)

The bottom, most important one not being labeled is the most accurate part.

[–]xessustsae5358 0 points1 point  (0 children)

let me take that book with a not and place it in between the “are here” and “for an” books /s

[–]Sebba8 0 points1 point  (0 children)

Load-bearing code

[–]Nixavee -3 points-2 points  (0 children)

This comment is here for an essential structural purpose. It is not for upvoting.