© Jameswimsel | Stock Free Images & Dreamstime Stock Photos
Having arrived at the Park Plaza Hotel early, I was the first attendee and got to chat with the girls on reception. Then I sat sipping coffee, alone, reading the gumpf in the goodies bag. Not much really, so I go check out the t-shirts and chat with some of the sponsor dudes: Mr Git-Hub has the best t-shirts.
I’m starting to get excited. Hey, there’s someone else. Looks like a geek.
Starting to get really excited now: “Lambda, Lambda, Lambda”, goes the chanting in my head.
Lambda Under the Hood
Here’s Mr Brian Goetz ( @BrianGoetz ): “It’s a cool time to be in Java in London”, he says.
An engaging speaker, he talks about the choices made to implement closures in java. One of the biggest headaches has been retaining Serialization; backwards compatibility is mandatory.
Key words: invokedynamic, MethodHandle, LambdaFactory.
The point about closures is that they allow iteration (and more) to be delegated to the library (“client says what, library decides how”), allowing library developers to implement, in particular, parallelism in new Collections methods.
For example, a “filter(…)” method (among others) will be added to java.util.Collection so that the following code can be written:
List<People> adults = people.filter( p -> p.getAge() >= 18 );
Default methods on interfaces (new in Java 8) allow interfaces to be evolved, extended so they won’t break existing code.
Mr Goetz encourages us to download the Java 8 early access releases and start playing around with this stuff. He highly recommended the following read: “How to talk about parallel programming – Not”.
Cassandra: Realtime Analytics
The Acuna guy Tom Wilkie ( @tom_wilkie ) was in a hurry. I could tell that straightaway because he was breathing fast and heavily.
“Know anything about Cassandra?”, he began: a few hands went up.
“How many attended the previous session on Cassandra?”, he continued: most hands went up but not mine, I had been in the session about Lambda.
“Weren’t she that greek bird what told the truth but no-one believed her?”, someone said, presumably to develop the ambience.
“Erm…, I don’t know”, said the Acuna guy.
What we needed to know was that Cassandra is really good at:
- Writing random inserts
- Range queries
And, that all the work is moved to the data ingest phase so all the queries must be pre-defined.
Acuna does realtime analytics, approximate analytics; one can pick no more than two from: “realtime”, “large-scale”, “exact”. The acuna guy then showed us an algorithm for computing an approximate (probablistic) number of distinct values based on hashing values and counting the number of their leading zeroes.
Origin of Hadoop
Bit disappointing, we learnt:
There are 2 components
- HDFS: storage
- MapReduce: compute
- Its scalable: affordable, distributed, reliable
- Its style of use: schema on read
- It started as batch only, with Hbase the first non-batch component.
The speaker strongly recommended reading the following paper from Google:
Back to Basics: Codemanship
This was an entertaining talk by Jason Gorman, essentially debunking the methodologies mire. The speaker walked us through his 11 hype free principles of software development.
Pretty obvious stuff really, but worth it for the following:
“No developer ever suggested using a waterfall model, nor ever would”.
“In software, perfection is so close to ‘good enough’ that we might as well aim for perfection”.
The Scrum Hangover
Two guys from UBS, Mashooq Badar ( @mashooq ) and Sandro Mancuso ( @sandromancuso ) talked through their company’s experiences over the past few years participating in projects with offshore/onshore teams.
- Focus on quality – reserve time for improvements (developers make the call on what to improve and when)
- Quality is a team concern
- Stop and fix attitude – no broken windows
- Boy scout rule – leave the campsite cleaner than you found it.
- Continuous and frequent delivery to production.
- Emphasis on TDD – automated tests at all levels.
- Business domain reflected in the code and design – readability, maintainability.
- Simple design.
- Healthy intolerance of bad code – develop an allergy for bad code smells.
- DO NOT satisfy your need to use a pattern.
Mr Ian Robinson at Neo Technology (@iansrobinson ) gave the best talk of the conference. I could immediately see how I could use this stuff in my genealogy project.
He explained that:
- Semi-structured data in RDBMS leads to sparse tables and lots of null-checking logic.
- Highly connected data in RDBMS leads to lots of join tables.
Graph databases (such as Neo4j) address semi-structured, highly connected data.
It’s property graph data models are volatile and easy to evolve. They are constructed from nodes, relationships between nodes, and properties (of nodes and relationships).
Neo4j provides a language for:
- describing graphs
- creating nodes, relationships and properties
- querying data
- pattern matching
Neo4j is ready to go!
We start, all together, in the plenary room.
Go join a JUG
“Lower your reverence levels and get involved in OpenJDK”, we are requested by Mr Steve Poole.
“Does java stay in a dark cave guarded by acolytes, or do we reignite the java flame?” he asked us.
“Reignite the flame”, I could just manage to lipread on someone’s lips.
Mr Steve Poole gave us a brief overview of the language jungle, and the key java ethos: compete on implementation, collaborate on specification.
Having had his thunder stolen by Mr Goetz the previous day, Mr Russel Winder ( @russel_winder ) still gave a talk on closures. He suggested that closures would bring the opportunity to: “stop using 70’s techniques and use 30’s ideas and maybe finally do some OO programming (in java).
Key observation: “Its about how your data evolves. Its not about the flow of control”.
No more noodling with code!
A vaguely humorous talk about dependency management and the Liskov Substitution Principle (http://en.wikipedia.org/wiki/Liskov_substitution_principle).
The perpetual problem is getting hold of an implementation; factories (factories (factories…)), and home-rolled frameworks. Dependency injection externalises the factory problem; be strict about dependency management we are advised.
Jar Hell – jars are transparent: classes encapsulate data, packages contain classes, jars contain packages, but there are no jar-scoped access modifiers.
- There is no means for a jar to declare its dependencies, no versioning, no modularization charactistic.
- At runtime a jar is just a collection of classes on a classpath.
- In a normal jar, an implementation is as easy to use as an interface.
- In fact its easier as there are no worries about factories, encouraging the breaking of encapsulation.
- Don’t think jars, think modules!
- Understand dependencies: What other code does my code touch?, when does it connect?
- Retro-fitting modularity is hard.
We are advised to check out OSGi, it’s a lot easier than we might think.
NB: project jigsaw (modularity in Java) will not appear in java 8.
Complexity Theory & Software Development
Mr Tim Berglund ( @tlberglund ) gave an entertaining review of simple complexity theory and a demonstration using golly (game of life: http://golly.sourceforge.net/)
There was very little to do with development other than that we have super-huge complex projects and should be aware and look for emergent behaviours.
He used the excellent term “afferent coupling” (the number of classes and interfaces from other packages that depend on me), and I intend to use it myself sometimes.
Not for the first time we began a talk with a schematic of a processor. Mr Mike Barker explained what actually happens in the processor when locks are invoked in code. Lines of cache memory get binned, forcing the re-retrieval of data (that may just be unlucky enough to be in the same line of memory).
He introduced us to the processor memory model, and compared its brevity with the java memory model (NB: this arrived in Java 1.5 and is a big, although underrated, thing).
We walked through some simple algorithms using the Atomics classes, and he explained why “hard-spinning” screws up hyper-threading.
Hmm… I’m not sure I want to use a class whose name is “Unsafe”.
Pretty slick, if you want to do that sort of thing. You have to have Windows 8, and you have to have Visual Studio or it just can’t be done.
Not sure I’ll be doing this myself though.