Posts

Ruby Kaigi 2010 Day 3

Image
Last day of Ruby Kaigi! Sad to see it go, it's been a great conference. As per usual Tweets are in bulleted italics and the rest is after the fact commentary. First I've got to show you the commemorative fans they were handing out: It's Matz and... Someone else (sorry if it's obvious - I don't know). And of course they are programing in the bath. BigDecimal: You can handle numbers as large as can fit into memory as opposed to the IEEE double #rubykaigi BigMath is the Math module for BigDecimal #rubykaigi Lots of different rounding modes in BigDecimal #rubykaigi BigDecimal.mode is global per process - not thread safe #rubykaigi So BigDecimal is Fiber unsafe #rubykaigi Bummer. .@mrkn implemented a solution storing mode in thread local #rubykaigi Oh good. Wait, is that in 1.9.2 or trunk. I'd have to be in 1.9.2 right? To the Google! ... Yep, seems like it made it in: http://redmine.ruby-lang.org/issues/show/3285 You can now change modes in a block (added to trunk...

Ruby Kaigi 2010 Day 2

Image
Holy crap am I tired. It's been a long awesome day. It started out with some excitement: Just found out I have an hour time slot when all I prepared was 30 minutes. Ok, time to write some more. #rubykaigi Panic! Maybe I'll talk about metric_fu a bit. #rubykaigi I must have looked at that schedule 20 times and never realized that I had an hour slot. Everyone else had 30 minutes so I thought I did too. Attendees of "The Importance and Implementation of Speedy Tests" will also get "Metrics Based Refactoring" at no additional cost! #rubykaigi I did something I almost never do: Look at crisis as an opportunity (crisi-tunity). I had to write "Metrics Based Refactoring" anyway for Windy City Rails so why not write it now. In less than 4 hours. While watching my friends present at a conference. Looking over those sentences now I can't believe I didn't freak out. Ted Han used publicly available data to settle reviewing bais accusations agains...

Ruby Kaigi 2010 Day 1

Image
Here I am in Japan at RubyKaigi 2010. Wow. Generally I tweet a lot about the conf live and then publish those tweets here (in italics) and provide slightly more commentary. So lets get it on. So my flight leaves at noon for #rubykaigi, takes 13 hours, and arrives at 3pm tomorrow... Wait -- that can't be right. #looksitupagain Before today's trip to Japan the furthest from the U.S.A. I've ever been is: Canada. #howisthatpossible In cab. It has begun. Someone once said "If you've never missed a flight you're spending too much time in airports" #atgate2hoursearly Yep - can you feel the panic in those first couple of tweets? I was totally freaked out. The actual trip turned out to be easy. I met up with Chad Fowler, Yehuda, and Woody at the airport and we took a bus straight to Tsukuba. I went to an exotic foreign land and the first thing I did was take a bus through 100 minutes of strip malls. But I was in Japan. And Yehuda held forth on 'snowmen...

Using Git Inside a Git Hook

Using Git Inside a Git Hook can cause problems. In my previous post: " Signal 13 Problems with Git Hooks " I describe how we are trying to automatically merge certain types of branches into a branch that is designed to hold them all. Anyway, that means we want to run some git commands inside of the git hook. We change dirs into another directory where we have a clone of the repo and start telling git to merge some stuff and we get a bunch of remote: fatal: Not a git repository: '.' But if we run the exact same commands as the git user everything works fine. Huh. Eventually we got our linux guru over and he noticed that the environment under which the git user runs is totally different when inside a hook. Gitolite does a bunch of things to the env, but the one that was screwing us up was the setting of the GIT_DIR. After we figured that out, the solution was as easy as: ENV.delete 'GIT_DIR' in our ruby script that is triggered by the 'post-receive...

Signal 13 Problems with Git Hooks

Ran into a gotcha in Git today when trying to write a post push hook. We want our designer to have a fast turn around time with clients so we're writing some hooks to merge all of the 'theme' branches he works with to get merged into a special preview branch which is then deployed to the preview site. And all this should happen after he does a 'git push.' Seems like a 'post-receive' hook is just what we want. Except that every time we tried to create one we got these errors on a push: error: git-shell died of signal 13 fatal: The remote end hung up unexpectedly error: error in sideband demultiplexer If the 'post-receive' file even existed in git_dir/hooks/ on the git repo box, we got this error. We checked permissions, gitolite docs, git docs, google, etc and no help. We finally realized that Git was piping in some information to our 'post-receive' file and since we were not consuming it, that was causing the explosion. So, I present to...

The Road to Ruby Midwest

Crazy day: It was the day before Ruby Midwest so I gave my 'Speedy Tests' talk to my workmates at Backstop Solutions during lunch today and they had the nerve to find some things wrong with it -- so I'll be doing some re-tooling before Saturday. Then I was all set to leave 2 hours early for the airport when my manager wants to talk about me helping QA understand our process, new features, and maybe get some automated tests running. Hell to the yeah. So I'm all over this opportunity but our conversation makes me leave the office a bit late to catch my flight. No problem, I build in a lot of buffer. Then the Blue line (Chicago's subway) was down. Uh oh. Some surly dude said there was a free shuttle to somewhere else but I couldn't find it so I took a cab. Crazy traffic puts me at the airport with 30 min until my flight. Panic! But the security lines are longish so I panic while inching forward in a zig-zag line. Then I sprint to terminal C (which is t...

Rails Conf 2010 Day 3

A few days late on this because I've been sick all weekend. There just has to be a way to do climate control in conference centers in such a way as to not destroy the planet and, more importantly, Jake's health. I seriously wore black jeans and 2 shirts on hot summer days and yet I was shivering and caught a cold. But let's get to last day of Rails Conf 2010 and my exciting adventures therein. (tweets are in italics ) Woke to "Relax" by Frankie Goes to Hollywood. Which is good 'cause my heart was pounding. Settled it with some bacon. #railsconf Yep, I could feel cold coming but I was in denial. I ran into Neal Ford at breakfast and we chit chatted about this and that and then he mentioned that he had read my blog post from yesterday. First thought: I published that sucker at 1am this morning and he's read it already? Second thought: Oh shit, what did I say about his keynote -- I think I called him a jerk at some point. But my brain was foggy and so...