Noel Rappin Writes Here

Kent Beck

July 9, 2010: Beta 4 Released and More

Agile, Dropbox, Kent Beck, Mocha, Typing, iPadNoel RappinComment

Update



Beta 4 of Rails Test Prescriptions is now available, with two new chapters, one on Rcov and coverage in general, and one on writing better tests. Buy here.

While I'm in the self-promoting mode, the book is also available for pre-order at Amazon and other exciting locations.

More Promotion



And while I'm here, I should mention that Obtiva has updated their training schedule. Obtiva offers a 4-day Boot Camp for learning Rails and TDD that will next be offered August 2nd through 5th. There's a brand-new Advanced Rails class that will be August 30th through September 2nd, and a version of the Boot Camp that meets weekly on Mondays starting September 20th.

Obtiva also offers private versions of our courses. See http://www.obtiva.com for more info.

Links



For some time, Joe Ferris had a fork of the Mocha mock-object tool that allowed mock spies, which let you separate the definition of a stub from the expectation of how the stubbed method will be called. This makes it easier to use mocked objects in a single-assertion test structure, and also makes mock tests easier to read. Anyway, Ferris has split out the spy part in a separate gem called Bourne, which should be easier to install alongside the standard Mocha gem. Yay.
(via Larkware)

Corey Haines would like us all to learn to type better, and toward that end is starting a community event for next week (July 12-18) for some collective support for learning. For as much as "Typing is not the Bottleneck", which is true but not necessarily germane here, my experience is that programmers who are not great typists tend to be much more concerned with making their code concise at the expense of readability. Anything that eliminates friction between your head and the code is basically a good thing. (For the record, I mostly touch type, but I could stand to get faster and more accurate.)

Kent Beck has finished up his series on survey results about practices with a post on commit frequency and one on general practices. The general practices one is interesting, showing that about 50% of all respondents claim TDD, while about 70% claim to use iterations.

All of which sort of reminds me... a few years ago, when I worked at a major telecom company with a reputation for major waterfall development, I attended the "agile" track of an in-house seminar on software techniques in use at the company. Everybody in attendance there claimed to be agile, but only about 1/3 (by show of hands) were doing any kind of automated testing. It was, to say the least, a weird flavor of Agile. But I guess, you do what you can do and what works for your team.

Finally, I've been yammering here about iPad text editing and Dropbox for a few weeks, so I should mention Droptext, which seems to be the first iOS editor that saves and reads from Droptext. It's rather minimal at the moment (and kind of crashy), but I suspect the mere fact that it reads Dropbox files means that it's automatically useful.



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.

Links



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.

Finally



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...

July 6, 2010: Opinions are Bad For Business

Kent Beck, Rails, Ruby 1.9Noel Rappin1 Comment
The title, by the way, is from a favorite scene in a favorite movie.

Status



Now definitely working on the "dealing with legacy code" chapter, which I am hoping will be substantially more useful than the Lulu version, in that it will cover a few more techniques.

I should know later today what the timeline is for beta 4.

Links



Let's see what we've got today.

Nick Quaranto over at Thoughtbot wants you to stop leaving time bombs in your tests. The answer is to use Timecop, or set dates in your tests implicitly. Be sure and check out the comments for some other good ideas.

Kent Beck has the results of a poll on how often teams deploy to production and how often teams run their functional tests. The deploy results are pretty interesting in that more teams deploy far less often than I might have expected.

So I'm still finishing up a post on pairing, but I did want to point out what Will Read suggests, which is that in a pairing environment, developers have more choice over what they do and who they work with. Hmm... that reflects well on Pivotal. My experience is being able to choose is somewhat team dependent. I've certainly seen paring environments where the developers didn't feel like they had much choice in day-to-day tasks.

Ruby 1.9.2 release candidate 1 came out over the weekend, and we're getting to a point where we're not going to be able to ignore it any more. And by "we", I mean "me". Apparently they keep sneaking in new methods into Enumerable, ranging from the nifty to the seemingly insane. I won't say which is which, though, go guess for yourself.

Back over at Everyday Rails, Aaron Sumner has a nice set of sensible advice for going from beginner projects to real projects. I'd be linking to it anyway -- the fact that one of the pieces of advice is to buy my book is just gravy.

I think this post by Xavier Shay is mis-titled. It's called, "The Perils of Opinionated Software (like Rails)", but in argument, it's more like "Rails Doesn't Share My Opinions About Database Constraints". As it happens, I don't agree with Shay, but then I'm probably not sufficiently enterprise-y. Or, to be more specific, I do agree that database constraints can do what he says and that is sometimes useful, but I'd argue that there is also a cost involved with relying on database features (infrastructure lock-in, more complicated to set up test data, business logic distributed across levels) that I've generally found kind of high. This would make a very interesting debate with somebody who is heavily into a NoSQL database.

July 1, 2010: Screencasts and Road Maps

Kent Beck, Passenger, Ruby, autotestNoel RappinComment
A lot fewer links today. Yesterday, by the way, the most clicked on link was the "Don't do this" like to the method_missing nil post.

Book Status



Handed another draft of the Rcov and Style/Test Quality chapters in. Expecting that to be the next beta next week, but we'll see.

Links



Kent Beck has a screencast series on TDD from Pragmatic. I linked to the rough version of this some time back. Haven't gotten the time on this yet, but expect a fuller review later on.

BJ Clark has an essay on whether acceptance tests should be written by developers or by interaction designers. Classic XP is pretty clear that customers should be involved in this process, but that's not often feasible in reality.

Tim Bray proudly announces that he has never learned the precedence rules in any language he's used. I am in complete agreement with this -- the only reason I know the Ruby ones is from writing about them.

Ryan Davis asks about having a special refactoring mode to change Autotest behavior after failing tests pass. My first impression is that this proposal might be too fiddly, but I think there's something in the basic idea.

Two recent posts about large code bases caught my eye. Sandy Walsh, from January, and Michael Feathers, from this week.

Part 2 of the Teach Me To Code Rails 3 screencast is up.

Finally, the Phusion team has another road map article, including a Passenger light that can be used in development from the command line as you use mongrel or thin. And other deployment features, as well. Cool.

June 1, 2010: June, she'll change her tune

Chicago Ruby, Cucumber, JRuby, Kent Beck, RSpec, iPadNoel RappinComment

iPad Note



I keep wanting to write about the iPad, but so, so many other people are writing about it that I'm not sure I have anything to add. More or less at random, I really liked the brief rant Joe Posnanski added in the middle of an otherwise-unrelated blog post, and Charles Stross' typically complete take. Right now, I just would add that I still use it more than I thought, that the form factor makes more of a difference than I expected (being able to easily walk to show the screen). Also, I'm somewhat idiosyncratically waiting for turn-based strategy games to pop up for it, along the line of Avalon Hill's old games -- the thing is perfect for them.

Today



One last reminder of today's Chicago Ruby meeting featuring Matt Polito talking about Git, and me talking about testing.

And then



Looks like Kent Beck has gone and evolved the Agile Manifesto at the Startup Lessons Learned conference. This moves in the direction of what Beck has been calling Responsive Design.

Sarah Mei has a really nice example of outside-in BDD going back and forth between Cucumber and RSpec. Very nice overview of the process.

Ruby 1.9.2 preview 3 is out and available via RVM. Also over the weekend RSpec 2.0.0 beta 9.1 was released.

Charles Nutter has a long technical examination of performance in JRuby.

May 13, 2010: The Rules of Agile Estimation

Agile, Apple, Estimates, JRuby, Kent Beck, Newton, Potterverse, RailsConf, iPadNoel Rappin1 Comment

Top Story


JRuby 1.5 is out. Highlights include improved Rails 3 support, better support for Windows, better FFI support, better startup time (yay!) and a lot of other tweaks and fixes.

Book Update


Still Cucumbering, hope to finish today.

The book is still on sale, of course. And I'd still love to see more comments in the forum.

I'll be talking at Chicago Ruby on June 1, exact topic TBD (let me know if you have a preference), but I'm leaning toward talking about how to avoid test problems and write good, robust tests.

And Then...


As an unrepentant old Newton fan, I loved this compare and contrast of a recent iPad ad with an old Newton ad. The Newton, flaws and all, was way ahead of the market back them.

If you are going to RailsConf, first of all have fun and wish I could be there. Second, if you are wondering about the difference between the two Rails 3 tutorials, wonder no more.

Kent Beck is publishing some old pieces again, including one about how the original XP book made the mistake of equating "the team" with "the developers".

Fred and George Weasley are marketing experts.

And Finally


The Rules of Agile Estimation:

1. Estimates are always wrong

2. If you think spending more time on estimates is a good idea, see rule 1.

3. On average, an experienced developer is not going to improve on his or her gut reaction by thinking it over.

4. Team estimates are important, one person may see something that everybody else missed. Just keep it quick.

5. People are much better at estimating size relative to each other than absolute time a task takes.

6. Separate the problem into smaller chunks, the more estimates you make the better the chance that the law of averages will help you.

7. Decomposition into roughly equal sized tasks is pretty much the whole ballgame.

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.

Finally



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.