Showing posts with label toyrobot. Show all posts
Showing posts with label toyrobot. Show all posts

Tuesday, March 21, 2017

A Work in Progress: The Story of My Journey into Software Development

Since I graduated from university (major in English literature), my work has always been in the orbit of software and IT work: first, as a technical writer, then as a computer technician, and finally as a security technician.

Over the years I tinkered with Linux and spent (too) many hours picking up tips and tricks about how to get my computer to do my bidding, rather than contort my daily use around its default settings.  This involved writing lots of scripts in Python.



However, my journey into software development (a work in progress) started in earnest in June 2016.  After talking about work with my housemate, a business analyst and his brother, a software developer, I initially leaned towards DevOps, and accordingly researched DevOps tools and theory.  I tinkered with AWS, set up LAMP stacks, got the hang of Vagrant, and taught myself elementary PHP.  I sent cover letters and telephoned an array of recruiters for guidance on how to work my way into a starting position in the industry.



After a few months it became clear to me that there is in practice no direct path for me into a DevOps role: even the most junior DevOps role requires professional experience in systems administrations or in a commercial software development environment, neither of which I possessed.



In October 2016, I reviewed my goals and decided to focus my efforts on software development instead.  After years of scripting in Python on Linux, I was already familiar with many of the fundamentals of programming, and although I did not underestimate the enormity of this task, I was confident it could be done.  I considered primarily Python, Ruby, and Javascript, and eventually settled on Ruby on the strength of the work opportunities and the community in Melbourne.  I had always loved open source and Ruby code appeals to my aesthetic sensibilities.


I went to America in November and upon my return, I started the next chapter in my journey into software development.  I completed study modules on Rails, AWS, HTML/CSS, and JavaScript.  On the Ruby side I completed the course at Code Academy, worked through 'Learn Ruby the Hard Way' by Zed Shaw and 'Toy Robot' by Ryan Bigg, and at the time of writing am currently working through the puzzles on Advent of Code.

I also make nerdy t-shirts:



Sales and Marketing

I treat this career change as a full-time job... in marketing.

My job is to get a job, and it is to this end that all my efforts in studying programming, writing code, blogging, planning, and networking are directed.  It is tricky to strike a balance, because what I really want to do is code and study to code better, rather than promote myself.  In order to achieve this balance, I manage my time carefully, work as productively as possible, and prioritise my activities rationally and with discipline.  From day to day, I can give a full account of where I was, what I did, what I got done, how much time I spent on each task, and where I fell short of my goals.  The system I have devised for myself is the fruit of many years of research, trial and error, and it comprises the following:

Mindmaps and charts for setting goals:

Storyboarding and progress charts for reviewing my progress:


Kanban for managing tasks and prioritisation:



A daily schedule:



Pomodoro method for maximising productivity throughout the day


And blogging, of course:



By means of these tools and methods, I generally complete 12-16 pomodoros per day of productive labour across the following categories:

  • Coding
  • Studying coding
  • Blogging and planning
  • Job-seeking
  • Translation from English to Lithuanian
  • Studying Lithuanian grammar
  • Daily exercise
  • Daily strength training
  • Creative writing

In addition to these, I cook all my own food and keep house.

I attend all of the social and networking events related to Ruby and Rails, and make a point of speaking to new people.  Although I prefer to listen to others' stories, I understand the importance of putting myself out there and share my story; I routinely ask for criticism and make a point of highlighting the shortcomings in my approach that I can detect, in the hope of eliciting further constructive criticism.



From 06:00 until 18:00, Monday to Friday, it is a race against the clock to see how many blocks of work I can complete, and within each work-block, that same race is run at a sprint to complete a specific task or solve a problem.  I can say without a doubt that I have never worked so productively and efficiently, although I never give up the pursuit of working smarter and doing things a little better each day.


Tuesday, March 7, 2017

Advent of Code Success!


To a seasoned programmer, it's a simple puzzle, and my solution is more elaborate than strictly necessary, but I set myself a goal and I achieved it!








Source code for my solution is here: https://github.com/clockworkpc/advent-of-code

It draws heavily on the work of Ryan Bigg in the Toy Robot, mentioned before on this blog, but is considerably modified in order to give a full answer to the puzzle.

Today's success coincides with the completion of another progress chart:


Working in pomodoros is hard to sustain all through the day, especially when a tricky problem crops up -- then it's tempting to stay in my seat and stare at the screen while I turn the problem over in my mind.  When I get up, I feel as if I'm wasting time, but that is a misperception.  My records show that I spend very little time between work blocks when I'm working my way through a tricky problem, and exercising the discipline to move away from my desk and scribble on the whiteboard always pays off.

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.

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!


Sunday, December 11, 2016

State of the Mission: Sunday, 11th December 2016

Week 50 of 2016


Mission DevOps

Work Completed

I started Learn Ruby the Hard Way, got up to Chapter 40, and have been posting about my learning along the way.

Plans for Next Week

Focusing on Learn Ruby the Hard Way is proving as beneficial as I had hoped, and I have every reason to complete it by the end of Week 51 of 2016.  Thereafter, my focus will be on PROJECTS, i.e. something to show for all my efforts.
  1. Transferring my Pastebin to Gist using APIs.
  2. The Toy Robot Challenge
  3. Advent of Code
  4. Starting my job research web scraper and analysis tool.
There is every reason for me to get started on substantive projects that I can put on Github and then direct all and sundry to.  Owing to the paucity of code in my Github, I have been reticent to contact potential recruiters and apply for jobs, but come the last of December, business shutting down notwithstanding, I should have every reason to send out missives and apply online. 

Special Project

My super-special-but-perhaps-not-so-top-secret project is ticking along on schedule.  I have a few more weeks to go, so that's all I've got to say about it for now.

The Odessia

Not much progress on the Odessia this week, but my schedule will permit a lot more creative writing time soon.

Personal Matters

Just the usual washing, cleaning, tidying for the most part.  I have been in touch with uncle, who has been unwell, and attended to the usual bits and pieces that crop up.  One day, when I'm very wealthy and successful, I will have a secretary to handle these matters.





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