from/prod
← All companies

THE COMPANY INDEX TRACKED BLOG

Vanilla Java

Ideas, decisions, and lessons from the team.

vanillajava.blogspot.com (opens on the source site)
26Posts tracked
4 weeks agoLatest publication
0.4Posts / month over the last 12 months

Latest writing

20 of 26 posts

Deciding how to progress your career and find work you find interesting/challenging. (opens on the source site)

When you start a new role, many challenges are placed on you. Once you have been in a role for a while, you may feel like you aren’t learning as much, your career isn’t progressing, and you wonder what job you might move to next.Having been in that situation many times, my suggestion is that rather than waiting to be given challenges or the next role, you take the opportunity to challenge yourself to grow in your current role. This doesn’t mean accepting a role with too little growth, but rather see if there are opportunities to grow while you have some capacity, if you drive them. For…

Read at the source

Deciding how to progress your career and find work you find interesting/challenging. (opens on the source site)

When you start a new role, many challenges are placed on you. Once you have been in a role for a while, you may feel like you aren’t learning as much, your career isn’t progressing, and you wonder what job you might move to next. Having been in that situation many times, my suggestion is that rather than waiting to be given challenges or the next role, you take the opportunity to challenge yourself to grow in your current role. This doesn’t mean accepting a role with too little growth, but rather see if there are opportunities to grow while you have some capacity, if you drive them. For…

Read at the source

Which Doc Format is Best for AI Specifications? (opens on the source site)

I have a Spec Driven Project with 674 documents incl 181 specs, 429 tasks, and 40 project docs. About 1/3 of these are an acceptance sub-project to show the root project meets fit-for-purpose requirements. I used Fable to convert these to and from AsciiDoc, Markdown, and HTML. From this, I tried to draw some conclusions about which format is better than the others for AI specifications. TL;DR: Markdown for AI working documents, AsciiDoc for curated human-reviewed specs, HTML only as a publishing target. Objective Metrics Corpus Tokens (Approx) Markdown: 594k, AsciiDoc: 598K, HTML: 661k Worst…

Read at the source

Why You Should Tune Code Before Your Garbage Collector (opens on the source site)

Optimising your memory allocations in Java could make far more difference than your choice of Garbage Collector and may even change which is the best garbage collector. In this post I look at a simple event to response latency benchmark, MarketDataSnapshot to NewOrderSingle at 50K/s for 30 minutes using JLBH to test Chronicle-FIX. The goal is to compare a system which is doing redundant work (in this case logging each message using SLF4J), compared with not logging (Chronicle-FIX records every message internally using Chronicle Queue) and how this changes the choice of Garbage Collector For…

Read at the source

Testing Java Memory Management with Chronicle-FIX using AI (opens on the source site)

While I am sceptical of using AI for release code, it has plenty of uses that previously weren’t practical, such as determining how easy your software is to use. If an AI can “figure it out” with a few hints, then you are on the right track. For me, the value of AI is what you learn using it. For more Techincal Information on Chronicle-FIX What AI Does Well and What It Doesn’t Claude and Codex are effective for producing idiomatic code; for low-latency code, it needs a significant body of example code. In this case, it was able to utilise sample code for benchmarks. If it was being used to…

Read at the source

Updated Biography (opens on the source site)

Peter Lawrey is an Australian/British software engineer and entrepreneur best known for work on ultra-low-latency Java systems and for leading the open-source OpenHFT libraries. He is the founder and chief executive of Chronicle Software, a London-based company whose technology is used in trading and market-infrastructure workloads. Lawrey is also a recognised Java community figure: he was named a Java Champion in 2015, has been described by conference organisers as having provided the most answers for the Java and JVM tags on Stack Overflow, and writes the long-running Vanilla Java blog.…

Read at the source

Improving the prompt to the AI to get better code (opens on the source site)

In a previous article I looked at one-shoting a solution to optimise code to show the variation in different AI. Thsi is the not the best way to get what you want however. More often you need to either refine the prompt or give feedback. After one-shoting the same prompt on multiple AI, I have created a refined prompt based on the various concerns with previous results. The prompt Based on the results in a previous run Asking multiple AI to optimise the same code Suggest how to implement this more optimally using low latency techniques to minimize any objects created. ## Use - a ThreadLocal…

Read at the source

Asking multiple AI to optimise the same code (opens on the source site)

As different AIs are implemented differently, they don't all provide the same answer, nor do they consistently outperform one another. The best approach is to use multiple AI and pick the one you like best. My goal here is not to declare a winner based on one example, but instead to show the variety of answers you can get with different AI. I asked each AI to Suggest how to implement this more optimally private static String formatOffset(int millis) { String sign = millis < 0 ? "-" : "+"; int saveSecs = Math.abs(millis) / 1000; int hours = saveSecs / 3600; int mins = ((saveSecs / 60) % 60);…

Read at the source

Practical Considerations for Advancing AI Collaboration in Software Development (opens on the source site)

TL;DR Human-in-the-loop is essential; AI offers probability, not certainty. AI excels at word-smithing, so spend more time on documentation and context. Leverage diverse AI models for varied research, improvements, and analysis. Be wary of deskilling: if AI makes a task trivial, agents may soon replace it. You should feel like you are testing the boundaries of what AI is capable of for at least some tasks. The Problem AI’s proficiency in handling routine coding allows human engineers to dedicate more time to strategic activities such as system design, architectural planning, intricate…

Read at the source

Hands-On Career: The Evolution of a Java Champion (opens on the source site)

