Redowan Delowar
banner
rednafi.com
Redowan Delowar
@rednafi.com
1.7K followers 490 following 680 posts
Software Engineer @Doordash/Wolt Writing rednafi.com Recurring themes: Go, Python, distsys, schema-driven development, eventual consistency, resilience patterns, HA, data access strategies, observability, SRE practices, and sci-fis.
Posts Media Videos Starter Packs
Reposted by Redowan Delowar
I've been running autonomous agents this whole time.
The moment you need to mention the details on how to use a certain tech / tool, ADR is the place to stash that in.
Problem is using a mock lib like unittest.mock is super easy & tempting. Whereas DI w/ fakes need to be practiced as it’s not too obvious unless you have written a few thousand loc in that style.

So many takes the easy route and by the time they realize the mocking mess has already been created.
Problem with mocks is that when you have a few thousand lines of teats, it’s really hard to know if you’re testing your SUT (Subject Under Test) or are you testing your mocks.

I have seen and maintained mess created by mocks in RSspec (Ruby), Jest (JS), and Pytest (Python).
First, the DRI (Directly Responsible Individual) for a feature will write RFC where all the high level details are captured.

Then before implementing each feature, the detailed architectures are captured in another one / two pager ADR. RFCs defer implementation details to ADR & links to it.
We typically write two kinds of design docs while planning for a feature:

RFC - Request for Comments
ADR - Architecture Decision Records

[cont…]
Mocks and patches can be replaced by fakes & DI in pretty much any languages. Go / Rust make it sorta obvious and in JS/Python/Ruby it requires some discipline since the languages make it so easy to write bleh code.

Google’s SWE book has some nice advice around it:

abseil.io/resources/sw...
Software Engineering at Google
abseil.io
Code that requires mocks & patches is smelly. It generally takes working in a PL that doesn’t allow mocking out of the box to learn how to design code that makes them redundant.

IME people who write only in dynamic PLs like Python or JavaScript often throw in mocks just b/c it’s so easy to do.
Not disagreeing with that. But in tech, that gets violated all the time and some people are okay with it. Problem is when employers just expect people to do that.
If someone willingly wants to put in 80 hr weeks in exchange for an agreed upon wage, I don’t see any reason to criticize that.

People know what they’re getting into before joining a company like that. Not for me but I understand if some ~23 y/o really believes in the mission & wants to do it.
"Forward-deployed" & "solution" engineers sound like this era’s version of “industrialists” - no one knows what the words mean.
Doing MR deployment and database management is hard. It's surprising how often even large companies eschew doing it.
Reposted by Redowan Delowar
There is not a single reason to outsource your creativity to a computer.

Not one.

To do so removes the very point of being creative in the first place.
Reposted by Redowan Delowar
One day the industry will recognize the drawbacks of AI agents and nondeterministic automation, and rediscover the UNIX philosophy of chaining together small purpose built tools in a low cost and predictable way, otherwise known as shell scripts.
Hope my throwaway CLIs’ startup is a now a tiny bit faster.
Apple has this shroud of closeness around them. So there is this misconception that you can’t work with it w/o Apple’s tooling. So many never even try.

Also, while it’s a nice PL, unless you’re building mac or iOS apps, you’re better off picking other general purpose languages in most cases.
There are multiple ways to group subtests in Go.

But often enough, I see folks pulling in a third-party library just for that. With a bit of discipline, most of the time you can avoid 3p libs for this. Did a comparison between several ways of doing it.

rednafi.com/go/subtest-g...

#golang
Subtest grouping in Go
Go has support for subtests starting from version 1.7. With t.Run, you can nest tests, assign names to cases, and let the runner execute work in parallel by calling t.Parallel from subtests if needed....
rednafi.com
The genie's outta bottle and there's no going back. On top of that, companies have started to impose insane deadlines & expecting people armed with AI will do it regardless.

But at the end of the day, I resonate with John here so much. I don't want to maintain slop.

thenewstack.io/go-experts-i...
Go Experts: 'I Don't Want to Maintain AI-Generated Code'
Two Go programming experts discuss the rise of AI-generated code, exploring its impact on Go's popularity, the challenges of low-quality code, and the future.
thenewstack.io
I’m seeing two opposing streams of opinion around AI. Trenchline workers in the industry are more skeptical about AI than the industry luminaries who are no longer actively working in the field. The latter group often does one-off work, marvels at AI’s capabilities, & extols them everywhere.
LLMs do empower interns & junior engineers. But simultaneously, I‘m seeing this worrying trend where juniors are generating a mind boggling amount of AI junk & unironically asking others to review that.

This has increased the rate of reviewer burnout, LGTMs, and in greenfield project, outages.
The reason some folks don’t share the same effervescence about AI is b/c LLMs work great in very specific contexts. If you’re working in a greenfield library or tooling project, LLMs absolutely shine.

But in an “enterprise” ctx, that’s rarely what people do. LLMs are still useful here, but less so.
One cautionary lesson is that you need to make sure you’re testing the right thing. Since AI makes writing unit tests trivial, I often see people generating a zillion tests that don’t test anything.

I’d still emphasize that the first few tests need to come from us.

rednafi.com/go/test-stat...
This is fantastic. Now I won't have to write "func Ptr[T any](v T) *T { return &v }" over and over again.

All we need now is an Equal in the testing library so that I don't have to convince folks to avoid testing frameworks and weird DSLs. Looking at Ginko and friends.