10 comments

  • vocx2tx7 hours ago
    But still a kludge. Better: use something equivalent to Go&#x27;s testing&#x2F;synctest[0] package, which lets you write tests that run in a bubble where time is fixed and deterministic.<p>[0] <a href="https:&#x2F;&#x2F;pkg.go.dev&#x2F;testing&#x2F;synctest" rel="nofollow">https:&#x2F;&#x2F;pkg.go.dev&#x2F;testing&#x2F;synctest</a>
    • rtpg2 hours ago
      I’ve used freezetime (Python) a decent amount and have experienced some very very very funny flakes due to it.<p>- Sometimes your test code expects time to be moving forward<p>- sometimes your code might store classes into a hashmap for caching, and the cache might be built before the freeze time class override kicks in<p>- sometimes it happens after you have patched the classes and now your cache is weirdly poisoned<p>- sometimes some serialization code really cares about the exact class used<p>- sometimes test code acts really weird if time stops moving forward (when people use freezetime frozen=true). Selenium timeouts never clearing was funny<p>- sometimes your code gets a hold of the unpatched date clsss through silliness but only in one spot<p>Fun times.<p>The nicest thing is being able to just pass in a “now” parameter in things that care about time.
    • dathinab7 hours ago
      in general<p>- generating test data in a realistic way is often better then hard coding it (also makes it easier to add prop testing or similar)<p>- make the current time an input to you functions (i.e. the whole old prefer pure functions discussion). This isn&#x27;t just making things more testable it also can matter to make sure: 1. one unit of logic sees the same time 2. avoid unneeded calls to `now()` (only rarely matters, but can matter)
      • WorldMaker6 hours ago
        Similarly, I like .NET&#x27;s TimeProvider abstraction [1]. You pass a TimeProvider to your functions. At runtime you can provide the default TimeProvider.System. When testing FakeTimeProvider has a lot of handy tools to do deterministic testing.<p>One of the further benefits of .NET&#x27;s TimeProvider is that it can also be provided to low level async methods like `await Task.Delay(time, timeProvider, cancellationToken)` which also increases the testability of general asynchronous code in a deterministic sandbox once you learn to pass TimeProvider to even low level calls that take an optional one.<p>[1] <a href="https:&#x2F;&#x2F;learn.microsoft.com&#x2F;en-us&#x2F;dotnet&#x2F;standard&#x2F;datetime&#x2F;timeprovider-overview" rel="nofollow">https:&#x2F;&#x2F;learn.microsoft.com&#x2F;en-us&#x2F;dotnet&#x2F;standard&#x2F;datetime&#x2F;t...</a>
        • rzzzt3 hours ago
          Java has an interface named InstantSource for this purpose: <a href="https:&#x2F;&#x2F;docs.oracle.com&#x2F;en&#x2F;java&#x2F;javase&#x2F;17&#x2F;docs&#x2F;api&#x2F;java.base&#x2F;java&#x2F;time&#x2F;InstantSource.html" rel="nofollow">https:&#x2F;&#x2F;docs.oracle.com&#x2F;en&#x2F;java&#x2F;javase&#x2F;17&#x2F;docs&#x2F;api&#x2F;java.base...</a>
          • layer82 hours ago
            Paradoxically, InstantSource may have a delay. ;)
      • 0x4576 hours ago
        Also, if you do use `now()` in this case you can always do `now() + SomeDistantDuration`
    • Bratmon4 hours ago
      Doesn&#x27;t that just turn bugs in test in n years into bugs in prod in n years?<p>That seems like a downgrade to me!
      • loeg4 hours ago
        No, because prod doesn&#x27;t have hardcoded cookies baked into it?
        • AndrewDucker3 hours ago
          If you always test with a date of 1&#x2F;1&#x2F;2000 then you don&#x27;t know that your choice fails in 2039.
          • vocx2tx2 hours ago
            These fake-time environments let you set the time, so you can test how the code will behave in 2039 without waiting for 13 years. For Go&#x27;s synctest, 1-1-2000 is just the default initial value for now().
    • jcul3 hours ago
      libfaketime is cool for testing this kind of thing too.<p>Not as convenient for unit tests cause you have to run the test with LD_PRELOAD.
    • bombcar5 hours ago
      This can cause <i>other</i> types of bugs to go unnoticed, such as leap year fun (if you handle 100 years, did you handle the 400th year?).
  • andai8 hours ago
    Interesting, from the title I thought it was intentional, as a &quot;forced code review.&quot; Apparently not, but now I really like that idea!
    • jakub_g22 minutes ago
      I always wanted to make feature flags system where each FF must declare an expiration date max 1 year in the future and start failing CI beyond that date to force someone to reevaluate and clean up.<p>It&#x27;s just too easy to keep adding new feature flags and never removing them. Until one day the FF backend goes down and you have 300 FFs all evaluate to false.
    • adrianpike7 hours ago
      We&#x27;ve done that at a few places I&#x27;ve been at - it&#x27;s tricky because if the failure is too short its just annoying toil, but if it&#x27;s too long there&#x27;s risk of losing context and having to remember what the heck we were thinking.<p>Overall it&#x27;s still net positive for me in certain cases of enforcing things to be temporary, or at least revisited.
      • bombcar5 hours ago
        Which is why SSL certs are now 47 days long or whatever it is.
  • Alupis8 hours ago
    Just skimmed the PR, I&#x27;m sure the author knows more than I - but why hard code a date at all? Why not do something like `today + 1 year`?
    • CodesInChaos4 hours ago
      That can easily lead to breaking tests due to time-zones, daylight saving time or the variable length of months.<p>We experienced several of those over the years, and generally it was the test that was wrong, not the code it was testing.<p>For example, this simplified test hits several of those pitfalls:<p><pre><code> var expected = start.AddMonths(1); var actual = start.ToLocal().AddMonths(1).ToUtc(); Assert(expected == actual);</code></pre>
    • johanvts8 hours ago
      That introduces dependency of a clock which might be undesirable, just had a similar problem where i also went for hardcoding for that reason.
      • cogman107 hours ago
        There&#x27;s already a clock dependency. The test fails because of that.
      • rcxdude8 hours ago
        Arguably you should have a fixed start date for any given test, but time is quite hard to abstract out like that (there&#x27;s enough time APIs you&#x27;d want OS support, but linux for example doesn&#x27;t support clock namespaces for the realtime clock, only a few monotonic clocks)
    • whynotmaybe8 hours ago
      Because it should be `today + 1 year + randomInt(1,42) days`.<p>Always include some randomness in test values.
      • rcxdude8 hours ago
        Not a good idea for CI tests. It will just make things flaky and gum up your PR&#x2F;release process. Randomness or any form of nondeterminism should be in a different set of fuzzing tests (if you must use an RNG, a deterministic one is fine for CI).
        • dathinab6 hours ago
          if it makes thing flaky<p>then it actually is a huge success<p>because it found a bug you overlooked in both impl. and tests<p>at least iff we speak about unit tests
          • jstanley4 hours ago
            Only if it becomes obvious <i>why</i> it is flaky. If it&#x27;s just sometimes broken but really hard to reproduce then it just gets piled on to the background level of flakiness and never gets fixed.
            • nomel3 hours ago
              To get around this, I have it log the relevant inputs, so it can be reproduced.<p>The whole concept of allowing a flaky unit test to exist is wild and dangerous to me. It makes a culture of ignoring real failures in what, should be, deterministic code.
              • marcosdumay2 hours ago
                Well, if people can&#x27;t reproduce the failures, people won&#x27;t fix them.<p>So, yes, logging the inputs is extremely important. So is minimizing any IO dependency in your tests.<p>But then that runs against another important rule, that integration tests should test the entire system, IO included. So, your error handling must always log very clearly the cause of any IO error it finds.
          • yxhuvud3 hours ago
            This will often break on stuff like daylight saving changes, while almost as often you don&#x27;t give a rats ass about the boundary behaviour.
          • tremon4 hours ago
            Burma-shave
        • whynotmaybe7 hours ago
          That&#x27;s why it&#x27;s &quot;randomInt(1,42)&quot;, not &quot;randomLong()&quot;.
      • zelos6 hours ago
        Generate fuzz tests using random values with a fixed seed, sure, but using random values in tests that run on CI seems like a recipe for hard-to-reproduce flaky builds unless you have <i>really</i> good logging.
      • CoastalCoder7 hours ago
        &gt; Always include some randomness in test values.<p>If this isn&#x27;t a joke, I&#x27;d be very interested in the reasoning behind that statement, and whether or not there are some qualifications on when it applies.
        • dathinab7 hours ago
          humans are very good at overlooking edge cases, off by one errors etc.<p>so if you generate test data randomly you have a higher chance of &quot;accidentally&quot; running into overlooked edge cases<p>you could say there is a &quot;adding more random -&gt; cost&quot; ladder like<p>- no randomness, no cost, nothing gained<p>- a bit of randomness, very small cost, very rarely beneficial (&lt;- doable in unit tests)<p>- (limited) prop testing, high cost (test runs multiple times with many random values), decent chance to find incorrect edge cases (&lt;- can be barely doable in unit tests, if limited enough, often feature gates as too expensive)<p>- (full) prop testing&#x2F;fuzzing, very very high cost, very high chance incorrect edge cases are found IFF the domain isn&#x27;t too large (&lt;- a full test run might need days to complete)
          • ssdspoimdsjvv6 hours ago
            I&#x27;ve learnt that if a test only fails sometimes, it can take a long time for somebody to actually investigate the cause,in the meantime it&#x27;s written off as just another flaky test. If there really is a bug, it will probably surface sooner in production than it gets fixed.
            • tomjakubowski2 hours ago
              Flaky tests are a very strong signal of a bug, somewhere. Problem is it&#x27;s not always easy to tell if the bug&#x27;s in the test or in the code under test. The developer who would rather re-run the test to make it pass than investigate probably thinks it&#x27;s the test which is buggy.
            • dathinab6 hours ago
              sadly yes<p>people often take flaky test way less serious then they should<p>I had multiple bigger production issues which had been caught by tests &gt;1 month before they happened in production, but where written off as flaky tests (ironically this was also not related to any random test data but more load&#x2F;race condition related things which failed when too many tests which created full separate tenants for isolation happened to run at the same time).<p>And in some CI environments flaky test are too painful, so using &quot;actual&quot; random data isn&#x27;t viable and a fixed seed has to be used on CI (that is if you can, because too much libs&#x2F;tools&#x2F;etc. do not allow that). At least for &quot;merge approval&quot; runs. That many CI systems suck badly the moment you project and team size isn&#x27;t around the size of a toy project doesn&#x27;t help either.
          • SkyBelow5 hours ago
            Can&#x27;t one get randomness and determinism at the same time? Randomly generate the data, but do so when building the test, not when running the test. This way something that fails will consistently fail, but you also have better chances of finding the missed edge cases that humans would overlook. Seeded randomness might also be great, as it is far cleaner to generate and expand&#x2F;update&#x2F;redo, but still deterministic when it comes time to debug an issue.
            • tomjakubowski2 hours ago
              Most test frameworks I have seen that support non-determinism in some way print the random seed at the start of the run, and let you specify the seed when you run the tests yourself. It&#x27;s a good practice for precisely the reasons you wrote.
        • whynotmaybe7 hours ago
          Must be some Mandela effect about some TDD documentation I read a long time ago.<p>If you test math_add(1,2) and it returns 3, you don&#x27;t know if the code does `return 3` or `return x+y`.<p>It seems I might need to revise my view.
          • Izkata7 hours ago
            I vaguely remember the same advice, it&#x27;s pretty old. How you use the randomness is test specific, for example in math_add() it&#x27;d be something like:<p><pre><code> jitter = random(5) assertEqual(3 + jitter, math_add(1, 2 + jitter)) </code></pre> If it was math_multiply(), then adding the jitter would fail - that would have to be multiplied in.<p>Nowadays I think this would be done with fuzzing&#x2F;constraint tests, where you define &quot;this relation must hold true&quot; in a more structured way so the framework can choose random values, test more at once, and give better failure messages.
            • whynotmaybe4 hours ago
              &gt; it&#x27;s pretty old.<p>Damn, must be why only white hair is growing on my head now.<p>&gt;Nowadays I think this would be done with fuzzing&#x2F;constraint tests, where you define &quot;this relation must hold true&quot; in a more structured way so the framework can choose random values, test more at once, and give better failure messages.<p>So the concept of random is still there but expressed differently ? (= Am I partially right ?)
          • ajs19987 hours ago
            Randomness is useful if you expect your code to do the correct thing with some probability. You test lots of different samples and if they fail more than you expect then you should review the code. You wouldn&#x27;t test dynamic random samples of add(x, y) because you wouldn&#x27;t expect it to always return 3, but in this case it wouldn&#x27;t hurt.
          • brewmarche4 hours ago
            This sounds like the idea behind mutation testing
      • andai8 hours ago
        Interesting, haven&#x27;t heard this before (I don&#x27;t know much about testing). Is this kind of like fuzzing?
        • whynotmaybe7 hours ago
          I recently had race condition that made tests randomly fail because one test created &quot;data_1&quot; and another test also created &quot;data_1&quot;.<p>- Test 1 -&gt; set data_1 with value 1<p>- Test 1 -&gt; `do some magic`<p>- Test 1 -&gt; assert value 1 + magic = expected value<p>- Test 2 -&gt; set data_1 with value 2<p>But this can fail if `do some magic` is slow and Test 2 starts before Test 1 asserts.<p>So I can either stop parallelism, but in real life parallelism exists, or ensure that each test as random id, just like it would happen in real life.
      • devin8 hours ago
        Are you joking? This is the kind of thing that leads to flaky tests. I was always counseled against the use of randomness in my tests, unless we&#x27;re talking generative testing like quickcheck.
        • dathinab6 hours ago
          or, maybe, there is something hugely wrong with your code, review pipeline or tests if adding randomness to unit test values makes your tests flaky and this is a good way to find it
          • devin5 hours ago
            or, maybe, it signals insufficient thought about the boundary conditions that should or shouldn&#x27;t trigger test failures.<p>doing random things to hopefully get a failure is fine if there&#x27;s an actual purpose to it, but putting random values all over the place in the hopes it reveals a problem in your CI pipeline or something seems like a real weak reason to do it.
            • tomjakubowski2 hours ago
              I don&#x27;t think anyone is advocating for random application of randomness.
        • whynotmaybe8 hours ago
          `today` is random.
          • InsideOutSanta5 hours ago
            If &quot;today&quot; were random, our universe would be pretty fricken weird.
          • Eldt7 hours ago
            It&#x27;s dynamic, but it certainly isn&#x27;t random, considering it follows a consistent sequence
  • bombcar9 hours ago
    Any time constant will be exceeded someday.<p>An impossibly short period of time after the heat death of the universe on a system that shouldn’t even exist: ERROR TIME_TEST FAILURE
    • unkl_9 hours ago
      Posted on HN in 2126: 100 years ago, someone wrote a test for servo that included an expiry in 2126
      • jerf9 hours ago
        I&#x27;ve got some tests in active code bases that are using the end of 32-bit Unix time as &quot;we&#x27;ll never get there&quot;. That&#x27;s not because the devs were lazy, these tests date from when that was the best they could possibly do. They&#x27;re on track to be cycled out well before then (hopefully this year), so, hopefully, they&#x27;ll be right that their code &quot;won&#x27;t get there&quot;... but then there&#x27;s the testing and code that assumes this that I <i>don&#x27;t</i> know about that may still be a problem.<p>&quot;End of Unix time&quot; is under 12 years now, so, a bit longer than the time frame of this test, but we&#x27;re coming up on it.
        • bombcar7 hours ago
          I seem to recall much smugness on Slashdot around the &quot;idiot winblows users limited by DOS y2k&quot; and how the time_t was &quot;so much better&quot;. Even then a few were prophesying that it would come bite us eventually ...
      • yetihehe9 hours ago
        Now I feel bad for using (system foundation timestamp)+100 years as end of &quot;forever&quot; ownership relations in one of my systems. Looking now, it&#x27;s only 89 years left. I think I should use nulls instead.
        • prerok6 hours ago
          Well, it won&#x27;t be your problem &#x2F;j
          • bombcar4 hours ago
            <a href="https:&#x2F;&#x2F;factorio.com&#x2F;blog&#x2F;post&#x2F;fff-388" rel="nofollow">https:&#x2F;&#x2F;factorio.com&#x2F;blog&#x2F;post&#x2F;fff-388</a> - they wanted to use a 64 bit int for the tick count, but Lua doesn&#x27;t have one; so they used the one available and worked out when it would lose precision.<p>&quot;More than 2 million years seems to be enough for us to not be around any more when the bug reports start appearing.&quot;
    • dlcarrier2 hours ago
      Most updates to avoid the 2038 problem really just delay it until 10889. Maybe in eight in a half millennia, they will have figured out something that lasts longer.
      • delecti2 hours ago
        How is 10889 a problem? I thought the move to 64 bit added billions of years.
    • tacostakohashi5 hours ago
      Yep - that&#x27;s why I always choose my time constants to be during years when I will be retired, or possibly dead.<p>If you&#x27;re going to kick the can down the road, why not kick it pretty far?
    • fny9 hours ago
      Who here remembers the fud of Y2K?
      • acuozzo9 hours ago
        Don&#x27;t mistake a defused bomb for a dud.<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Preparedness_paradox" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Preparedness_paradox</a>
        • arduanika7 hours ago
          Thanks! I think about this concept a lot, and now I know there&#x27;s a name for it. &quot;Preparedness paradox&quot;. I&#x27;ll have to remember that.<p>And to your point, Y2K is right there on the wiki page for it.
      • philipallstar9 hours ago
        I remember the reality of all the work needed to avoid issues.
      • jghn6 hours ago
        As others have stated, the lack of visible effect is not the same thing as there never having been a land mine in the first place.<p>I can tell you anecdotally that on 12&#x2F;31&#x2F;2000 I was hanging with some friends. At 12PM UTC we turned on the footage from London. At first it appeared to be a fiery hellscape armageddon. while it turned out to just be fireworks with a wierd camera angle, there was a moment where we were concerned something was actually happening. Most of us in the room were technologists, and while we figured it&#x27;d all be no big deal, we weren&#x27;t *sure* and it very much alarmed us to see it on the screen.
      • gom_jabbar8 hours ago
        Made me think of Mark Fisher&#x27;s <i>Y2K Positive</i> text:<p>&gt; At the Great Midnight at the century&#x27;s end, signifying culture will flip over into a number-based counterculture, retroprocessing the last 100 years. Whether global disaster ensues or not, Y2K is a singularity for cybernetic culture. It&#x27;s time to get Y2K positive.<p>Mark Fisher (2004). <i>Y2K Positive</i> in <i>Mute.</i>
      • LocalPCGuy9 hours ago
        While there was a lot of FUD in the media, there were also a lot of scenarios that were actually possible but were averted due to a LOT of work and attention ahead of time. It should be looked at, IMO, as a success of communication, warnings, and a lot of effort that nothing of major significance happened.
        • tejohnso8 hours ago
          Yes, Y2K is a success story, similar to the alert and response related to ozone layer and CFCs.<p>Dissimilar to the global climate catastrophe, unfortunately.<p>---<p>The 2024 state of the climate report: Perilous times on planet Earth<p><a href="https:&#x2F;&#x2F;academic.oup.com&#x2F;bioscience&#x2F;article&#x2F;74&#x2F;12&#x2F;812&#x2F;7808595" rel="nofollow">https:&#x2F;&#x2F;academic.oup.com&#x2F;bioscience&#x2F;article&#x2F;74&#x2F;12&#x2F;812&#x2F;780859...</a><p>&quot;Tragically, we are failing to avoid serious impacts&quot;<p>&quot;We have now brought the planet into climatic conditions never witnessed by us or our prehistoric relatives within our genus, Homo&quot;<p>&quot;Despite six IPCC reports, 28 COP meetings, hundreds of other reports, and tens of thousands of scientific papers, the world has made only very minor headway on climate change&quot;<p>&quot;projections paint a bleak picture of the future, with many scientists envisioning widespread famines, conflicts, mass migration, and increasing extreme weather that will surpass anything witnessed thus far, posing catastrophic consequences for both humanity and the biosphere&quot;
          • timschmidt8 hours ago
            I don&#x27;t mean to lessen the impact of that statement. I think climate change is a serious problem. But also most of the geologic time that genus Homo has existed, Earth has been in an ice age. Much of which we&#x27;d consider a &quot;snowball Earth&quot;. The last warm interglacial period, the Eemian, was 120,000 years ago.
            • tejohnso3 hours ago
              That&#x27;s an interesting bit of detail. As you intended, it does not lessen the impact of the statement: &quot;conditions never witnessed by us or our prehistoric relatives&quot;. It confirms it, with some additional context.<p>To me, it seems to make it even more significant. Because as you point out, Homo evolved under ice age conditions over millions of years. Well, here we are about to be thrust into uncharted territory, in an extremely short period of time. With very fragile global interdependencies, an overpopulated planet, and billions of people exposed to the consequences.
            • nkrisc7 hours ago
              The genus Homo dates back nearly 2 million years.
              • timschmidt5 hours ago
                Yes. And virtually all of that time has been colder than average: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Geologic_temperature_record#&#x2F;media&#x2F;File:Five_Myr_Climate_Change.png" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Geologic_temperature_record#&#x2F;m...</a><p>Sometimes a great deal so. Sometimes less. But nearly always below average. For our whole existence.<p>That&#x27;s why the choice of wording struck me.<p>You can zoom out a bit more and it just gets clearer: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Geologic_temperature_record#&#x2F;media&#x2F;File:65_Myr_Climate_Change.png" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Geologic_temperature_record#&#x2F;m...</a><p>Further out and we&#x27;re still one of the coldest periods: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Geologic_temperature_record#&#x2F;media&#x2F;File:All_palaeotemps.svg" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Geologic_temperature_record#&#x2F;m...</a><p>We&#x27;re ice-age dwellers. Always have been.<p>I can both be alarmed at how quickly the ice age humanity has evolved within is ending, and find that a very funny way of phrasing it. These things don&#x27;t conflict in me, though it seems triggering to some. People are downvoting me with moral conscience, but I&#x27;m just over here laughing at a funny conjunction of paleoclimate and word choice. :) People getting offended by it kinda makes it funnier.
            • john_strinlai7 hours ago
              this is the same style comment as &quot;<i>no offense, but &lt;offensive thing&gt;</i>&quot;<p>if you didnt intend to lessen the impact of that statement, why say something that is specifically meant to lessen the impact of the statement? just say what you want to say without the hedging.
            • philipwhiuk7 hours ago
              What you just wrote is the same as: &#x27;the entire lifecycle of humanity has no precursor to the conditions&#x27; we are about to face.<p>We aren&#x27;t facing the ice age that has been the last 120,000 years.<p>I&#x27;m sure the rocky planet will survive just fine, maybe even some extreemophiles, even if we completely screw up the atmosphere. Not 6 billion humans though.
            • yfontana8 hours ago
              [dead]
      • kjs37 hours ago
        Tell us you weren&#x27;t involved in Y2K iwithout telling us you weren&#x27;t involved in Y2K.
      • NetOpWibby9 hours ago
        Exciting times with an anticlimactic end; I was in middle school, relishing the chaos of the adult world.
      • myself2489 hours ago
        Another victim of the preparedness paradox.
  • samlinnfer7 hours ago
    i had to plant a 10 year time bomb in our SAML SP certificate because AFAIK there is no other way to do it. It’s been 7 years since then. Dreading contacting all the IDPs and getting them to update the SAML config.
  • ianberdin2 hours ago
    “Someone” please stop write Someone at every possible post, especially on X.
  • db48x1 day ago
    Classic!<p>But before you judge the fix too hashly, I bet it’s just a quick and easy fix that will suffice while a proper fix (to avoid depending on external state) is written.
    • pavel_lishin8 hours ago
      I&#x27;ll bet you one US Dollar that this is a scenario where the temporary fix becomes the permanent one. (Well, at least, permanent for a hundred years.)<p>Some day, Pham Nuwen is going to be bitching about this test suite between a pair of star systems.
      • db48x7 hours ago
        That’s one of my favorite books :)<p>I agree that it’s plausible!
    • em-bee8 hours ago
      of course it is just an easy fix. it&#x27;s the kind of solution that even someone like me could write who has no understanding of the code a all. (i am not trying to imply that the submitter of the PR doesn&#x27;t understand the code, just that understanding it is unlikely to be necessary, thus the change bears no risk.<p>but, the solution now hides the problem. if i wanted to get someone to solve the problem i&#x27;d set the new date in the near future until someone gets annoyed enough to fix it for real.<p>and i have to ask, why is this a hardcoded date at all? why not &quot;now plus one week&quot;?
      • db48x5 hours ago
        There’s a lot to be said for simplicity. The more logic you put into handling the dates correctly in the tests, the more likely you are to mess up the tests themselves. These tests were easy to write, easy to review, easy to verify, and served perfectly well for 10 years.<p>But doing it right shouldn’t be all that hard.
  • harikb5 hours ago
    A comment from the PR<p>&gt; Not a serious problem, but the weekdays are wrong. For example, 18-Apr-2127 is a Friday, not Sunday.<p>There is now many magical dates to remember - 2126 ( I think PR was updated after that comment) and 2177. There is also 2028 also somewhere.
  • kristofferR8 hours ago
    [flagged]
    • tomhow7 hours ago
      <i>Please don&#x27;t complain about tangential annoyances—e.g. article or website formats, name collisions, or back-button breakage. They&#x27;re too common to be interesting.</i><p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;newsguidelines.html">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;newsguidelines.html</a>
    • andai8 hours ago
      It was started by people who thought Twitter didn&#x27;t have <i>enough</i> censorship (back when it had a lot more).<p>I guess that&#x27;s a matter of personal sensibilities, but it&#x27;s pretty funny to me.<p>(Note: this is the only fact I know about it, happy to learn more.)
    • rirze7 hours ago
      Any social space will break down upon reaching a critical point in representation of the general populace.<p>I have no idea about the development however.
    • MBCook7 hours ago
      Worked for me.
  • dhosek5 hours ago
    One of the comments:<p>&gt; Us, ten years after generating the certificate: &quot;Who could have possibly foreseen that a computer science department would still be here ten years later.&quot;<p>This was why there was a Y2K bug. Most of that code was written in the 80s, during the Reagan era. Nobody expected civilization to make it to the year 2000.
    • bombcar5 hours ago
      No, people thought that storing a year as two digits was fine because computers were advancing so fast that it was unlikely they&#x27;d still be used in the year 2000 - or if they were it was someone else&#x27;s problem.<p>And they were mostly right! Not many 80s machines were still being used in 1999, but lots of software that had <i>roots</i> to then was being used. Data formats and such have a tendency to stick around.
      • naikrovek5 hours ago
        Software has <i>incredible</i> inertia compared to hardware.<p>It is effectively trivial to buy millions of dollars of hardware to upgrade your stuff when compared with paying for existing software to be rewritten for a new platform.
        • oasisaimlessly5 hours ago
          This is a very SWE-centric perspective. The very names of software&#x2F;hardwsre would imply the exact opposite.
          • marcosdumay2 hours ago
            Has the last industrial hardware you&#x27;ve seen updated to use protected memory like most controllers have been able to for a few decades?<p>Or better, its drivers run in what Windows version?