Two steps forward, one step back…

Now, no more shenanigans, no more tomfoolery, no more ballyhoo…

This week I have started real work, on a real app!

All the sample apps and sample testing of said apps means that I am now more likely to be able to look at a piece of code, or a test, and have some clue about what it is doing.  Create code of my own even…  so some clue is actually pretty good.

The amazing thing about using twitter bootstrap, plus Devise, plus templates, is that Ruby on Rails actually generates most of the code on my behalf, leaving me to worry about my unique stuff.  So, in creating my first entity yesterday (a ref data table), all the generic user security framework was there.  As was the basic look and feel, and the new data table, and all the database services to manage each  transaction type.  All I had to do was decide what I will allow each user type to do, and what will be locked down or removed all together.

By lunch on the first day, voila!  Coding and testing of my first ref data table was complete. One step forward!

Step 2… Next, it’s time to start on a real function that uses my ref data.  Again, using a template, rails generates the basic code files needed for my first functional table (i.e. all the base files for the model, view, controller and routes etc, and the corresponding test case files), leaving me to tidy up which users can do what, and to personalise the look and feel.

How hard can this be?  🙂

By mid afternoon, the first hurdle looms up large and a syntax error in line 12 of the controller stumps me for far too long… Yes, I know exactly which line is the problem – but do you think I can see it!!!!  😦

Of course, it was simple – and I was once again reminded to never make the silly assumption that coding languages use common english spelling… a really simply construct of “if, then, else if …” – not so simple!  Should have been: “if, elsif, “.  Apparently, Ruby is just like C++ and that makes it perfectly ok to drop the “e” in “elsif”… And there was I, looking for a missing : or @ or was it user or User – no, that was all fine – sooooo frustrating!

After that glitch, there were a few more problems (somewhere in the order of 88 test fails in my first test execution – how do I even have 88 tests for one entity!!!).  Sigh…  how can a girl have so much fun in one day!

It now seems that I needed an updated version of the templates, so fortunately, thanks to Git, by end of play on the first day, I was able to roll back to the version I had at lunch time.

2 steps forward, 1 step  back…

Day 2 will be a better day.  On y va!

Advertisements

One thought on “Two steps forward, one step back…

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s