JakeTacToe Lessons (Part III)

JakeTacToe was my first complete coding project. I had dabbled with some javascript and PHP prior to JTT, but this was the first time I took an idea from inception to final product.

I thought the hard part would be figuring out how to make it all work properly. I’ll admit it did take some effort at first to put together a functioning program, but the rate limiting step was my lack of experience with Python rather than the problem itself being difficult. In fact, once I got more familiar with Python, getting a proof of concept for my JakeTacToe idea was fairly trivial. There’s probably thousands of ways to implement something like JTT. I would come to learn that the real challenge wasn’t finding a way to do it, but to find the correct way to do it.

In same ways, code is like a living creature. It’s constantly changing; growing (sometimes uncontrollably so if not monitored) and rotting away if not being nourished (maintained by developers).

Over the lifespan of your project, sooner than you might imagine, changes will become necessary, dependencies will go out of date, and you may find yourself wanting to share your code with other developers or adapt it to fulfill a slightly different purpose. As the changes, dependencies, contributors, git branches and commits, etc pile up, it’s very easy for things to get out of hand. Code becomes inefficient, bugs become harder to track down, and working on the project becomes less fun.

My project was admittedly very simple. The fact that it still managed to get unruly goes to show you how easily this happens.

Eventually, I adapted to this trend towards chaos by focusing my attention on laying a neat foundation of well commented, modular, and self explanatory code. Better comments and fewer moving parts makes tracking down bugs during updates and refactoring much less frustrating.

I found that, after working for an hour or two, I would get into a sort of flow state. My mental clipboard, the part of my mind which is good at retaining and manipulating several thoughts at once, could handle more bandwidth. It would become much easier to mentally follow procedural chains to their logical conclusions. Since coding is basically comprised of linking together several procedural chains into one much bigger and more useful procedural chain…this was a good thing. Good comments and simple code makes getting back into this state of mind much easier. I assume that it also makes it easier for other developers to grasp your code and get into their own mental flow state.

This project has relieved a lot of anxiety for me. I used to think of programmers as autistic savants, manipulating esoteric symbols in highly complex ways to perform magic. Seeing the world moving more and more towards a dependence upon this technology, I was worried I’d be left behind. But now I see that there’s nothing magical about it. Programming is simply using a combination of tools in such a way that it enables you to accomplish things in a much more time and energy efficient fashion. The important part is finding the correct tools, supported by energetic and committed communities, and documented in clear, understandable language.

This is not to underplay the hard work of software developers. Trying to keep my code straight, as simple as it is, was difficult and really gave me a deep respect and appreciation for open source communities like the Linux community. It’s hard to grasp how much effort and time has gone into the development of the Linux OS and other projects like it.

All said and done, my JakeTacToe project has given me an insight into the world of software development. Python has become another weapon in my arsenal, and I’m grateful to have it.