Wednesday, December 9, 2009

Getting Started with Rails

I was asked today what resources I would recommend for getting started with Rails.

Firstly, learn some Ruby. Ruby is a very deep language with a lot of really cool stuff you can do to get the most out of it. You can really make a choice here between learning a lot of Ruby straight away or just learning enough that you can start tinkering in rails. You could easily create an entire Rails application without touching any of the metaprogramming tricks or fancy shortcuts that Ruby provides, it is way cooler if you do use them though.

There are, of course, docs pages for both Ruby and available for day to day use but they're not exactly learning tools. So I'll take the time to describe some of the more explanatory resources available.

Learning Ruby

A good first look is Ruby in 20 minutes.

After that you can try and dive into rails and rely on docs or, if you want a lot more depth in your exposure to ruby, then Programming Ruby by the Pragmatic Programmers(affectionately known as the pickaxe due to its cover) is a very good bet. It has nearly everything you'll ever need to know and is a good read.

Learning Rails

The Pragmatic Programmers also publish what is essentially the definitive introduction to Rails. Agile Web Development With Rails is now in its third edition and reading it cover to cover would not be time wasted.

A second, and free, resource for rails developers are the Rails Guides a collection of detailed guides to most of the major parts of Rails. They're maintained well, although often checking the "edge" version of the guides is necessary to find ones that are currently in draft state. If you can't get your hands on the book, then the guides are probably the best replacement.

The other major area to pick up on before calling yourself a Rails developer is testing. The tradition in the Ruby and Rails community is to test as much as possible. While Rails comes with test::unit, a test framework called Rspec has become the dominant framework in community and is worth taking the time to learn sooner rather than later if you intend to stick with Rails, the website has reasonably easy to follow introductory guides. Cucumber is another testing system that is often used in conjunction with Rspec to create a wider range of tests, you can afford to leave it out for longer though although it is worth learning about(and using) eventually.

Broadening and Maintaining Your Skills

A number of very good alternative resources have sprung up for rails, one of the best is Railscasts. Which, at the time of writing, has nearly 200 detailed videos available for free regarding a variety of Rails related topics. If you're having trouble with a particular aspect of rails then check if there is a video available on Railscasts.

Peepcode do some very nice longer Rails videos on important topics and are well worth a look, although they charge for the videos so it's worth having a clear idea of what you want to know about.

Ruby5 is a convenient podcast for keeping up with Ruby and Rails related news. Although, it's often easier just to check the topics listed on the website rather than spend the time listening to the podcast itself.

IRC channels can mostly be found on freenode with #rubyonrails having a significant pool of people who alternate between happy and grumpy at an exciting pace. #railsbrain also features good people and is likely to be friendlier to newcomers.

There is also a significant pile of blogs related to Rails floating around they're generally pretty easy to find and the best posts will generally float to the surface. At the same time it's good to be cautious of any blog posts that Google finds you as Rails has moved a lot in the last few years and many of the blog posts it finds are no longer relevant.

Hopefully these resources can put you on your way to being a Rails developer.

Sunday, December 6, 2009

Scrum Introduction at RailsCamp

I did end up giving a talk at RailsCamp on Scrum. I'd had a few conversations about client management the previous day so I pitched it at a reasonably introductory level. The audience that showed up was probably about half familiar with scrum and half not. I think we got through a pretty good overview of the Scrum process and the experienced folks caused a lot of really interesting discussion.

Scrum
View more presentations from breccan.


During the talk estimating/sprint size and client trust became a significant part of the discussion. A number of people had issues with picking an amount of work and suggesting that that amount of work should be concrete for the sprint. I mentioned a few ways of minimising or accepting this and there are probably many other methods:

  • Set stretch targets at sprint planning by putting some targets in the sprint at the bottom of the sprint backlog. This way there's something to do if you run out, they should only be done if you really finish the other tasks and there's no penalty for not reaching them.
  • Regardless of having slightly less work, there's almost always something else for developers to be doing. From refactoring time to working on side projects there's never likely to be a shortage of work.
  • Clients are going to be happy with consistent work and meeting the goals they've started with. If velocity needs to change that should be worked out before the sprint.
  • Developers are most likely going to be happier if rules agreed on at the beginning of the process are kept throughout, changing things at odd times is likely to have odd flow on effects.
  • Any change to these rules can be easily addressed according to team desires during the retrospectives and planning for the next sprint.
My general belief is that by maintaining consistency in process and methods, clients and teams will have a more comfortable feel for what's happening in the project. All parties are likely to trust each other more. Parties that trust each other(where the trust is justified) are more productive than groups that are trying work everything through an adversarial state of requirements and contract negotiation. Scrum occupies a similar position in development to manners in general society by allowing people to have a set of behaviours that allow for smooth communication without intimate knowledge of each other.

The talk also spawned a talk on Kanban a project management system with some interesting properties that I might blog about sometime(it also has inbuilt support in cucumber).

Wednesday, December 2, 2009

Wednesday, November 18, 2009

Getting set for railscamp

I'm now in Melbourne in the sweltering heat after leaving a few days of terrible weather in Wellington behind. Have discovered that all the cooler clothes I used to own when I lived in Aussie have disappeared over the last few years.

