• ZILtoid1991@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    17 hours ago

    If you thought misspelling a variable was bad, then get ready for misreading documentation of OS API, then not realize why your implementation doesn’t work for a quite a long time.

  • Backlog3231@reddthat.com
    link
    fedilink
    English
    arrow-up
    9
    ·
    23 hours ago

    Programming has its highs and lows. Yesterday I spent four hours trying to write a script that honestly probably won’t even be useful to anyone.

    Today I felt like a god because I built a recursive query to pull some ridiculously obscure data from our database.

    Tomorrow I’ll probably delete a table in prod or something.

    You win some, you lose some!

  • grudan@programming.dev
    link
    fedilink
    arrow-up
    3
    ·
    1 day ago

    I spent such a long time the other day trying to figure out why I couldn’t access an application I wrote and served on a home server from my reverse proxy. Next day I take a look at the DNS record I setup again, CNAMEd to the host server instead of the reverse proxy server. Felt dumb.

  • Clinicallydepressedpoochie@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    10 hours ago

    The older I get the more impatient I get with stupid tasks that take longer then they should. I simplify my life by focusing on the task ahead of me. Knowing these small tasks compound into the final goal.

    So when I am looking through 17 different folders for a file I can’t remember what I saved it as and I’m sorting by date and opening things frantically…

    ‘it’s been 20 fucking minutes, should I just take the rest of the day to organize my shit? But if I get this fucking thing done I can setup a meeting on this today and fit it in this week before Juan goes on vacation and I have to wait two weeks to place an order that will take 6 months to deliver.’

    ‘Fuuuuuuuuu where the fuck is this file, I’ll just start from scratch and I’ll be done by 2pm just in time for it to go on the calender so everyone can seee. Or maybe i just look another 15 minutes wheeerreeeee the fuckkkk did I save this?!?!’

    'Bullshit bullshit bullshit!"

    Google: how to find file.

    Google: how to find file just working on.

    Google: how to find excel file by date, most recent.

    Google: file not in recent, why come?

    Google: did I dream this nightmare wake me, wake me, wake me.’

    • Backlog3231@reddthat.com
      link
      fedilink
      English
      arrow-up
      5
      ·
      23 hours ago

      find -iname '*part*' has saved my butt countless times.

      find a . | grep part if you’re feeling stupid and lazy!

  • bricked@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    19
    ·
    2 days ago

    This literally happened to me yesterday, but with filenames. I was failing to configure a program until an hour later I found out that I mispelled the config file as colors.ini instead of color.ini.

    • Kissaki@programming.dev
      link
      fedilink
      English
      arrow-up
      5
      ·
      2 days ago

      I like that even here on Lemmy, with inline code format, colors.ini is not being colored but color.ini is. Great symbolism for your issue.

  • Feathercrown@lemmy.world
    link
    fedilink
    English
    arrow-up
    6
    ·
    2 days ago

    I spent like 3 hours yesterday deduplicating two functions that were hundreds of lines long and nearly identical. I should probably learn how to use that git command that can diff two files on disk. Luckily I actually enjoy cleaning up code sometimes.

    • pivot_root@lemmy.world
      link
      fedilink
      arrow-up
      11
      ·
      2 days ago

      If you’re using a decent development system, you’ll have an executable called diff installed already :)

    • orbitz@lemmy.ca
      link
      fedilink
      arrow-up
      4
      ·
      2 days ago

      Dunno what OS’s it supports besides Windows but I use Kdiff for random comparisons regularly, I think it works pretty well untill you get to much larger files (20+ MB slows down a lot). The huge file wasn’t code but needed to check output changes for those curious.

      I constantly check git comparison with previous versions to see what changed to break things in a build though. Didn’t know there was a way to diff any files in git,should probably just learn to use that one.

      • Ephera@lemmy.ml
        link
        fedilink
        arrow-up
        3
        ·
        2 days ago

        Git uses the diff binary under the hood (unless you configure it to use something else).
        You can invoke that directly with diff file_a.txt file_b.txt.

    • hayes_@sh.itjust.works
      link
      fedilink
      arrow-up
      2
      ·
      2 days ago

      git diff —no-index before.json after.json > showmethegoods.diff

      You don’t have to save it to a file but I often do.

    • egrets@lemmy.world
      link
      fedilink
      arrow-up
      4
      arrow-down
      1
      ·
      2 days ago

      VS Code’s diff tools are killer. Comparison is smarter than most, and you can edit either file as you go.

      • wizardbeard@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        4
        ·
        2 days ago

        And if you want to avoid the Microsoft stank, there’s VS Codium that has been de-Microsoft’d, like Chrome vs. Chromium.