Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The one that I didn't have to read.

A mistake i see many engineers commit is obsess over their code and how "pretty" it is. What they seem to forget is that code is only read when it isn't doing what it's supposed to do. Granted when you do have to read it there are good and bad examples, but the question you should ask yourself is not "how can I make this code easier to read?" But "how can I make sure noone has to read this code". The code that performs this job is not always pretty. If it is impossible to make the code bulletproof then the best bet is usually to just make it really simple. Good code is nonexistent and if it has to exist it is boring.



For a lot of code, what the code is supposed to do changes over time, so no matter how correctly you write it the first time, someone will have to read it.




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

Search: