18 February, 2012

Tools of the trade: Subsonic

A large digital music library is both a blessing and a curse. Before the advent of Napster I would carefully scour AudioGalaxy looking for tracks to stuff into my Rio PMP300. There comes a point, however, when a music library becomes too big for its britches and you need to move to a client/server model.

Many services offer the ability to upload your tracks for remote listening. Lala did an excellent job of this before it was promptly purchased by Apple and killed in 2010. AudioGalaxy has also been reborn as a similar service, and even Google Music is testing the waters. The issue is that many of these services limit the number of tracks you can upload or have other silly issues (no support for FLAC, inability to stream to phones, etc). I am still hopeful that Spotify will come to the rescue, but in the meantime with a burgeoning music collection it was time for an alternative.

Enter Subsonic

When your music collection reaches 1GB+ it’s time to start running your own server. Setup with subsonic was a snap. Just download and install a simple program and you’re good to go. Subsonic handles dynamicDNS so you can access your music from a simple webpage (your-hostname.subsonic.org). Although the web client is pretty solid, there are apps for the iPhone, Android, and even Flash (eww).

Subsonic offers a couple neat features I hadn’t considered

  • Transcoding and conversion of audio on the fly for slower internet connections
  • The ability to easily share a track or entire album
  • Search that works (even for 200K+ songs)
  • Open source codebase for easy editing when things don’t work as you would like

If you’ve been thinking of ditching iTunes, Subsonic is a good place to start.

12 February, 2012

Silver white winters that melt into springs…

♪♪ …these are a few of my favorite things ♪♪

I’m a nut when it comes to tools and productivity. But lo! choose wisely, lest we become the tools of our tools.

Here is an abridged, alphabetical list of my favorites:

  • 1Password ($) - Quit using the same password for every service and never type a username into a browser again. I was skeptical at first but this program delivered. Bonus points for the awesome browser extensions and Dropbox integration.
  • Airfoil ($) - Play audio across any number of devices or machines, in sync. The company essentially reverse-engineered Airplay to make it work everywhere.
  • Alfred ($/free) - The lovechild between Quicksilver and the command line, this app is best way to perform tasks and launch applications on a Mac. Totally scriptable, totally awesome.
  • Audio Hijack Pro ($) - Record system audio and boost output from tiny speakers.
  • Better Touch Tool (free) - Keyboard and magic mouse shortcuts. Replaced Alt+tab for me when switching between applications.
  • Calibre (free) - eBook manager and must-have application for the Kindle. I also use it to manage the PDFs I’m currently reading.
  • Dropbox ($/free) - I hesitated to put this on the list because it seems so obvious. I keep everything in Dropbox – my home folder, emacs configurations, projects, taxes, and backups.
  • Emacs (free) - My operating system of choice. If you’re on a Mac, get this version.
  • Flux (free) - A perfect companion for night-owl coders, this app makes the color of your computer’s display adapt to the time of day (warm at night and like sunlight during the day).
  • Hazel ($) - Folder actions on steroids.
  • iTerm2 (free) - A better Terminal for the Mac.
  • NetNewsWire (free) - My RSS reader of choice. Tight integration with Google Reader and Instapaper.
  • RememberTheMilk ($/free) - My task manager du jour, particularly because it runs everywhere (browser, phone, emacs, email, alfred). I’m trying to make the switch to Asana, and have already moved my work projects, but still use RTM for everyday tasks.
  • SABnzbd (free) - If you’re on usenet you need this app. Lots of features and a built-in web interface.
  • Spotify ($/free) - Everything Napster should have been. I wish you could upload music like Lala, but in combination with a home music server (see the next entry) it means you’ll have tunes wherever you are. Be sure to get the Developer build for API integration.
  • Subsonic ($/free) - For the unwieldy music collection, this app streams your audio and video to any browser or phone. Setup is a snap and the API is nice.
  • Telephone ($) - If you’ve got Google Voice, this app will notify you (on the computer) when your phone is ringing. You can also answer the call and start talking. This app used to be free but I only see a paid version in the App Store.
  • TotalFinder ($) - Tabs, copy/paste, and more for the Finder. Sounds trivial but I wonder how I lived without it.
  • TotalTerminal (free) - Quake-style drop down terminal window. Hawt.
  • uTorrent (free) - A lightweight, no-nonsense BitTorrent client. The built-in web interface is a nice touch.
  • VLC (free) - Still the best media player out there. Probably has a codec for 8-track and betamax.
  • XQuartz (free) - A better version of the X window system, with keyboard shortcuts that don’t get in my way.
5 February, 2012

Cup a’ joe

After celebrating a couple years of not having to deal with the GridBagLayout, I’m dusting off the JVM to give Java another try. However, I’m not quite ready to leave Emacs for Eclipse (don’t mention the doppelgänger keyboard layout – it’s not the same).

Two features I miss from Eclipse are source code navigation and tight server integration. Especially when familiarizing yourself with a new codebase, jumping around within the source can be an excellent tool.

Back at Google I was a staunch defender of JDEE, but I’ll be the first to admit it isn’t so easy to get running. Coming to the rescue is malabar-mode, sporting:

  • Syntax highlighting (with compilation errors)

  • Movement commands (C-M-f/-b is a winner; so is M-f/-b, especially with c-subword-mode turned on)

  • Tight integration with Maven

  • Groovy console for rapid prototyping and exploratory programming

  • JUnit integration, both for running tests standalone and through Maven

  • Import help; import one class or all needed classes in the buffer (with prompting if the class name is ambiguous)

  • Extend class / implement interface / override method helpers

  • Simplistic refactorings

Sounds good! Setup was a snap on Emacs 23.3 (which comes already configured with CEDET). Emacs 24 also appeared to work but that is a topic for another day.

The other missing feature is integration with a Geronimo server. For that I had to roll my own. Copy this “ghelper” code to your PATH and it should be a litter easier to navigate starting, cleaning, and redeploying EBAs to the server.

#!/usr/bin/python

import argparse
import subprocess
import shlex

parser = argparse.ArgumentParser(description='Description of your program')
parser.add_argument('-s','--start', help='Start the Geronimo server', action='store_true')
parser.add_argument('-c','--clean', help='Clean the server', action='store_true')
parser.add_argument('-i','--install', help='Compile and install in the supplied directory',)
parser.add_argument('-d','--deploy', help='Deploy an EBA to the server')
parser.add_argument('-r','--redeploy', help='Re-deploy an EBA to the server')
parser.add_argument('-u','--undeploy', help='Un-deploy an EBA from the server')
args = vars(parser.parse_args())

def run_command(cmd):
    subprocess.call(cmd, shell=True)

if args.get('start'):
    run_command('geronimo3/bin/geronimo run --clean')
if args.get('clean'):
    run_command('rm -rf geronimo3/repository/application/* geronimo3/deploy/* geronimo3/hotbundles/*; cp geronimo3/var/config/config.xml.old geronimo3/var/config/config.xml')
elif args.get('install'):
    run_command('cd %s; mvn install' % args.get('install'))
elif args.get('deploy'):
    run_command('geronimo3/bin/deploy --user system --password manager deploy %s' % args.get('deploy'))
elif args.get('redeploy'):
    run_command('geronimo3/bin/deploy --user system --password manager redeploy %s' % args.get('redeploy'))
elif args.get('undeploy'):
    run_command('geronimo3/bin/deploy --user system --password manager undeploy %s' % args.get('redeploy')) 

With the passing of time comes better tools. While I’d rather pick Python any day, is is nice to be able to stay in Emacs world.

28 January, 2012

Always Summer Somewhere

Channeling my blog-fu I have joined Iron Blogger San Francisco, in which a dedicated posse of Bay Area bloggers commit to a post a week.

Inspired by fellow (audio) blogger Matt Earp (Kid Kameleon) and Dan Levine, I’ve decided to make this week’s post an aural experience.

Enjoy! It’s always summer somewhere…

22 January, 2012

A Game of Fees

“Winter is coming.” — Eddard Stark, discussing his Comcast bill

Comcast is the worst. They suck. They support SOPA. They are political bullies. They cap their speeds. They are the worst company in America…but I got to have my cat photos.

While I scramble to find a less evil internet service provider in Oakland, I might as well save some $$$ on fees (Comcast’s bread and butter). These rules apply to internet (Xfinity) service but could very well apply to voice and television service as well (I suggest you stop watching TV and dump your landline but those are posts for another day).

Buy your plan online

Comcast runs a number of online promotions that are not available by calling or visiting a service center (in fact, phone operators deny the discounts even exist!). The savings are real (my plan purchased online is 50% cheaper than the standard “Performance” package) and many of the deals are offered without a binding contract and can be cancelled at any time.

Never speak to or meet any representative of Comcast in person

To borrow a quote from Martin Lomasney,

“Never write if you can speak; never speak if you can nod; never nod if you can wink.”

Add to that: “never wink if you can self-install”.

Moving into an apartment you’re most likely to have a coaxial cable already sticking out of some wall. If you just built a new house or decided to pull a Thoreau, you may be out of luck in this department. I was told the cost of activating service, which involves waiting at home during a five hour block for a Comcast representative to do Something would run me $90. For homes with existing coaxial lines, this Something is more like Nothing.

For houses already wired, opt for the “Self-install kit” during online checkout but DO NOT PICK IT UP.

Do not have it mailed to you (a $15 fee)
Do not pick it up from the service center (a $10 fee)
Do not have a representative bring it to your home (a $90 fee)
Just forget that it exists.

The kit contains some instructions you don’t need, a cable splitter you don’t need, and a coaxial cable that (you guessed it) you don’t need. All you actually need is a cable modem, which brings me to my next point:

Buy your own cable modem

Comcast charges $7 per month to rent their sub-par cable modem. This can really add up for a service you’re likely to purchase for the rest of your natural life. Do yourself a favor and buy something DOCSIS 3.0 complaint (preferably used).

Another advantage to having your own modem is that you can activate your service immediately. After buying your plan online, plug your modem into the wall and try to access a web page. Comcast will route you to an automatic activation page that will have you online instantly.

If you already have a plan with Comcast, consider buying your own modem and return the rented appliance.

My fee free internet bill. No setup fees and a steep discount on Performance service.

15 January, 2012

Apprenticeship: Aligning Educational Incentives

Computer science education is a hot field, and rightly so. Even with the economy reeling, experienced computer scientists work two and three jobs to keep up with demand. According to the laws of Developernomics:

[T]he only thing potentially more valuable than a relationship with a great developer is a relationship with a survivalist who is good with things like guns, bunkers and cabins in woods

Barring a major catastrophe (and perhaps in spite of it), computer scientists will continue to demand a premium as technology reinvents entire sectors. No matter how staunchly opposed to a technological revolution, the realms of government, higher education, and even farming will eventually feel the touch of this steampunk Midas.

However, not everyone is on the same page with the importance of CS education. When founding NextStep Tech in 2009 to teach software engineering and entrepreneurship to middle- and high-school students, my co-founder and I pitched every educator, mentor, and parent in the NYC area who would listen. Surprisingly, many people didn’t “get” CS education. A principal actually suggested that the students might be better off studying Latin. Luckily, Robotics coaches got it. Math teachers got it. We did eventually find a foothold and have expanded classes to the San Francisco Bay Area as well as online via Skype. More importantly, we continue to invest in the students by helping them find jobs, internships, and summer programs.

Programs like NextStep are excellent for beginners and a new paradigm of educational platforms and programs are appearing, perhaps informed by the 10x effect in software engineering, that cater to professionals who want to hone their programming chops and become so good they can shed monikers like rock star and ninja. These “apprenticeship” programs are notable because they begin to properly align educational incentives. While traditional universities (and especially the creditors that make university attendance possible) have little motivation to see you gainfully employed post graduation, programs now offer to actively find you a job and get paid when you do. Similar models through which universities take an equity stake in students (via taxes applied after graduation) are being attempted in Europe and help ensure that graduates don’t move back in with their parents. This is not to say that universities have no incentive to get you a job. Many endowments are driven by graduate donations. The point I want to make is that the apprenticeship model better aligns the incentive to get you a job.

Riding the wave of aligned educational inventives are Hacker School (free), Code Academy ($6K/12 wks), and Dev Bootcamp ($12K/8 wks). While some of these courses are pricey, they each invest in students by helping with job placement. No doubt the educational space will continue to evolve as more courses and programs adopt these models. The learning spreads, incentives align, and everyone wins.

7 January, 2012

Deterministic Navigation, or, Learning from Vim

Recently I had the excellent opportunity to hang out and talk shop with Kyle Wild about the state of Computer Science, CS education, and software development environments. While the former are discussions for later posts, the latter will be part of a series elucidating the good parts of Emacs and Vim.

Parties on both sides of the holy war seem to get more distracted with partisan bickering than figuring out how to best get the code out of your head and into a computer. As an Emacs programmer, I’m interested in how I can incorporate the useful bits of Vim. Kyle, coming from the Vim world, wanted to more clearly understand the pros and cons of using one IDE over another before investing the time required to make the switch. However you currently code, I suggest looking over the shoulder of a friend using a different IDE – you’re bound to learn something.

While pair programming, I noticed one advantage Vim has inherently over Emacs: deterministic text navigation. Vim’s keystrokes unambiguously select where to move the cursor. For example, Vim has simple keystrokes to “move the cursor to the 3rd occurrence of the letter ‘s’”. I’d never seen this sort of manipulation in Emacs; the closest replacement is probably “search for the letter ‘s’. repeat three times”.

Even if Vim comes with this functionality “out of the box”, Emacs rises to the challenge with a powerful and extensible programming language, Elisp. Here is an implementation of Vim’s deterministic text movement:

(defun jump-to-next-char (c &optional count)
  "Jump forward or backward to a specific character.  With a
count, move that many copies of the character."
  (interactive "cchar: \np")
  (when (string= (string c) (buffer-substring (point) (+ 1 (point))))
    (setq count (+ 1 count)))
  (and
   (search-forward (string c) nil t count)
   (> count 0)
   (backward-char)))
(global-set-key (kbd "C-;") 'jump-to-next-char)

Now, the keystrokes “C-u 3 C-; s” will jump to the third ‘s’. Neato!

17 November, 2011

Gender Bias in NYC Salaries

Beatbeat recently released an article listing the 20 most hirable yet already employed developers and designers in the NYC area. Given the scarcity of tech talent on today’s market, these “poachable” employees were listed alongside a Ballpark Poachability Number (B.P.N.) that, as Foster Kamer explained, is “an index compiled from salaries known, either of The Poachables’ or those around them, and then from the kind of offer that could get them to budge; not what they’re paid, it’s what they could get paid. It’s basically a glorified, informed guesstimate.”

The intriguing part of the story is how much lower the “suggested retail” asking salaries are for women compared to men, even for jobs with the same titles and technical requirements.

I’ve compiled a chart of B.P.N. salary ranges by gender, excluding everyone asking for over $400K/yr (none of whom were women). The women listed have opening salaries that are roughly 40% less than the men. The average salary for the men is ~$170K, while women are listed at ~100K.

Although much of the science behind the B.P.N. is anecdotal, it is shocking to see such a wide salary gap for highly educated and hotly contested candidates, many of whom were asked directly what they would like to be paid. Did the women in the article report their current salaries when asked while the men offered inflated “desired” compensation? Is there an inherent skew in publicly available salary sites like Glassdoor? Would similar studies in other cities yield the same result?

For anyone who has yet to give it a read, I would suggest taking a look at Linda Babcock’s Women Don’t Ask to get a better understanding of the issues surrounding this topic.

17 August, 2011

The difference between Bangladesh and the USA

Bangladesh: A train or a bus is speeding away from a stop and attempts to board are likely to result in serious injury or death. The conductor on board holds out his hand and pulls you in.

USA: The train is due to depart at 14:10. It is 14:09 and your hero is on the platform alongside the train but the doors are closed. He runs desperately to the coach where the conductor has his door open, but then the train starts moving very slowly. No real risk of injury let alone death, but the conductor bars the way and your hero is unable to board.

– Jonathan Richmond

12 July, 2011

HTML5 badges for the masses

With over 500K apps, the App Store gets a lot of love from developers. HTML5 is also a popular buzzword. However, even with all the hype around HTML5, I was surprised to discover it is still lacking an App Store~esque banner.

I’m happy to announce the wait it over…

See it in action on Hunch Mobile.