Introspect

January 10, 2017 | PROFESSIONAL

Writing Code to Make Websites to Write About Code

I’m learning to code but I ain’t got wings. Part 2 of a series.

Introducing Spect, Part 2

In 2015, I began a bit of a career shift from “generalist with solid tech skills” to “brogrammer wizzzard.” Ok, not really. But after a long period of working with library metadata I moved to a new position in my library’s Digital Initiatives department. Around the same time I began a long-delayed MLIS program. My technical knowledge increased rapidly. I had to dive immediately into databases and command-line tools, then quickly pivoted to geniune coding. I began to take an interest in Python on the advice of my supervisor — we’re working on a major project with the Internet Archive and much of their technical infrastructure is built in Python. I took some of an MIT EdX Python class and then, as part of an “information architecture” class, a Codecademy Python course. I learned a fair amount despite hating the way “Codecademy” is spelled.

These courses were the first time I have ever done any formal(ish) programming training. I can trace my primitive coding skillz back a long way though. As a kid I can remember going through examples from a book on BASIC on an old Apple II, and even remember a lot of details like using ? as a shortcut for PRINT:

10 LET NAME$ = "JEFF"
20 ? "HELLO"
30 ? NAME$
Working Applesoft BASIC! Courtesy of http://calormen.com/jsbasic/
Working Applesoft BASIC! Courtesy of calormen.com/jsbasic/

I was pretty good at BASIC. And somewhere around 4th or 5th grade I remember having a computer class where a teacher said I should go into computers. I’d be a lot richer if I had! But in high school I took a typing class on an electronic typewriter; in college I used the internet for homework about three times; I never owned my own computer until I was already in my first post-college job. It was a little early to “go into computers” unless you were a mathematican. I was always more into the humanities, but I remained tech-savvy. When I got involved in web design and WordPress (as discussed previously), I learned a little JavaScript and PHP, but certainly never fancied myself a programmer. I could do dumb CSS tricks, but I never dreamed of doing something crazy like creating my own substitute for WordPress.

But since digging into Python a year ago, I have found it increasingly useful. One of the main coding-type things I end up doing at work is writing little programs to create and read text files holding various types of data. Huh, I began to think at a certain point. This is not really so hard, generating a bunch of text files. And websites, of course, are really just text.

I had a few motivations to consider piecing together some sort of bespoke website generator. I wanted a a portfolio piece that could also contain portfolio pieces within it. I wanted to keep pushing myself to learn a modern programming language (sorry, BASIC, but you are just not that useful); as my idea evolved, I similarly wanted to learn about managing coding projects in GitHub and organizing Python code efficiently. I wanted to really understand all the features of my own tools.

Finally I decided to dive in and see what happened. This blog is now running on my own blogging engine, Spect (named for this blog, Introspect). Spect is a simple Python program that generates HTML files for a static site. It is still a total work in progress, but it is GETTING BETTER EVERY DAY:

A VIDEO I RECORDED AND POSTED TO YOUTUBE TEN YEARS TO THE DAY BEFORE THIS BLOG POST. THIS WILL NOT BE THE LAST TESLA REFERENCE ON THIS NEW WEBSITE.

Spect is satisfying project, but I hope it ends up as more than just me writing code to make a website to write about code. Even just from a technology standpoint, what I am most excited about is the depth of insight I’m getting into how websites work (and fail to work). When you learn how to make something from scratch, you’re able to recognize that underlying design decisions have interesting, occasionally problematic, consequences. This is presumably true of designing a rocket or a Constitution or a shoe or a casserole. And we have reached the point where the way the internet works is almost as important as the way shoes and casseroles work.

Why did blogging develop the way it did? Why does contemporary web design, ever covetous of social media attention, look the way it does? There are some hints in the logic of programming that I am looking forward to exploring and thinking about.

NEXT: A Roadmap for Spect