Archive for the ‘Technology’ Category

Facebook’s targeted advertising isn’t

January 22nd, 2013

Not exactly targeted advertising

ZOMG with all these new privacy violations Facebook advertisers know EVERYTHING about you and stalk your every movement and…

…wait, they think I want Mission burritos delivered to the Marina?

Never mind.

I mean, they’re right about me being lazy enough to get a burrito delivered instead of walking three blocks, but the Marina? Come on.

A better way to fix our gadgets

September 18th, 2012

Until now, the process for solving technical problems involved Googling around for advice on forum posts and help pages.

The advice is always the same, isn’t it?

  1. Follow an obscure sequence of commands.
  2. Now try again.
  3. If there’s comments on the page, at least a dozen will have conflicting reports about the outcome of these steps.
  4. If it doesn’t work, go back to Google and look around some more.

Of course the tech geeks could be messing with you. By following the advice your TV won’t turn off and your wedding photos are permanently deleted. Who knows.

Fortunately there’s now a better way to solve basic technical problems; devices that STFU when you smack them. Microsoft has invented the first phone you can physically abuse when you need it to just shut up for a minute so you can think for once, goddamn it.

I’d suspect that if this feature seems intuitive, you shouldn’t have kids. But then again people have been smacking their TVs for decades so the gesture is already in our collective consciousness. And who wouldn’t want a TV that stops breaking when you hit it?

Besides, not all emotionally responsive technology needs to involve violence. How about a flashlight that turns up the brightness when you’re shaking in terror? Or cars that soothe anxious drivers with relaxing music to prevent road rage? Or a bathroom scale that subtracts some weight if the user is crying?

There’s all kinds of ways our gadgets could be made fixable that don’t involve following the advice of strangers online. Get with it, tech companies.

And let me know when you have a computer that works better when I start cursing under my breath and slamming on the keyboard. I’ll be first in line to buy it.

Ubuntu as an OS X TimeMachine server

August 19th, 2012

One of the best features of Mac OS X is TimeMachine, a ridiculously easy to use backup system. The downside to TimeMachine is you either have to use an external hard drive or buy Apple’s TimeCapsule backup hardware.

Turns out there’s a third option — use a Linux PC as your backup server.

With Ubuntu Linux 12.04, I highly recommend following this guide, which explains the safest route. Keep in mind it’s completely unsupported by Apple, of course, so if your backups are overwritten with My Little Pony pictures, don’t go complaining to the Genuis Bar.

A couple notes on the guide:

  • Most users can safely ignore the part about Shorewall settings.
  • The guide glosses over user-level security. You could use your normal user account for backups, but you should consider setting up a special user account just for TimeMachine. That way if someone hacks into your Mac, they’ll only have access to your backups and not your entire Linux PC.

Omni Consumer Products launches sandwich-purchasing app

April 11th, 2012

OCP's new iPhone app

16th and Mission’s The Sandwich Place is littered with signs for a new app for your phone that lets you order (and pay) online.

The app is apparently from Omni Consumer Products, best known for Delta City and their robot police force. Before you can say “I’ll buy that for a dollar!” let me point out that the app itself is free. All you gotta do is place your order, drive your 6000 SUX down to the restaurant and pick it up.

Using an Evoluent VerticalMouse 4 on Linux

April 10th, 2012

Evoluent’s VerticalMouse 4 is one of the better ergonomic computer mice I’ve used. It’s comfortable, it doesn’t take much getting used to, and the price isn’t unreasonable.

While it works great on Windows and Mac, the same can’t be said for Linux. The button mappings cause some truly odd behavior, particularly with the scroll wheel.

Fortunately, there’s a quick fix.

First let’s play with xinput to make sure the settings are what you want. The following command will print out a list of input devices on your system:

xinput list

There should be a line that looks something like this:

Evoluent VerticalMouse 4 id=10

The important thing here is the ID number, which in this case is 10. It will vary from one computer to the next.

Now we can assign a new button mapping. I like to keep it simple, so this will only activate the left and right mouse buttons (on either side of the scroll wheel) and will set the scroll wheel to scroll and act as middle click. If you want a different setup, I recommend reading this and this and playing with these values in xinput until your mouse does what you want.

xinput --set-button-map 10 1 3 0 4 5 0 0 0 2 0 0

