Wednesday, March 30, 2011

Quadcopter Tennis

People who said the computer will revolutionize everything are going to look so fucking quaint.

Friday, March 25, 2011

Awesome Fucking GitHub UI Hack

Hi Giles,

Here are two ways which should get rid of GH's activity feed:

- a user-defined stylesheet to set display:none on the feed's root element (
- a user-defined javascript, using defunkt/dotjs, to remove the feed from the DOM.

E.g. for the second way:

$ cat ~/.js/


Thursday, March 24, 2011

Why I Hate Social Software

Update: Andy Stewart hooked me up with an awesome solution.

I need to create a ticket in GitHub Issues, so I go to GitHub. Before I can search on my repos, I see the first item in my news feed - the feature I hate more than any other - and I discover that Rick Bradley has done something idiotic and funny, so I go to Twitter to tell everybody about it, where I discover endless replies to a tweet I made an hour ago. After several minutes on Twitter - the time-waster I fall victim to more than any other - I log out, try to remember what I was doing, and go to GitHub again.

Sorry to all my programmer peeps, if it hurts to hear that I hate seeing your latest activity on GitHub - but it's true. I absolutely fucking hate it. I especially hate following really prolific programmers on GitHub. You log in and it's just the same picture of one dude, repeated a thousand times, over and over, with little notes about what they did. I admire these prolific, extremely productive people, but you'd have to be one extraordinarily obsessive fanboy to want to see the same picture of the same dude repeated that many times.

Yes, Trotter Cashion is awesome. No, I don't need to see his face this many times. If I wanted to, I'd marry him, and I'd have a tough time doing it, because he already has a wife, and she's better-looking than I am.

So I just went to GitHub and unfollowed everybody I was following. I had a similar problem with e-mail, so much so that I created hacks and even a little startup to get around it. I also created Minimal GitHub Dashboard, a nice little mini-site with the GitHub API, so I could use GitHub without seeing the news feed.

In marketing, virtually nothing beats word of mouth, and the best way to generate word of mouth is to make your app a platform for communication. However, it's important to differentiate between features which exist for marketing purposes, in order to get every user to promote the app, and features which exist for purposes of usefulness. When it comes to time management, virtually every social feature which serves the purposes of marketing operates as a mixed blessing, at the absolute most generous, when it comes to purposes of usefulness.

Those of us prone to ADD and excessive socializing really benefit from apps which narrow our focus. For instance, I would gladly pay good money to turn the GitHub dashboard off, in fact, and if you consider that time is money, that's basically what I did. Unfortunately, Minimal GitHub Dashboard still lacks any authorization/authentication features, and I won't have time to add them today. If you want to boost your productivity, and share that productivity boost with me, and have some fun hacking on a Node.js app in the process, check out the source - it's on GitHub. Pull requests are very welcome.

Friday, March 11, 2011

Terrific Testimonial For (And Success Story Driven By) My "Handcuffs" Video On Self-Promotion

I bought the handcuffs video back in October. I've been working since then to improve my standing in the Ruby community and foster the Ruby community here -- organizing the Ruby-Milwaukee meetup, for example, and giving 3 presentations in various topics in December:
(mostly aimed at beginners, because, well, we have a lot of newbs in Milwaukee)

Right before Christmas I quit my job doing Drupal click-together-a-site stuff that was driving me crazy and not paying well (for lots of reasons, not really so much the Drupal stuff) and started hunting for a job in the Midwest. 

