The grind

Learning to code is like building with legos.

Each piece of code is a small robust block that you arrange in relation to other blocks. Like lego, you can build almost anything!

But the way you approach the task is the real trick.

Last week we were asked to make a simple blog app in Rails in under two hours. There was no pressure, it was just a way of seeing what we had learnt (and more importantly what we hadn’t). The most revealing thing was how much I really didn’t understand. I had things that I knew I should do, but when it came down to it I couldn’t figure out a way to tackle the problem. A little lost, I sat for most of the two hours achieving very little (much like I am writing this late at night when I should be coding).

I dug around looking for something to latch onto; I thought I knew the steps but what to tackle first was difficult to see. Given the freedom to do anything I liked I was frozen in place, my mind looking for the first step but finding nothing. In the end I had two pages with a button that went from one page to another and nothing else. It was pathetic.

Disheartened by my lack of coding, and coming to the realization that I didn’t really understand much of anything, I got angry. Anger is normally a negative attribute for people, but I felt alive, after months of sitting on my butt staring at a computer my blood was pumping. My mind became determined, however I had to figure out a plan of attack.

Normally if I come against a block in the physical world, I push through by sheer will power. When I tried to learn archery there was a moment of absolute failure before I gained clarity. I had a clear object of hitting a dinner plate size target from twenty meters. Every day I would go up to the range and practice, but on one day in particular everything went wrong. I hit myself in the face three times, I missed more then I hit, the pain from having poor technique and a bruised ego (and wrist) was enough to make me want to give up. It was in this moment I kept going; in this moment there is something to be discovered, some simple bit of common sense or something that someone said that dawns on you.

This attitude doesn’t work with code however. Pushing past the point of mental exhaustion only means not taking anything in. Learning to back away from a problem has been difficult for me. When it comes to mental challenges, gaining space from the project and doing chin ups (I am getting so good at them) helps more then pushing through. It is astounding how your brain still works on stuff in the background. Outside the space you code, the solutions slowly began bubble to the surface. I needed to find a coding compass.

The guiding rule of martial arts is about distance. If you want to hit someone, get close enough to do it, and if you don’t want to be hit get far enough away. This is a simple rule and dictates the how and why of every movement. Discovering a governing rule of coding however was another thing entirely.

I asked anyone I saw coding what they were doing, watching them solve problems. My mind slowly started to form the beginnings of something. In my minds eye, code became like small blocks of lego being built piece by piece. Methodically tested to ensure it’s reliability, each block taking data from the block below then applying the changes to the block above. Though it is tempting to race head or to think of everything at once, you can become lost and your tower falls. But by taking the code block by block you create strong foundations to build great things.

Getting through the grind is never easy and it’s been a steep curve to figuring out how to tackle the  mental challenges but the rewards for your persistence are worth it…. I still haven’t finished that blog app though.  8_01

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s