CSC300: How to write code [2/10] |
The amount of time spent on a function does not amount to much.
If you are not working effectively, you can spend months on a single function and never get it correct.
So how do you work efficiently? Key things:
Work out lots of examples before you try to code.
Work on paper before you write any code.
Write automated tests to tell you whether you got it right.
Work in pieces