Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
What is the most absurd code you've ever seen? (quora.com)
23 points by e19293001 on Nov 8, 2016 | hide | past | favorite | 10 comments


Lol, cron jobbed scripts. Instead of changing the code they would just write a new script and cron it 1 second after the original script.

Problem solved!


Is there a cron implementation that gives you control down to the second?


Wouldn't that cause horrible problems depending on what the script does?


Pretty much any code I've written and reviewed after a couple of months.


Obligatory link to TheDailyWTF:

http://thedailywtf.com/


The Magic Servlet pattern in action: a 4000+ line function implemented in a jsp file; took a while to refactor that dumpster fire. I have never put much stock in 'licensing' for software developers but the aforesaid monstrosity really made me consider whether I should rethink my position.


I once encountered a 2K+ line script handling submissions from something like a contact form.

If a client submitted a value for which the key didn't exist in the database table, it wasn't ignored - the application would alter the table to add that row to the database so it could insert it.


Surely there's prior art on the AT&T one? Might be a bit hard to search for, though.


Found an "if (true or false) { ... }" in a PHP project my team is maintaining. It was from before we took over the project so we don't know where it comes from.


class CSectionOfSingleMaterialDrawableObjectBuilder { ... };




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: