Apprenticeship
Starting from October 2015, I embarked on a resident apprenticeship at 8th Light, London
This blog charts my progress, day by day, the moments of confusion and the moments of elation.
Graduation
July 26, 20168th Light Apprenticeship - The End.
It has been a while since I updated this blog. I wanted a cliff hanger ending, like when a TV program halts for a season break.
read moreThe Final Challenges
April 15, 20168th Light Apprenticeship - Day 129
Today marks the last day of my apprenticeship. All that remains now is the Challenges. You get no advance details of the challenges. The day you find out what they are all about is the day you start them. As I understand it, you have two weeks in order to complete them. After that, they go to a review board who make a decision as to whether you have been successful enough to be a Craftsman.
read morePairing Tour Day 8
April 14, 20168th Light Apprenticeship - Day 128
Today I was on a large client site with two of our craftsmen. Over the last few months they have been helping the client introduce git for source control, and standardise the code structure so that it can be built and deployed using gradle.
read moreCoin Changer Presentation
April 13, 20168th Light Apprenticeship - Day 127
On Friday, another apprentice performed the bowling game kata. When she got feedback afterwards I listened carefully as I knew I would be performing a kata this week, so I figured I could pick up some tips.
read morePairing Tour day 7
April 12, 20168th Light Apprenticeship - Day 126
Todays pairing was done using Go, an open source language written by google, used quite a lot in dev ops. The application in question was used to load test a http server. It generated lots of get
requests which then hit the server end point.
Pairing Tour day 6
April 11, 20168th Light Apprenticeship - Day 125
Today I was back to my pairing tour, which makes up most of this, the last week of my apprenticeship.
read moreRuby Recap
April 08, 20168th Light Apprenticeship - Day 124
Since I’ve spent the last month doing Clojure, I had a story to spend a day or so refreshing my memory on Ruby. It felt a little alien setting up a new Ruby project, but it went fairly smoothly and all the shortcuts for running tests still worked.
read moreThe Last Clojure Story
April 07, 20168th Light Apprenticeship - Day 123
In between the days I’m pairing, I have a few technical stories of my own to finish. Today I tackled the last story on the domain I’ve become so familiar with - tic tac toe.
read moreProposals
April 06, 20168th Light Apprenticeship - Day 122
It’s amazing what goes on behind the scenes of a project. Somehow projects suddenly appear, but I’m finding out that there is a lot of work done up front to determine what a client wants, provide a level of estimation, create a proposal and form a team.
read moreOptimising Clojure Minimax
April 05, 20168th Light Apprenticeship - Day 122
When someone wants to play my Clojure tic tac toe, they choose the player combination they would like. If they choose ‘Minimax vs Human’, they need to be patient. As there is no optimisation in my minimax implementation, it takes around 30 seconds for the first move to be placed.
read morePairing Tour Day 2 and 3
April 04, 20168th Light Apprenticeship - Day 121
Last Friday I spent the day pairing with our newest craftswoman, Jarkyn. She had to setup her new laptop so we used the time to explore running virtual machines.
read moreMinimax is Unbeatable
April 01, 20168th Light Apprenticeship - Day 120
Finally late last night I got minimax working in Clojure! It has no optimisations but it works which is great starting point.
read moreClojure Minimax
March 31, 20168th Light Apprenticeship - Day 119
Today I gave minimax in Clojure a go. For the 5th time. I don’t know what it is about minimax, but it always seems to behave differently each time I implement it.
read morePairing Tour Day 1
March 30, 20168th Light Apprenticeship - Day 118
Towards the end of the apprenticeship, you take part in a pairing tour. The pairing tour is your opportunity to pair with the 8 craftsmen who make up your review board.
read moreSeparation of Concerns
March 29, 20168th Light Apprenticeship - Day 117
During my IPM I explained how I implemented the replay functionality. Jim pointed out that I could still have my polite ‘Thanks for playing’ message if I just pushed it up a level, so that it was outside of the recursive functions.
read moreReplay Functionality
March 24, 20168th Light Apprenticeship - Day 116
Of all the tic tac toe games I have written (I think I’m on my 5th), the replay functionality has been the most difficult to add to the Clojure version.
read moreServer Client Protocol
March 23, 20168th Light Apprenticeship - Day 115
Spiking a Clojure server interacting with a Java client was a little experimental but it seemed to be hanging together. One piece of feedback I got was around the data that the server was sending to the client. I has assumed this would be in it’s final format, whereas the idea was to strip the formatting out, and just send the data in a raw format.
read moreClient Server Tic Tac Toe
March 23, 20168th Light Apprenticeship - Day 114
During today’s IPM Jim came up with an idea of playing tic tac toe across sockets.
This means, there would be a server running (which would have all the game logic). A client would connect to this server, and request information, such as ‘Request: Player-Options’. The server would receive this instruction, and respond with the string that the client should display, such as “Display: Choose a player option: (1) Human vs Human (2) Random vs Human”.
read moreA Day With No Laptop
March 21, 20168th Light Apprenticeship - Day 113
This morning my laptop crashed and gave me the white screen of death. Not something I have seen before. After turning the machine on and off multiple times, it didn’t change.
read moreBattleships
March 18, 20168th Light Apprenticeship - Day 112
During waza today I paired with Danny on Clojure. Together we built the game battleship, and we got surprisingly far.
read moreThe Player Factory
March 17, 20168th Light Apprenticeship - Day 111
Today I introduced a player concept into my Clojure tic tac toe. I was still only working with Human vs Human, however I wanted all the building blocks in place, so that introducing the random computer player afterwards would be relatively easy.
read moreValidation Template Method
March 16, 20168th Light Apprenticeship - Day 110
The next requirement for my Clojure tic tac toe is to introduce a computer player. I had a quick think about this, and have a few ideas as to how to implement it, however at the moment, the code base is not in the right shape to support different player types. I don’t yet have a concept of a player.
read moreThe Pomodoro Technique
March 15, 20168th Light Apprenticeship - Day 109
The Pomodoro Technique is a working method such that for every 25 minutes you work, you take a 5 minute break. I’ve tried it before, but have often felt that 25 minutes was too quick. Usually I was just getting into something then bam! The time was up!
read moreStubs in Speclj
March 14, 20168th Light Apprenticeship - Day 108
Over the weekend I took a total break from working, so bar a couple of Clojure dreams, and falling ill (typical!), I was all set to start working on the game loop of tic tac toe this morning.
read moreQuerying A Vector For A Value
March 11, 20168th Light Apprenticeship - Day 107
I remember when I was doing my java tic tac toe, I went on a mission to eliminate duplication within the bodies of loops when validating the user input.
read moreClojure Data Structures
March 10, 20168th Light Apprenticeship - Day 106
The board needs to be represented by an underlying data structure. The two that came to mind as potential candidates in Clojure were Vector
and List
. I took a few moments to read what each could offer.
Mocking I/O in Clojure
March 09, 20168th Light Apprenticeship - Day 105
Today I started implementing tic tac toe in Clojure. I don’t feel I know much about the language, and I feel like I have been away from the tic tac toe domain for a few weeks, so I wrote a list of the collaborators I felt I might need, so that I could choose a starting point.
read moreTail Recursion in Clojure
March 08, 20168th Light Apprenticeship - Day 104
I had a vague recollection that tail recursion was more efficient than ‘normal’ recursion, but I couldn’t quite remember what the definition of tail recursion was.
read moreClojure Kata
March 07, 20168th Light Apprenticeship - Day 103
I worked through some of the koans over the weekend, but, similar to Ruby, I found they didn’t give me enough of an insight into how to actually write Clojure myself. After around 12 of them, I decided try something different.
read moreClojure Koans
March 04, 20168th Light Apprenticeship - Day 102
Clojure is a lisp dialect with a functional emphasis. The documentation states that it allows you to write expressive code.
read moreCob Spec As A Vendor Directory
March 03, 20168th Light Apprenticeship - Day 101
Today I thought I had finished updating my Http Server on several occasions, only to do one last test and find something else to tweak.
read moreGeneralising the Routing
March 02, 20168th Light Apprenticeship - Day 100
I needed to generalise the routing as much as possible in my HttpServer. The first thing I did this morning was to draw out a table of HttpMethod (verb), to action and return code. From this I could see which routes were doing the same thing (thus could be grouped together in the same bucket), and which routes needed special consideration (as perhaps the return code was different, or extra manipulation, such as decoding the parameters, or authentication was required).
read moreServer Demo
March 01, 20168th Light Apprenticeship - Day 99
This morning I continued to prepare the demo for my server. I planned to show the tests passing first (after all that is the proof that the functionality is in place), after which I would show the code. I felt a little more nervous about this demo and hoped it would go to plan.
read moreFinal Sprint
February 29, 20168th Light Apprenticeship - Day 98
Over the weekend I continued with my server implementation, tackling Partial Content, Patch with Etag and Threading.
read moreBasic Auth
February 26, 20168th Light Apprenticeship - Day 97
This morning when I got to work, Felipe asked how my server was going. He wanted a quick look at the code, as he was curious. I gave him open reins on IntelliJ. He took a few seconds to look at the code, and straight away opened the router, which is the class he wanted to see. I was amazed, that he honed in on exactly the right class. Maybe my naming is better than I thought as he seemed to be able to navigate intuitively.
read moreRefactoring Makes Speedy Work
February 25, 20168th Light Apprenticeship - Day 96
I couldn’t wait to refactor the processor class, which is essentially the brain of the server application. In here, it decides what action should take place, based, mainly, on the route that has been received. Some routes are further broken down into the http method, i.e., for a given route ‘/form’, if ‘GET’ then do A, but if ‘POST’, then do B.
read moreFile System Interaction
February 24, 20168th Light Apprenticeship - Day 95
Today I have been interacting with the file system a lot. The first test I tackled was the combined Post-Get-Put-Get-Delete-Get. This meant I had to implement the ‘proper’ behaviour for each method, rather than just return a valid status.
read moreSimple Http Tests
February 23, 20168th Light Apprenticeship - Day 94
“Let’s start from the very beginning, it’s the very best place to start. When you read you begin with A, B, C, when you sing you begin with Do, Ray, Me”
Well, what do you do when you are coding an HTTP Server?
read moreThe Dreaded Server Task
February 22, 20168th Light Apprenticeship - Day 93
Shortly after I started at 8th Light, I started to hear rumours about the dark times
. This is what some apprentices refer to as the weeks they implemented their HTTP Server. Since then, naturally I have been dreading this task. I’m not alone when I mention I have had sleepless nights anticipating it. Still, the time has come to embrace this challenge. I am welcoming it with open arms. Positive attitude usually results in positive outcome.
Wrapping up Task Man
February 19, 20168th Light Apprenticeship - Day 92
This morning I came to work with fresh enthusiasm, and got straight onto trying different techniques to get my jasmine tests to pass. As the code worked ok in the browser I had narrowed the issues down to jQuery in the tests. For some reason, it was not picking up the changes that were being made through the production code.
read moreTDD & JavaScript
February 18, 20168th Light Apprenticeship - Day 91
JavaScript is making life very difficult at the moment. I know exactly what I want to do, and can even see it working in the browser if I spike the code out, yet, testing it is just impossible. I’m not even trying to do anything complex. I just want to do checks like ‘ensure display has been called’, or ‘ensure dom is now updated with specific tag’.
read moreMore JavaScript Configuration
February 17, 20168th Light Apprenticeship - Day 90
I woke up really early this morning thinking about ‘Task Man’. A few questions were going around in my head - Do I really need a server? Do I need to use post/gets, do I need to persist somewhere? What actually is a Single Page Application
?
At around 5am I started googling.
ECMA6 JavaScript
February 16, 20168th Light Apprenticeship - Day 89
I had psyched myself up to enter the dark times today, as it was thought I would start the HTTP server. However, it turns out that I need to do more JavaScript practise. This week I need to implement a ‘TO-DO’ list written using clean, idiomatic ECMA6 JS.
read moreJavaScript Namespaces
February 15, 20168th Light Apprenticeship - Day 88
JavaScript lures you into a false sense of safety (all unit tests green), only to blow up in the browser.
Seemingly it was never designed for large scale programming, so support for building reusable modules is limited. Certain work arounds need to be done to allow the JavaScript code to work both through Node for headless unit tests, and through the browser.
read moreUpdating My Website
February 12, 20168th Light Apprenticeship - Day 87
Earlier this week I was really excited to hear that people outside the 8th Light office are reading my blog! Having this in mind, I wanted to tidy it up a little bit, so that people can continue to enjoy it. I decided to use Friday’s Waza time for this.
read moreWriting Your Own Rake Task
February 11, 20168th Light Apprenticeship - Day 86
Running jasmine tests from within a Ruby project means my folder structure is non-standard for a JS project.
read moreJavaScript Testing
February 10, 20168th Light Apprenticeship - Day 85
In order to complete the spike on integrating JavaScript into my web application, I wanted to get a unit test working. On the surface of things, it sounded straight forward enough - just install node, jasmine and jQuery and away you go.
read moreSpiking
February 09, 20168th Light Apprenticeship - Day 84
During today’s IPM I have to admit I was a little apprehensive about a couple of things. The first was that I still had an exception thrown in my log, which I had not been able to fix. The second reason was that I had been looking into so many new technologies, I felt it would be difficult to estimate the new tasks that I was going to be given.
read moreAjax
February 08, 20168th Light Apprenticeship - Day 83
Having completed my Rack web app at the end of last week, I started investigating the use of AJAX. However, in starting up the web app I started to notice exceptions in the logs.
The exception implied that the cookie headers were missing.
read moreJavaScript
February 05, 20168th Light Apprenticeship - Day 82
Today’s task was to complete a kata in JavaScript using Jasmine for testing. It felt nice to take a break from tic tac toe, so I investigated how to install the tools.
read moreA Simpler Rack App
February 04, 20168th Light Apprenticeship - Day 81
I had one day to write a rack app that was simpler in design than the Sinatra version. I felt a bit daunted, as it can be hard to think of new solutions. I thought about the main things I had been told in the review. I think they can be summarised as keeping the players on the web side as simple as possible, and changing the game so that there was an easy way for a web human’s turn to be taken.
read moreRouting in Rack
February 03, 20168th Light Apprenticeship - Day 80
Yesterday I had published my ttt-core gem, but had to add the command line and web app repositories to the same gemset as the core lived in. This was so that all apps were publishing gems and looking for gems in the same folder.
read moreCreating and Publishing a Ruby Gem
February 02, 20168th Light Apprenticeship - Day 79
The last task to tackle in this week’s iteration was to create a Ruby gem for the core rules of the tic tac toe game. This was so that the two different implementations (command line and web app) could depend on the same core, reducing duplication and mimicking setup of a more realistic project.
read moreRuby Closures
February 01, 20168th Light Apprenticeship - Day 78
Ruby offers various closures which we can use to group code together. The official Wikipedia definition is:
‘A function or a reference to a function together with a referencing environment.
Unlike a plain function, closures allow a function to access non-local variables
even when invoked outside of its immediate lexical scope.’
Perhaps it is easier to remember a closure as a group of code which you put together, and when you call it, you have access to everything that was inside it when you created it.
read moreA day of Pairing
January 29, 20168th Light Apprenticeship - Day 77
Over the last few weeks, Mateu and Danny have been working together on a client project. As they pair, they talk about the changes they are making. In the morning I actually paired with Mateu on the same project, and he carefully explained some background on the application, showed me the spike code he has put together, and we set about TDD-ing the changes back in.
read moreState Machines and Production Pairing
January 28, 20168th Light Apprenticeship - Day 76
At this mornings Zagauku session Uku led a really interesting talk on state machines. Starting with the simple example of a turnstile, he worked up to how a production system, such as a booking system, or insurance system could use a state machine.
read moreRunning a Web App Through config.ru
January 27, 20168th Light Apprenticeship - Day 75
Up until now I have been running my Ruby web app using ruby tic_tac_toe.rb
.
Template Method
January 26, 20168th Light Apprenticeship - Day 74
One of the review points in this week’s IPM was to remove the duplication between the code which prompts and validates the user to enter their choice of game (HvH, HvC..) and the code which prompts and validates the users next move.
read moreDoes TDD Slow You Down
January 25, 20168th Light Apprenticeship - Day 73
Often people ask the question ‘Does TDD slow you down?’. Sometimes yes, because perhaps you have to put more thought into where you start the testing, figure out what testing framework to use, what type of tests to write, how to mock dependencies etc. But of course, the trade of is that you have the security blanket of a regression test, and that is priceless when it comes to refactoring or adding features to an application
read moreSinatra
January 22, 20168th Light Apprenticeship - Day 72
After an hour of looking at Sinatra tutorials I could tell it was much easier to get started with than Rack.
read moreRack
January 21, 20168th Light Apprenticeship - Day 71
Rack provides the standard interface for interacting with HTTP and connecting to web servers. There is the code that accepts a request and code that serves the response. Rack is the interface between the two.
read moreProfiling Ruby Minimax
January 20, 20168th Light Apprenticeship - Day 70
As previously mentioned, my Ruby minimax was a bit slow. Rather than jump into alpha-beta pruning I did some Ruby profiling to establish which parts of the program were slowing it down.
read moreRuby Mixin
January 20, 20168th Light Apprenticeship - Day 70
Modules in Ruby are used to group together methods, classes and constants. Primarily they provide a namespace but they also enable Mixin’s to be used. Similar to classes, modules are defined using the module
keyword.
Ruby Tools
January 19, 20168th Light Apprenticeship - Day 69
Tuesday is IPM, and today was the longest one yet. It lasted about 3 hours but we covered so much, in so little time.
read moreRuby Minimax
January 18, 20168th Light Apprenticeship - Day 68
The time had come to start the minimax algorithm in Ruby. I’ve now done it twice before, but it doesn’t seem to get any easier. I could tell I wasn’t looking forward to it, as I decided to do everything else in my iteration before starting it. To warm up, I paired with Priya on a Ruby Kata in preparation for our upcoming talk on effective pairing. However as soon as that I was done I got to work.
read moreRunning Tests and CI with Ruby
January 15, 20168th Light Apprenticeship - Day 67
There are multiple ways to run a test in Ruby.
read moreRuby Mocking
January 14, 20168th Light Apprenticeship - Day 66
Originally I was thinking I would write my own test doubles for Ruby, but in fact, this is not as easy as it is in Java, as you can not strictly override methods the same way you can in Java. As Ruby is duck typed, it is easy to create a new testing class with the same method names as what you are trying to stub. However it means this duck type and the original class may diverge over time, and become a maintenance overhead.
read moreColloquaial Ruby
January 13, 20168th Light Apprenticeship - Day 65
Having written Java for years, switching to Ruby shows how much Java is ingrained in my blood.
read moreCommunication workshop
January 12, 20168th Light Apprenticeship - Day 64
If I am honest I was a little apprehensive about the communications workshop. I am not particularly extroverted. I had visions of each of us having to take a turn and humiliate ourselves in front of our colleagues. I was prepared to keep an open mind, grit my teeth and get through it.
read moreRuby Tic Tac Toe
January 11, 20168th Light Apprenticeship - Day 63
As I am not very familiar with Ruby, I started my tic tac toe using a bottom up approach, the complete opposite to how I started the Java implementation. I decided to start with the Board. I chose this object because I didn’t know how to read and write input to the command line, and it seems the Board is the only object that does not need to do this.
read moreKoans
January 08, 20168th Light Apprenticeship - Day 62
“Koan, noun, a paradoxical anecdote or riddle without a solution, used in Zen Buddhism to demonstrate the inadequacy of logical reasoning and provoke enlightenment.” wikipedia
read moreRuby Kata
January 07, 20168th Light Apprenticeship - Day 61
Starting a new language involves a lot of setup and configuration that I didn’t expect. Yesterday half a day was spent installing rvm and ruby. Today I realised that the setup didn’t work when I opened a new terminal. The instructions I had followed were here
read moreVim configuration
January 06, 20168th Light Apprenticeship - Day 60
As I am now using vim to write actual programs I needed to invest some time in making the vim editor look nice. When programming it is useful to have syntax highlighting, bracket matching as well as being able to format, run the tests through a shortcut and navigate files.
read moreRuby
January 05, 20168th Light Apprenticeship - Day 59
One day, towards the end of the year in 2005 my boss wanted to have a word. The familiar flush of adrenalin went through my body as I tried to think what I had done wrong, how I could fix it and what terrible knock on effect it might have had…
read morePackage Refactor
January 04, 20168th Light Apprenticeship - Day 58
The last few weeks saw a lot of change in tic tac toe. The gui was introduced, the rules from the game were extracted so that they could be shared between the command line game and the gui game, plus a few different patterns had been applied. As such, the packages I originally had in place had become polluted.
read moreGilded Rose Kata - My Masterclass
December 29, 20158th Light Apprenticeship - Christmas Holidays
The Gilded Rose Kata gives you a piece of ‘legacy’ code to understand then add to. The kata also has the constraint of being unable to change certain parts of the system. This is good practise for real life projects, which may have several clients, restricting the number of changes that can be made to a given interface.
Having just finished reading the book ‘Clean Code’ it lent itself well to applying some of the techniques. The ones I used are described below.
read moreDecorating
December 22, 20158th Light Apprenticeship - Day 57
The decorator pattern allows behaviour to be added to an object without affecting the behaviour of other objects in the same class. Behaviour can be added and removed at runtime by attaching and removing decorators, which are wrappers of the original class, providing some extra functionality around the original method call.
This pattern promotes single responsibility, with each decorator being responsible for one enhancement. Similarly, the open close principle is adhered to, as you can create a new decorator class without making any underlying changes to the original class which it is wrapping.
read moreAll players are equal
December 21, 20158th Light Apprenticeship - Day 56
I’ve managed to get the gui to treat all players the same. Horrah. I have two versions. I’m not sure which is better. As always, there are pro’s and con’s of both.
read moreArduino
December 18, 20158th Light Apprenticeship - Day 55
It’s not every day you can say you built a spaceship interface, a love machine, and a piano at work. However today that is what I did!
read moreMastery Cohort
December 17, 20158th Light Apprenticeship - Day 54
Today Micah Martin held a cohort with the London office. It was a code spar, so in teams each group had to solve the same problem, and collect points. The team with the highest score won.
read moreObserver Pattern
December 16, 20158th Light Apprenticeship - Day 53
The observer pattern has publishers and subscribers. Every time there is a change in the publisher, it tells the interested parties. Imagine you subscribe to a magazine, every time there is a new issue, you, as a subscriber will receive that issue.
read morePatterns
December 15, 20158th Light Apprenticeship - Day 52
When you work on the same code each day, it becomes very familiar. When complexity creeps in, it is not always so apparent, because you have seen it morph so slowly that you didn’t notice.
read moreCompromise
December 14, 20158th Light Apprenticeship - Day 51
Last Thursday I added the different game types to the gui tic tac toe. As I result I had code that checked what game type had been chosen then acted accordingly. This violated the Open Closed Principle. If a different game type was added, then I’d potentially have to update this code to do something different.
read moreAchievement
December 11, 20158th Light Apprenticeship - Day 50
It had been a few weeks since I last saw the graduate team working on their project on client site. Today was the end of the project.
read moreDifferent Game Types
December 10, 20158th Light Apprenticeship - Day 49
Something that has been bothering me about my GamesRules
class, is the fact that it can only create a board and players once it has information from the player regarding what type of game they want to play, and the board dimensions they wish to use.
Pairing Principles
December 09, 20158th Light Apprenticeship - Day 47
At client site 8th lighters work in pairs on the stories that they are tackling. It’s hard work to be a good pair. Here are some pointers.
read moreProductive Week, Productive Review
December 08, 20158th Light Apprenticeship - Day 47
I feel I have been my most productive in the last week. I had a couple of tricky tasks but kept my head down and just kept on going.
read moreBoy Scout Rule
December 07, 20158th Light Apprenticeship - Day 46
A few weeks back, I introduced colours to my command line gui for tic tac toe. The result was a very pretty output, but a rather polluted command prompt class.
read moreModel View Controller
December 04, 20158th Light Apprenticeship - Day 45
Back to the JavaFX Gui. Yesterday afternoon I started working on extracting the game logic that was in my ‘Gui Prompt’ into a separate file. This was accomplished, but I felt that something was not sitting quite right in my design.
read moreReadability
December 03, 20158th Light Apprenticeship - Day 43
This morning I took a look over Rock Paper Scissors game I wrote yesterday. I want my code to be really readable and looking at the method that has the crux of the business logic in, I still was not 100% satisfied.
read moreRock Paper Scissors
December 02, 20158th Light Apprenticeship - Day 43
I’m happy to say that my gui testing idea worked a treat. My task was to spike it in order to provide an accurate estimate. However, once I had realised how to unit test an end to end flow I just put the actual test in. It is great when things work out.
read moreGui Testing
December 01, 20158th Light Apprenticeship - Day 42
Testing gui’s seems to be incredibly hard. I’ve been careful to keep the JavaFX specific code separate from the business logic so that the events that occur when a button is clicked can be written using TDD.
read morePackage Principles
November 30, 20158th Light Apprenticeship - Day 41
As developers, we constantly break problems down into manageable chunks. These emerge as methods, classes, systems. Sometimes an application is made up of hundreds of classes. How are they organised? With packages. How do we keep our packages organised? With package principles.
read moreSnakes & Ladders
November 27, 20158th Light Apprenticeship - Day 40
Turns out snakes and ladders is similar to Tic Tac Toe.
There is a board, a player, a prompt and a game.
read morePair Power
November 26, 20158th Light Apprenticeship - Day 39
Another apprentice, Priya, is going through the exercises I helped teach at a client a few weeks back. She had asked if I would pair with her. Having been neck deep in tic tac toe for over a week I was looking forward to helping out, knowing that taking a break from the current stories you are working on often helps clarify things in your mind.
read moreInversion of Control
November 25, 20158th Light Apprenticeship - Day 38
I am not experienced with Gui’s.
My tic tac toe game has a Prompt interface, which currently has one fully working CommandLinePrompt implementation.
read moreWeekly Review
November 24, 20158th Light Apprenticeship - Day 37
Today’s IPM was really good. I showed my 4x4 board, and although it was a little slow to make the 5th move in the grid , when minimax kicks in, I’m pleased to say it was accepted.
read moreKata Performance
November 23, 20158th Light Apprenticeship - Day 36
The day had come to perform the Roman Numerals kata.
Over the weekend I had chosen a piece of music to perform to. I chose ‘Welcome to the Lunar Industries’ from the Moon Soundtrack. Mainly because:
(a) It was 10 mins long, the maximum time I wanted for the performance, and
(b) it has no words so no chance of getting too distracted.
read moreJavaFX
November 20, 20158th Light Apprenticeship - Day 35
Front end development is entirely new to me so Friday was time-boxed to get to know JavaFX. I was looking forward to this. Whilst I love getting into the guts of the business logic when doing server side development, seeing the gui change in front of my eye’s with every line of code is also really rewarding.
read moreEstimates
November 19, 20158th Light Apprenticeship - Day 34
I finished off the 4x4 game before the morning standup but found it still quite slow in one specific scenario. I was about to start pulling the minimax logic into a strategy, to keep the design consistent, and it was time for zagaku.
read moreScaling
November 18, 20158th Light Apprenticeship - Day 33
Today I learnt a few things. The first is that I can’t count. Looking back at my blog entries, each day is numbered in a sporadic fashion. No idea how that happened, I think the days are going so fast I got caught up in a my own timezone. I’ll address this another time.
read moreLoop tastic
November 17, 20158th Light Apprenticeship - Day 34
In a sense my week starts on a Tuesday. It’s the day of my weekly IPM meeting, where I demo what I have achieved and get my next set of goals.
read morePlanning makes perfect
November 16, 20158th Light Apprenticeship - Day 33
Monday is planning day at the client. Last week we observed the graduates and how they worked. This week it is time to make some more changes to help them improve as a team. We already had a few points we wanted to address, namely estimating using a relative scale. Up to now people have been estimating without assigning a marker task as ‘small’, maybe 1-2 points or ‘medium’, maybe 5 points, and so forth. This was making it difficult for people to assign an estimated value to the task at hand.
read moreUnbeatable
November 13, 20158th Light Apprenticeship - Day 32
Integrating the minimax algorithm written yesterday into the game was relatively straight forward. I had prepared a test upfront to prove that the unbeatable player was indeed unbeatable and am pleased to announce it passed.
read moreMinimax
November 12, 20158th Light Apprenticeship - Day 31
Thursday was minimax day. Having started the scoring on Tuesday, then being out at the client yesterday, I had the feeling I was putting the innard workings of the minimax algorithm off. So Thursday was the day to jump right in.
read moreSource Control
November 11, 20158th Light Apprenticeship - Day 30
category: apprenticeship
Back to client site today. On arrival, I felt slightly apprehensive, wondering how much progress had been made since we left them to their own devices on Monday. My fear was that every pair would be blocked for different reasons, however attitudes still seemed positive, and people seemed to be occupied.
read moreKeeping the balance
November 10, 20158th Light Apprenticeship - Day 29
I was eager to demo my new console, complete with validation this morning. More so, I was keen to show the code that I had spent many an hour working on.
read moreProxy problem
November 09, 20158th Light Apprenticeship - Day 28
Yesterday, I got three loops down to two. This morning, on the train to the client, in about 10 seconds, I managed to reduce the loops down to one.
Originally, because the Board is required when reprompting the user for a valid move, I was thinking it didn’t fit into the general solution. However I realised if I created a Function, to pass into the general solution, I could still reference the board without changing the contract with the method.
It’s funny how your subconscious keeps on tackling problems when you don’t even realise.
read moreBeaten by the Board
November 08, 20158th Light Apprenticeship - Bonus day
A bonus entry, seeing as so much of my time has been invested to try to eliminate the duplication when validating input and reprompting from the command line with custom messages.
There are 3 types of validation in my tic tac toe: 1) Validate the next move provided by the human user [must be a number, must be within grid boundary, must be a vacant position] 2) Validate the re-play option [must be a value in the set Y, N] 3) Validate the users choice of game [must be HumanVsHuman]
Although the validation rules are slightly different, I under estimated how much grief this would cause. I’ve documented the avenues I went down below.
read moreValidation
November 06, 20158th Light Apprenticeship - Day 25
When a player enters an inappropriate input (for example an alpha character rather than a numeric, or a number outside the valid range etc) my tic tac toe game gives back a lovely informative message, personalised to the violation.
read moreReal User Experience
November 05, 20158th Light Apprenticeship - Day 24
When working with user interfaces I have learnt that getting feedback from a user is important. Up to now I’ve been the only one interacting with the ttt game, however in my IPM today I passed it to my mentor to play.
read moreStrategy
November 04, 20158th Light Apprenticeship - Day 23
The number of note books I have with little 3 x 3 grids drawn in is increasing. Trying to visualise a 2D array in your head is difficult. Trying to make a square formation out of a line of X and O’s is difficult. Once again drawing a visual representation is helping a lot.
read moreTerminal Visuals
November 03, 20158th Light Apprenticeship - Day 22
Apart from a short spell at University, when we were asked to draw a square and a circle onto the screen, I’ve never really used Java to do anything more visual than print a few ascii boxes onto the command line. Today that changed slightly.
read moreSingle Point of Change
November 02, 20158th Light Apprenticeship - Day 21
It’s amazing how much you forget in a week. Having used Eclipse during last week’s training course, I could not remember the shortcuts I had previously learned for IntelliJ. Luckily I still had my cheat sheet so resurrected it to refresh my memory.
read moreContinuous Improvement
October 30, 20158th Light Apprenticeship - Day 20
The week of client training has come to an end. It’s been great working with Felipe to teach ten students Java. We built up a good rapor with the class, and everyone, including us, enjoyed the experience.
read moreQuestioning
October 29, 20158th Light Apprenticeship - Day 19
I’ve noticed that the Craftsmen at 8th Light share the ability to ask leading questions to the apprentices. They give just enough information away to get us thinking differently. This helps us realise alternative solutions and let’s us decide on our path. In a nutshell, it allows us to progress when we are stuck.
read moreRepetition
October 28, 20158th Light Apprenticeship - Day 18
People love a competition so every morning starts with a typing race. The scores range from 95 wpm from those who touchtype, down to 18 wpm for those single finger typists. The competative element spurs people on. Even the slow typists are (slowly) getting faster.
read moreAttitude
October 27, 20158th Light Apprenticeship - Day 17
Teaching a group of strangers over a week allows you to see traits in their personalities. Some are young and enthusiastic, others are know it alls. Then there are the ones who lack confidence, and the ones that are tired out by life.
read moreProfessionalism
October 26, 20158th Light Apprenticeship - Day 16
Raise your hand if you consider yourself a professional. Not a single person raised their hand.
read moreMinimalistic
October 23, 20158th Light Apprenticeship - Day 14
Friday afternoons are wasa time, a chance to work on your own projects. Today I dedicated my time to improving my website.
read morePreparation
October 22, 20158th Light Apprenticeship - Day 13
The slides are almost prepped. I have one final section to do then I’ll be all set for next week’s training course. Even though a lot of the concepts in the course are second nature (classes, fields, methods, inheritance, interfaces etc), trying to explain them to someone who doesn’t know would be a challenge without some thought.
read moreTime
October 21, 20158th Light Apprenticeship - Day 12
I find everything always takes longer than I imagine. The course is creeping up but preparation is coming together.
I finished the last of the Ledger exercises in the afternoon today, when I had expected to finish them before lunch. I had to remind myself of Comparator vs Comparable, the in’s and out’s of parsing Dates and Serialization. Not features of the language that I have touched in a while.
read moreFeedback
October 20, 20158th Light Apprenticeship - Day 12
Feedback comes in several forms, and can be given and taken. I covered both sides today.
Tuesday’s are my weekly Iteration Planning Meetings (IPM) where I show what I have been working on over the last week, and receive feedback on my code based on what my mentors see. Another form of feedback is test coverage, the IDE tell’s me what parts of the code is covered with tests, and which parts are not. I’ve been working on getting the game 100% covered, and was able to show this today.
read morePen and Paper
October 19, 20158th Light Apprenticeship - Day 11
At what point did people switch to primarily capturing their thoughts and learnings in electronic format opposed to filling paper notebooks with lists, mind maps and diagrams?
read moreFocus Switch
October 16, 20158th Light Apprenticeship - Day 10
The weeks are flying in. Two weeks down already. I started familiarising myself today with the training materials I’m going to help to deliver at a client. The course is teaching Java from the beginning so most of the constructs I’m familiar with so far. I’m still making sure I do each exercise as the notes suggest (some state to do without an IDE) so that I can easily relate to what the students will be doing in class. The more meaty exercises I’ll start on Monday.
read moreTDD Grove
October 15, 20158th Light Apprenticeship - Day 9
The apprentices have been asked to start creating pull requests, so I’ve raised a few today. A couple of tiny ones started my day, just to remind myself of the PR flow, and I ended my day raising one for my latest story. The simple task of putting a PR together made me look closer at the changes I was about to push, especially in terms of method names, and code layout.
read morePrep work
October 14, 20158th Light Apprenticeship - Day 8
I’ve been asked to help one of our Craftsman provide Java training to a client. As an apprentice I’m really thrilled to have been asked and trusted to assist. It will of course require preparation, namely familiarising myself with the materials, doing the exercises that we will be teaching, and picking a few parts of the course that I can help to deliver. This meant my iteration had to be slightly re-planned. As in client projects, priorities change all the time, and today I got a taste for context switching.
read moreMusic
October 13, 20158th Light Apprenticeship - Day 7
We have a special guest in the office this week, Paul Pagel, CEO of 8th Light. This morning he did a key note talk, and started by getting each person to look five years ahead, and imagine a blog post was published, in 2020 somewhere by someone. We had to each dream up what the post was about and by whom it was written. It was exciting to share everyone’s hope’s and dream’s for the company, some funny, some serious, some achievable, some not so (is Mars really ready for an 8th Light office?). A nice way to start the day.
read moreTop or Bottom
October 12, 20158th Light Apprenticeship - Day 6
Over the weekend, my gut instinct was still telling me to stick with Outside In, to prevent creating superflous entities or methods in my program. At this stage, it’s what I’d most likely to do if faced with a real client program, especially if the entities were not all known up front. What I was pondering was how to introduce a Player and a Prompt through a high level test, when I wasn’t using an out the box mocking framework to verify interactions. In short, I realised the experiment I wanted to try was to avoid using Mockito rather than avoid using Outside In TDD.
read moreSmall Steps
October 09, 20158th Light Apprenticeship - Day 5
Today I saw an Apprentice become a Craftsman which was a great way to end my first week - Seeing someone else reach the goal that I have only just started working towards.
read morePractise
October 08, 20158th Light Apprenticeship - Day 4
Apprentices are sometimes required to perform kata’s, and I have the chance to perform the Roman Numeral one tomorrow if I can write the whole test suite and code in under ten minutes. I practised all day. In the morning it took me twenty minutes. First I honed my test cases down. Then I tweaked the test template offered in Intellij to generate a customised skeleton test case. By lunch I could perform it in fifteen.
read moreTrade-offs
October 07, 20158th Light Apprenticeship - Day 3
Yesterday afternoon I started my first coding task at 8th Light. My aim is to perform the RomanNumerals kata at ‘waza’, 8th Light’s afternoon dedicated to learning. Whilst I was not apprehensive about the kata, as I’m familiar with the problem, I found it harder than I originally anticipated.
read moreRituals
October 06, 20158th Light Apprenticeship - Day 2
Today I ate lunch with my colleagues around the table in the canteen. A simple ritual but one that I have not done in years. The majority of my working life has been in a environment where employees eat at their desks. To come together for half an hour, and eat lunch was enjoyable.
read moreA New Chapter
October 05, 20158th Light Apprenticeship - Day 1
Today is the first day of my resident apprenticeship at 8th Light. On arrival to the office the learning started immediately with a ‘Zagaku’ (learning whilst seated) session on the Single Responsibility Principle.
read more