The perils of using JavaScript objects as sets

One question I'm fond of asking in interviews is how to create a set of strings to which values may be added in an efficient manner. Furthermore, membership checks must be reliable and as fast as possible. This post can be considered the model answer. ;)

iTunes: Surprisingly useful when learning a foreign language

I recently began learning Danish. I'm taking a weekly class, and the first week's homework involved listening to the conversations we covered during the lesson. I began by playing the audio files, following along in the Danish transcripts. I found myself wanting to listen to the difficult parts over and over, but scrubbing through a timeline is rather awkward.

It occurred to me that I could use iTunes to solve this problem. Normally, iTunes will play a track from beginning to end. It's possible, though, to specify a certain portion of the track to be played instead. By adding an audio file to a playlist many times and specifying consecutive portions (e.g. 0:00–0:02, 0:02–0:04.8, …), a track can be broken into manageable clips for more convenient navigation.

Here's the end result:

iTunes playlist for Danish dialogue

Helveticards

Helveticards

Helveticards are a set of über minimalist typographic playing cards by designer Ryan Myers.

I love these! I designed a set of playing cards several years ago while at university, but I certainly didn't think of doing this.

Via Laughing Squid.

Higher-level style sheets

Yesterday I used three things for the first time: Sass, Compass, and Ruby. To summarize:

  • I ♥ Sass
  • I ♥ Compass
  • I ♥ Ruby

One's own site is a great place to play with new (or in this case, not so new) web technologies. I decided to get stuck in and manually convert the 1200 line style sheet from CSS to something a bit more awesome. This post documents the most interesting portion of that transformation, which involved this site's archives styles.

Getting started with Socket.IO

There's no shortage of blog posts which — like this one — provide an introduction to Socket.IO. Many, though, were written prior to the release of 0.7, which ushered in significant API changes. Here I'll provide examples of server- and client-side code using APIs provided by the current version (0.7.4 at time of writing).

Want more?

Check out the archives.