A git Primer - <AUTHOR> http://danielmiessler.com/study/git/

<comment><USER2> The primer says "The git branch command lets you create a new branch of your project. It creates a new commit with a new pointer label pointing at it." which is not correct. When a new branch is created it just creates a new pointer to the commit which one branches off from, there is no new commit made automatically.

<comment><USER3> The best description of git branch that I've heard so far is: "git branch is File -> Save As for your current branch"

<comment><USER4> That's a pretty good analogy, although you need to remember that a plain git branch is like a File -> Save As that doesn't keep the new name of subsequent File -> Save's

<comment><USER2> One need to be careful while using an analogy. Though at the outset it looks like it explains the branching behavior of 'git' it ain't so. Say I have opened a File and do a File->Save as on a directory mounted from an external storage (say mounted via NFS ). In such a case the file contents need to copied to that storage and there are two copies of the same content. But with 'git' branching that is not the case at all. When you create a branch you just create a new reference to a commit and you start from there, nothing more than that.

</comment></comment></comment></comment><comment><USER5> Maybe you have don this for brevity, but git branch does not create a new commit.

"The command's second form creates a new branch head named <branchname> which points to the current HEAD, or <start-point> if given."

So after a git branch command, the test branch still points to the same commit as HEAD.

You have to make an additional commit for them to diverge.

</comment><comment><USER6> If you know someone looking to get up to speed on Git, I highly recommend Git Immersion: <http://gitimmersion.com/>

<comment><USER4> Thanks! That looks like a really helpful working introduction to git. I'll probably start recommending it to git newbies.

</comment></comment><comment><USER7> I've had to get quite a few people up to speed on Git. What I've found is that for most CS-oriented people, beating around the bush is really just getting in their way. If you create the correct mental model for them, much of git becomes self evident. This isn't easy and takes a couple of days of intermitent whiteboarding but everything 'clicks' soon enough.

Big things:

Explaining that the object name (d56abc..) is really a SHA1 hash of all the contents. Git then uses this name to uniquely identify Git Objects.

Git Objects consist of: blob (file), tree (directory), commit (pointer), tag (well.. its a tag..). When you do a "git checkout" you interact with commit objects. When you do a "git ls-tree master ." you are looking at a tree object.

Branching is done by putting the following in .git/refs/heads/branch_name: d56abc..

And a branch will always just point to a commit object.

Finally, the working directory is of very little concern to git. It has handy functions to drop some of its stuff there for you and it can tell you some differences between its HEAD and your files, but really Git begins at the Index.

\+ Lots of little things.

Edit: It is always fun to do a quick 'echo "dbc123.." >> .git/refs/heads/new_branch' and show someone that that is all it takes. It really quickly shows how not-scary git is. There is a ton of complex technology that enables its awesomeness but it is a relatively simple system.

</comment><comment><USER8> The first section shows "git diff" as the command but shows output from "git status" below it with the only mention of "git status" in the entire post buried at the very bottom.

<comment><AUTHOR> Fixed, thanks.

</comment></comment><comment><USER9> _git status is very helpful in understanding the git because it shows you the differences between the working directory, index, and previous commi, index, and previous committ._

The first commit is missing it's 't', which it looks like the second one stole.

EDIT: Actually, you just have a copy-paste error.

</comment><comment><USER10> Thanks for this. I was beginning to think git was for gits only.. this and also the quote from Linus corrects my assumptions..

</comment><comment><USER11> Phew. Thought this was going to be another explanation of the movie Primer using git.

</comment><comment><USER12> Cool. I've been looking for a more visual git introduction.

<comment><USER4> You might be interested in A "Visual Git Guide" as well.

<http://marklodato.github.com/visual-git-guide/index-en.html>

</comment></comment><comment><USER13> This is a pretty good guide, but it's marred by one major error:

"the index is your staging area where things go after using git add before they get committed."

That's not right. The index is where things go after MAKING EDITS IN THE WORKING DIRECTORY before they get committed. (What does "after using git" even mean?)

<comment><USER14> I think you read that `add' as an `and'.

It's "after using `git add', before they get committed", which is correct, the `git add' command adds a file to the index.

<comment><USER13> Oh. Right. Duh.</comment></comment></comment>


Skills to Teach Students in the First Five Days of School - <AUTHOR> http://blogs.kqed.org/mindshift/2014/08/four-skills-to-teach-students-in-the-first-five-days-of-school-alan-november/ <comment><USER2> The schedule is too optimistic. I'd be happy to be able to teach that in a semester. As almost all the skills, these require practice and feedback. You can't teach to use a search engine and the bias and problems in a week.</comment>


Exploiting Coroutines to Attack the "Killer Nanoseconds" [pdf] - <AUTHOR> http://www.vldb.org/pvldb/vol11/p1702-jonathan.pdf <comment><USER2> This title was confusing, the terms "exploiting" and "attack" made me expect another Hyperthreading-related security exploit (though the paper is actually a performance optimization)

