Here we go again..

I tend not to get sick a lot, at most once a year, and even then it’s usually just a cold. But in the past couple of months, I’ve been struck down twice! Something’s up and I need to figure out what it is so it doesn’t happen again. I really dislike being ill, I mean I’m sure most people do, but having two bouts straight after one another is a nice reminder to really value being healthy.

I am working on my Mini Challenge at the moment. Being sick has slowed me down, but luckily I got a head start on the weekend, so I am not too far behind. My Mini Challenge is to build ConMan (a contact management system).

I did this in Ruby when I first started my student apprenticeship. This time I’m writing it in Java and trying to make it a lot cleaner. I’m also trying to commit to git regularly whenever I think it is appropriate to do so, like when I have refactored or introduced a change or feature. The part I find tricky is when I am working on one feature, get stuck on it, decide to move to another feature and then go back to the original one when I have a moment of inspiration. This way sometimes I have a commit that changes two things at once.

I looked at lots of different ways to try and filter a list one character at a time today, but was getting nowhere, so decided to move on to another part of the program and come back to it.

It’s interesting how different languages have different optimal ways to do the same thing. In Ruby when I filtered a list of contacts I used stty -raw mode to change input being read line by line to be read character by character. This was simple enough in Ruby, but I think because of the way the JVM works is not so straight forward in Java. So I am trying to write the input to a buffered reader by calling .read() on it and casting the value to a (char). This almost worked and I think I am almost there, I just need to fix how the filtered list of contacts is stored.

I’m working on cleaning up the code I have at the moment and making sure it is as clear as possible to anyone who reads it . Sometimes, stepping away from it and coming back with fresh eyes makes it easier to spot parts that are confusing, badly named or unnecessary. So that’s exactly what I’m going to do.