Slashdot Mirror


Are Flawed Languages Creating Bad Software? (techcrunch.com)

"Most software, even critical system software, is insecure Swiss cheese held together with duct tape, bubble wrap, and bobby pins..." writes TechCrunch. An anonymous reader quotes their article: Everything is terrible because the fundamental tools we use are, still, so flawed that when used they inevitably craft terrible things... Almost all software has been bug-ridden and insecure for so long that we have grown to think that this is the natural state of code. This learned helplessness is not correct. Everything does not have to be terrible...

Vast experience has shown us that it is unrealistic to expect programmers to write secure code in memory-unsafe languages...as an industry, let's at least set a trajectory. Let's move towards writing system code in better languages, first of all -- this should improve security and speed. Let's move towards formal specifications and verification of mission-critical code.

Their article calls for LangSec testing, and applauds the use of languages like Go and Rust over memory-unsafe languages like C. "Itâ(TM)s not just systemd, not just Linux, not just software; the whole industry is at fault."

17 of 531 comments (clear)

  1. A poor craftsman blames his tools. by Anonymous Coward · · Score: 5, Insightful

    It's not the language, it's the programmers and the rush to produce easy code. Speed and simplicity trumps security and efficient coding these days.

    1. Re:A poor craftsman blames his tools. by Anonymous Coward · · Score: 5, Insightful

      A good craftsman doesn't blame his tools because a good craftsman doesn't use poor tools.

    2. Re:A poor craftsman blames his tools. by allo · · Score: 5, Insightful

      A good craftsman chooses good tools.

      Of course you can create excellent work with very bad tools.
      But the first a good craftman does is to search for the right tools. He checks his budget, then starts to search for the right tools and if they are too expensive, he searches for replacements, which are for him (but not for everyone) similiar useful. If he cannot find a tool he needs for good work, he's honest about it and tells his client before starting to work.

    3. Re:A poor craftsman blames his tools. by Dunbal · · Score: 5, Informative

      On the other hand, the tools don't make the craftsman. You give sophisticated tools to an idiot and you will still get something idiotic - although sophisticatedly idiotic.

      --
      Seven puppies were harmed during the making of this post.
    4. Re: A poor craftsman blames his tools. by Anonymous Coward · · Score: 5, Insightful

      Give me a crappy handsaw and nothing else and expect me to do perfectly mitered crown molding in no time at all? You get shit.

      Same tools with more time? Now we can talk about my skills I.e. can I do it properly with just that handsaw but time to make it right?

      On the other hand, give me a nice table saw where I can simply set the saw to miter correctly and I can do these crown moldings perfectly in no time at all.

      The moral of the story? Yes in scenario 2 the poor craftsman will still blame the tools but a good one will also do it because he does know how to do it but he also knows that the table saw exists.

    5. Re:A poor craftsman blames his tools. by Anonymous+Brave+Guy · · Score: 5, Informative

      It's not the language, it's the programmers and the rush to produce easy code.

      Well, I think it's a lot the language as well. To a first approximation, every major piece of system and networking software written in C has had serious security issues at one time or another, even the ones written by the best programmers of their generation and hailed as being exemplary in their code quality. I think after the first few decades of evidence we're allowed to call this one now, and say that writing critical software in unnecessarily dangerous languages produces less than optimal results.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    6. Re:A poor craftsman blames his tools. by Joce640k · · Score: 5, Informative

      Yep. Too much 'critical' code is written by the boss's nephew just because he "seems to be good at computers".

      Bjarne said it best:

      The idea of programming as a semiskilled task, practiced by people with a few months' training, is dangerous. We wouldn't tolerate plumbers or accountants that poorly educated. We don't have as an aim that architecture (of buildings) and engineering (of bridges and trains) should become more accessible to people with progressively less training. Indeed, one serious problem is that currently, too many software developers are undereducated and undertrained. Obviously, we don't want our tools--including our programming languages--to be more complex than necessary. But one aim should be to make tools that will serve skilled professionals--not to lower the level of expressiveness to serve people who can hardly understand the problems, let alone express solutions. We can and do build tools that make simple tasks simple for more people, but let's not let most people loose on the infrastructure of our technical civilization or force the professionals to use only tools designed for amateurs.
      - Bjarne

      --
      No sig today...
    7. Re:A poor craftsman blames his tools. by Anonymous+Brave+Guy · · Score: 5, Insightful

      A good craftsman doesn't insist that his tools necessarily do the job for him either.

      As programmers, automation is the essence of what we do. Any programmer who isn't insisting on their tools doing work so they don't have to do it themselves isn't making very good use of those tools. That is as true for safety, security and defensive programming as for any other aspect.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    8. Re:A poor craftsman blames his tools. by Anonymous+Brave+Guy · · Score: 5, Insightful

      What happened with "We rely on the developer to do a good job?"

      We tried that experiment, and it failed when roughly 0% of professional programmers turned out to be more reliable than an automated tool designed specifically to prevent certain types of programming error.

      Can we just stop finding excuses to deliver crap quality code?

      You're implying a false dichotomy. There are plenty of programmers who produce generally decent code but still make mistakes that better tools will catch before they go into production.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    9. Re:A poor craftsman blames his tools. by Bengie · · Score: 4, Insightful

      against what the senior people advice

      Most senior people are equally incompetent. Senior programmers tend to be pattern-anti-pattern cargo-cult programmers. They seem competent to those who are incompetent themselves. They also like to use buzzwords. "I'm going to use a no-sql database to increase the scaling performance" only to reinvent a relational database on top of a no-sql database and get strange data oddities because they didn't realize that "transactions" in their chosen no-sql DB does not mean the same thing as "transactions" in a proper relational database. Then after fixing the transnational issues, the no-sql DB is now slower because synchronization is more expensive in no-sql.

      Knowledge in an of itself is useless. The Google datacenter is more knowledgeable than any human, yet it is stupid, about as smart as an insect. Wisdom is what one gains from making mistakes, talent allows you to skip making mistakes in the first place. A wise person can correctly recreate what they have already done in the past, talented person can correctly create something entirely new.

    10. Re:A poor craftsman blames his tools. by Anonymous+Brave+Guy · · Score: 4, Insightful

      I think Bjarne Stroustrup, among others, could reasonably challenge your claim.

      But as I said, the reasons for C's continued popularity aren't technical. There's a huge ecosystem around it, including using it as programming's lingua franca. For that to change, either we need an industry heavyweight with enough resources to create not just a better language but the tools and libraries and developer ecosystem around it, or we need some sort of external pressure to drive the change, so that enough professional developers start caring enough about improving quality to switch to new languages and tools despite C's established presence.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    11. Re:A poor craftsman blames his tools. by Spazmania · · Score: 5, Insightful

      Java is a memory safe language. Great error handling too. The language does so many things right, it's scary.

      Intermediate result: java attracts incompetent programmers who find that their java code doesn't outright crash the way their C code tends to. Because their code works, more or less, it becomes hard for a non-programmer manager to tell the difference between a java guru and an incompetent boob.

      Final result: most java code is utter crap riddled with errors compared to typical C code.

      --
      Moderating "-1, Disagree" is simple censorship. Have the guts to post your opinion.
  2. Software isn't enough, hardware must change by Required+Snark · · Score: 4, Interesting
    Back in the early days of computers, when the world had many hardware architectures, there were machines that had co-designed hardware and software. They were designed from the ground up to avoid certain types of problems, and they worked really well.

    Burroughs Large System stack machines were one example and Symbolics Lisp Machines were another. Burroughs had array descriptors that did bounds checking at run time and tagged memory. Tagging added non-user accessible bits to each memory word. The tag defined what kind of data the word contained and the hardware detected any attempt to use a memory value illegally. Symbolics machines also had tag bits, but their implementation was microcoded, so the tag interpretation was also in microcode.

    Until computer implementations include features like tagged memory and hardware array bounds checking they will never be truly secure. Some problems cannot be addressed by an isolated software layer: they can only be made secure by hardware enforcement of fundamental features that prohibit some classes of software errors.

    --
    Why is Snark Required?
  3. Re:what a waste of article by mccalli · · Score: 4, Interesting

    How many rock solid kernels, games or video editing suites are you aware of? I'm aware of zero. Do you not install your updates?

  4. Re:what a waste of article by Rockoon · · Score: 4, Informative

    When you say "memory safe" languages surely you mean managed languages like Java...

    Java is of course a completely safe language. There has never been any question about how safe and reliable Java is, and nobody has ever recommended un-installing Java to make your system safer.

    --
    "His name was James Damore."
  5. Re:Formal verification is worthless IRL. by Halo1 · · Score: 4, Informative

    When you write a program that needs to print the primes up to a certain number, you can easily create a formal proof that your program program is correct.

    But when your program is say "apache", that needs to interact with many different browsers on one side, and interpret PHP scripts that interact with databases, this formal proof becomes impossible. Similarly, you cannot write a formal spec for the interaction with the user in for example, a web browser.

    While things like the halting problem obviously prevent fully formally proving the correctness of programs, you can go much farther than we generally go today. For example, I participated in an EU project where they constructed a formal model of the PikeOS separation kernel (kind of like an embedded real-time hypervisor). They also generalised this model, which includes support for things like interrupts and context switches.

    --
    Donate free food here
  6. Re:Software isn't enough, hardware must change by gtall · · Score: 4, Insightful

    And then Intel happened, and we've suffered ever since.