Showing posts with label rspec. Show all posts
Showing posts with label rspec. Show all posts

Wednesday, May 3, 2017

State of the Mission, 2017-05-03: Lots of Coding

I know I've been very quiet lately, but there's a good reason for it.

Here's what I've been doing on Verbalyser:










And this is what I've been focused on for the last few days.  I'm not at liberty to share my code, but I think it's pretty clear how I've gone about it.




 



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

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.

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

Monday, January 30, 2017

'Toy Robot' Review by Ryan Bigg (@ryanbigg)

I have started working through a book called Toy Robot by Ryan Bigg, who explains in his introduction:
In this book, I’m going to go through how I would implement the Toy Robot exercise myself in Ruby, just for demonstration purposes. I’ll be building it up piece-by-piece with the overall aim to be to help anyone reading how to think through and implement this problem.
Having just completed "Learn Ruby the Hard Way" I hope to refine my skills by working through Bigg's book.

All my posts about this book will be labeled "toyrobot", so you can call up all the posts to date at your leisure.

As per the book, I used the bundler gem to create a project tree, which is made available on github: https://github.com/clockworkpc/toy_robot

Let's see how it goes!


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 ...