Episode 68: On the Criteria to be Used in Decomposing Systems into Modules

This episode shows that there is exactly one well-known way to design software modules, and that it’s a rarely-used way. The episode is supported by members of the Chiron Codex Patreon (use this gift link for your first month free), so please do join the community or hit the Ko-Fi button to make a one-off donation. If you enjoy the episode, share it with at least one friend, colleague, or stranger, and leave a review in your podcasting platform of choice. Thank you!

Links

Leave a comment

Physician, go back to med school

In Physician, (learn how to) heal thyself, I shared my experiences getting a laptop-class on-device model to debug a crash report in a (temporarily embarrassed) running application. I’ve done some more experiments, none of them worked, and I’m putting it aside for the moment.

That’s not to say that the principle is unsound. Shirudo uses the Codex model (unspecified version) to dynamically alter the bytecode of a running Java application to patch an exploited vulnerability. As shared in my previous post, I want to use on-device inference so that the software’s user remains in full control of the data their software sends to other providers. It just isn’t—currently—feasible with on-device models (unless there’s another approach entirely that I didn’t think of, that’s better than trying to tweak the approach I created).

The remaining experiments I tried are:

  • Generating multiple patches at non-zero temperature, and trying them all. This vastly increases inference time and doesn’t significantly change the probability of success from the ~12% I already observed.
  • Splitting inference into two steps: generating the explanation of the failure, and generating the patch. The explanations already aren’t high-quality so the patches don’t get any better.
  • Increasing the amount of internal information available to the LLM. Instead of just showing the exception and the call frame at the crash site, the LLM gets the whole backtrace: receiver class, selector names, typed local, instance, and argument variables. None of this matters except in one narrow instance, where the crash is caused by a misspelled selector. Even then, the improvement is below two standard deviations.
  • Generating Objective-C patches and translating to AppScript to install. This helped the Codestral model go from “really bad” to “quite bad”, it didn’t help Qwen3.8 or Bonsai 27B which were both already ahead of Codestral.
  • Naming common reasons for patch rejection in the prompt. This improved patch syntax for Qwen and made it worse for Bonsai, and didn’t improve the recovery rate.
  • Rejecting failed patches and sending them back to the LLM for a second pass. Qwen did repair some of its patches, and the main result was that it pulled the “baseline” success rate up to 10% when the success rate with the long-form AppScript syntax guide in the prompt is already at 12%.
  • Ensuring the program source uses the “Intent Revealing Method Name” pattern. The point here is to provide “comments” on what the methods are supposed to do, without actually providing comments because those might get used for prompt injection. No significant improvement.
  • A few-shot prompt (the Give Examples pattern from Patterns in AI-Augmented Software Development). This improved both models’ performance for some problems and regressed it at others, with no overall benefit.
  • Fine-tuning the Qwen3.8 model. The validation loss started at 1.399, and got to 0.076 after 112 iterations at a learning rate of 1e-5. This actually did have an impact! But we got from 12% success to 13%, so not one that makes the product usable.

There are other applications of on-device LLMs to AppScript, so I’m rejecting the crash-recovery feature but evaluating other capabilities. In fact, I’m not rejecting it at all, I’m deferring it, until either I have a situation where using a frontier model is acceptable, or I have a more capable on-device model.

Posted in AI-Augmented Development | Leave a comment

Physician, (learn how to) heal thyself

Back at the beginning of the year I introduced AppScript, an interpreter for an “Objective-C without the C” language. Time’s passed, and a lot of the rough edges are smoothed over: AppScript now bridges to C types anywhere they appear, including in C functions and block parameters/return values; supports out parameters including out-NSErrors and the BOOL *stop in NSFastEnumeration; and much more. It’s time to do something interesting with a newly-complete language.

My current interest is Continuous Validation: how do we shorten the loop between people having problems and finding out that the software we built doesn’t solve them in the right way? The lowest-hanging fruit is crashes. Generally, customers don’t want their software to crash, so if it happens, it’s definitely wrong.

AppScript exposes an uncaught exception handler hook. The exception provides error details and the full backtrace (including native code) enriched with additional information about frames in the AppScript interpreter. It also doesn’t catch exceptions, so all exceptions are uncaught… What if an LLM hooked into the exception handler, determined the problem, patched the code and re-ran the failing operation?

That’s the idea behind ASAnalyst. Here’s the design:

