- Job Vacancy: Senior PM at Foolproof
- Job Vacancy: Programme Manager at Foolproof
- Job Vacancy: Senior Designer at Foolproof
- Job Vacancy: Account Manager at Foolproof
- Job Vacancy: Software Engineer in Test at Axon Vibe
- Job Vacancy- EIRA Knowledge Exchange Fellow – EIRA Network (3 Posts)
- Job Vacancy- EIRA Knowledge Exchange Manager (Three Year Fixed Term Contract)
- Job Vacancy- Front end developer at Zipline
- Job Vacancy- Data Architect at Axom Vibe
- Job Vacancy- Digital Marketing Manager
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)
if (a == 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)
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.
Originally posted on paulgrenyer.blogspot.co.uk
Words by Paul Grenyer