"Clinical Trials" For Programming Languages? 232
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?"
That is a beautiful start of a ... (Score:5, Insightful)
long flamewar
Re:That is a beautiful start of a ... (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.
Re: (Score:2)
Re:That is a beautiful start of a ... (Score:5, Funny)
pissing off every programmer.
Well, everybody except LISP programmers ofcourse, as that will turn out to be the best language.
Re:That is a beautiful start of a ... (Score:5, Insightful)
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.
Re:That is a beautiful start of a ... (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.
Re: (Score:3)
Which is why language wars can get so flamey.. each one is heavily tangled up in cu
Re: (Score:3)
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 concret
Re: (Score:2)
I did something similar when learning some new languages, or getting back up to speed in languages I had only learned from a book. I'd write essentially the same program over again in the new language. It was helpful, however I think it had some drawbacks. You tend to want to re-create the same style you already have in the new language, rather than adapting to the new language's style. So I had to force myself to try and think like the new language wants.
Ie, you can port your basic procedural program t
Re: (Score:2)
The hardest thing to do for an accurate comparison is deciding on the measurements. Is it speed of processing, speed of programming, ease of maintenance? There are lots of different real-life problems that need to be
Re: (Score:3)
Re: (Score:3)
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
Re:That is a beautiful start of a ... (Score:5, 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
99 bottles of beer (Score:5, Informative)
There is already a pretty good collection http://www.99-bottles-of-beer.net/ [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/ [sourceforge.net]
Re:99 bottles of beer (Score:5, Insightful)
There is already a pretty good collection http://www.99-bottles-of-beer.net/ [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/ [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/ [debian.org]
http://benchmarksgame.alioth.debian.org/play.php [debian.org]
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.
Re:99 bottles of beer (Score:5, 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.
Re:99 bottles of beer (Score:5, 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 [usc.edu]. 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.
Visual Basic (Score:2)
Re: (Score:2)
The Debian Benchmarks game often over-specifies the problem by requiring a particular approach.
Simple Answer... (Score:2, Insightful)
...Some languages are good for some things, and other languages are good for other things. Think LISP.
Re:Simple Answer... (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!
Re:Simple Answer... (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...)
Re: (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 amo
Re:Simple Answer... (Score:4, 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..."
Re: (Score:2)
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..."
And someone from China just hacked it.
PHP is also good for people who want to make a webpage without understanding web security.
Re: (Score:3)
Well, I do a lot of java programming and young jsp/servlet developers often know nothing about HTTP.
Re: (Score:3)
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
Re: (Score:2)
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.
Re:Simple Answer... (Score:5, 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.
Re:Simple Answer... (Score:4, 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. ;-)
Re: (Score:2)
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. ;-)
Let's wait for them to get a handle on traditional HTTP first.
Re: (Score:2)
Re: (Score:3)
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 [veekun.com] at this point.
That's funny (Score:3)
My New Year resolution is to design and implement a new programming language every week.
Re: (Score:2)
I'm sorry, but to count as "new" you have to have something besides replacing the keyword "for" with "analsex" in ansi C.
Re: (Score:2)
Mark TFA troll (Score:2)
Is dice this desperate for clicks?
"...strengths of certain languages" (Score:5, Insightful)
Re: (Score:2)
Moreover even between similar languages superiority can be hard to measure. Take for example the very complex and long arguments on garbage collection. Or on lazy vs. eager evaluation: where lazy can be crazy powerful but in exchange can induce algorithms / code that often become quadratic in time and memory. And then on top of all that there are the cultural issues.
Better is simply not a granular enough metric.
Re: (Score:3)
The metric should be productivity with a modifier for the language's impact on the general mental and emotional well-being of the coder.
Re: (Score:2)
That's exactly the point. As the level of the language goes up you start thinking into terms of highly abstracted algorithms. Low level procedures become entirely opaque even to the programmer. I can see the Assembly code when I write C. I have no idea what the engine is doing in Visual Basic.
More than just intent (Score:2)
Yes, some languages do things better than others, but there's more to languages than that. A good question is how well the language meets its goals.
http://xkcd.com/1306/ [xkcd.com]
Some languages are simply more clean, have a more consistent syntax, etc. then others. For example, both Fortran 77 and 90 are aimed at numerical computation, but 77 has a weird syntax made for punch cards and other oddities; 90 is just better. (Flame on!)
Not feasible (Score:3)
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 ex
Re: (Score:2)
Python with the numpy library does absolutely everything. It's elegance, speed, and simplicity all rolled up into an open source package. Brilliant! ... no need to learn anything else.
I know people who spent their entire [programming] lives knowing Javascript and nothing else, but why? Why would you want to limit yourself that way? Suddenly it seems Python has become the hot new language.
What's next, a Python Machine? [wikipedia.org].
Re:"...strengths of certain languages" (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.
Re:"...strengths of certain languages" (Score:5, 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.
Re: (Score:2)
...
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.
...
Bingo! Mod parent up!
Python is the premier scripting language. It is far superior in usability and availability to the other options: "shell" (not a language but a collection of only quasi-compatible ones), and Perl (of VB we shall not speak). I use Python whenever I need to script something, like automating a task.
But it is not suitable for large application development. Sure it can be done, but there are no languages so bad that someone has not built a large application with it. But maintenance of these
Re: (Score:3)
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...
Maintainability? (Score:5, Insightful)
First Step (Score:2)
You'll have trouble getting a consensus as to an agreed-upon operational definition of "Productivity".
Maybe the *same* program? (Score:5, 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:
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
Re: (Score:2)
Whenever I try out a new language, one of the first things I do is implement the program described in the well-known paper [tc.edu.tw] by Lutz Prechelt: "An empirical comparison of C, C++, Java, Perl, Python, Rexx, and Tcl for a search/string-processing program". The program is not too big, but it gives a good feel for the features of a language and how fast it will run when you feed in a good-sized data set.
Over many years, I've done a couple of dozen implementations. However, I've found that the first impression afte
do you relly want apps that need 2-5+ runtimes (Score:3)
do you relly want apps that need 2-5+ run times and are very bloated?
it's been tried, but not extensively (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 [norvig.com] 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".
Re: (Score:2)
Excellent point. Though this is mainly high level vs. low level. For example Mathematica, PHP and Visual Basic often beat LISP in terms of productivity. Norvig was commenting that LISP beats Java while managing to also be faster than Java which is what is truly impressive.
Re: (Score:2)
the variability from programmer to programmer in how fast the program runs can exceed the variability between languages s
So true
Re: (Score:2)
Re:it's been tried, but not extensively (Score:4, 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.
Re: (Score:2)
At 20-10000 the standard libraries and defacto standard libraries of Java win.
Re: (Score:3)
Which is why clojure is the lisp all the cool kids use.
Re: (Score:2)
Lisp is more about functional programming style than list processing, and recursion is just one part of functional programming. Most Lisps out there have a decent variety of data structures to use and not just the list. Lisp tends to be the language most programmers are ignorant of even though most seem to want to make comments about it anyway. Ie, it can be compiled efficiently, can be used to do systems programming, used to create highly parallelized scientific code with competitive speeds, allows decl
Re: (Score:2)
The Lisp programs I've written have typically not been list processing, and recursion is the same in effect as iteration. In Lisp, you might spend a bit of extra effort to make sure you get tail recursion, which will normally be compiled to a normal loop. My observation is that Lisp is the best language if I don't really know what I'm doing yet.
Languages for professionals (Score:5, Insightful)
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.
Re: (Score:2)
I'll agree, and add that it takes a certain amount of time to get into the 'Zen' of any particular language. I've been programming since the 1970's, and lost track of the number of languages I have used. When I learned Python, I was productive immediately -- but my code looked more like C or C++. It took me a while to learn to think in 'Pythonic' code, with list comprehensions, generators, etc. Same for Prolog -- Prolog does not become natural in a week.
I'm doubtful that a week spent on any one langu
Re: (Score:2)
It's the same with foreign languages: You understand your own language much better if you have mastered at least on foreign one.
sort of (Score:2)
He also points out that Microsoft does something similar, they do usability testing for their APIs and languages, where a researcher sits behind a glass window, and watches programmers try to figure things out.
For pure efficiency, the benchmark game [debian.org] at least gives some data points. From
There is no language superiority (Score:3)
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 [paulwilliams.biz].
Re: (Score:2)
Yes, there most certainly is such a thing as language superiority. It can even be somewhat measured.
For example, if, to solve a problem, language A takes about 30 lines of extremely clear code that takes the programmer about an hour to do, that's obviously superior to language B that takes 1000 lines of gobbledygook that takes the better part of a week. Especially if, when both programmers get a change request to their little application, language A is modified and the update ready in 10 minutes while langu
Re: (Score:2)
And BTW, this post was a valid Whitespace [wikipedia.org] program until your renderer ate my tabs.
Re: (Score:2)
I've agreed with that for years. Haskell is like using a programming language out of 2025 today.
actual clinical trials are nearly impossible (Score:4, 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.
Enthusiasm, Free Time and Resources (Score:2)
Enjoy it while you can. Soon enough, job and family concerns will consume most of your attention.
Dr. Lizardo said it best: "Laugh'a while you can, monkey boy!"
aren't i so damn trendy? (Score:5, 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.
Re: (Score:2)
Being one who has strong preferences about languages and routinely wears white socks with sandals, which has seldom ever been trendy, I have to say you are reading less into the gripes about programming languages than is there. Reality sets in the 200th or so time you type out InsanelyAribtraryFUNCTIONName(Nonsensically:formatted.thing_with_obscure_british_spelling_of_colour) and realize that there really is no solid underpinning to the particular language and people pretty much make up APIs and interfaces
Wrong Metaphor (Score:2)
One of the hallmarks of a clinical trail is that a random group of humans will respond about the same to a given intervention (or lack thereof). And for things like drugs or a medical treatment it's an assumption you want to hold up for safety's sake. It doesn't always, of course. There is a drug on the market that is targeted specifically for African Americans, as it works really well in that population.
However, that assumption just don't hold for a random group of developers. Not even close.
Live and don't learn (Score:2)
After decades of enjoying the extreme and obvious productivity advantages of programming with dynamic languages in interactive environments, I continue to be baffled by the overwhelming preference for static, compiled languages. I understand there is a place for such things, much as there is a place for programming in assembly language, but I continue to wonder why such a clumsy paradigm is so dominant.
Re:Live and don't learn (Score:4, 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.
Re: (Score:2)
I have personally worked on a couple of different 20,000 line code bases in dynamic languages.
They worked just fine: in one case we had about 20 clients buying in for tens of thousands per system + 20 % maintenance, which required one senior and one junior programmer to maintain; the other was a system with about three programmers that accounted for about 1% of the trading volume on the NYSE.
You do not have systems in the millions of lines with dynamic languages because you do not need that many lines to do
New religion & flame war coming. (Score:2)
Different languages, different issues. (Score:5, 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.)
Re: (Score:2)
Might be a bit off-topic, but when the system gets (for example) 5 answers from 5 different computers, how do they make sure that the program/computer that reads and verifies those 5 answers is correct and fault tolerant?
Re: (Score:2)
Might be a bit off-topic, but when the system gets (for example) 5 answers from 5 different computers, how do they make sure that the program/computer that reads and verifies those 5 answers is correct and fault tolerant?
Don't know and don't know if that situation ever occurred. Any Shuttle computer systems experts out there?
In any case, here's a link to a paper titled, Redundancy Management Technique for Space Shuttle Computers [psu.edu]
A good lesson (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.
Re: (Score:2)
I'm not sure I would generalize too much from Perl. Perl had a terrific run going from a text processing language to a system admin language to the standard for web development. Then it moved towards applications development. And then it faltered badly. They responded to the faltering with an overly ambitious and poorly managed next version which has sucked the life out of the language.
Perl is an example of picking a technology that died. Lots of people who have picked lots of technologies they thought
Re: (Score:2)
They responded to the faltering with an overly ambitious and poorly managed next version which has sucked the life out of the language.
Python is in the middle of a 'next-version' crisis, too.
Re: (Score:2)
In a perfect world, you pick the right tool for a job. In the real world: your customer or your boss choses the (right, not so right) tool for the job. /. are Java haters, nevertheless many of those work with Java. The other half are C# haters but nevertheless work with .Net/C#
Half of
The rest are Python and Perl lovers, but work with C/C++
AFAICT: there is no real world. There are only plenty of dream worlds. It is up to you if your dream world is occupied/ruled by a nightmare.
Re: (Score:2)
...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....
These types of questions are finding out your breadth and depth of knowledge about data structures and algorithms. No, you cannot become proficient in this area in a few hours. You need reasonable proficiency to even be able to intelligently Google the appropriate specific knowledge. I find that knowledge of data structures and algorithms is essential for being a competent programmer.
What I'm trying to do (Score:5, Informative)
Re: (Score:2)
If understand correctly: 52 projects in 52 languages in 52 weeks? A high school junior? You're nuts for even trying this.
I like that. :) Good luck, have fun, and I hope you learn a lot. We each have our ways of learning programming and this seems like an interesting way to do it.
Re: (Score:2)
Using a week to learn a language and do a small project on it isn't that crazy. The problem is just that after week 30 or so, you start to run out of sane and useful languages (unless you dig into the obscure) and end up experimenting with brainf**k.
Re: (Score:2)
(unless you dig into the obscure)
Which is worth doing. APL FTW!
Re: (Score:2)
Yepp, welcome! ... hm roughly 1965 (yes, 1965, not only 1985)
However you could have googled for your questions rather than asking here and claiming in your question that there never has been any study.
The world is full with studies about various languages or concepts since
The best language is your best language (Score:2)
We all know innately know this, but sometimes it's hard to avoid getting caught up in a religious debate about the apples-to-oranges details.
Once your language is at least complex enough to write a compiler or interpreter for itself - that is, it's no longer a toy language - it tends to be more or less capable of everything every other language is capable of. Sure, it might not be the best tool for a given job, but they're all generally the same aside from some syntactic sugar.
The more important thing is t
Re: (Score:2)
Thank you. It's like asking what language should diplomats use to negotiate a peace. Obviously, the most productive language is the one in which people are extremely competent and comfortable using...until they need to describe the the 27 types of snow, in which case they can switch from a European language to an Eskimo language to better express the concept. I assert a language's strengths and weaknesses for an idealized problem are trivial...compared to the strengths and weaknesses of the individuals
Re: (Score:2)
Re: (Score:2)
Re:All hail Python! (Score:5, Insightful)
Re: (Score:3)
Re: (Score:2)
Re: (Score:2)
Then I'd rank them by time to completion.
Seems simple enough but it ain't.
Which completion--the time it took you to write the code or the time it takes the code to execute?
If one time period is longer and the other shorter, which takes precedence?
It is hard to devise a good test. And it's even harder to articulate the expectations thereof.