As someone who spends time programming, I of course find myself in conversations with people who aren’t as familiar with it. It doesn’t happen all the time, but these discussions can lead to people coming up with some pretty wild misconceptions about what programming is and what programmers do.

  • I’m sure many of you have had similar experiences. So, I thought it would be interesting to ask.
  • lemmyvore@feddit.nl
    link
    fedilink
    English
    arrow-up
    39
    arrow-down
    1
    ·
    4 months ago

    At the same time, I find it amazing how many programmers never make the cognitive jump from the “playing with legos” mental model to “software is math”.

    They’re both useful, but to never understand the latter is a bit worrying. It’s not about using math, it’s about thinking about code and data in terms of mapping arbitrary data domains. It’s a much more powerful abstraction than the legos and enables you to do a lot more with it.

    For anybody who finds themselves in this situation I recommend an absolute classic: Defmacro’s “The nature of Lisp”. You don’t have to make it through the whole thing and you don’t have to know Lisp, hopefully it will click before the end.

      • nottelling@lemmy.world
        link
        fedilink
        English
        arrow-up
        17
        ·
        4 months ago

        Function/class/variables are bricks, you stack those bricks together and you are a programmer.

        I just hired a team to work on a bunch of Power platform stuff, and this “low/no-code” SaaS platform paradigm has made the mentality almost literal.

        • amio@kbin.social
          link
          fedilink
          arrow-up
          17
          ·
          edit-2
          4 months ago

          I think I misunderstood lemmyvore a bit, reading some criticism into the Lego metaphor that might not be there.

          To me, “playing with bricks” is exactly how I want a lot of my coding to look. It means you can design and implement the bricks, connectors and overall architecture, and end up with something that makes sense. If running with the metaphor, that ain’t bad, in a world full of random bullshit cobbled together with broken bricks, chewing gum and exposed electrical wire.

          If the whole set is wonky, or people start eating the bricks instead, I suppose there’s bigger worries.

          (Definitely agree on “low code” being one of those worries, though - turns into “please, Jesus Christ, just let me write the actual code instead” remarkably often. I’m a BizTalk survivor and I’m not even sure that was the worst.

          • Solemn@lemmy.dbzer0.com
            link
            fedilink
            English
            arrow-up
            4
            ·
            4 months ago

            My take was that they’re talking more about a script kiddy mindset?

            I love designing good software architecture, and like you said, my object diagrams should be simple and clear to implement, and work as long as they’re implemented correctly.

            But you still need knowledge of what’s going on inside those objects to design the architecture in the first place. Each of those bricks is custom made by us to suit the needs of the current project, and the way they come together needs to make sense mathematically to avoid performance pitfalls.

    • ChubakPDP11+TakeWithGrainOfSalt@programming.dev
      link
      fedilink
      arrow-up
      8
      arrow-down
      1
      ·
      4 months ago

      I think you are irresponsible towards your future if you are a gainfully employed self-taught programmer, and don’t invest in formal education. If you say ‘I don’t have time!’ well, consider this, even night classes in junior colleges teach you stuff you don’t know. Go to them, get your associates. I am in the process of getting into a contract where I do some thankless jobs for someone I know, he in exchange pays me to go to college. I am 31 – as I said in the other thread, THERE IS NOTHING WRONG WITH BEING A LATE-COLLEGER!

      I have been to college, I have studied 3 subjects for a total of 9 semesters, I have no degree to show for any of them :( I quit English lit, French lit and “Programming” all after 3 semesters. But when I was studying French lit, there was a guy in our class who was SIXTY-FIVE YEARS OLD! He wanted to learn French to open up some a commerce consulting office, focusing on import/export from France.

      What I wanted to do was to ‘write’, keep in mind, ‘write’, not ‘draw’ bande dessine! But now that I am older and hopefully wiser, I have a set goal in mind. I am going to go this ‘boutic’ college near our home to study Electronics Engineering and when push comes to shove and China makes its move, start a chipset engineering firm with a production wing.

      Just like how electronics is math with physics, programming is the virtual aspect of it. it’s ‘applied math’. I understand enough discmath because I studied enough of it both in college, and high school (since I was math/physics elective) so I have managed to understand some very rough and old papers.

      You can always self-study if you haven’t got the time. Here’s a book which is kind of a meme, but it’s still very good: https://fuuu.be/polytech/INFOF408/Introduction-To-The-Theory-Of-Computation-Michael-Sipser.pdf

      This is the 2nd edition though, 3rd is out — I think 4th is coming. The best goddamn book, regardless of its meme status.

    • Lojcs@lemm.ee
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      4 months ago

      Read that knowing nothing of lisp before and nothing clicked tbh.

      When talking about tools that simplify writing boilerplate, it only makes sense to me to call them code generatiors if they generate code for another language. Within a single language a tool that simplifies complex tasks is just a library or could be implemented as a library. I don’t see the point with programmers not utilizing ‘code generation’ due to it requiring external tools. They say that if such tools existed in the language natively:

      we could save tremendous amounts of time by creating simple bits of code that do mundane code generation for us!

      If code is to be reused you can just put it in a function, and doing that doesn’t take more effort than putting it in a code generation thingy. They preach how the xml script (and lisp I guess) lets you introduce new operators and change the syntax tree to make things easier, but don’t acknowledge that functions, operator overriding etc accomplish the same thing only with different syntax, then go on to say this:

      We can add packages, classes, methods, but we cannot extend Java to make addition of new operators possible. Yet we can do it to our heart’s content in XML - its syntax tree isn’t restricted by anything except our interpreter!

      What difference does it make that the syntax tree changes depending on your code vs the call stack changes depending on your code? Of course if you define an operator (apparently also called a function in lisp) somewhere else it’ll look better than doing each step one by one in the java example. Treating functions as keywords feels like a completely arbitrary decision. Honestly they could claim lisp has no keywords/operators and it would be more believable. If there is to be a syntax tree, the parenthesis seem to be a better choice for what changes it than the functions that just determine what happens at each step like any other function. And even going by their definition, I like having a syntax that does a limited number of things in a more visually distinct way more than a syntax does limitless things all in the same monotonous way.

      Lisp comes with a very compact set of built in functions - the necessary minimum. The rest of the language is implemented as a standard library in Lisp itself.

      Isn’t that how every programming language works? It feels unfair to raise this as an advantage against a markup language.

      Data being code and code being data sounded like it was leading to something interesting until it was revealed that functions are a seperate type and that you need to mark non-function lists with an operator for them to not get interpreted as functions. Apart from the visual similarity in how it’s written due to the syntax limitations of the language, data doesn’t seem any more code in lisp than evaluating strings in python. If the data is valid code it’ll work, otherwise it won’t.

      The only compelling part was where the same compiler for the code is used to parse incoming data and perform operations on it, but even that doesn’t feel like a game changer unless you’re forbidden from using libraries for parsing.

      Finally I’m not sure how the article relates to code being math neither. It just felt like inventing new words to call existing things and insisting that they’re different. Or maybe I just didn’t get it at all. Sorry if this was uncalled for. It’s just that I had expected more after being promised enlightenment by the article

      • didnt_readit@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        3 months ago

        This is a person that appears to actually think XML is great, so I wouldn’t expect them to have valid opinions on anything really lol