Filed under Education

Sunday Selection 2011-09-25

Unfortunately work-related activities having been taking up a lot of my time and energy over the past couple of weeks. On the good side I’m gradually making progress towards figuring out this grad school thing. While work on a funny and insightful blog post to blow you all away I leave with you a brief tour of the Intertubes.

Society

It’s not gender warfare, it’s math Being a computer science graduate student I’m regularly confronted by the fact that there are not enough women in our field (and that doesn’t seem to be changing any time soon). Here’s a look at why and that needs to change and some work in the right direction.

The Fraying of a Nation’s Decency Sometimes we just need a reminder that we’re all human after all.

Web Technology

10 best @font-face fonts I think embeddable web fonts are one of the best things to have happened to the web in recent years. Think of this article as a good “getting started” guide if you’re trying to figure out what fonts to use for your own projects.

How to make a simple HTML5 Canvas game The canvas element is an even bigger improvement than web fonts. Like the name suggests, it gives you a general purpose drawing element on a web page. Combine that with fast JavaScript engines and you have a pretty decent game engine on your hands.

Video

QuakeCon 2011 John Carmack keynote If you’re interested in gaming engines or high-performance, down-and-dirty programming then you should take the hour and half to listen to John Carmack — the brains behind the Doom and Quake game engines.

The first week of graduate school

I’ve been trying to think of a good topic for a blog post for a few days with no avail. So instead of one my usual tech posts I have some reflections about the first week of graduate school. Before I dive in, the usual disclaimer: I speak for myself, not for my employer, professors or colleagues. Additionally all this is based almost solely on my experience at Cornell University, your mileage may (and probably will) vary.

First off, let’s get one thing clear: graduate school is not school. If anything, it’s a job with a good amount of freedom. And you take classes for a few semesters. Like Professor Matt Might says: “if acting a certain way would get you fired from a real job, then it’s probably a bad idea to try that in a Ph.D. program too.” I make it a point to treat this gig as a “real” job: I’m getting paid to do actual work, there are deliverables, there are deadlines and requirements, there are people I report to.

That being said, there are a lot of the same challenges that you go through when you end up at school for the first time: you don’t know very many (if any) people, you don’t know where things are (or how to get there), you have to choose classes and you’re constantly on the lookout for free food. Luckily, meeting people is largely a case of being persistent about it (same for finding free food). The social aspect is not to be underestimated: if you’re going to be here for the long haul you might as well make friends with people who are going to be here with you. You never know when you might need a shoulder to cry on. I once read somewhere that in your first week at college you should go to every party you can. I didn’t do that and I’m not sure if I regret it. But it holds for graduate school too (and perhaps any new place you go to). As for free food, there seems to be free lunch almost everyday. Unfortunately most of it is the usual carb-and-sugar heavy stuff you’d expect to find. You probably want to stay away from most of it if you want to eat healthy.

In keeping with my idea of treating graduate school as a job, I’ve been trying to hit the ground running and spend as much time as I can on research. However, this is turning out to be easier said than done. For starters, classes do take up a good amount of time and energy. Accepted wisdom says that for each hour of class you should put in 3-5 hours of work outside of class. But if I plan on getting any actual work done (not to mention having a life) I’m going to have to categorically ignore this formula. Luckily I’m past the point where I get graded on effort and putting in long hours isn’t the same thing as being productive. Though classes aren’t consuming my life (and I’m going to work to keep it that way), it hasn’t been easy to make time for research either.

Though I’ve been power-using iCal sticking to a schedule isn’t easy. As they say, no plan of battle survives contact with the enemy. There are lots of little things that come up during the day (like two fire alarms yesterday) and sometimes estimates are just plain wrong. Since I’m still in the phase where I’m meeting professors and scoping out potential hobbies and activities, my nice time-chunked calendar frequently gets perforated. I’m hoping some of this will subside over time, but this much is clear: any time you want to yourself, whether it be for research, hobbies or just winding down, you have to fiercely defend. I think it’s a good idea to start with a calendar that is all blocked out instead of one that is clear. That way if someone (or some event) wants a slice of your time it’s immediately clear that you’re taking away from something else you could (should?) be doing.

