WTF Bites


  • Considered Harmful

    @Tsaukpaetra said in WTF Bites:

    I would be totally happy with a gigantimaxitated SSD for long-term storage

    Possibly. I wonder about data retention for long-term. No one's really tested MLC beyond 10 years... chiefly because it's just been around for that long. Spinning rust doesn't have that problem (well, CMR at least) 🤔


  • Notification Spam Recipient

    @Applied-Mediocrity said in WTF Bites:

    @Tsaukpaetra said in WTF Bites:

    I would be totally happy with a gigantimaxitated SSD for long-term storage

    Possibly. I wonder about data retention for long-term. No one's really tested MLC beyond 10 years... chiefly because it's just been around for that long. Spinning rust doesn't have that problem (well, CMR at least) 🤔

    Sure but it's also a lot faster to replace SSDs in a RAID array (even on SATA) compared to spinning rust, so replacement with the bigger better newer would be less painful than it currently is (I'm clocking about two days for a single drive swap at the moment). 🤔



  • @Benjamin-Hall said in WTF Bites:

    iOS makes it very very very painful to get the components of a date in the local time, since it (relatively sensibly) stores everything in UTC and then does the formatting for display.

    You mean it's easier to get the components of UTC? Now that would be a huge :wtf:. It is sensible to store everything in <units> since <epoch>, because a mere 64-bit (signed) integer will get you all the way to 2262 even with nanosecond precision (using the standard Unix epoch) and well over the age of universe with second precision. But it is definitely not sensible to store UTC as components.

    Otherwise, well, it's still a :wtf:. Even standard C library has localtime (and gmtime) to get the components as just a structure of integers. The library needs it internally as intermediate step to the formatting, so there is little good reason not to expose it.


  • Considered Harmful

    @Gribnit said in WTF Bites:

    @error said in WTF Bites:

    Stupid SonarLint policies lead to this bullshit.

    • if the same string literal is used more than once, it has to be a NAMED_CONSTANT
      • constants also need to have unique values
    • the string application/json was used for the Accept HTTP header, and was thusly named ACCEPT_VALUE (as the string "Accept:" was already mapped to ACCEPT)
      • this is already stupid because it presumes the value of the Accept header can only be one thing, but I'm not touching it
    • the Content-Type is coincidentally also JSON, which leads us to our representative code snippet:
    connection.setRequestProperty(CONTENT_TYPE, ACCEPT_VALUE);
    

    I can't wait until someone needs to change the Accept value and breaks Content-Type.

    Oh well, not my problem, :shipit:.

    Just create the constant HTTP_JSON_MIME with the right value, and assign from that intermediate to the semantic names.

    "application/"+"json" vs. "application"+"/json" should satisfy the linter.


  • Discourse touched me in a no-no place

    @error said in WTF Bites:

    Same file:

    log.error(EXCEPTION_TEXT + urlStr + EXCEPTION_MESSAGE, e);
    

    That's such bullshit. It should have been:

    log.error(EXCEPTION_TEXT + "{}" + EXCEPTION_MESSAGE, urlStr, e);
    

  • BINNED

    During a routine bout of deliberately misinterpreting flawlessly parsing the expressions “mhz” and subsequently “KHz”, I became idly curious what would turn up for “kelvin per second.”

    The first result, which initially appears to be an innocuous unit converter, has evidently devoted their entire effort to SEO in lieu of any actual functionality.

    For such a simple task, there is seemingly no client-side JS – instead you get to submit a form and watch the page refresh until the server gets back to you.

    But most glaringly:

    1a189e40-6990-47f4-a2a2-cdd09b224d46-image.png

    Now the last time I checked, a change of one kelvin is, in fact, 1℃, by definition. So this already entirely fails at its one designated task.

    Just some standard incompetence, Shirley?

    b533e7cb-1bff-446e-8c41-dd0e7b392d37-image.png

    🤦♂

    Somebody actually sat down and made this thing.



  • @dkf said in WTF Bites:

    @error said in WTF Bites:

    Same file:

    log.error(EXCEPTION_TEXT + urlStr + EXCEPTION_MESSAGE, e);
    

    That's such bullshit. It should have been:

    log.error(EXCEPTION_TEXT + "{}" + EXCEPTION_MESSAGE, urlStr, e);
    

    Surely you mean

    log.error(EXCEPTION_TEXT + JSON_OBJECT + EXCEPTION_MESSAGE, urlStr, e);
    


  • @kazitor said in WTF Bites:

    During a routine bout of deliberately misinterpreting flawlessly parsing the expressions “mhz” and subsequently “KHz”, I became idly curious what would turn up for “kelvin per second.”

    The first result, which initially appears to be an innocuous unit converter, has evidently devoted their entire effort to SEO in lieu of any actual functionality.

    For such a simple task, there is seemingly no client-side JS – instead you get to submit a form and watch the page refresh until the server gets back to you.

    But most glaringly:

    1a189e40-6990-47f4-a2a2-cdd09b224d46-image.png

    Now the last time I checked, a change of one kelvin is, in fact, 1℃, by definition. So this already entirely fails at its one designated task.

    Just some standard incompetence, Shirley?

    b533e7cb-1bff-446e-8c41-dd0e7b392d37-image.png

    🤦♂

    Somebody actually sat down and made this thing.

    Nice :wtf: : at first glance, it looks like a naive implementation that just converts kelvins to degrees Celsius internally.
    But such a naive implementation would return -273.15 and presumably also -546.3

    The missing negative sign points to some extra level of :trwtf:



  • @Kamil-Podlesak said in WTF Bites:

    But such a naive implementation would return -273.15 and presumably also -546.3

    No. If it naively converted as absolute rather than relative temperature, it would yield -272.15 and -271.15 respectively, because -273.15°C = 0 K and 273.15 K = 0°C. This really shows that someone completely missed how absolute and relative temperature scales work.


  • ♿ (Parody)

    @Benjamin-Hall said in WTF Bites:

    WTF Bite(s) of my day

    let formatter = DateFormatter()
    formatter.dateFormat = "yyyy-MM-dd-HH-mm"
    let dateString = formatter.string(from: date).split(separator: "-")
    self.year = Int(dateString[0])!
    self.month = Int(dateString[1])!
    self.date = Int(dateString[2])!
    self.hours = Int(dateString[3])!
    self.minutes = Int(dateString[4])!
    

    Bonus WTF(?): Does NodeBB's markdown not have a Swift language code? Or is it just weird?

    Your code got detected as ruby (look at the CSS class applied to the code block using dev tools). Telling it swift explicitly doesn't seem to work. I don't see swift as a supported language in the settings for our markdown plugin.


  • Considered Harmful

    @dkf said in WTF Bites:

    @error said in WTF Bites:

    Same file:

    log.error(EXCEPTION_TEXT + urlStr + EXCEPTION_MESSAGE, e);
    

    That's such bullshit. It should have been:

    log.error(EXCEPTION_TEXT + "{}" + EXCEPTION_MESSAGE, urlStr, e);
    

    I frankly do not care about guarding vs building strings for log.error. if you filter that, you are nuts.


  • Discourse touched me in a no-no place

    @Kamil-Podlesak said in WTF Bites:

    @dkf said in WTF Bites:

    @error said in WTF Bites:

    Same file:

    log.error(EXCEPTION_TEXT + urlStr + EXCEPTION_MESSAGE, e);
    

    That's such bullshit. It should have been:

    log.error(EXCEPTION_TEXT + "{}" + EXCEPTION_MESSAGE, urlStr, e);
    

    Surely you mean

    log.error(EXCEPTION_TEXT + JSON_OBJECT + EXCEPTION_MESSAGE, urlStr, e);
    

    Since the proper name would be PLACEHOLDER… yes, I mean exactly that. 😆



  • @Tsaukpaetra said in WTF Bites:

    @cvi said in WTF Bites:

    Anyway, anticipating licenses to not automagically reactivate

    If it says something to the effect of "activated with digital entitlement" then you're good. I don't think I've ever bothered with the per-user bullshit.

    Did not reactivate. I guess considering I've dragged this Windows install/license across at least 3 major HW upgrades and from Win7 to Win10 (via Win8), I can't really blame MS too much for that. Doesn't mean I'm not going to bitchcomplain about it.



  • @cvi said in WTF Bites:

    @Tsaukpaetra said in WTF Bites:

    @cvi said in WTF Bites:

    Anyway, anticipating licenses to not automagically reactivate

    If it says something to the effect of "activated with digital entitlement" then you're good. I don't think I've ever bothered with the per-user bullshit.

    Did not reactivate. I guess considering I've dragged this Windows install/license across at least 3 major HW upgrades and from Win7 to Win10 (via Win8), I can't really blame MS too much for that. Doesn't mean I'm not going to bitchcomplain about it.

    My Win 7 license which originally came from a Dreamspark account (i.e. got it while at university) carried across various upgrades to my current PC on Win10. With the latest hardware upgrade I just had to jump through an additional hoop to "deactivate" the old motherboard/CPU combo. Then it activated on my current rig just fine.


  • Considered Harmful

    @dkf said in WTF Bites:

    the proper name would be LoggingStrategies.Slf4J.PLACEHOLDER

    :um-pendant:


  • Considered Harmful

    @cvi said in WTF Bites:

    wiped off the blood after cutting my hand on a badly machined heat block on the motherboard.

    This may have been a mistake.



  • @Gribnit said in WTF Bites:

    This may have been a mistake.

    Which part: the wiping off or the cutting my hand? (I agree, white+red makes for quite a stunning computer case.)


  • Considered Harmful

    @cvi said in WTF Bites:

    @Gribnit said in WTF Bites:

    This may have been a mistake.

    Which part: the wiping off or the cutting my hand? (I agree, white+red makes for quite a stunning computer case.)

    The wiping part. Perfectly likely that the machine wanted or even needed that blood.



  • @cvi said in WTF Bites:

    wiped off the blood after cutting my hand on a badly machined heat block on the motherboard

    WHATEVER BLOOD IS LEFT INSIDE YOU IS IN ME NOW TOO



  • @kazitor said in WTF Bites:

    During a routine bout of deliberately misinterpreting flawlessly parsing the expressions “mhz” and subsequently “KHz”, I became idly curious what would turn up for “kelvin per second.”

    The first result, which initially appears to be an innocuous unit converter, has evidently devoted their entire effort to SEO in lieu of any actual functionality.

    For such a simple task, there is seemingly no client-side JS – instead you get to submit a form and watch the page refresh until the server gets back to you.

    But most glaringly:

    1a189e40-6990-47f4-a2a2-cdd09b224d46-image.png

    Now the last time I checked, a change of one kelvin is, in fact, 1℃, by definition. So this already entirely fails at its one designated task.

    Just some standard incompetence, Shirley?

    b533e7cb-1bff-446e-8c41-dd0e7b392d37-image.png

    🤦♂

    Somebody actually sat down and made this thing.

    Hey! Who stole the Great Codez invented by my cow-orkers?
    For proof of their ownership, see
    https://what.thedailywtf.com/topic/26141/temperature-conversion


  • Discourse touched me in a no-no place

    @cvi said in WTF Bites:

    Which part: the wiping off or the cutting my hand?

    Blood sacrifices used to be a conventional part of building a PC…



  • @dkf said in WTF Bites:

    Blood sacrifices used to be a conventional part of building a PC…

    Yeah, but usually you'd want to get the blood from somebodywhere else.


  • Considered Harmful

    @cvi said in WTF Bites:

    @dkf said in WTF Bites:

    Blood sacrifices used to be a conventional part of building a PC…

    Yeah, but usually you'd want to get the blood from somebodywhere else.

    Well, for a site install, yeah. But, personal computers, you should use the user's blood.


  • Java Dev

    @dkf said in WTF Bites:

    @cvi said in WTF Bites:

    Which part: the wiping off or the cutting my hand?

    Blood sacrifices used to be a conventional part of building a PC…

    Used to? I still do ritual blood sacrifices when building PCs. All my hand-built computers are anointed in the blood of the Builder, as written in the "IBM Aptiva User's Manual" of old.


  • ♿ (Parody)

    TL; DR;
    Current up to date status is – after all the investigation it turns out that when a client makes a HEAD request for a file this will hit Cloudflare infrastructure. Cloudflare will then send a GET request to the account machine and will cache the file. This has changed at 28 of August. Before 28 of August when clients were sending HEAD requests, Cloudflare was sending HEAD requests (that don’t generate traffic). After 28 of August clients are still sending HEAD requests, but now Cloudflare is sending GET requests, generating terabytes of additional traffic that is not needed.


  • Considered Harmful

    @boomzilla said in WTF Bites:

    TL; DR;
    Current up to date status is – after all the investigation it turns out that when a client makes a HEAD request for a file this will hit Cloudflare infrastructure. Cloudflare will then send a GET request to the account machine and will cache the file. This has changed at 28 of August. Before 28 of August when clients were sending HEAD requests, Cloudflare was sending HEAD requests (that don’t generate traffic). After 28 of August clients are still sending HEAD requests, but now Cloudflare is sending GET requests, generating terabytes of additional traffic that is not needed.

    Hahaha wow, they fucked up being a cache.



  • @boomzilla said in WTF Bites:

    After 28 of August clients are still sending HEAD requests, but now Cloudflare is sending GET requests

    Is that even a valid thing to do? In cross-origin request HEAD … no, that's OPTIONS. HEAD should return the same thing a GET would except for the body, so it's valid. But …

    … is that ever useful thing to do? Is there a common use-case where the client precedes a GET request with a HEAD? For downloading only if changed it makes more sense to use if-modified-since and/or etag that don't incur an extra round-trip.


  • 🚽 Regular

    @Bulb Maybe for checking if a large document has been created without actually downloading it or triggering its creation?



  • @Zecc That's a counter-example where it isn't reasonable to preemptively cache the document because the HEAD will not be followed by a GET. But if CF started preemptively caching the documents, they must have had some use-case where it helps in mind. But I can't think of one.


  • Discourse touched me in a no-no place

    @Bulb said in WTF Bites:

    Is there a common use-case where the client precedes a GET request with a HEAD?

    It'll depend on exactly how the browser's cache is organized, such as if the information that's available describes a hash of the content rather than an expiry (and etags aren't supported by the server for whatever reason). In that case, the browser will do a HEAD to fetch the metadata so it can compare with the results it has cached with the expectation that they're probably correct, but when they don't match up a GET will follow.



  • @dkf A HEAD won't give it hash of the content though.


  • Discourse touched me in a no-no place

    @Bulb said in WTF Bites:

    A HEAD won't give it hash of the content though.

    It might just be the last modified timestamp. I've no idea what caching policies are actually used by browsers; the only cases where I really care in my services are where I want exactly no caching because there's live objects being observed.



  • @dkf Yeah, I'm pretty sure some browsers use it in some bad ways. Though a bit surprised because everybody tends to be hunting to reduce latency and prepending an extra round-trip goes a long way against that.


  • :belt_onion:

    @topspin said in WTF Bites:

    @Atazhaia it's funny how even big firms like Microsoft can't hire translators that actually understand what it is they're translating.

    Like this gem from NoMachine.

    Bildschirmfoto 2021-08-29 um 00.11.37.png

    Basically the setting allows you to select a certain display encryption, like H264 or VP8. Yes, it says encryption, not encoding. Probably because the translator neither knows the difference between these two things in German nor in English.

    How is that the translator's fault?

    If the translator is given a block of text that says "encryption" then that is the word he should translate. If that is the wrong word, well, that's not his fault. The translator is mostly likely NOT an expert on video encoding.


  • BINNED

    @El_Heffe said in WTF Bites:

    If the translator is given a block of text that says "encryption" then that is the word he should translate.

    I’m going to assume that it says “encoding“ in English. So the fault is with the translation.
    Otherwise it’d still be a :wtf:, but a different one.


  • Discourse touched me in a no-no place

    @Bulb said in WTF Bites:

    everybody tends to be hunting to reduce latency

    Not everyone. :kneeling_warthog: is also important.


  • Discourse touched me in a no-no place

    @topspin said in WTF Bites:

    I’m going to assume that it says “encoding“ in English. So the fault is with the translation.

    It's only in relatively recent usage that encoding and encryption have had their meanings truly split apart, as at least traditionally they were just about the same thing. I'm not surprised at them still being conflated in the minds of those who aren't subject-matter experts.



  • @dkf said in WTF Bites:

    @Bulb said in WTF Bites:

    everybody tends to be hunting to reduce latency

    Not everyone. :kneeling_warthog: is also important.

    If you are going hunting, :kneeling_warthog:s are relatively easy prey.


  • Notification Spam Recipient

    @Bulb said in WTF Bites:

    Though a bit surprised because everybody tends to be hunting to reduce latency

    Not Scopely with Star Trek Fleet Command!

    For a real-time strategy game, it's really bad when you have multi-second latency between actions, and every action you take comes back with a half megabyte of game state for :raisins:

    And when you're in a busy system taking many actions continuously.....



  • @dkf said in WTF Bites:

    I'm not surprised at them still being conflated in the minds of those who aren't subject-matter experts.

    That's why proper translation management involves creating a glossary for each language and the translators using it to translate the technical terms consistently. But that would require the project manager to think and care, neither of which is particularly common, especially in large companies that make it much easier to get away with laziness.


  • Considered Harmful

    @Bulb said in WTF Bites:

    … is that ever useful thing to do? Is there a common use-case where the client precedes a GET request with a HEAD? For downloading only if changed

    Apparently CloudFlare's basic mechanism assumes that no niceties whatsoever are worth hoping for and goes for all the headers. I somewhat approve of this stupid approach - points for despair.


  • Trolleybus Mechanic

    I'm toying with Apache NiFi, which we promised to integrate with our project (the customer wanted to "create custom rules"). This stuff is the ultimate Enterprise Rules Engine. No coding (as in writing code), only clicking. As a proof of concept I set up a simple workflow: receive a message from Kafka, and if one property is false , send a simple JSON over HTTP. This task required 8 blocks ("processors") and three hidden services, each with various properties. And that's the happy path, without any error handling/logging.

    And these folks apparently want to implement algorithms spanning multiple pages of control flow diagrams. Good luck with that, I only hope i won't have to touch it in production.

    Oh, and by the way: NiFi is so secure, that it doesn't let you set up any user authentication over unencrypted HTTP. Since all our stuff runs behind a reverse proxy which handles HTTPS, it's currently completely unsecured. Yep, you can set it up without any authentication, that's not an issue.


  • Discourse touched me in a no-no place

    @sebastian-galczynski said in WTF Bites:

    This stuff is the ultimate Enterprise Rules Engine. No coding (as in writing code), only clicking.

    :laugh-harder:

    I recommend coding for workflow/rules exactly because it is so much simpler than GUI-based block configuration stuff as you describe. It'd probably be with some scripting language that can be embedded in the environment, and would be just setting up the same sorts of things on the back end, but it would be a hell of a lot easier.

    Managers dream of not needing programmers, but the way computers work requires people who can think precisely and in ways that handle edge cases, so programmers continue to be vital.


  • Banned

    @dkf said in WTF Bites:

    Managers dream of not needing programmers, but the way computers work requires people who can think precisely and in ways that handle edge cases, so programmers continue to be vital.

    sad blakey noises


  • Trolleybus Mechanic

    @dkf said in WTF Bites:

    Managers dream of not needing programmers, but the way computers work requires people who can think precisely and in ways that handle edge cases, so programmers continue to be vital.

    That's the fallacy that gave us COBOL and SQL (syntax, not relational algebra). I heard SQL was designed as a language "anyone can use". I sometimes wonder what's going on in the head of people making such claims. Do they really believe that the syntax with braces and semicolons is the biggest barrier to entry? Did they never meet a non-programming programmer?


  • Banned

    @sebastian-galczynski said in WTF Bites:

    I sometimes wonder what's going on in the head of people making such claims. Do they really believe that the syntax with braces and semicolons is the biggest barrier to entry?

    1. Programming is simple to me.
    2. I put hundreds of hours into learning syntax of various languages before I could program efficiently.
    3. I don't think I'm smarter than an average human.

    Ergo

    • If we got rid of syntax, then everyone would find programming easy.

  • Considered Harmful

    @dkf said in WTF Bites:

    Managers dream of not needing ... edge cases, so programmers continue to be vital.

    



  • I don't think the ones who actual develop those tools are naive enough to believe that learning the syntax is what makes programming difficult.

    Their managers, and the managers they sell those tools too, on the other hand...


  • Considered Harmful

    @Zerosquare said in WTF Bites:

    I don't think the ones who actual develop those tools are naive enough to believe that learning the syntax is what makes programming difficult.

    Their managers, and the managers they sell those tools too, on the other hand...

    To an extent, this is exacerbated by exposing the managers to syntax. Since it boggles them they assume it creates a problem of a scale that it does not. If it's used to snow them even once, their misperception is amplified.

    Therefore, only tell them lies, and never show them the code.


  • BINNED

    @sebastian-galczynski it’s a bit like Dunning-Kruger for non-programmers. Maybe they think something like:
    I just want a report to do X, why do I need a programmers to do that? I could tell the computer to do it myself, but I don’t understand why you need this crazy moon language to do it.

    They don’t actually realize that they don’t understand how to program, they just see programmers using programming languages, don’t understand those, and assume that it would be easy if you could just say “computer, find all mutantspictures of cats.”

    But it also seems to extend to hiring people: “needs X years of experience in language Y.”
    topspin Well, I’ve never used that, but how hard can it be?
    (It’s normally not the language but the library/tech stack that you need experience with.)


Log in to reply