Hacker News new | ask | show | jobs
by valarauca1 4317 days ago
A few tips every developer should learn.

1) Solve the problem before you write the code.

2) Figure out what data structures to use and the code will follow.

3) Debugging is your fault, you screwed up. The language or the compiler didn't (true 99.999% of the time).

4) The difference between genius and insanity is if the algorithm runs faster.

The biggest general tip is learn data structures. They are the fundamentals, you will always use them, get used to them.

2 comments

"1. Solve the problem before you write the code."

Sometimes the problem is difficult or huge (or both) and you don't know how to solve it. By starting to write some exploratory code, like a solution to a small part of the problem that you do understand, you can frequently get ideas about how to solve the bigger problem. Even if you end up ultimately throwing this code away, it could still be a useful learning experience and help you make progress toward understanding the real solution.

"Write it; throw it away; rewrite it." Not always the best solution, but a good voice to have in the mix.
> The biggest general tip is learn data structures. They are the fundamentals, you will always use them, get used to them.

Yes. E-R data modelling is worth learning early and well, http://www.aw-bc.com/info/riccardi/database/Riccardi_ch4.PDF