Managed to catch a few hours sleep on the plane after the 5AM check-in then made my way out to visit one of the guys I did the Rails Rumble with. Crashing with him tonight and then out to the camp tomorrow.

Looking forward to RailsCamp tomorrow, will hopefully do some more blogging when I get back.

Also trying to keep up with Nanowrimo for the month. Novel is at just under half done with 10 days remaining. Have turned it into a heist novel set in a Spaceship instead of the epic sci-fi it was going to be so that I can take advantage of formulaic plots to speed things up. Hopefully I can find an hour to write each day at the camp, if I'm lucky the time difference will have me up a couple of hours before everyone else.

Monday, November 2, 2009

Emergency Cucumber presensentation

So this month I ended up presenting at Wellrailed for a third time in a row as my colleague who had been going to give the talk was bedridden. Luckily he'd only signed up to talk for half the evening so I could throw together a few of the more useful Cucumber tips and start talking.

I ended up getting a lot of questions and found that most of the attendees could have done with more of an introduction than the tips themselves, so we hopped online and I walked through a couple of the basic examples on the cucumber github repository.

Slides:

Thursday, October 1, 2009

Presentation on Be9's Acl9 and security.

I presented at WellRailed(The Wellington Rails user group) again(did a short presentation last month after the Rails Rumble) regarding Access control and some stuff I'd done recently with Be9's Acl9, a relatively feature complete access control plugin.

Talk went well and generated a decent pile of questions.

Slides:

Sunday, August 23, 2009

Rails Rumble

Just finished the 2009 Rails Rumble. Have slept 8 hours of the last 53 or so - of course I should blog now!

App should be at http://howireallyfeel.r09.railsrumble.com/.

It's an app that allows you to share your own music to get feedback, or listen to music and give feedback. Identifying win-win situations is good.

The event was a lot of fun once again. I was a lot more familiar with rails and we had a better idea of what we could fit into 48 hours going in. Lots of chaos in the development process as we all tried to put bits and pieces where we thought they should go.

A heavy ajax version of the site got cut about halfway through. In many ways due to difficulty in communicating quickly about how various partial installs worked together rather than having large well delineated pages.

We had a team mate nod off near the end leaving me with the deploy process(Mobile phones that you use as your alarm are a dangerous single point of failure when your backup is to get people to ring you). Which should have been fine except passenger exploded when we tried to upload music files... In the end we had a very last minute mongrel install that's a bit lacking in performance but works.

May go into more depth after sleep.

Since the last post

Started a new job in February. (Rails developer at http://3months.com)
Started Ballroom Dancing
Drank many cocktails
Became known as the 'Martini guy' at the bar across from work.
Became a Certified Scrum Master

Tried to balance full time work and full time study.

Thursday, January 15, 2009

Second half of 2008 in review

A summary of the important points since my last post.

I decided to move my focus away from philosophy and more aggressively onto business and technology. Stopped pursuing the MA in philosophy but beefed up my commitments to the business papers to a target of Master of Management by the end of this year.

Second semester papers in international business and IS management.

International business being one of the most interesting papers I've taken during my university career. Particularly as the paper had a bent towards case studies and current events rather than theory. Covering everything from Pizza Hut's use of high inflation in 1990's Brazil to discussions of the evolution and traits of China's Guanxi based business relationships the paper provided plenty of interesting and potentially useful bits of knowledge.

Unfortunately the IS management paper was less interesting. This may have been because I already knew much of the technical and the management information in the course work itself seemed ill-informed. The textbook contained a suggestion that Lines of Code could be a useful metric of measuring a program. Any experienced programmer will tell you that LOC has only a relation to a programs size or complexity in terms of the programmer that created it. One programmer can easily take 100 lines to create a function that another programmer can solve in 10.

Luckily only the first half of the IS course was based on course work so I could happily wander off and look at some more interesting topics. Such as Dell's supply chain management which is a really fascinating topic in how they choose to manage demand rather than have a variable supply. I'll probably make a post about it sometime. It caused me to geek out and start describing it to people at the time. Strangely they didn't seem all that interested in supply chains...

Outside of study I made the decision to move to Wellington in order to be nearer to what amounts to the tech community of New Zealand. Move consisted of my hopping on a plane with a suitcase. Took me four days in a backpackers to find a decent flat. Flat had the significant benefit of including someone intimate with the daily drama's of parliament which gave me a very interesting view of the election. Living with politicos during an election is definitely worth the price of admission.

October featured the Rails Rumble a 48 hour programming competition that I put together a group of four for. We got a lot done and finished respectably in the middle of the field that had something completed after being significantly hampered by a last minute bug on our front page. Everyone had a good weekend.

After the mostly sleepless three days around the Rails Rumble I had a week to recover before getting started on National Novel Writing Month. A month of plenty of writing and sunday meetups for coffee(It only took three visits to the coffee shop before I was being offered "the usual") lead to a good month and plenty of writing. I now have 50109 words worth of a novel happily sitting in my computer. One day I might finish it.

December featured Christmas and some bad news on the health of a family member.

My New Year's resolution was to go swimming at the nearby beach. I did so on January 1 2009. It was very cold.