Creating a Microservice? Answer These Questions First - <AUTHOR> https://datawire.io/creating-a-microservice-answer-these-10-questions-first/ <comment><USER2> If you are thinking about going down the microservice path, then do yourself a favour and read _Building Microservices_ (O'Reilly) [1]. It is a little wordy but lays it down pretty well. I'm not affiliated with them, but do heavily research this space, and the larger ecosystem. I found it pretty well rounded.

I'm not sure this articles 10 question list really covers the scope of what microservice means. For reference, I'm not talking about ~5 microservices here (as that might be trivial), but am thinking in the scope of ~50-100+. In that you should have a pretty good reason to adopt them re: your team size and scale of operations. You can see an increased rate of deployed changes, performance boosts, and freedom to choose languages that fit the problem, but it comes with additional operational complexity. In that, you will pay an upfront tax for using microservices. So, you really need to think about asking yourself these types of questions (and the ones in the article).

\- How and where should you break things into microservices (if monolith)?

\- Who should own the microservice? What does this mean in terms of coding, testing, deploying, ops issues, etc?

\- You will need team buy in. A switch could mean months of work. The upside is massive but you cannot push this on them.

\- How do you deal with things at the datastore level (can/should two microservice access the same table space)?

\- How are you going to deploy microservice via CI/CD pipeline into your production env?

\- How do microservices communicate (RPC, API, etc)?

\- What type of metrics do you build into your microservice?

\- How can you trace requests when they hit multiple microservices?

\- You'll need to beef up your operations tools to manage these microservices too. What does that look like?

These are pretty fundamental things you need to think about and the book does a pretty decent job at explaining it.

[1] [http://shop.oreilly.com/product/0636920033158.do](http://shop.oreilly.com/product/0636920033158.do)

<comment><USER3> TL;DR buy the book it's great!

I'll second that, can't recommended the book enough. It will tell you exactly _why_ and _when_ you should go down the microservice rabbit hole (at this point). I'm saying at this point because there are still _many_ angles to this (actually by paradigm) and lots of tooling surrounding it which are not quite there yet (including most prominently docker & co).

 _Don 't fall for the admittedly great modern devops/open-source marketing._

I've been doing both application development as well as good-old systems administration (xen, jails, openvz) for many years and believe me this stuff is still _very_ resource intensive even with the help of other similarly experienced peers readily available. We are literally talking google-level infrastructure architecture, which of course is both bad (setup time) and good (much more flexible and often "simpler" to grasp when the whole flow is established).

While I'm still not at the product stage with my two microservice projects started in August and September (both explicit microservice customer requests, mind you) a friend of mine meanwhile has single-handedly been building two monoliths over the last couple of months. He's been leveraging the still undeniable king-of-web-app-productivity-combo of rails/heroku and is about to move on to his next project while his customers are down the "let's polish some more" beta publishing-angst.

 _Microservices are fun and they are an important development in our field for many use-cases but be an engineer and pick the right tool for the right job, already - educate your boss, peers or customers about the importance of seeing things more objectively!_

Also, don't succumb to the macho "You must be this tall to use microservices. OK, challenge accepted!" like I have to admit to have fallen for myself (I readily obliged to going forward with the tasks at hand) - the cards are largely stacked against you, most certainly when you are alone or not well connected!

[http://martinfowler.com/bliki/MicroservicePrerequisites.html](http://martinfowler.com/bliki/MicroservicePrerequisites.html)

</comment></comment><comment><USER4> Real question: Do you need to build a micro service SOA right now? [http://martinfowler.com/bliki/MonolithFirst.html](http://martinfowler.com/bliki/MonolithFirst.html)

Distributed systems are hard, and building a microservice SOA that is functional is damn hard.

I feel like a lot of people are on the hype wagon of Docker and Microservices right now, they arnt building products, but instead bike shedding with technology decisions which are often not fit for their application. A lot of the people reference to Netflix, Amazon etc, who are companies who had real issues, real traffic, and real products and a real reason why they evolved into a microservice SOA.

Other people reference half finished non production implementations, or people like Hailo who took 2 years to build a technically impressive MicroSOA, replacing their PHP/Java stack, whilst their product stagnated and business declined.

</comment><comment><USER5> I'd like to plug an open-source project that I've been working on here - [https://artillery.io](https://artillery.io) \- as it relates to point (6) in the article. It's a load-generator, and while it's not microservice-specific per se, it's a lightweight tool that's quite easy to use and it lends itself well to being used frequently, which is great if you want to start doing load- testing early on during development (which is something I've started doing and had good results with). It has HTTP and WebSocket support out of the box, with AMQP coming in the next release (which is often employed as microservice glue).

</comment><comment><USER6> Sooo... Can somebody explain to me the difference between microservices and Service Oriented Architecture?

<comment><USER2> I think of microservices as an implementation of SOA. Guess that is not that helpful, but it's almost like a battle tested guide on what the best way of implementing SOA is via trial and error. If you look at how startups are using microservices today, you will find almost a blueprint or common theme coming out. Use an API, embedded metrics in the microservice, how to do monitoring, tracing, use CI/CD, app+dependancy packaging, operations tools, etc.

<comment><USER7> FWIW, it seems early SOA placed a lot of emphasis on the bus and the middleware[1], with the problem being solved having more to do with enterprise governance[2], not one of software architecture. It seems to me, true scotsman and all, that modern micro services architecture has emerged from a first- order attempt to solve actual problems around both scaling vertically and collaborating on large systems in large organisations.

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

2: "OMG how do we keep track of all the stuff running on all the servers? Multiple versions, multiple languages, multiple OSs? This sounds really scary, no, leaving it to the nerds is not an option, think of the BUS COUNT!" (caricature).

<comment> UK-AL We use NServiceBus, and Microservices for a lot of stuff and its really helped development. It handles retries(for network unreliability), transactions, and monitoring for us. Generally most of the issues of distributed systems.

</comment></comment></comment></comment><comment><USER8> > On the other hand, verifying the quality of a whole application that is > composed of many microservices can represent a significant amount of testing > complexity: instead of running a single command to test the code running in > one process, a large number of integrated dependent components must be > running first, verified as healthy, and stay running throughout the tests.

This was very likely already the case for the monolith as well. It likely depended on databases, caches, queues, etc. The solution is the same in both cases: an orchestration solution (such as [https://docs.docker.com/compose/](https://docs.docker.com/compose/)).

<comment><USER9> Maybe. But, setting up the monolith locally is documented in one README, and you've probably already set it up. And, depending on how big your org is, the monolith probably has a lot fewer different databases and caches and queues than all your various microservices built by different teams with different preferences over the years.

Obviously there are solutions to this problem, like you pointed out. But ease of integration testing - both manual and automated - is one thing you often give up when you go down the microservices path.

</comment></comment><comment><USER10> 11\. How can you refactor your application now that you modularized it so very aggressively?

<comment><USER11> Refactoring occurs in similar ways: with strong interfaces between each of your microservices, you can change the implementation of your individual microservices (e.g., keep the payment processing microservice interface the same, but change the internals). Or you can also change which microservices get invoked (e.g., switch from v1 to v2 of a given microservice).

<comment><USER10> Yeah, but you do prevent refactorization across service boundaries. I feel as if you should really think twice before cementing your architecture like that.

<comment><USER11> Can you give me an example of why you can't refactor across service boundaries? In my mind, refactoring a service interface is the same as refactoring the interface (API) of an object. It's real work (tm) but definitely do-able.

<comment><USER12> All things are possible...

I would imagine it's more a question of risk. If you're changing an interface _inside_ your application boundaries, you can figure out pretty easily where the changed API is called and what you've got to do to fix it. If it's something on the edge of your microservice that is public, so who knows what unknown bits of code are open to breakage if you change your API, that's harder to track down and fix.

I don't know a ton about actually implementing this sort of thing, but from the outside looking in, this seems to be a common reason for API versioning.</comment></comment></comment></comment></comment>


[Show NH] Weber-0.0.4 - rails like web framework for elixir released - <AUTHOR> https://github.com/0xAX/weber And some notes about performance - http://0xax.blogspot.com/2013/12/weber-004-and-some-notes-about.html <comment><AUTHOR> And also some notes about Weber's performance and other web frameworks - [http://0xax.blogspot.com/2013/12/weber-004-and-some-notes- ab...](http://0xax.blogspot.com/2013/12/weber-004-and-some-notes-about.html)

<comment><USER2> has there been any work done to try and port the web framework benchmarks from TechEmpower over to weber? It would be interesting to see in the comparison now.

<comment><AUTHOR> Yes, just started after this release</comment></comment></comment>


The Coronavirus Will Win - <AUTHOR> https://www.theatlantic.com/ideas/archive/2020/06/virus-will-win/612946/ <comment><USER2> > At this point, such hopes look unrealistic. After months of intense > research, an effective treatment for COVID-19 still does not exist. A > vaccine is, even if we get lucky, many months away from deployment.

I've been saying this for months.

Mother Nature won in the US, as it has in every previous pandemic.

We can choose how partial lockdown is sequenced, but we need to get to herd immunity sooner than later.

We've never had a vaccine or cure for the cold (a coronavirus), and there's no guarantee we'll find one for covid-19.

<comment><USER3> The article writer totally underestimates the effort it takes to get a drug or a vaccine to the patient.

"Months of intense research" have yielded at least 200+ compounds being tested for various activities. Large consortia have formed. A lot of things are being done in parallel to speed up testing (see vaccine research).

It takes time to prove efficacy: remedisivir only showed its efficacy in a 800+ people cohort. At first the time to administration was not correct: lopinavir-ritonavir were thought to be not working, but perhaps they do if given earlier in treatment, and what not.

I don't know what the author's expectations are, but we're witnessing a very fast pace of drug development and testing (not without warts, of course). What did the author expect, a miracle cure in 6 months? Most of the drugs being tested at this point are repurposed: the new ones will be tested through the summer and early autumn.

And there are wins like with dexamethasone, which is effective and cuts down mortality.

I recommend (to the author) a thorough reading of what's going on before launching in such a pessimistic piece. Yes, we might still be in hot waters. No, it's not that we will be destroyed by this coronavirus.

By the way, indications from early data from vaccine development tells us that it immunity is generated. The open questions are the duration, and the efficacy in a diverse population. But that's what trials are for. The fastest vaccine ever made took 4 years, IIRC. We're close to having results in 8 months (positive or not, the data will tell).

P.S.: The cold is mainly caused by rhinoviruses. Coronaviruses only account for a small percentage of that.

<comment><USER2> > we're witnessing a very fast pace of drug development and testing

Anything short of a successful human trial is ... nothing.

SARS-1 in 2003 even had animal trials, but no results in humans. (Covid-19 is SARS-2.)

The false hope of a vaccine or cure has caused some US governors to announce waiting for a vaccine before ending lockdown. 2022? What if that vaccine never comes? How do you base policy on mere hope?

<comment><USER3> > Anything short of a successful human trial is ... nothing.

RECOVERY just posted their preliminary results on dexamethasone. The NIAID trials showed efficacy of remedisivir. But getting a trial right can take some time. RECOVERY started in March, and had to enroll 10,000 patients or so.

A lot of trials are running at this point, it is a matter of collecting data and drawing conclusions. Antibody based therapies are probably the ones going to be the most effective, but I worry about the cost (they aren't cheap).

> The false hope of a vaccine or cure has caused some US governors to announce > waiting for a vaccine before ending lockdown.

That is misguided as much as saying that there is no cure ( _yet_ ). In fact, I'd say that most governments focused too much on vaccines and too little on pharmacological interventions.

FTR, for SARS, a lot of programs were halted because it fizzled out, and so it was impossible to actually test them. For MERS though, there were vaccines in development (and still are), and that's why most of the stakeholders were this fast in getting candidates ready.

<comment><USER2> It's great that you're optimistic, but neither SARS-1 (2003) nor MERS (2012) have vaccines:

"The first identified case occurred in 2012 in Saudi Arabia and most cases have occurred in the Arabian Peninsula.[2][7] About 2,500 cases have been reported as of January 2020.[4] About 35% of those who are diagnosed with the disease die from it.[2] Larger outbreaks have occurred in South Korea in 2015 and in Saudi Arabia in 2018"

[https://en.wikipedia.org/wiki/Middle_East_respiratory_syndro...](https://en.wikipedia.org/wiki/Middle_East_respiratory_syndrome)</comment></comment></comment></comment></comment>


Runscope acquired by CA Technologies - <AUTHOR> https://blog.runscope.com/posts/301 <comment><USER2> I'm a little busy running around today getting situated at CA, but I'll check in on the comments throughout the day in case anyone has any questions.

<comment><USER3> How big was the Runscope team at the time of acquisition?

Also, CONGRATS!

</comment></comment><comment><USER4> and another good product goes to CA to die

<comment><USER5> Curious - Does CA have such a reputation?</comment></comment>


Ask HN: So news is bad for us, but is the solution to follow people directly? - <AUTHOR> There seems to be an agreement among the HN community [1] that "news is bad for you" [2] and that we need to find a replacement for the primary news feed providers, cause their main purpose is to make make profit and not to keep us informed.
My idea of an alternative news feed is to keep following inspiring people you encounter, like a professor you have in university, or the no-name author of a movie. Following should be agnostic of a social network platform, just to keep track of all their public feeds. That way you would build up your personal network of people, that keeps growing and producing more value.
Whats your thoughts on that?
Maybe we can keep this on a conceptual level, and avoid technical problems of networks in general (like power laws and spaming), implementation details or reward mechanisms.
[1] https://news.ycombinator.com/item?id=16763604 [2] https://www.theguardian.com/media/2013/apr/12/news-is-bad-rolf-dobelli <comment><USER2> Isn't that what everyone has been doing?

Have you considered making a private search engine that filters out media sites and click bait generators as well as grabbing celeb adblocks.

<comment><AUTHOR> Yes I have, thats my current side project, I am testing this approach currently.

</comment></comment><comment><USER3> How do you deal with the fact that many interesting people don't have/take the time to write anything out?

<comment><AUTHOR> Those people probably would not attract your initial interest at all.</comment></comment>


Theranos Our Lab - <AUTHOR> https://www.theranos.com/our-lab <comment><AUTHOR> This is a fascinating non-denial denial.

Key claims in the WSJ report they simply ignore: "At the end of 2014, the lab instrument developed as the linchpin of its strategy handled just a small fraction of the tests then sold to consumers, according to four former employees." "One was tested with Edison machines and the other with instruments from other companies. The two types of equipment gave different results when testing for vitamin D, two thyroid hormones and prostate cancer. The gap suggested to some employees that the Edison results were off, according to the internal emails and people familiar with the findings."</comment>


Black Widow - <AUTHOR> http://dcurt.is/twitters-graph

<comment><USER2> Can someone name me an instance where a site as popular as Twitter eventually flopped because it didn't play nicely with third-party developers? I can't think of one, although I most certainly could be wrong.

There seems to be this idea that angry developers -> no apps -> crappier service -> users leaving, and I just don't see it. Apple has long been screwing developers with their App Store and yet how many thousands are out there coding away at their iPhone games, playing by every rule, however arbitrary, that Apple implements?

Developers aren't going to kill Twitter, but a better service more attractive to users will. I'm of the belief that at this point, Twitter's developed such a huge brand that the lack of app choices alone is nowhere near enough to decrease user engagement. Twitter is constantly on CNN, a myriad of other news channels, and almost every major celebrity tweet I've seen has been made from either the Twitter web interface or their Mac/iOS app.

Users have a much, much larger threshold of "abuse" than many people here seem to believe. Facebook ads, Twitter ads, no third-party Twitter apps, etc, are all very minor annoyances, if you can even call them that, to the majority of users. So while Twitter's new move is certainly frustrating for the developers that helped give them a boost initially, they've certainly got the momentum, brand-recognition, and celebrity engagement to keep them going for a while.

<comment><USER3> Quite to the contrary as what is being supposed, a deluge of mediocre developers has actually ruined more than one platform.

Pre-Nintendo, the entire video game industry crashed because of awful developers. When Nintendo broke into the scene, they were notorious for their stringent quality guidelines and hated for some time as a result.

<comment><USER4> What's ironic then, is that Nintendo has slowly lost its dominance over the video game console industry by its slow erosion of its developer base.

PlayStation was hugely enabled by Square "rebelling" against Nintendo and siding with Sony, while XBox has broken through at least partly through its fervent support for its developers.

<comment><USER5> _What's ironic then, is that Nintendo has slowly lost its dominance over the video game console industry..._

How are you measuring dominance? I don't really follow these types of things closely, but hasn't Nintendo been in the video game business longer than any of its current competitors and hasn't the Wii dramatically outsold it's current crop of competitors? They've certainly had plenty of flops and bad years, but who exactly is more dominant than Nintendo in the console arena?

<comment><USER6> The Wii is winning if the only metric is pure console sales. I know personally that even though I own one. I've played a single game on it in the last 2 years and the last 6 months it's been delegated to a Netflix machine in the bedroom. I wouldn't exactly label that "dominance" of the current generation.

Plus, all you have to do is go back a single console generation and you have the Gamecube which was absolutely dominated in pretty much any category you can think of by the Playstation 2. Even the Xbox, a console by a company no one though should develop a console, managed to beat the Gamecube in sales.

Go back one generation further and again the Playstation dominated the Nintendo 64.

I would argue that Nintendo hasn't been in a dominant position in a very long time. The sales of the Wii were a big win for Nintendo, but they aren't really delivering on the games front. The Wii was sold at a time when the casual market was ready to explode. But now it's just turned into that thing no one uses. Hell, I bought a $99 Wii for my girlfriend's parents mainly so they would be able to watch Netflix. Sure, it was another Wii sale, but that's not exactly what we usually talk about when we talk about dominance in the gaming industry.

<comment><USER7> "The Wii is winning if the only metric is pure console sales."

You may not have bought a lot of Wii games, but they are competitive on the tie ratio metric: [http://www.vgchartz.com/analysis/platform_totals/Tie- Ratio/G...](http://www.vgchartz.com/analysis/platform_totals/Tie- Ratio/Global/) Basically, on every objective metric, they are either competitive or flat-out won this round.

It takes a lot of dancing to try to claim otherwise, but a lot of people seem ready to do that dance. I'm not sure why. I don't like Apple particularly well personally, but I don't try to run around proving they aren't an extremely successful company.

Oh, and if we're going to talk console dominance, one should probably not forget that Nintendo has simply owned the portable gaming world for 12 years now, since the Gameboy came out. The only thing that has ever successfully competed with the Gameboy or DS lines are the next Nintendo model.

<comment><USER4> Agreed on the portable gaming world, but I don't think it's difficult to see how Nintendo's position in the console gaming market is not nearly as strong as strong as it was during its NES/SNES days.

</comment></comment></comment></comment></comment></comment></comment><comment><USER8> They say a picture is worth a thousand words. To Twitter, one Kardashian is worth thousands of developers. Apps don't matter to twitter. Developers don't matter to twitter. Celebrities matter to twitter.

As DCurt points out so eloquently, twitter is largely a one way medium. Celebrities -> everyone else. If you need proof, look at anyone's twitter stream (including your own) and note the ratio of famous people to actual friends. The average person clearly doesn't care about apps or developers or even social networking. They just want to feel a little bit closer to someone who is better known than they are.

The real twitter killing app is whatever attracts celebrities. Anything else might have a long road.

<comment><USER9> I agree with this completely.

I have yet to even meet someone that uses twitter. I have always seen twitter as a valleywood product. Seems to me like the people that use it, use it because they think they are suppose to.

<comment><USER10> Well, let's see. Twitter has 500M registered accounts (according to Wikipedia) and a churn rate of about ~80% as of 2010[1], a (very) ballpark estimate of active users is 100M.

While you personally may not have met anyone who uses it, I know a lot of people who do and they are certainly not all in "Valleywood." And I'm pretty sure no active user is using it "because they think they are supposed to"; there's no evidence that suggests people who aren't really that interested in Twitter keep coming back to use it out of a mysterious sense of obligation.

[1]: [http://liesdamnedliesstatistics.com/2010/01/80-twitter- accou...](http://liesdamnedliesstatistics.com/2010/01/80-twitter-accounts- inactive-but-core-users-more-committed.html)

<comment><USER11> What does it mean to be an "active" user? If I use it once a month, or even once a week while following a search, am I "active"?

I have a twitter account. I just about never "tweet", but occasionally look for information there. Mostly I ignore it. I don't know how the churn is measured, but I know a lot of people who fit into that category -- they use it, but not heavily. If something else replaced it I would barely notice.

Whereas, in my experience, many Facebook users seem much more heavily committed to Facebook, since it has updates of friends and family. (I don't use Facebook at all, so this is just an observation -- would love to see more data contrasting the two services.)

</comment></comment></comment></comment><comment><USER12> "Twitter has an enormous advantage over Facebook in one key area: while people on Facebook tend to friend their friends, people on Twitter tend to follow their interests. The following graph from Twitter is worth far more on a per- account basis because it is directly monetizable in a way that Facebook's generally isn't – you can show prophylactic advertisements to Twitter users based solely on the people they follow, and probably get a much higher rate of interest. Compared to other social display ads, Twitter ads, it is rumored, work extremely well."

Facebook users friend their friends AND follow celebrities/brands/products. Facebook also encourages you to share a lot of information about interests and locations. You might also share the same on Twitter, but its not neatly saved as part of your profile.

I'm not sure Facebook will be able to make more money off advertising then Twitter, but if they don't, it wont be because of lack of information about your interests.

</comment><comment><USER13> Devs are like artists moving into rundown neighborhoods.

"No one was here when we moved in. Windows were broken, it was dangerous after dark. But the rents were cheap and the architecture awesome so we all moved in." "Soon good coffee shops and restaurants opened. Some buildings were fixed up. It was great!" "Then the hipsters/wannabes/yuppies started moving in. They drove up rents and the price of a latte. Now we can't afford to live around here anymore. This SUCKS"

As someone below mentions Twitter is 6 years old. It's outgrown the early wave. Neighborhoods don't usually suddenly collapse back again. But new neighborhoods soon flourish in old rundown neighborhoods. Better to focus on the next neighborhood than lament the march of time.

</comment><comment><USER14> I think Twitter understands that there is a much lower barrier to leaving their service for a competitor, compared to the other social services.

What data do you have in Twitter that you wouldn't be prepared to leave behind?

<comment><USER15> Only the graph, rebuilding your following/ followers would be a pain. Which makes sense that if they are going to be a pain about anything it is restricting access to rebuilding the graph on competing services.

</comment></comment><comment><USER16> Now would be a fantastic time for Google+ or App.net to sweep in and get developers on their respective sides. Past social networks have gone in phases, and I wouldn't be surprised if this doesn't begin to push people away from the platform.

No, it won't _kill_ Twitter, but it will lead to the rising up of something else, akin to how Twitter started to gain traction when they debuted their API.

</comment><comment><USER17> Twitter's advantages are 1) asymmetric follow and 2) a head start. Neither provides an insurmountable barrier.

</comment><comment><USER18> twitter has apps?

I mean, I'm kidding, mostly, but really, what are twitter apps for? slightly easier input from a phone? I thought that most of the value of twitter was that it was 'like a rss aggrigator but easier'

<comment><USER19> Yes, the primary added value was user experience. However, devs also built apps for the corporate market that go beyond consumption use cases.

Granted, Twitter has been working on their own business services and apps that fall under that category will probably remain unaffected (for now).

</comment></comment><comment><USER20> So the reason twitter closing its API as as an attempt to maintain their 'walled garden'? Rather than building a sustainable competitive advantage they are freezing out developers and hoping for the best?

Perhaps it is part of a larger scheme, that leads to monetization?

</comment><comment><USER21> Instant YC startup: Twitter alternative with free 3rd party app support up to a given volume with dirt-cheap pricing for additional volume beyond that - long-tail your way to success just like an app store. Am I missing something obvious here?

</comment><comment><USER22> Although I sometimes am left feeling shallow--after reading one of the shorter blog posts like this one from the front page of HN--I am usually thankful more words were not used on the same topic.

</comment><comment><USER23>
        >The problem with this solution is that Twitter was built
        >on the backs of the very developers it is now blocking.

Was it really? I've never seen any specific stats, but what are the number of users solely relying on a third party app to use Twitter versus the number of users who just use the site? I bet there are a lot more who just go to mobile.twitter.com or use the official client instead of paying for a third party app.

<comment><USER9> Didn't the "official" client start out as a third party app. Tweetie.

<comment><USER23> And I'm asking how much of an effect it really had. The fact third party apps exist doesn't mean the majority of users, or even a worthwhile number, use them.

</comment></comment></comment><comment><USER24> The thing most of these types of criticisms of Twitter forget is that users don't make apps, developers do.

</comment><comment><USER25> 140 characters is equally smart and equally shameful for Internet from where i see it. Twitter will do what fits its revenue model relentlessly and ruthlessly, since its logical and rational. Point is since you can't fight it "Kill It" and build a new one.</comment>


Ask HN: Which hardware manufacturer writes the best datasheets? - <AUTHOR>

<comment><AUTHOR> OP here: I'm a big fan of Analog Devices' work, and recommend them to our students as a reference for what a good datasheet should look like.

I'm perpetually on the lookout for other great datasheets, hence the Ask HN.

</comment><comment><USER2> atmel and ti - but they are dense too

</comment><comment><USER3> Intel</comment>


Anti-Salt Narrative Needs a Shakeup - <AUTHOR> https://www.bloomberg.com/view/articles/2018-06-15/salt-intake-is-not-even-clearly-a-cause-of-hypertension <comment><USER2> As someone who loves salt, I will gladly add this to my collection in the game of Cherry Pick Evidence For Your Preferred Nutrition.

You'd think that science would make things here a little more conclusive by now...

<comment><USER3> One of the little talked-about but very prevalent problems in research is the endless number of lobbyists behind "scientific" findings and the products they promote.

<comment><USER4> Why isn't research more decentralized?

<comment><USER5> Who would do that decentralized research? Why would they do that?

The real question is why do governments watch private interests take over public research institutions and not only do nothing to preserve the lack of bias, but even go out of their way to help the process? (And yes, the answer is not secret.)

<comment><USER6> Do you really think government research absent private bias is free from bias?

How government money gets spent is a very political process, and naturally that puts a lot of pressure on research organizations to produce the politically correct result.

</comment></comment></comment></comment></comment><comment><USER7> There is just such a lack of good, well-done dietary research that it's almost impossible to know what advice is true, what advice is probably true and what advice is just made up. Obviously these studies are extremely difficult to do well, and hence why they haven't been done. But the cost to society is much, much greater than the cost of these studies.

<comment><USER8> There is a way to know: self-experimentation. I do realize you mean knowledge as a society. But I'm happy there's at least a way to resist the generalized brainwashing. And maybe if more people tried by themselves, it would be more difficult to get away with the current bs.

A few advantages are that you find out what's good for you in particular, not every body works the same, that you don't get confused with partial results that get canceled and, my fav, that you learn what works in practice: it's useless to know that you can lose fat with a diet you are unable to follow.

You've probably realized that my experience is about losing weight and general wellness, but that's just _the_ problem with nutrition for most people.

<comment><USER9> Given the number of variables that can be adjusted, the extent to which they can be adjusted, and the time it takes to see results, self-experimentation is barely viable for even trivial short-term goals. How many chances does one have to try a different set of inputs for 3 months apiece?

Even for short-term goals anything non-measurable is highly prone to confirmation bias - e.g.: "I feel more energetic on this keto diet!" because I expected to feel more energetic on this keto diet and these Instagram accounts I follow keep reinforcing that this is what I should expect. Additionally there is the issue that the human body is a complex system where things that seem good in the short term can be quite bad in the long term - e.g.: "These 6 cigarettes a day are really helping with the over-eating I'd been struggling with!".

For many of us who care to research nutrition more than superficially the goals tend to be more long-term ones like not developing Alzheimer's, cancers, atherosclerosis, organ failures, etc., all in support of staying healthy & active for as long as possible. Those goals don't lend themselves to a hill- climbing optimization via self-experimentation.

<comment><USER8> _How many chances does one have to try a different set of inputs for 3 months apiece?_

No need to spend three months. The body raise all kind of signals in reaction to food, almost instantly.

 _Even for short-term goals anything non-measurable is highly prone to confirmation bias_

Are bathroom scales also affected? Are keto test sticks too?

 _For many of us who care to research nutrition more than superficially the goals tend to be more long-term ones like not developing Alzheimer 's, cancers, atherosclerosis, organ failures, etc._

Don't worry. Considering the level of aggressiveness industry has shown against low carbs diets, if any of those scares had any minimum basis, we would know by now.

Look, this post is no longer in front page, so it's doubtful anyone except us is reading it. I take for granted that you genuinely think what you say and hope you give me the same benefit of doubt. I haven't done keto in like twenty years? (not sure) but I can't tell you this: it works. Last time I did it, I spent two years in low carb with no adverse effects whatsoever. I ran every other day, was in a very good shape.

I can't help chuckling when I read hit pieces like what Wikipedia has to say:

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

If you read carefully you'll see that they suggest that it doesn't work at all and that it's just placebo, "nutritional nonsense", water losing or simply caloric reduction due to unpalatable plan. That's idiotic, as you can see if you go to other more technical article:

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

Surprise! It seems that there is actually a non-contentious, perfectly known mechanism to burn fatty acids induced by fasting or _reducing carbs intake_.

Try to reconcile that with: _The Atkins diet is promoted with questionable claims that carbohydrate restriction is the "key" to weight loss._ Questionable my ass. That's what the diet is and it works. If you don't like the kind or food you need to eat to follow the diet, it's OK and it's really the reason most people quit.

If you're worried about _unknown_ long term risks, choose your poison: do you think it's safer to be fat? can you achieve the same results as easily with other diets? Power to you. But don't believe the army of liars that's been spreading FUD consistently over the years.

<comment><USER9> You seem quite defensive about keto and missed most of the point of my post. I wasn't writing about keto specifically, I just needed a few examples and that was one that came to mind at the time. You can sub in "eating nothing but sauerkraut and grapefruit" or anything else that springs to kind. My post was about self-experimentation in general. The "scares" you refer to, I did not claim were a result of a low carb diet - they were examples of the types of long-term issues that some of us would like to avoid. Unfortunately the impact of diet & lifestyle on those can be decades in the making - not to mention that some, like Alzheimer's, don't allow for do-overs - which makes it rather hard for an individual to employ self-experimentation to avoid them. The fact is that an individual won't be able to determine if consuming more or less of vitamin X or mineral Y will increase or decrease their probability of developing condition Z via self-experimentation for most of the scary conditions, let alone if vitamin X needs to be present in combination with compound Z, etc.

> choose your poison: do you think it's safer to be fat?

This is a false dichotomy. The choice is not keto or obesity. And losing/maintaining weight is one of the short-term & measurable goals I was alluding to. It's trivially achievable in a fairly short time with various approaches and keto is certainly one of them. Many of the others require less self-discipline than keto however, and a number of those have orders of magnitude more man-years of aggregated long-duration testing behind them.

> But don't believe the army of liars that's been spreading FUD consistently > over the years.

That's good advice, but how do I identify which one is the army of liars and which one is the army of truth? :)

<comment><USER8> How body work is a complex subject indeed. But if you remember, this all began as a response to joshgel complaining that it's impossible to tell good advice from bad one.

I'm not proposing that every person invents own diet, just to use common sense if a diet works for you and another doesn't.

As to how to identify who's lying, how about people telling lies? When Atkins wrote the book in the seventies, his critics told that his diet didn't work and provoked a series of terrible side effects, none of what was true.

The fact was that thousands of people were trying the diet and it worked and it didn't make them sick. So where did the criticism come from? You can tell me that there are _unknown_ risks and ask for caution. But if someone is saying in no uncertain terms what they said in the face of evidence, that's a strong indication that they have no interest in truth.

Of course, diet is not the only matter in what some powerful entities try to manipulate the public, it happens in a variety of matters where science, politics and private interests meet. The first principle here is follow the money.

<comment><USER9> You first make the claim that your chosen diet must be safe because if it weren't safe there would be evidence to the contrary. Then you dismiss those people who try to bring forward evidence to the contrary as liars. You can't have it both ways.

It's funny that you should bring up Atkins and then suggest "following the money"... Atkins Nutritionals sued some of the people that you are labelling as liars, and lost all of their lawsuits. If there's one thing I've learned from my two decades living in America it's that when a corporation loses a lawsuit to individuals here, the individuals are probably barking up the right tree.

Have you considered the possibility that what you are terming "liars" is just "people that disagree with my strongly-held belief"?

</comment></comment></comment></comment></comment></comment></comment><comment><USER10> Very interesting. I'm affected by high blood pressure so I monitor it pretty closely.

If I need to get my blood pressure down, there are three levers that consistently work:

° reducing sodium - note: I really like salty things, so it's very easy for me to push 6-7k mg or more, especially when I was in college eating cafeteria and frozen food constantly. Also, drowning things in hot sauce, to which I am mildly addicted.

° exercising.

° cutting out alcohol and certain other vices.

Everyone's different, so if you're worried about it, talk to your doctor and consider starting a monitoring program. I like home monitoring; IME knowing exactly the impact of my choices on my blood pressure helps me make good choices.

It's good to hear the guidance might become a little more sane - it is extremely difficult to eat a normal (by any American standard at least) diet and be less than a few thousand mg.

<comment><USER11> > 6-7k mg

Why not say grams? A thousand miligrams is a gram.

I've always "suffered" from low blood pressure. Never quite to the point of fainting when I stand up too quick, but it's been close a few times. Exercise for me means I have to go out of my way to supplement sodium or I start getting muscle cramps.

So I wonder, what does high pressure feel like? How do you know when it's too high? Or is it just something you notice on a device and know to fix because doctors say so?

<comment><USER12> Most food packaging measures sodium in mg, so I feel using those units is easier to reason about for most people.

<comment><USER13> There is a reason the SI system uses decades. It's exactly that it makes this trivial, but I guess if one is not that accustomed to thinking in decimals/metric, it might not be as obvious.

mg is also just composed of the SI prefix m = milli, and the SI unit g = gram, where the latter is a little weird due to naming problems early on leading to it being the only SI unit where the base unit, the kg = kilogram already has a prefix.

The milli means thousands, so you are just saying 6 thousand thousands gram. If you internalize SI units, and decompose them automatically, this seems at least confusing, possibly worse, depending on how picky the reader is about unnecessarily contorted grammar in general.

I myself advocate the use of prefixed gram for the cases where people use tons, but I accept that people in general don't like them being called megagrams = Mg from now on. This is by the way the reason why mb != MB when denoting storage space, but 8e9 mb = 1 MB, due to the former denoting millibits, and the latter megabytes. There is also MiB, mibibytes, denoting 2^30 B. Microsoft denotes MiB as MB, which is wrong, and lead to great confusion. Be careful, embrace SI units, they make your life easier.

<comment><USER14> Using SI doesn't mean you shouldn't maintain consistency between units you're actively comparing to avoid inadvertent conversion error. If your working units are mg, using mg across the board is completely sensible. It lowers the mental load involved and reduces the chance of the human factor introducing errors.

It has nothing to do with being uncomfortable with working with SI units and everything to do with having a consistent working environment for me.

For example, If I were drawing something up in CAD and needed a particular face to be 120mm, I'm completely aware that could be represented as 12cm, but I _want_ the software to label that as 120mm so that it's consistent with e.g., a 23mm face next to it.

Your working units for sodium in food consumption are milligrams. Labeling the final sum the same way is a good thing.

<comment><USER15> Sure, but say 6000 mg, don't say 6k mg.

<comment><USER14> That'd be ideal, yes, but I'll take 6k mg over 6g when mg are the working units every time. The k makes it much more explicit that there was a shift in magnitude than just silently converting between units.

</comment></comment></comment></comment></comment></comment></comment><comment><USER16> [https://www.scientificamerican.com/article/its-time-to- end-t...](https://www.scientificamerican.com/article/its-time-to-end-the-war- on-salt/)

Scientific America (2011)

 _"This week a meta-analysis of seven studies involving a total of 6,250 subjects in the American Journal of Hypertension found no strong evidence that cutting salt intake reduces the risk for heart attacks, strokes or death in people with normal or high blood pressure. In May European researchers publishing in the Journal of the American Medical Association reported that the less sodium that study subjects excreted in their urine—an excellent measure of prior consumption—the greater their risk was of dying from heart disease. These findings call into question the common wisdom that excess salt is bad for you, but the evidence linking salt to heart disease has always been tenuous."_

</comment><comment><USER17> >I found an advocate for rationality in Richard Sloan, a professor of behavioural medicine at Columbia University. He said that when it comes to hypertension and other health problems, Americans put too much faith in the power of personal agency.

Isn't that the truth. Another example came to mind immediately which is the treatment of alcoholism. AA is really big in the United States but has abysmal recovery rates, whereas preliminary studies with muscle relaxants have shown great promise.

Yet in public discourse diseases are treated like one's 'personal demons', a 'challenge that has to be overcome' and so on. It almost seems like a personal growth lifestyle change rather than an objective medical assessment with programs like AA suggesting opening oneself up to 'higher powers' in their official guidelines.

There really needs to be a big culture shift that moves health debate from a sort of Puritanism to objective medical evaluation that keeps the personal angle out. Especially when it comes to drug abuse and dietary related illnesses. Obesity is a big issue as well.

<comment><USER18> What are you talking about? There's plenty of stories out there of obese people who lost weight on their own and got their life back into shape (myself included). This ivory tower elitism is nonsense. They are worried that if enough people took actions into their own hands they'd be out of business.

<comment><USER19> I think a lot of people could "will" to fix some of these problems in an ideal world, but other factors beyond their control prevent them.

I "beat" obesity in the last year. My BMI was low 30s and it's now low 20s. Knock on wood, after some time I don't seem to be regaining it like a lot of people do (as suggested by my sibling post). Without getting into too many personal details, the biggest thing to cause that was a radical re-shift of my work habits. A vast majority of people do not have the luxury of chosing when and how they work. I do not fault them for not replicating what I did. I struggled with it myself for a long time, before my recent success, until I was able to make these latest changes.

In general I think things which lead to judging other people for their circumstances is a bad idea. There are probably people who could will it away. Is it their fault that they don't? Honestly, probably not usually.

<comment><USER20> Out of curiosity, what did you change about your work habits?

<comment><USER19> Quit a job, replaced it with zero commute, making room for daytime exercise and better meals.

</comment></comment></comment></comment></comment><comment><USER21> I'm on a ketogenic diet and I measure out a full tablespoon of salt for my daily consumption. I usually get somewhere between 7-8 grams of sodium a day. My mind was blown when I saw the McMaster study on sodium that found that for normal diets, 5 grams daily showed no increased mortality of all causes. I think it was too much below 3g or much above 7g is where things start to get dangerous. I had to do some trial and error to find the right amount of salt for me and I'm still tweaking it here and there.

<comment><USER15> But they're talking about all source sodium, not just added sodium. How much sodium is in the rest of your food?

EDIT: one tablespoon is 18 gm of salt. That's over 6 gm of sodium.

EDIT2: Also, the study you're talking about says this:

> We noted that most of the world's population (about 95%) studied consumes > more than 3 g/day of sodium, regardless of hypertension status and only 22% > consume 6 g/day or more of sodium—the threshold above which we note an > increase in mortality and cardiovascular disease risk.

<comment><USER21> I don't really eat any prepackaged foods besides macadamia/coconut milk. Mainly broccoli, spinach, celery, eggs, chicken, turkey, tuna and a ton of coconut/olive oil. A tablespoon of salt is 7080 mg of sodium. There haven't been any studies looking at ideal sodium intake for people on keto as far as I know, though it is generally accepted that there is a higher need since the liver gets efficient at excreting sodium.

I wouldn't necessarily recommend others take as much sodium as I do, only that personally I seem to feel better around that level. I have heard from some people that take as much as 11g a day on keto. I would definitely not exceed 5g much if I was on doing a standard diet though.

</comment></comment></comment><comment><USER22> I was taught that salt (sodium) unmasks hypertension, but doesn't cause hypertension. In other words, sodium is the tool that the body's regulatory systems use when trying to raise blood pressure. So a healthy younger person can probably not worry about sodium intake. But for an older person with congestive heart failure, a bag of potato chips might end them up in the hospital.

</comment><comment><USER23> High salt diets == Hypertension and High fat == heart disease are two "scientific truths" that have been propagated for decades and have turned up as bad science.

I've heard the argument of "all the scientists believe this, so you must be wrong" so many times with these and it turned out I was right. I believe the same will go for other incidents of bad science that most people believe these days.

<comment><USER24> Did anyone familir with the literature say "all the scientists believe this"?

<comment><USER25> We've all heard it in school and through major newspaper and TV shows since we entered school.

It doesn't matter what the best experts says as long as those picked up by mainstream media and textbook authors consistently agree on the wrong thing.

<comment><USER24> Makes sense. Just wanted to clarify in order to distinguish from a case like global warming, where there really is expert agreement.

<comment><USER23> There was expert agreement on both high salt and high fat diets for decades.

</comment></comment></comment></comment></comment><comment><USER26> Recommend people read the book The Salt Fix, by Dr. James DiNicolantonio. Just like cholesterol and Ancel Keyes, opinions of just a handful of people, in particular Dr. Walter Kempner, changed public health policy against salt with very little evidence to back it all up. Now you are starting to see all this terrible advice unravel.

</comment><comment><USER27> Stan Efferding, who not only holds world records in power lifting but who also trains Hafþór of Game of Thrones fame, is big into recommending at least 6g of sodium a day for people who are pretty active and exercise regularly: [https://youtu.be/BeOc7TRo9Os?t=16m49s](https://youtu.be/BeOc7TRo9Os?t=16m49s)

Admittedly, some of the practices that work for genetic outliers of the caliber of Stan Efferding and Dan Green (or people who train as hard) don't apply to the rest of us regular mortals.

<comment><USER28> Dan Green and Stan Efferding both take steroids though (or at least Stan did at one time), and they weigh a ton. Not sure anything that applies to them would apply to most anyone else. It's probably best not to glean health tips from powerlifters in general...

<comment><USER27> It'd be pretty shocking to find someone performing at that level who doesn't increase their testosterone levels (and much, much more) artificially. I'm pretty sure Stan is still on HRT these days. It's sort of a loophole in the system these days for how to obtain it legally. It's not nearly as powerful as cycling it, but it's better than nothing.

I always find the whole "but they take steroids" argument strange.

It's actually funny you should mention taking health advice from powerlifters, bodybuilders and strongmen. Stan Efferding has an entire video on the subject, where he makes it clear that if you want to look or perform like him or some of his peers, you will most likely not be healthy: [https://www.youtube.com/watch?v=yxHZrF4AFRg](https://www.youtube.com/watch?v=yxHZrF4AFRg) . The part that struck me the most was that some of these guys need CPAP to sleep once they get into the 300-400lbs weight category, just because a human body isn't supposed to weigh that much.

</comment></comment></comment><comment><USER29> Eat freshly picked organic vegetables, a lot. Some fruit. No dairy. No grains. Meat once a week or so. Within a month or so you will positively glow with health.

<comment><USER30> Organic, huh?

The other parts of your argument I doubt many would disapprove of. More vegetables, eat less meat. But any argument that start's with 'freshly picked organic vegetables' screams prejudice and ignorance.

[https://www.health.harvard.edu/staying-healthy/should-you- go...](https://www.health.harvard.edu/staying-healthy/should-you-go-organic)

"While organic foods have fewer synthetic pesticides and fertilizers and are free of hormones and antibiotics, they don't appear to have a nutritional advantage over their conventional counterparts. "There've been a number of studies examining the macro- and micronutrient content, but whether organically or conventionally grown, the foods are really similar for vitamins, minerals, and carbohydrates," says McManus."

<comment><USER29> "PREJUDICE! IGNORANCE!"

Trolling with science is still trolling FuckOffNeemo

<comment><USER30> No trolling here. I'm pointing out scientific facts that are contrary to your opinion.

And my mention of 'screaming' was used metaphorically. That is to say, your bias was evident from your posturing. Not that you or I were _literally_ screaming about one opinion or the other.

<comment><USER29> > No trolling here.

Ok, cheers.

> I'm pointing out scientific facts that are contrary to your opinion.

I'm gonna have to go ahead and disagree with you there. What you're pointing out is one article that contradicts my own lived experience (on which my opinion is founded.)

I love Science. I've got a copy of Linus Pauling's "Chemistry" on my desk that's I'm reading for fun. But a scientific study that shows that "Organic" food is no better than (let's call it) "Conventional" food in terms of nutrition and health? Friend, I just laugh.

To even get my attention such a study would have to have at least three groups: one eating only organically grown food, one eating conventionally grown food (same diet), and a control group that eats what everybody else eats. Then you'd have to keep it up for several generations!

Which brings me to my main _scientific_ objection to conventional agriculture: it's new. We know, thanks to science, that the living system we are a part of is approximately 3.5 to 4 _billion_ years old. The primary constituents of the system (microbes and viruses) have a life-cycle measured in hours. This system evolves. Along comes the naked ape sprinkling fixed nitrogen on his crops and patting himself on the back. One of the apes puts on a lab coat and gives the rest a thumbs up, "It's just as good!", while another sprays nerve toxin on the crops to kill the "pests". Meanwhile Gary in the back is starting to ask, "Hey, where are the bees?"

The word I'm looking for is "Hubris".

Now then, the _pragmatic_ argument against modern conventional agriculture is that it's unnecessary. We now know, again thanks to science, that soil is not a passive receptacle or matrix for chemical nutrients. It's a living dynamic system comprised of tens of thousands of species on all scales from the virus to the mole, and that has more in common with a vast city than a pile of minerals. We know that micro-rhizome interconnects plants in huge networks that shuttle water, nutrients, and chemical signals (often involving the _same_ molecules that occur in humans as neurotransmitters and hormones) between them. We've also learned that we ourselves host a "microbiome" and it's obvious that, in a healthy relationship with your local gardens, your microbiome is effectively _an extension_ of the soil into your system. (And back out again. Feces are ~80% microbes.)

(As an aside, given the above it should not be surprising that it's possible to _taste_ the difference between home-grown organic food and store-bought conventional food.)

The way to grow healthy food is to _garden the soil_ , the plants grow themselves. You can't really control plant growth too well. It's easy, however, to improve the soil, which then affects the growth of the plants.

One amazing example of this is a project that was done in Jordan. Agriculture had been practiced on the site until salt had gotten so bad that nothing would grow there. It was a patch of barren salty desert. Using applied ecology ("Permaculture") they were able to establish a nascent ecosystem. Within two years it was producing figs. The soil regenerated, mushrooms appeared.

There's a short video about it, "Greening the Desert" with Geoff Lawton. "You can solve all your problems in a garden." as he says.

Direct link: [https://www.youtube.com/watch?v=xgF9BU4uYMU](https://www.youtube.com/watch?v=xgF9BU4uYMU)

Main page: [https://permaculturenews.org/2007/03/01/greening-the- desert-...](https://permaculturenews.org/2007/03/01/greening-the-desert-now- on-youtube/)

The bottom line is, if you practice applied ecology you can grow all the food you need in a garden without any artificial inputs at all. It's cost effective and it will make you and the world around you healthy. It's also soundly scientific.

<comment><USER30> I wish I could engage you further here, I'd love to dive more into your argument but time is not forgiving.

Thank you for your response however, it was very informative.

I only have one comment to make from the above:

I'm gonna have to go ahead and disagree with you there. What you're pointing out is one article that contradicts my own lived experience (on which my opinion is founded.)

For some one who's embedded and has a solid understanding of the scientific process, you're contradicting the scientific community here by saying your opinion and anecdotal evidence proves otherwise?

<comment><USER29> Well met!

Let me say that, while I have huge respect for science and the Scientific Method, my _faith_ in science is weakened as one departs from physics.

To be specific, before I could credit (believe in) a scientific paper purporting to show no appreciable difference between "organic" and "conventional" produce there are a lot of boxes I'd have to check off. For example, how long after they were picked were the vegetables tested?</comment></comment></comment></comment></comment></comment></comment>


MIT Media Lab studying cities (and more) and we need your votes. - <AUTHOR> http://pulse.media.mit.edu/main

<comment><AUTHOR> First, I apologize for posting once previously. I had a poor title and I couldn't figure out how to edit or delete it.

Preliminary results for one question are here: <http://pulse.media.mit.edu/results></comment>


Quantum computing is so powerful it takes two years to understand what happened - <AUTHOR> http://www.theregister.co.uk/2014/12/04/boffins_we_factored_143_no_you_factored_56153/

<comment><USER2> More details in a friendly format: [http://phys.org/news/2014-11-largest- factored-quantum-device...](http://phys.org/news/2014-11-largest-factored- quantum-device.html)

From the research article:

> _In fact, it turns out that the product of any two numbers differing at only > 2 bits will lead to the equations:_

> _p_a + q_a = x (19)_

> _p_b + q_b = y (20)_

> _p_b q_a + p_a q_b = z, (21)_

> _where the subscripts a and b correspond to the two bit-positions that > differ, and the right-side variables {x, y, z} can each be 0 or 1 depending > on the number being factored. However, unless we know in advance that the > factors will differ at two bits, this reduction will not allow us to crack > big RSA codes._

This is interesting, but it's a very special family of numbers. When the numbers are more different they need more qbits.

</comment><comment><AUTHOR> TLDR; it appears that quantum computing can factor whole _classes_ of numbers at once, not just single numbers. This may lead to even larger blacklists for RSA keys or even cripple RSA altogether.

<comment><USER3> Your last sentence is conjecture, and not in the Register article or in the paper. (FWIW, jonbaer submitted a HN link to the paper last week.)

The paper points that the reason why it works is because the factors are only off by two bits, eg.

      3599 = 0b111011 * 0b111101

It also specifically addresses the RSA claim you made:

> However, unless we know in advance that the factors will differ at two bits, > this reduction will not allow us to crack big RSA codes.</comment></comment>


Rails 5.0.1 has been released - <AUTHOR> http://weblog.rubyonrails.org/2016/12/21/Rails-5-0-1-has-been-released/ <comment><USER2> If you're using Rails 5 ActionCable and you're not on Passenger, I would recommend upgrading to this release as soon as possible. Phusion[0] and other Rails 5 users[1] found a slow client issue with its implementation that was not protected against by the default app server Puma.

We contacted the Rails team early on about this issue and worked closely with them to have this issue solved. Now that 5.0.1 is released we are at liberty to disclose details about this security issue.

I've written a blog post[2] on the problem, using OS X network shaping tools and a simple app to demonstrate it. Rails apps running on Passenger were never affected as Passenger implements response buffering for regular requests as well as websockets connections. Note that even popular reverse proxies like Nginx don't perform response buffering for websockets as far as I know, so this is something to be aware of if you're running on other frameworks than Rails as well.

[0] GH merge of patch: [https://github.com/rails/rails/pull/26646](https://github.com/rails/rails/pull/26646)

[1] GH related issue: [https://github.com/rails/rails/issues/26409](https://github.com/rails/rails/issues/26409)

[2] Blog post: [https://blog.phusion.nl/2016/12/21/actioncable-under- stress-...](https://blog.phusion.nl/2016/12/21/actioncable-under-stress- protecting-your-application-against-slow-clients-using-passenger/)

</comment><comment><USER3> TLDR: Definitely worth upgrading.

Approximately hundreds of small bug fixes, across much of Rails. The fixes include some important ones for database types, time comparisons, thread issues, record reloading, etc.

IMHO these fixes address dozens of bugs that could cause major puzzlement for a typical Rails developer.

Thanks to all the contributors for excellent work on this release.

<comment><USER4> > IMHO these fixes address dozens of bugs that could cause major puzzlement > for a typical Rails developer.

That has been the reason I always avoid huge frameworks like RoR.

If I was to hit a bug like this, I wouldn't know where to start debugging. How do people deal with obscure bugs in the framework with something like RoR?

<comment><USER5> You start by boiling it down to an executable test case, for which there are templates here here: [http://guides.rubyonrails.org/contributing_to_ruby_on_rails....](http://guides.rubyonrails.org/contributing_to_ruby_on_rails.html#creating- a-bug-report)

Then you share the test case in a bug report, and collaborate to fix it. Fixing it usually involves a source code dive.

With Rails's reasonably well documented and reasonably well written codebase it's usually possible to grok the source and dependencies even coming to it cold. With the possible exception of arel.

Ruby's dirty tricks department (monkey-patching third-party objects) and duck typing together are a real boon to debugging.

<comment><USER6> Interesting, my experience is the opposite: liberal use of ruby's dirty tricks often makes code hard to understand and thus debug.

<comment><USER7> That's a separate statement, and they are not contradictory.

Using Ruby's dirty tricks on shipped code -> hard for debugging/understanding. Using Ruby's dirty tricks while debugging -> boon.

The grandparent didn't claim the former to be false, only the later to be true.

<comment><USER5> This is a correct reading of my remark. I happen to agree with the opinion of the followup as well, monkey-patching in production is a code stench.

Still I plead guilty to having occasionally monkey-patched prod code out of urgent necessity. My recommendation is to view it like an advanced and undesirable form of configuration; for my rails apps, each such hack always goes in an initializer file named for the library it is patching. If you are replacing third-party methods (or undermining the behaviour of a third-party method) and those methods are not called very frequently then judicious use of log noise e.g. through the deprecation mechanism will help at debug time.

</comment></comment></comment></comment></comment></comment><comment><USER8> If anyone's been holding off on upgrading to 5.x because of the deprecation warnings you get about requiring `params` as w keyword argument in keyword tests, I wrote a gem that could help: [https://github.com/tjgrathwell/rails5-spec- converter](https://github.com/tjgrathwell/rails5-spec-converter)

<comment><USER9> This is awesome.

Are there other gems and resources available for accelerating the migration from 4 to 5? Been thinking about doing it for a project for a little while.

</comment></comment><comment><USER10> Slightly off-topic: is learning Rails still a good career choice? I'm not particularly keen on JavaScript on the server and I think I am slightly tired using .NET on a daily basis.

<comment><USER11> Where I'm from (Toronto, Canada), Rails development pays significantly more than any other stack and there is substantially more work available.

<comment><USER12> I'd love to DM you with some questions about Toronto. Can you ping me via my profile info?

</comment></comment></comment><comment><USER13> Serving the SHA-1 hashes over an HTTP connection doesn't really seem useful at all to me. If you're worried about MITM the hashes could easily be changed as well.

<comment><USER14> It does still allow you to check for corruption though.

</comment></comment><comment><USER15> If anyone is using Rails together with Docker, I just updated orats[1] to use Rails 5.0.1.

[1]: [https://github.com/nickjj/orats](https://github.com/nickjj/orats)

</comment><comment><USER16> How is Rails still doing in the world of NodeJS, Microservices and React?

<comment><USER17> react-rails is really good.

<comment><USER18> react_on_rails is even better.

<comment><USER19> Not really. Depends completely on what you need. Not integrating with your existing asset pipeline isn't necessarily a plus depending on what your goals are.

There's also a weird amount of self promotion going on with that repo. Not sure what it is about that but it's kind of been a turn off to me.

<comment><USER20> Its not so different from thoughtbot's repos, just a different personality.

</comment></comment></comment></comment></comment><comment><USER21> Anyone have a tl;dr?

<comment><USER22> JQuery is not by default anymore.

<comment><USER23> I think you might be thinking of the upcoming 5.1 release.

<comment><USER22> Yes, my bad.

</comment></comment></comment></comment><comment><USER24> Updated and testing...

Thanks!

</comment><comment><USER24> Updated and testing.

Thanks!</comment>


Show HN: %%30%30: A Game - <AUTHOR> https://github.com/szhu/3030/tree/master <comment><USER2> You know you've been working with ASCII for a _long_ time when you can automatically unescape the title... and then pause, considering whether to unescape again.

I think reading the comments on that bug is also rather enlightening; points of note include a _62-level-deep_ stack trace, comments to the effect of "we don't know what the bug is/how this is supposed to work", and discussions about whether escaping multiple times is the solution (absolutely not!)

[https://tools.ietf.org/html/rfc3986#section-2.4](https://tools.ietf.org/html/rfc3986#section-2.4)

 _Implementations must not percent-encode or decode the same string more than once, as decoding an already decoded string might lead to misinterpreting a percent data octet as the beginning of a percent-encoding, or vice versa in the case of percent-encoding an already percent-encoded string._

Seriously, I'm quite surprised that basic URL handling is still a problem. Making a game to bring this to the attention of a wider audience is certainly a good idea.

<comment> X-Istence Reading the bug report: [https://code.google.com/p/chromium/issues/detail?id=533361](https://code.google.com/p/chromium/issues/detail?id=533361) makes me sad. Recursing is definitely not the answer, yet it gets brought up a lot.

Also, %00 shouldn't cause the browser to crash, and the fixes suggested so far are just work-arounds :/

<comment><USER3> > Recursing is definitely not the answer, yet it gets brought up a lot.

Speaking as someone with an apostrophe in his name, I'm not sure whether this makes me want to chuckle and reach for the popcorn, or bang my head against the desk. The answer to multiple (un-)escaping bugs is never recursion.

</comment></comment></comment><comment><USER4> [http://github.com/%%30%30](http://github.com/%%30%30) pasting this in slack also crashes Slack.

<comment><USER5> Explanation for why this is occurring:

Slack's desktop apps are HTML5 webapps wrapped inside native desktop wrappers. Specifically, Slack uses Github's Electron (formerly, Atom Shell) which is basically Chromium. The desktop app is a webpage inside Chromium.

<comment><USER6> Yeah, I strenuously object to the fad of calling wrapped web pages 'native apps'. They get zero benefits that would normally accrue to real native apps. They just launch 'as if' they were native.

<comment><USER7> Thank you. People calling web-render wrappers "native applications" must not realize how great it is when applications are mere coördinators on top of an integrated _platform_ full of services designed to improve user productivity.

I guess if that demographic did, there would be less "unix philosophy" cultism, as the efficacy of the unix shell is merely on par with that provided by other relatively coherent software toolsets. The shell is really pretty barebones compared to the rich semantics provided by many toolkits and object systems on which user interfaces have been built: GObject and NeXT are two modern examples.

[That said, where shell shines is by providing so few abstractions that virtually any garbage has the same semantic depth as things which were designed to be used in the shell. Bytes _are_ universal on the common computing substrate.]

The web, on the other hand, is a platform "designed" by the erosive flow of eyeballs during the 1st-nth browser wars, without much of a direction beyond tacking on additional pretty features without breaking backwards compatibility too much.

Attributes like a11y, embeddability, composability, and effective resource sharing tend to simply fall out of well-designed platforms. The web has an effective answer for none of these desirable concerns. Look at how screen readers break on js-heavy and dynamic web pages, the ongoing security disasters of XSS and iframes (and the complexity of login services like Facebook's/oauth/openid), the disappearance of Google reader, and the half- assed way CDNs offer partial, ad-hoc offloading of some resources via surrender to centralization.

<comment><USER8> > Attributes like a11y, embeddability, composability, and effective resource > sharing tend to simply fall out of well-designed platforms. The web has an > effective answer for none of these desirable concerns.

...what? The web is better than most native platforms in these.

The web is accessible. It has many features for screen readers and such, but more importantly, it is inherently flexible and allows content's form to be adapted to the reader's needs, thanks to the separation of content from style. A single web page, unmodified, can work on a desktop PC with a mouse and keyboard, a capacitive touch device the size of your palm, a stylus-input device the size of a laptop, a printed page, a screen reader, a ten key mobile phone from yesteryear, and more. The web lets users define custom styling that meets their needs, lets users selectively remove content (ads, for example), etc. No native platform is that flexible. Yes, some sites break screen readers, but this is true of native apps as well.

The web is incredibly embeddable. Any web page can, with one line of code, incorporate any other web page, and it "just works". You simply can't do that with native apps.

The web is composable as well. Sites can load JavaScript from each other very easily.

The web also supports resource sharing in various forms, but people don't necessarily use them.

<comment><USER9> Alas, all the benefits you list are just possibilities, not the reality. "separation of content from style" was a big thing back when csszengarden.com was making rounds, but that all is long forgotten in the name of angularreactnodecrap. Accessibility? Give me a break, how many web sites do even work without JS enabled? I am not sure about Android, but iOS has a great accessibility support.

<comment><USER10> It's a common misconception that Javascript precludes accessibility. JS can in many ways help accessibility if done considerately.

</comment></comment></comment></comment></comment></comment></comment><comment><USER11> Amazing. I always love seeing these sorts of harmless, fun ways that bring attention to these strange edge/corner case bugs.

<comment><AUTHOR> [https://github.com/szhu/3030/issues/12](https://github.com/szhu/3030/issues/12)

"harmless"

oops.

</comment></comment><comment><USER12> Reminds me a bit of the doom variant that would kill a random process for each enemy you killed.

<comment><USER13> you're probably thinking of [http://psdoom.sourceforge.net/](http://psdoom.sourceforge.net/)

</comment></comment><comment><USER14> You probably want to make it more clear that you're supposed to mouse over the dark lollipops and avoid the blue trees. I assumed the dark chars were the walls I shouldn't touch and just about gave up on it after it was constantly crashing. Then I read the description after the fold and figured it out.

Also why not just implement the game in javascript using mouse position events and a canvas for drawing?

<comment><AUTHOR> Dark lollipops? Blue trees? What operating system are you using? I'm on a Mac and the lollipops are pink and the trees dark green. I'm considering making a text-only version for people who have weird or no emoji support.

Of course I could implement the game in javascript, with nice graphics and all, and perhaps gameplay that works in all browsers and doesn't crash Chrome, but wouldn't that defeat the point of the game? :)

Happy to take PRs though!

<comment><USER15> I'm on Chromium on Ubuntu. Also have Dark lollipops and Blue trees, guest it depends on the font or something.

[https://imgur.com/Ffc3zcx](https://imgur.com/Ffc3zcx)

<comment><AUTHOR> When was the last time you've had a black lollipop? Or seen a blue tree? Thanks, Ubuntu.

Anyway fixed! The the instructions reads "Mouse your way through the map without touching the /trees/!"

<comment><USER16> It's not ubuntu's fault. Ubuntu/FF here, and I'm getting green trees in FF, blue in Chromium.

Blue trees can be seen in mountainscapes in certain light conditions. Or in the Blue Mountain... well, the trees themselves aren't blue, but they're covered in a blue haze... but still, the emoji is ever _green_ _tree...

</comment></comment></comment></comment></comment><comment><USER17> Poor CloudApp Support:

[https://github.com/szhu/3030/issues/3#issuecomment-141854443](https://github.com/szhu/3030/issues/3#issuecomment-141854443)

</comment><comment><USER4> I must admit my tab crashed before I figured out what was going on lol.

<comment><AUTHOR> hm, looks like that bug has been reported already: [https://github.com/szhu/3030/issues/1](https://github.com/szhu/3030/issues/1)

<comment><USER18> That's the whole point of the "game". To show this bug.

</comment></comment></comment><comment><USER19> My inspector even crashes when trying to hover over the link node!

</comment><comment><USER20> The game doesn't "work" on microsoft edge but the brower doesnt recognize the Stanford links[0] , it is not possible to copy them by right clicking. Going directly to the page by copy/pasting the url doesn't even load the website. IE doesn't seem to understand the url as well.

The only brower I've tried that manages to get a page is firefox[1]

[0][http://www.stanford.edu/%%30%30](http://www.stanford.edu/%%30%30)

[1][http://i.imgur.com/nEDgBrq.png](http://i.imgur.com/nEDgBrq.png)

<comment><USER21> Old Opera 12.17 (last version that still allows specifying a different proxy than the system one, afaics) shows the same page as Firefox. Elinks does as well.

</comment></comment><comment><USER22> This is a beautiful experiment.

To OP: i wonder, how did you find this bug?

<comment><AUTHOR> It's actually all over the news right now: [https://www.google.com/search?q=chrome+url+bug](https://www.google.com/search?q=chrome+url+bug)

I found it because someone posted about it in a school Facebook group I am in.

</comment></comment><comment><USER23> This works in Chrome on Android as well. Of course it's way easier than on desktop.

<comment><USER24> Not for me: [https://i.imgur.com/bzScUUn.png](https://i.imgur.com/bzScUUn.png)

<comment><USER23> Try it in landscape mode.

</comment></comment></comment><comment><USER25> I like how this crashes Twitter app's "preview" browser with app itself.

</comment><comment><USER26> This weirdly makes my external monitor flash black when I open this tab. What's going on here?

[https://vid.me/dWW7](https://vid.me/dWW7)

</comment><comment><USER27> You can jump over the wall by scrolling your mouse! :D

</comment><comment><USER28> Works with Opera 32 as well.

<comment><USER29> Of course. It is just a chrome fork with minimal changes.

</comment></comment><comment><USER30> Crashes my Chrome (Windows) when I move mouse pointer over the game area.

<comment><USER31> That's the point.

</comment></comment><comment><USER32> Nice. It crashes my Chrome on hover over trees.

</comment><comment><USER33> Aw snap! Always.

</comment><comment><USER34> Hahah, clever.

</comment><comment><USER35> Creative. Nice project.

</comment><comment><USER36> hah, another chrome-only thing

</comment><comment><USER37> This game has free graphics upgrade if you use "Emoji Input by EmojiStuff.com" extension</comment>


Latency Comparisons every programmer should know (2012) - <AUTHOR> https://gist.github.com/hellerbarde/2843375 <comment><USER2> Alternative unit I like is "how many per second" (when done on single hardware unit, one after another, of course). The numbers from there are then easy to grasp, since then they relate to what we actually want to achieve (I haven't checked them for truth):

In billions: L1 cache reference can be done 2 billion times per second.

In millions: Branch mispredict, L2 cache reference, Mutex lock/unlock and Main memory reference can be done 200, 140, 40 and 10 million times per second.

In thousands: Compress 1K bytes with Zippy, Send 2K bytes over 1 Gbps network, SSD random read, Read 1 MB sequentially from memory, Round trip within same datacenter and Read 1 MB sequentially from SSD* can be done 300, 50, 7, 4, 2 and 1 thousand times per second.

And finally, Disk seek, Read 1 MB sequentially from disk and Send packet CA->Netherlands->CA can be done 100, 50 and 7 times per second.

No graphs needed, or trying to figure out is a microsecond much or not.

<comment><USER3> The numbers in the chart better reflect an 'add up the costs' accounting methodology which is useful for deadlines or cost/benefit comparisons. It had also better be worth it to spend very costly human time to save comparatively cheep computer time. Things at E.G. FANG scale rather than the cron-job that does something overnight at a small business.

<comment><USER4> if you save 1 second in a program used 1000 times each by 1 millions people....

<comment><USER3> Right, that's FANG scale.

</comment></comment></comment></comment><comment><USER5> Discussed in 2017: [https://news.ycombinator.com/item?id=13530820](https://news.ycombinator.com/item?id=13530820)

</comment><comment><USER6> Similarly covered at Coding Horror: [https://blog.codinghorror.com/the- infinite-space-between-wor...](https://blog.codinghorror.com/the-infinite- space-between-words/)

</comment><comment><USER7> Where does a context switch fall in this? A function call?

<comment><USER8> Function call overhead is on the order of several 10s of clock cycles (round to 100, not 10), or a few dozen nanoseconds. The actual impact of function calls is usually not so much the overhead of the call itself, but rather on the fact that function calls tend to be barriers to analyses and optimizations.

Context switches are closer to about 1µs in the best case, with interprocess context switches maybe reaching 5µs. The time here is much more variable because the really painful thing is the effect of TLB flushing and other microarchitectural state going completely haywire.

<comment> yjftsjthsd-h > The time here is much more variable because the really painful thing is the > effect of TLB flushing and other microarchitectural state going completely > haywire.

Isn't context switch also where spectre/meltdown mitigations hit the hardest, too?

</comment></comment></comment><comment><USER9> I get it... but it would be really nice to include WHY these comparisons are important somewhere

</comment><comment><USER10> > 25 s Making a coffee

Instant coffee?

Maybe French press, if the water is already boiling.

</comment><comment><USER11> I've seen this table many times and I'm always surprised it doesn't include _register_.

<comment><USER12> Registers should have zero latency. They're literally within the same part of the CPU that decodes the instructions.

<comment><USER13> Well zero as in one or two clock cycles?

<comment><USER8> A fraction of a clock cycle.

An execution unit is basically an ALU with a set of muxes for inputs, where the muxes are pulling either from the registers or from later execution stages that have yet to commit their results to registers. The entire path has to settle down by the time the clock signal reaches the latch at the edge of the stage to retain the value for the next clock cycle. This means that the time it takes to read a register is a fraction of the single clock cycles that 1-clock-cycle µops take to run.

</comment></comment></comment></comment><comment><USER14> The 2k over a network latency really depends on the networking hardware in the computers and switches and how the software stack is set up. I wouldn't be surprised if it's easily 10x that in most real cases.

<comment><USER15> I think it's a case of "one of these is not like the other" this number seems to refer to a slice of throughput. There's a separate line item for "round trip in the datacenter".

<comment><USER16> Yeah, it's "time taken to transmit", not round trip time or even one-way end to end latency. It's useful if you want to know eg. the minimum extra latency being added to other network flows because your NIC is busy transmitting this packet for the next n microseconds.

</comment></comment></comment><comment><USER17> Any info on the difference of latency of register access vs. L1 cache on x86_64?

When looking at compiler output of gcc most of the time it puts variables within a scope on the stack and rarely populates all registers or even any at all. Wouldn't using the full 12-14 available first be faster?

<comment><USER8> An L1 cache hit is 4 cycles of latency.

As for your second question, my guess is you're looking at unoptimized code. Most compilers keep variables on the stack unless you're optimizing the code to at least some degree.</comment></comment>


Flixel Debuts Its Instagram for Animated GIFs App - <AUTHOR> http://betakit.com/2012/03/21/flixel-debuts-its-instagram-for-animated-gifs-app <comment><USER2> Awesome creation process; you can PAINT MOTION!

</comment><comment><USER3> Amazing app. Images + magic = Flixels.

</comment><comment><USER4> Great article in a dynamic new space.

</comment><comment><USER5> The image comes to life like Magic!!!

</comment><comment><USER6> Love it.</comment>