Full Width [alt+shift+f] Shortcuts [alt+shift+k]
Sign Up [alt+shift+s] Log In [alt+shift+l]
93

The magic function

from Blog - Bitfield Consulting [alt+shift+b] in programming

How do you design user-friendly APIs in Rust? The answer is simple: you use them! Let’s build a simple Rust CLI tool using what I call the “magic function” approach.
3rd Jan 2025

Stay updated

Get a weekly newsletter with the top 5 articles worth reading every week.

More from Blog - Bitfield Consulting

Bobcoin, blockchains, and cryptocurrency

How do cryptocurrencies actually work, though? Join Alice and Bob as they embark on designing a new digital ledger for secure “Bobcoin” transactions.

12th Apr 2025 • 54 votes
Catching grace

Meditation is easy when you know what to do: absolutely nothing! It's hard at first, like trying to look at the back of your own head, but there's a knack to it.

12th Mar 2025 • 66 votes
Writing terrible code

The secret of being a great coder is to write terrible code. Wait, wait. Hear me out: I’m going somewhere with this.

27th Feb 2025 • 66 votes
Suite smells: undertesting and overtesting

Tests are great, provided they actually test something. But are your tests too optimistic (assuming the code already works), or too persnickety (testing the irrelevant)?

8th Dec 2024 • 116 votes

More in programming

SumatraPDF new features: March 18, 2026

New in the SumatraPDF pre-release builds: DDE commands accept arguments Commands sent via DDE can take arguments, the same as in custom shortcuts (#5383). Loading message in tab While a document loads, its tab shows a “loading” message instead of the home page (#5385). Install 32-bit on 64-bit Windows The installer lets you install the 32-bit version on 64-bit Windows (#5379). Changes for this day · Full changelog

16 hours ago • 1 votes
An Update on Orion for Linux and Windows

Kagi is ending development of Orion for Linux and Windows and open-sourcing both so the community can carry them forward. Our small team will now focus fully on making Orion for macOS and iOS faster, more stable, and more capable.

21 hours ago • 1 votes
Clip of me singing Despard in Ruddigore in 2013

A clip of me singing a funny song from Gilbert and Sullivan’s Ruddigore back in 2013

yesterday • 1 votes
How and Why fork() Uses Copy-on-Write

In this video, we look at why fork() needs copy-on-write, how it works inside the kernel, and a memory usage problem that Instagram encountered with Python.

yesterday • 1 votes
What we lost when we lost comments

Comments require commitment, but they’re worth it.

yesterday • 1 votes
📚 BoredReading

You seem to be enjoying this.

Join free to unlock everything.

Create free account

Already have an account? Sign in