Noel Rappin Writes Here

trdd

Monday Morning Me: October 7

Rails Test Prescriptions, trddNoel Rappin1 Comment

Monday Morning Me

I’ve skipped a few Monday Morning Me’s due to Ruby DCamp and a couple of other things. DCamp was awesome, and maybe beyond my humble ability to do a trip report. In the meantime..

Rails Test Prescriptions

Ground has been broken and progress is being made. Not a lot of ground, and not a lot of progress, but ground and progress nevertheless. So, yay, that.

When last I wrote about this, I was debating whether to use MiniTest or RSpec as the main test framework for the book. After a couple of impassioned pro-MiniTest pleas at Ruby DCamp last week, I’ve come around to the idea that MiniTest’s availability and simplicity trump RSpec’s mindshare and ecosystem, at lest for teaching purposes.

However…

The first real code section of Rails Test Prescriptions is a TDD walkthrough of adding a first feature to a new project.

One of the guiding principles of the book is that I want the advice and techniques to reflect effective practice, or at least effective practice as I understand it.

My normal practice for adding a new feature would be an outside-in approach: write an end-to-end test describing the new behavior, then fill in logic with focused unit tests. Normally, I would use Cucumber and RSpec for this. But, as mentioned, the book is using MiniTest instead of RSpec. And I don’t want to bring Cucumber in right at the beginning for similar reasons — too much to explain.

Which leaves me writing end-to-end tests using Rails integration tests (ugh) or Capybara, which, of course, also involves bringing in a new gem. Which I’m doing, but the Capybara MiniTest gem wants to use the MiniSpec syntax, which I don’t want to use because more explaining of details early on and all. (Update Mike Moore points out that I’m overstating the extent to which Capybara MiniTest wants to use MiniSpec as opposed to allows MiniSpec. I still am not sure that a lot of people are actually using MiniTest/no spec syntax/capybara.)

So it occurs to me that in the guise of coming up with a testing stack that will make sense to testing novices I have stumbled with the best of intentions into a set of libraries that as far as I can tell is in active use by effectively nobody in the entire world.

This is either insane, or so sane that it’s amazing. Statistically, the odds are on insane, but I’d love a second opinion.

It seems like my viable options are:

  • Do what I’m doing and assume that I can explain it well enough to make sense.
  • Back out and use Rails integration tests instead of Capybara
  • Back out and use RSpec instead of MiniTest
  • Back out and write the Angular book instead. (This is not really an option)

I’m open to comments if you have a suggestion.

Other than that, it’s just been a matter of getting used to changes in the build tools, and finding an editor setup that plays nicely with the formats that Prag uses. Nothing too bad, though I’m seriously considering that Editorial on the iPad has a real shot of becoming my primary editor for this book (writing it on the iPad next to coding on my laptop). Which is also clearly so insane that it may lap all the way around and become sane again.

Trust-Driven Development

Obviously, I’ve missed my plan to get something out in September. I have about 30 some odd pages of text, and I’d release it except that some of the sections kind of trail off in mid paragraph. I may just release it anyway, I have a beta reader or two looking at the manuscript to answer that very question.

If you want slightly earlier access, let me know via email (noel at noelrappin dot com). And, of course, you can by what exists of the book at /trdd.

Mastering Space and Time

So sales have started to pick up at the new price level. Not setting the world on fire or anything, but a more steady rate. Let me know if you are interested in writing about Master Space and time in JavaScript on your blog or something. And, the book is still available at /mstwjs.

Rails Test Prescriptions 2 Is Coming

Rails Test Prescriptions, mstjs, trddNoel Rappin2 Comments

I’m pleased and more than a little surprised to be announcing the existence of Rails Test Prescriptions 2, (which may not be the final title).

You have questions. Even if you don’t, I have answers.

Can you give the news in the style of a movie poster tag line?

Sure.

Coming in 2014. It’s time to get your prescription… refilled.

Rails Test Prescriptions 2: The re-prescriptioning.

When did this happen?

Really, just last week. I got an email asking if I was interested (Spoiler Alert: I was.), and we went very quickly through to contract.

What will it cover?

It’s a little up in the air still, but broadly, we’ve got this:

  • Updates to the big tools. Rails 4, RSpec 3, minitest replacing TestUnit.
  • Changes to the ecosystem, so updates to a bunch of other tools, including FactoryGirl, Cucumber, Capybara
  • Some deprecations — there are some tools discussed that are basically not anymore.
  • New tools. I think the biggest class of tool not discussed in the original RTP is quick startup tools like Spork and Zeus. I’d like to cover continuous integration options, too, we’ll see if I can make that fit.

