Turning Pro

If you’ve read any of The War of Art books, I don’t have to tell you how good they are or how they can inspire you to do your work. I just got back from riding my bike in Wattopia, and my quads are burning. I’m capable of a short workout at this point, and cycling is my chosen sport as well as my vessel for pain. It’s something that keeps me sufficiently out of my head that I can do my other work, which is writing and programming.

Writing and Programming

I guess most people will say these are very different things. But I believe any writer who programs or any programmer who also writes a lot in English will, upon reflection, agree with me, if he wants to be as expressive in each medium as he is in his best medium.

Masters of both professions strive to be clear and expressive. Neither practioner wants to waste words or be verbose. Neither wants a reader to scratch his head trying to understand what was meant by the author. Just as authors of prose want their readers to smile in appreciation of a well turned phrase or an image that lingers in the reader’s mind, so the author of code wants a reader of his code to appreciate a brilliant solution to a problem. Computers don’t really give a shit about what code looks like, so long as it makes sense to them. If the code takes a long time to run or is inefficient, computers don’t give a shit. Code isn’t really for written for computers. It’s written for humans who must maintain the code.

Programmers have a lot of things in common with each other. For example, programmers spend virtually all of their time trying to fix something that is broken. If they’re spending time on something that is working, they’re wasting time. So right off the bat, this doesn’t make for a satisfaction filled day. You sometimes spend days banging your head in anticipation of the few seconds of divine inspiration when you solve the problem. You can drink your meade in Valhalla with the other warriors and beat your chest in the glory of victory, of having vanquished the monster. You’re permitted to do this for about 30 seconds or until someone notices you smiling, whichever comes first. Then you move on again to something that is still broken.

The Art of Programming

Apologies to Donald Knuth. I believe programming is an art in that the artist must suffer if he is to be any good. We don’t really have casual readers in programming. If someone reads your code, it’s not because they want to. Normally at least. There might be an enthusiastic padowan seeking wisdom, or someone else might be rifling through github repos trying to find a project similar to their own so they can solve their own problem. But otherwise, people read your code because they have to, not because they want to. It’s easier to make your readers suffer with computer code than it is in written code, I believe. At least it is if there’s no one compelling them to read your prose.

If your logic is so terse that a person with a 140 IQ has trouble following it, that code must be re-written. Unfortunately, 140 IQs are not so easy to find, even among programmers. So I think it is easier to find a mentor who just has more experience usually. And they won’t have time to read your entire codebase, so you have to show them the sticky parts only, outside of an overall context. And, of course, they must be versed in your particular technology stack.

Technology Stacks

There are very many stacks of technology these days. These are groups of tools, like programming languages and libraries, that work together to accomplish a goal or make a project run as it should. In web development, for example, there are tools that run on the front-end, or the part of the application that the end user sees.

But that data doesn’t just originate inside the browser. It comes from somewhere. So if it comes from some other location, it probably must be prepared before it is displayed in the web browser. The place it comes from is usually a database, consisting of an endpoint or API, and part of the job of the back-end of the application is to prepare that data to be presented at the front-end. This is called a full stack application, or one that handles everything from the raw data received in JSON format (or whatever format, but probably JSON–err, which stands of JavaScript Object Notation) that is received or transmitted to the database to the neatly formatted data you see displayed in your browser. There are stacks of tools that can make all this happen. The one I am using currently is called MERN (Mongo Database, Express.js, React.js, and Node.js).

What I Do

My programming day consists of about 3-4 hours of conentrated coding, usually in the morning. I have a little pomodoro timer app that helps me space out my rest periods. I also keep a list of TODOs for whatever app I’m working on. This list contains little details as well as major goals. And each 25 minute period is balls to the wall. Whenever an errant though enters my mind, I kick it out. I’m back in the code, turning it over, trying to find my way forward. There’s a ding. I look up and see that my rest period of five minutes has started.

Get up! Get away from the computer as fast as I can. This will be the only rest I have again for another 25 minutes, so don’t waste it!

I use this time to do some dishes, cycle a load of laundry, or clean the litter box for my cats. But it’s not a very long time. It goes very fast, so I have to get right back for my next 25-minute period–balls to the wall.

Meanwhile, Resistance is everywhere. Just focus for 25 minutes, that’s all I have to do. I look up, and I only have 20 minutes to go. Then 15, then 10, and so on. I can do this.

Eventually, I get a 15 minute break. Wahoo! I might even walk out to the mailbox or stare inside the refrigerator for a minute. I might make that sit-down head call I’ve been needing to make. Or order something off of Amazon for a quick minute–although I usually want to wait until after my 3-4 hours before I do stuff like that. My goal now is to get far away from the computer for 15 minutes. Get my brain off the app. But then get back on when the 15 minutes is up.

The bell rings and I’m back at work. Usually I get 15 minutes every two hours. I think that’s 4 pomodoros? I’ll have to check. Anyway, my day is only 3-4 hours long. If I do anymore than that, fine. But I must do at least that much, and then I can quit. If I do that 3-4 hours, I have overcome my Resistance for today. I have my personal victory. I have kicked Resistance’s ass. I can drink my meade.