Live data from Hacker News

Learning Curves for Different Programming Languages

github.com

111–120 of 221 posts

Re: Learning Curves for Different Programming Languages

#111
post #25

It seems that it interchanges "productive" with "writing clean code". PHP is ugly but can be productive. Haskell is beautiful, but well, I know a lot of people encharmed by it, but no-one productive (i.e. delivering products quickly; it's not the same as solving pure, mathematical problems).

>I know a lot of people encharmed by it, but no-one productive (i.e. delivering products quickly; it's not the same as solving pure, mathematical problems).

Is this actually true, or is it "true in your heart"? Very few people use haskell for solving "pure mathematical problems". People use it for things like developing the fastest microkernel in existence, doing high volume trading, making games, and writing boring old web apps. References to "pure mathematical problems" and implying nobody is actually doing anything with haskell come off as sounding like second (or third, or fourth) hand FUD. We taught our PHP team haskell. They had their first project in production in three months. There's nothing special about math and haskell.

Re: Learning Curves for Different Programming Languages

#112

Earlier quoted context omitted.

Yeah, I've got a similar impression. The only 2 things I care about are 1) productivity (time to finish a task) 2) how pleasurable is it to use a language. And I just don't find Haskell (or Lisp) to be as productive as many would suggest, even if you adjust for matureness of the ecosystem. (Note: I have a moderate experience with Lisp, very little experience with Haskell and these days mostly program in Java, Julia a…

I wrote the core of our system in Clojure a couple of years ago, which is pretty high in productivity and actually quite pleasant to work with. Unfortunately as the scale goes up (hundreds of web application routes, sharing code among multiple projects etc) it doesn't feel nearly as nice anymore, and having static typing turns out to be pretty handy. Haskell to me felt exactly like what you described: I could get stu…

Oh ok, I can be wrong about Haskell. BTW, I really like Ceylon, it's very statically safe (more than Haskell I'd say) and very pragmatic (unlike Haskell IMHO, it doesn't seem to focus on maximizing productivity).

Re: Learning Curves for Different Programming Languages

#113
post #26

I am increasingly convinced that Haskell only exists so that people who know it can pat themselves on the back for being wonderful.

There are a few startups out there who use it as their core tech. It's a sweet spot because you don't have any legacy code to support and it allows you to slap together fairly stable code fairly fast, at least once you get to know the basic tools. E.g. picking up Yesod (which, to be fair, isn't something you'll do in a couple hours) gives you all of the niceties and rapid prototyping of a tool like Rails, plus the ob…

I can't imagine ever using Haskell for a startup. Unlike pg's python paradox, the only programmers I could imagine applying would be programming language theorists, toy programmers, and people who think they are productive (because arrows!), without ever having built anything ever. I would only do it if it meant I could hire John Macfarlane.

Re: Learning Curves for Different Programming Languages

#114
post #58

Earlier quoted context omitted.

> Facebook uses PHP This is the common rebuttal of PHP jokes - but pointing to a sole outlier is rarely a solid defense. Especially when they have created Hack[1] and HHVM[2]. So it's not entirely accurate to say they "use PHP." [1] https://en.wikipedia.org/wiki/Hack_(programming_language) [2] https://en.wikipedia.org/wiki/HipHop_Virtual_Machine

Lol, Wikipedia which you linked to is PHP. Roughly half the web runs on Wordpress for crying out loud.

I admitted in another comment[1] that I shouldn't have said sole outlier.

But I find it surprising you're defending PHP if you feel popularity of a language is determined primarily by how well designed it is, as by that logic C and Java are way better than PHP.[2]

[1] https://news.ycombinator.com/item?id=8803088

[2] http://www.tiobe.com/index.php/content/paperinfo/tpci/index....

Re: Learning Curves for Different Programming Languages

#115

Everyone seems to be focusing on the PHP vs Haskell thing and seem to be missing the other points. Here's a summary: Callbacks in Javascript make you feel more productive, but in fact you become less productive. Design patterns in Java don't actually make much of a difference in productivity, but you think they do. Templates in C++ seem hard but with a big payoff, but they don't accelerate productivity. Unit tests in…

It's funny that we feel PHP doesn't make you more productive, yet most of the web was running PHP apps until a few years ago when better languages gained momentum and we saw new web sites not built in PHP.

Wordpress, phpBB, Drupal, IPB, Joomla, vBulletin, Facebook, Yahoo!, DeviantArt, etc...

Now PHP making you a better programmer... that's a different matter.

Re: Learning Curves for Different Programming Languages

#116
post #62

Really don't understand the pure hatred that people have for PHP, I'm at network engineer and I don't have any desire to become a programmer because I love my job, however I've wrote some very useful applications that myself and my team use on a daily basis to make networking easier for us. For me it was simple to learn PHP and create something 'useful', basically every web server is capable of running it which makes…

I'm no mechanic and I have no desire to be one but I've changed my own brake pads, surely anyone can adjust their car's brakes and many other tasks with a few simple tools and a book. I don't understand why mechanics say some cars are better than others.

I think that was the best comment on hacker news I have ever seen.

Re: Learning Curves for Different Programming Languages

#117
post #99
post #74

Earlier quoted context omitted.

Sure it may be a fractal of bad design, but it's unfair to say it has no productivity value. You can write plenty good PHP code that actually accomplishes things. (And this is coming from someone that hates PHP)

I think you're setting up a strawman. The arguments against it are numerous, but I've never seen anyone say it has no productivity value.

[deleted]

Re: Learning Curves for Different Programming Languages

#118
post #74
post #71

Earlier quoted context omitted.

This rant (not by me) explains why[1]. PHP is full of gotchas, things that make security hard, and areas that are likely to break and be really hard to debug. There's definitely scope out there for a better effort to be made addressing the situation you raise, but PHP really shouldn't be the popular language that is is in that space. [1]: http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/

Sure it may be a fractal of bad design, but it's unfair to say it has no productivity value. You can write plenty good PHP code that actually accomplishes things. (And this is coming from someone that hates PHP)

> but it's unfair to say it has no productivity value

Nobody is saying it has no productivity value. Even the "joke" isn't saying that - the Y axis isn't labelled - it's just suggesting a) productivity doesn't increase, and b) you feel much more productive than you really are.

Re: Learning Curves for Different Programming Languages

#119
post #29
post #26

I am increasingly convinced that Haskell only exists so that people who know it can pat themselves on the back for being wonderful.

With the exception of pandoc, I don't recall seeing anything particularly impressive from the Haskell camp. (Btw, this, actual stuff people use, is how I measure programming languages -- this metric takes into account communities, libraries, practical issues, etc all together, and ties them with practical results. It's my version of "let the market decide").

it also takes into account aspects of an end product that have nothing to do with programming at all.

Re: Learning Curves for Different Programming Languages

#120
post #105
post #95

Earlier quoted context omitted.

Does Perl, Python or Ruby have built-in automatic escaping and sanitization? I would not call PHP less safe than any of these languages. On top of that all three of those languages require additional setup. (Especially Ruby with RoR shudder )

Generally speaking, tutorials in those languages recommend using the paramatized versions of the queries rather than string concatenation and manual escaping. The official docs from these more well-designed languages would have copious warnings against attempting to escape user input yourself, rather than having numerous functions baked into the language to help you do just that (e.g. `mysql_escape_string`, `mysql_re…

The official docs will tell you how to properly handle queries, including prepares: http://php.net/manual/en/pdo.prepared-statements.php

Additionally, the mysql_ extension is deprecated since PHP 5.5: http://php.net/manual/en/migration55.deprecated.php

The official docs on the old mysql_ extension has large warnings advising people not to use it: http://php.net/manual/en/function.mysql-connect.php

Reading a 10 year old tutorial on W3schools isn't the best place to learn current PHP, and it's not the fault of the language. PHP has moved on, if only the haters would too.

Post reply on HN