Gary Bernhardt

2.5K posts

Gary Bernhardt

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
Sabitlenmiş Tweet
Gary Bernhardt
Gary Bernhardt@garybernhardt·
Computers exist to serve us, not the other way around. If it is not fast and reliable then it is wrong!
English
12
136
635
0
Gary Bernhardt
Gary Bernhardt@garybernhardt·
"Show me your code and conceal your grill, and I shall continue to be mystified. Show me your grill, and I won't usually need your code; it'll be obvious." —Fred Brooks, probably.
English
2
0
12
2K
Gary Bernhardt
Gary Bernhardt@garybernhardt·
well back In MY day it was never a compiler bug
English
2
0
37
3.4K
Gary Bernhardt
Gary Bernhardt@garybernhardt·
@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
0
0
6
721
David Ozenne
David Ozenne@dmozenne·
@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
2
0
3
850
Gary Bernhardt
Gary Bernhardt@garybernhardt·
Every professional programmer can invert a binary tree. Not from memory; you don't need to memorize anything. You can do it from a short description of the problem. It's one step above fizzbuzz. Anyone who rails against this doesn't realize how trivial "invert a binary tree" is.
English
58
26
1K
98.4K
Gary Bernhardt
Gary Bernhardt@garybernhardt·
@ChawanPrasql It inverts the traversal order. E.g. inverts a sorted tree from ascending to descending order.
English
0
0
1
1.1K
Chawan Prash
Chawan Prash@ChawanPrasql·
@garybernhardt Actually you can't invert a binary tree. What people ask is to mirror it.
English
1
0
6
1.5K
Gary Bernhardt retweetledi
Pechofusil noseké
Pechofusil noseké@SergioGMN·
@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??
Pechofusil noseké tweet media
English
4
1
27
6.8K
Gary Bernhardt
Gary Bernhardt@garybernhardt·
@Mihoda Yes. It's a function containing in a single statement.
English
0
0
11
3.3K
Mihoda
Mihoda@Mihoda·
@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
1
0
5
3.7K
Gary Bernhardt
Gary Bernhardt@garybernhardt·
@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
4
0
76
7K
OpenMikeKnight
OpenMikeKnight@OpenKnightMike·
@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
2
0
52
7K
Gary Bernhardt
Gary Bernhardt@garybernhardt·
type Node<T> = { value: T left: Node<T> | undefined right: Node<T> | undefined } Write a function that swaps `left` and `right` recursively. That's "invert a binary tree". That's the whole thing! You don't need to know that; who cares? But it's a trivial problem to solve!
English
7
0
151
11.3K
Gary Bernhardt
Gary Bernhardt@garybernhardt·
@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
0
0
38
5.4K
Manitcor
Manitcor@Manitcor·
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
5
0
9
6.7K
Gary Bernhardt
Gary Bernhardt@garybernhardt·
@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
1
0
1
709
Hubert Łępicki
Hubert Łępicki@hubertlepicki·
@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
2
0
7
779
Gary Bernhardt
Gary Bernhardt@garybernhardt·
To anyone who thinks that Anthropic is obligated to provide Claude at a price below their costs: try to build and run such a company yourself; you'll learn a lot in that week! (This is independent of Anthropic lying about what they're doing, which is a huge unforced error.)
English
16
2
75
11.7K
Gary Bernhardt
Gary Bernhardt@garybernhardt·
@nvk I'm not sure about 10x better but I definitely agree directionally!
English
1
0
1
708
nvk 🌞
nvk 🌞@nvk·
@garybernhardt Codex is 10x better and 10x cheaper right now, competition will take care of it.
English
2
1
45
2.3K
Gary Bernhardt
Gary Bernhardt@garybernhardt·
less context, but better
English
1
1
14
2.3K
Gary Bernhardt
Gary Bernhardt@garybernhardt·
Saying that coding agents increase/decrease product development costs is like saying that introducing computers to a business in 1989 increases/decreases operational costs. It's extremely true, in both directions, depending on context, which makes both statements meaningless.
English
4
6
95
6.8K
Gary Bernhardt
Gary Bernhardt@garybernhardt·
the honest answer, no hedging this time: everything that tracks is clean, but not everything that's clean tracks
English
2
0
13
3.6K
Gary Bernhardt
Gary Bernhardt@garybernhardt·
@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
0
0
3
678
Gary Bernhardt
Gary Bernhardt@garybernhardt·
@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
1
0
2
617
Gary Bernhardt
Gary Bernhardt@garybernhardt·
Are there any actual success stories for "software factories" like gastown? Anything I can see running, and preferably see code?
English
53
7
282
56.6K