University wins $1.17 billion hard disk patent verdict against Marvell - <AUTHOR> http://arstechnica.com/tech-policy/2012/12/jury-slams-marvell-with-mammoth-1-17-billion-patent-verdict

<comment><USER2> I think patents may sometimes have the opposite effect than the one intended. Instead of encouraging innovation and stimulating the economy through entrepreneurship and business, it may have a chilling effect. Who knows what patents are out there that may lead you to also face a steep penalty that could ruin your entire business?

<comment><USER3> This has not been mentioned on all the other patent threads.

<comment><USER4> It needs repeating because it is it is up there as one of the most widely believed and repeated falsehoods.

>Marvell lawyers said CMU's closing statement was "rife with misrepresentations," including suggestions that Marvell "broke the chain of innovation by not paying the royalties that they now owe," and noting those payments would be used "to fund further research, to lead to further innovation." That resulted in a short conference at the side bar, in which the judge warned "you can't dig deep into all of CMU's contributions to society and mankind."

There are tons of studies showing that IP law hampers innovation and not a single one showing it aids it.

<comment><USER5> _There are tons of studies showing that IP law hampers innovation and not a single one showing it aids it._

What about pharmaceuticals? 'Tech' (as we use the term) isn't the only industry in existence.

<comment><USER6> [http://levine.sscnet.ucla.edu/general/intellectual/against.h...](http://levine.sscnet.ucla.edu/general/intellectual/against.htm)

Chapter nine.

<comment><USER7> That chapter is very silly.

It compares British and German chemical companies and explains the difference with patent laws. But any company can build a chemical factory wherever the patent laws are favorsble. In reality the difference was cultural: Germans have had a kick-ass chemistry culture since alchemy turned into chemistry.

The chapter explains dye manufacturing changes with patent laws. To anyone with chemistry knowledge, this is ludicrous to the point of deliberate dishonesty. Dyes are embarrasingly easy to discover. If you take an existing dye structure and make a tiny chemical change, the new material is probably colorful and is not covered by the patent on the original dye.

In fact, a lot of early pharmaceutical work was done by taking chemical libraries from dye companies and screening their thousands of structures for biological activity.

The argument against patents on the basis of "me too" drugs is also ludicrous. The chapter actually says that patents are damaging because they give patients _too many choices_ : there is no need to waste the money on having all those alternatives. In reality, there is huge variation between similar drugs. Many variants turn out to work better for different people, and some variants turn out to have unacceptable side effects. The only way to find out is to make a bunch of alternatives and try them all out.

The chapter becomes even more ludicrous by saying thst the COX-2 inhibitors are just a wasteful duplicate of cheap ibuprofen. Folks, ibuprofen and related drugs kill probably a few hundred thousand people a year with side effects. They're more dangerous than Al Qaeda. (Although by bad luck it turned out that the aCOX-2 inhibitors were worse, but in a different way.)

The chapter makes the absurd claim that patents hurt drug discovery and patients, ignoring the elephant in the room of generics manufacturers. If patents were so harmful to innovation, the the generic companies would be leading they way with new drugs. They are most emphatically _NOT_. Except for a few minor formulation chsnges, they do nothing of their own.

<comment><USER6> <http://www.researchoninnovation.org/WordPress/?cat=4>

<http://www.techdirt.com/articles/20100421/1451179133.shtml>

[http://readwrite.com/2009/07/02/study_says_patents_hinder_in...](http://readwrite.com/2009/07/02/study_says_patents_hinder_innovation)

[http://archive.mises.org/10217/yet-another-study-finds- paten...](http://archive.mises.org/10217/yet-another-study-finds-patents-do- not-encourage-innovation/)

[http://www.healio.com/orthotics-prosthetics/development- fina...](http://www.healio.com/orthotics-prosthetics/development- financing/news/print/o-and-p-business- news/%7B9af9aaea-a632-47a7-b628-24620620c197%7D/pro-competitive-action-via- patent-sharing-may-encourage-innovation)

[https://docs.google.com/viewer?a=v&q=cache:_DA2suNYWFoJ:...](https://docs.google.com/viewer?a=v&q=cache:_DA2suNYWFoJ:www.lu.se/upload/CIRCLE/INN005/Mansfield_Patents_and_Innovation.pdf+&hl=en&gl=uk&pid=bl&srcid=ADGEESiSrZgf05T5oVhTDLkVOmUYdF43Y3zl869iodTKe4OJxuaMaq2qn0IwqNjwOmWweYVWWS6KKuY5fe3zpSNFPj- zku2amcHzmgBp2iUvw_0eIXjIaVzDs9S_UydjZzaSxDB2EUph&sig=AHIEtbTHosHx_4LXf9sQ- _Ct2TTnVFDhsQ)

Skip to the conclusion in the last paper.

</comment></comment></comment></comment></comment></comment></comment><comment><USER8> Taiwan University sues Apple over SIRI[1]. Columbia University sues Illumina[2]. University of California sues Facebook[3]. And now, CMU sues Marvell.

\---

[1][http://www.reuters.com/article/2012/07/30/us-apple-patent- ta...](http://www.reuters.com/article/2012/07/30/us-apple-patent-taiwan- idUSBRE86T0A920120730)

[2][http://www.reuters.com/article/2012/03/26/us-illumina- columb...](http://www.reuters.com/article/2012/03/26/us-illumina-columbia- idUSBRE82P0VK20120326)

[3][http://www.reuters.com/article/2012/09/13/us-patents- faceboo...](http://www.reuters.com/article/2012/09/13/us-patents-facebook- university-californi-idUSBRE88C00N20120913)

</comment><comment><USER9> Considering everything that goes into making a hard drive, the two patents[1][2] describe such a tiny detail (a tiny incremental improvement on distinguishing magnetic domains), how can $1.17bn be a just award?

[1] <http://www.google.com/patents/US6201839> [2] <http://www.google.com/patents/US6438180>

<comment><USER10> One thing to keep in mind is that the alleged infringement has been ongoing for nearly 10 years. Over that time, they sold over 2 billion of the infringing chips. A billion dollars sounds huge, but $0.50 per chip doesn't necessarily sound huge.

I believe that the current standard for figuring out what damages should be is based on trying to figure out what deal the parties would have made had their been a negotiated license deal under the constraint that both parties feel that they MUST come to an agreement. This should take into account royalties that the defendant has paid to license similar patents before, and the importance of the patents to the defendants business. There is a whole big list of factors used to guide this hypothetical negotiation. They were established in a case involving Georgia Pacific, so googling for that along with patent damages will get more information if you are curious.

To find out exactly what happened in this case, you'd need to get records from the trial. Both sides would have had hired experts prepare damage reports that look at the Georgia Pacific factors and argue for what royalty should result. It sounds like the jury decided to go with the plaintiffs estimate.

<comment><USER11> $0.50 per chip is HUGE. This is not the ultra-expensive Intel Core i7. ARM makes only $.10 per licensed chip[1]

[1] [http://www.quora.com/ARM-Processor-Architecture/How-much- doe...](http://www.quora.com/ARM-Processor-Architecture/How-much-does-an-ARM- processor-design-cost)

</comment></comment></comment><comment><USER12> Marvell's stock just took a massive hit, 10% down in under 2 hours[1] and will probably sink a bit more tomorrow. Meanwhile, Carnegie Mellon just doubled their annual revenue from $909m to ~$2bn[2].

\---

[1]<http://www.google.com/finance?cid=664838> [2][http://www.cmu.edu/finance/reporting-and-incoming- funds/fina...](http://www.cmu.edu/finance/reporting-and-incoming- funds/financial-reporting/files/2011-annual-report.pdf)

</comment><comment><USER13> If the US technology sector ever falls behind other countries, one could look back and see that a fundamentally broken patent system played a significant role. Pitting companies against each other in courtroom battles with no net productive output.

<comment><USER14> By that standard, every court case has "no net productive output." Should we disband the legal system?

<comment><USER4> Your statement is a strawman. They just mean patent cases, not every case conceivable between two corporations. I would agree with them because intellectual "property" qua property is bogus. The essential nature of what is claimed as property by IP law: patterns, ideas, techniques is that they are not scarce goods versus things like your body or your car.

How should we define "legal productivity"? I think that it should be measured by making victims whole and CMU was not deprived of anything by Marvell using the same pattern. The focus on arbitrary jail time and fines paid to government versus restoring victims is one thing which needs to be rebooted.

Another is the tragedy of the commons situation with free and open access to courts. This creates a long queue for trials and simply drawing out a case which has no merit is used as a weapon itself. If justice was a service being paid for and we implement a loser-pays doctrine, as has always been the case in common law, we wouldn't see a lot of these patent cases, besides the fact that IP cannot exist without a state to grant the monopoly.

<comment><USER14> That's not what "strawman" means. And I know that he just _meant_ patent cases... the problem is that the criticism he used _applies_ to all cases. That was my whole point.

> CMU was not deprived of anything by Marvell using the same pattern

CMU was deprived of a reasonable royalty under the law. What does being made whole mean if not being granted what the law guarantees?

> The focus on arbitrary jail time and fines paid to government versus > restoring victims is one thing which needs to be rebooted.

This has nothing to do with patent cases. Are you saying criminal law also needs a reboot?

> If justice was a service being paid for and we implement a loser-pays > doctrine, as has always been the case in common law, we wouldn't see a lot > of these patent cases, besides the fact that IP cannot exist without a state > to grant the monopoly.

I have no idea what you're trying to get at here. Loser-pays has some advantages, but it also has some serious disadvantages. As for IP requiring a state to grant the monopoly, I don't think anyone has ever claimed otherwise, and it has nothing to do with loser-pays. I'm just confused by your comment.

</comment></comment></comment></comment><comment><USER15> If you read the claims they are apparently infringing upon, it's all math with a thin veneer of "on a magnetic storage medium". It's literally mathematical signal processing. I would bet a few dozen bucks that it is obvious to anyone studying signal processing, since it seems like an advancement on a Kalman filter.

<comment><USER16> Yeah, it's so obvious that it was published in IEEE Transactions on Information Theory and the author got a PhD from CMU for it.

<comment><USER17> I agree. Since this is coming out of research out of a university, I would be more inclined to guess that (at the time at least) this was actually innovative and new work. The fastest way for a paper to be rejected is for it to have been done already, or even for it to be "obvious to anyone" with basic knowledge in the field.

Also, I don't see why the fact that it's advancing existing techniques or that it's just math somehow makes it less important. There are whole fields that are just math, such as computer science originally.

<comment><USER15> I don't want to make math and computer science sound unimportant -- it's an important distinction because pure math is not supposed to be patentable. But for whatever reason if you include a hypothetical machine it is suddenly patentable.

</comment></comment></comment></comment><comment><USER18> Looks like the real winners are Douglas B. Greenswag and Patrick J. McElhinny of K&L Gates ... Carnegie Mellon's lawyers.

<comment><USER14> Why does the winning litigant not count as a real winner?

<comment><USER19> Another commenter wrote an interesting reply to you. It got censored by friendly robot overlord, so I'll reproduce it:

 _«Perhaps jennichen was suggesting that since the appeal has already been filed and the verdict might be overturned, the lawyers win either way. In the end CMU may get nothing out of it after having spent millions on the lawyers.»_

 _«Quoting from the article shared:»_

 _«"As Brian Love, a professor of patent law at Santa Clara University, pointed out, most universities end up net losers (<http://papers.ssrn.com/sol3/papers.cfm?abstract_id=2019190>) in the game of "patent roulette," with their patents costing them more money than they make."»_

(Thank you 'accountswu', that is an interesting find.)

</comment></comment></comment><comment><USER20> Hmm, I was wondering if there was a good stock buying opportunity here, and then I started reading employee reviews on Glassdoor ([http://www.glassdoor.com/Reviews/Marvell-Technology- Reviews-...](http://www.glassdoor.com/Reviews/Marvell-Technology- Reviews-E11761.htm)). So much for that :-\

</comment><comment><USER21> Universities should teach, research, and publish. What the heck are they doing in patent litigation?!

Also, is CMU partially tax funded? If so, do they really own these patents to begin with? Should they?

<comment><USER22> In the process of research, professors and graduate students (and sometimes non-academic appointment staff) make discoveries and inventions that can be patented. The University owns part of every patent, because the University often provides the infrastructure yadda yadda, but usually the academics are the ones who start companies to exploit the patent. Technology transfer officers who manage the University patent portfolios will negotiate licenses if you call them up, but these offices are often dealing with grant compliance issues as well and are dealing with so much data it seems like they can hardly keep track of all the research going on in the academy, let alone look for patent violators. I don't think a University ever owns 100% of a patent, so I have to believe it is the inventor's company that is really going after people; and the university is just a co-plantif because they own part of the patent are are legally compelled to take part in the patent defense / plus they want to get their slice of the pie.

<comment><USER17> If the professors and graduate students involved in this didn't start a company to exploit the company, then I'm guessing the university still owns 100% of the patent (I don't know if that's the case in this situation or not). I think this is similar to in industry when employees may have their name on patents but the company they're working for will own the patent.

This case gets me thinking a bit because they are probably involved in this in part so that they can get money to do more research. It's not like they're doing this as a power play to grab more market share.

<comment><USER22> > If the professors and graduate students involved in this didn't start a > company to exploit the company, then I'm guessing the university still owns > 100% of the patent

That is not consistent with how I personally interpret <http://www.cmu.edu/policies/documents/IntellProp.html> but I am not a patent lawyer

> so that they can get money to do more research.

Some research requires massive public and private investment, and the rational for the technology transfer function of a university is to recoup the costs of R&D from commercial products that are legitimately derivative from these investments, so as to reinvest in the facilities and create more original knowledge that can lead to more commercial products.</comment></comment></comment></comment>


How to best handle conflicts of interest at work - <AUTHOR> https://medium.com/@paktek123/how-to-best-handle-conflicts-of-interest-at-work-66500a1f1c3b <comment><AUTHOR> I wrote this with the intent to help engineers (or any other discipline) who may be going through hardships at work. Please share your stories here (or in the comments section in the link).</comment>


BackBlaze B2 out of beta - <AUTHOR> https://www.backblaze.com/blog/budget-cloud-storage/ <comment><USER2> We're incredibly excited to launch our cloud storage offering out of beta. It's been 9 years since we started Backblaze, 7 since we open sourced our Storage Pod design, 2 since we started working to open the API, 8 months since we announced the beta, and 30 minutes since we declared the beta done ;-)

However, don't be misled...this is the beginning, not the end. So please give us feedback on our APIs, what features/functionality you need, what other products you want to integrate B2, what information do you want to know, and basically how else we can help!

And thank you for all the support over the years,

Gleb (ceo, backblaze)

<comment><USER3> You give a figure for object durability of 99.999999%. Is this in a single datacenter only?

If so, is there a timeframe for multi-DC redundancy?

This is the only thing stopping me from moving large amounts of data into B2 right now.

<comment><USER2> Yes, single data center. (Not in an earthquake area, flood zone, etc.) We're currently in the process of signing a second data center close by and expect to have multi-region support in about six months.

What are you considering using B2 for & where is the data stored now?</comment></comment></comment>


SEPA: A Simple, Efficient Permutation Algorithm - <AUTHOR> http://www.quickperm.org/soda_submit.php <comment><USER2> According to Donald Knuth, "This algorithm goes back to Nārāyaṇa Paṇḍita in 14th-century India; it also appeared in C. F. Hindenburg's preface to _Specimen Analyticum de Lineis Curvis Secundi Ordinis_ by C. F. Rudiger (Leipzig: 1784), xlvi--xlvii, and it has been frequently rediscovered ever since". (Volume 4A, Section 126.96.36.199, Algorithm L)

<comment><USER3> Indeed this is precisely Algorithm L of section 184.108.40.206 "Generating all permutations" (described on its very first page [1]), and is also what is used by C++'s `next_permutation`, among others. There are a few expositions of it online [2] (including this 2008 StackOverflow answer of mine: [3]).

[1] Draft version of Knuth's Fascicle 2B: [http://www.cs.utsa.edu/~wagner/knuth/fasc2b.pdf#page=5](http://www.cs.utsa.edu/~wagner/knuth/fasc2b.pdf#page=5) (now page 319 of Volume 4A)

[2]: [https://www.quora.com/How-would-you-explain-an-algorithm- tha...](https://www.quora.com/How-would-you-explain-an-algorithm-that- generates-permutations-using-lexicographic-ordering)

[3]: [https://stackoverflow.com/a/353248/4958](https://stackoverflow.com/a/353248/4958)

</comment></comment><comment><USER4> This sounds like what next_permutation does in the C++ STL. [https://en.cppreference.com/w/cpp/algorithm/next_permutation](https://en.cppreference.com/w/cpp/algorithm/next_permutation)

</comment><comment> swingline-747 Btw, XOR swap... probably slower than register-aliased swap, but it swaps two registers without using a third:

        void swap(char *s, int a, int b)
        {
           s[b] ^= s[a];
           s[a] ^= s[b];
           s[b] ^= s[a];
        }

<comment> ur-whale You'd better hope that a!=b

<comment><USER5> Why would a==b be a problem with the XOR swap trick?

      function xorSwapTest(min, max) {
        for (var i = min; i < max; i++) {
          var a = i, b = i;
          b ^= a;
          a ^= b;
          b ^= a;

          if (a != i || b != i)
            throw Error("Problem with " + i);
          }

        return true;
      }

<comment><USER6> The issue is that if a == b, &s[a] == &s[b]; i.e. you're writing to the same address.

</comment></comment></comment></comment><comment> ur-whale While this is very cool, I'm having a hard time believing it is a new development.

<comment><USER7> Standard procedure is to do something like requesting the mods add "2001" to the title.

<comment><USER8> Or, in this case, "(<1400)".

<comment><USER9> lol -- would likely want to include "A.D." to be clear it's a date!</comment></comment></comment></comment>


Ask Apple: Why there's no easy way to block unsolicited SMS/calls on iPhone? - <AUTHOR> I'm an expat in Brazil. I'm getting several calls and/or sms messages per day from random, unsolicited numbers about things I'm not interested in.<p>Why there's no easy way to block calls and sms from those numbers? By: - single swipe gesture -> "block" tap (not 10 clicks away) - wildcard blacklist - blacklist upload from computer - crowdsourced blacklists - anything else<p>? <comment><USER2> Try using the Do Not Disturb feature in combination with your Contacts database. All calls from numbers not in your Contacts are ignored, which is almost as good as blocking them outright. Also, these callers are not inclined to leave a voicemail.

</comment><comment><USER3> They just released [https://developer.apple.com/reference/callkit](https://developer.apple.com/reference/callkit) for iOS10

</comment><comment><USER4> If you're on iOS 10 go Settings > Phone > Call blocking and identification.</comment>


Tell HN: I have a script to retrieve your saved stories - are you interested? - <AUTHOR>

In response to a question asked recently[0] I've re-implemented my scripts to retrieve my saved stories.  The scripts are fragile and not pretty - I just hacked them together quickly to get the job done.
However, it occurs to me that there might be more people interested, so I was wondering about making them available "as is" for people to use and improve.
My concern is that it is scripted access to HN, so it might be regarded as "unkind".
Thoughts?
[0] http://news.ycombinator.com/item?id=5067445 <comment><AUTHOR> Clickable: <http://news.ycombinator.com/item?id=5067445></comment>


Story behind the iPhone's default "Marimba" ringtone - <AUTHOR> http://www.quora.com/iPhone/Whats-the-story-behind-the-iPhones-default-Marimba-ringtone

<comment><USER2> I don't think I've ever heard an iPhone's ringtone. Everyone I know has their phones on silent and checks alerts later.</comment>


Homeopathy Awareness Week - <AUTHOR> http://www.theness.com/neurologicablog/?p=556

<comment><USER4> I have had family members suffering badly for years under traditional (and various kinds of alternative) care who suddenly improved dramatically (and so far permanently) with homeopathy. I don't know why that is. It could be explained by the natural tendency for the body to return to equilibrium, it could be that they just found a placebo they could believe in, but the bottom line is that they are now fully healthy, the treatment had no side effects and it was relatively inexpensive. On the other hand, the harm from traditional medicine was extraordinary.

<comment><USER5> Although I've never experienced any definite benefits from the occasional homeopathic remedy whose drops a friend has urged on me, I know several "hard- headed" (meat-eating, non-"granolas", rationalists) who swear by the homeopathic treatment for poison ivy/oak.

It may just be placebo mind/body effects, but if anything so innocuous can reduce symptoms for something so slow-to-resolve and aggravating, I'm up for "getting foolish".

As long as it's basically distilled water "with a healing vibration," is _way_ cheaper than trip to doc, and cannot have side effects (see the zicam recall), what's not to like? --just my 2¢

<comment><USER6> Well one side effect is that magic water displaces real medicine where it really matters.

Such as:

The recent case of the child who died of eczema,

The recommendation of many homeopaths to avoid anti-malaria drugs,

And the campaign against anti-retroviral drugs in South Africa.

</comment></comment></comment><comment><USER7> homeopathy is as much bunk as the placebo effect.

<http://en.wikipedia.org/wiki/Placebo>

Why would anyone choose to ingest powerful pharmaceuticals if they could experience significant improvements simply by believing that homeopathy works?

Even when you take advil for a headache, some/all of the effect may just be the placebo effect.

note: placebos are used by many modern doctors who write prescriptions for a drug called "Obecalp" routinely to harness the placebo effect:

<http://www.nytimes.com/2008/05/27/health/27plac.html>

The human mind/body healing process is too complex to dismiss placebos offhand.

<comment><USER8> "Why would anyone choose to ingest powerful pharmaceuticals if they could experience significant improvements simply by believing that homeopathy works?"

Because if you want to perpetuate a widespread belief that homeopathy works, you have to require an equally widespead ignorance of how real chemistry works. Then, to have a modern civilization at all, you have to also have an elite that does understand how real chemistry works.

I'm sure you can understand how much of a problem this is going to become.

<comment><USER7> Well, the placebo effect is also due to real chemistry ... just not chemistry that anyone understands enough to start designing actual patentable pharmaceuticals to harness it (yet).

I would counter that just as many people naively take advil when they get a headache. I think many doctors would say that OTC NSAID abuse is probably at least as big a problem as people not getting rid of their ailments b/c they took homeopathic remedies.

Most people don't have a clue what is really happening when they flip on a light switch in their home ... so by your argument they should avoid electricity, appliances, etc.

<comment><USER9> The difference is, the light switch switches on the light regardless if I believe in light switches. Thus it is comparable with conventional medicine rather than homeopathy.

And even though - just like with regular medicine - I don't have to know exactly how it works for it to function, I also don't have to have false beliefs how it works.

<comment><USER7> Do you think mainstream pharmaceuticals are 100% effective? They are analogous to a light switch that switches the light on/off about 60% of the time at best.

The placebo effect works 10-20% of the time. So we're talking about something that is almost as effective.

Most people taking advil OR those little homeopathic tablets know/understand nothing about how they work.

In the case of homeopathy, you don't need to know why it works -- in fact, knowing that it works via the placebo effect might undermine its effectiveness :)

</comment></comment></comment></comment></comment><comment><USER10> I have case of homeopathic beer. It's $5 per bottle.. write me.... ;)

<comment><USER11> The theory surrounding homeopathy would suggest that would only be useful for curing extreme and persistent drunkenness.

</comment></comment><comment><USER12> Oh the irony.

<http://www.msnbc.msn.com/id/31388177/ns/health-cold_and_flu/>

</comment><comment><USER13> And here I was thinking that there was some grain of truth in homeopathy.

If I recall correctly, the link was here, a few months ago, about "13 things that Dont Make Sense". A scientist who was the scourge of homeopathy, had to admit that there was _something_.

Then there's water remembering when it freezes. Occasionally, distilled water will not freeze until a bit lower than 0c. It'll be around -2 to -4c before it freezes. Now, if we add a small amount of water, that is also distilled, but shown to freeze at 0c, all the water will freeze no lower than 0c. You must boil the water rigorously before it can retain the possibility of freezing below 0c.

Who knows how it happens. Quantum memory, perhaps? But there is something.

<comment><USER13> Aside the self-response and copy-pasta, here is the snippet of text and in where I got this from.

[http://www.newscientist.com/article/mg18524911.600-13-things...](http://www.newscientist.com/article/mg18524911.600-13-things- that-do-not-make-sense.html?full=true)

_______________________ MADELEINE Ennis, a pharmacologist at Queen's University, Belfast, was the scourge of homeopathy. She railed against its claims that a chemical remedy could be diluted to the point where a sample was unlikely to contain a single molecule of anything but water, and yet still have a healing effect. Until, that is, she set out to prove once and for all that homeopathy was bunkum.

In her most recent paper, Ennis describes how her team looked at the effects of ultra-dilute solutions of histamine on human white blood cells involved in inflammation. These "basophils" release histamine when the cells are under attack. Once released, the histamine stops them releasing any more. The study, replicated in four different labs, found that homeopathic solutions - <USER2> dilute that they probably didn't contain a single histamine molecule - <USER3> just like histamine. Ennis might not be happy with the homeopaths' claims, but she admits that an effect cannot be ruled out.

So how could it happen? Homeopaths prepare their remedies by dissolving things like charcoal, deadly nightshade or spider venom in ethanol, and then diluting this "mother tincture" in water again and again. No matter what the level of dilution, homeopaths claim, the original remedy leaves some kind of imprint on the water molecules. Thus, however dilute the solution becomes, it is still imbued with the properties of the remedy.

You can understand why Ennis remains sceptical. And it remains true that no homeopathic remedy has ever been shown to work in a large randomised placebo- controlled clinical trial. But the Belfast study (Inflammation Research, vol 53, p 181) suggests that something is going on. "We are," Ennis says in her paper, "unable to explain our findings and are reporting them to encourage others to investigate this phenomenon." If the results turn out to be real, she says, the implications are profound: we may have to rewrite physics and chemistry.

<comment><USER14> No one has replicated her results. Fourth paragraph from top of the section: [http://en.wikipedia.org/wiki/Water_memory#Subsequent_researc...](http://en.wikipedia.org/wiki/Water_memory#Subsequent_research)

<comment><USER13> Hmm. Weird.

I do remember that the WBC/histamine test and water test were different, but I thought the WBC test was shown to have some kind of an effect.

And then, 20/20 goes and debunks the water memory. Now, how trustworthy is 20/20? And it gets deeper and deeper with one side saying nay and other saying yea.</comment></comment></comment></comment>


Show HN: New version released 1.1 – Full featured Vue file upload component - <AUTHOR> https://safrazik.github.io/vue-file-agent/ <comment><USER2> I was delighted to find when I uploaded files, there was an icon for the filetype.

Additionally, it let me play my video when I added them.

The advanced demo is even more impressive. It reminds me of blueprint demos[1].

I wasn't able to get file upload progress on the main demo, I imagine because the blob sets immediately?

Also, both the list view and the grid view look very appealing. Starred.

Possible title optimization:

Show HN: vue-file-agent: Uploader w/ multi-file, preview, progress support

[1] [https://blueprintjs.com/docs/#core/components/button](https://blueprintjs.com/docs/#core/components/button)

<comment><AUTHOR> Thank you so much for your words. Sorry for the delayed response. I'm new here. In main demo, auto file upload on select is not enabled. Thanks for the star. Thanks for the advice on title optimization - I am following it on the next post.</comment></comment>


After 20 Minutes of Listening, New Adobe Tool Can Make You Say Anything - <AUTHOR> http://motherboard.vice.com/read/after-20-minutes-of-listening-new-adobe-tool-can-make-you-say-anything <comment><USER2> Watermarking this is virtually pointless, if not detrimental. The only utility is perhaps shielding Adobe from liability. Beyond that, it's simply delaying the day when the authenticity of uncorroborated audio recordings falls under heavy suspicion by default.

In the mean time, the technology will exist in other, open-source incarnations soon enough (if it doesn't already, albeit in far less user-friendly forms). The efficacy of these in successfully framing people will be far higher if the output of the most popular tool (Adobe's) is watermarked.

Intelligence agencies probably already have the technology perfected, and I'm sure the output is devoid of watermarks.

</comment><comment><USER3> This is fantastic. I've dabbled in audio editing (rearranging songs, terrible remix projects, lining up the beats in two tracks, adding in some cool movie quotes over the instrumental solos for fun) and it REALLY feels like photo editing in Microsoft Paint! You're just staring at these wave forms, zooming in, moving the cursor over by a pixel here and a pixel there, listening to the same half-second blip of audio over and over again, lining spikes up with other spikes juuuuust right, until your brain goes numb.

Sure, some people are probably much better at this than I am, but some people are probably also much better at manipulating images in Paint than I am, and that's not a good reason to make it the standard. Honestly, I can't believe this type of commercial product hasn't been developed earlier. In retrospect, it seems so obvious and useful!

</comment><comment><USER4> Great, now blind users can listen to text in the voice of, say, Donald Duck.

Or it can potentially make a whole movie sound like only one of the characters.

But more seriously, this would do wonders for extortionists ¯\\_(ツ)_/¯

In fact, there's already ways to generate text using your common speech patterns. How hard is it to get the inflection right? Does it work in Chinese?

A little video editing here and there and some control of the media and you just made that politician say something "undemocratic".

Scenario: "Wait, didn't you call me telling me to leave the keys to the safe in the kitchen counter?"

And when you make a call, who else is listening? Voicemail isn't stored in your cellphone.

For a more positive outlook, perhaps it can be used to better train speech recognizes such as YouTube's , just take the diff of audio vs generated cc as training measure (?).</comment>


Ask HN: Established developer with no CS experience looking to catch up - <AUTHOR>

Hi HN!
I've been an avid spectator here for about a year now and wanted to start by thanking everyone here for keeping me up to date on the latest and providing a source for me to read intelligent discussion on the things I care about.
As a bit of backstory, I got into computing when I was about 12 years old and programming shortly thereafter. I never accomplished much, but I learned the fundamentals as I bounced from VB6 to C++ to C# to Java to PHP and eventually found Ruby whilst serving a tour of duty in Iraq a couple years ago. I was going to attend school after I returned and get a CS degree, but something much more wonderful happened that prevented me from doing so.
One day while I was in Iraq, I read a blog post written by someone who would become one of the most influential figures in my life that had a profound impact on the way I went about doing my hobby projects. I emailed him directly to express my gratitude, and to my surprise he responded! We continued to correspond during the remainder of my time overseas, and I worked on a small Rails project that he had the idea for but never the time to do.
Shortly after I returned home, he proposed one day that instead of going back to stocking shelves at Wal-Mart as I had originally intended to do when I got back, that I come work for his consulting company as an intern, with the potential for a salary offer sometime down the road. Midway through the year and I was a full salaried employee working for a respected consulting firm, which was more than I could have come to expect in my wildest dreams. Our firm was acquired by a hot startup earlier this year, and I'm now still doing my dream job in the company of some of the most amazing people I've ever met.
One thing has been itching at the back of my mind ever since last year though, and that's my tremendous lack of knowledge when it comes to CS fundamentals. Algorithms. Data structures. Math. These are things that I see most people in my field around me excel at, and I often find myself stumped at the what would seem to be the most trivial problems when it comes to them.
So today I decided that I am once again going to try my hand at seeking the advice of people who are way smarter than me in the hopes that something profound will happen.
What can I do now that I already have the career of my dreams, with no time for school, to gain the basic CS knowledge that I find myself lacking in? <comment><USER2> I agree with groby_b that understanding concepts is the key. That's how you can remember things that apply across any programming language. For example, when I first studied Objective-C I didn't care about syntax. I wanted to know the language concepts first. The "why". My first years as a programmer I studied concepts at night. Coded during the day.

You'll probably want to buy some used computer science books from Amazon in any language. First, lay a good foundation with the basics, but don't get bogged down in implementation details. Instead, when you're reading ask yourself what is the core idea? For example: "why would I use a hash table vs a linked list?" "What's the purpose of CSS floats?" "What are closures in Javascript?" "What makes an SQL query scan the entire table?"

Almost anyone can use Google to find an example of how to code something. But ask those people why they wrote their code a certain way and most will give you a blank look. They probably just copied some other code and didn't take the time to understand it.

For web application development, make a study plan for each layer(presentation: html/css/javascript, business logic:data structures/algorithms, database: SQL). And find some open source projects that you respect and browse their source code. See how they organize things. If you find something you don't understand stop and research it.

</comment><comment><USER3> There was a giant thread on reddit about introductory texts for pretty much any field of computer science...

Here's what I found: [http://www.reddit.com/r/books/comments/ch0wt/a_reading_list_...](http://www.reddit.com/r/books/comments/ch0wt/a_reading_list_for_the_selftaught_computer/)

Not the link I had in mind, but not a bad starting point.

Ah, here we go: [http://www.reddit.com/r/compsci/comments/gprp0/is_there_a_li...](http://www.reddit.com/r/compsci/comments/gprp0/is_there_a_list_of_the_canonical_introductory/c1pcqe5?context=3)

So, pick one that interests you, and start reading. The trick: The very moment you don't understand a concept it's referring to, explore that concept. (Wikipedia is your friend). You want to lay a foundation, so never just gloss over things. Make sure you understand.

Trick #2: Take any knowledge you gained, and _write code_. You learned how a hash table works? Go write one, see what happens. Step through it with a debugger.

Trick #3: Once you think you understand it, try explaining it. To really whoever you think is listening. It might be a mentor, it might be your blog, or it might be a plush animal. (Me? I've got Rico from Madagascar sitting on my desk. He's an awesome debugging buddy. ;)

That should at least get you started.

<comment><AUTHOR> Thanks for the advice, I'm going to distill your points and put them on postit notes on my monitor :) Also, thanks for those links, this list looks like a great place to start!</comment></comment>


The 20 Highest Paying Startup Unicorns - <AUTHOR> http://techcrunch.com/2015/11/17/the-20-highest-paying-startup-unicorn <comment><AUTHOR> At quick glance the top ten are:

-Cloudera – median salary $142,240

-Jawbone – median annual base salary $130,000

-Medallia – median annual base salary $121,920

-Pinterest – median annual base salary $118,420

-Dropbox – median annual base salary $116,840

-Airbnb – median annual base salary $116,840

-Kabam – median annual base salary $116,840

-AppDynamics – median annual base salary $114,218

-Credit Karma – median annual base salary $111,760

-Okta – median annual base salary $110,000</comment>


Why Nokia does not need a "Finnish Steve Jobs" to lead a turnaround - <AUTHOR> http://www.customer-experience-labs.com/2010/07/25/why-nokia-does-not-need-a-finnish-steve-jobs-to-lead-the-turnaround/

<comment><USER2> Somewhat soft article with not too much new ideas but interesting reading afterall.

The main lesson for Nokia should be to ditch the OS and software business. It's easy to realize that they DO have a nice hardware offering, something that people pay -- and go with the Android as they can still charge the same price for the phone.

Latest symbian-based phones are not that stable and snappy anymore (primary reason for people choosing Nokia), and it's very hard to fit into the OS competition landscape with memo as third player.

</comment><comment><USER3> Nokia's problem is that the smartphones lack coherent overall design. They are just a bunch of random features glued together.

What is needed is not a "Steve Jobs" but a guy who can design a smartphone with a good, overall usability experience. And get rid of unneeded features to keep it simple.

It must be one guy with a clear vision, not a bunch of committees and engineer groups trying to make democratic decisions, with the added bonus of financial ppl crippling the product by reducing RAM and CPU etc.</comment>


A 'Do Not Call' Registry for the Web?  - <AUTHOR> http://www.nytimes.com/roomfordebate/2010/12/02/a-do-not-call-registry-for-the-web/tracking-personalizes-the-web

<comment><USER2> Wilson writes in defence of tracking for various reasons but I think misses a glaring one entirely. We are passed the point where the US can pass sweeping laws regarding Internet behavior. There are other comapnies that fall outside the jurisdiction of US law. A law which limits the abilities of companies to innovate would just put them at a disadvantage to their foreign peers.

Now, I'm not saying that the Internet should be a free for all. Rather, potential laws need to account for the low barrier of foreign entities to attract customers in any part of the world they happen to live in. The Internet does not stop at JFK and submit itself to screening by the TSA.

</comment><comment><USER3> Some of the comments are edifying:

 _We're not just talking about knowing my location so my weather is correct. We're talking about cookies that can go find rather personal data about you on your own computer and send it to the retailer or whomever._</comment>


Got a zombie startup? Find out with a marketing kickstart - <AUTHOR> http://www.startmake.com/got-a-zombie-startup-find-out-with-a-marketing-kickstart/

<comment><USER2> lived with, and even killed a few...</comment>


The software engineer's guide to asserting dominance in the workplace - <AUTHOR> https://medium.com/hacker-daily/the-software-engineer-s-guide-to-asserting-office-dominance-ddea7b598df7#.z8p5uubr5 <comment><USER2> >Plug in your own mechanical keyboard with Cherry MX Green or Blue switches. Your typing will now be a constant audible reminder to your teammates that you aren't fucking around.

Whole article was hilarious but this was my favorite line.</comment>


SSA is Functional Programming (1998) [pdf] - <AUTHOR> https://www.cs.princeton.edu/~appel/papers/ssafun.pdf <comment><USER2> (This paper gets rediscovered by HN every so often, there are interesting discussions on past threads)

While Appel is definitely a smart guy (he's been working in the field for a very long time), this is kind of the limit of taking something that was done to be eminently practical reasons and trying to turn it into a theoretical masterpiece. In the time period in which he did it, he did it because SSA was super-popular and he was trying to repopularize functional programming, AFAICT. Note also: The functional guys never proved anything about any of the time bounds/etc below - because that was never their goal.

SSA was created and thought about for a simple reason: To make dataflow problems faster in compilers.

So saying they are doing exactly the same thing is also a bit silly in the sense that one of them is trying to make compilers faster, and don't actually care how they do it - if they could wave a wand, they would have. The other group had very very different goals. They wouldn't have particularly cared if you could make the compilers faster, they were trying to make programming better. (This is a rough generalization, of course).

Zadeck[1] certainly understood SSA was functional, they just didn't really care, it wasn't particularly relevant to interests :)

The analogy also breaks down really heavily once you start to extend SSA.

This is why SSA and other things went in the direction they did afterwards - extensions towards faster/better dataflow.

It's worth understanding a little history (which i am going to do off the top of my head and probably get a few details wrong - sorry. I'm also going to generalize a little bit, because it's hard to summarize an entire field's development in a few paragraphs)

In the 70's, we had a problem. We had discovered and built generalized frameworks for analysis of programs[2]: General bitvector dataflow (which was what was done in the 70's and early eighties) has proven timebounds, and they are not good. It was being worked on by some of the smartest people i've ever had the honor of meeting (Aho, Ullman, Allen, Tarjan, Kennedy, etc).

For general dataflow problems, those timebounds are N^3[3]. You can prove that, the way it was done, if you could solve it faster, you get yourself a faster algorithm for transitive closure/boolean matrix multiplication. That's the point at which practical people tend to go "well shit we're screwed"

Then some of these folks proved that a class of dataflow problems (which included a lot people wanted to do) known as RAPID problems could be solved in linear number of steps. This brought overall time to N^2 for those problems. These are the analysis/optimization you generally saw in compilers for many years until SSA took over. N^2 was somewhat fine because of the state of the kinds of programs being compiled and the limitations people were willing to accept in things like "number of variables allowed per function" at the time.

At this point, the world split, with various people going down the path of trying to find more general frameworks that expand that class of problems, others sticking with rapid problems, and a small number going off and trying ways that looked different from the way current dataflow problems were done.

Zadeck (who created that part of SSA) is arguably in the latter category. His thesis was on partitioned variable approaches, which are basically "instead of one large dataflow graph, make one per variable that can be computed faster"[4].

This is the essence of SSA, and interestingly is not constrained by the bitvector time bound i gave you above (he told me he basically had to argue about this to everyone he ever met because they wouldn't believe it).

Which brings us back around to why SSA exists: To take classes of problems that were constrained by the proven time bounds of bitvector dataflow, making them N^2 overall (or worse), unconstrain them by enabling sparse formulations that could be done in linear time.

That's it.

There were other attempts outside of SSA, that did not involve actual renaming forms, SSA just caught on because it was simple and handled the stuff people wanted to do at the time (IMHO).

SSA can be generalized in a way that does this for other classes of problems too:

[https://homepages.dcc.ufmg.br/~fernando/classes/dcc888/readi...](https://homepages.dcc.ufmg.br/~fernando/classes/dcc888/readingMat/SparseAbstractInterpretation.pdf)

(There are also sparse evaluation graphs, but they are slower and don't generalize as well, as the paper goes into).

In essence: SSA can be shown to be part of a general class of linear time transforms to program representations that make other dataflow analysis/optimization linear time.

In the end, it's relationship to functional programming is coincidental at best, and in practice, somewhat more tenuous than described here.

[1] Full disclosure: He was my officemate at IBM research for a few years.

[2] If you've never read up on Frances Allen, she's amazing and basically created the field of automatic program optimization. As she would tell you, it builds on a lot of pieces of work of others, but ... The papers she wrote are completely approachable and still relevant today.

[3] It is usually referred to by the number of bitvevtor operations in earlier literature, and those are assumed to be constant time because they are for small bitmaps. So it's usually listed as N^2.

[4] He also hated bitvectors because he is dyslexic, and trying to debug strings of 1s and 0s where the position is important was kind of a nightmare.

<comment><USER3> Awesome comment! Quick follow-up question:

"If you've never read up on Frances Allen, she's amazing and basically created the field of automatic program optimization. As she would tell you, it builds on a lot of pieces of work of others, but ... The papers she wrote are completely approachable and still relevant today."

I've never heard of her or maybe just saw Allen on a paper. Which are the must-read works so I can catch up and share them with others?

<comment><USER4> I remember her from the provocative comments in the interview quoted here. She said the C language was horrible for the the field of optimizing compilers:

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

 _By 1960, we had a long list of amazing languages: Lisp, APL, Fortran, COBOL, Algol 60. These are higher-level than C. We have seriously regressed, since C developed. C has destroyed our ability to advance the state of the art in automatic optimization, automatic parallelization, automatic mapping of a high-level language to the machine._

<comment><USER5> To build on top of this. Here is the PL.8 paper, the PL/I variant that IBM used for their RISC research.

"An overview of the PL.8 compiler"

[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.453...](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.453.5277&rep=rep1&type=pdf)

An optimizing compiler that is pretty much LLVM in 1982.

</comment></comment></comment></comment><comment><AUTHOR> I came across the article in another thread [1], and found the idea very interesting that Static Single Assignment (SSA) as an optimization can be viewed as an intermediate language that is functional.

In other words, a language such as Go or Rust that optimizes a program into SSA form _sort of_ turns itself into a functional language in the process, and lessons learned from functional languages can be applied here.

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

</comment><comment><USER6> The Remill [1] machine code to LLVM bitcode binary translator lifts procedural code into an SSA form (LLVM's) and abstracts over the modelled program's memory using small step semantics that also benefits from SSA form. The way it works is that "memory" is just another value, and writes to memory are applied through function calls which return the new value of memory, and reads to memory are calls which accept the current memory value. This document describes it visually [2].

[1] [https://github.com/trailofbits/remill](https://github.com/trailofbits/remill)

[2] [https://github.com/trailofbits/remill/blob/master/docs/LIFE_...](https://github.com/trailofbits/remill/blob/master/docs/LIFE_OF_AN_INSTRUCTION.md#we- must-go-deeper)

</comment><comment><USER4> Has anyone tried to define a subset of Python, JS, C, Go, etc. that is SSA and actually write programs in it?

Is it annoying or natural? I feel like I mostly do it in python but I have no way to machine-check it.

Is the problem that you can't do any aliasing of mutable containers? That is useful for many problems.

<comment><USER7> The issue is mostly the need for phi nodes everywhere for "true" SSA.

Might get away with something like- and I cite Rust here because I know it well, but these features are probably from ML-

> let x = if foo { 1 } else { 2 };

Loops are trickier- maybe you could write them as "unfolds"\- where the loop body is effectively a fn foo(T) -> T, where T is a struct containing all the variables "modified" by the loop. Then evaluate iteratively, starting from the live values on entry. On exit, the live values are the result of the final invocation

<comment><USER4> Yeah now I remember from reading this paper a few weeks ago: An important point is that SSA is not executable!!! The Phi nodes need to be removed I suppose.

I will have to read this paper about Appel to see how that comes into play.

 _SSA form cannot be directly interpreted in order to generate code. Therefore it must be destructed before compilation can continue. This involves using an algorithm that converts phi-functions into appropriately-placed copy instructions._

 _Intermediate representations in imperative compilers: A survey_

[https://scholar.google.com/scholar?cluster=15761365096026414...](https://scholar.google.com/scholar?cluster=15761365096026414559&hl=en&as_sdt=0,5&as_vis=1)

<comment><USER3> Like with parallel DFS, I always look for anything people say is not possible. Here's my first hit on Google with a _super-quick_ skim indicating it runs with phi instructions:

[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74....](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.9046&rep=rep1&type=pdf)

May or may not be what you're looking for. Probably interesting nonetheless.

<comment><USER4> Thanks, that does look interesting. The fact that interpreting SSA requires a paper means it's nontrivial, which lends credence to the original statement :) In the abstract it says they present a variant of SSA. I will take a look.</comment></comment></comment></comment></comment>


Bicycle Built for 2,000 (2009) - <AUTHOR> http://www.bicyclebuiltfortwothousand.com/info.html <comment><USER2> Without Flash: [https://vimeo.com/3571124](https://vimeo.com/3571124)

<comment><USER3> it sounds so creepy

<comment><USER4> If zombies could sing.

Seriously, part of choral performance is you (as a singer) need to constantly adjust your pitch and timing with others to produce harmonious output.

This would be far more interesting if such an effort could be done based on the individual samples by manipulating the audio in real-time.

<comment><USER2> Autotune the samples? Lots of software available to do that, but then you get "Intensive Hair Unit" [https://www.youtube.com/watch?v=8coX8VkUKY8](https://www.youtube.com/watch?v=8coX8VkUKY8)

I think Bicycle creator's intent was more to demonstrate the "Musical Talent of the Crowd" \- the creepiness was a bonus.

<comment><USER5> Autotune should sound less odd if the correction is relatively small.

</comment></comment></comment></comment></comment><comment><USER6> There's something... poignant? about how this sounds so dreary, and is the end result of mturk workers getting paid pennies to record their voices.

</comment><comment><USER7> This brings to mind the work of composer Paul Lansky, who has been playing with voices to similar effect (albeit with a different process) since the 1980s.

Here's a brief description of one piece, "Notjustmoreidlechatter:" [http://acousmata.com/post/104620348/notjustmoreidlechatter](http://acousmata.com/post/104620348/notjustmoreidlechatter)

His work can also be heard on Radiohead's _Kid A_ : [http://paul.mycpanel.princeton.edu/radiohead.ml.html](http://paul.mycpanel.princeton.edu/radiohead.ml.html)

</comment><comment><USER8> Perfect injection of surrealism into my day

<comment><USER9> Thanks for the ear worm, Harry Dacre from 1892!

</comment></comment><comment><USER10> When I visited the US a few years back I brought a recently-purchased recumbent tricycle with me and made a cycling tour of it as well as speaking at the conference I had come for; I had been looking into things like duty tariffs simply to assure myself that it was fine to take with me and bring back without needing to worry about it, and I observed interesting specific items in the list of duty tariffs. First of all, understand that the legal definition of bicycle in Australia is something along the lines of "a primarily human-propelled vehicle with at least two wheels and a seat for each passenger".

One item in the duty tariff list was a bicycle with seven wheels and five seats or something very much like that (it was a few years ago, can't remember precisely). I presume that, for such an item to have got on the list (in 2003, I think it was added) someone had imported an item matching that description.

Still more fun was that when I mentioned it to someone (might have been the bike shop I got the recumbent tricycle, or Greenspeed themselves; can't remember) they fancied they knew the vehicle in question (and wasn't particularly impressed with its efficiency, being fairly shoddily made).

So I was all psyched up for an article about a bicycle built for 2,000, imagining something like the Greenspeed Anura, a delta trike where you can remove the front wheel and hitch it to the back of another Anura—so that you could, if you really wanted to, have an utterly unworkable articulated trike built for 2,000. (I fancy it wouldn't corner very well, but I'd be fascinated to see how it'd work.)

</comment><comment><USER11> If you have never watched Aaron Koblin's TED[0] talk about visualizing humanity with crowdsourced data I cannot recommend it enough.

[0] [https://www.ted.com/talks/aaron_koblin](https://www.ted.com/talks/aaron_koblin)

</comment><comment><USER12> Interesting how many people went flat.

</comment><comment><USER13> Only the voices should be different; why are the background instruments also out of sync?

<comment><USER14> Nobody was singing the whole song, only individual, isolated notes (both for regular instruments and the phoneme synthesizer) went through the mturkers, in homage (machinage?) to how the original was programmed.

Personally, I would have preferred a version that kept the "voice" from the original and only replaced the non-voice instruments.

</comment></comment><comment><USER15> It's 2113 and all those voices are now dead</comment>


Arkansas carries out first double execution in the US for 16 years - <AUTHOR> https://www.theguardian.com/us-news/2017/apr/24/arkansas-double-executions-supreme-court-jack-jones-marcel-williams <comment><AUTHOR> "The Republican governor of Arkansas, Asa Hutchinson, decided to buck this downward trend by announcing that he would schedule eight killings in 11 days, in order to use up a batch of the sedative medazolam that was expiring at the end of this month. Had all the executions taken place, it would have been the largest mass execution in the US for more than 50 years."</comment>


Ask HN: I use and love Python. What's the best book to learn C ? - <AUTHOR> So it's 2010. I know enough C to be able to read and  patch small apps where I find bugs, but I'd like to sit down and properly learn the language, in a way that encourages neat, usable code for my colleagues, that meets whatever the current standards are for C and covers modern topics like threading. I'm planning on using this to develop Python modules or hack on small Unix tools.
I've previously read K and R and found it understandable but a little boring. I really like the Head First series (but alas they have no C book) or anything with lots of examples.
What's the best introduction to C book you'd recommend?
Edit: Thankyou to everyone who's responded. <comment><USER2> K&R is still the best book on C. Short, simple and accurate.

C++, on the other hand, is a moving target. Difficult to know what to recommend, apart from suggesting you get something modern which concentrates on using the STL, and perhaps Boost.

</comment><comment><USER3> C Interfaces and Implementations by Hanson. It'll give you back most of the things you depend on in Python, like variable length strings and dictionaries.

I'm teaching a 4-month weekend C class for Ruby programmers starting in April, and my syllabus is pretty much built around CII.

<comment><USER4> That sounds awesome. I wish I was on the right side of the pond.

Have you thought of putting some material online, or even taping the course? (of course, maybe you don't want to do that for the first iteration)

<comment><USER3> No, I'm actually pretty skittish about publishing things these days; it's all risk and no reward. I've been writing C since '94 and I guarantee you there's some douchebag who will build an entire website about how little I know about C once the courseware hits Reddit. Pass.

The structure I'm chasing is:

* C Interfaces and Implementations.

* Every month, a couple hours worth of casual exercises, spread over 2 weeks, along with background material and basic courseware (cheat sheets, notes on the book, etc).

* "Tech support" style assistance for those exercises (ie, send me your code and I'll tell you what's wrong).

* Once a month, several hours of lab-style class time. Each class presumes you did the exercises and, if you had trouble, that you chatted me up about them and we got through it. Each class is 2-3 small coding projects. All are security-focused, because that's why we're doing the class; so, for instance, in week 1 we'll probably write an XML fuzzer and a password cracker.

* If you came to class prepared, I'm buying unlimited drinks and pork product at The Publican afterwards.

I'm planning on the following arc for the class:

* Month 1: Basics (Compiling/running, hello-world, malloc and free, the C type system, very basic pointers, using libraries).

* Month 2: Network programming (Stevens-style socket programming, binary formats, I/O).

* Month 3: Design (Library design, voidstar, function pointers, dlopen, object-oriented C).

* Month 4: Secure programming in C (mostly, memory corruption and string handling).

I guess I'm writing all this here not so much to sell a class that I'm not offering publicly so much as to advocate for the idea of doing things like this at your own company, and to solicit critiques. I've spent a long time giving lip service to training and growing a team, and giving up a couple weekends and plying team members with high-end whiskey seemed like a way of putting my money where my mouth was. (Also, this is the next thing Erin wanted me to teach her. So I'm pretty motivated.)

(If you ping me offline, I'm happy to share stuff privately).

</comment></comment></comment><comment><USER5> I'd suggest you start dissecting small programs written in C. Those UNIX tools you were talking about? Grab some UNIX tools, see how they work. Dissect cat, grep, etc. It's the best way to learn.

<comment><USER6> i don't know that I'd start or even look at grep ;)

<comment><USER5> It sure ain't pretty, but it does teach you C. The source code is fairly well documented and does some complex stuff.

<comment><USER7> Grep is actually a really good example.

First program your own version of it, then look at the guts of grep and be amazed at how elegant that solution to the problem is.

And if you come up with the same solution without peeking you will probably be able to name your own price at some point.

</comment></comment></comment></comment><comment><USER8> <http://www.c-faq.com/resources/books.html>

Take a look at the Amazon reviews of some of these, you'll probably find something to your liking.

K&R is an important book to have on your bookshelf but the idea that it's the only or best book to learn C from is absurd.

Another thing to do is scan the C FAQ and some of the online C tutorials just to get a feel for the language and where it fits in the language universe and to understand why a 'modern topic like threading' is not strictly a C topic. The C coding standard documents of various projects and organizations are also useful to give you an idea of what peoples' notions of sensible C look like - they can be surprisingly varied.

Lastly, review known good code in the field you're interested in - in your case, this might be Python extensions. There aren't a lot of terribly good reasons to use C to 'hack on small Unix tools'. Your best path to learning the language is writing things that you actually need and where C is a good (or only) choice.

</comment><comment><USER9> I highly recommend _C: A Reference Manual_ by Harbinson and Steele. It has many tiny examples, but it is mainly used as a reference manual (as the title suggests).

[http://www.amazon.com/Reference-Manual-Samuel-P- Harbison/dp/...](http://www.amazon.com/Reference-Manual-Samuel-P- Harbison/dp/013089592X)

A good book for learning C is _Mastering Algorithms with C_ by Loudon. The source code is over-commented and contains too much white space, which is a bit annoying, but the content is quite nice.

[http://www.amazon.com/Mastering-Algorithms-C-Kyle- Loudon/dp/...](http://www.amazon.com/Mastering-Algorithms-C-Kyle- Loudon/dp/1565924533)

</comment><comment><USER10> Slightly off-topic, but in case you haven't checked out Cython (www.cython.org) before, please do! It allows you to write Python code which is _translated_ into C code that uses the CPython API. This includes classes, list comprehensions, generator expressions... practically all Python code is valid Cython code.

I'm honestly never going back to writing C again. Cython gives me all the expressiveness of Python combined with all the performance and close-to-the- metal-godlike-powers of C. I've been using it to implement high-performance graph traversal and routing algorithms and to interface with C/C++ libraries, and it's been an absolute amazing productivity boost.

However, all of this comes with one caveat: you really need to have a good knowledge of C to understand Cython and what it's doing. It merely saves you from the tedium of hand-coding against the CPython API and all of the boilerplate code that's needed to get much of anything done in C.

</comment><comment><USER11> First, K&R. Second , C interfaces and Implementations by David Hanson.

</comment><comment><USER12> I might get downvoted for this, but I'd recommend going with C++ before you get into C. You don't have to learn all of the crazy stuff like template metaprogramming, but C++ does have some tools to make C-like programming easier. Personally, I'd use C++ _just_ for the string and vector classes.

If you do want to go the C++ route, I hear good things about this book: [http://www.amazon.com/Accelerated-Practical-Programming- Exam...](http://www.amazon.com/Accelerated-Practical-Programming-Example- Depth/dp/020170353X)

Now that I think about it though, if you're still deadset on using C, the Python source code is actually a pretty easy read. You get two benefits for the price of one: you learn C and you get to learn more about the internals of Python. Look here: <http://svn.python.org/view/python/trunk/>

<comment><USER3> Strong disagree for a bunch of reasons.

First, there's no style of C++ I've seen in the field that totally eliminates any of the C-isms. Modern C++ code still has pointer math and it still has function pointers. In other words, you still have to learn the trickiest stuff from C.

Second, while <vector> is great, it's not a good idea to think about it as a black box. The whole food chain of STL containers from list to dequeue presumes that you understand the tradeoffs in actually implementing data structures in memory. How do you select and use these things intelligently if you've never even implemented a linked list? You're basically just writing a very verbose and very error prone form of Java.

Finally, C++ just isn't a very good language. There is _nothing_ you can do in C++ that you can't deal with in C. There is a clear difference between the outcomes of, say, Perl and Python --- Python code is clearer and more maintainable. There are clear differences between Java outcomes and Rails outcomes --- the Rails code is tighter, smaller, simpler (though perhaps less featureful). Compare giant C and C++ codebases. What's the C++ win?

C vs. C++ is a can of worms. I know. But I've spent quality time in both languages and I'm an unabashed fan of C. I think the 2010 answer to the problem C++ wants to solve is "C and a high-level language". The future belongs to things like Lua (or Python with a better FFI, or...). C++ is a dead end.

<comment><USER13> This is a great comment but I have to disagree with your conclusion.

I love both C and C++, although I don't use them currently. And I can't imagine using them in the future.

The issue here: is there a language that is both low-level enough to write hardware drivers yet high-level enough to abstract away anything that I might want? Close-enough to the metal to bit flip with the best of them yet powerful enough to create and organize large hunks of code?

I think the answer is pretty clearly C++. C is a very close second, but the entire reason from evolving from C to C++ was large development situations.

Would I write a new web-app in C++? Heck no. But software development is a lot bigger than the little corner of the world I have my fingers in, and I can easily see where C++ will be around 20 years from now -- and for new development, not just maintenance. Perhaps even 50 years. So no, not a dead end by any means.

<comment><USER3> I use C pretty regularly and I can see why I'd need to keep doing so. If I have a problem that needs a custom data structure and any degree of performance, C is how I can keep from wrestling with metadata bloat and garbage collection.

The problems I tend to solve with C are tightly scoped. They tend to admit to libraries, where I can get a foo_t from foo_open(), and then pass it to the foo_bar() functions. They're inherently encapsulated and reusable.

There are things from C++ that I tend to want when I'm writing C. Most importantly, I want vector, and I want a lookup table that returns results in sorted order. So, I backported those things from STLPort to C and never looked back.

There are also things C++ offers me that I think are bad medicine. Classes with access control (and thus graphs of "friend" relationships): not a win over ADT-style C libraries. Smart pointers: not a win over pool allocators (also: knowing how to write a dirt simple allocator is one of _the single biggest_ performance wins I've seen in my career, and C++ makes that hard). Templates: not a win over clear, simple code and discrete components.

My experience with C++ is that it creates drag. There are more decision points in C++ than in C. Do I write a class or do I abstract into a template? Do I need a special type or is this just a container of primitive types? Do I decompose into a hierarchy or do I write straight-line code? Do I use a functor or do I use abstract classes? C is a get-things-done language. C++ is a talk-about-getting-things-done language. And then code-about-getting-things- done.

It's OK to downvote me.

<comment><USER13> You've made some awesome points, and I don't disagree that C++ has gotten to the place where you're juggling a freaking lot of stuff around. In straight C you start at point A and code until you reach point B. In C++ if you're not careful you create a map of the known world in Portuguese and then start defining what the word "is" means.

I think back on my C++ production code -- heavy-duty COM stuff, device drivers, embedded software -- and I'd still stick with C++. The trick is that I wouldn't pull in every feature from all over the place.

Modern languages -- especially those that have been around for a long time -- have a lot of cruft. Do you need templates on every project? Most likely not. Do you need the STL? Maybe bits of it but not all by any means. Do you need a freaking class graph with 50 nodes to start sorting integers? No, but bad programmers will make one.

One of the reasons I love C++ is that _it makes you understand how to differentiate the bullshit from the solution_. This is the flip-side of the exact point you made about having so many options. Got a problem with allocation? Roll an allocator. C++ is the nuclear bomb of power tools, and there are a million ways to cut your arm off.

But for small utilities where you don't touch the metal or interact with some larger, more complex system? C++ isn't the tool.

I completely agree that C++ has some really bad/ouch-don't-do-that things in there. I just think that overall the pluses outweigh the minuses for a certain small set of problems. (and coders)

<comment><USER3> You see C++ as a nuclear weapon. I see it as that automatic hammer Homer Simpson made after he visited the Edison museum.

<comment><USER13> Keeping the topic to "should I learn C++" and "will there be a C++ in the future"

Want to program the iPhone? Learn Objective-C, a bastardized C++ language

Want to build some shit-hot hardware for NASA or the Defense Department? Pick up VxWorks and WindRiver -- and welcome to C++

Want to write your own O/S kernal? Hell if I'd do it in C. C++ gives me nice namespaces and modules and an easier way of organizing things.

So yes, C++ is going to be around for a long, long time. And the concepts you learn in C++ -- assuming you can become a good C++ programmer -- are going to make you a much more proficient programmer in any of the "better" languages.

But fair warning: if you dabble? Yes, you'll be Homer Simpson.

<comment><USER3> No idea why you got downmodded --- perhaps for the crack about OS kernels, though. Every mainstream OS kernel is C.

<comment><USER13> Beats me. I didn't say the existing kernels were C++. I said if I wanted to write a new one it would be in C++. I certainly know the existing kernels are C++. Some of the kernel code for popular Operating Systems -- in production now -- goes back 30 or 40 years.

If I'm not mistaken, the Windows kernel has evolved quite a bit to C++. Even the core C files are compiled using the C++ switches. Not sure, but not relevant to my point either.

Hope this discussion helps the poster, which is the goal here. Like I said, you made some great points, and I agree with quite a bit of what you wrote. But understanding the exceptions and edge cases are important, even if the guy doesn't choose C++.

<comment><USER7> The reason why you probably would want to write your kernel in C over C++ is that C++ does more 'under the hood' and when you're writing an OS you want to have your code as transparent as it can possibly get. Any side effects that are not explicitly mentioned in the code will get you burned at some point.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER14> not for learning, but as a reference to keep on your desk when programming in c - harbison + steele <http://www.careferencemanual.com/>

this is also worth reading once you've got the basics down - [http://www.amazon.com/Expert-Programming-Peter-van- Linden/dp...](http://www.amazon.com/Expert-Programming-Peter-van- Linden/dp/0131774298)

<comment><USER15> I second the recommendation of van der Linden's book. It was through that book, along with lots of programming and experimentation, of course, that I finally understood C.

</comment></comment><comment><USER16> A number of people have recommended David R. Hanson's _C Interfaces and Impementations_ , so I'll mention his _A Retargetable C Compiler: Design and Implementation_. I own this book though I haven't read it, but it's about writing a C compiler in C. You should pretty much just go out and buy these two books because they'll eventually go out of print, and then you'll be screwed. _CII_ used to be out of print and impossible to obtain until Addison- Wesley started printing it again a year ago.

<comment><USER3> You should read it! It's fantastically written, and goes from a hand-written C lexer all the way to x86 code generation. Hanson's books are written in literate code style, and it's a shame that that style went out of fashion, because it is _the answer_ to how to write code-heavy books.

</comment></comment><comment><USER17> From my C days, I second and third Harbison & Steele. I learned from K&R, but I learned better from H&S.

From this list (can't say how current they are),

<http://www.c-faq.com/resources/sd19.html>

I liked:

      - K&R and H&S (if you have to choose, H&S)
      - The Standard C Library, P.J.Plauger.
      - C Traps and Pitfalls, Andrew Koenig.

</comment><comment><USER18> I found "The Complete C Reference" by Herbert Schildt to be quite good. Most of the language is covered in about 250 pages followed by standard library function, algorthims and data structures and ends in a good project "The Little C Interpreter". Its about 800 pages but then its a reference so you don't need to read it in one go :-)

<comment><USER3> comp.lang.c hated Schildt so much they made a FAQ entry for him (though I admit I've never read one of his books).

</comment></comment><comment><USER19> Try this:

<http://www.eskimo.com/~scs/cclass/cclass.html>

Once you can stand on your C legs, you should read the C-FAQ, here:

<http://www.c-faq.com/>

and get a copy of the C99 standard. It's supposed to be here:

<http://www.dkuug.dk/JTC1/SC22/WG14/>

but the site was unavailble when I tried to check it before writing this comment.

Various C-related stuff that is good to read:

<http://www.lysator.liu.se/c/duffs-device.html>

<http://www.lysator.liu.se/c/ten-commandments.html>

<http://www.lysator.liu.se/c/pikestyle.html>

Take this with a pinch of salt:

<http://www.seebs.net/faqs/c-iaq.html>

<comment><USER20> K&R, the definitive reference and Expert C Programming:Deep C Secrets by Peter van der Linden

Because the best way to understand a language (and its ups and downs) is from someone who understands that language's compiler.

</comment></comment><comment><USER21> After K&R, I highly recommend Peter van der Linden's Expert C Programming ([http://www.amazon.com/Expert-Programming-Peter-van- Linden/dp...](http://www.amazon.com/Expert-Programming-Peter-van- Linden/dp/0131774298)). It's fun to read (yes, really), and you'll understand the language better for it. C is fairly quirky, and this book helps navigate those quirks.

For example, I bet most people who claim to "know" C can neither explain the difference between arrays and pointers, nor clarify where they cannot be used interchangeably. I was lucky to have read that book early on in my days of C, so I actually know the answer.

</comment><comment><USER22> This post only contains non-aff links

While I'm certainly good at C, and have been the guy people asked the C and C toolchain questions at a couple places I've worked, I'd say you're in for more than 1 book to grok the topics you've expressed interest in, and haven't met the single book that does all you want.

1: If you're a python programmer, I do suggest staying with pure C and AWAY from C++. You have little use case for it if you can mix python and C and it is literally pain incarnate while you do not know every little bit of it and/or work with people who do not know every little bit of it.

2: Secondly, a single book on C will not get you where you're going. You will need several.

3: I'd stick with K&R for reference, but then go to the following two books for threading and all the other stuff like networking:

You need these two books to get down C and it's ecosystem (make, autotools, etc): Advanced Unix Programming by Rochkind (Really good explanation of signals especially): [http://www.amazon.com/Advanced-UNIX-Programming-Marc- Rochkin...](http://www.amazon.com/Advanced-UNIX-Programming-Marc- Rochkind/dp/0131411543/ref=sr_1_1?ie=UTF8&s=books&qid=1269362485&sr=8-1)

Gnu/Linux Application Programming by M. Tim Jones (Recovers some of the same stuff as AUP, but does better with the toolchain): [http://www.amazon.com/GNU- Linux-Application-Programming/dp/1...](http://www.amazon.com/GNU-Linux- Application- Programming/dp/1584505680/ref=sr_1_1?ie=UTF8&s=books&qid=1269362580&sr=8-1)

If you want to go more advanced, this is likely the correct book: Advanced Programming in the Unix Environment: [http://www.amazon.com/Advanced- Programming-UNIX-Environment-...](http://www.amazon.com/Advanced-Programming- UNIX- Environment-2nd/dp/0201433079/ref=sr_1_2?ie=UTF8&s=books&qid=1269362485&sr=8-2)

Although if you're diving deep into networking, this is likely the correct book: Unix Networking Programming: Vol I by Stevens:

[http://www.amazon.com/Unix-Network-Programming-Sockets- Netwo...](http://www.amazon.com/Unix-Network-Programming-Sockets- Networking/dp/0131411551/ref=sr_1_1?ie=UTF8&s=books&qid=1269362819&sr=1-1)

</comment><comment><USER23> I will second the vote for Mastering Algorithms in C. This book will bring you right into the details you want: [http://www.amazon.com/Mastering-Algorithms- C-Kyle-Loudon/dp/...](http://www.amazon.com/Mastering-Algorithms-C-Kyle- Loudon/dp/1565924533)

Accelerated C++ was also mentioned and I just love this book. It brought me back to C++ after years of being away: <http://www.acceleratedcpp.com/>

</comment><comment><USER24> Pointers on C helped me really understand pointers like no other book was able to do.

[http://www.amazon.com/Pointers-C-Kenneth- Reek/dp/0673999866/...](http://www.amazon.com/Pointers-C-Kenneth- Reek/dp/0673999866/ref=sr_1_1?ie=UTF8&s=books&qid=1269356298&sr=8-1)

</comment><comment><USER25> If you really want to do Python modules, I can understand.

In terms of hacking small Unix tools, have you considered other options like perl, bash, combo's of unix commands, etc.? I suggest that those options could be a lot more productive for your time investment than C. IMHO. Hope this helps.

<comment><AUTHOR> The only time I'd bust out C is when there's no Python API (meaning there's probably no Perl API either). I generally avoid shell scripting these days as I find text processing a fragile way to build something useful.</comment></comment>


The Microsoft team tracking the world's most dangerous hackers - <AUTHOR> https://www.technologyreview.com/s/614646/inside-the-microsoft-team-tracking-the-worlds-most-dangerous-hackers/ <comment><USER2> The article concludes:

 _The new normal is that industry cyberintelligence shops tend to lead the way in this type of public security activity while government follows._

 _In 2016, it was CrowdStrike that first investigated and pointed the finger at Russian activity aiming to interfere with the American election._

Does anyone else worry about the incentive mechanisms with this trend? When a client like the DNC hires a security firm, they are looking for answers. But answers are not always available in cyber attribution; often the best conclusion analysis can produce is an educated guess with some probability. There is rarely certainty. And yet, the clients expect the companies to assign blame to _someone_. If they can't do that, why would anyone hire them?

I'm worried when the public puts as much trust in a private company like Crowdstrike as it does in its intelligence or law enforcement agencies. Are these companies not incentivized to exaggerate their degree of certainty? Or to pick the "right" boogeyman?

<comment><USER3> Wouldn't that be the same inside any given intelligence organization, policing organization, etc?

People demanding answers of people who may not have them is part of the human condition.

Internal or external organizations all seem to encounter such problems.</comment></comment>