Programming Practice
I got this idea this morning while riding my bike, while reflecting on Air Force Pilots. I wanted some videos last night which shows pilots practicing their aerial manoeuvres by dancing them out before their test flights.
These pilots do really cool flips and turns and dives - all during practice flights
Before aerial combat, however, you don't have time to do any of this. Nor is it even helpful. There is no way to predict what moves you will need to know.
That's the difference between practice and performing. During practice you plan out exactly what you are going to do an focus on executing it well. This way, while under pressure, you can 100% focus on problem solving. This means figuring out exactly what you need to do in order to solve the problem.
You won't be good at this unless you can (1) be confident in your ability to execute and (2) have a toolbox of things to actually execute, depending on the problem
So how can I apply this to programming?
My thought was to open my computer every morning at the start of the workday and randomly sample a useful data structure or algorithm. The plan would then be to quickly recite the key things that are helpful to know about the algorithm, followed by an implementation (maybe in multiple languages).
For example let's take a skip list.
- What is it?
- When is it useful vs something like a b-tree or some other balanced search tree?
- What is the average, best, worst case speed and space complexities?
- Say something about the constant factors for the complexity analysis. i.e. practically, does this maybe make more sense over another data structure in particular scenarios due to cache-friendliness?
And then top this all off with an implementation in C and Python.
You can then pipe this all into an LLM and see how you did, or compare it to a reference implementation.
Even better would be eventually start a timer and see how long it would take you to do this.
This would definitely make you dangerous.