Sunday, 14 May 2017

Coffee in the Mine: In Java I wish I could... part 1

I started programming in BBC Basic on an Acorn Electron in 1985. I then went on to learn and use commercially C, C++ (there's no such language as C/C++), C# and Java. When I was a C++ programmer I looked down on Java with it's virtual machine, just in time compiling and garbage collector. When I became a Java programmer I completely fell in love with it and it's tool chain. Not so with Ruby, especially its tool chain, a lack of a static type system and lack of interfaces.

However, there are some fantastic features in the language and a few of them I wish I could use in Java. For example, in Ruby, you can put conditional statements after expressions, for example:

return '1' if a == 1
return '2' if a == 2

Whereas in Java you'd have to write:

if (a == 1)
  return "1";

if (a == 2)
  return "2";

which is more verbose and less expressive. Ruby also has the unless keyword, which Java lacks, so in Ruby you can do this:

return @colour unless @colour.nil?

The example shows off another feature in Ruby. To test for nil in Ruby you can call .nil? on any object, whereas the equivalent null check in Java is more verbose:

if (colour != null)
  return colour;

I could go on, but I'll leave that for a later piece in the series.  These features of Ruby may only be, in the main, syntactic sugar, but they are the ones I miss most when I'm developing in Java.

Next time we'll look at what Rails taught me about Spring MVC projects.

Thursday, 11 May 2017

You Can't Do That

by Emma Roache
ISBN-13: 978-1523989560

I sat next to Emma (complete with orange jumper) at a Norfolk Chamber breakfast in Great Yarmouth. We had the best table for the event and the conversation ranged from Trivium (modern Thrash Metal band) to the Kings of Leon. It’s incredible how, when you get away from business, the conversation flows. Of course everyone talked about what they did and I was delighted to hear that Emma was a coach and that she had a book!

‘You Can’t Do That’ is like nothing else I’ve read. It’s not science fiction or fantasy and it has absolutely nothing to do with software development or management. The style was easy and simple and very readable. This isn’t a self help book, it’s a travel diary. In most cases you have to read between the lines to see the personal issues which Emma is overcoming, they are in no way exaggerated or over played. Although I’m in no two minds about her dislike of spiders!

Something came across loud and clear. Emma loves people. I found this inspiring. Despite working to break the classic software development mould I still struggle with ‘small talk’ with people I don’t know (unless of course we’re talking Rock & Metal).

This book won’t take you long to read and is well worth it! Could only be improved by being available for the Kindle.

Tuesday, 2 May 2017

Paul's Guide to Jazz

Hopefully you've read my guide to Death Metal. Death metal isn't the only type of music I listen too. In fact I don't only like rock based music, I like some other stuff too.

Wikipedia describes Jazz as “...a music genre that originated amongst African Americans in New Orleans, United States, in the late 19th and early 20th centuries, and developed from roots in Blues and Ragtime. Since the 1920s jazz age, jazz has become recognized as a major form of musical expression. It then emerged in the form of independent traditional and popular musical styles, all linked by the common bonds of African American and European American musical parentage with a performance orientation. Jazz is characterized by swing and blue notes, call and response vocals, polyrhythms and improvisation.”

As with my Death Metal guide, I'm going to run through the Jazz bands I feel are worth listening to, I have enjoyed and have made a difference to me.

Monday, 1 May 2017

You can go your own way - Guardians of the Galaxy Vol. 2

There aren’t many sequels as good or better than the original (obvious examples are Aliens, The Empire Strikes Back, Lethal Weapon 2, etc), but Guardians of the Galaxy Vol. 2 is! It’s a totally different type of story, more in the classic sci-fi vein. Stories where you don’t have to start by building all of the main characters are often easier to get straight into.

I had one, for me, huge issue with the film. They used Fleetwood Mac’s “The Chain” in the most brilliant way for one of the action sequences, from almost the beginning right up to just before the bass lead section the BBC and Channel 4 use for the Formula 1 theme. Then the song stopped. Later on in the film they used it again and I thought “Great, we’ll get it all this time!”, but no, it finished too early again. Maybe this was a deliberate tease for the Fleetwood Mac fans and I’ve just fallen for it 100%.

As well as all of the main characters, Kurt Russell was excellent. My other slight issue with the film was that there wasn’t enough of Sylvester Stallone. I think they could have made much more of his character, but I suspect he’s being lined up for the next film. It was great to see a brief part for Ben Browder from Farscape too. He’ll always be John Crichton to me.

When a film as good and off the wall as Guardians of the Galaxy Vol. 1 is released and such a hit, there’s an automatic apprehension about a sequel. You shouldn’t be apprehensive about this sequel. Go see it!