also I just realized that Brazil did NOT make a programming language entirely in Spanish and call it “Si” and that my professor was making a joke about C… god damn it

this post is probably too nieche but I feel like Lemmy is nerdy enough that enough people will get it lol

  • squaresinger@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    12 hours ago

    Perfect C is faster than perfect Python, same as perfect assembly is faster than perfect C.

    But in the real world we don’t write perfect code. We have deadlines, we have constantly shifting priorities, we have non-technical managers dictating technical implementations. We have temporary prototype code that ended up being the backbone of a 20 year project because management overpromised and some overworked developer had to deliver real fast. We have managers still believing in the mythical man month (“If one woman can make a baby in 9 months, 9 women only need a single month to make one”) and we have constant cycles of outsourcing and then insourcing again.

    With all that garbage going on we end up with a lot of “good enough for now”, completely independent of “laziness” or “low-skill” of developers. In fact, burnout is incredibly common among software developers, because they aren’t lazy and they want to write good software, but they get caught in the gears of the grind until they get to a mental breakdown.

    And since nobody has the time to write perfect code, we end up with flawed and suboptimal code. And suboptimal assembly is much worse than suboptimal C, which is again much worse than suboptimal Python.

    If your Python code is suboptimal it might consume 10x as much RAM as it needs. If your C code is suboptimal, it memory-leaks and uses up all RAM your PC has.

    If your Python code is buggy, something in the app won’t work, or worst case the app crashes. If your C code is buggy, some hacker just took over your PC because they exploited a buffer overflow to execute any code they want.


    The main issues with software performance are:

    • Management doesn’t plan right and developers need to do with what they have
    • Companies don’t want to spend incredible amounts of money on development to make things perfect
    • Companies want products to be released in time
    • Customers aren’t happy with simple things. They want pretty, fancy things
    • Customers don’t want to pay for software. In today’s money, Win95 cost around €500 and Office cost around €1000. Would you want to spend that? Or do you expect everything to be free? How much did you pay for all the software on your phone?
    • DarkAri@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      11 hours ago

      Perfect assembly is marginally faster than perfect C, but perfect C is way faster than perfect python. You have many valid points though. Also C can be very safe if you don’t use the standard string libraries and stuff. It depends on what you are trying to do. Sometimes it’s worth giving up safety to have a better program.

      Also as a side note, when God instructed Terry Davis to build his third temple do you know what language God told him to use? C… That’s right. God himself endorses C as the greatest language mankind has ever developed.

      • squaresinger@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        9 hours ago

        I’m talking mostly about corporate software development. You know, the kind of projects that run for 20 years with multiple teams and half a dozen cycles of “let’s outsource everything” - “oh, it sucks, let’s insource everything” - “oh, it’s expensive, let’s outsource everything again”. Doing that in C without major issues is rare.

        In that kind of context, safety is everything and performance doesn’t matter.