Note that I bolded the first parameter: as you may have guessed, that 10 is whatever ID you found above.

Got it working? Good. Thing is, xinput will only temporarily set your mouse buttons. Once you reboot, they’re gone.

To make these changes persist we need to create an Xorg settings file. First we’ll need the USB ID of your mouse. The following command will list all the USB devices on your system:


One of them should look kinda like this:

Bus 004 Device 004: ID 1a7c:0191 Evoluent VerticalMouse 4

The funny text I bolded is the device ID. (Again, it will likely be different on your system.) Now you can create a config file for your mouse. Note that this works on Ubuntu, perhaps your distro stores configuration files elsewhere.

sudo touch /usr/share/X11/xorg.conf.d/90-evoluent.conf
sudo gedit /usr/share/X11/xorg.conf.d/90-evoluent.conf

Copy and paste the following into the file, remembering to swap out your mouse’s USB ID and the button mapping string (if you changed it.)

Also, note that the button mapping string does NOT start with the device ID you used above; that was only for xinput.

Section "InputClass"
Identifier "Evoluent"
MatchUSBID "1a7c:0191"
Option "ButtonMapping" "1 3 0 4 5 0 0 0 2 0 0"

Easy, right? Well okay, not at all. The lack of a good mouse configuration UI is a nasty oversight on modern Linux systems. Someone needs to make one.

How to setup Rhythmbox 2.95 as an Ampache client

April 2nd, 2012

Ampache, for those who don’t know, is a personal streaming music service. It lets you play your MP3s anywhere there’s an internet connection.

You don’t need anything special to play music via Ampache, just a web browser. But certain music applications integrate full Ampache support, which means you can browse all your MP3s from within the app.

On Linux, I use Rhythmbox to play music. There’s an Ampache client for it, but it’s not as easy to install as it should be with newer versions of Rhythmbox.

Here’s what worked for me.

  1. If you have not done so, on your Ampache server set permission to allow XML RPC (Manual is here for complex setups.) For the most basic setup, log into Ampache as an admin. Click the Admin button, then “Add ACL.” In the box that pops up, enter the following:
    • Name: [whatever you like]
    • ACL Type: RPC
    • Start:
    • End:
    • User: All
    • Remote Key: [leave this blank]
    • Level: Read

    Now hit “Update.”

  2. Make sure Rhythmbox is not currently running.
  3. Install or upgrade to Rhythmbox 2.95 (or 2.96) if you don’t have it already. For Ubuntu Oneiric, you can grab it off this PPA.
  4. If you don’t have it, install Subversion. Check out the code for the Ampache plugin:

    svn checkout rhythmbox-ampache-read-only

  5. Copy the files.

    cd rhythmbox-ampache-read-only/
    mkdir ~/.local/share/rhythmbox/plugins/ampache
    mv * ~/.local/share/rhythmbox/plugins/ampache

  6. Run the installer.

    cd ~/.local/share/rhythmbox/plugins/ampache
    sudo python install

  7. Now open Rhythmbox.
    • Go to Edit -> Plugins
    • Check the box next to “Ampache Library”
    • With Ampache Library selected, click “Preferences”
    • Enter your server info here.
    • Now close the dialog and double-click Ampache in the Rhythmbox sidebar.

It may take some time to sync with your server, but once it does you should be good to go. Personally I find this plugin to work a lot better than the Amache plugins for Amarok and Banshee, but your mileage may vary.

Updated Aug 2012

Dopefish Ex: Human Revolution

November 23rd, 2011

Dopefish screenshot from Deus Ex: Human Revolution

The image above is from the game Deus Ex: Human Revolution.

Recognize it? Remember the Dopefish? The big, dumb fish that appeared in the water level of Keen 4? If not, you missed out on the golden age of PC gaming. (Go buy a 386 and we’ll talk.)

Images of the Dopefish have been snuck into video games for nearly two decades. It’s like the “Andre the Giant Has a Posse” poster of gaming.

Incidentally, Deus Ex: Human Revolution contains a number of other subtle Easter Eggs.

Setting up Ubuntu as an iTunes music server

November 20th, 2011

If you’re like me, you’ve got a home network with a couple computers and a buttload of music in MP3, OGG, and FLAC format sitting on your Ubuntu server. You want to be able to keep all your music on that server, but play it from any computer.

