WTF Bites


  • 🚽 Regular

    WTF Bites: All Visual Studio. All the time.

    da74cf1b-2119-4416-b8a4-544b00c514a3-image.png

    There are no bloody errors, just continue the stupid debug session 🖕

    This is after it crashed with an MDE when trying to 'activate historical debugging' and lost me an hours' worth of data that hasn't been persisted yet.


  • 🚽 Regular

    I have multiple tabs in multiple windows in multiple tab containers in multiple profiles (in multiple computers).
    I think there's something wrong with me.

    Filed under: advanced Firefox user 😾


  • Discourse touched me in a no-no place

    @Zecc said in WTF Bites:

    I have multiple tabs in multiple windows in multiple tab containers in multiple profiles (in multiple computers).
    I think there's something wrong with me.

    Yup. You're only using one vendor for your browsing habits.


  • 🚽 Regular

    @PJH True; my tabs in Edge, Chrome and Chromium hardly add up to twenty or so.


  • Discourse touched me in a no-no place

    @Zecc Safari? Opera? Lynx?



  • @Carnage at that point, stair grading is your best option.

    Ie throw them down the stairs. Some think that those that go further have more knowledge and should get better grades. Others believe the opposite.


  • Considered Harmful

    @hungrier said in WTF Bites:

    @pie_flavor

    none of the replies are "Delete your account"

    This is why I stopped using Twitter



  • CAN adapters can be configured to take either one or three samples per bit. There are several layers of wrappers around the interface. On some levels, it expects the obvious values 1 or 3. On some levels, it expects 0 = one sample, 1 = three samples. On some levels it expects 1 = one sample, 2 = three samples. Hip, Hip, Hooray for consistency.

    Note: most of the interfaces are actually specified by a twisted maze of ISO standards, not always well thought out.



  • @Bulb said in WTF Bites:

    Note: most of the interfaces are actually specified by a twisted maze of ISO standards, not always well thought out.

    You are in a twisted maze of ISO standards, all alike. It is dark. You might be eaten by a standards lawyergrue.



  • @Benjamin-Hall The twisted maze of departments and subsidiaries is probably worse. Several departments and subsidiaries work on the project and they all jealously guard their pieces of code, making debugging a completely unnecessary pain.


  • 🚽 Regular

    @Bulb said in WTF Bites:

    CAN adapters can be configured to take either one or three samples per bit. There are several layers of wrappers around the interface. On some levels, it expects the obvious values 1 or 3. On some levels, it expects 0 = one sample, 1 = three samples. On some levels it expects 1 = one sample, 2 = three samples. Hip, Hip, Hooray for consistency.

    Note: most of the interfaces are actually specified by a twisted maze of ISO standards, not always well thought out.

    CAN as a communications concept is great, differential bus, multi-master, sensible arbitration, what's not to like. I just wish uCs would have actually useful frame filters, and that automotive vendors wouldn't jealously hoard PIDs and hide everything behind security layers like UDS.


  • Discourse touched me in a no-no place

    @Polygeekery said in WTF Bites:

    Oh god no. I can't drink Jim Beam. There is something about it that gives me a splitting headache after one cocktail. If Jim Beam is my only option then I go thirsty.

    It's not my tipple either. Rye is fine… in bread, but like my whisky to be at the smoky non-sweet end of scotch…


  • Notification Spam Recipient

    @pie_flavor said in WTF Bites:

    @hungrier said in WTF Bites:

    @pie_flavor

    none of the replies are "Delete your account"

    This is why I stopped using Twitter

    Anyone want to explain why Discord apparently experienced orgasm with Nintendo?


  • Considered Harmful

    @Tsaukpaetra



  • @Benjamin-Hall said in WTF Bites:

    throw them down the stairs. Some think that those that go further have more knowledge and should get better grades. Others believe the opposite.

    The papers or the students?


  • Notification Spam Recipient

    @pie_flavor said in WTF Bites:

    @Tsaukpaetra

    Not much of an explanation, but, okay...


  • Discourse touched me in a no-no place

    @Tsaukpaetra said in WTF Bites:

    Not much of an explanation, but, okay...

    Character from big game comes to bigger game from a Nintendo-published series, plus other Nintendo-specific series (Zelda, Mario) have new games and other stuff is coming to the Switch.


  • Grade A Premium Asshole

    I have been looking in to new services to offer our clients. I had a brief webinar today to discuss the partner program with a vendor. The webinar was brief because when she got to:

    👩 "There is a $200 annual fee to participate in our partner program."

    I countered with:

    polygeekery "So, let me get this straight, I have to pay you $200 to even participate in a program where I push my clients towards your products?"

    You can fuck right off. You don't know how this sort of thing works and you have no concept of what the channel is all about. I would love to know what idiotic C-level thought that would be a good idea.


  • Considered Harmful

    @Benjamin-Hall said in WTF Bites:

    @Bulb said in WTF Bites:

    Note: most of the interfaces are actually specified by a twisted maze of ISO standards, not always well thought out.

    You are in a twisted maze of ISO standards, all alike. It is dark. You mightare likely to be eaten by a standards lawyergrue.

    FTF:belt_onion:



  • @Cursorkeys said in WTF Bites:

    hide everything behind security layers like UDS

    Well, UDS is not (just) a security layer. It does define an ‘unlocking’ command, that requires the ‘tester’ to successfully ‘decrypt’ a ‘seed’, but it is not a required part. It is up to the controller maker to choose which commands will require unlocking.

    It is a bit of security by obscurity too, because the key is the same for all devices of a type and the implementation has to be present in all the diagnostic equipment, and the algorithms used are not particularly complex. The transport is also not encrypted afterwards, and since CAN does not have any addresses, you can connect an official tester, have it initiate the session and unlock it, and then send the commands from another tester—the controller can't tell. But then, some security is needed, especially now that the diagnostics can be done remote… wait, if somebody hacks into the telediagnostic unit, the implementation of the unlocking will be lying somewhere around there, so…


  • BINNED

    @Bulb said in WTF Bites:

    The twisted maze of departments and subsidiaries

    The 12 Tasks Of Asterix The Place That Sends You Mad – 10:00
    — MR XULSKI



  • @Luhmann Yeah, that's the best scene of Asterix ever.


  • Banned

    @LaoC said in WTF Bites:

    @Benjamin-Hall said in WTF Bites:

    @Bulb said in WTF Bites:

    Note: most of the interfaces are actually specified by a twisted maze of ISO standards, not always well thought out.

    You are in a twisted maze of ISO standards, all alike. It is dark. You mightare likely to SHALL be eaten by a standards lawyergrue.

    FTF:belt_onion:



  • @Gąska What do you have against the Idiotic Standards Organization?



  • I'm not sure they're idiots -- after all, they make money with their standards.


  • BINNED

    @Bulb said in WTF Bites:

    @Luhmann Yeah, that's the best scene of Asterix ever.

    Especially since I experienced it live when crossing the Italian border. 😵



  • .https://docs.microsoft.com/en-us/dotnet/core/whats-new/dotnet-core-3-0

    The SDK installers will now upgrade SDK feature-band releases in place. Feature bands are defined in the hundreds groups in the patch section of the version number. For example, 3.0.101 and 3.0.201 are versions in two different feature bands while 3.0.101 and 3.0.199 are in the same feature band. And, when .NET Core SDK 3.0.101 is installed, .NET Core SDK 3.0.100 will be removed from the machine if it exists. When .NET Core SDK 3.0.200 is installed on the same machine, .NET Core SDK 3.0.101 won't be removed.

    Oh, so having three numbers in the version number wasn't enough. You had to make your own little rule on top of that. I guess putting a fourth period would have made it too obvious. 😑



  • @Zerosquare said in WTF Bites:

    they make money with their standards

    Yeeeees, that's almost like they don't want people to actually follow the standards.

    (The C and C++ working groups work around it by publishing the "incorrekt and incomplet" final draft (and all work versions) freely)



  • @Cursorkeys said in WTF Bites:

    and that automotive vendors wouldn't jealously hoard PIDs and hide everything behind security layers like UDS.

    Like the old proverb says: you can lead a horsevendor to waterproperly designed interoperability standards, but you can't make it drinkactually use it as intended.



  • @Bulb said in WTF Bites:

    The C and C++ working groups work around it by publishing the "incorrekt and incomplet" final draft

    I wish someone would "work around it" by obtaining and illegally publishing a torrent of every standard in an easy to access website.


  • BINNED

    @anonymous234 said in WTF Bites:

    @Bulb said in WTF Bites:

    The C and C++ working groups work around it by publishing the "incorrekt and incomplet" final draft

    I wish someone would "work around it" by obtaining and illegally publishing a torrent of every standard in an easy to access website.

    Just downloading every standard through a valid subscription could result in arrest by the Secret Service and a 50 year prison sentence.
    You want to actually distribute that? That'd be like, what, 20,000 years then?



  • @topspin said in WTF Bites:

    That'd be like, what, 20,000 years then?

    Yeah but they'd have to catch me first.

    You can get away with doing very illegal stuff on the internet if you know how.



  • @anonymous234 said in WTF Bites:

    @Bulb said in WTF Bites:

    The C and C++ working groups work around it by publishing the "incorrekt and incomplet" final draft

    I wish someone would "work around it" by obtaining and illegally publishing a torrent of every standard in an easy to access website.

    I would prefer if companies "worked around it" by simply refusing to follow any document that is not available to anybody at any time from a simple URL, but I guess this would do.



  • @anonymous234 said in WTF Bites:

    @topspin said in WTF Bites:

    That'd be like, what, 20,000 years then?

    Yeah but they'd have to catch me first.

    You can get away with doing very illegal stuff on the internet if you know how.

    Simply being based in Kazakhstan or some such place seems to be a better option.


  • Discourse touched me in a no-no place

    @Bulb said in WTF Bites:

    I would prefer if companies "worked around it" by simply refusing to follow any document that is not available to anybody at any time from a simple URL, but I guess this would do.

    Alas, many of the ISO standards are ones that people are required by law to follow.



  • Yeah, and I always felt it was wrong. The law is supposed to be public.


  • BINNED

    @Zerosquare said in WTF Bites:

    Yeah, and I always felt it was wrong. The law is supposed to be public.

    You can buy it (the standard), so it’s public. 🏆


  • Discourse touched me in a no-no place

    @Zerosquare said in WTF Bites:

    The law is supposed to be public.

    The law is. It says you've got to follow something you have to pay to see. 😒 (Hmm, 🛋 is supposedly close to that…)



  • WTF Bite: Finally added a spell checker to my custom word processor. Initially, it was easy, just add SpellCheck.IsEnabled="true" to my RichTextBox's XAML. Adding a custom dictionary loaded with common science fiction terms was a lot trickier, but I got it done, and now I get red squigglies and a context menu full of suggestions on spelling errors, as well as an "Add This Word to the Dictionary" item.

    So then I decided to put a spelling error counter in, so my editor shows me the remaining number of errors in the current document and so I could do a global error count with a breakdown of which chapters still have errors. RichTextBox does a great job of identifying and underlying spelling errors in real-time, with no performance problems or obvious delays.

    Here's the WTF part: If I enumerate the spelling error collection myself so I can build a count, the app becomes unusable. Somehow, it takes several seconds to enumerate a collection of already-identified spelling errors in an average-length chapter! And when I tried it on an entire novel, the app went off to Never Never Land with a CPU core pegged at 100%, and it never came back.

    Of course, the enumeration requires access to a UI element (RichTextBox), so I can't do the work on a background thread, meaning the app completely freezes while enumerating errors. And my original code which did a spelling error count after each text change meant the app froze every time I typed a letter. :headdesk: (I also wrote a word counter that works on each keystroke, and that's never caused performance issues. It can do a word count on an entire novel in less than a second, and that includes loading a bunch of XML from disk and parsing it into a ton of FlowDocuments!)

    Status: Spelling error counter disabled for now.


  • Notification Spam Recipient

    @mott555 said in WTF Bites:

    Status: Spelling error counter disabled for now.

    Eh, it would only be a distraction anyways, right? 👷♀



  • @Tsaukpaetra I used to think that, but Amazon's spellchecker is worthless (gives you lots of false positives, misses some obviously-incorrect words, and doesn't show you enough context to actually locate the error in the source copy). So I wanted something that could easily spin over 40 chapters and say "Hey, there are still 5 errors in Chapter 6, 3 errors in Chapter 18, and 1 error in Chapter 25, and here I'll even open editors for you so you can fix them or update the spellcheck dictionary!"

    EDIT: Found on StackOverflow:

    the GetNextSpellingErrorPosition method may take up to 60 seconds before it returns (depending on the hardware/number of words in your RTB).

    :headdesk: :headdesk: :headdesk: :headdesk: :headdesk: :headdesk: :headdesk: :headdesk: :headdesk: :headdesk: :headdesk: :headdesk: :headdesk: :headdesk: :headdesk: :headdesk: :headdesk: :headdesk: :headdesk: :headdesk: :headdesk: :headdesk: :headdesk: :headdesk:

    YOU'VE ALREADY IDENTIFIED AND RED-SQUIGGLIED ALL THE ERRORS SO WHY DOES IT TAKE YOU 60 SECONDS TO WALK THROUGH EACH ITEM IN THE ERROR LIST I HATE COMPUTERS



  • @mott555 Found this multi-faceted abomination on StackOverflow. Take the text, split it up into words, create a temporary TextBox for each word to let Spellcheck do its thing, then count the number of textboxes with spelling errors! I'll have to do some testing and see if this travesty actually runs in a reasonable amount of time.

    void initTest()
    {
        TextBox tx = new TextBox();
        tx.SpellCheck.IsEnabled = true;
        tx.Text = "saf and tre";
    
        var split = tx.Text.Split(' ');
        var errors = 0;
        foreach (var s in split)
        {
            var tempTb = new TextBox();
            tempTb.SpellCheck.IsEnabled = true;  // Added this line
            tempTb.Text = s;
    
            SpellingError e = tempTb.GetSpellingError(0); // no longer always null
            var a = tempTb.GetSpellingErrorLength(0);
            var b = tempTb.GetSpellingError(0);
            var c = tempTb.GetSpellingErrorStart(0);
    
            //if (tempTb.GetSpellingErrorLength(0) >= 0)  //doesn't appear to be correct 
            if (e != null)
            {
                errors++;
            }
        }
    }
    

  • Banned

    @mott555 said in WTF Bites:

    Somehow, it takes several seconds to enumerate a collection of already-identified spelling errors in an average-length chapter!

    It's entirely possible the spell checker only does spell checking for currently visible text - which makes sense if it was designed only with direct interaction in mind, not enumeration of all errors.



  • @Gąska said in WTF Bites:

    only does spell checking for currently visible text

    For various reasons, my RichTextBox has UI virtualization disabled, its own scrollbars are disabled, and I have it stuffed into another ScrollViewer. In theory, this is Very Bad but doesn't cause any issues with my average document length, and it also means the RichTextBox thinks 100% of its contents are visible at all times even if that's not true.



  • @mott555 said in WTF Bites:

    and it also means the RichTextBox thinks 100% of its contents are visible at all times even if that's not true

    I don't know the internals of that UI library, but given the ones I do know I think it might not be actually true.


  • Banned

    @mott555 fucking hell. I don't even want to know why you did that.

    ...although it's good to keep this trick in mind in case I run into similar problems myself. I'll probably need to roll my own extremely complicated text editor pretty soon.

    By the way - how well are FlowDocuments doing overall? I'm especially interested in how hard it is to implement very custom interactive behavior on individual words, and things like wrapping text spans in "bubbles" with custom background and border colors that also kinda sorta work across line breaks. Though I realize your use case might not be nearly as complicated as this.



  • @Gąska said in WTF Bites:

    @mott555 fucking hell. I don't even want to know why you did that.

    It had to do with a zoom slider. Supposedly, the "proper" way to zoom a RichTextBox is with a LayoutTransform. But if you set a LayoutTransform on a RichTextBox normally, it clips the text and does text-wrapping pre-zoom. So if you zoom in, text runs off the right end without wrapping and it doesn't even give you a horizontal scrollbar. And if you zoom out, the text gets smaller but all the lines that were below the bottom of the control never render, and you just get a bunch of white space at the bottom. :facepalm: The trick was to disable UI virtualization, disable the scrollbars, put in my own scrollbars, and then somehow things work as expected (I'm probably relying on a WPF bug or three here to be honest...)

    @Gąska said in WTF Bites:

    By the way - how well are FlowDocuments doing overall? I'm especially interested in how hard it is to implement very custom interactive behavior on individual words, and things like wrapping text spans in "bubbles" with custom background and border colors that also kinda sorta work across line breaks. Though I realize your use case might not be nearly as complicated as this.

    They seem to work pretty well for me, but my use case is very simple. The RichTextBox is backed by a FlowDocument so I can do bolds and italics, and really, that's about it. I didn't even hook up font size/color stuff because I don't need it. I don't even know how to begin to comment on bubbles, backgrounds, and colors.



  • @mott555 said in WTF Bites:

    I'll have to do some testing and see if this travesty actually runs in a reasonable amount of time.

    It's not reasonable, but it's better. In what world is it faster to create 150,000 one-word TextBoxes and spellcheck them than to run spellcheck on 40 individual RichTextBoxes with 3000 - 5000 words each?

    But it's not fast enough to really matter. If I continue on this, I have two options, both of which belong in this thread to varying degrees.

    1. Start poking at the RichTextBox's spellchecker with Reflection. Maybe if I poke around in its private parts long enough, I'll find something interesting like a spelling error counter, instead of using the crappy, slow, and very incomplete Spellcheck API (seriously, it only has about 3 functions and no public Count property...)
    2. Start spawning off background processes with hidden windows that can spellcheck a portion of the complete work, so I can take advantage of multiple CPU cores for a speedup without crashing the app by touching a UI element from a background thread.

  • Banned

    @mott555 at this point, rolling your own squiggly thingy sounds like a reasonable proposal.



  • @Gąska said in WTF Bites:

    @mott555 at this point, rolling your own squiggly thingy sounds like a reasonable proposal.

    Or I give up. The red squiggly underline part works fine. I just can't get a count of how many red squiggly underline parts there are, and I've made it this far without that part so oh well.


Log in to reply