Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Proving yet again that there aren’t enough gardeners in computer science.

The metaphor we use for optimization is “low hanging fruit” which no orchard owner would ever do. It’s massively wasteful, be you a programmer or a farmer. It’s what amateurs do. I do tree shaking. Pick a tree (subject matter in the code) and get all of the fruit that’s willing to fall off before moving to the next. It’s more efficient, more effective, and more sustainable. It works with human factors instead of against them.

What we call tree shaking is more like tree pruning. Specifically what you’d call thinning (tracing a misplaced or damaged branch back to the parent and cutting it there).



> The metaphor we use for optimization is “low hanging fruit” which no orchard owner would ever do.

This is just over-extending the metaphor.

The term has existed long before software was a thing, and refers simply to grabbing something that's easy. That's it.

The same goes for tree-shaking. The author does the same thing - over-extends the metaphor. Tree shaking simply means giving everything a jiggle and seeing what comes loose. It's easy to understand and shouldn't be read into any more than that.


> and cutting it there

I think the idea behind calling it "shaking" is these branches and leaves that are already cut (inaccessible from the root), and just need a strong breeze to shake the tree and make them fall out.


Those are called widowmakers, and shaking the tree rarely frees them.

We had an ice storm this year and there are loads of them all over town still.


I believe low hanging fruit is not specific to CS.

Regardless, it is a perfect metaphor. You want to eat an apple: which one do you pick? Taking the low-hanging fruit is less work right now and gets you to your immediate goal, but disregards general efficiency. Sure, picking a whole tree is more efficient. But if you want a single apple, taking the low hanging fruit is the fastest approach. The metaphor works because it actually implies that it's not the most efficient approach, just the easiest


As I said, it’s what amateurs do. We are not amateurs.


Everyone, even the amateurs and complete non–gardeners, know that this is not the best way to pick fruit. The whole point of the phrase is to point out that someone was lazy. It is saying that all they did was the absolute minimum amount of work.


Are you intentionally missing the point to find a reason to talk about what you know about harvesting fruit?


I think you might be projecting.


It's still a good metaphor. Nobody said picking low hanging fruit is the best approach in harvesting fruit or in computer science.


You think of orchard owners, but that's not the image it conjures for me. I remember the neighborhood of my childhood. The fruit trees there were 90% decoration. Usually someone would pick one (1) fruit whenever they felt like getting one. Most of the fruits would never get picked at all. The ground would be full of overripe and rotting fruit, until someone could be bothered to clean it up.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: