WTF Bites


  • :belt_onion:

    @Benjamin-Hall said in WTF Bites:

    @Parody said in WTF Bites:

    @TwelveBaud said in WTF Bites:

    ...or that you have a gazillion "Local Disk"s.

    Doesn't everyone have 10+ drives these days? This one hasgoes up to 11:

    TISTTFY

    HA, you kids. Back in the 1950s they went up to 12 !

    1953_Fender_Deluxe_Amp.jpg



  • @MrL said in WTF Bites:

    @Polygeekery said in WTF Bites:

    But then they send the password, I double click to highlight, copy, paste it in the field, hit enter and it trips the "You cannot leave this field blank" prompt. Which I find happens sometimes when I paste information in to a field and I've never really figured out why.

    Recognising if something was put into the field is tied to onkeypress, onkeydown, or something similar.

    And, just for tits and pickles, async change listeners that mouse paste won't trigger, and a whole fucking slew of other broken by design ideas that float around like turds in ammonia in the world of web dev.


  • Notification Spam Recipient

    @cvi said in WTF Bites:

    @MrL said in WTF Bites:

    .onKeyDown(function() {
    	itIsEmpty = document.form.passwerd.value.length == 0;
    });
    

    🤯

    There is so much fucking dumb in this one-liner, it's actually amazing.

    It's not made up, btw.


  • BINNED

    @Zerosquare said in WTF Bites:

    @Polygeekery said in WTF Bites:

    A long time ago we had to write our own implementation of this

    I don't get it. How is that CAPTCHA supposed to reject bots? It looks dead-easy to OCR and compute.

    It works on the basis of your site probably not being high-profile enough to warrant a spammer creating custom code for it (although that assumption might be off for Broadcom). It basically protects you from crawlers that fill in every form they find, not from actual targeted bot attacks.
    There’s probably no need to even OCR anything, I assume it’s just plain text. The label might as well be “enter the word ‘orange‘“.


  • BINNED

    @cvi said in WTF Bites:

    @Polygeekery said in WTF Bites:

    Don't. Fucking. Move. Anything. Not after it has been displayed.

    This.

    Personally, I would like to add "Don't fucking mess with the focus. Double-don't if your damn shit is so slow that I already managed to click elsewhere and type half a sentence before whatever fucking script you're running triggers."

    Messing up focus is really the worst.
    Basically like popping up a message box “are you sure you want to update Windows and wipe your hard drive?“ that you then answer in the affirmative because you were just typing an email. 🏆

    I think I mentioned this one before, but anyways:
    At one point I started something like Ansys FLUENT (expensive CFD software) and its little logging window showed a warning saying something among the lines of: we have detected that you have focus stealing prevention enabled. This might cause the workbench to not function correctly.

    How the hell does this happen? You have someone there who realizes KDE’s focus stealing prevention setting is a thing and knows how to detect it, but not how to write your damn user interface to not fuck up whatever it is that you’re fucking up in the first place?


  • Discourse touched me in a no-no place

    @topspin said in WTF Bites:

    Basically like popping up a message box “are you sure you want to update Windows and wipe your hard drive?“ that you then answer in the affirmative because you were just typing an email.

    Sounds perfect because now you're not typing an email.



  • @MrL said in WTF Bites:

    @cvi said in WTF Bites:

    @MrL said in WTF Bites:

    🤯

    There is so much fucking dumb in this one-liner, it's actually amazing.

    It's not made up, btw.

    I could tell: it didn't read

    .onKeyDown(new Function("itIsEmpty = document.form.passwerd.value.length == 0;"));
    


  • @dkf said in WTF Bites:

    @Bulb said in WTF Bites:

    Now that it added async

    I think that doesn't help (but I'm not sure; we're still stuck supporting 2.7 right now because of a key downstream collaborator who didn't even think about upgrading their shit until the start of this year) as the fundamental problems are right down at the basic level of the runtime (as it has to do with the GIL and the lock management associated with it, which is very sensitive code functionality-wise), and CPU-bound work remains exactly that and there's not much you can do to sweeten the pill without using threads or processes.

    It doesn't help with threading itself, but it makes working around the limitation easier. Async itself is single-threaded, but it makes it easier to write native, i.e. compiled to machine code, not python, modules that offload work to worker threads that, because they are not actually running python, don't need to touch the GIL and can therefore actually utilize the power of the additional CPU cores.

    It is the same out that node.js takes. JavaScript is also fundamentally impossible to make shared-memory-multi-threaded, so they didn't even try and use threads just for native code.

    The lock management code for the GIL when in CPU-bound mode (i.e., not making calls into the OS) involves essentially occasionally dropping the GIL and then reacquiring it immediately, which theoretically gives other threads a chance to preempt. Except that doesn't do bupkis on modern hardware: the chance of the other threads being exactly ready to go in that sliver of time is very slight, and instead what actually happens is the original thread re-grabs the lock virtually all the time. What is needed is a yield between the two. Except then you absolutely clobber the single threaded performance.

    I thought the normal implementation via futex should take care of that, that is that the FUTEX_WAKE will call schedule if it woke any thread up and the priority mechanism should switch to the woken thread if its been waiting for some time.

    How do other languages avoid this trap? Mostly by not having all memory protected by a single lock. Some (Java and C# fall into this family, but so too does C++ really) do it by not protecting things at the runtime level.

    The thing here is that managed languages are not supposed to have Undefined Behaviour, but data races let Undefined Behaviour creep back through the window. Fortunately for Java and C#, plain loads and stores are always atomic on x86, which means creating references don't need any extra overhead. I believe that's not the case on all platforms.

    Others bind every object utterly to its originating thread and only allow messages (typically made of basic primitive types that the messaging code knows how to move) to go between two threads.

    Perl had threads that copy-on-write everything except things explicitly marked shared, and implicitly locked then, since quite early on. I consider that a reasonable approach given the constraints of a dynamic managed language. But back then threads were mostly a windows thing and unix way was forking, and then python took over.

    I've never used threads in either anyway. I've done some work in Linux kernel back at school where I learned to lock things correctly, but also learned to avoid threads if possible, because they are really, really tricky to get right.


  • Considered Harmful

    @Bulb said in WTF Bites:

    avoid threads if possible, because they are really, really tricky to get right.

    Applied-Mediocrity went and used a whole bunch o' threads for the very first serious design he was tasked with... like, what could go wrong?!


  • 🚽 Regular

    @Polygeekery said in WTF Bites:

    There is a website that I frequent on mobile that is fucking horrible about this. Unless I wait a ridiculously long time after it has loaded to make sure everything is loaded and rendered the chances of me tapping on the wrong thing (almost always a link that takes me somewhere I did not intend to go, causing me to have to go back and start the load-render cycle over again) is near 100%.

    Does its name start with w and end in hat.thedailywtf.com?


  • 🚽 Regular

    @topspin said in WTF Bites:

    How the hell does this happen? You have someone there who realizes has received more than three complaints that KDE’s focus stealing prevention setting is a thing and knowswas forced to learn how to detect it, but not how to write your because it was easier than having to rewrite their damn user interface to not fuck up whatever it is that you’re fucking up in the first place?

    I assume.



  • @Polygeekery said in WTF Bites:

    Don't. Fucking. Move. Anything. Not after it has been displayed.

    Oh this is the worst.

    The news website I use most does this, it doesn't allocate the correct space for banners and images (what happened to <img height="...">, is it not CSSy enough?) so the page jumps around like crazy, and it's super slow to load (lots of post-load JS shenanigans I think). I click on the wrong article (or accidentally click an advert) all the time.

    Chrome has done away with the slider in their UI so now there is no indication that a person has to scroll anymore

    There seems to be a fashion to hide scroll bars. I don't get it - how are people supposed to know there's more content if you take away the visual indicator?


  • Discourse touched me in a no-no place

    @PleegWat said in WTF Bites:

    It's the kind of CAPTCHA that only works if you're the only site using it.

    It's one of these things that works remarkably well despite being really stupid. Until the bots start actually doing the math, you're fine. (There are other tricks as well, such as hidden fields that have to be left blank, which flummox most web-scraping bots.)


  • Discourse touched me in a no-no place

    @topspin said in WTF Bites:

    targeted bot attacks

    Targeted attacks (and anything using a legion of Minimum-Wage-for-India Needfuls) need a different approach.


  • ♿ (Parody)

    @topspin said in WTF Bites:

    expensive CFD software

    Chicago Fire Department?


  • Notification Spam Recipient

    @boomzilla said in WTF Bites:

    @topspin said in WTF Bites:

    expensive CFD software

    Chicago Fire Department?

    Conflagratory Fucks Dispenser.


  • ♿ (Parody)

    @Tsaukpaetra said in WTF Bites:

    @boomzilla said in WTF Bites:

    @topspin said in WTF Bites:

    expensive CFD software

    Chicago Fire Department?

    Conflagratory Fucks Dispenser.

    Sounds hot.


  • Notification Spam Recipient

    @boomzilla said in WTF Bites:

    @Tsaukpaetra said in WTF Bites:

    @boomzilla said in WTF Bites:

    @topspin said in WTF Bites:

    expensive CFD software

    Chicago Fire Department?

    Conflagratory Fucks Dispenser.

    Sounds hot.

    It tends to burn, yes.


  • Java Dev

    @bobjanova said in WTF Bites:

    The news website I use most does this, it doesn't allocate the correct space for banners and images (what happened to , is it not CSSy enough?) so the page jumps around like crazy, and it's super slow to load (lots of post-load JS shenanigans I think). I click on the wrong article (or accidentally click an advert) all the time.

    I've known sites which do pre-reserve space, then end up jumping because when the ad finally loads (or swaps for a new one on a timer glares) the actual size of the ad doesn't match the pre-reserved size.


  • Banned

    @topspin said in WTF Bites:

    Basically like popping up a message box “are you sure you want to update Windows and wipe your hard drive?“ that you then answer in the affirmative because you were just typing an email. 🏆

    *le flashbacks*

    https://what.thedailywtf.com/topic/17574/in-which-i-accidentally-windows-10


  • Grade A Premium Asshole

    @Polygeekery said in WTF Bites:

    But no one arranges anything in horizontal divs anymore. Everything is listed vertically

    On that subject and to continue "Practices on the web that need to fucking stop right fucking now":

    You have a form to fill in. Let's say that form is >1 field wide and some number of fields tall. You click inside of the first field, type in the information, hit Tab.....and you just went down instead of the field to the right.

    No. Don't do that. Ever. If you are laying things out for anything other than an Arabic, Chinese, Japanese or Korean website (I think that covers all the exceptions?), it is left to right and then top to bottom.

    This is one of those layout decisions that makes no sense to me either. It seems like it would be more difficult to do it that way.


  • Grade A Premium Asshole

    @topspin said in WTF Bites:

    @Zerosquare said in WTF Bites:

    @Polygeekery said in WTF Bites:

    A long time ago we had to write our own implementation of this

    I don't get it. How is that CAPTCHA supposed to reject bots? It looks dead-easy to OCR and compute.

    It works on the basis of your site probably not being high-profile enough to warrant a spammer creating custom code for it (although that assumption might be off for Broadcom). It basically protects you from crawlers that fill in every form they find, not from actual targeted bot attacks.
    There’s probably no need to even OCR anything, I assume it’s just plain text. The label might as well be “enter the word ‘orange‘“.

    I posted a while back about a web project we took on. On unpacking the code I realized that the "Captcha" was a static image.

    Not multiple static images with separate answer. Not randomly generated images. Not a captcha plugin. A single static image. All if the forms on the website utilized it. Program your bot to enter the number 7 in those boxes and you're good to go to spam the shit out of them.


  • Discourse touched me in a no-no place

    @Polygeekery said in WTF Bites:

    (I think that covers all the exceptions?)

    Hebrew belongs on that list too.


  • Banned

    @Polygeekery said in WTF Bites:

    This is one of those layout decisions that makes no sense to me either. It seems like it would be more difficult to do it that way.

    It's not that they consciously chose the vertical tab order as much as they ignored tab order entirely, and the result is basically random after a week of experimenting with various ways to reorder and nest HTML tags to make the web framework of choice do exactly what you want because it never does by default.


  • Grade A Premium Asshole

    Just ran across this little tidbit:

    Screen Shot 2020-04-30 at 10.16.08 AM.png

    How about you go fuck yourself and my client finds some other software to use?


  • BINNED

    @Polygeekery translation: we’ve found a compiler that still let’s us run our Windows 3.1 code without updating, and we’re milking it for what it’s worth.


  • BINNED

    @boomzilla said in WTF Bites:

    @topspin said in WTF Bites:

    expensive CFD software

    Chicago Fire Department?

    Computational Fluid Dynamics, but I assume yours has the hotter promotional calendar.

    I have a feeling you were getting back at me for the stupid shit I postmeat plant, but I’m okay with that.


  • ♿ (Parody)

    @topspin said in WTF Bites:

    @boomzilla said in WTF Bites:

    @topspin said in WTF Bites:

    expensive CFD software

    Chicago Fire Department?

    Computational Fluid Dynamics, but I assume yours has the hotter promotional calendar.

    I have a feeling you were getting back at me for the stupid shit I postmeat plant, but I’m okay with that.

    Actually, I didn't know what you meant by CFD, although in retrospect FLUENT was a hint, except that I interpreted that in the manner of "fluent interfaces" like you get in some hipster software libraries.



  • @HardwareGeek said in WTF Bites:

    @HardwareGeek said in WTF Bites:

    unless, of course, it's timed out, logged me out, and forgotten my start time by then

    Which, of course, it did. And it is now completely broken. It's taking forever to log in, and having logged in, it is now refusing to let me enter any time at all.

    Working (as much as usual, anyway) this morning. I was able to enter my times for yesterday, working from a screenshot of the times I had entered but it had refused to acknowledge as having been entered.



  • @Tsaukpaetra said in WTF Bites:

    @boomzilla said in WTF Bites:

    @topspin said in WTF Bites:

    expensive CFD software

    Chicago Fire Department?

    Conflagratory Fucks Dispenser.

    Sounds like @Polygeekery, except I'm pretty sure the field where he grows his fucks is barren.


  • Discourse touched me in a no-no place

    @boomzilla said in WTF Bites:

    Actually, I didn't know what you meant by CFD, although in retrospect FLUENT was a hint, except that I interpreted that in the manner of "fluent interfaces" like you get in some hipster software libraries.

    CFD is a big deal for a very large amount of engineering disciplines, and is quite important in physics too (except physicists like to write their own codes for it, because as any fule kno, physicists are God's Gift to Programming). Indeed, for a lot of engineering, that which isn't CFD is FEM and those two methods dominate computation in the area. Occasionally you have someone brave who uses a coupled model of the two.


  • Grade A Premium Asshole

    @HardwareGeek said in WTF Bites:

    Sounds like @Polygeekery, except I'm pretty sure the field where he grows his fucks is barren.

    I salted it many years ago. It will grow again when Chernobyl stops glowing.


  • Discourse touched me in a no-no place

    @Polygeekery said in WTF Bites:

    I salted it many years ago. It will grow again when Chernobyl stops glowing.

    Radioactive salt! 👍


  • ♿ (Parody)

    @dkf said in WTF Bites:

    @boomzilla said in WTF Bites:

    Actually, I didn't know what you meant by CFD, although in retrospect FLUENT was a hint, except that I interpreted that in the manner of "fluent interfaces" like you get in some hipster software libraries.

    CFD is a big deal for a very large amount of engineering disciplines

    I know. Just not part of my daily lexicon.



  • @Polygeekery said in WTF Bites:

    Chrome has done away with the slider in their UI

    Someone deserves to die. Slowly. Painfully.



  • @Gąska said in WTF Bites:

    @topspin said in WTF Bites:

    Basically like popping up a message box “are you sure you want to update Windows and wipe your hard drive?“ that you then answer in the affirmative because you were just typing an email. 🏆

    *le flashbacks*

    https://what.thedailywtf.com/topic/17574/in-which-i-accidentally-windows-10

    And this... (at least it used to, and I don't have an action waiting so I can't check)

    788f6b79-2010-42db-80f5-979c1d95670c-image.png

    It would have a 'Dismiss' at the bottom. You move the mouse over it to dismiss and the button gets bigger and pushes it down. Causing you to invoke the exact opposite action you thought you just clicked.



  • @topspin said in WTF Bites:

    @Polygeekery translation: we’ve found a compiler that still let’s us run our Windows 3.1 code without updating, and we’re milking it for what it’s worth.

    Nah. Translation: Our program writes it's user data into the same place as the exe and we can't be bothered to change that. (Not exactly at odds with yours, but I'm assuming they at least recompiled so it's not 16bit anymore.)

    I worked with a program like that - their fix? Change the default install directory to "C:" instead. I tried to explain why. No, they screamed. It's a bug in the Windows filesystem. It was also Windows fault that their dbase index files kept getting corrupted. And reporting any bugs was a personal attack. So glad to be done with that...



  • I have this bluetooth headset. It's got three buttons that do some different things depending on how you press or hold them: power the thing on/off, play/pause, pick up a call, volume up/down, prev/next track - pretty standard set. Recently, I don't know when it happened, but the playback controls have stopped working. I can still turn the headset on and off and change the volume, but play/pause and changing tracks don't do anything. :wtf:



  • My online electric bill:
    08e65d01-4227-497b-9683-815cd5d746e7-image.png

    Great tab title. No, I'm not kshairrick.



  • @hungrier: check if there's no hidden reset switch. If not, let the battery drain until it no longer powers on, then recharge it? 🤷



  • @Zerosquare As far as I can tell there's no reset switch. I've tried unpairing it on both the device and my phone, but still nothing. I'll try letting the battery drain and see if that fixes it


  • Notification Spam Recipient

    @hungrier said in WTF Bites:

    I'll try letting the battery drain

    Max volume Brown noise should help make that faster.



  • @Tsaukpaetra I don't want to shit my pants though


  • Considered Harmful

    I just found the following nugget in production code.

    if( typeof foo == 'undefined' ) {
        var foo;
    }
    

    I don't know what the fuck they thought that code does, but it doesn't.

    You can't conditionally declare a var variable in JavaScript. Even if you could, you'd be referring to a different variable inside the block than in the if condition. Variables declared with var aren't block scoped, they're function scoped. Also, all var declarations are effectively "hoisted" to the top of the function. Even after being declared with var, the value would still be undefined.

    So the code is equivalent to:

    var foo;
    if( typeof foo == 'undefined' ) { /* do nothing */ }
    

    But this was in the global scope, anyway, so even having declared it with var, it's still just a property of globalThis (aka window).


  • Notification Spam Recipient

    @hungrier said in WTF Bites:

    @Tsaukpaetra I don't want to shit my pants though

    Eh. You're washable.



  • My company started using Time Doctor for tracking work hours. Whenever I search for information about it, I get results for Doctor Who.



  • @hungrier said in WTF Bites:

    @hungrier Unrelated:

    $ whereis docker-compose
    docker-compose: /usr/local/bin/docker-compose
    $ docker-compose up -d [service]
    bash: /usr/bin/docker-compose: No such file or directory
    

    :wtf:

    Also :wtf:: in another terminal tab, it works no problem. A couple hours ago, it was working everywhere.

    hash -r



  • @Choonster said in WTF Bites:

    My company started using Time Doctor for tracking work hours. Whenever I search for information about it, I get results for Doctor Who.

    Probably more informative and useful than the actual software docs.


  • Notification Spam Recipient

    @ben_lubar said in WTF Bites:

    @hungrier said in WTF Bites:

    @hungrier Unrelated:

    $ whereis docker-compose
    docker-compose: /usr/local/bin/docker-compose
    $ docker-compose up -d [service]
    bash: /usr/bin/docker-compose: No such file or directory
    

    :wtf:

    Also :wtf:: in another terminal tab, it works no problem. A couple hours ago, it was working everywhere.

    hash -r

    Glad to see you're kinda back. Not so enthusiastic that you've switched from incomprehensible pictures to incomprehensible commands...


  • Java Dev

    @ben_lubar said in WTF Bites:

    @hungrier said in WTF Bites:

    @hungrier Unrelated:

    $ whereis docker-compose
    docker-compose: /usr/local/bin/docker-compose
    $ docker-compose up -d [service]
    bash: /usr/bin/docker-compose: No such file or directory
    

    :wtf:

    Also :wtf:: in another terminal tab, it works no problem. A couple hours ago, it was working everywhere.

    hash -r

    or type docker-compose to be certain what's going on - might be a bad alias or function as well which that wouldn't catch.


Log in to reply