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

Unattended reboots with encrypted disks

An introduction to ZKeys: a new service that stores encryption keys off-site and automatically locks access to them if the client machines go offline for a long period of time.

yesterday • 1 votes
Education Shouldn't Be Held for Ransom

Google told K-12 schools they could turn off AI, but only if they gave up search too. That isn’t integration. It’s holding education for ransom.

4 days ago • 1 votes
AI Assisted Sermon

Once a year at my church, I usually give one sermon. I was asked to tie the theme to a young adult retreat we had taken to the Sunshine Coast. My first experience giving a sermon was many years ago at my old home church in El Monte, California. It was a Vietnamese-American church, but…

4 days ago • 1 votes
Fortune Telling and Speculative Design

Practical tools for design engineers to explore possible futures through speculative design

4 days ago • 1 votes
Must we always use LLMs this way?

As with my last post on AI, let me open with a statement: Just because most people hold AI a certain way, doesn’t mean that we always must, either now or in the future. As I noted in that piece, and my shades of gray post, I am well aware — and agree with — … Continue reading Must we always use LLMs this way? →

5 days ago • 1 votes
📚 BoredReading

You seem to be enjoying this.

Join free to unlock everything.

Create free account

Already have an account? Sign in