Displaying articles with tag

The Rails Way with 3rdRail - Introduction

Posted by lori, Thu Apr 10 20:00:00 UTC 2008

Originally, I was going to start with Chapter 1, but then I thought, what the hey, why not start right off with some criticism. Mild criticism, but criticism none the less.

In The Rails Way - Introduction, Obie goes out of his way to talk about Enterprise Adoption, and how well suited Rails is to improving the lot of the enterprise developer. I happen to agree. Having worked on a lot of projects, in a lot of enterprises, I have a good idea how much improvement, and it is significant.

On the other hand, Obie also goes out of his way to not-so-subtly snub Windows users. Given this pro-Enterprise, boo-Windows attitude, I'm going to guess that Obie didn't attend the Enterprise Rails BOF at RailsConf 2007. Actually, since I was there, I'm pretty sure I can say that he wasn't. That particular session sticks in my mind for two reasons. First, I was the one and only woman in the room (surprise, surprise). Second, and more significantly, I was the one and only Mac user in the room. This should not come as a surprise. Enterprise developers tend not to have a choice about their development platforms. Corporate policy, in all the large corporations where I have worked/consulted (Shell, IBM, Halliburton, IHS to name a few), dictates that there is one corporate computer flavor and that flavor is Microsoft Windows. Now, some of these enterprisey guys at the BOF had branched out, with VMWare installed, and were running Linux in order to do their Rails development, but frankly, that's a hack. If you are a developer, you want maximum power out of your development platform and tools, and running in a VM is unsatisfying. IMO, if Enterprise developers are going to make any impact on the numbers of Rails developers, it's likely to be as Windows users.

And this of course is where 3rdRail comes in. Right out of the box, 3rdRail comes ready to run on Mac, Linux and ... Windows. Delivering a fully operational Ruby/Rails environment, including database, 3rdRail enables enterprise developers to get the most out of their native development platform. Since most enterprise developers will also be IDE users of some persuasion, 3rdRail should be a familiar experience, especially for Eclipse users, because 3rdRail is based on Eclipse.

0 comments | Filed Under: | Tags:

The Rails Way... with 3rdRail

Posted by lori, Mon Apr 07 21:25:00 UTC 2008

I got my copy of Obie Fernandez' The Rails Way a couple of weeks ago, but I've been so busy with work (we're down a sysadmin, a web designer, a tester, and now a developer... sigh), that I just dropped it on a shelf and almost forgot about it. Today our new sysadmin started, so I had a little breathing space (ha!). Another coworker/developer, Hal, reminded me about the book by pointing out that we'd met one of the contributors at RailsConf 2007 last year. Hi Jodi! Thanks for helping me debug our production Rails app during one of the sessions!

Anyway, I turned off the TV tonight, and pulled out The Rails Way. Since I've been using Rails for over two years in a quasi-enterprise application, I'm not expecting a tonne of grand revelations, but I'm certain that there will be a lot of tips and tricks that will improve my Rails usage, and my understanding of Rails internals.

As I started reading the introduction and chapter 1, it occurred to me that there was something else quite useful I could get out of this book. I've been nagged (in the nicest possible way) on and off for months about blogging about CodeGear's 3rdRail, which I use every day in my Rails development. Turns out, as I was reading, I kept thinking stuff like... "oh, yes, but in 3rdRail it's even easier to do..."

So, that's what I'm going to do. Chapter by chapter, as I go through the book, I'll be posting about the ways in which 3rdRail makes my life easier, as an enterprise Rails developer. Expect the first installment before the end of this week. I look forward to hearing what you think, so gimme some comments as I go!

1 comment | Filed Under: | Tags:

Mephisto blog up and running

Posted by lori, Sun Jan 06 17:46:00 UTC 2008

Using Nginx and Mongrel, running on a Nitix server. Further customizations to come, but this should be working now.

0 comments | Filed Under: | Tags:

COSSFEST 2007 - Maps on Rails

Posted by admin, Thu Nov 01 03:00:24 UTC 2007

I have posted a zip file containing my presentation, and the source code for the various demos, on the Calgary Ruby User Society – CRUserS Yahoo group. So, join up and you can download! ;-)

COSSFEST 2007 – Maps on Rails Presentation and source code

0 comments | Filed Under: | Tags:

Are YOU ready?

Posted by admin, Tue Oct 30 12:39:44 UTC 2007

You are a web developer, and your web application is up and running at last.  You can only hope it will become popular.  But are you ready for when it happens?  These two ticket selling operations didn’t have to wait and wonder if they would “become” popular, they KNEW exactly when the flood would arrive… And still, they were unprepared.

High demand crashes Beijing Olympics ticket website

On Tuesday, organizers were working to fix the problem, the BOCOG website said. It asked ticket buyers to be patient and to avoid constantly refreshing the online ticketing site. Within the first hour of sale, the website was visited eight million times and received more than 200,000 ticket requests per second, BOCOG said. It’s unclear how many tickets were sold Tuesday, but BOCOG said 9,000 were sold within the first two hours.

Colorado fans rock World Series ticket system
On Monday, there were 8.5 million attempts to connect with the Rockies’ computers in the first 90 minutes after sales started, he said, and only several hundred tickets had been sold before the system had to be shut down.


So, in a very well timed coincidence, the CRUserS topic this month, “Rails Caching”, given by local member and creator of Baby Name Map, Guy Davis, will be addressing some of the problems that arise, when your web application is “discovered”. Hope to see you there. November 20, 6 pm, at the Calgary Central Library.

0 comments | Filed Under: | Tags:

Adding to the Ruby library path

Posted by admin, Sat Oct 20 04:40:23 UTC 2007

I couldn’t comment on David’s blog ( must be logged in… no way to log in provided :-( )

David Orriss Jr – The Delusion That People Care About What I Think » Blog Archive » How Ruby Finds Libraries

In Ruby not library management is not always as simple as running gem install. Some Ruby code is distributed simply as libraries. So where do you put these libraries? The clue is in the Ruby $LOAD_PATH variable.
<br /> irb(main):001:0&gt; puts $LOAD_PATH<br /> /usr/local/lib/ruby/site_ruby/1.8<br /> /usr/local/lib/ruby/site_ruby/1.8/i686-darwin8.10.1<br /> /usr/local/lib/ruby/site_ruby<br /> /usr/local/lib/ruby/1.8<br /> /usr/local/lib/ruby/1.8/i686-darwin8.10.1<br /> . =&gt; nil<br /> irb(main):002:0&gt; <br />
This tells you that you can put your library code in any of the above listed directories and if Ruby still can’t find the code it will try the current directory you’re running code in before giving up. Personally I end up using the /usr/local/lib/ruby/1.8 folder.


I just found this little gem yesterday:

<br />$LOAD_PATH.unshift File.dirname(__FILE__) + '/lib'<br />

Which, used in a Rakefile, will add the lib dir below the current directory to the load path.

1 comment | Filed Under: | Tags:

Language Wars... 2007 edition

Posted by admin, Fri Oct 19 06:08:50 UTC 2007



David Rupp’s Blog: The Last Language War / Language Trolling Post You’ll Ever Need To Read (Hopefully)

The Last Language War / Language Trolling Post You’ll Ever Need To Read (Hopefully)


I do have a problem with this post, though. The Rails framework is being misrepresented as the Ruby language… ;-)

4 comments | Filed Under: | Tags:

Not the best advertisement...

Posted by admin, Sat Sep 22 15:28:47 UTC 2007


7 reasons I switched back to PHP after 2 years on Rails – O’Reilly Ruby

Back in January 2005, I announced on the O’Reilly blog that I was going to completely scrap over 100,000 lines of messy PHP code in my existing CD Baby (cdbaby.com) website, and rewrite the entire thing in Rails, from scratch.


Frankly, the idea of taking something that works, however ugly, and rewriting the whole thing in another language is ludicrous. Who came up with the business case for that?!? Fire them! No business case? Then fire the guy who proceeded with the project without one!

People get excited about new technologies, and then go and make some very strange decisions.  Rails has it’s advantages.  But you should have a solid business case for any project, Rails or not.  Rails is not a magic wand to wave, that solves every problem for you.  You still need to use your brain.  And your business sense… if you have any.

0 comments | Filed Under: | Tags:

Support for nil values in Enumerable.min or max

Posted by admin, Thu Sep 06 06:55:44 UTC 2007

My build failed today, after I added some new code to find the min and max value from inside a Hash.  My hash was keeping track of x,y pairs, and I needed to find the min and max of the x’s.

min = data_series.min {|a,b| a[1][0] &lt;=&gt; b[1][0] } max = data_series.max {|a,b| a[1][0] &lt;=&gt; b[1][0] } Looks pretty simple. But sometimes, I had nil values for the x’s. At which point you get treated to the, not very descriptive, error message:
ArgumentError: comparison of Array with Array failed

I tried a few things like:

min = data_series.min {|a,b| a[1][0] &lt;=&gt; b[1][0] unless a[1][0].nil? or b[0][1].nil? }

But that didn’t work either. After some Googling, and reading some documentation for a completely different Enumerable method, the answer occurred to me. The block CAN’T return nil. It has to return one of the Comparable values of -1, 0, or 1. So:

min = data_series.min {|a,b| (a[1][0].nil? or b[1][0].nil?) ? 0 : a[1][0] < => b[1][0] }

And, finally, that worked. The lesson learned here is that the block versions of max and min MUST return -1, 0, or 1. Remember that next time, Lori.

0 comments | Filed Under: | Tags: