Posts

Showing posts from September, 2008

Nail the Small Stuff

I was talking to a friend of mine the other day and he mentioned that his wife had been turned down for some dentistry that she needed performed. It turned out he had been paying for family dental coverage but his company had only signed him up for single. Once the mistake was realized, his company corrected the error. He might have to re-fill out some forms, and her surgery will be delayed, but all will be put right. I mean it was a simple mistake, how could he possibly hold it against them? You can spend lots of dollars on big gestures , perks, and what-not but it can all be wiped away by a bit of faltering on the basics. People need to know that the ground beneath their feet is solid -- That they can trust the people who employee them to take care of certain details. When that trust is shaken they start asking themselves questions about other things. It reminds me of Maslow's hierarchy of needs : Maslow's hierarchy of needs is often depicted as a pyramid consisting of f...

Sunday Nights

I used to be a High School physics teacher and so people often ask me why I left teaching and to become a programmer. You'll get a different answer from me every day you ask that question, but today's answer is Sunday nights. When you find yourself picking fights with your wife, kicking the cat, and generally needing a few drinks every Sunday night it's because you know there's a week of pain coming. This pain may or may not materialize but there's a fair percentage that it will. Once, when I was a teacher, I had a 6'3'' football player in my class who would sometimes take to getting up and screaming at me. One time, after an altercation about talking in class had turned into a huge blow up, he pushed past me on his way out of the room. Now getting knocked aside by someone who could probably kill me in a fight wasn't a daily occurrence in teaching, but that's not the point. The point is that after that day it was always a possibility in my ...

Different Ways of Installing Metric Fu

Something I didn't mention when I announced the re-launch of metric_fu as a gem is that now, because it's a gem, you have more options when installing it in your project. First option: Vendor Everything . Lots of people are big fans of unpacking gems into the vendor directory of their Rails project (or a similar folder in a non-Rails project) so that everyone who checks out the code gets the right version of the gem. You can then require it in your Rakefile like this: require 'vendor/gems/jscruggs-metric_fu-0.7.6/lib/metric_fu' However... Second option: Conditionally require the gem. When I announced metric_fu back in April, a lot of commentors bemoaned the fact that they would have to install something into their production code that wasn't really necessary for production. I don't really mind doing this as metric_fu does not modify any classes: It's mostly just a bunch of Rake tasks (and some report building code). However, I see their point. So if...

Stop your Mac from going to Sleep with Caffeine

I recently discovered Caffeine for the Mac and it's pretty cool. When I'm giving presentations, listening to streaming audio, or performing some operation where I don't want my mac laptop going to sleep I could mess with the system preferences... Or I could click on a friendly little coffee cup to tell my computer to stay awake. When the coffee cup is full, my computer won't go to sleep or activate the screen saver. Empty coffee cup means my normal preferences are in control. Nice! Many thanks to Todd Webb , for pointing this out to me.

Windy City Rails Part Two

Yesterday , I talked about the first half of the first ever Windy City Rails conference that happened on Saturday at IIT. Tonight, I'll pick up where I left off with my summary of the presentations I attended. Virtualization and Elastic Servers -- Yan Pritzker of CohesiveFT The gist of this talk is that the Rails stack is not well known so why not let CohesiveFT handle deployment for you. It's a virtualization factory, that lets you put together a custom Rails stack and they can deploy and maintain it for you for as little as 10-15 bucks a month. Also, he pointed out that virtualization is a solution for your front end guys getting a working version. Which, having tried to get many a design person's computer up and running, I think is a pretty cool idea. Ten Things I Hate About Web Apps by Micah Martin Short list of things Micah hates about Web Apps: You need to know css, html, js, and the actual programing language just to get started. Html -- only 3 fonts to chose fr...

Windy City Rails Part One

