[HN Gopher] The code worked differently when the moon was full
       ___________________________________________________________________
        
       The code worked differently when the moon was full
        
       Author : shanselman
       Score  : 130 points
       Date   : 2021-09-28 18:41 UTC (4 hours ago)
        
 (HTM) web link (www.hanselman.com)
 (TXT) w3m dump (www.hanselman.com)
        
       | woliveirajr wrote:
       | > Not strictly the cycle of the moon but close.
       | 
       | Meh. Just the old 49.7 days cycle that it takes to overflow 32
       | bits when measuring miliseconds.
       | 
       | I was hoping for a "it works when I buy vanilla icecream and
       | doesn't when I buy other flavour".
        
         | swid wrote:
         | I was also hoping the title was more accurate. In the lines of
         | the famous story of not being able to send an email 500 miles.
         | 
         | https://web.mit.edu/jemorris/humor/500-miles
        
           | nashashmi wrote:
           | I always thought the problem was obvious by the title. And
           | felt good about myself for a long time after I read it. Now
           | that I am well into adulthood knowing does not seem that
           | amazing.
        
           | pininja wrote:
           | Thanks for sharing, this is a great read!
        
           | Johnny555 wrote:
           | The end of that article is a good reminder of the _units_
           | command, I 've been using Google for units conversion for so
           | long that I forgot about the standalone _units_. It even
           | comes standard with OSX.
        
             | acidburnNSA wrote:
             | I love the GNU units program so much. I think I use it at
             | least 4 times/week. It's useful for kitchen conversions and
             | also quick nuclear fuel burnup calcs. For example I used it
             | on this blog post covering the long-term sustainability of
             | nuclear fuel resources on earth.
             | 
             | https://whatisnuclear.com/blog/2020-10-28-nuclear-energy-
             | is-...
        
       | acdha wrote:
       | I heard a great story a while back for a digitization project
       | where historic content was being provided by many libraries
       | around the world, including one in Russia.
       | 
       | The quality of the scanned books was excellent, except for a
       | weird distortion every so often where part of the page would be
       | shifted partway through as if someone had shifted half the page
       | in Photoshop. This was only noticed in books over a certain size
       | so people were checking to see if there was some kind of
       | mechanical problem with the scanner (these were robots with
       | automatic page turners so it was plausible that there could be
       | something which was only an issue past a certain position),
       | trying to figure out of there was some way that the software had
       | some kind of memory leak or other issue which would explain the
       | long and inconsistent intervals.
       | 
       | Eventually they were on a long-distance phone call to Moscow and
       | not turning up anything when there was a loud rumble in the
       | background. "What was that?" lead to the realization that the
       | library's scan center was close to a subway tunnel. The vibration
       | of a passing train was enough to cause a glitch but only if you
       | happened to be scanning at the exact time it went by: the reason
       | longer books were noticed was simply because having more pages
       | meant that at any point in time a long book was more likely to be
       | sitting in the scanner and the technicians running the scanner
       | were apparently tuning out the trains as background noise. This
       | was reportedly the first project they'd done with one of the scan
       | robots which can process an entire book unattended so it was
       | plausible that smaller past projects simply hadn't been scanning
       | frequently enough to hit this problem or that some previous
       | technician had simply noticed and immediately redone the scan.
        
       | mhandley wrote:
       | The phase of the moon really can affect performance. A friend of
       | mine worked on wireless links in Scotland and was struggling with
       | loss at certain times of day, but not exactly the same time every
       | day. When they graphed loss against time, the pattern was really
       | periodic over many days. The periodicity turned out to be 12
       | hours 25 minutes, which they eventually realized is exactly the
       | time between low tides. The problem was at low tide the reflected
       | path off the water interfered with the line-of-sight path causing
       | signal fading, whereas at high tide it interfered much less. In
       | particular, see figure 2 of their paper for the correlation
       | between tide height and SNR:
       | https://homepages.inf.ed.ac.uk/mmarina/papers/EDI-INF-RR-136...
       | As tide height really does depend on the phase of the moon,
       | presumably their loss did too, if they measured for long enough.
        
         | m4rtink wrote:
         | I heard a story about an astronomer loosing the chance to be
         | the first to report a commet one cold winter night - just as he
         | wanted to send the email to report it, the Internet connection
         | was dead! He ran from the observatory to the nearest place with
         | Internet connectivity, but by the time he sent the email from
         | there, there was already a report from another astronomer
         | elsewhere, a few minutes ago.
         | 
         | Reason for the mysterious network outage ? Thermal contraction!
         | The observatory was connected to the Internet via an optical
         | link to a highrise building in the city that contracted ever so
         | slightly due to the very low temperature, moving the laser beam
         | of the optical link out of alignment, shutting down the
         | connection.
        
         | [deleted]
        
         | fragmede wrote:
         | The moon is a nightime light source, and a pretty good one at
         | that, every 30 days or so. Even after the invention of the
         | light bulb it continues to light up the night. Thus it's _not_
         | astrology to suggest that the phase of the Moon could affect
         | things on Earth seeing as how it 's what causes tides. (It _is_
         | astrology to suggest the Moon is causing an effect based on
         | magic though).
        
         | pedrocr wrote:
         | Cool result. That figure 2 is begging for a scatter plot of SNR
         | and tide level to see how well correlated they are.
        
         | abkfenris wrote:
         | I remember reading that paper when I was trying to figure out
         | why we were having issues with a wireless link down in the
         | Patagonia fjords.
         | 
         | Unfortunately we didn't have the hardware or enough control
         | over the link (it took negotiating access with armed forces to
         | work on either end) to try to implement any of their ideas.
        
         | ColinWright wrote:
         | For those who are interested, this is why you usually have two
         | dishes/aerials, vertically displaced, so that when one has
         | destructive interference between the direct and reflected
         | signals, the other has constructive interference. I learned
         | something about this when writing data compression and
         | encryption software for radar surveillance systems, where there
         | were multiple radars over a moderate coverage area, all sending
         | data via microwave links over water back to the Command and
         | Control Centre.
        
       | robocat wrote:
       | In the analogue days, before pixels existed, a customer had
       | trouble with their phone line not working when the moon was full.
       | 
       | The problem was that they lived on the coast, and a subsurface
       | junction box would get wet during king tides, causing the
       | telephone line to fail.
        
       | drdeadringer wrote:
       | Reminds me of a story where a company's internet would regularly
       | drop at the same time every day -- let's say 3pm.
       | 
       | Nobody could figure it out so they called in an expert.
       | 
       | After lots of attempts and figuring, one day the person in
       | question happens to look out the window at the time in question
       | ... and sees a service truck park exactly in line-of-sight
       | between the business and their internet-signal pickup broadcast
       | point.
       | 
       | Ah ha!
        
         | a-dub wrote:
         | i once lived in an apartment in an old building where if you
         | turned on the light in the bathroom the dsl would lose sync.
         | 
         | why this would occur i'll never know. (probably old telephone
         | wiring wrapped around old 110v wiring? maybe? or who knows what
         | kind of weird leakage/ground loops may have existed)
        
           | enobrev wrote:
           | Quite a few years ago, I spent many hours making my way up
           | the support tiers at Time Warner in Brooklyn to resolve some
           | connection issues (cable modem). I patiently waded through
           | each tier as they repeatedly asked me to reset my modem and
           | my router and restart my computer and check every cable, etc.
           | The same things I'd already done before (as an on-site tech
           | myself, at the time) and as the previous support person asked
           | me to repeat.
           | 
           | Finally I made it to tier three, with someone who seemed
           | obviously competent. Within about a minute, he checked the
           | power usage on my modem and then historically, and knew
           | immediately that if I moved my modem to another outlet, it
           | would work.
           | 
           | It did. Never had that type of connection issue again.
        
           | Socketier wrote:
           | This happened to me as well, only with DSL. The strip lights
           | on the bathroom mirror (newly installed) would disconnect the
           | internet when turned on.
           | 
           | Such a weird thing to troubleshoot when you have a few people
           | living in the same house.
        
       | kalenx wrote:
       | Now, this is a true phase-of-the-moon bug:
       | http://ftp.informatik.rwth-aachen.de/jargon300/phaseofthemoo...
        
       | veryfancy wrote:
       | I hoped this would be an article about nethack.
        
       | macintux wrote:
       | > Bugs based on a time calculations can often show themselves
       | later when view through a longer lens and scope of
       | time...sometimes WAY longer than you'd expect.
       | 
       | When I worked for BBN in '97-'98, someone from outside the
       | company as I recall came to talk to a room of engineers about the
       | wide variety of calendar-related behaviors in various UNIX
       | systems that were expected to cause problems for Y2K.
       | 
       | It was a very, very long list, often subtle issues, and I recall
       | the concern in the room about the number of old systems in use by
       | the DoD and others.
       | 
       | Anyway, no real point to this other than date handling is one of
       | the hardest things to get right in computing, ranking right
       | behind _testing_ for the correct behavior.
        
         | RegBarclay wrote:
         | Dates are a pain.
         | 
         | The date bug I committed with the longest tail was daylight
         | time. It was all good until we got to a day with 25 hours when
         | we "fell back."
        
           | Jiro wrote:
           | I had one of those on my Pebble:
           | 
           | https://github.com/mattrossman/forecaswatch2/issues/44
        
       | btilly wrote:
       | I thought that this was going to be different story.
       | 
       | There was a program I heard about back in the 90s which would
       | literally crash depending on the phase of the moon!
       | 
       | The story is that it wanted to print a date. The programmer
       | happened to have an astronomy library available that gave a
       | string containing the date. So the programmer called that, and
       | then parsed out the date.
       | 
       | Unfortunately the astronomy library wrote its result as a string
       | to a point. The result included the phase of the Moon. The
       | pointer was not declared to be long enough. And therefore, would
       | crash if the name of the phase of the moon was too long!
        
         | dllthomas wrote:
         | http://catb.org/~esr/jargon/html/P/phase-of-the-moon.html
        
       | huachimingo wrote:
       | Funny enough, Nethack[1] had this implemented too (w:spoilers).
       | See also wmoonclock[2](wmaker) for a nice "moon-clock".
       | 
       | [1]https://nethackwiki.com/wiki/Time
       | 
       | [2]https://www.dockapps.net/wmmoonclock
        
       | NotaHera wrote:
       | Elrond - 'There is moon programming here.. see?'
        
       | tux3 wrote:
       | Tangentially related, here's another fun bug that inexplicably
       | cares what time it is: Open Office cannot print on Tuesdays
       | (https://bugs.launchpad.net/ubuntu/+source/cupsys/+bug/255161...)
        
         | invalidusernam3 wrote:
         | A bit unrelated, but another fun one, "We can't send mail more
         | than 500 miles": https://web.mit.edu/jemorris/humor/500-miles
        
       | vidanay wrote:
       | We once had a customer who would call us in a panic a couple of
       | times a year saying our inspection equipment was experiencing
       | unusually high false rejects and they were generating very high
       | scrap rate. By the time we got a technician on site the next day,
       | everything was working flawlessly and the customer couldn't
       | reproduce the problem either. This went on for almost three years
       | with various levels of escalation to the current management.
       | Finally, one day a technician was on site for another project
       | when the customer came up to him and said "It's happening right
       | now! Come fix it!" The technician rushed over to the equipment
       | and discovered that the sun was shining at exactly the right
       | angle to cause a lens flare in one of our cameras. This happened
       | twice a year as the sun moved along its trajectory. A
       | strategically placed piece of opaque plastic fixed it
       | permanently.
        
       | imglorp wrote:
       | Sometimes the day star lines up directly behind your satellite or
       | microwave dish and you have very poor snr for a few minutes.
        
       | unanswered wrote:
       | Signed integers should be used as sparingly as floating-point.
       | They should not be used in ordinary code because ordinary code
       | has no use for them until they break something.
       | 
       | The most notable exception would be languages which allow
       | negative indexing, but IMHO if that were syntactic instead of
       | relying on actual signed integers, it would be safer (I.e., [-
       | $int] would be a different syntax from [(-$int)] and the latter
       | would not be correctly typed.)
        
       | AceJohnny2 wrote:
       | As long as you don't traumatize the hard drives by yelling at
       | them, feat. brendangregg & bcantrill:
       | 
       | https://youtu.be/tDacjrSCeq4
        
         | AceJohnny2 wrote:
         | Tangentially, my last company made sophisticated routers,
         | dissipating ~3kW of heat. We had hard drives in them for
         | persistent logs.
         | 
         | There was a big problem where we needed to upgrade the fans to
         | deal with the heat dissipation, but it was _destroying_ the
         | performance of the spinning disk HDDs due to the vibration of
         | the fans.
         | 
         | (these were 2U devices with 5 boards: 2 control-plane boards (1
         | active, 1 on stand-by for redundancy) & 3 data-plane boards (2
         | active, 1 stand-by))
        
           | Dylan16807 wrote:
           | So I'd say the obvious solution would be suspending the drive
           | on relatively big pieces of rubber, like https://m.media-
           | amazon.com/images/S/aplus-media/sc/a32b42cb-...
           | 
           | If it was a big problem, that must not have been viable? Too
           | cramped?
        
             | AceJohnny2 wrote:
             | Exactly, there was no room for the rubber dampeners that
             | were the obvious solution, and much frustration from the
             | engineers that this wasn't planned ahead.
        
       ___________________________________________________________________
       (page generated 2021-09-28 23:00 UTC)