Below you will find pages that utilize the taxonomy term “java”
Life Beyond Java 8
New versions of Java are coming out every 6 months now. What has changed, should we upgrade, and if so, how?
(Updated 3 Dec, 2020)
News from IntelliJ IDEA Community
Video and resources for the Update on IntelliJ IDEA talk from FOSDEM 2020.
Abstract
With releases of Java coming thick and fast every six months, it’s a full time job staying on top of the features. If your IDE can help you here, it’s one less thing to worry about. IntelliJ IDEA Community has three releases every year, each one improves the support for modern versions of Java, but that’s not the only thing on offer.
Join this session to see what’s new in IntelliJ IDEA Community (the free one!). This is not limited to just supporting new language features, which some of us might not get to use for ages, but better support for things developers do every day, and improved performance and stability, because an all-singing, all-dancing IDE is all well and good, but if it’s not usable those features mean nothing.
Reading Code Is Harder Than Writing It
We should invest more time in the skill of reading code.
Is boilerplate code really so bad?
It’s exhausting staying up to date with the evolution of Java and the myriad other JVM languages. Is it worth it? What do modern languages give us?
Anticipating Java 9 - Functionality and Tooling
Looking ahead to what functionality is available in Java 9, and IntelliJ IDEA’s support (current and future) for it.
Code Review Matters and Manners
Content and resources for the Code Review Matters and Manners talk, including links to additional information and supporting material.
Applying Java 8 Idioms to Existing Code
- Understand how to improve performance with your Java code using Java 8 language features.
- Learn hands on techniques to discover and implement common Java 8 refactorings.
- Understand when you should and should not apply key refactorings in Java 8.
Java 8 MOOC - Session 3 Summary
Last night was the final get-together to discuss the Java 8 MOOC. Any event hosted in August in a city that is regularly over 40°C is going to face challenges, so it was great that we had attendees from earlier sessions plus new people too.
Java 8 MOOC - Session 2 Summary
As I mentioned last week, the Sevilla Java User Group is working towards completing the Java 8 MOOC on lambdas and streams. We’re running three sessions to share knowledge between people who are doing the course.
Java 8 MOOC - Session 1 Summary
The Sevilla Java User Group is working together towards completing the Java 8 MOOC on lambdas and streams. As part of this, we’re running three sessions during the course so we can, as a group, ask questions about the lectures, get help with the homework, and (if we’re feeling very smart!) help people who may be struggling (or might not have watched the videos).
Java at 20
I was asked three simple questions about my thoughts on Java turning 20, and ended up writing a guest post for Voxxed. No wonder I can’t seem to find the time to write these days.
The State of Java
I think living in a beautiful city in a fantastic climate has its advantages. Not just the obvious ones, but we find people unusually keen to come and visit us on the pretence of presenting at the Sevilla Java User Group (and please, DO come and present at our JUG, we love visitors).
This week we were really lucky, we had Georges Saab and Aurelio Garcia-Ribeyro giving us an update on where Java is now and where it looks like it’s going in the future.
Workshop: AngularJS, HTML5, Groovy, Java and MongoDB
Setup required for the AngularJS/HTML5/Groovy/Java/MongoDB tutorial for QCon London 2015. Sign up with code SPEAKGEE100 for £100 off the price!
AngularJS, HTML5, Groovy, Java and MongoDB All Together - What Could Possibly Go Wrong??
This year I’ve been giving an evolving live demonstration of coding a Fully Buzz Word Compliant, mobile-friendly web application. The aim of the demo is to show, via a real-world application rather than snippets or a toy example, where these popular technologies sit in your architecture, and how they interact with each other.
Getting Started with MongoDB and Java
We’ve been missing an introduction to using MongoDB from Java for a little while now - there’s plenty of information in the documentation, but we were lacking a step-by-step guide to getting started as a Java developer.
I sought to rectify this with a couple of blog posts for the MongoDB official blog: the first, an introduction to using MongoDB from Java, including a non-comprehensive list of some of the libraries you can use; the second, an introductory guide to simple CRUD operations using the Java driver:
Sevilla Java User Group Java 8 Launch Party
Last night at the Sevilla JUG we officially celebrated the launch of Java 8 - yay!
Don’t be fooled by the picture, people had more fun than it looks. Honest.
For anyone who missed the session, or who was there and wants access to the materials, here they are:
Nighthacking at Sevilla Java User Group
Last Saturday Mr Stephen Chin came to Sevilla on his crazy European tour to show us Lego and Robots. This was our largest turnout yet for a Java User Group event in Sevilla, which surprised me as it was on a weekend, and the weekend before the spectacle that is Semana Santa in Sevilla.
In my day...
Introduction to MongoDB and Big Data
Spock: Data Driven Testing
In the last two articles on Spock I’ve covered mocking and stubbing. And I was pretty sold on Spock just based on that. But for a database driver, there’s a killer feature: Data Driven Testing.
The New 3.0 Java Driver for MongoDB
Information related to the currently-ongoing effort to redesign the Java driver for MongoDB.
How to get started with the new MongoDB Java Driver
The second in my short series of blogs about the new Java driver is now available for your perusal. In it, there’s some guidance on how to get started using the new driver, whether you want to use the new (unfinished) API, the existing “classic” API, or a blend of both.
The 3.0 Java Driver - Design Goals
Spock is awesome! Seriously Simplified Mocking
We’re constantly fighting a battle when developing the new MongoDB Java driver between using tools that will do heavy lifting for us and minimising the dependencies a user has to download in order to use our driver. Ideally, we want the number of dependencies to be zero.
How are you using MongoDB with Java?
It Depends
Don’t you hate it when you ask a perfectly good question, and someone comes back with the answer “it depends”?
It’s so frustrating to think that in a world of ones and zeros, people can’t give absolute answers and you can’t rely on “best practice”.
NightHacking Tour: The LJC
On the same day Stephen Chin came to see me at the 10gen offices, we also ran a NightHacking session in the evening with the London Java Community. Not many people turned up (maybe I need to work on my signage to the office?) but it was a great session. In fact, having less people meant we could all be involved.
Interview and Hacking session with Stephen Chin
Java Magazine: Intro to the Disruptor Part One
London Java Community Open Conference
Saturday was, hopefully, my last conference of the year. My lucky readers should start to see some posts which are not simply me gushing about another opportunity to hang out with awesome people and learn about interesting “stuff”.
JAX London - I learn stuff and meet people
A couple of weeks ago, I was at JAX London along with a number of the London Java Community regulars (Martijn/Ben/John/Sandro/Simon/Zoe I’m looking at you….)
My purpose for attending was largely to present the Hardcore Concurrency for Beginners talk that Mike and I debuted at an LJC event a few weeks back. Almost as important was catching up with the aforementioned LJCers and meeting with as many people as would talk to me. After the disappointment of the sessions at Java One, sitting in a room being talked at was quite low down on my list of priorities. Sometimes it’s nice to be wrong.
Mike and I debut our new Disruptor presentation
JavaOne: Initial Observations
Here’s a photo of me representing LMAX as I pick up the Duke Award we won for the Disruptor (Thanks to Martijn for taking the photo)
So I’ve been at JavaOne for the better part of three days, it’s time to record some of my observations so far:
Are you an awesome developer?
Disruptor 2.0 - All Change Please
Martin recently announced version 2.0 of the Disruptor - basically there have been so many changes since we first open-sourced it that it’s time to mark that officially. His post goes over all the changes, the aim of this article is to attempt to translate my previous blog posts into new-world-speak, since it’s going to take a long time to re-write each of them all over again. Now I see the disadvantage of hand-drawing everything.
Dissecting the Disruptor: Demystifying Memory Barriers
My recent slow-down in posting is because I’ve been trying to write a post explaining memory barriers and their applicability in the Disruptor. The problem is, no matter how much I read and no matter how many times I ask the ever-patient Martin and Mike questions trying to clarify some point, I just don’t intuitively grasp the subject. I guess I don’t have the deep background knowledge required to fully understand.
So, rather than make an idiot of myself trying to explain something I don’t really get, I’m going to try and cover, at an abstract / massive-simplification level, what I do understand in the area. Martin has written a post going into memory barriers in some detail, so hopefully I can get away with skimming the subject.
Dissecting the Disruptor: Why it's so fast (part two) - Magic cache line padding
We mention the phrase Mechanical Sympathy quite a lot, in fact it’s even Martin’s blog title. It’s about understanding how the underlying hardware operates and programming in a way that works with that, not against it.
We get a number of comments and questions about the mysterious cache line padding in the RingBuffer, and I referred to it in the last post. Since this lends itself to pretty pictures, it’s the next thing I thought I would tackle.
Dissecting the Disruptor: Why it's so fast (part one) - Locks Are Bad
Martin Fowler has written a really good article describing not only the Disruptor, but also how it fits into the architecture at LMAX. This gives some of the context that has been missing so far, but the most frequently asked question is still “What is the Disruptor?”.
I’m working up to answering that. I’m currently on question number two: “Why is it so fast?”.
Dissecting the Disruptor: Wiring up the dependencies
So now I’ve covered the ring buffer itself, reading from it and writing to it.
Logically the next thing to do is to wire everything up together.
I talked about multiple producers - they have the producer barrier to keep them in order and under control. I’ve talked about consumers in a simple situation. Multiple consumers can get a little more involved. We’ve done some clever stuff to allow the consumers to be dependent on each other and the ring buffer. Like a lot of applications, we have a pipeline of things that need to happen before we can actually get on with the business logic - for example, we need to make sure the messages have been journalled to disk before we can do anything.
The Disruptor paper and the performance tests cover some basic configurations that you might want. I’m going to go over the most interesting one, mostly because I needed the practice with the graphics tablet.
Dissecting the Disruptor: Writing to the ring buffer
This is the missing piece in the end-to-end view of the Disruptor. Brace yourselves, it’s quite long. But I decided to keep it in a single blog so you could have the context in one place.
The important areas are: not wrapping the ring; informing the consumers; batching for producers; and how multiple producers work.
Dissecting the Disruptor: How do I read from the ring buffer?
The next in the series of understanding the Disruptor pattern developed at LMAX.
After the last post we all understand ring buffers and how awesome they are. Unfortunately for you, I have not said anything about how to actually populate them or read from them when you’re using the Disruptor.
Dissecting the Disruptor: What's so special about a ring buffer?
Recently we open sourced the LMAX Disruptor, the key to what makes our exchange so fast. Why did we open source it? Well, we’ve realised that conventional wisdom around high performance programming is… a bit wrong. We’ve come up with a better, faster way to share data between threads, and it would be selfish not to share it with the world. Plus it makes us look dead clever.
On the site you can download a technical article explaining what the Disruptor is and why it’s so clever and fast. I even get a writing credit on it, which is gratifying when all I really did is insert commas and re-phrase sentences I didn’t understand.
However, I find the whole thing a bit much to digest all at once, so I’m going to explain it in smaller pieces, as suits my NADD audience.
First up - the ring buffer. Initially I was under the impression the Disruptor was just the ring buffer. But I’ve come to realise that while this data structure is at the heart of the pattern, the clever bit about the Disruptor is controlling access to it.
Why Java developers hate .NET
I have been struggling with .NET. Actually, I have been fighting pitched battles with it.
All I want to do is take our existing Java client example code and write an equivalent in C#. Easy, right?
Trisha’s Guide to Converting Java to C#
Turns out writing the actual C# is relatively straightforward. Putting to one side the question of writing optimal code (these are very basic samples after all), to get the examples to compile and run was a simple process: