Tag Archives: Ruby

Design Philosophies of Developer Tools

I’ve been thinking about some of the tools that I use every day, and about the different design philosophies they reflect. Git First and foremost, Git. We use Git on every single project, internal and external. Git is a great … Continue reading

Posted in Programming | Tagged , , | 5 Comments

The Great Database Rewrite

I just discovered the paper The End of an Architectural Era (It’s Time for a Complete Rewrite), about re-designing database software from the ground up.  It contains some unsurprising predictions — “the next decade will bring domination by shared-nothing computer … Continue reading

Posted in Programming | Tagged , , | Leave a comment

Testing Named Routes in the Rails Console

I finally found out how to do this, from the Rails Routing shortcut by David Black. In the Rails console, do this: include ActionController::UrlWriter default_url_options[:host] = ‘whatever’ Then you can call your named route methods directly from the console.

Posted in Programming | Tagged , , , | 14 Comments

Basking in the Solr Glow

I am happy to report that AltLaw.org‘s switch to Solr has worked very well. Solr is a RESTful search engine, built on Lucene. The setup was more complicated than just using a search library, but the rewards were worth it. … Continue reading

Posted in Programming | Tagged , , , , , , | Leave a comment

Parsing Complex Comparisons

An interesting tidbit: can your programming language parse a < b < c? Perl can’t. Ruby can, but returns an error “undefined method `>’ for false:FalseClass.” Interestingly, Python accepts it, and even gives the correct result. Something clever must be going on in … Continue reading

Posted in Programming | Tagged , | 2 Comments

Why Doesn’t My Rails App Use memcached with cached_model?

Answer: you’re using the latest version of Rails (1.2.3), which slightly changes the syntax of its SQL statements. cached_model relies on a regular expression to match that SQL statement. To fix: Dive into the source of the cached_model gem, find … Continue reading

Posted in Programming | Tagged , | Leave a comment

Rails Sucks, Long Live Rails

Wowsers. I just spent two nail-biting, hair-pulling days getting Ruby on Rails running on a new dedicated server. What’s the deal here? I spent the first six hours trying to get Capistrano to work with darcs. Then I gave up … Continue reading

Posted in Programming | Tagged , | Leave a comment

Ruby vs. Lisp

I’m certainly not the first to do this, but I felt like writing it. Comparing Ruby and Common Lisp: Syntax: Advantage, Common Lisp. No contest here. Ruby’s syntax is ugly, with all those ends hanging around and the { |var| … Continue reading

Posted in Programming | Tagged , | 2 Comments

The Virtues of Static Typing

When I first discovered dynamically-typed languages like Perl and Ruby, I was convinced of their superiority to statically-typed languages like C++. No longer did I have to waste hours typing redundant type declarations or adding casts just to make the … Continue reading

Posted in Programming | Tagged | 2 Comments

The Weirdness of C++

I’ve been dredging up my C++ for a class recently, and I’m struck by just how weird it feels now that I spend most of my time with Ruby. I was all proud of myself for remembering how to write … Continue reading

Posted in Programming | Tagged , | 1 Comment