Node.js Best Practices - <AUTHOR> https://www.joyent.com/developers/node/design <comment><USER2> Notice something not on the list of best practices: documentation. While Node itself has excellent docs (for the most part), the Node community is __terrible __about documentation. If you 're lucky you'll get a single README.md file with the basics covered.

Pick any category of module and there's a good chance the most popular modules have little documentation; certainly nothing close to comprehensive.

<comment><USER3> Do they really need more than a single README.md file? Many of those modules are so small that anything more than a single README of documentation would be excessively verbose.

I've never ran into the problem of feeling a module was poorly documented. The especially complex modules usually have more extensive documentation on their website. I'd say there are cases that are terrible or useful documentation for sure, but in general most modules are very good about it from my experience.

<comment><USER4> I want to write a simple node application that fetches an http document and write it to the disk.

The only requirement is for the application to print out in plain English if there is one of the following error:

* the document doesn't exist

* there is a connection error during download

* the local file couldn't be opened

* an error occured during writing.

For any other error(out of memory,...) the program can crash.

How do I do that in node? I don't know.

The request package only tells me the callback's first parameter is _" An error when applicable (usually from http.ClientRequest object)"_. The fs package only tells me _" Event: 'error': Emitted if there was an error when writing or piping data."_

I only picked error reporting as an example so I could showcase the problem of lack of documentation on the most basic APIs (http get and writing file). By the way the Error Handling article [0] on Joyent's website is absolutely wonderful.

Call me old fashioned but how can I use an API that doesn't tell me which function to call, what a function accepts as parameters, what it returns or how it signals error?

[0] [https://www.joyent.com/developers/node/design/errors](https://www.joyent.com/developers/node/design/errors)

<comment><USER5> HTTP has standard error codes that tell you why a file didn't download (ex. 404 means it doesn't exist). File systems behave similarly (ex. ENOENT). None of this is language specific and therefore do not belong in Node.js documentation (except perhaps to say that these Node.js libraries also adhere to the same standards everyone else does but this is obvious the moment one of these error objects is printed or inspected).

<comment><USER6> >but this is obvious the moment one of these error objects is printed or inspected

The point of documentation is that you don't have to run the code to see what the code does.

</comment></comment></comment></comment></comment><comment><USER7> Just a few comments:

> if (!(this instanceof MyClass)) return new MyClass();

If you really want, just throw an exception and kill the program at compile time. Catch programming errors in testing and not do some magic to 'autocorrect' code.

> var localFile = fs.createWriteStream('localFile.tmp');

Always catch 'error's in stream objects. Otherwise, it might thrown an exception at runtime.

localFile.on('error', /* do something */)

Coding style: In most cases if you write you code properly, you don't need to nest more than 3-4 levels. If it gets deeper split it out into separate functions. Otherwise, it's a perfect job for async.series.

<comment><USER2> Agree about the instanceof trick. I hate that pattern. I'm not sure if it's done to avoid using "new" or because people legitimately make the mistake.

<comment><USER8> It's to avoid using "new".

<comment><USER9> Cant you just "return this;" to avoid using "new"?

<comment><USER10> > Cant you just "return this;" to avoid using "new"?

THIS will be the global scope if a function meant to be a constructor is called without new.

Try that in your console

       function Foo(){this.foo = "bar";return this}

then do :

       Foo() ;

it will return window;

so the answer is no.

<comment><USER11> The answer is yes if you do:

        Foo.call({});

<comment><USER12> That's a cool trick, though 'instanceof' won't work in this case.

<comment><USER13> Yup. The proper way to emulate _new_ is

        Foo.call(Object.create(Foo.prototype))

<comment><USER12> Douglas Crockford, is that you? Oh the lengths people will go to avoid using 'new'...

I wonder if any linters out there warn when they see something like:

      something = SomeCapitalizedFunction()

Because forgetting to use 'new' is really the only thing I could think of that makes this pattern dangerous.

<comment><USER14> Yes, jslint and jshint both do, by default, iirc. They'll also warn on the opposite (using 'new' with a function that doesn't start with an uppercase letter).

<comment><USER12> Ah that's fantastic, i've been using them for a while and never noticed.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER15> I'm coding a fairly large application in Node and have never heard of EventEmitter or Streams. Does that mean I'm doing something wrong? The impression I get from the article is that it's such a fundamental patterns that every serious application should use it.

<comment><USER16> They are the two most common node abstractions. You can get by without them but it's pretty important to know about them.

Streams are the more important one. Once you embrace streams in your applications a lot of things become easier. For example here's a small script I wrote at work to process some csvs and do stuff with them

