Ask HN: Why do you keep coming back to Hacker News? - user-on1 <comment><AUTHOR> It's the best community surrounding general tech discussion _as well as_ its impact on society that I know. It isn't overrun by trolls. And it has a simple, clean UI with no infinite scroll, and even has noprocrast in an age when most sites are desperate for as many minutes of your life as they can take.

<comment><USER2> > It's the best community surrounding general tech discussion

Do you mean IT, or really tech in general?

For example, I don't see that many posts here about biotech.

<comment><AUTHOR> It primarily, but interesting topics from across the spectrum pop up.

</comment></comment></comment><comment><USER3> Quality of content. If I want quantity, I go to Reddit.

And by quality, I don't just mean articles... there are some excellent critiques and well thought out discussions here. People will actually discuss things in a respectful manner even if they differ on opinion. (Relative to other sites)

<comment><USER4> I second this! The value of HN is in its users and community. It amazes me how some very toxic subjects are actually reasonably (to a degree) discussed here.

I also really like that the user base, for the most part, requires statements to be backed up by facts and sources. That is something I don't see often enough on the web.

edit: spelling

</comment></comment><comment><USER5> Wisdom of the user base. There are many topics - some not even necessarily related to programming that I will do a " _search term_ site:news.ycombinator.com" Google query on if I want to find some really great information and insight.

</comment><comment><USER6> Solid discussions. I learn much more from the random comment here and there than from the articles. Not all comments are like this, but a very high percentage compared with other discussion forums.

The best comments are sometimes tangential and sometimes may not get upvotes, but they offer a perspective that I had not considered.

</comment><comment> xkcd-sucks I'm addicted to low effort novel information-- like more addicted than I've ever gotten to Scary Epidemic-Causing Drugs-- and this site provides lots of low-effort information in the content and in the comments. The clean UI and possible relevance to my job bias HN over less targeted competitors

</comment><comment><USER7> What HN has going _for_ it is its large user base of above-average intelligence who are willing to share their thoughts on a variety of subjects, both within the realm of IT as well as outside of it. On the former many here can speak from experience, on the latter this is often more debatable but the discussion is interesting nevertheless.

What HN has going _against_ it is the ever-present phenomenon of group think in many areas: the large crowd of Apple fans ready to defend anything no matter how fruity, the spectre of political correctness looming over anything related to, well, politics, the frequent killing-off of items which counter the current narrative on some subject, etc. While annoying these factors do not (yet) outweigh the positives.

I do visit HN through my own news aggregator, negating the popularity contest of articles rising and falling on the front page. This is, in my opinion, a good thing as it undoes some of the effects of the mentioned group think.

</comment><comment><USER8> I don't comment here but have read for years now. I avoid commenting because I generally have very little knowledge on the posts or have anything worthwhile adding that hasn't been already mentioned. I love learning little bits about a lot rather than a lot about a little and am happy with the balance I find here between debate, information and humor.

While I'm actually commenting for once I'd just like to say thanks to everyone here for all the wise words and pieces of knowledge you have passed on over all the times I've been visiting and hope to keep reading for a long time to come.

I'll also add that I'm reluctant to ever mention this place on other sites that I do participate in out of fear of bringing in people who are more likely to turn the place into something like a reddit comment section rather than a very easy read of straightforward information from people who are knowledgeable on what they are discussing, rather than a race to the bottom of puns and trolling.

</comment><comment> j-walker It's one of the few tech sites left on the Internet where there doesn't seem to be an underlying narrative driven by politics.

I'm looking at you TheVerge/Recode/Reddit.

<comment><USER9> Don't forget Wired, who also sacrificed objectivity and impartiality a long time ago

</comment></comment><comment><USER10> Aligns pretty well with my interests. I wish it was a little more social. Also, it's difficult sometimes to contact other users about something they submitted.

<comment><USER11> It'd be nice if high karma could unlock DM capabilities.

</comment></comment><comment><USER12> I'm addicted to getting new content, hoping to read something new, that'd give me a high of finding quality content.

In other news, I'm very fucked up that I allow myself to fall into these positive feedback loops that can diminish my quality of life.

</comment><comment><USER13> Because, insofar as relatively large non-specialist (comparatively speaking) news aggregators go, HN is the only one where smart, well-spoken individuals still form a meaningful part of the user base. In fact, apart from a few highly specialized subreddits, this is the last major site where I still read comments at all, and I learn something new on a pleasantly frequent basis.

Also, it happens to be the last major news-related website I know of with what I would call "good web design". That helps more than I'd care to admit.

</comment><comment><USER14> It's a combination of the links that get posted, the people who post here, and the moderation.

It's apparently enough of a draw to have me lurking on this place nearly daily for almost 10(!!) years.

</comment><comment><USER15> It's my primary source of tech - news, actual code to browse, new things to play with in downtime. I keep my skills sharp by coding and I keep my knowledge sharp by visiting HN probably too many times a day

Edit: As to why here over other places - there's rarely any pun chains. Nothing puts me off a discussion more than pun chains

</comment><comment><USER16> I know that I'll find something interesting to read, and I'll probably learn something new at the same time.

<comment> r0ze-at-hn But importantly you don't _always_ find really interesting stuff. It is a slot machine of news that may or may not give you a dopamine hit.

<comment><USER15> I learned that random was better than guaranteed here!

Probably

</comment></comment></comment><comment><USER17> If you are the smartest in the room then you are in the wrong room. Being part of HN is being in the right room.

</comment><comment><USER18> ...because it is (generally) the inverse of the "don't read the comments" advice that works so well over the rest of the net.

I'm mostly looking at headlines, reading a couple of comments to get the gist, and then reading articles only if there is interesting commentary.

</comment><comment><USER19> Hacker culture preferring facts, logic and deep discussions. Bad comments go to the bottom or get hidden and usually doesn't bother you. Thankfully great administration by dang. And as a Lisper the service running on a Lisp dialect is a big plus :)

</comment><comment><USER20> One of the things I like is when I come to this site, my Ghostery icon has a zero on it.

</comment><comment><USER21> The reason why I come back to HN, is for the articles, and also the comments on the articles. I find some of the articles to be quite interesting, and informative. I also really like to read the comments on articles. Sometimes I wind up reading the comments first. People sometimes drop interesting nuggets of information that make HN worth coming back to.

</comment><comment><USER22> Learning from topical anecdotes. Whenever some new complex deployment tool is posted, the comments are full of people posting things like "We solve this problem at my company with Ansible and systemd" and "If you're on AWS, you can use

      ecs-cli compose service up

with your existing Docker Compose files."

<comment><USER23> wait can you seriously do that?

<comment><USER22> You mean the ecs-cli bit? Yes, but I don't mean to imply that there isn't a bit of setup before you do it. Still, it's a pretty short path to set up initially, and then updates are dead simple. Check out the tutorial [0] if you're interested.

