Hacker News new | comments | show | ask | jobs | submit login

This post makes the assumption that MongoDB isn't doing well based on Hacker News. MongoDB the company, and product, are doing extremely well (outside of anecdotal Hacker News posts), based on objective metrics like downloads, skills, jobs, and company revenue (and the company is nearing 900 employees on linkedin).

To put it another way, RethinkDB did extremely well on Hacker News. Twitter didn't, if you remember all the negative posts (and still went public). There is little relation between success on Hacker News and company success.

MongoDB is like the PHP of databases. I started programming PHP and currently I bash it every time I can, because it is a terrible language. But it is easy to start and do cool stuff, just like mongodb. Initial traction is more important than initial architecture, I guess.

What? Cuz it "sucks"? We all hate PHP, but it works as advertised. I don't agree with the comparison.

These days MongoDB more or less (finally) works as advertised as well. It actually has worthwhile backend options (plural!) and the new (v1 vs v0) replication protocol is actually correct. Eight or so years of development has led to the most egregious of the bugs and corner cases being rounded off.

So, it started as a shitshow on the back-end and people who had to maintain systems based on it hated it, but it got popular because it was easy to get simple systems up and running with. Then, over time, it slowly became less awful as it was substantially rewritten and large portions of it redesigned. I'd say PHP is a very, very good comparison.

Right; Facebook, Wikipedia, OpenStreetMap - all serious tech stacks that started and (in the case of the last two) continue to use PHP.

Reminds me of: https://slack.engineering/taking-php-seriously-cf7a60065329

Wikipedia launched in 2001. Facebook launched in 2004.

The choice was narrower then. Ruby and Python, while already active, did not have nice web and DB frameworks (both RoR and Django started in 2005). Java was also much less mature, and even more wordy.

PHP, on the other had, was easy to get from any shared hoster.

There were many good web libraries/frameworks for Python before Django. One even had a transactional NoSQL object database.

Facebook does not "normal" PHP that much, they use host of languages, including Hack, erlang and lots of Python.

Most of their code is Hack, and Hack is a superset of PHP (last time I checked all it really adds is static typing and async)


> all it really adds is static typing and async

You make that sound like its not a big deal vs vanilla php.

It's really not. All the sadness and broken-ness of PHP is still there.

A lot broken-ness is still left for the sake of compatibility (especially since HHVM's open-source), but Collections and type hinting make a huge difference.

Right. That's why I said "Started With".

That Slack post is terrible. I can't believe they would site concurrency as a strength of PHP...."Asynchronously curl’ing to localhost (or even another web server) provides a shared-nothing, copy-in/copy-out way of exploiting parallelism." I almost have to wonder if this is satire

Well, Facebook and Wikipedia are using HHVM to execute their PHP code, so at least those two are not really satisfied with PHP. I bet they'd like to rewrite their code in a faster, more memory-efficient, language but are hindered by the complexity of their code base.

The OpenStreetMap website and editing API is written in Rails, not PHP. I think it was initally some other form of Ruby web application.

OSM started in 2004, but the editing API was ported to Rails in 2007ish.

Why is PHP a terrible language? It powers a vast part of the internet including sites huge, tiny, and everything in between.

It's in vogue to hate on PHP especially here on HN. Language hate based on some sort of popularity contest is silly and language snobbery wont be tolerated at any company worth its salt (read: NOT most startups)

This lack of insight is why PHP developers have lower average salaries than non-PHP developers.

If you think PHP is looked down on by those who care about language features because of a popularity context, rather than because of asinine language decisions and limited support for modern programming paradigms, I think it's you who is missing it. Since any program can technically be written in any (Turing Complete) language, the fact that some big sites were made to work with PHP also sort of misses the point. When most of the big "success stories" adopted PHP, options for web-friendly open source languages were much thinner. Now if you look at the new development projects they highlight, you don't see PHP come up that much. Facebook, for example, is prominently using Haskell. I don't know anyone who both programs in Haskell and is willing to touch PHP.

Of course, many thoughtful criticisms of PHP have been discussed on HN. e.g. https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/ & http://poincare101.blogspot.com/2011/11/php-sucks-but-some-f....

You're not wrong, but those articles are 5+ years old and PHP has changed A LOT in recent years — especially since the release of v7.

Still, that's not going to do much to change public perception, and I guess that's somewhat fair. PHP has earned it's reputation, even if many (but not all) criticism are now largely dated.

I'm just happy I switched to working on other languages, aside from the occasional Laravel-based side projects.

> PHP has changed A LOT in recent years — especially since the release of v7.

I was curious and wanted to see if that is the case. So I checked for the most basic thing. The arrow notation for lambdas. Surely they must've added that by now. Surely they must've added that before Java did. Nope, still RFC. Now I wonder if it's idiomatic to pass those "long form" lambdas around when writing in functional style or is it something nobody does. In any event this little discovery makes me think parent's sentiment seems to be still justified.

I guess that's one way of judging a software language's progress, sure.

Thanks, that is absolutely worth pointing out. But there is only so much you can do to fix languages when they are designed with problems initially and you want to keep old programs working. I have the same concerns about ES6 BTW, although JavaScript foundations are arguably less flawed overall (excepting a few areas that are just bat shit crazy).

Is public perception the reason you are happy to be mostly using something else now, though?

It's certainly nice when talking in developer circles, but no, public perception is not the primary reason — it's more of a bonus :)

