Hey, if you like this post, you might like my recent books: “Modern Front-End Development for Rails” (Ebook) (Amazon) and “Modern CSS With Tailwind” (Ebook) (Amazon). If you’ve read and enjoyed either book, I would greatly appreciate your help by giving a rating on Amazon. Thanks! When last I talked about the Elmer project tracker, I was talking about Ruby magic and singing the praises of StringInquirer. I was expecting some pushback on the Ruby Magic™, but didn’t get any, so I threatened to do something really weird, like implementing an API for getting project history with something metaprogrammy and dynamic, like project.
A quick program note: If you like this newsletter, you might like my recent books: “Modern Front-End Development for Rails” (Ebook) (Amazon) and “Modern CSS With Tailwind” (Ebook) (Amazon). If you’ve already read and enjoyed either book, I would greatly appreciate your help by giving a rating on Amazon. Thanks! In my last post, I refactored the status field for cards in my project tracker to a more object-oriented representation that used value objects and classes to replace conditionals throughout the code.
For the first time in quite a while, I’ve been able to spend time working on a brand-new Rails application that’s actually a business thing and not a side project. It’s small. Okay, it’s really small. But at least for the moment it’s mine, mine, mine. (What was that about collective code ownership? I can’t hear you…) This seemed like a good time to reflect on the various Object-Oriented Rails discussions, including Avdi’s book, DCI in Rails, fast Rails tests, Objectify, DHH’s skepticism about the whole enterprise, and even my little contribution to the debate.
The problem with sitting on these daily link posts is that the links go out of date. Sigh. Here are some links. Twitter 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.
Top Story As you probably know, both Rails 3 and Bundler went final over the weekend. The Rails 3 release notes are up, as well as extensive coverage on the Rails Guides page. I’ll also mention Jeremy McAnally’s Rails 3 Upgrade handbookhttp, and Gregg Pollack’s list of great Rails 3 documentation sources. And, just for the hell of it, here’s the post I wrote back when Rails 3 was first announced.
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.
Book Status Shoulda chapter fixes made. The next decision is whether to push that as a beta by itself, or wait until the RSpec chapter is also done. Also Today is the last day to get early bird pricing for WindyCityRails. Book Status I did not know that Ruby 1.9 had its own coverage tool. Aaron Patterson shows how to use that tool and a little code to create useful output for coverage testing.
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.
Status Not much to tell, really. Spent some time getting RVM set up, since I think I’ll need it to manage simultaneously building the Rails 2 and Rails 3. Now I have a working version of the startup appendix that uses Rails 3 and Devise. I can’t speak to using Devise in practice yet, but the immediate goal of making the setup less complicated was definitely accomplished. The big question now is how much to support Rails 2 in the walk-through chapters.
And Now A Word The schedule for WindyCityRails 2010 just came out. WindyCityRails is Saturday, Sept, 11 at the Westin Chicago River North. I will be running the PM tutorial session on “Testing in a Legacy Environment”. I am frequently asked how to start testing on a pre-existing code base with no tests. In this session, we’ll start with a made-up “legacy” code base, and discuss techniques for adding tests, and fixing bug, and adding new features in a test-driven way.
Book status Still writing the legacy chapter. Totally coincidentally, Michael Feathers, author of Working Effectively With Legacy Code, just wrote on an issue similar to what I’m dealing with right now: The Bad Code Kata. I imagine Feathers had a similar problem when writing his book about legacy code. An Apple Comment A Day So Apple is apparently holding a press conference Friday about iPhone 4, although they haven’t officially confirmed that it’s about the antenna issue.
Book Status Still working on the legacy chapter. The sidebar here is that deliberately writing bad legacy code for purposes of using as examples in a book is a little challenging. It’s got to be tangled enough to make the point that it’s hard to clean, but small and clear enough to work in the context of a book example. My tired brain was fighting it last night. Training! I mentioned this recently, but I want to mention it again.
Status Back to link posts today. The book is still lurching forward on the legacy chapter. Thanks to those couple of you that asked questions on the forum and made it look a little less lonely over there. Quick Review Quick iPhone 4 impressions, but understand that I haven’t actually, you know, used it yet, just took it home and set it up. The screen sharpness really is notice able.
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.
The end of the repair story At the end, a very positive experience with Apple support. The repair was free, done when they said it would be done, and all told, I spent less than fifteen minutes in the store between both halves of the visit. Plus, they replaced the top part of my pre-unibody MacBook, which was worn down and discolored from my gunky hands, almost as though they didn’t want an ugly Mac in the field.
I think a link post today… Book Status Still working on the style section, for some reason it’s going grindingly slow. The plan for beta 4 is the new style chapter, probably the legacy coding chapter. Also on the slate is updating the sample app to use Devise, which had a large constituency when I floated the idea the other day. Oh, and I haven’t had the link up in a while.
Okay, There’s a New iPhone Don’t really have a whole lot to say beyond what’s already been said. It looks very slick, and if anybody can actually pull off getting people to use video chat, it’s Apple. The form factor of video chat from a phone seems at first glance to be significantly better than from either a laptop or the iPad, in that it seems easier to hold the phone in a position to get a good angle.
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.
Short today, but preparing some longer, more rant-y bits for the future… Book status Not much forward motion for the next few days, as I have a lot of other stuff to do, including preparing for Chicago Ruby on June 1 and doing a bit of touch-up on Obtiva’s 4-Day Ruby on Rails/TDD boot camp. All fun, but time consuming. Some Links A quick tutorial by Peter Cooper on setting up JQuery in Rails 3.
I think we’re going to be even more random then usual today. Here goes: If you downloaded the epub version of Rails Test Prescriptins beta 3, then you may have noticed that the promised Cucumber chapter isn’t there. The PDF is fine, and I have no idea about the mobi version one way or another. If you were affected by this, please go back to the Prags site and grab the file again, it appears to have been fixed.
Top Story Beta 3 should be out today. The main change in this Beta is the inclusion of the Cucumber chapter, which has been updated both in terms of new tech, and also in terms of conclusions about how to use Cucumber. And In Rails news… When last we met, Rails 2.3.6 had just been released. Well, in the intervening 24 hours, we’ve bumped all the way to 2.3.8, with two bug fix releases, explained by Jeremy Kemper here and here.
Top Story Rails 2.3.6 released, with more changes than I expected, taking it just a little bit beyond a bug-fix release. Follow the link for the full release notes. Things that caught my eye: Looks like they made an official plugin to give Rails 2.3.6 the default HTML safe behavior of Rails 3. Although the note is vague and I could be misunderstanding. Alert and notice are now separate methods rather than just being keys on the flash.
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.
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.
Top Story If you think the top story is going to be anything other than the continued launch of Rails Test Prescriptions, well, you probably don’t know me very well. I may not be a marketing genius, but I do know the value of repetition. I mean, if there’s one thing I know, it’s the value of repetition. Thanks to everybody who made yesterday fun: those of you who bought the book, those of you who blogged or tweeted about the announcement, and anybody who read this.
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.
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.
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.
A couple of recent life, the universe, and everything notes: I realize I’ve been away from here for most of the last couple of weeks – a side project has been eating up a lot of time. I should be done with in next week, and back to posting here more regularly. I know, I always say that. I’ll be at RailsConf 08 later this month, and I’ll probably have some number of copies of Professional Ruby on Rails to do something promotional with, but I haven’t exactly decided what.
New post at Pathfinder on monkey patching.
Amazon is now saying that Professional Ruby On Rails is in stock! I haven’t seen my copies yet, and I suspect Amazon purchases will actually go out next week, but it’s a real page and everything. The link to purchase is right here. I’ve also added a [running list of errata and updates](https://docs.google.com/Doc?docid=ah2szrczrmxv_26z j8npddd&hl=en). Check back on that every now and then. Much more on the book over the next week.
As I’ve mentioned here a few times, I have a book coming out, “Professional Ruby on Rails”, available later this month. If you’d like a sneak peek, Wrox has put some samples online as PDF files. You can also just buy the book. Chapter 1 – This sets up the sample project used in the book, and talks about the new REST features in Rails. Table of Contents – Take a look at this to see if your favorite topic is covered.
In response to the commenter who asked if there was going to be a beta book. UPDATE: Clearly I should ask about these things before I post. Jim Minatel from Wrox added the following in comments: There will be a PDF about six weeks after the print book, meaning end of March or thereabouts. There will also be an Amazon Kindle version, eventually. Also after 6 weeks, the book will be available via Wrox’s online subscription service: http://wrox.
Some things I learned about Rails and writing while working on this book: The great benefit of working on a project like this book is that it enabled me to compress about two years worth of research into Ruby and Rails tools into six months. In my case, this was a great opportunity to really dig into some tools to find that I’ve only been using a fraction of their power and also really get a sense of how elegant and flexible the tools are.
Two things on the Pathfinder blog. Agile Publishing, on publishing experiences and agile methods. Live Ruby: Testbed, an attempt to work through a small test and metaprogramming problem live and on the blog. Enjoy.s
A few things I forgot to put in the last book update: The Amazon listing has the book at 600 pages. That’s almost certainly optimistic. The contract calls for 400-500. As far as the schedule goes, I’m currently hoping to turn the complete draft in on October 26th, which is about ten days after the original date. The publisher says that pushes publication out to April, six to eight weeks after the original date.
I was fortunate enough to attend Pragmatic’s Rails Edge mini-conference here in Chicago last week. I have two blog posts up on this at Pathfinder, the first is made up of quotes from my notebook, and the second is some general thoughts. Enjoy.
Sorry for the radio silence for the last week or so, but I was waiting to be able to announce this: Today I started a new job at Pathfinder Associates, as a senior software engineer in charge of Ruby on Rails projects. Needless to say, I’m thrilled to be back in the Web game professionally, and even more thrilled to be working on Rails projects. Everybody at Pathfinder has been super great so far, and I’m looking forward to doing exciting and fun things.
I posted a version of this to JJ Behrens’ Blog post about Ruby, and decided it was probably worth also posting here. I use and like both Ruby and Python, here’s why… Things I like about Ruby with respect to Python I think Ruby is the only language that gets accessors right. The thing you want to do 95% of the time – simple access – is trivial, and the thing you want to do 5% – something fancy in your accessor – of the time is a pretty easy override.
Three posts that caught my eye today. Ruby School Gregory Brown over on O’Reilly net has an article about using Ruby in Computer Science courses, at least in later algorithm classes. It’s not a bad argument, but I think it’d be more convincing if the Ruby example was a little cleaner and easier to read compared to the pseudo-code. Let’s see… The last time I had to care about this issue was about eight years ago when my grad institution was going through a somewhat controversial revamp of the CS curriculum.
TextMate has what seems to be a very nice blogging bundle for programmatically sending posts to your blogging engine of choice. Except that it doesn’t work for the new Blogger API. Or at least it didn’t the last time I checked. Mostly I just wanted to see if I could write my own script to send to Blogger. This is a Ruby script based on the Python script located at http://djcraven.
Now two of the big Java IDE’s are promoting Ruby language tools as a big thing. IntelliJ has a plugin in early beta, and NetBeans is also making a big deal of their new early beta support. Eclipse has had a Ruby/Rails plugin for about a year or so. This is weird, weird, weird, that suddenly all the Java tools would feel the need to grow into somewhat ill-fitting Ruby IDE’s (Eclipse has always styled itself as more of a meta-IDE, so that’s a little less strange).
Continuing in the getting to know you kind of vein, I thought I’d ground some of what I say by talking about the three programming languages that have made up the bulk of my professional and hobby work for the past five years or so – Java, Python, and Ruby. Java: I’ve been programming Java since either just before or just after the 1.0 release… can’t quite remember at this point.