While I talked to companies in SF, none of them had a compelling product that I wanted to work on and who thought I was l33t enough. (A lot of companies want to compete on the basis of their competitive salary and foosball tables / RockBand setup.. one Lead Dev even stormed past the "this is what our app does" part and I had to stop and say "Wait a second, I just spent 24 hours doing research on your company to figure out why I'm passionate about your product.." and he said point-blank they were not looking for people that are passionate about their product, just good at Ruby, OOP, and Rails. But all the SF stuff is besides the point because I'm not going there.)

The Midwest is crappy in terms of jobs right now. Everyone I know that doesn't know how to code is unemployed, because even the coffee shops are hard to get a gig at. There's very few startups, and some big, high-stress high-turnaround financial/trading shops in Chicago, but that's not what I wanted to be doing. I eventually got in touch with two shops, both using Rails, that are just past their "startup" phase (entering profitable stage.) One's a startup, one's a consulting firm. They're having an even harder time finding folks that know Ruby and related technologies, because of the great gravity well that is SF calling out to everyone with a clue. So both of these shops wanted a "trial" period where I built a small project for them. I was able to negotiate a higher hourly rate than I've ever had, arrange the startup to get me pair-programming time with a shop that employs two Rails committers (as this shop had built the app initially), pay for all my transit to/from the cities they're in (since they're not in Milwaukee), remote working arrangements, and both are paying me as a contractor for this trial period, which means I'm making good money...

[important note: Matt e-mailed me with a followup. he hadn't been working with Rails committers! he'd been working with people who'd written popular plugins]

I'm now having companies compete to have me rather than me competing for jobs. That's a huge difference in the finding-a-job experience, and it's because I watched your video like 7 times and kept referring to it.

Matt Gauger, Redbull-addled, who should be quitting caffeine like you. The grammar nazi in my brain thinks I should proofread this and Redbull says to send it already, so I'm sending it.


You made good on a lot of the promises of the video, including two kickass jobs, working from home, and working with the stars of my community. And it was a really controversial decision for me to quit my FT job right before Christmas, but it paid off in the attention I could give each interview and prepare for them. Also spend whole days traveling by bus/train to another city to meet teams in person.

You should buy this video - it's awesome - or learn more about it.

Buy Now

Better Code Weight Bash One-Liner For Rails Apps

function heftiest {
  for file in $(find app/$1/**/*.rb -type f); do wc -l $file ; done  | sort -r | head

[jamesgolick@James-Golicks-MacBook-Pro arbitrary_project (master)]$ heftiest models
     368 app/models/penguin/walrus.rb
      98 app/models/penguin/orca.rb
      91 app/models/wombat/chihuahua.rb
      71 app/models/pokemon/pikachu.rb
      69 app/models/wombat/savage.rb
      69 app/models/melt_banana/its_in_the_pillcase.rb
      61 app/models/foo/bar.rb
      41 app/models/fake/model_name.rb
      31 app/models/fake/other_model_name.rb
      31 app/models/pokemon/charmander.rb

By James Golick, who appears to be working on a very peculiar project at the moment.

Update: Eric Davis wrote a similar blog post not long ago.

DJing With Magic Gigantor Transparent iPad-esque Awesome Thing

Information Diet Hack: iCal Obsession Technique

Nearly all my negative tweets trace back to reading Hacker News. I need to improve my information diet, and many other people do too.

Feature film producer, screenwriter, and actor Tom Malloy put out a series of CDs on raising funds for feature films, and in them includes a wonderful information diet hack. When raising money for a film, he sets up three "appointments" per day. The appointments are actually just statements along the lines of "you are going to raise $5,238,005 for your film" (or whatever amount his budget requires). Then he sets his phone to give him alerts for each of these "appointments," and the same device which distracts so many others from their goals keeps him on track to achieve his.

You can repurpose this technique for any type of goal, obviously.

Thursday, March 10, 2011

iPad Workflow Improvements

I work on my iPad whenever possible (basically with the exception of dev and Skype), and I've seen a bunch of improvements.

First, it's absurdly easy to walk around working when you're working on an iPad. It's a walking desk without the desk part. Second, it motivated me to add a ton of Gmail filters, to keep the e-mail reading experience pristine. Third, I deleted Twitter from my iPad, so I have to go over to my standing desk to go on Twitter. Adding that tiny bit of friction reduces the time spent babbling to a manageable level.

Another thing I really like is reading code while on public transportation. It used to be that every minute I spent in traffic added negative stress; every minute I spend in traffic now is productive, because somebody else is driving, and I'm reading, writing e-mail, working on spreadsheets, or planning and outlining. (I have video games on there too, but on the whole it's a very productive experience.)

Also, I do sometimes use my iPod for Skype and my iPad for dev. I've detailed my iPad dev setup elsewhere; basically it's a ssh client, vim, and a tiny vimrc/terminfo hack which makes the Tab key act as an Escape key in vim. I also read code using an app called Source Code.

Monday, March 7, 2011

Use wc -l For Quick Overviews Of New Rails Projects

Update: James Golick made this code better.

It's your first day with a new code base. You're going to need to know which are the biggest files, which are the smallest, and how the sizes are distributed.

for MODEL in `ls app/models/`; do echo $MODEL; wc -l app/models/$MODEL; done

for CONTROLLER in `ls app/controllers/`; do echo $CONTROLLER; wc -l app/controllers/$CONTROLLER; done

for VIEW_DIR in `ls app/views/`; do for VIEW in `ls app/views/$VIEW_DIR`; do echo $VIEW_DIR $VIEW; wc -l app/views/$VIEW_DIR/$VIEW ; done; done

wc stands for "word count"; wc -l gives you the number of lines in a file. (The "l" stands for "line.")

Pricing: Be Aware Of Irrationality

I've been investigating replacing my phone with Skype. I found their per-minute rates amazing but balked on their rate to reserve a phone number. The irony: their rate to reserve a phone number is way lower than I'm currently paying, but so much higher than their per-minute rate that I decided it was a deal-breaker. I'm now reconsidering.

(Read Predictably Irrational.)

Sunday, March 6, 2011

Robot Pets Looking For Work

Programmers are difficult to hire, so much so that for a sufficiently skilled programmer/entrepreneur, it is actually more cost-effective to write a programmer than it is to hire one. I have written a few programmers in Ruby, JavaScript, and Lisp. They are not very imaginative, and each one only has a very small, specific set of skills, but thanks to the magic of forking processes and VPS hosts, each one can work on an effectively infinite number of projects simultaneously.

My robot programmers are essentially janitors.

If you have legacy code in either JavaScript or Ruby, you should contact me. My robots can already do a variety of small, useful tasks, and when they achieve a broader, more powerful range of skills, they're going to become significantly more expensive.

Video: Node.js And Sibilant Lisp

Kicking around the idea of a product along these lines. Please hit me up on Twitter or via email if you're interested. Curious what people want to learn. Very seriously considering a video series over just one video.

Saturday, March 5, 2011

I May Let Hacker Newspaper Die

Update: I fixed Hacker Newspaper, but I'm looking for somebody to take it over, so I can stop reading it.

Apologies, but I think my life's improved in every way ever since I stopped reading Hacker News. It's too typographically naive to read without my reformatter, they change their RSS implementation too often, and I think I'm just going to say fuck it, because, last but not least, the content's just completely deteriorated in quality (not that this is any kind of surprise). However, I did get a fix e-mailed to me, so I'm going to look at that tomorrow, and if it's easy, I'll just bring the site back online, but stop reading it personally.

Tuesday, March 1, 2011

How To Set Up Vim To Work Well via iSSH

iSSH is of course an awesome ssh client which runs on iPad. Pair it with a Bluetooth keyboard and some kind of stand and you've got the ability to do all kinds of hacking on a remote server via your iPad. But if you use vim, you've got a challenge: Apple does not give developers access to the Escape key on the Bluetooth keyboard, according to the iSSH developer. Or, to put it another way, Apple hates vim for no reason.

iSSH includes an "Esc" key on-screen, but hitting the screen like that is lame, and, in the case of a sufficiently flimsy iPad stand, will cause your iPad to fall over. There's a much better way.

First, go into your connection configuration in iSSH, hit "Advanced," and set your term string to "xterm-ipad."

Next, copy /etc/terminfo/x/xterm to /etc/terminfo/x/xterm-ipad. This lets the server know that it can communicate with iSSH like a normal ssh session.

Then add this to your .vimrc:

  3 if &term == "xterm-ipad"
4 nnoremap <Tab> <Esc>
5 vnoremap <Tab> <Esc>gV
6 onoremap <Tab> <Esc>
7 inoremap <Tab> <Esc>`^
8 inoremap <Leader><Tab> <Tab>
9 endif

Big thanks to Alf Mikula and Doug McInnes for showing me how to fix this. The only thing to watch out for with this solution is that it doesn't break tab-completion. So if you do:

:r filena

And press Tab, you'll get :r filename. And if you keep hitting Tab, you keep getting tab-completion. So it's kind of a Tab dead zone, but beyond that caveat, it works beautifully.