Noel Rappin Writes Here

Yehuda

August 26, 2010: Some New Stuff

JavaScript, Ruby, WindyCityRails, Yehuda, rvmNoel RappinComment

Book Status



RSpec chapter draft handed in to edit. It's going to need a better conclusion. A lot changed in this one, relative to the Lulu version -- this is probably the chapter most affected by my own personal experience since it's original version.

Links



Haven't done a link set in a while, this is going to be kind of random.

Still seats available for both WindyCityRails in general, and for my tutorial in specific. But the sponsor list has filled up.

Motorola bought 280 North, best known for their Cappuccino JavaScript framework, and the 280 Slides application. Apparently, Motorola plans to use them to make web apps aimed at Android devices. Should be an interesting culture clash.

I've been looking through the Rails 3 unobtrusive JavaScript stuff trying to figure out new practices. The Trevor Turk blog has a code snippet for setting up a form that submits when a checkbox is clicked. Like it. Love to see more examples like this, it really shows how clean the Rails 3 structures will be.

Ever wish the Ruby Date and DateTime classes were faster? Course you have. Here's home_run, a C implementation of the Date and DateTime classes that claims a 20 - 200 time speedup. The Readme page shows how to use the home_run classes instead of the standard ones, if you are feeling adventurous.

I love stories of tracking down obscure bugs, and Yehuda Katz has a great one about bundler, rvm, and various shell interactions. Debugging is maybe the important skill, so watch an expert's process at work.

Speaking of rvm and it's awesomeness, here's a quick guide to putting rvm, bundler, and passenger together on a Rails deploy.

Here's a little test snippet to solve the problem of how to test an abstract controller by adding a small controller in the test page and creating a route for it.

August 3, 2010: The Most Efficient Cargo Cult Money Can Buy

Passenger, Rails 3, Yehuda, rvmNoel Rappin1 Comment

Book Status



Spent yesterday's book time rearranging the Shoulda chapter so as to be more focused on the general ideas than the specific Shoulda interpretation. Today's job is making sure it all still flows.

Links



So I have something like a half-dozen half-finished blog posts. Until the day some of those become fully finished, here's a few links.

Simone Carletti has list of practices to follow in your Rails 2.3 app to make it more compatible for an eventual upgrade to Rails 3. I literally just used this article yesterday, building a new Rails 2.3 app with Bundler, rails_xss, and a couple of other nifty things.

Yes, that's why I tweeted yesterday about the awesomeness of RVM. It was the first time I needed to keep Rails 3 and Rails 2 on my system, so the first time I created a project specific gemset -- you can find some articles with instructions in previous link posts. Easy to create, easy to share, easy to set up everybody's development environment.

This list from Istvan Hoka of Mac OS X tools for Ruby development is a little quirky, but a good overview of what's available.

I really want to start using Passenger 3. A couple of days ago the Passenger team released another preview post with more cool features. They deliberately bury the lede, though, as they close the post with a strong hint that some of the features will be held for a premium for-pay version. More power to them, I say -- free plus paid extras sounds like a good model for them.

Following up on the gems he released a few days ago, James Golick describes his rollout tool for conditionally adding new features. It uses Redis to determine user status for the purposes of conditionally executing code.

I thought about this tweet from Yehuda Katz for a while:



Am I crazy, or is it too easy to cargo-cult crazy practices from StackOverflow, resulting in compounded problems and error reports?



I see where he's getting this, but I'm not sure that Stack Overflow is all that qualitatively different than picking up advice on the internet in general. It's just a more efficient way to cargo cult, which would make a great slogan.

July 30, 2010: I Always Thought It Was An Animal Native To The Rain Forest

Bundler, Cucumber, Ruby, Time, Vim, Yehuda, unixNoel RappinComment

Book Status



Beta 5 came out on Wednesday. Currently trying to figure out how to structure the Shoulda chapter in light of the direction that project has gone in since I wrote about it for the Lulu book.

Friday Links



One significant change in Rails 3 is that, because of the way Bundler works, the code for your gems is not part of the project. And if you are using RVM, each project might have a different gemset, and different directory to find those gems. Brian Cardarella has a simple script that will open a new tab in your terminal window and take it to the gem directory for the current project. OS X only, because it uses AppleScript. I will use this.

Mike Burns from Thoughtbot gives us a just-so story for the digital age, How grep got its name. I always thought it was the sound you make when you try and figure out how to use it, "Oh Grep!"

Derek Kastner of Brighter Planet has an interesting look at how to use more advanced features of Bundler to to manage gem dependencies when building a gem, and creating the gemspec. Definitely something I would not have figured out on my own.

Matt Aimonetti, after doing a little Ruby memory quiz/rant on Twitter last night has published a longer blog post about Ruby's object allocation. This is interesting, and makes me wonder if it would be possible to build a Ruby runtime optimized for long-running processes. Still, make it work, make it right, make it clean, only then make it fast -- it's much easier to optimize clean code.

Louis Rose has a short snippet or three on using Timecop and Chronic to manage time-based Cucumber scenarios. Read through to the updates to avoid a couple of gotchas. Chronic, by the way is one of my favorite gems to use in projects, because clients often like the demo of being able to type in "next Tuesday" in a date field.

Finally, Yehuda Katz has what is maybe the first "I switched to Vim" story that makes me actually think about switching to Vim. Seems like a useful approach and set of tips.

June 14, 2010, Practice makes less imperfect

Authlogic, Coulton, Mongrel, Rails 3, Shoulda, Steve Jobs, Yehuda, testingNoel Rappin1 Comment
Still catching up on links. The PeepOpen review has morphed into a larger IDE/TextMate piece, hoping to finish that today.

Book Status



Still working on the renovated Style chapter, which will probably combine the chapters that are in the current Table of Contents as "Testing Style and Structure", "Fix Slow Tests", "Rcov", and "Help! My Test Is Failing". The chapter on Legacy testing will remain a separate chapter -- I get asked about how to test legacy projects all the time.

What happens at that point kind of depends where we are on page count -- there are two chapters left that are basically unwritten (Selenium, performance testing), and two chapters that are written but need to be brought up to date (Shoulda, RSpec). Probably more information on this line later this week.

Today In Links



Liked this article from Naresh Jain about deliberately practicing TDD on sample problems to get better. Not sure if I've mentioned it here, but Project Euler is a great source of sample problems if you are mathematically inclined.

I suppose it was inevitable that somebody would write about Steve Jobs' presentation style in the wake of the network issues during the iPhone keynote last week. Still, good advice, even if they handwave over the most useful helpful bit -- "an adoring crowd".

Yehuda posted a short gist about implementing the "acts_as" pattern more simply then is usually done.

Thoughtbot posted a list of the Rails 3 compatibility status of all their open projects. Yay! Most relevant for my immediate purposes, Shoulda has a new release with Rails 3 support and "some dramatic changes". Though I couldn't quite see from the history what they meant. More details coming.

In other Rails 3 news, Jhimy Villar has a workaround for a Rails 3 issue affecting Authlogic. I'm seriously considering moving the Rails Test Prescription examples to Devise on the grounds that a) it's already Rails 3 compatible, b) it seems to have fewer setup steps and c) it seems to stay out of the way a bit more, which is a big plus for my purpose.

Did not mention this last week, but RubyConf X will be Nov 11 - 13 in New Orleans. Never made it to a RubyConf.

Zed Shaw has announced the Mongrel2 project, which is a complete redesign of Mongrel. Not much there yet, but watch this space.

Finally



In an interview with Think Geek (via GeekDad), Jonathan Coulton says that the new album he's been teasing for a bit will be produced by John Flansburgh of They Might Be Giants. That should be fun.

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.





June 2, 2010: How To Test Good

Apple, Chicago Ruby, Me talking, Rails 3, Yehuda, nodeNoel Rappin1 Comment

Yesterday...



Gave my talk at Chicago Ruby. The video is already online -- yay Chicago Ruby team. I was pleased with it, actually, I did pretty much what I hoped to do, except that I thought the repetition joke would get a bigger laugh.

In other news



Yehuda Katz posted slides on another Rails 3 talk: dashing to the finish.

Speaking of people on stage, Steve Jobs was interviewed on stage at the D conference yesterday. Among other, more important things, Jobs admitted that the initial iPhone-ish prototype was tablet sized.

Saw this on Twitter just now, and it looks nice -- a node based console app for speaking HTTP. Looks like that'd be handy in almost any web development toolkit.

David Turnbull has a new Tumblelog called I Suck At Ruby, looks like he's got some useful short bits and good advice for sucking less. I've also got Everyday Rails, by Aaron Sumner (Tip to everybody: make your actual name more prominent on your blog...) Both of which remind me that it's time I put more original content here...

May 20, 2010: Fontastic

ActiveRecord, Font, Google, Rails, Ruby, Unicode, Yehuda, testingNoel Rappin2 Comments

Book Status



Starting to sound repetitive. Still working on the Cuke chapter, this time focusing on cleaning up the parts where I recommend ways to use Cucumber. Still hoping for a beta early next week.

Other things



This week in Yehuda, there's a very long article about text encodings and what problems they have, and in particular how Ruby's implementation is shaped by the complicated relationship between Unicode and Japanese.

I'm not completely sure I endorse this mechanism for using models in migrations, but I'll mention it in case it solves a problem for you.

Jake Scruggs, blogging up a storm, today on using code in interviews. This is something that seems to have come on very quickly as a best practice. In my (admittedly quick) job search in 2007, I was never asked to do this. By 2009, it was pretty common, and I had to do several code samples, either before or during interviews. (For Obtiva, I had to pair program with Dave Hoover. In Python. Which I hadn't used seriously for about three years.)

Quick note on how to stub paperclip during testing to avoid dependencies on ImageMagick, which seems a noble goal.

Thoughtbot has a very nice article showing the implementation of search functionality.

Last but not least



Google WebFonts. Which seems to be a new, free, set of fonts that you can link to from your app, and just use. Not a huge selection at the moment, hopefully more coming.

May 14: Moving To Beta 3

Cucumber, Git, HTML5, Rails 3, RailsRx, YehudaNoel RappinComment

Top Story



Just a quick update here.

Cucumber chapter newest draft is complete, and I'm hoping it will be beta 3 early next week. Not sure what to do next, I need to look around and see what's relatively stable with respect to Rails 3.

The book is still on sale. Tell all your friends.

And then



Rails Dispatch this week is about the new routing in Rails 3.

Yehuda Katz has a really nice article on workflow with git.

A brief rant on Ruby 1.9 and encodings.

Finally



The excellent Dive Into HTML 5 book/site has a quick reference on how to detect all kinds of HTML 5 related browser behavior. I'm pretty sure I'll be coming back to this page again.

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.

Finally



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

May 6, 2010: The day of promoting stuff

Cubbies, Dropbox, JRuby, Mac, MarsEdit, Pragmatic, Rails 3, Ruby, Yehuda, xkcdNoel RappinComment

Top Story



I'll mention somebody else's book, but don't worry, I plan on doing it in a totally self-absorbed kind of way. Pragmatic released Using JRuby into beta yesterday, by the core JRuby team. Looks good, interested to see where they go with it.

Because I'm me, I can't help but compare the structure of the book with the Jython book I did. Biggest structural difference so far is that we were unable to assume a Python-savvy audience, so we felt we had to awkwardly teach Python for 100 pages at the start of the book, where as the JRuby book is able to teach Ruby in an Appendix. Good luck to the JRuby team, and I'm looking forward to seeing this one all the way through.

Book Updates



In the spirit of an old Chevy Chase routine, Rails Test Prescriptions is still on sale. There's a forum, which is still largely empty -- I'd love some feedback.

Worked on the integration and webrat/capybara chapters, cleaning them up for beta 2.

The May, 2010 issue of the PragPub is out with my article about mocking, among other, cooler stuff.

And Then...



Today was a big day for updating software I use every day. If this blog post looks extra-shiny, it's because I'm using MarsEdit 3, which I've used for every blog post I've written for several years. New stuff includes a rich text editor and better HTML syntax highlighting.

I also upgrated TextExpander and iStat Menus.

Matt Polito discovered that the Rails 3 API can be found at http://edgeapi.rubyonrails.org/. He did not know this. Neither did I. Neither did you, probably. Now we all know.

You probably do know about Rubular, which is an outstanding online tester for Ruby regular expressions. I just wanted to point out that it's really cool.

If you aren't using Dropbox, you should start right now -- it's an outstanding backup tool. (Man, I'm plugging a lot of commercial stuff today for some reason). Anyway, there's now a Ruby library for the brand-new Dropbox API.

Also from Ruby Inside, a nice overview of three newish date-time libraries. Tickle, in particular, looks handy.

And in Yehuda news, a nice overview of Ruby 1.9 and character encodings, and in a completely different mode, a jQuery plugin for using HTML 5 offline data support.

Finally...



Randall Munroe at XKCD did a big survey asking people to name colors, and the results are really cool.

Will Leitch has a new book about baseball and dads, and this excerpt from Deadspin is all about the famous 2003 Chicago Cubs playoff loss. Since I'm a Cubs fan who loves reliving painful moments, I read it. Leitch gets the flavor of the game down correctly. As a Cubs fan, what I remember most strongly about when that ball dropped, was thinking "Oh, that's how we're going to blow this game" -- the play was important mostly in getting across the idea that Weird Stuff was afoot.

April 22, 2010: Annnd We're Live. Really. I mean it this time.

Bundler, Cucumber, Pragmatic, RailsRx, YehudaNoel RappinComment

Top Story



So, about yesterday... Funny story.

Some of you may have gone to the Rails Test Prescriptions book site hoping to buy the book only to see a conspicuous lack of an "Add to Cart" button.

The book was for sale for about ten minutes, just long enough for me to start jumping up and down about it, then was pulled due to some issues with the ebook files. I heard that the famous PragProg ebook generating gerbils went on strike, but that's just a rumor.

Anyway, the book did go back on sale somewhat latish Wednesday evening, (although a lucky few of you may have gotten more chapters than we originally intended to be a part of this beta, all the chapters will get there soon enough). Thanks to Colleen Toporek, my editor, for helping work through the process.

Also thanks to Matt Polito, whose been saying for weeks that he'd be the first in line to buy the book when it came out. And I can prove he was -- only one person managed to buy the book in the brief window it was online in the morning.

Now, though, I can tell you for sure: the book is up, I like it, I hope you like it, too. Buy early, and buy often.

Book Status



Finished up a draft of the article for the PragMag, hopefully that'll be in the May issue.

Tab Dump



Continuing the Pragmatic theme, here's an interview with Dave Thomas, that I haven't listened to yet. Looks like that'll be a two-part interview when all is done.

Yehuda Katz has another great bundler article, this one on named gem environments.

Cucumber released a beta of version 0.7 promising much, much faster parsing of feature files. Among other things, that makes using tags much more practical. Time to revisit that chapter, I think.

Finally



Jason Seifer and Peter Cooper talk about ugly old programming book covers, then create their own. If you've followed Jason for a while, I think you'll agree that his book contains all of his received wisdom on how well Rails can scale. But, guys, I don't think it gets worse than my face on the cover.




April 19, 2010: The Week Begins

Bundler, HTML5, Rails, Rails 3, RailsRx, Ruby, Yehuda, iPadNoel Rappin1 Comment

Top Story/Book Status



This is the week -- Rails Test Prescriptions should go on beta sale on Wednesday.

In a related story, railsrx.com now points to here, railsprescriptions.com also will shortly. I'll be adding some basic about information and static pages here. At some point, I'll probably bring over any blog content from the previous site that still seems relevant. I'm not sure if the original free version of Rails Test prescriptions will still be available (it's becoming out of date, and there will be free samples available at Pragmatic), but I will make it available if anybody is still interested.

Tab Dump



Reg "raganwald" Braithwaite has a brief article on why Ruby needs blocks separately from lambdas, how blocks differ, and when that difference is useful.

A double dose from Yehuda Katz: A slideshow titled "Making your OSS project more like Rails", with some interesting insight on what makes Rails work as a project. And another Bundler article addressing the issue of why Bundler appears to work differently based on the ordering of gems within it. (Short answer: it's exposing dependency issues in the gems themselves.)

Over at Envylabs, they announced a new gem called Census, which allows you to gather demographic-style data on your users and then search for data based on their answers.

Another Rails 3 intro, this one at IBM Developer Works. I've written Rails stuff for them in the past, but I didn't write this one.

Here's a nice slideshow in HTML5 that shows off the new features of HTML5.

Finally



NetNewsWire has quickly become one of my indispensable iPad apps. The developer, Brent Simmons, in an attempt to discuss software development, has posted a number of pictures from various stages in the design and implementation of NNW-iPad. Thanks!

April 13, 2010: iAd, youAd, weAll Ad

Agile, Apple, Bundler, JRuby, Ruby, Yehuda, iPad, standupNoel RappinComment

Top Story



iPads. Lots of them popping up in and around work. Probably some more coherent impressions coming later.

Wait, once again, Twitter has a big announcement after I start writing this. This time, they are going to start placing ads in the Twitter stream in various ways to be announced today. My quick reactions: a) I long suspected this day was coming, b) if the ads in clients are any guide, they aren't particularly burdensome, c) implementation details will decide how irritating this is.

Book Status



Still working on Webrat and Capybara. Still waiting for a cover. Somewhat doubtful that the beta will happen this week, but I haven't been told that for sure.

Tab Dump



Charles Nutter puts out an open call for help with the pure Java port of the Nokogiri XML parser for use with JRuby.

Confused by ==, equal?, and === in Ruby? You won't be after this article.

Hey, it's another big-time Agile founder: Ward Cunningham being interviewed. Pull quote: "When you're doing it well it feels a little plodding, you're not racing ahead like you might do on your own. But what happens is that it never slows down." Can I get that on a T-Shirt?

Yehuda Katz is turning his attention to more Bundler documentation, with two articles that went up as I started typing this. The first one lays out the problems bundler tries to solve, and the second talks a bit more about problems specifying the order of require statements.