# Hillel Wayne

Recent content on Hillel Wayne

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

## A Crash Course in Predicate Logic

DevFeed: [A Crash Course in Predicate Logic](<https://devfeed.tech/articles/a-crash-course-in-predicate-logic-52984.md>)

Original publisher: [Read original article](<https://www.hillelwayne.com/post/predicate-logic/>)

Published: 2026-09-01T00:00:00Z

Content type: tutorial

Language: en

Sources: [Hillel Wayne](<https://devfeed.tech/sources/hillel-wayne.md>)

Topics: [Math and Logic](<https://devfeed.tech/topics/math-and-logic.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [function](<https://devfeed.tech/topics/function.md>), [Computing](<https://devfeed.tech/topics/computing.md>)

Tags: [blog-post](<https://devfeed.tech/tags/blog-post.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [logic](<https://devfeed.tech/tags/logic.md>), [logic-for-programmers](<https://devfeed.tech/tags/logic-for-programmers.md>), [math](<https://devfeed.tech/tags/math.md>), [predicate](<https://devfeed.tech/tags/predicate.md>)

### AI overview

A tutorial introducing formal logic for programmers. It explains predicates as mathematical concepts related to, but more abstract than, programming functions, and covers predicates, implication, sets, and set quantifiers.

### Source excerpt

I started writing Logic for Programmers because there weren't any good resources on logic for, uh, programmers. Now that the book's out, the new problem is that there aren't any good free resources on logic for programmers. So, to solve that problem (and maybe hype the book a little), I converted the second chapter of LfP into a blog post. All footnotes are editorial comments not present in the book.1 Enjoy! Chapter 2: A Crash Course in Logic Formal logic is a very powerful tool, but it's also very simple. Over this chapter, we'll motivate and explain the basic concepts and syntax. This includes predicates, the implication operator, sets, and set quantifiers. Much of it may already be familiar to you from programming experience! Predicates To a first approximation, a predicate is a function that returns a Boolean. You've probably written dozens of predicates as a programmer. These are all predicates: Positive(x) is true if x is greater than 0. IsSum(x, y, z) is true if x plus y equals z. RAMAtLeast(c, r) is true if the computer c has at least r bytes of physical RAM. I say "to a first approximation" because predicates are a mathematical concept, not a programming construct. A program function needs to come with a way of computing the answer, while a predicate simply defines what the answer is. Take RAMAtLeast: the software implementation would depend on the programming language, operating system, and possibly even the physical hardware. But the predicate? True if the computer has the RAM, false if not. That's it. This means predicates can be more abstract than programming functions, expressing things that we can't even compute, or at least don't yet know how to. These are all valid predicates, too: CanRunProgram(c) is true if the computer c is capable of running our program, whatever "capable" ends up meaning. RainyDayInCa(date) is true if on date, it rained somewhere in Canada. NotAlone() is true if aliens are real. On the other hand, Positive(x) is easy to compute

## Logic for Programmers is Now Available

DevFeed: [Logic for Programmers is Now Available](<https://devfeed.tech/articles/logic-for-programmers-is-now-available-52982.md>)

Original publisher: [Read original article](<https://www.hillelwayne.com/post/lfp/>)

Published: 2026-07-29T00:00:00Z

Content type: release

Language: en

Sources: [Hillel Wayne](<https://devfeed.tech/sources/hillel-wayne.md>)

Topics: [Math and Logic](<https://devfeed.tech/topics/math-and-logic.md>), [Software](<https://devfeed.tech/topics/software.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Software Testing](<https://devfeed.tech/topics/software-testing.md>), [Domain-driven design (DDD)](<https://devfeed.tech/topics/domain-driven-design.md>)

Tags: [book](<https://devfeed.tech/tags/book.md>), [domain](<https://devfeed.tech/tags/domain.md>), [ebook](<https://devfeed.tech/tags/ebook.md>), [logic](<https://devfeed.tech/tags/logic.md>), [logic-for-programmers](<https://devfeed.tech/tags/logic-for-programmers.md>), [math](<https://devfeed.tech/tags/math.md>), [programming](<https://devfeed.tech/tags/programming.md>), [release](<https://devfeed.tech/tags/release.md>), [software](<https://devfeed.tech/tags/software.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

The author announces the release of Logic for Programmers, a book that teaches working developers basic formal logic and its applications in property-based testing, domain modeling, and logic programming. It is designed for readers without a mathematics background.

### Source excerpt

I am delighted to announce that my book, Logic for Programmers, is now available! You can check out the release site here or go directly to buy the ebook or print versions. If you bought any of the early access versions, you can get the 1.0 for free from leanpub. This has been a long time in the making. Formal logic is an incredibly powerful tool to understand software. Everything from "what's a left outer join" to "why shouldn't Square inherit from Rect" makes more sense if you know just the basics of logic. Yet there weren't any programmer-focused resources for actually learning those basics. You were just sort of expected to crack open a math book or pick it up through osmosis. The osmosis route doesn't work. So I spent the last five years making that resource. Logic for Programmers teaches the working developer basic logic and its many applications, covering areas as diverse as property-based testing, domain modeling, and logic programming. It's meant for people with no math background: if you know AND and/or OR, you can read this book. I researched each chapter's topic for months, then ran the chapter by a domain expert to make sure it was accurate, then ran it by a junior programmer to make sure it was approachable. Anyway, I am very tired and glad to be done. Thank you so much for reading, and I hope you enjoy the book.

## Some Silly Z3 Scripts I Wrote

DevFeed: [Some Silly Z3 Scripts I Wrote](<https://devfeed.tech/articles/some-silly-z3-scripts-i-wrote-52989.md>)

Original publisher: [Read original article](<https://www.hillelwayne.com/post/z3-examples/>)

Published: 2026-02-23T00:00:00Z

Content type: tutorial

Language: en

Sources: [Hillel Wayne](<https://devfeed.tech/sources/hillel-wayne.md>)

Topics: [Programming](<https://devfeed.tech/topics/programming.md>), [Python](<https://devfeed.tech/topics/python.md>), [Code](<https://devfeed.tech/topics/code.md>), [Math and Logic](<https://devfeed.tech/topics/math-and-logic.md>), [Software](<https://devfeed.tech/topics/software.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [formal-methods](<https://devfeed.tech/tags/formal-methods.md>), [logic](<https://devfeed.tech/tags/logic.md>), [programming](<https://devfeed.tech/tags/programming.md>), [python](<https://devfeed.tech/tags/python.md>), [smt](<https://devfeed.tech/tags/smt.md>)

### AI overview

An educational collection of Python examples for Z3, an SMT solver that handles mathematical and basic programming constraints. It explains satisfiability, models, and specialized theories, then applies the solver to example problems.

### Source excerpt

As part of writing Logic for Programmers I produced a lot of "chaff", code samples and sections I wrote up and then threw away. Sometimes I found a better example for the same topic, sometimes I threw the topic away entirely. It felt bad to let everything all rot on my hard drive, so I'm sharing a bunch of chaff for a tool called "Z3", which has all sorts of uses in software research. First an explanation of what this tool actually is, and then some scripts in order of increasing interestingness. All examples will use the Python bindings (pip install z3-solver). What is Z3? Z3 is an SMT solver. Okay, what is SMT? An SMT ("Satisfiability Modulo Theories") solver is a constraint solver that understands math and basic programming concepts. You give it some variables, some equations with those variables, and it tries to find you a model, or set of assignments that satisfy all those equations. Imagine you're 12 years old and taking Algebra I for the first time, and see this problem: 4x + 2y == 14 2x - y == 1 solve for x & y You're supposed to learn how to do solve this as a system of equations, but if you want to cheat yourself out of an education you can have Z3 solve this for you. # pip install z3-solver import z3 s = z3.Solver() x, y = z3.Ints('x y') s.add(4*x + 2*y == 14) s.add(2*x - y == 1) result = s.check() print(result) if result == z3.sat: print(s.model()) This is the most common way to use Z3: instantiate a solver, add constraints to the solver, and check it.1 Ints('x y') creates two "constants". When we call s.check(), the solver tries to find values for the constants that satisfy all our constraints (the model). Here it prints "sat" followed by [x = 2, y = 3]. If there were multiple answers it would return the first one it found, and if there were none it would print "unsat". That's the "satisfiability" part, anyway. The "Modulo Theories" part comes from the fact that Z3 carries a bunch of specialized solvers for different domains, or "theories". This means i

## A Very Early History of Algebraic Data Types

DevFeed: [A Very Early History of Algebraic Data Types](<https://devfeed.tech/articles/a-very-early-history-of-algebraic-data-types-52976.md>)

Original publisher: [Read original article](<https://www.hillelwayne.com/post/algdt-history/>)

Published: 2025-09-25T00:00:00Z

Content type: article

Language: en

Sources: [Hillel Wayne](<https://devfeed.tech/sources/hillel-wayne.md>)

Topics: [Programming](<https://devfeed.tech/topics/programming.md>), [Functional programming](<https://devfeed.tech/topics/functional-programming.md>), [Math and Logic](<https://devfeed.tech/topics/math-and-logic.md>), [Rust](<https://devfeed.tech/topics/rust.md>)

Tags: [functional-programming](<https://devfeed.tech/tags/functional-programming.md>), [history](<https://devfeed.tech/tags/history.md>), [logic](<https://devfeed.tech/tags/logic.md>), [programming](<https://devfeed.tech/tags/programming.md>), [programming-languages](<https://devfeed.tech/tags/programming-languages.md>)

### AI overview

A historical exploration of algebraic data types, explaining how product and sum types relate to the arithmetic properties of numbers and tracing the origins of their terminology through academic research.

### Source excerpt

Been quiet around here! I've been putting almost all of my writing time into Logic for Programmers and my whole brain is book-shaped. Trust me, you do not want to read my 2000-word rant on Sphinx post-build LaTeX customization. But I spent the past week in a historical rabbit hole and had to share what I found. It started with Algebraic [Data] Types are not Scary, Actually. The post covers AlgDTs1 in more detail, but a quick overview is: Product types are things like (Int, Bool) or Dog(name: str, owner: Person, age: Int). They have a value for each field. Almost all modern languages have product types, usually calling them something like "structs" or "records" or "value object" or whatever. Sum types are "tagged unions", things like Int + Nothing, Result + ErrorType, or Address + Number + Email. They are a choice between several options. The "tag" means that we do not eliminate overlapping choices. Bool + Bool has four possible values, colloquially Left True, Right True, Left False, Right False. Sum types are relatively rare in modern programming languages, outside functional programming and some places like Rust. Where do these get their names? The usual explanation is it comes from their cardinalities (number of possible values): if #T is the cardinality of type T, then #(S + T) == #S + #T and #(S, T) == #S * #T. Try this with Bool + Weekday and (Bool, Weekday) if you feel unsure. But it could instead be that the names come from the fact that sums and products of types act like sums and products of numbers! I think this is pretty known but it doesn't appear very often in introduction to AlgDTs. For example: Addition over numbers is associative, meaning a + (b + c) == (a + b) + c. This tells us that Int + (String + Null) is isomorphic (≅) to (Int + String) + Null: we can convert values between the two types without losing any useful information. A more interesting example is that AlgDTs follow the distributive property a*(b + c) == a*b + a*c. If we have a value of

## A Perplexing Javascript Parsing Puzzle

DevFeed: [A Perplexing Javascript Parsing Puzzle](<https://devfeed.tech/articles/a-perplexing-javascript-parsing-puzzle-52981.md>)

Original publisher: [Read original article](<https://www.hillelwayne.com/post/javascript-puzzle/>)

Published: 2025-03-12T00:00:00Z

Content type: article

Language: en

Sources: [Hillel Wayne](<https://devfeed.tech/sources/hillel-wayne.md>)

Topics: [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Parsing](<https://devfeed.tech/topics/parsing.md>), [browser](<https://devfeed.tech/topics/browser.md>), [HTML](<https://devfeed.tech/topics/html.md>), [Electron](<https://devfeed.tech/topics/electron.md>)

Tags: [browser](<https://devfeed.tech/tags/browser.md>), [crimes](<https://devfeed.tech/tags/crimes.md>), [history](<https://devfeed.tech/tags/history.md>), [html](<https://devfeed.tech/tags/html.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [parsing](<https://devfeed.tech/tags/parsing.md>)

### AI overview

A JavaScript parsing puzzle explains why `-->` can begin a line comment and cause a browser console expression to print 1. The article traces this behavior to legacy HTML comment compatibility and describes its standardization and support in browsers, Node, and Electron.

### Source excerpt

What does this print? x = 1 x --> 0 Think it through, then try it in a browser console! Answer and explanation in the dropdown. Show answer It prints 1. wait wtf At the beginning of a line (and only at the beginning of a line), --> starts a comment. The JavaScript is parsed as x = 1; x; // 0 The browser then displays the value of the last expression, which of course is 1. but why It's a legacy hack. Netscape Navigator 2 introduced both JavaScript and the <script> tag. Older browsers in common use (like Navigator 1) had no idea that <script> content was anything special and wrote it as regular text on the page. To ensure graceful degradation, webdevs would wrap their scripts in html comment blocks: <script> <!-- console.log("hello world!") --> </script> Old browsers would parse the content as an HTML comment and ignore it, new browsers would parse the content as JavaScript and execute it. I'm not quite sure why <!-- and --> weren't syntax errors; presumably there was special code in the js engines to handle them, but I can't figure it out where. All modern browsers at least recognize <script>.1 But since some old websites still have the hack and the standardization committee will never, ever break the web, they added <!-- and --> as legal comment tokens to the 2015 standard. <!-- and --> both act like //, i.e. starting line comments. --> is only valid at the start of a line (to avoid ambiguity with a postfix decrement followed by a greater than operator), while <!-- can occur anywhere in the line. -- MDN Web Docs Web browsers are required to support this syntax, while other engines are not. Node and Electron both support it, though, as they share Chromium's v8 engine. Text-only browsers like Lynx recognize the tag, they just choose to ignore the contents. [return] show all If you liked this post, come join my newsletter! I write new essays there every week. I train companies in formal methods, making software development faster, cheaper, and safer. Learn more here.

## The Hierarchy of Controls (or how to stop devs from dropping prod)

DevFeed: [The Hierarchy of Controls (or how to stop devs from dropping prod)](<https://devfeed.tech/articles/the-hierarchy-of-controls-or-how-to-stop-devs-from-dropping-prod-52980.md>)

Original publisher: [Read original article](<https://www.hillelwayne.com/post/hoc/>)

Published: 2025-03-04T00:00:00Z

Content type: article

Language: en

Sources: [Hillel Wayne](<https://devfeed.tech/sources/hillel-wayne.md>)

Topics: [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>), [Database](<https://devfeed.tech/topics/database.md>), [debugging](<https://devfeed.tech/topics/debugging.md>), [Shell](<https://devfeed.tech/topics/shell.md>), [backups](<https://devfeed.tech/topics/backups.md>)

Tags: [backup](<https://devfeed.tech/tags/backup.md>), [database](<https://devfeed.tech/tags/database.md>), [debug](<https://devfeed.tech/tags/debug.md>), [developer](<https://devfeed.tech/tags/developer.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [practices](<https://devfeed.tech/tags/practices.md>), [software-engineering](<https://devfeed.tech/tags/software-engineering.md>), [systems](<https://devfeed.tech/tags/systems.md>)

### AI overview

The article explores how the workplace-safety Hierarchy of Controls can be applied to software engineering. Using a production outage caused by running the wrong query in an SSH session, it examines ways to prevent production data loss and distinguishes prevention controls from backups and incident postmortems.

### Source excerpt

The other day a mechanical engineer introduced me to the Hierarchy of Controls (HoC), an important concept in workplace safety. 1 (source) To protect people from hazards, system designers should seek to use the most effective controls available. This means elimination over substitution, substitution over engineering controls, etc. Can we use the Hierarchy of Controls in software engineering? Software environments are different than physical environments, but maybe there are some ideas worth extracting. Let's go through the exercise of applying HoC to an example problem: a production outage I caused as junior developer. The problem About ten years ago I was trying to debug an issue in production. I had an SSHed production shell and a local developer shell side by side, tabbed into the wrong one, and ran the wrong query. That's when I got a new lesson: how to restore a production database from backup. In process safety, the hazard is whatever makes an injury possible: a ladder makes falls possible, a hydraulic press makes crushed fingers possible. In my case, the hazard might have been a production shell with unrestricted privileges, which made losing production data possible. The specific injuries include both dropping the database directly (like I did) or running a delete query on the database. I'll use both injuries to discuss different kinds of hazard controls. First, some caveats The HoC was designed to protect people from machines, not machines from people! I found most of the concepts translate pretty well, but I ran into some issues with PPE. There's also lots of room to quibble over whether something is one category or the other. As part of writing this, I'm also trying to figure out the qualitative differences between the categories. This is my own interpretation as a total beginner. Finally, the HoC is concerned with prevention of injury, not recovery from injury. Software best practices like "make regular database backups" and "have a postmortem after inci

## Hiatus

DevFeed: [Hiatus](<https://devfeed.tech/articles/hiatus-52979.md>)

Original publisher: [Read original article](<https://www.hillelwayne.com/post/hiatus/>)

Published: 2024-09-11T00:00:00Z

Content type: opinion

Language: en

Sources: [Hillel Wayne](<https://devfeed.tech/sources/hillel-wayne.md>)

Topics: [Mercury](<https://devfeed.tech/topics/mercury-lang.md>)

Tags: [hiatus](<https://devfeed.tech/tags/hiatus.md>), [logic-for-programmers](<https://devfeed.tech/tags/logic-for-programmers.md>), [meta](<https://devfeed.tech/tags/meta.md>), [newsletter](<https://devfeed.tech/tags/newsletter.md>), [weekly](<https://devfeed.tech/tags/weekly.md>)

### AI overview

The author says their blog-writing time is going to Logic for Programmers, expects to return in early 2025, and will continue writing a weekly newsletter.

### Source excerpt

All of my budgeted blogwriting time is going to Logic for Programmers. Should be back early 2025. (I'm still writing the weekly newsletter.)

## Toolbox languages

DevFeed: [Toolbox languages](<https://devfeed.tech/articles/toolbox-languages-52987.md>)

Original publisher: [Read original article](<https://www.hillelwayne.com/post/toolbox-languages/>)

Published: 2024-07-15T00:00:00Z

Content type: opinion

Language: en

Sources: [Hillel Wayne](<https://devfeed.tech/sources/hillel-wayne.md>)

Topics: [Programming](<https://devfeed.tech/topics/programming.md>), [Autohotkey](<https://devfeed.tech/topics/autohotkey.md>), [Script](<https://devfeed.tech/topics/script.md>), [GUI](<https://devfeed.tech/topics/gui.md>), [Windows](<https://devfeed.tech/topics/windows.md>), [Shell](<https://devfeed.tech/topics/shell.md>), [Python](<https://devfeed.tech/topics/python.md>), [win32](<https://devfeed.tech/topics/win32.md>)

Tags: [autohotkey](<https://devfeed.tech/tags/autohotkey.md>), [frink](<https://devfeed.tech/tags/frink.md>), [gui](<https://devfeed.tech/tags/gui.md>), [j](<https://devfeed.tech/tags/j.md>), [languages](<https://devfeed.tech/tags/languages.md>), [linux](<https://devfeed.tech/tags/linux.md>), [picat](<https://devfeed.tech/tags/picat.md>), [practices](<https://devfeed.tech/tags/practices.md>), [python](<https://devfeed.tech/tags/python.md>), [raku](<https://devfeed.tech/tags/raku.md>), [shell](<https://devfeed.tech/tags/shell.md>), [toolbox](<https://devfeed.tech/tags/toolbox.md>)

### AI overview

An exploration of "toolbox languages," programming languages that solve practical problems without requiring third-party packages. It discusses AutoHotkey for Windows GUI automation and J for concise array-based mathematical work, with examples and further reading.

### Source excerpt

A toolbox language is a programming language that's good at solving problems without requiring third party packages. My default toolbox languages are Python and shell scripts, which you probably already know about. Here are some of my more obscure ones. AutoHotKey Had to show up! Autohotkey is basically "shell scripting for GUIs". Just a fantastic tool to smooth over using unprogrammable applications. It's Windows-only but similar things exist for Mac and Linux. Useful features: You can configure shortcuts that are only active for certain programs, if a global flag is set, if certain text appears on screen, etc. Simple access to lots of basic win32 functionality. Opening the file selection dialog is just f := FileSelect(). The GUI framework is really, really good. Honestly the best of any language I've used, at least for small things. Example problems: Audacity doesn't let you configure mouse shortcuts, so I used AutoHotKey to map the middle-mouse to a keyboard shortcut anyway. #HotIf WinActive("ahk_exe audacity.exe") MButton::Send "^l" ; silence selection #HotIf I made typing `;iso` fill in the current date. :R:;iso:: { Send(FormatTime(,"yyyy-MM-dd")) } This is a tool I use to take timestamped notes. ; right-ctrl + d >^d:: { TimeString := FormatTime(,"MM/dd hh:mm tt") t_msg := InputBox(,TimeString,"w200 h100") if t_msg.Result = "OK" { timestampfile := A_WorkingDir . "\Config\timestamps.txt" FileAppend(TimeString . "`t" . t_msg.Value . "`r`n", timestampfile) } } Other uses: launch REPLs for toolbox languages. Input the 100-keypress sequence required to beat one videogame (if you know, you know). Further reading: Learn AutoHotKey by stealing my scripts Somehow AutoHotKey is Kinda Good Now In Praise of AutoHotKey J An array language, like APL. Really good at doing arithmetic on arrays, hair-pullingly frustrating at doing anything with strings or structured data. I used to use it a lot but I've mostly switched to other tools, like Excel and Raku. But it's still amazing

## Composing TLA+ Specifications with State Machines

DevFeed: [Composing TLA+ Specifications with State Machines](<https://devfeed.tech/articles/composing-tla-specifications-with-state-machines-52978.md>)

Original publisher: [Read original article](<https://www.hillelwayne.com/post/composing-tla/>)

Published: 2024-06-17T00:00:00Z

Content type: article

Language: en

Sources: [Hillel Wayne](<https://devfeed.tech/sources/hillel-wayne.md>)

Topics: [Specifications](<https://devfeed.tech/topics/specifications.md>), [systems](<https://devfeed.tech/topics/systems.md>)

Tags: [blub-studies](<https://devfeed.tech/tags/blub-studies.md>), [formal-methods](<https://devfeed.tech/tags/formal-methods.md>), [specifications](<https://devfeed.tech/tags/specifications.md>), [state](<https://devfeed.tech/tags/state.md>), [systems](<https://devfeed.tech/tags/systems.md>), [tla-plus](<https://devfeed.tech/tags/tla-plus.md>)

### AI overview

An advanced discussion of composing large TLA+ specifications. It presents a worker-and-server example and explains why independently written specifications can impose contradictory constraints on shared variables, then introduces an approach for integrating component specifications into a whole-system specification.

### Source excerpt

Last year a client asked me to solve a problem: they wanted to be able to compose two large TLA+ specs as part of a larger system. Normally you're not supposed to do this and instead write one large spec with both systems hardcoded in, but these specs were enormous and had many internal invariants of their own. They needed a way to develop the two specs independently and then integrate them with minimal overhead. This is what I came up with. Warning: this is a complex solution is aimed at advanced TLA+ users. For a much (much) gentler introduction, check out my website learntla. The example Let's start by giving a motivating system: a Worker sends an authentication request to a Server. If the password matches the server's internal password, the server responds "valid", otherwise it responds "invalid". If the worker receives "invalid" as a response, it goes into an error state. The worker can retry from that state and submit a new authentication request. The worker and server have shared state via the request/response. As an additional complication, we'll add internal state to the server, in the form of a request log that is hidden from the worker. We can use this example to show the problems of composition and my solution (though I'll say the example is a little too simple to make it worthwhile). The problem with composition What we want is for the composition to be as simple and painless as possible. If our specs are WorkerSpec and ServerSpec, the easiest composition would just be CombinedSpec == WorkerSpec /\ ServerSpec I talk about the problems we have in-depth here, but the gist is that if ServerSpec and WorkerSpec are "normal" specs, they'll place contradictory constraints on the shared variables. For example, WorkerSpec will likely read the server response, but not modify it. So to run WorkerSpec independently of the composition, we have to say the response never changes, which is equivalent to saying we can't change it, which makes it impossible for ServerSpe

## What We Know We Don't Know: Empirical Software Engineering

DevFeed: [What We Know We Don't Know: Empirical Software Engineering](<https://devfeed.tech/articles/what-we-know-we-don-t-know-empirical-software-engineering-52990.md>)

Original publisher: [Read original article](<https://www.hillelwayne.com/talks/ese/ddd/>)

Published: 2024-05-29T00:00:00Z

Content type: article

Language: en

Sources: [Hillel Wayne](<https://devfeed.tech/sources/hillel-wayne.md>)

Topics: [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>), [Domain-driven design (DDD)](<https://devfeed.tech/topics/domain-driven-design.md>), [Software Testing](<https://devfeed.tech/topics/software-testing.md>), [software-architecture](<https://devfeed.tech/topics/software-architecture.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>), [Code quality](<https://devfeed.tech/topics/code-quality.md>), [Microservices](<https://devfeed.tech/topics/microservices.md>), [Monitoring](<https://devfeed.tech/topics/monitoring.md>), [Scalability](<https://devfeed.tech/topics/scalability.md>), [Code](<https://devfeed.tech/topics/code.md>), [C](<https://devfeed.tech/topics/c.md>), [Java](<https://devfeed.tech/topics/java.md>)

Tags: [consistency](<https://devfeed.tech/tags/consistency.md>), [ddd](<https://devfeed.tech/tags/ddd.md>), [development](<https://devfeed.tech/tags/development.md>), [distributed-data](<https://devfeed.tech/tags/distributed-data.md>), [domain-driven-design](<https://devfeed.tech/tags/domain-driven-design.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [microservices](<https://devfeed.tech/tags/microservices.md>), [monitoring](<https://devfeed.tech/tags/monitoring.md>), [programming](<https://devfeed.tech/tags/programming.md>), [refactoring](<https://devfeed.tech/tags/refactoring.md>), [replication](<https://devfeed.tech/tags/replication.md>), [scalability](<https://devfeed.tech/tags/scalability.md>), [software](<https://devfeed.tech/tags/software.md>), [software-development](<https://devfeed.tech/tags/software-development.md>), [software-engineering](<https://devfeed.tech/tags/software-engineering.md>)

### AI overview

A talk on empirical software engineering examines how evidence, studies, and peer review can establish what works in software development. It discusses research methods and findings related to testing, programming languages, code quality, domain-driven design, microservices, and distributed data systems.

### Source excerpt

This version of the talk was given at DDD Europe, 2024. Technology is a multitrillion dollar industry, but we know almost nothing about how it's best practiced. Empirical Software Engineering, or ESE, is the study of what works in software and why. Instead of trusting our instincts we collect data, run studies, and peer-review our results. This talk is all about how we empirically find the facts in software and some of the challenges we face, concluding with a guide on how to find existing research and an overview on some things we've learned about DDD. Slides are here. Sources I referenced a bunch of papers in my talk. These are links so you can read them yourself: Intro Big Data is slower than laptops Scalability! But at what COST? Why we care Section references The Pragmatics of TDD TDD is dead. Long live testing. Methods Controlled Trials Comparing syntax highlightings and their effects on code comprehension Natural Experiments Simple Testing Can Prevent Most Critical Failures Natural Experiments Gone Rogue A Large Scale Study of Programming Languages and Code Quality in Github (original faulty study) On the Impact of Programming Languages on Code Quality (replication study) My 6,000 word writeup of the whole fiasco Observational Studies Fixing Faults in C and Java Source Code: Abbreviated vs. Full-Word Identifier Names (preprint) DDD Survey Paper Domain-Driven Design in Software Development: A Systematic Literature Review on Implementation, Challenges, and Effectiveness Interesting Papers Design, Monitoring, and Testing of Microservices Systems: The Practitioners' Perspective Practitioner Views on the Interrelation of Microservice APIs and Domain-Driven Design: A Grey Literature Study Based on Grounded Theory Refactoring with domain-driven design in an industrial context Tackling Consistency-related Design Challenges of Distributed Data-Intensive Systems - An Action Research Study Note that there are other interesting papers in the survey paper, these are just

## Software Friction

DevFeed: [Software Friction](<https://devfeed.tech/articles/software-friction-52985.md>)

Original publisher: [Read original article](<https://www.hillelwayne.com/post/software-friction/>)

Published: 2024-05-01T00:00:00Z

Content type: opinion

Language: en

Sources: [Hillel Wayne](<https://devfeed.tech/sources/hillel-wayne.md>)

Topics: [Software](<https://devfeed.tech/topics/software.md>), [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>), [Requirements](<https://devfeed.tech/topics/requirements.md>), [Security](<https://devfeed.tech/topics/security.md>), [Deployment](<https://devfeed.tech/topics/deployment.md>), [Developer Tools](<https://devfeed.tech/topics/developer-tools.md>), [API](<https://devfeed.tech/topics/api.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [deployment](<https://devfeed.tech/tags/deployment.md>), [development](<https://devfeed.tech/tags/development.md>), [requirements](<https://devfeed.tech/tags/requirements.md>), [security](<https://devfeed.tech/tags/security.md>), [software](<https://devfeed.tech/tags/software.md>), [software-development](<https://devfeed.tech/tags/software-development.md>), [terms](<https://devfeed.tech/tags/terms.md>), [tooling](<https://devfeed.tech/tags/tooling.md>), [upgrade](<https://devfeed.tech/tags/upgrade.md>)

### AI overview

The article applies Clausewitz's concept of friction to software development, describing how API changes, bugs, security alerts, dependency upgrades, staffing disruptions, unclear requirements, outages, and broken tooling create compounding difficulties. It discusses why friction increases with project scope and time and considers deployment practices and process changes for reducing its impact.

### Source excerpt

In his book On War, Clausewitz defines friction as the difference between military theory and reality: Thus, then, in strategy everything is very simple, but not on that account very easy. Everything is very simple in war, but the simplest thing is difficult. These difficulties accumulate and produce a friction, which no man can imagine exactly who has not seen war. As an instance of [friction], take the weather. Here, the fog prevents the enemy from being discovered in time, a battery from firing at the right moment, a report from reaching the general; there, the rain prevents a battalion from arriving, another from reaching in right time, because, instead of three, it had to march perhaps eight hours; the cavalry from charging effectively because it is stuck fast in heavy ground. Ever since reading this, I've been seeing "friction" everywhere in software development: A vendor's API doesn't work quite as you thought it did, or it did and then they changed it. Bugs. Security alerts. A dependency upgrade breaks something. Someone gets sick. Someone's kid gets sick. Someone leaves the company. Someone leaves for Burning Man. The requirements are unclear, or a client changes what they want during development. A client changes what they want after development. A laptop breaks or gets stolen. Slack goes down for the day. Tooling breaks. Word changes every font to wingdings. (This is a real thing) This list is non-exhaustive and it's not possible to catalogue all possible sources of friction. Some Properties of Friction Friction matters more over large time horizons and large scopes, simply because more things can go wrong. Friction compounds with itself: two setbacks are more than twice as bad as one setback. This is because most systems are at least somewhat resilient and can adjust itself around some problem, but that makes the next issue harder to deal with. (This is a factor in the controversial idea of "don't deploy on Fridays". The friction caused by a mistake duri

## Avoiding unrealistic constraints in Alloy specifications

DevFeed: [Avoiding unrealistic constraints in Alloy specifications](<https://devfeed.tech/articles/don-t-let-alloy-facts-make-your-specs-a-fiction-52977.md>)

Original publisher: [Read original article](<https://www.hillelwayne.com/post/alloy-facts/>)

Published: 2024-04-10T00:00:00Z

Content type: article

Language: en

Sources: [Hillel Wayne](<https://devfeed.tech/sources/hillel-wayne.md>)

Topics: [Specifications](<https://devfeed.tech/topics/specifications.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Package Management](<https://devfeed.tech/topics/package-management.md>)

Tags: [alloy](<https://devfeed.tech/tags/alloy.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [dependency](<https://devfeed.tech/tags/dependency.md>), [enums](<https://devfeed.tech/tags/enums.md>), [error-handling](<https://devfeed.tech/tags/error-handling.md>), [formal-methods](<https://devfeed.tech/tags/formal-methods.md>), [input](<https://devfeed.tech/tags/input.md>), [invariant](<https://devfeed.tech/tags/invariant.md>), [specifications](<https://devfeed.tech/tags/specifications.md>)

### AI overview

The article explains how overly strong Alloy facts can make invalid system states impossible to represent, preventing the specification from testing error handling. It uses package dependency models, including self-dependencies, to show why specifications should represent both valid software behavior and invalid environmental inputs.

### Source excerpt

I've recently done a lot of work in Alloy and it's got me thinking about a common specification pitfall. Everything in the main post applies to all formal specifications, everything in dropdowns is for experienced Alloy users. Consider a simple model of a dependency tree. We have a set of top-level dependencies for our program, which have their own dependencies, etc. We can model it this way in Alloy: sig Package { , depends_on: set Package } run {some depends_on} Show Alloy tip I'm going to use a slightly different model for the next example: abstract sig Package { , depends_on: set Package } lone sig A, B extends Package {} run {some depends_on} I do things this way because it gives visualizations with A and B instead of Package$0 and Package$1. Alloy has built-in enums but they don't play nice with the rest of the language (you can't extend them or give them fields). show all If we look through some of the generated examples, we see something odd: a package can depend on itself! These kinds of nonsensical situations arise often when we're specifying, because we have an intent of what the system should be but don't explicitly encode it. When this happens, we need to add additional constraints to prevent it. For this reason, Alloy has a special "fact" keyword:1 fact no_self_deps { all p: Package { p not in p.depends_on } } Show Alloy tip You can write the same fact purely relationally: fact { no depends_on & iden } In general, the model checker evaluates purely-relational expressions much faster than quantified expressions. This can make a big difference in large models! show all Alloy will not generate any models that violate a fact, nor will it look for invariant violations in them. It's a "fact of reality" and doesn't need to be explored at all. The pitfall of facts "No self-deps" is a great example of a fact. It's also an example of a terrible fact. Beginners often make this mistake where they use facts to model the system, which quickly leads to problems. Cons

## Responses on Representing Graphs as Matrices

DevFeed: [Responses on Representing Graphs as Matrices](<https://devfeed.tech/articles/comment-section-the-hunt-for-the-missing-data-type-52974.md>)

Original publisher: [Read original article](<https://www.hillelwayne.com/comments/graph-types/>)

Published: 2024-03-18T00:00:00Z

Content type: article

Language: en

Sources: [Hillel Wayne](<https://devfeed.tech/sources/hillel-wayne.md>)

Topics: [Graphs](<https://devfeed.tech/topics/graphs.md>), [Data structures](<https://devfeed.tech/topics/data-structures.md>), [data](<https://devfeed.tech/topics/data.md>), [NumPy](<https://devfeed.tech/topics/numpy.md>), [Supercomputing](<https://devfeed.tech/topics/supercomputing.md>), [Machine learning](<https://devfeed.tech/topics/machine-learning.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [data](<https://devfeed.tech/tags/data.md>), [data-structures](<https://devfeed.tech/tags/data-structures.md>), [graph](<https://devfeed.tech/tags/graph.md>), [graphs](<https://devfeed.tech/tags/graphs.md>), [python](<https://devfeed.tech/tags/python.md>), [supercomputing](<https://devfeed.tech/tags/supercomputing.md>)

### AI overview

A collection of responses discusses whether graphs should be treated as a missing data type. The discussion explains the mathematical equivalence between graphs and matrices, representations for hypergraphs and multigraphs, and the performance challenges of using dense matrices for sparse graphs.

### Source excerpt

I got a lot of responses to The Hunt For the Missing Data Type. I've included some of the most interesting ones below. Response Blogs The "missing" graph datatype already exists. It was invented in the '70s, about datalog. Emails and Comments Everything in quotes is verbatim. GraphBLAS My name is Michel Pelletier, I'm one of the contributors to the GraphBLAS API standard and python bindings. Congrats on your blog going up to the front page on HN. I replied with some information that I think you might find useful to your question, but it's pretty buried under a lot of the discussion there. I noticed that you invite people to email you, so I decided to send you the information directly. The graph data type you're missing is the one you already mentioned, a matrix. You mention adjacency matrices, but in the context of your blog post, they're considered only a storage format, not the graph itself. But graphs and matrices are conceptually and algebraically isomorphic. All graphs, and thus all composite data structures, are mathematically matrices, and all matrices are graphs. Hypergraphs and Multigraphs are represented by "Incidence Matrices" which are node-to-edge to edge-to-node adjacencies using two rectangular matrices. A really excellent introductory paper by a large group of researchers, spearheaded by Dr. Jeremy Kepner, Director of the Supercomputing Center and MITs Lincoln Laboratory is: https://arxiv.org/pdf/1606.05790.pdf The issue with computers and thinking of graphs as matrices is that most graphs are sparse, and most matrix libraries (like numpy) are dense. This makes using adjacency matrices very expensive, since most of the "space" in a dense matrix ends up being zero. This is extremely inefficient and defeats cache hierarchies typical of von Neumann architectures. These two worlds have not quite converged yet. There is however a lot of research and development around efficient sparse matrix computation, and thus, sparse graph analysis. While these may se