Incase it doesn’t show up:

  • Treczoks@lemmy.world
    link
    fedilink
    arrow-up
    27
    arrow-down
    4
    ·
    2 months ago

    After you’ve done some languages, they all look the same. Yes, some have interesting features like the indent-based blocking of Python, and I’ll have to look up if the new language has “else if”, “elsif”, “elif”, or whatever, but als long as it is coming from the family of ALGOL-like languages, it does not matter much. You’ll learn the basic functions needed to get around, and off you go.

    Just a few weeks ago, I started learning Python. Yes, this indenting takes some time to get used to. My son does Python for about a year now - he started with it at university. Maybe ten days after I started learning, I invited him to have a look at my first Python program. I have no idea what he expected. A “Hello, World” with a few extra features, maybe? Definitely not the 2.5k lines app I had written in my spare time, with GUI, databases, harvesting data from a web site with caching, and creating PDF files with optimized layout for the data I processed. In the end, it was just another programming language.

    • xthexder@l.sw0.com
      link
      fedilink
      arrow-up
      16
      ·
      2 months ago

      I guess you’ve never seen some of the 10-page template errors C++ compilers will generate. I don’t think anything prepares you for that.

      • Treczoks@lemmy.world
        link
        fedilink
        arrow-up
        6
        arrow-down
        1
        ·
        2 months ago

        I’ve seen way worse. Imagine a project that uses C preprocessor structures to make a C-compiler provide a kind-of C++. Macros that are pages long, and if you forget a single bracket anywhere, your ten pages look like a romance novel.

        Or VHDL synthesis messages. You’ve got no real control over them, 99.9% of the warnings are completely irrelevant, but one line in a 50k lines output could hint at a problem - if you only found it.

        So far, the output of C or C++ compilers (except for the above-mentioned project) has not been a problem or me, but I’m doing this for about 40 years now, so I’ve got a bit of experience.

        • xthexder@l.sw0.com
          link
          fedilink
          arrow-up
          6
          ·
          2 months ago

          Yep, sadly I’ve been exposed to a few such codebases before. I certainly learned a lot about how NOT to design a project.

          You’ve been at it longer than I have, but I’ve already had coworkers look at me like I’m a wizard for decoding their error message. You do get a feel for where the important parts of the error actually are over time. So much scrolling though…

          • Treczoks@lemmy.world
            link
            fedilink
            arrow-up
            2
            ·
            2 months ago

            Yes, I have my share of coworkers asking me when they run into problems, too. They even ask me when they have Windows problems. And I don’t do Windows - I do Linux and embedded systems.

      • Fushuan [he/him]@lemm.ee
        link
        fedilink
        English
        arrow-up
        2
        arrow-down
        1
        ·
        edit-2
        2 months ago

        I’ve not had those while working with concurrent programs with c++ for over a year. Pointers, QT programming, non-qt backend programming, coding an engine to work with computer vision runners (openvino mostly), image management (more pointers)… Idk, this is gonna sound rude but just code better? Most of my errors were segfaults, I have had to plug the debugger and/or tons of prints and I made it work.

        If you want to see giant error logs, check pyspark errors. But even those have the relevant line of info and then all the rest of the garbage info that no one really needs, like any other language.

        • xthexder@l.sw0.com
          link
          fedilink
          arrow-up
          3
          ·
          2 months ago

          It really depends what you’re doing. The last big project I did with C++ templates was using them to make a lot of compile-time guarantees about concurrency locks so they don’t need to be checked at runtime (thus trading my development time for faster performance). I was able to hide the majority of the templates from users of the library, and spent extra time writing custom static_assert messages.

          C++ templates are in fact a compile-time turing complete language, as crazy as that sounds.

    • explodicle@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      4
      arrow-down
      1
      ·
      2 months ago

      I didn’t even know about the Python indentation thing until I was practically done learning it! I’m just used to copying whatever indentation scheme my coworkers are using, for consistency.

    • MonkderVierte@lemmy.ml
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      2 months ago

      Definitely not the 2.5k lines app

      MVC can be a great experience, especially with python dictionaries.

      • Treczoks@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        2 months ago

        Learning how to get models and views together took some time, but after the second refactoring that week I managed to have neat objects for each MVC with clean interfaces. My biggest source in the app defines a requester with three columns of lists: a global category, then parts from that category, and finally the available colors for that part. Each of those views is an object, their interacting logic is an object, and finally the actual requester is an object, and this makes thing easy to handle.