The AI Software Factory

I’ve previously led and managed software dev teams.
Using AI is like that but there’s no large team and no one reads the code.

I haven’t written any code personally in 4 months but I’ve caused the creation of thousands of lines of code, including in languages I don’t know. For 15+ years before that I handcrafted every line of java / kdb+q / bat / bash that I wrote and agonized over failure cases, testing and formatting. My entire workflow and every hard earned skill I spent years perfecting now needs to be reassessed and to be honest, it’s pretty damn exciting. I’ve learnt a lot over the past few months and I want to share some with you.

First comes Acceptance

  1. You won’t be writing the code.
  2. You won’t be reading most of the code.
  3. You will have to find a way to review the outcomes (good and bad) and to ensure reliability.
  4. Your goal is to design the factory that generates the code.

If you don’t accept that AI can write good code or that it’s the future you should stop now. If you’ve used code assist, AI to write full files, multiple simultaneous AIs and are wondering what’s next, this is the next small step.

Historically

Historically teams optimized for long term velocity by sharing skills and knowledge by planning and reviewing code together. The most critical parts that a junior could learn was what needed to be done, how to implement it, why and what was and was not a good solution to achieve the overall goal. Sad to say, a lot of how we traditionally shared and developed those skills should now be thrown away.

(I have no idea what the solution will be for juniors but one good mid to senior engineer can now outpace a whole team and I think they should be one-person teams to move fast. Maybe everything gets broken down to one man teams. I just don’t currently see how or why to scale to large dev teams right now Aug 2026)

The Software Factory

OK So what does this new world look like. At any one time you have 3-6 terminals open:

  1. The Merge Coordinator Tab – Their sole purpose is to use a background worker to merge code. They have the context of what just got merged, what is about to merge so if there is overlap they have some context to fix it. They should not get hands on in merging code beyond a few small <10 line edits, that’s the individual mergers job.
  2. The Task-Area Manager(s) – Your software should be modular and broken up into separable areas. When working in one area e.g. UI e.g. Database Access layer , one tab i.e. one AI manager should be dedicated to that area. Their job is to have overall context of that area and to draw up requirements, scopes, plans, targets that serve as the launching point for one PR. That task and that one PR will be assigned to a background-PR-worker.
    (See the previous post on evolution-goals-safeguards to see how you might optimize them.)
  3. The Odd-Job Worker – One tab is for small jobs that don’t justify a PR. Used infrequently but handy when one of your workers spots a bug.
  4. The big picture brain-stormer – Occasionally you won’t have a clear idea of what needs done or even what the goal should be. Ask the AI. Force it to give you 3-4 ideas. Even if these are terrible, it may kickstart your thinking, or ask it to tear apart your ideas. You don’t want these ideas in other tabs or workers as it would waste context and end up confusing them. They should only see your solidified ideas or plans so they have clear goals.

The above is really about maintaining context. You will have to re-weight what a PR is worth compared to your historical behavior. A PR is only worth as many tokens as it costs you, the amount of context you sunk into it that isn’t easily repeated.

Artifacts

The workers above should be operating from and feeding back into a number of key documents. To give you some idea of my various documents:

  1. Plan.md – Every worker appends a line of work done. Every time they notice work that will need done, they can add a few lines.
  2. Architecture.md – Have you made a major decision that will affect all future work, record it in architecture.md, record the reasons why. This will be the steering ideas that affect workers over a longer time period.
  3. ADRs – Generated from brainstorming sessions to record what all went into the decision.

Repeatable Approaches from Direct Examples

  • User Example Code as Targets – Everything that you can make be code, is testable and reusable, so you want everything to be runnable code. Traditionally some languages did this well by running all examples on their website as code, seeing what failed and that was the examples that need updated. Now I sometimes go the reverse direction. AI is really good at writing docs, this presents two opportunities:
    • Make it write tests in doc format and test them.
    • Within the code, run code that generates the docs. For example if you want your tool to support 15 different forms of input, generate a table that lists the 15 forms and generate the percentage compatible you are with each. That table then generates directly into your docs. The docs can’t go stale as they are directly generated by your test cases. If someone adds to your test suite, it should show up in your docs.
  • If you are providing any form of programmable tool, your target user is now AI, not a human.
    Programming language = your target user is AI.
    Database = your target user is AI.
    REST API = your target user is AI.
    If you are using AI for everything, eventually others will be too.
  • Great news your target user is AI.
    Run experiments against various AIs and models to test how good your software is.
    If AI is the target user, testing how easy your software is to use becomes simple. Create 5-10 tasks, assign them to different AIs and measure the outcomes. If your tool got more user-friendly, you should be able to see it. Previously you had to watch users and gather stats, now you can run the same experiment every 5 minutes.

Code is cheap. Context, Review and Verification are expensive.

Hopefully I’ve conveyed at least a vague outline of the AI Software Factory.

If you’ve progressed near to this, you now know that code is cheap, it’s the context, review and verification that we must now optimize for. I’ll hopefully dig into that and more in future blog posts.

Good luck building your factory

AI Driven Development as Guided Evolution

For the first time in over a decade, how I develop software has fundamentally changed.
I realized recently that I’m no longer evolving the code directly.
Instead, I’m designing the environment in which the code evolves.

Software development becomes designing the evolutionary environment instead of manually evolving the code.

AI has made the cost of certain parts of development collapse, which has entirely changed the game. Below I describe how I used to work, what changed, why and how I now move 10x faster. By considering software development as Guided Evolution I think it may unlock insights to accelerate your programming.

Look at the little green circle in the diagram below, that was me iterating on one part of the problem.
The ability to produce great code historically required me to conceptually understand code end-to-end:

  1. Understand the code base.
  2. Add some functionality at the edge of the area I want.
  3. Run it.
  4. Evaluate if the change was good. If not, start again.
  5. Repeat this loop over weeks and months, with occasional large refactors when I had a better idea.

Software development has always been a process of moving through a multi-dimensional solution space, gradually working toward a better system. When you think of it like that, it resembles the diagram above. However, now we are no longer iterating on a single node, we now set the framework within which the evolution occurs.

What the diagram represents

  • Ideally setting a very clear measurable goal. (Green Flag in image)
  • Lower Guard Rails – Linting , Tests, Instructions which say what not to do AND preferably automation to enforce it.
  • Upper Guard Rails – Measures to aim for, concise code, non-duplicated, dictated trade-offs, performance requirements.
  • Green Circle – Controlling the evaluation at each step. Carefully choose what information the build emits.

Why AI changes everything

  1. AI has plummeted the cost of trying different branches
    (Try lots of proof of concepts 1-shot and then evaluate a few for usefulness.)
  2. AI can progress along 10-20 steps within 40 minutes.
  3. If we can set a clear success criteria and a measure of fitness at each step,
    AI can progress steadily and relentlessly (like evolution) without much oversight.

Thinking about AI development through this lens explains several surprising behaviors. For example, AI can sometimes build large systems like compilers, yet struggle with small refactors. This makes sense if we view it as an evolutionary system: AI is good at exploring large solution spaces, but less reliable at precise local edits within complex constraints.

This perspective has given me several promising ideas for improving what I’m calling my new process:
EDLC – the Evolutionary Development LifeCycle.

Hopefully it will give you ideas too.

AI is replacing programmers. Graduates first.

Uncomfortable Truth: AI is already better than most junior developers at writing production-grade code. The impact will be felt first by graduates.

For the last year I’ve been using AI intensively on real projects with hundreds of users including commercial software with paid users. I wanted to record and share some of those learnings:

1. AI is really good at writing software right now (in a particular way.).

  • The length of tasks that AI can do is doubling every 7 months (source link).
  • In practical terms, this means AI systems are handling progressively longer, more complex, multi-step problems over time.
  • Somewhere around mid 2025 it became really good.
  • It feels to me like it crossed a threshold.

I personally have used it to build:

The conditional highlighting used some intelligent shading schemes to make it look good in both light and dark theme. The sparklines in java used a graphics2D shader that I myself had no experience of. I migrated from using AI for code snippets to code blocks and finally to entire modules. This was with careful review of all outputs and heavy testing.

Notice: Some areas that I found it most useful were ones that I didn’t know well, java graphics2D and color shading algorithms. That leads to my second point:

2. It’s no longer worth learning a new technology unless you can learn it really well.

Imagine your skill set as a bar chart, for me it’s: Very strong kdb+, core java. Strong software engineering, typescript, HTML. Middling finance/trading knowledge, SQL. weak bash and python. In the past any incremental increase in python knowledge was valuable so it made sense to learn it as I go. But now add a bar chart showing AIs ability today and AIs ability next year. Unless I can get above AI, there’s very little value to knowing a language worse than AI.

I now never write python or bash, I get AI to write it and I either review or test it.

3. Graduates expecting programming jobs in future are screwed.

I’ve purposefully made this title blunt. I have a nephew that was studying computer science until last year. I don’t want a whole generation to waste thousands on an education that is likely to be a dead end for many.

Considering the bar chart above. Any skill that is currently known by an AI or can be learnt by an AI, few companies will want to invest in a grad to wait years for them to learn. The cost curve for return on investment for a graduate developer moved years out and is at risk of moving further each year.

I did computer science at university, when I first left I was fairly useless. It took years of making mistakes, reading books and input from mentors to make me a net contributor to a project. Companies were already reluctant to invest in 1 year of investment to train someone, now it could be 3 years to beat an AI in some areas even if AI doesn’t get better. I saw this firsthand when I hired someone to work on Pulse. They were smart and motivated. I spent time with them daily on every PR, I encouraged them to use AI. Ultimately the time it was taking to invest and train them outweighed the benefit compared to AI and I had to let them go. Instead I invested in getting better at creating software with AI which allows a 10x to 100x increase in productivity in some areas.

Some people will push back on this and say there’s always jobs and you should still pursue a career you love. That’s partially true. There will be jobs around soft skills, engineering skills for many years going forward but that’s more likely to fall to mid or senior developers that can now multiply their productivity.

  • Firms will take years to adjust their hiring, training and approach to fit this new paradigm.
  • Computer science and related degrees have expanded massively over the years as many people saw it as lucrative.

Some that embrace the new AI approach will do well but the majority will not. The graph below shows horses vs cars and how they were replaced between 1910 to 1940. The replacement of entry-level roles for programming will be swifter.

Conclusion

So AI can write software, it isn’t worth learning some technologies, and graduates are going to be out of the job first…

The question in the past was: “How do I become a good programmer?”
Now it’s “How do I become more valuable at solving problems?”

AI may present those that embrace it with asymmetric benefits.
To be continued in future articles…

Pattern Breakers – Podcast Review

Podcast: https://www.youtube.com/watch?v=h9o6gPQA6LA&t=3s

Business is never a fair fight. Incumbants have an advantage. Startups have to change the battlefield/game so they have an unfair advantage.

  • Large companies work by compounding improvements
  • Startups can’t be better, they must have something that can’t be compared, it can only be chosen.
  • e.g. People that buy tesla cybertrucks don’t create a spreadsheet comparing systems, they choose cybertruck as it’s unique.

Coming up with good idea:

  1. Inflections – An underlying fundamental external change.
  2. Insights – Non-obvious truth about the inflection learnt through effort.
  3. Founder / Future Fit

Inflections

  • An underlying fundamental external change.
  • Can be either: Regulatory, Tech or Cultural
  • Culture example would be covid making remote working and remote doctors acceptable.
  • Not a gradual increase e.g. NOT moores law but when there’s a 0-to-1 change. e.g. GPS added to phones.
  • e.g. Better phone cameras + Better internet = Instagram
  • e.g. GPS + Mobile Phones = Uber
  • It kinds of answers Why now?
  • Would DuckDB / AI be an inflection?
  • Testing Startup Ideas, do you have an inflection:
    • 1. What change has been introduced in the world?
    • 2. What does it now enable or empower people to do?
    • 3. What conditions are needed to enable it?

Insight

  • Non-obvious truth about a set of inflections
  • If it was obvious or consensus it would be too similar to incumbants.
  • Initially most people should not like your idea, only a subset
  • How? Look at the future, live there. Realise what is missing. Work backwards. e.g. Continuous Deployment, shift-left. SAAS.
  • Want to find believers to create a movement
  • For your idea, should be able to say 3 things that surprised you:
    • My examples: CloudKDB the name helping. qsandboxes = quants running tests.
    • No surprises = a false idea? and you may be too attached to it.
  • Insight requires work and experimenting. e.g. Try one page landing website to see demand. Can AI predict divorce?
    The “secret” needs to be earned as the market cannot exist today.
  • Non-Consensus = Not obvious you are correct at first.
  • You are trying to wage assymetric warfare against the large incumbents.

