Explore the code

At some point in the last few years strange things started happening in life. Like really  strange things. Strange along the lines me deciding to get a degree in electrical engineering. And it didn’t just stop there either. Somehow I got talked into applying to some of the top Computer Science graduate programs in the world and for some reason I actually got accepted into one. Even though by day I’m a starving graduate student heading towards some amount of respectability as a computer scientist, the deep, dark truth is that inside I’m just kid who likes slinging code to build cool stuff. And there’s an awful lot of cool stuff waiting to be built.

The greatest thing about working with software is the immense flexibility that it offers. We are quite literally building structures with pure thought. Of course, our thought gets manifested as lines of code, functions, classes, modules, type systems, so and so forth. And all that gets compiled down to ones and zeros which in turn become little groups of electrons flowing (or not flowing) through unimaginably small, real, physical structures made of semiconducting materials. The magic of computer technology is that I can easily ignore all those layers and easily spin my thoughts into increasingly complex and intricate webs. And that is wonderful.

I’m currently listening to “Christofori’s Dream” by David Lanz on Pandora. It’s a quite beautiful piano piece (though I’m no real judge of piano pieces) and I can’t help but think that programming is quite similar to music (and writing and painting, you get the drift). But the one advantage we programmers have is that our instruments are quite literally limitless — if a problem can be solved in a finite, reasonable amount of time we have the tools in our hands to solve it. That’s like having instruments capable of creating all possible musical sounds (given an suitable definition of musical). Now that doesn’t mean that it’s easy (any more than owning a violin means that you can play it) or that all instruments are created equal. Again, one more strength of computing over music performance is that it so much easier to create our own instruments if need be — oftentimes building atop other, less sophisticated instruments. Please keep in mind that I know very little about music (I played classical Indian violin for a while, but that’s about it) so if you know about computers and music (or just music) and think I’m talking crap, please have at it in the comments.

Before getting distracted by Pandora I was going to say that rapid experimentation is one of the really cool things about programming. You can write a line of code and in an instant see the computer carrying out your code. Hell, these days you don’t even need any actual programming tools installed — you just need a browser. I think that as we go from being teenagers making computers do cool stuff to “software engineers” and “computer scientists” we start to think that we are bound to use our powerful machines to solve important, large problems (or at least problems we’ll get paid to solve). At times like this, it’s worth remembering the wise words of Alan J. Perlis, one of the early pioneers of our field –

I hope the field of computer science never loses its sense of fun. Above all, I hope we don’t become missionaries. Don’t feel as if you’re Bible salesmen. The world has too many of those already.

There’s more on the about page. Sure there are important problems that need solving and we need our machines to help otherwise we’ll never get them done in time. However, there’s a lot of fun to be had on the way. We can sequence the human genome and model the birth of the Universe. But we can also create music, art, poetry, games and just general neat hacks that fill people with a sense of wonder.

At the beginning of Star Trek: Insurrection Captain Picard says, “T remember a time when we used to be explorers”. That time is now. Computers are powerful tools and instruments, but they are also amazing vehicles for exploring the spaces of the mind. While we’re off solving important problems and making tons of money let’s take some time off to kick back, pick up a keyboard, write some code and just wait and see where it takes us.

Keep exploring.

Advertisements

I got nothing

Sometimes you open up a blank page (or blank text entry box) and there’s just. You know you should write something, you may even want to write something, but when it comes to actually putting words on the page you simply draw a blank. That is me now. And it’s not that my life is boring right now either. Nope, I just finished the first draft of my thesis, I’m going to start a project to write a simple network chat system and I’m making progress on an internship application. I’m also trying desperately to figure out how I’m going to get my driver’s license before I graduate and move to another state. Even though there is a lot going on my life, there isn’t anything I consider worth writing about.

I’ve never been interested in just being a blogger. I’ve always written this blog with the idea that the writing should flow from the things I do in life, the things I learn, the technologies I explore. As a corollary to that, I assumed that if I just exposed myself to enough ideas, information and activities I would have stuff to write about. But it’s not that simple. I’m not writing Wikipedia entries here, I want to construct narratives — write articles that tell a story, even if it is a story about the inner workings of some arcane technology. Unfortunately, constructing a narrative out of the myriad experiences that I have everyday doesn’t always come naturally.

