Preferences

What if it needs to change is better than, "What if it changes?"

In a business environment, Write code that is meant to be extended upon by people other than you.

It's not mindless tyranny, its good design.


Rewriting code is often faster than understanding obtuse code written for requirements that never come.

I once encountered a 5k loc program designed to take the average of a series of Boolean values. The code had been designed such that the input data format could be changed etc etc. unfortunately, of the 5 metrics which could have ever been requested only 2 were implemented. It was to difficult to work with the code to implement the three others ( just finding where to implement them took 3 days).

Ultimately all the extra abstraction abstracted over the wrong things. The 5kloc project was replaced with a 100 line file that did exactly what was needed.

Unless the person other than you is me. I’ll just delete your monstrosity and replace it with a couple hundred lines of focused, simple code and revel in the mostly red diff on GitHub.
That's fine, as long as you are still solving the original problem in the required time. The IRS won't excuse that you missed filing your withholding data on time because you were making the reporting tool easier to extend upon later.

This item has no comments currently.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal