
Staff AI Engineer @brexhq. I like to build cool shit and ride bikes 🏍️ Leading our new AI Assistant to help customers automate their work
Sao Paulo, Brazil
Joined March 2016
- Tweets2.9K
- Following1.3K
- Followers2.9K
- Likes6.8K
Marcelo Prado retweeted
I've got an agent in a loop optimizing a renderer with the goal to minimize frame times (and tests to measure). It got times down from 88ms to 2ms and allocations down from ~150K to 500. Sounds good, right? Wrong. This is exactly why agent psychosis is a big fucking problem.
As an experiment, I rewrote the Ghostty core render state in Go, with access to identically laid out data structures as Ghostty and the exact same validation tests. I made a purposely naive renderer (simple, correct, but slow). 88ms per frame with 150,000 allocations (horrendous, lol)!
I then kickstarted a Ralph loop to bring the frame times down. I told it it can't modify input data structures or the public API or tests (they're correct), but it can do anything else it wants. It got to work.
It has worked for about 4 hours. I've spent around $350 on this experiment so far. The results?
88ms => 1.5ms
150K allocs => ~500 allocs
Incredible right? Nope.
My hand-written renderer I ported has frame times (same benchmark) of ~20us (0.020ms) and 0 allocations in the update path.
This is the problem with psychosis and lacking systems understanding. If you don't understand the system, you're going to accept that this is an incredible result. If you understand the system, you'll see better solutions immediately and can do roughly 75x better on throughput.
The people who blindly trust agent output are in the former camp. They're sheeple, overdrinking from a fountain of mediocrity.
Standard disclaimer: I use AI all the time. I like AI. The point I'm making is to not blindly accept results. Think. Analyze. Learn.
Marcelo Prado retweeted
Everyone’s copying each other, afraid to miss the next big thing. But if you’re chasing competitors, you’re already behind. The only real edge left is instinct.
Don’t be afraid to listen to yourself.
Marcelo Prado retweeted
Upgrading React 18 at @brexHQ proved to be a challenge. Now the work is done, the team put together a blog post on the approach and challenges of moving 2m loc of React to a new version
medium.com/brexeng/how-to-up…
Marcelo Prado retweeted
What a year it’s been. Grateful for the builders at every level of our organization who made this turnaround happen.
Brex Returns to Growth After Upheaval
Corporate card issuer expects to generate cash and grow 40% just over a year after big cash burn sparked fears of startup train wreck.
Read more from @coryweinberg👇
Marcelo Prado retweeted
I’ve been experimenting with @cursor_ai for backend dev at @brexhq.
Our huge monolith (15M+ LOC) doesn’t play nicely with the limited context window, leading to missed references and random hallucinations.
Despite that, I’ve built a framework to stay productive.
Here’s how:
Marcelo Prado retweeted
Replying to @DOGE
Marcelo Prado retweeted
this is actually a MASSIVE problem.
i've seen anti-patterns in real large prod codebases that cause 1000's of bad re-renders
One of the worst things about React Hooks is how they completely hide away complexity.
Yes, I meant worst. Allow me to ellaborate.
At @brexHQ, we deal with a huge and ever-evolving codebase. We're taking about millions of LOC of React, written from 2018 onwards.
Marcelo Prado retweeted
Hooks hide the complexity, def not the cause of this tho. A lot of ppl just do not understand a few simple things about hooks - they don’t rerender. They rerun, unconditionally, on every render. It’s really really bad at scale.
Marcelo Prado retweeted
This is a special week.
A little over 5 years ago, @patrick_oshag invited @jeff_gramm to lunch. They hit it off and decided to record a conversation.
3 shows, 318 conversations, and ~30m downloads later, ILtB just turned 5!
Here are 40 things we've been taught along the way:
Marcelo Prado retweeted
We’re excited to introduce a brand-new product, Brex Venture Debt, that allows venture-backed technology companies in the Brex ecosystem to take their businesses to the next level with less dilution. building.brex.com/launching-…
Marcelo Prado retweeted
Jeff Bezos, June 2000: “If I could do anything, I would like to go help explore space.”
Marcelo Prado retweeted
In honor of someone’s bad bug today, I will retell a story of my worst bug:
Once upon a time I was the CEO and entire engineering team of a company which sent appointment reminders.
Each reminder was sent by a cron job draining a queue. That queue was filled by another cron job






