What makes the problem even more difficult is that most of the stuff I’m doing right now doesn’t break easily into small chunks that fit into a blog post. For my honors thesis I’m currently in dissertation mode which means that the whole thing is one 30-page manuscript in my head right now and I’m not even going to try breaking into blog sized pieces until I’m done with it in a few weeks. My embedded systems project involves controlling a model train system using microprocessors over Ethernet. But in this case the parts in isolation mean nothing and we’re not close enough to the end for me to write anything worthwhile about it. Maybe when it’s done.

I’ll admit that part of this might just be me not looking hard enough and trying to tease out the important, standalone parts out of the whole. I don’t know if I’d make a very good journalist. But part of it is also the disconnect between the process of making something and describing it. When you’re making something you’re in the zone — you can hold the whole problem space in your head and navigate it at will. The different subsystems of your project aren’t rigidly separate in your head (no matter how they might actually be structured), rather they all sort of flow together and the boundaries are blurry at best (unless you’re interacting with components that you didn’t make yourself). But when you’re describing your system, you can’t just provide a brain dump of your head. To give a description that others can follow and use you have to break things apart into sections and then weave them back together in a meaningful, but not overwhelming narrative. And that is hard. It requires you to be familiar with the system, be disconnected enough to take a step back and be experienced enough in writing to do a good job.

I’ve done it before with other projects, but I’m not at the position where I feel comfortable with projects that I can form what I’ve learned and done into a coherent narrative. So for now, I got nothing (because you don’t want more blog posts about Twitter clients and paywalls).

Breaking ranks

As the amount of reading I do on a daily basis has increased I’ve found some really good writers writing on really important and interesting topics. One of these people is Mandy Brown — she’s a veteran of the publishing interesting and has her hand in many pies including Typekit, A List Apart and A Book Apart. She has a very insightful (and thoughtfully curated) blog entitled A Working Library where she writes about libraries, reading, writing and how they interact with each other and society. Her latest post is about how the way we read our news is “breaking ranks” with the way it gets produced and distributed.

I don’t consider myself much of a news junkie (though a lot of the current tech articles and blogs I read daily could be considered news). I don’t have very strong opinions about the way the news conglomerates are trying to adapt nowadays (though paywalls do leave a bad taste in the mouth). However, I do agree with how Mandy identified the current situation as “breaking ranks” and why that’s really important. I believe that the most important things happen when this sort of rank-breaking takes place — when an idea or product starts moving in a direction that takes it away from what we consider its natural surroundings.

Case in point is the iPad (which I’m still agonizing over buying, by the way). I see the iPad as indicative of the way people use information breaking ranks with the way people use computers. The form factor, the app store, the interaction model everything is sharply different from what came before it and yet is more in-tune with what’s important — letting people use and interact with data and information without technology getting in the way. It’s unconventional, slightly alien and a fair number of people wish it would just go away.

Even on a personal level, progress is made when ranks get broken. Lately the way I need to work in order to get stuff done has come into conflict with the general environment I want to work in. I want to work in the sunny, spacious and generally aesthetically pleasing college library. But the library is generally filled with people and as a programmer and writer I work best in solitude so that I can concentrate without distractions. The way I want to work is breaking ranks with the way I need to work. The solution in this case is to go to the library in the morning — when it’s sunniest and yet there are few people. I can find a nice quiet spot and get work done. I carry my Chrome Netbook with Ubuntu to do my writing and some light hacking (more on that in a later post). In the afternoons and evenings I retreat to my room for music without headphones and my desk Linux machine to get to more heavy duty hacking. It’s been working out pretty well so far.

Progress and improvement, whether it’s personal or large-scale social and technical, is a combination of both slow, gradual improvements and larger quantum leaps. When situations get to breaking points small tweaks and improvements won’t do. You can’t drag print media to the Internet by just digitizing content. You can’t get a sizable increase in your productivity if you stick to your old habits and routines. When the breaking of ranks starts, you have to take equally ambitious measures to ensure that the breaking is for the better and that what comes out of the process is more than what went in.

Showing up and making rituals

