Archive for the 'Ruby' Category
Tuesday, July 29th, 2008
There was a burst of interest in WSBA website development on their mailing list—enough to annoy a few non-coders at any rate. So Racing on Rails has its own Google Group for development. Here’s hoping it’s the tip of the volunteer Rails coder cyclist iceberg.
For those late to the party or too lazy to click the link above, Racing on Rails is the Ruby on Rails application behind several bike racing association websites like the WSBA and OBRA. It’s all open source (except for the association-specific parts), and it pretty much works OK at this point.
I’ve put a lot of time into this code in the last few years. Plenty of cool ideas abound for these sites—it would be great to have more developers to make those ideas happen.
Posted in OBRA, Programming, Rails, Ruby | No Comments »
Wednesday, February 6th, 2008
“We” means Analog Analytics. It’s fun, personally, to be hiring now instead of trying to be hired. Here’s the job description:
“Terrific opportunity for talented developer to join an exciting team helping to change the advertising industry.”
It’s a remote position — Pacific time zone strongly preferred — I’m in Portland, the CTO is in Los Angeles, and the CEO is in San Diego. There’s no home office. We deploy and develop Rails (and a little C) on OS X, Linux, and Solaris.
Light on the details? Sure. We’re not hung up on any many specific qualifications. Want to earn your salary coding in Rails? Email me at scott.willson@analoganalytics.com
Posted in Analog Analytics, Jobs, Programming, Rails, Ruby | No Comments »
Wednesday, January 16th, 2008
This is less a post, than a note to myself, but anyway, here’s a handy script to change your view extensions while preserving Subversion history.
#! /usr/bin/env ruby
require 'pathname'
for path in Dir['app/views/**/*.rhtml']
pathname = Pathname.new(path)
p `svn mv #{path}#{pathname.dirname}/#{pathname.basename.to_s.split('.').first}.html.erb`
end
Posted in Programming, Rails, Ruby | No Comments »
Sunday, November 18th, 2007
Upgrading to a Rails app to 2.0 and seeing this error?
‘undefined method `dbman' for #<ActionController::TestSession
You need to add this line to config/environments/test.rb:
config.action_controller.allow_forgery_protection = false
Obvious to you, maybe, but not to me.
Posted in Programming, Rails, Ruby | No Comments »
Tuesday, October 30th, 2007
Turns out that dashes are not really valid hostnames in URLs. So, ‘cyclinglog.butlepress.com’ is valid, but ‘cycling_log.butlepress.com’ is not.
Now, Apache virtual hosting will work with underscores just fine, as did 1.1 versions of Rails and Safari 2.0. I think IE never liked it. By “worked” and “liked,” I mean that the browser accepted cookies from the host. If the browser doesn’t accept the cookies, then Rails creates a new session for each request, and that prevents you from logging in to sites like cycling_log.butlepress.com.
Safari 3 show the same behavior. In fact, with Rails 1.2, the only browser that “works” is Firefox.
Anyway, long story short: don’t use underscores in hostnames.
Posted in Programming, Rails, Ruby | No Comments »
Friday, July 27th, 2007
This was a talk from a couple of guys from ThoughtWorks about CruiseControl, one of the first CI (Continuous Integration) tools. Martin Fowler works at ThoughtWorks! We are not worthy.
Audience Pool
90% use CI
I’m the only one who doesn’t use CruiseControl, and the presenter wants to know what I do use. “Ruby” seems to be a worthy answer. Wheh.
There are several implementations of CruiseControl — Java, .Net, Ruby — and it can be customized plugins. This talk is actually about customizing CruiseControl.
The presenters use their own ThoughtWorks project as an example. It’s a big, old Java project with 8,000 class files. So, in the ballpark of the entire Con-way application, er, applications. It takes over thirty minutes to build and test. They have about 6,000 tests, and are slightly embarrassed by how light their test coverage is.
The central problems with their CI is the volume of information and correlating it together. They solved these problems with the practical application of brute force by using Lucene to index the CruiseControl build logs (this includes source control commit comments and bug tracking numbers). It has a simple web front-end, so there’s one place to figure out which bug is fixed in which build. It was initially for developers, but business analysts like it, too.
We had a nice chat about build lights (build broke, light goes red). Apparently, x10.com is the place to go to buy one. You may remember them from endless, annoying banner ads. Other sources:
- NaBazTag
- Ambient Orb
- Lava
I liked the presentation’s funky diagrams. Think Scooby Doo’s Mystery Machine van.
Suggestion: build a CI build dashboard on an old PC and monitor in your bullpen. Hey, the ARAOT is ahead of the curve!
Posted in Java, OSCON, Programming, Ruby | No Comments »
Wednesday, May 30th, 2007
I have to say that all the RailsConf keynotes I went to were good, and I heard that the others were good, too. Is that level of quality sustainable? I hope so.
Dave noted that EuroRailsConf was the most profane conference ever. He thought this was a bad thing.
We all were getting a bit loopy at this point, so my notes are short and fragmented. Here’s what I can piece back together.
Ze Frank talked about what to do when you have many amateur authors. This was an interesting problem that we wrestled with back in the day at Gap Inc.’s intranet. You can ignore them (obvious bad consequences). You can try and control them, but this doesn’t scale. You can shut them down (draconian). He suggests that you instead facilitate conversation. Which sounds fine, but fuzzy now that I write it down here. Should have gone to his talk, I guess.
Dave warned about Cargo Cult programming — definitely a danger in the Rails community. He then listed some assumptions we should question:
- The web browser: it’s a freakin’ full-duplex mainframe terminal!
- Object-oriented programming. The world is not hierarchial, it’s chaotic. Why are we so class-centric? Try to write a program without classes and you might be surprised by how it works.
- Relational databases
- REST
Posted in Programming, Rails, RailsConf 2007, Ruby, Uncategorized | No Comments »
Wednesday, May 30th, 2007
This talk was practical advice on how to do just what the title says: contribute to Rails.
Josh comes from a Smalltalk background. He also worked on OpenDoc, “A technology that no one has heard of it.” You are wrong, my friend — I remember when it was all the buzz at MacWorld Boston ‘96, and my boss was wondering if we should become OpenDoc developers. Ah, CyberDog, we shed a tear for you.
Anyway, Josh now works at Java Card.
The session’s audience:
15% use the Rails Trac
10-15% opened a ticket
10% contributed a patch
5% had patch accepted
Prerequisites for contributing: Rails Trac account, Subversion, subscribe to the Rails Core discussion list.
First steps:
1. Create a local, vanilla Rails projects for this work
2. svn co to vendor
3. Set up tests
4. Ensure tests run
You need to use TDD, follow code style, write docs, write tests, and ensue that the rdoc builds. Use SVN diff to generate patch. Create a Trac ticket with [PATCH] in the subject.
How to get some patch accepted
- Make tiny changes
- Discuss big patches first on Rails Core
- Need good code
- Need tests
- Get buy in for Rails developers
“Get used to disappointment. “There’s a backlog.
Posted in Programming, Rails, RailsConf 2007, Ruby, Uncategorized | No Comments »
Wednesday, May 30th, 2007
Here’s a real advantage of a conference over email: I learned that Charles Nutter has an awesome Midwestern accent! I’ve got a whole new voice in my head while I read his posts, and there are a lot of them. Does Charles Nutter sleep? He seems to churn out emails and blog comments about JRuby 24/7.
On to the talk. For the record, I am not sure how I feel about the whole Rails running on JRuby inside a WAR on Glassfish stack at the enterprise data center. Sounds like a tall, tipsy stack of dinnerware to me. But I do like JRuby. It’s been really handy at C o n - w a y for calling EJBs, using mainframe proxies, and running JUnit test suites. And there’s a real possibility that the Java VM could become a great VM for Ruby.
This session’s poll:
25% of the audience are Java developers
25% ex-Java developers
15% ex-Perl users
Who uses which database?
40% MySQL
5% SQLite
10% MS SQL Server
20% Oracle
1% DB2
Why use JRuby instead of C Ruby?
- Unicode support
- Native JVM threads
- The big pain point …
What are the biggest differences?
1) Database support. Ruby MySQL works about the same. JRuby can use JDBC, of course, and JNDI to look up connection pools. DB2 support is not 100%? (Works pretty good for me.) Oracle ActiveRecord tests are not 100%
2) Native Ruby extensions don’t work out of the box. Need porters.
3) Command-line performance because Java start-up time is slow.
Charles and Thomas demoed Goldspike, a way to package a Rails app into a J2EE WAR:
rake war:standalone:create
And they demoed a Glassfish gem! Hm, well, theoretically, if all this just works, it could be pretty cool. Though I dread digging through the stack trace.
Posted in Programming, Rails, RailsConf 2007, Ruby, Uncategorized | No Comments »
Wednesday, May 30th, 2007
Vonage seems to have done a really nice job of integrating Rails with their legacy J2EE apps (cracks me up to write “J2EE apps”). This talk was somewhat of a rehash of Mapping Rails to Legacy Systems, with more details about the REST bits.
Turns out that Vonage essentially implemented Rails 2.0’s ActiveRecord six months before the Rails team.
Posted in Programming, Rails, RailsConf 2007, Ruby, Uncategorized | No Comments »
|
|