Netflix restricts streaming from abroad - <AUTHOR> http://money.cnn.com/2015/01/05/technology/netflix-vpn/index.html

<comment><USER2> The linked-to Reddit post, [http://www.reddit.com/r/netflix/comments/2qevqt/meta_netflix...](http://www.reddit.com/r/netflix/comments/2qevqt/meta_netflix_is_starting_to_crack_down_on_dns_vpn/), makes it clear that it's not a VPN restriction: people are configuring DNS servers to resolve Netflix names with US geographic resolution, but the new Netflix app is no longer using system DNS settings, it has Google DNS hardcoded in. Nothing about VPNs, per se.

<comment><USER3> Good news then. It means all it takes to bypass this is an iptables rule on a openwrt router.

<comment><USER4> Correct. Either create a firewall rule or if your parents router isn't good enough create a null static route of 18.104.22.168/255.255.255.255 and 18.104.22.168/255.255.255.255 to the routers IP address with a metric of 2 and you'll achieve the same affect as a iptables/pf rule.

</comment></comment></comment><comment><USER5> It's funny that copyright holders restrict people to legally watch their content and then complain that their content is being pirated.

<comment><USER6> >"We think there is a fundamental misconception about piracy," Newell said. "Piracy is almost always a service problem and not a pricing problem. For example, if a pirate offers a product anywhere in the world, 24/7, purchasable from the convenience of your personal computer, and the legal provider says the product is region-locked, will come to your country three months after the U.S. release and can only be purchased at a brick and mortar store, then the pirate's service is more valuable.

-Gabe Newell of Valve

[http://www.ign.com/articles/2011/11/25/gabe-says-piracy- isnt...](http://www.ign.com/articles/2011/11/25/gabe-says-piracy-isnt-about- price)

<comment><USER4> It is a service problem.

Game of Thrones used to available for 30-40 bucks on iTunes in the form of a season pass. It allowed Australians to prepurchase the box set of the series and watch to episodes as they aired (in sync with USA release schedule)

Used to. In Australia we only have one cable company Foxtel which has advertisements, 10-20mins per 1hr of scheduled programming. Foxtel secured exclusive rights to season 2 and 3. Now the only legal way to watch game of thrones is to suscribe under multi year contracts at 24/month, endure the advertising and to make matters worse episodes were delayed broadcast by 24-48 hours.

Delayed broadcast is a horrible, in Australia it basically means "avoid social media" for 48h until Foxtel airs or have the storyline ruined. With GOT whereby every episode was a epic twist piracy won out. Free, Imediate and no ads.

Aussies got REALLY pissed off and just resulted to pirating from piratebay. Foxtel got all uppity in the media, calling Australians a bunch of pirates and then started lobbying government for copyright reform.

</comment></comment></comment><comment><USER7> This title is not completely accurate. If you read the article it specifically references users attempting to VPN and also using the Netflix Android app.

I am gonna go out on a limb and say the app is probably checking the GPS in order to achieve this.

Fortunately, GPS can be spoofed with the developer tools if someone wants to test my theory: [http://stackoverflow.com/questions/2279647/how-to-emulate- gp...](http://stackoverflow.com/questions/2279647/how-to-emulate-gps-location- in-the-android-emulator/2279827#2279827)

<comment><USER8> We changed the post to use the article's current title, which is consistent with what you're saying. (The submitted title was "Netflix blocks users streaming via VPN", which I think may also have been what the article originally said.)

<comment><AUTHOR> Yes that is correct and apologies for that. After posting the article I found that there were no changes to the way they detect VPN access. In actual fact it was some change to just the Android App which is probably DNS resolution.

</comment></comment></comment><comment><USER9> Curious -- how is this technically possible? Does Netflix simply maintain a blacklist of IP's they know belong to certain VPN services? If you used a VPN that wasn't popular enough to be "on the radar" (e.g. your corporate VPN based in the US) would Netflix have any way of blocking it?

<comment><USER10> For the Android app at least, it's manually setting the DNS lookup to 126.96.36.199 (source: [http://www.reddit.com/r/netflix/comments/2qevqt/meta_netflix...](http://www.reddit.com/r/netflix/comments/2qevqt/meta_netflix_is_starting_to_crack_down_on_dns_vpn/))

<comment><USER11> Wow -- so if you lock down your network's DNS (say, to OpenDNS) you can't use the Netflix app in Android?

<comment><USER12> Correct. But in most places that are doing those types of DNS restrictions they would see this as a win/win, since if you're blocking Google DNS, you're likely blocking services like Netflix anyway.

</comment></comment></comment></comment><comment><USER13> Netflix told Engadget that there has been "no change" in the way it handles VPNs: [http://www.engadget.com/2015/01/03/netflix-clamps-down-on- vp...](http://www.engadget.com/2015/01/03/netflix-clamps-down-on-vpns/)

Possibly this is just a bug that people have misunderstood?

<comment><USER14> Per the CNN article, there's been no change in _policy_. That doesn't exclude technical changes. Engadget quotes two words, and who knows if they've accurately represented the context.

</comment></comment><comment><USER15> Hmm, shot by both sides. Now your ISP will throttle your Netflix stream to try and punish you for not buying video content from them, and Netflix will stop you from using a VPN to try and slip past your ISP?

<comment><USER16> I tried this morning and it still worked through domestic VPN, i.e., I'm a US customer using a VPN exit in the US. It only seems to be targeted at those using VPNs to get around region restrictions. So it should still be effective to circumvent ISP tracking, throttling and tampering.

</comment></comment><comment><USER17> I wish they could just let paying customers watch whatever they want.

<comment><USER18> So do I, and I bet Netflix does too. But I imagine it's not up to them to decide. They have to comply with licensing restrictions.

</comment></comment><comment><USER19> Interesting. I use unblock-us (no affiliation) which I assumed just switched your dns to make it look like you were in another country.

[http://superuser.com/q/617266/6263](http://superuser.com/q/617266/6263)

Can someone educate me as to why people need to use a vpn to access Netflix instead of a service like the above?

Is it only for people in countries that Netflix doesn't service?

 __EDIT __, yes I 'm well aware of the different catalogs in different countries, that's the point of using unblock-us:) That doesn't answer the question I had asked:)

<comment><USER4> From what I've read it is speculated that NetFlix is now doing nslookups within the actual client with a internal whitelist of DNS servers; ie the client no loner trusts the results from the system configured resolvers and does spot checks.

Workaround is simple really; null route the DNS servers at your router. I have to do this anyway to get chromecast working with UnblockUS as the chromecast is configured explictitly from the factory in a attempt to prevent these things.

* create static route at router for 22.214.171.124/255.255.255.255 to your routers IP with metric of 2. Then do the same with 126.96.36.199. Note this disables querying googles DNS infrastructure on all devices connected on the network.

<comment><USER20> I'm not fully sure I understand this, so what this will do is the client will attempt and fail to check DNS, so it'll fall back to the DNS you're providing again?

<comment><USER4> Configure your router with DHCP and instead of using the upstream DNS server from your ISP configure in the servers from UnblockUS. Additionally create a firewall rule or null static route that denies all network connectivity to 126.96.36.199 and 126.96.36.199.

Under the above configuration the chromecast will obtain a IP address and the DNS resolver from the router. Chromecast devices provide no way to configure DNS servers and by default does not trust the responses from your router, instead it trusts and uses Google DNS servers, it's only when network connectivity is blocked does the chromecast "degrade" to using the DNS server provided by the router.

If your router is good enough I highly suggest creating two networks by aliasing your uplink, then applying a firewall rule to the uplink that blocks the DNS servers and then tagging by MAC address all devices such as TV/Consoles etc.

That way for day to day computering you can use your standard resolvers but traffic is from entertainment network/devices is forced to go out via your tagged uplink - which blocks google DNS and uses UnblockUS for resolution.

Better security practice as it means you can be very specific as to what devices should be allowed to be man in the middled/traffic rewritten by UnblockUS. MITM your TV? who cares, MITM your workstation - yeah not a good idea.

</comment></comment></comment></comment><comment><USER21> Aside from detecting your ip location they must be running some other proxy detecting schemes.

I live in Europe and have squid proxy server running on my Amazon instance located in Portland, Oregon (something like my private "free proxy"). It works ok in Firefox, but fails in Chrome, can't really figure out why. I suspect chrome extension I use to easily manage proxies adds some custom header that is detected by Netflix. And it's NOT some obvious header like "via" or "x-forwarded-for" which I disabled as a matter of course in squid conf. All "locate my ip" sites tell me I'm from US, but netflix tells me I'm from x (which is my homecountry).

Alternative to running http proxy such as squid is using ssh socks proxy(provided server you ssh to is located in US). This cannot be detected by any means IMO.

</comment><comment><USER22> Assuming there is any validity to this story, I feel this is at least somewhat ironic considering Netflix's position as posterboy for "network neutrality." If one is neutral about the network, it should be of no concern whether the user is accessing Netflix via direct TCP/UDP or an encrypted tunnel. Nor should it matter what the client's IP address is.

I don't mean to imply that Netflix is actually in favor of a truly neutral network—or even whether or not a truly neutral network can in practice exist—but rather to highlight how "neutrality" means different things to different people.

<comment><USER23> Pretty sure the copyright owners who are evidently behind this couldn't care less about network neutrality; but for some reason they _do_ care quite a bit about who can watch what in which country.

</comment></comment><comment><USER24> Wouldn't it be easier for Netflix to ask for a valid US ID document to its customers to prevent this? Or would this be considered a violation of privacy somehow?

Filtering users by ip address should not be allowed IMHO. What if I am a legitimate user traveling in Europe or some other "blocked" country? Aren't them violating my rights then?

Or even better, what if I am a legitimate user (e.g. an US citizen) using one of those VPN, on what legal grounds are they denying me the access to the service?

(I am sorry if these questions may look stupid to you, please don't kill me :P)

<comment><USER25> For start, that would significantly increase the barrier to registration and almost certainly put a _lot_ of potential customers off.

</comment></comment><comment><USER26> Netflix (and partners) should take the lead and make its content accessible without any border restrictions. There is no technical reason for this restriction. It is purely for the purpose of getting more money. Is the problem purely a copyright issue, or is it something else? Eg, the government of the non-US country losing out of tax revenue from the non-US Netflix subscriptions.

<comment><USER27> They have to play nice with Hollywood in order to get content. Doing something like this would be giving them the middle finger, and Netflix doesn't want to do that.

</comment></comment><comment><USER28> I hope they don't hit my VPN, I use it to get around ISP throttling.

Edit: since this is a DNS hack, looks like I'll be OK.

</comment><comment><USER29> That's completely ridiculous. I guess people who are frequently abroad will simply go back to pirating.

</comment><comment><USER30> Educate me. What's stopping people from sending their DNS queries through the VPN as well?

</comment><comment><USER31> This has not affected me yet - has it anyone else?

</comment><comment><USER32> How is it possible to block vpn access?

</comment><comment><USER33> just when we thought, "Finally, here's a content delivery system that isnt artificially limited by some stupid regional, device (DRM), screen-size or targeted release-date rules."

</comment><comment><USER34> Why? Shut up and take my money! :-D</comment>


Ask HN: I have $100k in cash. In what kind of startup should I invest it? - <AUTHOR>

My problem is, I don't know what to do. I have some startup ideas but they are small ideas which I think they will not be a revolutionary startup. I would like to hear best advices to train my idea muscles of my brain to come up with some good ideas, or any new ideas from you.
Below I wrote down my skills and some info. But as you know, with this money I can hire any professional to do the work. To save money I'll use my skills, I'll do whatever I can.
My skills:
- Professional graphic & web design, ui/ux design (7 years in industry)
- Professional illustrator (diploma from painting school)
- Professional SEO knowledge (4 years experience)
- HTML, CSS skills, basic PHP skills.
- Professional Oral surgeon ( 2 universities, 10 years of study, doing my MD now)
- Intermediate Marketing skills (read some books, reading daily blogs, magazines, implemented on a startup)
- Intermediate Entrepreneurship skills (read some books, reading daily blogs, magazines, implemented on a startup)
- Small startup experience. Still CEO.
- Professional Piano player (5 years of piano school)
- Live in Germany, but don't have EU citizenship. Have residency permission as a professional doctor. Citizen of Azerbaijan Republic.
- Married, no kids.
- I'm 25. <comment><USER2> Whenever you get frustrated about a tool, a process, a company, a product, or an interaction you have (basically anything that is not a personal relationship), write it down.

Keep a list of these. Come back to them once a week and think about what you would like to be different or how you would make your experience better. Cross off any frustrations that you would not pay money to fix.

Refine this list by determining if:

a) Others (people) have similar frustrations to you

b) Others would pay money to fix or reduce their frustrations

That should get you started in the right direction.

<comment><AUTHOR> I have a Notebook and a Evernote notebook about this. I write down all my ideas on these notebooks. My passion is so big about startups, that sometimes I do this when I have a Patient. I stop the treatment and with the help of my nurses I write the ideas on the list.

But the ideas are not revolutionary. It seems that everything is already done. I know that always there is a unsolved problem but, I don't know if it's my fault or it's normal, it's too hard to come up with a great idea nowadays.

<comment><USER3> Yes, the idea is key but only a part of the whole picture.

Are you open to discussing an idea further?

<comment><AUTHOR> yes of course

<comment><USER3> You can reach me here: dave (at) focial (dot) com

</comment></comment></comment></comment></comment><comment><USER4> You need to consider what you want out of that money -- if you really want a fiscal return on your investment then you should stay away from startups. But if you serious...

First you should probably not consider being a simple angel investor unless you really know what you're doing. Unless you fully expect to lose all that money, with little to show other than a business card. The experience of being an angel investor will only really benefit you if you expect to have another infusion of cash in 6 months that you can blow through.

A more prudent course is to find a partner who might have an idea and an advisor who has been through the world of startups and stock before (they could be the same person, but just make sure the partner is not taking you for a ride). Then build it! Know that you can go for sometime without raising money, paying your bills out of the savings. Odds are you will still lose your money, but you will have learned a lot in the process -- including some learning that will really help you to be an angel investor in the future.

</comment><comment><USER5> Wow 7 years of graphic design, 5 years of piano, and 10 years of study as an oral surgeon and you're only 25!

Sounds like you should pick up some skills in Mobile Development and solve a problem that you've encountered through out your extremely diverse life experiences. I recommend mobile because the distribution mechanisms are straight forward and more accessible.

Don't worry so much about whether some of these problems have already been tackled by others, but think about how you could solve them better.

</comment><comment><USER6> Are you asking what startup to invest in or to start?

Startups are extremely high risk and the only way people make money investing in them is to invest in _a lot_ of them. Given the amount of money you have, investing in startups would essentially be gambling. If you had 25x that amount, you could diversify enough to maybe see a positive return in 5 years, but even then it would be a gamble especially if you don't have any experience evaluating startups.

If you want to start a company, well that's different. I still wouldn't invest more than say, a quarter of that, but at least you'll have enough money in the bank that you don't have as much pressure on you.

<comment><AUTHOR> I want to start a startup. The thread is about how and in what kind of startup shoul I invest that it would be smart investment. I would like to hear advices like : dont start next groupon clone dailydeal startup, dont start next color like social media, porn portal etc.

<comment><USER7> It sounds like you're pretty new to this. Have you looked to see if there are any local angel investor groups in your area?

Investing through a syndicate gives you an opportunity to invest your money in a number of startups, and also to benefit from the additional scrutiny they will provide when assessing potential investments.

Not to mention using tried and tested teem sheets, agreements etc.

</comment></comment></comment><comment><USER8> Could you tell me how you did 10 years of study for Oral Surgery and yet you're 25 yo?

<comment><AUTHOR> It's not full 10 years, I started when I was 17. By 2012 I am on my 10th year. I was born in 22 july 1986. After few month I will be 26.

</comment></comment><comment><USER9> Honestly, it sounds like you really need to decide what you want- do you want to launch an internet startup or do you want to continue as a professional oral surgeon?

If you choose to take your money and launch your own general internet startup (ie a "Dropbox"), I suggest you quit your MD tomorrow. Treating an start-up as a side project (and a side skill) is a bad idea. After all, your competitors are spending 100% of their time on their competing start-up.

That said, you do have domain expertise in oral surgery- try and leverage that domain expertise. Use your unique blend of skills to your advantage.

</comment><comment><USER10> > Professional Oral surgeon ( 2 universities, 10 years of study, doing my MD > now)

Invest in a way to help people maintain their teeth better. Any improvement in technology in this field would benefit a very large amount of people, and reduce pain and discomfort for people. This is something people would be very willing to pay for. Perhaps you can imagine some areas within dentistry where you could improve things? If you have a good idea to improve people's oral health, then I would be interested in investing the same amount as you in your idea.

<comment><AUTHOR> Of course there are plenty of problems in dentistry. But actually thousands of scientists and oral health companies already work on it. Tech related startups are most easiest way of making revolutionary things.

<comment><USER11> "Tech related startups are most easiest way of making revolutionary things." - I would say Tech related start ups are easier to start, as in lower initial capital investment maybe. However, I won't be too sure about easiest way to make revolutionary things.

Pick a problem that would like/love to work on. Even if its the harder thing to do.

</comment></comment></comment><comment><USER12> If I understand you have $100k burning a hole in your pocket and you want to use it to fund a start-up in some way. If you want a riskier way but more input and ownership, you can post on angel list. You can post on HN for potential start-ups that need funding. You can invest in many project on kickstarter and spread the risk. Also, I personally have several niche start- ups that could use funding and man-hours to move a little faster.

</comment><comment><USER13> I have a couple of friends who are oral surgeons. There are many pain points in the software and process they use. Being in the field, I'm sure you can find some start up ideas to alleviate the pain? I'd suggest start with what you know and your background. If you don't do a start up, at least you can find companies that are in your industry to invest in. Remember, don't put all your eggs in one basket!

<comment><AUTHOR> Yes I found some ideas about dentistry and oral surgery but already said, they are not revolutionary ideas. They can be small startups, but not next dropbox.

</comment></comment><comment><USER14> If you don't have an idea or a burning desire to start something _right now_, then you're probably just going to end up burning 100K really fast. Why not just put it in a savings account, earn a bit of interest, and keep it handy for when you come across that brilliant idea?

<comment><AUTHOR> Life is too short to do what you say. I want just to start. I can't wait anymore. I'm already 25. I'll die soon.

When you grow up you tend to get told the world is the way it is and you're life is just to live your life inside the world. Try not to bash into the walls too much. Try to have a nice family, have fun, save a little money.

That's a very limited life. Life can be much broader once you discover one simple fact: Everything around you that you call life was made up by people that were no smarter than you and you can change it, you can influence it, you can build your own things that other people can use.

Once you learn that, you'll never be the same again.

TL;DR - <http://www.youtube.com/watch?v=UvEiSa6_EPA>

</comment></comment><comment><USER15> The Bartermill.com looking for an investor. My email rmalenko gmail.com

</comment><comment><USER16> I recommend reading Atul Gawande's books:

The Checklist Manifesto [http://www.amazon.com/Checklist-Manifesto-How-Things- Right/d...](http://www.amazon.com/Checklist-Manifesto-How-Things- Right/dp/0312430000/ref=sr_1_1?s=books&ie=UTF8&qid=1328814006&sr=1-1)

Better [http://www.amazon.com/Better-Surgeons-Performance-Atul- Gawan...](http://www.amazon.com/Better-Surgeons-Performance-Atul- Gawande/dp/0805082115)

He's a New Yorker writer and practicing surgeon. His books contain lots of insight about ways that medicine could be vastly improved by innovation. Unfortunately, few techies are doctors.</comment>


Nalgebra – Linear algebra library for the Rust programming language - <AUTHOR> http://nalgebra.org/ <comment><USER2> At a quick glance this looks fairly complete. Anyone want to volunteer to compare the performance to FORTRAN/lapack and c++/eigen?</comment>


Neural Turing Machines - <AUTHOR> http://arxiv.org/abs/1410.5401

<comment><USER2> Previous discussion: [https://news.ycombinator.com/item?id=8487807](https://news.ycombinator.com/item?id=8487807)

</comment><comment><USER3> I'm going to be stupid in public on the hope that someone will correct me.

1\. I'm not clear on the point of this paper.

There are a lot of buzzwords and an extremely diverse set of references. The heart of the paper seems to be a comparison between Long-Short-Term-Memory (LSTM) recurrent nets and their NTM nets. But they don't expose the network to very long sequences, or sequences broken by arbitrarily long delays which are what LSTM nets are particularly good at. They seem to make the jump from "LSTM nets are theoretically turing complete" to "LSTM nets are a good benchmark for any computational task."

2\. The number of training examples seems huge

For many of the tasks they trained over hundreds of thousands of sequences. This seems like very very slow learning. If I'm meant to interpret these results as a network learning a computational rule (copying, sorting etc) is it really that impressive if it takes 200k examples before it gets it right? (Not sarcasm, I really don't know.)

<comment><USER4> Re: point of the paper, I think it's addressing a current need within representation learning research where there's this question of "Ok, we can teach really large neural networks stuff, but how do we compress that knowledge efficiently?" How can we learn more compact/efficient/reliable/discrete representations? I've only just finished reading it through and this seems to me to be a promising direction and one I'd like to see more research on.

Re: number of training examples, I'm taking the chart on pg 11 to mean the number of training examples shown. Based on that, it looks like the NTM is learning _a lot_ faster than the LSTM. As far as I can tell, it's getting near 0 loss about 20,000 examples in? It depends on the domain for whether learning w/ 20k examples is impressive or not, personally I think it's comparatively impressive.

Re: cherry picking of tasks to highlight perceived strengths of NTM, fair enough. Although this is one I'll be playing around with a bit to find out where that starts and stops...

Any thoughts on how this compares to the approach of HTMs?

</comment></comment><comment><USER5> Does a "typical" neural network not have any storage to speak of? When I've seen examples of neural networks working, it's seemed like they work in cycles in some way, with the states of each "neuron" affecting the state of others. Is that not potentially storage?

<comment><USER6> Recurrent neural networks work that way, but typically when anyone says "neural network" they mean a feed-forward network, which is as dumb as a lead pipe. It has no memory other than the trained synapse weights. After training, all it does is transform some input data into output data. It's a pure function. It's also a lot like a matrix transform.

I haven't read this paper fully yet, but it seems to be an attempt at simplifying RNNs by replacing some of the magic internal state, which tends to make them hard to reason about, with a more direct memory architecture.</comment></comment>


Why a mock doesn't work - <AUTHOR> https://nedbatchelder.com//blog/201908/why_your_mock_doesnt_work.html <comment><USER2> Agreed with the articles, mocks are very tied to implementation details. I almost always prefer state-based testing:

[https://martinfowler.com/articles/mocksArentStubs.html](https://martinfowler.com/articles/mocksArentStubs.html)

As "observable state goes from a to b" is much closer to a business/functional requirement that will still/always be true, regardless of refactorings.

Refactoring in codebases with state-based tests is a pleasure; in codebases with mock-based tests it's tedious, constantly updating tests when no semantic behavior was supposed to change.

Also, mocking via module hacks like in the article (and in the JS world) is scary; modules are basically global variables so it's a very coarse grained slice point. Dependency injection is almost always better.

<comment><USER3> Dependency injection leads to elaborate, brittle fixtures that become more elaborate and arcane over time.

And the sunk cost fallacy has people working for hours (and I've witnessed pairs spend two days, that's over three man days!) trying to maintain them.

I use mocks to arrange state A without going through all the business rules involved in creating state A. But you have to expose the states to do it, which can make for pretty descriptive code but is outside of some people's experience and so they resist it.

Earlier tests have already verified all routes to State A, the next batch of test now takes it as a given. This controls test explosion by utilizing transitivity. A->B B->C implies A->C. Tons of unit tests for A->B and B->C and then you only need a couple of functional tests (say, one negative and positive) test of A->C. You're just checking the plumbing isn't broken.

Otherwise, you get Cartesian products. You end up with elaborate, (often custom), mocks that couple all of the tests together in hard to maintain ways. You end up with tests that accidentally test the mocks/fixtures instead of the code.

Some of my current coworkers do this too. I don't know where this pattern comes from. It's often easier to replace their two page fixtures with two or three lines of mocks per test. It's often almost the same amount of code, but so what, each test can be read. Each test can be run individually, and behavioral changes to the code due to urges affect mostly the tests you would expect. Those tests can be fixed, rewritten, or just removed as they disagree with the new requirements.

The absolute worst is fixtures with asynchronous code. Those break constantly, and often invisibly. What's the point of a fire alarm if the damned thing doesn't work? It's almost worse than nothing at all.

<comment><USER4> > The absolute worst is fixtures with asynchronous code

I concur that setting up a test for async code is a complete pain in the arse. It's extra fun when the caller doesn't get a reply, so there's no response that you can assert your as valid or invalid. It's extra, extra fun when the tests in your test suite need to run in parallel without stepping on each other.

Here's an example. Say you've got PipelineService123 that receives a message with a chunk of data, transforms that data, and sends it elsewhere. Try thinking about dynamically setting an instance of PipelineService123, wiring up an input message sender, giving that sender the dynamic address of the instance of PipelineService123, wiring up an out message receiver, making sure the instance of PipelineService123 knows how to reach the receiver, all to test whether or not everything is wired up correctly & that the data is being sent, transformed, and received properly, running this test in parallel with all of the other test cases, and keeping it reasonably easy to reason about. Good luck with that! I'm not sure even I even stayed on top of my attempt to describe it :P

<comment><USER5> Just curious : which language do you work with ?

In my previous work I had to work on a big asynchronous codebase in JavaScript and I had zero issues with asynchronicity at all, so maybe it's an ecosystem/language dependent issue ?

<comment><USER4> Elixir. Are you running your tests in parallel in the same process?

<comment><USER5> It depends on what you mean by parallel: nodeJs is single-threaded, so every CPU-bound task runs sequentially. But all the asynchronous tests are run concurrently by the test runner (Mocha[1] in my case).

[1] [https://mochajs.org/](https://mochajs.org/)

</comment></comment></comment></comment></comment></comment><comment><USER6> I really don't like that the topic title is a general statement but the article under is talking strictly in python landscape as an example and not discussing the idea itself.

Mocking by itself works fine. It's a good idea that works if used correctly. Misusing it or bad usage leads to issues - duh.

I'm familiar with the narrative that anything that is too hard (to get right at the first try) in our field means that it is bad - but I don't agree with it at all. We are at the point where craftsmanship should be a good metric to distinguish medicore developers from experts..

<comment><USER7> What title would you prefer? "Your Python mock might not work, but it could still be a good idea if you do it right, and here I will explain how"? :)

I didn't mean to imply that mocking is bad. Is that what you took from it? Why would I explain how to get mocks to work if I thought people shouldn't use mocks?

<comment><USER8> I've recently learned that some actually do consider mocking harmful.

Where I work right now, there's a really outdated and unfashionable fight over the benefit of unit testing in general. Existing engineers don't see value in test driven development, exhaustive testing, unit testing, and mocks/spies are thrown in... and we're a python shop. I'm utterly confused. I, too, grew concerned after reading–will I be hearing this cited/twisted as further evidence against investing in our dreadful testing situation?

<comment><USER9> I'm a died in the wool TTDer, but I actually think that mocking unnecessarily is usually harmful. I use it as a technique of last resort.

I should define my terms before I explain, because many people use the term "mock" to mean things it didn't originally mean. Test objects that are used in place of domain level objects were traditionally known as "fakes". A fake that represented a fixed known value was called a "stub". A fake that included an assertion that a function was called (or that collected data on function calling) was called a "mock". It's a bit confusing for me that many people use the term "mock" to mean "fake". I found it weird that the original article pointed to an article on faking and then used the term "mock" without referred to the original meaning of the that word (which makes me wonder what they mean when they say "fake").

Anyway, usually you want a fake when you don't have access to some part of the system to test it directly. Sometimes that's because it's a completely different service. You can fake out that service so that you can see if the code that interacts with that service is working, without having to actually set up the service.

A stub is useful in situations where you need to know that your code is working with specific values of data inputs. So you might have an object that you pass to a function and you want to know what happens if one of the properties on the object is null. It might be hard to set that up, so you can stub it out.

A mock on the other hand, basically tests if a function is called. A good example where you might legitimately need a mock is where you pass an object to a function and you are expecting that a callback on that object will be called. It's really hard to test that without a mock.

Where mocks can be dangerous is when you completely mock out any interfaces and stub the return values. You pass a fake object as a collaborator to your function and you test that your function works. The problem is that your fake object may not necessarily represent a real object in the system.

If you ever want to refactor the code, your tests will no longer tell you that a property is missing, or that a function is missing because all of your test code is using fake objects with mocked and stubbed methods. Ideally a unit test that uses an interface should fail when you change that interface. This allows you simply to change an interface somewhere and have your tests tell you exactly what you need to do to make that change work.

Where you end up getting a lot of conflict WRT testing strategy is that some people believe very strongly that unit tests should test things in isolation. Secondly people believe that unit testing should be a black box testing strategy. So you should test through your public interfaces only and any collaborators that adheres to the interface contract should work as expected.

In this style of testing, you are often encouraged to mock anything and everything at the interface boundary. This has many advantages. First, it means that your test objects can be very simple, so writing tests is very quick -- even if the code in the system is complex (because you aren't using any of that code). Second, because you are testing the public interface only and there is minimal setup, your tests become documentation of the interface contracts. Third, because it is black box, if you change the implementation of your "unit", you don't have to change your tests.

Despite these benefits, I'm not a big fan of this style. I like white box testing using real collaborators. My goal is not to define interfaces and nail them up -- quite the opposite. I want to be able to change interfaces fluidly. I value ease of refactoring over just about anything else. Second, I want to use real collaborators almost _because_ it is painful. If your collaborator is awkward and brittle to set up in tests, it is also awkward and brittle to set up in production code. My goal is to remove that and to simply the code. Again, my highest value is my ability to refactor the code. I want the code to become easier to work with over time, not harder and more complex. Finally, I want to code to break at a "white box" level, not a "black box" level when I change behaviour. Ideally, I want my tests to say, "On the third line of that function, we're going to have a problem because that function is different now". I _don 't_ want to be aware of problems at a larger scope "Somewhere in function A that calls function B which calls function C and D there is something wrong because it does something weird".

In the end I write small functions that are tested directly with real collaborators. I avoid private functions because it hides my implementation details. I test at a low level so that I avoid test complexity from excess branching. I get incredible specificity from failing tests, when end up essentially giving me a TODO list for what I need to do when refactoring code.

Hope that gives you some idea of at least why one person avoids mocking -- although, you _do_ need it sometimes. And to be fair, sometimes I'll do a London School, outside in, mock the world implementation if I'm not sure what I'm building. However, I throw away all my mocks and re-TDD once I know what I'm building.

<comment><USER10> I agree with basically all of this.

> some people believe very strongly that unit tests should test things in > isolation. Secondly people believe that unit testing should be a black box > testing strategy. So you should test through your public interfaces only and > any collaborators that adheres to the interface contract should work as > expected.

I think much of the confusion and talking-past-each-other comes from ambiguous language. I actually agree with all the things in the above quote (isolation, black-box, public-only, relying only on specified interfaces). Where I've differed from co-workers is that I consider the appropriate "unit" to be a feature/piece-of-functionality (e.g. "logging in"), whereas they consider the appropriate "unit" to be a piece of code (e.g. a method or class).

I had a bit of a rant about this at [http://chriswarbo.net/blog/2017-11-10-unit_testing_terminolo...](http://chriswarbo.net/blog/2017-11-10-unit_testing_terminology.html)

<comment><USER9> I think Michael Feathers explained it the best. He likened unit testing to clamping a piece of woodwork while you are working on it. The bits you are working on need to be in motion because you are working on them. The bits you are not working on them need to be clamped in place -- you don't want those things moving while you are working on some other bit. A "unit" is anything you might want to be clamped in place. It _can_ be a function. It _can_ be an object. It _can_ be a subsystem. You want to unit test at different levels of abstraction so that you can "clamp" those levels of abstraction down.

One of the things I've found people get confused with is that they see unit testing and integration testing as orthogonal. They think a unit test should exercise a small piece of code in isolation and an integration test should test examples of real collaborators. Frequently they mock out all their unit tests and write a few integration tests. Then their unit tests become brittle and annoying and so they delete them, leaving only a few integration tests. This leads a lot of people with the impression that only integration tests are useful. If we can back up and redefine "unit test", then the problem disappears.

I read your "rant". Don't even get me started on BDD :-) Originally people had problems understanding the purpose of TDD because the word "test" had them confused. They would think, "I need to write tests to ensure that this is working". They didn't think about it in terms of clamping the behaviour so that it doesn't change when you are working on another part of the system. For that reason, a lot of people discussed changing the word "test" to something else that truly embodied what TDD was all about. Many people hit on the word "behavior" \-- you want to document the current behaviour of your "units" (at different levels of abstraction). Somehow _this_ got totally confused with automated acceptance testing! Now we have things like cucumber (which I don't actually hate, but it accomplishes a _completely different goal than TDD_!)

What really frustrates me is when I talk to people about this stuff and they think I'm a complete lunatic :-)

</comment></comment></comment></comment></comment></comment><comment><USER11> For a person who does not code very large programs in Python, this looks scary and like something that is hardly "only one way to do it" and that the most elegant solution gives you what you want. How I import things (or the libraries I depend on!) affects how I can write my tests? Really?

My own Python scripts are typically single-screen in length. And one-off stuff, where they either work or don't, basically.

Is this stuff really what developers of large-scale Python programs have to take into account? Or is this blog post misinformed, because there is an obviously better and standard way?

<comment><USER12> no, this blog post is absolutely on point and correct. it can be extremely inconvenient and complicated to get around using mocks in many situations where you want to test things, so we want to use mocks when appropriate. Then, you definitely want to mock at the most specific level possible.

while mocking in a way that is specific to how modules are imported is technically "fragile", in that it is deeply dependent on the structure code that's being tested, this is not an issue in practice, because the mocks are present in our test suites that run for every code change. If a code change moves around module assignments, our test will fail, and we know that we have to adjust the test to accommodate for the change. With appropriate continuous integration and code review practices, a broken mock-oriented test can't be inadvertently pushed into a repository.

This does mean that when using mocks, you need to make sure mocks were called in the way that was expected for those cases where the code might silently move off using the mock in a way that wouldn't be detectable. The "os.listdir()" example in this blog is a pretty common case, using mocks to test code that works with filesystems, where you don't need or want to get involved with actually creating filesystems which may be a complex and expensive process, especially if the test suite runs concurrent processes. if you mock the behavior of "os.listdir" to return a series of results, after the test code has been exercised, you usually want to assert using mock.mock_calls that the test code did in fact call the functions expected, unless it's clear in some other way that the test code definitely used that information.

An example of this kind of code that I just helped someone with can be seen here: [https://github.com/sqlalchemy/alembic/commit/02a1bf3454acb7b...](https://github.com/sqlalchemy/alembic/commit/02a1bf3454acb7b02942e246c19326630a8f9175#diff-c1de9c971ea0a629f46ecaf7dccad37dR817) The Alembic test suite has a lot of test cases that go through all the trouble to build up real directory structures to test things, but that's a lot more work than just using a mock, so I use them where I can get away with this simpler approach.

<comment><USER13> > The "os.listdir()" example in this blog is a pretty common case, using mocks > to test code that works with filesystems, where you don't need or want to > get involved with actually creating filesystems which may be a complex and > expensive process, especially if the test suite runs concurrent processes.

Alternative: have an abstract base class that describes a file system API. Have one implementation that builds on top of OS primitives and have another one that is a mock (potentially auto-generated through some mocking framework). That way there is no need to monkey-patch standard library functions at runtime.

I did that within a project of mine, written in Go:

[https://github.com/buildbarn/bb- storage/blob/master/pkg/file...](https://github.com/buildbarn/bb- storage/blob/master/pkg/filesystem/directory.go)

[https://github.com/buildbarn/bb- storage/blob/master/pkg/file...](https://github.com/buildbarn/bb- storage/blob/master/pkg/filesystem/local_directory.go)

Pretty slick that I can now use [https://github.com/golang/mock](https://github.com/golang/mock) to automatically generate a mock of that.

<comment><USER12> Sure but then I have to write my real library code using an abstraction, making my code more difficult to read and maintain; a dependency injection system is then necessary in order to have the correct concrete implementations set up at runtime.

In this sense, mocks are solving the problem of having code that is full of dependency-injected AbstractFooBarFileSystemWithExtraPickles style of code, which is considered to be pretty un-Pythonic. I spent many years with Java and Spring so I can attest to both sides of this equation.

Those of us using Python are using it because it is an interpreted, dynamic scripting language. If I'm coding in something more rigid like C or Go, then I'd expect to have a more complex architecture in order to achieve things that are fairly simple in a scripting language.

<comment><USER13> > Sure but then I have to write my real library code using an abstraction, > making my code more difficult to read and maintain;

It depends, right? If you suddenly wanted to let your existing set of classes read their inputs not from disk, but from some other kind of storage (e.g., files embedded in a Zip file), you'd only need to write one extra class and you're good to go. That would be a lot harder if your code called os.* directly.

> a dependency injection system is then necessary in order to have the correct > concrete implementations set up at runtime.

If by dependency injection system you mean invoking one extra constructor in, say, main() and pass the object along as a handle, sure.

<comment><USER12> well again, I grew up on GOF programming and once I grokked how mocks in Python worked, I was very glad to embrace their approach, which has allowed me to write much simpler code that is more thoroughly tested; I of course still use abstractions to a great degree, but I no longer have to build out an abstraction system when I just want to make sure some fairly straightforward code is fully tested. I no longer have to build out everything as an abstraction when such a system is generally YAGNI, I can use the Python standard library directly.

This allows me to do less work, write and maintain less code, and have better test coverage. It allows my code to be more fully tested even when it has not yet been abstracted, if that's what's in store for it. Patching local imports within the scope of two lines of code is a non-issue thanks to Python context managers. I have much more complicated examples of code that was already plenty complicated and mocks allowed me to get it tested quickly and effectively, instead of having to break it out into even more complexity.

Basically mocks have been all productivity and no downside for me whatsoever, using the Python standard library mock which is extremely well designed.

</comment></comment></comment></comment></comment></comment><comment><USER14> If you find yourself fighting with mocks, ask yourself: is there a deeper design problem with my code? I often find that things I can't test easily have crappy design.

<comment><USER15> Couldn't agree more. I've done a few "coding dojo" sessions where my team and I start from scratch and write a new set of mock-based tests for a piece of existing code, and when it starts to get gnarly, it's always been because of an inconsistent interface, or confusing API of the code under test.

Bob Martin talks about this a lot; your UTs should be thought of as first- class clients of your objects' APIs. If something is hard to test, it's probably hard to use, or abstracted at the wrong level.

</comment></comment><comment><USER16> I think Ned strikes the right balance, showing risks associated with mock objects without condemning them outright. There is no doubt that people sometimes go overboard with mocking and there is no doubt that there are situations where it is really helpful.

</comment><comment><USER17> The author hasn't a problem with mocks. It has got a problem with monkey patching. You can use a mock along dependency injection, and never run into the problems the author has.

</comment><comment><USER18> Mocking is hard _really_ hard, in order to mock something you need to imitate its functionality and interface. This means the mock is inherently tightly- coupled to the implementation, which is now another dependency in your system.

After trying to work with mock databases and file systems, I've personally found that there's no substitute for the real thing. There's much less maintenance and greater reliability in spinning up a test environment with the exact implementation that will be used in the production environment.

There are cases where mocks are the only practical solution, (embedded systems, distributed systems) but mocking is surely the last resort...

</comment><comment><USER16> Python core developer Lisa Roach has a nice how-to video on exactly this subject: [https://www.youtube.com/watch?v=ww1UsGZV8fQ](https://www.youtube.com/watch?v=ww1UsGZV8fQ)

</comment><comment><USER19> I've wrestled with this problem several times. My conclusion was mocks are just fine, but this is a wart in that there isn't "one way to do it"

For the most part I can get by with one rule: always mock __the module __.

      with mock.patch('os.listdir'):

will always work, even if it doesn't accomplish what you want.

      with mock.patch('mymodule.os.listdir')

will fail if that module does not explicitly _import os_ and instead does something like _from os import listdir_ (perhaps because a later dev did not realize importing os directly was actually a requirement for the test and changed the code).

The rule is not perfect though. In the above case, the error will actually be

      ImportError: No module named os

This can be fixed with e.g.,

      assert hasattr(module, 'os'), "os module is not explicitly imported"

as a preamble to your test but ... it is not perfect by any means.

EDIT: formatting

<comment><USER7> I don't understand what you mean by "will always work, even if it doesn't accomplish what you want." Mocking os.listdir will be useless if your product code's imports don't match it. How is this "one rule" to use?

<comment><USER19> The os module ships with python, so the function call mocking os.listdir will always succeed even if the code being tested does not use os.listdir

By mocking mymodule.os.listdir you add a requirement that mymodule actually import the os module and take advantage of mock.patch failing loudly if it does not.

</comment></comment></comment><comment><USER20> I've always been dubious of using mock for tests which involve external API calls; at best they require you to reimplement the API according to the documentation (which there may be none, or that the API doesn't follow exactly for edge cases (i.e. the things you're meant to be testing)). At worst you're implementing a very small subset of the behaviour of the API and not testing how your code responds to the other behaviour. But I haven't come across other solutions (not that I have that a heap of experience here, just contributions to a couple of oss projects).

<comment><USER21> Mocking inputs from APIs is actually great if someone besides the original developer picks up the codebase, whether from a system or even down to isolated function stubs. This is because it gives insight into the expected inputs the original developer(s) had been expecting and can elucidate the source under test.

Integration tests fill the hole you're pointing out. You can even have integration tests designed to validate the mock inputs in many cases.

</comment></comment><comment><USER22> "...there are other approaches to solving the problems of isolating your product code from problematic dependencies."

What are some other approaches?

I have followed the redux-saga pattern with success but how else should we accomplish the same goal?

<comment><USER23> See the links at the top of the post. Both are excellent.

</comment></comment><comment><USER24> Ned's implicit definition of a mock is narrower than the generally accepted one. He actually described a stub created by monkey-patching. A mock allows for call verifications as well.

There are 3 main categories of techniques for managing dependent components used these days:

1\. In-process class/method/function mocks or stubs ([http://xunitpatterns.com/Mocks,%20Fakes,%20Stubs%20and%20Dum...](http://xunitpatterns.com/Mocks,%20Fakes,%20Stubs%20and%20Dummies.html) and [https://martinfowler.com/articles/mocksArentStubs.html](https://martinfowler.com/articles/mocksArentStubs.html))

1a. By monkey patching (which is what Ned has demonstrated in his article very well)

2a. By dependency injection

2\. Over-the-wire API mocks or stubs ([https://en.wikipedia.org/wiki/Comparison_of_API_simulation_t...](https://en.wikipedia.org/wiki/Comparison_of_API_simulation_tools))

3\. Virtual services/simulators ([https://en.wikipedia.org/wiki/Comparison_of_API_simulation_t...](https://en.wikipedia.org/wiki/Comparison_of_API_simulation_tools))

It's worth keeping in mind that all of them are part of a wider group of test doubles: [https://www.infoq.com/articles/stubbing-mocking-service- virt...](https://www.infoq.com/articles/stubbing-mocking-service- virtualization-differences/)

Other options available for decoupling from test dependencies:

1\. In-memory database [https://en.wikipedia.org/wiki/In- memory_database](https://en.wikipedia.org/wiki/In-memory_database)

2\. Test container [https://www.testcontainers.org/](https://www.testcontainers.org/)

3\. Legacy in a box [https://www.thoughtworks.com/radar/techniques/legacy-in- a-bo...](https://www.thoughtworks.com/radar/techniques/legacy-in-a-box)

</comment><comment><USER25> Why I don't mock:

[https://blog.metaobject.com/2014/05/why-i-don- mock.html](https://blog.metaobject.com/2014/05/why-i-don-mock.html)

<comment><USER26> You're talking about mocking database calls though. In my line of work (insurance brokerage), we use lots of insurance APIs and they are sometimes very slow (+20 seconds / call) or completely down at random hours. There is simply no way around mocking those API calls if you want a fast and reliable testsuite.

<comment><USER27> > or completely down at random hours

Also describes "dinosaur payment company" API sandboxes (stage).

So we end up testing against the production API with a staff member's credit card - well if we want to deploy any time soon.

Or I guess you could mock and cross your fingers that they haven't changed the API recently without telling you. Payment APIs are the most solid, but that's a low bar considering the state of third-party APIs in the real world.

If it wasn't hard for enterprises to build and manage APIs, then Google Apigee and Mulesoft wouldn't be worth billions.

</comment></comment></comment><comment><USER28> Beautiful explanation for something that tripped me up in early days of using mock/patch. Summary: (1) Variables in Python are names that refer to values. (2) (For that reason) Mock an object where it is used, not where it is defined.

</comment><comment><USER29> Even though it's not related, I wonder if this does apply to UI as well. I often want to see production near prototypes

</comment><comment><USER30> Is this python specific? Usually I replace the whole module with mock instead of the functions of it.

</comment><comment><USER31> the python mock module is one of those modules i would like to see rewritten from scratch. you won't get it right by first principles. you always need to go to the documentation. that's a sign that something is not right imo.

</comment><comment> c- "Why a mock doesn't work" *in python because of reasons

fixed the title.</comment>


How the Internet Is Loosening Our Grip on the Truth - <AUTHOR> http://www.nytimes.com/2016/11/03/technology/how-the-internet-is-loosening-our-grip-on-the-truth.html <comment><USER2> "For years, technologists and other utopians have argued that online news would be a boon to democracy. That has not been the case."

It clearly has. Had it not been for Wikileaks, and various online news organizations we would never have known the sheer amount of corruption afoot in this election, as well as the extent of the death grip political elites have on the entire system. I suppose old media has just become too entrenched and cozy with those in power to speak truth to power.

"a recent BuzzFeed analysis of top political pages on Facebook showed that right-wing sites published false or misleading information 38 percent of the time, and lefty sites did so 20 percent of the time."

In a recent analysis by the ultra-leftist junk news site Buzzfeed, they've found that right wing sites are worst than left wing sites. Wow, that's some great journalism right there. That kind of reporting is why we should ignore new media and stick with the old.

<comment><USER3> I was with you until the end.

"Stick with the old?" Would you really cite CNN, Fox, NBC and pals as unbiased reporting? From where I'm standing the playing field and the game is almost unchanged, the players are just often different.

(You even seem to somewhat contradict yourself, acknowledging that the old news is very establishment-cozy, which to me would beg the sort of skewing you cite for new-news)

<comment><USER4> fyi: he was being sarcastic

<comment><USER3> I will leave my comment unedited to show the shame of my admission that I had entirely no clue. I normally find myself chuckling at when other people miss sarcasm but I really didn't catch the tone this time, hope someone else gets to chuckle at me :P

</comment></comment></comment></comment><comment><USER5> "the internet is distorting our collective grasp on the truth. "

And corporate owned newspapers never did any distorting right NYT? Perhaps if the media had a shred of integrity, people wouldn't be going off to the onion to get their news.

<comment><USER6> that is a lazy false equivalence that shows that you probably didnt read the article. the central thesis seems to be that given the wider array of news sources, our biases towards reinforcing what we already believed are further enabled. maybe you could address that instead of saying that "corporate owned newspapers" are distorting. of course every news source has a bias. the point is that there are more now, so its easier to build a more complete echo chamber.

<comment><USER5> No...the author of the article was the lazy one, and it's not just this author because as you may have noticed there's a rising cry for companies to help police cyber bullying, truthiness etc. Notice how no one inside the establishment is assigning culpability to themselves, the self serving conglomerates for the public's distrust. Instead shifting the blame and calling for actions...actions which undoubtably will ramp up propaganda and censorship for the benefit of elites. For every Alex Jones that gets censored, will there be a Chomsky that also gets banned from public discourse?

How am I supposed to sympathize with this author when we just had a presidential campaign openly discusses their social media astro turfing whilst leaks reveal dizzying amounts of media collusion, but is there any official cry to end that practice? Of course not. So go ahead and pretend that it's all because the internet allows people to go get their conspiracies from so many different sources, and pretend that the public's distrust in MSM is unfounded and undeserved.

<comment><USER7> Man, your reply is just exactly one of the reasons I almost never post online like this and just lurk.

Not only did you ignore the point of the post you replied to ("lets talk about the article and criticize those ideas in context"), you segued to exactly the kind of narratives that the author of the article was talking about and used them to declaim anyone who disagrees with you.

It would be one thing if you bothered to critique the author on any of his actual points, but you decided to ramp it up by somehow claiming if he got his way, we would be censoring Noam Chomsky. ctrl-f, censorship isn't even mentioned in the article.

The crux of your argument seems to be something along the lines that that the ideas in this article are being put forwards "for the benefit of the elites", which is the kind of thinking that I (and I think the author of the article would agree with me) that makes as much sense as saying "you are being punished for your hubris by Zeus". As in, you ascribe actions to beings that are fundamentally invisible to others, that secretly control the world around and that you can divine the existence of, but are unable to explain to others in any but in the most vaguest of terms.

The point that upsets me about this kind of behavior, is that in viewing it, often people are turned off and are less likely to take part in conversations where they see others treated that same way. The shrinking minority of people who post vs just lurk, already a tiny approximate 10%, in the end becomes the even smaller fraction of people who can put up with and dish out the exact same vitriol. Or, simply agree with vitriol directed elsewhere.

<comment><USER8> Welcome to HN!

Like you, I lurked for a long time (a couple of years) before a comment got me emotionally charged up enough to finally create an account. I'm certainly glad I did, though.

Yeah, every once in a while somebody "pees in the pool" but (as I'm sure you already know) normally the conversation and dialogue here is better than what you'll get at most other venues on the Internet.

Now that you've got an account, just stay logged in, continue contributing, and help even out the signal-to-noise ratio a little bit more.

</comment></comment></comment></comment></comment><comment><USER9> Pretty poor article, the whole thing is filled with far-fetched anecdotes and I don't feel I learnt anything by reading what he wrote.

His whole premise is built on the amount of conspiracy theories we know of, rather than actual conspiracies, to show the internet is distorting the truth!

But maybe, ironically, he's proving that traditional media is what's broken, if trash like this is given a mouthpiece.

</comment><comment><USER10> Truth has stopped beeing the tamed animal that the news-manufacturer knew it to be. You told it what to be, and it jumped through the hoop and became half- reality by the masses believing.

What your hear is the whining for power decentralized away. And those calling for censorship, demand to reinstate it, so they can have it. Those not debunking fake news, but declaring unproofable conspirarcys at work, want to shirk the work or have something to win, when the truth is not found out.

</comment><comment><USER11> I do believe that Metal Gear Solid 2 predicted this back in, what, 2001?

"At this point, Raiden is contacted by AIs of the Colonel and Rosemary, introducing themselves as representatives of the Patriots, who reveal that the true purpose of the simulation was to see how they could simulate and control human behavior in order to prevent society from dumbing down due to trivial information drowning valuable knowledge and inconvenient truths."

</comment><comment><USER12> [http://i.imgur.com/VUdcIou.jpg](http://i.imgur.com/VUdcIou.jpg)

[https://pbs.twimg.com/media/CIMxvS- WEAER49I.png](https://pbs.twimg.com/media/CIMxvS-WEAER49I.png)

[https://pbs.twimg.com/media/CINJUoqUwAEkSip.jpg](https://pbs.twimg.com/media/CINJUoqUwAEkSip.jpg)

<comment><USER13> Some context for the two photos of what seems to be a editorial office doing questionable things?

<comment><USER12> [http://gawker.com/here-are-some-top-n-y-times-editors-and- st...](http://gawker.com/here-are-some-top-n-y-times-editors-and-staff- joking-a-1713336525)

</comment></comment></comment><comment><USER14> Pretty sure you're the one doing that, NYT, over the Internet.

</comment><comment><USER15> Because there was never such a thing as talk radio? Because the Chandlers didn't run the LA Times or Robert McCormick the Chicago Tribune?</comment>


Web development learning guide – a front end approach - <AUTHOR> https://blog.petrovic.gr/2016/12/frontend-development-a-learning-guide/ <comment><AUTHOR> Author here... It's been a lot of work to assemble the guide, but I'm sure it can be made better. I'm open to suggestions, thanks!

<comment><USER2> It's a nice piece of work. I think the next level is to incorporate the important concepts behind the links into your document. This will allow a consistent teaching method, remove redundancy, and simplify the presentation for the reader. Basically push the document toward a comprehensive self contained course.

To put it a different way, treat the document as a bibliography for the next version of your article.

<comment><AUTHOR> Thanks, you're right. But, it is also a good thing for the people to get used to different ways of explaining things. Not everything you can find online is explained the best way.

The only thing I did was to add the missing pieces here and there, to round the story. To have them understand what needs to be learned, what do they have to know, in order to be confident tomorrow.</comment></comment></comment>


Ask HN: What is the biggest growing expenditure of your startup? - <AUTHOR>

What are the biggest cost savers? What did you splurge on accidentally? <comment><USER2> Getting an office was an order of magnitude more expensive than our conservative estimates.</comment>


Would you be interested in receiving an academic paper by email everyday? - <AUTHOR> I like keeping up with emerging research in multiple fields, such as biology, physics, and computer science. Yet, most of the research I find out about is from news sources or aggregators, such as NYT or HN.
I am thinking about creating a free service where I send you one academic paper everyday by email. The user will select what fields he or she is interested in, and I will email a paper from one of those fields.
A potential problem is that a lot of academic papers are behind paywalls, but I still think there are enough freely available research papers to make this service viable.
Are there any services like this that you are aware of? Would you be interested, and if so what would you want in such a service?
Thanks! <comment><USER2> I would like such a service, but don't know enough about what I find interesting to make use of it.

Most comp sci stuff bores me, though some is fascinating. Due to the nature of the field, it may be hard to set keywords to find things of interest.

Other fields, such as history, are different. Right now I'm writing a book about a certain region's history. I'd like to be able to set a geographical limit, like, "every new paper regarding history within such-and-such a region", and then get alerts. In addition, even better would be geographically matching foreign-language journals (I'm thinking China, eg. <http://www.kaogu.cn/>)

Another thought: disconnect your thinking/pitch from email, it's just one delivery option within phone/web/email/rss/sms/xmpp/facebook/twitter/whatever.

<comment><AUTHOR> Good points.

You are right I was just thinking about email. I will start thinking about other delivery options. People have different preferences, and by sticking to email only I would limit my userbase.

</comment></comment><comment><USER3> No. My backlog of to-read academic papers is long enough already, and I'm not keeping up with what I get. (I felt like I should interject some negativism ;)

<comment><AUTHOR> It is important to get both positive and negative feedback.

How do you find papers to read, and how do you decide which ones to read?

<comment><USER3> It's obvious that it's impossible to stay current with all of the literature. The deluge of papers was a common complaint even back in the 1960s. Abstracting services like ISI started up to help handle that data flow. I've decided that it's not worth stressing out over it.

There are two primary journals for my field, cheminformatics. These are the "Journal of Chemical Information and Modeling" and "The Journal of Cheminformatics." There are several other journals which will publish on cheminformatics, such as "Algorithms for Molecular Biology."

I have subscribed to the monthly email announcement and/or RSS feeds for those journals.

I also learn about what's important by watching the blogs of others in my field. I going to conferences to see what people are using. For example, one conference I went to 1.5 years ago had several papers on using "Matched Molecular Pairs" (published in JCIM). I talk to people, and see what they are interested in ("Activity cliffs" being another recent hotness).

I'm very demand driven by what I read in depth. I scan the abstract, and only read further if it's something that interests me deeply. This could be something that I've worked in before, or something that I've thought about but haven't seen much in-depth work in. I'll mostly go into a paper when I need to do something related to that topic, which is also how I handle papers outside the field.

The field of course draws from many other fields. For those I use the approach that I do for buying computers: mostly ignore things but every once in a while read a paper and make sure I understand the key concepts. When I need to get into that field, dig up the literature and work on a task.

For example, one of the things I'm interested in involves postings lists. This is classic information retrieval, which I knew about from reading "Managing Gigabytes" and "Mining of Massive Dataasets." That was enough to be able to understand the literature when I did a search last summer.

</comment></comment></comment><comment><USER4> > Are there any services like this that you are aware of?

I get some magazines/journals with my ACM membership, which are a mix of articles and selected research papers each month.

At only $99/year (student discount available) for membership and the monthly print magazine, it's quite affordable.

<http://www.acm.org/publications>

<comment><AUTHOR> Thanks. I will take a look at what ACM provides.

</comment></comment><comment><USER5> Yes, Interested.

1\. Receiving as daily email - will not prefer it instead would be interested in a weekly digest mail of top list (should also be section seperated)

2\. Some way of intelligent sorting of good papers would be interesting

</comment><comment><USER6> I think this is a interesting idea. A Facebook friend posted every day a paper about computer science for about 1 month. He said that he got a lot of positive feedback.

</comment><comment><USER7> This is a very interesting idea. But I hope the service can be blog like (with simple review), so I can subscribe with rss.

</comment><comment><USER8> sure, i would be interested. i'd like a short (3 sentences?) summary explaining why the paper is interesting and a pdf.

you can often find preprints on people's web sites even when the final paper is behind a paywall. and sometimes if you email the author they will send you a copy.

<comment><USER9> Would the paper abstract be enough? or you'd want an even more compressed summary?

<comment><USER8> not the abstract. something more "explain it to a 5 year old" - so not exactly compressed, but simpler, with more background.

i don't think that this is so different to a blog, really. the hard bit is going to be consistency.

</comment></comment></comment><comment><USER10> I would be interested on a service like that

<comment><AUTHOR> Are there any specific things you would want in such a service?

</comment></comment><comment><USER11> I only really read papers that relate to my field (storage systems, databases, distributed systems, etc). The other stuff might be interesting but I just don't have the time to really focus on it. I also tend to take a more "pull" approach to papers-- if the title or the abstract doesn't seem interesting, I won't read it. There's just way too many out there.

If you were somehow able to curate the list and present "the most important papers of 2012 for field X", it might be interesting. That's kind of what journals are supposed to do, I guess. I suppose you could consider your effort a kind of virtual journal then :)

<comment><AUTHOR> I appreciate the feedback.

Initially, I was thinking about using the number of times a paper is cited as a way to curate the list. Over time, I can curate the list based on a specific reader's interests by sending related papers to the ones the user downloads.

You are right. Most professionals are too busy to spend time to find papers they are interested in besides the field they are working in. It is a time and discovery problem.</comment></comment>


Singapore's Prime Minister Has Published His Own C++ Sudoku Solver - <AUTHOR> http://gizmodo.com/singapores-prime-minister-has-published-his-own-c-sud-1702226683

<comment><USER2> Not to be too discouraging, but if you don't get many comments or votes, it might be because this has been submitted multiple times over the past couple of weeks:

[https://news.ycombinator.com/item?id=9490017](https://news.ycombinator.com/item?id=9490017) 1 day ago, 2 comments

[https://news.ycombinator.com/item?id=9487721](https://news.ycombinator.com/item?id=9487721) 1 day ago, 1 comment

[https://news.ycombinator.com/item?id=9487060](https://news.ycombinator.com/item?id=9487060) 2 days ago, 2 comments

[https://news.ycombinator.com/item?id=9486301](https://news.ycombinator.com/item?id=9486301) 2 days ago, no comments

[https://news.ycombinator.com/item?id=9485348](https://news.ycombinator.com/item?id=9485348) 2 days ago, no comments

[https://news.ycombinator.com/item?id=9485266](https://news.ycombinator.com/item?id=9485266) 2 days ago, no comments

[https://news.ycombinator.com/item?id=9485237](https://news.ycombinator.com/item?id=9485237) 2 days ago, 148 comments

[https://news.ycombinator.com/item?id=9419035](https://news.ycombinator.com/item?id=9419035) 14 days ago, 126 comments

<comment><AUTHOR> Thanks for telling me. I've probably missed it.</comment></comment>


Wefunder uses Facebook ad to help Teleborder (YC S13) raise money - <AUTHOR> http://twitter.com/pt/status/386508080956977152/photo/1

<comment><AUTHOR> Interesting to see what general solicitation allows. I'd be curious to know the CTR or any details on the campaign's efficiency.</comment>


Facebook now lets users edit mistakes in old comments | Digital Trends - <AUTHOR> http://www.digitaltrends.com/social-media/facebook-now-lets-users-edit-mistakes-in-old-comments/ <comment><USER2> An option to edit past comments is absolutely fine for as long as anyone can see the edit history. I've seen this done in one place and making the edit history public had a very positive effect on the quality of comments. Basically the system gives you right to change your mind, but what's said is said, and it's on record.

<comment><USER3> It's interesting though that if someone Likes the comment, you can't really tell which version of it they liked. So you can trick people a bit like when changing Group/Event names after people have joined.

But I definitely agree that it's nice to be able to fix typos afterwards. It causes inconvenience to followers when you delete the original comment and write a new, almost identical one.

<comment><AUTHOR> Nice observation on the "Likes".</comment></comment></comment>


Amazon reportedly acquiring 3D mapping company UpNext - <AUTHOR> http://www.theverge.com/2012/7/2/3132349/amazon-acquiring-3d-mapping-company-upnext

<comment><AUTHOR> Amazon probably intends to broaden the appeal of the Kindle Fire beyond content consumption, and have at least one of their own apps that uses a forthcoming GPS sensor.</comment>


Anyone intreated in  temporary Project Management Opportunity? - <AUTHOR>

If you have good programming skills and are interested in the experience in helping to get a prototype of my product out quickly  please contact me.  It is not high paying and only a 2 week gig, with few hours but it could lead to bigger things and possible vesting in the startup for the right person. <comment><AUTHOR> why is this topic grey?</comment>


Comcast alternatives in Greater Boston? - <AUTHOR> I'd like to swap out Comcast for something less predatory. Any suggestions for Boston? <comment><USER2> RCN, Verizon FIOS

Also look into Starry, webpass, and netblazr - all are wireless internet providers and your eligibility will vary greatly depending on what neighborhood/building type you live in, but it is free to inquire for all.</comment>


Top countries expatriates in Tech want to go to - <AUTHOR> https://www.linkedin.com/pulse/here-top-10-countries-expatriates-tech-want-go-julien-barbier

<comment><AUTHOR> Hello all, we have computed some data to better understand where people in Tech would like to work abroad. We thought we would share the data with everyone. Hope you like it :)</comment>


Uber Expectations as We Grow - <AUTHOR> http://blog.uber.com/eta-expectations

<comment><USER2> The thing that I didn't see in the data is while yes, the longer uber is in a city the less likely you are to wait, there is also a flip side of the driver no longer waiting as long when uber becomes more established in a city.

Let me explain...

When Uber was first in Chicago it was normal to wait 10-15 mins for a ride to pick you up. You would pull the app out while you still had a few things to do in the apartment before you left, order the Uber, and then by the time you were ready it was right out front waiting. The time waiting felt very seamless, although there might have been an actual 10 minute wait. When it also first started drivers were totally okay with waiting a minute or two for you because the demand wasn't as high back then. They didn't want to lose a potential customer. However, now that Uber IS more abundant in Chicago you can no longer do that little technique. Most drivers will get pissy with you if they have to wait outside for more than 30 seconds, or if you are not curbside waiting for the ride when they show up. Since drivers now also have more options for people to pick up, they can be more choosy on the customers they decide to take. They can easily cancel rides if they are too far from the pickup or are waiting to get a new customer. So since you can't "queue" up a ride like the "old days" you have order the ride when you are actually ready to go and are already waiting. Now that you do this, the wait is felt 100% by the customer (which was once avoided), if that makes sense. So what used to feel like nothing now feels like you are waiting in the cold for possible 5-10 whole minutes, which obviously often feels a lot longer that. Thus making you more likely to cancel the ride if you see an empty cab or another opportunity. So there is a bit of a catch 22 here, if I'm using that phrase correctly.

It does makes sense that they don't want to expose this side of things though, because that places more blame on their own quality of drivers. It probably shows that as a city is active longer, the ratings/quality of drivers goes down drastically. I've noticed it quite a bit here in Chicago, and it's really disappointing. The average quality of driver I get nowadays is almost 1 to 1.5 stars lower than what I got 2 years ago.

I'm curious to find out if anyone else has had this same experience or not.

<comment><USER3> > waiting in the cold for possible 5-10 whole minute

Isn't this largely solved by the GPS mapping of your ride from within the Uber app? You can easily see exactly where the driver is, and step outside right as the driver is pulling up, regardless of how long the total wait is.

<comment><USER4> In my experience (using Uber in Shanghai and Beijing), the latency can be 0 to 2 minutes, so it's hard to time it exactly. It takes me 2 minutes to get from my apartment to the place where a driver would normally pick me up.

</comment></comment></comment><comment><USER5> One of the reasons I am frustrated about a long waiting time is wrong expectations set by the map. The map in SOMA typically shows that 5+ cars are within 2 minutes. As soon as I request, the closest is 7 minutes away.

<comment><USER6> AFAIK there isn't a lot they can do about it, because Uber drivers have to manually accept jobs. Those 5+ cars within 2 minutes presumably turned down the job.

<comment><USER7> Ok, but can they do something about the car that I do get saying "5 minutes" and actually meaning "9 minutes, including the bit where I watch him drive 2 minutes in the other direction"?

</comment></comment></comment><comment><USER8> As Uber grows in a city, the average wait time should also decrease pretty dramatically. There are more cars on the road, so a pickup from any given location/time should arrive faster on average than it would two years ago.

The precise methodology is opaque in the post, but there's a chance that these results are driven more by increasing liquidity in the marketplace instead of increasing expectations of Uber over time.

</comment><comment><USER9> Honestly, I believe the data, but not the conclusion. When I first started using Uber, it was a taxi replacement. I take taxis once every few weeks e.g. to go to the airport and similar. Most of my other transit was either by subway, walking, bicycle, or didn't happen.

When Uber dropped to a couple of minutes, my usage pattern completely changed. It's a casual form of transport. Hungry? I'll take an Uber to where ever I want to eat. Running a few minutes late? I'll Uber it instead of biking. I now meet people more than I used to. When transport became fast, cheap, and convenient, I started using it a lot more.

If I see a 15 minute wait time on an Uber, I'll usually cancel it, but that's not because I'm any less patient than I was a year ago. It's just that Uber now fills a niche in my life that was unfilled a year ago, and indeed, that I didn't know existed. When Uber jumps up to 15 minutes, my usage patterns go back to what they were with taxis, and I cancel most of the casual trips.

<comment><USER10> It depends on where you live. In New York or Chicago, you just hail a cab, usually in a minute or two. Pulling out an app and trying to get the marker in the right place and waiting 5 minutes is a step backward for the kind of usage you describe. An app is a very clumsy replacement for street hails.

<comment><USER11> For me this goes doubly so when I happen to be walking somewhere (in NYC) and see a cab driving past with its light lit - I might have normally walked the 15 blocks, but since there a cab right there, and its available right now.... its almost like an impulse-buy on the transportation.

</comment></comment></comment><comment><USER12> How much does competition account for the "impatience" that Uber's seeing? When I launch Uber and see a "long" wait time, my immediate reaction is to launch Lyft to see how long their wait time is. Not that Uber would go sticking info about their competitors in a blog post, but you wonder if there's any connection between the "patient" cities and how much mindshare competitive services have in those cities (i.e., no competitors outside of legacy taxi companies = people willing to wait longer).

</comment><comment><USER13> "The bottom line is that we realize we have to continually raise the bar, to get you home from the bar. We are aware of this challenge, from both a technological as well as people perspective, and are doing what we can to fulfill our mission of bringing reliable rides to all who want them."

Yes, because it's really critical to get home from the bar in a state of total inebriation =)

Also, I didn't know giving reliable rides was Uber's mission. I thought it was "evolving the way the world moves." This may sound like nitpicking but if you pause for a moment, the difference, as far as a company mission goes, between "giving reliable rides" and "evolving the way the world moves" is pretty big.

<comment><USER14> >Yes, because it's really critical to get home from the bar in a state of total inebriation =)

Not sure if that's sarcasm or not, but I do think this is one of the more powerful positives to Uber, keeping drunks off the road.

<comment><USER15> Cabs haven't done this?

<comment><USER16> Uber is cheaper and more convenient than a cab, so it makes it much more viable to leave your car at home when going out drinking.

</comment></comment></comment></comment><comment><USER17> Couple of questions about the post (since the link above doesn't seem to allow comments):

1\. Were the numbers for the chart "Willingness to wait in a city 2013 v/s 2014" generated based on estimates from the Uber app or real wait times that were logged once the customer was picked up?

2\. Also, looking at the same graph, it seems some of the rides that were not completed because the ETA was < 4.5 minutes (Probability=1) could have trivially been completed had Uber just dispatched the driver a little later (or had the driver delayed him/her-self a bit).

3\. What is the volume of rides as a % for each range of waiting times for the ETA?

4\. What is the revenue per ride as a % of total revenue for each range of waiting times for the ETA?

</comment><comment><USER18> Notable point: This blog post was authored by one of Nathan Myhrvold's[1,2] sons.

[1] Yes, _that_ Nathan Myhrvold. Microsoft billionaire(?), founder of Intellectual Ventures, creator of the best cookbook I've ever seen, and notorious patent troll.

[2] [https://paw.princeton.edu/issues/2009/01/28/pages/1076/index...](https://paw.princeton.edu/issues/2009/01/28/pages/1076/index.xml?page=2&)

</comment><comment><USER19> Could one of the factors be the difference between users?

Early adopters who really liked the Uber concept for various reasons and wanted to use Uber

VS.

Now a majority of users who heard about Uber because it's supposedly better than other means of transportation , but when they try to book it and see a longer waiting time than just getting a Taxi, or taking a bus/train , they don't want to wait for a Uber car.

</comment><comment><USER20> Is it just me, or does it seem short sighted to end iOS6 support now? I tried to use the Uber app on my phone the other day and ended up having to call a taxi. Obviously you have cut your losses with legacy stuff eventually, but surely it dosen't cost much for one more iOS target.

<comment><USER21> Off the top of my head, iOS 8 adoption is currently like 90%, iOS 7 adoption (before 8) was at like 95% at it's peak.

So current iOS 6 usage would be less than .5% of iOS devices? I would suspect (without any sort of proof), that Uber's demographic doesn't overlap much with people running a 2 year old phone OS.

</comment></comment><comment><USER22> Easy for Uber to "raise the bar" when they're so ethically low right now they could parachute out of a snake's ass.

<comment><USER23> Best comment I've ever seen on HN.

<comment><USER24> +1</comment></comment></comment>


The Best U.S. Cities For Jobs - <AUTHOR> http://abcnews.go.com/Business/Economy/story?id=7183746&page=1

<comment><AUTHOR> The story links to the complete Forbes list. For amusement only. I'm not sure what their criteria are, but lots of places in Texas, Louisiana, Arkansas, and other such red states/rust belt cities are high on the list for you to start your careers or companies.

San Francisco is 127, San Jose is 115, and Los Angeles is 180. I moved to San Luis Obispo County, CA, when it was #8. Now it is is deep into the triple digits. Sic Transit Gloria.

<comment><USER2> They're about as reliable as tabloids. The Forbes article is ok ([http://www.forbes.com/2009/04/14/best-cities-for-jobs- opinio...](http://www.forbes.com/2009/04/14/best-cities-for-jobs-opinions- columnists-employment_print.html)). Here are the highlights: Washington D.C. is the new Rome and Kansas City is in "The Zone of Sanity."

Top 10 Big Cities for Jobs: No. 10: Portland-Vancouver-Beaverton, Ore.-Wash. No. 9: Oklahoma City, Okla. No. 8: Raleigh-Cary, N.C. No. 7: Salt Lake City, Utah No. 6: Seattle-Bellevue-Everett, Wash. No. 5: Dallas-Plano-Irving, Texas No. 4: Fort Worth-Arlington, Texas No. 3: San Antonio, Texas No. 2: Houston- Sugar Land-Baytown, Texas No. 1: Austin-Round Rock, Texas

Top 10 Mid-Sized Cities for Jobs: No. 10: Mobile, Ala. No. 9: Anchorage, Alaska No. 8: Shreveport-Bossier City, La. No. 7: Baton Rouge, La. No. 6: Corpus Christi, Texas No. 5: Kansas City, Kan. No. 4: Durham-Chapel Hill, N.C. No. 3: Lafayette, La. No. 2: Tulsa, Okla. No. 1: McAllen-Edinburg-Mission, Texas

Top 10 Small Cities for Jobs: No. 10: College Station-Bryan, Texas No. 9: Morgantown, W.Va. No. 8: Kennewick-Pasco-Richland, Wash. No. 7: Athens-Clarke County, Ga. No. 6: Laredo, Texas No. 5: Killeen-Temple-Fort Hood, Texas No. 4: Houma-Bayou Cane-Thibodaux, LA No. 3: Longview, Texas No. 2: Grand Junction, Colo. No. 1: Odessa, Texas</comment></comment>


Web-based interface for Unix system administration - <AUTHOR> http://www.webmin.com

<comment><USER2> I remember Webmin from _years_ back. The code _was_ very badly written Perl, full of security holes, not abstracted per distribution in any useful way, and quite difficult to read.

Anyone have any experience of what the code is like nowadays?</comment>