Noel Rappin Writes Here

Bundler

August 31, 2010: Bundled Mockingjays

BundlerNoel Rappin1 Comment

Book Status



Editing the RSpec chapter, which I expect to be done today, it's all done except for a couple of hard questions from the editor which last-night me decided to leave for this-morning me, so that last-night me could finish Mockingjay. Thanks, last-night me!

A Bundler Question



I'm not sure whether this is a feature-request or an I-don't know what I'm doing request.

I've been using Bundler with a Rails 2.3.8 project, and it's been working just fine for the most part, I like it. There's one issue. The project also involves active development on a gem (so that business logic classes can be shared among multiple projects), and I'm not sure how to handle the case in Bundler.

The gem is a separate git repo. In development, the gem is specified in Bundler as a path, so that a developer can work on both without having to push the gem back to the central repo. In staging, though, the gem is specified via git based on the staging branch, and in production it's specified via git based on the master branch.

What I would like to do is specify the same gem as having different sources in different groups, something like


group :production do
"common_gem", :git => "git_repo"
end
group :development do
"common_gem", :path => "dev path"
end


But bundler won't let me do that because all it sees is the duplicate definition.

Has anybody had a similar issue? Right now, we're resolving this via checkin scripts that ensure that various branches have the right gemfile when deployed. But it's an awkward solution.

Mockingjay



Okay, I did finish it. I'm mostly amazed at how the Hunger Games books somehow became this year's YA Book That It's Okay For Grownup's To Read. (It's even got a multi-grownup book discussion on Slate). Trying to decide how I feel about the book, and this may not be the place to go on at length. Still, recommended -- even with some flaws, the series is energetic and interesting.

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.

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

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 15, 2010: The Library of Congress Recommends the Following Tweets

Agile, Bundler, Library of Congress, Pair Programming, Pragmatic, Ruby, Twitter, iPadNoel RappinComment

Top Story



As part of the Chirp conference, Twitter and the Library of Congress jointly announced that the Library will be storing Twitter's entire public archive.

I'm sure your expecting an easy joke about how many sandwiches the LoC now knows about in their archive, or about how scholarly papers about the archive will be limited to 140 characters. (Or, for a more academic joke, limited to 140 authors...) All that aside, though, I think archiving and making all this available is pretty neat.

Book Status



Still messing with Capybara and Webrat. Somewhat hampered by the fact that most of the usage of these tools is via Cucumber, so there's not a lot of documentation on them as standalone tools (particularly Capybara). Muddling through, though.

Also, the prags announced the beta release of the fourth edition of Agile Web Development with Rails.

Tab Dump



Rails Dispatch has their second post, which is another overview of Bundler and library management.

Two Ruby tip articles caught my eye. This one, by Alan Skorkin, is a complete overview serializing objects with Ruby. And here's a small tip from Ruby Quick tips about ensuring that an incoming option hash has only certain keys. I think the benefit of doing that is as much in revealing intention as anything else.

In our Agile section, we've go Nicolas Alpi reviewing what it is like to pair program. I have a half-written post on pairing floating around MarsEdit here... I'm still ambivalent about it even after largely pairing for the last six months. I think some of that is a personality thing, but I also think the idea that pairs do a better job of staying on track has been a little oversold -- it happens, but there are other offsetting issues. I really should finish that other post.

Also, part two of Kent Beck unedited and screencasting about testing. I admit I haven't watched this part yet.


And Finally,



Don't take your iPad to Israel (insert holy tablet joke here), as of a couple of days ago, the Israeli government has been blocking them at customs pending approval of their WiFi and security standards. In the meantime, those people who tried are being charged for every day the iPads sit in customs, and also agreed to pay a 16% Value Added Tax according to Israeli law.

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.