Better HN
topnewbestaskshowjobs
Log inSign up

phpnode

7,416 karma · joined Oct 23, 2009 (17y ago) · 1,582 submissions

Founder of https://codemix.com/ - authoritative product context which makes sure coding agents build the right thing and humans stay in control.

Email: charles@codemix.com

Submissions

comment 11y ago · link · parent

You're not being logical, you're just parroting anti-anti-copying propaganda.

> If the 12 yr old pirates $17,000 (retail price) of music, this does not mean the record companies are out $17,000... 12 yr olds don't have $17,000 to spend even if they are prevented from pirating.

Right, but it does not mean that the record companies are out $0 either. They are probably missing out on at least several hundred dollars worth of revenue for that particular person.

comment 11y ago · link · parent

Something about this story does not sound quite right to me. If I were essentially locked up in that scenario, I would at least be confident of the names of the 3 games which were installed, since they'd inevitably be played to death, regardless of how good they were. Also there's this http://www.reddit.com/r/australia/comments/2p63rv/australian...

comment 11y ago · link · parent

sounds like more direct key lookups. I can definitely believe mongo is suited for that particular use case, but I'm super sceptical about it being used as a general data store.

comment 11y ago · link · parent

thanks for the link, I wonder how they use it? The companies I've been working with have made the mistake of using Mongo as their sole data store for everything, rather than for one specific purpose.

comment 11y ago · link · parent

is it fair to guess that you use elasticsearch for product search and mongo for tracking item level prices? i.e. most of your mongo queries are direct key lookups?

comment 11y ago · link · parent

This is not meant as a troll post but a genuine observation after spending the last year or so migrating various businesses away from MongoDB (or from parse which uses mongo):

Has anyone ever built a non trivial application on MongoDB and been happy with their decision, say, 1 year later? If so, what kind of use case was it? I am genuinely curious.

The impression I've received is that Mongo is ridiculously easy to get started with but the flaws become more and more of a hindrance over time, eventually making certain types of application features virtually impossible to implement.

comment 11y ago · link · parent

Your comparison is invalid, e.g. JK Rowling doesn't write books about how you should become a magician

comment 11y ago · link · parent

> No one should have any expectation of privacy for anything they put on the Internet.

Right, except Joanna Public does have this expectation and continues to do so because of manifestly poor public education about the risks of the internet. We should literally have lessons about this stuff in schools.

And as another commenter stated, these things were not "online", they were "on a computer". If I can have no expectation of privacy for things I put on a computer then that is going to lead to no expectation of privacy under any circumstances. This stuff is going to have profound social consequences and something has to change.

comment 11y ago · link · parent

> I'm pretty confident that they don't in my case.

Would you mind sharing the details of how you achieve this?

comment 11y ago · link · parent

> Faster than Node.js + Express?

Absolutely, yes. Take a newbie and ask them to create a web page using express, then ask them to try in PHP. They are worlds apart in terms of usability and approachability. (I say this as someone who almost exclusively writes in node these days)

> it was just the only accessible platform around and happened to be crappy.

How can it be crappy if it's the only accessible platform around? An alternative view point is that PHP is the best, most empowering platform, because it's accessible to newcomers, and every other language is crappy in comparison because they have failed to match PHP's accessibility.

> Appeal to popularity, not a valid argument. Says nothing about language quality.

You seem to be talking about PHP the language. There is no doubt that PHP the language is flawed. That is totally irrelevant. What matters is how effective PHP the ecosystem is, and it is undeniably incredibly effective. That's why people use it, because it is a practical way to get things done.

So, if we're talking about PHP the ecosystem, then popularity is absolutely a valid metric here. It's easy to hire for, has tons of libraries etc, this stuff matters a lot more than the associativity of the ternary operator.

comment 11y ago · link · parent

Hello. PHP is good. It is still far faster and easier to put together a website in PHP than any other language. It has enabled millions of people to become web developers. It powers about 90% of the web and best of all it offends language snobs

comment 12y ago · link · parent

https://www.arangodb.com/key-features#aql does a relatively good job explaining it. The examples are all fairly simple, in a real world app you have much more complicated queries and it's here where arango really shines imho. With SQL it's very easy to write inefficient queries by accident, whereas AQL is a lot more explicit.

comment 12y ago · link · parent

https://news.ycombinator.com/item?id=8540960

comment 12y ago · link · parent

they definitely don't. Search for "ᴜɴɪᴄᴏᴅᴇ ᴛᴇxᴛ" and you'll see the only matches are exactly that.

comment 12y ago · link · parent

> I feel like there exists a market for getting start-ups launched on the right foot. Twelve weeks (480 hours) for $1,000,000 with a bonafide rockstar to get your concept not only up and running but well designed to be carried forward. Do you guys think people would pay that? If no, how much do you think people would spend?

