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

Comments and emails

Why Bear doesn't have comments

17 hours ago • 3 votes
Comparing Kodak Ektar 100 to Kodacolor 100

Having recently shot a roll of Kodak’s newly rebranded Kodacolor 100 film, I decided to splurge a bit and try the “professional” Ektar 100. It’s about a 40% premium for a roll of 135 Ektar film over Kodacolor so I’m interested to see if it’s worth it to pay more. Now I didn’t shoot 1-for-1, […]

19 hours ago • 3 votes
“Lucky to Be Me” from On the Town

Playing, and singing, the song “Lucky to Be Me” from Leonard Bernstein’s

2 days ago • 2 votes
Talk: Clojure, интерфейсы и потерянные смыслы @ Организованное программирование

С Кириллом Мокевниным обсуждаем, почему функциональные языки не выиграли в эпоху ИИ, как агентная разработка меняет код-ревью и инструменты, куда уходят IDE и редакторы, что будет с карьерой разработчика после 40 и как я оказался в Linear.

3 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