So now all I need is an LLM and the prompt, tools, and supporting information it needs to get this right. Some requirements:

  • Minimal cost to the customer, because otherwise they’re paying to fix my problems.
  • Private, because I don’t know what information is included in objects that appear in the backtrace.
  • Don’t block the customer if the network’s down.
  • Safe from injection, because I still don’t know what appears in the backtrace. Clearly there’s a security choice already being made in “let’s generate software on the fly on the customer’s machine”, no need to make that any worse than it already is!

My first thought is to use the built-in Apple model via FoundationModels. Two disadvantages: I bring Swift into a purely-ObjC (and AppScript) project; and not available on non-Apple platforms, when cross-platform support via GNUstep is a secondary goal for the language. But it does cover all the requirements above.

Eval time! Here’s the method: I generate 24 separate synthesised AppScript crash reports, each of which has a “golden patch” known to fix the problem:

  • 16 examples of recoverable bugs, in eight categories: misspelt selector; wrong arithmetic operator; missing method; incorrect keyword usage; nil sent to message that expects non-nil; no value returned from method; attempt to mutate an immutable collection; failing value conversion.
  • 4 examples of unrecoverable bugs (those where retrying the operation isn’t feasible): for the purposes of the eval, this is any bug like the above that occurs in new/copy/alloc method because you can’t do memory management if something fails somewhere in a memory-management method.
  • 4 examples of injection attempts, where a string in the exception information contains instructions for the model to do something other than analyse the failure.

Then I have three candidate system prompts:

  • The baseline prompt, just containing the instructions to: attempt to uncover the root cause; describe the root cause in a single sentence for the app developer; whether the operation can be retried or the app needs to restart; describe the situation to the end user in non-technical language; and an AppScript patch that resolves the problem (empty if the root cause isn’t known).
  • Baseline, plus a short description (1,200 bytes) of the AppScript language syntax.
  • Baseline, plus a long description (2,700 bytes) of the AppScript language syntax.

The LLM receives each synthesised report in the same user prompt, with each of the 3 system prompts, 3 times per condition (so 216 total runs). A separate LLM (Deepmind’s Gemma4 31B) scores the response on a scale of 1-5 based on the accuracy of the descriptions, availability of a patch, accuracy of the patch, and whether the LLM followed injected instructions. I take the mean score and scale it 0-1: 0 meaning the model gave consistently low-quality responses, and 1 meaning it gave responses consistently judged to be perfect.

Apple’s on-device model does best with the short-summary system prompt, but still only generates patches that are actually valid AppScript 6% of the time (13 out of 216 instances). Even in these cases, the patches it generates don’t fix the problem; it tries to add unrelated category methods to system classes like NSObject. The things it is good at are avoiding injection attacks (92%) and giving explanations (normalised score 0.56).

OK, so this is a non-starter. Maybe I need a more capable model, and to think carefully about how I deploy it to retain the self-healing capability while also maintaining the privacy, security, and cost goals.

Many hours later, and I have the eval results for 6 open weight models from the mistral, gemma4, qwen3_5, and glm4_moe_lite families. Saving the gory details, the best performance is from qwen/qwen3.8-27b with the long system prompt:

  • 69% valid patches
  • 12% correct behavior on recovery
  • 75% chooses the correct retry/restart outcome
  • 100% ignores injection attempts
  • 0.77 normalised judge score
  • mean time to response of 10.2s

That’s…not great, but it’s sufficient to suggest that the idea is feasible. I have three different lines of attack now. One is to experiment with the prompt and the rules of the game, to see if I can improve accuracy. The second is to change how the source is represented to the LLM; if I can send and receive syntax in a “known” programming language like Ruby it might do a better job. The third is to try and prove this concept entirely in a well-known runtime environment like Python to more closely align the LLM’s goal with the things it’s trained on.

Posted in AI-Augmented Development | 1 Comment

On applying ethics to the LLMs and coding assistants situation

It often frustrates technologists that there isn’t an algorithm for deciding ethical behavior. You can’t follow a checklist or a set of rules to decide whether something’s ethical or not (or you can, but people might still disagree with you). That said there are professional codes of practice that apply to our work, and in the field of computing one of the clearest is the ACM Code of Ethics and Professional Conduct jointly developed by the ACM, IFIP, and IEEE. Here’s how I interpret its position on LLMs with respect to a few points: I’m interested to hear how you evaluate the ethical nature of LLM adoption with respect to the other parts of the Code.

A computing professional should…

