News for hackers. Stuff that matters.
Re:Programming language subreddits and their choice of words by josteink on Wednesday August 20, 2014 @10:59AM (#8202563)
I know PHP-bashing isn't particularly creative nor nice, but I wasn't surprised when I saw the word-analysis at the end there :)

That said, I don't think the findings for C was shocking either.

You're not going to be writing kernel-modules in Clojure. It's going to be some sort of C. And the chances of it involving hardware (performant code or not) is significantly higher than other non-systems languages.

Re:Programming language subreddits and their choice of words by carlob on Wednesday August 20, 2014 @11:36AM (#8202756)
I also want to point out that the mathematica community never swears. :)
Re:Programming language subreddits and their choice of words by LukeB_UK on Wednesday August 20, 2014 @12:25PM (#8202998)
Because PHP is so readily available (installed on pretty much every free web host), it may also be related to people starting out with programming and getting frustrated about it.
Re:Programming language subreddits and their choice of words by noir_lord on Wednesday August 20, 2014 @12:41PM (#8203082)
I use PHP daily and I like it's features and tooling but it really isn't a very good language (it's finally passable but far from good).

In addition to the reasons you mentioned it's also possible their are other demographic differences among languages in terms of age, experience etc. (I suspect though can't prove that the average C programmer is older than say the average PHP programmer).

Re:Programming language subreddits and their choice of words by tormeh on Wednesday August 20, 2014 @11:03AM (#8202590)
Why are no one using JSP, by the way? Isn't it a better, more secure direct competitor to PHP?
Re:Programming language subreddits and their choice of words by lmm on Wednesday August 20, 2014 @11:21AM (#8202691)
JSP is more like a library or framework than a language, though I guess it's harder to make that distinction in PHP which is kind of both. But this diagram won't separate JSP from other Java (which you'll see is used quite a lot - some of that will be JSP).

"better" is subjective. While there are good things about the Java/JSP stack, its templating language is IMO cumbersome and unsafe, and its test-edit cycle can be quite long.

Re:Programming language subreddits and their choice of words by ptx on Wednesday August 20, 2014 @11:27AM (#8202719)
The thing PHP and JSP were designed to do seems to be generally seen as a bad idea nowadays. PHP is used anyway only because it's already installed everywhere, so those who would be able to set up JSP can also choose something else (i.e. neither PHP nor JSP) and probably do.
Re:Programming language subreddits and their choice of words by tormeh on Wednesday August 20, 2014 @11:30AM (#8202735)
What would you use instead? Javascript fetching data from server and doing all UI stuff on client?
Re:Programming language subreddits and their choice of words by superuser2 on Wednesday August 20, 2014 @11:40AM (#8202783)
You use a structured framework that has some separation of concerns (typically Model-View-Controller or some variant). In Java-world, some examples are Struts, Spring MVC, and Play, all of which can be used to write high-quality software for real-world applications. JSP might even be involved in the view/presentation layer.

There are also MVC frameworks for PHP. The most popular, though, are those for scripting languages like Ruby and Python, namely Rails and Django.

What you shouldn't be doing is interleaving data access, business logic, and presentation all in one file, which is what straight PHP and JSP usually consist of. This is called "spaghetti code" and it's been widely regarded as a really terrible practice for around 10 years.

You can do client-side apps in Javascript that fetch JSON or XML from the server, but you want to be using a framework with some structure to serve the data, still not just straight PHP or JSP.

Re:Programming language subreddits and their choice of words by dragonwriter on Wednesday August 20, 2014 @01:20PM (#8203293)
> What you shouldn't be doing is interleaving data access, business logic, and presentation all in one file, which is what straight PHP and JSP usually consist of. This is called "spaghetti code" and it's been widely regarded as a really terrible practice for around 10 years.

"spaghetti code" actually has a much broader definition than that particular kind of lack of structure (though I agree that that example might be viewed as a fairly modern example of "spaghetti code") and has been considered a terrible practice for much longer than PHP, JSP, or even the web itself has existed. [1]

[1] http://en.wikipedia.org/wiki/Spaghetti_code

Re:Programming language subreddits and their choice of words by Arnor on Wednesday August 20, 2014 @11:51AM (#8202847)
If all you're looking for is an html template system, there are html template languages for almost every programming language (including ruby, python, nodejs, Scala, Haskell, C, C++). Even most PHP developers are using template systems besides just PHP intermingled in HTML these days.

I still agree that PHP is probably the fastest way to get a couple dynamic HTML pages that include server data. The limitations of PHP as a template language quickly reveal themselves as projects grow.

Re:Programming language subreddits and their choice of words by chrisweekly on Wednesday August 20, 2014 @12:38PM (#8203068)
JSP is really just Servlet. JSP is used in the context of Java Servlet Engine frameworks like SpringMVC or Struts. It is definitely still being used.