Hacker News new | ask | show | jobs
by leif 5405 days ago
never be afraid of refactoring, but only do it when you're changing a piece of code anyway (otherwise you'll drive yourself nuts)

get others to review your code whenever possible. for that matter, do code reviews yourself whenever possible, it'll make you better at writing code too

always write it the simplest way you can, especially the first time. code that's clever for the sake of cleverness is bad code. learn about compiler optimizations, there are plenty of things compilers will do to make it so you can write clear code that is still fast, and there are plenty of clever things you can do that won't make an iota of difference in the end.