Java makes me a modern girl


My 8th Light apprenticeship blog

Squashing a bug first

It’s my first day back from holiday today. I’m back in the basement (can’t wait for our new office!!) and went straight back to working on my Java web Tic Tac Toe.

Read more...

Learning so many different things!

I feel like my day today was all over the place but I learnt quite a few new things. Firstly Molly gave a really good Zagaku on Priority Queue and binary heap. I really need to do that online course about data structures (or some other computer sciency course).

And in the afternoon I first paired with Sophie on the prime factors kata and then with Priya and Ced on their achievement tracker project.

Read more...

The rocky road to a Java web Tic Tac Toe

After spending lots of hours last week to try to understand how to use the Mustache and/or Handlebars templating engine in Java, I finally gave up this morning and decided to just construct my own HTML.

Read more...

Java web Tic Tac Toe

This morning I tried to get my head around how my Java Tic Tac Toe could possibly work with my HTTP Server so that I could play a game in the web browser.

Read more...

Logging with the composite pattern

I think today I implemented a design pattern for the first time! Actually, I’ve used the factory pattern before but according to Head First Design Patterns, it’s not a real pattern. But I don’t think I’ve ever consciously used a different pattern.

Read more...

Simultaneous HTTP requests

All the test for the HTTP server are now passing - except one. And that is the one where the server is hit with 1,500 GET requests and needs to respond to them in under 5 seconds.

Read more...

Directory links and listings

There are two tests in the cob spec which refer to the content of the directory that is passed in as an argument when starting the server jar: DirectoryLinks and DirectoryListings.

Read more...

I stopped chasing the green 

Yesterday Sarah asked me how many of my cob spec tests were green. I wasn’t really sure at that time and I told her that I stopped chasing the green. Instead, I’m trying to focus on writing my code in a way that it is as generic as possible and adheres to the Open/Closed Principle.

Read more...

A different approach to the second HTTP server 

Yesterday I paired with Will in the morning. We worked on parsing the command line arguments that you can pass to the application when running the jar. I then spent the afternoon creating some infrastructure classes that create threads and made sure that everything was hooked up correctly to the test suite by printing out a received request and sending back a 200 response, just to see some tests passing.

Read more...

HTTP Server reloaded 

Wow, I haven’t blogged for ages! In fact, I was allowed a hiatus during the two weeks that I worked on the infamous HTTP server project, so that I could fully focus on coding. And then I went away for a short server holiday in Slovenia (I can highly recommend it!).

Read more...

What is idiomatic code?

I just had a little Slack discussion with Felipe about idiomatic Elixir. Which led to the question “what makes idiomatic code idiomatic”? Felipe suggested that this might make for an interesting blog post and seeing that I was still looking for a topic for today’s post, I thought I might as well indulge him.

Read more...

Back to Java!

I had my IPM today and received some Java stories in preparation for having to write the HTTP server next week.

Read more...

Testing Phoenix and my patience

When I first started using Phoenix last week, I thought “great! This is like Rails!”. Seeing that I know Rails a little bit, I thought it would be relatively straight forward for me to use Phoenix.

Read more...

Purity

Today Mateu gave a Zagaku on purity and impurity of methods and functions. He started off by explaining how to spot if a function is pure or impure.

Read more...

IPM and plan for the next weeks

I just had my IPM where I demoed my newly created 4x4 board game option and my unbeatable player. Deja-vu! Kind of - except that I’ve written it in Elixir this time.

Read more...

NodeConf London 2016

This week I was lucky enough to get a ticket for NodeConf at the Barbican.

It’s a single track, all day conference about all things related to JavaScript and Node. I really enjoyed it and it was very well organised! The venue was great (I love the Barbican), the catering was great and most of the speakers were pretty good, too.

Read more...

Oh. My. Zsh. Bye.

Today I finished up the human vs random game mode of my Tic Tac Toe and then tackled my last story for this iteration: getting rid of oh-my-zsh.

Read more...

SOLID - Dependency Inversion principle

In the first couple of months of my apprenticeship I decided to write a blog post about each of the SOLID principles. And I did - except one. I’d had this draft sitting around since forever and every time I wrote a new blog post, I was reminded that I never published a post about the last of the SOLID principles. It was really annoying me to have this unfinished business. I don’t want to neglect any of the SOLID principles!

Read more...

Elixirising my Elixir Tic Tac Toe

It’s funny how it’s possible to use a new programming language, get the application working, all tests passing, but the code looks nothing like what it should look like.

Read more...

Performing another kata

Tomorrow I have to perform the Roman Numerals kata. A few weeks ago I performed the Bowling Game kata and I got a lot of useful feedback afterwards.

Read more...

Elixir and flexbox

Today I started with my Tic Tac Toe in Elixir. I’m really excited to be learning Elixir. The excitement is mainly influenced by the fact that a lot of my colleagues are really into it and think that Elixir and its web framework Phoenix are the next big thing.

Read more...

Different types of test doubles

There are different types of doubles that can be used for testing instead of a real implementation. When I first learnt about test doubles, it blew my mind that you can just fake everything around a class under test. Just like that!

Read more...

Talk prep

This morning I continued writing my talk for tomorrow. Once I had finished the slides, I ran through it to practise my delivery.

Read more...

A guest in your codebase

Today I put some finishing touches on my contacts management system and submitted the code to my review board. It consists of 5 craftsmen (including my mentors), who will give me feedback on my code on Friday.

Read more...

Just another Friday

Today I worked more on my contacts management application. I feel like I’m making faster progress now. Somehow it seems a bit easier because I have written some code which gives me a structure that I can follow.

Read more...

So many things to do!

I’m having a bit of a fragmented day today… First thing this morning I had my IPM with Felipe where I demoed my four by four board and random computer player.

Read more...

Setting up Cucumber tests

I mentioned to my mentors that I hadn’t really done acceptance testing before. I understand what it is but I’ve never actually written and implemented an acceptance test.

Read more...

Strategy pattern

On Saturday I went to the London Software Craftsmanship Open Space event. It was fantastic!

One of the sessions that I attended was about taking encapsulation in OO to the extreme. We discussed what the pros and cons of this approach are.

Read more...

Too optimistic

Today I realised that probably for the first time ever, my estimates for my stories this week were a bit too optimistic.

Read more...

I have a date!

During today’s IPM we planned the rest of my apprenticeship and estimated when I would graduate! It’s v nery exciting to have a date now.

Read more...

A bit of C#

I just finished pairing with Ced on his C# project, a contact management system. We tried to figure out how to persist data by writing it to a file.

Read more...

Excluding my slower rspec tests

Jim had already mentioned in my last IPM that I should exclude my slower tests from the suite of tests that I run all the time while I’m developing. Of course I still need to be able run them from time to time and as part of my continuous integration. (So deleting isn’t an option here…)

Read more...

Pairing with a real craftsman

This morning Daniel offered that one of us apprentices could pair with him on the client project he is currently working on. And as my story that I worked on this morning seemed to be going faster than I had estimated, I jumped at the opportunity. I hadn’t paired with him before and it was really interesting to see how he works.

Read more...

Unix commands

Today I spent some time researching Unix commands. I often don’t feel comfortable using the command line for things other than navigating around files and directories, creating and moving them or listing directories’ contents.

Read more...

The Unix philosophy

In my IPM last week, Felipe noticed my complete lack of understanding of anything Unix related. I can just about enter some commands into the terminal to navigate around files and folders, move and remove them. But for anything else I have to rely on StackOverflow which can sometimes be a bit scary.

Read more...

Optimising my computer player more 

Mateu gave me some advice on speeding up my computer player last night. He had the same story in his iteration when he was an apprentice and took it really far - he even went to the lengths of meta-programming to make his code faster.

Read more...

Profiler 

My computer player was a bit slow to make the first move, so I was set the task to profile my code, see where the bottlenecks are and increase the speed. The first move took approximately 6 seconds.

Read more...

JavaScript Prototype 

Today Jarkyn gave a great Zagaku on how to create objects in JavaScript. I haven’t really used the prototype function much. In fact, one time was during Global Day of Code Retreat, when I paired with a JS guru. But I didn’t really know what it did and why it is always used.

Read more...

Re-learning Sinatra 

Yesterday and today I learnt a lot of new things about Sinatra. I’d used it before when I was at GA but that was back in December 2014 and I couldn’t really remember much of it. Also I had never even thought of testing a Sinatra app before, so that was completely new for me.

Read more...

NP? No problem? Not quite… 

Yesterday I went to a meetup where a gentleman did a presentation on the Christofides algorithm. It’s an approximation algorithm for the travelling salesman problem.

Read more...

Ruby and rspec making my life easier

Today I’ve mainly been working on my Ruby Tic Tac Toe and preparing for my IPM. It’s such a pleasure working with Ruby again. I feel that things are much easier! Especially testing.

Read more...

Ruby Tic Tac Toe - Déjà vu?

This week I started writing a noughts and crosses game application in Ruby. Just like I did in September last year! Except that in the meantime I’ve gained a lot of knowledge about good programming practises which I was unaware of before.

Read more...

Changing eeeeeverything

Today I tidied up my Ruby multiplication generator application a bit more (thanks Maël for pointing out that the puts method was in the wrong class!).

Read more...

Ruby multiplication generator without each loops

Today I wrote my first Ruby programme in a while. It was so nice to start afresh! And in a weird way I’m really enjoying using vim. I guess I just get easily excited by new things. I’m sure the novelty will wear off soon. But first let me quickly install this one plugin… oh and what does this one do? Wow, that’s a great shortcut! I better remap the keys to this instead…

Read more...

Prime Factors kata in Ruby

This morning I tried to speed up my performance of the Prime Factors kata in Ruby. Yesterday I managed to do it in 7 minutes 19 seconds but the goal was to do it in under 6 minutes.

Read more...

Flexbox and prime factors

This morning I gave my first Zagaku session! Zagaku is Japanese for classroom lecture and we (the apprentices) have one of those every morning from Monday to Thursday. Normally these are held by craftsmen but recently some of the apprentices have been asked to also give a Zagaku.

Read more...

An intense day

I’m really having a hard time concentrating this afternoon… both because I was in a workshop all morning which made me feel quite tired afterwards but also because Jarkyn’s review board is currently going on! She handed in her challenges today which marks the end of her apprenticeship. She also gave a really good talk about the importance of good conversations. Even though she must have been super nervous and under pressure, she was very calm and measured during the presentation.

Read more...

Learning things as a full-time job

Yesterday I spent almost the whole day writing. The first job was updating the factories blog post with another example for the factory method pattern. It’s the third iteration that I’m dragging this story into now. Which means that in two IPMs already it wasn’t accepted by my mentors. Not good enough!

Read more...

The clone() method in Java

The Java clone method belongs to the Object class and produces an identical copy of its object. It’s a bit of a controversial method with many developers thinking that it is not implemented in the correct way. A couple of articles that I found online even go so far as to say that it is broken.

Read more...

Slowly leaving Java behind for now...

I just had my IPM where I demoed the styled JavaFX Gui and the ability to play against an unbeatable UI player through the Gui. I’m really happy that I’ve managed to implement all of these things now after the somewhat rocky start with JavaFX.

Read more...

Apprenticeship patterns book review

At the weekend I finished reading the book “Apprenticeship Patterns - Guidance for the Aspiring Software Craftsman”. I didn’t really know what to expect with this book and I have to say that overall I found it quite inspiring!

Read more...

Styling and Mini-Conf

All that refactoring and those code improvements that I did over the last couple of days introduced a bug which lead to my Gui not working correctly anymore. Argh! I spent some time chasing it on Wednesday and then again yesterday while pairing with Enrique. It helped that he asked me a lot of questions about my applications and suggested a few approaches.

Read more...

Shamelessly celebrating success

Last night I was at Codebar, coaching two ladies who were learning JavaScript. And explaining things to them made me realise how far I’ve come over the last year.

Read more...

Learning about consulting

This morning Enrique ran his second Zagaku session related to consulting. Yesterday he introduced us to the 10 Laws of Trust and today he talked about the 4 Laws of Consulting.

Read more...

Factories explained with rock bands

Jim asked me to write about the factory pattern during this week’s iteration. And while I was at a gig last week, listening to the band, I thought about how I could best explain the different types of factories using my own examples. Of course! Using rock concerts!

Read more...

Another long day

I was trying to write my long blog post about factory patterns today but then I was too busy breaking and fixing my JavaFX Gui implementation.

Read more...

Attending my first client IPM

Today I am taking a break from blogging about the dramatic events around my JavaFX implementation. I know, it’s a gripping story but you’ll have to wait until tomorrow to find out more.

This morning I worked on some refactoring based on the feedback I received in my IPM. Then I was out all afternoon, first at General Assembly to speak to their current students about “life after the bootcamp”, then at a client office to attend the IPM.

Read more...

A bad IPM with a positive outcome

Today I threw away my JavaFX efforts and started again. Both Felipe and Jim had advised me to do that after I mentioned in my last blog post that I was thinking of tidying up the code and retro-fitting tests.

Read more...

The F-word

Our instructor at General Assembly taught us that a developer needs to be able to deal with FAILURE. Because you will fail and fail and fail again. And if you can’t take that, then you will have a tough time as a developer.

Read more...

Friday

This morning Felipe very kindly agreed to meet me in the office early, before he started his client work, so that I could ask him some questions with regards to my stories.

Read more...

Slow progress is progress...

After a failed attempt at separating my tests into categories yesterday, I thought I’d try again this morning. Currently I have two relatively slow tests which I’ve ignored, so that they don’t they don’t slow down my test suite when I run all my tests.

Read more...

The eternal optimist

I’d been working on my JavaFX spike the whole day yesterday and still didn’t feel like I was really understanding how to test everything.

When I opened my laptop at home last night, the screen flickered and went black with some green bits. Broken!

When I came into the bike storage room in our building this morning, my tire was flat. Again. I’d only just had the last puncture fixed two weeks ago. On the same tire!

Read more...

JavaFX - Rabea, Rabea - JavaFX. Nice to meet you. Not!

The GUI is upon me! I remember when I first started at 8th Light in November, Georgina and Sarah were working on creating a GUI with JavaFX. They talked about it every day in our stand up and what they said went straight over my head. By then I was still struggling to follow along Uncle Bob’s Java code for the Prime Factors kata. But now my time has come to create a GUI as well! I feel very grown up. And also a bit scared. As it turns out, rightly so.

Read more...

Back to reality

I just spent a weekend in lovely Portugal, enjoying the sunshine and the good food. And today I’m finding it a bit difficult to acclimatise to cold, grey London.

Luckily the acclimatisation process was made more comfortable by Christoph’s birthday cake and his wonderful Zagaku about terminal shortcuts.

Read more...

Implementing the 4x4 board option

Over the last two days I implemented the option to play the tic tac toe game on a 4x4 sized board.

Before I started on the task I wasn’t quite sure how difficult it would be. Spoiler alert: I didn’t need to tear my hair out or bang my head against the keyboard, so it wasn’t too bad!

Read more...

Speeding up calculations on a 4x4 board

This week I need to implement the option for a user to play on a 4x4 board instead of a 3x3. Changing the code to add this option wasn’t too bad actually. I’ll write a blog post about the changes I made tomorrow. But for now, I’m just completely shocked by how slow my algorithm is! It’s crazy!

Read more...

Two in one confusion - clientor? mentent?

When I was cycling home after my IPM last night, I thought about the challenge that the two-in-one personality of my mentors brings with it. What I mean is that my mentors are supposed to also act as my clients.

Read more...

Pry

Today’s Zagaku was about the IRB alternative Pry, a Ruby interactive Shell. I’ve been using Pry ever since I started learning Ruby at General Assembly over a year ago but I only ever used it for debugging my code, together with Pry-Byebug which let’s you step through and into your methods.

Read more...

A day full of pairing

Before I go into detail about all the pair programming related events today, I just wanted to mention my little success that I had yesterday:

After a few days of reading up on alpha-beta pruning and trying it out, I finally got it to work yesterday afternoon. And the computer calculates its moves so much faster! It really makes a huge difference.

Read more...

The smallest post so far

I’m going to keep this post short today because I’m feeling a bit under pressure to get my stories done! I think the requirement for the daily blog post is to have at least 100 words, so I’ll stick to that today.

Read more...

Alpha-beta pruning

The biggest story in my iteration this week is to optimise the minimax algorithm for my Tic Tac Toe. I have to use the alpha-beta pruning technique to increase the speed with which the computer finds the next move.

Read more...

Abstract classes

During my IPM yesterday, Jim introduced me to abstract classes. I’d seen them around but I’d never felt the need to use one really. Mainly because I wasn’t 100% sure what they are and what the difference to an interface was. I usually used interfaces.

Read more...

The story of my minimax conquest

On Friday afternoon, just before going to the pub, Felipe took a look at my (still non-functioning) minimax code and suggested that I should use an immutable board. Previously I just took a copy of the actual board and then used it to play out the options. I think I might have forgotten to reset the moves though and basically, it only played once into all empty positions and then it finished.

Read more...

Java's super-power: Polymorphism

Seeing that Java is such a rock star, I’m not surprised that it has a super-power. Nice one, Java! It’s just a shame that its name is so awkward to type. The word polymorphism is a real finger breaker.

Read more...

Women in tech and women fighting with minimax

We had a really interesting conversation at lunch yesterday about the lack of female software engineers and how to increase diversity in the industry. It was sparked by an event that Georgina, Jarkyn and I attended on Tuesday night at Pivotal Labs about bridging the gender gap in tech. I think Georgina and Daniel felt inspired to do a talk about this topic, which I hope they will hold for us one Friday. I’m looking forward to it!

Read more...

Working late in an effort to humanise my code

Felipe was out at a client site yesterday, so I had my IPM with Jim. However, Felipe made a surprise appearance at about 6:30pm and asked me about my IPM and we ended up going through a few things in my code and pairing on some refactoring. It was great!

Read more...

The Java memory model

I’ve heard the words “stack” and “heap” thrown around in conversations before but I never really understood what they meant. I knew that stack is some type of memory that can fill up and then you have a stack overflow, but that was about it.

Read more...

Autoboxing in Java (or int vs Integer)

Today I’m doing a lightning talk about autoboxing in Java. And since I’ve already researched the topic, I thought I might as well use that material for today’s blog post. Efficiencies and all that.

Read more...

SOLID - Interface segregation

I said that I would research and write a blog post about each SOLID principle. So far I’ve only written about three out of the five, so here’s a post about the next one: interface segregation.

Read more...

A day of comedy

I can’t say how thrilled I am to be released from jury duty completely - just by asking “could I be released?”. I had a full day of waiting around in the juror’s waiting room on Monday. The whole day they called out names for people to sit on different trials but my name was never called. So lucky! So at the end of the day I just asked the question. I had a whole speech prepared about the reasons for why I should be released - and then they didn’t even want to hear it and just crossed my name of the list. Just like that. Wow. Sometimes it’s scary how lucky I am.

Read more...

Hugs from Git

Last week I went through the Githug levels as part of my stories. And it was really fun! It’s kind of like koans for Git.

Read more...

Java makes me a modern girl

Uffff, this minimax business is hard. In theory * I think * I understand how the algorithm is supposed to work but I don’t really know how to implement it. I’ve been trying to find some code examples online but they’re not really helping.

Read more...

I think my methods know too much

Just a quick check-in while I’m working on my TTT. Yesterday, I started working on the unbeatable computer player. I haven’t started on the Minimax algorithm itself yet but I’ve written the methods that it needs to work. For example a scoring method that will assign +10 for a winning game state, -10 for a losing game state and 0 for a draw.

Read more...

Blogging New Years resolutions

On Saturday I met up with my friend Sophie, a fellow GA bootcamp survivor. She was in the same cohort as me and we have regular catch-ups to discuss the ups and downs of a newbie coders’ life.

Read more...

How to debug effectively

