• Artyom@lemm.ee
    link
    fedilink
    arrow-up
    44
    ·
    27 days ago

    I just inherited a Python repo where every hundred lines or so, they added a ^L. What is a ^L? you ask. And I say that’s an excellent question. You see, a ^L is an ASCII standard for saying that if you print the plain text, you should split the content onto a new page here. That’s right, for years, a team of people strictly enforced that they consistently add ^Ls everywhere in case someone wanted to print the entire fucking repo onto paper.

    It’s an invisible character, it took me quite a while to figure out what it even was.

    • jxk@sh.itjust.works
      link
      fedilink
      arrow-up
      25
      arrow-down
      1
      ·
      27 days ago

      If ^L is invisible in your editor, you’re using a bad editor.

      Not saying page feeds are useful, but you can’t complain that you don’t see them.

  • palordrolap@fedia.io
    link
    fedilink
    arrow-up
    21
    arrow-down
    1
    ·
    27 days ago

    Urge to analyse… rising…

    My first guess would be to take out that semicolon on line 264. JavaScript will often happily take a new line as end of statement if it makes sense to do that, so in theory, that semicolon is not needed. And it might be a Greek question mark your prankster colleague put in your code when you weren’t looking.

    And then I’d be tracing parentheses, curlies, quotes and so on, because that error could be the point the parser gave up trying to make sense of the code rather than where the error actually is.

    And if that didn’t find it, I’d put in a deliberate error at an earlier, known line to see where the parser thinks that error is. If it’s offset by 20 lines, then I know the original error is probably offset by a similar amount.

  • marcos@lemmy.world
    link
    fedilink
    arrow-up
    19
    ·
    27 days ago

    Yeah, fixed something like this yesterday.

    Turns out the Oracle database can’t count lines. But that’ not really news.

      • marcos@lemmy.world
        link
        fedilink
        arrow-up
        11
        ·
        edit-2
        27 days ago

        Yes. Yes, it is.

        Good thing I can’t sign my rights away that easily in my country.

        I think I can even compare it with Postgres and tell people Postgres is faster! Well, not in every single case, but Oracle is beaten by almost every DB in almost every case.

  • Im_old@lemmy.world
    link
    fedilink
    arrow-up
    9
    ·
    27 days ago

    Fun fact (not really), when docker-compose throws an error on a yaml file it tells on which line the error is. The problem is that it ignores any commented out line, so you end up guesstimating on which line the error is

  • NigelFrobisher@aussie.zone
    link
    fedilink
    arrow-up
    1
    ·
    25 days ago

    My favourite of this is when the line number is the first line of a massive multi-line statement with object initialisers and chained lambdas.

  • mac@lemm.ee
    link
    fedilink
    arrow-up
    5
    arrow-down
    5
    ·
    27 days ago

    Man this account consistently reposts hot posts from the Lemmy.world programmer_humor. Starting to get very repetitive and annoying

    • cm0002@lemmy.worldOP
      link
      fedilink
      arrow-up
      13
      arrow-down
      1
      ·
      27 days ago

      False, that appears to be hiddenlayer posting to all 3 major programmer humors

      I only do .ml to here as part of a small ongoing effort to direct content away from a tankie instance to other instances. I don’t even crosspost based on how “hot” they are, just whenever I see them.

      I didn’t even know there was a .world programmer humor, why did they use the exact same .ml version logo lmao

        • cm0002@lemmy.worldOP
          link
          fedilink
          arrow-up
          6
          ·
          27 days ago

          Yes. Like I said, I crosspost em when I see em, not based on how popular I think it’ll be.

          In this case I saw it an hour after posting, but there are plenty that I’ve done that are just minutes apart