WTF Bites



  • @anonymous234 "naming things" is one of the N hard problems, so naturally programmers want to do it.


  • Considered Harmful

    @anonymous234 Because you can't use the Photoshop encoding system on its own from the command line, you don't have fifty that you could can swap out, and Photoshop users aren't generally technical.



  • @izzion said in WTF Bites:

    Edit... Unless he already had planned vacation for the 1st - 8th and they were like "I don't care what you do after the 1st, but don't show up again before then and you'll be at 80 hours PTO as of the 1st"

    That.



  • @ben_lubar said in WTF Bites:

    @pie_flavor said in WTF Bites:

    "You will have to rewrite your browser to comply with our requirements, which include using our browser."

    Then again, providing an app which is only a download link is just asking for it. One might also note that Google didn't do that on iOS.

    It would also be interesting to know if Google even tried to ask MS if there was an exception for them if they were to use their own render engine in a store app.


  • Notification Spam Recipient

    @anotherusername said in WTF Bites:

    Also, how the hell does someone end up with nearly 100 more hours of PTO than they realized that they had?

    👋 I tend to never take vacations and don't pay attention to hours accrued.



  • @tsaukpaetra yeah, but do you have to?

    I mean, I didn't exactly clarify it, but my comment was predicated on the fact that he'd lose vacation if he has too much of it. If you won't, or you're just never even remotely close to the limit, then you don't need to pay attention to how much of it you have. Or if you just don't care whether you lose it... but I'd rather take paid Fridays off than show up and lose PTO that I could've burned.


  • Notification Spam Recipient

    @anotherusername said in WTF Bites:

    @tsaukpaetra yeah, but do you have to?

    I mean, I didn't exactly clarify it, but my comment was predicated on the fact that he'd lose vacation if he has too much of it. If you won't, or you're just never even remotely close to the limit, then you don't need to pay attention to how much of it you have. Or if you just don't care whether you lose it... but I'd rather take paid Fridays off than show up and lose PTO that I could've burned.

    In the current company? I have no idea. Presumably yes, but I'd have to dig around for the docs to find out.



  • @ben_lubar said in WTF Bites:

    "You will have to rewrite your browser to comply with our requirements, which include using our browser."

    The "app" that Google put in the store wasn't an app, it was just a big ol' link to Chrome's actual download page.

    Microsoft was right to remove it.

    However, the reason Google added it is because Microsoft does a shitty job of removing apps in the store that pretend to be Chrome but are not, and that is a very valid gripe from Google.


  • Considered Harmful

    @blakeyrat You didn't read TFA.



  • @blakeyrat said in WTF Bites:

    the reason Google added it is because Microsoft does a shitty job of removing apps in the store that pretend to be Chrome but are not

    According to TFA, the reason Google added it is because Microsoft doesn't allow competing web browsers to be downloaded from its app store:

    Windows Store apps that browse the web must use HTML and JavaScript engines provided by Windows 10

    Google thought they found a loophole in that policy by putting an app that was just a link to the real installer, but Microsoft didn't allow that either.

    So for the foreseeable future, if anyone searches for Chrome on the MS app store, all they'll find are apps pretending to be Chrome, because Google can't put Chrome on the app store. Not without rewriting it to basically just be a skin of Edge.


  • Notification Spam Recipient

    @anotherusername said in WTF Bites:

    @blakeyrat said in WTF Bites:

    the reason Google added it is because Microsoft does a shitty job of removing apps in the store that pretend to be Chrome but are not

    According to TFA, the reason Google added it is because MicrosoftApple doesn't allow competing web browsers to be downloaded from its app store:

    WindowsApple Store apps that browse the web must use HTML and JavaScript engines provided by Windows 10IOS

    Google thought they found a loophole in that policy by putting an app that was just a link to the real installermight have compiled their Javascript and HTML rendering engines for IOS, but MicrosoftApple didn't allow that either.

    So for the foreseeable future, if anyone searches for Chrome on the MSApple app store, all they'll find are apps pretending to be Chrome, because Google can't put Chrome on the app store. Not without rewriting it to basically just be a skin of EdgeSafari.

    Sounds eerily familiar...


  • Garbage Person

    @remi Assertions should always be enabled in production. What is it with the brainworm that one should test different code than runs in production or that code not meeting its preconditions should continue to run, corrupting production data?


  • Java Dev

    @tsaukpaetra I wonder why the EU hasn't gone after Apple forcing every single browser on iOS to use Safari at its core, considering how pissy they were a MS bundling IE with Windows. Preventing browsers from using their own rendering engines kinda makes it hard to release a better performant browser for iOS, or add special features. Firefox for iOS cannot use addons, which is otherwise the main selling point for it on mobile.



  • @greybeard I agree with either your point or @HardwareGeek 's. Either you never use asserts, or you leave them on in release. Even for the "normal" asserts for stuff "that should never happen" (like a pointer being null etc.), there is no reason not to leave it in release.

    The only exception I can see is for very low level, performance critical, code, like a container library (where you might want e.g. to only enable boundary checks on debug as it might have a significant performance impact). But that covers about 0% (rounded up) of the code that most developers ever write...


  • Notification Spam Recipient

    @atazhaia said in WTF Bites:

    I wonder why the EU hasn't gone after Apple forcing every single browser on iOS to use Safari at its core, considering how pissy they were a MS bundling IE with Windows.

    Different companies get away with different things. Rules are not the same for everyone, and probably never will be.



  • Ah, fuck CUPTI. To begin with, the API is terribly clunky.

    Second, I need to use the continuous sampling mode because the default "kernel" sampling mode serializes execution on the GPU. This is rather detrimental to performance when you heavily rely on concurrent kernel execution. Besides, I try to measure the overall GPU utilization, to ... well.. figure out how well they are utilized. So, disabling concurrent kernels execution is a no-go.

    Continuous sampling mode is (since CUDA 6.5) only availablepermitted on Tesla-level hardware (:torvalds_nvidia_finger.png:). So, I can't test/develop on my local consumer level GPU, but rather need to run on one of the clusters. There's a job queue, so your average job gets to run after maybe 30 minutes (if your lucky) up to 4-5 hours. You could get an interactive node for an hour or two through the same system. This however implies requesting a node and then waiting for it for those 30min to 5hours, and then getting that hour or two. Really convenient.

    Anyway. I finally managed to get something that seemingly records one of their metrics, the "achieved_occupancy". The definition is as follows:

    Ratio of the average active warps per active cycle to the maximum number of warps supported on a multiprocessor

    From CUPTI I get the following values:

    Device[0] : Metric(f64): 1.908065
    Device[1] : Metric(f64): 1.904539

    Apparently, my program is utilizing the GPUs so damn well that it manages to run 1.9 times as many warps(=threads, sort of) as is theoretically possible. *le sigh*

    ("nvprof", the standalone profiler is even worse, it refuses to do anything sensible with continuous mode and like 90% of the metrics. Apparently it will only measure stuff related to nvlink, but I don't really give a shit about that.)


  • Grade A Premium Asshole


  • area_can

    @polygeekery this is good for security, as a long password can cause a DOS (DOS Operating System) vulnerability since the server needs to take longer to encrypt the data.

    - b, Tesco Support



  • @bb36e Also, if your password is more than 140280 characters, we can't tweet it to you if you forget it.


  • area_can

    Microsoft: Windows 8 was a horrible trash fire, but at least we learned from it?

    Apple: hold my beer

    https://www.bloomberg.com/news/articles/2017-12-20/apple-is-said-to-have-plan-to-combine-iphone-ipad-and-mac-apps



  • @greybeard said in WTF Bites:

    @remi Assertions should always be enabled in production. What is it with the brainworm that one should test different code than runs in production or that code not meeting its preconditions should continue to run, corrupting production data?

    Yeah I'm with you.

    The code you put in production should be as close as possible to the code you used in testing. Changing a version number: ok. Changing a bunch of potential branching logic: not ok.


  • area_can

    0_1513907164216_2c62cebe-8692-4efc-872e-daba6f453b19-image.png


  • Considered Harmful

    @bb36e What's wrong with good old 'flash the title bar and make an annoying beep'?



  • @mrl said in WTF Bites:

    @atazhaia said in WTF Bites:

    I wonder why the EU hasn't gone after Apple forcing every single browser on iOS to use Safari at its core, considering how pissy they were a MS bundling IE with Windows.

    Different companies get away with different things. Rules are not the same for everyone, and probably never will be.

    Nah. Market share. Windows dominated computing, apple doesn’t even dominate mobile computing in the EU.


  • Notification Spam Recipient

    0_1513917416877_ba70b026-c787-468b-a6f3-8422fa419ec4-image.png

    So, let me get this straight: Among your "I can follow directions" "technical" "experience", you know how to type text and click "Upload file" on a program?

    Well, sure! I'll connect with you right away!



  • @tsaukpaetra Plus .., what's up with mentioning first MS Office and then listing Word/Excel/PPT and a few others separately again? (Also, there's no mention of OneNote... I sense a hole in the MS Office experience. 🛒)


  • :belt_onion:

    @cvi said in WTF Bites:

    @tsaukpaetra Plus .., what's up with mentioning first MS Office and then listing Word/Excel/PPT and a few others separately again? (Also, there's no mention of OneNote... I sense a hole in the MS Office experience. 🛒)

    That's easy. Keywords.



  • @tsaukpaetra Wamu? As in a defunct bank?



  • @blakeyrat said in WTF Bites:

    @greybeard said in WTF Bites:

    @remi Assertions should always be enabled in production. What is it with the brainworm that one should test different code than runs in production or that code not meeting its preconditions should continue to run, corrupting production data?
    

    Yeah I'm with you.

    The code you put in production should be as close as possible to the code you used in testing. Changing a version number: ok. Changing a bunch of potential branching logic: not ok.

    Hell, I am of the view that the tests should disabled in development and then enabled for testing, and left enabled for production - and if the efficiency is so crappy that you need to disable them in order to get performance or reduce executable size, that's a sign of a Problem calling for a redesign.

    OTOH, some types of runtime checks can be disabled in the production version, if the build system (compiler, linker etc.) can determine that the condition being tested cannot occur (e.g., you can't get an array overflow if you are wrapping or saturating the index arithmetic at the array boundaries). However, the optimized version needs to be fully tested as well, to make sure that the compiler got it right... and manually mucking about with assertions and tests (i.e., anything changed from development to testing, or from testing to production, which is not manifest in the build) should be verboten.



  • Why couldn't standards committee decide that with debugging disabled, assert(x) should mean just (x) instead of generating no code at all?

    ETA: that was a question. I really don't get why they decided to throw away the argument. Shouldn't that be a task for an optimizing compiler?


  • Notification Spam Recipient

    @aitap said in WTF Bites:

    Why couldn't standards committee decide that with debugging disabled, assert(x) means just (x) instead of generating no code at all?

    Wait, really? Woooowww... I really should learn how to write tests...


  • Discourse touched me in a no-no place

    @aitap said in WTF Bites:

    I really don't get why they decided to throw away the argument.

    So that you can put in a call that is expensive definitely but only needed in debugging mode. Assuming that a compiler will be able to figure that out on its own… well, it might but you're really depending on it being able to prove a whole load when you, the programmer, have that knowledge right there in your hands, right now. Come on now!

    If your test expression has side effects such that this matters, you are bad and should feel bad.


  • Discourse touched me in a no-no place

    @scholrlea said in WTF Bites:

    However, the optimized version needs to be fully tested as well, to make sure that the compiler got it right...

    Why not just test the compiler instead? Modern optimising compilers are heavily grounded in CS theory (very much not like how they were when I started in this industry!) and work by applying transformations that preserve meaning. This makes them semantically conservative, and means that they almost never do anything horribly unsafe (at a cost of not doing some things that you might think they could do, typically because they've found a flaw in your assumptions!) Finding a compiler bug is a pretty big deal now, especially in the optimisation engine or the target code issuer. (The language parser and initial compilation generator are more likely to have issues, but those are actually a lot easier to debug too.)


  • kills Dumbledore

    Assert in actual code as opposed to tests always seemed weird to me. If you can forsee a problem to the extent of making an assert, why not go a bit further and write a proper error message to be passed up by exception or similar?


  • Considered Harmful

    @jaloopa Exceptions are for things you know could happen but shouldn't. Generally assertions are for things you know could not possibly happen (you are asserting that the expression is true). If an assertion fails in production, either you fucked up or the client fucked up.


  • kills Dumbledore

    @pie_flavor sounds exceptional to me


  • Java Dev

    So Microsoft got their My Office app in Windows 10 for managing Microsoft Office. I figured how I needed to write to log in with my work account, which has an Office license attached. Now, upon pressing "Install" my expectation was that the app would download and start the installer, like pretty much every other such app that exists. Nope! I get redicrected to office.com where I will have to log in with my work account again if I want to download the installer.

    Seriously, Microsoft. How the fuck are you able to fail at such basic basic things? Like making your goddamn app made specifically for the purpose of getting Office unable to, you know, actually get Office installed on my computer!



  • @aitap said in WTF Bites:

    Why couldn't standards committee decide that with debugging disabled, assert(x) should mean just (x) instead of generating no code at all?

    ETA: that was a question. I really don't get why they decided to throw away the argument. Shouldn't that be a task for an optimizing compiler?

    Because that would encourage people to actually put important stuff in the argument, and that is :doing_it_wrong:.

    I don't actually know; I'm just making up a reason. I wouldn't be surprised, though...

    @dkf said in WTF Bites:

    So that you can put in a call that is expensive definitely but only needed in debugging mode.

    That is why #ifdef DEBUG was invented.


  • area_can



  • @bb36e said in WTF Bites:

    Ew, manpages

    Don't be so homophobic!

    Filed Under: Ironically, Unix is the only OS which still has its Manpages...


  • Garbage Person

    @jaloopa said in WTF Bites:

    why not go a bit further and write a proper error message to be passed up by exception or similar?

    Because the code's invariants aren't holding. To permit the program to continue executing would allow corrupted state to propagate.



  • @bb36e Burn it! It has WITCHES!



  • @greybeard said in WTF Bites:

    @jaloopa said in WTF Bites:

    why not go a bit further and write a proper error message to be passed up by exception or similar?

    Because the code's invariants aren't holding. To permit the program to continue executing would allow corrupted state to propagate.

    He meant the programmer go further and write code to generate a useful error there instead of just the assertion.


  • Garbage Person

    @anotherusername I understood what he meant.



  • @greybeard said in WTF Bites:

    @anotherusername I understood what he meant.

    If your app's state is so corrupted that you can't even safely try to pop up an error message or log something before crashing, it has problems that you probably won't fix just by leaving the assertions in.


  • Garbage Person

    @anotherusername With an assertion I get a nice core dump, with stack traces which usually point right at the bug that caused the invariants to be violated. Even for races which only happen at customer sites.


  • 🚽 Regular

    @anotherusername said in WTF Bites:

    He meant the programmer go further and write code to generate a useful error there instead of just the assertion.

    So

    assert( thisCantPossiblyBeFalseInHereEver );
    

    should become

    if( !thisCantPossiblyBeFalseInHereEver ){
        throw new AssertionFailureException( "thisCantPossiblyBeFalseInHereEver was false in line N of file. We have no idea why, because that shouldn't have happened." );
    }
    

    ?


  • kills Dumbledore

    @zecc pretty much, but possibly with a more appropriate exception and message.

    Either you're sure enough that something will never happen that it's not worth putting a guard around it, or you're not and there should be proper error handling around it. That applies in dev, test and live.

    And the advantage of throwing an exception is that you can handle the error however you want, log it like any other error and control what's displayed to the user. With an assert the only option is to go down in flames



  • WTF bite from yesterday: So, in Germany there will be a requirement for all lawyers to access their official correpsondence through an electronic post box (sort of like email but supposed to be more secure, which is kind of obvious as we're dealing with quite important stuff) beginning in 2018.

    Of course there was a period of transition beginning in the middle of 2017 to allow lawyers to sign up and get acquainted.

    Yesterday the portal for the correspondence service posted an announcement that, due to "unforeseen circumstances" all lawyers using the service would have to install a local certificate on their own because the certificate provided by the installation program had to be revoked.

    So, at first I thought that they had merely forgotten about all certificates having an expiry date and somehow flubbed installing a new one.

    Then I read the article on Heise about the incident. It was even worse than a bit of amateurish forgetfulness.

    Turns out that they were distributing the private key along with their installation...


  • Garbage Person

    @jaloopa And when going down in flames is the appropriate way to handle the error, an assertion is the perfect mechanism.


Log in to reply