This weekend was the first ever Windy City Rails Conference and I was lucky enough to not only attend but also to speak. I thought I'd sum up the talks I attended in case anyone was interested. After Ray Hightower, lead organizer of the conference, welcomed everyone Ryan Platte gave the first talk of the day: "Outside the sweet spot" Ryan's talk was about getting Ruby and or Rails into a large organization which is committed to things like: Windows, Oracle, etc. I.E. not the typical Rails stack. In Ryan's experience, Rails makes it's way into such an organization the following way: Some guy picks up a Rails book and says "Hey, this is way better than the excel spreadsheet we've been using." Then he talks one boss into the project, and maybe they hire some consultants to help. However the rest of the organization has issues with Rails (it's slow, not compatible with their stack). Ryan's advice is: Do top quality work quickly -- get ...

Metric Fu is Now a Gem

Image
I just released version 0.7.6 of metric_fu and there's all sorts of new stuff: First, MetricFu is now a Ruby gem on GitHub at: http://github.com/jscruggs/metric_fu Also, the Flog task can now flog any set of directories you like. Just put this into your Rakefile: MetricFu::DIRECTORIES_TO_FLOG = ['cms/app', 'cms/lib'] And, the Flog reports are much nicer: The Flog report generator now looks at a MD5 hash of the files its examining to determine if they files need to be re-Flogged -- which saves time. The Saikuro report generator can also look at custom directories like so: MetricFu::SAIKURO_OPTIONS = {"--input_directory" => '"cms/app | cms/lib"'} MetricFu started its life as a Rails Plugin, but I'm trying to turn it into a flexible gem that can be used in any Ruby application (but still have defaults that enable easy use in a Rails project). Eventually I'd like to create something that could tell you about methods that have hig...

Lone Star Ruby Conf Second Day (morning edition)

While checking out at the hotel I ran into Coby from confreaks.com They are recording the conference so you'll be able to see the talks online sometime soon. They're not cheap, but their videos are very good (they capture the output of the presenters computer and display it side by side with video of the presentation -- you seriously need to check out their site), and they offer a discount if the conference is willing to CreativeCommons license the talks. Starting off the morning was "Ruby: A Year of Innovation" with Gregg Pollack & Jason Seifer. They had a lot to cover so it went pretty fast. I tried to keep up as best I could. Jason Seifer was up first: HPricot - awesome for scraping websites Juggernaut - server push with rails -- keeps a connection open Ambition - write your SQL statements in Ruby Prawn - Ruby based PDF generation Capistrano Ruby VMs roo - spreadsheets Excel, google docs Dtrace and Ruby -- memory stack live Skynet - map reduce for Ruby Data...

Lone Star Ruby Conf First Day

(or the second day if you count the tutorials) To start things off Jim Freeze got up and announced that there are 282 attendees and seats for 280 -- So make friends. The the first talk of the day was "The Next Ruby" by Bruce Williams and he (of course) discussed the difference between Ruby 1.8.6 and 1.9 Bruce recommended a good test suite if you're planning to move to 1.9 and I have to agree. Tests are good for lots of reasons (including design) but they pay for themselves 100 times over when you need to do a big tech migration. Because of changes to string, anything string heavy (such as parsers) is gonna need some love. On the plus side: "ruby"[0] => 114 in Ruby 1.8.6 "ruby"[0] => "r" in Ruby 1.9 Yep, I've been burned by that and I'm glad to see sanity carry the day. In other news: Hash.select now returns a hash Hashes will maintain order :this === "this" #true Because of Multinationalization Strings now have each...

Training Day at Lone Star Ruby Conf

First, I'd to extend a big thanks to Joe and Jim for giving me a ride to the conference today. The two tutorials I decided to attend today were: "The Advanced ActiveRecord Workshop" with Gregg Pollack & Jason Seifer (the Rails Envy Guys) and "The Ins and Outs of Ruby I/O" with James Edward Gray II and Gregory Brown. Both of which were excellent. The Advanced ActiveRecord Workshop covered: Loading large data sets (the 'ar-extensions' gem helps lots). A gentle reminder to properly index your freakin' database. How Rails optimizes multiple :includes in finds and how that goes to hell if you combine lots of :includes with :conditions The super awesome Named Scopes (which you need to look up right now, if you haven't already because it's not just about defining custom finders -- it's about defining custom finders that you can chain together and get optimized queries) Polymorphic Associations, Single Table Inheritance, Dirty Fields, Associ...