Observations on what's around me and projects I'm working on.


Posts tagged with java

At the “Kotlin makes Java null and void” talk

Chetan Padia’s talk to the Brighton Java group on why the Kotlin language is worth a look. My take away from this was that those reasons are: Tooling from IntelliJ makes it a great experience. Google have adopted it. More concise that Java, and null safety via Optional types. Update: the recording is on YouTube:
Read more

Java 8 crib sheet for Scala developers

You’ve heard that Java 8 now has the main prerequisite for functional programming: functions. But you’re too busy writing Scala code to dig into the details, so we’ve put together a crib sheet on what’s in Java 8 from a Scala developer perspective. Lambda expressions The syntax for lambda expressions uses a thin arrow:...
Read more

Review of “Functional Programming for Java Developers”

This is the book for you if you code in Java, you’ve heard of functional and want to know what the fuss is about. Dean Wampler, 2011, Functional Programming for Java Developers, O’Reilly Media. 88 pages. Summary This is the book for you if you code in Java, you’ve heard of functional and want to know what the fuss is...
Read more

Option(null) is None

@wfaler asked: Doing a presentation soonish on “Why #Scala” - have a truckload of arguments, but what are your arguments for Scala over Java? Give me ammo! Ok, I’ll bite.  Here’s one of those every-day things I stop and notice from time-to-time. It’s not new, it’s not huge, it’s just one of the things that makes a...
Read more

How the Guardian (mostly) moved from Java to Scala

Graham Tackley spoke at a packed LSUG about how guardian.co.uk implemented their first Scala project, the content API.   It’s well worth watching the video to see the timeline of how the team switched their brains from Java to Scala (what the team initially liked, what they liked after a year, grokking flatMap, tools,...
Read more

Creating a executable script from a Maven project

If you have a Maven project with a bunch of dependencies, and you’ve written a harness to launch your thing, it’s handy to be able to create a shell script to run your harness with all your dependencies on the classpath.  The Maven assembler plugin is what you need. In your pom: <build>   <plugins>    ...     <plugin>...
Read more

London Java Community Unconference 1

Congratulations to the organizers of the London Java Community: the first unconference was a success. IBM kindly hosted the event at their Southbank building, and it’s a great location for an unconference. It has a set of rooms that are just the right size, but also has a central mingling point where you can meet and...
Read more

The Scala REPL is great for Java developers too

This post is for Java developers who have heard about Scala but, although it might sound interesting, are getting on with what they need to do in Java thankyouverymuch. If that’s you, it’s still worth installing Scala because the command-line tool makes noodling with Java a delight. The tool in question is the REPL...
Read more

Tracking down threading issues

One of the projects we’ve been working on involves kicking off a number of threads to check on availability of certain services. Despite having read the fantastic Java Concurrency in Practice book (which you should buy, possibly from Amazon UK) we’d run into a situation where Tomcat wasn’t shutting down. Inevitably it’d...
Read more

GGUG meeting

I have a love/hate relationship with Groovy. I do find it wonderfully productive for hammering out a quick script to do something, but I feel uneasy attempting anything larger without my crutches of static analysis (strict shouty compilers and Find Bugs) and knowing there are great profilers if I need them. Yet, when...
Read more

Comparing closures in Java, Groovy and Scala

On Paul’s return from JavaOne this year, we spoke about Neal Gafter’s Closures Cookbook talk. From what I understood, this was a look at the BGGA closures proposal, and contained an example that pushed hard on some of the tougher closure issues for Java. I thought it might be fun to look at the Java example from the...
Read more

Decrypting JetS3t files

This post is going to be a bit niche. The scenario is that you’ve used JetS3t to backup data to Amazon S3 via the synchronize tool, and in particular you’ve used the -c option to encrypt the data. But you’ve downloaded the file with another tool, such as ForkLift or S3 Browser. How do you decrypt the downloaded file?...
Read more

QuickTime for Java

A few months ago I was experimenting with QuickTime for Java. It’s the binding between Apple’s QuickTime “stuff” and the Java language, allowing a Java developer to invoke QuickTime on the Mac (and presumably also on Windows). The reason this appeals is that we do Java, and have accumulated a fair amount of Mac...
Read more

Android developer workshop

Half-day workshops are great: you get away from distractions; get to ask questions and get quick answers to cover off those things that are bugging you; you’re more-or-less forced to spend more time hands-on with a technology; you get a sense of the buzz around something and which bits are good and bad; and… it’s only...
Read more

Watching production logs

I’ve always believed that production application error logs should be empty. I’ve also implicitly assumed that any errors in live application logs are rare, freakish, occurrences, and on the whole of little relevance. But… what would it take to get an empty error log? Or at least an error log that only contained truly...
Read more