Software craftsmanship

My latest commit on a Python TDAmeritrade API wrapper.

That purple MERGED button gives me one of the most satisfying feelings imaginable. As someone who’s been playing with code for well over three decades, seeing my contributions made part of a project that others and myself use brings me a lot of joy.

I’ve always enjoyed learning how to make computers do things, from the time I was four or five and playing video games on my dad’s IBM PC/2. When I was in fourth grade we did some computer labs with BASIC, and just something like creating an infinite PRINT loop was a great source of amusement. The advent of the web brought HTML, CSS and Javascript skills, tinkering with WordPress, Wikis, and other open source projects taught me PHP. There was a problem though.

All of my dabbling was just playing upon the surface of a giant pond. The more I experimented, the more I realized that I was missing something, conceptually. I started getting stuck. My projects would eventually get too big to work, to complex for me to refactor. I became discouraged, and kept to support roles, helping end users and building and deploying business networks.

Twenty plus years of being “the computer guy” will take a toll on anyone. I suffered from the symptoms of burnout without recognizing the cause. I began to feel a sort of contempt for the people who I was supposed to be helping. It became harder for me to exercise the type of patience needed to deal with older people, unaccustomed as someone my age or younger is to technology. And it became harder for me to maintain the demeanor needed for someone in that role. So I started checking out, and saying no.

It was frustration that drove me back to school. The realization that my self-paced learning had hit a wall, and that I needed some help to get to the next level if my skills were ever to match my ambitions. The other part was seeing job applications with degree requirements, and being unable to get callbacks for the jobs that I wanted. Now, I realize that a lot of it was the lack of challenge. Looking back, I think I had probably grown a bit complacent, arrogant even, unhappy with the direction my career was going, and unchallenged in the ways that I needed.

So the past few years of school has been very fulfilling. The curriculum wasn’t quite what I expected, or as comprehensive as what I think is needed in today’s IT world, but I’ve managed to run with it. Despite starting numerous projects over the past few years, I still haven’t delivered anything that I would consider finished, but the programs I’m building now are a step up from the things I was making a few years ago.

Programming is ultimately a creative art. Having abandoned my musical aspirations several years ago in favor of job stability, perhaps I’ve been craving that outlet in a way that hasn’t been fulfilled. And building software systems, or as in the case above, contributing to an existing project, making it a little bit better, commit by commit, gives me the same sense of craftsmanship that songwriting did.

Learning to fly

I’ve been on a bit of a kick on Robert C. Martin’s work lately. Martin, AKA “Uncle Bob” is the author of several books on coding and is the author of a couple of classics in the software development field. I’ve watched several of his lectures on YouTube recently, and have been reading through Clean Code the last couple days. It’s really making me realize how garbage the things I’ve been writing lately are, and I’m pressed with an immense urge to go back and completely refactor everything that I’ve been working on the past few weeks.

Of course, having a robust integration test suite is absolutely necessary for any kind of refactoring, which is not something I’ve been terribly disiplined about recently. I’m proud to say that I am taking a strict TDD approach to my latest class assignment in C++, although it has slowed me a great deal. The hardest part is determining how to right tests. Sure I could go and write a massive 200-line function that would take input and perform the Gaussian Elimination on it, but since this is part of a larger test suite that we’ll use for our final exams, I want to make the code more modular. For example, see the difference between this big 75 line single main statement, and this one. The latter could still be broken out to smaller functions according to Uncle Bob, but is still a step in the right direction.

There were two reasons that I went back to school to finish my degree. The first was that I thought I needed a BS after my name in order to get my resume past some of the gatekeeping algorithms at some firms. I’ve since come to the realization that I have no desire to go to work at any large enterprise or other organization where this would be a factor — six figures be damned. The second was that I felt like I was running into roadblocks with my own development projects. They were basically huge convoluted procedural things. Even when I tried to adopt OOO principles, they were still a mess. I felt like I needed to go back to school and go through the curriculum to get where I needed to get.

I don’t think it’s quite worked out the way I wanted it to. Now, don’t get me wrong, I think earning a degree in ‘Computer Science’ has been valuable, but it’s not quite what I expected. I think one of the intro Unix classes really broke my block when it comes to working with Linux, and that’s a skill that I have definitely appreciated. But I think the focus on Java and C++ is behind the times.

I recently had a conversation with one of my professors about why I was surprised that there hadn’t been any focus on Software Design patterns. (I’m still working my way through the Gang of Four.) He told me that there was a bit of disagreement within the department between those who wanted to focus on theory, and those who wanted more actual engineering and development. So far, the balance of power lay with the theoretical side, which is why the focus on the maths, big-O notation, data structures and discrete-finite-automata.

Even so, I’m still surprised that I feel like I’ve taken more out of a couple of 30 year old videos on Lisp than I have out of the classes that I’m going $20K+ in debt for. All I wanted to do was to write better code, so that I can make programs do what I want them to do. The ideas that I’ve had for things were beyond my grasp to complete them, and I was looking for ways to increase my knowledge. I’m probably being unfair to the university, since some of the more business-end document writing (requirements, software specification documents, use cases, &c..) have helped me already in some of my professional interactions.

At the end of the day, it’s about sitting down with an IDE and writing those magic lines of code that make the computer do what I want.

Free JetBrains software for academic developers

So I’m pretty happy cause today I found out that JetBrains is offering free licenses to their entire software library for students and faculty members. I’ve been using PyCharm Community edition for some time now, and am really glad to have access to the Professional version with all the plugin and Django support. I actually purchased a CLion license a year ago or so. They make really good software, and I encourage everyone to check it out.Β