I don’t remember much from my first few years of programming. My father would bring me the latest issue of “Scientific American”, and I’d avidly read A. K. Dewdney‘s column. Sometimes it would be just reading, as in the case of the caricature algorithm. Sometimes it would be actually putting the pseudo-code walkthroughs into the real Basic code. I might have done a couple of Game of Life and Mandelbrot attempts, but I don’t remember having fun just translating those algorithms into code. Somehow, they were not mine, and I would spend most of the time playing games. Until I got my hands on the Commodore, that would involve putting an audio tape in my small tape player and praying that it would not chew the tape in the middle of the load. “Boulder Dash” was my favorite.

When I was in junior high school, the schedule would have our entire class spend one day a week in an external computer facility. There was no formal training, but rather a random exercise given every week. I remember an exercise to print out the multiplication table, where most of the time would be spent on right-aligning numbers in each column. We spent the rest of the day goofing around and playing Xonix. And then came the final exercise in the senior high school. The teacher had a list of “graduation” projects. Each project would be done by a pair of students, and each pair was free to select any project they wanted. My partner, Maxim, was also my academic “nemesis”.

Our math teacher has introduced the concept of differential in the last few weeks of junior high. The final exam had a few of those, and a bonus question. After solving the regular questions, I’ve spent a what seemed like an eternity trying to crack that bonus question. I failed. After handing out the final scores, our math teacher showed the solution that involved the opposite of differential – integral. He wanted to see who would be able to invent the notion of the integral based on our knowledge of differential. I failed. The other guy, my nemesis? He solved it. Oh well, he was better at math than me.

Back to the final project in the computer lab. Our computer teacher has told me and Maxim that she would be really happy if we were to choose a particular project. I remember that project as if it happened yesterday. It was about scheduling classes, teachers and classrooms. The program would get a list of constraints – the capacity of each classroom, when each class (from a different school) comes to this installation, teacher preferences for days of the week and classes, teacher vacations etc. Then it would print out a few possible allocations of teachers to classes to classrooms to days of the week. Me and Maxim spent some time talking about this, and we had no idea how to do this. She might as well have asked us to write a chess program to beat Karpov. We chose a different project. She was disappointed.

My path after finishing the high school took me to study geodesy and cartography. I’ve spent the next four years studying spherical trigonometry, photogrammetry, general relativity and how it affects the GPS calculations, and more map projections than I ever thought existed. But there was one course that was my absolute favorite. The teacher was a quiet, old, balding gentleman that taught us programming in Fortran 77. It was not general programming, much like the language itself. It was all about implementing efficient solutions to various math problems, like inverting sparse matrices or normalizing spherical harmonics. I didn’t care much about writing clear and clean code. I cared much more about writing clever code. The type of code where I would have four goto statements in three nested loops. The type of code where you would look at it a week after you wrote it and you had no idea how it was supposed to work. You know, fun code. Because the assignments themselves were not fun. They were about implementing the solution, not finding it. The solutions were already found long ago.

I didn’t complete that degree. I dropped out after four years, with one and a half more to go. I knew what I wanted to study, and I knew what I wanted to be. And most important, I knew what I didn’t want to be. Geodesy is an old discipline. The basic principles have been studied and defined in the 19th century. There is not much innovation in the field, or at least not from what I could see. In one of our courses, the very first thing the teacher told us was that we have to buy a pocket calculator that has 12 digits of precision. He said that if we have one of those, we’ll pass his exam. That calculator is still me to serve as a reminder. My work future was going to be dull and unchallenging. And so I dropped out.

I started afresh. I went to study at the computer science department, starting anew. I was only able to transfer three course grades, but it didn’t matter. I knew that I wanted to study programming full time, and I knew that I wanted to be a full time programmer after that.

My first computer course was “Introduction to C”. Unlike my previous ventures into learning programming, that was actual formal education. And in the middle of the semester we were hit with recursion. I confess. I didn’t get it at the beginning. Sure, I wrote down everything the teacher said during that lecture. And then I stared at the home work. The exercise was to read in a definition of a two-dimensional maze and find a path through it. And in the beginning it was the same wall that I hit back then in senior high. And then I read the lecture again, and again, and started actually doing it. Because I wanted to get a good grade. And then I finally got it. “The Matrix” wouldn’t come out for another few years, but I had the Neo moment. I knew recursion.

In the years since I interviewed a few dozen people. My main technical question was always about recursion. I might be biased. I think that you can’t be a programmer if you don’t get recursion. I might be biased because it was this mark of shame that I’ve carried with me since senior high. I might be biased because I was not able to “invent” recursion back then, and I had to be shown what recursion is.

I took a lot of different courses that showed me the limitations of what I get. Past certain point, my brain just seemingly stops functioning. Elliptic cryptography, packet switching, cross-mapping of NP problems, finite automata. I know enough to truthfully say that I know nothing. Sure, I can maintain a dilettante conversation about any of these, but my inner eyes just glaze when I try to read about the recent advances in any of these. But finally getting recursion was the point where I saw myself as a programmer.

Some people will say that I’ve wasted four years of my life studying geodesy. Some people will say that these are the years that I’m never going to get back. But I don’t see it that way. Those are the years that have showed me what I wanted to do with the rest of my life. I might have lost them not doing what I loved to do, but that was how I knew what I did love. As Frederick Phillips Brooks says in the epilogue of “The Mythical Man Month”, there are only a few people who have the privilege to provide for their families doing what they would gladly be pursuing free, for passion. I have traded a professional life full of dull moments and unfulfilled potential for a shorter, but much happier one. A life where I look forward to doing what I do every single morning. For as long as I am wanted, and beyond that.

It must have been around 1985. I was in the sixth grade at the time. We’ve heard about computers, of course. Those were the beasts that would guide spaceships into the orbit, calculate flow fields around ballistic missiles or control high precision machinery. Nobody had a personal computer or a game console at home, at least among the kids that I knew in my school. The first three “Star Wars” movies were banned by the Soviet censorship, presumably because it would incite a grassroots rebellion against the evil empire. Somehow “The Terminator” got through the censorship blockade, and even on a small TV screen it was a magnificent experience, especially compared to the state of visual effects in the contemporary Soviet-block sci-fi movies.

One day, a teacher fell ill. They had to find something to do with a class of 11-year old boys and girls, and it so happened that a computer room was free. I never knew that our school had a computer room, and we’ve never set our foot in that computer room again. But that day has changed my life.

Three row of computers, with monochrome dot monitors. There were more of us than the computers, but not by much. And it so happened that I had a computer all to myself. The substitute teacher was a young lady and she showed us something magical. A computer game. It sounds trivial today, but back then it was truly magical. A computer, all to myself, and I can play on it? But there was a catch. There always is, at least that’s how I remember my school days.

The teacher said that she will load a game on our computers, but only after we’re done writing a computer program. A simple one, or so it would seem to all of us. A program that would get eight numbers as the input, each pair specifying a point on a two-dimensional plane, and would print out the coordinates of the intersection of two lines defined by these four points. And you know, after reading about computers guiding cosmonauts to space, running complex fluid simulations or powering a freaking robot from the future, it seemed so easy. She explained how to type a program and make it run, and how to handle user input. And then we were on our own.

I remember sitting there in front of the computer, thinking to myself that there’s supposed to be a button somewhere on the keyboard. A button that, when pressed, knows what to do with those eight numbers. How to treat them as coordinates on the two-dimensional plane, and how to output the coordinates of the intersection. Because that’s trivial. I mean, computers guide our space ships and ballistic missiles. I might not have the most powerful computer in front of me right here, but it surely knows how to compute that intersection point. Right? Right?

I eventually gave up and raised my hand. When the teacher came over, I asked her how do I make the computer do this calculation. And she told me “well, you tell the computer what you want to do.” She must have seen my completely stunned face, and then she said something that has changed my life.

Imagine that you’re a computer and you have these eight numbers. You have a piece of paper and pen. How do you compute that intersection point?

As these words tried to find their way through the make-believe model of how computers work, I struggled to not be disappointed. Here I was, so sure that computers can do any kind of computation, and here was the teacher telling me that I’m supposed to imagine myself in its place. Isn’t that why we have computers, to do those sorts of things for us, with no errors and much more quickly?

And then I had to take a piece of paper and do the math. Myself. Taking four numbers, treating them as X and Y coordinates, and computing the numbers that define a line that passes through these two points. Then solving a two-variable equation group that defines the intersection of two lines. Making sure that I got all my indexes and signs right. And then typing the long formula into the computer, making sure that I got all my indexes and signs right. All the time refusing to believe that I actually had to do it. Me. Not the computer.

When I was done, I raised my hand again and the teacher came over. She had a piece of paper in her hand, and she typed the first eight numbers. The result was correct. Then she typed the next eight numbers. And my program crashed. She copied those eight numbers to my piece of paper and stepped away. And that was my first debugging session. On a piece of paper. Because after typing the same numbers into my program it crashed again. And again. And that’s not how it was supposed to happen. Because, well, in my make-believe world of how computers work, they didn’t crash.

