"I Can Take It!"
One kind of person one comes across frequently is that one whose communication philosophy can be summarised like this: “I am very direct, even blunt, and can be perceived as rude, because I hate sugarcoating things. Don’t worry, I can take it, feel free to talk the same way to me.”
Now, that’s not helpful. The principle at work here - treat people like you want to be treated - can be a bit short-sighted sometimes. So is the opposite - treat people like they want to be treated - but can’t there be some middle ground?
The concept of “radical candor” is a good and important one. It has two components: care personally, and challenge directly. The two philosophies above each embody one of those components while ignoring the other. Neither one is ultimately great.
Check this out for a heads-up.
Tags: work
Mini Profiler
Profilers are power tools for understanding system performance. That doesn’t mean they have to be inherently complicated or hard to build. Here’s a great little specimen, in just a couple hundred (plus x) lines of Java code, including flame graph output.
Tags: hacking, the-nerdy-bit
Old Standard Textbook, Renewed
Back in university, one of my favourite courses was the one on microprocessor architecture. One of the reasons was that the lab sessions involved building logic circuits from TTL chips with lots of hand-assembled wiring (imagine debugging such a contraption). Another reason was the textbook, which explained a RISC processor architecture (MIPS) in great detail and with awesome didactics. This book was “The Patterson/Hennessy” (officially, it goes by the slightly longer and also a bit unwieldy title “Computer Organization & Design: The Hardware/Software Interface”).
This was the Nineties. Fast-forward 30 years to today, and we have a new and increasingly practical RISC architecture around: RISC-V. The good thing about this architecture is that it is an inherently open standard. No company owns the specification, anyone can (provided they have the means) produce RISC-V chips.
Guess what, that favourite book of mine got an upgrade too: there is a RISC-V edition! This means that students, when first venturing into this rather interesting territory, can learn the principles of CPU design on an open standard basis that is much less convoluted than certain architectures, and - unlike certain others - entirely royalty-free.
Makes me want to go to university again ...
Tags: the-nerdy-bit, hacking
Output is Small Steps
In the book “Atomic Habits” by James Clear, the author argues to focus on small steps to reach a big goal, instead of focusing on the big goal and getting frustrated by what seems to be slow progress, or intimidated by the sheer size of the end. This reminded me of the good old output / outcome dichotomy.
Outcome (the big end) takes time to achieve. Keeping the eyes on that can lead to losing sight of what’s important: the concrete next step. This step, like all the others, is a small change, and reaching the end goal is a journey of such small changes that will eventually have big consequences. These steps are the various instalments of output we need to generate to eventually deliver the outcome.
Next time you or your team are hit by analysis paralysis, and feel the tendency to slice those user stories in an epic way too big because the smaller ones don’t feel like making progress, take a step back, and err on the side of slicing the story smaller. It’s quicker to achieve, quicker to generate that nice bit of satisfaction when completed. And it will contribute to the epic nonetheless. What’s important is to be confident about getting there.
Tags: work
Tár
It's been a while since this was on the big screen. I still want to recommend the movie Tár. A masterpiece - I was completely captivated.
What helped make this happen was not just Cate Blanchett’s impeccable acting, but also that the story unfolds in a setting I’m at least a bit familiar with. I found the dialogues about music to be at a rather elevated level of nerdiness that I greatly enjoyed. Similarly, the depiction of how sheer power plays out in the highest spheres of cultural business struck some cords ... I’ve had my own introspections into that.
This is an absolutely fantastic movie.
Marvel Dice Throne
Marvel Dice Throne is a game involving rolling dice a lot (one might guess that given the name), and it has a nice deck / character building aspect, too.
Each player picks one of eight Marvel characters. For each character, there’s a whole collection of character board, individual cards, status tokens, and dice. That means the game’s box is sizeable.
The point of the game is to let up to four characters engage in a battle wherein they, bluntly spoken, smack one another around the place by applying various super powers. For my test, I chose to let Captain Marvel play against Black Panther - for no particular reason.
Each of the character boxes contains, as mentioned, a selection of items and cards. These are all set out to prepare the game. In the image below, you can see the setup at the start of the game. The characters start out at full health (indicated by the oblong counter to the upper left of the character tableau). They also have a certain amount of combat points (CP, indicated by the round counter). Each character also has a starting set of four cards.
The rules are learned quickly: in each round, the acting character first does some deck building by selling and playing cards (CP are the currency). Next, the character attacks an opponent, who can deflect (some of) the damage by activating defensive skills. This is followed by another round of deck building to wind things down. Each character has special abilities, which are depicted by special cardboard tokens. These add a lot of spice to the game, and make for some surprises.
So far, so good - it’s plain and simple. The game is fast-paced and quite a lot of fun, because the combinations of cards and special abilities, together with the random element added by the many many dice rolls, make for many variations. I can wholeheartedly recommend it.
Captain Marvel won this round, by the way. Narrowly.
Tags: games
PlanckForth
I had shared some discoveries I had made in Forth territory. Since these systems of minimal abstraction really fascinate me, I took a deep dive into the PlanckForth implementation and dissected the 1 kB ELF binary down to the last byte.
This is indeed a tiny Forth interpreter that does just the most basic things in machine code. It provides the foundation for a very consequential bootstrap to be executed on top of it. The bootstrap builds the actual Forth language from first principles in several waves.
In case you’re interested, here are the binary source and bootstrap with my comments. Note that I stopped commenting in the bootstrap once it gets to the point where the minimal Forth supports line comments.
What next? Part of me wants to build a handwritten RISC-V binary for the basic interpreter ...
Tags: the-nerdy-bit, hacking
More Forth
The Forth programming language is a thing I’ve previously written about. I recently came across this little gem of a talk, wherein the author points to some interesting resources about Forth. In particular, the slides put emphasis on how minimal a Forth implementation can be.
The point about Forth is that it heavily depends on threaded code. That’s a simple technique to implement an interpreter on the bare metal. In a nutshell, code to be executed by a threaded interpreter is mostly addresses of implementations of logic, that the very simple interpreter “loop” just loads and jumps to, following a “thread” of addresses through its implementation.
Indeed, Forth source code consists of just “words” that are concatenated to express semantics. These human-readable words are mere placeholders for the memory addresses where the words' implementations can be found. In other words, a Forth compiler is simplistic: it boils down to dictionary lookups.
To demonstrate the minimalism, the PlanckForth interpreter is just a 1 kB hand-written ELF binary. The syntax of the basic language this interpreter understands is a bit awkward, but sufficiently powerful to bootstrap a full-fledged Forth in just a couple hundred lines.
JonesForth is a richly documented Forth implementation. (You’ll have to go through the snapshot link to get the source code.) Reading the code is highly instructive.
Tags: the-nerdy-bit, hacking