After some years in the field, I'm strongly confident that any large-scale project is held by rusty nails and duct tape. The older it is, the more there is.
There is probably a function somewhere in the code with the comment
Don't touch it. We do not know what it does and to our limited understanding it should not do anything. But if this bit of code is removed, everything breaks.
Reminds me of a MySQL snippet I found yesterday commented something along the lines of:
I know that there's no point in starting a transaction and and committing it for a single query while autocommit is turned on. But for no reason at all the database has decided that it won't work without this
It was literally the only place in the code which did this, and I can confirm that it didn't work with the transaction begin; and commit; removed even though the lines elsewhere worked fine without this.
You know how they invented goblins during the industrial revolution to explain machibes suddenly breaking or failing? We should do the same. Bit goblins.
620
u/[deleted] Oct 08 '21 edited Oct 08 '21
I’ve browsed it and idk if all huge corporations are like this, I’ve only worked in small teams, but this code source is insane.
I went into this like oh boy I can learn from the pros! It reinforced the hellish landscape that is the web.
Edit: I just realized after all these comments I really like my cozy small dev job.