I learned so much today and what’s more importantly I applied some non code skills I have learned through my apprenticeship.
When things are going well, tests are passing, loose coupled code, straightforward refactoring, adding value. Life is easy. What I have been trying to improve on since the end of my 1st month of my apprenticeship is what to do and how to behaviour when things aren’t going so right.
I had estimated enough time to for game options and human v computer for my clojure noughts and Crosses, sadly I got stuck on one particular part.
How to effectively test that a computer v human game was playing. I wrote the test but my game loop wasn’t calling the computer defmulti method. I scratch my head again, after 20 mins it was time to search into “what to do when you’re stuck k” toolbelt.
Step away from the screen.
Take a walk outside (if it’s really bad)
Talk to a colleague about it
Talk to a colleague about something completely unrelated.
Do the running man!
Whichever one it is, it’s about stepping away from the screen, something I admittedly have a hard time doing.
What u learned from this recent episode was that I sometimes you have to do multiples of these. So I took a walk outside, I juggle 2 times, drank plenty of water, talk to colleagues about the problem until finally… I talk to another colleague about an unrelated topic, then finally I understood my issue a bit better. Not solved it but understood it better, which is a step forward.
I have to accept no matter how many years I do this programming gig, there will always be times like these when I can’t get my head around a problem and I just need to step away from the screen…. n times.