Over the last few months I have been suffering from some bouts of senioritis. Nothing fatal, but it’s set me back by a few weeks, especially for my long-term projects like my thesis. At the same time, I’ve come to realize that every semester I start off with some grand plans but I just get too busy at the end of it to accomplish. Part of it is just being an engineering and computer science double major, but a large portion is also a flawed personal work ethic.

Though I make jokes about my laziness all the time, I do try my best to get stuff done. Unfortunately I’ve never managed to set up and stick to a formal plan of action. Most of the time I’ll implement a system or just put in more hours when I hit a heavy workload, but then I’ll stop once the busy period ends. That serves to get me through the hard times without affecting my grades (or making me pull regular all-nighters) but it also means that I end up wasting a lot of time and not working to my full potential during regular workloads.

I’ve been wanting to fix this situation for a while, but never figured out how. I use a to-do manager regularly and that helps to keep track of tasks that must be done on time. But it doesn’t help me make good use of the time that isn’t directly scheduled. Also I don’t want to block schedule all my time and live tied to my calendar and to-do list. I want my schedule to have some flexibility and variety, but not enough to cause choice paralysis.

I found the beginnings of a solution about a week ago, but I only formulated it on Monday. I read an article about forming rituals — things you do every day without thinking because doing it will help you reach a goal. The author uses the example of exercise — it’s something you just need to do every day without thinking. If you stop to think you’ll start coming up with reasons not to go to the gym. So what were my rituals? I realized that I didn’t really have any. I was working on a reactionary basis, reacting to homework and assignments and exams instead of getting work done every day — work that I enjoyed and really wanted to do.

I’ve decided to implement some rituals, but in a looser sense. I know that I can get classwork done on time because somehow I manage to make the time, but my other activities fall by the side. There are 3 main activities I enjoy but don’t do as much as I would like to — reading, writing and programming. So my rituals are that every day I will:

  1. Spend 30 minutes reading fiction. For now it’s classics on my Kindle right before bed time and then books from the library once I’ve exhausted that list.
  2. Spend 30 minutes reading non-fiction. This list gets fed by RSS feeds and links coming in via tweets. The actual reading will be either in Google Reader or in Instapaper.
  3. Write one complete piece. This will be a blog post (for The ByteBaker or the Lafayette Voices), a subsection for my thesis, or homework for screenwriting class.
  4. Write some code. Either something for my thesis or my computational art project. I’m hesitant to quantify this as I don’t know how. Definitely something to think about and come back to in a week or two.

All this does add to the amount of stuff I need to get done each day, but that’s the point. Till now, I’d be lucky to get two of the above done each day. I need to do all four in order to be the person I wanted to become (a well-read hacker with great communication skills).

To get the time to do everything I’ll be cutting down on the time I spend on email and randomly browsing the web. Anything interesting I want to read gets buffered in Instapaper for reading as part of the 30-minute non-fiction block. Hopefully I’ll completely eliminate the time wasted sitting around and wondering what to do (and the frustration that entails). But at the same time the rituals are flexible enough that I’m not strait-jacketed. The point is to show up and take away the randomness that might prevent me from getting things done. Will it work? I’ll find out soon enough.

Sunday Selection 2011-02-20

Reading

Is Scheme faster than C? The cheapest way to make your code faster is to throw more hardware at it. But for a cash-stripped college student reworking the algorithm is probably a better idea. Here’s a suspense-filled story of how  superior algorithm devised in Scheme and ported to C turned out to be faster than a naive C implementation.

On Writing Books for Programmers I think writing is an important skill, especially for programmers. Putting your thoughts in writing helps with the thinking process. But this piece looks at writing from another perspective — namely writing for (as well as by) programmers. It’s worth reading if you’re writing for programmers, even if it’s not a book.

Media

Parallelism and Concurrency in Programming Languages Rob Pike is certainly a person worth listening to when it comes to programming languages. And of course concurrency and parallelism is all the rage nowadays. Put the two together and you have a lot to learn from this talk.

Software

Firefox 4 beta Google Chrome might be giving Firefox some stiff competition, but the folks at Mozilla are definitely holding their own. Firefox 4 is getting an impressive set of improvements and features. I think their user interface model is better than Chrome’s in some ways (especially with Panorama). There are still rough edges and most extensions will probably not work, but it’s stable enough for people to check out and use on a daily basis.