Sabitlenmiş Tweet
Gary Bernhardt
2.5K posts

Gary Bernhardt
@garybernhardt
Execute Program (learn programming tools quickly); Destroy All Software (dense programming screencasts); formerly Deconstruct conference.
Seattle, WA Katılım Mart 2007
115 Takip Edilen44.9K Takipçiler

@dmozenne It inverts traversal order. E.g., if the tree is sorted ascending, inverting will flip the sort to descending in O(n) time, whereas re-sorting would take O(n log n).
But that's not the point. It's like fizzbuzz: "can you read simple instructions and write a simple function?"
English

@garybernhardt I've been a professional programmer for over 30 years, and I can't think of any reason to invert a binary tree.
English

@ChawanPrasql It inverts the traversal order. E.g. inverts a sorted tree from ascending to descending order.
English

@garybernhardt Actually you can't invert a binary tree. What people ask is to mirror it.
English
Gary Bernhardt retweetledi

@garybernhardt So I've been a backend wev dev for a bit over 3 years and I had never tried to invert a binary tree because it's something I never needed to do and I hadn't even thought about it
After reading this tweet I tried it and solved it within three minutes lmao what's the debate??

English

@Mihoda Yes. It's a function containing in a single statement.
English

@garybernhardt I realized I forgotten what a binary tree is, looked up the definition, and I think inverting it is just a 2-4 line recursive program.
English

@OpenKnightMike That's not what happened. Max Howell would have no problem inverting a binary tree, given a short problem statement. What happened (a direct quote from him): "I wasn’t very clear what a binary tree was". quora.com/Whats-the-logi…
English

@garybernhardt The "invert a binary tree" meme comes from when Google didn't hire the guy who made Homebrew because he couldn't do it in an interview. So obviously not every professional programmer.
English

@Manitcor "Not from memory; you don't need to memorize anything. You can do it from a short description of the problem."
"encyclopedia of syntax and useless trivia"... ???
English

I'd rather someone who understands it, pros, cons, best patterns, gotchas, etc. Someone who gets all that from reading the code when they look it up.
Because I don't expect someone that can do that spends brain matter being an encyclopedia of syntax and useless trivia.
Testing developers like the real job does not have internet and now AI is admitting to not understanding the job of the developer.
English

@hubertlepicki Scenario 1: operating the product costs $X1 with $Y1 revenue, *across the customer base*.
Scenario 2: operating the product costs $X2 with $Y2 revenue, *across the customer base*.
English

@garybernhardt But that's not the argument. Their customers are paying for usage, and want to use their tokens the way they want. Anthropic forces us to use Codex, and we want options.
Their pricing is the same, and is below their cost either way.
English

@nvk I'm not sure about 10x better but I definitely agree directionally!
English

@garybernhardt Codex is 10x better and 10x cheaper right now, competition will take care of it.
English

@mattpocockuk @JonnieLappen I guess there's no hard line, but there's a gradient from a simple Ralph loop (invoke agent in a literal for loop) to gastown (8 agent types coordinating, some with arbitrary concurrency within one agent type, all communicating via both structured and unstructured channels).
English

@mattpocockuk @JonnieLappen To me, a "factory" is more... tenacious, with complex self-monitoring and self-correction, until the job is actually done (in principle, supposedly). Gastown factories are separate repos full of many docs and state that the factory maintains autonomously.
English



