Skip to main content

Benjamin Oakes

Photo of Ben Oakes

Hi, I'm Ben Oakes and this is my geek blog. Currently, I'm a Ruby/JavaScript Developer at Liaison. Previously, I was a Developer at Continuity and Hedgeye, a Research Assistant in the Early Social Cognition Lab at Yale University and a student at the University of Iowa. I also organize, ICRuby, OpenHack Iowa City, and previously organized NewHaven.rb. I have an amazing wife named Danielle Oakes.

Filtering for the month February, 2014. Clear

Rumors of Ruby’s Demise

by Ben

Rumors of Ruby’s Demise | Virtuous Code.

Periodically someone on the Internet becomes aware of concurrency-oriented programming languages like Erlang or Scala, and climbs up the bell tower to sound the “is Ruby dying” bell.

It’s kind of like when we talked to Ilya Grigorik recently, and he was talking about how most companies are using lots of binary protocols to link their systems together internally. And James and I were like “um, I think you’re thinking of Google, not most companies”.

Final thoughts – you should, of course, use the best tool for the job. In my book that doesn’t mean pondering long and hard over what the right tool will be a year from now. It means whipping out my friendly pocket Leatherman tool, and only hauling the big toolbox once I’ve satisfied myself that the Leatherman is insufficient. My Leatherman happens to be Ruby.

I think there’s a kind of peer-pressure when you’re deeply embedded in the developer community to switch to the new hotness or fall woefully behind.

Ruby gotchas

by Ben

From Ruby Gotchas that will come back to haunt you.

I figure we should all be aware of these:

  • and / or is NOT the same as && / ||
  • eql? is NOT the same as == (and NOT the same as equal? or ===)
  • super is NOT the same as super()
  • Your exception must not be an Exception
  • class Foo::Bar is NOT the same as module Foo; class Bar
  • Most bang! methods return nil when they do nothing
  • attribute=(value) method always returns passed value, regardless of method return value
  • private will NOT make your self.method private
I personally didn’t know the attribute= one.  I hope this helps fill out our shared Ruby knowledge.

Hello, MS-Android. Good-bye, Windows Phone

by Ben

Hello, MS-Android. Good-bye, Windows Phone | ZDNet.

Nokia may be making the Android X, X+ and XL handsets, but at the end of the day it was Microsoft’s call to produce Android phones.

Why Microsoft should welcome Nokia’s new Android phones.

If you think Nokia’s decision to introduce a line of Android-powered phones is a threat to Microsoft, think again. With Microsoft’s new “devices and services” emphasis, these phones are a logical fit, even after the acquisition closes.

Back on Linux

by Ben

Back on Linux —

This is pretty much exactly how I feel about switching from OSX back to Linux. My guess is that a lot of developers have similar sentiments. In fact, I overbought RAM (8GB) because I was so used to running out on OSX. Although it’s hardly perfect, I’m pretty happy with Ubuntu on a day-to-day basis.

Since Jyrki’s post is licensed under a Creative Commons Attribution 3.0 Unported License (see the footer of his site), I thought I’d archive it here for posterity.

Back on Linux

by Jyrki Pulliainen on 2012-02-11

About a month ago I moved to Stockholm, Sweden and started working at Spotify. A month before starting I was asked about my preferred setup for working. Having used OS X for year as the primary operating system at work the choice was clear, I wanted to go back to Linux, in this case to Debian to be exact.

Working with Macbook Pro, a year in retrospective, the hardware

There’s one thing that really stands out of Apple’s laptops, the build quality. The aluminium unibody is manufactured with precision, there’s no air intakes in the bottom of the machine (this is really useful if you use a laptop in your lap) and the peripherals, like the touchpad, are top quality. I really miss those and keep on wondering why there’s no PC manufacturers that would have the same overall quality of the hardware.

The choices Apple has made also have drawbacks: The mini-DisplayPort requires you to carry around a load of adapters, the amount of USB ports is pretty limited and due to the missing of proper air intake the laptop can get pretty hot, but that was really rare in my use.

Operating system OS X excelled in the hardware drivers: when you have limited amount of hardware you need to support, building good drivers for it is much easier. Feature that I probably miss the most was the somewhat smart handling of external displays, along with the brilliant multitouch gestures of the touchpad.

…and the software

However, the operating system was in no way par with the hardware. Biggest grief was the memory usage. Judging from the interwebs, the most developers purchased 8 gigabytes of memory on their machines to start with. I had four. For web development, Python programming and such four is more than plenty. Except if you’re running OS X, apparently.

Completely failed memory management

OS X has a feature called inactive memory. This is memory that was recently used by an app you closed and can be quickly made to active memory if you resume to use that app. A nice concept, that fails miserably. OS X’s documentation says, that this memory may be freed at any moment. However in practice, it just keeps on
accumulating until you run out of free memory. In this case a sane option for the OS would be freeing the inactive memory. Instead the OS X decides to swap the inactive memory on the disk. So when running out of free memory and having a 1,5 gigabytes of inactive memory left, your OS starts paging the unused inactive memory to disk instead of freeing it for applications to use. Not only this causes your computer to slow down, it also is counter-intuitive in the terms of the original idea of inactive memory: when it’s on disk, it definitely is not made
active quickly.

