How to make fake data look meaningful - <AUTHOR> http://danbirken.com/statistics/2013/11/19/ways-to-make-fake-data-look-meaningful.html <comment><USER2> A great method for spotting (or at least suspecting) fake data is to see if it follows Benford's law. (So remember to fit your fake data to conform!)

[http://en.wikipedia.org/wiki/Benford's_law](http://en.wikipedia.org/wiki/Benford's_law)

> Benford's Law, also called the First-Digit Law, refers to the frequency > distribution of digits in many (but not all) real-life sources of data. In > this distribution, the number 1 occurs as the leading digit about 30% of the > time, while larger numbers occur in that position less frequently: 9 as the > first digit less than 5% of the time. Benford's Law also concerns the > expected distribution for digits beyond the first, which approach a uniform > distribution.

As one might imagine:

> A test of regression coefficients in published papers showed agreement with > Benford's law. As a comparison group subjects were asked to fabricate > statistical estimates. The fabricated results failed to obey Benford's law.

So keep that in mind, data fabricators!

<comment><USER3> You have to be careful with this though. Benford's law only holds for certain types of data, such as growing populations. It has to do with the nature of the decimal system.

<comment><USER4> To be more specific, it has to do with the nature of __any __positional- notation system, whether it is decimal, octal, hex, or even binary.

<comment> T-hawk Wow, thinking about Benford's Law in binary is really interesting, thanks for this comment.

It's the most extreme expression of the concept. _Every number_ in binary starts with 1. The only other possible leading digit would be a meaningless leading zero, so every number starts with 1. Benford's Law holds in the most extreme manner possible in binary notation, that numbers starting with 1 dominate the population over all others.

</comment></comment></comment></comment><comment><USER5> I recently made a blog post on which universities have the most successful startup founders: [http://minimaxir.com/2013/07/alma-mater- data/](http://minimaxir.com/2013/07/alma-mater-data/)

In the post, I made it clear where the data came from, how I processed it, and additionally provided a raw copy of the data so that others could check against it.

It turns out the latter decision was especially a good idea because I received numerous comments that my data analysis was flawed, and I agree with them. Since then, I've taken additional steps to improve data accuracy, and I _always_ provide the raw data, license-permitting.

<comment><USER6> You didn't actually clean up the data that you have tho.

Another flaw of your analysis is that you didn't look at where the founders went to school for their undergraduate/graduate(this probably doesn't matter).

I opened up the CSV and searched for "Urbana"(UIUC, where I went to school for) and counted 28 founders. In fact, some "University of Illinois" should match to UIUC too but I ignored those (for example, ZocDoc CTO).

<comment><USER5> I did attempt to clean up the data, just not enough. (I substituted for the abbreviations for 20-25 colleges. In retrospect I should have looked for a mapping online first.)

</comment></comment></comment><comment><USER7> I worked in retail when I was younger. This would be excellent advice for a sales person working with uneducated customers.

I was the go-to guy, resulting in a lot of freedom when dealing with clients. It allowed me to do lot of social experimentation, especially when selling custom services (like fixing "My PC is slow").

Explaining the in-and-outs of different options (goal, short/long term consequences, risks, up/downsides...), then saying it would cost 50$ would usually result in the guy becoming all suspicious, saying he wanted me to guarantee him stuff that I couldn't, and that it was expensive.

Say "Oh you'll need our performance rejuvenation(tm) package, that'll be 400$" and the guy happily pulls out his credit card!

</comment><comment><USER8> > _If you are trying to trick somebody with your data, never share the raw > data; only share the conclusions. Bonus points if you can 't share the data > because it is somehow priviledged or a trade secret. The last thing you want > is to allow other people to evaluate your analysis and possibly challenge > your conclusions._

Of course, I'm not against sharing data. However, the satire here is slightly too optimistic that people, when given raw data, will attempt to verify it for themselves. When people are given plain narrative text, they can still be profoundly influenced by a skewed headline -- something which everyone here may not ever be familiar with :)

I guess I'm being curmudgeonly about this...We should all share the data behind our conclusions, but don't think that by doing so -- and an absence of outside observations -- that you were correct. Most people just don't have time to read beyond the summary, nevermind work with data.

<comment><AUTHOR> Well it is similar to open source. Just making a project open source doesn't automatically reduce the number of bugs. People need to be interested and capable of auditing it. However, even if only a small percentage of people do audit it, the gains from that apply to everybody.

I think it generally works out. More popular open source projects naturally have more eye-balls, which means more people auditing it. Similarly with sharing data, more controversial or interesting claims will naturally attract more attention and therefore more people who are capable and interested in verifying the claims.

</comment></comment><comment><USER9> There is of course a famous book on this topic:

[http://en.wikipedia.org/wiki/How_to_Lie_with_Statistics](http://en.wikipedia.org/wiki/How_to_Lie_with_Statistics)

<comment><USER10> Which is also linked in the blog :)

<comment><USER9> oh, whoops! I had checked and didn't see him mention it - it's behind the link for 'other'. Good spot.

</comment></comment></comment><comment><USER11> I was hoping (by the title) that this was something about generating real- looking test data for your app, something very useful for UI devs before the API or backend is in place.

</comment><comment><USER12> Raw data, _and the source code which you used to arrive at your conclusion_ , or it didn't happen.

In today's world of github gists and python PyPI's and R's CRAN, there's no excuse to not document the entire process, in addition to raw data.

<comment><USER13> With some caveats. For example, I'm sure all the patients whose data I work with would rather not have it spilled out over GitHub.

<comment><USER14> Can you reasonably anonymize it?

<comment><USER13> For some things, yes. For others - not really. And there have been groups, historically, that have not been served well by "Everyone has access to this data". Given the need for their consent and cooperation, I generally side with what my subjects want their data to go toward, rather than some nebulous ideal.

</comment></comment></comment></comment><comment><USER15> Some more sophisticated (but very readable and sometimes laugh-out-loud funny) articles about detecting fake data can be found at the faculty website[1] of Uri Simonsohn, who is known as the "data detective"[2] for his ability to detect research fraud just from reading published, peer-reviewed papers and thinking about the reported statistics in the papers. Some of the techniques for cheating on statistics that he has discovered and named include "p-hacking,"[3] and he has published a checklist of procedures to follow to ensure more honest and replicable results.[4]

From Jelte Wicherts writing in Frontiers of Computational Neuroscience (an open-access journal) comes a set of general suggestions[5] on how to make the peer-review process in scientific publishing more reliable. Wicherts does a lot of research on this issue to try to reduce the number of dubious publications in his main discipline, the psychology of human intelligence.

"With the emergence of online publishing, opportunities to maximize transparency of scientific research have grown considerably. However, these possibilities are still only marginally used. We argue for the implementation of (1) peer-reviewed peer review, (2) transparent editorial hierarchies, and (3) online data publication. First, peer-reviewed peer review entails a community-wide review system in which reviews are published online and rated by peers. This ensures accountability of reviewers, thereby increasing academic quality of reviews. Second, reviewers who write many highly regarded reviews may move to higher editorial positions. Third, online publication of data ensures the possibility of independent verification of inferential claims in published papers. This counters statistical errors and overly positive reporting of statistical results. We illustrate the benefits of these strategies by discussing an example in which the classical publication system has gone awry, namely controversial IQ research. We argue that this case would have likely been avoided using more transparent publication practices. We argue that the proposed system leads to better reviews, meritocratic editorial hierarchies, and a higher degree of replicability of statistical analyses."

[1] [http://opim.wharton.upenn.edu/~uws/](http://opim.wharton.upenn.edu/~uws/)

[2] [http://www.nature.com/news/the-data- detective-1.10937](http://www.nature.com/news/the-data-detective-1.10937)

[3] [http://papers.ssrn.com/sol3/papers.cfm?abstract_id=2160588](http://papers.ssrn.com/sol3/papers.cfm?abstract_id=2160588)

(this abstract link leads to a free download of the article)

[4] [http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1850704](http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1850704)

(this abstract link also leads to a free download of the full paper)

[5] [http://www.frontiersin.org/Computational_Neuroscience/10.338...](http://www.frontiersin.org/Computational_Neuroscience/10.3389/fncom.2012.00020/full)

Jelte M. Wicherts, Rogier A. Kievit, Marjan Bakker and Denny Borsboom. Letting the daylight in: reviewing the reviewers and other ways to maximize transparency in science. Front. Comput. Neurosci., 03 April 2012 doi: 10.3389/fncom.2012.00020

<comment><USER16> Start-up idea: Review site that generates scores for published scientific papers using an open methodology. Maybe even allow community to generate their own metrics!

Edit: looks like the domains "sciencetomatoes.com" and "rottenpvalues.com" are available ;) [http://www.internic.net/whois.html](http://www.internic.net/whois.html)

<comment><USER17> This is perhaps a ridiculous idea but I'll post it anyways. There are a lot of features of a paper that might correlate with it's truthfulness. For example surface level stuff like what journal published it or the authors, what subject it's on, how controversial/interesting it is. Then the data itself.

Then get a large sample of papers which are known to be true or false (or at least were able to be replicated or not) and use some machine learning or statistical method to make decent predictions how likely new papers are to be true or false.

<comment><USER18> How are you going to prove that your system isn't pulling random ratings out of thin air? ;)

</comment></comment></comment></comment><comment><USER19> Tangentially, the article gets confidence intervals wrong:

 _Simple change increased conversion between -12% and 96%_

That's not what a confidence interval is. A confidence interval is merely the set of null hypothesis you can't reject.

[http://www.bayesianwitch.com/blog/2013/confidence_intervals....](http://www.bayesianwitch.com/blog/2013/confidence_intervals.html)

A _credible interval_ (which you only get from Bayesian statistics) is the interval that represents how much you increased the conversion by.

<comment><USER20> The classical frequentist interpretation of a confidence interval doesn't require invoking Fisherian hypothesis-testing. It's simply an interval estimate for a population parameter rather than a point estimate, which is semantics close to what he means here. A 95% confidence interval is an interval estimate with 95% coverage probability for the true population parameter, which in the frequentist sense means that it includes the true population parameter in 95% of long-run experiment repetitions. (One can get different kinds of frequentist coverage with a prediction or a tolerance interval, which vary what's being covered and what's being repeated.)

</comment></comment><comment><USER21> I see this all the time especially in social media blogs. They come to strange, convoluted conclusions about things like "the best time to tweet", without taking into account that 40% of tweets are from bots, and auto-tweets. Or that most of your followers are not human.

</comment><comment><USER22> Standard methods of calculating confidence intervals are only applicable to parametric data. Most data I deal with on the Web is non-parametric, so I wouldn't take a lack of confidence intervals to necessarily insinuate non- meaningful data.

</comment><comment><USER23> Honestly, anyone who isn't showing a 95% confidence interval is just being lazy. If you're not willing to run an experiment twenty or thirty times, you might as well not even look at the results and just publish it regardless of what it is. Why even research?

On the other hand, if you'd like to showcase actual insight and meaningful, surprising conclusions, it only makes sense to take the time to find the best dataset that supports it. Real researchers leave nothing to chance.

</comment><comment><USER24> Reminds me of every single presentation I've ever seen at a games developer conference. "Look at this awesome thing we did! The graph goes up and to the right! No, I can't tell you scale, methodology, other contributing factors or talk to statistical significance. But it's AMAZING, right?!"

</comment><comment><USER25> Another great checklist to consider when reading articles: Warning Signs in Experimental Design and Interpretation : [http://norvig.com/experiment- design.html](http://norvig.com/experiment-design.html) (found the link on HN a while back)

</comment><comment><USER26> Are there any tips that would help when seeding two-sided markets with fake data, a la reddit getting started?

[http://venturebeat.com/2012/06/22/reddit-fake- users/](http://venturebeat.com/2012/06/22/reddit-fake-users/)

</comment><comment><USER27> This isn't really on how to make fake data look meaningful, but rather how to make useless data look meaningful. If you can fake the data, then there's no need for these misleading analyses.

<comment><USER13> Indeed. Properly _faked_ data, rather than just misleadingly spun analysis, can be analyzed using the most rigorous, statistically sound methods available.

Indeed, often very legitimate science does exactly this.

Deceptive analysis is pretty easy to spot. A genuine work of data fabrication artistry is much, much harder.

</comment></comment><comment><USER28> Meh. I mean... funny, but it just reads like yet another person who saw bogus numbers, got fed up, ranted.

</comment><comment><USER29> I did notice a lot of misspellings on the graph legends :)

</comment><comment><USER30> Nice one! Haha... But you need to be extra careful though because some people are really keen to details..</comment>


Amazon, a Friendly Giant as Long as It's Fed - <AUTHOR> http://www.nytimes.com/2014/07/13/technology/amazon-a-friendly-giant-as-long-as-its-fed.html <comment><USER2> When it comes to book publishing, isn't it Hachette that is the Giant monopoly?

If you want to buy a book they publish, you are a click away from bying it from [http://www.barnesandnoble.com/](http://www.barnesandnoble.com/) or from Apple if you want it on your ipad.

But if Amazon wants to sell it they have no choice but to get it from the conglomerate Hachette.

My favorite comment on this so far comes from Hugh Howey (author of the WOOL series)at [http://www.huffingtonpost.com/hugh-howey/winning-at- monopoly...](http://www.huffingtonpost.com/hugh-howey/winning-at- monopoly_b_5453482.html)

From that article.

"The real monopoly, once you start examining business practices and attitudes, is Big Publishing itself,"

"Where is the outcry for Amazon-published authors who are blocked from sale by practically every brick and mortar store? It doesn't exist. The response is simply: That's what those authors get for signing with Amazon. Imagine an observer today saying, "That's what those authors get for signing with Hachette." The hypocrisy astounds."

<comment><USER3> If you ask, "cui bono?", the decision on who to side with is pretty obvious, at least for the average consumer.

Amazon has for decades been one of the most pro-consumer companies out there. The publishers have been slapped in court for trying to collude to raise prices. In fact, the whole source of this dispute is that Hachette wants the option to charge more for its books on Amazon.

So on the one hand, we have a company that wants us to pay more for the same product. And on the other hand we have a company that, while large in the ecosystem, is by no means a monopoly ( _maybe_ it is a monopsony, but even that is someone questionable considering they only have a 65% share of the market), and wants to charge us less. You can always buy the publishers' books from a different store if Amazon won't sell them. Well, if it weren't for the DRM the publishers originally insisted on, you could.

Hrm. Well, I know where I stand on this.

<comment><USER4> I see a future where hyper-low-volume printers paired with warehousing and delivery logistics providers (Amazon) and crowd-funded _investing_ for advances replace and eliminate the rent extraction of the big publishers in film, print, and music.

I want to live in a world where the creators set their own prices and reap the most benefits.

<comment><USER5> Are you referring to Espresso book printers or another type of print technology?

<comment><USER4> I'm thinking something like an Espresso book printer scaled up to a small (mostly) automated factory serving logistics companies (shippers and warehousers like Amazon) and local book shops. The key being the possibility of producing a large volume of books per day but down to ones of copies per title eliminating the up front cost of 10,000 units (or whatever a reasonable industry standard is).

<comment><USER5> Doesn't Amazon already run their own POD press? One of the rumored disputes with Hachette is that Amazon wants access to digital masters so they can print books on demand, if the publisher is unable to supply physical copies for any logistical reason. That's like demanding access to software source code.

<comment><USER6> considering [http://www.diybookscanner.org/](http://www.diybookscanner.org/) and the speed with which illegal texts of books popped up on the internet even before drm-breaking of ebooks was a thing, i think it's like demanding access to the source code of an unobfuscated python program you've already been given. getting the source isn't hard; the only hurdle is a legal one.

i find it hard to believe that 1) amazon would violate contracts on something like that or 2) if they did, hachette would somehow suffer financially, but not notice, or be unable to do anything about it.

<comment><USER7> I can ship books to 1dollarscan.com, and for $3 per 100 pages, get 600dpi, ocr layered, human adjusted/verified PDFs of a book.

The hurdle, as always, is layer 8.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER8> It seems the case that the life of a company also follows the Dark Knight quote "You either die a hero or you live long enough to see yourself become the villain." That is, when a company starts, we all invest because we want our chance to become majority stake holders in the next big monopoly destroyer. Once a company accomplishes this, it becomes a target just as the company(ies) it replaced. I'm no expert and I could be overly generalizing, but am I the only one that sees a problem with the fundamental form company growth takes today?

<comment><USER9> Supposedly the plan for the Amazon online store has always been to barely break even to establish their customer base, then to raise the prices of items to start making money. They started doing that last year when the price of their products started being more than competitors. The increased price of Prime was acceptable to me, but when I can go to a local store and purchase the items for cheaper, then that's the price increase that I do not want. Their algorithms determine the maximum amount of money they can make off of customers rather than basing it off of what the products actually cost, it makes sense for short-term profits, long-term profits are difficult to predict.

<comment><USER3> An oft-suggested plan, but I have yet to see convincing evidence that this is what they will do. I would guess given the plays that they have been making that they think they can reduce the cost of servicing orders, and make their money that way. The idea that they would achieve a monopoly and then raise prices seems silly, since the government would likely clamp down on that kind of strategy. And everything about their investments suggests that they think of themselves as a logistics company, not a monopolist.

</comment></comment></comment><comment><USER10> Big publishers turn down good authors(more often than usual) and no one bats an eye. Amazon _delays_ delivery of books from one publisher, just because the publisher's terms were unfair and everybody loses their minds.

</comment><comment><USER9> I think Amazon should split it's company between AWS and the Amazon store.

AWS is great and is a very important part of the internet these days, it would be a shame to have their quality decrease if the Amazon store ever starts losing money.

The Amazon store has too many flaws. There is a huge opportunity for a competitor to come in. It would be easy for "Walmart Online" to be a significant competitor to Amazon in a very short time, I don't think they're trying too hard for some reason though (fear of cannibalism of current walmart customers maybe).

I would pay 10 cent per item to be able to pick out items online and have them boxed at the customer service desk at Walmart, that sounds reasonable and profitable for both parties, doesn't it?

1+ years ago I was a huge Amazon.com supporter, these days I will avoid them if possible. Their prices and shipping changed, plus they won't allow people to always filter out all of the "not sold or shipped by Amazon" products which I absolutely do not want to have constantly clutter my search results. I've ordered several products from Amazon which they did not have in stock (but did not say they didn't), this resulted in long shipping times and in a few cases they automatically ordered the "not sold by Amazon" product and had it shipped to me, that product was very near expired (as is the case with many of them) and I have no clue where it came from, for all I know they found found it in a hot warehouse that was sold.

Then there are the "not sold by Amazon" sellers who charge huge Amounts for products just hoping that people accidentally order them. The reviews will be from people who ordered the Amazon.com version and automatically promote the seller just trying to trick people. Huge flaws in your system Amazon, get it fixed please. Don't even get me started on the "we've passed your package off to your local carrier, there's no telling when it'll get delivered and you'll probably have to drive somewhere to pick it up", that they refuse to fix. I canceled my Prime account out of protest and now they delay shipping my product for at least 7 days then they 2 day or overnight ship my items, wtf Amazon.

<comment><USER11> I disagree with most of your points, but agree somewhat with the non-sold by Amazon nonsense, and the generally poor quality of 3rd party sellers. You have to be very watchful with this. Not using Prime isolates you from this pretty well, as you can easily filter by items available under Prime shipping terms, and 3rd party sellers that put their stuff in the Amazon warehouses to make them Prime eligible avoid the slow shipping problems and are generally not an issue. However, the third party sellers on there are giving them a bad reputation, because people are not distinguishing them from Amazon proper.

I seriously doubt there is any personal retaliation going on.

I don't think they should split the business, as one of the things that makes AWS good is that it has to keep Amazon running. The initial concept of AWS as something that Amazon can use to meet demand peaks, while selling excess capacity makes a lot of sense.

<comment><USER12> AWS was never really something to sell excess capacity, thats a myth. And anyway now, it is vastly bigger than Amazon's compute needs. The stockmarket would like it to be sold off, but not sure it will be.

<comment><USER13> It would be terrifying if AWS was just Amazon's excess capacity, as then one might want to ask what would happen when Amazon suddenly needed the capacity... Apart from for spot instances, a lot of people have never seemed to get that Amazon needs to over-provision massively because of how the product works, and that their customers still need to cover the cost of all that over capacity.

<comment><USER11> No one said it was "just" Amazon's excess capacity. However, they do use it...so it is way of not paying for their excess capacity, just like everyone else's use is.

</comment></comment></comment></comment></comment><comment><USER14> Isn't this behind a paywall? Doesn't HN got some guidelines on posting articles behind a paywall?

</comment><comment><USER15> In the end, I think writers, publishers, and Amazon alike will all lose in their efforts to profit from the sale of information. Information is moving closer and closer to being free. And that's a good thing.

<comment><USER16> That fine, so long as you've figured out a way to provide authors food, shelter, and health care via alternate means. Otherwise, we will see people less willing to put the work into making great literature.

It isn't that the author is motivated by money as much as great work is all but impossible when fit between the gaps of everything else. Professional authors spend months of full time work to put out a book.

Worse, we will still get works, but they won't be as well-edited, well- researched, and those take a toll on quality.

<comment><USER15> Even today, only the superstar authors actually earn any decent money from their writing.

You're absolutely right that we need to find a way to provide people food, shelter, and health care. It's true today and it will be true in the future. And it's true for everyone, not just superstar authors.

Publishers will continue to have a role as curators of information, but they're going to have to change their business model. Instead of profiting through the sale and distribution of information, they'll have to earn money by selling their editing and curating services.

Amazon will be fine. They'll always find products to sell. It just might not be books or movies or other forms of information.

Edit: People already _are_ less willing to put the work into creating great literature. Being a writer is not a reliable way to earn a living. Imagine how much creative potential we might unlock with something like a basic income.</comment></comment></comment>


Who do you use for app UI translation? - <AUTHOR>

Our team needs to find a non-too-expensive, but reliable service to translate the UI strings of our iPad app.
Can anyone recommend a good company?
Thanks,
JH <comment><USER2> icanlocalize.com is who I use. I pay for the additional review afterwards so I get everything double checked. Seems to work ok, and is inexpensive.</comment>


From backend to frontend. From Ruby to CoffeeScript - <AUTHOR> http://mlomnicki.com/javascript/2012/08/13/from-backend-to-frontend.html

<comment><USER2> Good to see people trying something ew, but isn't this just a bit of 'it doesnt do what I'm used too, so it's broken'

"Funny thing. Adding arrays returns a string. Subtracting them returns NaN. Again, JavaScript devs will explain why. Maybe even try to convince you that it's perfectly fine behaviour. It's not"

Things like this in all languages, are what separates pros from tinkerers, in my opinion. It can be confusing, sometimes there are no good reason for this, other times there are.

I like JavaScript for all its quirks. It's the quirks hat have allowed it to be used in ways that were never envisaged.

To the OP, if you find something that doesn't work like everything else would, have a look at exploiting that difference before trying to make it conform

Otherwise nice post

Disclaimer: JS Dev to the core

</comment><comment><USER3> I'm really happy to see more and more backend developers discover the joy of frontend programming!

As for the main point, I agree that JS stdlib is almost non-existing and can't be relied on. Libraries like underscore.js or sugarj.js fill the gap and compete for the community-stdlib.

Good post!</comment>


Ask HN: Palm just gave me early access to the Pre SDK. What should I build? - <AUTHOR>

What would you Pre owners like to see?<p>Predictably, Palm has promised to crush me if I release any information about the SDK. Otherwise, I would share more with you. <comment><USER2> Search for all the apps that were rejected by Apple, pick one topic that you like most and start hacking away.

</comment><comment><USER3> Build something for someone that would have a pre rather than an iPhone. Email work flow, task management, a login to a Point Of Sale system.

</comment><comment><USER4> I can't even consider a Pre unless I know there's a reliable ssh client for it, and casual googling doesn't turn one up. So there's something for your to- do list.

</comment><comment><USER5> Oh man, I want the SDK so bad! I think the Pre still needs something 'fun'.

</comment><comment><USER6> 'PreFart'</comment>


Interfaces Generally Belong with Users - <AUTHOR> http://neugierig.org/software/blog/2019/11/interface-pattern.html <comment><USER2> So you just copy and paste the subsets of the Backend methods and their signature into separate interfaces that only have the methods needed for the user function and its test? That doesn't sounds very good.

I'd rather have one global "backend" interface and have mocks use that. If the type system gives me issues with unimplemented methods, than that's the problem with the type system itself -- allowing for partial interfaces (through keywords or something) should be a first-class feature.

<comment><USER3> If I take a complete Backend but only use 1 of 10 methods, that relationship is better expressed as an interface with that single method. Constraining the possible behavior of that code via this kind of contract makes it easier to understand (the signature says more by permitting less) and test (the interface provides a natural mock point).

</comment></comment><comment><USER4> This is good advice, but the benefits and advantages are not entirely explained.

The approach is that client's should declare their _own_ interfaces and libraries/backend's should implement those interfaces.

\- So instead of:

        app > depends on > api

\- It's

        api > depends on > app interface
        &
        app > depends on > app interface

Basically another version of [1] "The Dependency Inversion Principle", which allows you to break hard dependencies into lightweight interfaces.

[1] [https://en.wikipedia.org/wiki/Dependency_inversion_principle](https://en.wikipedia.org/wiki/Dependency_inversion_principle)

<comment><USER5> I extend this to explicitly have an adaptor in the middle:

        app > depends on > app interface

        service > implements > api

        adaptor > composes (api >> app interface)

That way the app doesn't need to know about the API, nor the API about the app. The wiring up the two are managed by the adaptor which is free to be implemented on the client/app side or vendor/service side.

</comment></comment><comment><USER6> I'm super confused what's the point here. There seems to be something about how abstract interfaces (i.e., interfaces that are separated from the implementation) are good for testing (and more?) because there is less coupling (also at build time) to other modules.

It might be hard to get for me as a C programmer because we make manually decoupled interfaces all the time (we create header files explicitly). In a sense all interfaces in C are abstract, and only the linker matches actual implementations to the interfaces. I believe with explicit header files there isn't any of the issues mentioned in the post.

<comment><USER7> Nope. The author is a C programmer too.

The post is talking about who writes the interface that client code relies on. Is it the author of a package (eg like header files) or the user of the package?

In Go and Typescript its easy for users to write their own interfaces describing just the functionality they rely on. This makes testing a lot easier.

<comment><USER8> How does the compiler know that the implementing class can be used where the interface is required?

Is there still something like "Backend extends ProfilePage" in Java?

<comment><USER9> Not like "extends" or "implements".

If a class implements all the methods of the interface (as seen at compile- time - same method name, arguments, returns) then that's it, period. Compiler will allow you to use it. Beyond that the interface doesn't "know" about the class and the class doesn't "know" about the interface.

So it doesn't matter the interface didn't even exist when that class was written.

<comment><USER8> Sounds a lot like Python's duck typing to me. (Although Python would coerce the types if they don't match.)

<comment><USER10> Similar in some ways, but duck typing is a misnomer because it doesn't involve typing.

These are type classes, or what Rust calls Traits.

<comment><USER7> > duck typing is a misnomer because it doesn't involve ...

dang, the joke was _so_ close

</comment></comment></comment></comment></comment></comment></comment><comment><USER11> It's great to see this blog post get published. Evan is one of the most creative engineers I've gotten to work with.

Go's structural interfaces are often harped on, but this is exactly a case where they are very useful. Perhaps an approach is to use named interfaces for variance in implementation strategy, and structural directives for usages as described in the blog post. I wouldn't discount how often this pattern comes up.

</comment><comment><USER12> I think allowing extensions on existing classes/structs can also solve this problem without having structural typing.

ie the client can create a new interface and explicitly implement it for existing classes/structs.

I think Swift and rust allows this.

</comment><comment><USER13> Great post. The author makes their point clearly and concisely - and what's more, they're absolutely right. The recommendation of this post might seem strange at first, since in some ways it contradicts some other programming heuristics. But it can make dependencies much more clear and explicit.

Though, Go and Typescript are not necessarily the best languages in which to fully embrace this idea. This is a scenario where type inference is very useful.

As other comments say, it can be a hassle to define sub-interfaces for each function, which can lead to a fair bit of duplicated text. But in a language with type-inference for function types (instead of only within-function type inference), the used interfaces can be inferred instead of explicitly written down, providing a lot of flexibility and allowing this principle to be followed in more cases.

</comment><comment><USER14> BTW:

>>> the obvious thing is to do in a nominally typed language like Java or C++ is the "extract interface" refactoring, where you create an interface [...]

well, first of all, I still think that a library (even an internal one) should expose only interfaces by definition. It's not only for the sake of the tests, it's also because it forces to keep boundaries "clean".

and by second... what I normally use is to trow in mockito[0] and let it do the subclassing, instantiation and definition of custom methods in 2-3 lines...

[0] [https://site.mockito.org/](https://site.mockito.org/)

I'm not sure that "make it easier to define interface <a posteriori>" it's a good selling point to structural typing

</comment><comment><USER15> This is a good article about structural interfaces which makes some positive points. I don't have a rebuttal per se, but the testing part of this article is an interesting side topic.

In the specific example given for the given product, a real life developer would write all the code to get the UI up and running, test it works, and probably just ship it.

What do you need to write tests for? Well: there's nothing wrong with writing tests and a better developer would include at least some testing with their new product feature. They'll certainly want to know if their product breaks in production, and to be alerted automatically, detecting any regressions.

If you write a test around the backend code with a test double / mock / fake for the backend, then indeed it will be the case that when you break the code that interacts with the "backend", your test dashboard will alert you with "BackendTest FAILED". But goodness me it's a lot of work to make the code testable like that: work to rethink the code into a testable form, and more importantly cognitive load on the next person who comes along as has to read your now not-so-simple backend fetching logic. The linked article certainly shows how to reduce the impact of making the code testable, but you'd still have to make the mock, which is effort as well as more lines of code to go wrong.

A much better tool in this sort of situation is an integration test. It mirrors what you do as a developer when you first write the code, for starters. And if your real life backend is sufficiently stable such that the integration test is reliable, or can at least be ignored when the backend is in a known-broke state, then an integration test _combined with hygienic version control_ is a much better way of isolating regressions to particular diffs.

There are a lot of assumptions needed to make this work — linear commit history, good testing tools, developers making focused and logical commits which change one thing at a time — but having that kind of infrastructure and culture is far more beneficial to an organization anyway, with the bonus that you don't need to write complex code that is clouded with test infrastructure wizardry mixed in with the business logic.

</comment><comment><USER16> > _But if you 're not using a framework, the obvious thing is to do in a > nominally typed language like Java or C++ is the "extract interface" > refactoring_

I've seen such statements here and there, and it makes me feel I'm missing a whole subculture of our industry. Seriously, are we learning things by IDE operations nowadays? Is selecting text and applying an option from the "automatic refactor" menu a first-class programming concept nowadays?

<comment><USER17> What you quoted doesn't mention an IDE at all. "extract interface" is just the name of series of steps that you can accomplish with or without an IDE.

Martin Fowler's book 'Refactoring' gives names a whole bunch of these. That might be where the op is coming from.

</comment></comment><comment><USER18> This is wrong, bad advice, for the same reasons that structural typing is wrong and nominal typing is right. It goes against all OOP and modularity principles. Interfaces should never be declared at the use site because an interface is a contract promised by the implementor.

As for the example, it feels contrived and unprofessional. There should never be a monolithic "Backend" type. Functionality should be separated into services, each one with an interface, and each one injected dynamically for easy testability and upgradeability.

<comment><USER19> > [this is wrong] because an interface is a contract promised by the > implementor.

I think the point the article makes is that you can instead think of an interface as a list of requirements demanded by a user (so your criticism here is a bit of a tautology). The article backs this up by describing concrete advantages of that approach.

Maybe you could share why (or whether) you think these don't apply, or how they contrast with your preferred approach?

<comment><USER18> It's all in the books. Gang of Four, etc. Learn from good books instead of bloggers who have a type called "Backend" and make brilliant discoveries that DI and nominal typibg are bad despite the whole industry using them successfully.

<comment><USER19> > It's all in the books. Gang of Four, etc.

No worries, I've read the usual suspects. Taking your example of Gang of Four though (and this applies similarly to the other usual suspects), it definitely does not discuss this observation (and potential trade offs), given it predates common use of structural type systems by far.

I think as professional engineers it behooves us well to prefer actual argument and exposition of engineering tradeoffs over authority ("whole industry does it", "learn from good books").

<comment><USER20> > I think as professional engineers it behooves us well to prefer actual > argument and exposition of engineering tradeoffs over authority ("whole > industry does it", "learn from good books").

That really depends on what you want to achieve. e.g. if you want to retain the possibility to fire a whole team and replace it with newcomers, or external contractors, at any point in the development cycle, it is muuuuch safer to stick to what is taught in most schools (which is "tradtional OOP").

</comment></comment></comment></comment></comment><comment><USER21> I think the bulk of this post is speaking to the interface segregation principle.

Also, I would not use the advice below as a _blanket rule_ as the author puts it.

> interfaces generally belong in the package that uses values of the interface > type, not the package that implements those values.

It could be a good rule for many applications, but I find it difficult to swallow as a universal rule. I feel there is so many possibilities where this might not apply, for example perhaps you have a module comprised entirely of interfaces in order to decouple a layer of implementation.

<comment><USER9> Too bad author forgot to mention the tradeoff.

This pattern violates DRY the hard way. I think most seen example is Go, where stdlib has no "http.Client" interface but only a struct.

So every implementation of http client at some point gets the same copy-pasted code for the interface, so it could use it for that pattern of mocking. I'm not saying it's bad - I'm also doing it. It's just a design decision.

<comment><USER22> If that interface was in the http package, that would be a problem. Let's say they want to add a new method to http.Client . Would they add that to the interface? If no, then it would be difficult to test code that uses that new method. If yes, then all existing mocking code will stop compiling, because those mocks will no longer implement that interface.

</comment></comment></comment><comment><USER23> It seems the larger point here is that more evolved type systems allow for a better bidirectional decoupling of interfaces and implementations. Rust has a lot of things that make this easier-yet-governable. The commenter ( jstimpfle) who mentioned C is also right - C properly used allows one to do things, since it's not bound by OOP strictures.</comment>


The Psychological Aversion to Extremes - <AUTHOR> http://lbrandy.com/blog/2009/05/the-psychological-aversion-to-extremes/ <comment><USER2> WRT the wine example, I've always noticed that, for those averse to spending money on wine (aka me), the second _least_ expensive was the predominate choice. You want to minimize cost, but not appear "cheap."

This article suggests that restauranteurs are aware of this "second cheapest syndrome": <http://www.mentalfloss.com/blogs/archives/18811>

</comment><comment><USER3> My friend was just about to get DSL from Verizon and selected the "medium" package for $29.99. I asked what they needed the Internet for, and sure enough 1Mbps down / 368Kbps up would have been fine (this was the "small" package for $19.99). I told them that they could always upgrade if the "small" didn't do it for them.

</comment><comment><AUTHOR> this sounds quite logical but I'm curious if anyone here has done some A/B tests on it and would want to share</comment>


Willow Garage Shares Specs for TeleRobot, Takes It To Show and Tell at School - <AUTHOR> http://singularityhub.com/2010/03/14/willow-garage-shares-specs-for-telerobot-takes-it-to-show-and-tell-at-school/

<comment><USER2> I met some of the Willow Garage people at SHDH a couple months ago -- they are pretty awesome, even compared to startups. I remember they were looking for a great python developer at the time.

I love seeing the hardware part of robotics abstracted away so people who are better at software can build on top of that, sharing code, rather than everyone making their own hardware platform THEN software.</comment>


Tesla's Driver Fatality Rate is more than Triple that of Luxury Cars - <AUTHOR> https://medium.com/@MidwesternHedgi/teslas-driver-fatality-rate-is-more-than-triple-that-of-luxury-cars-and-likely-even-higher-433670ddde17 <comment><USER2> The author of this article claims to have received an award for at least one published medical study, and I think someone should take a serious look at it. If he thinks that this methodology is okay in a study, I can't imagine what would happen if someone used his medical study for anything but laughs.

</comment><comment><USER3> Written by a L/S HF analyst with a current position on TSLA: "Following this publication, we intend to continue transacting in the securities covered herein [...]"

</comment><comment><USER4> Is this really what passes for statistical analysis in the investment community? From a biomedical statistics background, this analysis so atrocious that I don't know where to start.

<comment><USER5> So please explain. It's quite a long story but with some good finds (data quality problems, obfuscated reporting, probability of much higher casualty rate). I wonder what your statistical rigour makes of this.

<comment><USER2> Well, including data from China for only Tesla is a joke. That would be like saying "we couldn't find any deaths from Ebola in the United States, so we took the ones in Africa and added them in. Wow, look at how many deaths per year from Ebola occurred in the US compared to deaths from the plague in the US!". It makes absolutely no sense.

<comment><USER5> Well it might be. They also include a casualty from NL at face value, while casualties are MUCH rarer here. I agree with the need for discounting of a Chinese casualty, but it's quite common practice to try to get more data points. That is good practice, not bad, and we only seem to disagree with the execution (is a China casualty 1 or .8?) In this case it wouldn't matter the base take-away much.

<comment><USER6> You have to at least account for differences in base rate of accidents. The typical normalisation would take at least published accident total to synthesise data for the other cars. (By using sales numbers of cars.)

What he did there is statistically unacceptable.

The medical equivalent would be to compare side effect profile of current best of line treatment done in general populace to results to your new treatment's phase 1 trial results which is done in healthy people only. Then advertise that.

Regardless, can we have the raw data please? Are the rates even meaningful when the incident counts are low? Vehicle years are not the right unit as this counts cars that are not being driven. Actual range driven is the right unit.

<comment><USER5> I totally agree. But keep in mind the effect "doing the right thing" has on the effect to be estimated. I venture it will not change the gist of the story. Heck, I should contact the author and build a shiny app to demonstrate. Even discounting a Chinese death 50% would put Tesla in the ballpark double the risk of luxury cars. My thought would be that Tesla is more a supersport car (McLaren, etc) in risk (for some drivers, say, male, young or midlife, etc).

That one local death in NL, the guy did double the allowed speed on a stretch where I can hardly hit 20% above the allowed speed accounting for traffic lights and local situation. The one Tesla death with the young kid, the same. Don't put maximum traction hundreds of HP in male hands. We tend to use it (sometimes).

<comment><USER6> I suspect the correct use of Chinese data would make error bars overlap, exposing the BS.

Moreover, they should use the data where miles drive is available, say, from taxi drivers. Oops, that's 0 out of 0 total? :)

For such low incidences, even studentising will not produce right confidence intervals based on normal distribution. Poisson distribution cannot even be used, direct binomial instead, because it is likely that the error due to approximation will be important. (calculate from rule of rare events)

</comment></comment></comment></comment></comment></comment></comment><comment><USER7> So much FUD.

<comment><USER8> Why? Seems fairly rigorous, with vested interests clearly declared.

<comment><USER9> Rigorous? lol. I'm usually slightly critical of tesla.. but this article is terrible.

It's so long because the author needs to jump through too many hoops to end up where he wants to go. Audi A6 has 0 causalities? Cool. Tesla has 0 in one year? Extremely suspicious. Not enough Tesla accidents in the database? Include China. Should he include China for the other cars? Nah.

This article is a joke.

<comment><USER10> The firm is short Tesla, but I'd still like to see a data driven Tesla rebuttal before believing it's all smoke and no fire.

<comment><USER9> The data is in the article. They didn't like the conclusion, so then they included China, did a google search for tesla accidents, and made adjustments --only to tesla--until they got what they wanted. They aren't even comparing like with like... all of the conclusions are invalid.

I don't think this article was written in good faith.

<comment><USER10> They found clear Tesla fatalities that were missing from the published data, apparently a significant number of them due to miscategorization.

Now maybe all the brands have the same problem with missing data, but that would mean fatalities across the board are much higher than reported by the insurance agency funded research firm. That doesn't seem as likely to me, but I do believe more research needs to be done.

<comment><USER11> > They found clear Tesla fatalities that were missing from the published data

They _looked_ for Tesla fatalities because they needed more to make the argument they wanted. You understand the distinction, right?

<comment><USER10> Yes, they are obviously biased and openly so, but they've raised what appear to be valid points that Tesla should answer. Elon made the claim publicly, and Tesla is no stranger to writing snatching rebuttals.

As disclosure, I'm long TSLA, both index and individual shares.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><AUTHOR> I submitted the OP, and am a bit surprised to see it flagged. The OP looks to me like a sincere attempt to analyze fatality data.

Yes, the authors are short Tesla, but they disclose it. Yes, the analysis is naive, but that doesn't necessarily mean its conclusions are off. Yes, the inclusion of data from China is... questionable, but the authors address it upfront: _" To have the largest sample size and best confidence intervals possible, we also included international accidents (three total, from Canada, Holland, and China). Given the higher incidence of fatal accidents per vehicle-year in China compared to the United States, and the lower incidence of fatal accidents in Holland and Canada, these three deaths should adjust to 3.63 deaths. However, for the sake of conservatism and to avoid a large debate about a rather small difference, we use 3.00 deaths in our analysis."_

<comment><USER10> Doesn't deserve the flag IMO, Tesla is an emotional topic for many people. While there certainly have been hit pieces and hack journalism throughout the companies existence, I think this one has enough meat to be worth discussing.

Like most investors, I'm long TSLA. Both index and individual shares.

<comment><AUTHOR> Yes, exactly my thoughts.

I would have liked to see the HN community rationally debate what to me looks like an earnest but naive analysis of fatality rates -- based on its merits or lack thereof. Instead, at least some in the HN community have resorted to _ad hominem_ attacks ("Tesla short!") and flagging.

For the record, I'm a _huge fan_ of Musk and the company, but other than minimal long exposure through passive funds, I have no position in Tesla.

</comment></comment></comment><comment><USER12> Why do these keep getting submitted to hn? Ffs</comment>


Best CDN Providers (2019) - <AUTHOR> https://haydenjames.io/best-cdn-providers/ <comment><USER2> I wonder how they tested latency of the CDNs? Whose network would be most biased to serve the testing station(s), as compared to real users?

</comment><comment><USER3> What do you think of BitMitigate?</comment>


The Psychology Of Social Shopping - <AUTHOR> http://3dcrt.co/NewsletterQuest

<comment><USER3> I was hoping for an article on the psychology behind social shopping - <USER2> one is about writing newsletters.</comment>


Why Paying Bribes Should Be Legal - <AUTHOR> http://www.npr.org/blogs/money/2011/04/01/135011027/why-paying-bribes-should-be-legal <comment><USER2> In India, it is almost impossible to get something done without giving a bribe and especially if you need something in time. If not, the bribe-expecting government workers will keep you waiting till you are ready to hand over the bribe. I didn't realize it was illegal to give a bribe in India, so I guess I can't even admit to having done that - which is ridiculous!

When I needed to get a document in India (in a more rural area), the young government official, who I assumed was above all this corruption, kept telling me to come later (when there were fewer people around) and had me go to a nearby Xerox shop to get copies of a document. While I was going there, the official called the guy at the Xerox shop and told him to tell me how the process works. Suffice to say that I gave something and apparently that wasn't enough, so I had my mom visit him the next day and he made a comment that I hadn't given enough. My mom just smiled, picked up the certificate (which was in front of him) and left.

On the other hand, reporting an official is still a bit scary knowing that him or his partners-in-crime can _accidentally_ mess up any of the other official documents and since most of the documents are still on paper and not digitized, it could throw you down into a deeper hole. Unless a massive campaign against corruption is introduced, I dont see this problem going away anytime soon.

<comment><USER3> Same in Argentina, is how things work.

</comment></comment><comment><USER4> The second half of this is left out:

 _Why Paying Bribes Should Be Legal To Pay, But Illegal To Accept_

This changes the meaning considerably.

<comment><USER5> Also, this is only suggested for someone paying a bribe "to receive something they are legally entitled to receive."

The example is an official demanding a bribe to process a tax return.

It wouldn't apply to someone paying a bribe to avoid a speeding ticket.

<comment><USER6> And also those who like to keep a good relationship to the officials they have to work with on a daily basis. I can't prove or test it, but I assume that this category contains the biggest amount of people AND money concerning bribery. "Doing favors" to each other is just a basic social activity, especially if the other person is one with the power to change your life to better or worse.

<comment><USER5> In the US and China, yes. Outright bribery is rare, but people with "connections" get special treatment.

However, the article is about India, a country where corruption is so rampant that there's an Association of Dead People, who can't afford the bribe to have themselves "reinstated" after they were reported dead.

"Hi, I'd like to report, my in-laws declared me to be deceased, and have stolen my house and land."

"Hmm, your name? OK, it seems you are dead."

"Yes, and my house has been stolen. I'd like to file a complaint."

"You can't."

"Why?"

"You are dead."

People spend decades trying to get back on the books. It would be hilarious if it wasn't true.

</comment></comment></comment></comment><comment><USER7> _("Orthogonal" is a jargony way of saying "opposed.") Update: Several commenters raised questions about my gloss of "orthogonal." So I emailed Basu to ask him how he was using the word here. His answer: "Orthogonal interests are interests pulling in opposite directions."_

Yeah... someone needs a refresher in linear algebra and a reminder not to use words the meaning of which he doesn't know.

<comment><USER8> Agreed. Can we just be clear? "Orthogonal" means "perpendicular."

<comment><USER9> Seems clear to me. Parallel == same direction. Perpendicular == different directions.

<comment><USER10> Parallel can mean in the same direction, or it can mean in exactly opposite directions. North and south train lines might run parallel to each other, for example.

In plain English, two things are orthogonal if they are unrelated or independent of each other.

In linear algebra, this meaning is given a more specific technical meaning of perpendicular; transforming a point p by a vector u that is orthogonal to a basis vector v to get p' means that p and p' have the same multiplier on v (i.e. the contribution of v is independent of transformations orthogonal to v)

<comment><USER11> I associate 'orthogonal' with CPU instruction sets: the ability to combine any instruction with any register (and adressing mode).

<comment><USER12> Sure, in that case the vectors are instructions and registers. So if you change from using instruction p to instruction p' it doesn't change the register you're using.

</comment></comment></comment></comment></comment></comment><comment><USER13> This change (making bribes legal for the payer, just not the payee) seems highly sensible. Right now, if an official demands a bribe for something you have a right to in the first place, you can attempt to report them, but meanwhile you have to do without, with the associated cost to you. With this change, you can still report the person demanding the bribe, but in the meantime you can choose whether it would cost you less to go ahead and pay the bribe (and hope to get it back later) than to do without whatever you'd needed in the first place.

This won't help in all cases, though: as I understand it, some countries (including the US) have laws against paying bribes in other countries, even when such a prohibition effectively prevents doing business in those countries.

<comment><USER14> Except bribes undermine social fairness significantly. Notice that as the clerk presumably knows how much money he should give you for your tax returns there is a strong incentive for him to ask for a bribe that covers a significant share of your tax returns, effectively making the entire tax return process useless for the citizen.

Also, if you think of a slightly different scenario, imagine the office is only allowed to issue X tax returns a month (maybe the money comes in packets), and the bribe is required to cut the line. Now it's really unfair and wrong, and a lot more so for the briber than for the bribee.

You should have in mind that it's not actually that hard to bribe people indirectly. Any place with a bribing culture tends to have people you can hire to unofficially bribe some government employee to do something for you. In Brazil these are called "despachantes" (dispatchers), and even though in the last decade or so they have been getting progressively more useless as the country moves away from a bribing culture, you should keep in mind that a lot of despachantes are legally incorporated and even pay taxes. One can't be blamed for hiring that sort of person.

<comment><USER15> _In Brazil...in the last decade or so they have been getting progressively more useless as the country moves away from a bribing culture..._

Just curious, could you elaborate on how and why this has occurred? (Moving away from a bribing culture, I mean.)

Also, do you think other countries could do the same thing?

<comment><USER14> I think it came with the economic boom, but I'm at a loss at explaining how or why. Also, part of my perception can be because I moved from a less to a more "civilized" place in Brazil (from Salvador to São Paulo).

I have anecdotal reports, from members of my family who used to work in law, that a couple of decades ago buying and selling real estate, for example, required a lot of palm-greasing. Maybe due to pressures from the industry this is not true right now in the big cities (I rarely go to the countryside, so I don't know how things are over there, although in brazil the coutnryside tends to move more slowly).

It seems, however, that even at its peak Brazil never had as bad a bribing culture as India seems to have, from the news.

All of the bribing I hear about these days are teenagers and young adults bribing cops to overlook possession of small amounts of drugs (and also some very high profile cases in the government), but bribing to get things you should have by right is something I or anyone I know in my generation has never had to do.

</comment></comment></comment></comment><comment><USER16> As one commenter on the article pointed out, the scenario described is "extortion", not bribery, so there shouldn't be any legal consequences for the person extorted in such a way anyway. "Most states define extortion as the gaining of property or money by almost any kind of force, or threat of 1) violence, 2) property damage, 3) harm to reputation, or 4) unfavorable government action." bribery is "the receiving or offering any undue reward by or to any person whomsoever, whose ordinary profession or business relates to the administration of public justice, in order to influence his behaviour in office and to incline him to act contrary to his duty and the known rules of honesty and integrity."

</comment><comment><USER17> I found the incorrect usage of the word "orthogonal" in the article much more distracting than I'd have expected.

</comment><comment><USER18> In US Culture, there's still plenty of reason to discourage people from offering bribes. Offering bribes encourages corruption. The victims of a bribe in the US are typically everyone BUT the briber and the collector. If you're at a restaurant and bribe a maitre d' to bump up your priority for a table, he pockets some cash you get your table and all the people following the rules get boned. The briber is not being exploited at all. This scenario is probably not illegal and certainly not a big deal, but is a good example of the way our cultural rules usually work.

In a place like India, where it's typical for government workers to expect bribes and refuse service without it, or for police to hassle people about trivial things like whether the mirror on your bike is adjusted properly, it's really more appropriately called extortion. The victims are the people paying the 'bribes.' The only one who really benefits is the collector. In that case it makes more sense to focus on solving the problem from that angle.

</comment><comment> matthew-wegner Permits and things are already quite bribe-like:

Owner: "Can I open a store here?"

City: "No."

Owner: "How about if I paid you, say, $500?"

City: "OK then!"

<comment><USER19> It's not even always so blatant. I currently live in a rural county in Maryland. A buddy of mine built a detached garage last year. Parts of it he contracted out, and the contractors handled the permits. Other parts he did himself, and so had to file for his permits in person. It went something like this:

Homeowner: "I'd like a permit to build a garage."

County Clerk: "Your contractor will handle the permits for you."

Homeowner: "I'm going to build it myself."

County Clerk: "Why would you do something so selfish? Don't you want to create jobs for hard-working locals by hiring a contractor?"

"Hard-working locals" being a euphemism for "My friends and relatives." The parts that were handled by contractors sailed through inspections. The parts he did himself, he had to wait months for a county inspector to come out and in some cases was repeatedly failed for bogus reasons. Nobody ever wanted a direct bribe, they just wanted him to pay their friends/family for services he didn't need.

<comment><USER20> "Why would you do something so selfish..." Just got an "Atlas Shrugged" flashback ;).

</comment></comment></comment><comment><USER21> I'm left wondering whether such direct intervention of the legal system is the only way to contain the rampant bribery. For instance, what if employment contracts for officials make them agree to an "I will not accept bribes and I understand that I can be fired for doing so" clause, and also a "I hereby declare that have not accepted bribes in the past and understand that I can be fired if it was found to be otherwise".

I'm using loose language, but that kind of thing can tie bribes to contract laws and impact the employability anywhere of an official who accepts bribes. To further facilitate evidence collection, it can be made legal to secretly record (as audio/video) transactions solely intended to expose corrupt officials.

<comment><USER22> Surely the fact that accepting bribes is illegal would implictly mean that employees could be fired for doing so? I can't imagine that adding a bit of extra language to the employment contract saying "don't do illegal thing x" is going to stop people from doing it any more than the fact that x is illegal in the first place.

<comment><USER21> Adding laws about bribery demands new legal machinery. I was wondering whether the need for that can be bypassed by piggy backing on contract law.

</comment></comment></comment><comment><USER23> Map of World corruption:

[http://upload.wikimedia.org/wikipedia/commons/f/f7/World_Map...](http://upload.wikimedia.org/wikipedia/commons/f/f7/World_Map_Index_of_perception_of_corruption_2010.svg)

(From <http://en.wikipedia.org/wiki/Corruption_Perceptions_Index>)

<comment><USER15> Map of world _perception_ of corruption. It's an important distinction.

</comment></comment><comment><USER24> I grew up in Mexico and I can see the logic behind this, I don't think it would work in practice:

People usually give bribes when they've done something wrong, not when they are entitled to something. If a clerk asked me for a bribe in exchange for tax refund, I'd demand to talk to his supervisor, and I'm pretty sure he'd shit bricks and pretend to be joking.

Let's say I fail a driving test, the clerk insinuates (because it's never obvious) an extra "fee" might help me get my licence:

1\. What if the clerk never suggested a bribe, but instead I threatened to accuse him of bribery if he didn't give me a passing score?

2\. If he did suggest a bribe, would my licence still be valid?

3\. A bribed official would never give you a receipt of your bribery, how are they going to know if what you're saying is true? I can picture trolls affirming they were bribed by thousands of traffic officers in hopes of profitting from a faulty system.

<comment><USER25> "People usually give bribes when they've done something wrong, not when they are entitled to something."

Oh how wrong you are. In India, if you don't bribe, you won't get the service you need and are entitled to.

I can give examples, but HN's disks may overflow.

For example: to get a passport, you need a certificate of residency (or something like that, it's been a while) from the local police station. Unless you bribe the cops there, they'll never mail it in.

Basically, in India, every touchpoint of the government machinery has a bribe slot. If you ever need a service from the government, you need to pay up. It simply does not matter how deserving your case is. There are examples aplenty of old pensioners having to bribe the pension officers to collect their own pensions!

Corruption is a cruel system that abuses the most vulnerable and weak in society. The rich can use it to their advantage, and hence they don't care (one neighbor of ours became a multi-millionaire by bribing and selling sub- standard equipment to the Indian Railways ). The poor, on the other hand, get taken advantage of. I have seen, with my own eyes, mothers pawning their wedding jewelry to raise money for bribes so their sons could get a government job. It brought tears to my eyes, and this is why I hate that fucking system with a passion.

</comment></comment><comment><USER26> This is the way it works in Poland. We had a change in law a couple of years ago exactly due to the reasons you stated.

One thing I don't know about our law though - if I try to bribe someone (say - Policeman), and he refuses, can I be prosecuted? I don't know about our law, but it would be interesting if _trying to bribe_ someone would be illegal, but _bribing someone_ was legal.

<comment><USER27> > This is the way it works in Poland.

Not really. There is an exemption if you inform the law enforcement before they detect it themselves though.

> One thing I don't know about our law though - if I try to bribe someone (say > - Policeman), and he refuses, can I be prosecuted?

Yes, art. 229. k.k. It's not even terribly unlikely that you will get arrested on the spot, '90s are over.

IANAL.

</comment></comment><comment><USER28> Although prostitution and bribes isn't that related, I know Sweden did something similar — the supply side of prostitution is legal but buying isn't. From what I know I think it has worked fairly well. [http://en.wikipedia.org/wiki/Prostitution_in_Sweden#Purchasi...](http://en.wikipedia.org/wiki/Prostitution_in_Sweden#Purchasing_sex_.28Brottsbalk_6.11.29)

I know something similar is also used for collusion in the US, where a party that is first to snitch can avoid prosecution.

Although there are undoubtedly other ways of curbing corruption, e.g. competition between agencies driving down bribes to zero (in theory at least), this could work.

<comment><USER15> Something I've never understood. People advocate to make only the buying side of prostitution illegal. The same people often advocate to make only the selling side of drugs illegal.

It's a weird dichotomy I can't wrap my head around.

(I realize that some people may favor only one of these policies, but I don't think the intersection of people favoring both is empty.)

<comment><USER29> I was thinking about last night. I see logic in it. (1) Target the people who you have best hope of affecting the behaviour of. (2) Avoiding compounding damage to people who are already messed up.

Prostitution attracts girls who are already degraded. It's common for the girls to have been sexually abused as a child, physically abused as a young wife, or to have drug issues. Participation in the trade suggests that the person is not a full-functioning citizen.

A motivation for outlawing prostitution is paternalistic: it's a dynamic that causes this a concentrated group of people with existing problems to spiral further.

Using the legal system to target people in that situation for their own good is counterproductive. They have low faith in government and institutions already, and jailing them probably isn't going to help that. You just end up pushing them into and out of new institutions, but they keep practicing because the business is there and they don't take control of their lives to rise out of it.

Whereas the business that fuels prostitution is vulnerable to the dynamic of the police and legal system. Users are usually people who are full participants in society and are vulnerable to shame and the threat of jail time. They generally have a good understanding of rights/responsibility even if they have periods where they hold themselves to be above it.

I sometimes read that prostitution is "misogynistic". It's not. For the most part the users don't think about the circumstances of the girls at all. Some people don't naturally behave with concern for other people's circumstance, and the stick attempts to compensate for that.

<comment><USER15> Regarding 1), why do you believe it is easier to change the behavior of drug dealers than drug users? Drug addicts may not change behavior, but casual users behavior should be easier to change than someone who's livelihood depends on drugs.

Regarding 2), why do you believe prostitutes are more messed up than their clients? While prostitutes at the lower end tend to have sordid histories and drug habits, their clients tend to be socially isolated men desperate for human contact.

To get an idea of how messed up the clients of prostitutes are, it's estimated that 40% or so of men who pay for a prostitute don't sleep with her (they just talk and maybe kiss).

<http://www.slate.com/id/2186491/>

<comment><USER29> I'm not confident that the laws around drugs are sensible, but I was more focussed on thinking about the laws around prostitution.

        > their clients tend to be socially isolated men
        > desperate for human contact.

I hadn't considered this case.

Thanks for link. This development towards 'escorts' is intriguing, and changes the dynamic somewhat. I can imagine that growing, a flow-on from a decline in tightly-knit families and neighbourhoods and more mobile labour.

</comment></comment></comment></comment></comment><comment><USER30> This might even fix the opposite case, where the briber initiates the bribe, and the receiver of the bribe wasn't looking for a bribe.

The receiver has to decide, do I refuse knowing that the briber can freely inform the law I accepted his bribe without fear of retribution?

</comment><comment><USER31> The article assumes that a functioning judicial and investigative system exists which can help you in a reasonable amount of time. If that were the case, bribery wouldn't have become so rampant in the first place.

How is one supposed to show evidence of wrongdoing? What keeps the government official from exercising his powers and punishing the reporter in the future?

</comment><comment><USER32> The scenario described in the article is not bribe, it is extortion.

</comment><comment><USER33> That assumes that the government employees are independent of one another and will not "punish" the person reporting the incident.

What works better is a system where the PM alone is allowed to take bribes with impunity but no one else is allowed to. The reasoning behind this is it gives the PM and his inner circle sufficient financial independence to implement anti-corruption measures.

For example, the central government in China has been known to mete out capital punishments on mid-ranking politicians found to take bribes. This limits the base of people who are able to seek an economic rent on the basis of their position. Like any triangle, the people at the top may get filthy rich and in many sense untouchable; they will be able to keep the large pool of people below them honest.

<comment><USER34> This would only work if the top level official wants bribe only for high level project. The approach would fail in India, where every amount of bribe has fixed distribution, from bottom most official to the top.

Say for example you wallet got lost, and you need to file an police report. The bribe you pay at police station would not be to the local official alone, but a cut of it would extend all the way over to top till the Home secretary. No one wants to punish anyone in such cases. This allows top-most official to acquire a much larger wealth than they would if they stopped corruption at lower level

<comment><USER33> This type of bribes already occur through taxation, traffic fines and other processing charges. These allow public servants to earn a bonus on top of their normal wages.

This is the effect of bribery tainting everybody up the chain. However, if bribery were to be legalised only at the highest level, then the highest leaders will have no incentive to accept bad bribes from their subordinates.

</comment></comment></comment><comment><USER35> I like the idea [edit: on a second thought, as commenters pointed out, the described process is extortion, not bribery].

Unfortunately, improvement requires that bribe reporting system is not corrupt (police, courts, etc.), which, I think, is not the case for countries with high corruption rates.

<comment><USER5> It's easy. Just have make a publicly visible issue tracking system. Issues could be tracked, and punishments recorded (if applicable). You could put a little bit of identity protection in (i.e. Officer 123 vs Customer 345).

<comment><USER35> Records:

\- Customer 345 reported a bribe.

\- Officer 123 has been cleaned from false reporting.

Non-records:

Customer 345 thrown into jail for possession of drugs.

</comment></comment></comment><comment><USER36> What are they talking about? Bribes ARE legal. All you have to do is call it a campaign contribution.

But, yeah, its the politicians that should be prosecuted for taking, not people who are victims of the shakedown.

And it is a shakedown when in order to do business in a particular fields all of your competition is already bribing and if you don't, you're screwed.

Of course, the reason the politician has power to abuse is that he has power he shouldn't even have. So its really our fault for allowing the concentration of power or believing power is supposed to be concentrated.

<comment><USER18> The kind of bribe discussed in the article isn't like a campaign contribution, it's regular people bribing rank-and-file government clerks and police, which happens as a matter of course in India and many other countries.

<comment><USER36> And if you read the rest of my comment, you would see I am aware of that.

</comment></comment></comment><comment><USER37> In India, bribe is considered as a _tip_ that we give to waiter/waitress in US. <http://truthaboutindiacorruption.org/>

</comment><comment><USER38> I always thought it should be the opposite---paying bribes should be illegal, but accepting them legal. It would be like collecting a reward for turning in the briber.

<comment><USER35> There's a fatal flaw in this scheme: the person who accepted a bribe is now in position to extort money from the briber forever.

</comment></comment><comment><USER39> The situation where somebody is being forced to pay a bribe is already illegal.

Why do I actually have to pay it in order for the authorities to do something about it?

This seems erroneously predicated on the assumption that the briber is doing so because he knows the payer will be complicit in the crime. I think the more likely scenario is that the briber does this because he has no fear of the authorities or their ability to enforce such laws.

<comment><USER40> Because, at the end of the day, you still need your tax return or whatever it is, and the bribe-requester is preventing you from getting it.

Going through the legal system, if it even works, would take quite a while.

</comment></comment><comment><USER41> It's not that clear cut.

It seems like whoever has the most leverage and can initiate the transaction should go to jail.

Company which offers pay an EPA official ten times their salary to look the other for pollution should be the prosecuted party. But a police officer who extracts a $50 bribe for ignoring a ticket should, on the other hand, wind-up being the one prosecuted.

<comment><USER42> Read the whole article.

</comment></comment><comment><USER43> Shouldn't you just be able to report the corrupt official for not giving you the refund in the first place?

<comment><USER44> The corrupt official is not going to be straightforward. Think of a convoluted system where the official can put you behind tons of red tape (you might literally spend hours filling up nonsensical forms). But a small price to pay and -poof- all the red tape vanishes.

Reporting such (clearly) corrupt officials itself might involve paying bribes (think recursive) or might involve a court date months into the future which completely defeats the purpose. The justice system is itself part of the corruption problem.

<comment><USER45> This is what happens in a lot of third-world countries, India included. It would be impossible to get anything done business-wise in some countries that are heavy on bribes—without bribes, it would take forever to get licenses, building permits, and other government-mandated items for doing business, whereas a bribe would put you on the fast track.

<comment><USER44> > It would be impossible to get anything done business-wise ...

You'd be surprised how a background verification and other processing for a passport application can require four months without a bribe but less than a couple of weeks if the right hands are greased. I think corruption is a real problem if ordinary Joe cannot function without ending up bribing someone.

</comment></comment></comment></comment><comment><USER46> This seems fine when you have to bribe someone to get something you should already be getting. But what about when you bribe for other things, such as access to information you shouldn't have access to? Or to get certain laws passed?

<comment><USER47> From the article:

 _Finally, Basu's suggestion applies only to one type of bribe: When someone has to pay a bribe to receive something they are legally entitled to receive. Basu makes it clear that it should still be illegal to pay other types of bribes. So, for example, it would still be illegal for a big company to pay a bribe to win a government contract._

</comment></comment><comment><USER48> Not sure this works in all cases. This will work assuming you have money to pay the bribe in the first place. There is no way to protect you from getting asked for a bribe (that you cannot pay).

</comment><comment><USER49> Yipes, the incentive not to report is high. I don't know that this will do anything.

</comment><comment><USER37> India cannot be free from corruption unless it disintegrates like USSR.

<comment><USER50> It didn't help USSR, though. Corruption is rampant in Russia.

<comment><USER37> But remaining republics of USSR are relatively free from corruption [https://secure.wikimedia.org/wikipedia/en/wiki/Republics_of_...](https://secure.wikimedia.org/wikipedia/en/wiki/Republics_of_the_Soviet_Union)</comment></comment></comment>


When the Student Newspaper Is the Only Daily Paper in Town - <AUTHOR> https://www.nytimes.com/2019/10/19/us/news-desert-ann-arbor-michigan.html <comment><USER2> Sometimes you can have a daily newspaper and it isn't much help. The Lansing State Journal costs me $60 a month and the stories of importance to me are either days late or not there at all.

It was the local counter culture weekly, The City Pulse, that first broke the story of Dr. Naser, the MSU sexual predator. The City Pulse was also the only press that reported Sparrow Hospital had failed a federal inspection and was in danger of losing their certification. Sparrow execs went out and confiscated every paper they could find in a ten mile radius of the hospital to prevent the story from spreading.

Personal note Ed Vielmetti quoted in the article is a friend who helped me write the the open data legislation we're trying to pass here in Michigan.

<comment><USER3> The Michigan Daily is more like an alt weekly than a traditional local newspaper, it's just that the traditional newspaper in Ann Arbor went under, erasing a lot of this contrast.

</comment></comment><comment><USER4> The story isn't completely accurate. While The Michigan Daily is great, we do have excellent reporting in Ann Arbor by MLive. Some of the articles aren't great, but we do have quality reporting. MLive has brought lots of awareness around PFAs in the Ann Arbor water supply.

Here's a twitter thread from Crains Detroit which talks about how the quality of this article is kind of crappy.

[https://twitter.com/chadlivengood/status/1185581429339643904...](https://twitter.com/chadlivengood/status/1185581429339643904?s=21)

<comment><USER3> >The story isn't completely accurate. While The Michigan Daily is great, we do have excellent reporting in Ann Arbor by MLive. Some of the articles aren't great, but we do have quality reporting.

MLive is addressed in the article.

I lived in Ann Arbor when the old paper went under and after. MLive was and is worse by a far margin. It's always been of the same ilk as the low-quality, corporate media consolidation going on across the country.

</comment></comment><comment><USER5> The lack of news are going to destroy democracy everywhere because voters are increasingly getting less and less alternative sources and eventually none. Some new age media possibilities I had been thinking of:

1) Double politicians (or leftover politicians). Most of English speaking world has left over votes with no representative, have politicians elected with leftover votes. These are paid positions with no power. They will keep the elected politicians in check and can do local journalism. Otherwise those politicians who may get up to 50% of the vote, will stop working for those potential voters by going back to their lives.

2) Citizen news. Government allows citizens to post anything on their personal blogs/columns/newspapers. It has the side effect of being historical because, the government will forever host it vs losing information when the company/individual no longer hosts it for whatever reason. Registration is simply getting username/password from local government with ID.

Both of these require that the government recognise that some information is better than nothing and an essential need if there is have democracy. To do otherwise, is to let evil continue under the veil (Corruption, abuse, etc). Those who would be against 'information needs to be free and widely available', you guessed it, evil.

<comment><USER6> We live in the best age that has ever existed for abundant news. Never before have multiple perspectives of current issues been as freely available as they are today.

Realistically the major impediment is the old news media. Although they have done admirable work keeping everyone informed they are simply not as able to provide the same quick response time, relevance and breadth of opinion as some combination of twitter/specialist websites/the emerging podcast circuits.

Democracy will be fine. If anything, the media is an impediment to democracy making it harder for polities to communicate directly. That was fine in the past when there was no better option; but that has changed.

<comment><USER5> Not sure how to explain the lack of journalism being an issue but I would say that there's abundant information, not news. It used to be that a person can only get news from several sources, now with Internet, we find so much more sources! The trouble is that sources are shrinking but we don't notice it due to the abundant information or re-distributors of news. As in, global amount of original sources are shrinking every year (aside from PRs).

So, while you're seeing more sources personally, it's actually getting harder to get the fine details and local news all over world because information is so cheap to distribute. My suggestions essentially offer a platform for distribution and paid defacto journalists (politicians).

<comment><USER6> Maybe, but also consider that there were very few voices with a platform speaking out. One possibility is that people were more confident of their wrong opinions in the past and now it is obvious when people are fabricating. I'd bet there were great journalists of the past who would simply look like imaginative liars today because we can very easily fact check them. The world is huge, complicated and scary. Any perception that there is a team of people out there understanding it for us is a comforting illusion but ultimately not much more than that.

30 years ago I would probably have struggled to compare media reporting of what a politician said to what a transcript but today that is no trouble at all. This newfound capability has trashed my trust in any political journalist.

</comment></comment></comment></comment><comment><USER7> Wrote for the Daily in college from 2012-2016. Was a really cool experience, and something that's stuck with me a long time.

</comment><comment><USER8> Wait, there are still towns with daily papers? I live in a town with 100,000 people (if I include the immediately surrounding towns, there are over half a million people within 5 miles of my house) and we haven't had a daily paper in... I can't even remember how long.

<comment><USER9> You live in a city homie

<comment><USER10> Some towns can get really large but never become cities for whatever reason.

<comment><USER11> "over half a million people within 5 miles of my house" is more people and more densely populated than many cities though, so it seems a little silly not to call it one. There is only one city in my country with more people than that, and it's not as dense.

<comment><USER10> In many countries 'city' is a formal thing, and not related to the number of people living there. The smallest city in the UK has 1,797 people, and the largest town has 466,266 people, for example.</comment></comment></comment></comment></comment>


Reading paid Financial Times articles for free - <AUTHOR> https://oneturkmen.github.io/2020/02/ft-subscription-for-free <comment><USER2> urgh why did you let them know?</comment>