Over and above all of that, of course, is the fact that the discussion over good testing practice has changed. There’s a lot more talk about maintaining large test suites, writing faster tests, and using tests to drive better Rails application design. I’m planning to talk about that aspect of testing as well.

I am really open to feedback and ideas about what to include and what can be safely removed (any Rails performance testing fans in the audience?)

Timeframe?

Good question. I’d bet at least spring for the first beta. Ask me again in a few weeks.

Are you insane?

I assume you are referring to the fact that I have other writing projects in process.

Yeah, that. Well?

I’ve got it under control.

Yeah, I’m gonna need more than that, writer guy

Okay, let’s take them one at a time.

Okay. Master Space and Time with JavaScript: Ember

Well, the nice folk at Ember central were nice enough to release Ember 1.0, making my plan considerably more concrete than it might otherwise be.

I’m currently working on the draft-complete release of the Ember book, which I expect to release this week. Code up to date with Ember 1.0 and Ember Data 1.0 beta. Info on the Ember inspector, and more stuff on components and promises in Ember routing. Maybe another goodie or two if I have time. That should take me roughly to 115 - 120 pages, a complete draft, and it will trigger a price increase. If I release the book this week, the price increase will come about 9/16. You can still buy Master Space and Time With JavaScript with the handy-dandy purchase link.

The Ember team has announced plans to do new point releases every six weeks. My expectation is that through the end of 2013, I’ll fix errors, and come back toward the end of the year to see if there is anything that needs updating or adding. Probably the same through at least the beginning of 2014.

Okay. What about Trust-Driven Development?

That’s obviously a little more problematic. But I’m really happy with the book, it’s fun to write, and I’m going to keep up with it.

The initial release will still come in September, hoping for this week, but that one looks optimistic. Next week is a better bet. That release also triggers a price increase. And of course, you can still buy Trust-Driven Development at the fabulous purchase link.

After that, I’m not sure. One thing about this book, though, is that it is kind of a nice palette cleaner to break up writing just about code all the time, so I’m actually looking forward to having that as a project during breaks in the Rails Test Prescription 2 process, such as technical reviews and so on.

So maybe I am insane after all.

Anyway, I’m very much looking forward to revisiting Rails Test Prescriptions, fixing all the things I got wrong last time, and making all new mistakes. Hope you like it.

All I Post These Days Is Status Updates

Self Publishing, mstjs, trddNoel RappinComment

Here’s where we are at the moment.

Master Space & Time With JavaScript: Ember

I think I may have finally gotten my head around the Ember release plans. My current understanding is that:

  • A 1.0 final release of core ember is imminent, possibly as soon as September 1.
  • There’s another major overhaul of Ember-data (the “jj-abrams” reboot branch), which will become the master branch sometime between now and the 35th of Octvember. In other words, who knows?

Which leaves me with the following plan:

  1. Once Ember 1.0 is released, I’ll start on a relatively minor revision of the book that will make sure it works with 1.0, allude to some new features, maybe talk about the Ember Inspector if I get ambitious.
  2. I actually don’t plan to add all that much new content, it’s already 108 pages, I doubt it will go above 130. (For reference, the Backbone book is 120, with longer code samples). I want to go through an authentication example. I may talk about components or more advanced view topics.
  3. Some of that is just going to wait until Ember-data gets sorted out, so I’m not rewriting the thing over and over.
  4. The 1.0-related release may be the one that triggers the price increase (based on length). We’ll see. But it’s coming.

You can buy Master Space and Time with JavaScript.

Trust-Driven Development

Work is proceeding on this a little faster. I think I have about 30 pages of text (it’s a little hard to tell because I have a lot of blank chapters adding pages).

I like what I have, but the organization is going to need work. Right now it’s really a set of interconnected essays about project topics (already written topics include points and velocity, user stories, iteration management, the introduction, and a couple of other topics.

The current plan is to start releasing actual text around WindyCityRails, September 12th. That triggers the price increase from $15 to $20, but I’ll probably soften the blow with a promotion over WindyCityRails.

If it’s not ready then, plan B is the same thing but over Ruby DCamp two weeks later.

You can buy Trust-Driven Development.

And another thing…

Weird as it may sound, this represents me trying to clear the decks because a new project has come up. It’s not official yet, and it’ll get its own blog post when it is.