Last week, during my IPM, Felipe reviewed my Tic Tac Toe code and found a bug within about 2 minutes. Noooooooo! I had 100% test coverage and I’d played the game what felt like a hundred times. I couldn’t believe that I missed that one. Oh well, no point in getting annoyed with myself but instead, get debugging!

Read more...

Java build tools - Gradle and Maven

One of my tasks this week was to research Maven and Gradle with the aim of deciding which one to use for my next project. Maven and Gradle are both build tools for Java. Previously I’ve been using IntelliJ to compile the code and run the tests but for my code to be easily shareable with other developers who might not be using IntelliJ, I need to manage dependencies with a build tool.

Read more...

Static variables vs. instance variables

In my Rock, Paper, Scissors application I was in a situation where I needed a method to return two different types of data. As this is not possible in Java, I wrapped those two data types inside an object and returned the object instead.

Read more...

Black box vs white box testing

On Thursday morning we had a lesson about the differences between white box and black box testing of software. I didn’t know what it was and Mateu did a really good job explaining it using an example with a barista (class) making coffee (with different methods). But in this blog post I wanted to try to explain the concepts with my own example.

Read more...

New tasks this week...

Yesterday I had my weekly review and proudly presented a working Rock, Paper, Scissors app. In Java, a language that I only started learning three weeks ago!

Read more...

SOLID - Open/Closed Principle

Today during 8th Light University we had three great presentations, one of which was about the Open/Closed Principle.

I’m planning to create a post about each of the SOLID principles but so far have only written about the first one. So I’m taking today’s presentation as my cue to tackle the next one in line: Open/Closed Principle.

Read more...

How I tamed my application

Today I spent the morning practising the Coin Changer kata over and over again and also did a screen recording of it. We’re all supposed to record a kata and as my last attempt of the Roman Numerals kata was a bit difficult to see due to the small font size, I thought I’d just record the Coin Changer kata instead. This time it’s more legible.

Read more...

What I learnt from performing the Roman Numerals kata

Last week I did a screen recording of my performance of the Roman Numerals kata. Felipe reviewed it during my IPM on Monday and gave me some feedback that I will try to implement. I also watched the video again and tried to identify further areas for improvement.

Read more...

The Coin Changer kata

The stories in my iteration for this week include practising a kata, writing a game application and reading a new book.

Read more...

How to safely use third party APIs

We have a visitor from the States today (in fact we have two visitors but I’ll only talk about one of them in this post…): Dave Moore, Director of Software Services at 8th Light in LA.

Read more...

End of week 2

This morning I continued working on the echo server application and luckily the implementation of the interface and the Main class were relatively straight forward.

Read more...

Helping out at Code First: Girls

Tonight I helped out at Code First: Girls, an organisation that teaches women how to code. Two of the 8th Light craftsmen, Christoph and Felipe, held a workshop on Git basics. They needed teaching assistants to help with the coding sessions, so I went along together with some of my apprentice colleagues.

Read more...

SOLID - Single responsibility principle

Last week we did a recap of the SOLID principles in our daily morning lesson. And as I’m not terribly familiar with every one of these principles, I thought I’d write a blog post about each of them over the next few weeks. This will force me to research the principles more in depth. And writing about them will hopefully mean that I’ll internalise the meaning better.

Read more...

The fog is slowly clearing

When I came into the office this morning, I went through the Prime Factors kata again straight away. And this time I tried to write it from memory as much as possible and only reference the example code to confirm that I was on the right track.

Read more...

The benefits of pair programming

This morning I started my day by pairing with the lovely Jarkyn, a fellow 8th Light apprentice. It was really useful for me because she knows Java and explained some basics that had completely baffled me before.

Read more...

Java Koans

Today I focused on familiarizing myself with the Java syntax and concepts. As agreed in yesterday’s iteration planning meeting (IPM) with my mentors Jim and Felipe, I started going through the Java Koans.

Read more...

The first day at 8th Light

Today was my first day as a resident apprentice at 8th Light. And it was fantastic! I don’t think I’ve ever been made to feel so welcome in any job that I’ve had before.

Read more...