What to do?

There’s a few solutions to this. If you want your music to play anywhere in the world, you can use Ampache. Ampache works great with Winamp and many other players. But on the downside, it requires some tricky setup and doesn’t work nicely with iTunes.

Another option is Forked-daapd, a strangely named piece of software that allows sharing your music with iTunes on a local network. It also works with iTunes compatible software such as Rhythmbox. Best of all, it’s super easy to setup.

This is all you have to do:

  1. Install the forked-daapd package. From the command line, you can do this:
    sudo apt-get install forked-daapd
  2. Edit /etc/forked-daapd.conf as root. Directions are in the file, but you’ll want to edit the directory to point to the path(s) of your music folders (it will recursively scan subfolders for mp3s, etc.) You may want to enable transcoding if you have OGG, FLAC or other formats that iTunes doesn’t like. Oh, and don’t forget to change the name of the share to something more fun.
  3. Restart forked-daapd with sudo /etc/init.d/forked-daapd restart

Now open iTunes and see if your server appears. It should show up on the sidebar. If you click on it, there will be a handful of songs almost immediately. It may take a while for Forked-daapd to index all your music, so be patient.

That’s it! Now you’re ready to party!

Programming in Vala

January 18th, 2011

As some of you may know, I work for an open source software non-profit called Yorba. Our best known product is Shotwell, a photo management application that’s similar to Picasa or iPhoto, but created for Linux. It’s the default photo app these days in both Ubuntu and Fedora.

What many of our users don’t know is we don’t develop our software in C or C++… we use Vala.

So what the hell is Vala?

The cool thing about Vala is that it’s a fully compiled, statically typed OOP language designed to be built for Gtk applications. The syntax is very similar to Java or C#, but the garbage collection is based entirely on reference counting. In other words, you get the simplicity of a modern language with the speed of a fully compiled program. Vala bindings are already available for Gtk, Gdk, GLib, Gee, and many other libraries. Or you can create your own bindings when needed by creating a Vapi file. There’s a documentation program, Valadoc, which generates pretty HTML documentation for your classes.

The entire Vala package is available under an LGPL license, which is a free software/open source license. You’ll never have to worry about Microsoft or Oracle stepping on your toes.

Here’s the “Hello World” app from the Vala tutorial.

class Demo.HelloWorld : GLib.Object {
    public static int main(string[] args) {
        stdout.printf("Hello, World\n");
        return 0;

Save your file as hello.vala. You can compile from the command line with:
valac hello.vala
Now watch closely… the Vala compiler actually just creates a .c file! It’s what’s called a “source compiler” in that it converts source code from one language to source code in a different language.

Next, valac automatically invokes GCC to compile the .c file into an executable binary.

Run your demo code with:

Simple, huh?

Vala syntax includes the language constructs you’d expect in 2011, including:

  • interfaces
  • single inheritance
  • non-nullable variables
  • foreach loops
  • delegates
  • signals
  • reflection
  • built-in multidimensional arrays
  • type inference

There’s plenty more sample code and tutorials on Gnome’s Vala site.

Documentation for some of the most common library bindings is available at

Okay, ready for the bad news? Despite being a relatively feature-complete language, there’s really no perfect IDE for Vala yet. If you’re used to powerful graphical debuggers, class browsers, and jumping around the code like in Eclipse and Visual Studio, you’re out of luck.

The only Vala IDEs at the moment are:

  • MonoDevelop: A great start, but for the features it’s rather heavy.
  • Valide: I was never able to get this one to even compile! But the screenshots look promising.
  • Valencia: This is Yorba’s GEdit plugin, which provides only barebones Vala functionality on top of GEdit, including jump to definition and autocomplete.

So there you go, that’s Vala. It’s still a young language, but it takes away the headaches of developing Gtk apps in C, and it doesn’t have the uncomfortable legacies of C++. Give it a shot!

Inanimate Racer

October 22nd, 2010

Today I was surprised to find a (semi-serious) review of a game I created back in high school, “Inanimate Racer.” The point of the game was that you could only race objects that didn’t move.

Here’s the review:



If you’re interested in playing(?) Inanimate Racer, there’s also a Flash remake of the game available here.