Greppability is an underrated code metric
Keeping your codebase searchable will make your maintenance life easier in the long run.
Hasnain says:
Can confirm greppability is underrated, in logs too.
“When I’m working on maintaining an unfamiliar codebase, I will spend a lot of time grepping the code base for strings. Even in projects exclusively written by myself, I have to search a lot: function names, error messages, class names, that kind of thing. If I can’t find what I’m looking for, it’ll be frustrating in the best case, or in the worst case lead to dangerous situations where I’ll assume a thing is not needed anymore, since I can’t find any references to it in the code base. From these situations, I’ve derived some rules you can apply to keep your code base greppable”
Posted on 2024-09-04T07:13:11+0000
How the Higgs Field (Actually) Gives Mass to Elementary Particles | Quanta Magazine
In this article adapted from his new book, “Waves in an Impossible Sea,” physicist Matt Strassler explains that the origin of mass in the universe has a lot to do with music.
Hasnain says:
“This notion lies at the heart of what the late British physicist Peter Higgs, namesake of the Higgs field, and his competitors pointed out in the 1960s: that one field can stiffen other fields, thereby permitting their ripples to vibrate in place with a resonant frequency, and thus giving their particles mass.”
Posted on 2024-09-04T06:59:24+0000
MiniJinja: Learnings from Building a Template Engine in Rust
Learnings from building MiniJinja, a template engine in Rust
Hasnain says:
“I think a lot of the patterns in MiniJinja are useful for projects outside of MiniJinja. Quite is quite a bit more hidden in it that I have talked about before such as how MiniJinja is abusing serde. If you have a need for a Jinja2 compatible template engine I would love if you get some use out of it. If you're curious about how to build a runtime and object system in Rust, you might also find some utility in the codebase.
I myself learned quite a bit about what creative API design can look like in Rust by building it. At this point I am incredibly happy with how the public API of the engine shaped out to be. The engine is extensively documented both internally and publicly and you can read all about it in the API docs.”
Posted on 2024-09-03T04:45:55+0000
How I failed
A candid post about some of the things that kept me, my employees, and our company from achieving our full potential.
Hasnain says:
Decade old but still super relevant and the first time I’m reading it
“I’ve often regretted that I hadn’t kept fighting with the lawyers, working harder to balance all the legal requirements (many of them well-intentioned but designed for a top-down command and control culture) with my vision of how a company really ought to work. I focused my energy on product, marketing, finance, and strategy, and didn’t put enough time in to make sure I was building the organization I wanted.
Reading recently about the HR practices at Valve and Github, so reminiscent of early O’Reilly, I’m struck by the need to redefine how organizations work in the 21st century. I’m not saying that Valve or GitHub’s approach is for everyone, but they indicate a deep engagement with the problem space, and fresh approaches to the questions of how to manage an organization. Google’s People Analytics may be a more scalable application of new HR thinking to a company of serious size.”
Posted on 2024-09-03T04:39:00+0000
Founders Create Managers
There’s a new pg article making the rounds called “Founder Mode”. The biggest surprise to me is how, despite saying almost nothing, it has…
Hasnain says:
“The only solution to this is to think early and often about the systems of accountability you have to set up. This is much, much harder than micromanaging details, because every system of accountability you set up will eventually be gamed. So in addition to accountability, you need to foster a strong, ethical company culture that encourages transparency while allowing for some mistakes.”
Posted on 2024-09-03T04:31:27+0000
Reflections on Founder Mode / Oxide
Reflections on a recent Paul Graham piece – and on the culture at Oxide
Hasnain says:
“Founders seeking to internalize Graham’s advice should recast it by asking themselves how they can foster mutual trust – and how they can build the systems that allow trust to be strengthened even as the team expands. For us at Oxide, writing is the foundation upon which we build that trust. Others may land on different mechanisms, but the goal of founders should be the same: build the trust that allows a team to kick a Jobsian dent in the universe!”
Posted on 2024-09-03T02:02:30+0000
Honey, I shrunk {fmt}: bringing binary size to 14k and ditching the C++ runtime
The {fmt} formatting library is known for its small binary footprint, often producing code that is several times smaller per function call compared to alternatives like IOStreams, Boost Format, or, somewhat ironically, tinyformat. This is mainly achieved through careful application of type erasure o...
Hasnain says:
Great technical read as always. But I couldn’t help but chuckle at this bit
“Now, let’s explore potential optimizations. One of the first adjustments you might consider is disabling locale support. All the formatting in {fmt} is locale-independent by default (which breaks with the C++’s tradition of having wrong defaults)”
Posted on 2024-09-02T06:58:16+0000
Founder Mode
paulgraham.com
Hasnain says:
“The way managers are taught to run companies seems to be like modular design in the sense that you treat subtrees of the org chart as black boxes. You tell your direct reports what to do, and it's up to them to figure out how. But you don't get involved in the details of what they do. That would be micromanaging them, which is bad.”
Posted on 2024-09-02T06:47:28+0000
§Taking knowledge work seriously (Stripe convergence talk, 2019-12-12) | Athletes and musicians pursue virtuosity in fundamental skills much more rigorously than knowledge workers do
Top-tier athletes are fanatically disciplined about improving their foundational skills—skills which transcend any sport, the same kind of agility drills you might see an army recruit do. Top-tier musicians do likewise: Lang Lang, for instance, is still working on his scales after 30 years as a co...
Hasnain says:
“What might it mean for knowledge workers to fanatically pursue virtuosity in these fundamental skills, in the way that athletes seek in their fundamental skills?”
Posted on 2024-09-02T00:49:15+0000
Why do firms choose to be inefficient?
Why don't they just produce better?
Hasnain says:
“Delving into specific papers, Bloom et al (2013) ran a randomized controlled trial (an RCT) on Indian textile firms, where some firms were randomly chosen to receive management training. The management advice was as simple as “record inventories”, yet this led to staggering increases in productivity – within the first year, treated firms saw a 17% increase in productivity, or a gain of $300,000 in productivity. This gap in productivity persisted, even nine years later on, in a follow-up study. “
Posted on 2024-08-30T08:09:28+0000