Stories
Slash Boxes
Comments

SoylentNews is people

posted by LaminatorX on Thursday November 06 2014, @12:40PM   Printer-friendly
from the Brainfuck++ dept.

A variety of debates ensue during discussions whether a given programming language is “the right tool for the job" and while some of these debates may appear to be tinged with an almost religious fervor, most people would agree that a programming language can impact not only the coding process, but also the properties of the resulting product. Now computer scientists at the University of California - Davis have published a study of the effect of programming languages on software quality using a very large data set from GitHub that analyzed 729 projects with 80 Million SLOC by 29,000 authors and 1.5 million commits in 17 languages. The large sample size allowed them to use a mixed-methods approach, combining multiple regression modeling with visualization and text analytics, to study the effect of language features such as static vs. dynamic typing, strong vs. weak typing on software quality. By triangulating findings from different methods, and controlling for confounding effects such as team size, project size, and project history, they report that language design does have a significant, but modest effect on software quality.

Most notably, it does appear that strong typing is modestly better than weak typing, and among functional languages, static typing is also somewhat better than dynamic typing. We also find that functional languages are somewhat better than procedural languages. It is worth noting that these modest effects arising from language design are overwhelm- ingly dominated by the process factors such as project size, team size, and commit size. However, we hasten to caution the reader that even these modest effects might quite possibly be due to other, intangible process factors, e.g., the preference of certain personality types for functional, static and strongly typed languages.

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 1, Insightful) by Anonymous Coward on Thursday November 06 2014, @01:17PM

    by Anonymous Coward on Thursday November 06 2014, @01:17PM (#113499)

    Anyone can write bad code, no matter what programming language it happens to be in.

    Starting Score:    0  points
    Moderation   +1  
       Insightful=1, Total=1
    Extra 'Insightful' Modifier   0  

    Total Score:   1  
  • (Score: 4, Funny) by Sir Garlon on Thursday November 06 2014, @01:23PM

    by Sir Garlon (1264) on Thursday November 06 2014, @01:23PM (#113503)

    But to write truly hideous code takes dedication and talent!

    --
    [Sir Garlon] is the marvellest knight that is now living, for he destroyeth many good knights, for he goeth invisible.
    • (Score: 2) by choose another one on Thursday November 06 2014, @02:32PM

      by choose another one (515) Subscriber Badge on Thursday November 06 2014, @02:32PM (#113522)

      Real programmers can write FORTRAN in any language...

    • (Score: 1) by GeminiDomino on Thursday November 06 2014, @02:33PM

      by GeminiDomino (661) on Thursday November 06 2014, @02:33PM (#113523)

      And PHP.

      Even VB6 couldn't come up with some of the horrible crimes against determinism that I've seen in PHP.

      --
      "We've been attacked by the intelligent, educated segment of our culture"
    • (Score: 2) by Marand on Friday November 07 2014, @03:35AM

      by Marand (1081) on Friday November 07 2014, @03:35AM (#113741) Journal

      But to write truly hideous code takes dedication and talent!

      Or a text editor and perl :)

      (disclaimer: I actually like Perl and have used it since the 90s, but I'd have to be a fool to deny that Perl makes it extremely easy to make some truly frightening, unreadable code)

  • (Score: 2) by Nerdfest on Thursday November 06 2014, @01:45PM

    by Nerdfest (80) on Thursday November 06 2014, @01:45PM (#113510)

    Some languages (VB, PHP, etc) seem to encourage it. Languages should make doing the right thing the easiest thing. They should also be consistent in the way they work, unlike JavaScript and PHP.

    • (Score: 3) by tibman on Thursday November 06 2014, @02:35PM

      by tibman (134) Subscriber Badge on Thursday November 06 2014, @02:35PM (#113524)

      They call it the "pit of success". You typically find it in "professional" languages. I think VB falls into the pit of success category though. PHP and JavaScript certainly do not because of automatic type-casting, recursive dependencies, prototype inheritance(js), very inconsistent function naming(php), and truthy/falsey values. C and C++ are not pit of success languages.. they are just pits : )

      --
      SN won't survive on lurkers alone. Write comments.
    • (Score: 2) by Thexalon on Thursday November 06 2014, @02:36PM

      by Thexalon (636) on Thursday November 06 2014, @02:36PM (#113525)

      For what it's worth, as someone who's colleagues and employers considered me to be a solid and productive programmer, the best code I've looked at for large applications has been written in Ruby, Python, or Java. The next tier I've seen was in C#, C, or C++. The code that made me want to find the programmer who wrote it and engage in a violent act so they could never code again was mostly written in PHP or Perl. Generally, what I've seen of Javascript is that its quality varies with the quality of the server-side code it's paired with e.g. people who write great Django apps write very good Javascript, while people who write security-holed PHP monstrosities write bad Javascript too.

      It wasn't so much that there was all bad code in PHP, or all great code in Python, as it was two trends in good languages (and opposite trends in bad languages):
      1. The good languages all make it easy to do the right thing.
      2. The good languages quickly established a culture of extensive documentation, testing, and overall code quality, encouraged by the language designer.

      --
      The only thing that stops a bad guy with a compiler is a good guy with a compiler.
      • (Score: 2) by Nerdfest on Thursday November 06 2014, @03:23PM

        by Nerdfest (80) on Thursday November 06 2014, @03:23PM (#113540)

        My experience actually matches yours pretty much perfectly, although I do see fairly good java programers writing fairly poor client side code in JavaScript. Part of it is probably inexperience in languages that are not strongly typed.

        • (Score: 2) by snick on Thursday November 06 2014, @04:03PM

          by snick (1408) on Thursday November 06 2014, @04:03PM (#113555)

          The biggest problem with Java programmers writing JavaScript is that way too many figure that they can just wing it. Because of the name, they don't realize that JavaScript is a completely different language, and try to use it like Java w/o types.

          Java is to JavaScript as Car is to Carpet.

          • (Score: 2) by meisterister on Friday November 07 2014, @01:50AM

            by meisterister (949) on Friday November 07 2014, @01:50AM (#113715) Journal

            But most cars have carpet in them, right?

            --
            (May or may not have been) Posted from my K6-2, Athlon XP, or Pentium I/II/III.
  • (Score: 1, Insightful) by Anonymous Coward on Thursday November 06 2014, @02:29PM

    by Anonymous Coward on Thursday November 06 2014, @02:29PM (#113521)

    Some languages make it far easier to write bad code. PHP is a good example of this.

    Some languages make it far harder to write good code. JavaScript is a good example of this.