Peter Lawrey
banner
peterlawrey.bsky.social
Peter Lawrey
@peterlawrey.bsky.social
Java Champion | Vanilla Java Blog (6M views) | CEO of Chronicle Software with 8 out the top 11 investment banks as clients.
Six kids from 3 to 26
to avoid an empty block complaint.

while (methodReader.readOne()) {
continue;
}
November 12, 2025 at 9:34 PM
A test that never failed doesn't add much value. Ask an AI to write a failing test, and it will write a broken test.
The solution I have found is:
1. Ask it to find/fix a bug and write a test to exercise it
2. Keeping only that test, check it fails without a fix
3. Write the fix
November 12, 2025 at 9:48 AM
"Much of the most valuable Gen AI usage will grow out of existing business applications, rather than be wholly new. These applications will draw on existing domain models and infrastructure, and be more robust and useful as a result."
medium.com/@springrod/d...
Don’t Talk English to Your LLM
Just because LLMs are eloquent in natural language doesn’t mean that we should always communicate with them in it.
medium.com
November 5, 2025 at 9:22 AM
I find AI is more useful as a simulated developer user of the software.
It doesn't find bugs as often as it stumbles on usability issues.
November 3, 2025 at 2:47 PM
The AI boom isn’t just about algorithms — it’s about money, power, and a race to build infrastructure on a scale we’ve never seen before
youtu.be/NbL7yZCF-6Q?...
October 26, 2025 at 1:11 PM
Running codex cli via ssh from my phone, works surprisingly well while doing house work and other tasks
October 25, 2025 at 8:38 PM
Visiting Zegreb for some consulting
September 30, 2025 at 5:23 AM
On 20 Sep 2025, the UK had its third mass shooting for the year, the highest number in a year since 2006.
Also on 20 Sep 2025, the US had 3 mass shootings that day, which has the highest in one day since 18 Sep 2025.
The US has 5x the population of the UK, not 365x.
September 28, 2025 at 5:38 AM
September 22, 2025 at 6:56 PM
The war no one talks about
September 22, 2025 at 11:17 AM
It turns out that Reasoning LLM can also get distracted by cats.

"Cats Confuse Reasoning LLM: Query Agnostic Adversarial Triggers for Reasoning Models"

arxiv.org/abs/2503.01781
September 21, 2025 at 7:15 PM
While Generative AI can increase the overall volume of documentation and code, in terms of curated and validated release content, the increase might only be +20%. The following represents the number of lines of ~6 months of work on similar projects, both before and after using AI.
September 19, 2025 at 12:46 PM
Reposted by Peter Lawrey
Reporter: The president of Venezuela called the strike on the boat illegal

Trump: What’s illegal is the fact that 300 million people died last year from drugs
September 15, 2025 at 1:00 AM
Parwill was the name of an Australian food product from 1928 to 1935, originally branded as Vegemite, which was a failed attempt to compete with the popular British brand Marmite. The name was a pun on Marmite.
uk.pcmag.com/ai/159686/el...
Elon Musk to Take on Microsoft With 'Macrohard'
The goal is to create hundreds of specialized coding and generative AI agents. 'It should be possible to simulate [Microsoft] entirely with AI,' Musk says.
uk.pcmag.com
August 25, 2025 at 6:38 PM
Coding is a mystery story where you are the detective, perpetrator, and the victim
August 25, 2025 at 11:58 AM
The minimum tarrif for goods mailed into the US will be $80 to $200 depending on the country. A $5 cup direct from China will have a $200 tarrif.
August 24, 2025 at 9:29 AM
#!/usr/bin/tail +2
Hello World
August 23, 2025 at 4:38 PM
GPT-5: Generate a Where's Waldo, and find Waldo
August 17, 2025 at 3:33 PM
AI coding tools are powerful for certain tasks with significant caveats. They can enhance developer learning and enjoyment
The human developer’s role is still central. Understanding the problem, ensuring quality, and making architectural decisions remain human responsibilities that AI can’t shoulder
July 23, 2025 at 9:12 AM
I find most people want AI to produce a correct answer, which means the AI needs to be cautious.
I look for ideas that will inspire me, something I wouldn't have thought of, cherry-picking from a selection of more "creative" ideas
July 20, 2025 at 8:19 AM
I refined a prompt across multiple AI models to consistently generate low-latency Java code for formatting timezone offsets, moving beyond one-shot requests to detailed instructions that bridge performance gaps

blog.vanillajava.blog/2025/07/impr...
Improving the prompt to the AI to get better code
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 wa...
blog.vanillajava.blog
July 17, 2025 at 4:00 PM
I walk through a single “low-latency” Java in six different AI models (Gemini 2.5 Pro, OpenAI o3-Pro, o4-Mini-High, Claude 4, Grok 3 Think, Copilot) each rework it. I consider how models deliver different trade-offs

blog.vanillajava.blog/2025/07/aski...
Asking multiple AI to optimise the same code
As different AIs are implemented differently, they don't all provide the same answer, nor do they consistently outperform one another. The b...
blog.vanillajava.blog
July 16, 2025 at 9:19 PM
I consulted for a hedge fund in Chicago which gave free breakfast. They went to the effort to label the sugar etc of each cereal. The lowest sugar was froot loops which has food colouring which means it can't be sold in Europe/Canada
July 15, 2025 at 8:00 AM
It's a mistake to assume AI saves time, especially for experienced developers.

For senior developers, "analysis reveals that AI actually increased task completion time by 19%. ...

www.techradar.com/pro/using-ai...
Using AI might actually slow down experienced devs
Experienced developers aren't getting any benefit from AI, report claims
www.techradar.com
July 13, 2025 at 7:10 AM
For a mature code base, the biggest use for AI is reviewing existing code and changes to that code. Even for generated code, the biggest bottleneck is reviewing it. Having AI flag bugs, suggest refinements, and validate diffs can slash review times and boost code quality.
July 13, 2025 at 6:58 AM