Maia McCormick

Programmer, writer, nerd

'Wasting' Time?

recurse center writing about coding

At Hacker School today, I didn’t get all that much done, and in my day’s worth of non-progress I brushed up against two distinct kinds of “wasted” time.

The first is somewhat productive, as wasted time goes. I spent most of the afternoon barking up various wrong trees as I tried to figure out how to structure the next step of my current project (a contradance database, which I’m sure I’ll blog about for real soon). Kind of like a real-life breadth-first search where every node takes several hours.

I’ve got a way to structure my data, and now I want to be able to search and sort and filter a bunch of these data-bundles. First I assumed I’d write the search code in Python and worry about making it web-app-y later. I started brainstorming and had no idea how I would optimize my code, and then someone suggested I use Data Tables a JQuery plug-in which will search and sort data super fast. So I spent a while reading up on Data Tables, looking through FAQs and add-ons and trying to figure out if it would give me some of the more advanced searching functionality I wanted. Someone else then suggested that if I ultimately wanted to search by a giant table of data invisible to the user, why don’t I just use mySQL and go right to the database end of things? So I talked to Andrew and hashed out a vague plan and set up mySQL on my machine and found some nice-looking tutorials… only to have someone else point out that hey, you don’t need to worry about learning SQL, Django can do all of that for you and you still get to write in Python. I gave Django a quick look, got excited, and then whoops it was 5:00.

So, frustratingly, I ended this saga with not a jot of code written, not a step of a tutorial progressed through. Not a pleasant feeling. But I console myself with the thought that my day was still somewhat productive, by some metrics. Unlike when I started, I know what I’m doing next. Unlike when I started, I know a bit more about Data Tables (which I think I will end up using for the front end of my final product) and mySQL (which is a good thing for anyone working with databases to understand). And so even if I’m right back at point A, I can move forward from here. I might call this sort of time-wasting productive time-wasting, or maybe foundational time-wasting, since, though it doesn’t accomplish anything itself, it lays a foundation for future accomplishment of things.

The second kind of time I wasted is harder to feel good about. It was unproductive time-wasting at its finest. I didn’t even get a shaved yak out of it. By the time I gave up on the above because my brain was fried, I decided that I would spend an hour trying to get some dynamic content on my website and then head home around 6 (because I know that I don’t do good work that late into the evening—better for me to leave earlier and actually not work, as opposed to pretending to work but accomplishing nothing).

I spent the next hour and a half poking around AJAX and history.js tutorials, still no closer to what I wanted. It’s easy enough to make a link-click change the content of a div with AJAX, but what I really want is for the page URL to change as well, but without reloading the page (unless the user has a crappy browser that doesn’t support AJAX), and for the page change to be accessible as history, forward- or back-able, etc. I figured out how to change a div with AJAX within the first 15 minutes, and the rest of that time was spent banging my head against history.js READMEs and tutorials and stack overflow topics.

Unlike that first chunk of wasted time, at the end of my dynamic content spree I felt no more knowledgeable than when I began, no better equipped to tackle the problem. All I felt was inadequate and impostor-y because I couldn’t decipher any of the history.js walkthroughs or code examples.

So, lessons learned from all this: I want to start setting myself discrete chunks of time in which to do things. Not only will this make it easier to start on daunting projects1 and give my workflow more structure so that I’m not jumping around all the time, it will (hopefully) keep me back from the edge of the black hole. After I’ve spent an hour (especially late in the evening) on something like the dynamic content thing and a timer goes off on my computer, I have to step back and reevaluate. “Am I getting stuff done? Is it time to ask for help? Is my brain too mushy to keep doing this? Is my current approach still working?” Even if I do the same task for several hours straight, setting myself a little mental check-in every hour or every 45 minutes will, I hope, help keep me on track. Plus, I do much better with accountability when I have a concrete timeline. Yesterday I resolved that before lunch I would write a README for my abandoned Markov generator so that I could come back to it later, and I’d go through a chapter of the Interactive Python Algorithms and Data Structures course. I did both of those things, and I felt so good about doing all the things that I’d said I was going to do!

Also, I’m curious how I will react to having more, smaller projects that I can work on in fits and starts, without oversaturating my brain with any one thing. I’m thinking of giving this a try—maybe some of the coding exercises in the Interactive Python tutorial, maybe Amy Hanlon’s phonebook exercise, or one of the mini-projects from the old HS Ironforger group. Something to put on the back-burners of my brain!

  1. For instance, after I finish this post, I’m gonna go spend 30 minutes working on the actual content of my website, which is something I’ve been putting of for forever