I've been in this part of the market for a while (getting startups to launch). There are very few people who have that kind of money to drop on initial development, usually you're talking about 1/10 of that at most.

The companies that do have that kind of funds are not looking for an individual "rockstar", they're looking for a nice established company that gives them confidence and can be sued if things go wrong.

comment 12y ago · link · parent

If they'd supported Firefox from the start everyone would be slating them for "crippling" Firefox, or they would have had a poor user experience that would turn a non trivial percentage of early adopters off the entire product. They cannot win here, it was a bug in FF, it is now fixed, presumably they'll stop blocking when the fix is more widely available.

comment 12y ago · link · parent

damn, I've been using that word slightly incorrectly for years, and now I hate myself. Thanks.

comment 12y ago · link · parent

There are equally valid technical reasons for using `new`, so it's dogma

comment 12y ago · link · parent

I said there are few absolutes, not that there are no absolutes :)

`new Foo` has simpler semantics than `Object.create(FooProto)` and therefore I believe it will always be faster. That performance gap can of course narrow, but I think `new` will always be the fastest. Happy to be proved wrong.

comment 12y ago · link · parent

The ever-wonderful Vyacheslav Egorov has a nice article on this:

http://mrale.ph/notes/constructor-vs-objectcreate.html

comment 12y ago · link · parent

this part here is supposed to solve the problem with people forgetting new:

    if (!(this instanceof User)) {
       return new User(name, lastname);
    }
I'm pointing out that this doesn't work if you extend the class.

The point is - don't forget `new` because tricks like this will not save you, in fact this is arguably worse - you think you're getting a `Person` but you get a `User` with no immediate errors, at least if you forget `new` then you'll get an error straight away in strict mode.

comment 12y ago · link · parent

In your example you have two "bugs", you're not capitalizing the constructor name and you're not using `new`. I would have to make two separate mistakes to reproduce the issue you're talking about.

The only way I'd make the first mistake is if I was unfamiliar with `your-class`'s API, so nothing can save me there.

JSHint would catch the second one.

comment 12y ago · link · parent

Probably the problem with your perspective is that you're still thinking about JS "interpreters", when we don't generally have those any more - we have JITs that compile JS to machine code.

`new Foo()` is faster because it can be compiled to more efficient code today and probably always will be. Your argument is a bit like the "given a sufficiently intelligent compiler" one, I don't care about what JS engines of the future might do, I care about my code's performance today.

comment 12y ago · link · parent

note that this pattern will break subclassing:

    var Person = User.extend({});

    var person = Person();
    person instanceof Person; // false!
    person instanceof User; // true

comment 12y ago · link · parent

"Stop writing prescriptive articles about software development when you're speaking from a position of ignorance"

There are many reasons to keep on using `new`, the biggest one is probably performance, `new Foo` will always outperform `Object.create(FooProto)`.

Really though, this kind of article just grinds my gears. There are so few absolutes in software development, articles like:

    "You should always X"
  

    "Stop doing Y"
almost always really mean

    "I don't actually understand X or Y"

986.

GCHQ says tech firms 'in denial' on extremism(m.bbc.co.uk ↗)

2 points · by phpnode · 12y ago · discuss

comment 12y ago · link · parent

Because it's a graph database so it doesn't really fit naturally with SQL.

Competitors like OrientDB use something that's nearly SQL but not quite, and it's the discrepancies between the two that catch you out. Arango's query language is pretty nice when you get used to it.

The one criticism I have of Arango is that they're doing a lot of wheel reinvention with foxx, when I think they'd be a lot better off leveraging more of the node ecosystem.

comment 12y ago · link · parent

Except this isn't him "cheating", this is his preferred coding style, for readability!

comment 12y ago · link · parent

yep, you can disable this warning using .jshintrc - http://www.jshint.com/docs/options/#eqnull

comment 12y ago · link · parent

Well let's take your example and run with it.

If you own a house in a nice quiet street, and someone buys the place next door and wants to turn it into an inn, you'd expect to be consulted about that, right? You'd presumably expect that if everyone else in the street also objects, then planning consent for that business should be denied. If your inn analogy holds, then AirBnB provides no such opportunity for consultation.

The problem of high ratios of short-term occupants destroying communities is well known. The canonical example in the UK is student lets - landlords buy up properties close to universities and let them to students, over time the long term residents are forced out, leading to more and more student housing. These areas attract crime and other social problems because the community is vacant. This is why many councils in the UK restrict the number of HMOs (Houses in Multiple Occupancy) in a given street or area, presumably this happens other places too.

There are good reasons for regulating something like AirBnB or Uber, and it will happen, it just takes lawmakers a little while to catch up.

1
323334
53