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."

57 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 awe_cz · · Score: 2, Interesting

      While your statement is correct, it kind of misses the problem. With current demand we need more quality craftsmen than there is or ever will be available (in foreseeable future). In this regard, having safe languages looks like a good choice. Not all pieces of software needs to be written by the best of the best anyway. We just need to make sure someone's badly written GUI application does not crash the whole OS. If if it crashes, make sure there is an output from that crash that even sub-standard programmer can understand and fix.

    3. Re:A poor craftsman blames his tools. by MichaelSmith · · Score: 2

      If if it crashes

      Case in point, semantic analysis is available in some text editors to point out your mistake. A programming language which doesn't require that the programmer state their intentions makes it hard for silly mistakes to be identified early.

    4. Re:A poor craftsman blames his tools. by ganv · · Score: 2

      Are flawed programmers creating bad code? Yes, but there is a bigger cause. Our era assumes that complicated things should be able to be done by a small number of people in a tiny amount of time. It is the failure to simplify and allocate adequate resources to creating great code that are really creating bad code.

    5. 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.

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

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

    7. 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.
    8. 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.

    9. 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.
    10. 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...
    11. 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.
    12. 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.
    13. Re:A poor craftsman blames his tools. by Greyfox · · Score: 2
      This is the core of the problem, here. I've been in the software industry since '89 and see the same patterns again and again. The software you're working on was always rushed. They rushed it out the door with incomplete (or no) understanding of the problems they were trying to solve, the business model and in a lot of cases, of writing software at all. They crapped out one giant piece of software with no way to verify its outputs and then went into maintenance mode where they were constantly putting out fires and digging the hole deeper and deeper. There was never time to stop and fix things ("Pay down technical debt") because there was always another emergency, another fire to put out.

      A lot of these projects had no way to test changes other than to push them up to production and see what happened. The worst offenders had systems that were so tightly coupled that you could only run data start-to-finish through the entire system, which made setting up test systems difficult. In some cases, no one in the company had a complete understanding of the full system.

      Even in such situations, it's still possible to drive quality in the system. It requires a whole lot of reading and understanding -- you need to know and understand the business driving the software, the requirements of the business and customers and you have to understand a lot of very convoluted code. You also have to be able to verify changes worked as expected and introduced no other bugs without having to push the software all the way to production to do so. But most of all you have to have the will to actually improve things rather than accept that this is just how this project is. Quite frequently the team in place doesn't have a lot of incentive to have that will -- if the software is ever actually good, it would threaten those fat paychecks they collect for maintaining the mess.

      --

      I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

    14. Re:A poor craftsman blames his tools. by plopez · · Score: 2, Insightful

      I have worked in the industry since the late 80's. I have NEVER been allowed to choose all of my tools.

      --
      putting the 'B' in LGBTQ+
    15. Re:A poor craftsman blames his tools. by Anonymous+Brave+Guy · · Score: 2

      A programmer that can automate its work will be replaced by his computer in a couple of years tops.

      No problem. Once I've finished automating the routine parts of what I currently build, I'll be able to build more capable systems faster next year using the extra time.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    16. 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.

    17. Re:A poor craftsman blames his tools. by Cederic · · Score: 2

      Sure.
      Lets ditch double-entry book keeping and make accountants add up properly.
      Lets ditch medicines and make doctors heal people with their own skills.
      Lets ditch case law and force lawyers to properly argue why their clients are innocent.

      Or maybe, just maybe, professional software engineers take full ownership, full responsibility and exploit the tools and systems available to them to maximise the chances of good outcomes without adding unsustainable cost or time burdens on their work.

      Maybe.

    18. Re:A poor craftsman blames his tools. by fuzzyfuzzyfungus · · Score: 2

      You should probably consider how much of what we just take for granted counts as 'automating your work'.

      Yes, if you can't function without a point-n'-drool EZ Wizard; you are probably of limited use and facing limited future prospects; but do we seriously expect all those lazy, incomptent, losers who rely on a "file system" to provide a convenient abstraction when a real man could just access the block device directly; or the pansies who use 'compilers' because they suck too much to produce machine code themselves to be heading for the bread lines?

      Outside of some(often well compensated, since they are genuinely difficult) specialty situations that bring you very, very, close to the metal(or make you responsible for designing 'the metal') almost all software development is done on top of a fairly gigantic pile of tools that automate assorted ugly details; it's not something exclusive to ITT tech java monkeys.

    19. Re:A poor craftsman blames his tools. by scamper_22 · · Score: 2

      Definitely agree.

      It is really good that programming is so accessible. It was really easy for me to get started back in the day. First in BASIC. Then in C/C++.

      The problem is that line between casual use and professional.

      I've made bridges before. I built them using Lego at one point. I build them using wood and Popsicle sticks. But who would think that qualifies me to build an actual bridge across a river that people would use?

      Or less crazy, I use Excel and know spreadsheets. I have pretty good knowledge of numbers and banking. Who would think that qualifies me to run their accounting department? The line here is much greyer actually. Because I could probably hack something together to do the books for a small business.

      The problem with software is that use-cases aren't graded enough. I've written banking, networking, industrial/mining software. These are serious fields and in all these fields, the bar was pretty much the same as when I worked on some app. It's really sad actually.

      The focus on programming languages not the issue in my view. It's that serious fields don't do enough to differentiate themselves from casual fields in software.

    20. 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.
    21. 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.
    22. Re:A poor craftsman blames his tools. by RandomSurfer314 · · Score: 2

      Like with all language threads, there is so much swagger and misinformation by language afficionados in this discussion. To be honest, I wouldn't trust anyone who calls himself a 'programmer' and doesn't think he could do the job in practically any language or doesn't admit that C and C++ are less safe than, say, Ada or Rust. Everybody has his preferences, no doubt about that, but it's childish and tiresome to hear these silly "my language can do it too" or "everybody uses my language so it must be perfect" comments.

      There are objective evaluation criteria for the overall safety of programming languages and their implementations. If you want to write safe code, then you either should use a relatively safe language with a good implementation, or you need to use appropriate bug checking tools to validate your programs. There are plenty of such tools for C and C++, too, so of course safe programs can be run in these languages. But you also have to use these tools, or you'll get more buggy programs in the long run. That's not (yet) really rocket science, is it?

    23. Re: A poor craftsman blames his tools. by CCarrot · · Score: 2

      I am assuming English isn't your first language. I didn't understand a god damn thing you said.

      Then you need to work on your own comprehension skills. GP was perfectly understandable in spite of being a bit light in punctuation, using some awkward phrasing, and sporting two minor spelling errors. I've seen *much* worse from so-called 'native' English speakers.

      --
      "I love animals! Some are cute, others are tasty, what's not to like?" - Betsy Schroeder, Jeopardy contestant
    24. Re:A poor craftsman blames his tools. by Solandri · · Score: 2

      And therein lies the problem. Programming tools are not interchangeable. Once a programming project starts using one set of tools, everyone working on it then and in the future has to use that same set of tools. A lot of the craftsmen writing software aren't very good. Many of them are self-taught with very little formal training in programming or algorithms. A lot of the "popular" tools are the ones chosen by these poor craftsmen. It's like making science decisions by democracy, when 80% of the population doesn't know squat about science.

      I once wasted half a day tracking down a bug in PHP. It turned out I'd made a typo in a variable name and hit zero (0) while pressing shift too lightly, instead of typing the capital letter O. Very easy to miss. PHP doesn't require you to declare variables. It automatically turned the typo into a new variable, which caused a formula to modify this new variable instead of the original one, causing the bug. The better programming languages force you to declare variables to avoid insidious bugs like this . But PHP grew organically, and some lazy/ignorant person decided it was too much work to declare variables, unaware of the consequences of removing that safety check.

      PHP is a terrible, terrible language. Even the original author admits there is no rhyme or reason to it. It is basically a hodgepodge of patches and kludges tied together by string and glue. But because it arrived first on the scene, it reached critical mass first. A huge number of programmers in the past made contributions to expanding and improving it, so new programmers feel compelled to use it. It has become The scripting language for web programming.

      You have to have PHP in your toolbox. It doesn't matter if you're the greatest craftsman/programmer to ever graduate from Stanford or MIT. If you're hired to help fix someone's website and it's written in PHP, you gotta write your fix in PHP. You might be tempted to code the fix in a better language and have the PHP script call it, but that destroys the maintainability of the code for future programmers. So you're stuck with PHP.

      In programming, the good craftsman has his tools chosen by the person who began the project. Which usually was 10 years ago when the company owner decided he needed a website, and his son in jr. high offered to make it for him.

    25. Re:A poor craftsman blames his tools. by ZenShadow · · Score: 2

      Don't mistake "hipster" for "senior."

      The hipsters are the ones braying about NoSQL and the like. The senior engineers are the ones saying, "Yeah, we called those object databases back in the day. Seen it before. It won't solve your problem."

      Everything (including so-called NoSQL) has its place. The senior people are the ones who know where that place is, and that nothing is a silver bullet.

      --
      -- sigs cause cancer.
    26. Re:A poor craftsman blames his tools. by ZenShadow · · Score: 3, Insightful

      In the application space, you can argue all you want for better languages. There's nothing stopping it there. I'll still disagree with you, but there is no technical reason why the average application can't be written in whatever language you choose. Why? Because the low-level stuff is already done, far beneath your application.

      If you're dealing with hardware (eg. writing an operating system, or code for a microcontroller that manages the brakes in your car), then using those higher level languages is a non-start. Every CPU cycle counts, especially in the latter case. Hardware does not understand the high level string constructs (not even C-style NULL terminated ones!) and data structures present in ANY high-level language. Hardware is a collection of registers in specific places that you have to poke and prod in specific orders to make things happen.

      Good luck enforcing a safe memory access when that access involves poking raw numbers into sixteen different registers (some bit-level options, some addresses), and then going off to do something else while the DMA hardware (hopefully) executes it the way you intended. At the low level, you're going to be dealing with bounds-unchecked pointers whether you like it or not.

      There is none of this safety you want in hardware.

      Unless and until someone invents hardware that directly handles "managed code", languages like C are *very* necessary. They are the bridge between the hardware and whatever hipster silver-bullet language you've chosen to solve all your problems today.

      --
      -- sigs cause cancer.
    27. Re:A poor craftsman blames his tools. by phantomfive · · Score: 2

      At my last company, I worked with a mix of Java, C, and Javascript. I ended up fixing a few memory leaks in the Java code, but the Javascript guys were fixing memory leaks by the thousands (it starts to matter when you have web applications that stay on the same page for a long time). The C code had no memory leaks while I worked there: the C guys recognized that it was likely to be a problem, and developed a system to avoid it.

      "A good programmer can write good code in any language, a bad programmer will write bad code in every language."

      --
      "First they came for the slanderers and i said nothing."
    28. Re:A poor craftsman blames his tools. by AlphaBro · · Score: 2

      I don't know man, I quite enjoy automated conversion from high-level source code to low-level object code. If using a compiler makes me a "code money", so be it.

    29. Re:A poor craftsman blames his tools. by HiThere · · Score: 2

      Java has a lot of decent features, but it also made some very bad decisions....sometimes because of premature optimization. E.g., character strings should be either utf-8 or utf-32. Utf-16 was a mistake. My guess is that utf-8 is the best general standard, but there are arguments in favor of utf-32. I know of no valid argument in favor of utf-16.

      Also the decision to not compile to native code limited the reasonable domain of use. For many purposes there's no problem with using the jvm, but for others it's a serious or critical problem.

      Then there's the decision to only support objects....except sometimes. That is a bad decision. Or the decision to not support structs (i.e., data structures with a defined memory allocation, byte size, and and byte level positioning). I believe that you can actually finagle things around to accomplish this in Java, but it sure isn't easy, and that has more than once caused me to rule it out for use.

      FWIW, my current languages are D (dmd) and Python. I keep looking at Vala, but the documentation is pitiful and it doesn't seem able to get out of pre-beta stability. Go and Rust have stylistic requirements that repulse me even more strongly than does Lisp, so I can't judge their quality. I keep thinking that I ought to seriously consider Ada, but the user community seems to continue to shrink. Eiffel had real promise a couple of decades ago, but it also seems to have turned in upon itself. And Vala shows signs of going the same way, without even first reaching a post-beta version. This is partially because it's tied into the gobject model, but it's hard to say what they should have done instead.

      Do I think flawed languages tend to cause flawed programs...yes. This doesn't mean I think their choices of non-flawed languages are valid. And each language also has, at best, only a limited range of problems correctly addressed in it. For some problems assembler is better than anything else, but for others that would be a ridiculous approach. Usually you can depend on libraries to extend range of tasks a language is useful for, but even then there are limits.

      So. I want a language that supports structs, that has built in hash tables, that makes memory management something I barely need to consider, and that can handle unicode well... Of the languages I know that means D. If I didn't need structs and wasn't really worried about efficiency I'd pick Python, because it's easier to use and has better library support. What alternatives are there? C++ fails immediately on several counts. C is worse. Java also fails, though it's nearly good enough if I don't need structs and am willing to compromise heavily on unicode handling. But Java also has hash tables that are clumsy and difficult to use compared to either D or Python.

      Now imagine I wanted to tackle this project in C. I need to implement custom hash tables with type dependent memory management functions. I need to write lots of unicode handling routines. I need to use a complex pseudo-object construction mechanism whenever I need to deal with indirect objects, including perhaps reference counted pointers, but I'd better make sure there aren't any referential loops. Etc. This at minimum quintuples the errors. And I probably wouldn't write the most efficient implementations. C++ is a bit better, as I can use STL hash tables, but unicode handling is still a real problem, and I haven't yet even discussed concurrency, messaging, etc.

      So for the range I problem I'm looking at C and C++ are unreasonable choices. Java has problems that cause continual vexation. (There's also something about memory size limitations, but I've never built something far enough to run into that problem.) Python has the GIL, which the multiprocessing module only partially addresses. When I was doing a toy application I actually used UDP networking to handle concurrency. So the language I chose was D. I avoid a tremendous number of problems by off-loading hash table, ..., concurrency onto the language. Avoiding those problems removes a tremendous number of errors that I would have created while trying to implement things I would need to research how to do.

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
    30. Re:A poor craftsman blames his tools. by Anonymous+Brave+Guy · · Score: 2

      Well, I do quite a bit of work in high-performance, high-reliability environments and I've shipped systems that have gone years in production without a single reported implementation bug, so I'll take my chances when it comes to software quality and what good tools can do.

      Those results are thanks in no small part to automated methods of catching design and implementation mistakes. I can encode invariants in types. I can write formal specifications and automatically generate large numbers of tests to validate code against them. I can use language features that let me write essential code but then automatically implement additional code to take care of necessary consequences. I can even implement a full DSL with a verified implementation, and have the structure of the DSL guarantee that inputs are valid in some sense.

      These don't have to be big deals. They can be as simple as catching a careless direct equality check on floating point values, or ensuring that a temporary buffer is always deallocated even in error paths. They can also be as complicated as automatically generating and running thousands of test cases to check that a DSL compiler that has been implemented and updated over many years still provides output that satisfies the required conditions.

      One way or another, most of these tools come down to cross-checking some specification that is relatively simple and easy for humans to verify against a code base that may be relatively large and complex. Computers are much better at that job than I am. It's not a substitute for careful design work or code reviews or any of the other good practices we might agree on. It's just using the computer's automation abilities so I can focus my human, creative skills where they are most valuable.

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

      Exactly. Trying to treat software development as a true engineering discipline today would be crazy, for the simple reason that we don't know how to reliably do it right yet. There are too many competing theories. There is too little evidence of which are better or worse. A lot of the loudest voices in our industry are not the people producing the best results, because the people who produce the best results are often too busy getting on with it.

      Trying to license software developers as a profession too soon could result in the snake oil salesman consultblogspeakauthors writing the specs. Speaking as someone who does have to make highly reliable software, I find that idea horrifying. I would most certainly resent the implication that their unproven, ever-changing methods should constrain my ability to build solid, proven products for my clients.

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

      C++? It's crap. How many memory allocation methods does it have now? Do you think it makes it easier to debug?

      Good luck debugging C++ code heavy with templates and its multi-line warnings/error messages.

      C++ is too complicated for little good reason. And complex languages are always harder to debug and more error prone.

    33. Re:A poor craftsman blames his tools. by jcr · · Score: 2

      The reason that C++ is crap is that Bjarne always thought of it as a research project, which means that it wasn't designed, it was accreted.

      -jcr

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
    34. Re:A poor craftsman blames his tools. by plopez · · Score: 2

      There we go, blame the victim

      --
      putting the 'B' in LGBTQ+
  2. Yes by MichaelSmith · · Score: 3, Interesting

    Every programming language I have used commercially has had a few things it does well and a whole bunch of limitations. Bad code gets written all the time to work around language limitations. Consider the lack of data type declarations in python, java script, coffeescript, etc. Terrible for code readability.

    Its all religious theory and habit with very little up front thought and design. RIP Pascal and Ada.

    1. Re:Yes by tomhath · · Score: 2

      Consider the lack of data type declarations

      On the other hand, pretty much every language that uses static typing gives you a way to get around it with overloading, annotations, injections, factories, etc. All of which makes it even more buggy and difficult to read, verify, and maintain.

    2. Re:Yes by MichaelSmith · · Score: 2

      Its actually a good match, you can almost do it with awk. Out parameters and named parameters are two problems I can think of. It does result in a lot of awful java code though,

  3. 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?
  4. 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?

  5. Formal verification is worthless IRL. by rew · · Score: 2

    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.

    Even though both examples I put forward today (web server and web browser) didn't exist back then, I've held this opinion for thirty years (spring 1987).

    1. 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:Executes more code but runs faster ? by Anonymous Coward · · Score: 2, Interesting

    There is nothing preventing a programmer from adding their own memory checking in such languages.

    Sure there is: ignorance and laziness.

    One of the problems is that programmers generally view PEBKAC as a "get out of jail free" card. Once a problem is diagnosed as PEBKAC, they wash their hands of it and say "not my problem". But ask any UX expert, and they will disagree with this - if a user is having problems with a computer system, it's the computer system's fault (or at least an opportunity for the computer system to be better). Heck, ask any *security* expert about it. You can't just ignore issues because the user did something they shouldn't have -- especially when the line between incompetence and malice is oh so easy to cross.

    But guess what: compilers are programs too, and programmers are users of the compilers. Everything about best practices in making interfaces for end user software also applies to the interfaces to programmers' software. And there is no bigger interface to a compiler than the actual language itself.

    Let's face it: "you're holding it wrong" is a fucking lousy excuse. Not for one minute would we tolerate a word processing program where the program crashes when you save a file to a USB drive unless you click Edit->Preferences->"Enable USB interface subsystem" first. Or one where saving a file had a 10% chance of failing, and you had to go to About->"Error Messages" to double check whether you saved successfully or you have saved a completely corrupted copy.

    While programmers may be smarter than the average bear, that doesn't mean they're smart in an absolute sense. There are plenty of stupid programmers out there, and, sorry to be blunt, Dunning-Kruger means that you're probably one of them.

  7. 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."
  8. Re:Memory-unsafe is a BS meme by Joce640k · · Score: 2

    True, but the effort required to do it in (eg.) C is ridiculous. You can't really expect anybody to do it.

    Other languages can do it a lot more easily, eg. C++. Range checking for things like std::vector is turned on by default in recent compilers.

    ie. "array[-1] = 0x666;" will throw an exception, just like in Java.

    You can go outside the box and start using raw pointers in C++ but it's not something you need to do, or should be doing very often.

    And *this* is why Linus Torvalds is an idiot with all his anti-C++ rants and "we only use C here" mentality.

    --
    No sig today...
  9. Programmers create bad software by aglider · · Score: 2

    Programming languages are just tools to help create programs.
    Flawed languages in the hands of skilled programmers can still allow for god programs.
    And vice versa.
    So my answer is: no, they don't.

    --
    Sent as ripples into the electromagnetic field. No single photon has been harmed in the process.
  10. oh boy by renzhi · · Score: 2

    Posting this issue on /. would never have any meaningful discussion, given the attitude of this crowd towards anything barely resembling formal engineering. When the majority think it's cool to write large and complex systems in languages which don't even support strong static typing, and would have a blank stare if you ask them why they think their code is correct, there is simply no place for any serious discussion. Good tools certainly do not guarantee good outcome, but why do we think bad tools would have good outcome, given the same pool of talents? If we can't fix bad programmers, why not thinking about creating better tools? Formal engineering is hard, and no one said it's easy, but it's not a reason not to strive for better ways.

  11. Re:Software isn't enough, hardware must change by gtall · · Score: 4, Insightful

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

  12. Arrogance in the face of complexity by POI · · Score: 2

    New languages and methods always have the advantage over older ones that the big old spaghetti projects written in the newer language with the new method do not exist yet.

    The problem is right here:
    > opting to cram an enormous amount of unnecessary complexity

    Doesn't matter which language is used - as complexity goes up so does the bugginess and new features are increasingly difficult to get working.

    This, together with that nobody wants to admit when they think the system becomes too complex, afraid to look stupid.

  13. Market pressures contribute to the problem by charronia · · Score: 3, Interesting

    I think part of it is that software developers simply do not have seas of time to optimize their code to perfection. There's a strong culture of cranking out features as quickly as possible, because otherwise competitors might beat you to the punch.

  14. Re: The rush to produce easy code. by aussersterne · · Score: 2

    I think this is a bigger problem than is being recognized here. Most coders that I work with don't get to decide on ship dates. They may in a few cases have a claimed "veto power" if the code isn't ready, but they won't use it, because they'll be let go if they don't ship on time.

    The management that I see is too often of the "Give me a demo. What are you talking about, that works fine! Ship it! Let's move the press date up by two months!" variety. Some of the better ones are of the "What's our risk exposure? Hmm... Versus the revenue model... Hmm... It's a close call, but I think the we have to go with the risk to hit our targets" variety. At least they *get* that there is risk.

    But the fact is that management and investors don't care if software is buggy and insecure as long as those are "edge cases." They're fully onboard with the Fight Club model. "How many clients will get screwed vs. how much money will we make. Sounds like a good tradeoff."

    I think most coders are capable of producing good code in a world in which good code is valued. The problem is that it isn't. Shipping products early and often are the values, and management tends to think that if we can ship code early, do write-offs for the bug and vulnerability cases, and then release the next version before having to patch the one that's about to be shipped, then the entire expense of refining and auditing code can just be eliminated.

    At least that's been my experience—the idea is that it's a good way to reduce cost. Release a lot. Be "agile" (hate that word these days), which means: just keep releasing completely new code at an alarming pace. That way, you never have to create good code. You produce a pile of rapidly chucked out, 50% entirely new dogshit every three months with your programmers just barely managing to keep up, you release major versions as fast as you can. Consumers and clients don't get time to be exposed to major bugs and vulnerabilities, or to request that they be fixed, because you release fast enough that your answer can be "That product was released six months ago and is now EOL; no fixes are planned. We recommend that you upgrade to the new version." (The new version also happens to include another revenue item of some kind—upgrade fee, etc.—which is better for the bottom line than providing bug fixes for free.)

    I think what we see in software is the same thing we see across the rest of the consumer landscape. Managers and investors have realized that disposable, non-repairable junk is better for the bottom line and for themselves, because it means that consumers have to keep paying over and over again, and often. All of the other employees (e.g. coders) are left to come along for the ride by the seat of their pants, or get fired and replaced by someone who will.

    --
    STOP . AMERICA . NOW
  15. Re:Memory-unsafe is a BS meme by The+Evil+Atheist · · Score: 2

    And yet, the compiler that Linux uses is now written in... C++ and in the process of converting C style code into C++ style where it makes sense. Because the C code was too unwieldy. Linus wrote his original dive log program in C + GTK, and then was forced to switch to Qt because GTK's attempt at OO made everything unmaintainable.

    LLVM and Clang are written in C++ also.

    Wrapping things in abstractions is necessary and is done in the Linux kernel all the time with macros, which are less maintainable and more impenetrable than templates. There certainly are things in the kernel that would benefit from being templated rather than macro'd.

    --
    Those who do not learn from commit history are doomed to regress it.
  16. False Analogy by stoicio · · Score: 3, Insightful

    First of all it's a programming language not a saw.

    Secondly, almost all other languages are compiled using a 'C' compiler.
    If the 'C' language were a flawed language then producing code for all those other languages, using 'C' would make all of those languages inherently contain the same systemic flaws.

    'C/C++' gets a bad rap from programmers because most programmers lack the skills necessary to make reusable patterns or program securely in any language let alone 'C'.

    A better analogy would be that programming has become a lot like carpentry. All manner of people claim to be carpenters and joiners just because they own a hammer. In computing, all manner of people claim to be programmers because they own a computer, have a Comp. 150 or 250 course, became a Microsoft Certified Engineer (what ever that means), or downloaded a free compiler and read a manual once. Such is our culture.

    It takes a great deal of experience to understand where problems can be produced in any programming language. Unfortunately the under-informed masses of under skilled programmers tend to be negative about the technologies they understand the least.

    The industry needs job entrance tests to demonstrate efficacy in programming rather then simply accepting that people are 'qualified' because they dicked with code for 20 hours in high school.

    1. Re:False Analogy by gweihir · · Score: 3, Interesting

      Indeed. And just look at what pretty impressive, secure, stable and fast code is written in C by people that know what they are doing. This whole idiocy about "we need better languages" comes from the same morons that want to teach everybody how to code: They still believe that coding is a menial task that can be done very cheaply, when in actual reality it is among the hardest engineering disciplines known to man.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    2. Re:False Analogy by dromgodis · · Score: 2

      > If the 'C' language were a flawed language then producing code for all those other languages, using 'C' would make all of those languages inherently contain the same systemic flaws.

      No! In C it is trivial to create a buffer overrun error/vulnerability. A Java program on a JVM compiled from C would require careful coding to create a buffer overrun.

      > It takes a great deal of experience to understand where problems can be produced in any programming language.

      Agreed. And to understand that different languages are open to different problems. That goes for system building on levels above the single programs as well.

  17. Credential-itis by stoicio · · Score: 3, Insightful

    To a certain extent this can be true. Our society, however, also suffers from anther problem at the other end of this scale.

    This is what I refer to as 'Academic Credentialitis'. This disease is pervasive in our society and needs to be stamped out.

    There is no certainty that anyone achieving academic standing in any subject actually makes them good enough at that subject to be 'fail-safe' .
    There is a systemic myth that somehow links academic standing with actual skill.

    Another question is in the context of the design of academic programs. Programs can only be developed reactively based on social context. This means that any new technology that may be disruptive can only have curriculum developed once it is known. If we look at the top 20 historic developments of technology, that have shaped human history in a disruptive way, the majority of those were non-credential-ed developments.

    Consider if you will the rise of the desktop computer. It was **NOT** a degreed professional who designed the first broadly successful consumer P.C..
    (Wozniak only finished his engineering degree in 1986.) Even If we only consider the commercial success of the PC from an academic perspective, there were no business academics who predicted or persued the development of a consumer personal computer until after it had already arrived on the business scene from a garage. So, in the context of the computing world that we now live in, academia had little to do with the early development and adoption of the PC technology except to claim it after the fact. In short, if we had all adhered to academic credentials as the basis for the development of this technology, none of us would have it right now. We would all still be using tele-type and reading paper newspapers delivered by hand.

    The academic myth has been created as a socio-economic filter to ensure that only those with suitable amounts of cash may achieve status in industry or government. This does not scale well to either skill or aptitude.

    It has been suggested that aptitude testing would be a better way to validate skill level rather than degrees. The question is, "who designs the test?". There would be a strong bias to load the content of tests with useless information that only a degreed academic would know in just the same way as requests for proposals are biased toward favoured contractors.

    The credential is a problem, not a solution. We need to remove our social addiction to that particular social snake oil and get back to skills assessment instead.

  18. Capatilism by tommyjcarpenter · · Score: 2

    Creates bad software.