WTF Bites


  • Notification Spam Recipient

    @dkf said in WTF Bites:

    From our own Front Page…

    0_1471008592450_upload-4fce8a8a-96ac-49c5-b89d-403c4ef073b9

    That's… great if you want to do Shift+Enter I guess.

    That looks remarkably identical to my Sony keyboard, with exception to my Shift and Enter keys aren't weirdly broke-looking...



  • @dkf said in WTF Bites:

    From our own Front Page…

    0_1471008592450_upload-4fce8a8a-96ac-49c5-b89d-403c4ef073b9

    That's… great if you want to do Shift+Enter I guess.

    I suppose they disabled sticky key check in BIOS or it will not boot, amirite?


  • 🚽 Regular

    @Lorne-Kates said in WTF Bites:

    🐵 OOK OOK MUST BE FIRST BECUASE PAGE LOADS SCRIPTS TOP TO BOTTOM AND USER MIGHT NOT LOAD SCRIPT BEFORE THEY LEAVE PAGE! 💩 HAHAHAH POOP!

     
    Some people block third-party scripts.

    🐵 :head_asplode:


  • Java Dev

    @FrostCat said in WTF Bites:

    @mott555 said in WTF Bites:

    Suddenly, a wild "This site uses cookies!" popup appears. Click OK to dismiss.

    Fuck them and their assumed consent. I use F12 dev tools to delete the offensive elements!

    I need to do a check some day how many of those sites have already set cookies by the time they show the warning.



  • This is the full tree of security groups created by Visual Studio Team Services when you make a new empty project.

    0_1471111689093_upload-69f8df0a-14f2-4acf-97eb-f1113c72931f

    I assume many of those are the same ones displayed multiple times... still, seems a bit excessive.

    Edit: seriously, every part of this is overcomplicated as hell. You'd expect accounts to have projects? Nope! Each Microsoft account has a list of "Accounts" (which is a completely different concept apparently), each of those has a list of projects, and each of those projects has a list of "teams", and each of those teams has a list of member accounts (of the first kind).



  • My dad is still running his backup software 24/7, with the set of folders included in the backup set to C:\.

    The 301GB he's been uploading over our MilwaukeePC 1 Mbps connection includes:

    • His flight simulator HIGH QUALITOY PHOTOREALISTIC TEXTURE PACKs
    • His McAfee virus definition database
    • Guild Wars 2
    • Two flight simulators that "don't work" but he keeps buying DLC for them anyway
    • "Backups" made to subfolders of the folders that contain the backed up files
    • Temporary files for programs including Carbonite Online Backup
    • Probably his pagefile if Windows allows it

  • Notification Spam Recipient

    @ben_lubar said in WTF Bites:

    The 301GB

    Be thankful it's only that much!


  • Dupa

    @cartman82 said in WTF Bites:

    0_1470439512992_upload-c522815c-9391-41bf-adc2-8c970161a442

    I'm starting to realise python 3 type hinting has one major, tragic flaw: circular imports.

    The only way to type hint is to import the hinted class as a module dependency. It means suddenly every module tries to import every other module, and your neat dependency structure goes to shit.

    WTF python people? Why not some "weak import" thing? Why do you have to ruin everything?

    Isn't it Howell sensible languages do that? To hint C# you need reference the class itself too.



  • @ben_lubar said in WTF Bites:

    • His flight simulator HIGH QUALITOY PHOTOREALISTIC TEXTURE PACKs

    I don't know about the rest, but if you're going to do backups, including the porn stash makes perfect sense.


  • Discourse touched me in a no-no place

    @kt_ said in WTF Bites:

    To hint C# you need reference the class itself too.

    But C# has simultaneous-declaration semantics; it doesn't need a strict DAG of declarations. (Initialisations are something else.)


  • BINNED

    :wtf: People at the park, moving like several flocks of birds, only with their cellphones in front of their face. In packs of hundreds in all ages and walks of life, going from one direction to another, seemingly random but apparently hunting Pokemons! You want to disturb them, just start running to some random direction, they follow you like zombies thinking you found a rare one :--)) 😆 :rofl:


  • :belt_onion:

    @dse said in WTF Bites:

    :wtf: People at the park, moving like several flocks of birds, only with their cellphones in front of their face. In packs of hundreds in all ages and walks of life, going from one direction to another, seemingly random but apparently hunting Pokemons! You want to disturb them, just start running to some random direction, they follow you like zombies thinking you found a rare one :--)) 😆 :rofl:

    Wanna really have fun? Yell "Charmander!" and watch the chaos ensue.


  • kills Dumbledore

        Public Shared Function GetOrdinal(ByVal Number As Integer) As String
            ' Accepts an integer, returns the ordinal suffix
    
            ' Handles special case three digit numbers ending
            ' with 11, 12 or 13 - ie, 111th, 112th, 113th, 211th, et al
            If CType(Number, String).Length > 2 Then
                Dim intEndNum As Integer = CType(CType(Number, String). _
                    Substring(CType(Number, String).Length - 2, 2), Integer)
                If intEndNum >= 11 And intEndNum <= 13 Then
                    Select Case intEndNum
                        Case 11, 12, 13
                            Return "th"
                    End Select
                End If
            End If
            If Number >= 21 Then
                ' Handles 21st, 22nd, 23rd, et al
                Select Case CType(Number.ToString.Substring( _
                    Number.ToString.Length - 1, 1), Integer)
                    Case 1
                        Return "st"
                    Case 2
                        Return "nd"
                    Case 3
                        Return "rd"
                    Case 0, 4 To 9
                        Return "th"
                End Select
            Else
                ' Handles 1st to 20th
                Select Case Number
                    Case 1
                        Return "st"
                    Case 2
                        Return "nd"
                    Case 3
                        Return "rd"
                    Case 4 To 20
                        Return "th"
                End Select
            End If
        End Function
    

    This type of function always looks a bit messy, but I haven't seen one this confusingly laid out before.

    First, there's the conversion to string all over the place for getting the length or last digits, instead of comparing to 100 and getting the value mod 10.

    Then checking that a number is between 11 and 13, but doing a single option case on it as well, to be double sure.

    Then just the fact that it does 3 digits first, then > 20, then < 20.

    Then you look through the calling code and realise it's all done for dates of the month, so the 3 digit part is never used anyway.

    Brillant



  • @Jaloopa said in WTF Bites:

    checking that a number is between 11 and 13, but doing a single option case on it as well, to be double sure

    Yes, I liked that bit too.

    Initially I thought it actually mucked up 11th, 12th, 13th as well but I see it does actually do those properly.

    I actually think it's a good thing that it handles x11th, x12th, x13th as well even though it's not currently used for that. Every utility function gets used beyond its initial scope, so you should always write them for the general case.

    I mean, there are heaps of better ways to do it, but at least it's not actually wrong. Except inasmuch as doing numeric operations on numbers by converting them to strings and using substring operations is wrong, i.e. morally and aesthetically.



  • We want to give the users the ability to upload documents and then click on a button which says upload; this will call a js function that will ask them to verify or acknowledge that the documents they're about to upload are in the correct format/valid signatures etc. and then on approval of this asynchronously submit the upload.

    Simple thing, right? Telerik has a file upload control, the programmer wants to delay the upload until the user takes some action. By default the control either starts uploading as soon as the user chooses the file, or generates its own "really upload this now" button for the user to click, but surely a function actually triggering the upload is the most basic functionality of a file upload control, right?

    Psh.

    You can use the following approach - in the Upload's select event, locate the generated Upload button and attach a click handler to it, which will execute your custom logic.

    Really. The best way to trigger the upload is to find a generated button and trigger its click event. Really.



  • 0_1471270377663_upload-cb5ec378-1b8c-49e6-a593-5ada7c21319e

    0_1471270370742_upload-33abc5e6-564e-45d5-bd43-f13882dfa3c0

    "Hmm... better export it again, just to make sure".



  • Digging through some code that I need to optimize eventually. I'm fairly sure I'm not the first to do so. The following is found at just before entering the "main" loop (slightly renamed to protect the guilty).

        call systime(timeStart)
    
    #ifdef HAS_XYZ
        call start_xyz_timing()
    #endif
    
        LIKWID_ON('scopename')
        PERF_CONTEXT_START('scopename')
        PERFON('s_name')
        TRACE_USER_START(scopename)
        SOMETHINGTRACEON()
    #ifdef HAS_VTUNE
        vtdomain = create_domain_thing("name"//C_NULL_CHAR)
    #endif
    

    TR:wtf:: I'm probably going to end up adding another one. But that one is (hopefully) staying in my local branch. Oh, well. 🤷🏻


  • Discourse touched me in a no-no place

    @Maciejasjmj That's crazy.

    Oh, they got bought out by Progress, eh? Huh.


  • Discourse touched me in a no-no place

    @cvi You should turn all the profilers on sometime and see what happens!

    0_1471272559971_upload-afd2f897-3c84-48e8-aee2-925cf9e6cb7a


  • I survived the hour long Uno hand

    From an email confirmation

    Term: 4 issues
    Order total: $22.00
    Total paid: $22.00
    Card type: undefined Card number: ********2.00

    I'm... not sure my credit card was run correctly. I didn't change any of that btw.


  • Winner of the 2016 Presidential Election Banned

    @Yamikuronue :wtf: kind of looks like it tried to use 22.00 across the board.



  • @anonymous234 Yeah I'm with you, I thought it was too complicated also. Then again I think GitHub is too simple in many ways, so there has to be a happy medium.

    At the very least, VSTS could hide things like "teams" until you actually create one.



  • @ben_lubar Ben L, buddy, pay for your own internet connection. You're an adult now.



  • @dse Goddamned I'm glad I live in Seattle where this shit ain't happening.


  • Trolleybus Mechanic

    @Zecc said in WTF Bites:

    @Lorne-Kates said in WTF Bites:

    🐵 OOK OOK MUST BE FIRST BECUASE PAGE LOADS SCRIPTS TOP TO BOTTOM AND USER MIGHT NOT LOAD SCRIPT BEFORE THEY LEAVE PAGE! 💩 HAHAHAH POOP!

     
    Some people block third-party scripts.

    🐵 :head_asplode:

    larff.


  • Trolleybus Mechanic

    @blakeyrat said in WTF Bites:

    @dse Goddamned I'm glad I live in Seattle where this shit ain't happening.

    Bullshit. You just don't go outside or go near "humans".



  • @Lorne-Kates I've never see a crowd of people following a virtual cartoon. I dunno; maybe you have.


  • Trolleybus Mechanic

    @blakeyrat said in WTF Bites:

    @Lorne-Kates I've never see a crowd of people following a virtual cartoon. I dunno; maybe you have.

    I have.

    You just aren't looking hard enough.

    Try looking up from the virtual cartoon you're following, and you'll see people following a virtual cartoon.



  • @FrostCat said in WTF Bites:

    @Yamikuronue I found a t-shirt that looks like it was made specifically for you!

    0_1471045023550_upload-17907ff9-0569-48b0-bbe5-4c194f846ccc

    Just needs s/OMG/WTF/


  • Discourse touched me in a no-no place

    @FrostCat said in WTF Bites:

    Oh, they got bought out by Progress, eh? Huh.

    Then not half an hour later, my boss was talking about web stuff and mentioned Telerik. Weirdest damn thing.


  • BINNED

    @blakeyrat said in WTF Bites:

    @dse Goddamned I'm glad I live in Seattle where this shit ain't happening.

    Why? You do not like watching zombies? I quite enjoyed it, and plan to go to park zombie-watching every day now.



  • In our (C++) codebase, we have our own class to work like std::vector. Its advantage is (supposed to be) that it has an extra template argument for allocation policy, which has a variant implementing the small object optimization (that is, short arrays are stored in the object itself and not allocated on the heap). That is fine and dandy except:

    • The object does not conform to the random access container (or any container at all) concept, so none of the standard library algorithms can be used with it.
    • There are two allocation policies for it, one with the optimization and one without.
    • Some functions in the library accept or return this container with the first allocation policy. They are not templates. Even functions, that could just accept pointer+size/endpointer, because they only read the data.
    • Other functions in the library accept or return this container with the second allocation policy. They are not templates either.

    So you end up converting the data from one container to another. Since most conversions involve allocation, the optimization goes down the drain.



  • @Bulb Out of curiousity - if your compiler supports SSO, could you not use std::basic_string<T> as a vector replacement?


  • BINNED

    @cvi said in WTF Bites:

    Digging through some code that I need to optimize eventually. I'm fairly sure I'm not the first to do so. The following is found at just before entering the "main" loop (slightly renamed to protect the guilty).

        call systime(timeStart)
    
    #ifdef HAS_XYZ
        call start_xyz_timing()
    #endif
    
        LIKWID_ON('scopename')
        PERF_CONTEXT_START('scopename')
        PERFON('s_name')
        TRACE_USER_START(scopename)
        SOMETHINGTRACEON()
    #ifdef HAS_VTUNE
        vtdomain = create_domain_thing("name"//C_NULL_CHAR)
    #endif
    

    ifdef soup

    TR:wtf:: I'm probably going to end up adding another one. But that one is (hopefully) staying in my local branch. Oh, well. 🤷🏻

    Can ifdef them in a header (to something or empty stubs) or use pImpl, then in the code just call them


  • kills Dumbledore

    @LB_ said in WTF Bites:

    if your compiler supports SSO

    Why would a compiler support single sign on? Is it compiling in the cloud?



  • @Jaloopa said in WTF Bites:

    @LB_ said in WTF Bites:

    if your compiler supports SSO

    Why would a compiler support single sign on? Is it compiling in the cloud?

    Don't say that too loudly or Microsoft will make Visual Studio 2017 work that way. (while charging you for the Azure time needed to compile, of course)



  • @LB_ said in WTF Bites:

    @Bulb Out of curiousity - if your compiler supports SSO, could you not use std::basic_string<T> as a vector replacement?

    Some of them might. But really, it's a premature optimization if I've ever seen one.

    These arrays are used as part of a structure that holds some data read from an embedded device over wireless link. There is on order of hundred kilobytes worth of data there and the application only works with one such data set at a time. The data structure is composed of chunks and many of them may fit in the small buffer. But given their number, I seriously doubt it really matters.



  • @dse said in WTF Bites:

    Can ifdef them in a header (to something or empty stubs)

    Most of them are (uppercase ones are stubbed out in some header - I don't think any of them even have implementations that are checked into the repository).

    pImpl

    It's fortran code, not sure if that's a thing there. Also not quite sure how that would help here...?


  • BINNED

    @cvi said in WTF Bites:

    Also not quite sure how that would help here...?

    Can implement generic empty stubs, then change the build system to pull implementation when there is one.

    @cvi said in WTF Bites:

    It's fortran code,

    Then, maybe not



  • @cvi said in WTF Bites:

    It's fortran code, not sure if that's a thing there.

    It is apparently parsed with C preprocessor, isn't it? So you can #define a function to expand to nothing or constant, fortran or not.

    @cvi said in WTF Bites:

    Also not quite sure how that would help here...?

    It would get rid of the ugly #ifdefs from the body of the functions. The statements that are not needed would instead expand to nothing or useless expressions that will be optimized away.

    Whether it would be easier to work with is a question. For some purposes yes, for others, not so much.



  • @dse said in WTF Bites:

    Can implement generic empty stubs, then change the build system to pull implementation when there is one.

    Ok, I kinda see what you were going for now. As mentioned, the macros mostly expand to nothing anyway, plus, for the most part, there's no visible state anyway, so I was a bit confused about why you'd need a pimpl.

    Either way, the "build system" is a bunch of makefiles. I'm not sure that the actual authors of the codebase would appreciate me messing with that. Besides, cleaning up the code is out-of-scope for me anyway, which I both appreciate (I don't have to do it) and not (I'm not really allowed to fix stuff that I would like to). Also, I'm sure that nobody is using any of that somewhere...



  • @Bulb See previous reply. It's also by far not the worst ifdef soup in that codebase, and some of the ifdef soups I don't really dare to touch.

    It seems to be one of those codebases that could solve world hunger and produce strong AI, except that nobody is able to figure out the right set of parameters/defines to do so.



  • @mott555 said in WTF Bites:

    @Jaloopa said in WTF Bites:

    @LB_ said in WTF Bites:

    if your compiler supports SSO

    Why would a compiler support single sign on? Is it compiling in the cloud?

    Don't say that too loudly or Microsoft will make Visual Studio 2017 work that way. (while charging you for the Azure time needed to compile, of course)

    :rofl::rofl: ...single... :rofl:

    Oh wait:



  • @dcon That is really annoying. I only use VS2015 for kernel-mode driver development and it's always a huge chore when I get around to using it. There are two different ways to login with no obvious indication as to which one I should use, and I've had it sign me out mid-compile before and interrupt me until I could sign in again.



  • @mott555 said in WTF Bites:

    @dcon That is really annoying. I only use VS2015 for kernel-mode driver development and it's always a huge chore when I get around to using it. There are two different ways to login with no obvious indication as to which one I should use, and I've had it sign me out mid-compile before and interrupt me until I could sign in again.

    I'm having even more fun - I have my own login - and a separate company one for store apps. When logged in with that, VS started nagging me about licenses. (So I logged back in with mine, update, and switched back. Seems happier. For now.)



  • @dcon Do I need to mention the subject of cloud-only development and runtime systems (and one in particular) and what an absolute nightmarepleasure that can be?


  • Notification Spam Recipient

    @mott555 said in WTF Bites:

    @Jaloopa said in WTF Bites:

    @LB_ said in WTF Bites:

    if your compiler supports SSO

    Why would a compiler support single sign on? Is it compiling in the cloud?

    Don't say that too loudly or Microsoft will make Visual Studio 2017 work that way. (while charging you for the Azure time needed to compile, of course)

    Don't they already through TFS?


  • Discourse touched me in a no-no place

    @mott555 said in WTF Bites:

    Don't say that too loudly or Microsoft will make Visual Studio 2017 work that way.

    They could let you do unoptimized compiles on your local system, and just move the optimizer into the cloud… so penalizing anyone who tries to pirate their code.



  • @dkf Hey, if it improves build times, I'm all for it. Fully optimized build (LTO in particular) means coffee break, problem is, 15+ coffees per day is a bit unhealthy.


  • area_can

    The reason why all the other options collapse into Meh is that the Notify only when apps try to change settings option can be subverted by any app simply by injecting a thread into Explorer and doing its dirty work there. Since Explorer is a program that the setting allows to elevate silently, this lets you perform a silent elevation from any thread that has thread injection rights into Explorer (which is pretty much any program running at medium integrity level or higher).

    In other words, Notify only when apps try to change settings is really Punch a hole in the airtight hatchway.

    TIL.


Log in to reply