What is Toluu?
Toluu is a free service for sharing the feeds you read and discovering new ones.
Get Invite

Katz Got Your Tongue?

Random Geek-Related Thoughts


Stop Watching Sophie’s Choice (And Get Some Work Done)November 25

I woke up this morning to Kirin Dave’s cantankerous rant about how Ruby’s going down the tubes. The whole post was a giant whine-fest, with the exception of the beginning, where he heaps faux past praise on Ruby to justify his complaints.

The entire post read kind of like Joe Lieberman supporting McCain: “I used to be a Democrat, but now I think Obama’s in love with terrorists.” Dave didn’t even really attempt to be even-handed in his critique (if I can even call it a critique); he just goes after the Ruby language, interpreter, and community with the full force of his giant… rhetoric.

Let’s take a look at Dave’s claims:

Claim 1. Ruby’s interpreter is so outdated, it’s impossible to write code without it leaking memory. As evidence, he points to a case encountered by Tom Preston-Warner in his God monitor library. What Dave fails to point out is that despite his claims that Ruby 1.9 is basically useless, the last post in the thread he references informs the readers that the bug is fixed in Ruby 1.9.

He also doesn’t inform the reader that many large web applications, including YellowPages.com, scribd.com, and hulu.com, not exactly tiny web sites, are running on infrastructures that depend on this “outdated” interpreter. While I’m not going to claim that the Ruby interpreter is all rainbows, it’s hardly the problem that Dave cl

Merb 1.0.2November 24

We’re releasing Merb 1.0.2 today, which is just a small number of patches that address some of the most urgent issues:

  • Some of the built-in rake tasks were deleting some gems that were in the specs as fixtures. This only affected people building Merb from the git sources, and is now resolved.
  • The Merb source code hardcoded in certain versions in multiple places. We have removed another such case, and created Merb::DM_VERSION to specify what version of DataMapper the merb stack shipped with. We now use that variable when generating the merb gemspec.
  • Merb was truncating the log file with each start. It now opens the file in append mode.
  • Many people reported that they accidentally overrode a core Merb::Controller method in their controllers, and received only an obscure warning. Merb now raises an error when you attempt to override a non-overridable method in your controller. If you want to override something anyway, call override! :your_method before doing so.
  • merb -i was silently failing for users who did not have webrat installed. We now print a warning and allow merb -i to load. Webrat is required for some advanced features that allow you to emulate the browser in the console.
  • An issue with numeric routes (ticket 1036) is now resolved.
  • An issue with c
Merb 1.0 Spec changeNovember 23

When we released 1.0, we also copied the existing 1.0 specs into a directory marked spec10 and added a rake task called spec:oneoh. This allows us to make sure that new versions of Merb still run against the same API as Merb 1.0, and that we’re not accidentally breaking working 1.0 APIs (to the extent that our 1.0 specs can make such an assertion).

The rule is that those specs must not be changed, with one exception. Specifically, we’re allowed to modify the 1.0 specs if the spec itself broke for reasons unrelated to the thing it was attempting to spec, and the breakage does not indicate a breakage in the 1.0 API. Additionally, any such change requires a public announcement, to minimize the number of such changes.

As a result, I’m announcing a small change in spec10, and the rationale for that change.

Many people have accidentally overridden core Merb::Controller methods in their controllers, with unpredictable (and confusing) results. From my Rails days, I remember this happening as well. As a result, Merb, starting with 1.0.2 and 1.1, will raise an error if you attempt to override a Merb::Controller method.

One of our tests had a controller which used the “method” action. Of course, “method” is already a method on all objects, so our new code caused it to raise an error. However, the test was not asserting that it was legal to override “method”; it was the same sort of accident that caused us to add this feature in the first

MythBusting — We Agree! Ruby is Awesome!November 16

With all the disagreement over the past few days, it might seem like Merb and Rails are worlds apart. But David’s latest post demonstrates what I’ve been saying all along: we’re more alike than different.

In the latest installment, he takes on the myth that “Rails is hard because of Ruby”. Effectively, a bunch of people are comfortable in their language of choice (PHP, Java, Perl) and prefer to switch over to an MVC clone in their language of choice than learn the big bad scary Ruby.

As David succinctly argued, Ruby is just not that hard a language to learn. It’s better organized than PHP (with its absurdly large global namespace) and less ceremonious than Java (no IStrategyBuilderFactories here).

And what’s fantastic about Ruby is how quickly and simply new programmers are exposed to advanced concepts like lambdas. Because iteration is accomplished in Ruby almost exclusively with blocks, it’s near impossible to spend even a day in Ruby without learning what blocks are. Spend a little more time with Ruby, and the power of the closures that come along with lambdas becomes obvious. All without the need for an extensive study of the CS benefits of the construct.

Ruby is so easy, in fact, that the slim

MythBusting — Rails is not a monolithNovember 15

Continuing his interesting train of thought, DHH posted on his blog yesterday that Rails is, in fact, not monolithic. In reality, he says, it is quite modular. In the post, he finally fully articulated the rationale behind the excessive use of alias_method_chain in Rails, which he says is to keep the code even more “modular”.

Let’s take a look at some of the claims:

Rails is not actually that large

They count all lines including comments and whitespace in Ruby files, thus punishing well-documented and formatted code

As I said yesterday, I did not actually include comments and whitespace. I specifically provided the command that I used, which removed whitespace-only lines and comment-only lines. In fact, the comment by bitsweat (a member of the Rails Core team) which started this back-and-forth erroneously included comments in Merb’s count, when merb-core has about 1 line of comment per line of code. This is why Jeremy incorrectly thought that merb-core was over 15,000 lines of code.

They count tests, thus punishing well-tested code

Neither Jeremy nor I counted tests. I’m not sure which LOC-count he’s referring to.

They count bundled dependencies, thus punishing dependency-free code

I did in fact make this mistake, but I disagree with the assertion that bundling dependencies makes code more “modular”. For example, bundling xml-