On the topic of research, coming up with good research topics is hard. I have two classes in which I need to do substantial projects and I have very little idea of what to do (except that I want to experiment with some cool technology that could be useful later). Part of this is due to my professional immaturity: I don’t know enough of the field to be able to tell what would make for a good grad-level project. However, becoming more conversant with the state of the field is part of my education and figuring out what to do for a project is a good trial for deciding on a PhD topic in a few years time.

One thing about research that doesn’t get much attention is that it is very draining, both mentally and physically, in terms of energy and time. After a good few hours of reading, thinking and coding it’s hard to get up the energy to do anything else. I can just feel my energy drain away once it gets too late in the afternoon. Personally I have a bunch of side-projects (including this blog) that are distinctly not research-oriented and I’m not sure how I’m going to make time (or energy) for them. One way (again taken from Professor Might) is to keep work and play separate. Since I have a pretty decent office space I want to do all my research at work. I’ve started to move some of my books into my office, I’ve set up a standing desk and generally trying to make it a place I want to work from. Ideally I would like to do all work in the office (again, treating it like a real job) and once I left I’d be done with work for the day.

Finally some logistics. All the new graduate students have been provided with pretty amazing office machines (lots of cores, lots of RAM, fast SSDs). Since we have full root access I can get serious work done on them. It also helps with my plan of not bringing work home. Though I love my office machine, I prefer my Macbook Air for reading and sometimes writing. Also having a mobile work station is nice for the times I want a change of scenery (which can be refreshing). But having two machines also brings up the synchronization problem which is something I really want to avoid. I’ll revisit these issues once I get a better idea of how much time I spend working, where and on what.

So to summarize: grad school is a job, not school. Meeting new people is largely a matter of persistence. There’s lots of free food, but a lot of it is not very healthy. Research and classes burn a lot of time and energy so you have zealously guard what you have left and make sure you spend it on what matters. Keeping a distinction between work and play is a good in theory, the practice remains to be seen. Maintaining multiple machines sucks.

If you have any opinions on graduate school (or just work in general) I’d love to hear.

Tagged ,

Mind Expansion

I think the world owes a debt of gratitude to Malcolm Gladwell. To my knowledge his book “Outliers” was the first popular work to expound at length on the 10,000 hour rule: the scientifically grounded theory that achieving expert level in most fields requires about 10,000 of “deliberate practice”. Geoff Colvin’s “Talent is Overrated” is similar, but in my opinion not quite as well written. However, both books are elements of what I see as a growing trend: the idea that improving yourself, becoming more than what you are, becoming what you always wished you were, is not only possible but actually achievable given a proper strategy and adequate dedication.

This idea of gradual, but consistent self-improvement isn’t just applicable to becoming top athletes or musicians. Tim Ferriss’ “The Four Hour Body” including the increasingly popular slow-carb diet applies a similar idea to health and fitness. Cal Newport, a recent MIT doctorate and professor at Georgetown seems to be applying similar ideas to becoming a top academic researcher. My personal goal is to apply it to become the best programmer I can possibly be (as most readers of this blog already know).

For a few weeks now I’ve had a two-fold concern. First, I didn’t know what exactly I was or wanted to be. Was I a programmer? A computer scientist? A software engineer? A technologist? A writer who just happened to use code as well as words? Secondly (and more importantly) I couldn’t see anything resembling a clear path from my current “not totally incompetent code slinger” phase to getting to the point where I could understand the works of the great masters (and maybe create something of similar lasting value). And that really, really bugged me. Combining my current indecision with no idea of how to move forward put me on a path leading straight to madness.

Here I was, a recent college graduate with two rather expensive degrees and a certain amount of knowledge about my field of interest. And yet my four years of education seemed like a piddly little drop compared to the proverbial ocean of knowledge and capabilities ahead of me. Not only could I not cross said ocean, I couldn’t even comprehend it’s boundaries. Sure I could write you a topological sort of some arbitrary graph structure. I could also bit-twiddle my way into a reasonably resource constrained embedded application. I’d even wager that I could build a reasonably stable concurrent system that isn’t too embarassing. But beyond that? I just barely grasped functional programming, my knowledge of type systems was rudimentary at best. I only had the foggiest notion of what a monad was and yet I had signed up for a good few years working on advanced programming languages. What on earth was I thinking?

One of the great dichotomies of our field is that on one hand it is possible to be completely self-taught but on the other there are few systematic guides on going from novice to expert. Most advice on the matter seems to reduce to “Read code. Write code. Think. Repeat.” Wise words to be sure, but not exactly a 12-step program. So what is one to do? What am I to do?

Though Gladwell and his ilk may have shown us that tangible self-improvement is possible, it’s not a quest to be taken lightly for there is no end to it. Until you come up against fundamental physical limits there’s always farther you can go, harder you can push yourself. And yet, after a point I’d argue that a law of diminishing returns kicks in, most victories past that point are Pyrrhic. Which is why it is important that I do what I do for fun, first and foremost. Because I find our field infinitely fascinating, constantly stimulating and there’s nothing else I’d enjoy more (though writing comes a close second).

After the why comes the how. What is the path from point A to point B? Where is point B in the first place? Do I even want to go there? Ostensibly I’m going to graduate school for Computer Science. I have a hard time calling myself a scientist or even a engineer. There’s a formality and heaviness about those terms that seems a little off, in the way that “colonist” has a different connotation than “explorer“. A colonist has a definite, long-term purpose – an unknown world to tame, a new land to cultivate and defend. An explorer is looking around, seeing the way things are, understanding and learning, eventually moving on. I’m content to explore for now. I think I’ll stay “just” a programmer for a while, or maybe even a writer, those two seem the best fit.

Though I do this for fun and computer technology has far-reaching effects on the human race, I’ve grown to see programming as a mind expanding activity in it’s own right, independent of other motivations and effects. I’m looking at our technology as a medium for creative expression. Programming is a way to become familiar with that medium, a way to increase our creative powers. And so the direction to explore is the one which will expand my mind the most, increase my creativity the greatest. It’s easy to stay within my boundaries, to stick to the stateful, imperative programming styles I’m familiar with. To go beyond that, to throw myself into functional programming, to use advanced type systems, to write compilers and virtual machines, to do all that, is hard. It is also a form of “deliberate practice” and essential to becoming better.

For fields and pursuits that aren’t easily quantified, deliberate practice is hard. However one heuristic is to look at how much a potential problem bends your mind. An interesting, worthwhile problem changes the way you think about your field in a general way, but requires you to acquire specific new techniques and skills. Once you solve the problems you’ve increased the size of your toolbox, but you’ve also changed how you will look at and approach problems in the future. With each problem you gain the capabilities to solve a wide range of new problems and inch closer to “expert” status.

A few weeks ago I tried looking for a 12-step program – an organized, decently, reliable path to becoming an expert programmer. I wanted a way to put in my 10,000 hours with a reasonable guarantee of a good payoff. I haven’t found such a plan, but I have found some principles – what I’m doing needs to be fun and must be mind-expanding. I have to keep programming, keeping reading and writing, keep thinking. I’ve reopened my computation theory books, I’m taking baby steps in Haskell, I’m scripting Emacs on a more regular basis. I’m trying to continually expand my mind and abilities, I’m trying to keep getting better. I hope in 10 years I’ll get close to where I want to be. But for right now, I’m drained.

Tagged , ,

In the presence of gods

From Wikipedia, James Gleick in Genius: The Life and Science of Richard Feynman:

