• million@lemmy.world
    link
    fedilink
    English
    arrow-up
    151
    arrow-down
    1
    ·
    edit-2
    10 months 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.

    • brettvitaz@programming.dev
      link
      fedilink
      arrow-up
      29
      ·
      edit-2
      10 months ago

      Only if the code base is well tested.

      Edit: always add tests when you change code that doesn’t have tests.

      • mark@programming.dev
        link
        fedilink
        arrow-up
        3
        ·
        10 months ago

        And also try to make tests that don’t have to change if you refactor in future (although there are some exceptions)

      • nous@programming.dev
        link
        fedilink
        English
        arrow-up
        7
        ·
        10 months 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.

        • myersguy@lemmy.simpl.website
          link
          fedilink
          arrow-up
          2
          ·
          10 months ago

          I guess I need to refactor for readability. What you just explained is the entire point of the comment I posted. Refactoring is part of the job. Don’t give your manager a choice on whether or not it needs done.

    • hascat@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      ·
      10 months ago

      Yes please. Many times when I add a feature I end up refactoring some of the code first to better accommodate it.

    • russ@programming.dev
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months ago

      We used to call this ‘Code is Cheap’ at my last job - you’re spot on about the value of it

      • FlumPHP@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        10 months ago

        Today I removed code from a codebase that was added in 2021 and never ever used. Sadly, some people are as content to litter in their repo as they are in the woods.

  • fubo@lemmy.world
    link
    fedilink
    arrow-up
    130
    arrow-down
    3
    ·
    edit-2
    10 months 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.

    • Walnut356@programming.dev
      link
      fedilink
      arrow-up
      36
      arrow-down
      2
      ·
      10 months 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.

      • fubo@lemmy.world
        link
        fedilink
        arrow-up
        15
        arrow-down
        1
        ·
        edit-2
        10 months ago

        If you only know C and you’re looking at Python, the absence of curly braces on code blocks is temporarily unfamiliar to you.

        But if you only know Python and you’re looking at C, the fact that indentation doesn’t matter is temporarily unfamiliar to you.

        Once you learn the new language, it’s not unfamiliar to you anymore.

        “Unintuitive” often suggests that there’s something wrong with the language in a global sense, just because it doesn’t look like the last one you used — as if the choice to use (or not use) curly braces is natural and anything else is willfully perverse on the part of the language designer.

        • Walnut356@programming.dev
          link
          fedilink
          arrow-up
          9
          ·
          10 months ago

          “Unintuitive” often suggests that there’s something wrong with the language in a global sense

          I mean only if you consider “Intuition” to be some monolithic, static thing that’s also identical for everyone. Everyone has their own intuition, and their intuition changes over time. Intuition is akin to an opinion - it’s built up based on your own past experiences.

          just because it doesn’t look like the last one you used — as if the choice to use (or not use) curly braces is natural and anything else is willfully perverse on the part of the language designer.

          I don’t think it’s that deep. All people mean when they say it is that “[thing] defied my expectation/prior experience”. It’s like saying “sea food tastes bad”. There’s an implicit “to me” at the end, it’s obvious i’m not saying “sea food factually tastes bad, and anyone who says they like it is wrong or lying”.

        • Walnut356@programming.dev
          link
          fedilink
          arrow-up
          4
          ·
          10 months 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”.

        • kaba0@programming.dev
          link
          fedilink
          arrow-up
          2
          ·
          10 months ago

          Languages also have inner consistency. E.g. the mentioned python len function is inconsistent with the rest of the same language - and that is a statement that is true in itself, without an external reference point.

          • xigoi@lemmy.sdf.org
            link
            fedilink
            arrow-up
            1
            ·
            edit-2
            10 months ago

            Yes, I agree that the len() thing in Python, and inconsistency in general, is bad. But pretty much all popular languages have many inconsistencies.

        • 257m@lemmy.mlOP
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          10 months ago

          But there are languages that require varying degrees of effort to become natural. Something like Malbolge will pretty much never be natural while something like Python can become natural to you in a few days.

          • xigoi@lemmy.sdf.org
            link
            fedilink
            arrow-up
            1
            ·
            10 months ago

            Yeah. The original comment was about programmers who say that a language is “unintuitive” because it doesn’t look like another language they know.

    • Cratermaker@discuss.tchncs.de
      link
      fedilink
      arrow-up
      11
      ·
      edit-2
      10 months ago

      Idk, I don’t see a problem with saying a new language is unintuitive. For example, in js I still consider the horrible type coercion and the “fix” with the triple-equals very unintuitive indeed. On the flip side, when learning C# I found the multiple ways of making comparisons to be pretty intuitive, and not footguns.

    • FlumPHP@programming.dev
      link
      fedilink
      arrow-up
      6
      ·
      10 months 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.

    • Ananace@lemmy.ananace.dev
      link
      fedilink
      arrow-up
      3
      ·
      10 months ago

      ZZT-OOP is fun to work with though, definitely not meant for doing anything more complex than light gameplay, and yet people have done ridiculous things with it.

      Though I personally did most of my coding in that vein in MegaZeux with their Robotic language, which is basically ZZT-OOP++.

    • IonAddis@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months 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.

      This is wise advice for ANY domain of knowledge.

      Lotta people get a little fragment of knowledge on something, then shut down their brain and stop accepting new input. But life is change, and to be able to change and learn new things you need to keep your mind open. Being able to relax on having opinions and keep learning and moving along is very important.

    • AlexWIWA@lemmy.ml
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      10 months ago

      I still think ruby is a bad language, even though I agree with you

    • Konlanx@lemmy.ml
      link
      fedilink
      Deutsch
      arrow-up
      1
      ·
      10 months ago

      This is very true! Languages being unintuitive also becomes less of an issue the more languages you look into. There will be many concepts that multiple languages have since ultimately they are all trying to do similar things and the more you learn the more you will recognize making it easier to get into even more languages.

      • Carol2852@discuss.tchncs.de
        cake
        link
        fedilink
        arrow-up
        1
        ·
        2 months 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. 🤷‍♂️

  • MrTallyman@programming.dev
    link
    fedilink
    arrow-up
    79
    arrow-down
    1
    ·
    10 months 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.

  • BrotherL0v3@lemmy.world
    link
    fedilink
    arrow-up
    89
    arrow-down
    13
    ·
    10 months 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.

      • russ@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        10 months ago

        Indeed, the problem with gui apps is when you can’t script them!

        I always loved alfred on osx, then loved scripting rofi on linux, only to come back to osx years later and find alfred can’t be invoked with stdin options. It’s damn shame….

    • brettvitaz@programming.dev
      link
      fedilink
      arrow-up
      36
      ·
      10 months ago

      I used to think something like this when I was younger. I spent an inordinate amount of time looking for good gui versions of cli tools. I have come to understand that this is not usually the case and cli tools are more convenient much of the time. I would not classify this as superiority complex, unless I’m being a jerk about it. I don’t care what you use, I just use whatever has the lowest barrier to entry with the most standardization, which is usually the original cli tool.

      That said, jetbrains git integration is awesome.

        • kaba0@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          10 months ago

          It also depends on the specifics — in many cases when a GUI is just a wrapper over the CLI tool, it is instructive to learn the CLI, similarly how you are a better programmer if you know about at least a layer beneath the one you are programming at (e.g. you can reason about this usage of hashmap because you roughly know what it does).

          It is probably the most visible in git, but if you can only do commit and push from a GUI, just please learn the CLI as well. You don’t have to use it, but understanding it is important and the GUI may abstract away too much from you.

    • stilgar [he/him] @infosec.pub
      link
      fedilink
      English
      arrow-up
      28
      arrow-down
      2
      ·
      10 months 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.

    • intelati@programming.dev
      link
      fedilink
      arrow-up
      9
      ·
      10 months ago

      My gold standard app is a CLI where I have the option to visually add the flags. I’m thinking of the ytdlp-gui type programs.

    • OsrsNeedsF2P@lemmy.ml
      link
      fedilink
      arrow-up
      5
      arrow-down
      1
      ·
      10 months ago

      Aside from automation, CLI can support significantly more complicated apps reliably. It can also be tested more reliably.

      GUIs are better for anything simple, and good UX designers can make a moderately complex one, but anything like server administration/git/configs are 100x better on CLI

    • adambard@lemmy.ca
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      10 months ago

      This depends a lot on the GUI and the tool. Some cli tools are great alone or for scripting, others benefit from the extra attention to ux and exposure of options that a GUI can offer

      For git in particular, I encourage juniors to learn and use the CLI. I find that GUI git clients often do some or all of the following:

      • Use non-git terminology that ends up being confusing. “Sync” comes to mind as a frequent offender, I can think of several incompatible things that could refer to.

      • Ignore the useful ability to stage your changes

      • Don’t permit or encourage a review of the changes

      • Implement only the basics and make remediation of branching issues difficult

      In the worst case, I’ve seen people end up using the git GUI like a “save” button, blindly commiting and pushing the current state of their code, including to-be-removed print statements and other cruft. Yeah, git cli is a bit complex compared to that, but you gain a lot for that added complexity.

      That said, I’ve definitely jumped into a git GUI from time to time just for a visualization of whenever branching snafu I’m trying to untangle. None of the above invalidates GUIs if you take care to still understand the underlying tool properly!

  • Vince@feddit.de
    link
    fedilink
    arrow-up
    71
    arrow-down
    2
    ·
    10 months ago

    Not sure if these are hot takes:

    • Difficult to test == poorly designed
    • Code review is overrated and often poorly executed, most things should be checked automatically (review should still be done though)
    • Which Programming language doesn’t matter (within reason), while amount of progress languages matters a lot
    • brettvitaz@programming.dev
      link
      fedilink
      arrow-up
      31
      ·
      10 months ago

      I agree with your first point, but pretty strongly disagree with the other two. Code review is critical. Devs should be discussing changes and design choices. One Dev can not be all things all the time and other people have experience you do not or can remind you of things you forgot. Programming language absolutely matters when you’re not the only dev on the team.

      • Vince@feddit.de
        link
        fedilink
        arrow-up
        4
        ·
        10 months ago

        Nice, so they are hot takes :D

        If the design of a code change is bad, noticing that in the PR stage is not desirable. It should be discussed before someone actually went ahead and implemented it. It can also happen if people misunderstand the architecture, but again, that should be cleared up before actually implementing a change. Code style should be enforced automatically, as should test coverage and performance. Code review is also pretty bad at finding bugs from my experience. That imo leaves very few things where code review is useful that are not nitpicking.

        As for programming languages, the amount does matter for individuals and for teams/organisations. A developer who can only use a single language is not very good, and using a many different languages within the same team is not good either.

    • FlumPHP@programming.dev
      link
      fedilink
      arrow-up
      7
      ·
      10 months ago

      Code review is overrated and often poorly executed, most things should be checked automatically (review should still be done though)

      I think part of this is caused by the fact that a lot of people are bad at code reviews so they focus on things that a linter could have told you. Being able to read code isn’t necessarily the same skill as being able to write it – as evidenced by the knee jerk reaction to throw out any coffee we didn’t write ourselves.

      I still create code reviews when I’m working on a project alone because it gives me a different perspective on the changes I’ve made.

      • kaba0@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        10 months ago

        It’s not that most people are bad at it, they are just out of context.

        Like, I am completely swamped with a completely different business area of the code, besides checking for obviously dumb things, what can I really tell about a diff to a very separate part of the code which I may have never worked on before, with business requirements I don’t understand as I was not part of the 10 meetings that happened between the dev of the given ticket and BAs?

    • AlexWIWA@lemmy.ml
      link
      fedilink
      English
      arrow-up
      3
      ·
      10 months ago

      Imo reviews are more for checking that someone didn’t drop malware into the code base. It’s rare that I get a good review that goes beyond checking for malice.

    • Xylight (Photon dev)@lemmy.xylight.dev
      link
      fedilink
      English
      arrow-up
      2
      ·
      10 months ago

      I’ve been wanting to make my applications easier to test. The issue is, I don’t know what to test. Often my issues are so trivial I notice them immediately.

      What are some examples of common things in, let’s say a web server, that could be unit tested?

      • Vince@feddit.de
        link
        fedilink
        arrow-up
        1
        ·
        10 months ago

        Good questions, I could probably write a lot, but I’ll try to keep it short. I usually apply TDD and there are different schools of thought within it about how to structure the development process. But no matter how exactly you do it, if you focus on writing the tests while writing your code, you won’t end up with an application that you then have to figure out how to test.

        what to test

        Well, what is the application supposed do? That is what you test, the behaviour of the application.

        So in a codebase without any tests, the first thing you should write a test for is the happy path. That will probably not be a unit test. So for the web server example, set it up in a test with a file, start it and check if it serves that file.

        Then you can add tests for all the error cases and for additional functionality. You can write unit tests for individual components. The ideal places to test are interfaces with clear boundaries. Ideally you should not have to look at the code of a method to be able to write a test for it. In reality that’s not always so easy, especially in existing code bases, but if you have to set up more than one mock, it tends to lead to brittle tests.

        Every time you encounter a bug/issue, reproduce it in a test first. And do measure code coverage, but don’t make it a target, just check for places that are lacking.

  • asyncrosaurus@programming.dev
    link
    fedilink
    arrow-up
    67
    arrow-down
    6
    ·
    10 months ago

    SPAs are mostly garbage, and the internet has been irreparably damaged by lazy devs chasing trends just to building simple sites with overly complicated fe frameworks.

    90% of the internet actually should just be rendered server side with a bit of js for interactivity. JQuery was fine at the time, Javascript is better now and Alpinejs is actually awesome. Nowadays, REST w/HTMX and HATEOAS is the most productive, painless and enjoyable web development can get. Minimal dependencies, tiny file sizes, fast and simple.

    Unless your web site needs to work offline (it probably doesn’t), or it has to manage client state for dozen/hundreds of data points (e.g. Google Maps), you don’t need a SPA. If your site only needs to track minimal state, just use a good SSR web framework (Rails, asp.net, Django, whatever).

    • GaveUp [she/her]@hexbear.net
      link
      fedilink
      English
      arrow-up
      9
      arrow-down
      2
      ·
      10 months ago

      Preferring server side rendering is an interesting topic

      Client side renderering is currently the preference because the company gets to offload the compute costs of their servers onto the clients’ devices

      As long as every website has a profit motive, even if it’s just a single person trying to save some money on their AWS bills, server side rendering will never become the norm

      • murtaza64@programming.dev
        link
        fedilink
        arrow-up
        12
        ·
        10 months ago

        The difference between generating JSON and generating HTML is minimal for the server, doesn’t seem to me like server side rendered sites have significantly higher server compute costs. Also generally for SPAs, the server has to replicate whatever flow is happening on the client anyway to keep state in line (since the client can’t be trusted)

        • NekuSoul@lemmy.nekusoul.de
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          10 months ago

          The difference between generating JSON and generating HTML is minimal for the server

          That should be true, but have you looked the HTML of any “modern” site? Dozens of nested elements, each tagged with multiple lines of attributes. Generating that is probably 10x the cost of generating the JSON.

          Plus, with server side rendering you also have to recompute the HTML for the entire site, which often means re-computing a whole bunch of non-trivial queries as well.

          • asyncrosaurus@programming.dev
            link
            fedilink
            arrow-up
            1
            ·
            10 months ago

            Plus, with server side rendering you also have to recompute the HTML for the entire site, which often means re-computing a whole bunch of non-trivial queries as well.

            This is actually why I really like HTMX, you load a page once, then make AJAX requests that return html which you can use to replace or add to the DOM. It provides an interactive front end where the backend provides full rendered html partials. Simplifies the entire application by keeping logic and state only on the server, which means you never have to worry about synchronizing front-end and backed state.

    • derpgon@programming.dev
      link
      fedilink
      arrow-up
      3
      ·
      10 months ago

      I do a lot of PHP, so naturally my small projects are PHP. I use a framework called Laravel, and while it is possible to use SPAs or other kinds of shit, I usually choose pure SS rendering with a little bit of VueJS to make some parts reactive. Other than that, it is usually, just pure HTML forms for submitting data. And it works really well.

      Yeah yeah, they push the Livewire shit, which I absolutely hate and think is a bad idea, but nobody is forcing me, so that’s nice.

    • nayminlwin@lemmy.ml
      cake
      link
      fedilink
      arrow-up
      2
      ·
      10 months ago

      I’m still hoping for browsers to become some kind of open standard application environments and web apps to become actual apps running on this environment.

      • icesentry@lemmy.ca
        link
        fedilink
        arrow-up
        2
        ·
        10 months ago

        How are browser not that already? What’s missing?

        They are an open standard and used to make many thousands of apps.

        • nayminlwin@lemmy.ml
          cake
          link
          fedilink
          arrow-up
          1
          ·
          10 months ago

          I’m thinking more along the line of ubiquitous offline first PWAs. Imagine google doc running offline in a browser and being able to edit local docs directly. I guess secure file system access is one of the major road blocks, though I’m not sure of the challenges associated with coming up with a standard for this.

    • Hotzilla@sopuli.xyz
      link
      fedilink
      arrow-up
      1
      ·
      10 months ago

      Actual hot take, Blazor is awesome, it is like Microsoft looked into ASP.NET Forms, ASP.NET MVC and Razor, and bundled it to one quick framework to do simple WebApps.

      • asyncrosaurus@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        10 months ago

        Counter hot take, I do actually like Blazor but it has limitations due to how immature web assembly still is. It also does not solve the problem of being a big complex platform that isn’t needed for small simple apps. Of the half dozen projects I’ve written in Blazor, I’d personally re-write 3 or so in just Razor Pages with Htmx.

        • Hotzilla@sopuli.xyz
          link
          fedilink
          arrow-up
          2
          ·
          10 months ago

          Server-side works better, webassembly and fat client on general imo aren’t worth it. It’s benefits require millions of users.

  • Elderos@lemmings.world
    link
    fedilink
    arrow-up
    61
    ·
    edit-2
    10 months ago

    The best codebase I have ever seen and collaborated on was also boring as fuck.

    • Small, immutable modules.
    • Every new features was coded by extension (the ‘o’ in S.O.L.I.D)
    • All dependencies were resolved by injection.
    • All the application life cycle was managed by configurable scopes.
    • There was absolutely no boiler plate except for the initial injectors.
    • All of the tests were brain-dead and took very minimal effort to write. Tests served both as documentation and specification for modules.
    • “Refactoring” was as simple as changing a constructor or a configuration file.
    • All the input/output of the modules were configurable streams.

    There is more to it, but basically, it was a very strict codebase, and it used a lot of opinionated libraries. Not an easy codebase to understand if you’re a newbie, but it was absolutely brain dead to maintain and extend on.

    Coding actually took very little time of our day, most of it consisted of researching the best tech or what to add next. I think the codebase was objectively strictly better than all other similar software I’ve seen and worked on. We joked A LOT when it came time to change something in the app pretending it would take weeks and many 8 pointers, then we’d casually make the change while joking about it.

    It might sound mythical and bullshity, and it wasn’t perfect, it should be said that dependency injection often come in the form of highly opinionated frameworks, but it really felt like what software development should be. It really felt like engineering, boring and predictable, every PO dreams.

    That being said, I given up trying to convince people that having life-cycle logic are over the place and fetching dependencies left and right always lead to chaos. Unfortunately I cannot really tell you guys what the software was about because I am not allowed to, but there was a lot of moving parts (hence why we decided to go with this approach). I will also reiterate that it was boring as fuck. If anything, my hot take would be that most programmers are subconsciously lying to themselves, and prefer to code whatever it is they like, instead of what the codebase need, and using whatever tool they like, instead of the tools the project and the team need. Programming like and engineer is not “fun”, programming like a cowboy and ignoring the tests is a whole lot of fun.

  • idunnololz@lemmy.world
    link
    fedilink
    arrow-up
    57
    arrow-down
    1
    ·
    10 months ago

    You can always solve a problem by adding more layers of abstraction. Good software design isn’t to add more layers of abstractions, it’s to solve problems with the minimum amount of abstractions necessary while still having maintainable, scalable code.

    There are benefits to abstraction but they also have downsides. They can complicate code and make code harder to read.

  • r1veRRR@feddit.de
    link
    fedilink
    arrow-up
    53
    arrow-down
    1
    ·
    10 months ago

    Compiler checked typing is strictly superior to dynamic typing. Any criticism of it is either ignorance, only applicable to older languages or a temporarily missing feature from the current languages.

    Using dynamic languages is understandable for a lot of language “external” reasons, just that I really feel like there’s no good argument for it.

  • OADINC@feddit.nl
    link
    fedilink
    arrow-up
    56
    arrow-down
    6
    ·
    edit-2
    10 months ago

    This is the only way;

    if (condition) {
        code
    }
    

    Not

    if (condition)
    {
        code
    }
    

    Also because of my dyslexia I prefer variable & function names like this; ‘File_Acces’ I find it easier to read than ‘fileAcces’

  • hansl@lemmy.ml
    link
    fedilink
    arrow-up
    48
    arrow-down
    1
    ·
    10 months ago

    Hot take: people who don’t like code reviews have never been part of a good code review culture.