Hacker News new | past | comments | ask | show | jobs | submit login

> What do you think makes your code good?

Answering for myself: (1) it's short. Often significantly shorter than my colleagues'. (2) it has few bugs, if our bug tracker is to be believed (I reckon I'm not very confident about that one).

On the other hand, I tend to be slower, especially when I have to write against less than optimal APIs.




But short code isn't necessarily a garrant for good code. I went through a teenage phase where I would strive to write the shortest code possible.

It's cringe worthy, and working my back into it seems scarce impossible. If you drew out the program logic, it'd look like an Eldridge terror. It just isn't good code.

But yes, if you're writing War and Peace in order to parse XML, it's unlikely you're writing good code.


I try to write the simplest code possible. It always end up being shorter than if I didn't.

Also, of two okay-looking pieces of code, I noticed that the shortest is almost always the simplest. Which makes size a pretty good metric.




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

Search: