Slashdot Mirror


"Clinical Trials" For Programming Languages?

theodp writes "High school junior Charles Dawson's New Year resolution is to write a new program in different language each week. It's an ambitious project for someone of any age, and while it won't give him an in-depth appreciation of programming language differences, it'll certainly give him greater insight into the strengths of certain languages than would perusing the Hello World Wikipedia article. Lots of claims are made about the comparative productivity of programming languages, but have there been any landmark studies that measure the efficacy of a programming language's productivity claims in a 'clinical trial' of sorts? Would head-to-head tests against other languages be a better way of sorting out Popularity vs Productivity vs Performance claims, or is relying on more nebulous claims of superiority the best we can do?"

48 of 232 comments (clear)

  1. That is a beautiful start of a ... by Anonymous Coward · · Score: 5, Insightful

    long flamewar

    1. Re:That is a beautiful start of a ... by Anonymous Coward · · Score: 4, Funny

      long flamewar

      To do this flamewar properly little Charlie Dawson should post his findings every week so we can keep this thing going until he finally realizes his dream of pissing off every programmer.

    2. Re:That is a beautiful start of a ... by DuckDodgers · · Score: 4, Insightful

      It shouldn't be a flame war. In order to make a meaningful comparison between two programming languages I think you need to have a high level of skill in each, and write two feature-equivalent non-trivial programs in each.

      Most of the flame wars are between people who don't have good expertise in at least one of the languages under discussion, arguing about merits and drawbacks in simple programs.

      I think what Charles Dawnson plans will be interesting, educational, and fun, but you can't become good enough in a language in a week to have a useful opinion on its effectiveness at creating the next social network, operating system kernel, C compiler, web browser, search engine or office suite.

    3. Re:That is a beautiful start of a ... by alex67500 · · Score: 4, Funny

      It's only a flamewar until you agree that there are 2 types of programming languages:
      - Those everyone bitches about
      - And those nobody uses

    4. Re:That is a beautiful start of a ... by DuckDodgers · · Score: 2

      If you can master Haskell, Lisp, Perl, and J in one week each, more power to you. I can't.

    5. Re:That is a beautiful start of a ... by brausch · · Score: 5, Insightful

      The real problem is that different languages are often created to solve different problems. You can't really compare them very easily with any single program, no matter what non-trivial program that you use. For example, C is a better programming language than Javascript for some problems; Javascript might be better than C for some other problems.

      I'm advanced to expert in about six languages and have decent experience in a dozen others. I've settled on about four that I use a lot, and that fit the kinds of problems that I work on. Other equally skilled and experienced programmers (programming for over 40 years) would choose a different set of languages better suited to solving the problems they routinely work on.

      It's kind of like trying to compare the toolbox of a plumber with the toolbox of a mechanic. There is overlap of course but there are also specialized tools.

      --
      "Almost every wise saying has an opposite one, no less wise, to balance it." - George Santayana
    6. Re:That is a beautiful start of a ... by jythie · · Score: 2

      Making it even worse, different languages are not only designed to solve different technical problems, but they are designed to solve different HR problems. How easily one can get developers who are both familiar with the domain AND the language, or know a language so close that transitioning is easy (i.e. why most languages looks like C) is just as critical as in how well a language fits a project as the technical aspects.

      Which is why language wars can get so flamey.. each one is heavily tangled up in culture.

    7. Re:That is a beautiful start of a ... by mwvdlee · · Score: 4, Funny

      pissing off every programmer.

      Well, everybody except LISP programmers ofcourse, as that will turn out to be the best language.

      --
      Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
    8. Re:That is a beautiful start of a ... by Darinbob · · Score: 2

      I think that in a week you might not even learn the concepts, unless you already know of them from other languages. Ie, if you know Smalltalk pretty well, then you can figure out what Java is about in a week, if you know SML pretty well than you'll figure out Haskell in a week, etc. However if you don't know the foundations of programming languages (ie, have no idea what a closure is or functional vs procedural) then you won't learn more in a week about a new language than the syntax and some semantics.

      Ie, if someone sees C# as a new and different language then they will have trouble learning it quickly, but someone who sees it as a synthesis of several older languages and ideas will find it quick to learn (even if they don't understand the new fangled terminology placed on old ideas).

    9. Re:That is a beautiful start of a ... by VortexCortex · · Score: 2

      Making it even worse, different languages are not only designed to solve different technical problems, but they are designed to solve different HR problems.

      I agree. That does make them worse. C++ wouldn't be where it is today if it didn't incorporate C -- This is both a good and a horrible thing to realize if you look at the state of things.

      However, the "different language for different people" problem is one created by humans. You see, C is the way it is because it tries to minimally abstract the operations common to Von Neumann machine architecture. Nearly all modern languages fail in two respects: They are either too abstract and dynamic or too concrete. Humans therefore select a language matching the problem space's requirement, and simply ignore the deeper problem.

      The problem is in the encoding of the language itself: The preconceived paradigms / use cases. Take JavaScript for example. It's dynamic variables and prototype design create huge problems for performance, but it was created to be a "glue" between web pages and Java, so performance wasn't a design goal. Java did a lot of things right language wise, but its runtime is too bloated because the use case was assumed to be anything: Instead of an applet being an embedded isolated Java program with only resources its containing browser gave it they included the whole kitchen sink and the massive exploit surface thereof. Take C for example: It has a quite foolish function stack based assumption whereas heap based functions can easily be coroutines and have closures. However, given the limitations of older hardware it was a good assumption of the use case. It's the difference between a full featured garbage collector (Lisp) and a mark/release garbage collector (C) -- We're garbage collecting function call instances.

      Many humans are so arrogant or ignorant that they proclaim the language domain to be what makes or breaks a language, meanwhile completely ignoring that over the years the x86 chipset has been modified to better optimize for C's function-stack paradigm, see the ENTER and LEAVE opcodes for instance. ARM even has these restrictions. This makes some languages perform terribly compared to others because some follow the same assumed use case as the hardware and some languages do not. For instance, one of my toy languages doesn't use ENTER and LEAVE since it operates in an OS that isolates stack variables and parameters from the function return pointers, and thus a near identical batch of code in C runs many times faster. So, you must consider the extreme effect the hardware domain has on the language domain, and vise versa.

      Failure to completely embrace the a use case (in the name of being "general purpose" hardware, yeah right) leads to retardation of progress in many respects: Notably the majority of exploit vectors is due to the moronic decision to maintain a single stack for instruction pointers and data. This is reinforced by hardware in the ENTER and LEAVE instructions themselves. You see, the instruction pointer can not be directly manipulated, the humans at least got that part right, but then they failed to create a separate dedicated return instruction pointer stack. Granted the instruction pointer is isolated not for security's sake, but you can see why it's foolish to embrace a function-stack approach and not also isolate the return pointers thereof from the parameter data.

      Hardware even dictates the type of OS design that is practical: A single bit of execution privilege ring (Kernel or User) on ARM means it will be host to monolithic kernels due to their hardware supported security offerings. On x86 I have 2 bits (4 rings) thus can create microkernels and isolate plugins from user processes too: (Kernel, Driver, User, Plugin). These can run on ARM, but I sacrifice my guarantees in many respects -- Treating drivers, users, and plug-ins as all user mode processes using memory for isolation can create unnecessary complications and performance penalties. The po

  2. 99 bottles of beer by jbolden · · Score: 5, Informative

    There is already a pretty good collection http://www.99-bottles-of-beer.net/

    There is also a website with the implementations of the Perl cookbook in a bunch of languages: http://pleac.sourceforge.net/

    1. Re:99 bottles of beer by Savage-Rabbit · · Score: 5, Insightful

      There is already a pretty good collection http://www.99-bottles-of-beer.net/

      There is also a website with the implementations of the Perl cookbook in a bunch of languages: http://pleac.sourceforge.net/

      Where performance is concerned I'd go for something like the Debian Benchmarks game. The time taken for this benchmark task, by this toy program, with this programming language implementation, with these options, on this computer, with these workloads. With enough people participating in the pissing contest you eventually get things optimized to hell and the wheat is separated from the chaff.

      http://benchmarksgame.alioth.debian.org/
      http://benchmarksgame.alioth.debian.org/play.php

      As for productivity, that's harder since this is highly subjective. While you can generally postulate that coding in non typed scripting languages where you don't have to worry about memory management is going to be faster than coding in a typed, manually memory managed language like C. But what happens when you compare more similar languages like Python vs. Perl? Your productivity in a language is highly dependent on your experience with it, how fast you are at typing, how intuitive the syntax is to you.... etc... But different programmers can have different issues with languages. In Perl for example the syntactic freedom can actually lead some programmers to write bugs bugs into their code because they are used to languages with a more nailed down syntax.

      --
      Only to idiots, are orders laws.
      -- Henning von Tresckow
    2. Re:99 bottles of beer by plover · · Score: 4, Insightful

      Productivity is a tough one, but it's by far the most important. That's what we get paid for.

      A good competition might be to start with a functional test, and just let developers "swing away" at it. Or you might add real world constraints that development organizations want to see, such as requiring 95%+ code coverage with unit tests, keeping complexity below 12, and it must pass lint / pmd / fxcop / other static code analysis tool with no warnings or errors. Maybe it has to pass a code review, too. The functional test would have to pass ensuring it does what it's supposed to do, and maybe it would need to pass a fuzz test to ensure it doesn't break under strain.

      And you would need to run different contests for different categories: web apps, services, operating systems, embedded systems, phone apps, etc. Not all problems are created equal.

      --
      John
    3. Re:99 bottles of beer by jbolden · · Score: 4, Interesting

      Terrific suggestion regarding Debian benchmark!

      There are some pretty good stats on productivity from Cocomo II group: http://csse.usc.edu/csse/research/COCOMOII/cocomo_main.html. First off you measure in terms of normalized lines of code which ends up being close to the same across languages. From there you can examine how large programs are in varieties of languages in terms of normalized lines of code and you get productivity measures:

      Assembly .4
      C 1
      COBOL 1.5
      C# 2.5
      Java 2.5
      Visual Basic 4.5
      Perl 6
      SQL 10

      etc...

      Perl vs. Python for relatively similar levels of experience I'd assume the differences in productivity is going to be close to 0. You seem to need rather dramatic differences on high/low level scale to get much of a productivity boost. So for example C# and Java are both 2.5; Perl and Smalltak are both 6.

  3. Simple Answer... by Anonymous Coward · · Score: 2, Insightful

    ...Some languages are good for some things, and other languages are good for other things. Think LISP.

    1. Re:Simple Answer... by glavenoid · · Score: 5, Funny

      PHP is unparalleled for people who want to make a webpage without having to understand HTTP.

      Or PHP for that matter...

      (...kidding...)

      --
      I, for one, am looking forward to the inevitable /. beta rollout fallout.
    2. Re:Simple Answer... by ls671 · · Score: 2

      Well, I do a lot of java programming and young jsp/servlet developers often know nothing about HTTP.

      --
      Everything I write is lies, read between the lines.
    3. Re:Simple Answer... by K.+S.+Kyosuke · · Score: 5, Funny

      Master Po: The Tao gave birth to machine language. Machine language gave birth to the assembler. The assembler gave birth to the compiler. Now there are ten thousand languages. Each language has its purpose, however humble. Each language expresses the Yin and Yang of software. Each language has its place within the Tao. But do not program in COBOL, Grasshopper, if you can avoid it.

      Grace Hopper: My name isn't Grasshopper, and I will program in whatever I want!

      --
      Ezekiel 23:20
    4. Re:Simple Answer... by Anonymous Coward · · Score: 3, Insightful

      Why kidding? That is one of the strongest points for PHP and VB. Those are languages that you should recommend to someone who wants to write something without learning how to program.
      Sure, the result isn't something you should take to production but any programmer who deals with people who doesn't program knows that there aren't a shortage of ideas that it would be wasteful for a programmer to implement.
      I think that the support to throw quickly throw together unmanageable crap is a bit under-appreciated among programmers. Sometimes a program is only meant to be ran once.

    5. Re:Simple Answer... by plover · · Score: 3, Informative

      Srsly? Do you know how stupid executives are? "Hey, that web page that my nephew wrote, it does what we need, put it into production." A week later you get this email: "We need you to maintain it - add a loyalty registration page to this thing here, and we're getting complaints about response time..."

      --
      John
    6. Re:Simple Answer... by RabidReindeer · · Score: 4, Interesting

      PHP is unparalleled for people who want to make a webpage without having to understand HTTP.

      How does knowing HTTP help you at all when making a webpage? I've written my own HTTP server, but that doesn't seem to help my web programming at all.

      You would not believe how many people think that HTTP is just like old-time conversational remote applications programming. They think that once you connect to the server you stay connected and 2-way asynchronous communications are the norm. They don't understand that HTTP is a touch-and-go protocol with a strict 1-1 request/response cycle.

    7. Re:Simple Answer... by skids · · Score: 2

      Perl5 CGI::. text/html and response code of 200 is the default returned by header().

      There are also tricks to get PHPish code-embedded-in-static-content look and feel from Perl, but mostly people don't use that due to a general recognition that only those crazy PHP coders want to deal with that level of clutter and it's better to keep the markup inside your quoting constructs.

      Anyway, futher lambasting PHP would be BTDT at this point.

    8. Re:Simple Answer... by K.+S.+Kyosuke · · Score: 3, Insightful

      They think that once you connect to the server you stay connected and 2-way asynchronous communications are the norm.

      That's what WebSockets are for, after all. ;-)

      --
      Ezekiel 23:20
    9. Re:Simple Answer... by bzipitidoo · · Score: 2

      Well HTTP/XML/SGML is a terrible language. It's overly verbose and redundant and overly complicated.

      The verbose part is that closing tags must repeat the name used for the opening tag. The designers thought that would make it more human readable, and it did not. It just added clutter, ironically making it less human readable. There are several other features that add to the bloat, but that's the big one.

      And as for excessive complexity, how about properties? Why couldn't that have been handled with specially named tags, instead of introducing a whole separate layer of further syntax to parse? Instead of <H1 align="center">header text</H1> should have <H1><align>center</>header text</>. Plus, they weren't even consistent in using that syntax solely, as there are such tags as center, and b, u, and i for bold, underline, and italic. It wasn't necessary or useful to enshrine this huge distinction between data and metadata in the syntax like that.

      --
      Intellectual Property is a monopolistic, selfish, and defective concept. It is "tyranny over the mind of man"
  4. That's funny by StripedCow · · Score: 2

    My New Year resolution is to design and implement a new programming language every week.

    --
    If Pandora's box is destined to be opened, *I* want to be the one to open it.
  5. "...strengths of certain languages" by jdeisenberg · · Score: 4, Insightful

    And therein lies the problem of comparisons. An extreme case: a person writing a program that involves concurrency among hundreds of processes will probably be more productive in Erlang than in Perl, but a person writing a program that does massive amounts of text manipulation will be more productive in Perl than in Erlang, because of what the languages were designed for. It's somewhat like asking which is a better tool, a hammer or a screwdriver. A lot of it depends on what you're trying to build.

    1. Re:"...strengths of certain languages" by Anonymous Coward · · Score: 5, Interesting

      As someone who programs professionally in many languages, with about 85% of the last few years at the day job in Python (+ many years with 2 and now 3), I can attest Python has its merits, but elegance is hardly one of them. The language, standard libs, and popular third party tools are among the lower-tier of anything I've ever used.

      If we forget all the other faults of python, consistency and predictability are hardly core advantages of python (no, dicts/kwargs/args aren't elegant at all). If we think about other things:

      -the package management is atrocious (even with virtualenv), but more a tooling than a language issue you could say
      -there still isn't what I would call great IDE support given the limitations of parsing a language like Python
      -the language has changed from major versions in some pretty drastic ways, which hardly points to good design overall vs. other languages
      -unicode in python 2 wasn't even the default...wtf
      -the "flexibility" leads to wildly different ways of handling things
      -the back and forth on things like handling lambdas and anonymous functions elegantly over the years is hardly, well, a sign of elegance
      -rampant abuse of modules vs. classes
      -__init__ is basically a huge wtf
      -problems with circular imports

      If you want something that is actually elegant, I'd suggest starting with a number of research languages. If you want something that has at least been used in major projects and proven in the field, even if not the most popular, go ahead and give Smalltalk, Lisp, and consequently Clojure a try if you seek elegance. Sorry, but I have to say Python in comparison is a toy compared to any of these languages. I'd gladly shoot the language in its face if it were legal and never wish it on my worse enemy, but hey it's a god send compared to php, perl, and many others so there's at least that.

      What I tend to find is that programmers who have never used languages that can handle data structures using the core libraries and syntax of the language are easily impressed. Python list comprehensions are a good example of something that aren't that great, but "wow" if you've never seen anything that can operate on sequence or blocks before. Typically these people were C, C++, PHP, VB, or other programmers. People who worked in Lisp and/or Smalltalk are wondering how other functional, object oriented, and hybrid languages could seriously screw things up so bad when they had the benefit of hindsight.

    2. Re:"...strengths of certain languages" by skids · · Score: 2

      The metric should be productivity with a modifier for the language's impact on the general mental and emotional well-being of the coder.

    3. Re:"...strengths of certain languages" by lgw · · Score: 4, Informative

      I only programmed in Python for about 6 months professionally, but I want to echo the experience. Python blows goats for large projects, for all the reasons mentioned above. Python is awesome for writing small projects (say, a programmer-year or smaller) in a way that's real, maintainable code and not a throw-away script.

      Ultimately, I don't think you can have a language that good for both small and large projects. Large projects need structure that just gets in the way for smaller efforts.

      Also, I have to agree with the :list comprehension" thing - all modern languages eliminate boilerplate for-loops for list processing (except Java - man I hate Java - but maybe it's better in Java 8?). Even C++11 now has good enough lambda support to get rid of the for loops for containers. Heck, I think even VB got the LINQ extensions that C# did to allow proper list processing.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    4. Re:"...strengths of certain languages" by dkf · · Score: 2

      there are no languages so bad that someone has not built a large application with it

      Actually, there are loads of them. They're typically called toys, usually on the grounds that they lack a full interface to the OS or a proper library mechanism (you won't go very far without those). But they're still programming languages, and if you exclude them you've strongly biased your sample.

      I doubt you'll find many people who have written a web browser in Befunge...

      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
  6. Maintainability? by cjonslashdot · · Score: 4, Insightful

    In any such trial, it is important that aspects such as maintainability, reliability and securability be considered. The ability to hack out a-lot of functionality is not the only criteria that is important, unless you are building a home hobby project.

  7. Maybe the *same* program? by CompSci101 · · Score: 4, Interesting

    I have this same problem -- there are a lot of interesting languages out there that I'm interested in trying, but I always keep going back to languages I already know because:

    1. I have work to do; and
    2. it's hard to objectively compare language merits in the short term or for trivial projects.

    I was thinking that the solution to this is to have one program that I understand very well implemented as well and completely as possible in a language that I feel proficient in, and have that be my reference. Then, over the course of a couple of weeks (a month?), re-implement the same program in the new language and strive for the implementation to be as idiomatic of the new language as possible. After all, if you're still thinking in the old language but just using the new one's syntax, what's the point?

    I feel like this would give you a lot of data to make a reasoned decision -- you can compare language features and how the implementation works in one versus the other; time to implementation (LOC, maybe?); how much of a mental shift the new language requires; the toolchain around the new language; etc.

    The problem is figuring out what the reference app is, and having the stomach for implementing it over and over again. Tetris, maybe? ;)

    But, back to the resolution (and partially touched on) -- I don't think a week is enough time. A month is even cutting it close, IMO.

    C

    --
    The Sun is proof that we can't even do fire properly.
  8. do you relly want apps that need 2-5+ runtimes by Joe_Dragon · · Score: 2

    do you relly want apps that need 2-5+ run times and are very bloated?

  9. it's been tried, but not extensively by Anonymous Coward · · Score: 5, Informative

    The answer is research is sparse in this area, but the few times it's been tried (using competent programmers in each language rather than conflating learning the language and productivity in it), is LISP and LISP-like languages win when measuring programmer productivity and ability to express complex algorithms in small amounts of code, and C and C++ like languages win for ultimate ability to make the program run fast. But the variability from programmer to programmer in how fast the program runs can exceed the variability between languages so it pays to get high quality programmers who have an intimate understanding of both efficient algorithms and the underlying machine architecture, rather than think "the language will make the program run fast".

    1. Re:it's been tried, but not extensively by jbolden · · Score: 3, Insightful

      As contrasted with Java? Unless you want something that is really in Java's forte (i.e. working the a Java library) I'd be hard pressed to see where LISP is likely to lose.

      Now the issue of course is as the number of programmers increases LISP's idiosyncratic behaviors and allowing each developer to express their individuality go from huge advantages to huge disadvantages. At a million+ lines of code Java's maintainability and standardization become key features. But at say 20-10,000 I'm hard pressed to see much that LISP wouldn't win at.

    2. Re:it's been tried, but not extensively by ChunderDownunder · · Score: 2

      Which is why clojure is the lisp all the cool kids use.

  10. Languages for professionals by gnasher719 · · Score: 5, Insightful

    With everything, there are professional users and amateur users. For amateur users, it's important to get reasonably good results with relatively low effort without much learning. For professionals, what counts is the effort for projects the size a professional does, after learning a lot.

    Trying a new programming language every week cannot give any useful information to a professional user, because the language can only be judged on how well it works for inexperienced developers on tiny projects. That's not what professionals do.

  11. There is no language superiority by Aviancer · · Score: 2

    This is a myth. There is only suitability to solve a problem within a given context. At first, it's "how fast can I bring this to market", then "how does this scale" (in terms of execution efficiency). Finally, "can I hire people to do this?"

    The starting point is inevitably what the initial implementer is most familiar with (or infatuated with) at the moment.

    A few weeks ago, I wrote an article about how asinine this technology argument is.

  12. actual clinical trials are nearly impossible by Trepidity · · Score: 3, Funny

    Some key features of "gold standard" clinical trials: 1) large enough sample size to draw statistically significant conclusions; 2) real illnesses, not a simulated laboratory setting; 3) a double-blind control group; and 4) long enough duration to measure real-world outcomes.

    The programming-languages version would be to have teams randomly assigned to perform major (6+ month) programming projects in different languages, and then see their outcomes. For example, 40 game studios will continue to write their games in C++ as the control group, while you'll have the other 40 write them in Haskell. You probably want to iterate a few times as well to make sure that there's no first-game-in-a-new-language effect and to ensure that everyone is actually knowledgeable in the language being tested.

    Oh, and it should be blind, so neither the teams nor the researchers know which language they're using.

  13. aren't i so damn trendy? by Connie_Lingus · · Score: 4, Insightful

    it's my observation that programming languages have become the equivalent of fashion and bands.

    it's as if choosing and using one is like saying "oh, im listening to arctic monkeys and calvis harris these days, and that makes me feel liberated from those plebs still listening to kings of leon and david guetta..and MAYBE if im lucky someone will be impressed by my trendiness"...now that so many 20-somethings code, they all seem to feel the need to break from the "boring old bonds" of existing languages and define themselves among their peers by how esoteric their language-de-jour is.

    what this guy is doing is illustrating the point, he isn't going to learn anything about the benefits of each "language" or how to maximize productivity...it's just a "notice me notice me" stunt.

    it's just a silly exercise in syntax-swapping anyway for 90% of it...

    please don't get me wrong...it's totally fine by me whatever language you want to use, as long as it's maintainable and there is a large enough pool of existing programmers who know the language so when you leave my company because your bored with maintaining the code you wrote, i can find someone quickly and affordably to replace you.

    --
    never bring a twinkie to a food fight.
  14. Not feasible by Bite+The+Pillow · · Score: 2

    Repeatability. Productivity must be repeatable if any measured claims can be made, and no one does the same thing twice.

    Even if you write similar code for a similar purpose, you have the backing of experience. The results are different even if you end up with the same code.

    And, there are the os and third party libraries. I can save time by using such features, if I take time to learn them.

    There is a post below about maintainability, securability, etc, all of which are good points, but will rarely be done exactly the same way. Especially since some are intended to be server side, where obscurity is possible, and some client side where you may need real security.

    Any such study will have questionable conclusions due to the number of variables. Writing new code vs inheriting, where the choice might be maintain or rewrite in a new language.

    But none of these will be applicable to an entirely new situation, and any study results irrelevant. Repeatability in code means studying something that will probably never happen again, or something so basic it will never represent normal professional usage.

  15. Re:I'll tell you what I'm doing ... by larry+bagina · · Score: 2

    Look on craigs list. You can get it for $1-$2,000.

    --
    Do you even lift?

    These aren't the 'roids you're looking for.

  16. Different languages, different issues. by fahrbot-bot · · Score: 4, Interesting

    There are good practical reasons for writing the same program in different languages. (1) People often make the same mistakes in the same language, because they are often taught/trained in similar fashions. (2) Different programming languages have different issues and failure modes.

    I'm not an expert, but I worked as an undergraduate research assistant on a project way (way) back in college (1985-87) for a professor on a NASA contract to study issues related to N-version fault tolerance - like used on the Shuttle, where several computers solve the same problems and vote on the answers. One problem (if I remember correctly) was that the different programs, written by different people, in the same, or same type of, language often failed on the same or similar edge cases.

    The experiment was to implement the same solution to a problem using much different languages. In this case, Pascal and Prolog. The "gold" Pascal routine was already written and my task was to write the corresponding "gold" routine in Prolog. [ I also did work for a related study in the automatic analysis (and execution) of abstract data types in LISP.] I graduated before the experiment was run, but found the idea as least plausible.

    Note that I might be remembering some of this incorrectly as it was a while ago and I was only an undergrad. (They wanted a graduate student, but I was the only one with LISP and Prolog experience... And $9.50/hour wasn't bad for 1985.)

    --
    It must have been something you assimilated. . . .
  17. Re:Live and don't learn by jbolden · · Score: 3, Insightful

    Because the productivity doesn't scale well as projects get larger. Dynamic languages are amazing at 20 line programs. They are pretty hot at 200 lines programs. At 2000 lines you are starting to feel the minus but they still work well. At 20,000 things start going badly wrong. By 2m, well there are 2m line programs mostly because all those things that are good about a dynamic language for 20 lines turn into disadvantages when you need hundreds of programmers to work together.

  18. A good lesson by jgotts · · Score: 5, Interesting

    It's a good lesson, but for different reasons. Here's why.

    In the real world, you pick the right tool for the job. You never pick a language because it's the best language. There is no such thing. Factors going into language selection where technical merit plays no role include what the other developers at the company and/or the project are using, what environment you're using (if Apple, then Objective C; if Android, then Java), what language the code you are maintaining was written in 5, 10, 20, or 30 years ago, and (hopefully if you are a great programmer this will be a minor issue) what languages you're comfortable with using.

    After 30 years I've learned that basic computer science concepts are helpful, but only to a point. Google may want you to know specifics about certain types of trees for their interview process, but if you need to know that level of detail for a job, you spend a few hours on Google and learn it. The same goes for languages. Figure out what you need with a bit of research before you start the job. You should have a great idea of what environments a language is nearly always used, so you don't try to do something weird nobody can maintain. If you're going to write an iPhone app, you're going to adhere to whatever specific Objective C thing Apple is doing. Maybe I'm slightly out of date and Apple is doing something else, who knows? I don't work in that space.

    Python everywhere, be damned with you, is a quick way to make enemies of people 10-20 years down the road who have to maintain your code. I was doing web development in the 1990s, and everybody used Perl. For everything. Now I work with a legacy Perl code base, and mod_perl seems to be completely abandoned, and it certainly hasn't been released for apache httpd 2.4 yet. We're using Perl because we have to, but not for new stuff. But for the Perl part of our system in bug fix maintenance mode, it is the appropriate language. We didn't have the attitude that we'd continue to use Perl for everything just because that's the way things were done. We were flexible enough to slowly switch over to PHP for certain things that we had been using Perl for.

    Avoid fads like the plague. After 30 years of programming, I just ignore marketing. I have no gee whiz attitude about anything. I focus on perfecting my craft, learning how to program better, to debug better, to test better. Learning how to deliver code that works now and five years from now. All that is way more important than figuring how how some language is subjectively the best.

  19. What I'm trying to do by cdawson · · Score: 5, Informative

    Hi everyone. Thanks for all of your comments. I just want to quickly elaborate on why I'm doing this and what I'm trying to do with this project: I am not trying to start a flamewar, annoy programmers, or hog attention. I am not aiming to master any of these languages after only a week. I'm not even trying to get "okay" at any of them. All I'm trying to get out of this project is a more broad understanding of the languages that are out there, and what, in a very general sense, each language is good for. My thought is that if I can get even one cool new idea or concept out of each week's programming language (like functional programming concepts from this week's foray into Haskell), I'll consider this project a success. Also, it will allow me in future to be able to quickly reference a new language if I need it for something I'm working on (not necessarily remember any syntax or anything, but at least to save myself some googling time). Thanks for your interest. Sincerely, Charles Dawson

  20. Re:All hail Python! by TsuruchiBrian · · Score: 4, Insightful

    As someone who pretty much only codes in python lately, I would agree except that I hate the fact that whitespace actually matters in python. I feel that this limits the utility of python while gaining only a modest increase to readability (according to some people).

  21. Re:All hail Python! by Rhacman · · Score: 2

    I tend to agree. One thing I find annoying is that in order to temporarily comment out the body of a conditional you have to add a "pass" line. The ability to add members to classes at runtime has also created some situations for me that were very confusing to troubleshoot.

    --
    Account -> Discussions -> Disable Sigs