Larry Wall, creator of the Perl programming language, offers the following “three great virtues” of a programmer:
Laziness
The quality that makes you go to great effort to reduce overall energy expenditure. It makes you write labor-saving programs that other people will find useful, and document what you wrote so you don’t have to answer so many questions about it. Hence, the first great virtue of a programmer. See also impatience and hubris.
Must everything get worse as it gets old? Is plann…
Must everything get worse as it gets old? Is planned obsolescence the law of the land? As a hacker with a 5 year old laptop, it’s easy to look at those with fancy new models with more than a little envy. However, I enjoy my current computer. Sure the battery life isn’t the greatest, but the only time I truly get hot and bothered is when my machine also gets hot and bothered — and throttled — severely liming the CPU and making your machine crawl.
The (Almost) Perfect HoloLens Development Environment
In true Microsoft fashion, the HoloLens is an incredibly interesting piece of technology that is hamstrung by a thick layer of jank smeared over the device and development process, especially for those on a Mac. After shaving numerous yaks that I thought I would never have to revisit (DirectX drivers? Really Microsoft??), here’s a relatively sane tutorial on getting your HoloLens environment and emulator up and running.
This “modern fairy tale” from Xerox Films explores various advances in electronic music, circa 1972, as two enterprising musicians construct increasingly elaborate instruments to compete for the favor of a beautiful lady. The piece explores the various technologies behind the theremin, amplifiers, musique concrete, synthesizers, and multi-track recording. The twist ending is particularly prognostic of modern times.
The film is animated by Stephen Bosustow, who is also responsible for Mr. Magoo, the excellent Freedom River (1972, narrated by Orson Welles) and The Legend of Sleepy Hollow (1972, with the voice of John Carradine).
When deploying pet projects on remote servers, I dislike the extra step of logging into the remote machine to execute a git pull (and perhaps a server reload) every time I push new code. Sure there’s Jenkins and all sorts of bazooka-like solutions, but this is a knife fight. Poking around an old PHP repo, I found a nifty line of code that will update your app via a URL endpoint.
Deep within the brain of a developer, nestled between the gentle folds of the nucleus accumbens, lives a strong and primitive craving for automation. The concept of a function, f(x)=y, and likely algebra itself induces this region of the brain to release a powerful, pleasurable burst of dopamine.
It is from this area of the brain that Grunt, the automation system extraordinaire, was born. Grunt saves you the effort of running repetitive tasks such as concatenation, minification, translation (LESS -> CSS), testing, deployment, code linting, and more. It’s a bit like a Makefile with a bunch of community-contributed bells and whistles written in JavaScript.
The Southwest Airlines boarding process has a rich and colorful history. Bucking the industry standard of providing assigned seats in different cabins, Southwest has historically offered an “open seating” policy that favors an assigned boarding order to determine who is first to enter the plane and choose a seat. Beginning 24 hours before a flight’s departure, passengers are arranged into groups (A1-A60, B1-B60, and C1-?) according to a formula determined by Southwest:
Reloading modules in Node.js can be a bit tricky. After initially importing a module, subsequent calls to require have no effect. Looking for something along the lines of Python’s reload command I’ve arrived at this solution that allows modules to be reloaded (as well as imported the first time) with the following require.reload command.
// Import a module
varmymodule=require('./mymodule')
// After making some changes to the module, reload it
mymodule=require.reload('./mymodule')
Reloading is accomplished by searching the cache for a specific module using require.searchCache and removing that module and its children with require.uncache. The real heavy lifting is done by the call to delete require.cache[mod.id]. Below is the script for starting a modified repl that includes the additional require commands by default.
While creating Yet Another Choose Your Own Adventure I took a detour into the world of computer-generated voices. As Chris Maury noted in his post, the quality of algorithmically generated voices is improving and I wanted to learn more about the state of the industry.
Pop quiz! Think of a computer generated voice you heard recently. Apple’s Siri? Portal’s GLaDOS? The Mac OS say command?
While GLaDOS was created by an actual human, say and Siri both have their roots in a company called Nuance which merged with Kurzweil’s ScanSoft in 2005. Apple acquired Nuance in 2012 and renamed one of the voices, Samantha, to Siri. You can hear more sample voices from Nuance and the general quality is quite good. I didn’t want to pick Siri as the Choose Your Own Adventure voice because she has become a bit too cliché. Commercial applications were either prohibitively expensive or lacked the proper API for a weekend hack so I dug into some of the research communities around text-to-speech (TTS) to find open source solutions.
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.
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.
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.
Of all the 90’s sitcoms, there will always be a soft spot in my heart for Home Improvement. No, it wasn’t because of a crush on Pamela Anderson or JTT. Deep down I’m a tools guy.
There are all manner of tools and gizmos I’ve found useful for Getting Things Done. In another era I might have been a blacksmith or a disciple of Zhu Shijie. In this life, software is my trade and the bit is my bread and butter. I used to be an avid reader of Lifehacker and Mind Hacks before discovering it was much more rewarding to surround myself with reallygreatpeople in the industry.
Benjamin Gleitzman is a technologist, artist, and founder.
He is the CTO at Replicant AI. He is also a founder of the hacker collective Ruse Laboratories, creator of the The Algorithm Auction, originator of Pup's Pool Party, and producer at Sublimate NYC.
Gleitzman was a visiting researcher at Google Research in Mountain View, California where he built App Inventor for Android, a graphical programming language for creating Android phone applications that is now at the core of the MIT Center for Mobile Learning.
He is the founder of NextStep Tech, an organization teaching software engineering, creative thinking, and entrepreneurship to junior and high school students.
In his spare time he enjoys creating electronic music, discussing programming concepts, and playing WikiMaze, his remake of Encarta 95's classic trivia game.
He also posts useful bits of knowledge on gleitzman.com.