• 0 Posts
  • 27 Comments
Joined 1 year ago
cake
Cake day: June 9th, 2023

help-circle



  • It was Internet Explorer. But, what was probably confusing about it was that anything that required Internet access would start up the program that dialed the modem and connected to the Internet. So, clicking on the icon would eventually launch the browser, but first it would launch the dial-up program, which would take about 30s to connect.

    As an aside, it really grates to see how Microsoft called their browser “The Internet”. And that’s the least dastardly thing they did that let them use their monopoly on operating systems to destroy Netscape.



  • My favourite story about aircraft design about some of the design mistakes on the F-16 fighter.

    The F-16 was the first fly-by-wire fighter. They didn’t have much experience with it, and tried out some new things. One was that instead of having a stick between the legs of the pilot they used a side stick. And, since everything was fly-by-wire they didn’t need the stick to mechanically move. They decided they’d just use a solid stick with pressure transducers, since it was simpler and more reliable than a stick that moved.

    The trouble was that the pilots couldn’t estimate how much pressure they were using. This led to the pilots over-rotating on take-off (pulling back too hard). Even funnier was that at early airshows, when the pilots were doing a high-speed roll, you could see the control surfaces twitching with the heartbeat of the pilots as they shoved the stick as hard as they could to get maximum roll.

    That led to them adding a small amount of give to the stick, essentially giving the pilots feedback on how hard they were pushing the control surfaces.

    Another more subtle issue with the design was that originally the stick was set up for forward, back, left and right aligned with the axes of the plane itself. But, they discovered that when pilots pulled back on the stick, they were pulling slightly towards themselves, causing the plane to also roll. So, they realigned it so that “pulling back” is slightly pulling towards the pilot’s body, rather than directly along the forward / backward axis of the plane.


  • There was a listener question on a science podcast recently that asked about how the temperature changed on the moon during the recent solar eclipse.

    They almost got what a solar eclipse was, but not quite. During a solar eclipse, the moon gets between the sun and the earth, blocking the light getting to the earth and casting a shadow on the earth. The side of the moon facing the earth is completely dark because the thing that normally lights it up (the sun) is completely behind it. But, the back side of the moon is getting full sun and just as hot as normal.

    I think part of the problem with understanding all this is that the sun is just so insanely bright. Like, it’s a bit hard to believe that the full moon is so bright just because it’s reflecting sunlight. It’s also amazing that the “wandering stars” (planets) look like stars when they’re just blobs of rocks or gases that are reflecting the insanely bright light of the sun.

    It’s amazing if you think about it. Light comes out of the sun in every possible direction. A tiny fraction of it hits the surface of Mercury, and only some of that light is reflected back out. The light reflected from Mercury goes in almost every direction. A tiny fraction of it hits the earth. But, even with that indirect bounce, it’s bright enough to see with the naked eye.


  • Especially with night bombing campaigns.

    They used to “move” towns by a few km by stringing up lights that matched the pattern of the town’s streetlamps in empty fields a few km away, and then having the actual city blacked out. From 30k feet up, they’d see matching light patterns and assume they were over the target.

    The daylight bombing raids were a bit more accurate. You may think that being able to match a map to terrain features sounds relatively easy in a plane that’s flying relatively slowly along a predictable route. But if it’s at all overcast it’s much harder. Then add in flak or enemy fighters distracting you and pulling you away from your maps, and suddenly it’s a lot harder.

    But, under ideal conditions, with the Norden bomb sight, the bombers could be surprisingly accurate. The bomb sight adjusted for ground speed, changing winds, and included a primitive auto-pilot and actually steered the plane, and AFAIK it auto-released the bombs at the right time. Hitting the right cluster of buildings from a height of 30k feet with a gravity bomb is fairly impressive. But, under combat conditions that was pretty rare.


  • When I first code something up, I think of it as a first draft, and I expect maybe 5ish typos / brainos per 100 lines. Only a few times in my life have I finished writing a few hundred lines of code, tried to compile / run it, and not seen at least a few errors.

    When I don’t see errors, it’s almost always because somehow I managed to not compile / run the code at all. Like, one of my typos / brainos managed to cause it to skip that entire new block of code. Only once or twice has it happened because I actually wrote error-free code the first time. And, let me tell you, that perfect code sucked up so much more time than the more typical bad code.

    With the bad code, I see the various errors, quickly fix them, and those errors convince me that the compiler / interpreter has actually seen all the new stuff and judged it. But, with perfect-from-the-start code, I now have to go in and throw in print statements, or step through a debugger to convince myself that yes, the system actually made it into that function and actually did execute those statements.






  • merc@sh.itjust.workstoProgrammer Humor@lemmy.mlC++ Moment
    link
    fedilink
    arrow-up
    6
    arrow-down
    2
    ·
    4 months ago

    but you can follow any exception down to the exact line of code (or JNI call, I guess) where the problem occurs.

    But, it’s not really where the problem occurred. How often do you get a stack trace and the bug fix is at the line referenced by the stack trace? Almost never. It’s more that it takes you down to the exact line of code where the effects of the problem are bad enough to affect the running of the program. But, the actual problem happened earlier, sometimes much earlier.

    For example, NullPointerException isn’t actually the problem, it’s a symptom of the problem. Something didn’t get initialized properly, and nobody noticed for a while, until we tried to use it, and got a null pointer. Sometimes it’s easy to go from the effect (null pointer) to the cause (uninitialized thing). But, other times that “thing” was passed in, so you have to work backwards to try to figure out where that thing comes from, and why it’s in that broken state.

    Sure, it’s better than nothing, but it’s still frustrating.



  • That’s how surge pricing works.

    Right now they have to set a price that’s reasonable both when the place is empty, and when it is jam packed. The price they’re using is going to be right in the middle.

    If they can change prices dynamically, they’ll want to slightly reduce the crowd when things are busiest, and earn more per customer, and they’ll want to draw people in when it’s empty. When it’s empty they have to pay for workers to sit around doing nothing. They make more money (or lose less money) if those workers are kept busy. To do that, they’ll want to increase traffic by lowering prices.


  • They have zero incentive to make it cheaper, ever.

    Sure they do, competing against other burger joints. There’s a reason the prices are set where they are now: they’re high enough to generate a profit, but low enough to entice people to come there instead of other burger joints. But, right now those prices are static, not dynamic.

    A burger joint that’s open late has to pay for staff. If they’re just sitting around without any customers they’re losing money. If they can lower prices to get people to come to them instead of Mc Donalds or Burger King at night, then they can presumably make more money.