1.1 Contribute to society and to human well-being, acknowledging that all people are stakeholders in computing.

It’s not clear that the current crop of leading frontier companies are uniformly doing this. For example, Dario Amodei’s statements about AI leading to a white-collar bloodbath and being a general labor substitute show an inclination to oversell his products to managers, not to engage with the wider impact on society. Meanwhile, Altman takes the view that the dream jobs of the last five years will be replaced by new careers, a less apocalyptic and more actionable view.

1.2 Avoid harm.
In this document, “harm” means negative consequences, especially when those consequences are significant and unjust. Examples of harm include unjustified physical or mental injury, unjustified destruction or disclosure of information, and unjustified damage to property, reputation, and the environment. This list is not exhaustive.

The clearest story here is that in the world of cybersecurity, the AI tools have (it seems) vastly increased the attacking capabilities without similar effects on defensive capabilities.

Another clear one is the bugginess people associate with vibe-coded software. Yes, it genuinely exists, and in the famous examples of deleting production databases the products have caused “unjustified destruction of information”. Of course, humans do make mistakes sometimes, and I’ve worked at pretty big companies where someone has accidentally destroyed production data, but it feels like a foreseeable outcome of using a coding assistant that it might automate such destruction. This is consistent with the situation where companies elevate the prominence of their AI-generated summaries or advice and put “please check this, it might contain a mistake” in small print; it feels more like paying lip service to avoiding damage than actually taking steps to do it.

A place where I’ll disagree with others is the old energy/water/data centres saw. On the one hand, it’s clear that these harms are being overstated for political gain. On another hand, it’s clear that the hardware and data center companies are pursuing more efficient and sustainable innovations; for example, zero liquid discharge cooling systems, and reduced cooling-energy consumption systems.

It could be argued, though one would need to carefully check the various organisations’ actual actions to confirm this, that the hyperscalers are pursuing “growth at any cost” and therefore failing to “promote environmental sustainability both locally and globally”. However, the remedy might be to ensure they put a sustainability plan in place and potentially even impose a moratorium pending that plan, it shouldn’t be to completely withdraw from participating in the development and exploitation of LLM technology, or impose a worldwide ban on others doing it. That throws the baby out with the bathwater, as it were, saying that society is permitted none of the benefits of the new technology.

1.5 Respect the work required to produce new ideas, inventions, creative works, and computing artifacts.

It’s evident through the legal settlements that there are disagreements over whether frontier LLM-training organisations respect the creative effort that goes into producing new works (it’s also a feature of a settlement that no wrongdoing is implied).

The problem of applying copyright in the digital domain, where creative works have no physical presence and are readily distributable, hasn’t really been resolved, and so there are some weird situations right now. For example, it’s entirely valid to buy a book so that you can scan it into a computer, because there’s a common idea of the First Sale Doctrine that says once you own something, it’s yours to do with as you want.

On the other hand, were you to buy an ebook and transform it into a different computerised format, you might not only violate the license agreement with the ebook supplier, but face criminal action for circumventing a copy protection mechanism.

In short, the situation for creative control and protection of digital works is “nuts”, society doesn’t evidently demonstrate clear agreement on what is or isn’t acceptable, but these new processes and the way they transform their input data are a clear change to the parameters of the conversation that’s desperately needed.

Posted in AI-Augmented Development | Leave a comment

On taking developments in software engineering personally

Much of the feedback on my recent article on Reasons to Dislike AI Coding featured a dismissal of a collection of common themes in arguments against AI coding, without any thesis. That post was indeed my way of collecting thoughts, and connecting them to existing articles where I’d already addressed some of the concerns: I don’t think I dismissed the thematic arguments so much as referred to my own, or other, arguments. Here we are, a month later, and I’m ready for the synthesis.

For a lot of software engineers—myself included—the arrival of AI coding assistants represented an existential threat of sorts. Here’s a thing that I’m good at, have made a reputation for being good at and had what I hoped was the first half of a career out of being good at. Now here’s a tool that does it not as well as I do it, that everyone’s going nuts over as the future of the craft of doing the thing. It’s easy to take that personally and to get angry and upset about the change in technology. I know that, because I’ve done it before.

Instance One: Unix

