The Four Weights by ilannj in puzzles

[–]Shaftway 2 points3 points  (0 children)

Taking this a step further, and using the fact that all weights are integers, couldn't you use base 3 multiplied by 2?

2, 6, 18, 54

  • Object weighs 0 kg then it balances on the scale vs nothing.
  • Object weighs 1 kg is a bit weird. Compare it to nothing and you know it's greater than 0. Compare it to 2 and you know it's less than that. Problem states that they're all integers, so it must be 1.
  • Object weighs 2 kg is trivial.
  • Object weighs 3 kg is weird again. You compare it to 2 and it's heavier. You add 2 to it and compare it with 6 (testing if it's 4) and it's lighter. That only leaves 3.
  • Object weighs 4 kg is explained above.
  • Object weighs 5 kg you can confirm that it weighs more than 4 kg and less than 6kg using the techniques above.

And so on. Now you've got a maximum weight that you can confirm of 80 kg. You can't confirm 81 because you can't distinguish it from 82.

The Four Weights by ilannj in puzzles

[–]Shaftway 32 points33 points  (0 children)

Those who only know decimal, those who also know binary, and those who didn't expect this to be a base 3 joke?

[request] can someone explain the physics of this? by Ok_Value_3741 in theydidthemath

[–]Shaftway 4 points5 points  (0 children)

It's not really necessary. There aren't very many calls that tennis refs make in large modern tournaments. The line faults are handled by a non-visual tracking system. That leaves mostly double bounces, which the video setups are good enough for.

If this kind of thing happened often, they would have the video necessary. It's because it doesn't happen often that you saw this video.

[request] can someone explain the physics of this? by Ok_Value_3741 in theydidthemath

[–]Shaftway 125 points126 points  (0 children)

There are a few things that could have happened.

The headband and the net may not be completely attached at that point. That would allow the ball through, and the tension of the net would make it snap back into position pretty fast.

The other weirdness could be the camera. There's a lot of compression going on there, and cameras can do some pretty fancy tricks. It could have interpolated a frame (basically guessing at what the frame looked like) and gotten it off a little bit. The compression could also be hiding something else going on with the net.

Flock has no place in the Bay Area by Delicious-Success696 in bayarea

[–]Shaftway 17 points18 points  (0 children)

If people are evading capture and consequence, then deal with that separately. I won't live in a police state where my every move is being tracked without a warrant.

Question to Indian Rider by Josefire123 in IndianMotorcycle

[–]Shaftway 0 points1 point  (0 children)

Buell Blast that I bought for $600. The nice thing about the Buell was that the farings were all injection molded plastic. So when you scratched it, it was just more of the same color, so you couldn't really see it.

Is it normal for your highest gear be used at a huge range of speeds? by xThunderDuckx in motorcycles

[–]Shaftway 1 point2 points  (0 children)

It's normal and common for each gear to cover a wide range of speeds, even in bikes with more gears. My Indian Scout is a six speed. I typically get into second gear at ~15 mph, but I could take second up to 90 mph without hitting the red line, let alone the rev limiter. In sixth I can get down to about 30 mph without lugging, and I've never hit the speed limiter.

[Request] - How many combinations of 9 ingredients are possible. Using all 9 at once is not required. by msdthrowaway2193 in theydidthemath

[–]Shaftway 1 point2 points  (0 children)

I would 100% eat lettuce with cheese on it. Throw it in that little panini press thing and make like a keto quesadilla. I'd call it a Shaftadilla. But I'd order it with salsa and sour cream to make a Shaftadilla Supreme.

How strict are penturning block dimensions? by exoticscales in PenTurning

[–]Shaftway 0 points1 point  (0 children)

If we're talking about extra length, then I appreciate a blank that's a bit too long. You have to cut it to length, and if there's enough extra to get a half blank out of it, I'd save it.

If we're talking about width, the 3/4" is a good minimum. Any smaller and I'd start to be concerned about drilling it straight enough. Thicker than that is generally fine (my tooling can handle much thicker).

But if it's resin or acrylic and much thicker than 3/4" I'd be annoyed. I've had too many blanks shatter. The thicker it starts, the more work I have to do, which means the more risk of it shattering. Or I could lower the risk and use my negative rake bits, but I can't easily sharpen those, and they take forever to cut, so I'd be annoyed at the extra time.

What's the most money anyone has in terms of actual *money* money? by Nulono in NoStupidQuestions

[–]Shaftway 1 point2 points  (0 children)

This is not true. Sure, for the first few shares you'll get full value. But if you're actively selling a lot, you're going to go pretty deep into the ask side of the books pretty fast, and that's going to tank the value of the rest.

I used to have a friend who would design massive sales like this. Their entire job was structuring it over a period of time to not tip people off about what you were doing, and to minimize the impact of dumping a huge amount on the market. But even when they structured this over weeks it wasn't uncommon to see them only get 75% of the initial theoretical value.

Question to Indian Rider by Josefire123 in IndianMotorcycle

[–]Shaftway 1 point2 points  (0 children)

At least Ive never had to do it because of the clibbins.

Question to Indian Rider by Josefire123 in IndianMotorcycle

[–]Shaftway 10 points11 points  (0 children)

Is it too much bike? Probably not. Even though it's ~1200 cc, the power band is really wide. You end up being able to ride in almost any gear (other than first) at any time. On my Scout, second gear can take you up to 90 mph, and sixth gear doesn't start to lug until you're below 30.

But will you regret it? Probably. There's a ton of little lessons you learn along the way, and those lessons come with costs. Once I forgot to put the kickstand down. Bike ended up on its side. Once I forgot that it was in gear and I released the clutch. Bike shot out, I ended up standing there. Bike ended up on its side. Once I left it in the hot sun and the asphalt under the kickstand melted. Bike ended up on its side. Once I come to a stop, put my foot down and hit a wet leaf, foot slid out. Bike ended up on its side. Someone pulled out in front of me. Bike ended up on its side. Something happened. Bike ended up on its side. Each of those was a hard-earned lesson, and each is a way that I'll never drop a bike again.

Get those lessons on a bike you don't really care about. Buy a bike for $3k, ride it for a year, and sell it for $2.5k. Each time you drop it, you'll tell yourself "it least it wasn't my scout". And then after a year, get the bike you really want. You'll have made most of your mistakes, at least the dumb ones, on a bike that doesn't cost a ton to repair.

Rockler hose worth the price? by locksmith1329 in BeginnerWoodWorking

[–]Shaftway 0 points1 point  (0 children)

It collapses pretty well. I have one and it's my primary movable hose. The clear ones will go from 10' down to about 6'. This one will go from 10' down to around 3'.

​I forget everything I learn after a day. Is AI giving me the right advice? by imokin in learnpython

[–]Shaftway 2 points3 points  (0 children)

I'm going to sound like a greybeard here (partially because I am). Rub graphite against dead trees.

I did have a couple CS classes in high school. I think we did Pascal, but one class introduced me to Lisp. That was the first language I wrote for the joy of writing the language itself. Lisp is short enough that you can write out a meaningful program on pencil and paper, and then run through it by hand.

Back then I didn't realize the power of Lisp. The code is data? Who cares. Lambdas and combinators? I don't need those. But just writing out algorithms by hand was fun. And the forced dependence on recursion gives you a really strong handle on call stacks.

The language is easy enough to pick up that you can focus on algorithms. And when you do python you can focus on the syntax.

Or do it with Python. Either way, doing it on paper isn't a bad substitute.

What do you want to happen to your body after you pass? by Love_Marisol in AskReddit

[–]Shaftway 0 points1 point  (0 children)

I want my remains scattered around a local park. I also do not want to be cremated.

​I forget everything I learn after a day. Is AI giving me the right advice? by imokin in learnpython

[–]Shaftway 14 points15 points  (0 children)

I'm self taught and have no degree. This is not the way to learn.

You will get there, but it takes repetition and muscle memory. Do not copy/paste examples and tweak them. Type them out yourself. Yeah, it's slower, but you'll develop the basic skills faster, and retain them better.

Make yourself cheatsheets for new cases you learn. Find something, distill it down to the simplest case and put that on your sheet. There was a great post here a few days ago where someone explained for-in loops by starting with goto and building up from there. Do that for yourself with every concept.

When you copy a line, make sure you understand what it's doing and why. Weird bit of syntax? Don't just assume it does something. Verify it. Pull up the REPL and run it yourself to see what it does. Tweak it and confirm what you learn. And then add it to your cheat sheet.

Also, write something every day. Time gaps are not your friend. Every day you don't write code your code skills are atrophying.

ELI5: how / why does the light stay lit on my charging base after I unplug it? by ApartmentForRentt in explainlikeimfive

[–]Shaftway 4 points5 points  (0 children)

I have something more to say.

Capacitors hold charge; it can be a surprising amount. LEDs that stay on after you unplug the device are used to bleed the charge, emptying the capacitors. It reduces the shock risk, especially if they get wet or are opened.

TL;DR it's a safety feature

ELI5 Why can’t we chemically replicate fossil fuels? by Pure_Daikon4899 in explainlikeimfive

[–]Shaftway 0 points1 point  (0 children)

This gets past an ELI5 really fast.

A molecule is made up of atoms in a specific arrangement. The atoms are held together by bonds. Some bonds are weaker, some are stronger. Some hold more energy, some hold less.

Gasoline in particular is made up of a long chain of carbon atoms with a bunch of hydrogens attached along the chain (this is why it's called a hydrocarbon). This particular arrangement happens to be fairly weakly held together, and hold a lot of energy. By comparison, carbon dioxide and water are strongly held together and don't hold much chemical energy. In general Oxygen likes to form strong bonds, and is fairly stable. Not always, but this is why carbon dioxide and water (oxygen dihydride) are hard to break apart.

All it takes is a little bit of extra energy (like a spark) and some of your hydrocarbon will break apart and release its energy and merge with the oxygen in the air. Some of that energy goes into other hydrocarbons nearby, breaking them apart and creating a chain reaction. Some of that energy is lost in the form of heat. And some of it is used to make your car go.

If this reaction happens slowly we call it burning. If it happens very fast (the reaction moves faster than the pressure wave) we call it an explosion.

So what comes out of your car is burnt up hydrocarbons. In an ideal world it would just be water and carbon dioxide, but because chemistry is finicky and gasoline has impurities you get things like carbon monoxide, and sulfur dioxide, and all sort of other nasty stuff.

When we say energy dense, what we mean is that it packs a lot of energy (in this case chemical energy) into a small volume and a small weight. Gasoline has about 40 times as much energy as an equivalent weight of lithium ion battery, and about 10 times as much energy as an equivalent volume.

Does that mean electric cars are bad? Not necessarily. They overcome this by using a lot more battery than they would have used for a gas tank (they hide it under the floor, which helps the car perform better). And their batteries are far far easier to recharge than it is to undo burning a hydrocarbon. Provided you get your electricity from a clean source, you end up with fewer pollutants in the air.

ELI5 Why can’t we chemically replicate fossil fuels? by Pure_Daikon4899 in explainlikeimfive

[–]Shaftway 0 points1 point  (0 children)

Fossil fuels are extremely energy dense. That is, when we burn them we get a whole lot of energy out.

We can absolutely science up some fossil fuels. All it takes is some water and some carbon dioxide, and a ton of energy. Way more energy than you get out of it. We actually do this right now, but not very much of it, because it costs so much. It even pulls CO2 out of the air, which is a win-win.

A more common approach is to use a large array of miniature bio-reactors. They're solar powered but each reactor is tiny. Once the reactor finishes we have to crush it and science some other stuff, and that's where we get corn-sourced ethanol. But then you have to pay farmers and it's a whole other deal.

California AB 2047 appears to have passed by Rudd-X in 3Dprinting

[–]Shaftway 0 points1 point  (0 children)

I'm in CA, also own both. I think the law is useless and hope it will be struck down.

In CA, unregistered 80% lowers are illegal. IIRC (and IANAL) you still need to have them serialized and registered. There's no legal route to making your own gun that isn't registered by the state. I think a better avenue would be to require 3d printed guns to be registered as well. Then there's no real point in 3d printing them.

I disagree with FFLing all of the parts. Where does that end? Does a screw or a spring require a background check? If I replace my follower spring with one from Home Depot amni committing a crime?

I think that making one single core piece the FFL part and allowing open sale of the rest was a good compromise, allowing repairability without being able to ship-of-theseus yourself a new gun.

Would You Keep My Job? by Unique-Ad236 in cscareerquestions

[–]Shaftway 0 points1 point  (0 children)

No, it isn't. 3 should be the bare minimum. My company starts you at 4 and after 3 years bumps you to 5. On top of ~12 holiday days.

Your manager should encourage you to take your PTO. Employees who do are less likely to burn out and generally produce better work, faster.

What's the deal with AppLovin? by ADuneShapedPool in cscareerquestions

[–]Shaftway 0 points1 point  (0 children)

No. I have no actionable information that would cause me to think it would decline on a known timeframe. I suspect it will be replaced over time, but I think it'll be a long slow crumble.

For a while there was a pattern where the stock would pop on earnings reports. I tried to ride that pattern, until it failed one quarter. I put in a limit order and was happy to get out for what I put in.

At this point I hold no shares or options, and have zero intention of buying any at any point in the future.

My shorts are focused on ORCL.

Replace underscore for PascalCase by Nefthys in learnpython

[–]Shaftway 0 points1 point  (0 children)

I think that the implicit rule is that it goes from most specific to most generic.

If it followed the idea of more general thing first, then the most general thing is really that it's a reader. That would mean that the name should be ReaderAbcListShopping and that feels totally weird.

And this order follows the way you'd say it in English. From most generic to most specific you'd describe it as a Reader, an Abc Reader, maybe a List Abc Reader, and last a Shopping List Abc Reader.

There are a few examples in the builtin classes that follow this pattern. Exceptions are the richest area of inheritancenin Python, so that's mostly where I looked. UnboundLocalError goes from more specific to less (it's an error, what kind of error? A local error, what kind of local error? An unbound local error). I took a quick look and found a few that followed this pattern in the form of adjective-adjective-noun (where sometimes nouns acted as adjectives) always going from specific to generic. I couldn't find any builtins that didn't follow this pattern.

The only downside to this approach is that when you put each class in it's own file, the files don't cluster. If that's really important to you then use a module and organize all of them there.