Table of Contents Introduction Superhuman Intelligence Is Already Here ATMs Didn’t Replace Bank Tellers About Me Multidimensional Growth Areas of Career Development Scope of Consideration Roles Where All Areas Are Important The Range of a Founder’s Role How Will AI Change Development? How You Ask the Question Changes the Result Some key terms in understanding how Generative AI works Estimating the Value of AI-Generated Documentation AI and the Reverse Baltimore Phenomenon The Baltimore Phenomenon The Reverse Baltimore Phenomenon Filling a void Brainstorming Ideas Sample Project 2048 Using…

Read at the source

Does AI-Generated Documentation Have Value? (opens on the source site)

As many have observed, at best, AI generates either: Mundane, repetitive documentation or code that most experts already know or If an expert doesn’t know it, they can ask an AI to explain it anyway. Is it the case that if an AI can generate it, it’s not worth adding to your documentation or code? While this is usually the case, there is still value in reading AI-generated documentation as a means of reviewing and validating what you might write differently. In this post, I show how changing the documentation can affect the AI’s output and how reviewing it can be a useful exercise. Estimating…

Read at the source

Generative AI and the Reverse Baltimore Phenomenon (opens on the source site)

One of the first challenges developers might face is getting generative AI to produce accurate documentation. Once you are comfortable doing this, the next challenge is creating enough documentation to be helpful without overwhelming the reader. Until generative AI came along, it might have seemed like there could never be too much documentation. Now, the challenge is to provide just enough detail to give understanding without overwhelming the material with unnecessary details. I was exploring the best way to generate accurate documentation for a project as I was flying over Australia and saw…

Read at the source

Prompt Engineering for AIDE (opens on the source site)

This article was AI-generated using this project as context. AIDE Project. The purpose of this project is to see how much an AI could generate given enough context, and in this project, all the "source" code is generated using the requirements and unit tests as context. This follows the Next-Level Development: Harnessing AI with AIDE approach. The main parts are: Requirements Documents in .adoc format. JUnit tests in Java. AIDE itself. AI-generated code in Java. Even the articles written about AIDE are part of the context for the AI. This article is about how to write requirements as a prompt…

Read at the source

Next-Level Development: Harnessing AI with AIDE (opens on the source site)

If it’s worth doing by hand, it’s worth automating. Just because not everyone is (yet) a world-class developer; that doesn’t mean we can’t step closer to that expert-level space. In this post, I will introduce AIDE (Artifical Intelligence Development Environment), a powerful workflow that merges AI-driven code generation with a sharp focus on documentation-driven development. With AIDE, I tap into the best of artificial intelligence (AI) while respecting the real human insight needed for domain-specific logic. The result? An environment that streamlines repetitive coding, synchronises…

Read at the source

Empowering Your Annotations with Fields (opens on the source site)

Introduction Java’s annotation system has come a long way since its introduction in Java 5. At first glance, annotations appear to be mere metadata markers on classes and methods. However, annotations can do much more than that. You can nest types within them, incorporate fields that reference helper classes, and even embed logic via static singletons. These capabilities provide a powerful mechanism for integrating domain-specific or framework-specific functionality right into your code, in ways that are both compact and self-documenting. Why Add Code to Annotations? The Java language…

Read at the source

Dates aren't what they used to be (opens on the source site)

I find time fascinating and surprisingly complex. Time zones and calendars change from place to place over time. There are a number of interesting websites on the subject. Time is one of those concepts that appears deceptively simple on the surface yet becomes increasingly intricate the more we examine it. As software developers, we often face scenarios where we must handle dates and times and their myriad associated rules—time zones, calendar systems, cultural conventions, and historical irregularities. Working with time can lead us into subtle pitfalls that affect everything from…

Read at the source

The AI Trough (opens on the source site)

Artificial Intelligence (AI) has long promised to transform software development. Yet, as many experienced engineers discover, initial enthusiasm often settles into a more subdued reality. This is the "Trough of Disillusionment" within the Gartner Hype Cycle—where inflated expectations give way to measured assessments. In this phase, teams confront the practical limitations of AI-driven tools, refine their strategies, and seek a balance between what AI can deliver and what human expertise must still provide. This article continues from AI on the Hype Cycle. We do these things not because they…

Read at the source

AI on a Hype Cycle (opens on the source site)

This is the first in a series of posts supporting a talk I will be giving online at JChampionConf 27th January 27th 2025. Lessons learnt from founding my own company, and over 30 years hands on coding In these posts, I am looking to provide some theory as well as practical examples. One way to try to predict what is possible in the future is to look at the past. One of may favourite ways to look at the past is through aphorisms. Aphorisms are short, pithy statements that express a general truth or opinion. I love quotations because it is a joy to find thoughts one might have, beautifully…

Read at the source

What might an AI System Prompt look like? (opens on the source site)

Not surprisingly, the system prompts for “o1” are restricted, but it can provide a hypothetical answer. Understanding the Role of System Prompts System prompts serve as the invisible backbone of an AI’s reasoning process. They define core objectives, ethical boundaries, and operational tactics well before the user asks a question. In older models, these prompts were often implicit or underspecified, leaving the AI uncertain about handling ambiguous instructions or potentially unsafe requests. Hypothetical System Prompts for o2 The system prompts for a hypothetical next-generation O2…

Read at the source

Privacy choices

Reading never requires analytics. These choices last 90 days on this browser.

Essential sign-in and security storage always stays on. Read the privacy notice.