by Stephen Ball

Rewriting my Protohackers repo as an umbrella appMy existing setup for my protohackers problems repo with one big application running a bunch of smaller servers each with their own domains was February 15, 2023

Add more OTP implementation of Speed Daemon - sdball/protohackersThanks again to @whatyouhide for the example code. I added it to this repo by retyping (and somewhat tweaking) the reference implementation. I February 12, 2023 Elixir Protohackers

More OTP solution for Protohackers Problem 5 - sdball/protohackersThanks to @whatyouhide for his Protohackers in Elixir: day 5 video! His guide was a hugely great refresher for me into how to setup a proper February 9, 2023 Elixir Protohackers

Solving Protohackers Problem 6 - sdball/protohackersThis commit solves Protohackers Problem 6 The problem was a huge jump up in complexity from problems 1-5, but that’s great because I learned a lot! January 16, 2023 Elixir Protohackers

Add MobInTheMiddleServer - sdball/protohackersProtohackers problem 5: https://protohackers.com/problem/5 Ahh an actual machine-in-the-middle attack! And performed against our own chat server January 14, 2023 Elixir Protohackers

Rewrite ChatRoomServer to use active sockets - sdball/protohackersThanks to @whatyouhide for the insightful feedback pointing me in a better direction! The main effect of this change is to make the the input loop January 12, 2023 Elixir Protohackers

Add UnusualDatabaseProtocolServer - sdball/protohackersHey UDP! Fast, connection-less, order-less, state-less, error-prone packets! Ok maybe error-prone is too harsh, but I ran into errors with the January 11, 2023 Elixir Protohackers

Add ChatRoomServer - sdball/protohackershttps://protohackers.com/problem/3 Protohackers problem 3 was a fun one! I opted to use Elixir’s Registry to hold the state of joined users. That January 8, 2023 Elixir Protohackers

Using git-blogSo if you know my work at all you know that I love writing good and comprehensive Git commits. Until now all of that writing was locked up in my January 8, 2023 Git

Add git-blog - sdball/dotfilesTurn my nicely written git commits into blog posts! e2f73fe43722aeaa5bd9b9fc929f3e2c806bd7cb on sdball/dotfiles January 8, 2023 Git

Add helix shortcuts - sdball/dotfilesC-f will run the format command which uses the current language server to format the file. C-r will reflow (hard wrap) the current selected text to January 8, 2023 Helix

Add AssetPriceServer - sdball/protohackershttps://protohackers.com/problem/2 Note I had to specially handle SIGNED 32-bit integers Elixir defaults to unsigned integers price: 4294966986 January 5, 2023 Elixir Protohackers

Reduce the complexity of the IsPrimeServer - sdball/protohackersI’m happier with this version but I’m not entirely sold on my use of with in the core respond_to_lines_until_closed path. One the one hand: it does January 5, 2023 Elixir Protohackers

Comprehensively redesign IsPrimeServer - sdball/protohackersThe first major issue was that the protohackers challenges threw a literal zero at my prime number module I stole from the Internet. That prime January 4, 2023 Elixir Protohackers

Things I’ve learned deploying a Phoenix 1.7 app using Bandit to fly.ioOver the past few days I’ve been developing a hobby site (furtherfrom.com) using Phoenix 1.7 and fly.io. I ran into a few snags along the way. I’ll December 28, 2022 Elixir Phoenix fly.io

Getting AlpineJS to work with Phoenix 1.7I wanted to follow along with the very excellent blog post Autocomplete Search Component with Phoenix LiveView and AlpineJS but translate it to November 24, 2022 Elixir Phoenix AlpineJS

Maintainable CodeWhen we say “maintainable code” what does that mean? I say that it means code that is easy to change in order to accommodate new features or November 14, 2022 programming

Elixir Conf 2022 Talk: Livebook Smart Cells are AmazingMy talk from ElixirConf 2022 "Livebook smart cells are amazing" November 1, 2022 Elixir Livebook

GIFs from my 2022 ElixirConf talk: “Livebook smart cells are amazing”"JavaScript is uncivilized" and "dancing with smart cells" August 31, 2022 Elixir

Stephen’s Strange Leaflet about Elixir - Page 8The page about Elixir loops and recursion. Dive deep into the `Enum.into/2` function and see how that standard library abstraction works at a low level for a specific case. July 9, 2022 Elixir

Stephen’s Strange Leaflet about Elixir - Page 7The page about the power of pattern matching and how it leads to elegant code. June 28, 2022 Elixir

Stephen’s Strange Leaflet about Elixir - Page 6In which I describe how state is a deliberate decision in Elixir. June 27, 2022 Elixir

Stephen’s Strange Leaflet about Elixir - Page 5In which we talk about immutable data and how that doesn't actually mean you can't conceptually change any data in the system. June 20, 2022 Elixir

Stephen’s Strange Leaflet about Elixir - Page 4Thinking in Elixir processes. Shifting to thinking in processes is one of the biggest leaps that separates someone who knows the Elixir language syntax from someone who writes idiomatic Elixir. June 19, 2022 Elixir

Stephen’s Strange Leaflet about Elixir - Page 3The page about what is even an Elixir process June 18, 2022 Elixir

Stephen’s Strange Leaflet about Elixir - Page 2Learn about the BEAM and how Elixir processes work together to enable concurrency. June 13, 2022 Elixir

Stephen’s Strange Leaflet about Elixir - Page 1ELIXIR is a language of adventure, danger, and low cunning. In it you will explore some of the most amazing territory ever seen by mortals. No computer should be without one! June 12, 2022 Elixir

Let’s query the GitHub GraphQL API from a Livebook smart cellContinuing from last time when we wrote an absolutely minimal livebook smart cell we’re going to write a Livebook smart cell that allows us to May 22, 2022 Elixir Livebook GraphQL

Let’s write an Elixir Livebook smart cellWhat’s a Livebook? Livebook is awesome. It’s an Elixir programming notebook! You can run Livebook locally or hosted on the Internet. The Livebook May 18, 2022 Elixir Livebook

A subtle Go bug that types cannot help withI ran into this bug while going through the highly excellent “Powerful Command-Line Applications in Go” by Ricardo Gerardi The following April 4, 2022 go

swapcase with the tr commandWant to easily swap the case of some string on the *nix command line? The tr command can do that! You may already know the tr command can switch April 1, 2022 command line

nice go test outputThe go test command is alright and props to go for being like a real modern language with built-in support for testing. But its output is decidedly March 16, 2022 programming go

See where vim settings came fromEver wonder which plugin or config in vim is responsible for setting something like tabs to represent as four spaces? (e.g. ts=4) Wonder no more! March 15, 2022 vim

Containers in the real world and backpressure in distributed systemsDid you ever think that a city’s zoning laws could potentially affect the entire global economy? This fascinating Twitter thread goes into details October 27, 2021

Elixir Phoenix and “role postgres does not exist”If you’re trying to follow along the Elixir Phoenix Up and Running guide you may run straight into this error if you’re using homebrew’s Postgres August 30, 2021 programming Elixir

From awk to a Dockerized Ruby ScriptFor a programming project I wanted to easily get a list of the printable ASCII characters such that I could easily loop through them and do some August 8, 2021 programming command line

Finding leap years with the cal commandDid you know that there’s a calendar in the macOS and Linux command line? There is! A quick check of tldr shows how useful this utility can be But July 11, 2021 programming command line

The Problem of StateAmong all the problems we create for ourselves when programming systems state is perhaps the most troublesome to deal with. Decisions made about the May 1, 2021 programming editorial functional

Clojure Functions in Four WaysPerl may have coined TMTOWTDI (there’s more than one way to do it) but Clojure takes that idea and runs very far with it. Today I’d like to quickly January 31, 2021 clojure programming

See Some ClojureHave you seen any Clojure code? Yes? You’ll almost certainly not see anything new or interesting here. No? Let’s change that! I’m certainly not an January 19, 2021 clojure programming

A simple language spec isn’t a feature when you’re building applicationsGo famously gushes about its simple and readable language specification. On one hand kudos to Go for having a written specification and kudos for October 11, 2020 programming editorial go

The Fastest Possible TestsI love tests as a fast programming feedback loop! In the last twenty or so years I’ve seen them go from an occasional critical verification to a October 3, 2020 programming

Shrink your data into bitfields (and out again)Some applications want to save every byte. Every last byte! Maybe they have memory constraints, maybe they’re sending data over the network, maybe April 29, 2020 programming

Every “if” statement is an object waiting to be extractedConsider the following Ruby code. So we’re modeling beverages. Great! Our class can accept a kind of beverage and then respond to some messages February 18, 2020 programming

Choose Generic ToolsUpstream your tooling instead of rolling your own. The more you push upstream to gems or Rails, the less logic you need in your application. Save January 2, 2020 programming

Hyperlinks you might find interesting — #4How to annotate literally everything Calculus Explained with pics and gifs Paw — API tool for Mac (50% OFF Black Friday Sale) Diagram.Codes xkcd: December 2, 2019 links

Running bundle install on rails master“Ok! Let’s check out this Rails 6 goodness”, I thought. Clone rails/rails — easy Look around the latest commits — a great way to see what’s been November 30, 2019 rails

Use tldr for command line examplesIf you use the command line you’ve probably already seen manual pages, accessed via the man command. man pages are great when you need a full November 19, 2019 command line

Friday Lunch Links — #3Speaking of Diversity: find engineering teams that share your values with Key Values. It’s a nice tool that allows you to select values you’re November 15, 2019 links

Friday Lunch Links — #2Dark Matter: A Primer (PDF) — An excellent academic paper detailing the numerous pieces of evidence we’ve accumulated on the actual, measurable November 9, 2019 links