Categories
Software

Happy New Year

JanusSo, that’s 2007 over with. Is it just me getting old, or did the past year go by even quicker than normal?

Amongst other things, 2007 was (for me at least) the year of Ruby. Obviously Rails had already been around for a while, and the language itself even longer, but they both seemed to be popping up all over the place last year, and gaining acceptance where they had previously been ignored as not mature or “enterprisey” enough. It’ll probably still be a while before large companies look at Ruby and Rails in the same way they currently look at Java and J2EE, but at least in my little corner of a large company I was able to spend the whole year writing Rails apps. It doesn’t look like there’s going to be any slacking of the pace in 2008 either, with the last few weeks of 2007 seeing the release of Rails 2.0, RSpec 1.1, Ruby 1.9 and JtestR (the last of which should be cool for Ruby people still stuck in a Java world).

It was also the year of ‘social networking’ websites in general, and Facebook in particular. Halfway through the year they introduced their developers’ API, and the web was awash with people praising their openness. Over the following months people started to realise that that ‘openness’ was very much one way, intended to get your applications running on their platform rather than allowing users to expose their data on the Web, and much of the shine wore off. Of course, most of us still use it now and again (if only to play Scrabulous), and there are a few signs that they’re starting to open the door to the Web ever-so-slightly in the other direction, so we’ll see what happens. There’s also OpenSocial to keep an eye on, of course, with Google so far managing to stay just on the right side of the good/evil line (all-seeing eye notwithstanding).

At the lighter end of the social networking scale, the star of 2007 was undoubtedly Twitter. Never has something so simple and apparently pointless been so intriguing and useful. Their business model (at least in the UK) is still a mystery though.

Some would say that 2007 was the year when Agile Software Development finally crossed into the mainstream. Unfortunately I tend to side more with Simon and Gus, and call it the year of compromised agile. It seems that for many large companies ‘agile’ has just become another buzzword. They talk about ‘enterprise scale agile’ and introduce a few of the easier, non-technical practices (daily stand-ups, retrospectives and so on), and put off making the real changes that are required for a truly agile organisation (co-located self-organising teams, daily customer involvement, devolution of decision-making, genuine focus on business value, an emphasis on technical excellence, test-driven development etc), while persisting with anti-agile behaviours such as outsourcing development, big up-front design, ivory tower architecture and fixed time, scope and budget. Baby steps are great, but there’s an implicit assumption that you take lots of them, instead of a few large ones.

Last but not least, 2007 was, of course, the year of the lolcat!


So what does 2008 hold in store? Unfortunately I didn’t get a crystal ball for Christmas, but here are a few guesses and hopes.

Will 2008 really be the year of Erlang? It seems to be building up the same kind of following (amongst many of the same people) that Ruby had 18 months ago, so who knows? It’s an interesting language, but I still find that the syntax grates.

Perhaps this will be the year when everyone finally realises that ‘Web 2.0’ has become so overloaded as to be meaningless. Sadly, even if that happens we’ll probably just see the buzzword bandits start calling something ‘Web 2.1’ or ‘Web 3.0’, so that’s a battle that’s never likely to be won.

Finally, could it be the year of OpenID and OAuth? If it weren’t for my poor security practices when it comes to personal site registrations, I’d have no chance of remembering account details for the myriad sites I’ve registered on, so wider adoption of OpenID would be nice. Similarly, it’s a pain finding and adding friends in yet another ‘social network’ application. I don’t really want to be handing out my GMail password left right and centre, and OAuth would (amongst other things) provide a neat way to request friends lists from other sites (and of course using OpenID would make it easier to identify people). Personally, I’d prefer it if everywhere just exposed my friends list publicly like Twitter does, or at least gave me that option. If they all used FOAFXFN, so much the better.

Anyway, I ought to post this while it’s still New Year’s Day. Whatever technologies 2008 has in store, I hope it’s a good year for you.

