RSSAmplifier

Blog

Assert Fail

assertfail.gewalli.seRSS feed ↗176 posts

Latest posts

Yak shaving using slot machine

I try to use the slot machines to solve code-related issues. For some tasks, these machines work well, for some tasks we get a long line of “wiggle until it works” but the wiggling does not produce anything close to working. If you let the model provider auto-select a model, you can get the flip-flopping of what looks like someone spinning around in circles. It is annoying to work with. Switch the…

Successful freezing of mr Moro

As we get into the potential use of technology, my mind goes back to a story our litterature teacher had us read from: Successful freezing of mr Moro . There is an picture of a man being frozen in a block of ice: Sometimes we must wonder at the purpose of experiments. Say that we could freeze people without turning their cells into smush when thawed, how would we use that technology? There is the…

Hetzner mentioned in a few places

I’ve seen news about Lidl’s parent company launching a cloud unit a few times. Some YouTubers such as Milan Jovanović and Tom Delalande talk about using AWS and Azure alternative Hetzner. Here in Thessaloniki I’ve met people from IONOS (also a German company). I’m somewhat reminded about how Heroku had a great story about simple deployments. You then had to pay the cost if you got real use, so you…

Prompt injection is the new SQL injection only easier

As I try out more and more of LLM assisted coding. The security issues, I feel like, they are taken extremely lightly. The security issue I am referencing right now is that like when you use untrusted input an adversary can take advantage. This is not the only security issue. Sam Altman deflects from the issue by talking about people “Google” for help on building biological weapons using their…

The world and US cloud providers

For many years we have lived with a move towards the big cloud dragons. In my musings during more than 10 years ago I thought that we would see a move towards national datacenters due to security implications . There did not seem to be a lot pushback from the CLOUD Act in other countries. The calculations around using US services have changed. AWS is probably feeling some of the heat from the…

Evaluating different programming languages for use with LLMs

If we try to find some idea what language is better or worse for use with an LLM, we need to have some way of evaluating the different languages. I’ve done some small tests using different programming languages and gotten a rough estimate of how well LLMs work. Experiences 2025 What I’ve seen is that for a bit bigger program: Haskell takes time and converges slowly but requires less of my effort…

Devaluation of work

I have talked to multiple developers that have told me about getting LLM-generated pull requests. The pain is that we have a situation where you ignore the act of getting code to work and instead focusing on the optics of good enough looking code. Instead of talking about how we ensure that the people who are tasked with doing the work, actually do the work, we talk about adding more LLMs as a…

Slop bulkheads

How can we ensure that we use the LLM to generate useful code/features and fix bugs? I don’t think we can put the same expectations on LLMs as on junior coworkers. You hire junior developers in order to have people that are expected to grow and learn. LLMs come pre-trained (i.e. there is no point in teaching them as they are fixed neural nets after training). But anyway let us take the idea of…

Living with a machine ghost

LLMs or vibing is one technology in a long row of technologies and products that have promised to make programming more accessible. LLMs from what I’ve read, seem more to be the ghost of a portion of the internet canned into a GPU-ready package. Usually the promise is that “Now, you wont need developers anymore, your regular skilled employees will do the programming”. From what I’ve seen, looking…

Monorepo conversion continued

This is a continuation of Sample monorepo conversion . Since then we have learned some lessons. Also note that the monorepo conversions we have done have been of closed source code that we found was either tightly coupled or that we wanted to introduce tighter coupling between components without the overhead of shared libraries. Git Subtree Subtree the good parts The good parts about using git…

Clean Architecture Comparison continued

Background A year ago I did a clean architecture comparison for some clean architecture implementation samples online. One of the conclusions was that I did not look into how much each implementation chooses to marry different frameworks and libraries. Since then, we have seen some updates to existing solutions. We see one solution that has been archived eShopOnWeb , that was deeply influenced by…

Programmers in the age of Copilot or GPT

Introduction We have seen a rise in the use of non deterministic tools based on machine learning in recent years. Tools such as GitHub Copilot and ChatGPT have brought a change to how some programmers write code. We have the following article: New GitHub Copilot Research Finds ‘Downward Pressure on Code Quality’ . You can find other papers around the impact of relying too much on such tools by…

Clean Architecture Comparison

High level image of the clean architecture from Uncle Bobs blog post : Below is a comparison between clean architecture solutions in C# and Java. Most of the samples are in C#. High level overview There are some similarities and some key differences between the samples. No general conclusions can be taken from this comparison since: Closed source clean architectures are not represented (should…

Patch net7 dev container for net8

Since there isn’t an official dev container for net8 yet, you can use the net7 dev container and the setup scripts mention on Microsoft Learn . Instead of the base image: FROM mcr.microsoft.com/devcontainers/dotnet:0-7.0 You can add the following to ensure that net8 is installed: RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh RUN chmod +x ./dotnet-install.sh RUN sudo…

What does SOLID mean

Sources Dan North: Why Every Element of SOLID is Wrong Wikipedia SOLID for functional programming Equivalent of SOLID principles for functional programming Solid Relevance Principles Single responsibility principle Let us start with The single responsibility principle : Gather together the things that change for the same reasons. Separate things that change for different reasons. some see it as:…

Data Specifications in Java and .net

Background In dotnet-architecture/eShopOnWeb I noticed the interesting usage of Specification classes. When I did some digging, I found that these are implemented through ardalis/Specification For those who are more familiar with the Java world we have Data Specifications . If you read Implementing Domain Driven design in the bibliography you find a reference to Martin Fowlers paper . Sample based…

Running minikube on M1 and K8S tutorial

As previously mentioned in the blog I use a M1 mac . In order to help introduce others to Kubernetes I have done some testing of the K8S tutorial . In order to try it out I first tried using the qemu driver for minikube. First gotcha was that the image gcr.io/google-samples/kubernetes-bootcamp:v1 does not work on ARM natively. Let the Yac Shaving begin Running minikube in docker In order to get…

Sample monorepo conversion

Project with many repositories This is a continuation of Monorepo versus Polyrepo . This is a story about a project I worked on. We had some pain points related to many different source repositories. Shared business domain library that contained shared business types Shared library with a base parent entity (with common behavior) Many services that dealt with different subdomains that uses a few…

Running SQL Server on Docker with an M1/ARM CPU

In 2021 my aging MacBook Pro (16GB RAM, I7) had issues with a swelling battery. The touch pad sensitivity became an issue. In order to replace that machine I opted for a MacBook Air (8GB, M1). Compilation speed (at least of F# code) on the Air is faster than the old machine, but it is not as responsive when I have a lot of things running at the same time. In order to try out and showcase different…

Architecture and functional programming

This post is a continuation of Unclean architecture . Clean architecture From what I understand of Clean architecture it’s an iteration of Hexagonal architecture also known as Ports and Adapters (see the Wikipedia page). Clean architecture use of OO and code dependency OO is the ability, through the use of polymorphism, to gain absolute control over every source code dependency in the system. It…

Keeping a library in dotnet binary compatible for several years

Background I’m one of the people contributing to F#+ . I got involved in the library around 2017 since I was looking for computation expression builders to clean up my F# code (after a few turns that turned out to be F#+). Around 2018 we released the v1 version. Since then we have released minor versions of the library with new features and bug fixes. In order to not break any users (such as our…

Way of working and method

How do we develop software How do we arrive at working software? Some of the ways I’ve seen are: Use of known working patterns, techniques, language features, libraries: Restrict what everyone does to only the patterns that are known to work. The assumption is also that by using a small subset of tools it is going to be easier for juniors and generally 99% of all programmers to join. Use logical…

Unclean architecture

This post is a continuation of Small and simple business applications using SQL . Clean architecture From what I understand of Clean architecture it’s an iteration of Hexagonal architecture also known as Ports and Adapters (see the Wikipedia page). Why would you want architecture? The main purpose is to deliver a working solution to the customer. How do you arrive to that? Architecture is a tool…

Small and simple business applications using SQL

Say that you want to write a minimal API as seen in Can .net compete with NodeJS . How would you structure such an application? You would end up with something like 0-1 layers in your application. Some of my previous coworkers embrace these patterns in order to focus on business value. In this post I’ll try to get into how you could make such a system without going into detail (pointing instead to…

Validation and mediator

This example is loosely based on how the API looks for aggregates in Axon Framework . We also base some of the code around examples of ValidationBehavior found online. Stackoverflow CodeMaze The reason why I’ve implemented these examples is in order to showcase how you can cut down on some of the ceremony around using a generic mediator interface implementation together with fluent validation…

Can .net compete with nodejs

NodeJS applications can be a single file with minimal overhead: const express = require('express') const app = express() app.get('/', (req, res) => { res.send('Hello World!') }) app.listen(3000, () => { }) How does this compare to what we have seen in the .net world? For .net 5 C# HelloWorld.csproj (1) <Project Sdk= "Microsoft.NET.Sdk.Web" > <PropertyGroup> <TargetFramework> net5.0…

Monorepo versus Polyrepo

Let us start by defining monorepo Keep multiple projects in a single source control system 1 Acquire as many third-party and in-house dependencies as possible for a build from the same source-control repository/branch, and in the same update/pull/sync operation. 2 Keep all teams in agreement on the versions of third-party and in-house dependencies via lock-step upgrades. 2 Plausible restrictions…

Using functional programming to optimize frontend code

Intro During 2019 I started on the current project. At this project I’m working on, we are building a enterprise system for a government customer. When I got in significant parts had been developed of the frontend and backend system. My role when I started in the project was in order to help develop test automation software for the system. Since I’ve worked on both frontend and backend parts in…

Dependency injection in FSharp

One of the questions around how to write F# is how do we compose bigger business applications. In C# you generally use constructor injection. Let us start by defining some base functions types and environment that we will use in later code samples: open FSharpPlus open FSharpPlus.Data type IUserRepository = abstract GetUser : email : string -> Async<string> type IShoppingListRepository = abstract…

Implicit versus explicit dependencies

These are musings related to the question what kind of libraries resist the test of time. Some of it is related to issues encountered due to Dependency Hell . Explicit dependency Let us start out by asking the question, what is an explicit dependency in your software? How should we define a dependency? The easiest way to define a dependency would be there is an explicit package reference to a…

Proxy API requests in development

The road towards frontend and backend separation Or at least why you should care about proxies when dealing with web applications. Around 2005 I studied computer science at Lund university. One of the professors warned us about two things: JavaScript and Sharepoint. The web programming I got aquatinted with at university was mainly Java servlets and Python CGI apps. I started working at MaCom in…

Estimated language popularity in Sweden among companies

Raw numbers I’ve written a simple project in F# to read public information from the job agency in Sweden: Number of listings Language 6964 java 6085 JavaScript 5727 C# 3929 python 3359 c++ 2600 c 1360 php 1230 golang 1151 TypeScript 589 matlab 442 bash 420 kotlin 381 r 344 scala 332 perl 318 ruby 220 ada 157 erlang 118 groovy 78 rust 71 cobol 63 tcl 61 F# 49 ecmascript 48 scheme 47 elixir 44…

Validations in F# and C#

In order to give a nicer developer experience composing validation messages there are broad categories of libraries that either work well in a Java/C# style setting or work well when composing functions. Attribute based validation libraries The default style that can be seen in many java and C# projects is the attribute based validation approach. public class Person { [MinLength(1,ErrorMessage…

Immutable classes in C#

Problems How do you create an instance of a given readonly class? How do you get a new instance but with given fields with different values? Writing readonly record classes 2007 Around 2007 I wrestled with writing immutable classes in C#. One of the key pain-points was that the constructor parameters for a class representing a database row for a specific table ended up with around 68 parameters.…

Working on dotnet core on Mac OS X part 3

After writing the previous posts about getting some of the infrastructure working for non Windows systems, I’ve seen better ways of getting it to work. Instead of using a netfx.props file, you can use a Directory.Build.props with platform specific configuration as seen in for instance FSharp.Compiler.Service : <Project> <!-- mono --> <PropertyGroup Condition= "'$(OS)' == 'Unix'" > <MonoRoot…

Commands and services

Command handlers are services If we start from the command redux post by Ayende . In actual shopping scenarios we need to deal with not a clear script of actions that can be executed in a sequential manner. Instead we have a unidirectional wizard-style flow where the customer is redirected from the shopping site to payment provider and back. Let us ignore these complexities and look at the…

Configure Airport printer on Windows

Setup Apple Airport printer on Windows. Connect the printer using USB directly Windows will auto install the needed drivers. Setup the printer as a network printer Reconenct the printer into the airport. Select could not find printer among the listed then start going down the printer Wizard flow: In order to connect to the printer we add the router IP address as the “port” Then select Custom…

Using multiple keyboard layouts on Windows 10

Why C style programming languages are designed in the cultural context of having a English keyboard layout. Programming C style languages on a Swedish keyboard layout is somewhat awkward since you need to exercise finger gymnastics in order to use common characters like {}\ . Unless you switch to Python the easiest fix is to use multiple keyboard layouts. How I started out by adding English (US)…

Masstransit

MassTransit is a wrapper around message queues, such as RabbitMQ ,in order to simplify work on distributed applications using .NET. What is it good for One common task is to make sure that services react to relevant events. Instead of polling you can tie your system together using async events. Put entity/article/object in a search engine once it’s published Update information in data warehouse…

Is there microservices or is it an architectural dream cloud

What is a microservice There isn’t a clear definition of microservices architecture unless you pick one persons strongly held belief. This can mean that what someone considers microservices, someone else considers to be something else. To summarize a few of the available characterizations and definitions: James Levis and Martin Fowler organization around business capability automated deployment…

Why do we need microservices

Polyglot I’ve found that I’m way more productive in some languages compared to others. This is common enough occurrence according to ThoughtWorks that they mention polyglot programming under their tech radar in techniques . It also allows the use of heterogenous teams that can bring different strengths to the table. Sometimes a language/virtual machine has a library or framework especially suited…

Why we don't need microservices

Single deployment If the system you are developing is intended to be delivered by a single team (or a single backend team), there might be less need for a decomposed solution where parts can be deployed separately. This also applies if you are starting out on something relatively small and don’t have the operations setup for doing microservices. If you still will want to structure your code in…

Why do we need message queues?

HTTP might be good enough For many systems there isn’t a need for message queues. Regular HTTP-style request/response are often enough. If your system is architected without thinking about events you might have very little need for it. A webhook can be good enough. It all depends on your architecture and business scenarios if it makes sense. What good is a message queue A message queue is good for…

ESB and service mesh

Service mesh Service mesh looks like an evolution of Enterprise Service Bus and has similar focus. An ESB is a single point of failure. Since it’s a combination of many concerns, it can be hard to get right. A service mesh tries to mitigate this by focus mainly on HTTP, HTTP2 style communication and being distributed as a deployment (each service has it’s own copy of the mesh software). Typical…

Choose your own adventure in F# 2

In the first post I introduced some alternatives for F# programming. The title alludes at classic roleplaying games. Mattias Brandewinder has written a blog post series about writing DnD logic in F# that should be an interesting read in order to follow up on that lead.

Maven security issues scanning

There is a mature package management system in the Java world. Maven seems to be quite standard. I’ve made a sample project with Hibernate and Spring. One of the neat things I found out was that it’s quite easy to integrate OWASP checks. Following the guide to setup a simple way to be able to that your closed source system does not have any known vulnerabilities in dependencies.

Decompiling Java binaries

There are some tools out there to decompile Java binaries. I’ve found that the easiest one to process an entire jar is Fernflow . In order to build you notice that it’s built using Gradle . Either install gradle or use existing shell wrappers to build the jar file. Once you have built the decompiler you might want to wrap it up with a shell wrapper and put the executable in your path next to the…

Java vs C#

Java started out as a very object oriented language. One of the nice things with Java (as a language) has been that the syntax has been quite stable for a long time. C# competes with Java for mainstream developer mind-share. C# has pushed better tooling and more features but was primarily focused on Windows. For the last few years we have seen .net becoming a truer cross platform language with the…

When is Go a nice language?

I’ve been following Go for a while due to the influence of one of my personal heroes: Ken Thompson (due to his hand in making Unix and C programming language). Many years ago I met Douglas Crockford. At that point I was looking into low level implementation of parsers why I suggested a JVM language with more primitive structures in order to simplify implementation of more low level performance…

Docker and .net

I’ve spent half a year on a project to Kubernetes project. During that time we did production deployments of .net core web services to docker. My main suggestion would be to follow the example on docker.com .