• Rhllor@feddit.de
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    Actually had a colleague who determined distances on microscopy images that way. She would measure the scale bar included in the image with her ruler on the screen, measure the distance she was interested in and calculate the distance using the rule of three. I mean, why bother using the measuring tool included in the software.

    • sznio@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      I’ve heard of people printing out charts, then cutting out the part they wanted to calculate an integral of, then weighing the paper.

      • siipale@sopuli.xyz
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        I’ve heard of it too. You would need an analytical balance to get accurate measurements weighing a piece of paper. Just cut out the part you want to take an integral of, then cut out a piece of paper with known size (or cut several pieces with different sizes to get more accurate results) and weigh each of them. I guess this used to be cheaper and faster than using computers when computers were big and expensive.

  • pamymaf@kbin.run
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    @alphacyberranger@sh.itjust.works This is why I have my VSCodium set to highlight all indentation levels in my settings.json

    To see the editor indent guides, set “editor.guides.indentation”: true and “editor.guides.highlightActiveIndentation”: true.

    editorIndentGuide.background: Color of the editor indentation guides. editorIndentGuide.activeBackground: Color of the active editor indentation guide.

    https://code.visualstudio.com/api/references/theme-color

    • CoderKat@lemm.ee
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      Ugh, there’s some parts of YAML I love, but ultimately it’s a terrible format. It’s just too easy to confuse people. At least it has comments though. It’s so dumb that JSON doesn’t officially have comments. I’ve often parsed “JSON” as YAML entirely for comments, without using a single other YAML feature.

      YAML also supports not quoting your strings. Seems great at first, but it gets weird of you want a string that looks like a different type. IIRC, there’s even a major version difference in the handling of this case! I can’t remember the details, but I once had a bug happen because of this.

      Performance wise, both YAML and JSON suck. They’re fine for a config file that you just read on startup, but if you’re doing a ton of processing, it will quickly show the performance hit. Binary formats work far better (for a generic one, protobuffers has good tooling and library support while being blazing fast).

      • sonnenzeit@feddit.de
        link
        fedilink
        arrow-up
        0
        ·
        1 year ago

        It’s so dumb that JSON doesn’t officially have comments.

        So much this.

        Used to work at a company where I sometimes had to manually edit the configuration of devices which were written and read in JSON. Super inconvenient if you have to document all changes externally. As a “hack” I would sometimes add extra objects to store strings (the comments). But that’s super dicey as you don’t know if it somehow breaks the parsing. You’re also not guaranteed the order of objects so if the configuration gets read, edited and rewritten your comment might no longer be above/below the change you made.

        Always found it baffling that such a basic feature is missing from a spec that is supposed to cover a broad range of use cases.

      • notabot@lemm.ee
        link
        fedilink
        arrow-up
        0
        ·
        1 year ago

        Not the previous commenter, but using indentation as syntax rather than an aid to understanding tge program structure is just painful when you come from any more conventionally structured language. The meme above may be an exaggeration, but it’s not much of one. An IDE can probably help, but needing one just to be able to more easily read the code is excessive.

        That said, it’s a popular language and there are plenty of useful libraries, so sometimes the trade off is worth it.

        • mexicancartel@lemmy.dbzer0.com
          link
          fedilink
          English
          arrow-up
          0
          ·
          1 year ago

          I even coded my first few python programs in nano text editor without any annoying indentation issues. I use TABs btw. Problems usually happen when people mix tabs with spaces

          • notabot@lemm.ee
            link
            fedilink
            arrow-up
            0
            ·
            1 year ago

            Ah, now we stray into ‘holy war’ teritory. I’d agree with you should use tabs, but the language style guide says 4 spaces per level. As you saym don’t try to mix them.

            • garden_boi@feddit.de
              link
              fedilink
              arrow-up
              0
              ·
              1 year ago

              Most projects nowadays use auto formatting tools for convenience. Any python auto formatting tool will automatically convert tabs to spaces. Tabs are a no no in python, as their rendering might depend on the settings of the IDE. Spaces are nice and constant.