• million@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    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.

    • NoXzema@lemmynsfw.com
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 years ago

      Been with a lot of codebases that had no unit tests at all and everyone was afraid to change anything because the QA process could take weeks to months.

      The result is you have a codebase that ages like milk.

  • fubo@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    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
      1
      ·
      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
      arrow-down
      1
      ·
      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
          arrow-down
          1
          ·
          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”.

  • BrotherL0v3@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    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.

    • bouh@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      2 years ago

      Just no. CLI can be automated, which makes it superior. It’s not a superiority complex, it’s a fact. I’m not a minimal wage worker pushing buttons I don’t understand. I’m not a technician who learnt your shitty software to do the most basic tasks.

    • stilgar [he/him] @infosec.pub
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 years ago

      There are some massive intrinsic advantages of the CLI though, that apply for everyone, not just leetcoders:

      • The terminal can remember everything you ever did. Forgotten the command you wrote 2 months ago? You can do a search for it with a tool like fzfand run the exact same command again.
      • Communicating with others. GUI programs require step by step instructions, often accompanied by screenshots while CLI may be copy/pasted.
      • Combining programs together. There are a few different techniques for combining CLI programs to search/format output, use secrets without ever having them in the clipboard or on disk, monitor something frequently/constantly etc etc

      So while I agree with you that there’s plently of elitism around the CLI, you do yourself a disservice if you try to avoid it.

  • enemenemu@lemm.ee
    link
    fedilink
    arrow-up
    1
    ·
    4 months ago

    Don’t be afraid to drop a tool although you’ve spent years mastering it if there is something new that is much more efficient. Some day you have to switch anyway.

  • words_number@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    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
    1
    ·
    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
    1
    ·
    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.

  • Kushan@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 years ago

    That the entire industry is cyclical and the current trends are yesterday’s anarcisms. Oop Vs functional, separating concerns Vs vertical slices, there’s examples all over the place.

    All of this has happened before and all of this will happen again.

  • popcar2@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 years ago

    Web development feels like it’s stuck in the early 2000’s. I’ve ranted a lot about it over the years but I just don’t know how everyone is okay with it. I’m sure tons of people will disagree.

    HTML is bad. The language itself feels unintuitive and is clunky compared to modern markdown languages, and let’s be honest, your webpage just consists of nested <div> tags.

    CSS is bad. Who knew styling can be so unintuitive and unmanageable? Maybe it made sense 25 years ago, but now it’s just terrible. It’s very clunkily integrated with HTML too in my opinion. Styling and markdown should be one easier to use language where 50% of it isn’t deprecated.

    Javascript has been memed to death so I won’t even go there. Typescript is OK I suppose.

    And now for my hottest take: ~10+ years ago I saw web building tools like Wix and I completely expected web development to head in the direction using a GUI to create, style, and script from one interface, even allowing you to create and see dynamic content instantly. I’ve seen competitors and waited for “the big one” that’s actually free and open source and good enough to be used professionally. It never happened. Web dev has just gone backwards and stuck in its old ways, now it’s a bloated mess that takes way more time than it deserves.

    The Godot engine is actually a pretty good option for creating GUI apps and it’s exactly what I envisioned web dev should’ve been this past decade. One language, intuitive interface, simple theming and easy rapid development… Shame it never happened.</div>

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

      One language

      Godot has native support for 3 languages and community support currently built for like 6 other languages.

  • lefixxx@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 years ago

    I like 1-index because its what I learned first, and you like 0-index because that’s what you learned first

  • escapesamsara@discuss.online
    link
    fedilink
    arrow-up
    1
    ·
    2 years ago

    Python is legitimately the best language by far for the vast majority of non-performance critical tasks, and most tasks that need to be developed for are not performance critical.

  • 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
      1
      ·
      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