RVM in TextMate 2

I use Ruby Version Manager (rvm) to manage the interpreters and gemsets for all of my projects. But the default install of TextMate 2 uses the system ruby interpreter for internal command execution as well as for external runs. Here is how to use your rvm environment for both. tl;dr: Set the TM_RUBY variable in preferences or your ~/.tm_properties file to the path returned by which rvm-auto-ruby and restart. That will set the internal runner.

Read on →

Back to TextMate 2

I spent the latter half of 2012 trying out new programmer’s editors, getting them set up the way I like and getting productive in them. This was no fly-by-night few-hour test, it was full-monty Rails development work for months. Lots of shell scripts, file manipulations, formats, different programming languages, different platforms, all my programming activities. I tried BBEdit for programming, and it is good. BBEdit remains my text editing and file manipulation tool of choice and I suspect it always will be.

Read on →

Hit by a Bus

What would happen to my clients and my products if I got hit by a bus? I answer this question in my Noverse (my company) blog in Hit by a Bus. Did I miss anything? Follow the author as @hiltmon on Twitter or @hiltmon on App.Net.

Priming the Pump

When it comes to stocks, priming the pump works like this: Release a very negative article on a stock, citing rumors and anonymous sources (none of which is verifiable). Wait for the stock price to drop because your readers trust your credibility. Buy loads of the stock cheaply at the new lower price. Wait for the next earnings report to prove you wrong (which you knew already). Profit. Despicable. Yet legal.

Read on →

Workable Social Network Connection Heuristics

I’m not sure how other people decide these things, but I have created my own heuristics as to whom I connect with on different social networks. In case you wish to blame me for your decisions — you’re welcome — here they are: Family and Friends: These are blood relatives, friends I see socially on a regular basis, and old friends from way back — basically the people who accept me for who I am and I can share my more embarrassing and private moments with.

Read on →

Ruby Tempfile Aggressive Unlink

I often use Ruby’s Tempfile class when generating files in Rails for download. But something went wrong in the Rails 3.2.11 update. Here is the code I normally use (as per the Tempfile documentation): ... begin temp = Tempfile.new(“temp-file-name.xlsx”) report = ReportClass.new(temp.path, params) report.generate send_file temp.path, :filename => “#{user_file_name}.xlsx", :type => "application/xlsx" ensure temp.close temp.unlink end ... In short, create a temp file, stream the data to it in the report class, then send the file to the user.

Read on →

Reprogramming my Brace Style Mind

Each and every programmer has their own style of coding, their own preferences for how code should look, and are generally happy to argue the case for their preference. Somehow these discussions became heated, and the most fights happen over spaces vs tabs (See Tabs versus Spaces: An Eternal Holy War. and Death to the Space Infidels!), the 80 column rule (See In defense of the 80-column rule) and brace indent style.

Read on →

The Entirety Of Information

I possess a device in my pocket that is capable of accessing the entirety of information known to man. I use it to look at pictures of cats and get in arguments with strangers. In answer to: If someone from the 1950s suddenly appeared today, what would be the most difficult thing to explain to them about life today? Source: @Bill_Gross

Assembly Notes

Assembly Notes are documentation that a programmer creates to record all the steps they go through when crafting an application, setting up a new server or configuring a new device. The idea is to log all the things they do and all the commands they type in so that they can reproduce the process again later. Assembly Notes are personal or project internal, not shared. I started writing these when I launched Noverse, and use them on all projects.

Read on →

1GHz Titanium PowerBook

It was about this time 10 years ago that I purchased my precious, a 1GHz Titanium Powerbook from a back street store in Akihabara (Electric Town) in Tokyo, Japan. I bought it based on a single viewing of another PowerBook because it ran UNIX with a GUI. Oh and it was thin and fast and beautiful. It surely is the best device I ever owned. I had been a Mac user in the early 1990’s, but, like most, I moved over to Windows for work.

Read on →