I managed to find out that this memory can be freed with combination of XCode’s purge-command and repairing disk permissions. First usually freed around 200MB of memory while latter freed almost every bit of inactive memory. Eventually this became a daily routine. When arriving to work the first thing was to hit repair disk permissions button and do something else than actually use the computer for the next five to ten minutes. Sigh.

Messed up software installation

There are at least four different ways of installing software on OS X. Download a DMG image, drag the icon from there to Applications folder, run an installer, install stuff from Mac App Store or compile it yourself. There seems to be no standard way how to do this properly. Of course, being a software dev, I ended up using the last alternative a lot.

However, someone had come up with a solution for manual installing: a package distribution system that takes care of all requirements for you. There are multiple flavours of those, I ended up using homebrew.

When you have pretty much unified hardware (32/64-bit Intel) with pretty limited number of operating system versions, one could think that distributing binaries would be the way to go. Apparently it is not. Using homebrew is like using Gentoo, except that it’s even more
screwed up. There’s no central repository for sources, it tries to download everything from the projects sites using different methods. After that, it compiles everything. Want to install library X? Please wait, compiling and downloading tons of crap from the interwebs, might take tens of minutes of wall time.

And of course this does not support installing Python, Ruby, Perl on any other software that has its own way of distributing software. And in case you mix up MacPorts and homebrew, you’re deeply screwed.

And don’t even get me started with the closed ecosystem thing Apple and OS X are heading towards with rapid speed.

Why Debian?

I’m a long time Ubuntu user, but this time I decided to go with Debian. Why? Mostly because our servers are Debian and because latest updates of Ubuntu have mostly focused on breaking the desktop environment. With Debian Squeeze I get the old and reliable Gnome 2.30 with the ability of pinning newer packages from either backports or from testing and unstable distributions.

Most notably I get the ultimate software installation tool, apt-get. A tool that installs binary packages with their dependencies. A tool, that’s universally supported by Google et al., so I don’t even have any problems installing newest Chrome, for example.

Linux in general brings other improvements with it, like working command line tools. GNU version of common tools like find and grep are much more powerful when compared to the BSD alternatives available on OS X.

Do I miss something?

Sure. Even though Linux in modern times mostly works out of the box, there’s still slight issues with external displays, for example I can’t set the 30″ Dell monitor at work to be the only display without doing some xrand magic. I guess that’s really the only thing I’m missing from OS X, a sane and automatic way of handling external displays. I also miss the Macbook’s superior touchpad, the joystick of Lenovo is nothing in comparison.

Would I consider switching back? No. I got working virtual desktops, package manager and properly working memory model now, currently using 3 gigabytes out of total eight, and it includes running four virtual machines 512 megs of memory each.

So long OS X. You were a nice experiment and I miss some parts of you, however we definitely were not a match made in heaven.

Ubuntu To Switch to Systemd As Default Following Debian Decision

by Ben

Ubuntu To Switch to Systemd As Default Following Debian Decision | OMG! Ubuntu!.

In news few of us would have dared to predicted: Ubuntu is to switch to the ‘Systemd’ init system after years of using home-grown rival ‘Upstart’.

Neither Microsoft, Nokia, nor anyone else should fork Android. It’s unforkable.

by Ben

Neither Microsoft, Nokia, nor anyone else should fork Android. It’s unforkable. | Ars Technica.

An interesting take on Google’s Android strategy. In summary, Android is Open Source, but Google is really pushing that apps depending on proprietary Google Mobile Services (GMS). This explains why some apps aren’t in the Amazon Appstore. I’d be interested in how Cyanogen Mod is solving the GMS problem.

At any rate, the only service that is really discussed is in-app purchases… I’ve never made an in-app purchase, so that wouldn’t be a deal breaker for me (although I have purchased apps before). I could see how that would be a big blow to the current mobile gaming industry. I would imagine Google’s mapping service is another… but it’s hard to say what other GMS services I would really care about.

How Travis CI Rolls As A Team

by Ben

The Travis CI Blog: How We Roll As A Team: Our Company’s Work Values.

Key points they brought up:

How In-app Purchases Have Destroyed The Industry

by Ben

How In-app Purchases Have Destroyed The Industry (by @baekdal) #opinion.

We have reached a point in which mobile games couldn’t even be said to be a game anymore. Playing a game means that you have fun. It doesn’t mean that you sit around and wait for the game to annoy you for so long that you decide to pay credits to speed it up. And for an old geezer like me who remember the glory days of gaming back in the 1990s, it’s just unbearable to watch.

Tim Berners-Lee: we need to re-decentralise the web

by Ben

Tim Berners-Lee: we need to re-decentralise the web Wired UK.

Twenty-five years on from the web’s inception, its creator has urged the public to re-engage with its original design: a decentralised internet that at its very core, remains open to all.

Design patterns in a sentence

by Ben

From the Progammers Stack Exchange:

It’s a design pattern because people have found that it’s a useful thing to do.