How to Write Unmaintainable Code (1999)

doc.ic.ac.uk

54 points by downbad_ 2 days ago


Panzerschrek - a day ago

> Make all of your leaf classes final. After all, you're done with the project - certainly no one else could possibly improve on your work by extending your classes.

It's actually a good advice. A class not designed to be extendable should be marked as final.

vharuck - 2 days ago

>4. Use acronyms to keep the code terse. Real men never define acronyms; they understand them genetically.

I'll see this and raise inherited SAS code where data sets in the process were named "AAA", "BBB", and so on. To prevent any kind of naming reason, even chronological, new data sets could adopt others' when the existing data set would no longer show up in the program. Which was so helpful when updates needed the previous data.

oniony - 2 days ago

Original: https://www.mindprod.com/jgloss/unmain.html

miqkt - 2 days ago

Ah, time to copy this into the custom instructions for an LLM to amuse myself with.

ray_v - 20 hours ago

I feel this in my bones. I had to wait for them to invent LLM agents that could reverse engineer an application to a specification before I could stat to unravel code I inherited.

downbad_ - 2 days ago

https://news.ycombinator.com/item?id=10237636

livinglist - 7 hours ago

AKA how to assert dominance and improve your job security

none2585 - 2 days ago

One of my favorites to come back to periodically

weiyong1024 - a day ago

[dead]

yubainu - 2 days ago

[dead]