This was Richard Feynman nearing the crest of his powers. At twenty-three … there was no physicist on earth who could match his exuberant command over the native materials of theoretical science. It was not just a facility at mathematics (though it had become clear … that the mathematical machinery emerging from the Wheeler–Feynman collaboration was beyond Wheeler’s own ability). Feynman seemed to possess a frightening ease with the substance behind the equations, like Albert Einstein at the same age, like the Soviet physicist Lev Landau—but few others.

Also, last week I went to a lecture by Jon Kleinberg, Tisch University Professor of Computer Science at Cornell University and winner of a MacArthur Foundation Fellowship (also known as a Genius Award), whose early research formed a large part of Google’s success as a search engine.

Some days we are reminded that we walk among giants, that we live in the presence of gods. On those days, we are humbled and uplifted at the same time.

Tagged , , ,

Just for fun

Let me tell you about Sunday. Sunday was, among other things, uncomfortably warm here in Ithaca, NY. And a combination of being woken up much earlier than I wanted and skipping breakfast guaranteed that I was quite cranky all morning. But anyway, by 1pm I was decently well fed and had a mini-conversation with my advisor while standing in the sandwich line (which of course involved a good amount of programming language talk). Being in a considerably better mood I decided to avoid the heat by heading over to Starbucks and writing some code.

For most of last semester I had been working on an Actor library in Ruby to do some fun little concurrency experiments. I had been wanting to take my code (which has very rough in the way that only research projects can be) and turn it into a proper Ruby actor library. On Sunday I started down that path.

I had been aware of some prior art in this area, in particular the excellent Revactor library. Until yesterday I hadn’t actally taken the time to dig deep into it. When I did, I was devastated. Revactor is beautiful, well thought-out, flexible powerful, elegantly implemented. With the exception of a few aesthetic details it’s everythng I wanted my own library to be and more. It was devastating because it seemed like all I could do was reinvent the wheel. What’s the point of writing or making something if someone’s already done it before and better? It’s the kind of crushing hopelessness I feel sometimes as a language researcher: it seems like Lisp did everything, 30 years ago, and did it better.

So after banging my head against the table for the better part of an hour (and wondering why the girl sitting next to me had two straws in her iced tea) I decided to go for a walk. At almost 6pm it was still uncomfortably warm but after ten minutes I found myself at the steps of the computer science building (unsurprisingly). I walked in, claimed a couch and started writing some code.

My new project isn’t brilliant research, it’s not scalable and high-performance, it’s not an infinitely reusable library with unit and regression tests. It’s just a little hackish thing I threw together in an hour. It doesn’t do very much yet but offers the promise of many hours of fun hacking ahead. It’s a fun personal project that scratches a little itch and is a lot of fun to code up. I’m writing a combination of C and Ruby, I’m living in Emacs and my terminal and I’m having a lot of fun at it. After a long, long time I’m having fun writing code and remembering why I got into this gig in the first place.

The thing is, at the end of the day, I sling code because I like to. Because it’s fun. If it stops being fun I might as well just give it up and hang up the keyboard (or keep the keyboard and write words instead of code). As Andrew Appel says, not all of us want to be logicians, some of us just want to be hackers. I like math and logic and performance analysis as much as the next guy, but I also like just the pure, raw feeling of code. I remember the allure of the machine as a mysterious black box – a well of infinite potential if only you could figure out how to bend it to your will. I remember a time when we used to be explorers – poking and prodding our systems, seeing how they reacted, how they bent, how we could change them and restore them, how we could make them do what they weren’t meant to do. I remember that it used to be a whole lot of fun. Yesterday I remembered all that and had a lot of fun doing it.

I don’t know why you do what you do, but I hope it’s fun. I hope that when you go to work everyday it’s because you really, really want to, because you can’t see yourself doing anything else that’s as fun. Feel free to change the world, to make it a better place to live in, to support and help the people around you, but please have fun while doing it.

Tagged ,
Follow

Get every new post delivered to your Inbox.

Join 331 other followers