[tags]ruby, rails, rspec, jtestr, facebook, agile, enterprise, compromised agility, lolcats, erlang, new year, 2007, 2008, web 2.0, openid, oauth, foaf[/tags]

Categories
Agile

The Neglected Practice of Iteration

“It’s not iteration if you only do it once.”

I’ve already mentioned Jeff Patton’s XPDay keynote, where he talked about the importance of working in iterations (as opposed to increments). Jeff has now written a column, The Neglected Practice of Iteration, on StickyMinds, making the same point (but without the music!)

Excellent stuff, and well worth a read. I suspect most people who claim to follow an iterative development process are prone to lapsing into an incremental mentality – I know I am.

[tags]Jeff Patton, iteration[/tags]

Categories
Rails rspec Ruby

“You have to declare the controller name in controller specs”

For ages I’ve been getting an intermittent problem with RSpec, where occasionally I’d see the following error on a model spec:

You have to declare the controller name in controller specs. For example:
describe "The ExampleController" do
controller_name "example" #invokes the ExampleController
end

The problem seemed to depend on which order the specs were run in, and for rake it could be avoided by removing --loadby mtime --reverse from spec.opts. It was a real pain with autotest though, and today (my original plan of “wait for RSpec 1.1 and hope it goes away” having failed) I finally got round to looking into it properly.

It seemed that the error was being triggered by the rather unpleasant code I wrote a while ago to simplify testing of model validation. Digging into the RSpec source to see what was happening, I found that that error message only gets returned when (as you’d expect) you don’t declare the controller name in a controller spec (specifically in an instance of Spec::Rails::Example::ControllerExampleGroup). The code that decides what type of example group to create lives in Spec::DSL::BehaviourFactory, and according to its specs, there are two methods it uses to figure out what type of spec it’s looking at:

it "should return a ModelExampleGroup when given :type => :model" do
...
it "should return a ModelExampleGroup when given :spec_path => '/blah/spec/models/'" do
...
it "should return a ModelExampleGroup when given :spec_path => '\\blah\\spec\\models\\' (windows format)" do
...
it "should favor the :type over the :spec_path" do
...

I began to suspect that the problem was caused by the fact that my specify_attributes method wasn’t declared in a file in spec/models, so I thought I’d try specifying the type explicitly. So instead of this:

describe "#{label} with all attributes set" do

I changed it to this:

describe "#{label} with all attributes set", :type => 'model' do

Sure enough, it worked! Not sure whether anyone else is likely to see the same problem (unless they’re foolish enough to use my validation spec code), but hopefully if you do, a Google search will bring up this post and it might point you in the right direction.

Categories
Uncategorized

Chocolate Type

Mmm…

Categories
web

BarcampLondon3

As you may have guessed from my other postings over the past few days, I spent the weekend at BarcampLondon3, at Google’s offices in Victoria, London.

This was the second Barcamp I’ve participated in (‘attended’ is probably too passive a word for a Barcamp), and was even better than BarcampBrighton in September. This was, of course, largely thanks to all the efforts of Ian and the other organisers, and to the wonderful hospitality shown by Google. From my own point of view, I think I also benefited from not going with a group of colleagues, which forced me to overcome my natural reticence and speak to people I didn’t know (it helps that the Barcamp crowd are a friendly bunch!)

If you have any geek tendencies and have never been to a Barcamp, I highly recommend it.

Oh, and as a footnote, I experimented with blogging some of the talks more-or-less as they happened. That’s why the posts were a bit rough, but at least they’re there – I still have notes from Agile2007 back in August that I haven’t got round to writing up.

My photos from the weekend are on flickr.

[tags]barcamp, barcamplondon3, google[/tags]

Categories
General nonsense

Lolwolves

From the meme collision department…

In ur villij

Ur seer

icanhaz lynching?

[tags]lolcats, werewolf, lolwolf, lolwolves[/tags]

Categories
General nonsense Rails

Rails Envy’s take on the werewolf question

