6 ms·
We need a name for this. The old advice is to ignore performance becaus it’s not important. When it becomes important there is now very little you can do. You g
by hinkley 8y ago
We need a name for this. The old advice is to ignore performance becaus it’s not important. When it becomes important there is now very little you can do. You get the low hanging fruit (terrible analogy. Ask a fruit grower how stupid this is), or the tall tent poles.
Eventually you have an unending field of nearly identically tall poles, everyone claims victory (we’ve done all we can!). But your sales team is still mad because your product is several times slower than the competing products.
What do we call this? Picket fence? Blanket of doom? Death shroud? Forest for the trees? Stupidity?
- IncRnd 8y ago> The old advice is to ignore performance because it’s not important. I think you misunderstood the instructions and anecdotes that you were given about how and when to optimize. Alternatively, your definition of "old" in "old advice" is a very short time in the past.
- hinkley 8y agoThe only yardstick of teaching that means anything is to look at what people go and do with what you taught them. I spent a big chunk of my early career doing performance analysis work in a language stereotyped as being slow. My thesis was that it was down to developer skill and not the language. By the time someone spoke Knuth's aphorism at me it was people who were standing between me and the strategic goals of the company. Using it as a shield to get out of doing the hard work to match a competitor or customer expectations. As I quickly discovered, there are a whole set of performance optimizations that also improve readability, and that got around the friction with the foot dragging Knuth quoters. There's a host of other things never show up in the literature. It's a shame, really.
- basilgohar 8y agoA lot of this is due to misunderstanding the quote and knowing the bounds where it applies. Premature optimization being the root of all evil means those misapplying the addage are using it as a crutch. Good code is both performant and also easy to scale because of how it's designed (as mentioned elsewhere in this thread). See [0]. It is suspect that most folks ever got it to "Make it right" in the first place. Executive pressure and lack of support from managers needs to be called out as well as contributing to problems with quality of code ad teams oftentimes are not given the chance to make it right under pressure to deliver under unrealistic deadlines. [0] http://wiki.c2.com/?MakeItWorkMakeItRightMakeItFast http://wiki.c2.com/?MakeItWorkMakeItRightMakeItFast
- hinkley 8y agoThere's some truth to that, but I'm still going to stick by my my first line: The only yardstick of teaching that means anything is to look at what people go and do with what you taught them. I consider "premature optimization" a spectacular failed experiment.
- hinkley 8y agoAfter a few hours to think about this, I’m afraid you may be right about nearly everything here. But I have a big problem with developers needing permission from business to do the right thing. That’s not how ethics works, and I’ve caught too many devs in the lie when we do get free time and they still don’t want to do the hard work they dodged because of time constraints. There are people who want to appear high minded but have no interests beyond virtue signaling.
- de_watcher 8y ago> My thesis was that it was down to developer skill and not the language. It's not the language, it's that one first example that came with the language, and everybody has copied it.
- hinkley 8y agoOuch. ...you are not wrong. Lack of imagination then?
- IncRnd 8y ago> The old advice is to ignore performance because it’s not important. > The only yardstick of teaching that means anything is to look at what people go and do with what you taught them. > I spent a big chunk of my early career doing performance analysis work in a language stereotyped as being slow. Something doesn't compute with those statements. Can you profile what it might be?
- hinkley 8y agoIf it ain’t broke don’t fix it. Even though we just spent ten minutes detailing how it’s broken. As someone else stated, make it work make it right make it fast, but people never get past make it work. They fear changing the code. It’s one of the things I loved most about XP (and I barely got to use it before it was already going out of fashion). Get over the fear.
- IncRnd 8y agoYou replied to the wrong comment. None of that is related to what I wrote.
- mockingbirdy 8y agoAgreed that this advice is not very old. Always reminds me of the Story of Mel http://www.catb.org/jargon/html/story-of-mel.html http://www.catb.org/jargon/html/story-of-mel.html
- IncRnd 8y agoThat's always a great read. Thank you.
- JumpCrisscross 8y ago> Ask a fruit grower how stupid this is I don't know a fruit grower. Can you tell me?
- charmides 8y agoMe neither. As a fruit eater, I would definitely prefer picking low-hanging fruit than high-hanging fruit.
- hinkley 8y agoBut then your yard ends up smelling like a failed brewery, and the dog keeps getting sick.
- hinkley 8y agoYou want all of the nearly ripe fruit, not the stuff that is easy to reach. It's a tremendous waste of resources (and rotting fruit on the ground can carry pathogens or parasites that hurt the tree next year). So either you pick all of the ripe fruit, or you pick everything. By shaking the tree and catching everything that falls out.
- squiggleblaz 8y agoSo the analogy breaks down in this: That we say "low hanging fruit" to mean "its easy and good enough; it's okay to stop and look for something else". But a fruit farmer would say "low hanging fruit" to mean "you better design your system to get more than just that". Given the costs of fruit farming, I think it would also be a terrible idea to come to pick the fruit from your tree twice. You better not go out till you're ready to get it all (whether that's "everything" or "all of the ripe fruit"). As for me, I don't think we need to be accurate though in our figures of speech. When someone speaks of "writing on the wall" it's no objection that someone's fate was announced verbally, or that customarily, writing on the wall has no relation to future events but serves to identify something in the vicinity of the wall. Likewise for "low hanging fruit".
- 8y ago
- gascan 8y agoterrible analogy. Ask a fruit grower how stupid this is What about the fruit rotting on the ground? That's one of our favorite analogies.
- stcredzero 8y agoThe old advice is to ignore performance because it’s not important. The old advice is to optimize intelligently, based on actual data, not preconceived notions. If your program isn't correct, then it's hard to have valid performance data, so optimizing before your program is correct is problematic. Kent Beck has an anecdote about being called in to optimize the Chrysler C3 payroll system. He arrives, then asks if there is a valid input/output dataset. The Chrysler people tell him that the system isn't producing valid outputs yet. His reply: "Well in that case, I can make it Real Fast!" (As it turns out, a lot of the performance problems came down to naive string concatenation!...O(n^2)...yadda yadda.)
- YZF 8y agoThat's like saying we can't design a fighter jet so we're going to melt a ball of steel into some shape, put an engine on it, and try to fly it, and only then start optimizing. That's not engineering, that's trial and error. You can absolutely aim for both correctness and performance in your design. In fact performance is (can be) part of correctness, if it doesn't perform to spec then it's most likely not useful. If you don't care about performance, fine, don't design for it and don't optimize. Your starting point for optimization has to be a solid design with specific performance goals in mind. If you have a solid design maybe you won't need to do any optimization, if you do it's going to be optimizing on top of the design.
- not_kurt_godel 8y ago> That's like saying we can't design a fighter jet so we're going to melt a ball of steel into some shape, put an engine on it, and try to fly it, and only then start optimizing. That's not engineering, that's trial and error. Sorry, but that's a terrible analogy. "Performance", by definition of the context of this general discussion, is outside of spec. A ball of steel with an engine strapped on that doesn't fly isn't within spec. A more appropriate analogy for a fighter jet would be cost optimization (and yes, I realize that's not perfect, but bear with me). The first priority is getting the jet doing what it needs to do. If you design the thing to be made of 90% gold and platinum, then yes, optimizing cost is going to be impossible. But if you keep things semi-reasonable materials-wise, you can (presumably) optimize the manufacturing process post-facto to be more economically friendly.
- AboutTheWhisles 8y agoArchitect for performance
- blt 8y agoI always call it "death by a thousand cuts".
- kevin_thibedeau 8y agoThe cuts are all O(1). Nothing to worry about.
- slavik81 8y agoSoftware Engineer: After a week of hard work, I halved the runtime of our program for all possible inputs! Computer Scientist: That's too bad. All that work and nothing to show for it.
- hinkley 8y agoIn my Google interview, toward the end of the day I told the guy who I really didn’t want to work with anyway: What’s the hardest thing about software development? Removing the constant time overhead factors from performance critical code. He didn’t like that answer. But I had kinda already decided he was an asshole.
- jasonlotito 8y ago> The old advice is to ignore performance becaus it’s not important. I've never heard that "old advice" and I've been doing this for 20 years. If you are referring to the quote about "premature optimization" you are misinterpreting it badly, or had it explained to you badly.
- hinkley 8y agoTo avoid repeating myself, see my other reply. I can count on my fingers the number of times I've heard Knuth quoted properly (and always to jr developers). And I've been at this for 25.
- TeMPOraL 8y agoAnd I hear it all the time. Here on HN, in my work life, all the time I see people arguing that "yes optimization is important, but now is not the time", for any value of "now". The gamedev people care, because in games, you have hard performance constraints (60+ FPS) and try to cram in as much stuff as possible, so you always have resource use on your mind. Embedded people probably care too (I hear they do, but don't have much personal experience there). Most other branches of this industry couldn't give two fucks about it, as evidenced by software we use daily on the web and our phones. There is no market pressure to optimize, so people can get away with releasing slow and resource-intensive software. General population has been conditioned to think that if an app or webpage works slowly, they need to buy a faster computer/phone. They should instead be concluding that the app is most likely garbage. (Note that optimization is not just about CPU cycles. Other resources are important. These days, it's more likely you'd exhaust RAM and make everything slow by forcing system to swap too much than it is that your application will use 100% CPU.)
- 01100011 8y ago> Embedded people probably care too Sometimes we do. Sometimes developer time is more important. Sometimes reliability is more important. Sometimes nothing is important(because so many embedded systems are woefully overpowered these days... Dual A9's running linux to do some low-speed IO, etc). Threads like this remind me that there are many, many kinds of programmers. Web guys face different issues than game devs who face different issues than embedded guys. I like to read these threads but usually leave frustrated at the myriad of comments from people who assume everyone's programming experience is roughly similar to theirs.
- roel_v 8y agoTerribly OT, but the 'low hanging fruit' comes from a time where full sized fruit trees were the norm, which is something today's (professional) fruit grower wouldn't know anything about. In old-style orchards (i.e., with full size trees), it's actually quite common to just leave 'high hanging fruit' because there's no somewhat safe or practical way to get to it. Unless you're talking about something else, which I'd be interest in hearing about, as this is quite relevant to me at this time of the year.
- hinkley 8y agoIt’s not a simple problem to be sure. I rub elbows with landscapers in one of my hobbies and the general consensus seems to be that leaving fruit or leaves under your tree as pathogen vectors is a bad plan. That it’s better to hot compost everything you can’t grab before it hits the ground. We have orchard ladders (the ones with the flared base) and telescoping handheld pickers and dwarf varieties (trees with better modularity?) that keep most of the fruit within picking distance. Also leaving ripe fruit in the trees just means the wildlife or storms have a chance to get it before you can. I don’t have any mature fruit trees now but my plan is similar to my friend who has five apple trees. Harvest as much as I can process at a go (she makes cider). And then whatever the animals don’t get after that is a bonus.
- roel_v 8y agoSure, fallen fruit can cause problems; which is why in 'neat' orchards (only short grass under trees, very little other vegetation that can house predators that eat the insects that are attracted by fallen fruit) you pick as much as possible and pick up and discard fallen fruit. And 'production' orchards use dwarf or semi dwarf varieties anyway, along with planting patterns that let them harvest with telescopic lifts. My point was, the analogy is still valid. In full size orchards, you'rr not going to be able to get any of the non-low hanging fruit. I know of cherry trees 25+ m high with kilos and kilos of cherries in absolutely unreachable places. And many fruit trees that I know of, only the low hanging fruit is picked at all most years. My own apple trees are 6ish years old now, I'm hoping I'll get my first proper (if somewhat modest) harvest this year. But even now, I already know I won't be able to reach much of it. Either way thanks for the comment, I think we're on the same page here - I was just wondering if there was something I missed in your original comment. I always like learning about peculiarities or practices of people in other places, although I think in this case there isn't much different after all.
- deleted 8y ago[deleted]