Microplastics found in 93% of bottled water tested in global study - <AUTHOR> http://www.cbc.ca/news/technology/bottled-water-microplastics-1.4575045 <comment><USER2> Bottled water is a scam. It's less regulated than municipal tap water in most developed nations, companies suck up water from small towns and use tons of fuel to ship it out of those watersheds and then charge people 1000% markup.

For countries without clean water, the effort should be put into getting municipal water supplies.

Don't buy plastic disposable water bottles if you live in a developed nation. They prop up a terrible industry, generate tons of waste, use tons of oil and it's less clean than just drinking from a water fountain.

Edit: the documentary Tapped is a great film about the bottled water industry, and Blue Gold is a good one about the water industry in general.

<comment><USER3> what do you suggest for people who cannot tolerate the taste of some tap water. The one in my area taste very metallic and makes tea/coffee brewed with it have an unpleasant flavor. I bought a brita-like water filter with great reviews on amazon, but despite that, some of the metallic flavor remains. My old home had a reverse osmosis system which tasted amazing, but I'm not going to invest in a super expensive water system for the apartment I am renting. I just want good tasting water

<comment><USER4> You can get a reverse osmosis system for ~$150. Maybe not cheap, but not super expensive either. Even if you're renting for a year and leave it behind that's less then $0.50 a day over one year.

<comment><USER5> Which leaves you with classical-clean-US-water - no taste, nothing. Doesn't taste good, doesn't taste bad, it's just not there.

<comment><USER6> The best-tasting glass of water I've ever had was at the Galway Bay Hotel in Ireland. It tasted like slightly sweet and mossy. I've wanted to recreate that flavor in water ever since, but have no idea where to start.

</comment></comment></comment></comment></comment><comment><USER7> For anyone else wondering what effect microplastics actually have on the human body, it looks like the effects are still up in the air. Animal studies [0] show that microplastics can be taken up by tissue and circulation, and they are also present in the air [1]. Not sure what impact drinking bottled water would have on concentration inside the body. I couldn't find any long term studies on their effect on cancer, which is my main concern for any foreign contaminant entering the body.

Food (or drink :) for thought!

