How to read from a TCP socket (but were too afraid to ask)
Sat 10 February 2024
You can get surprisingly far, before it bites you, with only a fuzzy and incorrect understanding of how you should read from a TCP socket.
I see this often in (failing) Protohackers solutions.
Once you are over the initial hurdle of reading enough documentation to actually get a TCP session connected,
there are 2 key things you need to understand: Read more
Problems with Protohackers
Fri 18 November 2022
This is a list of things wrong with Protohackers,
and my thoughts on what to do about them. Read more
Solving Protohackers with Fly.io
Sat 24 September 2022
This post walks you through hosting a Go solution for the
Protohackers Smoke
Test problem using Fly.io for free hosting. Read more
Protohackers problem 2 retrospective
Sun 11 September 2022
I released Protohackers problem 2 on Thursday
evening. The problem asks you to implement a server that stores timestamped price data and lets
clients query the mean price over custom time ranges. (This post contains potential spoilers for
the problem; if you have not solved it yet, and you would like to solve it, then to avoid disappointment you should not read this until after you've solved it!). Read more
Protohackers problem 1 retrospective
Sat 27 August 2022
I released Protohackers problem 1 on Thursday evening.
The problem asks you to implement a server that accepts JSON-encoded requests, tests numbers for primality,
and gives JSON-encoded responses. (This post contains spoilers for the problem; if you have not solved it
yet, and you would like to solve it, then to avoid disappointment you should not read this until after you've solved it!). Read more
Protohackers: a new server programming challenge
Tue 23 August 2022
For the last couple of weeks I've been working on Protohackers, which is
a programming challenge where you have to implement a server for a network protocol,
and your server is automatically checked to see if it works properly. It's a bit like Advent of Code, but for networking instead of algorithms. Read more