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 question Microsoft's documentation

    question com sysadmin
    4
    0 Votes
    4 Posts
    38 Views
    G
    The documentation you cite was proofread poorly. They refer to "dir t97\*" several times rather than "dir t97.*". Software Zen: delete this;
  • How I learned to stop worrying & love The Error

    help question csharp javascript html
    3
    0 Votes
    3 Posts
    33 Views
    D
    raddevus wrote: I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs. I agree with whoever said,Programming is the act of debugging a blank page. Maybe Knuth?
  • Possibly the hottest mess I've seen in some time

    iot help announcement lounge
    11
    0 Votes
    11 Posts
    89 Views
    D
    Don't you keep working on stuff like that just for the great feeling when you finally make it work? Been there, done that, but not on that particulr board.
  • I must be doing something wrong...

    learning
    11
    0 Votes
    11 Posts
    85 Views
    B
    Amdahl's law[^] is there for a reason
  • But it feels so _diiirtyyy_!

    csharp data-structures testing beta-testing json
    11
    0 Votes
    11 Posts
    65 Views
    P
    Having the catch fire is not a failure. jschell wrote: It is not part of a multi-use library Yes, it is, of course it is. jschell wrote: deal with it before calling the method Uh, what? You can't handle characters before they've been read.
  • GDMA on the ESP32S3

    ruby performance help workspace
    5
    0 Votes
    5 Posts
    40 Views
    honey the codewitchH
    BLE is present on every ESP32 in the line, as far as I know. I'd definitely go with an S3 board, just so you're future proofing the experience you get. To err is human. Fortune favors the monsters.
  • 0 Votes
    1 Posts
    8 Views
    No one has replied
  • ChatGTP: Write me a poem about programming

    java html com game-dev ai-models
    11
    0 Votes
    11 Posts
    91 Views
    A
    One of my ultimate bands and songs!:thumbsup:
  • Span<T> equality

    csharp javascript com json performance
    3
    0 Votes
    3 Posts
    28 Views
    Richard DeemingR
    Managed to find the option to edit the page by creating a pull request on GitHub[^]. The documentation should be correctly shortly. :) "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
  • Forbidden File Names?

    help design security sales question
    26
    0 Votes
    26 Posts
    334 Views
    L
    kmoorevs wrote: Doing so incorrectly starts a web browser with the message 'Hmmm, I can't find that file...Typo?'. Mosaic is the name of a web browser from the mid 1990s. Years later Mosaic became Netscape and then later became Mozilla Firefox. It would appear that Windows still has a few VERY OLD bits of code lurking around.
  • Weird One: CPU utilization

    asp-net com data-structures performance question
    6
    0 Votes
    6 Posts
    60 Views
    R
    Hmm, if this happens a lot I would check the CPU temperature. Probably just a bug though.
  • How old am I, according to Amazon?

    hosting cloud testing beta-testing json
    6
    0 Votes
    6 Posts
    67 Views
    J
    Size: 21 x 7.5 x 2 centimetres (but blade only extends a couple of centimetres from the shaft. Stanley 99E Retractable Blade Knife 2 10 099 : Amazon.co.uk: DIY & Tools[^]
  • What the *ell Windows Explorer?

    algorithms tools question
    1
    0 Votes
    1 Posts
    10 Views
    No one has replied
  • Long filename problems in 2022?

    help question
    14
    0 Votes
    14 Posts
    149 Views
    E
    Bionic Commando??? That was a great game! I had to hack my C64 version to give myself 255 lives to beat it! Or else I found the logic that subtracted a life and changed it to NOOPs. A little fuzzy now, but I was able to finish it.
  • Classic FORTRAN

    learning announcement
    16
    0 Votes
    16 Posts
    129 Views
    L
    Some more progress: 1) the darn dollar sign $ From your response: "The first WRITE loop is the one indenting the line properly, which apparently is not valid in F77, as both our F77 compilers failed to do proper indentation. Maybe the format string could be updated to F77 standard; it just specifies two space characters to be output." So my interpretation is that WRITE(IF, '(''$ '')') simply writes two spaces, and can be replaced by write(*,*)' ' where there are two spaces between the single quotes. That makes a lot of sense. The $ sign has been used in various compilers to indicate a macro, or as a suppression of line return, so that helps a lot. It might be some compiler specific feature. 2) The compiler is not happy with the first do loop in SUBROUTINE: DO FOR RETURN = EXTERNAL, EXTERNAL - IF IMPLICIT(RETURN) = LOGICAL(RETURN) + LOGICAL(RETURN - IF) END DO The complier will not throw an error or warning (either when compiling or running), but as I see it, the first time through EXTERNAL = 0 and IF = 1, so you are doing a negative increment DO FOR RETURN = 0, -1 when I test a program with a do loop like above, there are no errors or warnings from the compiler, and the program runs, but it apparently just skips over the do loop and its contents. For example, this code write(*,*)'before do loop' do RETURN = 0, -1 write(*,*)'inside do loop' end do write(*,*)'after do loop' produces the following output: before do loop after do loop 3) The declaration of variables in the main program have IMPLICIT and LOGICAL as scalars, and then are redeclared as arrays in SUBROUTINE; there is no definition of the size of the array (should be 13). Likewise, EXTERNAL is declared as an real in the main program, and redeclared as an integer in SUBROUTINE. 4) last but not least, F66 and F77 limited variables, subroutines, functions, program names to 6 characters; how did your compiler accept the ones that are 7 or more characters long? Thanks again! Pound to fit, paint to match
  • ReactJS - Add 10,000 nodes & select options

    javascript html com data-structures regex
    9
    0 Votes
    9 Posts
    81 Views
    J
    raddevus wrote: What if I added 10,000 choices to a drop list Myself I would tag that as a bad UX design. As a back end developer who was requested to populate it I would refuse to do it without paging. Since I know that if there are 10,000 now then there are going to be 100,000 next year. And when that blows up I can't point to the UI as the problem.
  • 0 Votes
    40 Posts
    549 Views
    J
    Fred2834 wrote: I would not want a very long hash table to be described without any special character. In the real world, large XML or JSON files are a reality. I would. If i had to enter/edit the data manually, then i would want a long hash table to be described without any special character. I had to achieve exactly that with a new Javascript tool i created. I had to figure out a way to store human-editable data in html -- ie, plain text. So, no formatting, no tabular display. Here's my solution. It uses no special characters at all, no tags, and unlike XML/JSON the fieldnames aren't repeated for every record. I find this quite readable. It's optimized for low-risk editing. There are no syntax to screw up or special symbols to put in the wrong place, no punctuation to get wrong. And it's far less laborious without having to type all those tags or braces. NAME LINK DESCRIPTION Genevieve Dupre https://www.genevievetattoos.com This isn't what you expected. Joey Armstrong https://thunderhandtattoo.com The most amazing. GitHub - johnaweiss/HTML-Micro-Templating: Lightweight, robust HTML templating system.[^] Granted, this would quickly become unwieldy with a lot of fields. The solution above isn't intended for data with a ton of fields. But if i had a lot of fields, then i wouldn't be manually editing raw data in plain text format. Dude, why are you doing that? XML/JSON are best suited for machine manipulation, not human reading/editing. But this thread is about human readable languages, not machine languages. So i'm unclear how your XML/JSON contradicts my desire for human-readable code. https://github.com/johnaweiss?tab=repositories
  • https://www.assafteknolojisi.com

    com
    1
    0 Votes
    1 Posts
    8 Views
    No one has replied
  • Strange apparatus

    8
    0 Votes
    8 Posts
    68 Views
    R
    It's a cross-breed rabdog :-\
  • CMD Type command - When did this happen?

    csharp asp-net com debugging tutorial
    13
    0 Votes
    13 Posts
    97 Views
    L
    Exactly so, but my point was about what cmd does when it parses something like "foo*" on the command line itself.