[0]: [http://docs.aws.amazon.com/AmazonECS/latest/developerguide/E...](http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_CLI_tutorial.html)

</comment></comment></comment><comment><USER24> Useful information, and then informed comments about it. The comments might inform me that what looks to me like a good idea has pitfalls; they might propose similar products with advantages or better suited to my need; or they might articulate a position, held by a large group, that I hadn't considered.

</comment><comment><USER25> I can find some inspiration about projects, people solving problems, some that I know about, some that I did not know existed.

I can read opinions about issues I have thought about and cared about and get a new perspective.

I can get annoyed because someone wrote something wonderful and then a bunch of people nit pick it to death.

</comment><comment> p-funk Literally the only place I've been able to find that successfully keeps comments sections on topic.

<comment><USER26> This is only because of the hard work of the mods (dang and sctb).

</comment></comment><comment><USER27> It usually has higher quality material, and far superior comments and discussions, compared to the easily gamed, largely trolled, and heavily spammed alternatives.

Also, the user base is usually data driven and fact centric, which is increasingly rare in the post-fact era.

</comment><comment><USER11> I like that I can get a sample of opinions/ideas/experiences from a bunch of smart people which may uncover a hidden variable I wasn't aware of. A big part of that is that HN has been able to avoid a lower standard as it's grown.

</comment><comment><USER28> \+ It's a decent, 'curated' selection of usually non-political topics.

\+ Most comments made by people on the internet are ridiculous, emotional, uninformative rants. On HN, people seem to be smart enough to make informed points.

</comment><comment><USER29> Weakness of will.

<comment><USER30> "I can resist anything but temptation."

</comment></comment><comment><USER31> I lurk on here and don't really contribute (mostly due to time constraints). I keep coming back because of the quality of comments and discussions and the positive way people treat each other.

</comment><comment><USER32> I'm able to procrastinate at the office and claim I'm working

</comment><comment><USER33> HN is a great funnel that sieves important content to the forefront. It is MY way of staying abreast of what is new and important in the world.

</comment><comment><USER34> I like it for the non-tech part (apart from where it becomes techy again in a technotopian delusional way of thinking tech can fix everything)

</comment><comment><USER35> My favorite posts are the "Show HN", or other Github projects, launch announcements, etc that I wouldn't find elsewhere.

</comment><comment><USER36> It's a nice source of news that, for the most part, are not filled with as much bias as other media sources.

</comment><comment><USER37> I use the RSS feed for interesting tech news. I rarely use or even read the comments.

</comment><comment><USER38> Masochism combined with a morbid desire to know what my peers think, mostly.

</comment><comment><USER39> Same as others said, decent posts here. Like Reddit, just for tech. I do wish it would live up to the name "hacker news' and post more IT security related articles, a vast majority of all submissions have to do with coding.

<comment><USER40> "Hacker" in the HN sense doesn't refer to the IT security variety, it's closer to rapid prototype coder.

<comment><USER41> I think the blue collar meaning of the work "hack" is far more appropriate...

</comment></comment></comment><comment><USER42> Skews young and inexperienced but smart and focused.

</comment><comment><USER43> The inside baseball is super interesting sometimes

</comment><comment><USER44> Small reason, to know what's going on in tech.

Big reason: to read the comments[1], not articles (most are trash and can be summarized in 4 sentences) surrounding interesting topics. I actually really like when socially controversial or political topics come up on HN, though I know some others don't, because the discourse level is so much higher than say, Reddit or NYT comments. I want to hear smart people comment on these things much more than I want to hear a magazine article pontificate/give a singular opinion/blame people.[2]

I think there is huge value in this community, you guys debating, mentioning interesting stuff, inspiring or encouraging, etc, way more value than if I spent 30 mins a day devouring other "new content" sources.

I used to be addicted to reading the news, and for what? I think we gain next to nothing from it. It's trash, fear-mongering, clickbait and submarines. Try going without it completely for two months and you'll realize you missed absolutely nothing except the crisis in X and how celebrity Y hates Z now and you should too. It's all trash.

But good communities with commentary and solid rules? Real back and forth, articles with instant skepticism and poignant additions? Way more valuable and interesting. That's why I keep coming back.

Thanks for commenting, everyone.

<comment>

[1] Sometimes if there is someone I think makes a lot of great contributions, I'll go to their comments page and read the last few comments they made, example: [https://news.ycombinator.com/threads?id=gwern](https://news.ycombinator.com/threads?id=gwern)

Sadly almost all the users I really liked have stopped commenting.

[2] A good example of what I'm talking about is the Boston Review article that this article is complaining about: [http://slatestarcodex.com/2017/10/09/in- favor-of-futurism-be...](http://slatestarcodex.com/2017/10/09/in-favor-of- futurism-being-about-the-future/) (I think the whole SSC article is worth reading)

</comment></comment><comment><USER45> Has the right frequency of news rotation.

</comment><comment><USER46> Good question - i perceive quality of OPs are dropping but the discourse in said posts are pretty gud

</comment><comment><USER47> I like reading people's opinions from the bubble that they live in.

<comment><USER41> It's even more fun to share an opinions from outside that bubble and they're forced to actually have actual discussion about it (because that's how this site works) rather than just name calling and down-voting.

</comment></comment><comment><USER48> due to the content related to tech stuff

</comment><comment><USER49> looking for a side project

</comment><comment><USER50> I don't think there's another site out there that really encapsulates what HN offers, maybe lobste.rs

</comment><comment><USER51> I don't know

</comment><comment><USER52> I like tech talk

<comment><USER52> Why down vote me?</comment></comment>


StartupDigest Takes $200,000 To Curate Information For Entrepreneurs - <AUTHOR> http://techcrunch.com/2011/03/09/startupdigest-funding/

<comment><USER2> congrats, I love theses guys and the service is super useful. Can't wait to see what they do next</comment>


Sensitive to bias, Facebook relaxed misinformation rules for conservative pages - <AUTHOR> https://www.nbcnews.com/tech/tech-news/sensitive-claims-bias-facebook-relaxed-misinformation-rules-conservative-pages-n1236182 <comment><AUTHOR> Original title was too long to post. It was:

Sensitive to claims of bias, Facebook relaxed misinformation rules for conservative pages

> According to internal discussions, Facebook removed "strikes" so that > conservative pages were not penalized for violations of misinformation > policies.

> Facebook spokesperson Andy Stone did not dispute the authenticity of the > leaked materials, but said that it did not provide the full context of the > situation.

</comment><comment><USER2> "Relaxed" == completely overrode the fact checkers and ignored the stated misinformation policy. But only for conservatives. There is a bias at FB, and it has always been in favor of conservatives.

<comment><AUTHOR> Makes sense. He practically stole the idea from the Winklevoss twins; they went on to make billions in cryptocurrency, which is possibly privacy- enhancing/preserving, and Zuckerberg made Panopticon.

I mean _Facebook_. I always get the name wrong. Don't use it much since the emotional manipulation "experiment" came out, if you can call it that. It didn't embody the scientific method, in that humans were not consenting.

But, we learned more about human nature, and the nature of Mark Zuckerberg than we could have otherwise, so I guess by a very very strict reading, we learned facts we didn't already know. As there were bound to be other ways to do that work while respecting individual and collective consent, I don't feel we have to give Zuck much leeway here. It was wrong, and his punishment is less memorable to me than the offense, which for person of his high profile smacks of regulatory capture and lobbying gone amok.

But don't call it _science_. It somehow cheapens even a naked cash grab.</comment></comment>


Ask HN: Tips for a prospective Ph.D student - <AUTHOR> I am a 25 year old guy who is going to be a PhD student in Europe. I have a bachelors in a pure engineering field (Ciivil), masters in operations Research and now my PhD is going to be in the field of Discrete Optimization. It is a three year program and I would like to solicit some advise from the community with respect to the following issues:
1) Any pitfalls that I have to avoid. My advisor is already decided and I can not change it.
2) It has been my life long dream to work for google and I think this PhD program is a good stepping stone. How can I utilize the next three years towards my preparation for a google interview?
3) Any other life advise? <comment><USER2> Structure your thesis so that each chapter is publishable independently as a conference paper. That way you will have built up a publication list by the time you finish, and it will be hard for your examiners to take issue with something that has already withstood peer review. Make sure you cite your potential examiners. Throw in a favorable comment about everything you cite. Start writing it from day 1 even if you don't know where the rest of it is going. Get good at LaTeX and PGF/Tikz. Get good at schmoozing at conferences and cocktail parties. Negotiate with your advisor about the scope of your research and hold him to it if he tries to expand it too much. If you want to work at Google or anywhere else, do research on topics that might be useful to them and make connections with people who work there, preferably at conferences, so they can fast track you through HR. Co-authoring with someone at Google would be ideal if you can swing it. Keep a work/life balance, keep regular hours, don't drink too much, and do some outdoor activities.</comment>


These Weeks in Servo 34 - <AUTHOR> http://blog.servo.org/2015/09/21/twis-34/ <comment><USER2> How usable is Servo currently? Is the web security model fully implemented?

Has anyone in the team switched to using it for all their browsing? If not, when do you plan to start?

Anyway, thanks for working on this! Servo is one of the most important software projects, since it will hopefully give us a secure or at least securable browser, and maybe give a chance for Mozilla, the most trustable browser maker, to get the #1 market share spot.

<comment><USER3> > Servo is one of the most important software projects, since it will > hopefully give us a secure or at least securable browser

I'm very interested in Rust, and in Servo as a "killer app" that demonstrates its promise. But what if they go to all this trouble, and it's significantly slower than C++-based browsers? (Yes, Rust can be as fast or faster in theory, but C and C++ have so much more resources behind them.) How much is stability and security worth to you?

I see (admittedly abstract) tradeoffs made in favor of performance all the time in software where data integrity is supposedly paramount. Will we really make different choices in consumer software?

<comment><USER4> In their benchmarks it performs favorably when compared to Firefox's gecko engine: [http://take.ms/LeUjm](http://take.ms/LeUjm)

</comment></comment></comment><comment><USER5> I'm curious, why do so many pages (like this one) now have huge fonts and lots of empty space? That text is like... 3 times too big.

<comment><AUTHOR> I actually want to update our CSS to something better (PRs welcome!)

Initially I picked this theme because it looked really nice in Servo, but we support a lot more CSS now and one of the nicer themes should work well too. I know that the older This Week in Rust theme works in Servo (they recently switched to Bootstrap which mostly works, but has some quirks), and I've wanted to switch to that for a while. Never really sat down to do it, perhaps I should do that next.

<comment><USER5> Just set the font size, line height and margins to sane levels and it'll be fine

Here I set font-size to 1em, line-height to 1.2em and margins to 1em:

[https://i.imgur.com/BXDrg2a.png](https://i.imgur.com/BXDrg2a.png) => [https://i.imgur.com/hqHFNaf.png](https://i.imgur.com/hqHFNaf.png)

<comment><USER6> On behalf of the few over-50's on this site, we find the first example much easier to read.

<comment><USER7> I'm just about to hit thirty, but the first example is still _much_ nicer to read for me.

</comment></comment></comment></comment></comment><comment><USER8> Cheers on using Reviewable for a better review process, but I notice it adds loads of useless text to the git commit messages[0]. I always figure that GitHub, Reviewable, and other hipster things might not be around one day, so I have stopped using GitHubisms like "Fixes #1" and such in my commit messages, and instead referencing the commits from pull requests and issues. That way, when GitHub is gone at least the git commit history still makes sense ("Grandpa, what is GitHub?").

[0] [https://github.com/servo/servo/commit/4dc986bca35f986e2f15f1...](https://github.com/servo/servo/commit/4dc986bca35f986e2f15f1591f120e1cef2810da)

<comment><USER9> When Github will be gone (if that ever happens during your lifetime), will that extra clutter in your commit messages really matter that much?

<comment><USER8> Look at commit messages in the Linux kernel, that's what we should be aiming for—whether GitHub or GitHubNext will be around or not isn't really the issue, just an easy thought experiment to illustrate the point.

[https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux....](https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/log/)

<comment><AUTHOR> The merge commit of pull requests in Github contains the PR text. Tomato, tomahto.</comment></comment></comment></comment>


Ubuntu 18.04 LTS Enters Its Feature Freeze – Phoronix - <AUTHOR> https://www.phoronix.com/scan.php?page=news_item&px=Ubuntu-18.04-Feature-Freeze <comment><USER2> I'm hoping they can get a Gnome environment with high DPI support that isn't ridiculously crash prone...

With my Arch install with a basically stock Gnome configuration (and Linux LTS and Nvidia LTS drivers), I have two 4k 28" monitors which means I need fractional scaling. So I have to make some X11 config file for that, which works, except that gnome-session core dumps any time the screen is locked.

And of course, that means all my apps are closed which is incredibly annoying. Gnome 3 used to be pretty reliable, it seems to have taken a nose dive in reliability recently.

I'm at the point now where instead of rebooting into Windows to do something I can only do on Windows, I'm rebooting into Linux to do what I can only do on Linux.

<comment><USER3> Have you tried the Windows Subsystem for Linux? I've found it to be great. Since I basically use Linux for either python development or server administration, a full linux shell is basically all I need to fulfill my linux needs.

<comment><USER2> It's what I use at work, but I'm not super happy with it. It seems to crash quite a bit unless you work exclusively in the Linux filesystem. So you lose a lot of the advantages of having a native Unix desktop.</comment></comment></comment>


Ask HN:  How do you respond when someone says a feature is confusing? - <AUTHOR>

I've seen many arguments where one person will say "That's confusing," without giving a lot of reasoning for why it might be confusing.  Often times people who call something confusing understand how the feature works, but believe it would be confusing for others.  Is there a way to prove that something is not confusing?  Conversely, is there a way to prove that something IS confusing? <comment><USER2> \- You can show conventions. Show that the icons / process / terminology are the same as other well-known and well-used features in other apps.

\- You can show statistics. # of people using it, or, if you really want to entertain alternatives, A/B testing results. It sounds like your service isn't live, so if this is important, hammer out a prototype and get some test users. If it's not that important, propose to do A/B testing when its released.

\- Figure out the end goal of the process, and ask a number of non-technical people (at least 20) to describe how they'd setup a process that would accomplish it. Do a significant number of them match your process? Do a significant number of them match each other?

\- Examine all the knowledge you assume a user has in order to go through the process, from the very basic (the button is clickable, "domain" means the URL / web address of a site.) to the more complex (you can undo any changes you make by viewing a list of revisions and rolling it back, clicking 'save' saves content but doesn't publish it, a 'dashboard' is an overview of account activity & a jumping-off point for site actions). Ask test user questions to determine how common the knowledge you assume actually is.

<comment><AUTHOR> Thanks these are some great concreate actionable suggestions. Just curious, have you put your last bullet into practice?

<comment><USER2> I try to keep it in mind as we develop, it's especially important for us because our target market is not at all web savvy (and them not having to be so to use our service is one of our big selling points).

Right now we're very focused on getting to a point where we can launch. Once we're at a point where we can start to optimize, I definitely intend to do this, using feature usage statistics as a priority guide.

</comment></comment></comment><comment><USER3> Think as if you're a semi-proficient computer user. They often don't have the vocab to articulate what they mean(if they know what they mean).

Look at the UI of an Iphone or Xbox360, or process for signing up for gmail for good examples of "not confusing." Both are dummy friendly.

Don't lose perspective after having been immersed in the technical world. I've seen some very smart people completely lose grasp of how a non-technical person thinks. Words like driver and BIOS freak them out - forget Python and API.

<comment><AUTHOR> Have you ever had someone say something is confusing even if they understand how it works?

</comment></comment><comment><USER4> If only one user thinks it's confusing, then it may or may not be. If a lot of users think it's confusing, then it's something that you need to look into.

<comment><AUTHOR> What if the user is your investor or manager?</comment></comment>


Even Google Was Shocked by the Success of Its Face-Matching Art App - <AUTHOR> https://news.artnet.com/art-world/google-face-matching-art-app-1200335 <comment><USER2> I have the app but I can't find this feature.

*edit: nevermind, it seems this is iOS only.</comment>


Your App is Not Alive. It sits there and could be doing so much more... - <AUTHOR> http://blog.epoqueapp.com/2014/03/25/your-app-is-not-alive-it-sits-there-and-could-be-doing-so-much-more/

<comment><AUTHOR> Interested to hear other's thoughts on related modern tech and difficulty finding teams to build it.</comment>


Dear Facebook: Please Stop Trying to Steal My Co-Founder - <AUTHOR> http://aarondinin.com/2012/07/dear-facebook-please-stop-trying-to-steal-my-co-founder/

<comment><USER2> That flag is driving me insane, as well as the social bar and the moving "Aaron Dinin", takes up the entire page and won't get out of my way so I can read the text - some of us like reading on phones you know (iOS 5.1.1 here)

<comment><AUTHOR> Yay user feedback.

Fixed!

(We'll add an "x" to close it as well... shortly.)

<comment><USER2> It's still all in the way for me on iOS (when I zoom in to actually read)... but thank you for taking the feedback into account, it's good to see. Hopefully il be able to read the actual article soon :)

<comment><AUTHOR> That's more the fault of my website than FlagTap.

Though I guess that still puts me at fault either way. I'll get it fixed ASAP.

Thanks again for the feedback!

</comment></comment></comment></comment><comment><USER3> I do not feel that this post deserves front page mention. Frankly, this reads as less about the co-founder being approached but rather the OP wishing to be poached as well.

It's not as though highly talented back end developers are lacking recruitment offers these days.

</comment><comment><USER4> Ironically this post will result in more headhunters trying to cash in on your co-founder since you told them how good he is etc etc

<comment><USER5> The post looked more to me like a plea for them to start trying to call him as well.

Particularly the last line.

</comment></comment><comment><USER6> If your cofounder is ready to leave you for one of those companies, then it's only a matter of time before he leaves of his own accord.

</comment><comment><USER7> Honestly, headhunter contacts are a dime a dozen. Front end, back end, whatever, if you have any visibility at all you get used to ignoring them pretty quickly.

<comment><USER8> Seriously, just having a basic LinkedIn profile will get you a couple recruitment messages a week. If your co-founder tempted by standard form letter recruitment emails then you have bigger problems.

</comment></comment><comment><USER9> So I decide to try and work out what flagtap actually is. The page which the flag link takes me to asks me to either login or sign up based on 3 images which promise to fulfill all my wildest dreams. No thanks.

So I cut the end off the URL and checked the front page, just a login screen. Oh, there's an about link down the bottom, that's what I'm after. Click. Huh, I need to login to see the about page?

Sigh.

Goodbye.

<comment><AUTHOR> Thanks for the feedback, Fuzzwah. Yeah... we're still in a closed beta. Probably should have mentioned that in the post. Err... and on the site.

Umm... clearly it's a very early beta.

</comment></comment><comment><USER10> I dig FlagTap. I'd been looking for a decent way to incentivize the users of my dating site into reaching out to other users, and ended up building a rewards module myself. It's been a big hit on the site, but I'd much rather have something easier to implement in the future. Would you be able to do a custom implementation of FlagTap (custom gifts, matching palette, etc)?

<comment><AUTHOR> Thanks for the feedback, Paul.

We kind of figured we'd need to add custom options, so it's good to hear people would like to see that sooner rather than later.

We'll get it implemented as soon as possible!

</comment></comment><comment><USER11> Something's fishy about this article...feels fabricated. Is this the only way to get attention for your sites on HN these days?

<comment><AUTHOR> Yeah... when you write good articles that don't mention Facebook in the title, no one reads what you've written. I've got a bunch of those.

But, this is a 100% true story (except maybe the Adderall part I thought HN would appreciate.

</comment></comment><comment> steve-howard > I was prepared for 48-hour, Adderall-fueld workdays

Sounds like a recipe for disaster.

<comment><USER12> Yeah... Adderall only works effectively if you're getting good quality sleep. Also doesn't prevent you from falling asleep, thats called caffeine or provigil. Additionally, the dosage needed to keep you awake will also likely make you act like a distractable manic mess. that's also ignoring that if you're not sleeping, your backend shit can't be that tricky.

Point being, the metaphors in the blog post are both in bad taste (some people actually need adderall et al for medical reasons), the lifestyle described is unsustainable, and if I'm working with someone who's so widely sought, I'd be celebrating their awesome and feel flattered they think I'm worth their time.

</comment></comment><comment><USER13> Not sure what to think of this blog post. Though it appears flagtap.com does not currently load. So, about that office next to his...

<comment><AUTHOR> Yeah, guess I should have scaled the servers before posting. Good lesson for next time.

Thanks for the feedback. I guess I'll be lucky to get a cubicle in the same building as him (though to be fair... I never called myself a server admin).

</comment></comment><comment><USER14> Every good cofounder is at risk to be hired away. You have to motivate them to stay.

Of course the post was written in jest.

<comment><AUTHOR> Glad you appreciate the joke.

Yes... if anyone wants him to work for one of those companies less than me, it's him.

</comment></comment><comment><USER15> Your extremely talented cofounder put the punchline of intellisult below the fold at 1440x900. I thought the site was broken.

<http://imgur.com/EKlmK>

 _Edit:_ I also didn't see the green flag the first time. When I refreshed it showed up.

<comment><USER16> Thanks for the feedback and sorry for putting the punchline below the fold. At some point, I might improve Intellisult's UI, but that'll have to wait. For a silly site like that, and with a budget of $0, it's difficult to prioritize every detail just for providing people with some free entertainment.

If you'd like to contribute any good design ideas, I'd be happy to implement them when I have some free time. =)

</comment></comment><comment><USER17> And no green flag in the right margin for me... :(

(Latest Safari on Lion)

<comment><AUTHOR> Is JS on? Works on all versions of Safari we've seen, including Lion.

Can I blame that on my co-founder? He's responsible for cross-browser issues :)</comment></comment>


Learning is Not A Race - <AUTHOR> http://blog.parsely.com/post/50495864825/to-the-next-parse-ly-intern-learning-is-not-a-race

<comment><USER2> Nice line: "Skill sets are vectors, not scalars."</comment>


No H-1B left so what? - <AUTHOR> http://www.slideshare.net/techmeabroad/no-h1b-left-so-what-48395973

<comment><USER2> * Unemployment is at 5.5%

* Many hi-tech jobs go unfilled

* There's a huge fight to raise the minimum raise to $15 an hour because the gap between the rich and poor is increasing.

* We import 100,000 people every year because there aren't enough Americans for those well-paying jobs.

I'm not an economist but since we exported many well paying manufacturing jobs, and no one should be planning a career working at a minimum wage job, shouldn't we try harder to train Americans some of these people for these hi- tech jobs?

<comment><USER3> "We import 100,000 people every year because there aren't enough Americans for those well-paying jobs."

Err, no. We import 100K people because there aren't enough people in the correct age, wage and power cohorts. Some of them, probably, are also sent back after a few years post-training.

A quick search reveals the 2014 unemployment rate for chemists was 9%, down from 12-14% in earlier years. These are ACS members, which probably skews towards advanced degrees as they're the ones who'll maintain membership. Pharma continues to downsize and offshore, and academic hiring is no better.

It's reaching, or past, the point where "good people" should look elsewhere than in the sciences. Yeah, you CAN cure cancer, but it's way more BS than it used to be and you'll get to know moving companies on a first-name basis.</comment></comment>


Twitter's Fabric adds mobile deep linking with Branch integration - <AUTHOR> https://fabric.io/blog/branch-deep-linking-now-available-on-fabric <comment><USER2> I can't believe mobile deep linking is such a thing that requires partnerships, integrations and announcements.

<comment><USER3> I don't see this as sufficient reason not to join a platform like Fabric. This could make it visible to a lot of developers who don't even know about deep linking, or that it can be done with an SDK. A big appeal of Fabric is also how easy it makes it to integrate kits into apps. You may be experienced enough to do the plumbing yourself, but the convenience Fabric brings lowers the bar to entry for many.

</comment></comment><comment><USER4> This is a great, going to give it a try. the whole attribution /analytics ecosystem is so broken

</comment><comment><USER5> Is Fabric an alternative to React? I am unable to understand what is this app for.

<comment><USER6> No relation or similarity to React; this isn't a UI toolkit but a platform SDK.

Fabric is the rebranding of Crashlytics, a crash-reporting SDK, combined with the Twitter ecosystem SDKs, and their ad platform, and so on. It's a "Twitter Inside" SDK.

To quote an earlier comment of mine:

"a souped-up Twitter SDK + Crashlytics + their bundled ad platform MoPub. The idea is you'll develop your app with this SDK and get crash reporting, usage stats, ad serving, 'Sign in via Twitter', Twitter integration, and [a bunch of] other stuff for free."

</comment></comment><comment><USER7> Great move Branch</comment>


Globalization's Wrong Turn - <AUTHOR> https://www.foreignaffairs.com/share/MTQyMjI= <comment><USER2> A few paragraphs in the author states, "More trade and freer finance... came with risks that the hyperglobalists did not foresee, although economic theory could have predicted the downside to globalization just as well as it did the upside."

Two paragraphs later they say, "The right wanted to cut taxes and slash regulations; the left asked for more spending on education and public infrastructure. Both sides agreed that economies needed to be refashioned in the name of global competitiveness."

They're wrongly equivocating the center-left and center-right, perhaps because they don't want to contradict themselves. The center-left wanted greater spending on education and infrastructure precisely because economists warned that it would be needed to counter the dislocation caused by globalization. Education initiatives, among other things, included retraining and placement programs; and infrastructure didn't just mean roads and bridges but also research and industrial investments. The latter were intended to accelerate the establishment of new employment sectors, and the former to ease the transition. This was all well known and argued at the time. Some countries, like Germany, successfully executed

But the center-right in the U.K. and the U.S. held, and continues to hold, a radical belief that the "free market" will miraculously work things out, and so they limited and later starved education and infrastructure initiative, thus ensuring the very same results those initiatives were intended to mitigate.

This revisionist history is maddening. It excuses the knowing and willful policy decisions of politicians--many of them still in power, many others who continue to proudly carry forward their broken politics--by trying to argue that everybody was at fault, which is another way of saying nobody was at fault.</comment>


Facebook Is Hunting for More Money - <AUTHOR> http://www.businessweek.com/technology/content/mar2009/tc20090326_604141.htm

<comment><USER2> Are my numbers wrong or shouldn't $200 million / year revenue support them and even turn a profit:

Generous estimate: 100 billion pageviews a month @ ~400kb = ~40,000 terrabytes of data or just under ~150Gbps of bandwidth.

What does a Gbps cost? $10,000 a month? Probably less considering their scale, but let's say it costs that much.

So for bandwidth: $20 million a year.

How many servers? I recall a presentation saying they used 800 or so servers, but to be sure say it's become 5,000 and say servers cost $4000 and must be replaced each year:

So for servers: $20 million a year.

As for storage, 10 billion photos @ 400kb (way too generous here) = 4000 terrabytes a month - What's a 1TB hard disk cost, $200? Triple redundancy just in case:

So for storage: $30 million a year

How many people does it employ? 1000?

So for people: $100 million a year.

      people:    $100 mil
      storage:   $30 mil
      servers:   $20 mil
      bandwidth: $20 mil
      </comment><comment></comment><comment></comment><comment>
      total:     $170 mil

What am I not seeing?

</comment><comment><AUTHOR> "Facebook board member Peter Thiel told BusinessWeek the company did not need to raise any more money and had sufficient cash to continue at its current growth rate."

The last journalistic quotation I saw from Peter Thiel was this gem: "Thiel won't say precisely where he values the company other than to say, 'It's worth more than people think it is'" (also from a Business Week article). Where do I get a financial officer like that?</comment>


Why I am switching to promises - <AUTHOR> http://spion.github.io/posts/why-i-am-switching-to-promises.html <comment><USER2> Oh goodness... if only there was a way for the computer to manage all the bookkeeping of what happens after what, in a way where multiple things could run at approximately the same time, without the programmer having to thread "promises" or "callbacks" through every single piece of non-trivial code.

We could even give a name to these sequences of operations... maybe call them "strands"... or "filaments"...

Using libraries in Node.js seems to be a matter of 1) finding a library, 2) taking a hammer and smashing it into your existing choice of continuation- tracking mechanism. We end up with N x M different ways of using a package, depending on what style the package author chose vs what style the programmer chooses. "nodeify" is a bandage on top of a missing limb.

Do people really put up with this? Just look at how many different things were benchmarked in this article---I counted 21. How many more ways of reinventing basic programming-language design is the JS community going to come up with before we realize that the emperor has no clothes?

<comment><USER3> (Edit: Oops! Sorry, I see that you're already familiar with continuations, but let me explain them for those who aren't)

Sometimes, fundamental switches in thinking are worth it. :)

For example, continuations would be _perfect_ here, and are a wonderful tool for simplifying "nested callback hell" type problems.

But why should a web developer care about continuations?

Consider Paul Graham's Arc challenge: Build a web page that presents a form to the user. After they submit the form, a new page presents them with a link. The link takes them to a third page where the submitted value is presented back to the user. The restriction is that the input field must not be passed in via the URL.

Right now, the user must write in "continuation-passing style", which means threading callbacks, like this:

       function serve(req,res) {
          askUserForValue(req,res, function(value){
              showLink(req, res, function(){
                  render(res, {"user-value": value});
              });
          });
       }

Or perhaps the user could somehow stuff the variable into a "session" library with three separate URL routes:

        function serve(req,res) {
           render the form with the POST action of /submit;
        }

        function submit(req,res, value) {
           req.session["uservalue"] = value;
           render the link that sends the user to /view;
        }

        function view(req,res) {
           render the value of req.session["uservaule"];
        }

This one is even more fragmented since you have three separate functions that model one user interaction flow! I certainly like it less than the callback example -- at least I can keep one in my head.

We can do better though. Continuations let you write this:

       function serve(req, res) {
          var value = askUserForValue();
          showLink();
          render(res, {"user-value": value});
       }

If node.js supported continuations, the askUserForValue() function would respond with the form and _suspend_ the serve function right then and there. After the user made a new HTTP call, the suspended askUserForValue() call would return to serve() and its return value would be placed into our variable. Then, the showLink() function could render the link and _suspend_ the function again. Once the user makes another HTTP request, the function resumes, and so on.

The server would have to store the _state of the computation itself_ to disk so it could _continue_ later.

With continuations, we can pretend the user's web browser is the program counter. This frees my mind up. First, I don't have to keep callbacks in my head since there aren't any callbacks anymore. Second, stack traces work the way I expect because functions explicitly call each other. Third, if askForValue() throws an exception if the user inputs a string where I entered a number, no problem! Just wrap it in a try{} block that asks the user to enter a valid value, _as if I 'm writing a text program that calls readline()._

Also note that this is different from just letting each user interaction be in its own thread! Consider:

1\. Continuations should be serializable to disk. You wouldn't want blocked threads to just pile up as more users visit your website, and if your server crashes, you certainly wouldn't want to forget their state.

2\. The browser "back" button would have to _step a program backwards in time_ ; something that is unsupported in a naïve thread-equals-user-interaction system. (E.g. how many of you have booked an airplane ticket with Travelocity/Expedia/whatever, pressed "Back", and then got a big error because the server didn't know how to step backwards through its user stack?) But the ability to save continuations to disk is the ability to save the current state of the program to disk, which makes stepping back in time easy: you can simply reload what was about to happen, just like savestates in a video game emulator.

This is not a new idea. Many Common Lisp and Smalltack web frameworks work well with continuations and have done so for years (the first Seaside release was 2002, I'm not kidding you!)

Racket, a great dialect of Scheme, ships with such a web framework out of the box. Here's my implementation of the Arc challenge in Racket. Note how the 'start' function is implemented: [https://gist.github.com/gcr/ad116f565e105c8b2e0d](https://gist.github.com/gcr/ad116f565e105c8b2e0d)

It's super easy to try this out and you don't need to fiddle with dependencies or anything. Just download Racket from [http://racket- lang.org/](http://racket-lang.org/) , copy+paste the code into DrRacket's giant text box on the top, press Run, and your web browser will pop up with the example.

<comment><USER4> This is not possible with promises or generators, because their flow is unidirectional (so no back button). It may be possible to come up with an abstraction that works like promises (.then chaining) but can be rewinded, in which case the code would look like this:

      askUserForValue
        .then(value => res.showLink()
          .then(_ => res.render(res, {"user-value": value}))

Infact I think something like this could probably be built with monadic observables and a nice library. The only thing you couldn't do is automagically keep intermediate state anywhere else other than memory :/

The thing is, isn't this just a pipe dream? The moment you need to interact with an external system, like say an SQL database, you can say good-bye to rewinding, or be fine with the fact that you might commit a transaction twice, or otherwise come up with a complex method to also rewind the database state, or write your own database that supports this :)

Edit: Also, these days this approach is largely unnecessary. Now the entire thing would work on the client and the server would only be responsible to provide an API :P

<comment><USER3> Your last paragraph is why Racket provides ways of invalidating "in-progress" continuations. Ideally, in any user flow, you'd want to have the only side- effect operation occur at the end of the flow (User clicks the 'Book ticket' or 'Process transaction' button); the hard part is usually modeling it beforehand in a way that allows the user to navigate naturally back and forth between the parts of the application/open it up in new tabs or whatever.

But sure, there are limitations of course. :)

<comment><USER4> I see. It definitely looks powerful. Do you know if this is possible in any non-LISP language?

I mean, invalidating of the "observable" chain could also be done in JS, but I don't think that I know of other languages that could automatically transfer the state to the client.

<comment><USER3> I'm not sure. I honestly think it's a culture thing. Many Lisp communities embrace continuations, but everyone else rightly shies away because they make your head hurt.

Ruby(!) supports them, so it might be possible for Rails to create something like the pattern I mentioned. In fact, Ruby people use continuations for a few things like the built-in Generator class and making "restartable exceptions" so the thrower can figure out how to deal with the problem rather than the catcher, which is sometimes quite useful: [http://chneukirchen.org/blog/archive/2005/03/restartable- exc...](http://chneukirchen.org/blog/archive/2005/03/restartable- exceptions.html)

Properly implementing continuations is a huge implementiation burden though, which is another reason why the're uncommon. The language would have to make the stack frame itself slicable and serializable, and it's hard to get good performance when the call stack itself becomes a "first class" language construct. Consider a duplicate() function that saves the state of a program and then spawns ten threads that each reload that state! Have fun implementing continuations in a way that supports that, Guido! :)

</comment></comment></comment></comment></comment></comment><comment><USER5> Promises have two awesome things:

* With callbacks _interface_ of the function hardcodes whether the function is strictly synchronous or may use _any_ async code. Change of one little helper function from sync to async may have ripple effect throughout the entire codebase (you have to add callback to all its callers, and all their callers, and their callers...).

Promises fix that. Sync and async functions take arguments and return values the same way, so when you change sync to async you only need to change source and consumer of the value, and nothing in between (e.g. same code can cache results of (memoize) promise-returning functions and sync functions).

* With ES6 yield async calls look and behave almost like sync calls. No callbacks. You don't have to use weird error handling schemes — just use try/catch! You don't have to have a library to iterate over things — just use for()!

A call that used to look like:

        use(compute(arg))

was twisted by async to be:

        compute(arg, use)

Promises change it to:

        compute(arg).then(use)

and yield changes it back to nearly original form:

        use(yield compute(arg))

</comment><comment><USER6> > if (err) return callback(err)

> That line is haunting me in my dreams now. What happened to the DRY > principle?

      iferr = (succfn, errfn) -> (err, a...) ->
        if err? then errfn err else succfn a...

      show_user = (id, cb) ->
        db.query ..., iferr cb, (user) ->
          ...

FTFY, no promises needed. (not to say that promises don't have other advantages, but that specific complaint is easily fixable with an higher-order function to abstract it away)

(JavaScript version: [http://coffeescript.org/#try:%20%20iferr%20%3D%20(succfn%2C%...](http://coffeescript.org/#try:%20%20iferr%20%3D%20\(succfn%2C%20errfn\)%20-%3E%20\(err%2C%20a...\)%20-%3E%0A%20%20%20%20if%20err%3F%20then%20errfn%20err%20else%20succfn%20a...%0A%0A%20%20show_user%20%3D%20\(id%2C%20cb\)%20-%3E%0A%20%20%20%20db.query%20foo%2C%20iferr%20cb%2C%20\(user\)%20-%3E%0A%20%20%20%20%20%20bar))

<comment><USER4> No its not. I address this immediately afterwards (below "But spion, why don't you wrap your calbacks?"), but basically, this simple wrapper makes stack traces unusable.

Bluebird (and also Q) stitches together stack traces from multiple previous events. This is amazingly awesome.

</comment></comment><comment><USER7> I see stuff like:

        promise.when(function(value){
           //blah blah blah
        })
        .error(function(err){
           //handle it
        })

and I think to myself I'm seeing text replacements:

        "promise.when(function(value)" = "try"
        ".error(function" = "catch"
        "})" = "}"

So how is this actually different from the code we're supposedly too lazy to write or too stupid to figure out or something in the first place, thus requiring this slightly more verbose form?

And where is this all going? Like, what's the right granularity of lines-of- code to when chains? If programmers are too lazy to try/catch, then why aren't we too lazy to when/then/error a gigantic block, or you know, not at all? And if we were to instead [w|t]hen/error every line, then I think about DRY and and it occurs to me the most likely next step is a language that "implicitly whens your code", that every line is written like regular procedural code, but automagically has "when" inserted in the middle.

Or in other words, you know, continuations.

But it occurs to me that the only reason any of this stuff is of any interest is because JavaScript, and therefore Node, _still_ lacks real MT support, so you have to jump through these infinitely fractal spilling callback tangos to fake it.

Web Workers was 2009, people. 5 YEARS MAN. Five years that we've been waiting to hear anything about having sane primitives for MT.

<comment><USER4> Nope, `doStuff().then(function(value)" != try`

A closer representation would be `try { var value = doStuff()` which has similar verbosity.

ES6 will have generators and "arrow" function syntax. Meaning:

      doThing().then(function(value){
         //blah blah blah
      })
      .catch(function(err){
         //handle it
      })

becomes either:

      try {
        var value = yield doThing();
        //blah blah blah
      } catch (err) {
        //handle it
      }

or

      doThing().then(value => /* blah blah blah */)
        .catch(err => /* handle it */);

meaning you can pick your paradigm :) Except that the functional one composes slightly better, perhaps.

      doThing().then(value => /* blah blah blah */)
        .catch(only(ParseError, err => /* handle it */));

vs

      try {
        var value = yield doThing();
        //blah blah blah
      } catch (err) {
        only(err, ParseError); // argument repetition
        //handle it
      }

<comment><USER7> Uhhh, you're not convincing me that you've said anything meaningful towards improving software quality.

<comment><USER4> As opposed to what, threads? They have contributed towards improving software quality? In most languages with mutable state they've been a disaster -- correct me if I'm wrong.

Adding threads in JavaScript would also be a disaster. Practically everything is mutable and there are absolutely no locking mechanisms.

<comment><USER8> One possible solution to introduce threads to JS is to isolate threads from each other and use only message-passing:

[https://github.com/audreyt/node-webworker- threads/](https://github.com/audreyt/node-webworker-threads/)

<comment><USER4> Sorry, but share-nothing threads that can only communicate via (afaics) serialized message passing are no longer threads. There is very little benefit to those compared to just spawning child processes.

</comment></comment></comment></comment></comment></comment><comment><USER9> I hope that everyone who writes JavaScript will do themselves a favor and try out ToffeeScript. This offshoot of CoffeeScript simplifies things. For example:

        if fs.exists! thefile
          e, datastr = fs.readFile! thefile, 'utf8'
        else
          datastr = 'not found'
        success = db.update! 'somekey', datastr
        res.end success

So in that example even though there are three callbacks it looks like a normal synchronous flow.

<comment><USER10> I haven't heard of ToffeeScript before, but this is pretty much how Erlang works. Whenever you make a blocking call, all of the async stuff happens under the hood, so that you just deal with sequential code.

Erlang's concurrency model deals with lots of lightweight processes. Rather than having callbacks it uses a message system. Whenever a process waits for a message it yields so other processes can be executed.

In your example there would be a process separate from the main[0] process that handles the database connection. When you request the update to the database, you are just sending a message to the database connection process. This will receive the message and handle the update when it can[1], and once complete, send you a message back with the result of the update. During the waiting period the VM will continue executing other processes. No callbacks needed :)

[0] Erlang concurrency is based upon the actor model. There isn't really a main process, but for the sake of explanation...

[1] The database connection process will actually block while making the update, so if you have 10,000 processes calling this, you will have a bottleneck. As such you should have a pool of database connection processes, rather than just one.

<comment><USER9> Yeah Erlang looks awesome and I should definitely try to learn it at some point.

To me Node.js and ToffeeScript seem a lot more straightforward and have the advantage of the whole package system which I believe is more advanced, as well as the npm ecosystem with 54,000 packages.

But anyway it would be good to actually learn Erlang and use it in some projects so that I can really evaluate it.

I'm not sure but I think it might be a lot more resource efficient for one thing.

</comment></comment></comment><comment><USER11> Slightly off topic, but I've been working in Haskell, and recently realized how the laziness of the language means everything is basically asynchronous by default, but you can still write your code in a synchronous fashion. No real need for promises or callbacks because lazy values _are_ the promises. Well, when using lazy IO, at least.

I'd actually much prefer lazy values be put into Javscript than almost any other feature (real module support is another big one).

<comment><USER12> Then again, Simon Peyton Jones has said that were he to make a new Haskell, it would have strict evaluation. As far as I know, lazy IO is considered a pain in the butt. That beeing said, laziness does have its merits and some ideas can be elegantly stated in a lazy language.

<comment><USER11> do you have a source on this? For me laziness is the single strongest thing going for Haskell.

<comment><USER12> It's from a retrospective on Haskell: www.cs.nott.ac.uk/~gmh/appsem- slides/peytonjones.ppt

There seems to be two arguments against laziness. Firstly, it makes reasoning about performance hard. Secondly, forcing strict evaluation is tricky, maybe harder than it would be to do optional lazy evaluation in a strict language.

</comment></comment></comment></comment><comment><USER13> The problem with discussions of promises vs ... is there's usually a great deal of misunderstanding about what problem promises are solving: enforcement of the callback contract. I could go on for hours about the subtleties in the conversation, but the gist of it boils down to this:

        Node callbacks have a strict but entirely unenforced (in userland) contract:

The contract:

        * Callbacks should be called OAOO

        * Never throw (explicitly or implicitly) after origin tick (aka pass post-tick errors to callback)

There is also an increasingly common informal contract:

        * Never throw ever (aka pass ALL errors to the callback)

But there are a couple of issues that get in the way of successful enforcement of this contract:

        * When external libraries violate this contract (library A calls library B,
          but library B violates the contract in a way that makes it difficult for
          library A to easily maintain the contract)

        * Asynchronous errors

        * Crash-worthy exceptions

Inevitably, this all continually comes back to error handling over and over again, with the core issue being that node.js has 2 divergent methods for error handling: exceptions (try/catch/throw) and error passing (callback(err)). Exceptions requires opt-in error handling (crash by default) while error passing requires opt-out error handling (crash on demand) "and never the twain shall meet."

Promises attempt to resolve this by coercing all exceptions to error passing, but not all exceptions are safe to be passed. Specifically, any exception originating from core that is not an invalid argument exception (think 4XX vs 5XX class errors) cannot safely be caught / coerced / continued on. Also, not all errors passed to callbacks are even theoretically passable as the unofficial policy of core is that core callback errors are only distinguishable from exceptions in that they occur after the origin tick. In other words, they are equally crash-worthy and equally non-crash-worthy.

So promises are an improvement because when used pervasively, they enforce the formal and informal callback contracts, while providing a continuable-like representation of the value that can be passed around.

 __This benefit of contract enforcement is entirely independent of the specific API implementations. __

The stepup[1] library trivially accomplishes contract enforcement by integrating the async trycatch[2] module without using promises or requiring pervasive usage. I 've used them both for years now in various professional projects, with trycatch in use here at LinkedIn. Additionally, stepup could easily return a continuable to support a passable value representation.

Async generators will solve most of this though, allowing node.js to ditch the error passing for exception handling, but since Error subclassing and typed catches are basically not supported in node.js the language keeps getting in the way of a satisfactory complete solution. This is a whole other discussion.

In conclusion, error handling in node.js is an undesigned mess of which the core contributors don't even seem to fully understand or be aware[3,4]. FWIW, node.js' crash on error design is a DoS liability, which spion addresses in the article, and which LinkedIn uses trycatch to avoid.

[1] [https://npmjs.org/package/stepup](https://npmjs.org/package/stepup)

[2] [https://npmjs.org/package/trycatch](https://npmjs.org/package/trycatch)

[3] [https://github.com/joyent/node/issues/5114](https://github.com/joyent/node/issues/5114)

[4] [https://github.com/joyent/node/issues/5149](https://github.com/joyent/node/issues/5149)

<comment><USER4> > __Promises attempt to resolve this by coercing all exceptions to error > passing, but not all exceptions are safe to be passed. Specifically, any > exception originating from core that is not an invalid argument exception > (think 4XX vs 5XX class errors) cannot safely be caught / coerced / > continued on. Also, not all errors passed to callbacks are even > theoretically passable as the unofficial policy of core is that core > callback errors are only distinguishable from exceptions in that they occur > after the origin tick. In other words, they are equally crash-worthy and > equally non-crash-worthy. __

This is not true. With promises, the wrapper of core functionality is left up to you. You can either write a crashy wrapper, an uncrashy wrapper, or a wrapper which picks whether to crash or not depending on the kind of error. I wrote more about this here [1]

Most default wrappers provided by promise libraries catch all synchronous errors but don't do anything with asynchronous errors. So far, this seems to be a fine default -- most unrecoverable, state-corrupting thrown errors in node core are asynchronous, and all the invalid argument errors are synchronous. But even if that weren't the case, it would be a simple matter to write a more specific wrapper.

[1]: [https://github.com/petkaantonov/bluebird/issues/51#issuecomm...](https://github.com/petkaantonov/bluebird/issues/51#issuecomment-31125928)

<comment><USER13> You're talking about the core/userland boundary beyond the origin tick, and we're both right. Promises coerce caught exceptions occurring on the origin tick to errors (bad), while allowing non-caught async errors to be handled in a custom manner as you point out.

The comments following your linked comment address this nuance. I agree with Raynos that the core of the issue is as I point out here, 2 divergent incompatible error handling mechanisms, with both of them fundamentally broken:

* error passing fails because we don't have CPS due to lack of Proper Tail Calls

* throwing fails because we lack async try/catch or at least with async generators we lack a performant try/catch or with bluebird-like optimizations (hacks) we lack typed catch and Error.create

The latter is far closer to a consistent error handling pattern than the former, which promises implement (poorly and verbosely IMO). Additionally, async generators also nicely address the issue of slicing your userland stack away from core, so you get a two for one.

<comment><USER4> Looks to me like you didn't even read the crashy wrapper. With it, its possible to control what gets caught and what doesn't.

Although, I would really like to see a library that is written so badly that even catching exceptions thrown in the same tick would make it unusable.

The default is fine, and exceptional cases can also be covered on demand. (The presented `using` and `acquire` functions might even let you clean up after some "non-recoverable" errors!)

<comment><USER13> FWICT, I fully understand the example and addressed your points directly. You can wrap callbacks to catch everything or always crash, aka

         while allowing non-caught async errors to be handled in a custom manner as you point out.

And the referenced github issue furthers my point,

       Promises coerce caught exceptions occurring on the origin tick to errors (bad)

first via the OP[1]

        Is it possible to turn try { ... } catch off in the bluebird promise implementation?

and then via Dominic Denicola's characteristic snark[2]

        class PromiseThatMissesThePointOfPromises {
        ...

Please point out anything I am misunderstanding.

[1] [https://github.com/petkaantonov/bluebird/issues/51](https://github.com/petkaantonov/bluebird/issues/51)

[2] [https://github.com/petkaantonov/bluebird/issues/51#issuecomm...](https://github.com/petkaantonov/bluebird/issues/51#issuecomment-31076299)

<comment><USER4> Then I don't see how you can claim that the fact that "Promises coerce caught exceptions occurring on the origin tick to errors" is bad. This coerces all the invalid argument exceptions into errors. Is that bad? Or are there other errors which should not be caught but are thrown in this manner, and if so, can you provide (links to) examples which ones and why?

These should be quite rare and are addressable by wrapping that badly behaving function with a crashy wrapper that throws asynchronously...

<comment><USER13> I addressed your point and you are acknowledging it and I can see you understand it from you various other responses. Promises catch "synchronous" exceptions, however unlikely. You can optionally rethrow them / manually crash, which you would need to. Your response is also the most common response, "don't worry about them and deal with them when they come up."

I prefer to avoid this mentality and it motivates the difference in our opinions.

<comment><USER4> No, I'm just saying that undocumented inconsistency cannot be addressed in any other way other than dealing with it on a case by case basis, as it comes up.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER14> I'm not a js guy, but this concept sounds a lot like Twisted's (python) concept of "deferreds". The idea is that you "defer" caring about some asynchronous process, and then attach "callbacks" and "errbacks" to the "deferred". You essentially create a chain of callbacks or errbacks which gets called depending on if a callback is fired or an exception is raised. Overall it's a pretty great concept, but debugging can be a real pain.

<comment><USER15> Yup, from what I recall of history both Twisted Deferreds and JavaScript promises have their heritage in E's promises.

</comment></comment><comment><USER16> And what's wrong with reinventing basic programming-language design a million different ways? Are you complaining that it's too much like Lisp?

</comment><comment><USER17> Aren't they made to be broken?

(Sorry, couldn't help it)

</comment><comment><USER18> JavaScript promises. Got it.

Wait - crashing processes? Denial of service? Wha? Why would JavaScript?...

Oh, this is about Node. Goodbye.</comment>


Seven manufacturers share $1.92 billion fine for 10 years of CRT price fixing - <AUTHOR> http://www.geek.com/articles/chips/seven-manufacturers-share-1-92-billion-fine-for-10-years-of-crt-price-fixing-2012126/ <comment><USER2> I find the whistle-blowing aspect interesting (Chunghwa didn't get penalized because they blew the whistle).

Did Chunghwa participate in the price fixing? Did they get the benefits, and then throw their competitors under the bus? It would be an interesting way to disadvantage your competition if so.

<comment><USER3> Prisoner's Dilemma anyone?

<comment><USER4> The Prisoner's Dilemma is different, since (here) there is no punishment if there is no betrayal, and betrayal is basically atomic.

<comment><USER5> No, it's the same. If no one talks, nothing bad happens. If one person talks they get to keep all the money and everyone else eats a big fine.

<comment><USER4> Look at the matrix in [1]. The matrix here is

        +</comment></comment></comment></comment></comment><comment>-----+
        | A,A | C,B |
        +</comment><comment>-----+
        | B,C | n/a |
        +</comment><comment>-----+

With (A=B) > C

[1] [http://en.wikipedia.org/wiki/Prisoner%27s_dilemma#Generalize...](http://en.wikipedia.org/wiki/Prisoner%27s_dilemma#Generalized_form)

</comment><comment><USER6> Rewording of [http://gigaom.com/europe/samsung-lg-and-others-hit-with- reco...](http://gigaom.com/europe/samsung-lg-and-others-hit-with- record-1-92bn-eu-fine-over-crt-screen-cartels/) submitted by an undisclosed geek.com employee.

</comment><comment><USER7> It seems as if the fines here are so minuscule to the profits that they probably got from the price fixing. I bet they could just put that number on the books similar to loss prevention and call it a day...

</comment><comment><USER8> So do these price fixing fines get distributed among the consumers who paid this price?

<comment><USER9> No. It's too bad the link didn't go straight to the press release, because it answers that question and links to more information about seeking damages.

From <http://europa.eu/rapid/press-release_IP-12-1317_en.htm> :

"Any person or firm affected by anti-competitive behaviour as described in this case may bring the matter before the courts of the Member States and seek damages. The case law of the European Court of Justice (ECJ) and the Antitrust Regulation (Council Regulation 1/2003) both confirm that in cases before national courts, a Commission decision is binding proof that the behaviour took place and was illegal. Even though the Commission has fined the companies concerned, damages may be awarded without these being reduced on account of the Commission fine."

In other words, people can sue for damages and use this ruling as proof. That europa.eu pages has a little more information and some links.

<comment><USER10> I do wonder what happens these fines.

The US govmt are pursuing lots of banks (suspiciously lots of foreign ones) and applying massive fines with little hope of recourse or application of due process. And It is not clear if this money goes anywhere at all.

<comment><USER11> i have a game on hn, where i try to guess how many posts before someone criticises "the government". you beat even my cynical best guess here.

<comment><USER12> Is it not a valid question considering the government is collecting a fine due to consumers over paying?

<comment><USER13> Who else is going to do it?

<comment><USER9> Are you trying to say the citizens of the EU shouldn't be told how their government is going to spend an extra $2 billion?

Because that's what he's asking about.

I agree it's an important question, but I don't know the answer.

<comment><USER14> It is not hard to Google, and the answer is not surprising. [http://ec.europa.eu/competition/cartels/overview/faqs_en.htm...](http://ec.europa.eu/competition/cartels/overview/faqs_en.html):

 _"What happens to the proceeds from fines?

The amount of the fines is paid into the Community budget. The fines therefore help to finance the European Union and reduce the tax burden on individuals."_

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER15> Is there any mathematical method for identifying price fixing?

Like the benford law for identifying bad accounting?

<comment><USER14> I guess you would look for correlation in price changes. Problem with that is that external factors (oil prices, failed harvests, earthquakes in Japan) can cause correlated price changes, too. Correlation of price changes between some major competitors while some other players do not follow suit might be an indicator, but those other competitors might just be in a slightly different situation (other manufacturing method or other company structure (e.g. if one of them owns a mine or has a long-term contract, price changes would affect them differently))

In the end, it is really hard to detect cartels. That, I think, is the reason the EU has the rule "the one who tells us walks free". Without it, companies taking part in cartels would have too little to fear.

</comment></comment><comment><USER16> The original source explains why the meetings were called "green meetings" and quotes from uncovered documents about the price-fixing:

[http://gigaom.com/europe/samsung-lg-and-others-hit-with- reco...](http://gigaom.com/europe/samsung-lg-and-others-hit-with- record-1-92bn-eu-fine-over-crt-screen-cartels/)

</comment><comment> guard-of-terra All the management involved has already got their fat bonuses to that point.

</comment><comment><USER17> What items are being price fixed these days?

<comment><USER18> Data (wired and mobile) seems like the obvious one in the US at least.</comment></comment>


Ask HN: Is there a tool to generate Facebook-like summaries of url? - <AUTHOR> I'm sure you have seen it - submit a link to to Facebook and it pulls and image and a small summary of the content. Is there an API or tool to do that? <comment><USER2> Created one a few days ago: [http://picktwt.herokuapp.com](http://picktwt.herokuapp.com)

<comment><AUTHOR> thanks!

</comment></comment><comment><USER3> The image/summary is present in the Open Graph tag of the page requested.</comment>


Deploying front-end websites to S3 with CloudFront - <AUTHOR> https://ilhicas.com/2020/02/15/Serving-Javascript-S3.html <comment><USER2> You should have a look at AWS Amplify Console [https://aws.amazon.com/amplify/console/](https://aws.amazon.com/amplify/console/) It's specifically designed to do most of this for you. I've been using it for static site work recently and it's awesome. It also does plenty more and can be used for full stack dev but it's great if you just need static site hosting and build pipelines. No need to have the build locally and uses gitops for build and auto generates environments based off branch name patterns.

</comment><comment><USER3> If it's just a personal website, you might find it easier to use GitHub Pages (or GitLab's equivalent) and Cloudflare. Both are free for any reasonable personal website usage.

If you don't want to run a build of your static site generator on your computer and upload the result to GitHub every time you make a change, you can just use Jekyll and GitHub will build it for you. I think GitLab supports other static site generators as well. This technique is how [https://www.snazz.xyz](https://www.snazz.xyz) works.

<comment><USER4> CF is not necessary anymore for SSL since GH can issue LetsEncrypt certificates automatically. [https://help.github.com/en/github/working-with- github-pages/...](https://help.github.com/en/github/working-with-github- pages/securing-your-github-pages-site-with-https)

<comment><USER3> True. I find that the other features (analytics, better DNS interface, caching) make it worthwhile for me. Also, the original article mentioned CloudFront.

</comment></comment></comment><comment><USER5> I've always wondered why Amazon's own CodePipeline service could not deploy a commit of a HTML/CSS static sites straight to S3. They can deploy from CodeCommit straight to Elastic Beanstalk easily enough, but for years I have been asking for an S3 bucket as a destination which would make deploying our static website a piece of cake.

As it is, we have had to use BitBucket as the repo for our website, and we use the Pipelines feature on there to deploy to S3. Would be nice not to have to use a third party service to do something that AWS's own infrastructure makes unreasonably complex and difficult.

<comment><USER6> I'm not sure I understand this comment. I have a simple script (under 100 lines) using the aws sdk that pushes my assets to an s3 bucket where my site is hosted. I'm able to trigger it with an npm script with a command `npm run deploy`.

<comment><USER5> I've found lots of scripts online to do it, but the issue is that we shouldn't really resort to scripting for this. CodePipeline already has a nice interface where I can choose the Elastic Beanstalk environment where I wish to deploy the code. Zero scripting required. Why can't they have a drop down where I can specify S3, and the Bucket name to deploy to as well?

After all, they offer S3 as a service where we can deploy static sites, so why not in their pipeline service offer an S3 bucket as a valid destination for the code?

My BitBucket pipeline I described above has less than 10 lines of YAML to define which S3 bucket to push the committed changes to, so already, a 3rd party workaround is 10x less code than your 'AWS only' workaround. This shouldn't be the case.

</comment></comment></comment><comment><USER7> Configuring CORS is probably the biggest pain about this approach and is necessary if you want to send data to and from an API. This guide should probably mention it or link another guide.

<comment><USER8> I've found a fairly workable solution is to have an origin for the API in CloudFront and a behaviour to route /api/* to that origin. Saves any CORS headaches. Obviously this won't work in all cases.

<comment><USER9> Just remember, the route prefix you use to define the CloudFront behavior will also be added to the request sent to the origin server. So in this case, all routes defined by the API must be prefixed with `/api/`. This makes it hard to refactor existing APIs with many routes and dependencies, but works great in a greenfield scenario.

(Of course, you can rewrite the URL on the fly via Lambda@Edge but that's a PITA to maintain)

</comment></comment></comment><comment><USER10> If you want to do this with one command, check out [https://github.com/tobilg/serverless-aws-static- websites](https://github.com/tobilg/serverless-aws-static-websites) or, if you want to host an API with Lambda as well, [https://github.com/tobilg/aws- fullstack-website](https://github.com/tobilg/aws-fullstack-website)

</comment><comment><USER11> Netlify ([http://netlify.com/](http://netlify.com/)) works great for static sites as well!

</comment><comment><USER12> A problem my team hits with micro projects with this is: virtual routes like `/login` doesn't map to a file. What can be done about that?

<comment><USER13> /login makes me think your website isn't really static.

Regardless, you can use extensionless links with your static website if you rename the file from login.html to login, then change the file metadata to Content-Type: 'text/html'

<comment><USER14> Why would it not be static? It could be a static site making a request to an API to log in?

</comment></comment></comment><comment><USER15> I just use s3_website. It works well if you have Java installed.

[https://github.com/laurilehmijoki/s3_website](https://github.com/laurilehmijoki/s3_website)</comment>


Apple and future of computing - <AUTHOR> http://computegeeken.blogspot.com/2010/04/if-apple-holds-future-of-computing-i.html

<comment><USER2> The usual whining about how Apple is a closed platform ... The Apple platform is no more closed than the Windows platform. Sure coding for iPhone and iPad is more restrictive than coding for a Mac, but nobody forces you to deploy your talent here. You can always develop for Android.

My point is that if you are a professional programmer you will use what tool is more appropriate for a certain hardware platform. For iPad and iPhone this happens to be the C family of languages (Objective-C, C and C++).

<comment><AUTHOR> Its just not about choice of languages or tool sets. Its about freedom . On windows platform there is no one there to forbid you to deploy your applications as Apple do with their Apple store.</comment></comment>


Android Market is kind of a walled garden - <AUTHOR>

HoneyBar is an app that allows rooted users on Honeycomb devices to hide their system status bar.
Numerous users have asked Google to implement this feature, yet they refuse to do so, saying that it "works as intended" (http://code.google.com/p/android/issues/detail?id=15408)
A third-party developer, me, submitted a program to Android Market that allows users to hide their status bar by tapping on an area on their screen. It does nothing malicious or unexpected. Just exactly what it is advertised to do.
Within a week of publishing on Android Market and gathering over a hundred paying users (albeit at only $0.99 USD) Google removed the application from Market with nothing but a form letter indicating that it somehow violates the "Content Policy"
Perusal of the "Content Policy" (http://www.android.com/us/developer-content-policy.html#showlanguages) shows absolutely no obvious violations.
Damnit Google!  Be more forthcoming and/or restore the app to Market!  I've contacted and responded to the form letter email a number of times, contacted Market support and tried to find internal Google people to help.  No luck; sending mail to Google regarding any issue of support is like being sucked into a blackhole--there is no hope.
For now, it's on Amazon's AppStore garnering a tiny fraction of the sales it was receiving before  :-/ <comment><USER2> Google doesn't really do customer service. Then again, it's still less walled than Apple's garden.

There are benefits to avoiding native when it will work.</comment>


Show HN: Find your friends with realtime (but temporary) location sharing - <AUTHOR> http://head2.me/

<comment><USER2> I think you should have a modal appear when a user doesn't allow you to read their location. The modal could maybe offer an explanation of what exactly the site does (e.g. How long you retain location data). Bonus points if we have the option to pick mock locations. I'm suspicious of giving out any data, let alone location data, but would be curious to see what the site does.

<comment><AUTHOR> That's a really good idea, I'm considering maybe having an explanation of what the site does that displays before it first asks for your location (once you've said no it can be tricky to undo that)

For curious people here: it keeps your location for up to 30 minutes in memory on the server then throws it away. I don't log your location or share it with anyone but those you ask the app to.

<comment><USER2> Yeah, exactly. If I knew that it only stores my location info for 30 minutes, I would have most likely said yes. Without that, temporary could mean anything (hours, days, weeks).

</comment></comment></comment><comment><USER3> Nice, a quick alternative to using Find my Friends or the now defunct Google Latitude.

How long is a position url valid for?

<comment><AUTHOR> Your last location will be visible for about 30 minutes after you close the page. But if you leave it open then it'll carry on updating for as long as you like.

</comment></comment><comment><AUTHOR> I just added the tutorial to explain how the app works. Feedback very much appreciated!</comment>