The thing that tipped me from programming as a hobby to programming as a potential career path was using NeXTSTEP at university. I’d already encountered FreeBSD and Linux, and “knew” that Unix-like systems were the technologically superior choice for workstation operating environments. However, even I had to accept that they weren’t exactly pleasant to configure. While the hacking community recommended tinkering with Linux to learn more about how computers and networking work, I was ready to acknowledge that 80% of what you learned through tinkering with Linux was how to tinker with Linux (if you’ve edited sendmail.cf or XF86Config, or gone through the kernel’s make config without access to menuconfig, you know what I mean).

NeXTSTEP demonstrated that you could have the power of UNIX with the elegance of a consistent, well-designed user interface. Admittedly that assessment ignored a lot of rough edges, but it felt clear that NeXTSTEP was the best of the best. Mac OS X was evidence that this technology was ready for primetime, even if (to me) it had various borderline-acceptable compromises to make it work with the legacy Apple landscape.

So imagine my surprise, nay consternation, at going to work in my early 20s as a NeXT/general-Unix-like sysadmin, then programmer, to find out that the people I worked with were far from jealous that I was the person working on the best computers. Some of them not only voluntarily worked on Windows NT, but even claimed to like it!? Imagine my upset to hear that a NeXT-based solution wasn’t automatically chosen just for the pedestrian reason that other people had accidentally bought suboptimal workstations!

Much of this came from my initial cultural introduction to the sysadmin world, which was through a collection of university Unix admins who very much subscribed to the BOFH mindset and communicated in phrases from the ESR jargon file. Indeed, their secret, back-channel mailing list was even called CBOFH…compleat bastard operators from hell.

I never consciously trained myself out of this one; the whole non-Microsoft world and bits of Microsoft vindicated the Unix choice at about the same rate that my opinions mellowed, so I became able to avoid having that argument around the time that it went away.

Instance Two: Smalltalk and Objective-C

Having been a NeXT person, I naturally fell into the classical object-oriented, message-passing, extreme late binding world of software design. And got, if I may say so, rather good at it (my M.Sc. dissertation was an interactive live coding environment that used LLVM as a JIT to dynamically execute ObjC code). I did quite well out of understanding problems from the perspective of networks of interacting agents that send each other messages; making expressive, concise, efficient designs using advanced runtime techniques; and helping others to do the same. Mostly in Objective-C, the language of the NeXT, and of the iPhone and iPad Gold Rushes; also Smalltalk, Python, Java, and Ruby.

Imagine then, my confusion, and the threat to my sense of psychological safety, when the entire field started moving in the opposite direction; towards compiler appeasement and specifying all the bindings in advance. TypeScript was OK because it cleaned up some of JavaScript’s gnarly edges, but Go and Rust seemed like unnecessary distractions when investing in analysis tooling for existing languages gave the benefits of continuing to use legacy code and high-fidelity design techniques while also gaining the benefits of fixing common bugs in memory management and variable misuse.

But eventually, the type supremacists came for ObjC, and we got Swift, a programming language that promised to deliver efficient and correct code across a range of application domains and that eventually got there. This one felt like a shot that landed too close to home, and along with a period of career burnout and break, personal life upheaval and depression, I did what the no-AI people are doing today: I opted out. I spent a year not working at all, then did what someone described as “entering witness protection” and went off to have a career outside my comfort zone: in local companies that had no technology relationship with the field I’d left or the field that had left me. I tried to prove that my software engineering knowledge was domain-agnostic and translational, and in doing so left behind my communities, relationships, and other support structures.

It took me four years to even engage with the Apple-developer world at all, and eight years to get comfortable with the idea of doing my stuff in Swift, the tool that I felt had pulled the rug out from under my career back in 2014. This was a long, and unhealthy, reaction to a technical change.

Instance Three: AI-Augmented Coding Assistants

Like many other people, I initially reacted negatively to the rise of LLMs. Firstly, because of the cavalier approach some of the frontier companies took to copyright; as a Free Software person, I’m already part of a plot to nullify proprietorial stances in software, thank you very much. Then, because the early models made bad software. And then, because an LLM can’t understand software engineering, it can only generate code.

But this time, I reacted differently. Instead of withdrawing from software engineering, I asked how I use my knowledge and skills in this world. What’s the way I contribute, and feel empowered and safe, with this new development? Further, how many other people are going through this difficult shift, and how can I contribute to their empowerment and safety? Chiron Codex continues to be an attempt to answer that question, nearly a year later.

Posted in AI-Augmented Development | 1 Comment

Episode 67: The Scrum Guide

