I’m sure there’s a good reason for this (it’s in the spec after all), but I had some data that needed those keys to be conserved. Luckily there’s an optional second parameter you can pass to JSON.stringify(), a replacer function, which can be used to modify the data before it’s encoded to JSON.

If we create a quick function to replace all undefined values with null:

I also created a port of the game using Ember.js which was fun to put together. One of the main challenges of the port was trying to maintain game state and transitions without using Ember’s router, since you don’t usually want to save game state in the URL. I ended up using an Ember object to hold the state variables and referenced that throughout the application, but if I were to do it again I might try to use Ember’s state machine instead.

UPDATE: Apparently this is a common problem, so if you want to go the easy route then use http://railsinstaller.org and disregard the rest of this post.

I’ve been trying to get Ruby on Rails installed for the last couple hours and ran into some snags, but I finally seem to have overcome them. This page is supposed to get you up and running, but it’s apparently more difficult than that for Windows users. So here’s the steps I ended up using:

I bought the Yamaha AUDIOGRAM6 recently to have something easier to carry around than my 12-channel Mackie mixer. If all you need is an audio interface for recording, then it’s pretty great for the price – USB powered, built-in compression, phantom power, stereo recording. If you want to use it live, though, it has a fatal flaw, one which isn’t mentioned on their product pages or even in the manual. There’s no way to turn off direct monitoring.

I’ve taken to using Reason as my effects processor when playing electric guitar, and it simply doesn’t work to have the dry signal mixed in just as loud as your processed signal. I’ve since purchased the Propellerheads Balance audio interface, which works great, but it also costs about three times as much. So if you’re stuck with the AUDIOGRAM6 here’s a way to get around the direct monitoring if you’re using Reason on Windows.

I was learning to play this song on the guitar last week and thought it’d be cool to learn the banjo part as well. Since I don’t have a banjo, I googled around a bit to see if anyone had made a tab of the banjo part for guitar. I couldn’t find any, so I decided to make my own.

But I defined Session.User in the OnSessionStart method! How is this possible??

Turns out, if there’s an error in the OnApplicationStart method, then OnSessionStart will not run before your OnError method is called. And if your OnError method tries to log the Session variables it expects to be there, it will throw this error.

I’ve been hearing about Node off and on for a while now, but haven’t really looked into it very deeply until now. I’ve really come to enjoy JavaScript as a language since discovering jQuery a couple years ago. (Before that I tended to shy away from it because it was just so frustrating to deal with the DOM.) So, naturally, to be able to use it on the server as well as the client has a certain appeal to me.