Skip to main content

San Francisco Ruby Group Meetup - June 2006

Listened with interest to the July presentations at Ruby meetup in San Francisco. This is my fourth meetup and the group has more than doubled.

Here is a review of actual presentations...

The Danger of the Hype

The hype is not receeding, in fact it is only increasing. People are reluctant to discuss shortcomings, and are all about hyping each other up. This is a dangerous ground to be on. I am surprised that at all meetups I've been to, and at the Canada on Rails conference there were exceedingly few mentions of issues, problems, pains. Sure Ruby solves some, but nothing's for free. What's the cost then?

As I am coding through my third month in Ruby, I am starting to appreciate both the power and the weaknesses of the language, as well as the framework. It must be the non-conformist in me: I just can't follow the herd without questioning. The J2EE herd is all too fresh in my mind from only a few years ago, so a healthy doze of scepticism is what it is - healthy.

Ruby

So I finally came across the first bug due to languge flexibility in Ruby. My model in our Rails project is a Book. Part of the book meta data is binding. Believe it or not, you really can't use attribute called "binding", because under some conditions it silently overrides method Proc.binding(). The symptoms were really obscure errors upon saving the model, something about type mismatch of block parameters.

Sometimes it's nice to know explicitly what you are overriding, just in case it may bite you in the ass later. This was 3+ hours spent debugging the issue (between myself and several others)... Of course have to counter it to the productivity gains achieved with Rails development, which everyone is talking about. Well, I am not quite sure I am ready to make this judgement, I think more time will tell.

Comments

Popular posts from this blog

Car or Auto Make-Model-Year Database : For Breakfast

Make Model What? If you like me were tasked with loading a database of recent car makes/models/years, you would start by looking on the web and seeing if someone else just has it out there, readily available, hopefully for free, but perhaps for a tiny nominal fee.? If only it was that simple... I looked and looked, and couldn't find anything that would fit the above requirements. So I thought, who would know about US car models better than Kelly Blue Book? So I went on their site, and sure enough they have a javascript file that lists all known to them makes and models of used cars. Since the file is public, I figured it's not really "evil" if I scrape and parse it for my own benefit. Disagree? Have a better source? Then leave a comment. Anyway, to cut the long story short, I'm hoping to save a day or so to someone else who may, like me, be looking for this information. The ruby module shown below retrieves and parses the javascript from KBB site into

On Ruby on Rails with PostgreSQL, and Acts as Paranoid

Back a few years ago I was researching differences between PostgreSQL and MySQL databases, and chose PostgreSQL because at the time it supported foreign key constraints and many other fantastic SQL extensions that make developer's life a lot easier. Today I am sure MySQL is just as functional as PostgreSQL, and it does appear to be a more popular choice as the Rails DB than MySQL. I still prefer PostgreSQL, it just feels more natural to me coming out of Oracle background, so I am probably biased (who isn't?) Anyway, in the last year and a half or so, I've been writing Rails apps that use PG-based databases and found a few random tricks I'd love to share here. Opinions differ here, but just like accountants like the ancient double entry accounting system, I personally prefer a double validation system - where Rails validates my objects before/after updates, but the database double checks this using proper constraints. Rail's validation system is very robust and exte

Getting RMagic and friends to work on OS-X Mountain Lion

Upgraded my ruby environment today to Mountain Lion. Here is a quick checklist that I went through to get everything working.  The largest change was having to reinstall XCode and command line tools, and also download XQuarts in order to reinstall ImageMagick successfully. Without it, I was getting errors building RMagick of the following shape: ld: file not found: /usr/lib/libltdl.7.dylib for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [RMagick2.bundle] Error 1 Quick checklist: Install Mountain Lion Install XCode 4.4 Install command line tools from XCode 4.4 Preferences dialog Install XQuartz In terminal run brew update brew uninstall imagemagick brew install --fresh imagemagick wipe out your ~/.rvm folder reinstall RVM and install the latest ruby 1.9.3-p-194 run "bundle" in the project folder run "rake" and rejoice References: https://github.com/mroth/lolcommits/issu