Just do it…

At the start of week 3 it became clear that I really did need to get on the horse, and become a code monkey (yes, too many animals in that sentence so let’s hope my app design is better than my prose!).

Building my first web app should be a pretty simple task given it’s just a handful of low complexity views, simple user interactions, and simple data relationships, especially since the lessons I’m following provide very explicit instructions and sample code snippets.  Simple!  Or so you’d think…

However, in my reality, it’s more of a mine field of confusion and continuous (poorly formed) questions: in my reality, this learning by doing, following the steps before I’ve wrapped my head around the conceptual architecture and infrastructure simply doesn’t work for  doesn’t come naturally to me.  New Tricks,  remember!!!

… that was the beginning of an unfinished post on May 3rd, clearly too busy to finish posting!   I really did just need to get on with it, and so I did.

So it turns out that Just Doing It was hard – imagine that!  In short, starting out presented a massive learning curve so this post is now more of a retrospective on what made the past 3 weeks such a challenge!

Ironically, learning the Ruby syntax wasn’t the key challenge, neither was it a massive challenge to follow the basic Rails framework.  Although, paradoxically, the apparent simplicity and elegant automagic of Ruby on Rails creates a real learning conundrum for me.  It’s tricky to appreciate and figure out the role of each piece of the Rails puzzle when it’s so well plumbed, but barely visible on the surface, and yet I need to understand those workings to know how to make the most of the automagical Rails! Rails even has a term for this – but we might save the Ruby on Rails wisdoms for a later post!

Surprisingly, my challenge was figuring out which learnings to tackle first given the requisite bundle of tricks in the Developer’s Tool Kit or, more accurately, my limited hands-on experience using each of these tools.  While I have a pretty solid conceptual understanding of all the tool types – and often had very clear views on how these were to be used on various large-scale projects – there are no longer teams of folks looking after each tool on this project:  just me getting to know my new friends.

Let me briefly introduce them:

  • the command line, using BASH
    I type commands into that very unfriendly looking black screen, and tell my MacOS what to do (sadly “pour me a wine” hasn’t worked yet – must be a syntax issue).  I’m finally figuring out that there are often GUI options that will get most of these done, but it would seem that real techies work here where it’s direct, clean and fast (or hopefully it will be once I get more familiar with the actual commands!)…
  • git – the source code repository
    Git supports code checkouts, commits and branching.  The best bit of git – I can now branch. Branching lets me play round with some stuff and decide whether that branch is complete and works (and enhances my app) so it will be merged back into master;  or whether that branch is all screwy and will simply be discarded – this I like.  All good, unless you forget that not everything gets checked into git by default (such as the database), so screwing with the database structure via the command line and bypassing the Rails way (migrations) – not a good idea – for many reasons!.  Still learning to drive git via the command line but I like the security blanket…
  • the debugger
    Include the gem in your project, then you embed “debugger” into the bit of code where you think the problem might be, as required. Once you start the debugger for the first time, you’d be surprised (or not) to realise that debugger has a whole new bunch of commands to control this: to set break points, use evaluate  to check what the app is thinking at any given point, skipping ahead through each line of code, or skipping through a bunch of code to reach the next point of interest.  Actually, debugging was a great way to see the Rails MVC plumbing in action, although why all utilities need a different command to exit confounds me – was this one ^X, Exit, ^Q, Quit, ? Despite that niggle, I feel the debugger will become a really good friend…
  • Sqlite
    Yay, at least I know sql and DB commands!  So, for another irony, Rails insulates the Developer from having to know the detailed syntax, interpreting your  English-like instructions to build out the SQL under the covers:  Rails take care of the DDL via migrations, and DML via the Models.  Still, it is nice to be able to quickly check on results of migrations/CRUD data changes – via the command line of course…
  • Aptana Studio 3 – initially I’d thought this was simply a really nice (free) editor – using colours, indenting, and type-ahead assist – turns out that it is so much more.   Indeed, Aptana supports GUI-based interactions with both git and debugger, and more stuff that I haven’t discovered yet.  First up, just figuring out how to get the project that I generated, from the command line, into Aptana made me think twice – of course ‘Import’ is a pretty obvious choice, now.  Once I’m on top of the basics, I can take advantage of this development suite that should help with all the above, I just have to get to know it better…
  • Capistrano and Apache – still strangers! I’ve heard of them, but they’re still waiting in the wings since I really don’t need to meet them until I’m actually ready to deploy to Production – it’s pretty clear that milestone is still some time off!!!  Nice to leave some learning till later…

So, 3 weeks ago, I thought I was going to learn about Ruby on Rails, which also meant getting to grips with Object Oriented development.  But since these two stars travel with quite an entourage – there were quite a few new tricks to be learned.

It feels good to look back and realise that whilst progress seemed really slow at the time, especially if one were to measure the actual lines of code that I wrote,  getting up-to-speed with a few of the tools in my Ruby on Rails Developer’s Toolkit gives me a certain sense of accomplishment.  Quite a few new tricks I think 🙂

My favourite 2 tricks of all…

  1. it’s easier to tackle all this learning as though it were an onion:  the eyes water less when I tackle each experience: one. layer. at a time!  Trying to slice too deep on any one aspect – not so much!
  2. thank goodness for the interwebs – it is amazing, really amazing, how many people are so generous in sharing information out there. My favourites would have to be GitHub and StackOverflow, but so many bloggers that post really interesting and helpful content – amazing – and yes that word does mean what I think it means 😉

Best I get going – RSpec, Cucumber and Factory Girl are waiting!

On y va!


One thought on “Just do it…

  1. Looks like you are the horse, Tricks.
    As I stumbled through stuff (you have written) I sort of know what it is but really have no clue it struck me there will be other really helpful (hopefully) folk out there who would willingly share their experiences with you, and then you mentioned the web and bloggers so it will interesting to see how that develops.
    If your blog is about charting progress and getting a reality fix do you think you should post more frequently e.g. weekly?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s