3 ms·
It is just like optimizing any piece of code. Log everything, identify hotspots and improve them. 1) Time yourself. Keep a little text file with timestamps a
by keenerd 12y ago
It is just like optimizing any piece of code. Log everything, identify hotspots and improve them.
1) Time yourself. Keep a little text file with timestamps and brief fragments of what is going on. Do this every time you have a mental context switch, start a new sub-goal, accomplish something or give up on an attempt. Usually I find myself logging something every 5-15 minutes.
1B) Documentation lookups should not be manually logged. Instead flush your browser history for the day before starting and then save out a copy of that when you are done programming.
2) Once finished, identify and eliminate time sinks. If you spent 15 minutes writing boilerplate, refactor that out for the next time you need it. If you spent 15 minutes looking for correct bit of previously refactored boilerplate, organize your archived code. Look at what parts of the documentation you visited the most and study them.
3) Always be trying new tools. There is no such thing as a silver bullet, but there are some pretty impressive special purpose alloys. While tedious, it is worth running previously-solved challenges though the new tools. (Subtract out the time spent just thinking during the old run to correct for the additional experience on re-running it.)
4) Practice! Find the smallest "unit of delivery" and deliver that as often as possible. For example if you do games, do game jams.
By following these I am now 60x faster for one subset of competitive programming (Mystery Hunt style puzzles).