Hey man, at least the methods sound somewhat descriptive. You haven't at least gone through legacy code where they start using magic numbers which go off to a giant case statement, which then pass its own number to stored procs, which update values in a table and a Windows scheduled job picks up later that evening to update another table which is then used by a view, and this is between several networks ๐ก
None of these numbers are mapped, and you have to hope the previous guy still had the .dlls on his machine/ VM as he pulled it from god knows where and didn't bother to put it into TFS or else the project doesn't run.
I loathe SSIS packages and VB, and I am glad to never touch that shit again ๐คฎ
I once had to work with a front-end code that did pack 6 boolean flags into an integer by bit manipulation. Only to send it as one of the stringified JSON values, of course.
I mean, I get that, and the URL length limit in some browsers especially with multi-byte character possibilities, but I don't understand why you wouldn't name the variables full words once you pull the strings from the params map.
What documentation? Where is the fucking documentation??? :D
After 2,5 years I convinced my senior dev and my CEO to ditch the old system and write it completely new. Now, 1,5 years later... We are two month away from shipping it. :)
Or the PHP code where someone has a series of if/switch statements to build up a function name piece by piece, and then calls the string to execute the function. Yes, putting a string in a variable and calling it is real in PHP. And yes, itโs terrible idea
maybe a somewhat tame example, but I observed in one repo a switch statement nested in a for loop. each case in the switch statement had the same 10 boiler plate lines - just creating a UI label - with only the text of the label changing.
this was itself nested three or four indents deep in an 800 line method.
The absolute worst was Drupal's old plugin hook system that would call any function if it matched a specific pattern (not sure if it still does it)
For exampleapp_name_init()
You can't search by reference because it's never called directly. Debugging gnarly issues meant you had to dig into its libraries to know exactly which hook was being called
Until you find out in niche situations, beforeAfterPageLoad runs before afterBeforePageLoad, but also years of code built on this framework just assumes that's never possible ๐. I've certainly never seen something similar.
View all comments
385
u/Signal-Permission394 Sep 30 '26 edited Sep 30 '26
Hey man, at least the methods sound somewhat descriptive. You haven't at least gone through legacy code where they start using magic numbers which go off to a giant case statement, which then pass its own number to stored procs, which update values in a table and a Windows scheduled job picks up later that evening to update another table which is then used by a view, and this is between several networks ๐ก
None of these numbers are mapped, and you have to hope the previous guy still had the .dlls on his machine/ VM as he pulled it from god knows where and didn't bother to put it into TFS or else the project doesn't run.
I loathe SSIS packages and VB, and I am glad to never touch that shit again ๐คฎ