Just One More Prompt

Why do drug dealers and software companies both call their customers “users”?

Not all of us have been enamored with the token spewing monster that has taken over the entire discourse around “productivity”. I’ll admit that I’ve been waffling between the idea that “it’s so over” and “we’re so back” around generative artificial intelligence (GENAI). This will be a pseudo-scientific post on my current feelings and that I really do think we are approaching the limits of our current methods.

I am thankful to the HTMX discord community which has pushed back completely on vibe coding. I still think it might have its place, but I think in this post I hopefully will lay out a few reasons why I am bearish on this topic.

Whomever is telling you to not learn to code now… don’t listen to them. I am still putting in my reps daily on https://executeprogram.com! When I first demoed “vibe coding” to my wife and I thought this was the future of coding her words brought me right back to reality. I was mouthing that ‘oh it’s trying to do this’ I’ll need to prompt it to do this instead cause I _KNOW_ better.

“Oh, this is only for people who already know how to program…”

My wife

I think it is important to note that I am a “classically trained” computer engineer. I was fortunate to do my undergraduate degree at a solid school that still taught the C programming language. This was about a decade ago and after spending many years in industry, I’m finishing up a masters degree also in engineering. This being said, my dad taught me how to program in BASIC when I was 11 years old (I’m now 42).

I learned how to program before stack overflow, and I was exposed to all the fads and trends around rapid application development (RAD) and Agile methods. Let’s just say I’m a bit surprised the current fad of vibe coding took over my lizard brain and I was enthralled.

Original meme I shitposted on LinkedIn bastardizing the ikagai

This post is largely a penance around this hype wave I feel I added energy to. Let’s just go ahead and get started why I believe we are hitting the wall. I was waiting for this moment:

OpenAI famously only trains on your inputs/outputs to its system if you don’t pay them. Anthropic (Claude) said it never trained on your chats. I figured this was mostly a temporal thing. They could always revise their terms of service and do whatever they want. They increased their data retention policy also in this announcement to 5 years… How can they safely incorporate my chats into its training corpus!? The fact that I have to opt-out is interesting and I don’t believe everyone who clicks “agree” fully understands what this implies.

Revisiting how LLMs and Agents Work

The large unlock in the modern “Transformer” era was the fact that we could now do sequence to sequence translation for the equivalent of paragraphs of text. This is a very very hard problem and as the size of input increased it seemed impossible to scale with traditional approaches. This all changed with a simple training method of forcing the machine to predict the next word or token with a self-attention mechanism. The fact that it could translate between arbitrary domains was an incredible emergence of “intelligence”.

Slide from my Agents talk

This idea of knowledge compression is great and it shows that something is definitely happening in the “latent space” between your prompt and the AI’s output. Because we are training only on language and predicting the next token or word. Let us just say this is not a thinking or reasoning being. It is a really great parlor trick. In some contexts I believe it is a net positive, but it can be detrimental in others. It is a bit Orwellian to say this is thinking or reasoning. As you can see in the video no matter what people tell you, it is just producing the next token. Perhaps between 2 <thinking></thinking> tags 🙂

Predicting the next token. Transformer Explainer

So back to training on all the user data that Anthropic has been collecting… now we are going to be either doing a knowledge compression of this into the weights and biases or parameters of the model or they will be using it in the fine-tuning on using the chats as annotated datasets doing a reinforcement learning approach like the Chinese published. Or a combination of both. Who knows… Let’s just say this giant copyright infringement mixer is snowballing.

You cannot copyright anything that a large language model outputs if you don’t own the copyright to all its training corpus. It is a derivative work. This might change in the future think about how long things stay out of the public domain now? Who makes laws? Lawyers. Who likes licensing? Lawyers!

Agents as a Savior?

Setting aside the copyright issue. Because of how LLMs simply produce the next token it will happily just do that. We call it hallucinations but let’s be real, it is just doing what it has been trained to do. Produce the most likely next token.

Ok so let’s add another layer in the lasagna. I’m tired of babysitting this machine, let us write a program to do this, that is controlled by… another LLM. See a problem?

My man lost a mustache after being scolded

So the models seem to keep getting better, but you always seem to need a human in the loop. I was demoing something and I was sure to sandbag everything. But it still failed. I actually couldn’t figure it out on the spot. Take a gander at the screenshot below to see why it failed. Granted this is an older model but I feel we are dealing with something that is unsafe at any speed.

Even with a good system prompt the LLM emitted a valid python program that it read instead of the calculated response 😦

I will not be reading the slop, but godspeed

