3 ms·
Get used to writing your code twice. If you were writing prose, almost any methodology recommends that you revise and edit your first draft, often multiple time
by topkai22 4y ago
Get used to writing your code twice. If you were writing prose, almost any methodology recommends that you revise and edit your first draft, often multiple times. My first pass at an implementation is for me to understand it and solve it. If it’s a throwaway tool, that may be where it stops. If it’s committing to a common repo, I’m probably going to significantly rewrite and enhance the code at least once. If it’s the basis for a new technique/sample code, it’s going to be multiple times with feedback.
Seek feedback on your code. Fresh eyes provide fresh perspective. You’ll learn a lot about yourself from others commenting on your code.
- randomluck040 4y agoI think this is good advice but who do you show your code to? Did you have the chance to show your code to your peers or did you do it online?
- belmont_sup 4y agoIf I’ve stepped away from the code a while, and come back later 1-2 months with new requirements, that sometimes requires me to rewrite a pattern or so.
- topkai22 4y agoPeers exclusively. I’ve rarely worked professionally on projects that were open source compatible, and when I program on my own time I haven’t sought feedback because, frankly, that’s me time.
- sibeliuss 4y agoYep. Often new engineers never even consider the fact that they can throw away code, or rewrite something after a first draft. It seems to be knowledge learned on the job and most have an ah hah! moment after they realize.