[https://gist.github.com/jb55/0ea6aba86e269f1e526b](https://gist.github.com/jb55/0ea6aba86e269f1e526b)

Needless to say before I knew about streams that program was twice as large and twice as buggy. Also check out substack's stream handbook to learn more, they are really handy.

<comment><USER2> "small"

<comment><USER17> It's 28 SLoC. That's pretty small.

</comment></comment></comment></comment><comment><USER18> I'm personally not a huge fan of the eventemitter for cases where an event is only ever emitted once (an sql query is done or similar).

For 2.0 of Sequelize we've moved almost the entire codebase to promises and will encourage users to interact with Sequelize with promises.

<comment><USER19> Promises and Events are not mutually exclusive. I can imagine a lot of scenarios where both would make sense. But as you said, it doesn't feel right to overuse the EventEmitter mechanism where it's not really needed.

</comment></comment><comment><USER20> Not that long ago, anonymous functions and closures were the height of fashion in every language.

Now the recommendation is to name your functions and avoid closures. This brings us right back to what C programmers have been doing with function pointers since forever. Not that this is such a bad thing.

</comment><comment><USER21> When they say 'avoiding closures', how does that relate to functions in your module? Your module is often exported as a function, so are they suggesting that every function be exported? I suspect I'm not understanding the logic behind 'stack based'. Why is it better to have your functions not contain other functions (or is it not be contained?)

<comment><USER22> It appears they are warning about using closures everywhere to avoid memory leaks.

> are they suggesting that every function be exported?

No. Just export the functions that are used outside of the module. Other functions can be private to the module.

> Why is it better to have your functions not contain other functions (or is > it not be contained?)

1\. It can make the code clearer

2\. It eliminates one source of memory leaks

3\. It allows the V8 runtime to optimize more of your code. There is a function length limit (including comments) before V8 will no longer optimize a function.

module.exports = function fOne() { function fTwo() {

        }

        do something...
        fTwo();

}

Can become:

function fTwo() {

}

module.exports = function fOne() { do something... fTwo(); }

</comment></comment><comment><USER23> Anyone have more insight into the statement "Avoid closures"? Or rather, an alternative to having private functions?

<comment><USER24> Closures are fine, but avoid seagulls:

function() {

      function() {

         function() {

            function() {

            }

          }

       }

    }

<comment><USER25> "Seagulls" amazing! I'm used to calling them pyramids of doom, or laser guns.

<comment><USER26> Looks a bit less like seagulls if you do "});" instead of plain "}" though

</comment></comment></comment></comment><comment><USER27> Very useful!

</comment><comment><USER28> 0\. Avoid using it, unless truly necessary.

</comment><comment><USER29> I have one word: CoffeeScript.

<comment><USER30> pffff, that's not even a word. It's two words stuck together.

<comment><USER9> Typewriter..?

<comment><USER31> Hairsplitter.</comment></comment></comment></comment>


History tells us what will happen next with Brexit and Trump - <AUTHOR> https://medium.com/@theonlytoby/history-tells-us-what-will-happen-next-with-brexit-trump-a3fefd154714 <comment><USER2> The real problem is that prior to the assassination of Arch duke Ferdinand there most likely were writings like these in well respected publications, and yet it made no difference. An avalanche is not the direct result of the first stone going downhill but of storing a bunch of potential energy in an unstable configuration. After that all you need is a suitably large first shove (activation energy) to unleash all of that potential energy.

Humanity has a lot of momentum and if enough deadwood accumulates in the forest because of putting out small fires you end up with a (much) bigger one.

Chances are that we are already long past our 'Arch duke' moment we just don't realize it yet. Historians have the advantage of being able to look at things after the facts are in and if WWI/II had not happened nobody would have assigned much in terms of significance to that particular assassination.

</comment><comment><USER3> > During the Centenary of the Battle of the Somme I was struck that it was a > direct outcome of the assassination of an Austrian Arch Duke in Bosnia.

For an author that claims to know history that is laughingly bad. My 8th grade teached told us - "if anyone of you says that this is the cause or reason for WWI - you fail the whole year. It is a trigger."

> Trump says he will Make America Great Again, when in fact America is > currently great, according to pretty well any statistics.

Except the only real measure of country greatness - its relative standing to the others. It is "To rule in hell ..." when countries compare. The peak of US greatness was 1945-1955. The US at the end of WWII was having half of the world GDP, unmatched industrial base AND sole nuclear power. You just cannot top that.

<comment><USER2> > The peak of US greatness was 1945-1955. The US at the end of WWII was having > half of the world GDP, unmatched industrial base AND sole nuclear power. You > just cannot top that.

Indeed, but that only worked because most of the rest of the industrial world was lying in ruins. By that measure 'making America great again' is scary indeed.</comment></comment>


Ventures of the paypal mafia - <AUTHOR> https://fleximize.com/paypal-mafia/ <comment><USER2> They're not more interconnected than any other group of Silicon Valley people, are they?

The title is offensive, and should be changed.

<comment><AUTHOR> I agree, however I tried to stay true to the original title!</comment></comment>


Show HN: Lagukan, a highly personalized music service - <AUTHOR> https://lagukan.com/ <comment><AUTHOR> If anyone's interested in some technical details:

\- The algorithm is kind of like collaborative filtering, but it filters over previous listening sessions of the same user rather than different users.

\- Backend is written with Clojure on Datomic cloud ions. Having Datalog queries for one thing was a huge help. Not sure if the performance characteristics of Datomic will make it work for this use case in the long term, but I'm planning to stick with it until I have to move.

Sorry the installation procedure is a little janky. I was going to polish it but decided it would be a better use of time to move immediately into developing mobile apps instead since those will reach a wider audience. Let me know if you run into any install issues though.

I've been using this for ~1.5 weeks now and it's been really nice. I hope someone else finds it useful.

<comment><USER3> Would be fascinated to see a writeup on Dataomic being used in anger.

<comment><AUTHOR> I have a writeup for a previous app I made (a budgeting app) here: [https://jacobobryant.com/post/2019/ion/](https://jacobobryant.com/post/2019/ion/)

What things would you be interested in reading about? I'll likely have enough material for another writeup soon.

</comment></comment></comment><comment><USER4> I've never found a perfect recommendation for me simply because data-driven approaches are 1) backwards looking and 2) assume I have a stable set of preferences. My preferences change every month, are tied to certain activities (e.g. workout), and based on mood.

So now I mostly listen to NTS. If I don't like what's on the air I search for a recent episode that looks good. I highly recommend it. [https://nts.live](https://nts.live).

<comment><USER5> Loving NTS, thanks. How do I get the artist/title of the track I'm listening to? Really want to save some of this.

<comment><USER4> Most shows display their tracklist e.g. [https://www.nts.live/shows/ruf- dug/episodes/ruf-dug-28th-jun...](https://www.nts.live/shows/ruf- dug/episodes/ruf-dug-28th-june-2019) scroll down a bit. Often the hosts talk about the tracks.

<comment><USER5> Cannot tell you how much pleasure NTS has brought me. AMAZING

</comment></comment></comment></comment><comment><USER3> I've mostly come to the conclusion that basing music recommendations on bands/albums/songs just doesn't work for whatever my taste is. It seems like the priors are so swamped by popular stuff that I rarely hear anything even approaching the songs I like. Apple Music's For You is particularly bad. Pretty sure in a moment of weakness I must have liked a Mumford and Sons song years ago because it thinks I love folk music. It wants me to listen to country. Data quality is clearly an issue because it thinks I like the rappers Frank Black and Gene because I like Pixies front-man Frank Black and 90s UK indie posers Gene.

I am sure other services exist based on key, chords, dynamics etc - <USER2> recommendations?

<comment><USER6> Exactly. It is also a question of a moment and granularity. I am in the mood to listen to certain kind jazz and I might be in a mood for a different music tomorrow morning.

Most recommendations are either too broad (Louis Amstrong and Tony Bennett is not the same kind of jazz as Miles Davis or Weather Report) or too conservative (Youtube Music Your Mixtape is basically repeating same songs over and over never venturing out). And some seem more like paid adverts then recommendations.

So please grow and give me good recommendations. And I will pay for it.

<comment><AUTHOR> I'll do my best! If you haven't already, you can create an account at [https://lagukan.com/docs/](https://lagukan.com/docs/) and then I'll send you updates as the project progresses.

</comment></comment></comment><comment><USER7> Just want to comment on the title of the app. "Lagukan" in Bahasa (Indonesia's official language) means "Sing it" or "Make it a song"

<comment><AUTHOR> So is Lagukan an actual word then? I lived in Malaysia for two years (as an LDS missionary), so I know about "lagu" and "-kan", but wasn't sure if the combination was actually correct or not.

<comment><USER8> The first thing I saw the name immediately relates to the Malay word Lagu. But no you don't see a word like this in real world, but you can certainly add them together.

</comment></comment></comment><comment><USER9> Somewhat related, Gustav Söderström from Spotify was recently discussing with Lex Fridman about various topics, including the problem of music recommendations. This was pretty interesting.

Spotify had for example acquired some company, which is looking into how music is structured to come up with recommendations. This should help in discovering new music, which does not yet have enough plays to be picked up by more traditional recommendation systems.

[https://www.youtube.com/watch?v=v-9Mpe7NhkM](https://www.youtube.com/watch?v=v-9Mpe7NhkM)

<comment><AUTHOR> Looks interesting, I'll definitely check that out. It's also comforting to hear about music recommendation companies getting acquired ;)

</comment></comment><comment><USER10> Oh man... I haven't been able to find any recommendation algorithms that recommended songs I liked even 1% of. Spotify's is a trash fire. Last.fm's wasn't great. Pandora is okay. I am very interested in this project, but the setup instructions are... long. Not hard if you're good with computers, but long.

Hopefully it'll be worth the hassle, but please try to make it easier to install somehow?

<comment><USER11> Have you tried Gnoosic ([http://www.gnoosic.com](http://www.gnoosic.com))? That is the one that works best for me.

<comment><AUTHOR> I'm thinking of incorporating gnoosic (or something similar--haven't looked yet to see if they have an API) into Lagukan for recommending new artists. Mainly my work has focused on re-recommending songs you already know.

</comment></comment></comment><comment><USER12> I was under the impression that using Spotify's APIs in a commercial project required an agreement with them, presumably that costs money. Have you investigated that or will you have to drop the Spotify aspect if/when you start taking money?

<comment><AUTHOR> I've applied for a commercial Spotify API key. They let you start using it right away. I haven't heard back from them (it's been a couple weeks). It's possible they'll decide not to approve my use case, in which case I'd have to drop spotify support.

I think they mainly want to prevent people from competing with them; I'm not sure if they care too much about charging you money for it (I guess they probably would if you were making a lot of money).

Also, thanks for your work on Mopidy!

<comment><USER13> Good luck with that! I've been hoping to see Spotify support for streaming or searching or casting to a roodready endpoint but Spotify has not been helpful.

<comment><AUTHOR> Thanks! Do you have a link for what roodready is? I did a quick search but didn't find anything.

<comment><USER13> Spelling mistake on my part. I meant "Roon Ready", its a standard that the company Roonlabs created for their streaming solution. I personally use Roon at home as I got tired of losing access to music I loved when Spotify changed contracts.

I still subscribe to Spotify but for anything I love I buy the vinyl/flac copy and store it on my Roon server at home.

</comment></comment></comment></comment></comment><comment><USER14> I would like to try this out, but am not willing to go through the current setup process. You should add a way to be notified when you are done with the first version of the app. I would gladly give my email or twitter.

<comment><AUTHOR> If you sign up for an auth token at the top of this page ([https://lagukan.com/docs/](https://lagukan.com/docs/)), that'll get your email into the system. I should've explained that; I'll update the website.

</comment></comment><comment><USER15> Is it just me, or do all of the "personalized music services" only take a few next songs until they are playing you Justin Bieber, Taylor Swift or mumble rap? These things just converge towards popularity.

<comment><AUTHOR> yeah, that's been my experience too. Hence the plan with Lagukan is to go the other way--we might start out with popular music as a guess, but it'll adapt heavily to your individual preferences as it collects data.

</comment></comment><comment><USER16> What I would love is for you to through the music through SampleCNN to reduce it to a vector representation, and then use that for smoothing. This could help smooth the cold start problem.

<comment><AUTHOR> I'll look into that! I'm no machine learning expert, but I'll certainly be digging into it more as the project progresses.

edit: so after a quick search for "what is smoothing in machine learning", I _think_ I'm doing something similar, though basic, already. Basically each value in the matrix is a tuple of (completions + j, skips + k), where j and k are constants. e.g. "In listening sessions where A was completed, B was completed 3 times and skipped 4 times." But if j and k are 2, then the effective values would be (5, 6). I got this idea from my bayesian textbook.

</comment></comment><comment><USER17> Thank you thank you thank you. I've been wanting something like this for my local MP3 collection for a while. (Might also use it for an RPi music server in the car :D)

</comment><comment><USER18> Wait, Spotify is not already using skips and how much of a song was played to rank songs and build a preference profile? What is it doing exactly, then?

<comment><AUTHOR> I don't know since it's closed source, but I too would think that Spotify is already using skips, but in practice I think their methods are muddied up by other factors, like I mentioned here: [https://news.ycombinator.com/item?id=20585757](https://news.ycombinator.com/item?id=20585757)

In addition, Spotify's algorithms have the significant constraint of needing to optimize profit, and not all tracks they have are worth the same amount (that's what someone told me, anyway).

Also, sometimes algorithms rely too much on explicit feedback like thumbs up/down rather than implicit feedback (like skips). Deezer's "Flow" feature is an example. The way you use it is basically the same as for Lagukan, but from reading reddit posts about it, it apparently just doesn't work very well. There was even a comment from a Deezer employee saying that it won't respond to skips; you have to use thumbs up/down to make it adapt.

Implicit feedback can be more messy to work with, but it's much more plentiful (and useful, if you use it correctly).

<comment><AUTHOR> Also--for the profit optimizing thing, that's why a significant part of my plan is to structure the business in a way that lets me optimize the algorithm for user satisfaction. e.g. I'm thinking about helping artists to sell concert tickets and taking a cut of that.

</comment></comment></comment><comment><USER19> This is a very compelling app idea for me. However nearly all of my music is on Google Music these days so I have no easy way to use it.

My listening is very eclectic though and highly dependent on current mood so I'll be following your project closely.

<comment><AUTHOR> Glad to hear! Unfortunately there isn't an official API for google music, but there is an unofficial python API. In fact, Mopidy has a GMusic extension already. I could probably add support to the current desktop app fairly quickly, although it might not work on Windows, let alone the mobile apps. Would you use it on mac/linux if I added support for that though?

Also, if you sign up for an auth token on this page ([https://lagukan.com/docs/](https://lagukan.com/docs/)), I'll send you periodic updates as the project progresses.

<comment><USER19> I would absolutely try it out on mac.

<comment><USER20> Same. Would definitely want to use this if it would support GPM or YTM.

<comment><AUTHOR> I've just updated Lagukan so it'll play from tracks you've uploaded to google music. I've added instructions to enable google music to the docs: [https://lagukan.com/docs/](https://lagukan.com/docs/)

<comment><USER19> I'll check it out.

</comment></comment></comment></comment></comment></comment><comment><USER21> Have you seen [https://news.ycombinator.com/item?id=20574182](https://news.ycombinator.com/item?id=20574182)

Is it something you can use in your model?

<comment><AUTHOR> I did see it! I haven't looked into it deeply yet, but I think it'll be valuable for later when I need to make the algorithm scale better.

<comment><USER21> To me it seems like a recommendation can be based on two main factors: objective similarity (distance in some space, or matching some features), and the statistics from users who connect two pieces together by liking both. It's not clear how to balance them.

<comment><AUTHOR> In practice I think objective similarity ends up being a form of the latter, i.e. basically the average of all user's preferences. The plan with Lagukan is to have a hierarchical model that'll default to the objective/averaged similarity but then shift over to a more individualized model as data is collected on the given user.

(Actually, it already contains a hierarchical model like this, but it's used for adapting to the user's current mood, not for recommending new music)

<comment><USER21> Wait, are you saying you don't currently use any objective similarity metrics (distance or feature based) in your model?

<comment><AUTHOR> Not directly. It starts out doing random shuffling over your existing collection (local mp3s, spotify playlists and spotify saved tracks), and then uses your skipping data to build the model.

If you've got a spotify premium account, it'll use spotify's recommendation API to occasionally mix in new songs based on your current listening session. Presumably their API uses objective metrics.

<comment><USER21> Do you see the value of incorporating objective similarity metrics into your recommendation engine? I don't know if you can tap into something like Gracenote API, but I'm sure it would improve the quality of your recommendations.

<comment><AUTHOR> Yeah, I'm planning to integrate as many metrics as I can. The key thing is just that the system has to be able to adapt on the fly. So Lagukan will have all these different inputs/different recommendation engines, but it'll only use them as hypotheses to be tested rather than the final word. As we get more data about an individual user, the system will figure out how effective the different engines are for that particular user.

So it's on the roadmap for sure. I'm hoping to get more scaffolding up so I can have some kind of revenue stream, and then I'll start to iterate much more heavily on the algorithm.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER20> Is this always going to need Mopidy?

<comment><AUTHOR> No. I'm working on mobile apps which of course won't use Mopidy. After that I'll come back to the desktop version, and there's a good chance I'll roll my own instead of continuing to use Mopidy. (If I keep using Mopidy, I'll improve the install process so it's not so painful).

</comment></comment><comment><USER22> edit: figured out, thanks for quick feedback!

<comment><AUTHOR> There should be two buttons that say "Sign in with email" and "Sign in with Google" respectively, either of those will create an account for you. If they're not showing up, maybe see if you've got a browser extension blocking it?

<comment><USER22> ah okay, yeah i'm blocking gstatic.com

related: signing up with email requires loading a google domain? that's... really unfortunate. understandably probably not a priority for you, but hopefully one day i can try this out without loading google resources

<comment><AUTHOR> yeah, sorry about that. I use firebase for authentication since it's the quickest-to-set-up auth solution I'm aware of. But later on I'll see what I can do.

</comment></comment></comment></comment><comment><USER23> setting this up is profoundly laborious, not to mention risky considering I have to enter my spotify username/password in a config file somewhere...

<comment><AUTHOR> Yeah, sorry about that. This prototype was optimized for development speed; I'm working on mobile apps now which will be easier to use. I'm not positive if the plaintext username/password is strictly required, but it's in docs from the spotify plugin's author ([https://github.com/mopidy/mopidy- spotify#configuration](https://github.com/mopidy/mopidy- spotify#configuration)). I think it may be related to the fact that a native integration with spotify is only possible through a lib that spotify abandoned a while ago, so it's a bit of a hack.

<comment><USER12> Spotify's closed-sourced abondon-ware libspotify library requires the username and password. I'm not convinced by the argument that storing those details in a suitably protected text file is particularly risky but I appreciate others may have other ideas. You can actually read the password from the system keyring but we don't document that very well since it's more of a hack (if I remember correctly).</comment></comment></comment>


A guide to Web Scraping without getting blocked - <AUTHOR> https://www.scrapingbee.com/blog/web-scraping-without-getting-blocked/ <comment><USER2> This is a pretty clear and concise overview but I wish it went into a little more technical detail, especially about running multiple concurrent browser instances.

<comment><AUTHOR> Hi and thank you very much !

We plan to write one detailed blog post on every part of this overview.

Headless browsing will have one!

<comment><USER3> Awesome can't wait.

</comment></comment></comment><comment><USER4> very informative, thanks! i coincidentally just posted a blogpost about the other complementary approach using pure HTTP requests without headless browsers: [https://news.ycombinator.com/item?id=21770576](https://news.ycombinator.com/item?id=21770576)</comment>


Out in the Open: Say Hello to the Apple of Linux OSes - <AUTHOR> http://www.wired.com/wiredenterprise/2013/11/elementaryos/

<comment><USER2> This may sound silly, but ElementaryOS has revived my hope of a usable Linux desktop. And then some.

It stays out of my way completely. And when I need it, it's intuitive in use while looking beautifully. It's simple, but complete. Solid, for most parts.

Sure I have my gripes, and I've had to change my workflow a little, but the design and the 'out of your face' mentallity makes it worth it.

Compared to XFCE, for me it is far more focused and complete. It feels like a whole. Compared to GNOME, it does not try to reinvent the wheel, but it is not afraid of change either.

These guys cannot get enough good press.

</comment><comment><AUTHOR> Wired calling us "New Linux Operating System Is an Open Source Apple OS X" made me very sad. Still, I think we have to be happy for their article since media coverage and feedback is always more than welcome.

Personally (but I think other elementary hackers agree with me), I feel like we have our very own identity, philosophy and beliefs and it saddens me that Wired (and many other people too) consider us the "OS X" of Linux OSs. In my opinion, we are more than that, but we'll keep on working to proof just that hopefully.

<comment><USER3> > I feel like we have our very own identity, philosophy and beliefs

Care to articulate them here?

(I'm sorry about the attention your project received on Wired. That's really rough, I can't imagine what you must be going through, getting publicity like that.)

</comment></comment><comment><USER4> I think eOS is a great distro. I used it for a week and I found it to be even more stable than Ubuntu 12.04 LTS. But it has a way too much mac appearance though, probably because of the dock?? I was using it on my work computer and someone stepped in to my cube and said...oh, you are using a Mac now! I tried to explain but the Mac tag was already there ..I went back to Ubuntu the next day.

<comment><USER5> wow, that's insecure! A co-worker mistakes your desktop for a mac and you take the time and trouble to switch operating systems!! haha.

if you only tried it for a week it's hard to make any judgement about stability. Even Windows can stay up for a week.

</comment></comment><comment><USER6> I feel like I should really be reconsidering using Linux as a primary OS.

<comment><USER7> I've tried like hell, I mean I've really tried, been trying to use Ubuntu, but it just keeps failing me. Like copy & paste isn't reliable! Something that should just work, just fails for me all too often.

<comment><USER4> I never have had a problem copying stuff in Nautilus or text editors in Ubuntu...the biggest problem I have dealt with is Nvidia drivers...but Ubuntu 13.10 runs very smooth on my laptop with nvidia drivers...Ubuntu is coming along pretty nice...</comment></comment></comment>


U.S. Environmental Protection Agency Plans to Tie Its Own Hands - <AUTHOR> https://www.bloomberg.com/view/articles/2018-10-10/epa-mercury-rule-making-proposal-threatens-the-environment <comment><USER2> I don't have much opinion about the other stuff they are doing like challenging China on trade but what the EPA is doing seems outright evil. Instead of increasing standards they seem to be hellbent to go back to the glory days of 100 years ago when companies could pollute as much as they wanted. And the whole push for more coal seems incredibly stupid. Instead of taking the leadership with renewable energy they want to prop up an industry that's (hopefully) on the way out.

<comment><USER3> This administration has found the person who has the most incentive to destroy a particular government agency, then puts them in charge of it.

See: Pruitt & EPA, DeVos & DoE, Pai & FCC.

And now Kavanaugh has been put on the Supreme Court specifically because his view is that the entire idea of Congress delegating authority to government agencies is unconstitutional.

<comment><USER4> > the entire idea of Congress delegating authority to government agencies is > unconstitutional.

Authority? More like responsibility, aka implementation. I happen to believe that congress born agencies should never have been created. Anything Congress creates becomes a self-sustaining, unkillable organization, because...Congress is glacial in deciding anything.

Any government born agency (regardless of branch) has authority. Which is more efficient and reliable, Congressional Agencies or Cabinet Bureaus? The threat that a Bureau can be dissolved at any time is important to their operation.

<comment><USER2> I am not sure what you are trying to say. Do you have any examples?

<comment><USER3> I believe he's getting at the Nondelegation Doctrine [0].

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

<comment><USER5> This would also prevent congress from delegating war making powers to the President. In essence a formal declaration would then be required before military force could be used. I think it would be a healthy change.

<comment><USER2> Congress seems to have given up on using their powers because they are way too busy fighting each other. So they delegate decisions to the president.

</comment></comment></comment></comment></comment></comment></comment><comment><USER6> It's a big bummer when your kid is a picky eater, loves tuna, but you have to severely restrict it because it's loaded with mercury.*

One thing I've learned about constraints is that they breed creativity. It's one of the reasons why I think a well-regulated market isn't a bad thing.

How many of your unconstrained projects withered due to choice paralysis? How many of your tightly constrained problems led to some of the most satisfying solutions?

(* I've recently discovered Safe Catch brand tuna which claims to be tested for mercury and safe for athletes, children, etc. Haven't verified their claims, but looks promising at least.)

<comment><USER7> Also - if you're talking about canned tuna, the "Chunk Light" is generally made from Skipjack which is a smaller fish and will have less bio-accumulated mercury than any other tuna.

<comment><USER6> Did not know that, thanks!

<comment><USER8> 1\. Rules are good. They force creativity! 2\. Did you know that the rules have allowed Skip Jack fishers to call it something else and you have been missing out on this healthy alternative all this time?

Great conversation.

You need to consider also that there is a lot of creativity destroyed because of the rules, and this is difficult to see or imagine. The seen vs the unseen is a Bastiat classic idea, but it is well summarized in Economics in One Lesson by Henry Hazlitt (only about 200 pages).

<comment><USER6> Thanks for the book recommendation, I'll check it out.

Believe me, I think there's too much red tape in _plenty_ of areas of government – I definitely don't see it as black & white.

</comment></comment></comment></comment></comment><comment><USER9> "It is difficult to get a man to understand something, when his salary depends on his not understanding it."

Top coal producing states (Note: only one went Democrat in 2016 presidential election) Wyoming: 297.2 (41%) West Virginia: 79.8 (11%) Pennsylvania: 45.7 (6%) Illinois: 43.4 (6%) Kentucky: 42.9 (6%)

Coal industry job count info: [https://www.washingtonpost.com/news/politics/wp/2017/03/20/t...](https://www.washingtonpost.com/news/politics/wp/2017/03/20/there- are-fewer-coal-miners-than-you-might-realize/?utm_term=.15628c3071a3)

Coal industry political donations: [https://www.opensecrets.org/industries/indus.php?ind=E1210](https://www.opensecrets.org/industries/indus.php?ind=E1210)

Pretty clear why the current administration is hellbent on supporting coal in contrast to facts.

</comment><comment><USER10> When I was in college, my tech-heavy school was about 50% Republican.

No more.

The GOP's descent into anti-intellectualism started with a war on science and has since escalated to a war on engineering.

Unfortunately the GOP seems bound to win that war.

<comment><USER11> This has more to do with the success of Cultural Marxists in there takeover of colleges than anything done by the GOP.

<comment><USER10> No. IT doesn't. It has to do with the GOP's platform being at odds with the domain knowledge of engineers.

</comment></comment></comment><comment><USER12> The political drive to intentionally limit the arguments for well established chemistry and science is absurd to say the least. But it remains true:

Lead, cadmium, mercury, arsenic, and other chemicals do not have a political leaning. They dont selectively impact the democratic left more so than the right. They dont hang out at coffee shops or read Marx. These are chemicals that are regulated, arguably, because plutocrats began to realize they could not use their boundless wealth to escape them. They are regulated ultimately because they have been scientifically proven a unilateral threat to human health if uncontrolled.

<comment><USER10> > Lead, cadmium, mercury, arsenic, and other chemicals do not have a political > leaning. They dont selectively impact the democratic left more so than the > right.

Yes they do, unfortunately.

If you look at state-level regulation of industrial activities in the South, you'll notice that the cavalier attitude towards pollution only applies when it's the poor and the dark skinned who live downwind or downstream.

<comment><USER13> I'm not sure that is true. When I read Arlie Hochschild's _Strangers in Their Own Land_ it focused on a largely white community in Louisiana, where practically everyone had first-hand experience of harms to people and the environment from local chemical industry pollution. The town and its leaders were nonetheless very supportive of the old polluting businesses and their new expansion plans. The residents also opposed federal regulations that would limit industrial pollution more than Louisiana's extremely lax state laws.

In Washington state, the Hanford facility that made plutonium for weapons was also largely staffed by prosperous white workers. Before the end of the Cold War, that community of workers knew better than anyone the risks that they and sometimes neighboring communities were exposed to by time pressures and lack of oversight. That same community was also fiercely protective of their employers and resisted health/environmental oversight by "outsiders." (See Kate Brown's _Plutopia_ for a fascinating history.)

</comment></comment></comment><comment><USER14> I wish this kind of topic would draw more attention and discussion. Greed is absolutely infuriating. I have similar "poison people to save money" energy project in the making in my country. Engaging in activism and crowd funding.

</comment><comment><USER15> It's pretty unfortunate, especially in light of the recent UN Climate report that the US is using its power to prop up the fossil fuel industry. Given current cost trajectories, coal was going to have a hard time competing against renewables. But if the health and safety regulations that coal operates under are greatly reduced or removed, coal may become very competitive again, to the detriment of pretty much everything and everyone else.

Mercury is a known harmful substance, and while the coal companies state they don't plan on taking advantage of any reductions I find it hard to believe that if a plant found itself not in compliance with old standards that it would voluntarily disclose and correct the issue if not required. Changing the way standards are calculated will also go a long way towards changing the standards on other pollution limits. The end result is more poison in our air, rivers, and bodies.

Add to this the Trump administrations draft plan to use the Defense Production Act to mandate the purchase of coal power and you have a pretty stark narrative.

<comment> java-man depressing.

</comment></comment><comment><USER16> Expected this to happen when you have EPA administrators who are former lobbyists and whom previously opposed the EPA

<comment><USER17> Exactly.

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

</comment></comment><comment><USER18> Whether you agree or disagree with the current administration's policy, PLEASE VOTE. Voting is how you change the country towards the direction you want. If you want to know who is up for elections, you can visit [https://www.ballotready.org/](https://www.ballotready.org/) .

</comment><comment><USER19> I don't think that Trump style Republicans will be in power long, so in addition to worrying about the short term consequences of gutting the EPA, I that the blowback when they aren't in power will be so extreme that we'll go to far in the other direction.

<comment><USER9> Until Gen X and younger are in political power, things will continue as they are. I'm sure there are outliers, and admit it is difficult to make generalizations about an entire generation, but it's pretty evident that Baby Boomers are in support of anything that keeps their taxes low, yet ironically supports their Medicare, Social Security, and defense industry spending.

[https://www.forbes.com/sites/niallmccarthy/2016/11/09/the-20...](https://www.forbes.com/sites/niallmccarthy/2016/11/09/the-2016-elections- generation-gap-infographic/#6240672e497b)

[https://theweek.com/articles/627505/how-baby-boomer- psychodr...](https://theweek.com/articles/627505/how-baby-boomer-psychodrama- infected-2016-election)

<comment><USER19> Trump won by around 80k votes in 3 states. Very small changes would have produced a dramatically different outcome. For example, if you'd had the same election with the projected demographics of 2020 (remove all of the people who died between 2016 and 2020, add in voters who were [14,18) in 2016, naturalized citizens, greater proportion of gen x and millennials etc..), its likely he would have lost (note this isn't the same thing as saying he's guaranteed to lose in 2020). If you had the 2016 election with the demographics of 2024, he definitely would have lost.

As it stands, Trump has absolutely abysmal approval ratings for such a strong economy. If we have a recession sometime before he leaves office, I think a complete Democratic takeover of the House Senate, and Presidency is very likely.

Right now 538 is showing around an 80% chance that Republicans lose the House next month.

<comment><USER20> Another way to visualize how close the last election was;

If the sparsely populated Upper Peninsula of Michigan were part of Wisconsin and if the Florida Panhandle were part of Alabama, Clinton would've won. These odd little geographic quirks have an enormous impact on our national politics.</comment></comment></comment></comment>


Lawyer recommendations? (with startup experience) - <AUTHOR>

<comment><USER3> On the topic of "general lawyer-searching advice", here are some useful links from Venture Hacks:

<http://www.venturehacks.com/articles/term-sheet-hacks#comment-24> :

"There are plenty of lawyers who know VC terms and VC deals very well, yet are not in the VC's back pockets. Ask around your business community - you will quickly learn which lawyers you can trust as being more company/entrepeneur focused, and which ones will be good VC lawyers but too cozy with VC's for a smart entrepeneur to really trust. Doing VC deals on the investor side is a low-margin business given the severe downward fee pressure from the VC's - some firms stock up on VC deals and go for quantity over quality; others will do a VC deal _for the Company_ but will generally only occasionally work with VC's. Also, many VC-back-pocket lawyers will sell themselves to you as having all the connections to the VC's and can get your company in front of all the big players, but that should be an alarm bell. There is a difference - <USER2> around with people who have been there and whose opinion you value and trust, and you will find it."

<http://www.venturehacks.com/articles/term-sheet-hacks#lawyers> :

"Most law firms do a lot more business with VCs than they are likely to do with you. VCs refer new clients to the law firms, hire the law firms regularly, and know the attorneys socially. Where do you think the law firms' loyalty lies?

The basic incentives between you, your law firm, and your prospective investors are not in your favor. Your lawyers make money by executing transactions and your investors simply bring more transactions to your lawyers than you do."

<http://www.venturehacks.com/articles/term-sheet-hacks#comment-49> :

"We have always said at our firm that you can represent VCs or entrepreneurs, but not both, for the very reason you identify. You can't aggressively protect a founder if you are concerned that it might cost you the legal work for raising a VC's next fund. The VC community is simply too small, and business matter are too personal. You hit the nail on the head, regardless of what my colleagues say."

</comment><comment><USER4> Those guys from Goodwin Procter that spoke at Startup School seemed really good to me, and I've traded a few emails with Mark.

</comment><comment><USER5> We use WSGR in CA and Goodwin Procter in MA.

<comment><USER6> Just in case you're not all up on the inside-the-valley lingo: WSGR is Wilson Sonsini Goodrich & Rosati. From their website, I see they're offering a private (?) seminar series called "Entrepreneurs College". That sounds vaguely familiar... ;-)

<comment><USER7> Dude-Entrepreneurs College is open to anyone; I'm currently attending the NYC sessions and it's pretty good. Gives you a very good sense of the legal and financial issues you're going to face - and you're getting the perspective of real practionters.

It's also not just 2nd year lawyers talking - Rosati (yes, the dude with his name above the door...) was one of the first speakers.

</comment></comment></comment><comment><AUTHOR> I am seeking a good lawyer to help us with the legal side of our startup. Initially I'll just need assistance with incorporating and drafting an IP release statement from my current employer, but I'd like to establish a long term relationship for future legal advice. So for this reason I'd prefer someone who has had experience dealing with tech startups specifically.

We'd like someone who is good but our limited funding wont allow for a firm who charges a lot.. I know, I know, these goals are mutually exclusive but I was hoping someone on this forum might have some recommendations.

Any general lawyer-searching advice is also appreciated. I know many here have been through this process..

Please feel free to contact me off list at jsjenkins168 (at) gmail.com too. Thanks.

</comment><comment><USER8> We went through this question awhile ago, and found a local lawyer in Denver CO that we are happy with. If you want to read the post we made on finding a lawyer it can be found here, <http://blog.pretheory.com/arch/000431.php>

</comment><comment><USER9> For the Canadians in the crowd: Do you have any recommendations for a Canadian firm, preferably in Ontario?

<comment><USER3> I don't know this person or firm but check out Suzie Dingwall Williams: <http://www.venturehacks.com/articles/term-sheet-hacks#comment-49></comment></comment>


There are over 70k dog books on Amazon - <AUTHOR> https://www.nytimes.com/2019/04/29/books/review/vanessa-woods-brian-hare-dogs.html <comment><USER2> They're good dog books, John.</comment>


City cycling in London is a joke - <AUTHOR> http://ssj3gohan.tweakblogs.net/blog/11985/city-cycling-in-london-is-a-joke

<comment><USER2> I think the desire for bike infrastructure often distracts from the real problem, which is the excessive number of cars and large vehicles. The only way to fix transport in central London is to find ways to ban private cars (and preferably HGVs) completely. There simply isn't enough room for busy roads. The endless stream of traffic makes the city a usability nightmare for anyone on foot.

</comment><comment><USER3> The infrastructure for cycling in London sucks, but I find it remarkably easy to get around.

My first or second day riding here I was unfamiliar with the territory so spent a lot of time paying attention to signs, markings on the road, laws. It made for a confusing and difficult ride.

Since then I have been paying less attention to the infrastructure and more to the situation. Keep your head up and don't be afraid to break the rules a bit, and you'll have a fun and quick ride. Just be wary that your decisions don't impact drivers because we need as many good graces as we can get :)

</comment><comment><USER4> The infrastructure for bikers in Holland is not always as brilliant as the writer is suggesting. I'm living in Amsterdam and I would say that it's equally dangerous to bike here as it is in London:

Pretty 'random' bike paths such as the one on the picture near the author's house in Holland are virtually nonexistent here. And although there are pretty clear traffic rules for right of way, many people don't obey them, so in practice you'd better use your eyes, ears and common sense otherwise you won't get very old.

<comment><USER5> It is not brilliant, but it is the best in the world, in my opinion. I am Dutch and have cycled in many countries, including UK, Germany, Switzerland, Belgium. Nothing beats Holland.

It is also the collective mindset of the Dutch car drivers. They know they can expect a cyclist pop up any time from out of nowhere.

<comment><USER6> Definitely. London is completely sub-standard, it doesn't stand any comparision with the German or Dutch cycling networks.

</comment></comment></comment><comment><USER7> A+++ totally correct.

All I can say is never ever come to America with your bicycle.

</comment><comment><USER8> Dear author, please don't ever even think of coming to Poland and admiring its extensive network of bicycle routes with world-class solutions like this one: [http://bi.gazeta.pl/im/14/25/ba/z12199188P,Sciezka- rowerowa-...](http://bi.gazeta.pl/im/14/25/ba/z12199188P,Sciezka-rowerowa-na- ul--Bukowskiej.jpg)

In comparison, London is awesome. I miss the CS3.

<comment><USER9> Really? I hate the CS3, I find it terribly designed. That's not to say other places are worse. The thing I dislike is the feeling you get: "There you go, we've built you a superhighway, no more complaining, and make sure you get out of the way of all the cars because they're more important than you are."

Problems with the CS3 and other similar routes include:

# Crossing T-junctions across right-turning traffic.

# Very narrow in parts.

# Swap from one side of the road to the other, taking you at a right-angle across moving traffic.

I get the distinct feeling that motorists and pedestrians around the CS3 feel they need 360 degree vision because they never know which direction the cyclists are coming from.

<comment><USER10> Narrow Street to Horseferry Road is my favourite part - you have to veer across a busy road into oncoming traffic.

[https://firstname.lastname@example.com,-0.0379109,19z/dat...](https://firstname.lastname@example.com,-0.0379109,19z/data=!3m1!1e3)

<comment><USER11> I just call that 'executing a right-turn'. I do take issue with the position of the turn area. Because the turn leads to a contraflow cycle lane on a one- way road with the cycle lane on the 'wrong' side, the position to take up when waiting to turn right is sooner than for a normal junction which confounds the expectations of every other road user around you, unless they know the area and/or are paying full attention.

<comment><USER10> "a right-turn" doesn't generally take you into oncoming traffic though.

</comment></comment></comment></comment></comment><comment><USER12> Oh, believe me it can get much worse than that. Here is how people commute in my home town:

[https://www.youtube.com/watch?v=vWDlYGraT7Y](https://www.youtube.com/watch?v=vWDlYGraT7Y)</comment>


LimeWire Developer Creates MuWire, an Anonymous File-Sharing Application - <AUTHOR> https://torrentfreak.com/limewire-developer-creates-muwire-an-anonymous-file-sharing-application-200814/ <comment><USER2> >When we tried out MuWire it reminded us of some early file-sharing applications, with an old-fashioned look and an interface that may be a bit overwhelming to non-tech-savvy users ... downloading larger files can take days, instead of hours, or minutes. This is an experience veteran file-sharers may recall from many years ago.

Got me trying hard to remember what the Mac file-sharing app was I used to use 'back in the day'. I think it even predated Limewire. Luckily ~~Google~~ StartPage was my friend:

Anyone else remember "Hotline"? [0]

Ahhh! --Great days! Thinking you had a blazing fast download if you got over 3k/sec and starting a download on Wednesday, in the hope it might be finished by the weekend!

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


Build Your Own FPGA (2012) - <AUTHOR> http://blog.notdot.net/2012/10/Build-your-own-FPGA <comment><USER2> Don't miss the gem in the comments...someone answers this question there:

 _" Hi. Is possible use this like a "industrial" fpga? For example, for minning bitcoin? Because the fpga is very expensive here in Brazil, and the 7400 is cheap. "_

<comment><USER3> Top comment on the post (from 2012) is by Lee_Felsenstein [1] of Homebrew Computer Club fame and designer of the Osborne 1, the first successfull portable computer (Lee had no part on tanking the company though, Osborne did that all by himself). Quite awesome to have such legents comment on your project.

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

</comment></comment><comment><USER4> I love the idea of this! It reminds me of the megaprocessor project[1] but much more accessible in its scale, and way easier to understand.

The writeup is very clear, and the boards themselves are very easy to follow in operation. The more I think about it, the more I feel the need for a wall sized array of them acting as a clock. Maybe with a flipdot display for the time? The main issue I see is that the busses are pretty narrow and the there isn't a dedicated crossbar for the routing so the placement is going to be really challenging and probably involve a lot of 'inactive' modules that are just acting as a passthrough for the wiring.

[1][http://megaprocessor.com/](http://megaprocessor.com/)

</comment><comment><USER5> Hm, this makes me wonder, are there any hand-assembled TTL computers that can send UDP packets on the internet? ChaCha20 is easy enough to implement and simple enough that you could probably do encrypted chat between two almost- definitely-not-backdoored computers if so.

EDIT: though, I supposed you don't need your NIC to be trusted any more than your ISP's router, so an esp8266 might be sufficient.

<comment><USER6> [http://www.homebrewcpu.com/](http://www.homebrewcpu.com/)

A computer built from 74-series logic running Minix (with a full tcp/ip stack). Once upon a time you could telnet into it.

</comment></comment><comment><USER7> Perhaps someone can design an FPGA and have it fabbed by Google for free! See: [1]

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

</comment><comment><USER8> Another open FPGA project:

[https://github.com/haojunliu/OpenFPGA](https://github.com/haojunliu/OpenFPGA) [https://www.eecs.berkeley.edu/Pubs/TechRpts/2014/EECS-2014-4...](https://www.eecs.berkeley.edu/Pubs/TechRpts/2014/EECS-2014-43.html)

</comment><comment><USER9> I like this. Real FPGAs use the same realization of an n-input LUT as a 2^n bit shift register plus a mux, which is why e.g. Xilinx lets you have an SRL16 for the same cost as a LUT4--the shift register is primarily intended to hold the LUT configuration bitstream, but you can repurpose it as user logic.

</comment><comment><USER10> The form factor kinda reminds me of mostly misguided project I toyed with in early 00's. The idea was to get useful amount of computing power for massively parallel applications on shoestring budget by building 2D network of boards in this form factor that either contained "8051 on steroids" MCU or small-ish Altera CPLD.

<comment><USER11> Tilera was doing this but it never caught on. Probably just hard to build applications that fully utilize its capabilities.

And Green Arrays did the same on the lower end but with forth language processors.

</comment></comment><comment><USER12> If curious see also

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

Discussed at the time: [https://news.ycombinator.com/item?id=4726724](https://news.ycombinator.com/item?id=4726724)

</comment><comment><USER13> The circuit board modules that make up the cells of the FPGA are reminiscent of PLC's.

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

</comment><comment><USER14> This is a blog post from 2012, which should be noted in the title of the HN discussion by appending "[2012]".

<comment><USER12> Added. Thanks!</comment></comment>


China overtakes U.S. for healthy lifespan: WHO data - <AUTHOR> https://www.reuters.com/article/us-health-lifespan/china-overtakes-us-for-healthy-lifespan-who-data-idUSKCN1IV15L <comment><USER2> Congratulations to China and the Chinese people who have managed to measurably improve their livelihoods over the last few decades.

<comment><USER3> As a developing nation, China should indeed be experiencing an increased lifespan. But under normal circumstances, China's life expectancy increases should be getting closer and close to the curve of developed nations without actually touching - because all countries should be making progress.

So the obvious story here is the actual decrease in US life expectancy, a situation broadly reflecting declining living conditions in the US.

<comment><USER4> >So the obvious story here is the actual decrease in US life expectancy, a situation broadly reflecting declining living conditions in the US.

True, however complicated by the obesity pandemic. Some informed estimates posit that by 2030 the majority of Americans will not be merely overweight but outright obese. [0] That alone is surely sufficient to retard and revert the US life expectancy.

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

<comment><USER5> Recent declines are largely attributable to opioids.

After that, suicides and alcohol are major contributors.

[https://www.vox.com/science-and- health/2017/9/20/16338996/dr...](https://www.vox.com/science-and- health/2017/9/20/16338996/drug-overdoses-life-expectancy)

But yeah, the opioid epidemic is so large it's noticeably shifting overall mortality stats.

Obesity related mortality actually improved from 2000 to 2015, though possibly as a result of better interventions, I'm not sure.

<comment><USER6> I sort of feel like the contributors are a cluster of symptomatic problems all rooted in inequality, from lack of universal healthcare, to more people in prison than any nation (where prisoners then get substandard health care), to underfunding of wages to an increasing underclass. It seems we have this storm of rising problems in the US.

</comment></comment></comment></comment></comment><comment><USER7> This study is backward looking; it hasn't taken account of China's current set of factors that could skew the lifespan down tremendously for average Chinese citizens. Factors such as

1.) Air pollution. In your typical big cities, e.g Beijing, it average AQI 100-150 for the past 10+ years [https://young-0.com/airquality/](https://young-0.com/airquality/). In other lower tiered cities, it average between 50-100. Just to compare, WHO recommend only AQI of 25 in 24 hour span to be ok for your health. And even though recently Beijing's AQI has gone down, what the government has done is they pushed the coal-burning factories into the countryside, and moving the pollutions there.

2.) Water pollution. Cancer causing ingredients have been found in several water sources. for example: "Shanghai water supply hit by 100-tonne wave of garbage " \- [https://www.theguardian.com/world/2016/dec/23/shanghai- water...](https://www.theguardian.com/world/2016/dec/23/shanghai-water-supply- hit-by-100-tonne-wave-of-garbage) [https://qz.com/113751/only-3-of-shanghais- river-and-lake-wat...](https://qz.com/113751/only-3-of-shanghais-river-and- lake-water-is-clean-enough-for-household-use/)

3.) Smoking/smokers everywhere. "Smoking Will Kill 200 Million In China This Century" [https://www.huffingtonpost.com/entry/smoking-will- kill-200-m...](https://www.huffingtonpost.com/entry/smoking-will- kill-200-million-in-china-this-century-report- says_us_58f26221e4b0da2ff8612b55)

<comment><USER8> All valid points. The good news is that China has big ideas for dealing with these, and will actually implement them.

I have no love for the CCP. I think they are an oppressive regime that unduly subjects their people to censorship and control. But I do respect that they invest in infrastructure and solving big problems for their people.

The US seems to have given up. It seems to think that the problems we face are unsolvable by cooperation and have resigned us to crumbling roads, poor health outcomes and failing schools so corporations can flourish.

<comment><USER9> The CPC has always had big plans for solving air pollution and smoking problems, ever since I started living there in 2007. Each campaign subsequently failed, so they don't have a great track record on actually "getting things done." Maybe it's different this time, but a healthy dose of skepticism is definitely warranted.

Once my wife was pregnant, we had to leave Beijing, there was no way the air pollution problem would have been solved in time, even if the air got twice as clean it would still be way too much. Say what you want about the USA, but being able to open my windows everyday is incredibly liberating.

<comment><USER8> The Economist says the opposite: [https://www.economist.com/the-economist- explains/2018/01/25/...](https://www.economist.com/the-economist- explains/2018/01/25/how-china-cut-its-air-pollution)

<comment><USER9> Are you saying that this article makes the claim that the government has successfully dealt with the problem or just that the current campaign seems to be effective?

</comment></comment></comment></comment></comment><comment><USER10> I assume the WHO relies on local census & medical data to generate these statistics (the Reuters piece doesn't have a citation on ths) so I'd take this data with a grain of salt until we hear more details about the methodology.

<comment><USER11> I agree. Although, it also wouldn't be terribly surprising for China to pass the US on this metric.

When you look at the obesity numbers:

US 36%, New Zealand 31%, Canada 29%, Australia 29%, UK 28%, Israel 26%, Ireland 25%

Thailand 10%, Indonesia 7%, China 6%, Philippines 6%, South Korea, 5%, Vietnam 2%

Vietnam's life expectancy will overtake the US in the next 10-15 years as well most likely (they're about three years behind). In most cases if you prevent people from starving or suffering serious malnutrition, provide a basic level of healthcare & sanitation, and have single digit obesity levels, you'll almost automatically see 75-80 year life expectancies.

South Korea's life expectancy went from 65 years, to 82 years currently, from just 1980 to 2015. They passed the US around 2003. South Korea's GDP per capita was $14,000 at that time, versus $40,000 for the US. One would expect China to have no problem replicating that.

It's a small wonder life expectancies in the developed, high obesity countries are as high as they are. The US is no doubt expending hundreds of billions of dollars extra per year on healthcare as a consequence of its obesity level (cancer, disability, diabetes, etc).

<comment><USER6> It's not just obesity that drives poor US life expectancy performance. Mexico's life expectancy is projected to rise meet the US life expectancy by 2030, and they're a nation with a fairly high obesity percentage.

[https://www.cnbc.com/2017/02/22/us-life-expectancy-is-low- an...](https://www.cnbc.com/2017/02/22/us-life-expectancy-is-low-and-is-now- projected-to-be-on-par-with-mexico-by-2030.html)

We have to acknowledge that the lack of Universal Healthcare in the US is a big driver of our poor life expectancy showing.

<comment><USER11> Without question. The US for example had a higher life expectancy than New Zealand during the 1980s, then the US began to trail off and fall behind. Now it's ~2.7 years behind New Zealand. The US was also ahead of the UK as recently as 1983.

What changed? A few big things. Healthcare in the US became wildly expensive after the 1980s, following an extreme cost increase far beyond inflation, whereas before it was not far out of line vs other developed nations (eg share of GDP spent on healthcare; today it's commonly 2x the next closest nations on cost). And obesity exploded dramatically higher after the early to mid 1980s. Diets overloaded with sugar, carbs, high fructose corn syrup in everything, drive thrus as a routine, etc.

I do believe universal healthcare would have prevented that life expectancy gap from opening up between the US and the UK, Canada, New Zealand and Australia. Based on the expectancy increase path the US was on as recently as the early 1980s, it should be at 82-83 years now, rather than 78.x.

<comment><USER12> I also found it interesting to see what the insurance companies predicted my lifespan will be given I was born in 1980, don't smoke, am fit & live in New Zealand.

Apparently the actuaries reckon I'll make it to 91 and wife to 94.

</comment></comment></comment></comment></comment><comment><USER13> The US lifespan is decreasing due to opioid overdoses. Similar to Russia in the 90's with alcohol.

<comment><USER14> A quick google search would show this is untrue. Opioid overdoses kill 40,000 a year. 2.7 million Americans die per year.

Even if you were talking about a decrease in healthy lifespan, Opioids do not generally cause a person to transition from healthy to unhealthy (they are prescribed to treat a preexisting condition).

Sources:

[https://www.cdc.gov/drugoverdose/index.html](https://www.cdc.gov/drugoverdose/index.html)

[https://www.cdc.gov/nchs/fastats/deaths.htm](https://www.cdc.gov/nchs/fastats/deaths.htm)

<comment><USER15> That's not necessarily a disproof - if opioids are killing people who are disproportionately young, then they could have an outsize effect on life expectancy. Say life expectancy is 79 years. If a new cause of death occurs that affects 10% of the population and kills, on average, at age 78, then life expectancy goes down to 78.9. If a new cause of death occurs that affects 10% of the population and kills at age 29, then life expectancy goes down to 74. Same reason that infant mortality had a disproportionate affect on life expectancy: the numbers of deaths might be small, but the reduction in lifespan is large.

Personally I would bet on obesity being a bigger contributor to declining lifespans than opioids, but I'm just showing that raw numbers of deaths cannot automatically disprove the hypothesis that a decline in lifespan is due to opioids.

<comment><USER16> For a cause of death affecting 40000/2700000 it could only reduce life expectancy from 79 to 77.8, even if all the victims were age 0.

EDIT: I suppose it could be lowered a bit more if all those who died were those who would otherwise have lived longest.

<comment><USER17> > I suppose it could be lowered a bit more if all those who died were those > who would otherwise have lived longest.

That would average out in a population size of 40k

<comment><USER16> No, I mean there could be some actual effect that selected for those people.

For example if rich people were culturally more likely to use heroin than poor people, then overdoses would lower the life expectancy more than you would expect, because rich people (when not overdosing on heroin) have better access to medical care and hence longer life expectancy.

</comment></comment></comment></comment></comment></comment><comment><USER18> It's not surprising. The stereotypical American is obese and not too intelligent when it comes to dealing with that problem. See the whole "fat shaming" movement for a prime example of this.

</comment><comment><USER19> "Asian-Americans outlive whites by an average of nearly 8 years" according to [https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4567918/](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4567918/) . Differences in life expectancy across countries are probably due to both genetic and social factors.

<comment><USER20> Diet might be another important factor. Asian tend to have balanced meals that include significant amounts of vegetables, fish, seafood, etc.

I think the condition is improving. More and more people realize the importance of balanced meals. It shows in grocery stores. They stock more variety of vegetables and fish than before.

</comment></comment><comment><USER21> Source [http://www.who.int/gho/mortality_burden_disease/life_tables/...](http://www.who.int/gho/mortality_burden_disease/life_tables/hale/en/)

</comment><comment><USER22> > life expectancy at birth

This can be affected by how one defines birth. The US, for example, goes to fairly heroic lengths to save premature babies, and counts those that fail as infant mortality, whereas other countries may classify them as miscarriages.

A more portable figure would be life expectancy at one year.

<comment><USER23> .. but is apparently fairly terrible at saving mothers? [https://edition.cnn.com/2017/11/15/opinions/op-ed-christy- tu...](https://edition.cnn.com/2017/11/15/opinions/op-ed-christy-turlington- burns-every-mother-counts-2017/index.html)

</comment></comment><comment><USER24> Even assuming that this data is flawless, I have a disdain for articles with such surface coverage of a topic.

This article brings you so many questions about the methodology used that it is hard to even begin to consider implications...ie:

What defines healthy life vs non-healthy life? Are current and expected levels of pollution, drug/alcohol dependences, and depression being considered? Is this including some sort of happiness/satisfaction measure? Does this include premature births which could the skew the US numbers lower if China is not including them?

</comment><comment><USER25> This map shows the life expectancy of different Chinese provinces in terms of other countries: [https://www.economist.com/china/2015/10/31/noodles-of- longev...](https://www.economist.com/china/2015/10/31/noodles-of-longevity)

</comment><comment><USER26> _The United States was one of only five countries, along with Somalia, Afghanistan, Georgia and Saint Vincent and the Grenadines, where healthy life expectancy at birth fell in 2016..._ _Meanwhile U.S. life expectancy is falling, having peaked at 79 years in 2014, the first such reversal for many years..._

This is also inequality and poverty taking their toll. May it be sign? In 1976, Emmanuel Todd announced the coming fall of USSR from its dropping life expectancy and other poor demographic results.

<comment><USER27> Poverty is one of the US's major imports.

</comment></comment><comment><USER28> Drop out the recent immigrants, as China has virtually no net immigration. Do the numbers change?

<comment><USER29> No it does not. From NIH study: ([https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5026916/](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5026916/))

>We use high-quality linked Social Security and Medicare records to estimate life tables for the older U.S. population over the full range of birth regions. In 2000–2009, the foreign-born had a 2.4-year advantage in life expectancy at age 65 relative to the U.S.-born, with Asian-born subgroups displaying exceptionally high longevity. Foreign-born individuals who migrated more recently had lower mortality compared with those who migrated earlier. Nonetheless, we also find remarkable similarities in life expectancy among many foreign-born subgroups that were born in very different geographic and socioeconomic contexts (e.g., Central America, western/eastern Europe, and Africa).

</comment></comment><comment><USER30> As a Chinese, I should say, well, fucking CCP, just another bribe

</comment><comment><USER31> Any idea how honestly China reports these statistics?

<comment><USER29> I don't know how China collect its public health statistics, but its economics numbers have been extensively studied. And the consensus is that its official GDP growth figures were overstated historically (by as much as 67%), but had been mostly accurate post-1996.

Study: [https://www.stlouisfed.org/publications/regional- economist/s...](https://www.stlouisfed.org/publications/regional- economist/second-quarter-2017/chinas-economic-data-an-accurate-reflection-or- just-smoke-and-mirrors)

</comment></comment><comment><USER32> a very short trip in vietnam made me realise i dont want to be in the netherlands for the rest of my life. there's better places out there.

</comment><comment><USER33> yes, China surpass US in a new sphere. When would those comparisons stop ??

</comment><comment><USER34> Healthy and subject to a "social credits" system. I'd rather be morbidly obese than have the government force me to play a social status game.

<comment><USER35> Pretty much every single being on this planet is playing social status game, all China did is put a number on it.

<comment><USER36> A government issued number. Thats the key difference. In the real world you can move in the country and start anew somewhere else.

<comment><USER37> How is this functionally different than e.g. a criminal or financial record?

If you can escape these, you can escape other government records.

<comment><USER38> To add to those examples: standardized test scores (like those for college admissions), education records (including collegiate degrees), health records, residency records, credit scores, driving records are all permanent records that are maintained by organizations that are either governmental or no better than a govt org.

I'm not a fan of China's system either, but it's silly to act like it's something new. Nearly every citizen of any first world country has a huge set of permanent records being compiled on them, not just those in China.

<comment><USER39> My SAT score doesn't dictate if I can board an airplane. My credit score doesn't affect me getting a passport. Comparing China's social credit system to US records is completely off base.

<comment><USER38> Your records certainly can affect you getting a passport. Depending on your criminal past, you may be banned from getting a passport. Similarly, some countries (Canada comes to mind) will ban you from entering the country for things as small as running a stop sign while driving. You can also be banned from getting a passport if you are behind on your taxes or child support payments.

As for getting on a plane, all of the above apply too, as well as the fact that you can be barred from flying simply by having a certain last name. Your personal records also affect things like how easy it is for you to get through customs and airport security. Global Entry/TSA PreCheck, for example, will be completely off-limits to you if you have 'questionable' travel records in your past.

Pretending the US/EU doesn't already have the Chinese social credit system in place is sticking your head in the sand. All China has done is formalize it.

</comment></comment></comment></comment></comment></comment></comment><comment><USER40> So what I'm getting from this statistic is that in China, if you get old and sick, that's probably the end. In US, if you get old and sick, you might have a few more years. Albeit with lower QoL. I'm actually ok with that.

<comment><USER41> And in any other Western country, you'll both live longer and have a higher quality of life.

</comment></comment><comment><USER42> How is this article related to Hacker News?

<comment><USER43> >Hacker News Guidelines

>What to Submit

>On-Topic: Anything that good hackers would find interesting. That includes more than hacking and startups. If you had to reduce it to a sentence, the answer might be: anything that gratifies one's intellectual curiosity.

>Off-Topic: Most stories about politics, or crime, or sports, unless they're evidence of some interesting new phenomenon. Videos of pratfalls or disasters, or cute animal pictures. If they'd cover it on TV news, it's probably off- topic.

[https://news.ycombinator.com/newsguidelines.html](https://news.ycombinator.com/newsguidelines.html)

<comment><USER44> "If they'd cover it on TV news, it's probably off-topic."

<comment><USER45> That might have been a relevant metric 10 years ago, but all sorts of tech and health news now gets screen time.

</comment></comment></comment></comment><comment><USER46> And US has universal health insurance, while China doesn't

<comment><USER42> US does not have universal health insurance.

<comment><USER46> Isn't medicare de-facto universal?

<comment><USER47> no.

<comment><USER46> Then I apologise</comment></comment></comment></comment></comment>


Immigrants Do Not Increase Crime, Research Shows - <AUTHOR> https://www.scientificamerican.com/article/immigrants-do-not-increase-crime-research-shows/ <comment><USER2> Immigrants, no. Invaders, yes!</comment>


Usertesting.com results on Facebook's usability - <AUTHOR> http://www.usertesting.com/2011/08/05/7-facebook-usability-mistakes/

<comment><USER2> Found the title of this post misleading, I thought there would be evidence of users actually leaving facebook due to the usability problems.

<comment><USER3> I wonder what the "last straw" will be if there ever is one.

<comment><USER4> as long as people can get their fix of peeking into their friends' lives, no one is leaving the FB dealer on account of usability

<comment><USER5> nah, people will leave for usability in a heartbeat if there's a good alternative -- that good alternative could be the goog in a few years if fb doesn't take care (remind me, how long as fb been around now?)

</comment></comment></comment></comment><comment><USER6> How about the fact that Facebook doesn't even work for many people when using Chrome on OS X. The only time I check Facebook for even 30 seconds is when I'm willing to open Safari, and that isn't more once every couple days.

</comment><comment><USER7> Nice way to game Facebook into being a customer?</comment>


Whats the deal with private sale sites? - <AUTHOR>

Off late this segment seems to be getting a lot of attention. See http://www.techcrunch.com/2010/01/28/private-sales-site-beyond-the-rack-raises-2-million/.
Anybody has any insight on how this works? What are the drivers for the high end brands to give such deep discounts? Do they buy inventory and hold or does the brand do the order fulfillment etc? <comment><USER2> <http://en.wikipedia.org/wiki/Sample_sale>

Wikipedia has a very nice description, if you look up sample sale.

Sample sales are used by retail businesses in order to discard excess merchandise. Sometimes these samples have been used by agencies to sell products that they will distribute to local vendors. Sample sales are often associated with the fashion industry. These sales are an opportunity to get near perfect merchandise at a fraction of the price. It is often difficult to have information on the date and time of sample sales, although there are websites which list information about sample sales in on line diaries. They are also used to draw in new clients, hoping that the new people will return to the company's store and buy more merchandise. While many sample sales pop in various locations in NYC, there are a [very small] handful of companies that have a permanent location. Clothingline.com is the longest running sample sale company in New York City.

Recently, a number of new online businesses have emerged that offer the sample sale concept to an online audience. Well-established in Europe with the original creator of online private sales, vente-privee.com[citation needed], this trend moved to the United States in 2007 with the launch of companies such as Savvy + Co., Gomatta Girls, Editors' Closet, Beyond the Rack, RueLaLa, Gilt Groupe and Ideeli. These businesses offer access to those living outside of the traditional sample sale markets of New York and Los Angeles the same access to designer fashions at 'sample sale' prices.

</comment><comment><AUTHOR> [http://www.techcrunch.com/2010/01/28/private-sales-site- beyo...](http://www.techcrunch.com/2010/01/28/private-sales-site-beyond-the- rack-raises-2-million/) clickable link</comment>