This clip [MP3, 57s] from a Rails Envy podcast made me laugh. It’s referring to Charles Nutter’s recent musings on whether werewolf is killing the conference hackfest.

Incidentally, how often do you get the chance to Google for “nutter werewolf”?

[tags]rails envy, werewolf[/tags]

Categories
General nonsense

[BarcampLondon3] 101 Uses for an Index Card

I’d originally intended to present something about BDD, but the slides and demo never really came together so I didn’t really want to inflict them on people who could have gone to a better session. I was going to risk bad karma by not presenting at all (there were plenty of empty slots, so I don’t think I’d have been the only one).

At some point in the early hours of Sunday, trying to sleep in a very warm room where the lights kept randomly coming on, I thought of another idea – could a bunch of us come up with 101 uses for an index card (something I’ve been planning to try myself for a while)? It would be obvious from the title that it was just a bit of fun, but maybe ew might learn something along the way about the techniques that people used which used index cards in some way.

Unfortunately (I like to think purely because I posted the session on the board at lunchtime on Sunday!) only two people turned up, beating my record of four from BarcampBrighton. We did manage to get a third of the way though, coming up with 34 uses:

  1. CRC cards
  2. Shopping list
  3. Werewolf
  4. Release planning/User stories
  5. Enumerating the uses of an index card
  6. Taking notes
  7. Essential use cases
  8. Paper prototyping
  9. Bookmark
  10. Funnel for salt, sugar etc
  11. “Indexing stuff” (ie whatever they were originally designed for)
  12. Emergency business card
  13. Barcamp/unconference scheduling
  14. Playing 1001 Blank White Cards
  15. Inflicting paper cuts on an enemy
  16. Making an animation flip-book
  17. House of cards
  18. Making noises with bicycle spokes
  19. Drug pouches (I have no idea what this means!)
  20. Roaching
  21. Paper planes (although our test model was prone to nosedives)
  22. Cue cards
  23. Flash cards
  24. Postcard
  25. Beermat
  26. Recipes
  27. To-do lists
  28. Lighting fires
  29. Setting fire to, in order to satisfy the requirement to collect “fire” in a scavenger hunt
  30. Bulletin board advert
  31. Very simple origami
  32. Signage
  33. Action Man billboards
  34. Blocking CCTV cameras

Paul also added “toothpick”, via a Flickr comment.

PICT2381.MRW Some of the 101 uses of an index card

[tags]barcampbrighton3, indexcards, 101[/tags]

Categories
Apple

[BarcampLondon3] Obscure Mac Apps (Melinda & Martin)

  • KeyCue (€19.99 + VAT)
  • Caffeine (free) – prevents sleeping, display dimming etc
  • iStat menus (free) – also includes menubar clock like Magical
  • NameChanger (free) – bulk file renaming
  • Yojimbo ($39) – stores and tags web pages, documents etc (the actual content, not just a link). Also a web version.
  • Keyboard Cleaner (free) – disables keyboard
  • Audio Hijack Pro ($32) – record any system audio.
  • Bento – personal version of Filemaker
  • Picturesque ($20 shareware) – uses Core Image to do all sorts of cool image effects
  • XLD (free/OSS) – converts various lossless audio formats
  • ImageWell (free) – batch image editing (see also Skitch)
  • FreeDMG (free, unsurprisingly) – Simple disk image creation
  • ZapMac (free) – wacky speed-reading thing
  • Nocturne (free) – ‘night mode’ for working more comfortably in the dark
  • Remote Buddy (€19.99) – use Apple remote with any app, or for browsing files. Also allows you to use Wiimote via bluetooth.

[Update: it seems I was misinformed – Skitch is free too.]

[tags]barcamplondon3, mac, applications[/tags]

Categories
web Web 2.0

[BarcampLondon3] JQuery in 30 minutes (Simon Willison)

I didn’t take any notes, but JQuery looks pretty cool. Maybe even cooler than Prototype and Scriptaculous!

[tags]barcamplondon3, jquery, javascript, prototype, scriptaculous[/tags]