Live data from Hacker News

How to write unmantainable code (2015)

github.com

1–10 of 87 posts

Re: How to write unmantainable code (2015)

#2
They forgot the masterpiece I saw years ago:

1. Give all your Python class members a tedious naming convention.

2. Be DRY by writing helper functions that do name lookup based on a string of the last half of the member name.

3. Be even more DRY by having the function guess a little if the match isn’t exact

You now have an application where you cannot search for where members are referenced.

Re: How to write unmantainable code (2015)

#3

They forgot the masterpiece I saw years ago: 1. Give all your Python class members a tedious naming convention. 2. Be DRY by writing helper functions that do name lookup based on a string of the last half of the member name. 3. Be even more DRY by having the function guess a little if the match isn’t exact You now have an application where you cannot search for where members are referenced.

Feels like a dad joke!

Re: How to write unmantainable code (2015)

#5
This is the way it seems to go in the public sector, at least here in Norway.

1. Get an n year government contract for some huge public IT overhaul. E.g building a new hospital journal system for a large region(this example is real, google "helseplatformen")

2. Spend years developing this huge proprietary .net monolith with a waterfall model, and minimal user interaction and testing during most of the contract.

3. Release an MVP by the end of the contract that's barely suited for the task(inevitable due to inherently broken dev model) and causes a huge amount of problems

4. Get another n year contract to fix the thing

5. Print money.

Re: How to write unmantainable code (2015)

#6

They forgot the masterpiece I saw years ago: 1. Give all your Python class members a tedious naming convention. 2. Be DRY by writing helper functions that do name lookup based on a string of the last half of the member name. 3. Be even more DRY by having the function guess a little if the match isn’t exact You now have an application where you cannot search for where members are referenced.

Ah yes. Just like Ruby and meta-programming games with send, define_method, and method_missing.

Re: How to write unmantainable code (2015)

#8

This is the way it seems to go in the public sector, at least here in Norway. 1. Get an n year government contract for some huge public IT overhaul. E.g building a new hospital journal system for a large region(this example is real, google "helseplatformen") 2. Spend years developing this huge proprietary .net monolith with a waterfall model, and minimal user interaction and testing during most of the contract. 3. Re…

Bad software is universal. It’s purpose is to milk the public tit. Not to deliver actual value. The value is in the money being paid.

Re: How to write unmantainable code (2015)

#9

They forgot the masterpiece I saw years ago: 1. Give all your Python class members a tedious naming convention. 2. Be DRY by writing helper functions that do name lookup based on a string of the last half of the member name. 3. Be even more DRY by having the function guess a little if the match isn’t exact You now have an application where you cannot search for where members are referenced.

Ah yes. Just like Ruby and meta-programming games with send, define_method, and method_missing.

They call it “reflection” because the more you use it, the more you ought to stop and reflect on your choices. ;)

Re: How to write unmantainable code (2015)

#10

They forgot the masterpiece I saw years ago: 1. Give all your Python class members a tedious naming convention. 2. Be DRY by writing helper functions that do name lookup based on a string of the last half of the member name. 3. Be even more DRY by having the function guess a little if the match isn’t exact You now have an application where you cannot search for where members are referenced.

I did something like step #2 in C# some years ago. Pulled data from the database based on the calling function’s name.

Clean Code was mental poison for me and certainly led to a bunch of overly abstracted or overly-DRY code.

Post reply on HN