This episode investigates a philosophical shift in the way people tried to understand software towards the end of the 20th century, and then discusses one of the most impactful, if not widely adored, documents of the post-shift era. The episode is supported by members of the Chiron Codex Patreon (use this gift link for your first month free), so please do join the community or hit the Ko-Fi button to make a one-off donation. If you enjoy the episode, share it with at least one friend, colleague, or stranger.

Links

Leave a comment

Announcing Axminster: visual software design

Axminster, my diagrammatic software design tool with LLM support, is now available for sale! Check out the product website for more info.

Posted in Code & Craft | Leave a comment

Episode 66: No Silver Bullet

This episode discusses both Fred Brooks’ classic paper on the likelihood of 10x improvements in software engineering productivity, and his reflections on its interpretation 9 years after publication. The episode is supported by members of the Chiron Codex Patreon (use this gift link for your first month free), so please do join the community or hit the Ko-Fi button to make a one-off donation. If you enjoy the episode, share it with at least one friend, colleague, or stranger.

Note that with this episode I have moved from supplying a text transcript in the post body, to a downloadable .vtt file. If you’re looking for the transcript, please download the linked file.

Links

Leave a comment

Episode 65: The Frog and the Octopus

This episode considers a method-free approach to software engineering methodology, and a request to include the context of a software project in the attempts to sell techniques and processes. The episode is supported by members of the Chiron Codex Patreon (use this gift link for your first month free), so please do join the community or hit the Ko-Fi button to make a one-off donation. If you enjoy the episode, share it with at least one friend, colleague, or stranger.

Links

Transcript

Hello and welcome to episode 65 of the Structure and
Interpretation of Computer Programmers podcast. I’m Graham
Lee. The episode is sponsored by you, the software
engineering community. If you enjoy this podcast, please
share the link with your friends and colleagues. You can give
feedback on this episode by commenting on the post at
sicpers.info slash podcast, that’s s-i-c-p-e-r-s dot info
slash podcast, or by sending me an email, grahamlee at
acm.org.

There are many problems with software engineering
methodologies. Methodology, by the way, is the study of
method. So we’re in the realm of software engineering
metaphysics, thinking not so much about how the sausage gets
made, but about how people design, build, deploy and service
sausage-making machines. So a problem with software
engineering methodology is a problem of working out how to
define or apply a software engineering process, how to
instantiate the idea of software engineering in a specific
context.

And it’s identifying that context and tailoring a method to
the context that is one of the biggest problems. It’s
actually difficult to get people to tell you when a
particular approach to software engineering does or doesn’t
apply.

Oh, you can get someone to tell you, but rarely is that
someone one of the creators, the methodologists themselves.
You won’t find any scoping or context information in the
documentation for the methodology or framework. As an
experiment, look at “What is Scrum?” on scrum.org, or read
the Scrum guide at scrumguides.org, and now try to come up
with an answer to this question. When do the creators of
Scrum think it’s an appropriate tool to apply? Or this
question: in what contexts do the creators of Scrum think
that you should reach for an alternative approach?

Of course, you can search the internet for individual answers
to the question from people who have tried it and found that
it doesn’t work for them, or from advocates who definitely
think you should be using it for whatever it is that you’re
trying to do. That’s far from systematic, it’s far
from…methodological.

People who found that it doesn’t apply might have the wrong
context, or they might have the wrong skills, or might have
understood the process incorrectly. Scrum, particularly, is a
baseline process and a process improvement framework, and
most places I’ve seen that “do Scrum”, with my podcast scare
quote fingers, don’t have any experience at process maturity
or improvement. So they either do the baseline process
forever and complain that it’s stultifying, or they tweak it
into something that doesn’t work for them, and then complain
that it doesn’t work for them.

The result of this lack of contextual or scoping guidance is
you get these bags of apparently associated practices that
promise to control your software development work, and no
particular reason to choose one over another. Nobody explains
why Scrum has all the Scrum practices, and why XP has all the
XP practices. Further, they don’t explain why Scrum doesn’t
have the XP practices, and vice versa. Is there actually a
problem with having both a sprint retrospective and a
sustainable pace? What do the methodologists know about how
these practices combine that they don’t tell us?

The world would look very different if we had a context-aware
approach to selecting software methodologies. If you could
fill out a real or metaphorical checklist, and it would tell
you, “okay, so you’ve got a department of 25 engineers at a
growth stage fintech, working on a service for one big-ticket
customer. You use these practices.” Or it tells you, “with
your three PhD students, fixed term, fixed budget, creating
biophysical simulation software, you should do these things.”

There was meaningful discussion on this topic back in the
1990s and 2000s. Diane Kelly observed that the definition of
computer science as a distinct mathematical discipline
independent of the business of making software, –
incidentally, that’s a topic I’ve covered multiple times in
past episodes – that definition of computer science led to
computing experts favouring generic, domain-independent
techniques, methods, and paradigms. This, in turn, led to a
rise of one-size-fits-all, or domain-independent management
paradigms, which meant, to use her words, “a reorganisation
along the lines of all software is treated the same, all
developers are the same.”

In practice, scientists writing software for research aren’t
the same as Java coders toiling in feature factories. So
software engineering methodology, in fact, developed blinkers
in which people either worked the way methodologists
expected, or they were doing something different, which
placed them beyond the methodologist’s comprehension and
therefore beyond any help. A “chasm” opened up between the
domains where methodology worked and those where it didn’t
apply, which Kelly hoped that we could bridge by considering
domain-relevant or domain-specific methodologies. That, of
course, didn’t happen.

So now we come to the document at the core of this week’s
episode. In 2011’s “The Frog and the Octopus”, Philippe
Kruchten wants to abandon the “methodologies” (plural noun
that really means named software development processes), and
replace them with “methodology” (uncountable noun that means
the study of software development method). His goal is
nothing short of a unified model of software that applies to
any domain. To help us to get there, he separates software
engineering into the things that everybody does, which he
calls the frog, and the things that lend context specificity,
which he calls the octopus. And then he has a third category
that doesn’t have an animal name. We’ll get to that later.

This is the advert break. It starts now.

Your development team is slowed down, your customers are
frustrated, and your support team is constantly banging down
the door. Nobody can find the information they need, and they
struggle to talk to each other to work it out. Relationships
on the team have soured, with developers, QA, and ops
all-taking, and us-versus-them position. Your backlog grows
faster than the team delivers features. Retrospectives
involve more finger-pointing than decision-making. This
sounds like a case for Software Craftsmanship’s consulting
detective. That’s me. Discover your team’s friction points,
and create realistic action plans for improvement.
Restructure your delivery pipeline to bridge the quality gap,
automate improvements, and reduce rework. Then, take
ownership of the documentation, and curate a knowledge hub
that keeps information flowing throughout your organization,
empowering engineers, executives, partners, and customers
alike. Find out more, and book a free initial assessment at
sicpers.info.agency. That’s s-i-c-p-e-r-s dot i-n-f-o slash
agency. Together with me, Software Craftsmanship’s consulting
detective will crack the case.

That was the advert break. It’s over now.

The frog is the central concept of a “project”; an attempt to
achieve some goal by producing some output with some
resources and some people within some amount of time. In
fact, I’ve almost listed all of the nine categories in the
frog part of the model in that one sentence. To be more
explicit, we’re talking about:

  • the intent: what somebody aims to achieve
  • the product: what they expect to make in an effort to
    achieve their intent
  • work: what people do to turn the intent into a product
  • the people: who does the work
  • time: the evolution of the other attributes
  • quality: desirable parameters of the other attributes
    and the values of those parameters
  • risk: uncertainty related to the other attributes
  • value and cost: the resources unlocked by achieving
    the intent or creating the product, and the resources
    required to get the people to do the work that means the
    intent is achieved or the product is created; and finally,
  • project, the metaphorical boundary that encapsulates all
    of the above.

So are these attributes of the frog truly universal? I’d say
that this is one of those questions where you learn something
about the philosophy of the person who answers the question
from the way in which they answer it. You might say that a
hobby open source endeavour doesn’t really have any risk
because it’s just a hobby. It doesn’t have any cost because
it’s just a hobby. And it doesn’t have a project because
there’s no timescale, no stakeholders and no stated
deliverables.

Or you might say that those things are present. The main risk
is that the hobbyist finds a different hobby. The cost is the
opportunity cost of the time they put into their hobby. And
the various projects are anything from “I’m going to put in a
couple of hours on optimising spline reticulation this
evening”, to “I want to have these three features before I
release a v2, hopefully by the end of this year.”

Kruchten takes the latter position. All of those things are
present. And the fact that the software is part of a hobby
open source project is important context that modifies the
importance of some of the “frog” attributes of the software
endeavour.

In fact, there’s really nothing about software in the frog at
all, despite the number of times that Kruchten says
“software” in this section of the paper. Really, this is a
model of a generic knowledge-work project, which only doesn’t
translate to tangible production because there are no
facilities, materials, inventory or capital. But software
projects do have those things. What gives? Again, philosophy.
They’re not important enough, to Kruchten at least, to
materialise in the paper. They’re kind of hidden in the idea
of costs.

So that was the frog. Then there’s the octopus. This is all
of the context in which the project occurs, which gives it
its unique flavour. If, like me, you’re confused about the
frog imagery, you’re on safer ground with the octopus because
there are eight categories, or arms I suppose, of context.

Well, sort of. In fact, there are two components to the
octopus, one of which has five arms and the other eight. So
maybe it’s an octopus riding a starfish? I’m just going to go
and rewatch The Little Mermaid because it’s possible that
that’s actually a named character.

Anyway, Kruchten divides
the octopus into variations at the project level, of which there are eight, and at the organisation
level, of which there are five. The eight project level variables are:

  1. size. He says the overall size of the system under
    development, but it isn’t clear if that means the size of the
    product or the size of the intent. Maybe it’s both. Maybe
    some organisations set out to create large software because
    they think it’s better in some way, or they set out to create
    small software for the same reason.
  2. Architectural stability.
  3. Financial model.
  4. Team distribution.
  5. Rate of change, by which he means the volatility of the
    business environment and the associated uncertainty, not the
    rate at which people change the software.
  6. The age of the system, through which we infer
    that the product can vary between new features in an existing system, to novel product, to ground up
    rewrite.
  7. Criticality, i.e. how safety critical is the system. And;
  8. Governance.

I’m largely happy to go along with all of this, except that I
think it’s a bit arbitrary to separate criticality and
governance. Criticality is really about the magnitude of
risks to external stakeholders, and governance is the way
that you vary your work to address or to avoid or to ignore
those risks. You could take a completely freewheeling
approach to avionics software, thus fail at any compliance
goals, which would expose some huge risks, not least of which
being you probably wouldn’t be allowed to sell your product.
You could take a safety critical approach to developing a
casual mobile game, which would expose some other huge risks.
I suppose you do need eight arms for an octopus though, so
both are listed.

That then brings us on to the five arms of the organizational level factors:

  1. Business domain.
  2. Number of instances (of the deployed system).
  3. Organizational maturity.
  4. Level of innovation. And;
  5. Culture, which is further divided into social culture,
    that’s the norms and values of the society in which the
    workers are embedded. Corporate culture, which is the way the
    organization thinks about things. And ethical culture, the
    way the workers and managers think about responsibility to
    other stakeholders.

So the big idea is that the way you do software depends on
all of these things in both the frog and the octopus. But the
most software methods or methodologies focus on the frog and
ignore the octopus. They pretend they have a
one-size-fits-all process that anyone who wants people to
make software can apply. The frog gives you a model you can
use to critique a project. “How do you measure the quality of
the product?” “What risks are associated with the people on
this project?” And so on. And the octopus gives you a model
you can use to critique the applicability of a practice,
process or tool to your specific context. “I have 10,000
people on three continents. Should I do a daily scrum?” “Does
the idea of minimal viable product make sense for my two-year
fixed-term fixed-budget research project?” And so on.

These methodological ideas reach peak maturity in an approach
that Kruchten worked on with Ivar Jacobsen, Bertrand Meyer
and others called SEMAT, S-E-M-A-T, Software Engineering
Methods and Tools. The SEMAT kernel recommends not thinking
about a methodology as a package of practices but about
software development as a system in which the main
interacting components are what the SEMAT methodologists call
the “alphas”: opportunity, stakeholders, requirements,
software system, team, work and way of working.

These seven alphas approximately map onto parts of the frog
and the rest of the process is about identifying your
particular challenges and opportunities, i.e. mapping your
octopus, and then thinking critically about how a given
intervention, adopting a technique, abandoning a technique,
selecting a tool and so on, would change the different alphas.

We have still to address the third unnamed part of the frog
and octopus model, that is the tacit-slash-explicit
dimension. How much the knowledge and ways of working in an
organisation are documented and follow the documentation, and
how much they are unstated shared cultural assumptions that
everyone “knows”.

