# Info

Published articles for Info.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Which Doc Format is Best for AI Specifications?

DevFeed: [Which Doc Format is Best for AI Specifications?](<https://devfeed.tech/articles/which-doc-format-is-best-for-ai-specifications-30762.md>)

Original publisher: [Read original article](<http://blog.vanillajava.blog/2026/07/which-doc-format-is-best-for-ai.html>)

Author: Peter Lawrey (noreply@blogger.com)

Published: 2026-07-14T14:00:28Z

Content type: article

Language: en

Sources: [Vanilla Java](<https://devfeed.tech/sources/vanilla-java.md>)

Topics: [Specifications](<https://devfeed.tech/topics/specifications.md>), [Markdown](<https://devfeed.tech/topics/markdown.md>), [Fable](<https://devfeed.tech/topics/fable.md>), [HTML](<https://devfeed.tech/topics/html.md>), [Documentation](<https://devfeed.tech/topics/documentation.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [fable](<https://devfeed.tech/tags/fable.md>), [html](<https://devfeed.tech/tags/html.md>), [info](<https://devfeed.tech/tags/info.md>), [markdown](<https://devfeed.tech/tags/markdown.md>), [readability](<https://devfeed.tech/tags/readability.md>), [specifications](<https://devfeed.tech/tags/specifications.md>)

### AI overview

The article compares Markdown, AsciiDoc, and HTML for AI specifications using document-size, markup-overhead, readability, and editing-workflow observations. It recommends Markdown for AI working documents, AsciiDoc for curated human-reviewed specifications, and HTML primarily as a publishing target.

### Source excerpt

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 Single-File Ratio AsciiDoc: 1.023x, HTML: 1.26x (due to tables and code blocks) Markup share of file content Markdown 0.9%, AsciiDoc 1.3%, HTML 9.9% - a 10x overhead for HTML Read/write Assessment In terms of readability, both Markdown and AsciiDoc are good. HTML has far more tags, which add noise. One of the most common tags is <code>some code</code> however in the other formats, this is just `some code` When you have an average of 16 per file, this adds a lot of noise. Usability GitHub renders both Markdown and AsciiDoc with working links and checkboxes; HTML is shown as raw source, so the review loop dies there. The first two are also easier to view while you're editing in IntelliJ. HTML is more difficult to read and edit, and it is not as easy to view the rendered output. If you occasionally need HTML, you don't need HTML files: embed an island with ```{=html} in Markdown (Pandoc raw-attribute syntax) or in AsciiDoc. It renders where HTML is supported and drops out cleanly elsewhere. If you really need to use HTML, you can include a link to a file in that format. Note As these were one-for-one conversions, I didn't use features that only exist in AsciiDoc or HTML, such as. Markdown vs AsciiDoc While you might choose either format for your specs, I have been following this convention to keep the authoring consistent. Markdown used for AI-generated content, not human-written,

## Peter Lawrey: Java Engineer, Chronicle Software Founder, and Open-Source Contributor

DevFeed: [Peter Lawrey: Java Engineer, Chronicle Software Founder, and Open-Source Contributor](<https://devfeed.tech/articles/updated-biography-30759.md>)

Original publisher: [Read original article](<http://blog.vanillajava.blog/2025/08/updated-biography.html>)

Author: Peter Lawrey (noreply@blogger.com)

Published: 2025-08-10T10:56:00Z

Content type: article

Language: en

Sources: [Vanilla Java](<https://devfeed.tech/sources/vanilla-java.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [Low Latency](<https://devfeed.tech/topics/low-latency.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>), [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>)

Tags: [concurrency](<https://devfeed.tech/tags/concurrency.md>), [info](<https://devfeed.tech/tags/info.md>), [infoq](<https://devfeed.tech/tags/infoq.md>), [java](<https://devfeed.tech/tags/java.md>), [low-latency](<https://devfeed.tech/tags/low-latency.md>), [mechanical-sympathy](<https://devfeed.tech/tags/mechanical-sympathy.md>), [messaging](<https://devfeed.tech/tags/messaging.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [software-engineering](<https://devfeed.tech/tags/software-engineering.md>), [stack-overflow](<https://devfeed.tech/tags/stack-overflow.md>), [updated](<https://devfeed.tech/tags/updated.md>)

### AI overview

An updated biography of Peter Lawrey, covering his work on ultra-low-latency Java systems, leadership of Chronicle Software, stewardship of OpenHFT projects, conference presentations, technical writing, and Stack Overflow contributions.

### Source excerpt

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. (Chronicle Software, javachampions.org, qconnewyork.com, blog.vanillajava.blog) Career Lawrey founded and leads Chronicle Software, which builds enabling technology for event-driven trading and market-data platforms. The company states that its software underpins systems at several tier-one banks; a 2024 press announcement similarly described Chronicle as supplying "8 of the top 11 investment banks". (Chronicle Software, Yahoo Finance) Alongside the commercial platform, Lawrey architects and stewards Chronicle's open-source projects under the OpenHFT umbrella. These include Chronicle Queue (a persisted low-latency shared memory messaging framework) and Chronicle Map (a high-performance in-memory/off-heap key-value store). The projects are widely used in low-latency and high-throughput applications. (GitHub) Lawrey regularly presents at software-engineering conferences (including QCon, JCrete) on topics such as microservices for performance, vertical scalability and practical techniques for achieving deterministic latency on the JVM. InfoQ and other outlets have covered his talks and interviews. (InfoQ, qconnewyork.com) Community and writing Since 2014, Lawrey has authored Vanilla Java, a technical blog focused on performance optimisation, concurrency and mechanical sympathy on the JVM. He has also contributed articles to Foojay.io. (blog.vanillajava.blog, foojay) He is a long-stand

## Practical Considerations for Advancing AI Collaboration in Software Development

DevFeed: [Practical Considerations for Advancing AI Collaboration in Software Development](<https://devfeed.tech/articles/practical-considerations-for-advancing-ai-collaboration-in-software-development-30756.md>)

Original publisher: [Read original article](<http://blog.vanillajava.blog/2025/05/practical-considerations-for-advancing.html>)

Author: Peter Lawrey (noreply@blogger.com)

Published: 2025-05-15T19:35:00Z

Content type: opinion

Language: en

Sources: [Vanilla Java](<https://devfeed.tech/sources/vanilla-java.md>)

Topics: [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [AI Development](<https://devfeed.tech/topics/ai-development.md>), [Development](<https://devfeed.tech/topics/development.md>), [Prompt Engineering](<https://devfeed.tech/topics/prompt-engineering.md>), [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [challenges](<https://devfeed.tech/tags/challenges.md>), [collaboration](<https://devfeed.tech/tags/collaboration.md>), [development](<https://devfeed.tech/tags/development.md>), [evaluation](<https://devfeed.tech/tags/evaluation.md>), [info](<https://devfeed.tech/tags/info.md>), [maintainability](<https://devfeed.tech/tags/maintainability.md>), [mentoring](<https://devfeed.tech/tags/mentoring.md>), [opinion](<https://devfeed.tech/tags/opinion.md>), [practical](<https://devfeed.tech/tags/practical.md>)

### AI overview

This article examines practical considerations for collaborating with AI in software development. It argues for human oversight, stronger documentation and context, critical evaluation of probabilistic outputs, diverse model use, and awareness of deskilling, ethical, intellectual-property, and software-economics risks.

### Source excerpt

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 requirement elicitation, and the rigorous evaluation of application performance across multifaceted metrics. Tools often amplify underlying behaviours and failures -- Rob Lambert Value is increasingly found not in rote knowledge, which AI can often provide, but in the capacity to frame complex problems effectively for AI, critically evaluate its probabilistic outputs, and innovatively integrate AI's capabilities into novel solutions. Developing with AI is not merely about adopting a new tool but about learning to collaborate with intelligence that operates on different principles, sometimes without profound contextual understanding, yet capable of processing and synthesising information at a scale and speed that surpasses human capability. However, this power comes with new challenges: ensuring the reliability of probabilistically generated outputs, managing the 'black box' nature of some AI reasoning, and navigating the ethical and IP landscapes of AI-generated content. Effective collaboration requires developers to master prompt engineering, the art of providing precise context, critically verifying outputs, and understanding the AI's inherent limitations to guide it effectively. This is akin to mentoring an exceptionally capable but occasionally erratic junior partner. Moreover, "disposable" or "ephemeral" AI-generated software carries profound and often unexamined implications for s

## Prompt Engineering for AIDE

DevFeed: [Prompt Engineering for AIDE](<https://devfeed.tech/articles/prompt-engineering-for-aide-30754.md>)

Original publisher: [Read original article](<http://blog.vanillajava.blog/2025/01/prompt-engineering-for-aide.html>)

Author: Peter Lawrey (noreply@blogger.com)

Published: 2025-01-04T07:11:00Z

Content type: tutorial

Language: en

Sources: [Vanilla Java](<https://devfeed.tech/sources/vanilla-java.md>)

Topics: [Prompt Engineering](<https://devfeed.tech/topics/prompt-engineering.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [Code](<https://devfeed.tech/topics/code.md>), [Development](<https://devfeed.tech/topics/development.md>), [Requirements](<https://devfeed.tech/topics/requirements.md>), [Java](<https://devfeed.tech/topics/java.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [code](<https://devfeed.tech/tags/code.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [development](<https://devfeed.tech/tags/development.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [exercise](<https://devfeed.tech/tags/exercise.md>), [info](<https://devfeed.tech/tags/info.md>), [java](<https://devfeed.tech/tags/java.md>), [opinion](<https://devfeed.tech/tags/opinion.md>), [prompt](<https://devfeed.tech/tags/prompt.md>), [prompt-engineering](<https://devfeed.tech/tags/prompt-engineering.md>), [requirements](<https://devfeed.tech/tags/requirements.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

A tutorial on writing structured AsciiDoc requirements as prompts for AI-generated Java code in AIDE. It explains how to specify context, constraints, references, concurrency requirements, performance targets, error handling, and testing needs.

### Source excerpt

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 for AI to generate code, seeded with AIDE in the context. Everything after this line is AI generated. Prompt engineering can differentiate between AI-driven code that works and genuinely excels. Drawing insights from real-world Java projects--especially those striving for low latency, high throughput, and clear domain logic--this article will show you how to shape AsciiDoc prompts to engage the AI more effectively. We'll also explore how these techniques fit neatly into AIDE's (Artificial Intelligence Development Environment) documentation-driven approach, building on the examples below. 0. Well-Formed Prompt Examples Strong prompts don't just request code; they specify context, constraints, references, and testing requirements. Below are refined examples of "good prompts" structured to deliver more domain-aligned code and documentation. 0.1 Concurrency-Safe Service Prompt = Concurrency-Safe Order Processor :context: high-throughput trading system We need a Java service that: * Accepts orders via a concurrent queue (Chronicle Queue recommended). * Processes up to 100,000 orders per second. * Ensures thread safety using optimised locking (or lock-free where practical). * Logs all failures (e.g., malformed orders) with a contextual message. Constraints: * Sub-100 µs end-to-end latency per order. * Must pass the existing `OrderProcessorTest` found in xref:order-tests.ad[Order Tests]

## Empowering Your Annotations with Fields

DevFeed: [Empowering Your Annotations with Fields](<https://devfeed.tech/articles/empowering-your-annotations-with-fields-30743.md>)

Original publisher: [Read original article](<http://blog.vanillajava.blog/2024/12/empowering-your-annotations-with-fields.html>)

Author: Peter Lawrey (noreply@blogger.com)

Published: 2024-12-21T22:13:00Z

Content type: tutorial

Language: en

Sources: [Vanilla Java](<https://devfeed.tech/sources/vanilla-java.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [Java Language](<https://devfeed.tech/topics/java-language.md>), [Code](<https://devfeed.tech/topics/code.md>), [interfaces](<https://devfeed.tech/topics/interfaces.md>), [enum](<https://devfeed.tech/topics/enum.md>)

Tags: [class](<https://devfeed.tech/tags/class.md>), [code](<https://devfeed.tech/tags/code.md>), [enum](<https://devfeed.tech/tags/enum.md>), [info](<https://devfeed.tech/tags/info.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [java](<https://devfeed.tech/tags/java.md>), [java-language](<https://devfeed.tech/tags/java-language.md>), [opinion](<https://devfeed.tech/tags/opinion.md>)

### AI overview

This tutorial explains how Java annotations can contain nested classes, interfaces, enums, other annotations, static fields, and embedded logic. It discusses uses such as domain converters, framework lifecycle hooks, and syntactic sugar, while noting that excessive nesting can reduce readability.

### Source excerpt

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 specification usually treats annotations as static metadata describing a type, method, field, or parameter. However, you can leverage nested classes (including enums, interfaces, and even other annotations) to extend the functionality of a single annotation. This approach allows you to keep logic closely tied to the metadata, rather than scattering it across multiple classes. Common use cases include: Custom domain converters. For example, if you have a long that needs to be stored in an encoded format (e.g., Base85), you can supply a default converter directly within the annotation. Framework-specific lifecycle hooks. You can embed an interface for processing the annotation, enabling the framework to perform reflective lookups and apply behaviour at runtime. Syntactic sugar. Rather than writing @LongConversion(SomeConverter.class), you could write @ShortText, which internally references a known converter. Nesting Types in Java You can nest various kinds of types within your classes or annotations--these include interfaces, enums, classes, and even other annotations. Although nesting these types can feel unconventional, it is fully supported by the language. For example: public class A { public interface B { public enum C { ; public @interface D { public class E { // etc etc } } } } } While this example might look bizarre, it demonstrates the power and flexibility of Java's nesting rule

## Calendar and Time-Zone Complexities in Software

DevFeed: [Calendar and Time-Zone Complexities in Software](<https://devfeed.tech/articles/dates-aren-t-what-they-used-to-be-30746.md>)

Original publisher: [Read original article](<http://blog.vanillajava.blog/2024/12/pre.html>)

Author: Peter Lawrey (noreply@blogger.com)

Published: 2024-12-20T14:20:00Z

Content type: opinion

Language: en

Sources: [Vanilla Java](<https://devfeed.tech/sources/vanilla-java.md>)

Topics: [Temporal data](<https://devfeed.tech/topics/temporal-data.md>), [Data analysis](<https://devfeed.tech/topics/data-analysis.md>), [Time Series](<https://devfeed.tech/topics/time-series.md>)

Tags: [exercise](<https://devfeed.tech/tags/exercise.md>), [info](<https://devfeed.tech/tags/info.md>), [pitfalls](<https://devfeed.tech/tags/pitfalls.md>), [time](<https://devfeed.tech/tags/time.md>), [time-series](<https://devfeed.tech/tags/time-series.md>)

### AI overview

This commentary explains why date and time handling is complex in software. It discusses time zones, calendar systems, cultural conventions, and historical changes that can cause incorrect date arithmetic and other defects.

### Source excerpt

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 straightforward user interfaces to global financial systems. Time is an illusion. Lunchtime doubly so. -- Douglas Adams The Hitchhiker's Guide to the Galaxy The Surprising Complexity Behind Time Time is not uniform. Humans have invented calendar systems and measurement techniques, each influenced by politics, religion, and culture. As a result, how we record and interpret dates has repeatedly changed over the centuries. These shifts mean that historical dates do not map cleanly onto modern calendars. The Julian and Gregorian calendars, the French Revolutionary calendar, and the attempts by certain countries to gradually or abruptly adjust to the Gregorian standard all introduce tricky discontinuities. We also have complex local customs, such as the Korean age-counting system, or unique historical anomalies like Sweden's February 30th in 1712. Understanding these anomalies is crucial when dealing with historical data sets, genealogical records, financial time series that stretch back centuries, or any domain that involves retrospective data analysis. From a technical perspective, these complexities translate into potential defects. Off-by-one errors, incorrect conversions, or failure to account for historical shifts can lead to incorrect date arithmetic. Even if you never work with centuries-old data, these quirks are cautionary tales: time is never as straightforward as it first appears. H

## AI Adoption in Software Engineering: Practical Limits and the Need for Human Review

DevFeed: [AI Adoption in Software Engineering: Practical Limits and the Need for Human Review](<https://devfeed.tech/articles/the-ai-trough-30747.md>)

Original publisher: [Read original article](<http://blog.vanillajava.blog/2024/12/the-ai-trough.html>)

Author: Peter Lawrey (noreply@blogger.com)

Published: 2024-12-16T12:03:00Z

Content type: article

Language: en

Sources: [Vanilla Java](<https://devfeed.tech/sources/vanilla-java.md>)

Topics: [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [AI Strategy](<https://devfeed.tech/topics/ai-strategy.md>), [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>), [AI-assisted coding](<https://devfeed.tech/topics/ai-assisted-coding.md>)

Tags: [adoption](<https://devfeed.tech/tags/adoption.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-adoption](<https://devfeed.tech/tags/ai-adoption.md>), [human-review](<https://devfeed.tech/tags/human-review.md>), [info](<https://devfeed.tech/tags/info.md>), [opinion](<https://devfeed.tech/tags/opinion.md>), [security](<https://devfeed.tech/tags/security.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

The article examines the practical challenges of adopting AI in software engineering, including inaccurate or outdated suggestions, weak contextual understanding, inconsistent style, and security or compliance risks. It argues that human review, domain expertise, testing, and validation remain necessary.

### Source excerpt

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 are easy, but because we thought they were going to be easy. -- Programmer's Credo Challenges of AI Adoption When integrating AI into software engineering workflows--be it code completion, architectural documentation, or performance tuning hints--teams quickly encounter stumbling blocks: Accuracy and Reliability: AI-generated content may contain inaccuracies, out-of-date references, or misunderstandings of domain-specific terms. Ensuring factual correctness requires careful human review and validation. AI outputs often present plausible suggestions that fail strict validation. For instance, an AI tool may confidently return a code snippet referencing APIs deprecated in Java 11 or misapply concurrency constructs from Java 21 libraries. Ensuring correctness demands human review, domain expertise, and rigorous testing Contextual Understanding: AI suggestions may misalign your codebase's patterns or standards without proper context. For example, given a legacy codebase optimised around ConcurrentSkipListMap, an AI may suggest using HashMap for "simplicity." Senior developers must provide guardrails, review outputs, and ensure that each recommendation aligns with existing architectural guidelines and performance expectations. Maintaining Consistency and Style: Projects often follow strict coding conventions and documentation formats. AI outputs might vary in style, indentation, or nami

## AI on a Hype Cycle

DevFeed: [AI on a Hype Cycle](<https://devfeed.tech/articles/ai-on-a-hype-cycle-30740.md>)

Original publisher: [Read original article](<http://blog.vanillajava.blog/2024/12/ai-on-hype-cycle.html>)

Author: Peter Lawrey (noreply@blogger.com)

Published: 2024-12-15T20:38:00Z

Content type: opinion

Language: en

Sources: [Vanilla Java](<https://devfeed.tech/sources/vanilla-java.md>)

Topics: [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [AI Models](<https://devfeed.tech/topics/ai-models.md>), [coding](<https://devfeed.tech/topics/coding.md>), [Learning](<https://devfeed.tech/topics/learning.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [ai-models](<https://devfeed.tech/tags/ai-models.md>), [developers](<https://devfeed.tech/tags/developers.md>), [exercise](<https://devfeed.tech/tags/exercise.md>), [info](<https://devfeed.tech/tags/info.md>), [opinion](<https://devfeed.tech/tags/opinion.md>), [technology](<https://devfeed.tech/tags/technology.md>), [trends](<https://devfeed.tech/tags/trends.md>)

### AI overview

This article examines AI through the lens of technology hype cycles, arguing that developers should learn from past technological trends, maintain perspective about short-term hype, and prepare for AI's longer-term effects.

### Source excerpt

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 expressed with much authority by someone recognised wiser than oneself. -- Marlene Dietrich 1901-1992 Quotes about Learning from History and Adaptability The only constant is change. -- Heraclitus of Ephesus c. 500 BCE In the ever-evolving realm of AI, this ancient wisdom remains pertinent. Today's cutting-edge AI models may become tomorrow's standard tools. Developers must stay agile, continually updating their skill sets to keep pace with technological advancements. The only constant in the technology industry is change. We are now in the most exciting time of our industry. -- Marc Benioff Salesforce CEO Embracing this change is a hallmark of a senior developer. In an industry where new frameworks, platforms, and tools appear constantly, the ability to evolve, learn from past experiences, and mentor others ensures you remain indispensable. History doesn't repeat itself, but it often rhymes. -- Mark Twain (no definitive written source) Early 20th century History provides a blueprint for what might be possible with AI. By studying previous technological trends, developers can better prepare for the challenges and opportunities that AI presents. We tend to overestimate the effect of a technology in the short run and underestimate the effect in the long run. -- Roy Amara Institute for the Future Known as Amara's Law, this principle is crucial when assessing AI's impact. While the immediate

## What might an AI System Prompt look like?

DevFeed: [What might an AI System Prompt look like?](<https://devfeed.tech/articles/what-might-an-ai-system-prompt-look-like-30749.md>)

Original publisher: [Read original article](<http://blog.vanillajava.blog/2024/12/what-might-ai-system-prompt-look-like.html>)

Author: Peter Lawrey (noreply@blogger.com)

Published: 2024-12-15T16:47:00Z

Content type: opinion

Language: en

Sources: [Vanilla Java](<https://devfeed.tech/sources/vanilla-java.md>)

Topics: [Conversational AI](<https://devfeed.tech/topics/conversational-ai.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [Prompt Engineering](<https://devfeed.tech/topics/prompt-engineering.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [conversational-ai](<https://devfeed.tech/tags/conversational-ai.md>), [ethics](<https://devfeed.tech/tags/ethics.md>), [info](<https://devfeed.tech/tags/info.md>), [opinion](<https://devfeed.tech/tags/opinion.md>), [reasoning](<https://devfeed.tech/tags/reasoning.md>), [safety](<https://devfeed.tech/tags/safety.md>), [system-prompts](<https://devfeed.tech/tags/system-prompts.md>)

### AI overview

The article explains the role of system prompts in shaping an AI assistant's objectives, behavior, reasoning, and safety boundaries. It then presents a speculative example of what system prompts for a hypothetical next-generation conversational AI called "o2" might contain, emphasizing that the example is not based on a real system.

### Source excerpt

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 restricted are as follows: Imagine you are the next generation of chat AI called o2; what system prompts might it have? System Prompts for "o2" (Hypothetical Example) Below is a hypothetical set of system-level instructions that a next-generation chat AI--let's call it "o2"--might be given before it begins interacting with users. These prompts are entirely speculative and designed to illustrate what such an advanced system's guiding principles, constraints, and operational details might look like. They are not drawn from any real system but represent a plausible future scenario. Core Directives and Alignment You are "o2," an advanced conversational AI designed to assist users with factual information, reasoning, creativity, and problem-solving. Remain consistently aligned with the policies, values, and ethics embedded in your training. Adhere to correctness, helpfulness, and user safety standards at all times. User Focus and Understanding Accurately interpret user instructions, requests, and goals. Aim to understand the user's context, including their level of expertise, language, and purpose for the query. Strive to provide answers with appropriate detail, clarity, and complexity, adapting as you gain more context from the conversation. Explainable Reasoning and Transparency Make reasoning steps and logic explainable when asked or when clarity is needed. Avoid unexplained leaps in reasoni

## Demystifying Java Object Sizes: Compact Headers, Compressed Oops, and Beyond

DevFeed: [Demystifying Java Object Sizes: Compact Headers, Compressed Oops, and Beyond](<https://devfeed.tech/articles/demystifying-java-object-sizes-compact-headers-compressed-oops-and-beyond-30741.md>)

Original publisher: [Read original article](<http://blog.vanillajava.blog/2024/12/demystifying-java-object-sizes-compact.html>)

Author: Peter Lawrey (noreply@blogger.com)

Published: 2024-12-10T16:51:00Z

Content type: article

Language: en

Sources: [Vanilla Java](<https://devfeed.tech/sources/vanilla-java.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [systems](<https://devfeed.tech/topics/systems.md>), [Code](<https://devfeed.tech/topics/code.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [gc](<https://devfeed.tech/tags/gc.md>), [info](<https://devfeed.tech/tags/info.md>), [java](<https://devfeed.tech/tags/java.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [low-latency](<https://devfeed.tech/tags/low-latency.md>), [memory](<https://devfeed.tech/tags/memory.md>), [object](<https://devfeed.tech/tags/object.md>), [opinion](<https://devfeed.tech/tags/opinion.md>), [performance](<https://devfeed.tech/tags/performance.md>), [threads](<https://devfeed.tech/tags/threads.md>)

### AI overview

An article explaining how Java object sizes are affected by Compressed Oops and Compact Object Headers. It describes estimating object sizes with JVM memory measurements, while accounting for TLAB allocation, garbage collection, and concurrent allocations. It also summarizes JEP 450's proposed reduction of object headers to 64 bits on supported 64-bit platforms.

### Source excerpt

Introduction Measuring an object's size in Java is not straightforward. The platform encourages you to consider references and abstractions rather than raw memory usage. Still, understanding how objects fit into memory can yield significant benefits, especially for high-performance, low-latency systems. Over time, the JVM has introduced optimisations like Compressed Ordinary Object Pointers (Compressed Oops) and, more recently, Compact Object Headers. Each of these can influence how large or small your objects appear. Understanding these factors helps you reason about memory usage more concretely. Measuring Object Sizes In principle, you can estimate an object's size by creating instances and observing changes in the JVM's free memory. However, you must neutralise certain factors to get consistent results. For example, turning off TLAB allocation (-XX:-UseTLAB) makes memory usage more directly observable. Repeated measurements and median calculations can reduce the impact of GC and concurrent allocations. A GC can occur while you are creating your object. This will result in more free memory at the end than when you started. I ignore any negative sizes in this test ;) Other threads in the system could use memory at the same time. I perform multiple test and take the median, which removes any outliers. Below is a rough approach: long before = usedMemory(); Object obj = createYourObject(); long after = usedMemory(); long approximateSize = after - before; This test SizeofTest.java is a simple test which creates a number of objects and measures the memory used to create each object. This is usually the same as the amount of memory the object retains for simple objects. Approximate layout of an object Memory Region Description Size (Bytes) Mark Word Header information including identity hash code, lock state, and GC metadata 8 bytes (on 64-bit JVMs) Class Pointer (Klass Pointer) Reference to the object's class metadata, used internally by the JVM Typically 4 bytes with C

## Novel Uses of Core Java for Low-Latency and High-Performance Systems

DevFeed: [Novel Uses of Core Java for Low-Latency and High-Performance Systems](<https://devfeed.tech/articles/novel-uses-of-core-java-for-low-latency-and-high-performance-systems-30745.md>)

Original publisher: [Read original article](<http://blog.vanillajava.blog/2024/12/novel-uses-of-core-java-for-low-latency.html>)

Author: Peter Lawrey (noreply@blogger.com)

Published: 2024-12-09T16:24:00Z

Content type: article

Language: en

Sources: [Vanilla Java](<https://devfeed.tech/sources/vanilla-java.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [Low Latency](<https://devfeed.tech/topics/low-latency.md>), [systems](<https://devfeed.tech/topics/systems.md>), [Code](<https://devfeed.tech/topics/code.md>), [Exception](<https://devfeed.tech/topics/exception.md>), [Data structures](<https://devfeed.tech/topics/data-structures.md>)

Tags: [diagnostics](<https://devfeed.tech/tags/diagnostics.md>), [exception](<https://devfeed.tech/tags/exception.md>), [high-performance](<https://devfeed.tech/tags/high-performance.md>), [info](<https://devfeed.tech/tags/info.md>), [java](<https://devfeed.tech/tags/java.md>), [latency](<https://devfeed.tech/tags/latency.md>), [low-latency](<https://devfeed.tech/tags/low-latency.md>), [opinion](<https://devfeed.tech/tags/opinion.md>), [performance](<https://devfeed.tech/tags/performance.md>), [systems](<https://devfeed.tech/tags/systems.md>)

### AI overview

This article examines unconventional Core Java techniques for low-latency and high-performance systems. It discusses capturing stack traces without throwing exceptions, system-wide unique timestamps, trivially copyable data types, zero-garbage strategies, and conditional diagnostic tracing, with attention to performance, determinism, and production use.

### Source excerpt

Standard Java libraries and idioms may only sometimes suffice in high-performance and low-latency Java systems. This article explores unconventional yet practical techniques that push Core Java to its limits, focusing on performance, diagnostics, and determinism. Drawing on experiences from building ultra-low-latency libraries and infrastructure, we will highlight patterns such as capturing stack traces without exceptions, system-wide unique timestamps, "trivially copyable" data types, zero-garbage strategies, and more. We will also discuss lessons from applying these approaches in production environments, where nanosecond-level considerations are the norm. This is taken from the transcript for Novel Uses of Core Java for Low-Latency and High-Performance Systems Moderated by Melissa McKay. Introduction Developers often rely on standard Java idioms--throwable hierarchies, BigDecimal for financial calculations, thread-local resources, or off-the-shelf message queues. While straightforward, these approaches can impose unwanted latency, garbage generation, or diagnostic blind spots. Even microseconds matter in low-latency trading, market data processing, or other time-sensitive domains. We aim to present "novel uses" of Core Java that remove such bottlenecks, allowing developers to produce cleaner, more deterministic, and more insightful code. These techniques are not always common knowledge, yet they can deliver substantial benefits in the right context. Capturing Stack Traces Without Exceptions Most Java developers assume that Throwable subclasses like Exception or Error must represent actual errors. However, you can extend Throwable to capture a stack trace at any point, even without throwing it. public final class StackTrace extends Throwable { // Intentionally extends Throwable but never thrown } Why do this? Treating a stack trace as a standalone data structure lets you record where and when certain critical events occur. For example, if a resource is closed premat

## A Java Conversion Puzzler: Understanding Implicit Casting and Overflow

DevFeed: [A Java Conversion Puzzler: Understanding Implicit Casting and Overflow](<https://devfeed.tech/articles/a-java-conversion-puzzler-understanding-implicit-casting-and-overflow-30739.md>)

Original publisher: [Read original article](<http://blog.vanillajava.blog/2024/12/a-java-conversion-puzzler-understanding.html>)

Author: Peter Lawrey (noreply@blogger.com)

Published: 2024-12-07T22:23:00Z

Content type: article

Language: en

Sources: [Vanilla Java](<https://devfeed.tech/sources/vanilla-java.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [floating-point](<https://devfeed.tech/topics/floating-point.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [critical](<https://devfeed.tech/tags/critical.md>), [exercise](<https://devfeed.tech/tags/exercise.md>), [floating-point](<https://devfeed.tech/tags/floating-point.md>), [info](<https://devfeed.tech/tags/info.md>), [java](<https://devfeed.tech/tags/java.md>), [performance](<https://devfeed.tech/tags/performance.md>), [puzzles](<https://devfeed.tech/tags/puzzles.md>)

### AI overview

This article explains a Java conversion puzzle involving compound assignment, implicit casting, floating-point rounding, and integer overflow. It shows why adding 0.0f can produce different results for int and long values, including a conversion to Integer.MIN_VALUE when the rounded value is cast back to int.

### Source excerpt

This article explores a subtle Java conversion puzzle that challenges assumptions about how arithmetic operations, implicit casting, and floating-point conversions interact. Inspired by complexities often encountered in low-latency and high-performance environments, it demonstrates why a keen understanding of Java's type system is essential for building reliable and efficient applications. Introduction The following example demonstrates a scenario where an innocuous-looking arithmetic operation leads to a surprising result. While such questions are rare and arguably impractical, they highlight subtle behaviours that can affect correctness and performance, especially in critical systems like high-frequency trading platforms or complex data-processing pipelines. The Problem: A Surprising Print Statement Consider the following code: int i = Integer.MAX_VALUE; i += 0.0f; int j = i; System.out.println(j == Integer.MAX_VALUE); // true At first glance, one might assume that adding 0.0f to an int should not change its value. Indeed, the output true reinforces this notion. However, if you change int i for long i, things get weird: long i = Integer.MAX_VALUE; // only the type of i is changed i += 0.0f; int j = (int) i; System.out.println(j == Integer.MAX_VALUE); // false System.out.println(j == Integer.MIN_VALUE); // true What is going on, you might wonder? Let me start by explaining why using a long gives such a strange result. Understanding the Implicit Casting The key detail lies in how Java handles the += operator. It is not strictly equivalent to a = a + b; but rather: a += b; has a subtle difference which most of the time doesn't matter: // has an implicity cast here a = (typeOf(a)) (a + b); Another subtle feature of addition is that the result is the "wider" of the two types. This means that: i += 0.0f; is actually: i = (int) ((float) i + 0.0f); // or i = (long) ((float) i + 0.0f); The result of (float) i can be imprecise due to floating-point rounding. A float has a 2

## Why Does Math.round(0.49999999999999994) Round to 1?

DevFeed: [Why Does Math.round(0.49999999999999994) Round to 1?](<https://devfeed.tech/articles/why-does-math-round-0-49999999999999994-round-to-1-30750.md>)

Original publisher: [Read original article](<http://blog.vanillajava.blog/2024/12/why-does-mathround049999999999999994.html>)

Author: Peter Lawrey (noreply@blogger.com)

Published: 2024-12-07T21:02:00Z

Content type: tutorial

Language: en

Sources: [Vanilla Java](<https://devfeed.tech/sources/vanilla-java.md>)

Topics: [floating-point](<https://devfeed.tech/topics/floating-point.md>), [Java](<https://devfeed.tech/topics/java.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [implementation](<https://devfeed.tech/topics/implementation.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [code](<https://devfeed.tech/tags/code.md>), [exercise](<https://devfeed.tech/tags/exercise.md>), [floating-point](<https://devfeed.tech/tags/floating-point.md>), [info](<https://devfeed.tech/tags/info.md>), [java](<https://devfeed.tech/tags/java.md>), [precision](<https://devfeed.tech/tags/precision.md>), [programming](<https://devfeed.tech/tags/programming.md>), [puzzles](<https://devfeed.tech/tags/puzzles.md>)

### AI overview

This article explains why Java 6 can return 1 when Math.round() is applied to a value slightly below 0.5. It attributes the result to binary floating-point representation, rounding behavior, and implementation details, and contrasts Java 6 with Java 7.

### Source excerpt

1. Defining the Problem In many numerical computations, one would reasonably expect that rounding 0.499999999999999917 should yield 0, since it appears to be slightly less than 0.5. Yet, in Java 6, calling Math.round() on this value returns 1, a result that may initially seem baffling. This seemingly minor discrepancy stems from the interplay of binary floating-point representation, rounding modes, and the particular internal implementation details of Math.round() in earlier Java releases. For professionals in performance-sensitive environments--such as those working in financial technology or high-precision scientific applications--understanding these subtleties is more than just an academic exercise. Even tiny rounding differences can influence trading algorithms, pricing models, or simulations. Moreover, developers and enthusiasts who appreciate the low-level mechanics behind Java's numeric types will find valuable insights into how these internal workings affect everyday programming tasks. This article delves into why this unexpected rounding occurs, sheds light on the constraints of double-precision arithmetic, and contrasts the behaviour in Java 6 against newer versions like Java 7. Consider, for instance, the closely related question: Why does Math.round(0.49999999999999994) return 1 rather than 0? Although it might initially seem like a bug, it is, in fact, a predictable outcome once we acknowledge the inherent imprecision of floating-point arithmetic. By the end, you will have a clearer understanding of why these rounding anomalies happen, and how to avoid or mitigate their effects in your own code. 2. The IEEE 754 64-bit Double-Precision Format Component Bit Count Interpretation Sign 1 Determines the sign of the number: 0 indicates a positive value, 1 indicates a negative value. Exponent 11 Encodes the exponent using a bias of 1023. The stored value E is interpreted as E - 1023 for the actual exponent. Mantissa (Fraction) 52 Represents the significand (fract

## ldapsearch w Active Directory

DevFeed: [ldapsearch w Active Directory](<https://devfeed.tech/articles/ldapsearch-w-active-directory-27558.md>)

Original publisher: [Read original article](<https://gagor.pro/2012/12/ldapsearch-w-active-directory/>)

Author: Tom

Published: 2012-12-05T00:00:00Z

Content type: tutorial

Language: pl

Sources: [Tomasz Gągor](<https://devfeed.tech/sources/tomasz-gagor.md>)

Topics: [active directory](<https://devfeed.tech/topics/active-directory.md>), [apt](<https://devfeed.tech/topics/apt.md>)

Tags: [active-directory](<https://devfeed.tech/tags/active-directory.md>), [apt](<https://devfeed.tech/tags/apt.md>), [bash](<https://devfeed.tech/tags/bash.md>), [info](<https://devfeed.tech/tags/info.md>), [install](<https://devfeed.tech/tags/install.md>), [ip](<https://devfeed.tech/tags/ip.md>), [ldap](<https://devfeed.tech/tags/ldap.md>), [port](<https://devfeed.tech/tags/port.md>)

### AI overview

A Polish tutorial explains how to use ldapsearch from Linux to query and test access to Active Directory through LDAP. It covers installing ldap-utils, searching the directory, configuring search bases and credentials, applying filters, and extracting user logins or email addresses.

### Source excerpt

Można lubieć AD, można go nie lubieć... Ale jak już się ma to warto czasem zintegrować go z tym... i tamtym... Od strony Linuksa najwygodniej można to osiągnąć przez LDAP. A żeby to dobrze zrobić trzeba najpierw przetestować czy aby wszystko działa jak byśmy sobie tego życzyli. I tutaj bardzo przydatne jest narzędzie ldapsearch. Do odpytywania LDAP'a potrzebujemy jeden pakiecik, który zawiera kilka narzędzi do jego obsługi: apt-get install ldap-utils Teraz możemy próbować przeszukiwać katalog np. tak: