Tuesday, February 28, 2017

Flu-enforced Break

After many weeks of burning the midnight oil, my body has sent me a clear message:

Take a break!

It's a minor case of the flu, standard symptoms, and I am getting over it rapidly thanks to daily walks, cool showers, and plenty of naps.

I expect to return to my 16-pomodoro-per-day schedule by the end of the week at the latest.  My plan is to split my time between solving coding challenges, studying Ruby, and studying Rails.


Wednesday, February 22, 2017

Tuesday, February 21, 2017

Coding Exercise Complete (58 Pomodoros)



I have submitted my solution to the coding exercise for Envato, as part of my application for a Junior Developer role there.

I spent 58 pomodoros on this project:

  • 7 strictly on planning and writing (roughly 3.5 hours)
  • 3 on studying RSpec (roughly 1.5 hours)
  • 47 on coding, reviewing, testing, refactoring, etc.
I do not know if my solution is good enough for Envato, but it was the best I could do.

There are many things that give me encouragement, regardless of the outcome of my job application.

I can code.

I have a lot to learn, I make many mistakes, my code is probably inefficient and clumsy, but I can take a problem and solve it through the code.  It is a sort of "hello world" moment for me.

What I do works.

As I have been teaching myself, it is always hard to gauge whether I'm getting things right, or whether I ought to sign up for a course instead.  I am more convinced than ever that I am on the right path, and can take pride in my work ethic, time management, knowledge, and skill.

For example, I got stuck on writing Rspec tests, so I purchased an Rspec manual, studied it for precisely three pomodoros (black cells) and found I could write the tests I need. I have spent so far 3 x 20 minutes on study and 33 x 20 minutes on planning, writing, and coding for this exercise. The brevity of the study break excites me, because it is tangible, documented evidence that I have the intelligence, self awareness, and discipline to take a break from the main project, learn what I need, and then get back to work without wasting time. 

I will succeed.

If I get the job at Envato that would be great, and if I don't I shall certainly be disappointed.  However, I am much closer to being the best pick for a junior spot somewhere out there, and I won't relent until I've achieved this goal.

I am grateful to Envato for granting me an interview and the opportunity to show them what I can do.  Let's see what they make of it.

Sunday, February 19, 2017

Closed [envato_coding_test] Need to initialize CustomerTotalSpend in order to get the global $customer_total_spend list


Closed [envato_coding_test] Need to initialize CustomerTotalSpend in order to get the global $customer_total_spend list by clockworkpc via GitHub

Getting Better At This Coding Thing



Day 4 and 36 pomodoros in. I got stuck on writing Rspec tests, so I purchased an Rspec manual, studied it for precisely three pomodoros (black cells) and found I could write the tests I need. I have spent so far 3 x 20 minutes on study and 33 x 20 minutes on planning, writing, and coding for this exercise. The brevity of the study break excites me, because it is tangible, documented evidence that I have the intelligence, self awareness, and discipline to take a break from the main project, learn what I need, and then get back to work without wasting time.

Closed [envato_coding_test] RSpec error on customer_total_spend_spec.rb


Closed [envato_coding_test] RSpec error on customer_total_spend_spec.rb by clockworkpc via GitHub

Saturday, February 18, 2017

Closed [envato_coding_test] payments.json contains more than one entry per customer


Closed [envato_coding_test] payments.json contains more than one entry per customer by clockworkpc via GitHub

Closed [envato_coding_test] Stuck! Decided to go back to my whiteboard and think it over


Closed [envato_coding_test] Stuck! Decided to go back to my whiteboard and think it over by clockworkpc via GitHub

Closed [envato_coding_test] JSON.load produces deeply nested hashes of coffee names and prices


Closed [envato_coding_test] JSON.load produces deeply nested hashes of coffee names and prices by clockworkpc via GitHub

Friday, February 17, 2017

Closed [envato_coding_test] Trying to create a Hash of customer history, but keep on over-writing the previous entry


Closed [envato_coding_test] Trying to create a Hash of customer history, but keep on over-writing the previous entry by clockworkpc via GitHub

Closed [envato_coding_test] Difference between expected JSON output and actual


Closed [envato_coding_test] Difference between expected JSON output and actual by clockworkpc via GitHub

Closed [envato_coding_test] There is a data set, but it's not the one we want.


Closed [envato_coding_test] There is a data set, but it's not the one we want. by clockworkpc via GitHub

A Little Time Saver on Github



I recall learning this ages ago, but it took a bit of googling to be reminded:

https://help.github.com/articles/caching-your-github-password-in-git/

Closed [envato_coding_test] Need JSON constant


Closed [envato_coding_test] Need JSON constant by clockworkpc via GitHub

Closed [envato_coding_test] Undefined Method "call"


Closed [envato_coding_test] Undefined Method "call" by clockworkpc via GitHub

Closed [envato_coding_test] Original Error Messages


Closed [envato_coding_test] Original Error Messages by clockworkpc via GitHub

Thursday, February 16, 2017

Minor Surgery Today

Going in for surgery today.



I will shortly go to an endodontic clinic (specialist dentist -- I learned about it only recently) for an operation under local anaesthetic.  The 'root' cause of my problem is a traffic accident I suffered as a teenager.  Seventeen years on, in spite of excellent dental care and oral hygiene, I need surgery to eradicate the problem.

I hope to return to my coding work later today, but I suspect I'll have to take it easy for the rest of today, much though I'd like to keep on working hard.

Wish me luck.

100 Pomodoros for the Month of February

This cycle was dominated by study (black) -- Toy Robot, Ruby documentation, 'Rails 4 in Action' -- and job seeking (red) -- lots of calls, emails, and networking at the Ruby Conference (2017) in Melbourne, Australia.

Let's see if we can make it two hundred pomodoros for the month of February.

At any rate, it's been a very productive one hundred pomodoros so far.


Wednesday, February 15, 2017

Monday, February 13, 2017

State of the Mission, Monday 13th February 2017

The last two weeks have been quite productive:


As you can see from the abundance of black cells (each cell is one pomodoro), I have been busy studying.  I completed Learn Ruby the Hard Way, and got to work studying rails.  I am also deepening my knowledge of Ruby in a way that will look completely alien to a millennial, but which will stir nostalgic memories in some older readers:










Saturday, February 11, 2017

Tuesday, February 7, 2017

Rails 4 in Action, Chapter One (Notes)


Not much to say, just wrapping my head around the basic functionality afforded by the scaffold in the examples of Chapter One.






Exciting Developments

I don't want to say too much at this stage, but I have reason to add a few high-priority items to my to-do list.















Thursday, February 2, 2017

Review of 'Toy Robot' by Ryan Bigg



Toy Robot by Ryan Bigg (@ryanbigg) is an excellent walkthrough for a budding Rubyist, especially one that has worked through Learn Ruby the Hard Way. (As I have!)

Bigg is a veteran Ruby developer and prominent member of the Ruby and Rails community in Melbourne, Australia.  His blog is a valuable resource for both novices and experts.  The book weighs in at just over 100 pages and strikes a balance between technical jargon and clear, simple prose.  His descriptions of the rationale for his approach shed light on the code blocks in the book, and are very helpful to a novice like me.

The book describes itself as "A Walkthrough for The Toy Robot", which is misleadingly accurate, for the term "walkthrough" conjures up images of a many happy hours spent on old-school click-and-point adventure games. (King's Quest comes to mind)

This is not a "walkthrough" in that sense.  Rather than simply prescribe the steps for building a Ruby solution to the toy robot problem, Bigg's book takes the reader on a full test-driven-development journey of writing tests, making them fail, making them work, and making them fail again, until every class, module, method, and function has been thoroughly vetted.
The book demands that you see for yourself how to outline the problem, write tests for each-and-every detail of the software and allow testing (and especially test failures) to guide you through the process.

Having spent 18 tight pomodoros (20-minute blocks), i.e. six hours on this book, I cannot now duplicate every detail of the book's solution to the problem, but whereas before it was insurmountable, it is now assailable.  My solution would not be as tight, but it would get there.  The lion's share of my learning came not from memorising what the book does, but rather from poring over the output of the failed tests to understand what went wrong, and sometimes why my test failures were different from the book's.

For this reason, I strongly recommend that you NOT copy and paste, but rather type out every line of code for yourself, and run all the tests to see the results.  I promise you will come to see the HOW and WHY of Bigg's elegant solution to the toy robot problem.

The book is available in PDF, EPUB, and Mobi formats and is available for as little as $5, although I hope you will find it in your heart to spend at least $10 in recognition of this author's fine work.

Rating: 5/5

Toy Robot Problem

Refer to Ryan Bigg's book: https://leanpub.com/toyrobot

Code problem details: Toy Robot Simulator

Description:

The application is a simulation of a toy robot moving on a square tabletop, of dimensions 5 units x 5 units. There are no other obstructions on the table surface. The robot is free to roam around the surface of the table, but must be
prevented from falling to destruction. Any movement that would result in the robot falling from the table must be prevented, however further valid movement commands must still be allowed.

Create an application that can read in commands of the following form:
PLACE X,Y,F
MOVE
LEFT
RIGHT
REPORT

  • PLACE will put the toy robot on the table in position X,Y and facing NORTH, SOUTH, EAST or WEST. The origin (0,0) can be considered to be the SOUTH WEST most corner. The first valid command to the robot is a PLACE command, after that, any sequence of commands may be issued, in any order, including another PLACE command. The application should discard all commands in the sequence until a  valid PLACE command has been executed. 
  • MOVE will move the toy robot one unit forward in the direction it is currently facing. 
  • LEFT and RIGHT will rotate the robot 90 degrees in the specified direction without changing the position of the robot. 
  • REPORT will announce the X,Y and F of the robot. This can be in any form, but standard output is sufficient.

A robot that is not on the table can choose the ignore the MOVE, LEFT, RIGHT and REPORT commands. Input can be from a file, or from standard input, as the developer chooses. Provide test data to exercise the application.

Constraints:

The toy robot must not fall off the table during movement. This also includes the initial placement of the toy robot.  Any move that would cause the robot to fall must be ignored.

Example Input and Output:

a)
PLACE 0,0,NORTH
MOVE
REPORT
Output: 0,1,NORTH
b)
PLACE 0,0,NORTH
LEFT
REPORT
Output: 0,0,WEST
c)
PLACE 1,2,EAST
MOVE
MOVE
LEFT
MOVE
REPORT
Output: 3,3,NORTH

Deliverables:

The source files, the test data and any test code.
It is not required to provide any graphical output showing the movement of the
toy robot.

1,050 hours

It took me 13 working days to complete my first 100 "work" pomodoros as a Junior Software Tester at Profectus Group.  Much of ...