pop punk pelosi

Ok so in a reactive nature we will always be optimizing towards a better solution. But it will not be through anything magical, only feeding back in the failures. They have to be annotated by PEOPLE. This is why they want your chats to train on.

Context Window Non-Linearity

So this idea that it is somehow back to the prompter to add the right context and say the right words. We are right back to this idea of “programming”. The gaming of the metric around context window length… there is a non-linear quality of the results of the LLMs when the context window grows. Just because it says on the tin it has a context length of 32k tokens doesn’t mean it will produce quality output at that length. I’m actually a little bit disappointed in the meta game some of my colleagues are playing. Being stuck trying to make this context engineering machine magic work, instead of just solving the real problem. It is the bias of creating a game engine instead of creating a great game. You get stuck in this meta machine to make more machines and I’m sorry but this has never worked. It is a Ouroboros or a snake eating its own tail.

Driving can only be done safely while not using your cell phone. This “overflows” your context window and makes driving unsafe. Do LLMs produce quality content most of the time? Yes?… until this arbitrary window fills us and starts to get “dumber”

Somehow 50 years of software engineering and security practices are out the window. Running random code on your computer is dangerous. But that is what we are doing now. Its fast, fun, and dangerous. Please put your Agents in a Docker container at least. Ideally in Virtual Machine. I do like Google’s vibe coding approach with Jules.

Perception is Reality

What we feel really matters, but science doesn’t care about our feelings. I always get anecdotes from “users” and they all seem plausible but they are all based around feeling and the output that these people claim are rarely beyond a demos. Where are all the products? Also: Code is a liability, I wouldn’t brag about how large your codebase is. We need to be more grug brained.

I gain enough value from LLMs that I now deliberately consider this when picking a library—I try to stick with libraries with good stability and that are popular enough that many examples of them will have made it into the training data. I like applying the principles of boring technology—innovate on your project’s unique selling points, stick with tried and tested solutions for everything else.

Simon Willison

I feel like greenfield projects and using the LLM or agent as a cookie-cutter template is its sweet spot for value. But there have been a few studies and I think it is interesting the juxtaposition of these 2 studies:

  1. LLM Productivity Study: https://metr.org/blog/2025-07-10-early-2025-ai-experienced-os-dev-study/
    • “Surprisingly, we find that when developers use AI tools, they take 19% longer than without—AI makes them slower.”
    • “This gap between perception and reality is striking: developers expected AI to speed them up by 24%, and even after experiencing the slowdown, they still believed AI had sped them up by 20%.”
  2. Adderall Student Study: https://pmc.ncbi.nlm.nih.gov/articles/PMC6165228/
    • “These findings indicate that healthy college students experience substantive increases in emotional and autonomic activation in the period following Adderall consumption.”
    • “In summary, the present pilot study indicates that a moderate dose of Adderall has small to minimal effects on cognitive processes relevant to academic enhancement (i.e., on reading comprehension, fluency, cognitive functioning), in contrast with its significant, large effects on activated positive emotion…”
    • https://www.netflix.com/title/80117831

In both cases the people who have the active part of the experiment rather than the placebo “feel” like it is working… I do feel like the coding study is flawed because of the “warm-up” time it takes to learn how to prompt correctly etc. Also vibe coding excels at greenfield projects. I don’t think anyone can argue that vibe coding demos and MVPs won’t be faster upfront especially if you have little experience with the frameworks and platforms. But what happens when you have to actually depend on the slop?

It is fascinating to read about someone who is doing real science with NLP states what it takes to really “improve” your responses is jaw-dropping. 1000 annotated samples to prove 1% increase. No wonder Anthropic needs all our personal chat logs…

Why are we hitting a wall? Models can’t get any bigger, we can’t really train them and retain the information in the training because of something, something scaling laws:

 As a result, raising their reliability to meet the standards of scientific inquiry is intractable by any reasonable measure. We argue that the very mechanism which fuels much of the learning power of LLMs, namely the ability to generate non-Gaussian output distributions from Gaussian input ones, might well be at the roots of their propensity to produce error pileup, ensuing information catastrophes and degenerative AI behaviour.

https://arxiv.org/abs/2507.19703

DRAFT NOTICE

I am appreciative of your feedback and suggestions for fixing this article.

What was the point of all this? Why is there a limit? If we have to go say the magic words correctly to get the Agent to respond properly AND we also have to double check it. What is the point? Aren’t we just programming again?

Further Reading

https://en.wikipedia.org/wiki/Gell-Mann_amnesia_effect

https://blog.langchain.com/context-engineering-for-agents/

https://arxiv.org/abs/2506.02153

Security Tangent

Great breakdown of this new vector of attack. Unescaped user input (PR Title) injection to arbitrary code execution in the build system that lead 10k develops poisoned at the well:

https://www.kaspersky.com/blog/nx-build-s1ngularity-supply-chain-attack/54223/

A YEAR INTO THE HACKATHON `24

We started this project about a year ago. We thought it would be easy. There was an event GOAT CONF ONE where we were doing a hackathon for the GENAi Photo booth. Chuck er… Renan Barbosa commented this was too easy. Boasting we should do the Jetracer from NVIDIA also known as Project Leatherback. It is a really cool concept. An “Ai RC Racer” built around the Jetston Nano. The car hardware was built and assembled by the event. but the Simulation to Reality (Sim2Real) was still being developed. And still is…

We did the event. It was great for what it was, a gathering of like minded individuals talking about cool stuff. But we aren’t done yet and we had to kind of finish a few other things in the mean-time. The GENAI Photobooth ended up with 2-3 subsequent hackathons and many events put on and we also had it at Makerfaire.

An Interactive Generative Ai Photobooth is what?

  • Generate a background image based on request or canned theme response
  • We take a picture and remove the background, without using a green screen
  • We put you with that background and tag it with the event name / frame
  • You get QR code to download it [WONTFIX]

We actually started “vibe” coding this on the side to prepare for next hackathon. I picked this project because I knew it was possible in short amount of time. (ahem) Turns out vibe coding does work and it is only getting better. It is a Jupyter Notebook so it isn’t pretty and it isn’t finished but it works. It is a great teaching project.

We have to haul the 4090 machine round though. 50lbs to ship these Docker containers. It was fun but, now it is over. To get quality pictures you still need professional lighting and generally knowing what you are doing. This technology will exist in near realtime soon on your phone. Back to the workstations with the 4090s.

NVIDIA 4090 RTX MACHINE

Modern Workstations

Between fighting with GPU drivers and out of memory problems, we built a few of these systems as backups because they are hard to source. 4090s have been sold out for over 6 months. 3090s are available as the best bang for your buck right now. All of our development is against NVIDIA GPUs. This is a practical choice as all GPUs in the market are sub-standard in tooling compared to NVIDIA’s for AI training/inference definitely and probably graphics performance.

With its 24GB of RAM and over 10,000 CUDA cores, you can run an LLM or two and maybe do image and video generation flows in a reasonable amount of time. This is also a great system to run IsaacSim and to train robots in a simulator.

At the conference we had to provision cloud instances for everyone as each workstation costs upwards of $4K. We had the computers in the cloud with Infinite Compute‘s donation of credits to rent them by the hour. Having a local workstation is a must when doing IsaacSim work in my experience.

Racer Update May

Moving the lab 3 times has been three too many. But we landed at the college while we finish up our last semester. Plan is still to graduate in fall but hopefully the bulk of the work will be done in the next 60 days. The one year point of when we wanted to be racing. The hardware is all there and the reinforcement-learning training of the models is working. Still trying to figure out vision.

What’s Next?

With the RF Kill Switch now designed and tested we need to fabricate a few more cables and assemble the car “finally”. With this safety feature we will begin with teleoperation again which is just publishing commands over wifi to the car. We never ran the car not on blocks because we didn’t have the kill switch. We hope to start with teleop next week.

Sim2Real

Currently the flow is to use IsaacLab and SKRL a python library to train 2 models for a reinforcement learning policy to be trained. Once a policy is trained it can be inferred in the simulator. In the case of the above video it is simple way-point navigation. The next step is to transfer this model from the workstation to the Jetson Nano.

This is where the fun begins. ONNX, TensorRT. We are still stuck on vision. Stay Tuned!

Microwaving Code

Introduction

New coding tools always face the same reaction: immediate adoption by some, outright dismissal by coding purists. This pattern repeats with every technological leap.

Vibe coding is already here – and soon we’ll just call it coding. Just like we dropped “smart” from smartphones, the distinction between AI-assisted and traditional coding is rapidly disappearing. What matters isn’t the tool but knowing when to use it.

The Microwave Principle

Nobody microwaves a prime rib. A good cook knows when to use a microwave and when to use the oven. Microwaving popcorn makes perfect sense – the result is good, it’s convenient, and alternatives require special equipment. For certain tasks, the microwave is clearly best.

How Industries Work

Industries move toward tools that save time, effort, and money. That’s how economies function. Markets prefer “good enough and affordable” over “perfect but expensive.” Throughout history, craftspeople who adapted to new technologies often thrived, while those who resisted change sometimes found themselves with fewer opportunities.

Better Tools Make You Stronger

Good tools don’t replace skill—they amplify it. A beginner with a microwave can’t fix a complex meal. Automation tools work best when used by people who understand programming.

Code You Can “Microwave”

Before Product-Market Fit: When testing ideas, fast prototyping is essential. Get something working quickly, then refine if it has potential.

UI Work: Interfaces follow patterns that can be generated faster than coding from scratch.

Data Transformation: Moving data between formats is perfect for automation – it’s tedious and follows consistent patterns.

Boilerplate: Project scaffolding and configuration should be automated because they follow templates.

Single-Shot Prompts: Here’s the magic – translating vague ideas into working demos. Taking your boss’s intent and turning it into something real that you can iterate on later.

Code You Shouldn’t “Microwave”

The truth is, we don’t yet know the limits of vibe coding. The boundaries are shifting rapidly.

What seemed impossible for automation yesterday becomes routine today. Perhaps the only constant is that each new capability shifts our attention to the next level of complexity.

For now, use your judgment. What parts of your system need your deepest expertise? Focus your hands-on attention there, and let the microwave handle the rest.

Beyond the Microwave: Programming’s Next Evolution

Right now, we’re stuck in a transition phase. We express intent in human language, which gets translated into human-readable code that compilers then execute. This multi-step translation process introduces inefficiencies and vulnerabilities at each layer.

Imagine instead a different paradigm: What if we operated in a space where we had fundamental building blocks that were mathematically guaranteed to run correctly? Where AI systems understood how to assemble these components without introducing security flaws or runtime errors?

Someone will still need to verify these foundational components, but this verification only needs to happen once. Once library code is verified and trusted, we can build upon that foundation with confidence. The code becomes provably correct by construction.

Human-written programming languages will always exist for experts who need precise control. But to truly break through to the next level of software development, we may need to let machines operate in a different computational space entirely—one optimized for how AI thinks rather than how humans think.

This isn’t about tools becoming better than experts; the experts are the ones who created the tools in the first place. Rather, it’s about designing new computational environments where computers have the advantage—where we write the game for them. In domains like massive data processing and pattern recognition, machines already outperform us. By creating new abstraction layers that leverage these strengths, we can unlock capabilities beyond what traditional programming paradigms allow.

The Smart Approach

The best developers know when to use quick tools and when to craft by hand. They save their expertise for where it adds the most value.

Conclusion

The future belongs to those who use automation strategically. Knowing when to “microwave code” and when to craft it by hand isn’t about laziness—it’s about maximizing impact.

Nobody microwaves a prime rib. But nobody ignores their microwave either.

In the end, the distinction may fade entirely as we move toward computational systems that combine the best of human creativity with machine reliability. The goal isn’t replacing human programmers—it’s augmenting them with tools that handle the tedious and error-prone aspects of coding, freeing them to focus on the truly creative work of solving problems that matter.

https://charlespetzold.com/etc/DoesVisualStudioRotTheMind.html

Perpetual Beta

Welcome to the world. You are a beta tester. No, you do not get an employee discount. Thanks, keep moving. How dare you not run the latest version of my software.


Gold Masters

We used to have to have real discipline with shipping software. We didn’t ship docker containers, we shipped real containers! If you missed a date, it wouldn’t hit Toys-R-Us by Christmas. You missed the wave.

The Mediums Available Now

  • HARD COPY OLDEST TO NEWEST: FLOPPY, DVD, USB STICK
  • APP STORES
  • Web Apps
  • Website Download: Native Software (.exe,.app, .msi)
  • jithub dot com
  • tar.gz (zip files)
  • Dockerfile

As a developer we are already on the hub so we go there. But for mere mortals, App Stores have taken the cake. I will not talk about Docker in this post. As a consumer I prefer web downloads native to my platform or web apps.

App Stores

The walled garden is appealing. It provides you a platform and some level of competence or use to. They are gated by the who own the store. But this is reversing in trend I think***

The assumed blessing gets you eyeballs and is the only way to exist and use the hardware to its full potential on most platforms. You think the billions of iPhones in the world belong to us? They belong to Apple. We are leasing them!!!

The Trap

Apple, Google, etc now control when your users get your update. It is a friction source between you and your customer. They can just flat out refuse. Imagine trying to contact IT for a company will millions of customers. I think this problem is just now being identified. This type of relationship has never existed outside of government census style forced participation.

But it is still the ONLY WAY for some things.

If you would like to save actual data for sure on someones phone. Create a native app. Web apps will lose data cause Safari is a brutal target.


APT

Advanced Package Tool is how we manage our software on Debian based Linux systems (ubuntu). It is quite good and Homebrew on Mac is a poor imitation**

I'll provide you with information about the invention of the APT package system and its initial deployment. However, I want to note that I don't have access to a live database or search function, so I may not be able to provide completely accurate citations. I'll give you the information to the best of my knowledge, but I recommend double-checking these details for full accuracy.

The APT (Advanced Package Tool) package management system was primarily developed by the Debian project. It was first introduced in Debian GNU/Linux.

The primary developers of APT were:

1. Jason Gunthorpe
2. Brian White
3. Ian Jackson

APT was first released in 1998 as part of Debian 2.1 (codenamed "Slink").

While I can't provide specific citations due to the limitations mentioned earlier, you can find more detailed information about APT's history and development in the following sources:

1. The Debian Project's official documentation and release notes for Debian 2.1.
2. Historical mailing list archives of the Debian project from the late 1990s.
3. The APT project's own documentation and changelog.

For the most accurate and up-to-date information, I recommend checking these sources directly or consulting more recent literature on the history of Linux package management systems.

-CLAUDE VAN DAMME

Sometimes the links get broken and it can’t even find a python3.11-venv 😀

I started with Red Hat Linux 5 in 1996 and I think I can say with a lot of confidence. APT is what made Debian and then Ubuntu into a player in the Linux distribution game. APT can be your own app store because you can add repositories to it. If you are ever having a problem finding a package in apt. make sure you do this a few times:

sudo apt upgrade && sudo apt update

Building from Source Aside

::Arch, Gentoo has entered teh chat::

So one of the rights of passage in old linux days was recompiling your kernel. It used to be necessary before they added json parsing for device trees and configurations. Let’s just say you’d make a small change…

Well, first download the source of the kernel. Hopefully it came with your distro. make, make install… a few sudos. I wouldn’t be surprised if it was still about the same process. Seems like a pain though. Hours to compile on a 386sx with no floating point coprocessor or whatever. Cycles were sparse and bits where short.

Why?

for fun, for curiosity, for hopefully profit because YOU can do something no one else can unless they make your modifications.

CPU Platforms

Shipping fat binaries is annoying sometimes so that is why if you are bespoke hardware you build from source. You can still build vim for the Amiga!

  • x86
  • AMD64
  • ARM64
  • POWERPC*

Building from source is often triggered by moving to a new platform or wanting to use cutting edge compiler technologies.

Web Downloads & Native Software

This is my preferred method of distribution.

This is the only way to truly control your destiny. Ideally you have a web-version of the application and then a downloadable offline version. Going native is always the best solution for platform integration. But if you have multi-platform dreams you again put another vendor between you and your customer.

I’m looking at you Xamarin, Flutter, Qt, React Native

Continuous Improvement (BUILD, TEST, DEPLOY)

Servers have always been the method in which we prepare our software for distribution. Producing reproducible build artifacts based on time and version is critical when tracking down hard to find bugs that get introduced to the system.

To me the largest benefit of running a “build server” is that every commit to master or main will get built. And if it doesn’t compile on the server. The developer forgot to commit something!!!

It is a great test of “it works on my machine, does it work on yours?”

Testing

  • Optically (not automated but ideally a 4 eye check)
  • Unit
  • Integration
  • Performance

Release Strategies

I just want to talk about versions here. Releasing software is complicated. Who is this update for? Is it a test that you can’t test yourself so you need custom release for 1-2 people only?

ALPHA

  • Developer only and maybe a short loop customer that needs to test something.
  • This should not be used in production of possible…

BETA

  • Ready enough for general use for testing before a “release”
  • Easily generated through Jenkins or some CI/CD server

Date Based Versioning

Preferred method.

  • 2024.08.30.BETA
  • 2024.07.20.ALPHA
  • 2024.04.19
  • 2023.12.31.BETA

Semantic Versioning (SemVer)

I would be remiss not to mention this. But yes there is this scheme out there that hopes to encode version numbers in W.X.Y.Z format where these letters mean something. I don’t care to go into this, you are pushing the problem to someone who can make mistakes and SemVer’s LIE ALL THE TIME.

Pokemon Versioning

  • With a solid BETA version you tag it with a cute name
  • 2 words normally chosen from a 2 bags
  • Fitting a theme

Look at ROS, Ubuntu, etc

Examples:

  • Humble Hawksbill
  • Icecream Sandwich
  • Stroppy Titan

Stuck in Beta

You can call the version whatever you want. Users know when it is beta, you can feel it.

With your Jenkins about to build, test, and deploy your software with a single click. You get stuck in this release every-week.

You can do this. But unless you are web app where the software updates automagically. Don’t do this. Users do not like their sofware to change too often.

Try to release a beta once a quarter. And do a solid release 2 times a year if possible. Write up a nice changelog and provide a reason for your users to update. Don’t force them!


Give your customer a choice which version of the software to run!

The Command Pattern [BETA]

You would figure that the namesake of this website would have a post about it. Welcome to the Command Pattern. I first read about it in the famous Gang of Four book [Gamma et al]

Notes

This design pattern is useful to implement scripting and undo/redo behavior.

Updates:

Prerequisites

Explanations & Definitions

If I had to describe it to another programmer or technically adept person, I would say its just functions. Functions all the way down. But the special part is how you handle state and the ability to undo state changes. Or, script it!

Let us let the machine try and explain it:

Imagine you’re playing with a toy robot. Instead of controlling the robot directly, you have a special remote control. Each button on the remote is like a “command” that tells the robot what to do.

When you press a button, the remote doesn’t actually make the robot move. Instead, it sends a message to the robot saying “do this action”. The robot then follows that instruction.

This is kind of like how the Command pattern works in computer programs. Instead of one part of the program directly telling another part what to do, it creates a “command” that can be sent and followed later. This makes it easier to add new commands, undo actions, or even save a list of commands to do later.

– Claude3.5 Sonnet

Implementation Motivation

This is my implementation, there are many like this but this what I would consider an easy to teach and implement solution. You can always add features, ERRRR… complications, later 🙂

State or “World”

State is part of most developer’s lives, but really you can think about this as the data you care about in the program. It could be your air-line reservation, forum post, baby photos. You don’t want your data to be lost. State is your data or world, and often like the real-world the state is hierarchical.

Mutable World or Immutable World?

I’ll skip right past the mutable world. It is useful for large simulations, but that is another topic and I will leave this for another moment. Sometimes the memory overhead actually matters, because you cannot afford a machine with that much RAM. If you have limited hardware, consider a hybrid-mutable-immutable-world.

I consider Immutable World the cleanest approach and most ideal for scripting.

The Immutable World

new_world = get_next_state(world, command) 

So it is an agreement that any time the “World” will be mutated, we make a copy and return new state. We never mutate state.

We will also keep all of our state objects in a stack linked to their commands that have been performed.

all_states = [] # list of all worlds ever

Function Interfaces

Finite State Machines (FSM) are very important for system design. In this scenario we will ensure to call our functions on our state/world objects to maintain consistent design. From this point on we will refer to world as state as it is the preferred term of the author.

It helps to have an actual problem to solve to teach the command pattern. We will start with the humble calculator.

Command Processor

# CRL LAB - COMMAND PATTERN - A
# COPYRIGHT 2024 CRYPTIDE RESEARCH - ALL RIGHTS RESERVED
# LICENSED UNDER GPL3

# generic processor that is slightly tuned for us to teach
class CommandProcessor:
    def __init__(self, config):
        self.config = config
        self.history = [config.get_default_cmd()]
        self._value = config.get_default_value()

    def exec(self, op, a, b=None):
        self._value, cmd_link = self.config.exec(op, a, b)
        self.history.append((self._value, cmd_link))

        return self._value

    def clear(self):
        self.history.clear()
        self.config.clear()

    def undo(self):
        if len(self.history) == 0:
            raise ValueError("No operations to undo")

        undo_value, undo_cmd = self.history.pop()

        new_value, _ = self.history[-1] #look at last one and get value
        self._value = new_value

        #this following approach is half working for side-effect based systems example
        #new_value = self.config.undo(self.history[-1])
        #but what else do we need?

        return self._value


    def value(self):
        return self._value

Note that this processor implementation is just a starting point. The core ingredients. As we develop our application we may dream up new features of the interfaces.

You can note that there is no specific implementation baked into the design. It is meant to operate as a shim or a harness to run specific state/command patterns.

We have a configuration object passed in which contains the domain specific code we will be wrapping in the façade. A history list and helper value_history to aid in debugging.

This is the core function, this executes a command. a, b are arguments to the command. op is the operation to be performed.

History is preserved and we return the result of the execution is returned for easy of use of the API.

Calculator Commando

from enum import Enum

# simple calculator command processor
class Calculator:
    def __init__(self):
        self._value = 0

    # for referencing the payload
    class CALC_ROW(Enum):
        OP = 0
        A = 1
        B = 2
        RESULT = 3

    # public interface
    def exec(self, op, a, b=None):
      print(f"executing {op} {a} {b}")
      coms = self._get_command_map()
      if op not in coms:
        raise ValueError(f"Invalid operation: {op}")
      self._value = coms[op](a, b)

      return (self._value, (op, a, b, self._value))

    def value(self):
        return self._value

    def undo(self, tuple4):
        op, b, a, _ = tuple4 # pull arguments in reverse order!!!

        if a is None:
            a = self._value

        self._value = self._get_undo_map(op)(a, b)
        return (self._value, (op, a, b, self._value))

    def reset(self):
        self._value = self.get_default_value()

    def get_default_value(self):
        return 0
        
    def get_default_cmd(self):
        return (self.get_default_value(), ('+', 0, 0, 0))

    def clear(self):
        self._value = 0

    # private implementation

    def _add(self, a, b):
        if b is None:
            b = self._value
        return a + b

    def _multiply(self, a, b):
        if b is None:
            b = self._value
        return a * b

    def _subtract(self, a, b):
        if b is None:
            b = self._value
        return a - b

    def _divide(self, a, b):
        if b is None:
            b = self._value
        if b == 0:
            raise ValueError("Division by zero is not allowed")
        return a / b

    def _get_command_map(self):
      return {
          '+': self._add,
          '*': self._multiply,
          '-': self._subtract,
          '/': self._divide,
      }

    def _get_undo_map(self, op:str):

          switch = {
              '+': self._subtract,
              '*': self._divide,
              '-': self._add,
              '/': self._multiply
          }
          return switch[op]

This is the domain specific part of the code. It would change depending on the task that the application programmer might need. Example usage of the latest code:

base_calc = Calculator()
x0 = base_calc.exec('+', 1, 2)
print('using implementation itself')
print(x0) # (3, ('+', 1, 2, 3))
print(base_calc.value()) # 3
x1 = base_calc.exec('+', 1) 
print(x1) # (4, ('+', 1, None, 4))
print(base_calc.value()) # 4

At this point you might be wondering why we’ve done all this boiler plate. The final details:

# you can see the (value, (op, a, b, value))
# data structure here as an artifact to help with undo
# clear up and do the real Command Pattern

base_calc.clear()
print(base_calc.value())

print('wrap it in command processor')
calc = CommandProcessor(base_calc)
calc.exec('-', 10, 4)
print(calc.history[-1])
print(calc.value())

calc.exec('+', 1)
print(calc.history[-1])
print(calc.value())

print('undo last calc...')
calc.undo()
print(calc.value())
print('undo last calc...')

calc.undo()
print(calc.value())
0
wrap it in command processor
executing - 10 4
(6, ('-', 10, 4, 6))
6
executing + 1 None
(7, ('+', 1, None, 7))
7
undo last calc...
6
undo last calc...
0

Discussion

With the encoding of the inverse mapping of the operations between add/subtract and divide/multiply we can safely undo any operation but applying it in reverse. Not all commando’s will have this luxury. Think if there is a function that creates a file on disk. The undo of that command should do what?

DELETE THE FILE

Ok. we can end here for this section for the lab.

There will be an on-going discussion, but part 2 of this lab will transition to image manipulation and scripting support.

Thanks for reading!

July 2024 Bulk Update

A kitchen sink post. Gotta ❤ them. Thank you so much for your attention. Share if you like what the GOATs have done over the past months!

GOAT CONF ONE

  • Gathering of Aspiring Technologists (GOAT): https://therealgoat.club
  • Had a symposium + hackathon July 20th — Over 50 attended!
  • Thanks to our core GOATS (VOLUNTEERS): Brannon, Matt, Renan
  • Filmed event. Thank you so much Meagan at http://studio2215.com/
  • Ready to start editing then releasing content early August (tentative)

Silicon Graphics Rabbit Hole

  • IRIX 6.5 is in the house
  • 2 Machines in functional order. One demos, one needs some ‘dd’ command action in terminal (do you know what a SCSI drive is?)
  • I will never let these machines out of my collection.

Leaving Qualcomm

  • I will miss working will all of the brilliant people there. 3 Technology Nodes, 2 Companies, TDK->QUALCOMM… I like the stock!
  • Thank you to all those worldwide who reached out.

Finishing the Master’s Degree

  • Deep Learning this fall with Renan
  • Graduation expected Fall ’25. Thesis option is goal!
  • GOAT + CRASH = RDL

CRYPTIDE RESEARCH LLC

Wayback machine has me in 1999! Pretty much same services, but focusing more on applied engineering and product development. I wish it had the images. I have them on an old HD somewhere, I’m sure 🙂

If you want to book some time with the one man show:

The Band

  • Learning bass from a bluegrass legend Kenny
  • Headed back to camp next year!

A serious band practices 4 days a week

Kurt K

Next Week, We Build

So as a semi-unemployed individual, I have a new project is brewing. The Robot Development Lab (RDL) will launch in August of 2024. We will begin accepting applications at GOAT CONF ONE!

We need a multi-disciplinary team and will start with smaller robots and simulated robots before we move you on to the big leagues of programming the real robot dog:

More Details to Follow 😉


We need funding for spare robot parts and renting the studio space required to program dog properly. Please consider becoming a gold sponsor of GOAT CONF or buying sticker on the dog! 500 per joint per year:

Unitree Go2 Pro

Apply

Go back

Your message has been sent

Warning
Warning
Warning
Warning.

Freestyle Development

As an older gentle-person, I’ve seen the marketing change over time for describing what computer programmers do. When I was child it was Rapid Application Development or RAD. I think this is best term. I like the “extreme” sports nature of it and it fits with the title of this post.

Agile is a modern software development methodology emphasizing adaptive planning, evolutionary development, early delivery, and continuous improvement. It promotes flexible responses to change and collaboration among self-organizing cross-functional teams.

Agile is perhaps the single biggest contributor to shit code-bases and jaded work-forces. 2-week sprints are hilariously impotent. Especially when you have 6 meetings between sprints and your management-chain infects the process daily. They just yap and you gotta drink it.

Short-term gains become long-term losses as you churn on things that matter to no one but the guy managing the jira/kanban board. But, by all means, keep doing it. It will give me time to catch up.

Because everything is planned and binned in ~2 week sprints, and everyone is RUNNING, nobody stops to smell the flowers. Stopping to think and say, “hey maybe this is architecturally wrong.” There is no time to fix systemic issues in an agile environment. You do look like you are working really hard though and getting it done!

You keep marching towards a false goal and you can’t stop!

Agile is a management technique, not an engineering technique.

Waterfall

Agile was sold as the solution to waterfall. Waterfall is the traditional approach of planning everything out and then after a Critical Design Review (CDR) you then begin to “cut metal” or type code. I believe this approach is still superior because it forces people to think about the entire journey. Not just where they will fill up for gas next.

Agile is a hedge for management that won’t/can’t specify up front what they want/need, because often they don’t know. Only develop what you need as you need it. It would probably work if everything in software wasn’t connected.

While remodeling a house, there is no way that hanging a picture or painting a wall can cause the light-switch to now not only turn on the light, but now it flushes the toilet as well

Scrum

When a word comes from a sport like Rugby. What do you expect this process to look like? It is a giant clusterfuck. All these yappers talking about coding and project management. They are distracting you!

There is no clean code, there is no silver bullet. Work hard, pay attention, ITERATE!

MVP

The Minimum Viable Product is the only thing that Agile may be good for. Thrash, Thrash, Thrash and get something going. But a stable mature “Product” should never probably never use agile. I may die on this hill. Fail as fast as you can and build MVP in a sprint. But don’t ever call it Agile, it isn’t!

Companies / Software Ruined by Agile:

  • Excel
  • … now accepting submissions in comments

please help me fix this article into a coherent rant instead of an old man yelling at the clouds 🙂

Freestyle development is when you just have a blank text file and an idea, and you go make something out of nothing. This is the way to get started to make dreams into reality.

Further Reading

The Map is Not the Territory

As we continue our backslide into live-journal and .plan files, lets focus our attention to the pin board. This technique probably started by drawing lines in the sand or putting charcoal to a cave wall that has some sunlight a single part of the day.

Maps on paper are fairly short-lived. Sand even shorter. The map is part of a plan. The map is not the territory. Use it that way at your own peril.


Mood Boards or Pin Boards?


Mood Boards

  • Colors
  • Props pictures
  • entire room photographs
  • anything and anything

Throw Stuff in and out Really Fast

Don’t move towards the “real” world until you have a healthy pinboard or moodboard going. Physical or Electronic. Spreadsheets are very useful pinboards!

Have fun, fail fast, move on to the real challenges!