Programming Languages - Hammer Principle
hammerprinciple.com
hammerprinciple.com
Jesus christ guys. It were probably others than visitors from HN (most here are a little more thoughtful and less trolling), but if there is nothing but negativism on the PHP page (I can't find a single positive point) then why in the world are we all using it? Why does almost everyone know the language? Why is it one of the biggest languages on the planet?
I don't trust this site anymore just because of the first item I happen to look at. PHP may or may not be a horrible language, but certainly it has some good uses and advantages to other languages, or it would never have become popular at all. Perhaps it's just because PHP is so easy and that's the only reason. I'm not saying it is, but it might be. But then at least that should have been written on the page.
>Jesus christ guys.
Despite the poor design considerations and wanting to kill off some of these languages, (or-rehaul them and not being able to) many of us still have to use them day-to-day. This is one of those things that convinces me that there is a God, and he's got a twisted sense of humor. I can't really explain it otherwise. :p
Of course, if you take each case individually, you might want to consider other languages. But having to learn another ten programming languages which are slightly better for a job than PHP is, costs a lot of time and effort.
PHP is a great language, if you get used to the weird and inconsistent function names.
This is where I disagree strongly: as a programmer you should already know all ten of them [languages] and constantly be on a look out as to which of them use where. While in time my set of immediately usable for not trivial tasks languages was morphing significantly, I tried to keep my toolbox full, maintaining a solid 6 (my mind seems comfortable with that many) languages ready for work.
There are some minor points I disagree with, for example, Python, Ruby, Perl and node package managers are all very good, while PEAR is/was a pain to use (a pain: I couldn't install desired package in a minute on the first try) and so on, but it's irrelevant: what I object to is a notion that it is not worth knowing or using different tools because the one you know already "offers it all".
And as I said, there are situations you'd think of another language than PHP, but that doesn't mean programming in PHP is a bad practice.
Of course not! We are agreeing on this - I'm just noting that programming exclusively in PHP (or any other language for that matter) is bad practice. I have nothing (or not very much) against PHP :)
-- EDIT --
> Why does almost everyone know the language?
If anything, it is that almost everyone can dabble in PHP and ^C^V some code. IMHO real knowledge of PHP and its ecosystem seem to be quite rare -- judging by reading some published code, which was as generic and un-PHP as possible, and by comments attached to the official docs.
I don't know, I think it's a good prediction. Look at this chart for example (yeah, I know... tiobe isn't necessarily an accurate indicator but still):
http://www.tiobe.com/index.php/paperinfo/tpci/PHP.html
In the 2000s, PHP was everywhere. But recently, Rails, Django, Node.js etc. seem to be much more prominent. Maybe thinking of PHP as a fad is slightly... optimistic, but I wouldn't call it "wishful thinking" as if PHP was here to stay forever as one of the most popular server-side languages.
I'm not saying PHP is going away this year or the year after that, but consider that some languages that go back to the 50s (Lisp) are enjoying newly revived popularity (Clojure). Do you really think this would happen to PHP in 2050?
* Perl CGI's, and, later on, mod_perl. Worked pretty well, and Perl is a serious language, but things got big and clunky, especially with mod_perl. CGI's are kind of slow.
* Various proprietary Tcl solutions. These were very cutting edge in many ways, but were open sourced far too late.
* Java towards the very end of the decade. Then, as now, it was a fairly heavy-duty solution; not suitable for, say, adding a dynamic time or something like that to an otherwise static page.
* PHP. Fairly easy to install compared to the alternatives, and reasonably easy to get started with. You did not need to understand classes, OO, and how to compile things just to get a dynamic web page up and running.
In short, PHP "scales down" in terms of programmer effort to get started, giving people at the margin the ability to do something they otherwise would not have. Granted, that something might have been quite ugly, but at least you could get started.
As of this comment,
#12 is I would use this language for a web project.
#14 is I know many other people who use this language.
#16 is I learned this language early in my career as a programmer.
#17 is This is a mainstream language.Compounding this problem is the fact that the people who feel naturally most motivated to create languages for novices are often those who are not too far removed from their own experience of learning to program. They are thus not as well informed about language design problems and solutions as we might wish. On the other hand, computer scientists who have that background tend to be more concerned with writing and maintaining large, complex programs, since that's the problem they're faced with all the time, and to have forgotten the difficulty of first learning to program -- or if they haven't forgotten it, they at least realize that that was the easy part.
We've seen this pattern enough times now, where languages get widely used despite their designs being excoriated by the cognoscenti, that I think it can't be written off to accidents of history. Cobol, Basic (in multiple incarnations), Fortran, and now PHP and JavaScript -- I'm sure I'm forgetting some. Anyway, the point is, there has to be some reason this keeps happening.
If I'm right, then the only way we'll get beyond it is if enough kids learn some programming in elementary school, more or less, and do a fair amount of programming in high school, so that by the time they hit college they're past the initial hump and are ready to start learning about software engineering, which is fundamentally the management of complexity. It's very difficult to appreciate the need for "bondage and discipline" until you've worked on a codebase where things that should have been simple turned out to be difficult or impossible.
Clojure ranks low for having annoying syntax and usually being verbose.
Java ranks low for being terse.
Python and Java both rank low for easy to shoot yourself in the foot.
With the presentation this ambiguous, I am not sure how those taking this survey interpreted the questions.
It is a collection of statements about the language. So ranks low in 'easy to shoot yourself in the foot' means that most people did not think that java or python was 'easy to shoot yourself in the foot'.
ie. the low ranking statements mean that the language is not like that statement.
Unfortunately, Java also makes it hard to shoot, period. That, IMO, is its main weakness.
If you're going to have "ranked high" and "ranked low", make all the attributes positive.
I see in this thread that many people complain about it, so I've emailed author with the link to this thread and to Python's page and suggested renaming "Ranked high/low" to "Most people agree/disagree that..." or sth like this.
Otherwise, very nice idea.
Gave me a good chuckle, but now I can't work out if I'm supposed to take this site seriously?
And all of the PHP statements were negative, of course...
/goes back to his PHP programming
* I am sometimes embarrassed to admit to my peers that I know this language
* I am reluctant to admit to knowing this language
* The thought that I may still be using this language in twenty years time fills me with dread
* This language is frequently used for applications it isn't suitable for
* Code written in this language tends to be verbose
* This language is likely to be a passing fad
* This language has an annoying syntax
* I often get angry when writing code in this language
* Developers who primarily use this language often burn out after a few years
Is Visual Basic still used in industry? I haven't touched it in years.
It is generally not used directly - Excel lets you record a macro, where it will transform the user's clicks and actions into VB script directly. Users can then add this script to a button, and can repeat their actions by clicking on the button. So not a programming language, but more of a macro language.
VB.net is just the same as C# with a different syntax.
My evolution went something like this:
BASIC -> VB6 -> (VB.NET + JAVA) -> C#
Knowing VB.net and JAVA I pretty much picked up C# on day one of my first job.
Anyway, I agree that if my C# code compiles, it does probably work. Just like Java, C# makes it hard to shoot yourself on the foot (and also to shoot at all, like somebody already said here).
Pro #2: This language would be good for teaching children to write software
Contra #1: This language is unusually bad for beginners
Uhm.. ok.. so this shows how subjective it is to rate a programming language. It depends more on the individual and its own thinking process and experience then on hard facts.
Perhaps the author can use the already submitted questionnaires to see which questions correlate heavily, so they might be merged.
The only language I know from this list that I wouldn't recommend wholeheartedly to someone else is Java, and that's just because I know C#.
A bunch of languages I know very superficially, and just haven't learned because I didn't like their superficial qualities. Anyone here ever mastered (not just learned) a language that they did not like at all? I don't like Java all that much, but it is not absolutely terrible.
(From this list I am comfortable with Ruby, Haskell, C#, Java and Javascript, less comfortable with C, C++, Scheme, Python, ASM, Matlab, VB, PHP)
Presumably this is to fit in the format of just clicking 'rank' or 'skip', for each question (which I think is also ambiguous).
Surely it would have worked better as 'statement -> yes/no[/skip]', cutting down the number of questions by about half (I'd guess) at the same time?
This is from the negatives for Python.. Really?
When something is ranked low for a bad thing, is that good (and I think it is) or is that bad? For instance, python is ranked low for "There is a lot of accidental complexity when writing code in this language", which I think means that there is NOT a lot of accidental complexity when writing this code, but it might confuse people because it looks like you are presenting two lists, a list of top pros and a list of top cons.
Chrome for android on nexus 7.
I'd say it ranks low on "the presentation is difficult for programmers to understand".
- Most similar to: F# - Most disimilar to: C
Is this really correct? The impression i've got of D is that it started as "Take C, remove everything that sucks and add other nice features". It surely looks more like C / C++ than some functional langage too me.
You're correct though, in terms of features, D is closer to C++, C#, Java.
Vote early, vote often, I guess.
It's cute, like when children use the phrase "my whole life".