News for hackers. Stuff that matters.
Re:The Spoon Theory (2003) by taneq on Friday January 15, 2021 @03:32AM (#25788385)
When I was first learning to ride motorcycles I came across "A Twist of the Wrist" by Keith Code, which uses a similar analogy for attention.

In this analogy, you have $10 worth of attention to spend. Maybe as a novice rider you spend $5 just coordinating steering, clutch, gears and brakes to keep the bike upright. You then spend $3 on navigating, which leaves you with only $2 left to pay attention to the traffic around you.

A more experienced rider might only have to spend $2 on physically riding the bike, leaving them with much more attention to pay to traffic and road conditions.

Re:The Spoon Theory (2003) by travisjungroth on Friday January 15, 2021 @03:44AM (#25788479)
Fully departing from spoon theory, but sticking with money and motorcycles, this story was told to me by a friend of mine. This was a few decades ago and he was into racing Ducatis.

The wise old man at the track was explaining how to go fast. The people in the garage that night didn’t seem to be getting it, so everyone got in the back of the Ford van they used for parts and the old man drove.

“You have a dollar to spend. You can spend it on acceleration, braking, or turning. You need to be spending the whole dollar all the time.”

He was coming into a turn faster than any Ford engineer would have expected, gas to the floor. “I’m still spending the dollar on the gas.” He switched to the brakes, slamming them without skidding. The guys slid to the front of the van. “Now the brakes, I’m spending the whole thing. And then to turning.” The guys hit the side of the van.

This continued on, him ranting about dollars while driving around the track. My friend timed the lap and it was embarrassingly close to what they did on their Ducatis. That old man speed.

Re:The Spoon Theory (2003) by taneq on Friday January 15, 2021 @04:03AM (#25788593)
You should always be either at the edge of your traction circle or at the full limit of one of your controls. Anything less is wasting time.
Re:The Spoon Theory (2003) by zdkl on Friday January 15, 2021 @04:19AM (#25788685)
This notion of limits and edge reminds me of Hunter Thompson's musings on "The Line" in his piece about the Hell's Angels. He argues (wildly paraphrasing) that the fundamental draw (and in some sense, the art) of motorcycles or extreme sports is in finding that edge or limit. The problem he identifies being that you cannot really know where it is without going over it, with all the consequences.

https://en.wikipedia.org/wiki/Hell%27s_Angels:_The_Strange_a...

Re:The Spoon Theory (2003) by at_a_remove on Friday January 15, 2021 @09:08AM (#25791070)
I think he returns to the theme in "The Song of the Sausage Creature."

Myself, I can barely ride a simple bicycle more than about two hundred feet without somehow dislodging myself in a manner with roughly equal parts comedy and tragedy, but the way he wrote that and described the attraction of an edge where on one side laid a perfect moment-to-moment mastery of all of the physics in racing and the appeal of having absolutely nothing else matter at the moment because you simply haven't the space in your brain to do anything else ... and the other side, which involves multiple surgeries, rehab, and long phone calls with insurance companies, it was very appealing. "One of my finest addictions" indeed.

Re:The Spoon Theory (2003) by blauditore on Friday January 15, 2021 @06:00AM (#25789392)
That's the theory. In practice, it's more complex and subtle:

- Not are limits are made equal. Some are okay to be approached from both sides, while others will make you crash very quickly. Racing is a lot about finding and feeling those limits, rather than just knowing that they exist and need to be applied.

- Changing gear, breaking, and applying gas all are physical actions that need some dexterity, to quickly switch between those within fractions of a second is sometimes infeasible. So racers end up just coasting for a short moment to avoid the high risk of a mistake for just a tiny gain.

- Throttle and breaks obviously can't always be fully applied depending on friction, or the danger of one of the wheels getting too much air.

- In a race there is a legit trade-off between lap times and tire wear. Losing too much material early-on will gain you some time initially, but make you lose more towards the end.

Re:The Spoon Theory (2003) by taneq on Friday January 15, 2021 @08:53AM (#25790932)
> In practice, it's more complex and subtle

If ever there were a statement more universally applicable, I've not encountered it. :)

Racing is, of course, about finishing the race (or maybe the season) first (along with all of additional considerations that implies), not just lapping fast.

Re:The Spoon Theory (2003) by praptak on Friday January 15, 2021 @06:29AM (#25789613)
It's similar to server apps. They should either have empty queue or max out a resource (CPU, disk bandwidth, network bandwidth).
Re:The Spoon Theory (2003) by 101008 on Friday January 15, 2021 @06:46AM (#25789743)
Sorry, is this true? Last days I spent a lot of time going crazy because our apps are consuming 90% of memory on our instances and I feel bad/scary for that.
Re:The Spoon Theory (2003) by dsr_ on Friday January 15, 2021 @07:45AM (#25790285)
Two questions you need to answer:

1. Is the app breaking or failing or not serving its purpose in any way? First find the problem, then look for the causes.

2. Let's say your app is using 29G of the memory in a 32GB instance. If you put it in a 64GB instance, will it use 29GB of that, 63GB of that, or does it continue to grow until it runs out of memory and restarts? The first case means you have correctly sized your instance. The second case means the app is good about using almost but not quite all the memory available. The third case is a problem.

Re:The Spoon Theory (2003) by 101008 on Friday January 15, 2021 @11:35AM (#25792691)
The app is not breaking for now, but it will if we send more requests. The problem we are facing is that if we keep adding more instances (we are using Azure web app) the other instsancs also consume 80% (I thought the original memory consumption would be split equally on all instances).

So it seems it is the second case.

Re:The Spoon Theory (2003) by sokoloff on Friday January 15, 2021 @07:16AM (#25790029)
At a minimum, you have to define max correctly. That’s not 100.00% of RAM bytes or CPU cycles and is probably under 25% of Ethernet networks for example.
Re:The Spoon Theory (2003) by praptak on Friday January 15, 2021 @07:15AM (#25790017)
The principle is true and follows from the rule that no resource should be idle if there are requests that need it to be processed.

Memory, however is seldom the bottleneck. This is because most apps are not designed to queue requests if they don't fit in the available memory - they just allocate until they fail.

So, unless your apps are designed to queue requests in order to fit them into memory, this principle is probably not the explanation for the high memory usage.

Re:The Spoon Theory (2003) by J-dawg on Friday January 15, 2021 @04:37AM (#25788817)
I remember a similar anecdote about a legendary F1 driver (possibly Michael Schumacher, but I can't remember).

During practice the drivers talk to their team over the radio about the car's setup. Most drivers would stop talking in the corners and come on the radio during the straights.

This driver would apparently just keep talking all the way around corners. Driving the car was basically automatic, leaving him free to focus on optimising the car.

Re:The Spoon Theory (2003) by fidrelity on Friday January 15, 2021 @04:56AM (#25788936)
I can't find the video but I'm pretty confident this was in fact Ayrton Senna.
Re:The Spoon Theory (2003) by elteto on Friday January 15, 2021 @09:00AM (#25790991)
Another fantastic Senna story is The Moving Wall:

http://www.ayrton-senna.net/the-story-of-the-moving-wall/

Re:The Spoon Theory (2003) by cfontes on Friday January 15, 2021 @05:39AM (#25789231)
It’s Ayrton, he also knew as much about mechanics as his mechanics
Re:The Spoon Theory (2003) by J-dawg on Friday January 15, 2021 @05:49AM (#25789305)
Ah, that makes sense. Thanks for the correction!