Founder / Future Fit

  • What is the likely team to solve this?
    • e.g. Cutting edge = Young and nothing to unlearn
    • e.g. Self-driving car = previous large corporate experience at Ford/Tesla/Waymo
  • Who knows the most about this future and has the best network?
  • You need either:
    • Be building a product for your own needs
    • Lighthouse Customers – That are leading the industry
    • Or force yourself to the edge.
  • Threshold of Desperation is High – Someone must NEED it
    • If the customer can solve their problem and other way they will,
      they don’t want to do business with a startup.
    • Force a choice not a comparison – People shouldn’t be neutral on your product. e.g. Trump e.g. Uber e.g. Airbnb
  • Startups have few resources and poor execution, they can’t be better (execution)
  • They have to sell something unique that people MUST have. My e.g. Online kdb training.

What do successful Startups Do?

  1. Movements = Small upset minority with beliefs causing them to rebel against the majority
  2. Story Telling – How things are now? Could be in future? How do we get there?
  3. Disagreeableness
  • Early customers are motivated on belief NOT practicality.
  • Early adopters share the beliefs of the founder and see startup as prime mover
  • Eventually “What was heresy becomes conventional wisdom” e.g. Javascript is a proper language, Webapps can replace all apps……
  • Movement example – Ride-sharing = Uber. The majority conventional solution were taxis, a few people saw a better way.
  • Start with a higher purpose! e.g. Tesla doesn’t mention cars it says it’s for transitioning to sustainable energy.
  • AirBnB – Movement example
    • Founder never said “Hotels = bad”
    • But he started a “Live local” movement. that turned the hotels homogenous appearance to a disadvantage. Rather than stay somewhere generic, stay somewhere unique. All the hotels investment was turned against it. Goliath was too large and heavy to avoid the slingshot.

Story Telling

  • How things are now? Could be in future? How do we get there?
  • Formula similar to Star Wars
    • Dusty simple plan -> Mentor appears with Tool/Magic (Mentor = startup)
    • Hero believes in tool -> Finds helpers -> Beats the Empire
  • Language is important e.g. Twitter wasn’t called microblogs. my e.g. I used the word Dashboards in Pulse 😦 Should be apps.

Book Review: Philosophy of Software Design – Ousterhout

binary comment

Overall: 8/10

I can recommend a Philosophy of Software Design Paperback by John Ousterhout. I’ve been programming for 15 years and it closely parallels my own current beliefs about programming. He stands above the lower aspects of programming/code/modules, raising the discussion to a conceptual level, that you seem to be wanting. If I had read this 10 years ago I may have marked it higher but after 15 I’ve already learnt a lot of it through pain. I would keep on ehandy in the office to help me with explaining reasons to junior developers during code reviews.

Book Notes:

Chapter 1/2 – It’s all about complexity.

Formula on page 6 I rougly agree with.
i.e. “complexity is determined by the activities that are most common.” If a system has a few parts that are very complicated but they never need touched, that doesn’t much affect the overall complexity.”
Total Complexity = Sum[ componentComplexity x timeSpentWorkingOnThatPart]

I think his formula for overall complexity is mostly correct: Total Complexity = Sum[ componentComplexity x timeSpentWorkingOnThatPart] However I would replace the timeSpentWorkingOnThatPart with the sum of the square roots of all separate times. i.e. Working on a component for 2 days straight versus working on it 1 hour every 2 weeks are quite different.

Symptoms of Complexity

  • Change amplification – changes require code changes in many places
  • Cognitive Load – How much dev needs to know to complete a task
  • Unknown Unknowns – Not obvious which lines of code must be changed to complete a task
  • In an obvious system a dev can easily see where to make a change in 1-2 places.
  • Complexity is caused by dependencies and obscurity.

Chapter 3 - Strategic vs Tactical

Tactical = Main focus is on getting something working quickly.
Strategic = Working code isn’t enough. Most important is long term system structure.
How much to invest? If all you do is tactical, you build up complexity and code debt which eventually slows you down:

Chapter 4 – Modules should be deep

