Sunday Selection 2012-03-25

Around the Web

How to Write Like a Scientist I love writing, almost as much as I like programming. If ever I decided to hang up my programming boots I’d probably be a writer full time. As a new graduate student in a scientific field I’m going to be doing a fair amount of writing over the next few years (and probably longer). Scientific writing isn’t quite like blogging or writing fiction, but maybe we can make it just as interesting and exciting.

The King of Geeks (and Dad of 3) Linus Torvalds is probably pretty high up on any programmer’s hero list. Though the story of his life isn’t exactly a secret (he’s written a book about it) it’s interesting to see how his lifestyle has (or hasn’t) been affected by Linux’s success

The art of outsider thinking I think we’re at interesting point in human history: there is too much knowledge in the world (and more being created all the time) for any one person to master it all. At the same time the Internet makes it possible for talented people to combine information and ideas from different fields and make outstanding contributions to science and technology. Can we redefine the ideal of the Renaissance Man for the Information Age?

Videos

How to be Alone Consider this a follow-on from the last Selection’s video on the power of introverts. No matter how much modern society might emphasize teamwork and groupthink, sometimes you need to cut yourself off from everything and everyone and have your own epiphanies.

Predicting Human Intent

Readability is one of my favorite web services. Readability is well designed, carefully made, unobtrusive and they’re not trying to wring me of personal information to datamine and sell at every turn (at least I don’t think they are). Their web service gives you browser plugins that strip out everything but the content of a page and present it in a clean, crisp format. If you sign up for an account you can make use of their “Reading List” to store pages for later reading. Recently they released beautiful iOS and Android apps that sync with your reading list allowing you to stock up on things to read at your computer and read them on the move.

Though Readability is a great service and they have great supporting apps they have one flaw. However, it’s not entirely their fault: I think it’s a side-effect of the difficulty of predicting human intent. The problem has to do with Readability’s reading list. When you install the browser plugins you get three buttons: a “Read Now” button, a “Read Later” button and a “Send to Kindle” button. The “Send to Kindle” button formats and sends the web page you’re on to your Kindle (assuming you’ve set up and connected your Kindle properly). The “Read Later” button saves the page you’re on to your Reading List which can be synced to your iOS or Android devices. The “Read Now” button will do the Readability formatting on your current page and show you the cleaned up version right then for you to continue reading.

That’s all great. However, the “Read Now” button also drops the page you just converted into your Reading List. This is great if you start reading a long article and then have to leave your machine. You can come back to it later, on another browser or another device entirely. But what happens if you finish reading the article right there and then? The article still ends up in your reading list. That would be fine if the list was simply a history of things you’ve read. However the Reading List is also a list of things you’re going to read. So the Reading List now contains things I’m going to read, things I’ve read and things I might want to read again. I think this problem stems from the fact that Readability started as a formatter and added read-later functionality unlike services like Instapaper which are designed for savings articles for later.

How can we differentiate between all these types of articles? Readability provides the ability to “Archive” and “Favorite” articles. Once I’m done with reading an article I Favorite it if I’m going to read it again and Archive it otherwise. But could Readability do this for me? Could Readability somehow figure out what I want to happen to the article? The simplest solution would be to archive whatever I Read Now and only add to the Reading List ones that I mark to Read Later. However that means that if I start reading something and then have to leave it ends up in the Archive where I might never look at it again. Could Readability be a little smarter? One heuristic would be to check where I am in the article. By default an article is always added to the Reading List as it is now. But when I scroll to the bottom Readability takes that to mean that I’m done reading and moves it into the Archive. If I liked it and wanted to come back to it I manually mark it as a Favorite. (I don’t expect Readability to be that clever. Yet.)

Without having actually tested the solutions, I can’t say how well they would work. There are certainly edge cases: what if I scroll down to read a footnote and then scroll back up to read the rest of the article? What if I get to the end and then go back to re-read a particular section? What if I quickly skim through an article to get to the end and want to come back later to read it in more depth? I think there’s no clear answer because fundamentally we’re trying to have Readability “guess” what we’re trying to do without giving an unambiguous signal. Sure, all of them could be solved with a few manual interactions. But the whole point of having advanced software is so that I don’t have to tell my computer what to do in excruciating detail.

Like I said at the beginning I don’t think that Readability is necessarily at fault for how their service works. Any attempt to automatically manage the Reading List would require making some assumptions as to what it is the user wants to do. Even if those assumptions are right most of the time, there will almost certainly be times when they’re wrong. We are, after all, dealing with people here, and people aren’t perfectly predictable agents. If they were, human computer interaction and economics would both be very different fields.

Predicting human intent is a hard problem. Ultimately, some amount of direct intervention might be inevitable. While Readability is meant to be a product it would be interesting to see researchers using it (or similar services) for doing research with real users about how our software can make choices for us in a way that closely reflects what we would have done ourselves. Unlike some people I don’t want my software to do less and have fewer features. I want it to do more so that I can concentrate on more important things. Like saving the world.

Generation Flux

A few months ago Fast Company run a multipart piece on “Generation Flux”. The piece had two intertwined themes. The first is the idea that we’re living in age of constant (and perhaps accelerating) change and that to stay competitive businesses and institutes have to ride this wave of change and go with the flow. The second idea is the notion that the most successful people are those who are intimately familiar with this state of flux and can craft their lives to take advantage of it. As part of the piece they profiled several members of Generation Flux – technologists, businesspeople and researchers like danah boyd and DJ Patil.

Though the piece focused on the tech industry and business, I think the basic ideas apply to all fields including (especially?) academia. In fact I think that the best researchers and scientists have always been those who have been spread out over a number of areas. While focus and diligence are necessary for productive research, I’m starting to think that it’s important (if not fundamental) to have a wider halo of interests and knowledge surrounding your core area.

As a new graduate student this is a question of great personal interest: I have a limited amount of time and energy in grad school (and later) and it’s in my best interest to make the most of it. As with many important things there’s a dilemma: if I spend too much time and effort on one thing I’ll miss out on everything else and that can be very limiting. I already know this first hand: I know a good amount about programming languages, but I’ve been scrambling to teach myself about networks and know next to nothing about AI. But on the other hand if I don’t dig deep enough into one relatively narrow area I’ll never have the knowledge or the insight to know what the important problems and come up with appropriate solutions.

So what are the lessons of Generation Flux and how do they apply? Accepting and adapting to change is definitely a big part of it. As danah boyd tells us: “We all have to learn new skills. Being able to live on one set of skills over a career is not realistic. Change is going to happen, not all of it good, in serious ways.” But simply being able to ride the wave is not enough. And it’s certainly not advisable to jump ship to the next shiny thing at the first sign of trouble. DJ Patil has more personal advice to offer: “At the end of the day, you have two things: your energy and your intellectual curiosity. If you’re willing to apply them, try to add value to the world, the possibilities are so endless.”

Patil, boyd and the other Gen Fluxers seem to be able to strike a balance between change and constancy. In times of perpetual change the key to success seems to lie in two complementary values: first is the ability to live on the edge of chaos and move fluidly from one spot to another. But second (and just as important) seems to be the ability to be tenacious, diligent and sometimes downright stubborn. Patil for example taught himself mathematics and worked midnight to morning to get computer access. While he’s worked on amazing projects he’s also turned down lucrative offers because they didn’t fit his vision of what he wanted to do.

Viewed through the lense of graduate school the lessons become: Explore broadly and lightly across areas related to what you’re interested and then buckle down, dive deep and keep going until you get to something novel. Of course the timing is critical and to some extent they have to happen in parallel. As Matt Might puts it: going rogue too early or too late can be fatal. Luckily that’s what advisors, mentors and colleagues are for.

