3 ms·
There's an interesting talk by one of bzr's (formerly Bazaar's) lead developers on why bzr failed and lost to git.[1] In his view, much of the blame rested on
by pmoriarty 10y ago
There's an interesting talk by one of bzr's (formerly Bazaar's) lead developers on why bzr failed and lost to git.[1] In his view, much of the blame rested on the decision to defer optimization until the product was more mature. But by the time it was mature, key architectural decisions were made that were hard to change. Here's a salient quote:
"Premature optimization" is a dangerous concept. It tends to imply you can
defer all consideration of performance until you have the behaviour and UI
you want.
But, it turns out if the UI, core APIs or formats are hard or impossible to
implement quickly, it is hard to unwind them.
Now I'd have a more nuanced view of what "avoid premature optimization"
means: something more like "avoid premature micro-optimization."
The key question is: how expensive will it be to come back and change to a
faster implementation later on, and how much does it save you to write a
simple or naive one now.
If there's one function or routine that is written in a straightforward way,
going back to rewrite it should cost only whatever time it takes you to
rewrite it, and then to test, debug and release that change. So it will
often make sense to defer that work until you’re sure the requirements for
the code really satisfy the user, your understanding of the problem is
correct, there are no unknown bugs or edge cases, etc.
However, there are some things that can make changing the code much harder
and we ran into several of them...
[1] - https://docs.google.com/presentation/d/1awg1CHM1w128iOBp_JOxE2DgHfywBeyjDe2bkx1vfVQ/edit https://docs.google.com/presentation/d/1awg1CHM1w128iOBp_JOx...
- brianwawok 10y agoExactly. Been on the losing side of this argument several times. Think a few if the products are unmaintainable piles now. Is mostly a lazy argument.
- mtkd 10y agoHaving seen teams try and fail to optimize late - I fully buy the concept it is never too early to optimize the architecture. If you get to the point you can't optimise because the fundamentals are too baked-in to realistically change - cut your losses that day and start pasting the usable parts in to a new project. It's important to differentiate between architectural optimisation (which should be optimised from the outset) and code optimisation. I do believe there is an argument for minimal code complexity (optimisation) in early phases - even if that leads to some latency - it will assist refactoring and onboarding new developers - later in the project team can revisit code that can benefit from being more complex.
- mpweiher 10y ago> "avoid premature micro-optimization." Which is exactly what the quote says. If performance is going to matter, you absolutely have to get your overall architecture right so after-the-fact tuning with a profiler works. If you get your architecture wrong, you're in for a world of hurt and might have to start over.
- crdoconnor 10y agoI always thought git's rise was mainly because it was #1 an acceptable DVCS and #2 because Linus Wrote It. I'm doubtful that if bzr was just a bit faster it would have taken git's place. hg was arguably better than git and it still lost.
- edblarney 10y agoI absolutely doubt that 'performance' was an important consideration in the acceptance of git. If git took 2x the time to do everything it does today - it still would have won.
- dllthomas 10y agoI'm not sure. I have vague recollection of pushback against git on Windows in the early days due to poor performance on that platform, which seems to have evaporated since.
- CJefferson 10y agoAlternatives to git weren't taking twice as long, on kernel sized repositories they were taking minutes, instead of fractions of a second.
- deleted 10y ago[deleted]
- coolgeek 10y ago> "Premature optimization" is a dangerous concept. It tends to imply you can defer all consideration of performance At a deeper level, the problem here is cargo culting of rules or heuristics. Another example is the proscription of "security through obscurity". It's perfectly valid as a component of a larger, more comprehensive security strategy. But you're gonna get hurt if it's the only component.
- cargocult_coder 10y agoYes I concur.
- dwaltrip 10y agoRegarding your broader point, I think this immensely important and a very powerful framing to use in many different pursuits. I'd describe it as always striving to acquire and refine the deepest cores of conceptual understanding that can be accurately and meaningfully applied in the widest set of scenarios. And then for two equally useful mental models, prefer the more concise and accessible one. Kind of like the concept of "parsimony" as used in the physical sciences. In software, one begins to see where "best practices" come from and how they can be valuable, but also where such heuristics break down. Getting philosophical, I believe this is a lifelong search -- we will never reach full understanding. Perfect truth is irreducible, so the best we can hope for is an strong approximation.
- sqldba 10y agoYou'd be surprised (or maybe not) on the number of experts who fight out about security through obscurity these days - because it's cool to do so. One particular example is using non-standard database ports. I have to fight all the time. "It's pointless. You make it harder for users (well, not really, the one-time setup of an application maybe), and it's not any more secure because it can be port scanned." Personally I disagree because I think port scans are the kind of thing you should, you know, pick up through other software. Their response to this is that nobody tracks internal port scanning, and that it's always external. I give up by that point. Because you can't complain about insider threats but then decide not to bother looking at anything internal.
- ced 10y agoArguably, that's what happened with Python. The single-minded focus on programmer convenience for its first 20 years of existence made it a very difficult language to compile.
- AstralStorm 10y agoDid it really? PyPy is quite a piece of kit.
- BuckRogers 10y agoPython2 now compiles to Go.[0] It is quite the development and I consider it the future of Python. It's pretty great stuff, definitely recommend checking it out if you haven't already. [0]https://github.com/google/grumpy https://github.com/google/grumpy
- CJefferson 10y agoWhile there technically true, the performance is awful, compared to normal go code.
- BuckRogers 10y agoAs long as it's faster than CPython2 it's a win! Especially because you gain Go interop as well.
- douche 10y agoPlease, don't quote things by indenting them. It's unreadable on mobile, the pre tags blow everything out and line wrapping gets all messed up
- joshjje 10y agoId rather more people suffer from this and the problem be fixed rather than branching code for different devices.