HNHacker News
TopNewBestAskShowJobs

phpnode

7,416 karma · joined October 23, 2009

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

submissionscomments
phpnode··on ArangoDB 2.3: Overhauled query optimizer, AQL improvements, new Foxx features
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.
phpnode··on ArangoDB 2.3: Overhauled query optimizer, AQL improvements, new Foxx features
https://news.ycombinator.com/item?id=8540960
phpnode··on Unicode Text Converter
they definitely don't. Search for "ᴜɴɪᴄᴏᴅᴇ ᴛᴇxᴛ" and you'll see the only matches are exactly that.
phpnode··on The Programmer's Price: Want to hire a coding superstar? Call the agent
> 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.

phpnode··on Why Is Google Blocking Inbox on Firefox?
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.
phpnode··on Stop Using Constructors in JS (2012)
damn, I've been using that word slightly incorrectly for years, and now I hate myself. Thanks.
phpnode··on Stop Using Constructors in JS (2012)
There are equally valid technical reasons for using `new`, so it's dogma
phpnode··on Stop Using Constructors in JS (2012)
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.

phpnode··on Stop Using Constructors in JS (2012)
The ever-wonderful Vyacheslav Egorov has a nice article on this:

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

phpnode··on Stop Using Constructors in JS (2012)
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.

phpnode··on Stop Using Constructors in JS (2012)
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.

phpnode··on Stop Using Constructors in JS (2012)
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.

phpnode··on Stop Using Constructors in JS (2012)
note that this pattern will break subclassing:

    var Person = User.extend({});

    var person = Person();
    person instanceof Person; // false!
    person instanceof User; // true
phpnode··on Stop Using Constructors in JS (2012)
"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"
phpnode··on Show HN: ArangoDB – A distributed open-source multi-model NoSQL DB
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.

phpnode··on Arthur Whitney's One-page Interpreter (1992)
Except this isn't him "cheating", this is his preferred coding style, for readability!
phpnode··on Check that your Node.js project is well written, secure and follow conventions
yep, you can disable this warning using .jshintrc - http://www.jshint.com/docs/options/#eqnull
phpnode··on Airbnb Listings Mostly Illegal, NY State Contends
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.

phpnode··on The Space Shuttle’s Controversial Launch Abort Plan
They may have faked the explosion at the end, and obviously their explanation is total nonsense, but the launch looks pretty authentic, see this alternate angle: https://www.youtube.com/watch?v=xoMKy043j_I
phpnode··on Yii Framework 2.0.0 GA
Yii is actually incredibly polished, it's not rough around the edges at all. It is not particularly easy on newcomers though, which is the main reason it's not more widely known.

If you put the effort in to learn it thoroughly, you'll be rewarded with an incredibly productive platform that is great not just for getting apps out of the door super quickly, but also provides a secure, scalable foundation which is easy to grow and maintain.

phpnode··on Yii Framework 2.0.0 GA
none of the PSRs specify that the namespace name should be capitalized.
phpnode··on “We will sell you this microwave under the following conditions”
hey, this looks great, but it's not actually working on either on either of my nexus 5s, is that a known issue? There's no crash or anything, the flashlight just doesn't actually turn on.
phpnode··on JavaScript Hacks for Hipsters
Most of this is just idiomatic JS, hardly "hacks".
phpnode··on Trouble at the Koolaid Point
You are firmly blaming the victim, that's why you are being downvoted. The answer to all this cannot be "there are assholes on the internet so don't go on the internet"
phpnode··on Ask HN: Freelancer? Seeking freelancer? (October 2014)
SEEKING WORK - Remote / Europe

Codemix is a small, experienced team of 4 freelance developers who specialize in shipping high quality web & mobile apps quickly. We have some availability at the moment and are interested in working with startups or larger, established companies who need to bring their product to market without delay.

For a chat, email me at charles@codemix.com

you can also see our github page at https://github.com/codemix - we mostly work with PHP and Node.js

phpnode··on Trends in the Silk Road 2.0
what crime would a visitor be committing?
phpnode··on Show HN: Javelin Browser
Because the average user doesn't even know what a web browser is, they just open up "the internet" on their phone. They are not going to change something that they're not even aware of. It's also demonstrably true that the average user doesn't know or care about privacy enough to make this choice anyway. You don't have the resources to change either of these things.

So, disregard the average user. Market this as a paid product which offers a superior web browsing experience for the technology connoisseur and the privacy concious. These people, on average, have a lot more money, are easier to sell this product to, and don't mind paying.

Another reason to just charge money for this is that this provides assurances about your income stream which should mean that you are less likely to consider anti-user practises in order to generate income at some point in future.

phpnode··on Show HN: Javelin Browser
I think you're making a mistake by offering this for free.

The kind of people who care enough about their web experience to install a new browser are the kind of people who won't mind parting with a few £$€ to do so.

To be profitable, free apps must target the broader market, but this is a relatively niche product. I don't think you'll get enough IAP fast enough to be sustainable.

phpnode··on Tabnabbing: A New Type of Phishing Attack (2010)
You can combine this with a redirect to something like `http://mail.googlemaillogin.com/` which will fool a lot of people
phpnode··on Tabnabbing: A New Type of Phishing Attack (2010)
how would that work? How would the attacker "proxy your info through"?
← PreviousPage 31 of 34Next →