• Crisps@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    2 years ago

    Dynamically typed languages don’t scale. Large project bases become hard to maintain, read and refactor.

    Basic type errors which should be found in compilation become runtime errors or unexpected behavior.

  • onlinepersona@programming.dev
    link
    fedilink
    English
    arrow-up
    0
    ·
    2 years ago

    Composition over inheritance has become a meme that people repeat without understanding. Both have their uses, but if composition is all you use, then you’re using a hammer on everything. There is no silver bullet in life and most undeniably not in programming.

    Also, electron has a reason for existing. If it didn’t have a use, it wouldn’t have the number of users it has. You can’t tell me in all seriousness that Qt, Gtk, Swing, Tkinter is easier to use than electron for the common developer.

  • argv_minus_one@beehaw.org
    link
    fedilink
    arrow-up
    0
    ·
    2 years ago

    Dynamic typing is insane. You have to keep track of the type of absolutely everything, in your head. It’s like the assembly of type systems, except it makes your program slower instead of faster.

    • uniqueid198x@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      0
      ·
      2 years ago

      You can do typing through the compiler at build time, or you can do typing with guard statements at run time. You always end up doing typing tho

    • Cratermaker@discuss.tchncs.de
      link
      fedilink
      arrow-up
      0
      ·
      2 years ago

      Nothing like trying to make sense of code you come across and all the function parameters have unhelpful names, are not primitive types, and have no type information whatsoever. Then you get to crawl through the entire thing to make sense of it.

  • fubo@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    2 years ago

    Until you know a few very different languages, you don’t know what a good language is, so just relax on having opinions about which languages are better. You don’t need those opinions. They just get in your way.

    Don’t even worry about what your first language is. The CS snobs used to say BASIC causes brain damage and that us '80s microcomputer kids were permanently ruined … but that was wrong. JavaScript is fine, C# is fine … as long as you don’t stop there.

    (One of my first programming languages after BASIC was ZZT-OOP, the scripting language for Tim Sweeney’s first published game, back when Epic Games was called Potomac Computer Systems. It doesn’t have numbers. If you want to count something, you can move objects around on the game board to count it. If ZZT-OOP doesn’t cause brain damage, no language will.)


    Please don’t say the new language you’re being asked to learn is “unintuitive”. That’s just a rude word for “not yet familiar to me”. So what if the first language you used required curly braces, and the next one you learn doesn’t? So what if type inference means that you don’t have to write int on your ints? You’ll get used to it.

    You learned how to use curly braces, and you’ll learn how to use something else too. You’re smart. You can cope with indentation rules or significant capitalization or funny punctuation. The idea that some features are “unintuitive” rather than merely temporarily unfamiliar is just getting in your way.

    • FlumPHP@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      2 years ago

      Please don’t say the new language you’re being asked to learn is “unintuitive”. That’s just a rude word for “not yet familiar to me”.

      Yeah. I’ve written in six or so different languages and am using Go now for the first time. Even then, I’m trying to be optimistic and acknowledge things are just different or annoying for me. It doesn’t mean anything is wrong with the language.

    • Walnut356@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      2 years ago

      Please don’t say the new language you’re being asked to learn is “unintuitive”. That’s just a rude word for “not yet familiar to me”…The idea that some features are “unintuitive” rather than merely temporarily unfamiliar is just getting in your way.

      Well i mean… that’s kinda what “unintuitive” means. Intuitive, i.e. natural/obvious/without effort. Having to gain familiarity sorta literally means it’s not that, thus unintuitive.

      I dont disagree with your sentiment, but these people are using the correct term. For example, python len(object) instead of obj.len() trips me up to this day because 99% of the time i think [thing] -> [action], and most language constructs encourage that. If I still regularly type an object name, and then have to scroll the cursor back over and type “len(”, i cant possibly be using my intuition. It’s not the language’s “fault” - because it’s not really “wrong” - but it is unintuitive.

        • Walnut356@programming.dev
          link
          fedilink
          arrow-up
          0
          ·
          2 years ago

          You could say that about anything. Of course you have to learn something the first time and it’s “unintuitive” then. Intuition is literally an expectation based on prior experience.

          Intuitive patterns exist in programming languages. For example, most conditionals are denoted with “if”, “else”, and “while”. You would find it intuitive if a new programming language adhered to that. You’d find it unintuitive if the conditionals were denoted with “dnwwkcoeo”, “wowpekg cneo”, and “coebemal”.

  • words_number@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    2 years ago

    JS is horse shit. Instead of trying to improve it or using that high level scripting language as a compilation target (wtf?!), we should deprecate it entirely and put all efforts into web assembly.

  • Buttons@programming.dev
    link
    fedilink
    English
    arrow-up
    0
    ·
    2 years ago

    Shorter code is almost always better.

    Should you use a class? Should you use a Factory pattern or some other pattern? Should you reorganize your code? Whichever results in the least code is probably best.

    A nice thing about code length is it’s objective. We can argue all day about which design pattern makes more sense, but we can agree on which of two implementations is shorter.

    It takes a damn good abstraction to beat having shorter code.

  • MrTallyman@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    2 years ago

    My take is that no matter which language you are using, and no matter the field you work in, you will always have something to learn.

    After 4 years of professional development, I rated my knowledge of C++ at 7/10. After 8 years, I rated it 4/10. After 15 years, I can confidently say 6.5/10.

    • BaskinRobbins@sh.itjust.works
      link
      fedilink
      arrow-up
      0
      ·
      2 years ago

      Amen. I once had an interview where they asked what my skill is with .net on a scale of 1 - 10. I answered 6.5 even though at the time I had been doing it for 7 years. They looked annoyed and said they were looking for someone who was a 10. I countered with nobody is a 10, not them or even the people working on the framework itself. I didn’t pass the interview and I think this question was why.

      • CodeBlooded@programming.dev
        link
        fedilink
        arrow-up
        0
        ·
        10 months ago

        As a hiring manager, I can understand why you didn’t get the job. I agree that it’s not a “good” question, sure, but when you’re hiring for a job where the demand is high because a lot is on the line, the last thing you’re going to do is hire someone who says their skills are “6.5/10” after almost a decade of experience. They wanted to hear how confident you were in your ability to solve problems with .NET. They didn’t want to hear “aCtUaLlY, nO oNe Is PeRfEcT.” They likely hired the person who said “gee, I feel like my skills are 10/10 after all these years of experience of problem solving. So far there hasn’t been a problem I couldn’t solve with .NET!” That gives the hiring manager way more confidence than something along the lines of “6.5/10 after almost a decade, but hire me because no one is perfect.” (I am over simplifying what you said, because this is potentially how they remembered you.)

        Unfortunately, interviews for developer jobs can be a bit of a crap shoot.

      • fkn@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        2 years ago

        Your mistake was giving them an answer instead of asking how the scale was setup before giving them a number. Psychologically, by answering first your established that the question was valid as presented and it anchored their expectations as the ones you had to live up to. By questioning it you get to anchor your response to a different point.

        Sometimes questions like this can be used to see how effective a person will be in certain lead roles. Recognizing, explaining and disambiguating the trap question is a valuable lead skill in some roles. Not all mind you… And maybe not ones most people would want.

        But most likely you dodged a bullet.

        • BaskinRobbins@sh.itjust.works
          link
          fedilink
          arrow-up
          0
          ·
          2 years ago

          I was kicking myself for days afterwards for not doing exactly as you said. I’m not good at these types of interview questions in the moment. Also before that was the tech interview classic of asking a bunch random trivia questions, which I actually nailed. Also this was for dev II position.

          I definitely dodged a bullet though. Some months later I got hired at a different company for 30k more.

      • Carol2852@discuss.tchncs.de
        link
        fedilink
        arrow-up
        0
        ·
        1 year ago

        Sure try to replace the one or two people that hold the whole team together. I’ve seen it a couple times, a good team disintegrates right after one or two key people leave.

        Also, if you replace half the team, prepare for some major learning time whenever the next change is being made. Or after the next deployment. 🤷‍♂️

  • eeleech@lemm.ee
    link
    fedilink
    arrow-up
    0
    ·
    2 years ago

    I find that S-expressions are the best syntax for programming languages. And in general infix operators are inferior to either prefix or postfix notation.

    • Andy@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      2 years ago

      In case you haven’t heard, Factor just had a new stable release, and is tons of fun for postfix enthusiasts.

      • xigoi@lemmy.sdf.org
        link
        fedilink
        arrow-up
        0
        ·
        2 years ago

        I never understood how concatenative programmers can hold the current state of the stack in their head and never get confused about what is where, especially when changing complex code.

  • BrotherL0v3@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    2 years ago

    Tools that use a GUI are just as good (if not better) than their CLI equivalents in most cases. There’s a certain kind of dev that just gets a superiority complex about using CLI stuff.

  • million@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    2 years ago

    Refactoring is something that should be constantly done in a code base, for every story. As soon as people get scared about changing things the codebase is on the road to being legacy.

      • nous@programming.dev
        link
        fedilink
        English
        arrow-up
        0
        ·
        2 years ago

        Why do you need time to refactor? It is just part of the work you need to do and should be accounted for when doing any other work. IMO a big mistake people make is thinking refactoring is some separate thing they need permission to do. You don’t, if you need to make a change in some area refactor it first to make it easier to accept your change, then add your change then refactor to clean up. This is not three separate tasks, just three steps in one task. You should be given enough time to do the whole task, not just part of it.

  • AdmiralShat@programming.dev
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    2 years ago

    If you don’t add comments, even rudimentary ones, or you don’t use a naming convention that accurately describes the variables or the functions, you’re a bad programmer. It doesn’t matter if you know what it does now, just wait until you need to know what it does in 6 months and you have to stop what you’re doing an decipher it.

    • fkn@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      2 years ago

      Self documenting code is infinitely more valuable than comments because then code spreads with it’s use, whereas the comments stay behind.

      I got roasted at my company when I first joined because my naming conventions are a little extra. That lasted for about 2 months before people started to see the difference in legibility as the code started to change.

      One of the things I tell my juniors is, “this isn’t the 80s. There isn’t an 80 character line limit. The computer doesn’t benefit from your short variable names. I should be able to read most lines of code as a single non-compound sentence in English with only minor tweaks and the English sentence should be what is happening in most of those lines of code.”