Abstraction -> Simplified view of an entity, which omits unimportant details.
Deep Modules – The best modules are deep, they provide powerful functionality yet have simple interfaces.
Shallow modules = Classitis = separate functions for everything.

Thoughts…surface area should be connected molecules. With dependencies being thickness of connections? Consider how refactoring would look visually as molecule changes. 

Chapter 5 – Information Hiding

Information leakage – (Opposite of hiding) is when a design decision is reflected in multiple modules creating a dependency.
Temporal Decomposition – When methods must be called in a particular order. Great to finally get a name for this.

Chapter 6 – General Purpose modules are Deeper

Counter-intuitively, “code that is more general purpose is simpler, cleaner and easier to understant.” (Thoughts: this took me years to realise and value!! See Iverson APL )
(Some) Generality leads to better information hiding.
Create general class then push specialization up or down to calling classes.

Chapter 7/8/9

Pass-through methods = Red Flag = No clean separation of responsibility.
Decorators e.g. the old java bufferedInput(FileInput()) is an example of this.
Repetition = Red Flag
Special / General code mix = Red Flag

Pg 61. The amount of complexity exposed to users should be related to number of users to number of developers.

Chapter 10 – Define errors out of existance

His example is unix vs window file deletion. Unix takes care of it in background. Windows refuses and says directory/file is blocked.
Example from my own experience is returning empty lists instead of nulls.

Chapter 11 – Design it twice

Consider multiple approaches, outline them and document pros/cons and which one was chosen and why. (I always do this and make the notes inline or bigger ones in an architecture file. Now that he mentions it I’ve never seen anyone else do this. Crazy they don’t! I guess it does happen in PRs but that’s too late)

Comments – Should describe something that isn’t obvious from the code. it should either be a lower or higher level than the code it’s at.

Pg116 Cross module contents = architecture decisions.  Thoughts: Should I create fake global variable and link cross comments using them. Ensure link stays valid.  

Chapter 14 – Naming
Chapter 15 – Write the comments first
Chapter 16 – Modifying existing code
Chapter 17 – Consistency – Great point!! I’ve learnt how important being consistent in a code base is over many years of pain. Even if the code is not optimal for that area, there’s value in it all being the same pattern everywhere! Only add new if willing to change all other similar parts.
Chapter 20 – Performance = Measure

New Sql Documentation Website

I’ve decided to create a new SQL documentation website for H2: sqldock.com/h2
Why?

  1. I was tired of scrolling the large page of functions to find the funciton I wanted. I also wanted examples of that funciton being used.
  2. For qStudio we provide tooltips that say what a function does AND links to actual vendor documentation. Well every so often vendors move those docs. By hosting it myself I can guarantee the doc link won’t be broken and that I won’t have to change links every other year. I can standardise the path and always send users there for docs.

Hopefully others find it useful. Let me know what you think.

Hibernate sucks but what’s the alternatives? Java Persistance Options

Everyone seems to jump straight to hibernate and not consider alternatives and when to use each. Let’s look at this afresh. We want to create a SAAS or self-hosted app and for any modified entites to be persisted. Entites being users, teams and widgets. Imagine something like a simple github json API server where users belong to a team, users or teams may have repos etc.

Typical Operations

  • Create a user/team.
  • Get a user and the list of teams they are linked to.
  • For a given widget, check if the user has access permission.
  • Keep database updated as new columns or tables are added.

Options:

  • Hibernate – Java Class Driven. Fully mapped objects, generate schema from objects, query everything through repositories i.e. hibernate layer.
  • Hibernate Hybrid – For most save items, update items use hibernate. For some complex or optimized selects use raw SQL with automapping to JSON where possible.
    • Automap requires either creating java classes and letting Object->JSON happen
    • Manual conversion / automatic resultset conversion.
  • Raw SQL – Thin Wrapper. Create database manually. Insert / Select writing raw SQL tables. Probably use a very thin wrapper that autoconverts resultsets to JSON.
  • JOOQ – Database Driven – Based on database generate type safe java access layers.
  • Blob Storage (Async) – Literally do not run any SQL commands. Only periodically save down all java state required. I mean you could even serialize everthing to one binary file. Or serialize large chunks and store them as strings to database.

Decision Pivot Points:

  • If SQL querying not needed and no relations within or no insight into inner data = Blob
  • If many standard CRUD operations over different entities = Hibernate
  • If many customized selects = JOOQ – to provide type checking.
  • Never RawSQL. You may as well use a very thin wrapper.
  • Other options? Write your own wrapper to persistance?

Outcome for me

Unfortunately we already adopted hibernate before giving it much thought. In hindsight we should have evaluated JOOQ as we have 2-3 entities which have modified SQL queries for half the operations.

Update:2023-11-23 I tried to convert parts of code base to JOOQ. JOOQ had lots of features and great docs on versioning, locking, storing, CRUD. The main parts lacking were nicer generted POJOs with primitives for “NOT NULL” and soft deletes. Without soft deletes I can’t use it as primary persistance only for SQL queries to be type safe.

These quotes captures my worry with Hibernate:
“John, I thought we were entering a new era of software development. I thought we were doing a light-year’s jump. But, after four years, it seems like we are still dealing with all the same problems, only from a different angle. I had to learn Hibernate architecture, configuration, logging, naming strat…………….ritance mappings, replicating object between two different datastores, detached objects and automatic versioning, connection release modes, stateless session interface, taxonomy of collection persistence, cache levels, lazy or eager fetching and many, many more. Even with everything I know, it seems like we’ve failed badly. It’s a software fiasco! Ultimate failure! Disaster! Armageddon!”
“so we decided to rewrite it as plain SQL statements. What’s funny is that writing plain SQL was actually the fastest way of doing it, so we decided to do it as our last option.”


I would suggest one idea, to use Blob storage for individual entires that you don’t need to “look inside”. There’s no point converting JSON to java objects to nested entities, if you never need to access those entities within Java. Just store the blob.

Podcast Notes

Podcasts I listen to:

Below I will make notes on specific podcasts and what I took away from them:

  • Idea to Startup – Find your wedge – You MUST be solving a bleeding neck problem else most people won’t care and won’t tell others.
  • AirPlane.devSaaS Club 370 – Very similar product to PulseUI. His elevator pitch at start is really slick.
    • About Pulse? What’s it do? Who’s it for? What’s the main problem it’s trying to solve?
    • Half the software in the world is internal tooling, for every line of code behind your favourite app, there’s another line powering internal platforms and operations.
      • Massively important to success of business
      • Chronically not invested in as nobody wants to work on these tools
    • Our goal is to make it faster to build software tooling for these businesses.
    • Founder fit – Will you be happy working on this for 10 years?
    • We are doing all the boring bits…for us it’s fun as we are doing it at scale.
    • “You could build thi syourself but do you really want to”
  • Lenny – Wise.comHow to drive word of mouth. Think this was good need to recheck.
  • Saastr – Loom – Building flywheel. Users didn’t know they could share URLS! they needed to add a share button.

The End of Open Source tech SAAS Companies?

I’m on quite a few slack channels and I got a message today on the radpanda/kafka slack:

Which if you follow to their website (Aiven):

  1. They describe themselves as: “The trusted open source data platform for everyone”
  2. They offer hosting on AWS/Azure/Google for all the new hip open source data technologies. Kafka, Flink, Influx, Redis.
  3. Under technology partners page, all their partners are hosting firms.
  4. They are not partnered with any of the firms that build the software. None of the management team has worked on or in open source.

For end consumers this is good, get reliable hosting from a “big firm” that supplies many other systems that you may use. For bigtech it’s a win as it will be hosted on their cloud. For startup/tech companies this is deadly. Why would anyone wait to host on their platform?

This feels like the next evolution of the spat between technology companies and bigtech aka google/amazon. Previous disagreements have forced some technology companies/startups to change away from open source licensing e.g. Elastic but the big guys also received bad press for doing it. Now with an smaller intermediary party, the bad press has only a positive effect in advertising them more.

Half the work in building a new SAAS offering is building and supporting the general platform, user logins, system backup, recovery etc. If this middle company spreads that cost over multiple offerings and doesn’t pay to contribute any open source back, they can supply it faster and cheaper short term.

As I look at startups or new tech companies like questdb, redpanda, timeplus, materialize, redis, superset, clickhouse….if a company like this starts offering their tech early I think they could get a lot, if not most the business while the other company pays the cost of development. In some cases as we seen they are on the open source slack channel engaging customers away….

What do you think?