Personally I’m still in stage 1: I’m still taking classes and exploring the broad regions of computer science but I’m also making forays deep into some areas (particularly programming languages and datacenter networks). Looking further ahead I think it’s great that we’re going to be living in a time where being a member of Gen Flux is a good thing. Gen Flux is perhaps just a modern term for Renaissance Men (or Women) – people with a breadth of knowledge and skills but also with singular and far-reaching accomplishments in some of those fields. And that seems like a goal worthy of a lifetime worth of time and energy.

Sunday Selection 2012-03-11

Happy Daylight Savings Time Day everyone! (Or something like that)

Around the Web

Are you a Zen coder or a distraction junkie? It’s been a while since I’ve worked on a project where “my code’s been compiling” has been a valid excuse for not working. But now that I am on such a project, it’s important that those mini-breaks don’t turn into longer breaks.

Successful people are successful Einstein is rumored to have said that compound interest is the most powerful force in the Universe. Whether or not he actually said that, compound interest is still pretty powerful. Maybe it applies to reputation and achievement just as much as it applies to money.

The power of diligence in creating a remarkable life Keeping one’s options open seems to be a pretty common strategy but it could be the wrong one. Perhaps it’s a better idea to pick an area and dive deep rather than to spread your bets.

Videos

On being an introvert Everyone seems to be busy building the next social thing to help us “connect” better to everyone else. But a lot of the best work requires solitude and independence. Introversion might be a hidden superpower. (There’s a written synopsis, but the video is well worth the 18 minutes of your time.)

Etudes for programming

From Wikipedia:

An étude (a French word meaning study, French pronunciation: [eˈtyd], English pronunciation: / ˈeɪtjuːd /) is an instrumental musical composition, most commonly of considerable difficulty, usually designed to provide practice material for perfecting a particular technical skill.

I noticed today that Michael Fogus (one of the authors of Joy of Clojure) has a number of Github repos with names such as etude-ocaml and etude-syntax. I also realized this week that I’m a pretty slow programmer. I’ve been getting better over the years but I’m still slow, especially if there’s a good amount of API design involved. While I think that writing lots of code will make me faster over time, I do wish there was a more structured, focused approach.

In general, I wish there was more by the way of études for programming — problems and exercises of considerable difficulty designed to provide practice material for a particular (set of) skills. There are of course great textbooks for programming and computer science and those books have good exercises (I particularly like SICP and the K&R C book), however in most of those cases the point is to teach first and practice second. What I’d like to see is the reverse – assume that the reader already knows about functional programming or the C language but needs to “level up”, so to speak. The exercises would be harder and more in number but would also cover a broad area in terms of application of the concepts involved.

This is related to what I’ve written earlier in terms of deliberate practice for programmers. That post talks about “level up” lists – a list of programs to make that help explore the different areas of computer science and help you gain experience and hence “level up” as a developer. On the other hand études would focus on depth rather than breadth – each one would focus on a small technique or technology and fully explore that area. Together a continuous habit of working on études and doing level-up projects would give programmers a steady stream of deliberate practice exercises to work on.

The question is, where are we to find these études? I’m not sure if there are programming books out there that fit that description. If there are, I’d love to here about them. But in the meantime I’ve found an acceptable alternative — homework and assignments for college level courses. This semester I’m the TA for a course on functional programming and throughout the semester we have a set of 6 assignments for students to do. Each of them have about 3 to 4 problems (each with multiple parts) that tackle a small area of functional programming. I think exercises like this are great material for études. I’m currently working through the exercises at the same time as the students (other TAs are making them). Even though I’m already familiar with most of the material it’s been a good learning and great practice for me. I can’t really measure if I’m improving (apart from running my solutions through the test harness) but it’s more direct and practice in functional programming that I’ve ever had.

I’ll be done with this particular étude in a few months. I don’t think I’ll be releasing the code since the problems often get reused. However I do think there will be lot more where those came from. There are lots of college courses with website out there and there’s lots to learn. I’ll probably try compilers next. All that being said, it would be great to see some curation and collection. With Amazon’s Kindle Shorts and the growing interest in short, self-published books putting together a regular series of études might be a pretty lucrative endeavor.