</comment><comment><USER3> Gor Nishanov, one of the authors, talks about this in his CppCon2018 talk [https://youtu.be/j9tlJAqMV7U](https://youtu.be/j9tlJAqMV7U) (jump to ~12:33 to skip background).

It amounts to using CPU prefetch instructions with C++ coroutines to simulate hyperthreading in software by scheduling instructions around cache misses (but is potentially better than hyperthreads because it's not limited to 2/core)

<comment><USER4> I haven't read the article or video. But regarding prefetching triggerd by software (programmer) instead of by the hw, this is a very informative read, with a lot of numbers and tests/profiles:

      https://lwn.net/Articles/444336/

      https://lwn.net/Articles/444346/

<comment><USER5> Your links show with benchmarks that software prefetching is not always useful, the example being a for loop to traverse a linked list in the Linux kernel.

However, the article at hand shows with benchmarks that software prefetching can be very beneficial in common algorithms such as hash probe, binary search, Masstree and Bw-tree, even when concurrency is implemented in a straight- forward way using (stackless) coroutines.

<comment><USER4> The links are not only about a loop. The general conclusion is that making better informed decisions about whether to prefecth or not is very hard and that the CPU will have most of the time way more information to make a good informed decision. It also says that unless you proove by benchmarks that it makes sense, it is probably wrong.

Now. This is of course a general case. If you control the whole algo and data structures during the execution, a well crafted prefectch /can/ be beneficial. Again, the general idea of the links I posted is that /generally/ the CPU has more info of the /overall/ system state to make a correct prefetching choice. I think that info/links are usefull/interesting even if they do not apply to the specific case in TFA.

Clarifying a bit more: I didn't post that to contradict the article but just to provide a bit of related info.

</comment></comment></comment></comment><comment><USER6> Does anyone know about earlier work similar to "asynchronous memory access chaining"? Sounds like there must have been stuff done in eg. VLIW static scheduling. And in compilers for highly memory-parallel architectures like Tera MTA. And in GPU compilers.

I have a recollection that some static scheduling compilers could run

</comment><comment> brian-armstrong This is a very cool idea, and I wonder if eventually we'll see new tooling spring up to support this.

Running coroutines like this seems like it would potentially create more cache pressure. Is the idea that you'll execute instructions you already have loaded, so you won't incur any cache misses for instructions?

<comment><USER7> It is more about memory pressure than instruction pressure - the idea is that when an algorithm finds itself having to fetch something from memory, it can issue a prefetch, then take a step back and handle other requests while waiting for the result.

How this would fare in a real world scenario that isn't a benchmark but in a system that is also doing other stuff at the same time is anyones guess though.

<comment><USER5> Their benchmark is close to what a relational database does in the real world. They also cite previous work "Interleaving with Coroutines: A Practical Approach for Robust Index Joins", which implements this succesfully in the SAP HANA column store.

I don't think it matters what else the system is doing as long as a complete core is available for running this.

</comment></comment></comment><comment><USER5> Cheap-enough coroutines seem to be new in C++ but what about other languages such as Go, Rust, Haskell?

<comment><USER8> Go has channels which are much more like fibers. Full threads of their own with actual stacks (which can be moved in Go).

If C++ or Rust ever get coroutines they will be more low-level. Just a control flow construct which compiles coroutines down to state machines. So it's concurrency, not parallelism. High performance for one thread, but less powerful conceptually.

Rust used to have segmented stacks, but they removed it because performance was unpredictable.

<comment><USER5> Rust seems to have stackless coroutines as an experimental language feature: [https://doc.rust-lang.org/nightly/unstable-book/language- fea...](https://doc.rust-lang.org/nightly/unstable-book/language- features/generators.html)

</comment></comment></comment><comment><USER9> The Intel IXP Microengine (Now Netronome?) architecture supported this explicitly. You could schedule a memory read explicitly, do other things, then come back. Each core was also 8-way multi-threaded, and you could yield explicitly to the next thread.

</comment><comment><USER10> This could also be described as hyperthreading in software</comment>


Sex domain gets official approval - <AUTHOR> http://news.bbc.co.uk/1/hi/technology/10412765.stm

<comment><USER2> The thing that concerns me about this tld is the potential for more puritanical groups to attempt to push any and all "adult" content onto it, then legislate access restrictions. It has the potential to be a vector against network neutrality.

I hope this is really about convenience and not backroom censorship.

<comment><USER3> I had the same fear as you, but lets be real - if they wanted to outlaw porn, they don't have to put in on a special domain first, they could just outlaw it.

On the other hand, this allows schools and companies to much easier block porn. It also gives parents a real choice in what to allow their kids to access (personally I don't mind my future kids look at porn, but I would like the opertunity to block it anyway as it would be a good motivation for them to learn some computer skills).

<comment><USER4> _if they wanted to outlaw porn, they don't have to put in on a special domain first, they could just outlaw it_

Yes, but having it moved to a TLD that can more easily be filtered makes that transition that much easier. I think the real push will be to legislate that all adult content be moved to the XXX domain... at least in the US.

</comment></comment></comment><comment><USER5> Seems to me that this decision just transfers $$$ into the hands of the TLD operator. Porn website operators will now want to buy example.xxx as well as example.com and example.net and so forth. Non-porn operators may want to buy anotherexample.xxx to protect their anotherexample.com name.

<comment><AUTHOR> Yup. The more TLDs there are, the more you have to buy. Perhaps that it the silly thing about domain names. The meat of the domain is the domainname not the tld;. When I have explained to non-techies why they should buy the yourname.org yourname.com etc. they find it complicated.

Perhaps I should be able to just buy yourname and all the tlds associated with it.</comment></comment>


What do dynamic linking and communism have in common? - <AUTHOR> http://blogs.sun.com/rvs/entry/what_does_dynamic_linking_and <comment><USER2> OK, the analogy is dumb, but the point stands on its own. Dynamic linking has been around for so long that it's a sort of dogma, never questioned. Of course you do dynamic linking!

Just step back and consider all the problems dynamic linking has caused us (DLL hell, package management headaches, C library incompatibilities, various ABI issues) and the sheer complexity of the systems invented to solve those problems (Side-by-Side assemblies; InstallShield, Windows Installer, and umpteen other install frameworks for Windows; LD_LIBRARY_PATH, ldconfig; APT, RPM, and umpteen other Linux package managers).

<comment><USER3> Yes the analogy is dumb. Also unregulated capitalism is just as bad as pure communism. Just as that one eastern country with a communist government had to loosen it's economy, that one western country (which is doing better than that one eastern country) had to restrict some of it's capitalism.

<comment><USER4> I used to think that too, but the data seems to show that more economic freedom (unregulated capitalism) the better off the people are (per capita GDP, etc)

[http://commons.wikimedia.org/wiki/File:GM_- _Countries_by_Eco...](http://commons.wikimedia.org/wiki/File:GM_- _Countries_by_Economic_Freedom_Index.png)

[http://images.absoluteastronomy.com/images/encyclopediaimage...](http://images.absoluteastronomy.com/images/encyclopediaimages/e/ec/economic_freedom_charts.png)

If unregulated capitalism was just as bad as communism you'd expect this chart to have a bell curve type shape, rather than it's upward curve: [http://www.investmentu.com/wp- content/uploads/2008/02/200601...](http://www.investmentu.com/wp- content/uploads/2008/02/20060123iub.gif)

You can explore the relative economic freedoms of each country here: notice that the US is only the #6 free-est economy in the world): <http://www.heritage.org/Index/Ranking.aspx>

<comment><USER3> What about the days when we let monopolies roam free??? Perhaps the data only indicates that the equilibrium is shifted a little more towards the capitalism side?

I don't understand how your second link argues that less gov control means higher standards.

I think what we see in the world right now is that there are many more 3rd world countries with ineffective governments and less economic freedom than there are countries who are doing well enough to have an economy to _not regulate._ So in other words it's much harder for a country to go from poor, low economic freedom to prosperous than it is for a country that already has a strong unregulated economy to adopt some regulation and go to prosperous.

[http://www.investmentu.com/wp- content/uploads/2008/02/200601...](http://www.investmentu.com/wp- content/uploads/2008/02/20060123iub.gif) The graph there probably doesn't exhibit a bell curve because as soon as a country leads too far right towards pure economic freedom, it jumps back really fast. And I think enough time has passed that all the most developed countries have hit that mark and popped back left a little.

Also I think you should consider the size of countries like Hong Kong and Singapore, since different principles probably govern economies of different sizes.

Can you name me one 1st world country without economic regulations? I think this is evidence enough that there must be some slope leading down to the state of America in the early 90s, even if that slope is almost vertical.

<comment><USER4> > I don't understand how your second link argues that less gov control means > higher standards.

It's missing it's legend unfortunately. Red means economically unfree and green means economically free.

> as soon as a country leads too far right towards pure economic freedom, it > jumps back really fast.

I'm not aware of Hong Kong or Singapore (as the 2 leaders of economic freedom) historically jumping sharply away from economic freedom. The UK and the US slowly moved away from it in the early to mid 20th century, then moved back towards it since the 1980s.

Also don't confuse "the right" with economic freedom. Some of the right tends to support economic freedom to a degree these days, but that hasn't always been the case.

> Can you name me one 1st world country without economic regulations?

There's no countries anywhere without economic regulations, but with the data available it appears that the less economic regulations the better the outcome for people in that society.

<comment><USER3> It does not have to be a sharp jump, and as I pointed out previously, the jump from pure capitalism to ideal economy (equilibrium) may not even be a large one at all.

When I said right and left, I meant literally the right and left of that chart.

My point was that both pure capitalism and pure communism dont't work, and that a balance must be struck between the two. The graph may not resemble a bell curve, but I'm sayig that it should. I explained previous why current data may not show a bell curve and it's that the data set is too small. The fact that trends show That more economic freedom leads to better life simply means that more countries are on the right side of the economic spectrum (more regulation) moving left than there are left moving right, and I explained the possible cause to this too (remember a country had to be more developed in order to even have an economy worth regulating, so more developed countries were closer to the perfect balance already). I'd also like to add that if equilibrium is indeed closer to the capitalism side, it too would explain why the data shows more economic freedom=better life. And this is because given equal distribution across the spectrum among countries, you would see more moving left to right if equilibrium is towards the right. But I already suggested that less developed countries tend to be less economically free, which means more of those countries start on the left in our current times. Now i'm not saying that civilizations start out with regulations and moves towards the right, simply that current data shows less developed countries with less economic freedom (according to your data, if true). As for civilizations I believe the position on the continuum oscillates left to right as the civilization advances until it settles towards equilibrium.

In the end you cannot claim the data shows an unregulated economy to be better than a completely regulated one. They both suck. :) Thanks, Chris

<comment><USER4> Where's your example though of an unregulated economy sucking? You haven't given one, and all the examples we have show that the less regulation the better.

</comment></comment></comment></comment></comment></comment></comment><comment><USER5> "It is probably more illuminating to go a little bit further back, to the Middle Ages. One of its characteristics was that "reasoning by analogy" was rampant; another characteristic was almost total intellectual stagnation, and we now see why the two go together. A reason for mentioning this is to point out that, by developing a keen ear for unwarranted analogies, one can detect a lot of medieval thinking today."

Edsger W. Dijkstra

<comment><USER6> How is this reasoning by analogy? He makes the rhetorical comparison to communism, but his point doesn't depend on that comparison in any way at all.

<comment><USER5> _The rest of this article discusses why dynamic linking does not deliver on any of its promises and why, just as communism, it might be an idea that only works in an ideal world._

He depends on that comparison because the rest of his argument is lacking.

His first example, the one about the broken C++ ABI, isn't really an argument against dynamic linking. C++ binary compatibility has always been a nightmare because different groups refuse to agree on a standard. It's a ding against C++, but not dynamic linking per se. For any solution to the problem he's trying to solve, there are going to be pathological cases that perform poorly. Poor C++ ABI standardization seems to be one of those cases for dynamic linking.

He also doesn't really consider the world before DSOs. Consider maintaining a machine (or lots of machines) where every package was statically linked against different versions of the same core libraries. What happens when a vulnerability is discovered in one of those libraries? How do you know which packages are vulnerable? Do really want to upgrade every single package on every machine if there is a libc vulnerability?

<comment><USER6> If you took out the references to communism, his argument would still be there, it has no actual dependence on the analogy he's using rhetorically. Your critique in this follow-up comment is a lot more useful than dismissing his claim as a simple logical fallacy when it isn't.

 _What happens when a vulnerability is discovered in one of those libraries?_

Actually, he directly addressed that issue, by pointing out that updating a shared library when you find an issue with it may break some of the applications that link to it. You might (and I do) disagree with him that this means dynamic linking is bad (imo, downstream projects that choose to take on an upstream dependency have the obligation to know how that dep is intended to be used), but it's not really helpful to the discussion to pretend like he didn't consider it.

</comment></comment></comment></comment><comment><USER7> Yay for irrelevant analogies! Who cares if they shed any light on the topic whatsoever?! Let's give red-blooded patriotic Americans something we can all get behind, hatred of the dirty commies!

You know what else dynamic linking is up to, Mandrake? Sapping and impurifying all of our precious bodily fluids.

<comment><USER8> Sometimes a catchy title is just a catchy title. Perhaps you've been so damaged by the misuse of this - actual dreadful, extended, fatuous analogies between one thing and something rather unrelated/inflammatory that you recoil at the mere sight. This is understandable but in this case, the author doesn't actually make any serious analogy with communism - just a passing reference to 'ideas that sounded good but didn't work out in practice' to get his critique of dynamic linking going. It's a harmless (albeit worn-out) device - it's you who might be red-bloodedly over-reacting.

<comment><USER9> If I am forced to take the mental effort to disentangle the actual argument from the irrelevant analogy, I'm probably going to save the effort and skip all of it.

<comment><USER8> This kind of 'disentangling' can certainly be grating and tiresome but there isn't any to do here. One mention in the title. One mention in one of the lead-in sentences. That's it. It's just a (mercifully very brief) attempt to be catchy. It may be lame but there really is no analogy to disentangle here. The rest of the verbiage consists of specific technical points. If you find that sort of thing so onerous ('forced to' sounds like the author personally sent you to the Gulag) you likely experience great difficulty and mental fatigue reading most blogs since they tend to be stylistically lax.

</comment></comment></comment></comment><comment><USER10> There's a simple counterexample to this argument: operating systems. If it were not possible to create shared code, it would not be possible to write operating systems, which are nothing but shared code. Shared code does demand more careful management and versioning, especially of interfaces, and if you don't do that you are indeed hosed. But if you do then you aren't.

</comment><comment><USER11> Libraries also open up a gate to exploits. For example the return to libc technique.

<http://en.wikipedia.org/wiki/Return-to-libc>

</comment><comment><USER12> There are clearly downsides to dynamic linking but static linking would fail spectacularly when there is a bug in a common library, like libc. One of two things happens:

\- Some applications are not updated and retain the bug. Extremely dangerous if it is a security bug.

\- Suddenly your package manager needs to update almost every single application on your system. All the packages in my Ubuntu system is a total of ~1GB. Now that you statically compiled them prepare for a very long download.

The problems presented are largely solved in integrated distributions (like Linux distributions or Apple software). Where this isn't as clear is when external parties are trying to distribute software in a non-coordinated way (most apps in Windows, non-Apple apps in OSX). In those cases static linking probably makes sense but even then I'd say you are better off linking dynamically to fairly standard stuff like libc.

</comment><comment><USER13> Couldn't you get the space efficiencies without the incompatibility headaches by naming the library like libfoo-SHA1_AS_LONG_HEX_STRING.so in addition to libfoo.so.1.2.3? They're already using symlinks in the lib directories.

<comment><USER14> This assumes that libraries are fully parallel-installable, which is often not the case in Unix. I think .NET does something like this, though.

</comment></comment><comment><USER15> Pfft. Dynamic Linking isn't broken, Solaris is. For some reason I don't have nearly the same amount of trouble handling dynamic libraries on Linux or BSD as I do on Solaris. If code depends on bugs, then the code is broken and _that_ is a bug. Packaging your own special version of a library may solve your problems in the short term, but it increases maintenance in the long term. This is the same whether you do it statically or dynamically.

</comment><comment><USER16> They're both supported/opposed fanatically by ideologues?

</comment><comment><USER17> zlib security vulnerabilities, anyone? Or gecko, for that matter...

</comment><comment><USER18> Dynamic linking works just fine. You don't want your every app to carry its bits of glibc inside, same for libx11, same for openssl. And it's definitely more polished than gems or jars or whatever other languages have; maybe only perl/cpan comes close.

On other hand, C++, with its writhing ABIs and changing mangling rules is definitely not suited for dynamic linking.

They could make their Class.forName() one day, but they were too arrogant and now it would never work okay. The solution is to restrict C++ usage.

</comment><comment><USER19> Generally when I see article with really, really stupid analogies, I assume the article is not well thought out and probably of poor quality. As a rule of thumb, it gives pretty good results.</comment>


How to save the web - <AUTHOR> http://carlos.bueno.org/2008/08/save-web.html

<comment><USER2> Why focus solely on the text Web? The article mentions archaeological value of the data, and how trash dumps are more important than great books. On the Internet, I think that translates to archiving things like World of Warcraft and Punch the Monkey. It's not highbrow, but it gives a good idea of how we're spending our time.

<comment><AUTHOR> That's a very good point, but you have to start somewhere. Text is the easiest thing to preserve and packs a lot of information into a small amount of bytes.

</comment></comment><comment><USER3> I think this is part of the job of Archive.org

I would also say that particularly on blogs it shouldn't be too hard to capture revisions of major blogs. Most blogs 'ping' out Technorati, etc in order to get updated into the search index. It would be easy to capture a revision with each ping.

<comment><AUTHOR> It is archive.org's mission, but archiving is a case where you'd want to have more than one... right? :)

<comment><USER3> I get that but I'm not sure I see the author's point though. Replicating Archive.org isn't hard, it's pretty standard web spider stuff, it's just massively resource intensive.

You can try and distribute that but I suspect it would just end up like most Bit Torrent trackers where the head of the long tail has lots of support and the tail has little to no support.

</comment></comment></comment><comment><USER4> FYI, I work on web archiving at archive.org.

Our tools for crawling and creating your own Wayback machine, including search at smaller scales, are open source. See the projects 'Heritrix', 'Wayback', and 'NutchWAX'. (Though, the bulk of our public archive still comes via Alexa's closed-source crawling.)

There's a company called Iterasi now offering personal archiving. A company called HanzoWeb at one point offered a del.icio.us-like bookmarking-plus- archiving service, and that might return.

CS professor Frank McCown, while a PhD student at Old Dominion, built a tool called 'Warrick' for reconstructing recently-disappeared websites from a combination of public sources.

So many options for collection and access are out there -- it's a matter of organization: building redundant stores and collecting the right materials at the right time.

<comment><AUTHOR> This is good to hear! The more the merrier, and thank you for your work on archive.org. I agree that the organization and redundant stores need work, but the collection and access need help, too.

If something is not in Google Cache or the Wayback, it's effectively gone. There may be a copy in a LOCKSS server or in a nearby browser cache, but if I can't know that or am not allowed to read it, it's useless.</comment></comment>


Show HN: HNKindle.appspot.com, get Hacker News articles delivered to Kindle - <AUTHOR> http://hnkindle.appspot.com While Hacker News is a great place for finding great links/articles, it cannot be subscribed to (unlike a blog). This makes it difficult to read this through devices like Kindle. So last weekend turned to be pretty productive for me trying to put the two together:
http://hnkindle.blogspot.com/
The application uses a specialized library (boilerpipe - http://code.google.com/p/boilerpipe/) for extracting just article contents from links. Also, HN has a lot of links showing up in the Top 30 moving up and down every single day. I have put in place a simple heuristic (which is explained in the app) to chose only the prominent. At the moment, the heuristic is quite arbitrary.
Your feedback is most welcome! <comment><AUTHOR> While Hacker News is a great place for finding great links/articles, it cannot be subscribed to (unlike a blog). This makes it difficult to read this through devices like Kindle. So last weekend turned to be pretty productive for me trying to put the two together:

<http://hnkindle.blogspot.com/>

The application uses a specialized library (boilerpipe - <http://code.google.com/p/boilerpipe/>) for extracting just article contents from links. Also, HN has a lot of links showing up in the Top 30 moving up and down every single day. I have put in place a simple heuristic (which is explained in the app) to chose only the prominent. At the moment, the heuristic is quite arbitrary.

Your feedback is most welcome!</comment>


Arduino Isn't Just For Hackers - <AUTHOR> http://paulfurley.com/arduino-isnt-just-for-hackers/

<comment><AUTHOR> Interesting that arduino is becoming like the "motherboard" for peripheral systems with the shield footprint becoming the defacto expansion bus.</comment>


Why I'm Fed Up with TED - <AUTHOR> http://www.businessweek.com/technology/content/feb2008/tc20080229_565550.htm <comment><USER2> Look, I'm all in favor of opening up opportunities to more people, but let's get real: TED excludes people because the concept doesn't scale, not because it's run by elitists.

An open admissions policy would turn TED into something the size of Burning Man. Everyone would pile into the Rose Bowl, you'd get to "meet" the celebrities through binoculars, it would rapidly become even more of a scripted mass-market public event than it is now, and it would scare away many of the real celebrities, who would promptly go and invent TED II as a completely private, members-only meeting which we would never hear much about. You know, like Davos.

Instead of complaining about how TED isn't completely open, one should be giving thanks that it isn't completely closed.

I'm reminded of Richard Feynman's stories about how impossible it was to give a physics seminar after he won the Nobel Prize. If he scheduled a seminar under his own name, half the city would show up, it would get moved to a huge auditorium, and he would have to abandon his plan to discuss the tricky details of quantum electrodynamics with his peers and give a popular talk instead, because he couldn't bear to bore 95% of his audience to death. Feynman experimented with giving talks under a pseudonym, but found that this just made people angry when they found out, later -- there had been a _Nobelist_ in town, and they didn't know, and they hadn't been invited!

<comment><USER3> Sure, but the money criteria is not relevant when you want to select people for their quality. The people that history remembers over centuries are more than often people that were not very wealthy during their lives because they were too much ahead of their times and as such : misunderstood.

But I agree the journalist's rant is poor because it doesn't ask the good questions. An invite-only conference is not a problematic concept. Having money as a criteria is, because it conveys the idea that intesteresting people and "thinkers of tommorow" are necessarily wealthy. History makes this assumption very questionable.

<comment><USER2> Who said that TED was selecting people primarily for "quality"? (If they say so, which I'm not sure they do, it's purely sales pitch.)

It's obvious to me that TED is, by design or by accident, an invite-only conference for people who tend to be rich. The fact that it's famous is just a side effect of that: if you invite _one_ celebrity to a meeting, you'll get some press coverage; if you invite several hundred celebrities you'll get a _slew_ of press coverage.

The fact that TED is full of smart people giving smart talks is also a side effect of the guest list: smart people are drawn to present at TED for the same reason that Willie Sutton was drawn to rob banks: that's where the money is. Convincing, say, Bill Gates that your work is interesting is a pretty darned good way to advance your work, especially if the press is there, and even if he doesn't pay you a massive fee for the speech -- which, for all I know, TED does.

(I don't mean to imply that rich people are nothing but walking piles of money -- although, if they were, many of us would still gladly talk to them. Many people are rich for a reason! Bill Gates is nobody's fool. Rumor has it that Larry and Sergey are kind of smart. And other people make use of their wealth to become very expert in one thing or another: money buys a lot of education and research. Al Gore didn't rise through the ranks of the climate scientists, but he's talked to one hell of a lot of them.)

If you want to talk to poor, misunderstood, trained "thinkers of tomorrow" with interesting ideas, go to any local university and you'll find several hundred. I should know. Shouldn't we hold conferences for these poor, misunderstood thinkers? We do! There's _thousands_ of academic conferences every year. There are three going on right now in your town. You just don't know about them, because the cameras are pointing at TED.

I don't think it's a crime for rich people to hold a private invite-only meeting. (Whether or not they should be allowed to make binding, enforceable political decisions about my life in such a meeting is a completely different question.) I'm glad that, at this particular rich-person's meeting, they decide to invite scientists and technologists and great artists, instead of concentrating entirely on polo ponies and booze. And I'm glad that they film a lot of the meeting and release those films for free.

<comment><USER3> We're obviously not talking about the same thing. Are the speakers invited for free or they must pay as well ? I was talking about the guys who make the speeches, not the general audience. I think I just realized that the talkers are really invited and do not pay anything. It makes more sense indeed :)

<comment><USER4> The speakers don't pay for their ticket, so it's similar to a $6k paycheck, assuming you actually wanted to go to TED.

</comment></comment></comment></comment></comment><comment><USER5> Presumably, someone at TED brought up this very point, and the solution was to put the lectures online. Doing that put inspiring lectures in front of more people than possible by expanding the conference.

You might talk about the perk of being at Google is eating free food by great chefs, even though the actual reason you work there is because you want to work on great things with great people. In the same way, of course you're are going to twitter about bono and al gore being there, even though the real reason you're there is to see what people on the forefront of technology, entertainment, and design are doing, and do something about it in whatever way you can.

It's not that people don't want to talk about why they're actually there, but it's far easier to talk to someone else about perks rather than core reason. That sends the wrong message to those like the writer that feels outcast.

</comment><comment><USER6> I'm fed up with the titles and theme music at the beginning of TED videos. They're almost violently smug. The orchestral crescendo tries to give you a heart attack, like it was the return of Jesus Christ, and then it cuts to some wonk giving a PowerPoint presentation.

<comment><USER7> So what if they're smug? _We're_ smug - wasn't it only a little while ago that reddit was excoriating us for being a bunch of smug, elitist bastards? And we replied, "Yeah! That's the point!"

<comment><USER6> "We"? I don't recall saying anything.

People who comment on a site aren't members of some gang. Although it seems that all social news sites are eventually overwhelmed by people who think so.

<comment><USER7> Notwithstanding your objection to my use of poetic license, let me refocus: I argue your revulsion of TED's smugness is similar to other people's revulsion of our culture here. I once said:

"It surprises me that people can indict others with the adjective 'holier- than-thou' and not feel ashamed of themselves. The word screams, 'I'm going to bring you down to my level!'"

Smug, holier-than-thou, arrogant, self-righteous: one can easily inflict these words on pg for unashamedly littering his essays with references to Leonardo da Vinci and Jane Austen and Copernicus and Kelly Johnson. At times I've felt put off by the way he does this, but I'm rational enough to know this emotion - the emotion that coerces us to prevent our fellow apes from rising above their proper place - is wrong, at least in this case.

So what if TED is smug? They deserve to be - many of their videos are really, truly interesting. As an example, I recently enjoyed the one on African Aid: <http://www.ted.com/index.php/talks/view/id/159>. I'll warn you in advance that he's a very captivating speaker - it's hard to stop watching after you've begun.

<comment><USER6> Thanks for the link, it was an interesting talk.

I think you're reading more into what I wrote than I intended. I enjoy a lot of their content and I've seen a lot of their videos. That's why I am so annoyed with the opening. I click it and go, oh crap, not this thing again. Fast forward!

<comment><USER7> Heh. Fair. I guess I did overreact a bit to your comment. :)

</comment></comment></comment></comment></comment></comment><comment><USER8> I like the TED video where they invited the guy from the completely dirt-poor African village to talk about building a windmill out of scrap bicycle parts... What must he have been thinking while talking to all of those super- rich who could buy his whole village like it was a candy bar from a vending machine as he recounted scrounging enough rusty bicycle parts to pump water and keep villagers from dying of cholera?

I'm sure they were thinking this made them all "global" and "in touch" or something. I think they were treating the poor guy like a curious little pet.

Here it is: <http://www.ted.com/index.php/talks/view/id/153>

</comment><comment><USER9> I personally just dig that they've got some great talks that are up with Creative Commons licenses. I appreciate the conference even if only for the fact that I think they've got some important ideas that are being preserved in an open format.

</comment><comment><USER10> What makes TED obnoxious is that they market it so heavily (all those videos) but exclude most people. It's fine to have private conferences, and fine to promote conferences, but it is nasty to do both.

<comment><USER11> I agree that the ads at the beginning of the TED videos are annoying, but overall I don't think TED is particularly heavily marketed. And I think it is hard to complain when they are distributing free videos of pretty much all the conference talks.

</comment></comment><comment><USER12> Sarah Lacey wrote the puff-piece we've all seen on digg, and was quite amenable to leaving founder no. 3 out of the picture. So from my heart, I just want to say... she can go f*ck herself.

</comment><comment><USER13> Wasn't it this kind of reaction to FooCamp what lead to BarCamp being created? Don't complain about it, fix it. Sure the celebrity component of TED can't be replicated but there are still lots of smart people who can help figure out how to make the world better.

</comment><comment><USER14> Here's an idea: Watch TED on the internet like the rest of us and give the $6000 to the worthy cause of your choice. Then you would be DOING the message while the others are TALKING about it.

<comment><USER15> Hey do you have links for the especially good ones saved somewhere?

<comment><USER14> I've always just gone here

<http://www.ted.com/index.php>

</comment></comment></comment><comment><AUTHOR> I was happy to read that one. And see that I was not the only one who's noticed the contradiction in TED: promoting innovation and educational projects (for example in Africa) but limiting its audience to a very few carefully-picked (rich (6k/seat)) VIP's.

</comment><comment><USER16> The BIL conference (<http://bilconference.com>) is being held in Monterey after TED as a free alternative. They had to cap attendance at 150 though. Some of the scheduled talks look interesting.

</comment><comment><USER17> If only there was a room with infinite seating...

Oh wait. There is. It's called "the internet", and TED is there.

</comment><comment><USER3> Was any Paul around here invited ?

</comment><comment><USER18> Can't anyone who pays the $6000/year membership fee get in?

<comment> a-priori No, it's invite-only, and they only invite 1000 people.

<comment><USER18> I think it was changed for the upcoming conference, but I may be misinterpreting it. It seems like there was a one week period when they let anyone become a member in January 2008, for the 2009 conference. After that, registration was closed and presumably celebs can still get in. But if you had $6000 during that one week period, you could get in. This is in contrast to the previous conferences where you needed an invite to get a floor pass.

</comment></comment></comment><comment><USER19> Elitism? In my America? No...

<comment><USER20> Limited seating arrangements? In my America? No...

</comment></comment><comment><USER21> if i recall the ze frank speech was pretty good, no link sorry.</comment>


Curve Matcher - <AUTHOR> https://github.com/chanind/curve-matcher <comment><USER2> Out of curiosity, how is this better than, for instance, using B-splines or some other smoothing spline to fit a given chunk of data? I'm not being snarky, I'm just trying to get my head around the use cases for this.

<comment><AUTHOR> The goal of this library isn't to fit data, but rather to determine if 2 curves have similar shape to each other. So, for instance, if want to determine if a hand-drawn curve has a similar shape to the letter "S" you could use this library to find a similarity score between the curves.

<comment><USER2> Ahh, I see. Interesting.

</comment></comment></comment><comment><USER3> This looks neat! I found the Hanzi Writer demo, but you might want to put some (static) examples in the ReadMe, to explain exactly what the library does.

<comment><AUTHOR> Good call! I just added an image showing 2 curves and their similarity scores to the readme.

</comment></comment><comment><USER4> Reminds me of some interesting papers that are related to this topic, off the top of my head check out [0-1]. Perhaps _relative geodesics_ is a key word to search. If you picture curves as made out of some sort of pliable material, you can ask how much energy does it take to deform one curve into another.

[0] [https://arxiv.org/pdf/1305.3572.pdf](https://arxiv.org/pdf/1305.3572.pdf) [1] [https://royalsocietypublishing.org/doi/abs/10.1098/rspa.2016...](https://royalsocietypublishing.org/doi/abs/10.1098/rspa.2016.0619)

</comment><comment><USER5> Very cool.

Any idea what you'd use it for?

<comment><AUTHOR> The original motivation was for doing Chinese character stroke quizzes in Hanzi Writer [[https://chanind.github.io/hanzi- writer](https://chanind.github.io/hanzi-writer)]. Beyond that I'm not too sure, but hopefully it's useful for somebody :)

<comment><USER6> Perhaps this could be used for "curve fitting" [0]? (used in CAM software to optimise CNC toolpaths)

[0] [https://en.wikipedia.org/wiki/Curve_fitting](https://en.wikipedia.org/wiki/Curve_fitting)</comment></comment></comment>


AI Is Helping Address the Rohingya Refugee Healthcare Crisis - <AUTHOR> https://blogs.nvidia.com/blog/2019/01/04/ai-polyfins-rohingya-refugee-crisis/ <comment><AUTHOR> The two healthcare companies mentioned:

1\. Tibot: [https://tibot.ai/](https://tibot.ai/)

2\. Polyfins: [https://polyfins.com/](https://polyfins.com/)</comment>


Is 'aqenbpuu' a bad password? - <AUTHOR> http://blog.erratasec.com/2017/01/is-aqenbpuu-bad-password.html <comment><USER2> It is now.</comment>


Apple's new strategy for fighting off Android, retaining customers - <AUTHOR> http://www.networkworld.com/article/2989566/smartphones/apple-iphone-6s-one-year-upgrade-plan-android-ios-9.html?nsdr=true <comment><AUTHOR> With the release of the iPhone 6s and 6s Plus, Apple's new annual upgrade plan serves as an "iPhone as a Service" plan that locks in customers for two years and keeps them from defecting to Android.</comment>


4-Hour Life Accelerator: I am The Spawn of Tim Ferriss's 4-Hour Drugs - <AUTHOR> http://www.danielvitiello.com/2013/01/19/4-hour-life-accelerator-i-am-the-spawn-of-tim-ferrisss-4-hour-books/

<comment><AUTHOR> Hope that you guys like it!</comment>


Show HN: Simple app for companies looking to hire a team / group hire - <AUTHOR> https://grouphire.glideapp.io/ <comment><USER2> Love the idea of this because I believe it has been demonstrated that group hires remove a lot of biases and helps diversity. However, I am skeptical because it reduces the employers poll drastically.

</comment><comment><USER3> good idea. especially for start up, hire a team is very very important.</comment>


Is e-mail on the way out? - <AUTHOR> http://weblogs.redeyechicago.com/iphoneblog/2008/08/is-e-mail-on-th.html <comment><USER2> _Of course, when Twitter goes down, which is actually much more often than MobileMe, well, people are just up in arms. And while some are likely turning back to e-mail, I still think that Twitter is a bigger force than many of us realize._

Gah! Personal E-mail on your handset was never _in_! People are not up in arms because these features still work:

\- The telephone itself (i.e the feature where you actually talk using words and the words come out the other end)

\- SMS

\- Exchange syncing (the only reason I bought the iPod touch software upgrade)

\- Webmail using the spectacular browser

\- The apps for facebook/twitter/IM/etc

The twitter echo chamber effect is astonishing. It's far more self- flagellating than even the blahgosphere, which was almost insufferable for a while a few years ago.</comment>


Ask HN: Why hasn't a vertical rhythm CSS reset caught on? - <AUTHOR> I submitted a link a couple of days ago of a CSS reset that positions your plain HTML elements onto a vertical grid (https://jhildenbiddle.github.io/vertical-rhythm-reset/), to create a vertical rhythm. Here's a link about how vertical rhythm works in general (https://zellwk.com/blog/why-vertical-rhythms/). (I'm not affiliated with either of these links in any way, I just like the concept.)
Implementing vertical rhythm with a CSS reset seems to me like an obviously correct thing to do. To give your raw textual HTML building block of paragraphs, headers, and lists a consistent spacing strategy. But the concept hasn't caught on, why not?
Vertical rhythm appeared on my radar around the same time as the general concept of graphic design grids (https://en.wikipedia.org/wiki/Grid_%28graphic_design%29) which have entirely taken over the in digital-product design. Why aren't vertical grids based on the line height more popular? Or are they popular and just not implemented with a CSS reset? <comment> Lorenz-Kraft I'm also using this as a base for my layouts and grids got obsolete since then.

As far as i see it, devs do not bother about these graphic details and just use what aligns more with what they get (from the design apartment) => avoiding mental switches for a "unusual" (aka graphic) area, because most often, a dev does not want to have a discussion with a graphic designer about "HOW" its best to implement graphic orientation (Grids vs Vertical Rhythm).

Nevertheless, i just see one major flaw with vertical rhythms: Line Height for Headlines (if they are multilines).

So for example: Base Font Size: 18px Line Height: 28px

Headline: 28px with 28px Line height? Looks packed. Using Lineheight 56px => Way to spacy. Using a 1/2 or 1/4 factor of the line height mostly aligns with graphic pleasing appearance, BUT THEN you will lose the vertical rhythm in some cases (1 row headline => off, 2 row headline => on, 3 row headline => off ... you get the schema).

For any further questions: Please feel to ask.

<comment><AUTHOR> These are all great points.

The way I look at, there are three options:

1\. Just take the browsers default spacing (no reset)

2\. Use a CSS reset that sets everything to zero (then apply your own spacing later)

3\. Use a vertical rhythm CSS reset

It seems to me that the vertical rhythm CSS reset is the best of these three options because it provides the nicest spacing for the least amount of work.

Specifically addressing your (very valid) concerns, the idea of doing this as a reset, is you can just use style with vertical rhythm when they work, and override them in the problematic areas. There doesn't seem to be much of a downside to me? But perhaps that's the answer to my original question: Given that in some areas it needs to be overridden, perhaps the upside of adding an extra step isn't enough?

</comment></comment><comment><USER2> No idea, it makes total sense to me. Will definitely be trying this out on my next project.</comment>


The Illicit Perks of the M.D. Club - <AUTHOR> http://www.nytimes.com/2016/07/03/opinion/sunday/the-illicit-perks-of-the-md-club.html?ribbon-ad-idx=18&rref=opinion <comment><USER2> In the US, if people take the mystique out of health care and treated it more like food service, then it'd be a lot easier to understand why the industry is so hit-and-miss with a wide range of issues. In other terms, the demand is so strong in the industry that I have no doubt the competency is something to genuinely be concerned about as a patient. I've seen it first hand - Docs and Nurses are humans, and humans get tired, or forgetful, or distracted and those aren't personal faults. However, when they screw up, instead of being apologetic, getting defensive is a very typical response.

What this article points out is something a little deeper, in that knowing the language and culture will allow an individual to social engineer through challenges. I've done it with the medical community, also in Wall St. finance, but it's most useful in my day-to-day life when going out to eat in a restaurant. There are cues and phrases to drop which can alert a competent server as to the experience level - and possible expectations - I will have of the meal. Being deeply involved in such things can have that affect on people, at least it really has for me. Criticism from another industry participant tends to sting more, because it cuts to the point.

<comment><USER3> Can you describe the types of language and culture? Or have resources to look into this further, I find it interesting.

<comment><USER4> Read up on Shibboleth [1]. Using language or phrasing, it's a way to suss out members of a certain group. One can argue that the internet memes are a type of shibboleth for internet groups. One example is The Narwhal Bacons at Midnight [2]. I'm sure YC alumni have some type of shibboleth to identify themselves in situations.

Shibboleth entered mainstream culture (and when I learned it) via a West Wing episode called "Shibboleth" [3]. The clip is worth a watch.

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

[2] [http://knowyourmeme.com/memes/the-narwhal-bacons-at- midnight](http://knowyourmeme.com/memes/the-narwhal-bacons-at-midnight)

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

<comment><USER5> > Shibboleth entered mainstream culture (and when I learned it) via a West > Wing episode called "Shibboleth"

The concept of a shibboleth entered mainstream culture many centuries ago; it is a story from the Bible.

</comment></comment></comment></comment><comment><USER6> The doctor privilege angle is overblown. That's a shortcut, but you just need to be squeaky to get similar results. I think that instead of trying to create the fantasy that medicine is some sort of open market, we need to do something else.

My wife went through a series of medical procedures that are time sensitive, expensive and require a bunch of expensive speciality medication.

The pharmacy is impossible -- mail order only and dedicated to being obnoxious. Their aim is very obvious -- push prescription fulfillment into the next month, quarter or year. I'm sure bonuses are tied to this, because their stupid behavior wastes money... On three seperate occasions drugs were couriered to my wife (as in, a dude carrying a box got on a plane and took a cab to my home from the airport)

It's dumb behavior that results from applying market incentives to one stakeholder. For want of a $1000 drug, a $15000 procedure could be rendered a waste.

Some party should be given a "project manager" type role, and be responsible for overall patient outcome.

<comment><USER7> It seems like every time I have to deal with a pharmacy, I am continually blown away. It's a uniquely terrible experience, more akin to the DMV than a retail store.

<comment><USER8> Out of interest (I'm not from the US) - how can a pharmacy be bad - every time I go to one it's a case of handing across a prescription, waiting a few minutes and then getting the drugs/whatever.

<comment><USER6> Insurance craziness. CVS is becoming a classic horizontally integrated monopoly for drug distribution (benefit management, wholesale distribution and retail) so it's getting much worse in recent years.

For normal drugs they have "step up" process for new drugs so they won't pay for a 90 day script without you first getting two 30 day scripts. They make more money via co-payments on 30 days so shockingly, they fuck this up all of the time to make more money.

In my case, I am on a blood pressure med that went generic. So the script changed to the generic... Which triggered the 30 day "step up" for the same drug. I lost alot of weight and had the generic script changed to a different dosage... Again, back to the 30 day "step up". My insurance penalizes you for short term scripts for maintenance medication, so I get to pay $50 each for two 30-day scripts vs. $25 for a 90 day.

My wife was different, "speciality" drugs, which include stuff like type-1 diabetes and fertility meds require that you use the insurance company's pharmacy and jump through more hoops. My co-worker has a daughter with type-1 diabetes. He's a "type A" PM and actually has developed a project plan with about 100 documented steps to ensure that her medications are delivered on time. He did that after he daughter had to be admitted to the hospital when they ran out of drugs -- which cost the other insurance coverage $25k or more, so it's not saving money.

It's all about delaying expenses over some reporting period and maximizing revenue. Nickel and diming co-pays is how they make a profit with a huge employer like mine with lots of bargaining power. Delaying issuance of speciality drugs is also a profit center, as they are paid a commission/incentive for "controlling" costs in a given quarter/year.

<comment><USER9> Honest question, is it possible to get these prescriptions filled from mail- order or international pharmacies?

It seems there's a demand for reliable, no-bs medication delivery from _outside_ of the system.

<comment><USER6> Yes, absolutely. But the insurance won't pay for those.

Many self-employed folks import drugs from Canada. For awhile, local governments in my area were doing it as well.

<comment><USER10> When my disabled mother was covered by Indiana Medicaid (which provided abysmal coverage), before the ACA took effect, I would import most of her drugs from Canada (except those that the DEA would not look fondly upon, those had to come from the local CVS).

It saved me thousands of dollars per month.

<comment><USER9> Did the Aca specifically forbid you from importing drugs?

<comment><USER10> It didn't, but the copays are now so much lower due to subsidies the ACA provides (compared to Indiana Medicaid), it makes no sense to import said drugs.

If you live in a state which refused ACA subsidies, this plan of action would still make sense. Or moving to another country with cheaper/universal healthcare depending on your income arrangement (disability/social security).

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER11> "These workarounds are necessary because the health care system doesn't follow any rational rules of economics, where the customer should be king." The health care system how it's currently organised in the US _does_ follow rational rules of economics. It is very good at extracting value from the medical process. It's horribly bad at solving health issues, let alone efficiently.

<comment><USER12> > The health care system how it's currently organised in the US _does_ follow > rational rules of economics.

Really‽ If prices of service were disclosed in some sane way the market could reward the efficient providers. Instead it's shrouded in mystery and the providers hide behind the complexity of the agreements among the many insurance agencies. They're certainly able to figure it out once it's time to generate a bill.

If there were healthcare providers that worked like my auto mechanic or plumber, it would be so much easier to work with. "sign here, not to exceed $150 for diagnosis, etc..." and then you discuss with the physician later, "Ok treatment option 1) these pills, $50 for your insurance, 2) amputation, $3000 for your insurance and BTW you satisfy your annual deductible, ..." It's not that they couldn't do that, it's just that there's little incentive for them to do it and none of the competition does it. And much of the time the diagnosis would reveal "Sir it's probably just a virus which means that we could spend tons more time and money diagnosing this and then just rule out tons of other things and end up with no treatment options anyways. If your symptoms don't go away in three weeks then come back."

<comment><USER13> You misunderstand the grandparent post. He is saying that you don't get to change rules of economics. But you (in this case the government) does get to setup the rules of the marketplace. And it is this combination of basic economics and rules of the marketplace (in this case government hiding cross subsidies for Medicare) that results in the mess we are in. But the basic rules of supply, demand and self-interest are the same here as they are in the auto mechanic business and as they were in Soviet Union.

</comment></comment></comment><comment><USER14> The real issue here is not perks for physicians but the corrupt, inefficient, self-serving system that insurance companies and hospital bureaucrats have devised for the American public.

<comment><USER15> Ever wonder why the cost of healthcare is so ridiculously expensive in this country? The American Medical Association (the AMA is the most powerful union in history) has pushed through laws to protect its members from competition, making it extraordinarily difficult to provide low cost healthcare. Basically, all entrepreneurs who don't join the union are shut off the health care industry. This is why you pay so much money in insurance & for simple doctors visits. Do you think if a fresh entrepreneur opened a hospital you would pay $8,000 per day for a room? I very much doubt it.

<comment><USER16> If physicians were the primary driver behind high healthcare costs, I would expect physician income to be a larger fraction of healthcare expenditure. Currently, physician pay represents about ~10% of US healthcare spending. This is dwarfed by administrative costs, which represent 25% of US healthcare spending.

If the AMA/AAMC are to blame, then it seems likely to be implicitly: by keeping entrepreneurs out of the hospital administration game so they can't reduce inefficiency. But you don't have to be a physician to be a hospital administrator, so this doesn't make sense to me.

Reducing physician salaries to 0 only reduces healthcare costs by <10%, and entrepreneurs can become hospital administrators without becoming physicians. So, I think that the ire directed at the AMA is misplaced, but I'd be interested to hear more (and I'm an obviously interested party, though I'm not an AMA member). The regulatory bodies are most likely what you have concerns about.

<comment><USER15> Medical professionals are the highest paid profession in America - [http://www.businessinsider.com/top-paying-jobs-in- america-20...](http://www.businessinsider.com/top-paying-jobs-in- america-2015-9). 16 of the 30 jobs and all of the top 5 on this list are in the medical profession.

The high pay in these professions is simple economics: supply is tightly constricted through the number of residencies allowed. Those in the profession have a strong interest in continuing to restrict the number of people in their field and so they have trade organizations that do this.

The line of defense they use is that consumers are too stupid to select a good healthcare provider without their intervention. I believe consumers would be very good at selecting the best provider, and would love to see all of the regulations dropped to open free competition into the marketplace.

<comment><USER16> Your previous post leads in with:

> Ever wonder why the cost of healthcare is so ridiculously expensive in this > country?

The major point that I make is that physician salary is under 10% of US healthcare expenditure, so that's not why healthcare is so ridiculously expensive here, and driving it to 0 would likely make little overall impact. You haven't made the case that a constrained supply of physicians is the reason why there is a large amount of healthcare regulation in the US. Much of that regulation is to the consternation of physicians as much as it is to those who want to innovate in healthcare.

Finally, part of the reason that 16 of the top 30 jobs are different subspecialties of physician is that those jobs have existed for quite some time and are cleanly delineated into subspecialty. If you were to break out different roles in investment banks and hedge funds similarly, you'd probably not see physicians in the top 30 list.

<comment><USER15> I agree completely with you that the large amount of healthcare regulation is the ultimate culprit for the extreme high prices Americans pay.

My argument is that the root cause of all of the regulation is not the best interest of the patients, but what is the best interest of the doctors.

Doctor backed trade organizations push for more and more obfuscation of the actual price a consumer pays in order to be able to charge more. They don't allow pricing or quality to be openly shared in the marketplace, and they don't allow new entrants to compete.

Healthcare is ripe for disruption, but entrepreneurs are prevented from doing so by archaic laws that harm patient care and increase prices. These regulations are vigorously defended by doctor backed trade organizations.. it's in their best interests to keep their cash cow.

<comment><USER17> The regulations only look like they're in favor of the doctors to those completely unfamiliar with the field. But who keeps the money from that $8000/night hospital stay? It certainly isn't the internal medicine doc making $200k/year (admittedly a great salary, but not at all out of line with the requirements of the job). I'm an advocate for less regulation in the healthcare industry, but it's not as simple as just throwing away all barriers and allowing the free market to solve everything.

Nurse practitioners and physician assistants _are_ new entrants in the healthcare marketplace, and they are absolutely a "disruptive force" in the healthcare market, in the original Clayton Christensen-sense of the term. In fact, these professions were even called out as such in The Innovator's Dilemma. So your argument that new entrants to the market will somehow magically make prices lower doesn't hold much water (and for those who think that these entities should be freed from the regulations which require them to be supervised by a physician...that's like advocating for a large bridge to be designed and signed off by a civil engineer 2 years out of undergrad).

As for Certificate of Need laws, which limit the amount of hospitals and sophisticated equipment that can exist in any given area...certainly most doctors I know don't love these laws. It's the hospital associations (made up of many, many people other than doctors) which continually fight to keep them on the books.

</comment></comment></comment></comment></comment></comment></comment><comment><USER18> It's comforting to see a doctor venting his frustration over Insurance companies. I've gotten to the point where I've kinda just given up. I'm sick of the entire mess.

I've gotten to the point where I just wish patients had more of a say over what medications they could have refilled.

Say, for instance, a person has been taking Blood Presssure medication for over five years; they should be able to renew their original script? Or, a person has been on anti-anxiety/depression medication for over five years; let that person authorize their own refills? Require blood tests--that's fine.

The patient couldn't increase the dose, but wouldn't have to deal with doctors over refills. The patients who abuse the privilege would have to go back to our lovely system of being held hostage.

I guess refill are on my mind because I'm going into detox over the lack of a medication I've been on twenty years. The pharmacy is waiting for her approval. I think my doctor is on an extended vacation?

Of course this will never take place because Americans are all drug seeking zombies according to our government, and I don't think AMA lobbyists would ever even consider such a crazy notion.

As to this, "Nepotism occurs in many fields; friends and family of New York City police officers often carry Patrolmen's Benevolent Association cards, which may confer special treatment in a traffic stop."

Yea, this is very common. In San Francisco, my father best friend (now a retired cop) gave him a special business card. A "Get out of jail free" card. My father used it a few times. It saved him from a DUI. My father was a very conservative man. He hated what that card stood for, but always carried it around.

<comment><USER19> If someone is on some medication, it is probably a good idea to have them regularly check in with a doctor to make sure their condition isn't getting worse (or better!). Forcing them to see a doctor when their medication runs out seems like a reliable way to get them to go to such checkups.

<comment><USER7> I realize that sounds pretty reasonable and all, but I can assure you that no such checkup is being performed the vast majority of times a patient comes in to renew a script. It's just an excuse to get the patient in so that they can cover their ass and increase billables.

</comment></comment></comment><comment><USER20> Here in Germany, we have something called "Gebührenordnung für (Tier)Ärzte" (fee catalogue for (veterinary) doctors).

Everything you can think of has a standardized pricing set, with the option to go up to 3.5x the standard rate for difficult procedures.

Kind of prevents that bullshit mentioned in the article; also, national health insurance covers nearly everything that's medically neccessary and deductibles are highly limited.

<comment><USER21> In BC (and I assume other Canadian provinces) the dental association publishes an annual fee guide. They recommend that dentists charge the suggested fees, but they do not require it. Many insurance companies use the suggested fees as limits on how much they will pay for certain procedures. But patients who are paying cash don't know how much the "suggested" rate is for the services they received -- unless they borrow a copy from their local library, since the dental association explicitly refuses to put the guide online. (Their argument is that the fee schedule is too complicated for patients to understand.)

So despite having nominally standardized pricing, in practice there's nothing keeping pricing standardized beyond what insurance companies are willing to pay for their clients.

<comment><USER22> Ontario has it posted prominently. The top Google result is the official PDF. It's only 76 pages.

BC's page has an FAQ saying public library and that its over 1400 pages.

<comment><USER23> [http://www.health.gov.on.ca/en/pro/programs/dental/docs/hso_...](http://www.health.gov.on.ca/en/pro/programs/dental/docs/hso_services_fees_dentist.pdf)

</comment></comment></comment></comment><comment><USER24> There's also professional courtesy between doctors and police. They'll very often let you off for minor traffic violations even if you're not on the way to an emergency (source: relative who's a doctor).

It was described to me as "if they get shot and you end up being their surgeon they want your goodwill", although it's not limited to surgeons so I suspect that's not quite the whole story.

<comment><USER9> We used to just call that kind of thing "courtesy" and people in the community who were known for being good were given it, while jerks and scumbags had it denied.

I imagine it played a large part in community good will until our communities got too big for us.

</comment></comment><comment><USER25> > In most realms, those with the least ability to pay should receive the > biggest discounts. In health care, it is often the uninsured and indigent > who receive bills with the full "chargemaster" fee — the wildly inflated > prices that nobody really pays — while large insurance companies get the > biggest breaks.

This bothers me more than almost any other piece of our system. It's corrupt from the start, with prices being presented that do not have any relation to the price that the parties in the transaction actually expect to pay/receive. So even if we had "price transparency" for medical procedures, it wouldn't really reflect reality.

A few examples of the system at work:

* I have a HSA so I don't put small medical expenses through my insurance. I went to a doctor for a strep throat check and was told that my 30m appointment would be $350 if put through my insurance (and I hadn't hit my deductible yet) or $150 if I paid in cash at the office. So I paid cash with my HSA. Why should there by these two wildly divergent prices? Even if I had no deductible and took the $350 option that just means my insurance company is paying $200 over what the doctor actually wants for the service, which means some other person in the insurance pool will receive $200 less in services down the road.

* One time I got food poisoning in college and because it happened in a classroom and I was unable to really walk/balance the school said I could only leave in an ambulance. So an ambulance was called to drive me the 0.25mi to the university hospital. I waited a few hours in the ER, then a doctor saw me for 15 minutes and no medicine or care was actually administered since I was fine by then. I get a bill in the mail for $1000 a few weeks later, that's $700 for the drive and $300 for the doctor's time. My dad (a dentist) advised me to not pay the bill and let it go to collection. Then a few weeks later the bill collector called me and since I had my income listed as $0 (college student) they said I could pay the bill in installments or just make it all go away for a $300 lump sum (which I took). So just by waiting around suddenly the cost of treatment went down by 70%.

Medicine should not be a negotation. There should be one price for everyone and you shouldn't have to know anyone or pull strange tricks to get the real price. If we don't even know what something costs, how can we begin to drive the cost down?

<comment><USER26> Just letting you know, the monospace formatting appears as a single line and is unreadable on mobile.

<comment><USER25> Fixed, thanks!

</comment></comment></comment><comment><USER27> Real issue is the public's willingness to provide care for itself.

To glaring examples of this are obesity and fatally rates related to medical error; 250000 deaths a year are related to medical error.

On the last point, you'd think this is an institutional issue, but if you account for how little attention the public gives the issue compared to other issues, it's clear the real issue is the public.

</comment><comment><USER28> My wife is a member of the R.N. club, but sadly it appears that there are no perks associated.</comment>


Ask HN: How do experienced programmers learn new things? - <AUTHOR>

Since I'm a novice, I enjoy novice friendly online education but feel reading hundreds of pages of programming books or documentations daunting. I'm curious how experienced programmers learn new things. Do you ... ?<p>* Read the docs<p>* Read programming books (such as those by O'reilly)<p>* Go through online courses<p>* Other ways (comment if you like) <comment><USER2> When you're experienced in anything your advantage is that you can put things in relation quickly, which helps you learn things faster.

For me, I learn most when I create something or put my learning in practice immediately. Whether it's languages (natural or programming) or a certain framework, or paradigm. The key is that by running into problems you see how a piece of technology fits into the big picture.

</comment><comment><USER3> When are experienced programmers NOT learning new things? Constant learning goes with the trade.

You often don't have the time to read through hundreds of pages of programming books, and I don't have the patience for that anyways. The best way to learn is practice, practice, practice. You practice programming and you practice your "look up" skills for finding new info.

</comment><comment><USER4> Build something.

I can never really learn just by reading docs, books, etc.

If you want to learn XYZ programming language, write an app in that language. In order to get that app built, you'll need to learn whatever is necessary to use the language.

</comment><comment><USER5> For me, no fixed patterns. Mostly learn new things by googling. If the topic is completely new, and googling does not work, then starts with some text book. After reading initial few chapters, I again come to the googling mode.

</comment><comment><AUTHOR> Indeed, Practicing and Googling are essential in learning. I guess books and docs come as references, I once thought they were the first thing to go to. Thanks for the comments.

</comment><comment><USER6> By varying either the tooling (use Lambda Prolog to write web servers!) or the problem domain (get deep into computer vision).

</comment><comment><USER7> reading source code is #1, a close #2 is debugging so you understand how the design of the software works.</comment>


OLPC XO to Run Windows in 60 Days or Less - <AUTHOR> http://blog.laptopmag.com/negroponte-not-seeking-replacement-olpc-xo-to-run-windows-in-60-days-or-less#comment-859 <comment><USER2> I think that's misleading. It will definitely be a stripped version of Windows. Maybe some adapted version of CE.</comment>


Serious San Francisco Founders Health Warning for Bikers (Very true story) - <AUTHOR>

<comment><AUTHOR> True Story:

Context: It's now 2:14AM San Francisco Time. I am a commuting biker in San Francisco, and also suffer from extreme Founderlackofsleepitis. I'm in good shape riding every day on some of the steepest SF hills back and forth between Cole Valley and SOMA.

The difference today: Heat. I think we were approaching 90 degrees which is unheard of here. I was late for an appointment and rode full bore up the hills to the Sunset from Work around 3PM - bad idea.(Several "Beyond Category" climbs")

No big deal, I sweat a bit and smile. I start coughing though afterwards. After dinner I start feeling increasingly cold. The coldness continues. At the lowest temperature point I'm covered with 2 feather blankets, wool icebrakear robes anything I can grab with large hot water bottles - I think I'm in the arctic. My body is out of control trembling - damn!

Then it stops, I start feeling warmer - very nice. But then I get warmer and warmer and hotter. At one point, my brain is solving all the problems in the world - I knew I was in trouble. After a couple gallons of water and cold showers I stabilize. The doctor says I had Heat Exhaustion but almost crossed the point of no return which is a very real thing. <http://www.emedicine.com/EMERG/topic236.htm>

So for you bikers who are way too low on sleep, please don't ride up extreme hills in the heat - even if you're in shape!

Tuesday will be hot too - beware.

<comment><USER2> I came across a dude in a mountain bike race once who was getting the chills in the middle of July after climbing up a big hill... I told him to get himself back to the aid station soonest and drink water and electrolytes. The electrolytes are important, because you can actually die from drinking too much water if you don't take in any electrolytes.

To bring things a little bit more on topic, I guess the important message is:

Take care of yourself (and the people around you). A failed company might suck, but it's better than serious damage to your health or relationships with people who really count.</comment></comment>


Hiring Programmers In Tough Markets Like SF or NY - <AUTHOR> http://www.fastcompany.com/1810918/3-secrets-to-recruiting-tech-talent-in-tough-markets

<comment><USER2> _Money and free Cheetos are great, but they come last_

I disagree with this conventional wisdom and think it stems from wishful thinking on the part of hiring companies. With all things equal money becomes a secondary concern, but few developer are going to take significantly less for a position. Conversely if a company where to place an ad stating that they are paying 120% of the best market rate available, they would have quality developers lined up around the block. If money where the last concern then every developer would be working on their own problems, because they would find them far more interesting than what most companies have to offer. When I see this kind of advice, I cannot help but suspect the rest of the advice. More honest advice would be don't be cheap more than any other hire (with maybe the exception of sales) a good developer can earn his keep 10 fold, as such expect to compensate them well.

The other issue I see is there is no mention of finding remote developers. For the last few years I have assembled several all remote teams with members in Louisiana, Florida, NY, the valley, Australia and so on. With all the SaaS and Skype there is little need for a development team to be collocated. Finding talent is much easier when you are drawing on a global pool of talent. When we hire, we never hire based on compensation and always hire based on the best talent we can find wherever they are, unless their rate is astronomical we pay above market rate if they request it.

</comment><comment><USER3> "The bottom line is this: Not every talented programmer in the world is from a city with "Silicon" in its nickname. But many of those programmers would love to live in one."

This makes tons of sense. Apart from Forrst and GitHub (and Dribble), good old fashioned 1st or 2nd degree connections can be gold in non-coastal centers for tech and design talent. My co-founder is located in Pittsburgh and has begun to see lots of interest from other founders who want to key into the scene there (CMU, etc) and he is very happy to help, because well, it's cool to help startups, but also it's a forcing function for him to engage with top talent in his own backyard.

I'm willing to bet if most of us went into our contacts we would find a "hub" like my co-founder in cities like Pittsburgh, Austin, places in upstate NY, etc, who would be keen to help out.

PS: Do people find the job board at Dribbble useful?

</comment><comment><USER4> I've been working remotely for the past 2.5 yrs, and our Team is globally distributed (Chennai, US East Coast, and I am in Hawai'i)... Multiple time- zones, multiple languages, no issues.

I do not understand why so many companies are still stuck in the "stone ages" (perhaps "factory ages" is more apropos) when it comes to sitting everyone down in the same physical location. Communication is relatively simple nowadays, so you can still "see" the person if need be (e.g., Skype). Our Team has been successful with email and a few tele-conferences. I recently traveled to one of our regional offices (unfortunately most ppl in the company still work at these), and sat in some cubicle wondering "aren't we more civilized than this?"

End rant. If you want good ppl, then PLEASE consider hiring remote workers.</comment>


What's the deal with gmail's new favicon? - <AUTHOR>

Is it a wrench? <comment><USER2> I noticed that on one of my accounts the other day... I thought it was just a quirk in Chrome on my machine.

No idea why the change. :s</comment>


Ask HN: Database design – many small tables vs. fewer larger tables - vanilla-almond When designing a database schema, it's really tempting to create lots of small tables. This gives you a feeling of flexibility and future-proofing the database design.
But is it better to create fewer, but larger tables rather than lots of small ones?
Or is this an impossible question to answer without seeing the data that will populate the database? (Or knowing how large the dataset is?) <comment><AUTHOR> Once you've reached 3NF, stop there. Sometimes targeted denormalization can allow better performance.

</comment><comment><USER2> I guess your question boils down how you deal with optionality of fields. If all columns are required, a single table is more clean. If columns are optional, it makes sense to have a separate table for it. Furthermore, as you name it, once you want to extend your binary relations to triplets, for instance, the seperate table will pay off. However, a DB schema should be written for being optimal today and not in a nonexisting future.

</comment><comment><USER3> in most RDBMS it would be better to have fewer larger tables. you could use its internal partitioning if it has one. one problem you'll run into with many small tables is stuff like 'open_tables' limit (mysql) and that the cache efficiency declines. stick with built-in partitioning/sharding to avoid trouble.</comment>


Ask HN: How do you get better at writing, blog posts or otherwise? - <AUTHOR> Hi guys, how do you get better at writing?(General/tactical advice welcome.)<p>In the past few months, I've written a lot of drafts, but it's so hard to publish posts. I just can't get sentence construction (for now, I hope). I have a structure of points I want to make, but I somehow just keep on writing the same boring sentences. Any actionable tips, books, blogs, whatever to help? <comment><USER2> Practice, feedback, and reading a lot of writing of the sort you want to emulate.

The last point is subtle but important. After reading a trilogy by an author with a distinctive writing style I'll find myself unconsciously writing and even speaking in a voice similar to theirs.

Publish even what's imperfect so you can get feedback. Oh, and short sentences are good: they're easy to understand!

</comment><comment><USER3> Without publishing, it is impossible to write blog posts. Publishing is more important than sentence structure to readers.

<comment><AUTHOR> Christ, that's right. "Without publishing, it is impossible to write blog posts." I should just keep on publishing because (this is just my thought process right now, not so sure about this):

\- People can figure out points, because I've gotten things from blog posts with so-so sentence composition but brilliant points. As long as the points make sense, an article that's badly written from the technical perspective still has some value. \- Everything can be edited or deleted anyway.

Thanks!

</comment></comment><comment><USER4> In my opinion, I think the better way to write better is to write a personal journal. Only for you.</comment>


An app to learn Japanese kana: Kana Sensei - <AUTHOR> https://github.com/laffachan/kana-sensei <comment><USER2> I looked up at the github repository but README doesn't say much. Would you please update it with information on how to use it or deploy it?

<comment><AUTHOR> Thanks for your reply :) I updated the README with the adress of the app.

<comment><USER2> perfect thank you. cool app.

<comment><AUTHOR> Thanks ! :)

</comment></comment></comment></comment><comment><AUTHOR> Hi all, I created this simple app using React and TailwindCSS. I hope it can be useful, for the beginners in japanese :)</comment>


Why do Chinese websites use numbers in their domain names? - <AUTHOR> http://dashan.com/blog/culture/why-do-chinese-websites-use-numbers-in-their-domain-names/

<comment><USER3> There's another reason: combination of numbers can be made to sound like words or sentences (e.g.: 360 = longing to see you again). [http://en.wikipedia.org/wiki/Numbers_in_Chinese_culture#Comb...](http://en.wikipedia.org/wiki/Numbers_in_Chinese_culture#Combinations) [http://www.my-new-chinese-love.com/chinese-digitalk.html](http://www.my-new- chinese-love.com/chinese-digitalk.html)

</comment><comment><USER4> I don't think the article solved the mystery as the Chinese are not at all unfamiliar with the Latin alphabet.

Chinese students learn the Latin alphabet and use them to spell words before learning Chinese characters. Chinese keyboards only consist of Latin characters. To enter a Chinese character, you type its pronunciation and then select the desired character from a on-screen menu.

<comment><USER5> "To enter a Chinese character, you type its pronunciation and then select the desired character from a on-screen menu."

Not everyone uses a phonetic typing method. Many people use wubi (五笔) which is based on the structure of the characters. Although this still uses a QWERTY keyboard, I suspect it doesn't help make people more familiar with the roman letters (in terms of memory, or mapping letters to English sounds).

</comment></comment><comment><USER6> This is interesting, but has anyone noticed that .cn URLs and Chinese .com's seem to always be a combination of ASCII roman characters and arabic numerals, rather than Chinese characters? Why is this? Is writing in pinyin and converting the URL to Chinese undesirable?

On a side note, has anyone ever noticed Chinese characters in the URLs indexed by Baidu? Is Baidu even able to index URLs with non-ASCII Chinese characters? I've only ever seen roman characters in the URLS they index.

</comment><comment><USER7> Some one has posted the answer to this here : [https://news.ycombinator.com/item?id=7694076](https://news.ycombinator.com/item?id=7694076)

</comment><comment><USER8> This property also makes wifi network passwords easy to guess - <USER2> stores just set it to be the store's phone number.

<comment><USER5> Or to '0987654321', or a series of '1's

</comment></comment><comment><USER9> I suspect this is a shorter duplicate of [http://www.newrepublic.com/article/117608/chinese-number- web...](http://www.newrepublic.com/article/117608/chinese-number-websites- secret-meaning-urls) which was on Digg (IIRC, or maybe reddit) a couple of days ago. It was quite a good article.</comment>


Uber Got Otto on the Cheap - <AUTHOR> https://spectrum.ieee.org/cars-that-think/transportation/self-driving/turns-out-uber-got-otto-on-the-cheap <comment><USER2> This is kind of an absurd article. Even assuming that the numbers are right and that Uber managed to get out of most of the shares since they were due to Lewandowski, and assuming that the value of those shares have dropped (which is NOT how you value a deal- it's valued by the share value at the time, not some random time later). Let's see the opposite side of the coin:

Having bought Otto for basically their 90 employees and putting Lewandowski in charge of their entire AD operation what do they have now? Lewandowski is gone, Delaunay is gone. They have a massive law suit on their hands from Google, and the IP is almost certainly unusable or atleast significantly diminished in value.

Now their engineering group isn't run by anyone they acquired from Otto, most of the good engineers have moved on and in a competitive environment where time to market is essential this disruption has probably lost them a year of development time relative to their competition. That's not even considering their competition was already way better funded. Their remaining employees are facing down the prospect of their shares _dropping_ in value with no one to sell to and huge taxes from when they vested.

This was probably make or break for Uber in the AD space, and it was break. After this, any smart CEO would be looking at trying to get acquired by one of the other AD companies with their key value being the existing user base and supply/demand technology.

</comment><comment><USER3> What I find most interesting is that how this entire time, most headlines have reported a $600+ million number as _fact_.

What is frustrating about that is to the uninformed, it reads like a cash available on hand, in these people's bank accounts. It appears it was far from that.

I'm not a Levandowski sympathizer, but these deals for startup founders in an acquisition are typically complex stock transactions, with strange vesting rules and tons of ways to get diluted or locked out of a liquidity event. Its not typically a grand pay day.

In the future I wish blogs & reporters would focus less on the fact that it was a reported $600+ million, and more on the fact that "it was more than $6 million, and the company had not been around 6 months". That was the real smoke that led everyone to the fire.

</comment><comment><USER4> The most interesting part of this article is discussing Uber's valuation and the SoftBank deal. Shortly before this info about the valuation of Otto came to light, Uber agreed to the SoftBank deal which presumably led some to believe the company was going through a down round of sorts. Could Uber have considered devaluing themselves to downplay the impact of Otto's value as part of the consideration for this SoftBank deal?</comment>


Go Escape Analysis Flaws - <AUTHOR> https://docs.google.com/document/d/1CxgUBPlx9iJzkz9JWkb6tIpTe5q32QDmz8l0BouG0Cw/preview?sle=true <comment><USER2> Russ Cox commented on a couple of the proposed fixes:

> Maybe after the compiler is converted to Go.

> I'm not willing to make major changes to escape analysis right now. I intend > to ask someone to take a look at the whole thing and see whether it should > be changed/rewritten/fixed/etc in a few weeks.

It sounds to me like there are some significant changes coming down the pipe anyway, which may or may not effect the current escape analysis behavior.

<comment><USER3> Vyukov and others have made some allocation-related changes that went by today in [https://twitter.com/golang_cls](https://twitter.com/golang_cls) (small maps and string-related buffers can now sometimes be stack-allocated, variables captured by closures less often need to be moved to the heap, and some other language constructs that used to allocate now don't). It figures that some stuff wouldn't be approved for 1.5; other changes are going on, and some compromise mostly seems like the cost of the regular release schedule they maintain.

</comment></comment><comment><USER4> [tl;dr: I suspect the Go GC isn't very good]

I'm interested and surprised to see people putting much effort into escape analysis for stack allocation. The research that came out in the 90s and 00s pretty much said that if you have a good GC you won't see much benefit to using EA for stack allocation.

[Disclaimer: All of the below written with the expectation of being wrong because my knowledge is out of date, my memory is bad, and/or there are specifics to Go or the implementation which invalidates my points. Still wrote it cause it might be interesting to others or lead to interesting conversation]

OK, why do I say that. Well:

\- It's very expensive to do EA well (O(n^3) or O(n^6) where n is the depth of the call graph). You can do it cheaper in a JIT that has on-stack-replacement (basically where you make optimistic assumptions and reoptimize if your assumptions are invalidated)

\- You do get good payoff from stack allocation, in terms of time spent allocating and deallocating memory.

\- The real payoff from EA is to allow synchronization removal in Java (which shouldnt matter for Go).

\- Stack allocation provides cheap allocation (don't need a malloc, you can just do an alloca, which is a cheap add operation), but a good copying GC provides bump allocation which is better.

\- Stack allocation provides cheap deallocation, but not as cheap as a generational GC which can clear the young generation for very very cheap.

\- Stack allocation also extends object lifetimes, which is bad.

\- Stack allocation also allows you to move object fields into variables which can get values out of memory and into registers, which is good.

\- Stack allocation also has worse locality than a good GC (a copying collector has amazing locality, putting things on the stack doesn't necessarily).

So all this, plus the details in the doc, imply that the Go GC isn't very good. If it were good, it would have better allocation performance than you would get from stack allocation, and the only thing left would be that the benefit from moving values into fields outweighs the costs.

I don't know anything about Go, so this may not be possible, but as a total bystander with no info at all, I'd say don't work on optimizing EA and instead focus on improving the GC.

[disclaimer: please reread disclaimer above]

<comment><USER5> >I'm interested and surprised to see people putting much effort into escape analysis for stack allocation. The research that came out in the 90s and 00s pretty much said that if you have a good GC you won't see much benefit to using EA for stack allocation.

Garbage never generated is garbage never collected. Large enterprise Java apps often still have GC issues despite very advanced GCs to choose from. Also Go's GC is maturing slower than its escape analysis and its object pool (sync.Pool). Go is younger so its GC is weak compared to Java- but it does a good job using the stack and offers a state of the art object pool with thread local caching.

>It's very expensive to do EA well (O(n^3) or O(n^6) where n is the depth of the call graph). You can do it cheaper in a JIT that has on-stack-replacement

Isn't this apples to oranges since one of these is a compile time expense and the other is a run time expense?

<comment><USER6> > _Go is younger so its GC is weak compared to Java_

I see this often repeated, and it's false.

Go's GC is indeed younger compared to Java, but Go being younger doesn't have anything to do with it.

It's not like GC's "mature" and get better with time organically. They mature and get better with the effort put into them, which is different than time.

You can have a GC besting an older language's GC in a language that has 1/10 the years the old one has.

<comment><USER7> Yes, it's not true that software magically gets better with age, but we now have a small team of experts working on the Go runtime, so we expect the GC to improve dramatically this year.

We didn't have those people before, and one reason for that is that the project was smaller then.

</comment></comment></comment></comment><comment><USER5> The author, Dmitry, had a recent escape analysis fix related to maps with impressive results:

[https://go.googlesource.com/go/+/b3be360f16c44d21b2594d06e8d...](https://go.googlesource.com/go/+/b3be360f16c44d21b2594d06e8d0e609e8fe3c0c)

</comment><comment><USER3> Fixing the "dot-dot-dot arguments always escape" issue could in particular mean that logging code no longer risks making things escape even when it doesn't run:

[http://stackoverflow.com/questions/27788813/variadic- functio...](http://stackoverflow.com/questions/27788813/variadic-functions- causing-unnecessary-heap-allocations-in-go)

...which would be cool.

</comment><comment><USER8> I keep on clicking on these Go headlines thinking they are about the board game. :-( I thought this was about flaws in a computer-go algorithm.

<comment><USER9> Given the relative frequency of topics on HN, that seems like a strange assumption.

<comment><USER10> Still, s/Go/Golang/ would help clear up any confusion.

<comment><USER9> So would /s/Go/Gogame/, but I think you'd agree that's a pretty silly suggestion.</comment></comment></comment></comment>