Daily Distractions: SpaceChem

SpaceChem

Last week, I stumbled upon SpaceChem, an indie game where you play the role of a reactor engineer sent to various planets to turn harvested raw materials into more useful products.

What’s really great about this game is that you are practically programming the “reactors”. Not only does it dabble upon both digital design (clock timing, implementing state handlers from scratch) and software development (performance tuning, refactoring), missions that require you to connect multiple reactors also make the player learn supply chain management.

I won’t post any videos since it will spoil the joy of making your own solutions to the missions. I suggest you go grab the demo here (available on Windows, Linux, and Mac) and try it out yourself.

Adding iPhone Icon to your Website

I check my statistics and logs once in a while to look out for hacking attempts and broken links. Something interesting showed up in the logs for this blog last month:

missing icons

Turns out that iOS devices (iPhone, iPod Touch, iPad) allow you to create Web Clips, basically a bookmark on your home screen. Just like browser bookmarks use Favicons to allow the user to quickly identify what that bookmark is for, Web Clips can be represented by certain image files.

Cutting to the chase, I had to create 3 files: apple-touch-icon.png (iPhone 4), apple-touch-icon-57x57.png (iPod Touch), and apple-touch-icon-72x72.png (iPad). I didn’t use the “precomposed” icons because I want to let the iOS device handle the rounded corner + glossy effect (and let me get away with a simple image I cooked up in GIMP in 5 minutes).

Here’s the Web Clip in action on my iPod Touch:

Web Clip

CD-R King’s Cheap Solid State Drive, Part 2

Plextor SSD

It’s no secret that I have a guilty pleasure of going to CD-R King to look for decent stuff in their inventory. And I do find some nice stuff once in a while, for example, I only recently found out that they sell digital scales that allow zero resetting, an invaluable tool in the kitchen especially when baking. The PhP 380 – 580 price range is just too low when compared to the scales you’ll find in stores like Gourdo’s which sell them from PhP 1,500 to 3,000.

Anyway, I’m just here to point out that CD-R King has a new 64GB SSD in their inventory. At PhP 3,990, it’s cheaper than the one I have on my rig right now, but based on reviews it’s supposed to be crappier.

Still, there are worse ways to shell out P4k (like, say, attending a cloud computing conference when you’ve already been using it for years) so slapping one on your on-the-go workhorse laptop isn’t that bad of an idea.

Free Windows Ruby/Rails Editors: Redcar and Sublime Text 2

Last Saturday was the third time this year I’ve gone to a college to talk about Ruby and Rails. And, as expected, the general lack of experience in developing in Windows was the main cause of problems in that whole day event.

The experience wasn’t as bad as what we would have gotten had we conducted it last year, though. Installation used to be the hardest part about Rails on Windows, but thanks to RailsInstaller and RailsFTW, installing Rails on Windows nowadays is practically easier than installing it on Linux or OSX.

However, another problem still remains: the lack of good text editors for Rails on Windows. The vast majority of Ruby developers don’t use IDEs, while their choice of text editors are either OS X exclusive (TextMate) or has a steep learning curve (vim, emacs). On the Windows side, Notepad++ and Crimson Editor both have dismal Rails support.

Fortunately, there are a couple of good upcoming text editing options for Rails developers on Windows.

Redcar is a text editor written in Ruby running on top of JRuby. It’s cross-platform and free but still in alpha. It’s heavily inspired by TextMate, and it even supports some TextMate bundles.

Redcar only requires Ruby and Java. You don’t need to have JRuby; any combination of JRE and Ruby interpreters should work. Running the installation commands

$ gem install redcar
$ redcar install

will download Redcar and JRuby JAR files and install them in your local user directory. After installation, you could run Redcar just as you would run TextMate

$ redcar PATH/TO/APP

Here’s a screenshot of Redcar viewing my depressing lotto app (click to enlarge):

redcar

Sublime Text 2 is another cross-platform text editor. The original Sublime Text isn’t free, but the upcoming release is still free because it’s still in alpha.

Here’s a screenshot (click to enlarge):

sublime text 2 alpha

Sublime Text 2 doesn’t require Ruby or Java, making it more feasible to be shared around in a coding workshop with spotty internet connections (e.g. last Saturday’s event), but its eventual proprietary nature may prevent long-term development use.

EDIT: Quick write-up on Notepad++ v6.0 here.