[0] [https://setac.onlinelibrary.wiley.com/doi/abs/10.1002/ieam.5...](https://setac.onlinelibrary.wiley.com/doi/abs/10.1002/ieam.5630030412)

[1] [https://link.springer.com/chapter/10.1007/978-3-319-71279-6_...](https://link.springer.com/chapter/10.1007/978-3-319-71279-6_13)

<comment><USER8> We know that a lot of nasty (carcinogenic) chemicals will bond to plastics, poisoning any animal that ingests it.

If you can't get the plastics out of the water you can't get the other chemicals out, because the plastic has already grabbed it.

<comment><USER8> Citation for downvoters:

[https://www.ncbi.nlm.nih.gov/pubmed/23270427](https://www.ncbi.nlm.nih.gov/pubmed/23270427)

</comment></comment></comment><comment><USER9> Or not..

"believed to be microplastics"

"there is a chance the Nile Red dye is adhering to another unknown substance other than plastic."

So it may, or may not be microplastics that they found/counted.

<comment><USER10> Not only that, but we have no idea what the "safe levels" are. They say it's only roughly double that of tap water, which doesn't seem alarming to me.

<comment><USER11> That's not too surprising, given that this problem of consuming plastics is a relatively new one. There likely hasn't been enough time to fully understand the implications of eating tiny plastic particles. I doubt that they are _all_ expelled from your body with other wastes given that this isn't something your body naturally deals with. More research is needed.

</comment></comment></comment><comment><USER12> Tap water is about the same, old one: [https://www.theguardian.com/environment/2017/sep/06/plastic-...](https://www.theguardian.com/environment/2017/sep/06/plastic- fibres-found-tap-water-around-world-study-reveals)

This is just our devouring of the planet, nothing to see here. Now reinsert head in ass and press play.

<comment><USER13> At least tap water doesn't come in disposable plastic bottles that end up as microplastics in our water supply

</comment></comment><comment><USER14> Here are the actual results: [https://orbmedia.org/stories/plus- plastic](https://orbmedia.org/stories/plus-plastic)

I wish there had been more European water brands tested, as out of this list I only know Evian and San Pellegrino, and they are the two least contaminated brands, but they are also a bit more upscale than what most people drink.

<comment><USER15> They also tend to come in glass or cans.

</comment></comment><comment><USER16> While there may be some questions regarding the exact methodologies used in this study and its accuracy, it is still pretty fucking scary to hear that microplastics are in so much of the water we drink and bottled companies are not filtering it out sufficiently.

<comment><USER17> Especially considering that the oil filter in your car is good to tens of microns for tens of thousands of gallons and costs ~$5.

You'd think that if you're running an industrial plant (at a scale where multi-stage filters, centrifugal separation, etc, etc are economically viable) you'd be able to do a heck of a lot better than 10 100 micron particles per liter.

<comment><USER18> To be fair, I think these microplastics accumulate in the water after they have been bottled.

<comment><USER19> I didn't think it had anything to do with plastic from the bottles the water is sold in. Where is that assumption coming from?

<comment><USER20> "It's not clear how the plastic is getting into the bottled water — whether it's the water source itself or the air or the manufacturing and bottling process.

"Even the simple act of opening the cap could cause plastic to be chipping off the cap," Mason said."

</comment></comment></comment></comment></comment><comment><USER21> 0.1 millimeter or larger is not really that small, it's the size of fine sand. I admittedly never look for sand in bottled water but just assumed that such large particles would never make it through the filters.

</comment><comment><USER22> I use a Berkey filtration system and feel mildly optimistic about not drinking plastic every time I fill my glass. From late September, 2017 [0].

> "There is nowhere really where you can say these are being trapped 100%. In > terms of fibres, the diameter is 10 microns across and it would be very > unusual to find that level of filtration in our drinking water systems." > With that being said, we know that the berkey can filter down to 2 microns > and less, so until testing is done, we can only state that the berkey would > be filtering out more of these microplastics than your town's municipal > water filtering system

[0]([https://www.bigberkeywaterfilters.com/blog/category/micropla...](https://www.bigberkeywaterfilters.com/blog/category/microplastics/))

<comment><USER23> Hmmm...the site cites this exact study in its marketing material.

Hmmmmm

</comment></comment><comment><USER24> Scary shit. An aside: what are people using for tap filters? Is Brita still the go-to company, or are there other better solutions?

<comment><USER25> Pur supposedly filters out a greater percentage of many different solutes than the standard Brita, but it looks like Brita came out with a new filter that does better than their old one. A longer discussion: [https://thewirecutter.com/reviews/best-water-filter- pitcher/](https://thewirecutter.com/reviews/best-water-filter-pitcher/)

</comment></comment><comment><USER26> Hmm. That's concerning.

I had more or less switched entirely off bottled water and now only use a combination of filtered tap water + reusable insulated bottles ala Kleen Kanteen at home and work, but I have recently started buying more sparkling water / club soda in an attempt to ween myself off Coke.

Perhaps it's time I take the plunge and buy a SodaStream or comparable water carbonator.

<comment><USER27> I have a kegerator and always have 5 gallons of soda water on tap, I highly recommend making your own water. I would buy a 5 pound tank of CO2 and a few 2L bottles instead of a soda stream.

</comment></comment><comment><USER28> I worked in a lab and where we used an atomic force microscope to scan single DNA strands on flat surfaces. At first we couldn't "read" anything as the surface was covered in gunk from the water we used, switching to water in glass bottles fixed this.

</comment><comment><USER29> I live in the U.S. The tap water in my neck of the woods is disgusting. It is a water tank on top of a hill that has open vents and is surrounded by trees, moss and much worse. There is nothing stopping anyone from throwing a water balloon filled with (insert whatever) at the vent. Hikers pass it every day at vent level. The pipes leading up to it leak about 20k gallons of water into the mountainside every day. There are testing taps every few miles on my road and I see them sometimes taking samples. I do not feel comfortable even showering in this water. I certainly would not drink it intentionally.

For bottled water, I get the bottles made of rigid plastic that may have less chance of leaching chemicals over a short period of time. Only time will tell if I chose correctly.

</comment><comment><USER30> Now that we know that microplastics are in our water supply, what do we do to protect ourselves? Do reverse osmosis filters, etc, at home get rid of these plastics? It certainly sounds dangerous and scary but I don't know what I need to do or should do, which is frustrating.

<comment><USER31> Petition your local government to treat municipal water for microplastics. Petition your federal government to tackle the root problem of why microplastics end up in the water in the first place.

</comment></comment><comment><USER32> When we moved to Boulder from New York recently we got some really weird looks for buying a plastic bottle of water at the store. I actually felt some joy from receiving that tacit disapproval. Soon after we joined the herd in using stainless steel bottles in our car, backpacks, etc - something we aspired to in New York but was hard to commit to when there's a deli on every corner.

<comment><USER33> >we got some really weird looks

I have a hard time believing a movie scene played out in the 7-11 with everyone staring at you for buying a bottle of water.

Or, if you looked around and people were crinkling their eyebrows at you, I wouldn't assume it was because of the bottled water.

</comment></comment><comment><USER34> I wonder what the contamination stats are for canned water, carton water and glass bottle water. I do drink a lot of carbonated lacroix.

</comment><comment><USER35> Let's remember the macroplastic of the bottle holding the water that outside Flint, MI is unnecessary pollution in nearly every country of people reading these words.

We can all stop buying bottled water. It won't solve every problem, but it will solve a lot of this one, while saving you money and focusing people on cleaning your current sources.

</comment><comment><USER36> I was wondering if there was anything that established what microplastics actually do. Found an interesting paper here: [http://resodema.org/publications/publication9.pdf](http://resodema.org/publications/publication9.pdf)

<comment><USER37> For the curious, the paper only addresses marine biology, according to the abstract.

</comment></comment><comment><USER38> "It's so difficult to get people to care about things they can't see."

</comment><comment><USER39> I drink a specific brand of bottled water because I don't like the taste of tap water. Filtering it takes some of the bad taste away, but adds none of the good.

I'll have to add "microplastic" as another one of my favorite spices.

<comment><USER40> You could probably learn what minerals is in it, buy a boatload of it in bulk for $5 and live healthy and happy for the rest of your life.

</comment></comment><comment><USER41> More than once I felt mild nausea after drinking directly from a bottle, whereas pouring the water out of the bottle into a glass was fine.

I suspect it's not just what's in the water but the bottle itself that's not good.

<comment><USER33> You're saying the mere action of touching your lips to the bottle is what induced nausea?

</comment></comment><comment><USER42> Couldn't the microplastics just come from the plastic bottles the water is bottled in?

</comment><comment><USER43> I'm surprised we are not using plant based plastics.

</comment><comment><USER43> We should move to plant based plastics.

<comment><USER44> How would that be better?

<comment><USER45> If you use the right plants, it probably won't be carcinogenic/non- biodegradable. ("Bio" being your insides)

<comment><USER46> From what I understand "bioplastic" is just "plastic" made from non-petroleum sources. "Biodegradable" or "compostable" plastic is just microplastic particles held together with cellulose. Neither of these necessarily sound better for putting in my body.

</comment></comment></comment></comment><comment><USER47> Keep in mind they only tested 11 brands from 9 countries.

<comment><USER48> "Only" 250 bottles from 11 brands and 9 countries from different continents. I think this is more than anyone could ask for for an initial study, usually it would be done for a single region.

</comment></comment><comment><USER49> According to them: Avoid Nestle Pure Life. San Pellegrino, Evian, and Dasani are OK.

<comment><USER50> >According to them: Avoid Nestle Pure Life. San Pellegrino, Evian, and Dasani are OK.

Naah, water is usually bottled locally, they tested some brands in:

U.S., Kenya, China, Brazil, India, Indonesia, Lebanon, Mexico and Thailand

(and called it "global"), but a same brand may - even in the same country - come from a different spring or bottling plant, so you are never "safe" (nor "in danger") because of this or that brand.

Just in case the actual "paper" (actualy only a "report"):

[https://orbmedia.org/sites/default/files/FinalBottledWaterRe...](https://orbmedia.org/sites/default/files/FinalBottledWaterReport.pdf)

And as a side note/observation, the classification of any plastic particle smaller than 5 millimeters as "microplastics" has been given (and it makes sense) in the context of marine/ocean related sciences:

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

it makes (to me) little sense to call "micro" anything that can be seen by the naked eye in the context of impurities in a bottle of water.

5 mm?

Come on, they are nearly the size of marbles we played with as kids ...

<comment><USER14> I don't know about the others but Evian and San Pellegrino each come from one source, respectively situated in Évian-les-Bains, France and San Pellegrino Terme, Italy.

<comment><USER50> >I don't know about the others but Evian and San Pellegrino each come from one source, respectively situated in Évian-les-Bains, France and San Pellegrino Terme, Italy.

Yes, that applies to San Pellegrino (and most probably Evian also) but San Pellegrino (the company, which is anyway Nestlè) has 6 bottling plants in Italy:

[https://www.sanpellegrino- corporate.it/it/stabilimenti-59](https://www.sanpellegrino- corporate.it/it/stabilimenti-59)

While it is true that San Pellegrino brand water is exclusively coming from San Pellegrino (and as well Acqua Panna comes from Scarperia only and Levissima comes from Cepina Valdisotto only) the other three plants are anyway marked as "Nestlè Vera" (with of course a distincion on the spring, respectively "fonte in Bosco", "fonte Santa Rosalia", "fonte Naturae")[1].

I believe (possibly I am wrong) that in many (non-EU) countries the bottled water is more like a "pure brand" than a "specific spring".

[1]See page 63 of this .pdf:

[https://www.sanpellegrino- corporate.it/files/valorecondiviso...](https://www.sanpellegrino- corporate.it/files/valorecondiviso/RapportoCSV.pdf)

</comment></comment></comment></comment><comment><USER51> Somebody got paid to find out if water in plastic bottles has plastic in it.</comment>


LifeLabs pays ransom after data breach affecting up to 15M Canadians - <AUTHOR> https://www.theglobeandmail.com/business/article-lifelabs-pays-ransom-after-massive-data-breach-affecting-up-to-1/ <comment><USER2> Just a few months ago I had to take a series of tests with LifeLabs (blood, urine, physical, etc) to update my immigration papers. Did you know you cannot choose where to take these tests? You are more or less forced to use LifeLabs because the doctors designated by the IRCC _(Immigration, Refugees and Citizenship Canada)_ only partner with LifeLabs to do these tests, it's an ugly monopoly that is impossible to fight as an immigrant. I knew, from the moment I walked in the laboratory, all the information I was handing and the data they were going to find was going to be leaked sooner than later.

I have tried more than once to make secretaries, assistants and nurses to understand how bad most of their systems are and how easy it is to expose the information of all their patients to malicious actors, but arguing with them is pointless because they barely understand what I am talking about or do not have the power to change anything. And the worst thing is, I have to visit LifeLabs again next month for another physical checkup and to take some X-rays and these news will not change anything.

Side note…

I used to work as a malware researcher for a security information company in the US. One day I remembered the story of Sisyphus:

> _In Greek mythology Sisyphus was the king of Ephyra (now known as Corinth). > He was punished for his self-aggrandizing craftiness and deceitfulness by > being forced to roll an immense boulder up a hill only for it to roll down > when it nears the top, repeating this action for eternity > —[https://en.wikipedia.org/wiki/Sisyphus](https://en.wikipedia.org/wiki/Sisyphus) > _

I ended up quitting my job no long after reading this story because it made me realize I was fighting an endless fight.

<comment><USER3> > _Did you know you cannot choose where to take these tests?_

Welcome to the Canadian Healthcare system. It's free, but not without issue, even ignoring the long wait times and inability to _get_ a doctor in most places in the country.

Did you know I'm not allowed to go get my blood tested privately, even if I pay for it? That I require a requisition from a doctor (which I don't have, so I have to go to a walk-in clinic and take up the time of a doctor who could care less what they are signing)? And that the results then get shared back with said doctor, who's discretion it is _what_ data he shares with me? It's bizarre.

I often see Americans pointing to Canada's system as a shining example. I mean, sure, we don't have crushing medical debt, which is AWESOME. But our healthcare system has so many problems itself...

<comment><USER4> What use case is there for getting your blood tested without getting a doctor involved?

<comment><USER5> If you're bio-hacking, taking steroids for `recreation' and monitoring testosterone, just curious, etc, it does seem reasonable that you should be able to pay for and get your own tests. There are options that facilitate that, though it's a burgeoning market given that the overwhelming majority are ordered, and paid for, through the public system.

</comment></comment></comment></comment><comment><USER6> If you don't live in Canada, you might not know that LifeLabs has a virtual monopoly on the lab business. If your doctor wants you to take a blood test, you go to LifeLabs.

Whomever broke into their systems knows a great deal about the private health information of a large fraction of Canadians.

<comment><USER7> In the US this title seems to be held by Quest diagnostics.

<comment><USER8> Well Quest but also LabCorp. If we go on employee count, then LabCorp would have the bigger hold. I can't tell if Sonora Quest and Bioreference are subsidiaries of either of these two larger companies.

</comment></comment></comment><comment><USER9> "For customers who are concerned, LifeLabs has offered to cover one year of data protection that includes dark web monitoring as well as identity theft insurance."

That's it? If I was Canadian I'd want to see execs going to jail and or their contract yanked. If they switched over to using a webapp or chromeos on the desktop things would probably be much more secure.

But that's not going to happen, cuz it's owned by the pension system.

<comment><USER10> Does anyone know what "dark web monitoring" actually involves, and what sorts of firms provide this kind of service?

<comment><USER11> It's called Snake Oil Consulting Inc and the sorts of firm that has very very good contacts to the federal gubmint...

</comment></comment></comment><comment><USER12> I wonder if medical test results (which I think could include STDs and chronic conditions) were included in the data breach? The downside of EMR is that they can get hacked. If so that can be incredibly personal information and way more serious than the usually the name, birth date and VISA numbers.

I guess in the future with all these data breaches one will be able to get any private information on just about anyone by paying for it on the dark net. Basically there will be darknet data brokers who basically have unlimited inventory of information because they aggregate from the various data breaches.

Will people get spam calls from a call center in a low cost country that bring up your test results from LifeLabs and threaten to share them with your employer or significant other unless you pay up?

If not now, this will be happening in the near future.

</comment><comment><USER13> The numbers: 15 million people in a country of 37 million had personal information "potentially accessed in this breach." In several provinces, LifeLabs is dominant and sometimes the only option for lab work.

Here is the CEO's letter to those 15 million or so victims: [https://customernotice.lifelabs.com](https://customernotice.lifelabs.com)

Concerned Canadians could/should contact their government about this incident. I don't have a deep link but assume it's buried in this maze: [https://www.priv.gc.ca/](https://www.priv.gc.ca/)

</comment><comment><USER14> Reading the official news release [1], the cynic in me thinks the wording of just "password" indicates that these were plain text passwords. From my experience, when the passwords are hashed/salted, the companies make it a point to include that.

[1] [https://www.lifelabs.com/lifelabs-releases-open-letter-to- cu...](https://www.lifelabs.com/lifelabs-releases-open-letter-to-customers- following-cyber-attack/)

<comment><USER15> I think the big concern is the presumption of a non-techie that a medical company would take good care of their information, because of regulations, etc.

I would not be surprised if a LOT of Lifelabs customers used the same password on their Lifelabs accounts that they use for their email. FWIW, Lifelabs has two sub-sites that use different credentials - one for test results, and one for booking appointments.

</comment></comment><comment><USER16> One thing people propose is criminalizing paying ransoms. I feel like this is short minded in that it may prioritize hig value targets like hospitals. I don't have a good answer for how to avoid issues like criminals prioritizing health/ life companies. In general maybe raising the idea the targeting hospitals makes you less than human might help.

<comment><USER17> Why would criminalizing paying ransoms cause attackers to target hospitals? I would think hospitals would have a fairly strict compliance effort, whereas Joe Schmoe probably never even heard that it's illegal to pay a ransom.

</comment></comment><comment><USER18> This breach seems to be downplayed because it affects the integrity of the entire health system. If medical blood test result data ends up on the dark web, people may likely be able to look up the following about us:

\- if you have a condition that puts you at higher risk for receiving disability or workers compensation.

\- if you have been pregnant and when.

\- if you got tested for an STD because you thought you needed to, and the frequency of your testing.

\- if you have an STD and around when you contracted it.

That's without getting into specifics around medications, and the greater harm of people not getting tests done because they do not trust the privacy and security of the health system. These are typical threat model use cases in health information privacy assessment and systems design.

In terms of consequences, the disclosure risk of this information can break up families and households, and silently disqualify people from jobs, both of which put their kids at a long term disadvantage, destroys familial wealth and assets, and in effect impoverishes everyone involved.

Once the gravity of this sinks in, I'd be concerned for the mental health of the CEO.

</comment><comment><USER19> > Through proactive surveillance, LifeLabs recently identified a cyber-attack

I'm confused, how do you pass from "proactive surveillance" to "there's a ransom to pay"?

<comment><USER20> They probably asked the attackers to provide info about the stolen data, but they only help in return of a payment.

</comment></comment><comment><USER21> Any cyber security firm that says the risk of a _hackers_ not leaking data because they got paid a ransom, is one that should be blackballed for negligence at best, and fraudulent collusion at worst.

</comment><comment><USER22> That's a whole lot of STD tests and other highly personal details they got access to which could have been way worse than a ransomware.

</comment><comment><USER23> interested in more info about them actually paying the ransom. Not that common a reaction in these corporate/public sector breaches I don't think. How much did they pay? Was it brokered or direct?

Is anyone surprised they actually got the data back? Why are they convinced the 'hackers' won't still do anything with it.

Reporting is weak on this as it doesn't say straight out ransomware that encrypted machine with data. That it likely came from any random email that someone opened. Not that there's some evil hacker person on the other end targetting LifeLabs and it could and does happen to anyone.

</comment><comment><USER24> Non-paywalled: [http://archive.is/mwQN6](http://archive.is/mwQN6)</comment>


Heap for iOS: the capture-everything approach to mobile analytics - <AUTHOR> http://blog.heapanalytics.com/?p=76 <comment><USER2> Fucking hell. This is exceptionally disturbing.

This sort of service needs to be legally regulated _now_. The app devs must be required to warn in large block letters that evryhting you do in the app, even while offline, is streamed to some random company. You can argue all you want that "everyone's doing it", but it doesn't make this any less unacceptable and going against basic expectations of privacy.

<comment><USER3> Aside from using some user resource (like battery or network) how is this different from what website have been doing for a long time? There are tools to even track the mouse movement of the user.

Which is not the "everyone is doing it argument", but more "why does this need legal regulation now?". Why not before on web apps? The privacy implications look the same to me, but the point does not seem to be raised in the latter case.

<comment><USER4> Disabling Javascript is an easy opt out for websites.

This service is designed to produce user specific data. judging from what they record on websites (see docs, tldr everything) I'd be surprised if the iPhone version doesn't record GPS locations or what other apps you use.

I'm also not sure how commonly websites record data in this detail that also maps to specific users, but if it's common on websites its definitely news to me - and all the more reason to use stuff like Ghostery/Disconnect/Noscript. Do these have iPhone equivalents yet?

<comment><USER5> Not using an app is an easy opt out for people.

<comment><USER4> That assumes the customers know about it, and I think you're giving companies too much credit to assume they will disclose it.

<comment><USER6> Not a lot of customers know to disable JS either.

</comment></comment></comment></comment></comment></comment><comment><USER7> So, I'm curious how this will compete with free offerings like Flurry which do similar-ish mobile analytics tracking and can handle millions of users per app for free. I got very excited about this Heap announcement but looked at the pricing. Multiple thousands/month for sub-million unique users may be considered steep (but then again I'm a cheap developer). I've been looking for a Flurry alternative (since I just want analytics and none of their ad junk).

Mobile apps are kind of a different beast from websites. Apps can have huge number of unique users, whereas SaaS websites tend to have many fewer users by comparison.

<comment><USER8> We'd definitely appreciate more data points on pricing - care to send us an email at email@example.com, and we can discuss more there? It'd be great to understand what sort of price point works for people like you.

</comment></comment><comment><USER9> So here's my quick feedback to the team.

Pros:

\- Pricing is fine with me - I'm doing a paid SaaS app with relatively high per-user revenue. You will likely price out most of other devs, however.

\- I like the retroactive analysis. The idea of grab everything and let god sort it out speaks to me.

\- I like doing both device and web analytics in one place. I don't think doing one or the other makes sense anymore.

Cons:

\- I don't see a way to make sure a user from different devices is counted as one user, not two. I want to track the user across all touch points. From experience I know solving this problem is very-very hard - sometimes you want to see what the user did before he identified himself, which is where your idea of "one user per session" falls apart - a session might have different users in it signin in and out, and then there is a period between signins which can be attributed to either of the authenticated users before or after in the same session. Not to mention apps with support for multiple-account apps, (e.g. iOS gmail app where identity depends on which part of the app you're in).

With all that said, I don't think I will be trying it out. There are tons of analytics services out there, and I don't feel like I can make an educated decision about which one to try first, or at all. Where you can help me is by providing a survey of the problem space, talking about the problems, potential solution methods, and then addressing which products implement which methods.

Good luck.

<comment><USER8> Great, thanks for the thorough feedback!

Re: your first con. We offer a heap.identify() API call that associates activity with one canonical identity. For instance, if a user logs in on a new separate device, you can call heap.identify({handle: 'DenisM'}) to associate all activity on that device with the existing user DenisM.

We hope you reconsider and give us a go. We're always down to talk more in person and better understand your use cases. Just ping us at firstname.lastname@example.com.

</comment></comment><comment><USER10> Is the "capture everything" approach to analytics a way to differentiate themselves from more enterprise level mobile analytics solutions such as Localytics?

</comment><comment><USER11> Do you have any case studies showing what the actual overhead is? I love the idea but would worry about negatively impacting the customer experience.

<comment><USER8> CPU-wise, our SDK adds up to 2% overhead to normal UIEvent-handling. This is with frantic and constant user input - in practice the overhead is much less.

Network-wise, we batch user activity and by default make a network request every 5-10 seconds. We'll expose a config variable so devs can tune this frequency on a per-app basis.

<comment><USER9> Keeping network alive like this is not cool - the radio will drain the battery. It would be much better to not only allow a configuration for how often the sync happens, but also allow the app to manually trigger sync, normally at the same time as other network activity is going on so that no extra power is spent bringing the radio up and down.

<comment><USER8> This makes total sense! Manually syncing is a good idea.

We need to make sure we have reasonable defaults in place, though, and so far, we've had no issues from our beta testers.

<comment><USER12> Steady small but spaced updates is just about worst case for battery if you're on 3G. You want relatively large batch sizes so the system can turn the radios off and keep them off. Obviously doesn't matter if the main app is using the radios...

<comment><USER13> There is an excellent guide on the Android site covering this: [http://developer.android.com/training/efficient- downloads/ef...](http://developer.android.com/training/efficient- downloads/efficient-network-access.html) (and it really applies to iPhones also)

</comment></comment></comment></comment></comment></comment><comment><USER14> I've been having an awesome time with Heap for the web. Their response time is fantastic for user feedback too.

Glad they exist.

</comment><comment><USER15> We need more mobile metrics innovation so I welcome this.

Coincidentally just today I released an open source library on iDevRecipes to do smarter metrics. My approach is to use base classes.

To achieve the no extra code part, is the SDK using swizzling?

<comment><USER9> You can easily intercept all UI events via UIWindow or UIApplication subclass, no swizzling required. I do this routinely to detect when a user is idle: no events - no activity.

</comment></comment><comment><USER16> this is how analytics should be done. congrats, guys. proud to be an investor!

</comment><comment><USER17> Curious if this means that the Heap SDK will require for the shipped app to be symbolicated or not, given how their example is written.

</comment><comment><USER9> What is there on the analysis part?

Restoring user behavior from touch events is a bit like restoring a steak from ground beef. Do you guys offer any help with that? Something to string individual events into a path?

<comment><USER8> You can try out the analysis part with some sample (web-only) data at: <https://heapanalytics.com/dashboard/demo>

We let you define events after-the-fact based on the gesture type and the corresponding target variable. Once that event is defined, you can include it in funnels, view it in user-specific activity streams, slice n' dice it, etc.

<comment><USER9> Thanks for the demo link, that clears things up a bit.

FYI, I don't think you're using the work "cohort" correctly in the video. Cohorts are stable groups, composed of the same people over time. "Users who send 5 links" is not a cohort, as the group's composition changes over time.

<comment><USER8> Huh, interesting! Will keep that in mind.

</comment></comment></comment></comment><comment><USER18> Been testing Heap on iOS out for the last few days. Awesome product. Congrats guys!

</comment><comment><USER19> I've wanted to use heap in the past, but the plans aren't very startup friendly..

<comment><USER8> Similar to my comment above: it'd be great to understand what sort of price point works for people like you. Feel free to send us an email at firstname.lastname@example.com.</comment></comment>


Pundi X Debuts New Decentralized Mobile OS and Device - <AUTHOR> https://beincrypto.com/pundi-x-debuts-decentralized-mobile-os-device/ <comment><USER2> This phone sounds interesting. It also reminds me of the Pied Piper platform from the Silicon Valley show.</comment>


What's the difference between a "developer" and a "programmer"? - <AUTHOR>

<comment><USER2> Hacker, programmer, developer, coder, and engineer are terms used by different groups to denote the same people. So the difference is mainly what they say about the speaker.

<comment><USER3> Very true. "A friend of mine" was writing some ad copy for a job req. "his" employer was trying to fill, and wanted to use the word "hacker" in the headline. (E.g. "Looking for a great hacker", or somesuch.) The (oursourced, non-technical) HR dept. would not permit the use of that word, as it sounded too much like advertising for someone to break the law.

I've always believed that these terms told you a lot about the speaker, but I was shocked to see such a clear, real-life case.

<comment><USER4> Heh. I've had a similar problem. I do recruiting for investment banks, and sometimes the job spec says 'developer' but the job description clearly calls for a hacker. Financial HR departments are usually pretty forgiving when they can plausibly deny responsibility, though.

</comment></comment></comment><comment><USER5> There's an anecdote about Ken Thompson having "coder" as his occupation in his passport. Shame I can't find a link. Typical of a man who debunked persistent objects with a quip about having them for years; they're called files.

Being an above average coder or programmer means understanding many things. Grabbing the moniker developer instead seems more about worrying how others perceive you.

</comment><comment><USER6> I think they are mostly the same, but that "developer" means more than just programming. By developing something you take an active part and can make decisions about the software. If you're "just" a programmer, you just program something that matches the specs. (think outsourcing)

</comment><comment><USER7> I don't think there is a hard and fast rule, but here is what appears to be many people's (i.e. not everyone's) interpretation:

\- Programmer: Primarily just writes code to accomplish the tasks that he is given.

\- Developer: Understands and writes code too, but is also involved in slightly higher-level considerations such as overall architecture and visual presentation of a large app, also probably has a say about software processes, an impact on testing procedures etc.

\- Software Engineer: Doesn't write that much code but organises the framework in which it will be written: i.e. gathers requirements, manages the testing process, makes sure the architectures will support long term development and maintenance issues, forward looking in terms of functionality, languages, technologies, and competition, as well as making sure everyone else has what they need and things are on shedule.

\- Peter

<comment><USER8> But it gets oh so complicated when you introduce the modifiers "rock star" and "guru".

For example, who's more 1337: The guru programmer, or the rock star developer?

We live in a complicated world.

:)

</comment></comment><comment><USER9> "Instead of 'programmers' (people that specialize in writing code), what you need are 'developers' (people who will contribute in multiple ways to make the product successful)."

<http://www.ericsink.com/No_Programmers.html>

<comment><USER10> Instead of weasel words what you need is a description that covers how you get done what it is you do. In fact its my experience that people who identify as programmers, hackers or coders are much more down to earth about solving problems and doing useful stuff. What's after developers? Software construction facilitators? Fancy names just seem to miss the point.

</comment></comment><comment><USER11> The term programmer makes me thinking "we need 100 programmers to meet our deadline!"... stupid concepts like working_code=num_programmers x time and in general that programmers are easily interchangeable.

Developer is much better and is able to evoke the idea that it's not just a matter of writing code but there is a design process involved.

 _p.s. how can I write a verbatim asterisk? backslash quoting does not work_

<comment><USER5> * yields *

<comment><USER11> Thanks, not particularly intuitive :)

</comment></comment></comment><comment><USER12> The word Hackers has been basterdized over the years and it's mundane usage makes it an elusive term. What do you call the traditional programmers that broke through systems?

<comment><USER13> I've hear people try to refer to them as "Crackers" but that term just makes me hungry

</comment></comment><comment><USER14> I prefer the term developers. Programmers program computers. Developers develop software (which involves programming computers, but goes beyond that).

</comment><comment><USER15> in the case of my current employer, its how much you get paid and it stems from what you education you have. since i graduated with a computer engineering degree, i get the developer title.

</comment><comment><USER16> Yay, let's all waste time arguing about useless semantic differences.

Go build something.</comment>


The Psychology of Envy and Social Justice - <AUTHOR> https://www.youtube.com/watch?v=bcviUfFTQXk <comment><AUTHOR> Disclaimer: I'm not saying that I think the video referenced is right or wrong in any way -- I merely find it _interesting_...

Thus, it is submitted for the HN community's approval...

...or disapproval -- as the case may be! <g></comment>


Farmville, Top Facebook Games Continue To Shed Users - <AUTHOR> http://www.gamasutra.com/view/news/28837/Farmville_Top_Facebook_Games_Continue_To_Shed_Users.php?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+GamasutraNews+%28Gamasutra+News%29

<comment><USER2> It's not a huge surprise. Farmville and it's ilk were always terribly dull games. People weren't staying for the gameplay, they were staying thanks to the social pressure of all their friends playing it too (and having to log in to help them advance).

</comment><comment><USER3> ... and I hoped it was peoples common sense kicking in, but apparently it's just the fact that now with the notifications gone, people forget about their game. That too speaks volumes about the majority of the players.

</comment><comment><USER4> Color me confused. The new app notification policy would explain less _growth_ , but that doesn't explain _losing_ millions of users.

<comment><USER5> Never played Farmville, but I'm guessing part of the stickiness of the game was the slight but not insignificant emotional pressure of seeing "<your friend> wants you to plough him/her" or whatever the notifications Farmville sends out actually looks like. :p Without that slight pressure of seeing your friend asking you for help or collaboration or whatever, it's probably become much easier for people to not play that game.</comment></comment>


Genetics may explain up to 25% of same-sex behavior, giant analysis reveals - <AUTHOR> https://www.sciencemag.org/news/2019/08/genetics-may-explain-25-same-sex-behavior-giant-analysis-reveals <comment><AUTHOR> Actual paper here : [https://science.sciencemag.org/content/365/6456/eaat7693](https://science.sciencemag.org/content/365/6456/eaat7693)

Large-scale GWAS reveals insights into the genetic architecture of same-sex sexual behavior.

RESULTS In the discovery samples (UK Biobank and 23andMe), five autosomal loci were significantly associated with same-sex sexual behavior. Follow-up of these loci suggested links to biological pathways that involve sex hormone regulation and olfaction. Three of the loci were significant in a meta- analysis of smaller, independent replication samples. Although only a few loci passed the stringent statistical corrections for genome-wide multiple testing and were replicated in other samples, our analyses show that many loci underlie same-sex sexual behavior in both sexes. In aggregate, all tested genetic variants accounted for 8 to 25% of variation in male and female same- sex sexual behavior, and the genetic influences were positively but imperfectly correlated between the sexes [genetic correlation coefficient (rg)= 0.63; 95% confidence intervals, 0.48 to 0.78].osteoblast

SUPPLEMENTAL DATA HERE: [https://science.sciencemag.org/content/suppl/2019/08/28/365....](https://science.sciencemag.org/content/suppl/2019/08/28/365.6456.eaat7693.DC1)]

TOP 20 genes from supplement are: ELAVL4 LRCH1 OR5A1 OR4D6 CD276 ADK CTNNB1 TCF4 OR5AN1 LRRTM4 PRKD1 OR2B2 HIST1H2BN TMEM258 OSBP2

Osteoblast differentiation ,myogenesis ,Wnt/B-catenin Signaling and olfactory signaling appear to be important pathways affected.

4 of the genes are on chr11q12 .</comment>


DPR's Lawyer Denies Bitcoin Is 'Monetary Instrument,' Moves To Drop All Charges - <AUTHOR> http://www.forbes.com/sites/andygreenberg/2014/04/01/alleged-silk-road-creators-lawyer-denies-bitcoin-is-monetary-instrument-moves-to-drop-all-charges/

<comment><USER2> Could rayiner, tptacek, grellas, or anyone else weigh in as to whether this legal defense has a decent chance of standing in a courtroom? (Or whether it's unknown if it will?)</comment>


Shapeways Receives the First HP Multi Jet Fusion 3D Printer - <AUTHOR> http://www.shapeways.com/blog/archives/25462-shapeways-receives-the-first-hp-multi-jet-fusion-3d-printer.html <comment><USER2> Happy to print there!</comment>


Ask HN: How do you pronounce 'dogecoin'? - <AUTHOR> <comment><USER2> On the Wiki page for the meme, they list the IPA pronunciation: "often pronounced /ˈdoʊʒ/ DOHZH or /ˈdoʊɡ/ DOHG". Personally, I'd guess the first pronunciation is more common.

[https://en.wikipedia.org/wiki/Doge_(meme)](https://en.wikipedia.org/wiki/Doge_\(meme\))

</comment><comment><USER3> I pronounce it with a long o and soft g. "D-oh-je-coin"</comment>


Tell HN: Django/Python engineer looking for internship in USA - <AUTHOR>

Hey Hacker News, I'm soon to be graduating with a degree in Computer Science from Plymouth University, UK.
I've always dreamed of working in a fast, exciting tech start up in the USA and I've been working hard the past few months to find potential companies that would take me on as an intern with a J-1 visa (http://j1visa.state.gov/)
I'm an passionate and ambitious engineer with a love for producing robust software.
Check out my details here:
Resume - http://bit.ly/phresume
Twitter - http://twitter.com/phalt_
Github - http://github.com/phalt
email - email@example.com
If you're part of, or know a company that is looking for interns who would like to help me achieve my dream, get in touch with me at email@example.com
I'm available for work as soon as I graduate (June 2013) and I'm also visiting the US for 3 months after that to help me in my search.
Anyone who has achieved this before, can you give us some helpful tips on finding internships and the entire process? I've read as much as I can but so far I've yet to hear from anyone who has actually done it. I'm sure there are others who'd benefit from it too.
Thanks! <comment><USER2> Good for you for reaching out.

As a hiring manager, I'd suggest changes to your marketing. A better title might be "Tell HN: Django/Python engineer looking for internship in USA" (I would have clicked faster). Also, link to your GitHub and blog and twitter here, too, so I don't have to dig for them.

Good luck!

<comment><AUTHOR> Thanks for the advise, I'll update the post!

<comment><USER3> your resume has an extra page in it. I'd 86 that.</comment></comment></comment>


1994 Was a Prison of My Own Making - <AUTHOR> https://www.nytimes.com/2019/05/14/style/enjoy-the-silence.html <comment><USER2> Hmmm, pretty sure that's accurate. If Creed was in the studio in 95-96, and the album was released in 97, it could have been written in 1994.</comment>


A clever hack to define custom infix "operators" in Python - <AUTHOR> http://code.activestate.com/recipes/384122/ <comment><USER2> (2005) it seems from the comments on that page.

<comment><USER3> Yes, the upper-right says "Created by Ferdinand Jamitzky on Fri, 11 Feb 2005".</comment></comment>


Operation Costs in CPU Clock Cycles - <AUTHOR> http://ithare.com/infographics-operation-costs-in-cpu-clock-cycles/ <comment><USER4> A syscall is a lot cheaper than shown here in terms of direct costs ~ 150 cycles, and also a lot more expensive, depending on the call, when you factor in the full cost of the cache that gets clobbered. More like the full cost of a context switch shown, around 10-30K cycles[1]. For this reason it's important to use system calls that allow you to amortize more work into one call, like preadv, pwritev, recvmmsg, and sendmmsg.

[1] [http://www.cs.cmu.edu/~chensm/Big_Data_reading_group/papers/...](http://www.cs.cmu.edu/~chensm/Big_Data_reading_group/papers/flexsc- osdi10.pdf)

<comment><USER5> >"and also a lot more expensive, depending on the call, when you factor in the full cost of the cache that gets clobbered."

But a syscall doesn't necessarily mean a context switch right? It's just a mode switch if the kernel is servicing the syscall on behalf of the same process. The cache wouldn't get clobbered then because the kernel is mapped into the top of every process, for just this reason.

Or am I misunderstanding what you are saying?

<comment><USER6> You are correct. The author is considering the cost of accessing kernel mode code and data, which I don't think is fair

<comment><USER4> It absolutely is fair. For a long time after a syscall your program will run slower thanks to the increased cache misses from the kernel clobbering your stuff in cache. That's a real price that you pay for a syscall and it would be wrong not to count it. However, if you found some other way of doing the work, e.g user code, kernel bypass, amortized bulk syscall, those will also have a (lesser) effect on the cache. So to be fair you compare a syscall against that, not against zero.

<comment><USER7> If you have enough CPU cache, the CPU will cache both kernel and user code/data for your process. If you run long enough and access enough user data that the kernel bits get evicted, then you'll take more of a performance hit, but the same thing applies to accessing enough user data that different parts of your user data get evicted.

<comment><USER4> Maybe this is more reflective on the kinds of software I work on, but I don't find that I have enough cache. So syscalls always come at a steep price. In fact I am tempted to break up one program into multiple processes and use the cache partitioning in Xeon v4 to prevent the different parts of my program from clobbering it's own cache.

</comment></comment></comment></comment></comment></comment><comment><USER8> Anyone have the presentation from a Intel guy on how the CPU design focus has moved from cycles to cache misses handy?

Edit: never mind, it was not a Intel guy. And i actually had the thing bookmarked (and it still worked).

[https://www.infoq.com/presentations/click-crash-course- moder...](https://www.infoq.com/presentations/click-crash-course-modern- hardware)

<comment><USER9> There's a fantastic, massively upvoted StackOverflow post that can also provide some insight here. This may be a little more accessible, since it's such a significant runtime difference with very simple source code.

[http://stackoverflow.com/questions/11227809/why-is-it- faster...](http://stackoverflow.com/questions/11227809/why-is-it-faster-to- process-a-sorted-array-than-an-unsorted-array)

<comment><USER10> Thanks so much for sharing this, great read !

For those, like me, that want to play with what this stackoverflow talks about, here's a fiddle of it: [https://jsfiddle.net/tbinetruy/Latkmk2q/1/](https://jsfiddle.net/tbinetruy/Latkmk2q/1/) (code takes 2s to run and loads firebug for console logs).

</comment></comment></comment><comment><USER11> Honestly, it's a lot more complicated than that, and the article itself presents a pretty complicated (and flawed) model. There's no substituting for benchmarks.

Really, if you want a quick and dirty heuristic, the smallest program is likely the fastest. Everything else will bite you in the ass.

Anti exception stuf: the author repeats the old harmful "exceptions for exceptional cases" bromide while overselling the cost of exception dispatch (5k cycles is cheap in the scheme of things) and underestimating (or, rather, not mentioning) the icache cost of error checking.

Now that I'm looking, the author glosses over many other things as well, like modern system call interfaces (no exceptions!), cache pressure generally, and branch prediction efficacy. These factors are strong arguments _against_ generating reams of template code using CRTP.

Like most analyses that purport to show the "true" cost of anything on modern superscalar virtual memory systems, it oversimplifies.

<comment> no-bugs > Honestly, it's a lot more complicated than that, and the article itself > presents a pretty complicated (and flawed) model. There's no substituting > for benchmarks.

Of course, all the models are inherently flawed, and in theory there is no substituting for benchmarks, but going along the lines of "all models out there are flawed, so we don't need ANY model and should do benchmarking instead" leads to the software which is badly architectured to start with (and then no benchmarking will be able heal it without throwing the whole thing away and rewriting it from scratch - and it is not going to happen for most of the projects for many practical reasons).

In other words, if we're already in the vicinity of the optimum (which BTW may happen to be a local one - but this is a very different story) - <USER2> benchmarking is the way to go (that is, if those 20% we're chasing, are worth the trouble - and TBH, they really are). However, at the earlier stages being able to realise the order of magnitude without spending time on trying really badly architectured things - is extremely important.

Just one example - no optimisation will save a (non-GPGPU) program which tries to split the load over multiple threads with chunks calculated on each thread (before it relinquishes control to another thread), being 100 cycles or so; I don't need to benchmark it to know that at least in 99.9999% of real-world projects it is a suicide from performance point of view - and this observation directly follows from the diagram.

Or another example - in most of practical cases (actually, pretty much always except for inserts into the middle without iterating through and specialized stuff such as merges), vectors have advantage over lists - and this advantage can easily reach over 100x(!) ( see, for example, [https://accu.org/index.php/journals/2268](https://accu.org/index.php/journals/2268) ). This, once again, follows from the diagram (it is a direct consequence of the main memory read being over 100 cycles and L1 read being 3-4 cycles).

This list of crazily inefficient things (which are still widely used in the industry for no reason) can go on and on. Of course, going into anywhere more detailed analysis than "order of magnitude" indeed doesn't make sense - and it is clearly stated in OP. But for initial estimates when making some architectural decisions (and to avoid premature pessimisation) - such "order of magnitude" analysis can be very useful.

</comment></comment><comment><USER12> While this is a pretty decent overview, it is not very precise, and even a bit misleading in certain cases. Depending on where certain instructions are in the execution pipeline, you can. R limited in what can be issued and executed, and the latencies are not deterministic. This is one of the biggest difficulties in optimizing scheduling in a complex architecture such as x86, and gets even worse (determinism wise) when you throw in cache misses and branch prediction.

For a more exhaustive instruction latency listing over a variety of micro architectures, check out [0]. [1] is also a great resource for memory latencies for a variety of processors.

[0]: [http://www.agner.org/optimize/instruction_tables.pdf](http://www.agner.org/optimize/instruction_tables.pdf)

[1]: [http://www.7-cpu.com](http://www.7-cpu.com)

</comment><comment><USER13> For people who make interactive applications, here is an interesting thing to add:

Making a user interpret an error message or notification of some kind (8 seconds) and have to dismiss a window (3 seconds) rather than be able to continue seamlessly:

44,000,000,000 operations, or 275,000,000,000 operations if we include the idling GPU.

Distance light travels in this time: around the world 77 times, all while we keep the user from being able to do anything.

Something to think about the next time you throw up a dialog box...

<comment><USER14> If you want to put it that way, you can think of information in the user's brain as being stored in peripheral memory at the end of a horribly slow, high-latency, unreliable bus. :)

<comment><USER13> This is really good phrasing!!! I love it.

Especially when you need the user to take an action: the API isn't well-formed (for example a mix of visual cues, text, and UX behavior) but at the end of the day if you give the user something to do (example: you want them to acknowledge and dismiss a notification or make a choice) there are multiple ways of doing it, some much faster and others much slower.

This is especially interesting when you need the user to deal with your bugs (e.g. errors of various kinds). It's not really part of what _they 're_ trying to do - you're the one that needs them to react somehow.

very interesting way of thinking about it!

</comment></comment></comment><comment><USER15> In places, this is quite simple-minded, though there is a nod to the distinction between throughput and latency. A function call may effectively cost nothing; if the function and its caller do useful work, a few store/load pairs (save and restore registers) and correctly predicted return address may be a handful of microoperations merged in with a stream of other instructions. The idea that there is 20-50 cycles of actual _cost_ from a function call is outlandish.

Similarly, the virtual function call number looks way out of whack as long as the indirect branch target is correctly predicted (which, if the use of virtual functions is substituting for a more straightforward approach, is likely - and if it's quite unpredictable where the indirect branch in your virtual function call would go, any other approach probably just moves the branch mispredict somewhere else).

The numbers are not overall "crazy-wrong", but there is a tone of precision and certainty to them that is a bit deceptive. Talking about how much an operation costs is pointless; build things one way, measure that, then make the smallest change possible and measure that. Most of these costs make sense only in context (if you're on a critical path, measure latency, if you're on oversubscribed execution resource, measure throughput, etc).

<comment> no-bugs > may be a handful of microoperations merged in with a stream of other > instructions.

It may indeed in theory, but most of the time in real-world it won't. And BTW - let's not forget about implicit costs of being unable to inline (which can be huuuuuge). Speaking of the real-world - we've just got our article accepted, presenting supposedly the fastest universal hashing function as of today (in spite of math being more heavy compared to the existing ones) - <USER3> the numbers in the OP are consistent with our real-world experiences while we were optimising it (well, within an order of magnitude at least).

> but there is a tone of precision and certainty to them that is a bit > deceptive.

OP: "Last but not least, a word of caution: all the estimates here are just indications of the order of magnitude".

> Talking about how much an operation costs is pointless; build things one > way, measure that, then make the smallest change possible and measure that.

Sure. The problem is that almost-nobody has time to do it in real-world projects. Which leads to even cruder estimates (such as "virtual function calls costs are negligible, regardless of the number of times they're called") being used - causing lots of crazily inefficient programs. IMO, OP is a reasonable middle ground between an all-out quasi-stationary testing and even worse guesstimates ;-).

<comment><USER15> I have been working in this area for 10 years, made millions of dollars of revenue from a product that was largely dependent on getting this sort of thing right, sold a startup to Intel whose main business was in this area, and work for Intel. I'm not 100% sure you are well situated to lecture me about the 'real world' because you wrote an academic paper.

Congratulations on getting a paper accepted (and would be interested in reading about it, as I love hashing work) but your claims about "most of the time in real-world it won't" is nonsense. The typical x86 function call overhead is a correctly predicted call, some register saves (using an optimized stack engine), the real work, and some register restores (using the same optimized stack engine). This is not typically 15-30 cycles worth of overhead. The loads and stores generally go to and from L1 cache, are generally predictable (if the function itself is predictable) and none of the operations that are part of a conventional function call are all that expensive. In 15-30 cycles you can do 30-60 loads and/or 15-30 stores (mileage varies by uarch) and 60-120 integer operations if you are very, very lucky. Compare this with the typical argument setup, function prolog/epilog, etc.

As you hint at, function call overhead generally comes from interrupting live ranges (forcing save/restore or simply causing the register allocator to pick a worse strategy) and losing the opportunity to optimize across function boundaries - this cost can be _enormous_ , nebulous and not even a constant (it will impose costs repeatedly on the program and isn't even a constant). I have code where the cost of sticking a function call in and losing some constant propagation information is millions of cycles per call, not 15-30. In other places the cost of a call is effectively zero.

In still other places the cost of a function call is 'negative' \- that is, it's cheaper to have a function exist as a independent unit than inline it. This is typically an i-cache issue but we've seen a host of weird effects here.

So - under some (unusual) circumstances, function call overhead can be practically free (i.e. the ooo engine has a lot of opportunities to insert prolog/epilog instructions, no branch mispredicts, etc). Typically it will be inherently cheaper than 15-30 cycles - but lost opportunities for optimization may take you to numbers that are insanely higher than that.

The reason I arced up over this is that it's just not useful to say "within an order of magnitude". If you say 15-30 is the magic number you are creating folklore. We are burdened by folkloric stuff ("the interpreter penalty that results because branch predictors 'can't predict indirect branches'") that result in considerably worse designs. It's better to know you don't know rather than promulgate simplistic rules-of-thumb that misstate the real issues.

This is particularly true because a lot of this 'folkloric optimization' stuff people do generally leads away from a simple and direct expression of their ideas in their favorite coding style, and towards a heavily "optimized" form that's super-obscure because some "performance high priest" has declared it Performant. We've had a number of cheap laughs in our day re-rolling loops, replacing inline asm with C code, and restoring sanity and getting a performance _win_ from doing it. I've been just as guilty of playing Performance High Priest as anyone else, mind you.

<comment> no-bugs > made millions of dollars of revenue... I'm not 100% sure you are well > situated to lecture me about the 'real world' because you wrote an academic > paper.

So, we're going to discuss millions of dollars instead, sigh... This way Trump should be one of the best programmers in the universe, I guess.

> Typically it will be inherently cheaper than 15-30 cycles - but lost > opportunities for optimization may take you to numbers that are insanely > higher than that.

And still, even from your own rant it follows that in vast majority of cases the estimate of 15-30 cycles will be well within "order of magnitude" (TBH, I didn't see millions myself, but it should be a really strange corner case).

> If you say 15-30 is the magic number you are creating folklore... We are > burdened by folkloric stuff... that result in considerably worse designs.

And not having any such "folklore" results in even worse designs :-( (actually - MUCH worse ones). Using list instead of vector can easily give you 100x penalty for absolutely zero reason (actually, up to 780x was experimentally observed - and that's without swapping). Off-loading 100-cycle chunks (with a thread context switch back after calculating these 100 cycles) to a different thread will never work at least on a x64 (though I remember meeting some folks from Intel - I think they were representing an OpenMP team - who were seriously preaching otherwise, based on utterly silly "how many cores we managed to utilise" metric without realising that the whole thing became _slower_ after they parallelised it ;-( ). And so on and so forth.

Sure, the numbers are very rough. But trying to say that "hey, it is not precise so let's not even try to estimate" \- is even worse than that.

<comment><USER15> I don't think Trump made his money doing low-level performance programming for the past 10 years, so I'm not sure your analogy is valid.

However, since you, whoever you are, have not only written a hash table, but discovered profundities like 'Sometimes list costs 780x as much as vector for "absolutely zero reason"', and 'don't try to offload 100 cycles of work to another thread' I'm going to defer to your expertise. I recommend you stick a bone through your beard, pronounce yourself a performance guru, and make bank. Have fun.

<comment> no-bugs > I recommend you stick a bone through your beard, pronounce yourself a > performance guru, and make bank. Have fun.

:-) :-) I LOVE when my opponent has to resort to personal insults :-). Leaving aside any sarcastic remarks in this regard:

For Intel's sake I Really Hope that these "profundities" are indeed very well- known to you - and believe it or not, they're very well-known to me too for at least 10 years. However, this is not the point; the point is that there are LOTS of developers out there who do NOT know them - and the OP is intended for them (and not for "performance gurus").

It is actually THIS simple. Eliminating 90% of inefficiency does not really require black magic or "performance gurus" who know exactly how the pipeline of specific CPU works. And this is exactly what I'm arguing for - to educate app-level developers and architects about this low-hanging fruit of 10x+ inefficiencies; I can assure you that it is very far from being universal knowledge in app-level development circles.

</comment></comment></comment></comment></comment></comment><comment><USER16> This is a fantastic resource; kudos to the author. But there is one thing in this reference that I found unexpected:

 _One further thing which is related to memory accesses and performance, is rarely observed on desktops (as it requires multi-socket machines – not to be confused with multi-core ones ... When multiple sockets are involved, modern CPUs tend to implement so-called NUMA architecture, with each processor (where "processor" = "that thing inserted into a socket") having its own RAM_

I thought that all Intel chips since Nehelem divided their SDRAM access into a NUMA-configuration based on cores? Am I wrong about that?

<comment><USER17> I don't think there's much NUMA action on single socket at the moment, but as CPU area increases and more of the transistors are not actually doing CPU work (to spread out the heat-making bits) which increases distances on a single die, this will change.

<comment><USER18> Unless there is core-specific RAM on the die, why? Isn't the essential aspect of NUMA the fact that there is some memory which is "near", and some which is "far"?

<comment><USER17> Yeah, as distance (latency) to RAM increases, the amount of on-die cache increases (another handy way to distribute heat with a performance bonus) and coherency becomes more costly, so in effect it becomes the core-specific RAM you mention.

(Oh, hi Kiko!)

<comment><USER18> Hey Jeff.. the nick fonts are really small on HN; I didn't see it was you!

I don't think latency to near RAM will increase; it would have too material a performance impact. Even in disaggregated designs like Rackscale there is definitely a concept of "near RAM", which is not cache, but which has very low latency.

However, your post made me realize that as the number of cores go up, as with KNL, they are likely to be organized hierarchically with some clustered sharing of cache, so indeed NUMA-style affinity of workload to core starts paying off there. IOW, if you have thousands of cores on a chip, they definitely aren't going to be all sharing the same L2 and L3.

</comment></comment></comment></comment></comment><comment><USER5> The post states:

"in particular, tcmalloc and ptmalloc2 allocators can take as little as 200-500 CPU cycles for allocation/deallocation of a small object"

Does anyone how many cycles the regular glibc malloc() takes?

<comment><USER19> I believe ptmalloc2 is glibc's malloc.

<comment><USER5> Yes you are correct. Does anyone know how many cycles that is comparatively?

</comment></comment></comment><comment><USER20> I like this chart. In particular, I like that they break apart "thread context switch (direct costs)" and "thread context switch (total costs, including cache invalidation)". I've often heard that context switches are cheap because people only consider the direct costs.

<comment><USER11> Context switches are cheap because context switches are cheap. You can, with enough finnegaling, make the "indirect costs" of anything arbitrarily high.

</comment></comment><comment><USER21> i'm curious where this information comes from. a lot of it jars heavily against personal experience and measurements i can do for myself.

the idea that floating point division is that much more expensive than multiplication for instance... the only difference afaik is latency, not timing.

the idea that an indirect call and a virtual function call are so close as well... when it is a read followed by an indirect call- whilst giving timings for some of the reads are considerably greater than either is an utter nonsense on inspection.

take with a great pinch of salt and remember the one correct way to judge timings is to measure them in context instead of guessing based on information that could well be wrong.

imo this kind of article is harmful and misses the more important lesson to learn: measure, measure, measure.

<comment><USER22> There is a "references" section at the bottom:

[Agner4] Agner Fog, "Instruction tables. Lists of instruction latencies, throughputs and micro-operation breakdowns for Intel, AMD and VIA CPUs"

[Agner3] Agner Fog, "The microarchitecture of Intel, AMD and VIA CPUs. An optimization guide for assembly programmers and compiler makers"

[Intel.Skylake] "Intel® 64 and IA-32 Architectures Optimization Reference Manual", 2-6, Intel

[Levinthal] David Levinthal, "Performance Analysis Guide for Intel® CoreTM i7 Processor and Intel® XeonTM 5500 processors", 22

[NoBugs] 'No Bugs' Hare, "C++ for Games: Performance. Allocations and Data Locality"

[AlBahra] Samy Al Bahra, "Nonblocking Algorithms and Scalable Multicore Programming"

[eruskin] [http://assemblyrequired.crashworks.org/how-slow-are- virtual-...](http://assemblyrequired.crashworks.org/how-slow-are-virtual- functions-really/)

[Agner1] Agner Fog, "Optimizing software in C++. An optimization guide for Windows, Linux and Mac platforms"

[Efficient C++] Dov Bulka, David Mayhew, "Efficient C++: Performance Programming Techniques"Amazon, p. 115

[Drepper] Ulrich Drepper, "Memory part 5: What programmers can do", section 6.2.2

[TCMalloc] Sanjay Ghemawat, Paul Menage, "TCMalloc : Thread-Caching Malloc"

[Wikipedia.ProtectionRing] "Protection Ring", Wikipedia

[Ongaro] Diego Ongaro, "The Cost of Exceptions of C++"

[LiEtAl] Chuanpeng Li, Chen Ding, Kai Shen, "Quantifying The Cost of Context Switch"

</comment></comment><comment><USER6> I am extremely skeptical of "full" rows in the table, the ones that purport to measure the overall costs of cache invalidation. These costs are so workload specific that a single number is meaningless and likely to mislead. My own benchmarks show costs that are nowhere near the ones cited.

<comment> no-bugs > My own benchmarks show costs that are nowhere near the ones cited.

This is heavily dependent on the benchmark. In the OP, there is a ref to an academic research showing these numbers - and from my own real-world experience (NOT artificial benchmarks), the costs of 10K-100K are very usual. From a completely different perspective - there should be reasons why nginx beats Apache performance-wise :-).

</comment></comment><comment><USER23> I'm surprised how fast a C function call is. I would have thought that creating a stack frame would be slower than that, (and significantly slower than a floating point division), but I guess not.

<comment><USER24> Creating a stack frame is just updating a register and writing a couple of values to L1 cache.

<comment><USER21> sometimes not even that. it might just update a single register and write nothing to cache or memory... and that cost might be hidden by out-of-order execution and the parallelism of different units on the CPU, making it effectively zero-cost.

</comment></comment></comment><comment><USER25> Great overview! Would be even better as a general guideline if it included costs for HD/SSD disk writes and network usage!

<comment><USER26> See the Jeff Dean numbers: [https://gist.github.com/jboner/2841832](https://gist.github.com/jboner/2841832)

</comment></comment><comment><USER27> The small difference between direct C calls and virtual C++ calls surprised me, actually. I thought it would be much bigger.

<comment><USER28> A virtual call in C++ is just a vtable lookup then a direct C call. Literally one pointer away. (or perhaps one pointer then one integer addition away? For the offset)

<comment><USER29> Is it that simple for virtual methods in complex class hierarchies? If the class hierarchy isn't linear, how can you assign simple absolute vtable indices for methods?

<comment><USER30> Yes it is. The C++ ABI defines how any permitted inheritance hierarchy is mapped into a surjective, ordered set of vtables. Also, calls into methods of other classes in the hierarchy offset the this pointer accordingly.

It feels counterintuitive that these two mechanisms are sufficient; but they are.</comment></comment></comment></comment>


Google DeepMind Challenge Match: Lee Sedol vs. AlphaGo [Live] - <AUTHOR> https://www.youtube.com/watch?v=l-GsfyVCBu0 <comment><USER2> Does anyone know what DeepMind's software stack looks like? Just based on past work of some of the people working there, I'm guessing most of the code is C++ with some Lua. Anyone know for sure?

</comment><comment><USER3> Is it normal for players to leave the board without announcing a break (whatever the correct terminology is)?</comment>


On Office Ergonomics: An Interview with Thomas Levine - <AUTHOR> http://www.arachne.cc/issues/01/ergonomics-thomas-levine.html <comment><USER2> "I have seen very few input devices that reduce this static loading and are still as intuitive as keyboards or mice."

Getting a keyboard split into two independent halves makes a huge difference to the ability to adjust the workspace to reduce static strain. One of the best currently available options, with a very easy learning curve, is the Matias ErgoPro: [http://matias.ca/ergopro/](http://matias.ca/ergopro/)

As for mice: trackpads, trackballs, roller mice, and pen tablets are all potentially more comfortable. Mice with different shapes can help, e.g. those ones with the vertically oriented body which requires less wrist pronation. Even without changing hardware, repositioning the mouse or adjusting desk or chair can make a huge difference to mousing comfort.

<comment><USER3> For a vertical mouse, consider the Evoluent VerticalMouse: [http://evoluent.com/products/vm4r/](http://evoluent.com/products/vm4r/)

Regarding the interviewee's comment about portability, my VM and Kinesis Freestyle ([http://www.kinesis-ergo.com/shop/freestyle2-for-pc- us/](http://www.kinesis-ergo.com/shop/freestyle2-for-pc-us/)) traveled 25,000+ miles on a dozen flights in the past few years. Split keyboards are incredibly portable. Combine with a Crate or Stanton foldable stand to elevate the laptop.

For anyone choosing a keyboard, [https://news.ycombinator.com/item?id=9605262](https://news.ycombinator.com/item?id=9605262) has more comments.

</comment></comment><comment><USER4> "TL: One major reason why people experience pain while at work is that they seek stress and pain in their work; this is often called "work ethic" or "hard work". If work ethic is very important to you and you manage to make your workstation more comfortable, you should look for other sources of stress and pain to compensate to compensate for the new-found comfort. (An easy one is just to work longer.) Similarly, you probably already work very comfortably if you value relaxation and health; if that is the case my above recommendations will probably have only small impacts. ~*"

</comment><comment><USER5> "Kinesis contoured keyboards are nice except they don't have forearm support because they're above the table. ... If these keyboards could be recessed in the desk rather than rested upon the desk, they could be neat."

1000x this. I recently got a Kinesis and this indeed is my single big problem with it. Any Kinesis owners here that can recommend a practical setup that allows to rest forearms and which is applicable to office inventory I don't own (read: non-destructive)?

<comment><USER2> People usually need to rest their palms/wrists/forearms/elbows because they are either (a) reaching their arms out forward or (b) holding their arms up with their elbows sticking out to the side. The strain on the back/shoulders/upper arms from holding the arms up for an extended period of time then forces the use of some kind of support for relief. The typical reason for either of these is too high a desk relative to the height of the chair, and a keyboard which is too far in front of the body.

If you hold your keyboard close in to your torso such that your back is straight, your shoulders are relaxed, and your upper arms hang loosely at your sides, then this is not really a problem. If you watch e.g. professional pianists or court reporters, or look at videos of secretaries from the 60s, you'll see no palmrests/armrests in sight. However, you must also make sure to keep your wrists in a nearly straight, neutral position.

One intervention that might help is raising your chair relative to your desk. Alternately, if you have a low chair / high desk and neither is adjustable, tilting the keyboard up at the far end (e.g. by piling a book or two underneath that side) can help considerably.

<comment><USER5> I appreciate your suggestions and will give them a try. One potential problem I see is that while my desk and chair are height-adjustable, unfortunately the armrests of my chair are not. That could get in the way of "hanging my arms loosely at my sides".</comment></comment></comment>


Stanford's new linear accelerator is just three millimeters long - <AUTHOR> http://www.theverge.com/2013/9/27/4777840/stanfords-new-linear-accelerator-is-just-three-millimeters-long

<comment><USER2> Very cool. Sort of like an optical klystron, in some ways.</comment>


IPad jailbroken Who is desperate? - <AUTHOR> http://latestgeeknews.blogspot.com/2010/04/ipad-jailbroken-who-is-desperate.html

<comment><USER2> If it's jailbroken then can they plug a camera into the space in the bevel and get it working too?</comment>


Unix Permissions Calculator and Lookup - christoph-heiss http://permissions-calculator.org/ <comment><AUTHOR> chmod supports names for permissions. Wouldn't it be easier to just learn octal? Takes about 10 minutes.</comment>


Don't Follow Your Passion: A Smarter Way to Find a Product to Sell  - <AUTHOR> http://www.shopify.com/blog/6187532-dont-follow-your-passion-a-smarter-way-to-find-a-product-to-sell <comment><USER2> I guess the formula for a mildly viral blog post is just to misinterpret a popular saying so you can disagree with it. I really dislike it though.

"Follow your passion" is not advice given in response to the question "What product should I sell?" Usually it's in response to "What should I do with my life?" It doesn't help people differentiate between selling Star Wars figurines vs. something else. It's meant to help you decide between selling products online _at all_ versus, say, writing novels or being a carpenter, or social work or some other calling.

Yes, if you take the advice outside of the context it's intended, it does become quite terrible.

<comment><USER3> Or, as Bret Victor said once[1], you can also follow a principle:

 _There are many ways to live your life. That's maybe the most important thing to realize in your life, that every aspect of your life is a choice. There are default choices. You can choose to sleepwalk through your life, and accept the path that is laid out for you. You can choose to accept the world as it is. But you don't have to. If there's something in the world that you feel is a wrong, and you have a vision for what a better world could be, you can find your guiding principle, and you can fight for a cause. So after this talk, I'd like you to take a little time, and think about what matters to you, what you believe in, and what you might fight for._

[1] [http://gumption.typepad.com/blog/2012/03/principle- centered-...](http://gumption.typepad.com/blog/2012/03/principle-centered- invention-bret-victor-on-tools-skills-crafts-and-causes.html)

<comment><USER4> I think it's okay to opt out of fighting. Too much of the narrative in places like this refuse to acknowledge that it's also fine to live without trying to rub up against something the whole time. There's nothing wrong with not having big ambitions, and there's nothing wrong with the people who don't have them, either.

</comment></comment></comment><comment><USER5> The article isn't saying you shouldn't be passionate about your work, rather that you shouldn't restrict yourself to selling in markets where you have a personal interest.

I have mixed feelings about this. I started a website about senior care giving because I thought there was a market need and advertising rates were/are incredibly high. However, writing about senior care as a 27 year-old male is mind numbing. The site failed because I had no motivation to create content for it. So, the lack of passion can definitely result in failure.

It seems to me that the key to success (as noted by the article) is finding where you can add the most value. I'd say that:

Value Added = Function(Knowledge, Work, Market Need)

If you work on something you are passionate you have a head start on the first two. But, this doesn't matter if the market isn't there. The trick is finding market needs where you are uniquely suited to add value. In a soundbite, you shouldn't follow your passion, but you shouldn't ignore it either.

<comment><USER6> >advertising rates were/are incredibly high

How did you learn this?

<comment><USER5> By looking at Google Adwords. In senior care, there are a bunch of referral companies that get big commissions when they place a senior in a private facility. They bid up the price of advertising.

</comment></comment></comment><comment><USER7> Originally written for the eCommerce market, it contains a lot of good advice for startups like measuring market demand, doing competitive research and - probably most importantly - making sure you're adding value by solving a problem faced by your customers.

</comment><comment><USER8> _It doesn't matter if you sell diapers or dentures; if you've built a successful ecommerce business around a niche, I promise you'll become passionate about it._

I totally disagree.

Yes, you need to head-check the ideas you are passionate about and see if they can really grow into viable businesses. But you also need to check seemingly lucrative ideas and see if you are passionate enough about the industry and the concept to stick it out for the long term. You are entering a marriage. Can this idea be both a great, supportive partner and your best friend?

After the initial buzz of building a business and the early success, what's left over is a lot of time focused on your product and industry. If you don't like golf, you probably shouldn't start a golf-focused e-commerce site.

<comment><USER7> OP here. I definitely understand where you're coming from but I've personally experienced something different.

One of the eCommerce niches I entered based on research (not passion) was trolling motors. Starting out, I had absolutely zero interest in them. None. Never even used one in my life.

But after selling them for a few years and building a business around them, I've come to be a trolling motor geek and even enthusiast. Driving down the road, I'll crane my neck to see what type of motor the boat in the other lane has, and I enjoy talking with customers about them on the phone.

Is it really trolling motors I'm enamored with? Not really. They're just the vehicle I've picked to build a business around. As I mention at the end of the post, passion is 100% essential for success. In my case, I'm just passionate about building eCommerce businesses and some of that eventually leaks over to my product of choice.

</comment></comment><comment><USER9> This was on HN a month or so ago, and has a lot more detail about many of the same points:

<http://www.ecommercefuel.com/profitable-ecommerce-ebook/>

One of the points raised: you're going to get interested in whatever the niche is, if you plan on competing effectively. So choose wisely because you'll be immersed in it.

</comment><comment><USER10> Does anyone have experience with drop shipping? Specifically, how to connect with a supplier?

I get the concept, but I have no idea where to find a good supplier. We'd love to do an e-commerce play but don't have anything (physical) to sell.

All the info I've found online has been spammy (e.g., lists of drop shippers for sale on Digital Point).

<comment><USER7> Hey qeorge! Original author of the Shopify post here, and I do have a lot of experience with drop shipping.

The best ways to find suppliers are:

1) Google, but you'll need to dig deep. Most real drop shipping suppliers usually don't rank well as they are notoriously awful at marketing and SEO

2) Contact the manufacturer and ask which wholesalers they use to distribute their products. There's a good chance some of these will drop ship.

3) Drop shipping directories like World Wide Brands. There are a lot of spammy, low-quality lists out there so I'd stick to these guys if you do go this route.

If you'd like to learn more, I've written a detailed eBook on eCommerce which includes an entire section on how to find and evaluate drop shipping suppliers. You can download it for free below:

<http://www.ecommercefuel.com/profitable-ecommerce-ebook/>

Also, I just finished a screencast on finding drop shipping suppliers which I'll be posting to my blog in the next few days.

Hope this helps, and best of luck!

<comment><USER10> Thank you so much! Wow. Just seeing this response.

I'll definitely check out your eBook. Thanks again!

</comment></comment></comment><comment><USER11> This is good advice to the millions of people who start a blog/website/ecommerce store/hobby/business that they want to make money from. It's not always about what you love, it's about what you can sell. Sometimes your passion can become a profit center, but not always.

</comment><comment><USER12> It is very easy to find a niche related to something you actually like. The title of this article is a troll.

But, that being said, all you people who can't do market research, please follow this advice to try and chase the low hanging fruit. I'll continue turning over rocks to find gold. Stuff like this just keeps you the hell out of my way.

<comment><USER13> hopefully you are less of a dick to your customers in these awesome niches you are serving.

<comment><USER12> I will be a dick repeatedly and to the greatest of my ability to people who create only to make money. Create something beautiful and figure out how to market it, don't find a market and try to capitalize on it. Steve Jobs called people who try to squeeze markets rather than create great things "sick," "demented," and "parasites." In this case I think he's right.</comment></comment></comment>