Staff and projects cut as Canonical tries to lure investors - <AUTHOR> https://www.theregister.co.uk/2017/04/06/canonical_cuts_jobs_with_unity_bullet/ <comment><USER2> I hope they get rid of the bzr versioning tool for their project management and adopt git. It's far more compatible with upstream - there's a significant effort to just syncing between git and bzr.

Yes, there is already some support, but not at feature parity to bzr. [https://help.launchpad.net/Code/Git](https://help.launchpad.net/Code/Git)

I am impressed at how much of a community Launchpad has built, _inspite_ of bazaar.

<comment> marten-de-vries Launchpad still has a couple of very nice features you do not see at e.g. Github, in particular for desktop-oriented software:

\- Built-in translation support; there's a big community that can (and, in my experience, will!) help you translate your project's .pot files using Launchpad's interface. It also has auto-import and -export of files from the source repository.

\- Build recipes; this allows you to build .deb packages for your project, and to put them in a PPA which makes them easily testable for Ubuntu users.

\- Detailed progress tracking functionality; using releases, milestones, a nice bug tracker & blueprints.

While I've in the past used Bazaar in conjunction with Launchpad, I'm happy to see them make the switch to Git. With its larger development community and popularity, it's a natural choice. Just a shame it isn't as well integrated yet.

<comment><USER2> Launchpad is definitely nice. Bzr is the problem. I would go as far as saying that a lot of the ui flows from how bzr (and the lp tool behaves).

I really hope they drop bzr and move to git.

</comment></comment></comment><comment><USER3> Investors will want to see more revenues. I always wondered why Canonical doesn't offer a small subscription fee for slow-email-only tech support. Make it a reasonable price and I suspect a lot of people would be willing to pay.

</comment><comment><USER4> I wonder why would they need investors? Investors would be looking for some form of exit. What would Canonical, a primarily services company offer in terms of an exit for any investor?

I understand that IoT and cloud deployments is the "next big thing" but the competition is incredibly fierce with players that have deep pockets.

<comment><USER5> Not every class of investor is looking for an exit.

<comment><USER6> Nonetheless, I would assume investors are looking to make a profit at some point. And as far as I know, Canonical has never made a profit, nor come anywhere near it. Indeed, it's hard to imagine any circumstances where it would make a profit from desktop Linux.

For the record, Canonical was worth -£4.1 million in 2010 and it's now worth -£59.4 million. It has £22.2 million in cash and liabilities of -£326.6 million. [1] If it was a commercial operation rather than a millionaire's plaything, it would have closed a decade ago.

[1] [https://companycheck.co.uk/company/06870835/CANONICAL- GROUP-...](https://companycheck.co.uk/company/06870835/CANONICAL-GROUP- LIMITED/financials)

<comment><USER5> I'd be happy to invest without expecting _any_ return on my investment. I've done so a couple of times with other companies in the past and for the most part I'm perfectly ok with the outcome.

Just like you would donate money to a charity you might decide to buy some stock in a company at IPO because you simply want to support their cause. It's also one of the reasons I bought an Ubuntu phone, I played around with it for a bit and ended up not using it because I'm too easily distracted.

If you're always looking for a return on every investment then you would have to decide against a lot of groups looking for money that need a shot in the arm in order to achieve their dreams, even if those dreams ultimately fail the road to that failed dream may yield useful spin-offs.

Investing is not all that black-and-white, and it is in general very hard to impossible to know which investments will yield a future return and which do not.

Investors that buy stock have fairly little say in the direction of the company until they achieve major interests, as such you're essentially along for the ride and if anything ever comes of it that is at the discretion of the majority interests in the company.

And once you have a majority interest you essentially own the company rather than that you are just an investor you are now at the helm.

Even VCs, who are arguably always looking for a profitable exit have no way to force such an exit other than to find a suitable partner and to activate what is known as a 'drag along' clause in the shareholder agreement (assuming that such an entry is present).

If they can't or that clause isn't there they are simply captive and will have to accept whatever dividend payments (or none) are issued by the company if the company ever turns a profit.

Canonical is a company that I think deserves a lot of praise and support for what they've done, even if it isn't the financial success that they might have hoped to achieve.

Obviously, given the fact that their product has been powering my desktop ever since I dropped 'Knoppix' makes me biased.

<comment><USER6> If you're just giving money to a company like Canonical then surely it's a donation rather than an investment. Maybe Shuttleworth should just make it a charity and invite donations.

I would _guess_ that Canonical's current strategy is doomed because the cost of providing support (which depends on human wage rates) is rising faster than charges. [1] I can't see that changing unless someone develops an AI that can support Linux.

[1] Be interested to hear contrary views from people who are actually involved in delivering software support, which I am not.

<comment><USER7> You don't need an AI, "just" increased tracking and data analysis to improve troubleshooting, like MS and Google do. Unfortunately, Ubuntu caters to a community that is very much adversed to the idea.

Another alternative is to dramatically restrict support for hardware configurations, like Apple does, and let the community deal with the rest. There would be some backlash but it probably wouldn't be lethal.

To be honest I don't think support is the problem anyway. The problem is that monetization channels are not materializing at the necessary volumes. RedHat "is" Linux in the enterprise datacentre, where the big money is. Ubuntu seems to rule the virtual-machine arena, which is a world of cheapskate corner- cutting startups; and personal desktops, which are fully commoditized. Their saas offerings have failed, and there are limits to what they can extract from iaas providers. Where can they find real money?

If I were Shuttleworth I'd try again with integrated services, but by acquisition and with better targeting. Ubuntu users are geeks, they won't pay you to save a few holiday pics. Buy and integrate dev-oriented services like spideroak and tarsnap; build some revenue-generating agreement with Jetbrains, Microsoft, Oracle etc to integrate their tools on Ubuntu; build a real appstore (i think they are working on something like that). This stuff won't generate bazillion dollars, but could create the space to find that one or two killer features that people will pay good money for.

<comment><USER6> Thanks: good points.

I as assuming that Canonical support would mainly have to tackle pretty tough problems, because users will solve the simpler ones themselves. That's very unlike Windows support, where quite a lot of people get stumped by trivia.

I have met various Canonical staff in the past and they seem like nice guys, but I've never understood how they thought they could make enough money to support 600 to 700 staff. I don't see that there's much they can do that Red Hat can't do, and Red Hat had a 10-year head start....

</comment></comment></comment></comment></comment></comment></comment><comment><USER8> So potentially between 240 and 420 people going and a good proportion of those will be developers or at least technically skilled. I recollect that Canonical had a remote workforce so locations of the people being made redundant will be distributed in various job markets. Good luck to them!

<comment><USER9> Yes, lots of skilled people now need to find something new. Hope we see some new projects/companies come out also!

</comment></comment><comment><USER10> While I do not fault Canonical at all for these decisions, I find it a little disappointing whenever I am reminded that a Free Software project is under the same constraints as any other company, and as a result needs money.

I wish Canonical and the Ubuntu team the best of luck, though I worry that that might not be enough.

</comment><comment><USER11> > "No part of the business had sacred cows," he told El Reg.

If Ubuntu itself becomes a sacrificial cow, I wonder what happens to its downstreams like LinuxMint.

</comment><comment><USER12> Goodbye to Unity then.

<comment><USER13> As announced by Mark Shuttleworth this week, Gnome will be back as default in Ubuntu 18.04.

</comment></comment><comment><USER14> That makes sense...

</comment><comment><AUTHOR> FTR Mods changed the headline. Don't blame me as OP for that :-)

<comment><USER5> What was your title?</comment></comment>


Ask HN: Advice for someone moving to the Bay Area from the Midwest? - <AUTHOR>

I currently live and work in Ohio; I am originally from rural Kentucky. I've spent most of my life in smallish towns, and have no long-term experience with big cities (or the west coast at all). I just got a job in Silicon Valley, and within just 3 weeks, I'm moving to the Bay Area.
For now, everything is being taken care of by my employer; I will have temporary housing and the moving expenses will be covered.
Apart from this, I have very little idea what to expect. I realize there are tons of threads like this, but a few are a little old -- and a lot of the "askers" are looking for jobs (instead of having one lined up).
I don't want to move and attempt to recreate my current life in a new location... I want to completely embrace the city life.
What should I keep in mind when dealing with the locals, especially in contrast with people where I live now? I am expecting tons of culture shock. What are the best ways to meet people? What are some common mistakes new Silicon Valley arrivals/hires make? Who/what should I avoid? Where should I live? How will I survive without a Wal-Mart or a Meijer to buy food and everything else I need for my home?
Any advice would be appreciated. Anyone who's familiar with (or been in) this specific situation -- please chime in! <comment><USER2> There are plenty of grocery stores here that are similar to what you are used to...safe way, whole foods, trader joes, etc.

Therer is a target in daly city that's easy to get to if you have a car here (or use zip car/citycarshare). There's also a cowpoke of ikeas around for cheap furniture if you need it.

Where is your job! What do you do for fun? Can you deal with the grittiness of soma or do you need some place fancy to live? Will you have a car?

Best way to meet people is going to be the same anywhere. Get involved. Go out, find things to do. There's things for everyone here. Don't forget you'll be working with a team. Use them for help meeting people.</comment>


How Crypto Startups Are Changing Finance Right Now - <AUTHOR> https://hackernoon.com/how-crypto-startups-are-changing-finance-right-now-6882574a6ccb <comment><USER2> I think they are jumping on the bandwagon. The trend already started with bitcoin.</comment>


A High School Student-Run CS Competition With Over 2000 Participants - <AUTHOR> http://HSCTF.com

<comment><USER2> Link to the writeups: [http://compete.hsctf.com/book](http://compete.hsctf.com/book)</comment>


Inside Uber's Aggressive, Unrestrained Workplace Culture - <AUTHOR> https://www.nytimes.com/2017/02/22/technology/uber-workplace-culture.html <comment><USER2> Quoting from a 2014 Bloomberg column:

 _Stories about the leadership's dubious ethics -- or the ones about subprime autoloans or deceiving the press or sharing private user data for fun and games at a party --haven 't really hurt Uber at all. Even reports of incidents that might make one think twice about using the service -- sexual assaults, a hammer attack -- haven't gained much attention outside the close world of tech blogs. There's only a slim chance that most consumers will ever know about this stuff and decide that they'd rather use, say, Lyft, an almost-identical service. So long as people continue to download the app there's an even slimmer chance that the stories will hurt the company's ability to raise money._

1\. [https://www.bloomberg.com/view/articles/2014-11-18/ubers- dir...](https://www.bloomberg.com/view/articles/2014-11-18/ubers-dirty-tricks- wont-hurt-it)

<comment><USER3> I think those specific incidents were carried out by the drivers (independent contractors) and they weren't formal employees. Not that I'm excusing uber of liability/responsibility.

<comment><USER4> I think the average person also understands that one bad apple doesn't spoil the bunch.

<comment><USER5> The idiom you are quoting is "one bad apple spoils the barrel/bunch", which means literally the opposite of what you think it means.

<comment><USER4> I guess I've always used it wrong, however...

[http://www.npr.org/2011/05/09/136017612/bad-apple- proverbs-t...](http://www.npr.org/2011/05/09/136017612/bad-apple-proverbs- theres-one-in-every-bunch)

>Back then, nobody ever talked about "just a few bad apples" or "only a few rotten apples" — the whole point was that even one was enough to taint the group. These days, those are the phrases people use to imply that some misdeeds were an isolated incident — a couple of rogue cops, a handful of unprincipled loan officers, two or three sociopathic soldiers. Then there's the version that goes, "There are always going to be a few bad apples." That's a counsel of moral realism: as in, there's evil in the world; get over it. It's not a sentiment you would have heard in a 19th century sermon, much less from a grocer you were complaining to about the wormy fruit he'd sold you the week before. "Well, Mrs. Gold, we all have to expect find a few rotten apples, don't we?"

</comment></comment></comment></comment></comment><comment><USER6> This article links to a blog post [1] by a current female engineer at Uber, who says:

> Why am I still at Uber? I am at Uber because Uber needs me.

I don't understand how someone can say this. It's like worshipping a corporate entity.

[1] [https://medium.com/@hadrad1000/reflecting-on-susan- fowlers-r...](https://medium.com/@hadrad1000/reflecting-on-susan-fowlers- reflections-e2dccb374b47#.gwyl18wzu)

<comment><USER7> Really interesting. I was contacted by an Uber recruiter several days before this Susan Fowler blog was posted. I responded to him with a link to the article, and asked him if he was interested in working for my company. His response: "I am at Uber because Uber needs me - especially now." I'm guessing it's the canned response they've instructed all employees to use.

<comment><USER8> > His response: "I am at Uber because Uber needs me - especially now."

A recruiter claiming Uber specifically needs them. This could be a punch line to a standup comedy routine. Thanks for the first good laugh of the day.

</comment></comment></comment><comment><USER9> I don't really understand why one would actually want to work at Uber. If you're a good engineer, there are better and far more interesting and impactful companies to work at than an app whose primary purpose is to call a ride. I know Uber has much larger ambitions, and transportation is a large portion of the economy, and thus very lucrative, but really...are you willing to sacrifice your ethics and morals just to create the world's best taxi service in the near term? To work in such a high stress, backstabbing and political environment, and for what? The vague promise of some RSU's? Because there are interesting engineering challenges in planning a route?

Culture is clearly set at the top. The only way for Uber to move forward at this point is to make changes with this in mind. At this point, if I was on the board of directors, the only way to move forward is to get rid of Travis Kalanick. That will be the only message loud enough to signal to the rest of the world that Uber is going to change, and at this point, do they really even need him? It would be better to just fire him and replace him with someone else to just get him out of the picture. He's an embarrassment to the company and they can easily find someone just as capable from a business and technical leadership perspective, probably someone a lot better than him in fact who they can trust won't be making these rookie mistakes.

One of the main roles of a CEO is to set the culture and to prevent PR disasters like what is currently going on. What else of value has he _recently_ contributed that is worth keeping him on despite all these numerous scandals?

If Uber does not do what is necessary to change their toxic environment, and to fix the now _perception_ of toxicity, they will be eclipsed by one of their competitors in short order. You can go fast in a cut throat, winner takes all asshole culture, but you can go much farther with a happy team that enjoy working with one another.

<comment><USER10> While I'm not in a position to defend what the culture at Uber is or isn't, it's shortsighted to say that the problem Uber is addressing isn't an important one. Giving people mobility can have a drastically positive impact on local economies, housing, the environment, etc.

<comment><USER11> > it's shortsighted to say that the problem Uber is addressing isn't an > important one. Giving people mobility can have a drastically positive impact > on local economies, housing, the environment, etc.

In fact it's such an important problem, that there were already a lot of people addressing it.

Before Uber I had to use my phone and call a number and talk to a computer that would dispatch a cab to me. Now I use my phone and use an app to talk to a computer that would dispatch a cab to me. Yes, the app is better, but I'm not being "given mobility", I'm being given the freedom to save a couple seconds of effort. Which is, you know, _nice_. But no, it doesn't have a drastically positive impact on anyone or anything.

(And since Uber launched in my area, some of the local taxi companies have launched very credible apps, so even that advantage turned out to be fleeting.)

<comment><USER12> You were blessed with a healthy cab system then. In San Francisco pre-uber, you could not rely on being able to hail a cab if you were not in the financial district. If you called the cab company you would be on hold for 10-30 minutes before you could talk to dispatch, and then maybe the cab would come, but probably not if they found a fare along the way.

<comment><USER13> Sounds like it might still be largely probably an American problem (?), which would explain the overall struggle that Uber is facing? Japan and Europe in general have well working taxi systems. Thus I would challenge if the valuation is really justified...

<comment><USER14> I'm amazed that _" Hailo"_ doesn't get mentioned on here more. To me it predates Uber, but I don't know the exact timelines.

The premise is similar - you use it to hail cabs and you have a maps screen that shows where cars are, how long they'll take to get you, taxi drivers number etc.

But the business model is crucially different: Instead of trying to _eat the whole cake_ Hailo just acts as a go-between customers and extant independent taxi drivers.

It really is a non-zero sum for everybody involved. Customers get to "Uberify" their existing taxi service; Existing qualified experienced cabbies have a new conduit through which to access customers. Hailo themselves take a commision on each fare the driver books.

To me this is a far better proposition: A technology that improves the lot of _everybody_ involved. Not just - and I use the term hesitantly - "scabbing" existing drivers.

It seems to me that much of Uber's growth and success is not just based on the technology but also on the gaming of employment regulations, bypassing regulations, and a smidgin of exploitation.

Many make the case that regulation is a barrier to improving services and only serves to protect vested interests and this may well be the case in places where Uber has flourished and Uber may in fact provide _better_ employment terms in some cases. I don't know, but in many cases the taxi regulations exist to protect the customer .. to which Hailo is simply a welcome augmentation - rather than a replacement.

<comment><USER15> Does Hailo give you pricing upfront? I've tried cab hailing apps in the past, and they'll always quote a price that pisses the cabbie off as soon as he sees it. For me, Uber's feature set includes knowing what I will be charged beforehand, and not scrambling to find cash because the driver's card reader is broken.

<comment><USER16> No, but Hailo can also handle the payments, so it doesn't matter if the driver's card reader is busted.

In a market like Dublin, Hailo is an ultra-efficient dispatch service. I call for a cab to a destination, and the drivers decide if they want that business. Of the ~7 weeks I was there, I only had one trip where it took me an extra 10 minutes to get a cab, and that was because it was pouring down rain.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER17> NB: there is a _lot_ of new information in this article. It's a great read.

<comment><USER18> And greatly depressing. That sounds like a terrible place to work. It's very Machiavellian-esque.

So what I gather is that sexism isn't rampant, it's the work cultural in general that leads to varying degreases of hostile terrible-ism, with sexism just one of the many many symptoms of their horribly constructed work environment.

It's like a tech company run like a Wal-Street high steaks trading firm. Or like Valve ... as a Wal-Street trading firm.

This article also explains Uber's tendency to just ignore laws and see what they can get away with. So much of what they describe is what we see in their business.

Frankly, I'd be worried about their self driving vehicles, and what shortcuts they took that may eventually kill someone. I wonder what other shortcuts they've taken. Maybe in a few years, Uber will go the way of MCI WorldCom when people discover their books are cooked.

<comment><USER19> >This article also explains Uber's tendency to just ignore laws and see what they can get away with.

In many jurisdictions it was - maybe still is - much worse than just ignoring laws, but actively conspiring to break the law.

For example in Miami-Dade County where being an Uber was illegal in both the criminal and civil context, during that period Uber sent emails to drivers in Miami-Dade with instructions/training on how to actively avoid getting caught, including, but not limited to: removing the Uber phones from windshields and having passengers sit in the front seat.

There is another of Uber's dirty little secrets here in Miami-Dade and that is that Uber is used by drivers to exploit undocumented immigrants, which as far as I can tell Uber is aware of and encourages/facilitates. Moreover, undocumented immigrants can't get a drivers license in Florida; therefore, can't register as Uber drivers. It happens all the time in Miami that the actual driver does not match the Uber driver profile, from my talks with those drivers they are clearly getting exploited.

<comment><USER20> I see the illegality, on both sides, where is the exploitation?

<comment> purple-again They are most likely in a pimp/prostitute type situation where they have to collect their money from the driver they are impersonating and are only getting a % of their earnings. Being an Uber driver is already a lower paying job, so only getting a % of that in Miami, a very high cost city is certaintly exploitation.

Then again they are illegal immigrants so it might also be the best opportunity they could find. I sure as shit would rather drive people around in my car then pick produce in the strawberry fields we have down here.

<comment><USER21> You seem to be arguing that it's both exploitative and not exploitative at the same time?

<comment><USER22> They're getting a job, but it's cheap labor and aren't being paid a fair wage.

</comment></comment></comment></comment></comment></comment></comment><comment><USER23> " Occasionally, problematic managers who were the subject of numerous complaints were shuffled around different regions; firings were less common."

Same strategy exhibited by certain religious organizations. Problematic individuals were transferred to developing countries or disenfranchised communities where more distinct power imbalances enable the crimes to go unpunished.

<comment><USER24> What factors motivate higher-ups to avoid dismissal?

<comment><USER25> Firing for this kind of behavior establishes a precedent against which subsequent actions/individuals can be judged. By avoiding dismissals, you keep in place the ambiguity and arbitrariness in which toxic, manipulative people can thrive.

<comment><USER26> I really think ambiguity is the source of all HR problems.

There should be a clear list for each employee of which specific things will get them fired. And which things need to be done for them to otherwise not be fired. And which things need to be done for them to be promoted.

Anything else you're basically saying: "If there is ever a lawsuit between this individual and the company, we will have to assemble the employment agreement in court from a variety of obscure emails and text messages."

What amazes me is that even with that risk, it _still_ seems to benefit the company to keep these things vague in order to keep promotions down, and to make it easier to fire people who are doing their jobs. But I guess the numbers add up.

</comment></comment></comment></comment><comment><USER27> Based upon the evidence that includes the CEO's public attitude and that of Uber as a company and the story told by the former employee about how her situation was handled, it seems like Uber is much more sorry that their culture was exposed than that they have that culture to begin with.

Is this kind of company culture not becoming much the norm in today's hyper sexual society? I can't imagine that these kinds of things aren't happening all the time at other in-your-face branded startups.

American Apparel is another company that quickly comes to mind with problems similar to Uber's.

</comment><comment><USER28> [edit] Tomluck pointed out below that this post can be misinterpreted. I don't want to discount people's experiences - and there is definitely work to be done. But at the same time there is a lot of great things too, so we can have a healthy perspective. Thanks to those who are discussing it!

\---

I could go into detail about my experience at Uber (which is great), but a friend and coworker I really admire did a much better job. Here's her LinkedIn post:

"Uber has been a lot in news lately, and not for all good reasons. While as an Uber employee, I think there are things (in fact, many things!) we can do better, one thing that I couldn't agree less with are the allegations of Uber being a discriminatory, anti-women culture.

"While I am deeply saddened with what was recently brought to light, and being a woman, demand that the investigation is urgently, unbiasedly done, I also want to say that as a woman, an immigrant woman, I have never felt even an iota of discrimination, let alone harassment.

"When I moved to the US about a year ago, with no job and plenty of dreams, Uber was one of the few companies that gave me a chance to prove myself in a new country. And, since then, I haven't just survived, but thrived here. I look forward to coming to work daily, making my contribution, and having a say in shaping a company that's changing so much around us. Again, I feel deeply sorry for the recent situation that came into light, but I stand against anyone who generalizes that Uber epitomizes a discriminatory culture for it couldn't be further from truth.

"[Her] Disclaimer: These views are my personal views, and in no way linked to my employer's. I just feel an overwhelming need for sharing my personal experience working at a place that has given me so much in terms of learning and growth."

<comment><USER29> The impression I got from the story I believe she's describing wasn't "discriminatory, anti-women culture" as much as "very bad manager" (to the point of sexual harassment) and Uber not doing anything about it.

<comment><USER30> Uber not doing anything about it is that "discriminatory, anti-women culture" you're looking for.

<comment><USER29> That's bad, yes, but one bad manager does not a "culture" make.

<comment><USER31> I mean, it does if the culture is to turn a blind eye to managers that do this.

Of course, from what I can tell, there's far more than one problem manager involved in all this.

</comment></comment></comment></comment></comment><comment><USER32> I hope Travis / execs are sincere and this was a healthy reality check, of course talk is cheap. Anyone know if Amazon culture changed significantly after the NY times article about their work culture came out?

<comment><USER33> I have a question about this, though. It seems like many of the top, successful tech companies were started by "brilliant jerks": Bill Gates, Steve Jobs, Jeff Bezos, Mark Zuckerberg, and Travis Kalanick were all known for being brash, arrogant, hard charging and willing to do things anyone with a decent sense of ethics would reject (e.g. Jobs swindling Wozniak out of his share of an early payment, Zuckerberg hacking into the private email accounts of Harvard Crimson reporters by searching Facebook's auth logs, etc.) These leaders also seemed to mellow as they and their companies aged, perhaps realizing what gets you on top is not what keeps you there.

Thus, I do hope Uber improves it's ways, but I also can't help but wonder if this very brashness that allowed Uber to develop such a toxic culture is also what let it (and other companies) beat out their competitors to begin with.

<comment><USER34> Yes, it helped. But how much jerkery are we willing to tolerate? And, for how long? Uber isn't an early stage start-up anymore.

<comment><USER35> We? Investors vs users vs techies.

Users and investors never stopped worshipping Gates, Zuckerberg, or Jobs.

</comment></comment></comment></comment><comment><USER36> I think 2017 is time to start finding out the degeneration of this uber- capitalist model. A portfolio of on-call collaborations paying peanuts without any workers right does not make a job and is not safe for customers. Please stop defending the undefendable, bare naked social costs are too high.

<comment><USER37> Yeah, but dystopian slave labor business models really get the VC funding elites to hand over the dough to the MBA sociopaths running the place.

I wish that was sarcasm.

</comment></comment><comment><USER38> We all know that this is not news about Uber's workplace. It has been happening for quite a while. I bet those executives knew about it a long time ago. What has motivated executives to take it seriously now? Why now?

<comment><USER39> Someone publically and categorically called them on it.

[https://news.ycombinator.com/item?id=13682022](https://news.ycombinator.com/item?id=13682022)

<comment><USER40> More importantly: someone who not only called them on it, but _appears to have documentation to back up her claims_. Which blows up many of the usual strategies a company would employ to discredit an ex-employee making such claims, and also threatens to trap them even further (the smart thing is to keep good records; the _really_ smart thing is to only disclose part of what's in your records, let the other party respond and likely lie about something you have records of but didn't yet disclose, then nail them on the lie).

</comment></comment></comment><comment><USER41> Would there be any upside to a company like Uber cultivating a reputation like this deliberately? Obnoxiousness seems to be a characteristic quite ingrained into elite hacker culture.

<comment><USER42> Regarding drivers, I feel there is an upside to the horrible treatment Uber doles out to drivers which is that Uber wants turnover, wants a driver to work for a year or so, and fears long term drivers who might have more of a claim to employment or be more invested in a lawsuit.

> Obnoxiousness seems to be a characteristic quite ingrained into elite hacker > culture

That was not my experience with the elite developers I have known. I find that behavior endemic and distributed like a bell curve throughout society.

<comment><USER43> This account has been abusing HN by using it exclusively for political arguments. It has also been posting personal attacks. Neither of those are allowed here, so we've banned it.

</comment></comment></comment><comment><USER44> > The ride-hailing service particularly emphasizes "meritocracy," the idea > that the best and brightest will rise to the top based on their efforts, > even if it means stepping on toes to get there.

Whether this means:

\- Uber explicitly emphasizes stepping on toes as part of their workplace culture

\- The concept of meritocracy includes stepping on toes

This is false and dishonest of the NYT. In the first case: Uber might be awful, but no company would emphasise mistreatment of others explicitly. In the second: that is not the commonly held meaning of meritocracy.

<comment><USER45> No, it's implicitly emphasized. Uber doesn't explicitly condone sexual harassment, and yet it's utterly rampant there. Actions speak louder than words.

<comment><USER44> That's exactly what I mean though! Uber might be awful and might implicitly emphasize trodding on others. But the NYT, by combining their internal explicit messaging re 'meritocracy' with 'expense of others' makes it sounds like their internal explicit messaging includes that - it obviously doesn't.

Actions do speak louder than words. NYT doesn't need to make up the words.

</comment></comment></comment><comment><USER46> I am shocked - shocked! - that a company that has gone from zero to $70B in less than a decade by riding roughshod over people and engaging in shady tactics, that it should have a company culture that reflects the same!

<comment><USER47> Agreed that its obvious. Regular "hard working" concept will only lead to regular good results. Uber is reinventing a whole market. Also remember they're playing against a very crooked taxi industry that could easily hold back any player that tried to play by the rules.

<comment><USER37> "Uber is reinventing a whole market"

aaaaand, that justifies... what? Murder? Blackmail? Genocide? Racketeering? Bribery? Where is your line in the sand?

Wait, I know, you don't have one if you're chasing the F U Money.

You know, drug traffickers are also reinventing the market, and forging ahead into a new commodity, and using "outside of the box" thinking like assassination and liquifying your competitors in drums of chemicals. Those unnecessary regulations like "laws" are just evil big government trying to control poor defenseless drug cartels.

</comment></comment></comment><comment><USER48> The fish rots from the head.

<comment><USER49> Yeah, I find unethical news out of Uber... unsurprising. I mean, most of their business-model has been based on willfully breaking local laws for profit, in the hope that they can grow into a bully that can ignore the consequences.

With that at the core, it's no surprise that other areas exhibit the same rot.

</comment></comment><comment><USER50> "Those values have helped propel Uber to one of Silicon Valley's biggest success stories."

The alternative hypothesis is that they were the first with something that worked well enough at the time the public was ready to use it and the "values" is just attribution bias.

</comment><comment><USER51> Waiting for the Enron fall.

<comment><USER52> Because of a toxic culture or because of other problems?

I don't think I've ever heard of a company brought down by cultural problems. At most, cultural factors seemed to have contributed to the problems, such as the issues caused by strict stack ranking at Microsoft, which punished teamwork.

Some places are pressure-cookers and shark-tanks, but then some people love heat and pressure and are, you know, _sharks_.

<comment><USER53> I think the studies on corporate culture have shown that it's critically important to _have_ a culture ( _Built to Last_ has a chapter on "cult-like cultures"), but it doesn't matter (much) what that culture is. The idea is that culture is a unifying principle for the organization; it's a way for the company to clearly delineate what it stands for, attract people who believe in that too, and repel people who don't. The world is an awfully big place; for basically every repugnant belief you can think of, there is _somebody_ , somewhere, who believes that it's common-sense.

If you don't like it, work for or patronize a different organization. Lyft's entire differentiator is "We're not as evil as Uber."

</comment></comment></comment><comment><USER54> To me its a reminder of how times have changed and a tale of caution.

Pre internet there was no place (blog) to write about work.

Now, one always has to be conscious that their coworker-friend or coworker-foe can tell the world stuff you would not tell. Reinforcing the keep quiet about everything mantra

The other risk is that a decade from now the person making the blog will be known for that blog. To everybody.

More caution will be required when coming in contact with that blogger.

Pick your battles wisely

</comment><comment><USER55> tl;dr: bunch of fratboys get too much VC money, run wild

</comment><comment><USER56> I really have to commend Susan for bravery to come out and describe what has been happening to her. It is inexcusable behavior.

Also, it seems that writing a blog post is way more effective then suit who would drag on for months.

And one more thing, not to downplay managers contributions, but developers are the ones making things happen, we really need more credit for our work.

<comment><USER57> Just curious, ever been an engineering manager?

<comment><USER56> I was and leading multiple teams. I was and still programming.

Not really sure what you are referring? I always made sure developers are interviewed and treated with fairness and compassion. No crazy assignments, most is done same day, they get response right away. Always promoted good practices and learning. I wish I was perfect, I was not, but I think I did really good job.

At the moment, I am not leading or managing any team.

</comment></comment></comment><comment><USER58> Has anyone read "The Circle" by Dave Eggers?

I enjoyed it. Raised a lot of interesting questions that I think we're all going to be debating in coming years. Privacy, surveillance, transparency, etc.

Genuinely surprised how rarely it comes up in these discussions about toxic corporate tech "culture"

</comment><comment><USER59> I'm still gobsmacked by the smoothness and ballsiness of ceremoniously appointing Eric Holder to deal with this sit-u-a-tion. Say what you want about Uber, they certainly didn't get where they are in spite of a lack of political smarts.

</comment><comment><USER60> Just start firing.

It's really that simple. First, fire the head of engineering. Then fire the head of HR and anyone associated with this - unless they can show they were forced into it.

</comment><comment><USER61> "In what was described by five attendees as an emotional moment, and according to a video of the meeting reviewed by The New York Times, Mr. Kalanick apologized to employees for leading the company and the culture to this point. "What I can promise you is that I will get better every day," he said. _"I can tell you that I am authentically and fully dedicated to getting to the bottom of this."_ "

(Emphasis mine.)

If culture flows from leadership then you already are at the bottom of it, buddy.

</smartass>

</comment><comment><USER62> Uber/Amazon are losing money on their business and hence bad working conditions

</comment><comment><USER63> > I am pleased with how quickly Travis has responded to this

I'm not sure how much credit "Boober" deserves when he's the one in charge and has allowed it to get this point.

</comment><comment><USER42> How many laws does Uber have to break, how many drivers does Uber have to cheat, how many assaults on riders and drivers have to be committed, how much predatory pricing does Uber have to commit, how many labor laws does Uber have to flout, how much full time jobs does Uber have to undermine, how many people, riders, pedestrians and drivers does Uber have to kill

before this generation of engineers looks beyond the high tech goodness and high salaries they personally achieve to see the poison you enable by staying on with Uber?

ethics/shmethics it's a great job at an important company!

<comment><USER64> Maybe half of these things apply to Lyft too, which really weakens your argument.

<comment><USER29> Also to the taxi companies Uber and Lyft are replacing.

<comment><USER65> I drove Yellow Cab in Houston for a few tough months in Houston while I was in school and the taxi business is far worse than anything I've heard at Uber -- especially for those doing day-leases. The taxi business is more blue collar by comparison with Uber. I am definitely not defending Uber -- I am saying that Uber is getting this press because the situation affects educated (mostly white) liberal engineering type while taxi business practices often go unnoticed because taxi employees aren't typically the demographic that starts blogs or talks to The NY Times -- nor do they raise VC money thus entangling them in SV politics and media.

I never once saw a female taxi mechanic -- the only female employees I ever saw were grizzled old dispatchers too tough to take any crap or the occasional girl out of college working as a marketing assistant. Operations was almost exclusively men -- the mechanics in the yard were all men.

Pay attention to how taxi companies try to 'sell' cars to drivers at insane terms to were drivers would have to work 5 days out of a week just to pay the note. Try scratching a day lease car and watch how the repair costs get taken out of your money (despite also paying for "insurance" to cover such things.) Yoy get robbed when picking up a dispatch passenger and lose all your money -- too bad, you still have to pay the day lease. I get it -- drivers are independent contractors -- however any criticism of Uber ought to be tempered by a fair assessment of the industry they are ostensibly replacing.

</comment></comment></comment></comment><comment><USER66> A company that ignored / sidestepped taxi regulations globally, often making a profit out of devaluing working class peoples' taxi registration, apparently has lots of unpleasant people working for it.

Colour me surprised.

<comment><USER67> "devaluing working class people's taxi registration"

read: a company that figured out their way around regulatory capture.

<comment><USER37> Or, made an app, and are using VC funds to dump on markets forcing out incumbents, and then will hike prices.

But go ahead and subscribe to your objectivist utopian view. Oh evil government, when will you learn?

<comment><USER67> > and then will hike prices.

there's a reason why you get a flyer telling you how much a cab ride from JFK->Midtown costs and that cabs are only allowed to pick up passengers at the designated stop (creating 30m+ lines). But go ahead and believe theyre just "working class folks" and not scam artists.

<comment><USER68> The reason is to protect people arriving at the airport who are not familiar with the area or local taxi companies. But go ahead and believe that if there weren't a regulated standard rate for trips from the airport that they would charge you _less_.

</comment></comment></comment></comment></comment><comment><USER69> > Uber employees used cocaine in the bathrooms at private parties

Oh my god!!!! At a private party no less.

If you can't see the beat up here, vague allegations to run with a current theme that's getting press (clicks) you need to be more critical of the news and not blindly follow articles that just reinforce your preconceived ideas.

<comment><USER70> You've cherry picked a single example that you don't necessarily disagree with and expect everyone to dismiss the entire article? That's not being critical.

<comment><USER69> > Another manager threatened to beat an underperforming employee's head in > with a baseball bat.

Do you really thing he threaten that or was making a joke? Was the employee ok with that and was this someone overhearing it?

> a manager groped several female employees. (The manager was terminated > within 12 hours.)

Someone did something very wrong and was immediately fired. What more do you want?

>One employee hijacked a private shuttle bus, filled it with friends and took it for a joy ride

Do you reckon they used guns or baseball bats during the hijacking?

This is a standard stitch up we've seen done to tech companies before. It's formulaic.

Take vague behavior/mistakes/missteps that's not unusual in society, give a couple of examples as though it means something about this company and imply it means blah blah blah.

<comment><USER71> No, I think they went down to the lobby (quite possibly already under the influence of alcohol or drugs) and okay, let's not call it a hijacking, but _stole_ a private shuttle bus (and if I recall the original article correctly, left it at another casino).

Stitch up, indeed. "Vague behavior". Also known as grand theft auto.

Blah blah blah, like you say.

<comment><USER69> Fell free to link to this imaginary article.

There are plenty of articles about the party, yet none happen to mention it? How strange..... Sounds newsworthy to me.

Do you really think people would get drugged up and steal a 'random' bus at a work party?

This whole article stinks, but that's the society we live in, truths and common logic have been thrown out.

</comment></comment></comment></comment></comment><comment><USER72> All these hunger games stories are getting more and more primitive, stupid and boring

</comment><comment><USER73> This is hardly newsworthy. I'm sure stuff like this happens at any company that big. Why do they publish pointless news like this. And as others have said why would you work for uber you hardly make any money

<comment><USER74> > I'm sure stuff like this happens at any company that big.

Not that gets written up in detail, with numbers, with much frequency.

> Why do they publish pointless news like this.

Sexism is real. Adding context and response to a large company's response is meaningful.

> why would you work for uber you hardly make any money.

That's just not true.

</comment></comment><comment><USER22> _An honest thought:_

Is Uber an inherently "evil" company?

Startups in the spotlight, like Uber, are under a lot of pressure to live up to their "darling" status, lest they risk losing investors and the snowball of problems that comes with.

Doesn't Uber _have_ to be unrestrained in its current state?

Don't most darlings of today (Amazon, et al) _have_ to move forward as quickly and fervently as possible, putting comparatively less important (see: human resources vs. market valuation) to the back-burner?

<comment><USER75> Yes, there is absolutely no fucking way other than treating employees like they are garbage. Of all the hundreds of thousands of companies in the world, Amazon and Uber are the two most typical and everyone needs to follow them because obviously they are doing things the way it has to be done.

That's how all the great products we use were made. Like think about the Snuggly. Snuggly HQ was a brutal realization of Lord of the Flies. The bottom sales guy had his head cut off and stuck on a pike in front of the others so they'd remember their duty to the emperor.

<comment><USER22> Your examples are working against you.

Companies aren't about great products, they're about making money.

Snuggie (Allstar Products Group) is magnitudes less important and powerful than Amazon.

 _Coming from an executive perspective and not an engineering /developing one_

<comment><USER76> Or maybe your examples are the special case. IMO, you don't have to treat your employees poorly in order to get the best results. What happens is that important and rich companies tend to _attract_ these abusive harassers who want to carve out a space in an important company and make a big chunk of money as well. And because the company is more focused on growth, it hasn't brought in the right gatekeepers to keep these kinds of people away.

</comment></comment></comment></comment><comment><USER77> the current uber hating seems like hive mind.

without a doubt, the stories coming out of uber are not good. but i work at a unicorn and can unequivocally state that things are not vastly different here -- few to no female devs (and other specific roles too), little diversity, plenty of sexism, lots of politics, and huuuge assholes abound. if any of our stories happened at uber, it would be front page news. and my guess there is plenty of this around the industry.

these firms get away with bad management by turning it around on employees... "if you see a problem, find a solution and fix it". this cuts both ways... no one blocks you from doing what you think is important (which is great), but equally no one steps in to play the role of mgmt when it matters (which sucks).

in uber's case, the negative side to this culture is more on view than anywhere else. uber may be amongst the worst of the tech companies when it comes to this, but i certainly don't think they are an outlier.</comment>


Show HN: Gymmmr, a social network for finding a workout partner - <AUTHOR> http://www.gymmmr.com/
Gymmmr is a social network that enables people to find partners and friends to workout with. Users enter their diet information, goals, and fitness program and are able to search for other users with similar interests/routines.
As the front page says, the goal of Gymmmr is to build community one gym at a time. Another useful feature of the app is that it enables users to find personal trainers who may specialize in helping them achieve their unique diet and fitness goals.
By default, users are shown users in their city and state since proximity is an important factor given the goals of the application.
Gymmmr is still under development but will be full released within the next couple of weeks.
Enjoy! <comment><USER2> Great stuff! I'd very seriously look into getting an SSL on your site as soon as you can. I personally wouldn't be comfortable putting my date of birth, address, or a password into an insecure site. Separately, I'd also question why you needed a date of birth without context. Good luck!

<comment><AUTHOR> Thanks Thomas! I will definitely implement SSL ASAP. You're right, date of birth isn't really relevant for an app like this.

Thanks for your feedback!</comment></comment>


Crash Spurs Interest in Real-Time Flight Data - <AUTHOR> http://www.nytimes.com/2010/07/22/business/global/22blackbox.html

<comment><USER2> $75,000 for a satellite black box plus $3-$5/minute to send the data?

Just screw one of these onto the plane:

<http://www.findmespot.com/en/index.php?cid=102>

$170 + $99/year for the data plan.

They would have a much better idea of where the real black box landed for a trivial cost.

<comment><USER3> Well, its not an add-on to the existing black-box systems, its a replacement. These new black boxes are supposed to gather more data about more components. Given that, the $75,000 price tag makes sense.

The $3-$5 per minute data cost also makes sense if you think of the black boxes as transmitting full real-time telemetry and voice recordings. However, that cost is incurred only after manual activation by the pilot or after a mechanical emergency is detected. Most of the time, the boxes will only be transmitting a "heartbeat" signal, which costs much less to transmit.

<comment> a-priori Why does it need to be a replacement? It makes more sense to me that flight data recorders should keep their current job: to record detailed flight data, and keep it safe in the event of a crash.

This should be a new device that operates in parallel with the FDR on the same data.

</comment></comment></comment><comment><USER4> Isn't there some portion of the aviation spectrum that could be allocated to ad hoc communication between aircraft? The routing problems would be interesting!

<comment><USER5> Bittorrent in the sky, I like it!</comment></comment>


New EC2 Features: Tagging, Idempotency, Filtering, Bring Your Own Keys - <AUTHOR> http://aws.typepad.com/aws/2010/09/new-amazon-ec2-features-resource-tagging-idempotency-filtering.html

<comment><USER2> With all these improvements in the various bits of AWS, I keep wondering why Cloudfront is not getting a much-requested feature: gzip compression for files that can be when the browser accepts gzip. I know I'm not the only one asking/waiting for this, and the current solutions are very convoluted.

<comment><USER3> Another feature that would be nice for Cloudfront is being able to back it with a non-s3 resource.

<comment><AUTHOR> These are common requests, but I will pass them along to the team anyway to guide our prioritization process.

<comment><USER4> Is there a defacto means for communicating these kinds of requests? And if not, I think a request for a feature like Dropbox's Votebox is in order -- <https://www.dropbox.com/votebox>.

<comment><AUTHOR> We don't have a formalized suggestion mechanism. You can email them to me (firstname.lastname@example.com), post them in the AWS Forums, write your own blog post, or you can come work at Amazon (<http://aws.amazon.com/jobs>) and implement it yourself!

</comment></comment></comment></comment></comment><comment><USER5> Wow, finally!

Tagging was _long_ overdue.

I hope the sigh of relief going through the ranks of AWS users will be heard at Amazon HQ and motivates them to no longer hold back such trivial yet essential features for years. Automating EC2 infrastructure has just become so much easier. No more futzing with and abusing of security groups - Thank you!

</comment><comment><USER6> Good stuff, I think tagging was long overdue. Hopfully they will release IAM (<http://aws.amazon.com/iam>) to the public soon as well.

<comment><AUTHOR> You can use the IAM command line and APIs right now.

<comment><USER6> Sorry, I meant the IAM Management Console. Any chance this will be released soon?

<comment><AUTHOR> I don't know the status of that :-)

</comment></comment></comment></comment><comment><USER7> Idempotency and tagging are the big ones for me. Makes automating instance operations easier.</comment>


Atom 1.18 - <AUTHOR> http://blog.atom.io/2017/06/13/atom-1-18.html <comment><AUTHOR> Looks good with the Git integration, but it looks like you can't compare changes with unmodified? That's really a future I like with Visual Studio.

Edit: Nvm, looks like single click on file in Change list shows the changes, but not as elegant as Visual Studio with side by side compare.</comment>


BitChute's Immediate Removal from PayPal - <AUTHOR> https://bitchute.info/bitchutes-immediate-removal-from-paypal/ <comment><USER2> You don't challenge the big players in Silicon Valley without retribution.

Honestly, american tech companies disgust me to the point where I'd rather take any alternative over american vendors. Can't wait for a reasonable chinese alternative to paypal.

<comment><USER3> You had me until the end. Do you really believe a Chinese alternative to PayPal would be more open and less prone to censorship?

</comment></comment><comment><USER4> "It's not censorship unless the government does it."

</comment><comment><USER5> This is a problem. It looks like silicon valley is colluding to keep out competition. It wouldn't surprise me either, remember the wage fixing [http://www.latimes.com/business/technology/80014970-132.html](http://www.latimes.com/business/technology/80014970-132.html)

</comment><comment><USER6> Just this days I was looking on how to handle a large chunk of videos and came in contact with WebTorrent.

Both bitchute and Peertube use Webtorrent, but seems that you're done if you want money to come into play.</comment>


Ask HN: Is anyone else worried that Mercurial is disappearing? - <AUTHOR> While it's great to see distributed source control systems supercede systems like Subversion, Mercurial is an elegant distributed source control system, one I personally love compared to git. Yet 'git is eating the world'. We're losing all other systems, including and worryingly if you want to host open source publicly among a community.<p>> Mercurial seems to have a lot of sentimental support — the argument being that it is the saner and more intuitive DVCS. Which is surprising because, as stated by BitBucket; over 90% of users use Git. So there is a clear winner. Still the idea of a winner-takes-all does not sit well with some developers.
 - https://j11g.com/2019/08/21/git-is-eating-the-world/<p>Does this worry anyone else? <comment><USER2> It does not worry me at all. This is the pattern of things. Whenever there are multiple similar things one tends to dominate while the other fades. People don't want both VHS and Beta, HDDvd and Blu-ray, etc... Same with this. Learning and using 2 very similar source control systems isn't worth it for most people.

When something better comes along it will displace Git.

</comment><comment><USER3> I am not worried at all.

I have used it briefly in 2011, and was not impressed at all.

And quite frankly, git does enough stuff, well enough and it's free enough that I am not worried.

</comment><comment><USER4> I'm hopeful for pijul :-)</comment>


Will This "Neural Lace" Brain Implant Help Us Compete with AI? - <AUTHOR> http://nautil.us/blog/with-this-neural-lace-brain-implant-we-can-stay-as-smart-as-ai <comment><USER2> I don't anticipate a practical IO bci until after AGI is done. Why? We don't understand the brain's learning mechanism well enough yet and once we do that will be recipe for AGI which will by default see faster growth than individual to individual adoption of these bci. Not only that but a recent poll indicated that the majority of those polled would not get a bci to improve their cognitive ability.

The best way to bridge the human/AGI gap in the beginning imo is with decision based integrated AR. It's not even really a bridge it's a symbiosis.

<comment><USER3> What's the end goal of this? How is this making humans happier? How is this improving quality of life? Competing with AI is an artificial competition. Quality of life is a) a real problem that isn't going away and b) is directly contrary to AR. Think emails are a problem now? It's not getting any better with inescapable interaction brought on by AR.

<comment><USER4> > Competing with AI is an artificial competition.

I think that it's a competition with other human beings in the same sense that the nuclear arms race or mechanized warfare are artificial competitions.

You can't guarantee that other actors won't create AGI and use them to their own advantage any more than you can stop other nation states from building machine guns or nuclear weapons. The rise of AI is a competition between human beings. AGI has potential applications in a wide variety of economic, scientific and military endeavours, like many other transformative technologies. Unless you have a strategy to ban AI research globally, it's a moot point. Somebody is going to make AGI work, and whoever it is will be calling the shots because they will have the technology.

<comment><USER5> Well, there is always the nuclear option. Just use an EMP attack. In any case, we're still dealing with scalability. The amount of computation per volume is still such that the odds are against anyone who would make a destabilizing move. Too much hardware volume to conceal anything that isn't already possible. Even in finance, for example, if word got out that someone found a way to flip the markets because of a better algorithm, there would be a response.

There won't be any one actor with a "singularity", it will just be a matter of a threshold unto another paradigm, and from then on it will be business as usual within the realm of zero-sum games.

[https://www.youtube.com/watch?v=3xZmlUV8muY](https://www.youtube.com/watch?v=3xZmlUV8muY)

</comment></comment></comment></comment><comment><USER6> AI is still having trouble competing with us in terms of general intelligence and creative ability. I will be very surprised if AI can ever generate a movie, song, video game, or book completely on its own that can actually compete with human created entertainment.

<comment><USER7> Here's the state of things as far as AI-written films: [https://www.youtube.com/watch?v=LY7x2Ihqjmc&ab_channel=ArsTe...](https://www.youtube.com/watch?v=LY7x2Ihqjmc&ab_channel=ArsTechnicaVideos)

<comment><USER6> Generating a screenplay from a bunch of existing screenplays is about as good as generating a poem from a bunch of existing poems. I think there was a story the other day showcasing AI-generated poems, and all of them pretty much sucked. They might be able to pass as "modern art", but they were a far cry from poems like "O Captain, My Captain" or "The Highwayman".

<comment><USER8> Humans do exactly that though - an artist isn't born in a vacuum.

<comment><USER9> > Humans do exactly that though

There's a weak and a strong version of that claim. To say that humans use existing works in creating their own is easily provable. But what I don't think is easily provable is that the new work is _entirely_ the product of existing works, with the brain contributing nothing new beyond an AI-like algorithm.

<comment><USER10> Humans also have another pretty large corpus of input data: their entire life experiences.

</comment></comment></comment></comment></comment></comment><comment><USER11> Can someone more knowledgeable explain the practical applications of this (beyond therapy)? Is it read-only or can it be used to stimulate different areas of the brain to create artificial sensory input? Can we have the matrix now?

<comment><USER12> Not sure about the Matrix but DARPA is a big fan of Ghost in the Shell's cyberbrains:

[http://www.darpa.mil/news-events/2015-01-19](http://www.darpa.mil/news- events/2015-01-19)

</comment></comment><comment><USER13> The notion of "competing" with AI seems fundamentally broken.

</comment><comment><USER14> My God, that poor scientist had to indulge so much scifi stuff just to publicize his biocompatible materials-science work.

</comment><comment><USER15> Betteridge's Law

[https://en.wikipedia.org/wiki/Betteridge%27s_law_of_headline...](https://en.wikipedia.org/wiki/Betteridge%27s_law_of_headlines)</comment>


Hacking Stephen Fry's Twitter Account - <AUTHOR> http://eng.xakep.ru/link/50643/ <comment><USER2> Nice real world example of the poison null byte attack.

For those who don't know what a null byte attack is, that's where you pass in an http request that turns into a string that explicitly encodes a null byte, \0 at the end. So you insert something like subsection=/../../../../../../../../../../../../../../../../etc/passwd%00. Now the code in the application tries to append something like .txt because "how bad could a .txt file be", and it arrives in C land as "/../../../../../../../../../../../../../../../../etc/passwd\0.txt\0" and C thinks that the string ends at the first \0 and doesn't pay any attention to the .txt bit.

This is a good example of why your escaping mechanism should always be "allow only what is explicitly known to be safe" rather than "block what is known to be unsafe". Because you have no idea what unsafe things there are that you don't know about.

<comment><USER3> Similar issue a while back with SSL certs wasn't there. When will people learn how to deal with null bytes properly :/

<comment><USER4> I could similarly ask, "When will people learn that null bytes are a terrible way to terminate data?"

But that ship sailed eons ago.

<comment><USER5> After mangling a number string operations (and the program memory space) when first learning C I realized how terrible they could be. If I can mistakenly destroy my memory space, what would a malicious mind do with such a thing?

<comment><USER3> This is a very good reason to use a language with built in memory management.

</comment></comment></comment></comment></comment><comment><USER6> While this is a clever hack, and I doubt the author had any malicious intent, this article really rubs me the wrong way. To the author of this post, this was most likely nothing more than an intellectual challenge, but from Stephen's perspective, I imagine it feels a whole lot like a mean-spirited breach of privacy. Furthermore, by publishing the details of the breach, he's pressured Stephen & his webmaster to immediately fix this hole or risk a much worse attack on his site. (I'm assuming he didn't notify Stephen before publishing this post. Such courtesy would have been greatly appreciated, I bet.)

There's a security hole in the postal service, too. You can read anyone's mail by stealing it from their mailbox. Doesn't mean it's a good thing to do.

<comment><USER7> "he's pressured Stephen & his webmaster to immediately fix this hole or risk a much worse attack on his site."

Surely that's a good thing? I agree that Stephen would/will probably be offended (assuming he wasn't notified), but he'll certainly take security more seriously now.

<comment><USER6> It's a good thing that Stephen was made aware of this security hole, but the author could have informed him a lot more effectively.

If someone broke into my house and I found out about it on Hacker News because they set up a webcam in my living room, I suppose it would be a good thing that I found out about a security problem in my home, but I certainly wouldn't be happy about it.

<comment><USER7> Fair enough, although it's a much more graphic illustration of the problem actually seeing the results (rather than simply "your site isn't very secure", "your front door lock is a bit loose"). I know it made much more impact on me than it would have if I'd read an article about the possibility of it happening. Although I suspect that if he'd just mailed the username/password to Stephen that would have been example enough.

Kind of scary how many of these sites are almost certainly out there, though.

</comment></comment></comment></comment><comment><USER8> I still lost. Can somebody give me an example of what an "improperly escaped include" would look like?

Was the site author (not the hacker) taking a get parameter and passing it to an include? That seem odd.

I need a little more help understanding this.

<comment><USER9> Probably a directory of php files like,

       sections/food.php
       sections/shopping.php
       sections/fryclub.php

with different content, then an index page like,

       <!-- common header -->
       <?php include("sections/" . $_GET["section"] . ".php") ?>
       <!-- common footer -->

And then when you access,

       http://fry.com/index.php?section=fryclub

you get the content of fryclub.php with the correct headers and footers. Or you access,

       http://fry.com/index.php?section=/../.[snip]./../etc/passwd%00

and get any file you like, treated like a php file.

Find a file that you can write to (such as the error log), use the above trick to treat it as a php file, use it to make system calls, and the box is yours.

<comment><USER8> Thanks for that. I wasn't aware that this was a common practice. I assumed it must be something like that, but I wanted to make very sure I understood exactly. Don't want any hacker news stories about my sites!

EDIT: Errr, at least, not this sort of story.

<comment><USER9> You can actually search for this vulnerability on Google Code Search, and it finds a few results that look exploitable. I don't know how to go about informing people with that code that their systems are vulnerable. Many are open source projects, so anyone using those tools are vulnerable too.

</comment></comment></comment></comment><comment><USER10> Can anyone explain the injection part? I didn't understand how getting the passwd file helped in any way with injecting a php error, and why code got executed in the end.

<comment><USER11> The passwd file didn't help, it just showed him that he could retrieve arbitrary files via an open/improperly escaped PHP include().

His injected worked by causing an error to be written to a log, and then reading that log back through the PHP include. The error that was logged contained an arbitrary string (the HTTP request, with the malicious PHP code), which was executed by the server.

</comment></comment><comment><USER12> That was an interesting read, nice 'peek' into a (I guess) lot used method of defacing a site; without the defacing that is.

</comment><comment><USER13> This is the exact kind of thing App Armor can be used to shield against. Problem is, it's a PITA to setup right.

<comment><USER14> Apache's mod_security can also protect against this with the SecFilterForceByteRange directive.

</comment></comment><comment><USER15> Stephen Fry is a good person.

:-(

<comment><USER16> Stephen Fry is a public figure with a large following. He is mostly concerned with political matters, and he uses his influence to affect their outcomes. These days he is more accurately described as a political figure than an actor.

Whether he is seen as a good or bad person is immaterial. Public figures like Fry are not immune to attacks on the basis of their personal qualities. If someone's account is going to be accessed unlawfully, then Stephen Fry's is as good a target as any other. Fry is as much fair game as Britney Spears.

<comment><USER17> Even though his site's security was not completely up to snuff, he did have a pretty good password.

<comment><USER18> Unfortunately, the chain is only as strong as the weakest link.

FWIW, the vulnerability is listed in the OWASP 2007 Top 10 as Malicious File Execution <http://www.owasp.org/index.php/Top_10_2007-A3></comment></comment></comment></comment>


Solving twenty-four puzzles - <AUTHOR> http://blog.plover.com/math/24-puzzle.html <comment><USER2> This was the problem for round 2 of the C International Conciseness Contest in early 1993. Submitted programs were to take on stdin a file consisting of one or more problem instances, where each instance consisted of three lines, and solve those there were solvable, and report as unsolvable those that were not.

The first line of each instance gave the number of numbers you had to work with, the second line gave those numbers separated by space, and the third line gave the target number.

Conciseness was measured by the number of tokens in the source code. Here is a copy of the problem specification: [http://computer-programming- forum.com/47-c-language/3e0a04a3...](http://computer-programming- forum.com/47-c-language/3e0a04a33eef654e.htm)

Here was the token counter used for that round: [https://pastebin.com/bdaEedD7](https://pastebin.com/bdaEedD7)

Here is the first runner up and the winner: [https://pastebin.com/JcamKieX](https://pastebin.com/JcamKieX)

The runner up is 336 tokens. The winner is 335 tokens.

The best I was able to do was 460 tokens. (Well, the best without exploiting limitations of the token counter, but I was on dial up and so did not have the time to upload a 4 GB source file...)

</comment><comment><USER3> I never bothered creating a program to solve this as I prefer to do the exercise mentally. I've been playing with 1440 puzzles: one for each display of a 24 hour clock. The puzzle is simple: take a displayed time and using the 4 displayed numbers and the 4 basic operations (+ - x /), make it solve to zero. To make it more complex, it is forbidden to multiply by zero. Eg. 12:34 >> (1+4)-(2+3)=0. The puzzle does not solve for all hours, but it does for 12:3x and many other times

<comment><USER4> That's a neat puzzle! Here is the Prolog code I posted earlier, extended and adapted to solve such tasks:

First, let us again start with a suitable _operator definition_ , so that we can use × as an infix operator in expressions:

        :- op(400, yfx, ×).

Next, let us declaratively describe what we mean by a "clock", using _integer constraints_ :

        clock(Vs) :-
                Vs = [H0,H1,M1,M2],
                Vs ins 0..9,
                H0*10 + H1 #< 24,
                M1*10 + M2 #< 60,
                label(Vs).

For example:

        ?- clock(Vs).
        Vs = [0, 0, 0, 0] ;
        Vs = [0, 0, 0, 1] ;
        Vs = [0, 0, 0, 2] ;
        Vs = [0, 0, 0, 3] .

We can collect _all solutions_ as a quick verification:

        ?- findall(., clock(Vs), Ls), length(Ls, L).
        Ls = ['.', '.', '.', '.', '.', '.', '.', '.', '.'|...],
        L = 1440.

This confirms that there are 1440 puzzles of this kind, one for each possible clock time.

The puzzle now asks for expressions that evaluate to 0. We can relate any given clock display to an expression like this:

        clock_solution(Vs, Expr) :-
                clock(Vs),
                numbers_tree(Vs, T),
                tree_op_expr_value(T, _, Expr, 0).

This reuses predicates I posted earlier, which I only need to slightly modify to prohibit multiplication by zero, and which I repeat here for completeness:

        numbers_tree([N], leaf(N)).
        numbers_tree(Vs0, binary(Left, Right)) :-
                permutation(Vs0, Vs),
                append([L|Ls], [R|Rs], Vs),
                numbers_tree([L|Ls], Left),
                numbers_tree([R|Rs], Right).

        tree_op_expr_value(leaf(N), _, N, N).
        tree_op_expr_value(binary(Left0, Right0), Op, Expr, Value) :-
                tree_op_expr_value(Left0, _, Left, VL),
                tree_op_expr_value(Right0, _, Right, VR),
                op_values_value(Op, VL, VR, Value),
                Expr =.. [Op,Left,Right].

        op_values_value(+, A, B, V) :- V is A + B.
        op_values_value(-, A, B, V) :- V is A - B.
        op_values_value(×, A, B, V) :- A =\= 0, B =\= 0, V is A * B.
        op_values_value(/, A, B, V) :- B =\= 0, V is A rdiv B.

We can use this to enumerate all times that have a solution:

        ?- clock(C),
           once(clock_solution(C, S)).
        C = [0, 0, 0, 0],
        S = 0+(0+(0+0)) ;
        C = [0, 0, 0, 1],
        S = 0/(0+(0+1)) ;
        C = [0, 0, 0, 2],
        S = 0/(0+(0+2)) ;
        C = [0, 0, 0, 3],
        S = 0/(0+(0+3)) .

And here is the list of all times that _don 't_ have a solution:

        ?- clock(C),
           \+ clock_solution(C, S).
        C = [1, 6, 4, 8] ;
        C = [1, 7, 4, 9] ;
        C = [1, 7, 5, 9] ;
        C = [1, 8, 4, 6] ;
        C = [1, 9, 4, 7] ;
        C = [1, 9, 5, 7] ;
        false.

<comment><USER5> Hmm, I think there also needs to be a rule that you can't have a numerator of 0, otherwise any case where you have an expression a * b = 0 with a = 0 then either b=0 or a / b = 0. So the restriction that you can't multiply by 0 becomes somewhat meaningless.

<comment><USER4> The constraints I impose are sufficient to exclude such cases in multiplications: a/b is first evaluated, and if the result is 0, it is precluded from multiplications. To avoid also divisions resulting in 0, you are right: We can easily constrain the nominator to express this, completely analogously to multiplication. This goes beyond the initial requirements though.

</comment></comment></comment></comment><comment><USER4> Nice, thank you for sharing! For comparison, here is a Prolog solution for one of the mentioned puzzles, namely "an unusually difficult puzzle of this type, which is to make 2,5,6,6 total to 17".

Let us start by defining suitable _operators_ so that we can conveniently use the domain-specific language to reason about such tasks, using _infix_ notation:

        :- op(400, yfx, ×).
        :- op(400, yfx, ÷).

Next, I describe the relation between a list of numbers and possible shapes of _binary trees_ we can build from these numbers. We distinguish between _leaves_ and _inner nodes_ of the tree, and consequently use two functors that let us symbolically distinguish the different cases:

        numbers_tree([N], leaf(N)).
        numbers_tree(Vs0, binary(Left, Right)) :-
                permutation(Vs0, Vs),
                append([L|Ls], [R|Rs], Vs),
                numbers_tree([L|Ls], Left),
                numbers_tree([R|Rs], Right).

For example:

        ?- numbers_tree([1,2], T).
        T = binary(leaf(1), leaf(2)) ;
        T = binary(leaf(2), leaf(1)) ;
        false.

This does not yet say anything about the arithmetic _operators_ that we can use. Note that this definition may yield redundant solutions, as in:

        ?- numbers_tree([1,1], T).
        T = binary(leaf(1), leaf(1)) ;
        T = binary(leaf(1), leaf(1)) ;
        false.

That's completely OK though, and we can think about making it more efficient if necessary.

Now we are _almost_ done. It only remains to describe how different arithmetic operations affect the _result_ of the evaluation. This can be expressed with the following relations:

        tree_op_expr_value(leaf(N), _, N, N).
        tree_op_expr_value(binary(Left0, Right0), Op, Expr, Value) :-
                tree_op_expr_value(Left0, _, Left, VL),
                tree_op_expr_value(Right0, _, Right, VR),
                op_values_value(Op, VL, VR, Value),
                Expr =.. [Op,Left,Right].

        op_values_value(+, A, B, V) :- V is A + B.
        op_values_value(-, A, B, V) :- V is A - B.
        op_values_value(×, A, B, V) :- V is A * B.
        op_values_value(÷, A, B, V) :- B =\= 0, V is A rdiv B.

Time to try it out, using for example the following query:

        ?- time((numbers_tree([2,5,6,6], T),
                 tree_op_expr_value(T, _, Expr, 17))).

This yields:

        % 6,060 inferences, 0.004 CPU in 0.004 seconds (92% CPU, 1551459 Lips)
        T = binary(binary(leaf(2), binary(leaf(5), leaf(6))), leaf(6)),
        Expr =  (2+5÷6)×6 .

It seems to work nicely. On backtracking, _all_ solutions are generated. Note that this solution uses built-in _rational numbers_ that are available in several Prolog systems.

<comment><USER6> Thank you for this! As soon as I saw the problem, I thought "use prolog".

<comment><USER4> You are welcome! Prolog is a great investment: Once you have put in enough effort to solve practical tasks with it, it pays off big time, much like compound interest of capital.

</comment></comment></comment><comment><USER7> I used to ask this as an interview question at Parse. I don't think it's that good of an interview question any more though. But it is definitely interesting to see how people try to solve it!

</comment><comment><USER8> i wonder what the complexity of the generalized version of the problem is. it is a bit similar to subset sum, which is np complete.

in this problem we have 4 operators (+, -, /, *) to consider instead of just 1 (+), so it is more complex than subset sum in this regard. also as a result of having different operators, the ordering of the numbers matter in this case, which doesn't matter in subset sum. however the fact that we have to use each number exactly once significantly reduces the search space</comment>


Object-oriented Programming in vanilla JavaScript - <AUTHOR> https://medium.com/@shlominissan/object-oriented-programming-in-vanilla-javascript-f3945b15f08a <comment><USER2> Some parts of this article are word-for–word copied from the MDN article on Inheritance and the prototype chain [0]

For example:

> While this is often considered to be one of JavaScript's weaknesses, the > prototypal inheritance model is in fact more powerful than the classic > model. It is, for example, fairly trivial to build a classic model on top of > a prototypal model.

Although the MDN content is CC-licensed it behoves the author to be clearer about what is quotation and what is original content.

[0]: [https://developer.mozilla.org/en- US/docs/Web/JavaScript/Inhe...](https://developer.mozilla.org/en- US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain)

</comment><comment><USER3> I wrote a paper on Classical OOP with ECMAScript 3/5 back in 2012 during my work on (the then-not-GNU) ease.js, which goes into quite a bit of detail on how prototypes work:

[https://mikegerwitz.com/papers/coope/coope.pdf](https://mikegerwitz.com/papers/coope/coope.pdf)

I also provide a lot of information on the implementation of GNU ease.js here:

[https://www.gnu.org/software/easejs/manual/Implementation- De...](https://www.gnu.org/software/easejs/manual/Implementation- Details.html#Implementation-Details)

<comment><USER4> It's a good paper, but it really needs a more accessible, much less dense, layout, and some syntax highlighting.

</comment></comment><comment><USER5> There are much nicer patterns available to program in an Object Oriented (or rather JavaScript) style. In the following gist I demonstrate (using a simple container library) private, protected and public members (including methods and properties) along with setting each object up for correct prototypal inheritance.

[https://gist.github.com/nomad- software/78be4f1dd429325c5ebed...](https://gist.github.com/nomad- software/78be4f1dd429325c5ebede48237f5120)

I would always start with this pattern for readability and maintainability sake and if performance becomes an issue switch to the `Obj.prototype.method = f()` form to avoid duplicating method instances.

<comment><USER6> Why symbol.iterator?

<comment><USER7> This lets you specify the default iterator for an object. Lets you use `for of` on the object just like you can with arrays, maps, strings, sets, and typedarrays.

</comment></comment></comment><comment><USER8> Mozilla has a nice writeup:

[https://developer.mozilla.org/nl/docs/Web/JavaScript/Inherit...](https://developer.mozilla.org/nl/docs/Web/JavaScript/Inheritance_and_the_prototype_chain)

But note:

> The lookup time for properties that are high up on the prototype chain can > have a negative impact on performance, and this may be significant in code > where performance is critical. Additionally, trying to access nonexistent > properties will always traverse the full prototype chain.

<comment><USER9> > The lookup time for properties that are high up on the prototype chain can > have a negative impact on performance, and this may be significant in code > where performance is critical. Additionally, trying to access nonexistent > properties will always traverse the full prototype chain.

This makes no sense to me - surely every non-trivial JavaScript implementation has inline caching, and are not doing any kind of lookup at all in performance critical code?

</comment></comment><comment><USER10> Why not [https://eloquentjavascript.net/](https://eloquentjavascript.net/)? The 2nd edition is still good from my understanding.

The author is also trying to update it and is close to their funding goal: [https://eloquentjavascript.net/3rd_edition/](https://eloquentjavascript.net/3rd_edition/)

<comment><USER11> Thanks for bringing this up, I didn't know they were looking for funding for a third edition.

</comment></comment><comment><USER12> On this theme of the joys of plain old unencumbered javascript, I did one titled:

Callback Heaven: Continuation Passing Style Patterns for JavaScript:

[https://email@example.com/continuation-passing- style-p...](https://email@example.com/continuation-passing-style- patterns-for-javascript-5528449d3070)

</comment><comment><USER13> The inheritance example is incomplete, as it should do `Editor.prototype.constructor = Editor;` after `Editor.prototype = ..`. Without this, `david.constructor` will be `User`, and a check like `david.constructor === Editor` will yield false. It's not a huge deal, since the class is usually checked with `instanceof`, but it shows that classes in ES5 are quite subtle.

</comment><comment><USER14> Just use `class`: [https://developer.mozilla.org/en- US/docs/Web/JavaScript/Refe...](https://developer.mozilla.org/en- US/docs/Web/JavaScript/Reference/Classes)

If, for some reason, you need to support old browsers, you can transpile to ES5, ES3, stone tablets and similar.

<comment><USER15> Classes are just syntactic sugar. They use prototype under the hood. So maybe it's good to know what happen there.

</comment></comment><comment><USER16>
       var MyApp = MyApp || {};

This is an anti-pattern, only use it for polyfilling. Use local variable scope!

<comment><USER17> I used this pattern when you had multiple files extending the same global state. For example when lazy loading based on the page you're on.

It can definitely be overused, which is probably why it's an anti pattern, but it had it's uses before webpack.

<comment><USER16> Here's how I do it:

      "use strict";
      if(window.hasOwnProperty("MyApp")) throw new Error("MyApp already exist!");
      var MyApp = {};

But I recommend using a module loader.

<comment><USER17> That's not exactly the same code as above but yeah, use module loaders.

</comment></comment></comment></comment><comment><USER18> The post seems to be missing composition. One way of doing it is like this:

      const foo = {
          someVal: true,
          methodA() {},
          methodB() {}
      };
      const bar = Object.assign({}, foo, {
          methodC() {}
      });
      // bar now has all the properties of foo, plus methodC

<comment><USER19> Unfortunately, Object.assign() isn't supported by any IE except Edge.

[https://docs.microsoft.com/en- us/scripting/javascript/refere...](https://docs.microsoft.com/en- us/scripting/javascript/reference/object-assign-function-object-javascript)

<comment><USER14> And? Is IE really that common to support, even in enterprises, in 2017? In 2018? In 2036?

IE already requires twice the budget - no grid, no flex, no ES8, and maintaining polyfills for all these things (if they're possible) requires maintenance and slows down build time.

Even slow moving corporates have AD managed Chrome or Edge since half the products they purchase don't work with IE.

The only reason people keep supporting it is people keep making it a big deal if something doesn't work on an unmaintained browser. We have to draw the line somewhere.

<comment><USER20> Short answer is yes. Typically the requirement is IE 10 or 11 now, rather than 6 or 8 as it used to be. So progress is being made.

<comment><USER14> Do you have someone who'll double your frontend budget, or a situation where IE users that have no other browsers available are so lucrative it's worth doubling your budget, to support them?

Frontend is grid, flex, and ES8. Supporting the older equivalents is expensive and it's web developers, caught in a culture of "it's good to support outdated browsers" who are paying the cost themselves, not clients.

<comment><USER21> It doesn't take double the budget to support IE and the vast majority of frontend work isn't in grid, flex, and ES8.

<comment><USER14> It takes double the amount of effort (a conservative estimate) to use floats, clearfixes, overflow side effect hacks, wrappers and various other hacks for simple layout.

It takes double the amount of effort (a conservative estimate) for async.waterfall, endless .then() chaining, callback hell and various other techniques to work around lack of `await`

It takes double the amount of work (a conservative estimate) to do some kind of weird Flash thing because your browser doesn't support HTML5 clipboard.

...amongst a massive amount of other tech, all of which is supported on current browsers.

You don't see the cost since you're already paying it by avoiding current frontend techniques. But unless someone else is paying that cost you're giving away your time for free by supporting IE.

(Of course, you should support Edge amongst every other major browser)

<comment><USER22> I don't know any website that is using stuff like `await` in the frontend without transpiling it down via babel first.

For both the css and clipboard problems, there are loads of well known and supported libraries if supporting IE is in scope of your project.

<comment><USER14> Babel's been great, but currently most browsers don't need it - the only one that does is the topic of this thread.

Flex and grid are hard to emulate. So is clipboard.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER23> I did a write up on my blog [1] that attempts to explain how prototypal inheritance works.

That said, whenever I teach OOP in JS I have found that a lot of developers do not understand the prototypal nature of JS.

Another source of confusion is the `this` keyword, how it works, and consequently how apply/call (which this article uses) affect `this' inside the function (or method).

[1] - [http://looselytyped.com/blog/2012/08/22/on-prototypal- inheri...](http://looselytyped.com/blog/2012/08/22/on-prototypal-inheritance- part-ii/)

</comment><comment><USER24> There are two things I have always wondered:

1) if there are people who come back to using inheritance AFTER doing programming with typed systems that support typeclasses (like Haskell). If so, would you able to articulate why you think inheritance is still a superior pattern?

2) if there were any use cases that could be solved using inheritance that could not be solved more elegantly without it?

<comment><USER25> What are typeclasses if not inheritance? As someone without a formal CS background, a type with multiple typeclasses sure looks to me like a class inheriting from multiple interfaces.

<comment><USER26> > What are typeclasses if not inheritance?

Overloading not inheritance. It is closer to the notion of interfaces in traditional OO languages, but it's a mistake to confuse interface implementation as inheritance.

This is a common problem with traditional OO languages: they conflate inheritance with subtyping, ie. "Y inherits the behaviour of X" is not _always_ the same as "Y can be used anywhere an X can be used" (subtyping). C++ has "private inheritance" to separate these notions now, but it's a kludge from this initial design mistake.

So type classes use subtyping, but not inheritance. Interface implementation is also closer to subtyping than inheritance.

</comment></comment></comment><comment><USER27> Shameless plug - here is my description of how inheritance works in JS. [https://github.com/sAbakumoff/Pritle/blob/master/2.Inhertian...](https://github.com/sAbakumoff/Pritle/blob/master/2.Inhertiance.md)

</comment><comment><USER28> Great article! A few things have caught my eye:

> MyApp.users = MyApp.user || {};

Is this a typo, or intentional? If it is intentional, can someone explain the thought behind it?

Also, in some examples Medium (or the author's text editor) seems to have changed apostrophes and quotation marks, this makes the examples harder to try.

<comment><USER29>
      foo = foo || {}

"mark foo as being foo if it is already defined or as an empty new object {} if it is not"

It's just to not accidentally set a already defined foo as an empty object incase foo is already defined. Yeah... JavaScript...

Another common idiom:

      const PORT = process.env.PORT || 8080

The || (logical OR) can be used for setting a default incase the value before it is falsey (null, undefined, false...).

<comment><USER30> Why the "Yeah...JavaScript..."? The inline || is an incredibly common and useful feature in many languages. Also Op was just talking about the plural/singular difference.

<comment><USER31> You're right that we might use "short-circuiting" (AKA lazy) `||` in many languages to use a default value, but it doesn't usually work for _variables_.

For example, in Python:

        >>> foo or "default"
        Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
        NameError: name 'foo' is not defined

In Javascript, variables are either bound (e.g. with `var`, as a function argument, etc.) or else they're treated as properties of the `window` object (behaving effectively as globals).

This is very unusual, and can be thought of as mixing "data" with "code": the `window` object acts like a reified version of (global) binding environment, which in most other languages is implicit. This has implications for things like the usual distinction between bound and free variables (since we can imperatively add fields to `window` at any point), and hence for things like alpha-equivalence.

<comment><USER32> It will work for `foo = None`. It is just that undefined vars in Python are an error in a different class from a missing value.

For some reason, the short-circuiting is more used on languages where undefined vars is in the same class of missing values. But that reason is not obvious to me. Python in particular has an odd mixing of quasi-static and dynamic errors that works unreasonably well but does not accept this construction.

<comment><USER31> > It will work for `foo = None`

Yes, but in that case the variable is irrelevant:

        foo = None
        foo or "default"

Here the variable `foo` is 'just doing its job' and can be simplified away to get:

        None or "default"

This shows that variables aren't involved here: `or` is just an operation on data (in this case `None` and `"default"`), just like `+` or ` _`.

> It is just that undefined vars in Python are an error in a different class > from a missing value.

Exactly, and I think that's a perfectly reasonable justifaction for disparaging Javascript (along with bash, PHP and anything else which has this similar behaviour).

In fact, as I said above, Javascript doesn't even have a notion of "undefined variable", since variables will be looked up in the `window` object if they're not locally bound, and hence what _looks* like an undefined variable is _actually_ (according to Javascript's semantics) a missing value (a missing property of the `window` object).

> Python in particular has an odd mixing of quasi-static and dynamic errors > that works unreasonably well but does not accept this construction.

I'm not sure what you mean here. As far as I can tell, there are two ways to think about errors in Python:

\- From one perspective, all Python errors are dynamic, since they happen at run time when we attempt to interpret the offending code. Some of these errors happen when/if we interpret an `import` statement, some happen when a more localised expression/statement is encountered.

\- A different perspective is that Python doesn't actually have a concept of errors at all. There are values available in the language which are _called_ "errors", but they're not _really_ errors, in the same way that `myError = "hello"` isn't actually an error (it's a string, which might _represent_ an error but it isn't a distinguished category of things; it's just a value). Since it's semantically meaningful to perform calculations involving these values (often, but not necessarily, with the control-flow statements `try`, `except` and `raise` (which is just another form of `yield`)) they're not "errors" in the same way that, say, a segfault or a compiler error is (which Python doesn't, or shouldn't, have).

For example, here's a perfectly valid (although inadvisable) way of defining `hello world` in Python:

        $ cat x.py
        def say_hello():
            try:
                foo()
                print "goodbye"
            except:
                print "hello"

        def foo():
            i_am_undefined

        $ python
        Python 2.7.13 (default, Dec 17 2016, 20:05:07)
        [GCC 5.4.0] on linux2
        Type "help", "copyright", "credits" or "license" for more information.
        >>> import x
        >>> x.say_hello()
        hello
        >>>

</comment></comment></comment></comment></comment></comment><comment><USER33> Here's a fun tool for visualizing prototype chains in random code.

[http://www.objectplayground.com](http://www.objectplayground.com)

</comment><comment><USER34> It all looks very tidy when you see it set out like that.

<comment><USER35> I love prototypical inheritence. I find it much tidier and easier to understand than the class based inheritence in other C family languages.

I really wish that class syntax did not become a thing in Javascript. IMO that was the biggest mistake made so far in it's development. Just call a spade a spade instead of piling another level of abstraction on top.

<comment><USER36> It added a bunch of other useful things, like getters/setters, constructor function, simpler method descriptions, etc.

I don't have a problem with the class title, after all it describes a class of things. When you extend something you really extend the scope of your class, so I still find it adequate.

There are differences in OO behavior between Java and C# but I haven't heard people complaining about naming classes classes.

<comment><USER37> That is because Java and C# use classical OO. Javascript does not, it uses prototypal OO.

Classes are static contracts that define the state and behavior of object instances.

Javascript objects are not contractually obligated to have the state and behavior of a 'class'.

<comment><USER36> I know that and probably that's why people feel a bit annoyed by the Class keyword. However it's really close to what classes should represent. [https://en.wikipedia.org/wiki/Class_(computer_programming)](https://en.wikipedia.org/wiki/Class_\(computer_programming\)) first two paragraph matches the JS use case well.

> _Javascript objects are not contractually obligated to have the state and > behavior of a 'class'._

I don't know what you mean by "contractually obligated", but if I instantiate a class in JS then it will have a state and behavior I defined in that class. If your problem is that if I change that class later, then the instances will change as well, then yes, it works like that. Calling something a class in my mind is not strictly limited to classical OO, it's just a loose concept different languages implement differently.

</comment></comment></comment></comment></comment><comment><USER38> I feel like this article is 30 steps backward instead of a few steps forward.

</comment><comment><USER39> Plagiarized, isn't it?</comment>


My Cervical X-ray after experiencing a wide range of neurological problems - <AUTHOR> https://www.dropbox.com/s/qhd2irvuxom5rgr/neck-xray.jpg

<comment><AUTHOR> See anything abnormal?

</comment><comment><USER2> Ok, what is it?</comment>