I really enjoy some of the more flexible syntax and design choices present in some other languages. It also help that various job requirements over the year have required that I build a broader skillset. Finally, the growth I've experienced by stepping outside my comfort zone the past few years is probably the best benefit, which is a good experience regardless of which language(s) you start with.

In the end, however, as we both know, most decisions in software development are an exercise in managing tradeoffs. I guess the core of my argument is that, in the past few years, PHP has done a great job at improving its balance of tradeoffs.

Programmers discussing languages is like carpenters discussing screwdrivers.

If you don't know, then I can't tell you :P

Seriously, the biggest problem with php is that fundamentally it's a templating language. One thing I've seen with templating libraries in general, is that they are meant to take a template and a data structure and display output based on these 2, but what ends up happening is they end up converging on turing completeness. It starts with the need for some kind of looping structure in the template. And then someone needs some random logic that is easier to do in the template than before the model, and so another feature gets added to the templating engine. And so it goes, things get kind of bolted on, without a grand vision, and you end up with an API that is inconsistent, where the order of inputs is never the same (is the first parameter haystack or needle??).

Also, the basic shape of the code that tends to get written in PHP is heavily influenced by it's being a templating language. PHP applications tend to end up having a lot of code in the template, that should be done before rendering the model. Rather than a sane 2 pass system, where all the data is gathered and the logic handled to produce a simple data structure that is passed to a very simple template, you end up with crazy monstrosities where there's opening and closing <?php> tags everywhere. And you render part of the page, then grab some more data, then render some more page, then maybe do a curl to a 3rd party vendor, then render some more of the page, and it's actually very hard to keep switching mental state to match the context of the code you're looking at.

Anyhoooo, you're getting downvoted because there's lots of literature on why PHP is a terrible language. I'm only replying because it's sort of cathartic, since I maintain a wordpress codebase, and any time I have to interact with core, instead of being able to sanely intercept the underlying data, modify it then pass it along in one place, I have to constantly add lots of random hooks in lots of random places to catch the data just before it's being rendered. It's a total mess, and far more complicated than it needs to be (though there is some debate whether this style made it more approachable from a novice plugin development perspective).

You described exactly what I'm experiencing. I've had this awkward feeling that was hard to describe in my current work and you were able to express my exact thoughts in words. Thanks for sharing

Way back when I started reading HN, one thing that really struck me was seeing PHP discussed in a practical fashion rather than merely bashing it whenever it's mentioned as was the case in Proggit those days (often, the bashers obviously having very little experience building software).

By that time I was doing most of my coding in Ruby and Python, but this businesslike approach to PHP made me realize this is a place where people really get their hands dirty and build things, rather than care about fads.

Things have really changed, the tone & level of discussion here are now very different. Seems like PHP is kind of a canary in the coal mine in that regard.

What are you talking about? PHP has been rightfully bashed ever since it was created. If anything the bashing has substantially gone down in the past years as sane array notation has been added and a lot of weirdness has gone away.

It's not "in vogue". There's no trend here, the PHP hate has been very consistent over time.

Personally, having had to write a couple of Mediawiki plugins and an extension for a rubbish CMS called TYPO3, my experience so far is that the PHP hate is very much justified.

> It powers a vast part of the internet including sites huge, tiny, and everything in between.

It's more like those vast parts of the internet are working despite PHP. Why do you think Windows is powering vast numbers of desktops? It's not for its technical excellency. ;)

Can't speak to current popularity, but I think the overall critique is spot on. It became really popular riding a combination of up-front friendliness and the No-SQL hype bubble. The next morning, a lot of folks started feeling the hangover, whether from actual problems with Mongo or a realization that they did, in fact, need a relational DB.

To be clear, I've only ever run it as support for something else that depended on it. It just isn't well-suited to my projects and it wasn't interesting enough to invest much more than noodling a bit with it. I'm sure it is a fine product that turned in to a victim of its own hype.

It does serve as a decent example for the next generation of developers about how flavor-of-the-month trends in tech make people do stupid things, like decide they don't actually need ACID for handling money.

I don't know. I was just in a meeting where a team announced that they would need a ton of money and time to move off of MongoDB. The VP reminded them of when they had chosen to move to MongoDB years ago and asked them what happened to all of their promises about how great MongoDB would be. They responded that the promise of MongoDB and the reality are very different and MongoDB has turned out to be a disaster.

> objective metrics like downloads, skills, jobs, and company revenue

Downloads can be repeats, no? How to discern real number of productive installs?

Skills aren't objective, are they?

Revenue, great...but they won't disclose it.

I understand the importance of well thought out back-end architecture, and that it isn't my realm. I just have to say that I really enjoy building things in the MEAN stack, and had fun learning MongoDB.

For a long time all I had ever done was relational, but then my company started using Azure table storage for a lot of projects and I became familiar with other models. Then I discovered Mongo while catching up on Angular, and enjoyed using it with the mostly small apps and prototypes I build. I don't know it well enough to try and support it's use on a large scale. After seeing how poorly designed the data is for so many companies out there, it's not a surprise to hear poor choices were made (and probably some poor execution).

But MongoDB's own cite cites Indeed.com Job Trends data only through 2012, on the basis that Mongo's growth is a reason to use it.

Current Indeed.com Job Trends data actually show better numbers than the 2102 stats, but nonetheless show MongoDB jobs in decline.


Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact