Over the last few months (years?) I’ve been noticing the increasingly deleterious effect of excessive information consumption of my state-of-mind in general and my ability to concentrate for long periods of time in particular.

With that in mind (get it? I’m sorry) I’m trying to be more careful about my information consumption.  Part of that is trying to consume higher quality things in smaller quantities, and spending more time and effort enjoying and appreciating what I’m experiencing. But part of it is also revisiting things that I really enjoyed once.

Over the last few years I’ve been largely listening to music via Spotify. While it’s been great for discovering new artists and music without spending tons of money, it’s also led to some bad habits. I often get lazy and listen the same playlist of Spotify-curated tracks on repeat. I also neglect my fairly large personal collection of music that’s sitting around on my computer.

So I’m going to try to listen to more music from my personal, local collection, including a bunch of the aforementioned things I used to really enjoy.  Since I’m near my MacBook most of time, I’ll be listening to MP3s via iTunes. Some of my collection is messy, so I’ll be using the excellent Beets tool to clean up and organize my collection as I go. Today I’m listening to Blind Guardian, starting with The Forgotten Tales album. I’ll also be keeping a Twitter thread of things I’m listening to as I go along (if I can remember to update it).

Advertisements

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.

Sunday Selection 2011-11-20

Around the Internet

How an MIT postdoc writes 3 books, a PhD defense and 6+ peer-review papers and finishes by 5:30. One of the best and worst things about being in a PhD program is that it is opened: it can take as long as you want it. Though being at a world class research university like MIT or Cornell is certainly a wonderful experience, I’m not at the point in the life where I want to spend more than a few years in one place. I want to do good work, do it in a focused manner without killing myself and hopefully have a life and get done in a reasonable amount of time.

Thrust, Drag and the 10x Effect Managing your time goes hand in hand with managing your energy and your activities. In the software world there’s a claim that the best engineers are often ten times as productive as mediocre ones. This article aims to give you some tools to help you on your way toward being ten times as productive.

Why Emacs? I make no secret of the fact that I think Emacs is the best text-editing environment on the planet. This post gives a very straightforward but informative introduction to the question of “Why Emacs?”

Video

Derek Sivers’ Speech to Berklee College of Music I have a tremendous amount of admiration for Derek Sivers. While this speech is geared towards music majors, most of his lessons and advice can be generalized to your profession and life in general. There’s a lot of wisdom packed into a few minutes.

Software

Readability is an awesome tool in the fight for a reading-focused, cleanly designed web experience. They started as a browser plugin that strips a page of unnecessary clutter and presents just the text in a clean, visually pleasing format. They’ve released upped their game with a payment model for publishers, a rich web application and a review-pending iOS app. If you read a lot on the web you probably want Readability in your toolbar.

Music from the Command Line

In addition to programming I also love music. If I’m not listening to music I’m probably not working. While I love Pandora, my slightly off-mainstream musical tastes means that I start getting repeats pretty soon. I carry my personal library on my iPod but I don’t like listening on my iPod all day. Also, if the office is empty and my computer has speakers I like to take the headphones off and turn up the music. Last week I realized that my work machine had a 500 GB hard drive in addition to the SSD so I decided to copy my personal library on to it.

I know that there are a number of good music players for Linux but I personally wanted a very lightweight setup and didn’t need any “management” features (I have everything neatly organized into Artist and Album folders anyways). So I decided to use a little gem called MPD – the Music Player Daemon.

MPD is a daemon – it runs in the background and plays your music. It doesn’t provide an interface itself but you can connect to it using a number of clients. I love MPD becuase it’s very UNIX-y and just gets out of your way. You tell it where your music is and point it to a number of files it needs for operation (logs, a database and some state information). You then tell MPD which user to run as and a port on localhost to listen on. Here’s my config file.


music_directory                 "~/Music"
playlist_directory              "~/mpd"
db_file                         "~/mpd/mpd.db"
log_file                        "~/mpd/mpd.log"
pid_file                        "~/mpd/mpd.pid"
state_file                      "~/mpd/mpdstate"

user                            "username"
bind_to_address                 "127.0.0.1"
port                            "6600"

. As you can tell from the screenshots, it’s a lightweight but fully functional client.

This kind of setup probably isn’t cup of tea but I don’t want to convince you that it’s better than whatever current setup you have. For me this is amazing for a number of reasons. Firstly it’s quickly configurable and it stays out of my way after that. Second it’s very lightweight. Ncmcpp comes up in a second, I can quickly go through my library and add a few hours of music and set it to play. Then I can close it and not give it a second thought as I do my work. Since it’s so quick to come up, I can keep the client closed and open it if I do need to do something (like skip a track or see what’s playing). Since I have a terminal (or five) open at any time, it’s a quick process the few times I do have to do it.

Reason three is the client-daemon model. I think there are graphical clients that give you more standard functionality, but since I don’t need any of that, it isn’t forced upon me either. There is however an even lighter client called mpc (that is part of the standard MPD install) which lets you execute some actions like play, pause and skip without even opening a full client. Thus interaction is even faster.

In conclusion, if you’re looking for a simple, efficient music player that will play your music and stay out of your way then MPD is worth a try. If you’re not a command-line afficionado you might like one of the graphical clients. I’ve used Sonata myself in the past and liked it.