Skip to content

The Weird and The Wonderful

It was the best of code, it was the worst of code. Coding Horrors, Worst Practices, and flashes of brilliance

This category can be followed from the open social web via the handle the-weird-and-the-wonderful@forum.codeproject.com

1.8k Topics 20.7k Posts
  • I heard you like code in your code

    design csharp com graphics iot
    15
    0 Votes
    15 Posts
    113 Views
    C
    "Down, down, down. Would the fall never come to an end? 'I wonder how many miles I've fallen by this time?'" cheers Chris Maunder
  • Microsoft Regex Weirdness

    design visual-studio com graphics iot
    14
    0 Votes
    14 Posts
    71 Views
    B
    OK. That's actually pretty cool. What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???
  • How to make thing more complicated for nothing...

    devops tutorial
    29
    0 Votes
    29 Posts
    240 Views
    M
    Things get complicated when we are not able to understand them clearly. The other possible reason can be Overthinking, which exaggerates a simple situation and makes it appear worse. A person ends up imagining certain situations which in reality won't happen.
  • 0 Votes
    27 Posts
    320 Views
    1
    Can we make Templates for it? If yes that would be easy.
  • cash app customer service

    sales
    1
    0 Votes
    1 Posts
    11 Views
    No one has replied
  • The biggest little array you've ever seen.

    design csharp com graphics iot
    4
    0 Votes
    4 Posts
    35 Views
    honey the codewitchH
    It's a DFA state machine lexer for the C# language, so it's pretty expansive. Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
  • auto-usings in Visual Studio

    visual-studio csharp com performance question
    4
    0 Votes
    4 Posts
    39 Views
    E
    You were probably talking about PDF libraries with a colleague in microphone range of your phone.
  • 0 Votes
    14 Posts
    85 Views
    Graeme_GrantG
    I'm a bit late to this party.... I have learned to export my install config (VS Installer > More > Export Configuration) and export settings (VS IDE > Tools > Import and Export Settings). Especially important when working with the Preview editions. When it is time to do a major update, I tend to Repair, then apply the update. If there are any issues, I can uninstall and use the exported configuration to quickly reinstall, then Import the settings back into the IDE after updating. Flushing an install tends to have less issues after the update. Re-installing things like ReSharper and other extensions, not that I use many, doesn't take long to do. Graeme "I fear not the man who has practiced ten thousand kicks one time, but I fear the man that has practiced one kick ten thousand times!" - Bruce Lee
  • 0 Votes
    3 Posts
    28 Views
    R
    Another problem is that a MFT sensor is smaller than full-frame format (usual in traditional 35 mm camera's), so the image will be cropped and the lenses will not be used to their full potential.
  • The Day I Learned to Deal With the BOM

    css help
    7
    0 Votes
    7 Posts
    52 Views
    honey the codewitchH
    I forget the exact code, but the byte order mark is easy to check for and skip programmatically. Something like the high bit is set. (I forget the actual details) so you can just check for that, and if you see it, skip that byte and the next. If I got something wrong here, forgive me, it's half remembered from years ago, but the concept is simple enough. Check with a mask, and then skip the mark if the mask is set. Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
  • 0 Votes
    62 Posts
    1k Views
    honey the codewitchH
    While I can see the value in some corner cases perhaps, I feel like the acceptor, such as a parameter name on a method should describe what it accepts. Maybe it's just because I grew up with that, but putting the units for example, on the data type itself seems just ... unusual, and kind of awkward to me. Maybe that's not the best argument against it, but I place a lot of value on being able to lean on habits, so long as the habits aren't actually counterproductive. All else considered equal, I place more value in doing something in a way that's supported by "muscle memory" than I do on implementing something perhaps in a more formalized way, and the reason is, if you can lean into your habits, as long as you develop decent habits you get less bugs and more productivity. Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
  • E-mail validation stupidity

    18
    0 Votes
    18 Posts
    134 Views
    J
    Actually, that's not a bad thing. Yes, we treat it as case-insensitive, but the original concept had lowercase letters in mind. These days, uppercase is used as a crutch because you have a really long username or domain name, or just are an old fart. :laugh: bob@bob.com - Good bobGoesToTheMarket@bob.com - Bad P.S. They probably should just lowercase it on the backend and allow for mixed cased input though. Jeremy Falcon
  • jsfiddle nightmare: Schrodinger's lost code

    question csharp com data-structures tools
    8
    0 Votes
    8 Posts
    85 Views
    J
    JS fiddle is awesome. I use it on the regular, but if you're tinkering with server-side or isomorphic JS it's much, much safer to just run it via node directly on your machine. Even for really simple stuff, its command line interpreter will handle things perfectly. Just as long as you don't need a DOM or styles for your quick and dirty testing. Jeremy Falcon
  • Which case is the slowest?

    graphics com iot performance question
    1
    0 Votes
    1 Posts
    14 Views
    No one has replied
  • One of the worst routines I've ever written. Shame on me?

    c++ css com question
    12
    0 Votes
    12 Posts
    99 Views
    L
    honey the codewitch wrote: Because I am human, mortal, and have finite amounts of time and energy. You, mortal? Erlkönig: programmer-and-the-devil.shtml[^] Bastard Programmer from Hell :suss: "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
  • A real Mess

    graphics
    34
    0 Votes
    34 Posts
    348 Views
    C
    that's just too funny. I guess he's a bit cranky. I happen to be a bit of an armor historian buff, and the big, bad German tanks of ww2 were mostly junk. Credit to the 88 and the high velocity 75, but reliability is everything. The Tiger 2 and Panther broke down at horrendous rates. The panther's armor was spotty at best with mediocre quality of the armor plate, etc. Kelly's Heroes Tiger Tank - YouTube[^] Reliability was key. So, I appreciate the comment on the complexity of the arty pieces. I just wish some of the defense contractors in the US would learn. Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.
  • Microsoft IIS FTP docs

    workspace csharp asp-net com windows-admin
    2
    0 Votes
    2 Posts
    29 Views
    honey the codewitchH
    I thought FTP died. Wasn't there a memorial service for it in the mid aughts? :-D *hides* Check out my IoT graphics library here: https://honeythecodewitch.com/gfx
  • 0 Votes
    1 Posts
    6 Views
    No one has replied
  • ASP.Net webforms and disabled controls

    csharp css asp-net database visual-studio
    3
    0 Votes
    3 Posts
    22 Views
    H
    You should add it as a tip In Word you can only store 2 bytes. That is why I use Writer.
  • ChatGPT "solves" a riddle for me.

    question
    11
    0 Votes
    11 Posts
    124 Views
    A
    May confuse it further by asking: "If each of the cats gives birth to alternately 2 and 3 kitten simultaneously, then how many (cats + kittens) will be in the room". Alternately means that if one cat gives birth to 2 kitten, its neighbouring cat gives birth to 3 kitten, and vice versa. Maybe ChatGPT needs this clarification also.