Let's pwn!
Designing for deletion
11 October 2021
A few months ago my team had to kill a feature. Nothing dramatic; a half-finished onboarding flow product had quietly stopped believing in. The ticket said “remove the new welcome wizard.” I estimated two days. It took three weeks.
The wizard itself was about 400 lines. The reason it took three weeks
is that those 400 lines had grown roots. A flag on the user record. A
column in the analytics table. Three branches in the auth middleware. A
template partial pulled into the main layout. A background job that
“would be useful for other things later.” A helper in internal/util
that nine packages now imported. By the time we’d traced every tendril
the diff touched 60 files and the review thread looked like a hostage
negotiation.
I had been telling people for months that Go can “trivially” hold a million
idle TCP connections. The runtime uses epoll, goroutines are cheap, what
could go wrong. Then a colleague asked me to actually do it, and I realised
I had never tried. So I sat down with my laptop, a fresh net.Listen, and
a client that just wants to open a lot of sockets.
The first wall I hit was 1024 file descriptors. After that came five more walls in quick succession, none of them in user code. This post is the log of every wall I walked into and how to move it. Code, logs, and scripts are in the scratch directory.
Read More…Inlining budgets, and why your one-liner stayed slow
14 September 2020
After my map-lookup contribution to the Go compiler back in April, I kept poking the toolchain whenever a benchmark surprised me. Last week it surprised me again, and the lesson is short enough to fit in one post: Go inlines aggressively, but not infinitely, and the shape of your function matters more than its length.
The story starts with a three-line helper that I was sure the compiler would
inline. pprof disagreed.
My journey optimizing the Go Compiler
28 April 2020
At EDGE we write a lot of Go, and we love it for various reasons, one of them being speed. One day I got into a situation where I need to assign an int to a variable based on another string value.
Sounds easy right? well yes, but this particular use case awakened the beast in me and made me think what’s the best way to do it.
The journey finished by me contributing to the language compiler and make map lookups faster.
Noxale CTF: Grocery List (pwn)
9 September 2018
In this challenge, we are given a service IP and PORT, to which we can connect using netcat or any similar tool.
We are also provided with an ELF file.
