Programming Confessions Thread



  • What is this... "snow" you all speak about?

    This sounds horrible.

    Is that crazy stuff that falls from the sky when it drops below 75F or something? I'm so glad I put my sweater and thick pants on in January when it gets to around 75F.

    Burrrrrr

    No swimming at the beach for me in January.



  • @lordofduct said in Programming Confessions Thread:

    What is this... "snow" you all speak about?

    This sounds horrible.

    Is that crazy stuff that falls from the sky when it drops below 75F or something? I'm so glad I put my sweater and thick pants on in January when it gets to around 75F.

    Burrrrrr

    No swimming at the beach for me in January.

    Thick pants at 75F? :wtf: I don't put away my sandals until it is consistently below 50F.

    0_1469712994111_upload-ff3eda2f-6569-462a-b507-4c0ba7615c11 Southerners are real wusses



  • @Karla

    This is what I find hilarious about where I live here in South Florida. The temperature seldom if ever dips below 75, or goes above 89. I'm serious, 90's is weird even in the summer. Mid 90's happens, upper 60's happens, but not often. 100's haven't occurred here in half a century.

    BUT

    Those temperatures FEEL vastly different from what the thermometer says. 90F in can feel like 110F, it's like a wall of fuck you as you walk out the door. Even the cold is weird as all hell... oh no, the COLD week of January is in full swing, it drops to 68 at NIGHT... and I put on all my warmest clothes.

    But then I'll visit my family back in New England, and it'll be 30F outside, and I'm out in a t-shirt and jeans, even down at 5F I'll run out to the car barefoot and in my nighty. Sure, it's noticibly cold... but it's not that bad.

    But 60's F on a breezy January night in West Palm... I'm shivering, huddling with my buddies, clammering to sip from my cocktail, wondering why the fuck any of us thought we should go to the club when its the fucking tundra outside.



  • @lordofduct Not dropping below 75° F sounds awful to me. My ideal temperature somewhere between 58° F and 65° F, I think I'd die of a heat stroke.



  • @Lathun

    Central Air

    Florida living isn't possible without it.


  • Trolleybus Mechanic

    @lordofduct Part of that may be because in the 60's or low 70's there's still quite a bit of moisture in the air. At 5, the air is pretty dry. I think it's also why in MN in April and October when it's rainy and dreary in the 50's it's more miserable than just the temperature and getting wet. The air's thick too.



  • @lordofduct said in Programming Confessions Thread:

    Florida living isn't possible

    Correct.



  • @lordofduct said in Programming Confessions Thread:

    No swimming at the beach for me in January.

    In January, when you see people in swimsuit on Florida's beach, you know they are from Montreal 😜



  • @mikehurley said in Programming Confessions Thread:

    @lordofduct Part of that may be because in the 60's or low 70's there's still quite a bit of moisture in the air. At 5, the air is pretty dry. I think it's also why in MN in April and October when it's rainy and dreary in the 50's it's more miserable than just the temperature and getting wet. The air's thick too.

    Yes, actually that's exactly why it is.


  • Discourse touched me in a no-no place

    @lordofduct FWIW, the UK is usually nearly as humid as Florida (being surrounded by ocean has an effect), but it's quite a bit cooler. I'm really happy that my office as AC; it's usually set to dry the place out…



  • I'm still waiting for someone to notice the anomaly in my earlier 'list of the coldest months in the SF Bay area'. I dunno, maybe folks have heard Mark Twain's joke about that and so aren't surprised?

    Snopes' reference

    Filed Under: In the words of Lao Tse, attributing a statement to someone famous always makes it sound more convincing. Or was that George Carlin? No, wait, it was Shakespeare!



  • @dkf - yeah, I've heard y'all don't really have central AC there despite the humidity. Which honestly, that's what AC is all about, IMO. I can do heat, humidity is for the birds.

    I moved to LA once, and everyone was complaining about the heat one day because it was 98F, I just sauntered down the sidewalk in a long sleeve shirt amazed by how beautiful it was outside.

    If it just weren't for the smog and shitty artificial people in LA, I would have stayed.


  • Impossible Mission - B

    @lordofduct They have androids in LA?


  • ♿ (Parody)

    @JBert said in Programming Confessions Thread:

    Have you ever tried CTRL-TAB in Visual Studio? It uses the same MRU behavior.

    I loathe editors that use tabs above the editor for this. Just give me a list or a tree along the side. Much better use of real estate and more predictable behavior means orders of magnitude improvement in UX. Unless you only ever have a couple of files open at a time.



  • @masonwheeler said in Programming Confessions Thread:

    @lordofduct They have androids in LA?

    <obSmugSanFranciscanSouthlandBashing> Do they have anything else? </obSmugSanFranciscanSouthlandBashing>

  • Fake News

    @boomzilla said in Programming Confessions Thread:

    @JBert said in Programming Confessions Thread:

    Have you ever tried CTRL-TAB in Visual Studio? It uses the same MRU behavior.

    I loathe editors that use tabs above the editor for this.

    You mean tabs showing the MRU order and continuously being reshuffled? Please add a trigger warning next time, I'll have nightmares the next week because Eclipse used to do this.

    Just give me a list or a tree along the side. Much better use of real estate and more predictable behavior means orders of magnitude improvement in UX. Unless you only ever have a couple of files open at a time.

    Are you talking about a list which is ordered by "newest-opened-as-last" or do you envision some continuously-updated structure of which files you have been in most recently?

    Meh, it's bearable for me if the tabs are in order of oldest-first and when the CTRL-TAB switcher is similar to an ALT-TAB switcher in that it will hide as soon as you release those keys.


  • ♿ (Parody)

    @JBert said in Programming Confessions Thread:

    Are you talking about a list which is ordered by "newest-opened-as-last" or do you envision some continuously-updated structure of which files you have been in most recently?

    I like alphabetically, but I could see how that might be useful. But the point is that you can get more information in front of the user. I also like having it in directory tree format, so I can hide stuff if I want to.


  • Notification Spam Recipient

    @JBert said in Programming Confessions Thread:

    @Tsaukpaetra said in Programming Confessions Thread:

    @JBert said in Programming Confessions Thread:

    @masonwheeler said in Programming Confessions Thread:

    @lordofduct said in Programming Confessions Thread:
    Gah!

    [Notepad++] belongs in the Hall of Fame for programs that look like they should be really useful but turn out to be worthless because they get all the details wrong.

    For example, the tabs. It has a multi-tab interface, but CTRL-TAB works based on most recent use rather than anything intuitive or predictable such as the actual order the tabs are in, (as you would expect as every multitab program ever does it that way,) and CTRL-F4, the universal hotkey to close a tab, does not close tabs.

    And that's just scratching the surface. For the life of me I cannot understand how a program so full of screwups and bad design got so popular!

    Have you ever tried CTRL-TAB in Visual Studio? It uses the same MRU behavior.

    BTW: The default "Next tab" shortcut appears to be CTRL-PageUp.

    Thank you thank you thank you!

    Ehr... You are welcome?
    Did you have a special TIL moment?

    Yes! Though I hesitate to call it "learned" because my data retention rate is abysmal...


  • Garbage Person

    There was the time I authored a novel class of security vulnerability.

    One day I see a reference to a paper. The paper goes something like:

    In this paper we describe a novel class of security vulnerability, which we call [NAME]. For example, in [PROGRAM I WROTE] there is the code [CODE I WROTE]. The attacker sends [INPUT], the code does [CRASH, BOOM, BANG] and [GAME OVER]. [BLAH, BLAH, BLAH, IN CONCLUSION, BLAH].

    And I'm like "huh."


  • Notification Spam Recipient

    @Greybeard said in Programming Confessions Thread:

    There was the time I authored a novel class of security vulnerability.

    One day I see a reference to a paper. The paper goes something like:

    In this paper we describe a novel class of security vulnerability, which we call [NAME]. For example, in [PROGRAM I WROTE] there is the code [CODE I WROTE]. The attacker sends [INPUT], the code does [CRASH, BOOM, BANG] and [GAME OVER]. [BLAH, BLAH, BLAH, IN CONCLUSION, BLAH].

    And I'm like "huh."

    You're practically Internet Famous now!


  • Notification Spam Recipient

    @Tsaukpaetra said in Programming Confessions Thread:

    @JBert said in Programming Confessions Thread:

    @Tsaukpaetra said in Programming Confessions Thread:

    @JBert said in Programming Confessions Thread:

    @masonwheeler said in Programming Confessions Thread:

    @lordofduct said in Programming Confessions Thread:
    Gah!

    [Notepad++] belongs in the Hall of Fame for programs that look like they should be really useful but turn out to be worthless because they get all the details wrong.

    For example, the tabs. It has a multi-tab interface, but CTRL-TAB works based on most recent use rather than anything intuitive or predictable such as the actual order the tabs are in, (as you would expect as every multitab program ever does it that way,) and CTRL-F4, the universal hotkey to close a tab, does not close tabs.

    And that's just scratching the surface. For the life of me I cannot understand how a program so full of screwups and bad design got so popular!

    Have you ever tried CTRL-TAB in Visual Studio? It uses the same MRU behavior.

    BTW: The default "Next tab" shortcut appears to be CTRL-PageUp.

    Thank you thank you thank you!

    Ehr... You are welcome?
    Did you have a special TIL moment?

    Yes! Though I hesitate to call it "learned" because my data retention rate is abysmal...

    Oh dear, I have indeed forgotten this.... 🦌


  • Garbage Person

    @Tsaukpaetra said in Programming Confessions Thread:

    practically Internet Famous

    I coined a term in the Jargon File. Does that count?


  • Fake News

    @Erufael said in Programming Confessions Thread:

    Why is it wherever I go I find people who live or lived an hour from me??

    Because Rochester has no fucking job base anymore, due to Kodak, Xerox and B&L being destroyed by Ivy Leaguers over the past couple of decades, so if you want any chance at a high-paying job with long-term prospects, you GTFO. As one who grew up in Rochester and whose grandfather worked at Kodak Park for thirty-plus years, I say all of the above with complete confidence.



  • @lolwhat said in Programming Confessions Thread:

    @Erufael said in Programming Confessions Thread:

    Why is it wherever I go I find people who live or lived an hour from me??

    Because Rochester has no fucking job base anymore, due to Kodak, Xerox and B&L being destroyed by Ivy Leaguers over the past couple of decades, so if you want any chance at a high-paying job with long-term prospects, you GTFO. As one who grew up in Rochester and whose grandfather worked at Kodak Park for thirty-plus years, I say all of the above with complete confidence.

    I grew up in the city and my grandfather retired from Kodak (also died of mesothelioma--this is just one fact that helped me not be on the jury for Sheldon Silver here in NYC).

    Interestingly, I always considered us middle class. I've recently friended people from the neighborhood on FB who referred to growing up in the 'hood.

    I had a tough time when my parents moved to one of the suburbs when I was going into 7th grade. I did not fit in at all.



  • @lolwhat said in Programming Confessions Thread:

    Rochester has no fucking job base anymore, due to Kodak, Xerox and B&L being destroyed by Ivy Leaguerstheir core businesses becoming obsolete and the old farts in charge having no clue how to change their business models

    FTFY.


  • Fake News

    @ScholRLEA

    Rochester has no fucking job base anymore, due to Kodak, Xerox and B&L being destroyed by Ivy Leaguerstheir core businesses becoming obsolete and the old farts MBAs in charge (e.g., Antonio Perez) having no clue how to change their business modelsasset-stripping the companies to the bone

    FTFTFYFY.



  • @lolwhat That was the decay after death, not the cause. Those companies were in trouble for a long time before the vultures appeared; hell, Xerox saw the end of thir dominance in the copier market coming in the 1960s, which is why they established PARC, but then the management didn't take their own warnings seriously because the PARCies we talking about eliminating the copiers altogether rather than making them the centerpiece of the 'office of the future'.

    Kodak knew that digital cameras were coming in the 1980s - because they invented them. They were so concerned with holding back time rather than fixing their business model that the company was finished long before they went under.

    As for B&L, they seem to have taken the failure of delivery companies like WebVan as proof that the brick-and-mortar retailers who were their main customers were unassailable, and spent a decade pretending Amazon didn't exist.


  • Discourse touched me in a no-no place

    @Karla said in Programming Confessions Thread:

    middle class

    I find it fascinating how that term means such different things in the US and in the UK.


  • ♿ (Parody)

    In a C++ header:

    class foo {
        public:
            ....
            public std::vector<std::string> &getBar();
        protected:
    ....
    

    And the resulting error:

     error: expected `:' before ‘std’
    

    :wtf:

    Half hour later, I notice that extra public there and remember that I'm not writing java. :facepalm:



  • I set out to work on one of our utility programs, in order to fix a bug that I clumsily introduced a while back...

    I write COBOL stored in an SCLM repository on the host. I won't bore you with many details, but in SCLM, you check out programs to development projects...nothing at all like GIT. To minimize merge problems, SCLM prevents you from unknowingly checking out a program to multiple projects, which it reports as an error on check-out.

    So I went to check out the utility program and (Crap!) it's already checked out to another project. Who the hell did that? A quick peek and...I did, about 4 years ago. Sigh. I overrode and got the program checked out to my target project.

    Fixed the bug...

    Tested the fix...

    Then decided it would be useful to merge in the--no doubt fully tested :rolleyes: --changes in the other project. Which was the worst development decision I've made in at least a year.

    Not only was the code in that other project not tested, I swear I must have been on something at the time. Because that was the buggiest effing piece of code I've produced in years. It has to have averaged at least one bug in every five lines of code; I've fixed at least a dozen bugs so far. WTH was I thinking when I wrote that crap? WTH was I thinking when I decided to merge it now?


  • Notification Spam Recipient

    @CoyneTheDup said in Programming Confessions Thread:

    WTH was I thinking when I decided to merge it now?

    I just need to clean out my checkouts, but I don't want to lose potential code and don't want to stash the changes.... what to do....

    ???



  • @Tsaukpaetra said in Programming Confessions Thread:

    @CoyneTheDup said in Programming Confessions Thread:

    WTH was I thinking when I decided to merge it now?

    I just need to clean out my checkouts, but I don't want to lose potential code and don't want to stash the changes.... what to do....

    ???

    That would be about right. I wanted to conserve all the work in the other project. But I swear, if I'd known the state I left it in, I'd have burned it down so fast...🔥



  • When there's nobody else watching, I don't really have a "5 second rule". It's actually more like a "does it not look like there's anything sticking to it that I can't easily brush off?" rule...



  • @anotherusername said in Programming Confessions Thread:

    When there's nobody else watching, I don't really have a "5 second rule". It's actually more like a "does it not look like there's anything sticking to it that I can't easily brush off?" rule...

    E_PROGRAMMING_CONFESSION_NOT_FOUND

    But yeah, I kind of resemble that remark.



  • @Karla yes, well, I remembered it being the "Programmer confessions thread", and I'd already gone to all the trouble of searching for it by the time that I saw that wasn't quite right.

    Plus, it's @blakeyrat's thread, and I know how he hates it when his topics drift. 🍹


  • ♿ (Parody)

    @Karla said in Programming Confessions Thread:

    @anotherusername said in Programming Confessions Thread:

    When there's nobody else watching, I don't really have a "5 second rule". It's actually more like a "does it not look like there's anything sticking to it that I can't easily brush off?" rule...

    E_PROGRAMMING_CONFESSION_NOT_FOUND

    But yeah, I kind of resemble that remark.

    It sounds a lot like, "It compiles. Ship it!"


  • BINNED

    @boomzilla
    Just pick the right language to solve that issue ...


  • Impossible Mission - B

    Confession #1: When the language I was building my game engine in didn't have features I needed, I wrote a transpiler to convert everything to a new language. It worked surprisingly well, but for some reason while loops are completely broken: it places everything until the end of the method within the while loop body! I've never found what's causing that bug.

    Confession #2: When the new language didn't have a feature I needed (async/await), I grabbed Microsoft's C# implementation from the Roslyn sources and spent about half a year rewriting the compiler to add it in and make it all work.


  • Winner of the 2016 Presidential Election

    @masonwheeler said in Programming Confessions Thread:

    Confession #1: When the language I was building my game engine in didn't have features I needed, I wrote a transpiler to convert everything to a new language. It worked surprisingly well, but for some reason while loops are completely broken: it places everything until the end of the method within the while loop body! I've never found what's causing that bug.

    Confession #2: When the new language didn't have a feature I needed (async/await), I grabbed Microsoft's C# implementation from the Roslyn sources and spent about half a year rewriting the compiler to add it in and make it all work.

    I don't think this was meant to be the thread about showing off.



  • @Dreikin said in Programming Confessions Thread:

    @masonwheeler said in Programming Confessions Thread:

    Confession #1: When the language I was building my game engine in didn't have features I needed, I wrote a transpiler to convert everything to a new language. It worked surprisingly well, but for some reason while loops are completely broken: it places everything until the end of the method within the while loop body! I've never found what's causing that bug.

    Confession #2: When the new language didn't have a feature I needed (async/await), I grabbed Microsoft's C# implementation from the Roslyn sources and spent about half a year rewriting the compiler to add it in and make it all work.

    I don't think this was meant to be thread about showing off.

    I know, right!!

    I'm like, his confession makes me feel like a complete slacker.


  • FoxDev

    @masonwheeler said in Programming Confessions Thread:

    Confession #2: When the new language didn't have a feature I needed (async/await), I grabbed Microsoft's C# implementation from the Roslyn sources and spent about half a year rewriting the compiler to add it in and make it all work.

    Confession: In that situation, I'd just switch to C#.


  • ♿ (Parody)

    @Karla said in Programming Confessions Thread:

    I'm like, his confession makes me feel like a complete slacker.

    0_1497040693638_a4f28a17-bde4-472e-b122-a41b02a76ca3-image.png


  • Winner of the 2016 Presidential Election

    @boomzilla said in Programming Confessions Thread:

    @Karla said in Programming Confessions Thread:

    I'm like, his confession makes me feel like a complete slacker.

    0_1497040693638_a4f28a17-bde4-472e-b122-a41b02a76ca3-image.png

    You're a mod, we already know you're a slacker!



  • Not very long ago, I had a custom validation to add to our company's system (Java webapp) for one of our clients, but the hook that was available for the code is called from three different places in the base system, and each responds differently to the results of the validation. I don't have access to the places where it's called, so in order to figure out where the validation was being called from, I created an exception (but didn't throw it) in order to get the stack trace, and then looked through it to see which class and method had called the custom validator. With that information, I was able to show an error message, throw an exception, or show a message and throw an empty exception, as appropriate for each of the three callers.


  • kills Dumbledore

    @djls45 wow, that breaks all sorts of encapsulation. What happens if the calling code is refactored or somewhere else starts calling this?


  • Discourse touched me in a no-no place

    @djls45 said in Programming Confessions Thread:

    each responds differently to the results of the validation

    http://i.imgur.com/iUGDK.png



  • I like Forth.

    Just thought I'd get that one off my chest.



  • @Jaloopa said in Programming Confessions Thread:

    @djls45 wow, that breaks all sorts of encapsulation. What happens if the calling code is refactored or somewhere else starts calling this?

    The reviewing programmer for this project and I decided that this should be acceptable (and later received confirmation from both management and the product dev team lead when we discussed this at our weekly code review meeting) because the customization code (what I worked on) is on a much faster development timeline than the base code (each have different teams), because each client has their own instance of the base system that is rarely updated, and because if they do get upgraded to a new version of the system, refactoring the customizations is scheduled as part of the upgrade process.



  • @masonwheeler that sounds suspiciously like the history of JavaScript...



  • I wrote this code:

        static bool inited_fake_ticks = false;
        if (!inited_fake_ticks)
        {
            DWORD(*target)(void) = GetTickCount;
            int32_t jump_offset((char*)Fake_GetTickCount - (char*)target - 4 - 1);
            DWORD oldProtect;
            BOOL res = VirtualProtect((char*)target, 6, PAGE_EXECUTE_READWRITE, &oldProtect);
            *(char*)target = 0xE9;
            *((char*)target + 0 + 1) = *((char*)&jump_offset + 0);
            *((char*)target + 1 + 1) = *((char*)&jump_offset + 1);
            *((char*)target + 2 + 1) = *((char*)&jump_offset + 2);
            *((char*)target + 3 + 1) = *((char*)&jump_offset + 3);
            *((char*)target + 4 + 1) = 0x90;
            inited_fake_ticks = true;
        }
    

    Now I'm going to go to bed while it runs. Hopefully, modifying Kernel32.dll at runtime won't break anything.


Log in to reply