Peter Lawrey's Avatar

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

893 Followers  |  335 Following  |  279 Posts  |  Joined: 14.11.2024  |  1.7246

Latest posts by peterlawrey.bsky.social on Bluesky

Tip for AI CLI: ask it to suggest topics to research to fix a problem, get a chat AI to do the research with web search, and paste the results into the CLI, save it to an adoc|md for future reference

21.11.2025 07:55 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

Oddly specific rety time for Gemini CLI

16.11.2025 20:27 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

to avoid an empty block complaint.

while (methodReader.readOne()) {
continue;
}

12.11.2025 21:34 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

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

12.11.2025 09:48 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
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.

"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...

05.11.2025 09:22 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

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.

03.11.2025 14:47 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

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?...

26.10.2025 13:11 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image 25.10.2025 20:40 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Running codex cli via ssh from my phone, works surprisingly well while doing house work and other tasks

25.10.2025 20:38 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

Visiting Zegreb for some consulting

30.09.2025 05:23 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

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.

28.09.2025 05:38 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image 22.09.2025 18:56 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

The war no one talks about

22.09.2025 11:16 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

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

21.09.2025 19:15 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

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.

19.09.2025 12:46 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Video thumbnail

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

15.09.2025 01:00 β€” πŸ‘ 3194    πŸ” 627    πŸ’¬ 1325    πŸ“Œ 1262
Preview
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.

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...

25.08.2025 18:38 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Coding is a mystery story where you are the detective, perpetrator, and the victim

25.08.2025 11:58 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
Suspending Duty-Free De Minimis Treatment for All Countries By the authority vested in me as President by the Constitution and the laws of the United States of America, including the International Emergency

www.whitehouse.gov/presidential...

25.08.2025 09:30 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

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.

24.08.2025 09:29 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

#!/usr/bin/tail +2
Hello World

23.08.2025 16:38 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image Post image

GPT-5: Generate a Where's Waldo, and find Waldo

17.08.2025 15:33 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
Election funding Eligible candidates are entitled to claim election funding of demonstrated electoral expenditure after a federal election or by-election. Click here for the election funding claim form and guide.

In Australia, the government covers a certain level of expense for any candidate who receives at least 4% of the vote. www.aec.gov.au/parties_and_...

28.07.2025 08:29 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

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

23.07.2025 09:12 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

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

20.07.2025 08:18 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
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...

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...

17.07.2025 16:00 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
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...

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...

16.07.2025 21:19 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
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...

For comparison, I asked it to review code that had been accepted. blog.vanillajava.blog/2025/07/aski...

16.07.2025 21:12 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

As AI is a statistical tool, implemented differently, you get different results for each one. Even two models from the same vendor. So, if you are "mining for diamonds," give the same prompt to multiple models.

16.07.2025 20:27 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Gemini suggested that the `compile` in the Groovy configuration could be replaced with `implementation`; however, since this still works, albeit with a warning, perhaps it's not worth changing.
I wouldn't have considered this if not for AI.

16.07.2025 10:33 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

@peterlawrey is following 19 prominent accounts