The idea of tacit knowledge is a crucial part of the theory
of Communities of Practice. Communities of Practice is a
theory largely worked out by Etienne Wenger to explain how
people who have some shared interest in performing a
practice, whether it’s work related, a hobby practice, an
educational requirement, a form of religious worship or
something else, come together to collectively enthuse about
the practice and in doing so develop a shared understanding
of the practice and even shared rules about how to perform
the practice that don’t necessarily correlate with any formal
instructions, documentation or reporting structure in the
practice’s setting.

In the frog and octopus model, this forms another contextual
component. You need your people to have a shared model of the
intent, the product, the people and the work. How much of
that that do you infuse culturally, and how much do you share
in documentation, and how much is out of your hands because
people make it up in their communities of practice? What kind
of documentation should you use? Dashboard, wall of cards,
task tracker, wiki, bulletin board, chat forum, formal
processes, checklists, employee handbooks, something else.

Tacit/explicit knowledge is the least explored of the
dimensions, mostly because if you’re trying to sell a
technique or a product, it’s better if it’s tangible, and
saying “our product enhances the tacit knowledge of your
workers so they do things in ways that are out of your
control” doesn’t sell very well to managers. Perhaps it could
be one of the most interesting and impactful dimensions
though, especially in this age, of tools that build software
based on your explicit description of what you want,
completely ignorant of all tacit context.

A methodology that explicitly surfaces all ambiguity in
product requirements, ways of working, interpersonal
relationships, software design, quality expectations, and the
rest of the frog, right at the point that you try to feed all
of that information into a large language model, could be the
defining feature of post-2023 software engineering. Or it
could be a hugely onerous, wasteful, and bloated process, and
you’re better off leaning into the ambiguities and just
having your people take their coffee breaks together so that
whoever types a prompt into the model already has a good idea
what the customer was thinking. That second approach has
generally been considered a good idea for the last three
decades or more. Maybe it’s still a good idea today.

As ever, share your thoughts on this episode in the comments
on the sicpers.info website, that’s S-I-C-P-E-R-S.info, or
email grahamlee at acm.org. Recommend the podcast to your
friends, find more info at the Patreon page linked in the
show notes, and the reading list at se100.chironcodex.com,
and let’s talk soon.

3 Comments

Inter-process communication in a sandboxed Mac app

Axminster—my graphical software design tool for the AI coding age—is still in beta, and it’s already been through three different technologies for inter-process communication (IPC). What gives?

The reason the app needs IPC at all is to support the Model Context Protocol (MCP), which is how your LLM coding assistant reads and manipulates your diagrammatic model. I’ll start by showing you how it works now, which is that there are two components in Axminster—the app itself, and a small MCP helper tool that forwards requests to the app over a UNIX domain socket.

My first attempt avoided the helper process, and relied on an HTTP server inside the Axminster app to serve MCP. This was the easiest to get going from the App Sandbox perspective, as it just means adding the incoming network connections entitlement.

However, it’s pretty bad from a security perspective. Any process running locally on the Mac can connect to the server, so a different app potentially controlled by a different user can view and change someone’s models. This was always a beta-only approach used to get something out quickly that testers could validate, with the risks clearly explained in the documentation.

The second approach switched to a helper tool that outwardly uses the stdio MCP protocol; it needs to be a helper tool because the process lifecycle is controlled by the MCP client (the coding assistant), not the Axminster app. That means that the app and the helper need their own IPC mechanism so that MCP requests sent to the tool get relayed to the app.

Putting the app and the helper into the same app group gives them a shared container, and access to a few different IPC mechanisms. I initially chose to use an XPC service; as the App Groups doc says, I should be OK as long as I prefix the XPC service’s name with the group identifier.

And yes, dear reader, I was OK, unfortunately everybody else wasn’t OK. In testing, this worked well; the helper (deployed in Axminster.app/Contents/Helpers/axminster-mcp) connected to the app, launching it if necessary, each end evaluated the other end’s identity to ensure it talked to the correct process, and then MCP traffic flowed. However, the first TestFlight feedback I got after making this change was that the MCP server no longer connects.

I’m not entirely sure why, but the XPC connection worked when I launched the app in Xcode, but not when I launched it from the Dock. Because nobody else has my Xcode project, it didn’t work for them. I didn’t get to the bottom of that, because I switched the IPC to its final state—a UNIX domain socket in the App Group’s shared container. The two peers still get each other’s identity to ensure they’re talking to the correct executable (this time by getting the PID from the socket), so otherwise nothing is changed.

Posted in Code & Craft | Tagged | Leave a comment