首页›发现›编程›Hillel Wayne

Hillel Wayne

RSS
访问网站
文章数17
更新频率近 8 周没有更新
最近抓取21分钟前
订阅方式RSS
订阅地址https://www.hillelwayne.com/index.xml

最近的文章

订阅后,这些文章和以后的新文章都会出现在你的阅读器里

A Crash Course in Predicate Logic

AI 摘要This article, adapted from the second chapter of the book Logic for Programmers, is a crash course in formal logic for programmers. It explains predicates as Boolean-returning functions that can be concrete or abstract, uses a CanRunProgram example and truth tables to show how formal logic removes ambiguity from natural-language requirements, and introduces the implication operator (=>) along with sets for constraining predicate inputs.

Logic for Programmers is Now Available

AI 摘要The author announces the release of their book, Logic for Programmers, which took five years to write and teaches working developers the basics of formal logic and its applications, including property-based testing, domain modeling, and logic programming. The book was created because no programmer-focused resources existed for learning these fundamentals, and it requires no math background. Early access buyers can get version 1.0 for free on Leanpub.

Chicago vs New York Pizza is the Wrong Argument

AI 摘要The author, writing for April Cools, argues that the classic 'Chicago vs New York pizza' debate is meaningless because deep dish is a special-occasion food while New York-style pizza is an everyday food, making them poor points of comparison. Instead, they propose comparing New York pizza to the Chicago-style hot dog as role-equivalent iconic local foods, ultimately conceding that NYP wins for ease of home preparation while praising the Chicago dog as a superior hot dog. The piece closes as a celebration of other Chicago specialties like Italian beef, the jibarito, and flaming saganaki.

Some Silly Z3 Scripts I Wrote

AI 摘要The author shares a collection of discarded Z3 example scripts (written with Python bindings) produced while working on their book 'Logic for Programmers', explaining that Z3 is an SMT solver that finds values satisfying mathematical and programming constraints. The examples range from solving equation systems and math puzzles about equal sums and products, to optimizing annual bank deposits, reverse engineering a pseudorandom number generator's parameters, proving theorems by checking for counterexamples, and maximizing stock trade profit. Along the way, the article demonstrates Z3 features like the Optimize solver, the theory of arrays, and constraint checking with additional temporary constraints.

A Very Early History of Algebraic Data Types

AI 摘要The article traces the earliest history of algebraic data types back to John McCarthy's 1961 paper 'A Basis for a Mathematical Theory of Computation,' which introduced Cartesian products and 'direct unions' along with their algebraic properties like isomorphism and distributivity. The author then follows how these ideas spread through Tony Hoare's work on data structuring in imperative languages, where 'discriminated union' was coined, and through Rod Burstall's structural induction work that influenced functional programming. Finally, the author disputes the common claim that Landin's ISWIM was the first language with algebraic data types, arguing it was merely a proposal and likely never actually defined sum types.

Gamer Games for Non-Gamers

AI 摘要Written as part of the 'April Cools' tradition, this article recommends video games that are accessible to non-gamers, using criteria such as running on ordinary hardware, requiring no prior gaming knowledge, being culturally meaningful, and being games the author has personally seen non-gamers enjoy. The author details four picks—Baba is You, Stardew Valley, The Case of the Golden Idol, and Balatro—explaining each game's mechanics, appeal, and historical context within its genre. The piece aims to lower the barrier to entry into gaming, which despite being a half-trillion-dollar industry remains surprisingly niche compared to movies or music.

A Perplexing Javascript Parsing Puzzle

AI 摘要The article explains a JavaScript quirk where `x --> 0` at the start of a line is parsed as a line comment (equivalent to `//`), so `x = 1` followed by `x --> 0` prints 1 rather than evaluating a decrement-and-comparison. This behavior is a legacy hack from the Netscape Navigator 2 era, when developers wrapped scripts in HTML comments so older browsers wouldn't render the code as plain text. Because the standards committee refuses to break existing websites, the 2015 ECMAScript standard officially added `` as legal comment tokens, and browsers—as well as Node and Electron via their shared V8 engine—continue to support them.

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

AI 摘要The article applies the Hierarchy of Controls, a workplace safety framework, to software engineering by using the author's own mistake of accidentally dropping a production database as a junior developer as an example. It walks through each control tier—elimination, substitution, engineering controls, administrative controls, and personal protective equipment—showing how each could prevent production incidents and noting their limitations in a software context. The author concludes that software is especially well-suited to engineering controls, since artificial interfaces can be cheaply modified to eliminate hazards or enforce constraints.

Hiatus

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

AI 摘要The author defines 'toolbox languages' as programming languages that solve problems quickly without third-party packages, and reviews their more obscure picks: AutoHotKey for GUI automation, J for array arithmetic, Frink for calculations with units, Raku for scripting and CLI tools, and Picat for logic and constraint programming. They also outline what makes a good toolbox language—terse syntax, rich builtins, a solid REPL, and a smooth learning curve—along with tools they still wish existed, such as an easier APL and better web-scraping options.

Composing TLA+ Specifications with State Machines

AI 摘要The article presents a technique for composing independently-developed TLA+ specifications, motivated by a Worker-Server authentication example where naive composition of specs leads to contradictory constraints on shared variables. The author's solution models the core component as an abstract state machine, writes other components as 'open' specs with internal/external variable separation, and uses a Sync action in the main spec that leverages TLA+'s primed-variable feature to add guards and side effects to state transitions. This allows the specs to be developed independently and integrated with minimal overhead, with the Sync action driving communication effects and constraints between components without requiring them to know about each other.

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

AI 摘要This article accompanies a talk given at DDD Europe 2024 about Empirical Software Engineering (ESE), the discipline of studying what actually works in software development through data collection, studies, and peer review rather than relying on instinct. It outlines the main research methods used—controlled trials, natural experiments, and observational studies—and provides extensive links to the papers and sources referenced in the talk. The piece concludes with findings related to Domain-Driven Design and answers to audience questions about what science can and cannot conclude about software practices.

Comment Section: Software Friction

AI 摘要This piece collects reader responses to an article on software friction, centered on feedback from a US Marine Corps infantry officer who explains how the military trains personnel to recognize and manage friction early in their careers. He recommends adopting 'hot washes'—immediate post-operation reviews of what went well and poorly—which differ from typical postmortems in that points are recorded in a standard format and archived in lessons-learned libraries for future reference. He also notes that the Marine Corps' high turnover makes such persistent written knowledge storage essential for preserving institutional understanding.

Software Friction

AI 摘要The article applies Clausewitz's military concept of 'friction'—the gap between plans and reality—to software development, where countless small disruptions like bugs, changing requirements, broken tooling, and absent teammates compound over time and scope. The author argues friction is inevitable and cannot be fully anticipated, but it can be reduced through smaller scopes and shorter iterations, autonomy, redundancy, better planning, automation, experience, gaming, and checklists, each with its own trade-offs. He concludes by posing open questions about categorizing friction, how other fields handle it, and how to balance friction mitigation against efficiency.

Don't let Alloy facts make your specs a fiction

AI 摘要The article describes a common pitfall in formal specification (particularly in Alloy): using 'facts' to enforce constraints like 'no self-dependencies,' which makes illegal states unrepresentable and prevents the model checker from verifying how software handles bad inputs from its environment. The author recommends using predicates instead, so constraints are explicit and testable, and reserving facts for legitimate uses such as narrowing the scope of a problem, ruling out uninteresting cases, optimizing slow models, and defining relationships Alloy can't express natively.

How old is the name 'Daniel'?

AI 摘要The author investigates whether the name 'Daniel'—first attested in the Ugaritic Tale of Aqhat around 1350 BCE—is the ancestor of the modern name, tracing it through the fall of Ugarit, the Phoenician/Canaanite world, and into the Hebrew Book of Ezekiel. Despite sparse evidence caused by Bronze Age Collapse and the use of rotting papyrus, the author argues the name persisted through a shared Canaanite cultural consciousness, with the Ugaritic and Hebrew versions both meaning 'God judged.' The piece concludes that Daniel may be the oldest attested name still in common use today.

Comment Section: The Hunt For The Missing Data Type

AI 摘要This follow-up post collects reader responses to the author's essay 'The Hunt for the Missing Data Type,' including a detailed explanation from GraphBLAS contributor Michel Pelletier arguing that graphs and matrices are mathematically isomorphic and that expressing graph operations as sparse linear algebra enables efficient parallelization on architectures from laptops to supercomputers. Other readers point out the Gremlin/TinkerPop graph query language and describe Rubik's Cube research using Cayley graphs, where the author had to build custom data structures because the ~10^20 position state space and performance demands made generic libraries impractical. The common thread is that graph tools do exist, but performance-critical or highly specialized applications often force developers to roll their own solutions.