Technology resolutions for the New Year

by john on December 30, 2011

I know most people make resolutions to lose weight, to have a sunnier disposition, to not kill kittens, etc., but I think this year some technology resolutions are appropriate.

To wit . . . in no particular order. My goal is to accomplish 5 after the first one (which is mandatory!).

  • Do my part to ensure the ongoing awesomeness of Iora Health’s technology!
  1. Attend at least one European technology conference, and/or a medical technology conference.
  2. Don’t do any non-Iora contracting or proprietary development for friends or former colleagues, no matter how interesting the project is; only open source, which should emerge from Iora. I’ll allow a couple of projects to be grandfathered-in to a small extent, but that’s it.
  3. Freshen at least one legacy project with guidance from Working Effectively with Legacy Code.
  4. Present at a Ruby conference.
  5. Don’t let myself or others build in excess of the story.
  6. Be more persuasive in opposition when I observe myself or others using APIs and/or techniques that are costly (in time or money) or inappropriate. I went down the rabbit hole a bit this year with Google Calendar integration, against my better judgement.
  7. Tighten up my Linux/OS/X and vim dotfiles. I’ve never used a pre-fab dotfiles and have my own, but it’s time to look over what’s out there and integrate some new features. Bonus: Stop using the arrow keys in vim. Use standard vim movement bindings instead.
  8. Sharpen up my Scheme. Be able to write the major combinators without consulting an authority.
  9. Cover more “hard cases” for BDD. I allowed too many specs to be more shallow than I know is proper.
  10. Think about how I can productively contribute to hacktivism and/or “digital humanities” — I have a lot of latent knowledge and experience in this area, and it’s time to revive it. Why should the kids have all the fun?

{ 0 comments }

ZOMG! Windows!

by john on December 17, 2011

I haven’t touched a Windows computer in many years. OK, I have a virtual machine with XP installed, but it’s a clean install with no cruft and I basically only use it to verify browser stuff.

My dad, though, has two Windows computers, a laptop and a desktop, both running XP from, oh, six years ago. It is like the dark ages. In our house he needs to use wifi. That means that for his desktop, he needs to use a wireless USB adapter.

Among other things, you can’t just plug it in and expect it to work: You have to install with a CDROM. That’s WORNG #1.

Then you get this funky configuration screen just for that adapter, and it supplants your normal Windows settings. WORNG #2.

Then it belabors everything. The scan for SSID’s is amazingly slow. Then when you pick your network, it wants to show you every damn setting, and exposes the fact that it’s WPA, etc. A nightmare. WORNG #3.

Then it is so to get itself established after a reboot. WORNG #4.

So it’s just garbage. I guess I should count my blessings that I could but a device “Certified for Windows 7″ and see that it works on XP.

Meanwhile . . . email. Outlook Express, ZOMG!!

{ 0 comments }

ASUS AiGuru SV1T Skype VideoPhone – Worst consumer electronics product of 2011 (and 2010 and maybe 2009)

December 14, 2011

But it seemed like such a good idea at the time,
such a very very good idea at the time.

– The Darkness

I’ve used a lot of awful consumer electronics products, but the ASUS AiGuru SV1T wins the “Worst Consumer Electronics Product of 2011″ Award. Oh, wait, you could buy one in 2010; maybe even in 2009. [...]

Read the full article →

Correlate time zone abbreviations with time zone names

November 7, 2011

There has got to be any easier way.

require ‘rubygems’
require ‘tzinfo’
require ‘active_support’
require ‘active_support/values/time_zone’

time_zone_names = [ 'Eastern Time (US & Canada)', 'Central Time (US & Canada)', 'Paris' ]
abbrev_to_zone = time_zone_names.inject({}) do |map, name|
map[ActiveSupport::TimeZone.find_tzinfo(name).current_period.abbreviation.to_s] = name; map
end

p Time.now.zone
p abbrev_to_zone[Time.now.zone]
p abbrev_to_zone['CET']

Read the full article →

Rails 3.0 to 3.1 gotcha: Changed ActiveSupport::JSON.backend

October 6, 2011

Ow.
In Rails 3.0, the default ActiveSupport::JSON backend is YAML.
In Rails 3.1, it’s YAJL.
They deserialize JSON times differently. In 3.0 . . .

ruby-1.9.2-p290 :001 > ActiveSupport::JSON.decode( ‘{"at": "2011-10-13T12:00:00+00:00"}’ )
=> {"at"=>2011-10-13 07:00:00 -0500}

See the lack of quotation marks around what “at” points to? It’s not a String. YAML converts the value to an actual DateTime. [...]

Read the full article →

RSpec and let

October 2, 2011

So here’s a good one. We had a spec that looked something like this:

require ‘time’

class SomeModel
def self.all
@all ||= []
end
def self.create!(time)
all << new
end
end

describe "surprise" do
subject { SomeModel }
let!(:now) { Time.now }
['9 AM', '10 AM', '11 [...]

Read the full article →

Comcast drives me nuts

September 28, 2011

At the beginning of the summer, I had numerous reboots of my cable modem. Typically this would happen when I was making heavy use of the network. It could happen 5 times an hour. Of course I called Comcast. They had a lot of suggestions: Let’s re-flash your modem; upgrade the software on your router; [...]

Read the full article →

US Airways Mastercard error message

September 26, 2011

One of the worse credit card sites on the Internet. How ’bout this? I would guess that “1-1027″ is an error number you report to an operator, rather than a suggested value range.

Read the full article →

Best way to test Ruby class methods?

September 7, 2011

Let’s say that we have a Ruby object with some class methods. In my case, we want to be able to inject a driver at the class level that all instances will use:

class Mod::Thingy
def self.driver
end
def self.driver=(d)
end
end

And let’s say that .driver has a default value. So the class [...]

Read the full article →

Spying on Ruby’s Net::HTTP

August 4, 2011

I’ve heard two people complain that they can’t see OAuth HTTP behavior and get unexpected 401s. If you want to see what’s going on at the transport level, here’s a monkeypatch (depends on ActiveSupport for the alias_method_chain) just for you:

class Net::HTTP

def initialize_with_debug(*args, &block)
initialize_without_debug(*args, &block)
set_debug_output $stderr
[...]

Read the full article →