Alex headshot

AlBlue’s Blog

Macs, Modularity and More

GeekOut London

2014 Conference Geekout

Today I attended the GeekOut UK conference, the first time (that I’m aware of) that it has been run in this country. Thanks to Simon Maple and the team who made it happen. It was hosted at the Shoreditch Villiage Hall, home of many small tech conferences.

First up was Martijn Veyburg who talked around code in IDEs and how it hasn’t changed much. He asked whether IDEs could focus on things other thank plain text representations, and linked to presentations such as Editing ASTs and videos such as this one. (Granted, most IDEs are textual — but in years gone past some IDEs did present code in non-textual form, but they gave way almost exclusively to command line tools like Ant that expected the files to be textual to be processed.) He also hoped that it would be possible for the IDEs to represent different kinds of techniques - from concurrent algorithms to reactive pipelines visualised as well as queueing systems like chronicle queue.

All in, an inspiring talk for what we might do in the future but optimistic none the less. Eclipse users might find looking at Code Recommenders might provide a guided view as to providing collaborative understanding of what code is popular.

Next up was Josh Long, who presented on Spring Boot as a runtime that could quickly host network services in an embedded fashion without needing a standalone web app server to host the content. More interesting for me was the introduction to start.spring.io which has a web page that acts like a maven archetype but in a way that can download a generated project infrastructure as a zip. Although having this functionality as a web page is neither repeatable or reliable, getting an initial project bootstrapped (with a collection of ‘click here to add Spring Foo’ dependencies) makes it a lot easier to get going.

Finally Josh introduced the metrics gathering (using Codahale metrics) built into Spring Boot Actuator - this adds a collection of metrics which can be used to add both JVM health information and also measuring the number of requests a particular set of URLs receives. More information is available at the actuator service guides.

The third session was presented by Aslak Knutsen who talked about JBoss Arquillian. He demoed the ability to write tests creating shrinkwrap archives — like the JAR or WAR archives in a build process would - but at runtime, similar to creating a Zip using java.util.zip and friends. The goal is to be able to spin up a partial webapp (e.g.) to install into a container such as a Jetty or Tomcat runtime to perform in-container testing but without requiring the entire server to be republished. There’s more information on the ShrinkWrap API as well as a more general guide to writing tests with Arquillian. Unfortunately, I think this is an example of the omega problem again though.

With that, Simon Maple took us up to lunch with an interactive demonstration of both JRebel and XRebel. JRebel provides automated code deploys by having an agent attached to a Java process during development, and wrapping the classes with methods that can delegate to internal representations of the classes in a way that they can be redeployed without taking down a server. He gave several excellent demos including being able to do refactorings that would not otherwise be possible. In addition JRebel has support for watching well-known-files (like a spring context file) and being able to perform a diff on the contents and take corrective action to be able to change the state of the system. Several plug-ins are available for systems that are able to be hot redeployed in this way, and an SDK is available which can be used to write plug-ins for systems that are either proprietary or otherwise not supported in JRebel out-of-the-box.

The XRebel tool looks interesting as well; again, it has a Java agent that can be bootstrapped into the runtime. The XRebel plugin amends web pages to inject an HTML menu on each page, and run-time monitoring to look for things like the size of the HTTP storage session (useful for poorly architected web apps that have massive sessions for no good reason) as well as monitoring the number and length of SQL statements that are executed. When demo’ing it against the sample JavaEE PetStore application, Simon demonstrated how XRebel was able to identify a memory leak leading to growth of the session size as well as several inefficient SQL queries. Support for rest services and NoSQL databases is currently available with more planned in future.

After lunch, Simon Ritter came up and talked about Java 8. Most of this is the goodness that already exists; streams, lambdas, method references, effectively final, default and functional interfaces etc. For those that haven’t upgraded to Java8 yet it was a good whistle-stop tour of what would be good; for me, I discovered the existence of (Long|Double)(Adder|Accumulator) classes that I hadn’t come across in my Java8 travels so far.

After Simon came Holly Cummins, who works on the Liberty Profile and loves to automate things. Lots of good stories here, including:

  • Do it once; do it a second time and take notes; do it a third time and automate
  • Treat your servers like cattle, not pets
  • If you care about it, automate it
  • Automate because you care that it’s done right
  • Automate because it’s fun

She also proposed thinking about when it’s not good to automate (and linked to XCKD automation)

  • Who can maintain/manage the automation
  • Will it be robust
  • How much will it cost
  • What is the completion criteria
  • Is it still worth it and does it save time
  • It’s dumb to automate dumb things
  • Automation allows you to do dumb things at a greater speed
  • Code formatting is the most controversial thing that you can automate

(I interviewed one of Holly’s colleagues, Erin Schnabel, on the development of the Liberty profile at InfoQ recently.)

Next up was Trisha Gee talking about how to build a killer web app using AngularJS and MongoDB. Though I’ve seen her talk before I was mesmerised by the way she fluently went through the application and came up with the implementation. If you’ve not seen it before, there’s a previous version of the presentation from Goto Chicago and the source code for Cafelito is available on GitHub. The Morphia drive for MongoDB (which provides persistence of JSON documents and provides bindings to Java classes, much like Hibernate does for SQL databases) seems like something worth paying attention to.

After Trisha was Chris Kelly on GitHub. I didn’t think this was the best GitHub presentation I’d seen (but then, I’ve seen a lot of them) but I did find out some keyboard shortcuts that I didn’t know before; for example, y will expand the URL to its canonical form (i.e. replace master with the appropriate commit hash) and l can be used to select either a single line or a range of lines (e.g. 10-15). This will append #L10-15 to the URL, such as …/LICENSE.html#L32-35.

I also found t will allow you to search for a file name in a repository; unfortunately it doesn’t work with extensions (GitHub currently uses . as a separator, so it’s not seen in searches) and w will allow you to switch branches/tags. Both of these are great if you’re trying to debug what is happening in an open-source environment where you have source in GitHub.

Finally Sven Peters finished off the day with coding culture at Atlassian. A slightly different version of the presentation is available at his site, but was an inspirational overview of how you can build effective teams by becoming a DOmocracy and shipping code quickly. They even have a quarterly company-wide ship-it day, which is a competition to show off what you can do in 24h.

I think he summarised the whole thing with “Just say no to crappy code”.

All in all, GeekOut UK was great fun, with a good balance of speakers and presenters. It was also great being a single day; sometimes it’s a lot easier to get a day pass to attend a conference rather than a full week. The fact that it’s much reduced means that a lot of conference cruft - keynotes, finding out where all the talks are - became moot. I’ll definitely be there next time it runs.