Noel Rappin Writes Here


July 15, 2011: Stale Links

Amazon, Ruby, RubyMine, Twitter, Uncategorized, iPadNoel Rappin2 Comments

The problem with sitting on these daily link posts is that the links go out of date. Sigh. Here are some links.


I found a couple of things about this InfoQ article about Twitter’s infrastructure odd. I was expecting it to be a bit more of a Rails hit-piece, frankly, so it was nice to see a quote like this one from Evan Weaver:

I wouldn’t say that Rails has served as poorly in any way, it’s just that we outgrew it very quickly.

Twitter has unique needs, so it’s not surprising that the Rails stack doesn’t serve them anymore, but they did get pretty far with the Rails stack.

This was interesting – first, from Charles Humble, writing the article:

You might assume that the move to the JVM was largely driven by performance and scalability concerns, but in fact the existing Twitter codebase performs well… Rather, the move to JVM is driven as much by a need for better developer productivity as it it for better performance

And this from Weaver:

As we move into a light-weight Service Oriented Architecture model, static typing becomes a genuine productivity boon.

The author concludes the article with this:

[Rails] does however come with well known costs, both in terms of performance and scalability, and perhaps also the relative maturity of the libraries and tool chain. In addition, the experience at Twitter suggests that the Ruby on Rails stack can produce some significant architectural challenges as the code base grows.

Which strikes me as an overgeneralization of what Weaver said – I’m almost willing to believe that static typing is a benefit if you are doing SOA at Twitter’s scale, but I haven’t seen the benefit on smaller projects in my experience.


As somebody who got their Amazon Affiliate account zapped when Amazon pulled the rug out from under Illinois residents, I was following with some interest the similar news out of California. (Although not quite identical, I had several months notice).

There’s been a little bit of confusion on what actually happened – a lot of people seem to think California is trying to tax affiliate revenue (I can’t find the link, but I saw someone argue that their affiliate revenue was already being taxed so shouldn’t be taxed again, which is wrong in a couple of different ways.) Slate magazine has a decent overview, which I’ll note I basically agree with on the substance of the issue.

Current law is that online transactions are only subject to sales tax if the company involved has a physical presence in the state. The California law defines “presence” to include any affiliates who get a payout – the affiliate revenue isn’t taxed as such, but the existence of an affiliate means that other Amazon transactions in California would be subject to California sales tax. Amazon responded to the law by canceling all their affiliates in California, as they did in Illinois, to avoid having to charge sales tax, and also to avoid having to calculate and manage sales tax, and also to avoid a court case that they might well lose.

Anyway, you may agree or disagree with the California law – though it doesn’t seem inherently any less silly than the various state laws that impose income taxes in visiting professional athletes. For my part, I don’t understand why the fact that Amazon has put themselves in a position where paying sales takes kills their business model should be my problem – I understand why there was an initial push not to charge sales tax on the internet, but I think the social benefit of privileging on line sales has probably passed. Even if you don’t agree with that argument, though, it’s hard for me to see how Amazon using their affiliates as pawns is the best or most responsible way for them to be advocating their case.

New additions to the workflow

I’ve got a couple of new writing workflow things to mention. There’s a new app in the Mac App Store called Marked, which is a classic “One Thing Well” deal. For $2.99, it’s basically a Markdown preview window, but has the very useful feature that it will live-update a file you are editing every time you save. So it’s basically adding MarsEdit’s preview window to any editor. It also makes it easy to copy the resulting HTML into the clipboard if you, say, want to post it to WordPress. It also lets you change the Markdown processor if you’d like. It’s nicely handy for $2.99.

On the iPad side, WriteRoom has finally been updated to a universal app. It’s effectively PlainText Pro – the same basic (pretty) layout with a couple of extra features. It’s got an easy to configure extra keyboard row, and a couple of other handy features. My main negative is that, when the app is in landscape mode it doesn’t use all the horizontal space for text, that’d be a useful option. One thing I like about it, relative to other editors is that it live-syncs with Dropbox, giving much more of a feel of directly editing the Dropbox file than the other editors that make you download the file locally and manually sync. Overall, though I like it.

I also tried out an iPad app called Daedalus, which has a very interesting UI metaphor but doesn’t really fit with the way I manage files. If you are willing to do all your notes and writing in it, though, the organization looks like it might be handy.

RubyMine 3.2

Quick mention that RubyMine 3.2 is out, with support for Rails 3.1 features like the asset pipeline and CoffeeScript. Mostly, I’m having some stability problems with it (it tends to freeze up for me), but the editor and its interaction with Rails continues to get better.

Avdi on Law of Demeter

Finally, speaking of things I thought I was going to disagree with, but wound up agreeing with almost completely (and also speaking of week-old links…), here’s Avdi Grimm on the Law of Demeter. Avdi comes down on the side of actually useful guidelines for managing chains of method calls.

July 7, 2010: Dylan Goes Electric (Probably Not True)

Alan Kay, Apple, Kent Beck, RSpec, Ruby Tracker, RubyMineNoel RappinComment

Book Status

Beta 4 should be available this week, or at the latest Monday, apparently we're working around people's vacation schedules. It will have two new chapters, and some error fixes and tweaks around the book.

Next is on to Beta 5.

In status news that shouldn't interest you much, the end of the quarter meant the end of my first Pragmatic pay period. And apparently Pragmatic pays as soon as possible, rather than waiting 30 or 90 days after the end of the pay cycle. That's pretty great, from my point of view. Again, no reason why you should care.


Envy Labs is announcing Ruby Tracker, the Ruby Dependency Manager. Basically, you give Ruby Tracker your code repository, and it analyzes your gem dependencies and notifies you when any of them are updated. Sounds interesting. I wonder if it might be most useful when first taking over a legacy project to see just how out of date it is. (Not that I would necessarily recommend updating a legacy project first thing, but it's good to see exactly what you are up against...)

A new beta of RubyMine 2.5 is now available. The big Rails feature is support for LESS CSS. Also, Mac users now have a native file directory, which is nice in that the old one was a pain in the neck, as well as a couple of other Mac-ish tweaks.

Mark Guzdial, over at the Computing Education blog links to some older articles by the one-and-only Alan Kay about the promise of spreadsheets and the like. Reading the kinds of things Kay was doing and speculating on 25 years ago or more is humbling -- the rest of the world hasn't quite caught up.

I linked to the first two parts of this yesterday, here's part 3 of Kent Beck's survey data on testing. This one is how often those surveyed run unit tests, with just over half running them on every code change.

I like this pattern -- here's Bogdan Gusiev with a custom RSpec matcher to test validation for ActiveRecord. (The code is here) The matcher lets you say things like it { should accept_values_for(:name, "Fred", "Jim") } and it {should_not accept_values_for(:name, "23", "M&Y". That's nice because it makes the test independent of the validation code being used.

Jay Fields has a post talking about what keeps Java developers from adopting Ruby or Clojure, and how they don't yet realize that the power of the languages and of command-line interactive terminals will overcome the relative lack of IDE support, which matches my experience pretty much exactly.


This article summarizes some rumor chatter going around that Apple is planning on either replacing Objective-C or offering another language as a full alternative for the creation of say, iOS applications. Just a couple of points. I suspect that this is at least something that Apple is researching -- they'd be crazy not to. Apple already supports MacRuby, so the idea that MacRuby could target iOS isn't completely insane. Still, wouldn't it be wonderful if they went back to the future and started supporting Dylan? Nothing would cement the "iPad is evolutionary Newton" theory more...

PeepOpen In Use

AckMate, PeepOpen, RubyMine, TextMateNoel Rappin3 Comments
Some of you know (and the rest of you don't care) that I spend my actual day job working on a largish JRuby on JRails project. (As an aside, I never get tired of jthrowing that extra j onto janything jthat I jcan. When I wrote the "Jython Essentials" book, I desperately wanted to call it "JProgramming Jython", but eventually sensible people prevailed.)

Anyhow... our developer stations run Ubuntu, which meant no TextMate. Since Vim and I have, let's say, significant differences of opinion, I wound up using RubyMine -- I'm a longtime JetBrains user, NetBeans drives me a little crazy, and I like RubyMine.

When I'm on my Mac laptop, and not the dev station, I kept up with RubyMine, largely because RubyMine has a big advantage in ways to navigate a project, and that was a major win because of the size of this app. However,my laptop is underpowered compared to the dev stations and running RubyMine and JBoss made it crawl.

With the recent releases of PeepOpen and AckMate, though, I thought it was time to give TextMate another try. That's the context here... I'm hoping that PeepOpen and AckMate will improve TextMate's ability to navigate a large project such that it's usable.

For the record. RubyMine's advantages over TextMate are: Navigation, including search for symbol, and click on a symbol to find it's definition. Refactoring, though I actually don't use that much in practice, and being able to easily run tests inline and get clickable stack traces -- for various dumb reasons, I haven't been able to set that up in TextMate.

TextMate's advantages are: cleaner interface, easier for me to customize, it's a better pure editor, and it's somewhat more performant that RubyMine. Really. Also I use it more, so I'm comfortable with its quirks.

Back to PeepOpen. It's downloaded and installed like a normal Mac application. After install, when you run it, it sits in the menu bar. Once it's running you can configure it. You must specify which editor PeepOpen is attached to, current options are Aquaemacs, Coda, Emacs, MacVim, TextMate, and XCode. In most cases, you then need to press a button to install a plugin. The other primary preference is the number of documents to track, to a limit of 4000. This seems fiddly to me, it's hard to imagine a normal use case where the answer to how many documents PeepCode should track is not going to be "ALL OF THEM". You can also tweak some options about git integration, and you can set global ignore preferences.

In TextMate, PeepOpen takes over the command-t key command to bring up the fuzzy text finder, with it's own fuzzy text finder. The PeepOpen window is larger, and displays the directory of each file, a last modified date, information about whether the file is different from the last committed git version. Like the TextMate finder, as you type, it progressively reduces the number of files to that match what you have typed based on some fuzzy text algorithms that match what you have typed against anywhere in the files' full path name. It also tries to bring more recently used files to the top. In my experience, it was certainly responsive enough, even with 4000 files being managed.

Once I got used to it, it works pretty well, especially once I had spent some time on the project and had some file that had been worked on. I had two issues. The first was a configuration issue. My project had well over 4000 files in it, and if you go over, there's no indication of it, the only thing that happens is that files that you know are there aren't being found. Fun. I was eventually able to fix that by tweaking the ignore patterns, but I wonder if that is going to conflict with other projects. Some way to get in project specific ignores would be nice. (Given the way my current project is set up, the git root is not the rails root, so I didn't see the git information either, but it's hard to blame PeepOpen for that.)

The second issue is more a question of what I'm used to. The JetBrains/RubyMine fuzzy finder is heavily acronym based, so if I'm looking for a file named "public_profile_integration_spec", then I can type "ppis", and JetBrains will put that file to the top. I love this behavior, it almost always uses less keystrokes to filter to the file I'm looking for, and thinking in terms of the acronyms is very natural. PeepOpen's algorithm works differently, and in this case would list any file with the four characters "p", "p", "i", "s" in order, even if they are not together. Any file with the word "mappings", for example. It doesn't privilege the first character of a word, which is too bad, because that is a powerful search.

PeepOpen helped a lot in making TextMate more usable for this project, but it didn't make it all the way there by itself. That also took AckMate, which is a TextMate plugin providing a nice, very fast, GUI display for Ack searches of the entire project. AckMate is much faster than RubyMine search, and also displays the results with a few lines of context. My only quibble would be that it would be very nice if invoking AckMate would pick up the current text selection as the next search. Other than that minor issue, though, it's really useful, and allows TextMate to overcome most of the navigation issues it has versus RubyMine.

Weirdly, although it's been a while since I seriously used TextMate for a Rails project, I seemed to be much more into using the keyboard to navigate open files. That helped, too. It also turned out that invoking the JRuby interpreter to start tests from within RubyMine is much slower than invoking from the command line -- that surprised me, because it's not true in the Ubuntu dev setups.

After all that, I did succeed. I was able to use TextMate effectively on this project in a way that was not possible without PeepOpen and AckMate. So that was good. Probably worth the $9 in time not spent watching Java spin up and down. That said, I still like RubyMine. Having a choice of lots of tools is generally better. Though I still can't get my fingers to work with Vim...

June 4 2010: Okay, here's a link post

JRuby, Rails 3, Ruby, RubyMine, YehudaNoel RappinComment
Quick links post:

Gregory Brown is looking for comments and donations for a proposal for a Ruby Mendicant University, basically a rolling online Ruby course.

Charles Nutter is interviewed by InfoQ on the state of JRuby.

Yehuda Katz has a long post on various kinds of extensions in Rails 3 -- gems, plugins, generators. This one I need to look at in some detail.

The new RubyMine 2.5 beta integrates with Pivotal Tracker. Looks like you can tell RubyMine what story you are working on and it will tag your source control comments. Cool.

Book Status

Working on the style/quality chapters, integrating material from the ChicagoRuby talk. Probably not a beta next week, but maybe the week after.

May 10, 2010: The need for eyeballs

Bundler, JRuby, MacRuby, Publishing, RubyMine, Twitter, Yehuda, errataNoel RappinComment

Top Story

Let's start with this: there's a small but embarrassing typo in the Pragazine article code. Especially since it was a) called out by the author of Mocha and b) was a direct copy from the book, and from the Lulu version before that, so it's been public for about a year, and I've proofread that chapter at least five times. Which just goes to show... you never catch everything.

On the plus side, this guy likes the book!.

Book Status

Beta 2 will either be today or Friday. Hoping for today, we'll see.

And then...

Very technical list of Charles Nutter's favorite Hotspot JCVM command line flags. I guarantee that unless you are actually Charles Nutter, you will find stuff here that you don't know. Especially recommended if you need to deep debug JRuby behavior.

RubyMine 2.5 has started its beta cycle. The headline feature is Rails 3 support. Normally JetBrains betas are pretty stable, but it's still an early beta.

It has been days since Yehuda Katz has clarified some corner of the Bundler universe. Here's an article about Bundler groups.

Matt Aimonetti has some thoughts on writing the MacRuby book with an open license.


Some quotes:

Pat Maddox in tweets:
Fundamental prob w/ relying on cucumber as primary test coverage is that it's meant to capture & define the business's expectations. But the first, implicit, expectation that the business has is that the software _works_. This means it's *not* AT's role to verify application works

Joe Posnanski, quoting baseball HOF pitcher Robin Roberts:

You want to be proud of your successes,” he told me, “but you want to be proud of your failures too."

Dave Thomas, quoting Ryan King from Twitter:

The one -in-a-million case happens once every 80 seconds for us

April 27, 2010, Now Writing About Cucumbers

Cucumber, Git, Kent Beck, RailsRx, RubyMine, Webrat, iPad, testingNoel Rappin1 Comment

Top Story

For me, the top story is still Rails Test Prescriptions on sale, and my discussion yesterday of the raffle for the old Lulu customers.

Book Status

Now re-doing the Cucumber chapter, which was written long enough ago that it didn't consider tags. Cucumber has had approximately seventy-million releases in the interim, so there's some writing to do. This is the first chapter where I'm adding Rails 3 setup instructions, which will eventually go everywhere in the book, of course.

Tab Dump

Have to say, RVM support in RubyMine is potentially really cool.

Kent Beck would like to analogize goat farming and software development. I've heard worse.

I know you all have been following this story closely, so you'll be pleased to know that you can now bring your iPad into Israel with impunity. Again, carrying two of them with the roman numerals I to X as wallpaper.

Macworld has released an epub-formatted, iBooks compatible, user guide to the iPad.

Webrat bumped it's version to 0.7.1.

I frequently complain that there's no good visualizer for git repositories. This fork of GitX looks like it comes pretty close, though.


I'm pretty sure I disagree with some of this article by Josh Clayton talking about integration tests being more useful than unit tests. He's probably right about integration tests being more useful for ultimate correctness, but that's not everything that TDD is about. Unit tests are critical for the development process, and writing great code in the moment of development, and for supporting design changes and refactoring. Unit and integration tests have two complementary functions, just because they cover the same code doesn't mean they are redundant.