In addition to the standard ways of dealing with this given by other commenters (keeping the original input around), perhaps more interesting is to imagine how befreak might compute 12 mod 4 using repeated subtraction.
I'm not clever enough to write the solution, but I imagine a loop using the branching operators (<, >, v, ^). Since each time through the loop pushes a bit onto the control stack, you have a built-in count for the number of times the loop was traversed.
In the example of 12 mod 4, the program would loop through 3 times and break once giving you 0001 (or 1110) on the control stack and something like 12, 8, 4, 0 on the stack. Then when reversing, control bits would be popped off and you'd end up going back 0, 4, 8, 12.
Yeah... I think this article is bullshit. A better analogy, imo, is the somewhat cliche rocks in a jar. I'm my experience, you get ONE big thing in your life. But there can still be room for other, smaller rocks.
But the overall message is fine, if obvious. You have to prioritize, you can't do everything.
I used this fact in an interview ages ago. The interviewer wanted a function, in Java, that shuffled a deck of cards such that every permutation was equally likely. I pointed out this was not possible using the standard library random functions since the seed is a long (akshually... it's 48 bits).
The regulation has changed and no longer limits use at altitude. Source: have launched high altitude balloons to 100000' and https://space.stackexchange.com/a/14695.
You still have to be careful to buy a GPS unit that isn't limited in altitude, though.
Really going above and beyond on that, "write a function that reverses a string in place" interview question, aren't they? I'm afraid I'll have to dock points in simplicity though.
I'm looking for something similar for PID controllers, or control systems in general. Specifically for a teenager. Most sources I can find are either college textbooks or overly simple summaries for FIRST Lego League.
George Gillard's PID document is circulated widely for teaching high school students about PID for the VEX Robotics Competition: https://smithcsrobot.weebly.com/uploads/6/0/9/5/60954939/pid...
I'd also add a +1 to the suggestion of the Controls Engineering in FRC book, but the math in that book is significantly more complex than Gillard's guide.
That is pretty much exactly what I was looking for. Maybe a touch more complicated than what my 11 year old is ready for; but something he can stretch a bit with. Thank you!
o/t but … I was attempting to understand how one might apply controls systems to a teenager until one of my internal processing threads got around to the correct reading of your comment.
For 1, it depends on the building. Early Amazon buildings did not require badging out. I'm my experience, they've been switching to badge out turnstiles over time. That said, I don't think they're using that data in the reports yet. I know of people who simply badge in and go home.
For ooto, they are not tracking this correctly. I received one of the nastygrams when I was on vacation. I forwarded it as my notice of resignation.