The Detector Was Not Impressed
One rewrite by the voice model still scores as fully AI, and ten rounds start bending the facts. Guards, a judge and rollbacks got the same text rated human in five runs out of five.
Small models, built by hand. 6 posts so far.
All of machine learningOne rewrite by the voice model still scores as fully AI, and ten rounds start bending the facts. Guards, a judge and rollbacks got the same text rated human in five runs out of five.
Training a small model on about 80,000 words of my own writing, and why one pass beats three. Its loss, and habits like how often I say we, show how close it gets.
Give a chat model 22 of my old posts and it rewrites plain text close to my voice, for cents. A detector still calls it all AI, and the unchanged words show why.
An ID3 decision tree in Kotlin that learns when to play tennis, from Tom Mitchell's classic example. Entropy and information gain decide each split, and Kotlin features like delegated properties keep the code short.
An ordered log, read three ways, folded into state.
3 posts · EventStore on GitHub
Messages, mailboxes and supervision, from Akka to Cats-Actors.
6 posts · Cats-Actors on GitHub
A bank account and a wire transfer, modelled with Akka's FSM mixin instead of raw become and unbecome. Explicit states keep actors out of spaghetti code, and the transfer runs at most once.
A web crawler built from Akka actors: getters fetch pages, a link checker keeps track and a crawl server hands out work. Supervision and timeouts show how actors tame concurrency, one message at a time.
A small number guessing game, rewritten step by step from procedural code into a functional program with its own IO type. The aim is not purity for its own sake, but more principled code.
Wile E. Coyote wants a purchase summary for every ACME customer. The same program is built imperatively, then with monad transformers, then with ZIO, which keeps it pure without paying for it at runtime.
Pierre the tightrope walker and his birds, simulated with exceptions, nulls and finally an Option. Functional programming turns out to be more than a refactor: a computation context gives you honest types and safe sequencing.
Lambda calculus is usually shown off with numbers and recursion. Here it goes to work on an everyday CMS problem instead: finding every URL for the sitemap, and each page's alternate language URLs.
A set library where each set is nothing but a function that says yes or no to an element. Union, intersection and difference follow naturally, and the line between code and data starts to blur.
Filter, map and reduce, put to work on a dataset of house listings. Four-bedroom houses in Cambria or the average listing price take a few composed functions, and maybe turn up a dream home.
Summing integers, cubes and factorials starts as three near-identical functions. A higher order function folds them into one, showing how JavaScript's first-class functions simplify everyday code.
SICP's picture language, translated from Scheme to JavaScript, where painters are just functions. Combining them with closures builds intricate patterns from simple parts, and shows why stratified design keeps programs easy to change.
What happens to your pods when GKE upgrades its nodes, from our Google Cloud Summit talk in Milan. Three takeaways keep disruptions small: redundancy, protection and giving Kubernetes insight through probes.
Why we moved to Kubernetes, from my talk at the first Google Cloud Event in Malta. Reactive microservices need scheduling, scaling, rolling updates and supervision, and Kubernetes handles all four.
A Spring Boot Hello World, packaged with Docker, pushed to a private registry and run on Kubernetes in Google Container Engine. Then a rolling update ships new code without taking the app down.
WordPress with ACF makes a free headless CMS, until the n+1 queries pile up. The ACF Compiler turns annotated classes into an efficient query plan, cutting our bootstrap times from a minute to seconds.
Angular routes are usually fixed at configuration time, which hurts when every language has its own URLs. UIRouter can declare states on the fly from a CMS sitemap, giving fully multilingual routes.
JSON rarely arrives in camelCase, so it cannot simply be cast onto a TypeScript class. A generic mapper driven by decorators does the conversion, handles arrays, and plugs into the AngularJS http service.
Why a big ng-repeat slows AngularJS down, traced through the digest cycle with Batarang. limitTo, infinite scroll and a timed variant of my own render long lists in small batches instead of all at once.
Global, CommonJS and AMD modules, built up from the simple fact that only functions create scope in JavaScript. A universal loader like SystemJS then lets all three live in the same project.
Set up a Slack team, connect Hubot, and write a small plugin that talks to GitHub. Ask hubot followup in Slack and the bot lists the issues that need following up.