As I put those eight numbers into my scribbled formula, it came out that the denominator was zero. How could that happen, if my program printed the right result for the first input? Frustrated, I drew a two-dimensional plane with X and Y axes, put the four points and connected the line ends. Of course. The lines were parallel. A corner case, if you will. My first corner case. Back to the program. I now extracted the computation of the denominator into a separate line and tested for zero. If it was zero, the program would print a special message and stop. I was ready to call the teacher back. But then a thought crept up. She caught my program with a special case. Is there another one? And it turned out, there was, and her next group of input numbers would test just that. The case where one of the lines was parallel to one of the axes. In that case, my denominator was still zero, but there was another way to solve the equation group.

And then I was done. And I played that computer game for the rest of the session. I don’t remember how the other kids did. Some of them sat there until the end and didn’t know what to do, and some of them were playing the same game by the end of the session. I was so completely engrossed by the game that I’ve hardly noticed anything around me. But that was the day that has changed my life. The day that has showed me that computers have to be told what to do. They can do any kind of computation, much faster than any human being. But there is no magic button to press to make the computer program itself.

Later, I would devour A. K. Dewdney‘s monthly columns in “Scientific American”, from Mandelbrot set to Game of Life and much more. Later, my parents would buy me one of the first Soviet micro-computers. Later, my brother-in-law would lend me his Commodore and I would program both computers in Basic, even if there was no way to save what I wrote. And later, my school would have a special program that would have us spend one day every week in an external computer facility, tackling problems of various size with only one problem defeating each and every one of us. But that is a story for the next time.

I wish I remembered the name of that teacher. The one that opened my eyes and guided me without force-feeding me the answer. You have my undying gratitude. Thank you from the bottom of my programmer’s heart.

I love movies. By a rough estimate I’ve already watched thousands of them, and I hope to watch thousands more in my time. Some are forgettable, some stay with me for a long time, and some have prompted me to delve deeper and start a series of interviews on how movies are made. Despite all the technological advances in home entertainment I still find myself going to the theaters every week, sometimes more than once a week. Twenty five years ago I would have to buy a weekly newspaper that had a special section detailing all the movie theaters and shows in my area, or call an automatic service provided by the closest theater to check what is playing, and when it is playing. Times have changed, and nowadays there are plenty of online resources to check the show times, browse the upcoming movies, watch the trailers and in general be much more informed.

The informed part comes at the price of a wide variety of features available from these online resources, both web sites and native mobile applications. A first-time visitor would have to spend a few moments getting acquainted with the overall structure before locating the path to the information that he is after. After a few visits you know where this information is located, and you can either bookmark it (if the surrounding platform supports this) or remember the sequence of scrolls and clicks that get you to that destination. What is my most frequently visited destination? I go to the theater after putting the kids to bed. So I am looking to see what is the first show of the specific movie in that specific time frame (say, between 8:30 and midnight). And if the movie is not playing in the theater next door, where is it playing, and how the driving distance is going to affect the beginning of my target time frame?

Of course, this information is available in the list of all today’s shows in my area – except that I need to mentally filter out all the noise of the movies I don’t intend to see, and all the shows that fall outside my time frame. Or I can explicitly search for the specific movie and deal with less noise – at the expense of an extra step of the search itself. And every once in a while I start daydreaming about writing a small application that would do just what I want. After all, I write software for living.

And so I start imagining a very focused flow where I select a movie, then the location service kicks in and tells the app my location, and then I tell the app what is my preferred time frame, and the app takes all that and shows me the specific show that is the right match for me. Or maybe a couple if it’s a blockbuster that’s just out. And then I start thinking.

What if I’m at work? I don’t necessarily want the app to use my current location. That’s not my scenario after all. So I’ll need some way to persist the home location so the app can search there. But wait. I work remotely, and visit the main office campus every once in a while. Wouldn’t it be nice to change the default search location for such trips? And while I’m at it, my time frame restrictions are different, as the family stays home and I can go to an earlier show. So I’d expect the app to allow me to change these filtering parameters. But then, when I get back home, I don’t want to spend time configuring the location and time frame. So, hey, let’s support profiles.

I went to see “Moonrise Kingdom” a couple of weeks ago. It’s a wonderful movie, and I already went to see it another time. There was a problem though. It’s not a blockbuster, and the distributor (Focus Features) has opted for a longer but slower rollout in the theaters. During the first few weeks the closest show was about an hour drive away, and I didn’t want to see the movie that much. And so I waited until it got relatively close and then I went to see it. How would I incorporate this into my application?

This becomes sort of a wish list – the movie is out, it’s just not close enough. I could define the maximum distance I want to drive to see the specific movie. I’d then mark the movie and let the application notify me when it’s showing within that distance. But distance is not time. 20 miles can be 20 minutes away on a highway, but 40 minutes away if I have to drive at night through suburban streets. So not only I now have a feature that tracks my wish list and cross references it with nearby theaters, I’ll have to integrate it with some sort of traffic service. But why stop there? There are some movies that I really want to see. I’ll gladly drive twice the time to see that hypothetical movie in the theater. So while I’m thinking about this wish list feature, why not throw in wish list profiles? If I really want to see a movie, let me add it to the wish list and specify how much I want to see that movie. There will be some sort of mapping (or manual input) on how much I’m willing to drive to see the movie. But wait a second, that’s not enough. Suppose that movie is out, and it is within the matching driving distance. But I’m busy this week. So I’d definitely want to add a way to “snooze” the specific entry for a week – or maybe only for a few days. So the app becomes a sort of a moviegoing planner.

Speaking about planning. Now that I have this nice planning feature, why restrict it only to the movies that are out in the theaters? Why not show the list of upcoming movies and let me add them to the wish list? Let’s extend that thought and have some sort of recommendation engine. The application will track which movies I’m searching for and which movies I’m adding to my wish list, and will suggest similar movies. Those movies might be playing right now, or they are coming up in the next few months. The recommendation engine is, of course, not an easy thing to tackle. But if I do it right, the application becomes much more than a planner, it becomes an assistant. Recommendation engines are, of course, tricky. Just ask Netflix. That’s nice to have, but way too much work. As a last thought in this direction, one of the most important inputs would be what you thought about the movie after you’ve watched it. So it’s not enough to maintain a wish list, you’d also need to provide a way to collect and store movie ratings. But let the bygones be bygones. No recommendations.

Back to “Moonrise Kingdom”. I really liked the movie. It’s still out in the theaters. I’ve seen it twice, and I want to see it another time. So there’s going to be some kind of functionality to star a movie. It’s no longer on the wish list, but I still want to see it. Or may be the wish list becomes some sort of a hybrid that combines tracking what I want to see, now and in the future. Is it one list with sections, is it multiple lists, is it some sort of “here’s what you can see today”? Let’s take this “I really liked this movie, so now what” and explore it a little bit further.

The movie is out in the theaters. I can go and see it as many times as I want as long as it’s playing. I cannot buy a BluRay yet. But I can buy a soundtrack. I can go online to a variety of retailers and purchase the digital copy there. Then I can listen to the soundtrack as I’m waiting for the BluRay to come out. But that’s two separate sites / apps that I need to go to. Wouldn’t it be nice to have some sort of integration with the purchase and listening experience right inside my app? Integrating with one store might be possible if it provides some sort of web service APIs to purchase and consume the content. Of course, if you want to keep it really seamless, you’d need some kind of a way for the user to provide the signin credentials and transmit them securely to the third-party store, and that opens up a whole new can of worms. Or maybe that third party store is another application on the same device and it provides a way to integrate these flows in you application. So suddenly you’re thinking about what would be needed on both sides to make this seamless. And that’s only for one digital store. Wouldn’t it be nice to be generic and not rely on any specific APIs that a particular store exposes? So now you’re thinking about some sort of a generic integration between your app and any third-party store, along with a nice plugin mechanism to discover such stores at runtime and allow the user to choose where to buy the soundtrack based on, perhaps, the cheapest alternative, or the encoding quality, or the absence of DRM protection. So that’s a lot of work.

What about the BluRay disc? It usually takes about half a year after the movie has left the theaters. Let’s forget the purchase integration with digital stores. How about tracking the BluRay availability and letting me know that it’s out? So that’s another preference bit to expose in the wish list, and some kind of a new way to expose the full list of tracked movies – sorted, most probably, by the availability date. There’s still some integration with web services that provide this information, but if you’re willing to go for notifications only, it sounds a whole lot less work to do.

And so as I lay in bed thinking about all the nice features to have, I realize that it’s 2AM and it’s time to go to sleep.

The Elements of Style” is a fantastic writing style guide by William Strunk and E. B. White. One of the recommendations has struck a particular chord with me from the very first time I read that book:

Vigorous writing is concise. A sentence should contain no unnecessary words, a paragraph no unnecessary sentences, for the same reason that a drawing should have no unnecessary lines and a machine no unnecessary parts. This requires not that the writer make all his sentences short, or that he avoid all detail and treat his subjects only in outline, but that every word tell.

This principle applies to any kind of user-facing software, no matter what is the projected or intended demographic and professional profile of the bespoken user. A minimalist feature set is not a goal in itself. A feature is included not because the competition has it, or because marketing says that it’s a great selling point; it is included because it works towards achieving the main product goal. Marc Hedlund provided an honest analysis in his “Why Wesabe lost to Mint” article:

Everything I’ve mentioned — not being dependent on a single source provider, preserving users’ privacy, helping users actually make positive change in their financial lives — all of those things are great, rational reasons to pursue what we pursued. But none of them matter if the product is harder to use, since most people simply won’t care enough or get enough benefit from long-term features if a shorter-term alternative is available.

Every “what if” and every “wouldn’t it be nice” is a double-edged sword. Don’t compete on features, but instead make your every feature work. Create software that is concise. Create software that is vigorous.

In his “Touch means a renaissance for radial menus” Josh Clark argues that the time has come for a widespread adoption of radial menus in touch-based interfaces:

The radial menu is seeing a renaissance in touch interfaces, and that’s a good thing. Microsoft yesterday previewed the Office 15 productivity suite , including OneNote, its first Metro-style app for Office. (Metro is the touch-based design language introduced in Windows Phone and now set to storm Windows 8 this fall.) OneNote features a radial menu as a kind of right-click contextual menu. Tap the ever-present menu circle, and out pops a wheel of icons to work on your current selection. Here’s a clip from yesterday’s demo that illustrates the action.

I can think of a few reasons why radial menus have not seen mainstream adoption beyond games. But the main one for me is how it looks to the first time user.

A few days ago I’ve decided to give gReader a try on my Nexus 7. Now while I’m its first time user, it’s certainly not the first time I opened an RSS reader on a smaller screen. I know what features to expect, at least on the basic level. But gReader’s entire interface is icons. A lot of them. Some of them are for basic features, some are for more advanced. And all are exposed via monochrome icons.

And that’s a problem. I want to become quickly proficient with it, but I don’t want to spend time guessing what each icon does. And not only do I not know what will happen when I press some cryptic icon, I also don’t know what this operation will affect (single entry, all feed entries, all entries under this tag). Most importantly, there’s no way to undo the last operation, or at least none that I could see immediately. After a particularly “unfortunate” tap I ended up marking about 50 entries as ‘read’ and had to spend some time figuring out how to find that exact chunk.

Now back to radial menus. As Josh points out there’s a lot of research that indicates that people are much more efficient once they know the layout of each such menu. In a traditional drop down menu you have a relatively small margin of error when you want to select a specific element; the direction is always the same, and the selection is controlled by how much you move the mouse and how is that translated to onscreen pixels. In a radial menu, however, the distance is the same, but the direction matters. So if you know that ‘bold’ is always to the right, while ‘italic’ is to the top-right, your muscle memory will kick in to remember that:

Even better: you get faster with radial menus over time, because they take advantage of muscle memory in a way that list-based menus cannot. Radial menus are essentially gesture-based: touch-swipe-release. That’s why some call radial menus “marker menus”: it’s like making a mark on the screen. Swiping to 2 o’clock has one meaning, and swiping to 6 o’clock another. Like all physical actions—playing an instrument, typing a keyboard, serving a tennis ball—gestures get embedded in muscle memory, which is faster to access than visual memory. Tap-swipe is faster than scanning for an item in a linear list, just like touch-typing is faster than hunt-and-peck.

But the problem is how well you can present these options to the beginner. A circle of eight icons is nice if each one is immediately and clearly understandable. And some operations are just too complex for a simple pictographic representation. So then you can display text descriptions for each one, but it’s a mess. How do you display them in a way that is quickly scannable, uncluttered and does not take over the entire screen? And doesn’t that take away the very goal of training your muscle memory? And adaptive UIs didn’t work out that well (where the system adapts to your perceived level of expertise and usage patterns).

I think this is what has been standing in the way of translating the relative popularity of radial menus in games (and the shown increase in efficiency for long time usage). Gamers are willing to invest a lot of time if that improves the way they progress in a game. But throwing such an interface at a user of a ‘boring’ software package is going to be quite alienating. It’s going to be interesting to see the user reaction to the proposed radial menu in OneNote.