The diabolical genius of the baby advice industry - <AUTHOR> https://www.theguardian.com/news/2018/jan/16/baby-advice-books-industry-attachment-parenting <comment><USER2> An absolutely wonderful read. I read three widely recommended books, which diametrically opposed each other on almost everything. So I decided to ignore most of the advice, and rely on friends, family, medical experts, and my own intuition. Anything the books mostly agreed on, I did tend to follow.

The three books I read:

* The Contented Little Baby - [https://www.amazon.co.uk/New-Contented-Little-Baby-Book-eboo...](https://www.amazon.co.uk/New-Contented-Little-Baby-Book-ebook/dp/B006K26BPU/)

* The Fourth Trimester - [https://www.amazon.co.uk/Fourth-Trimester-Understanding-Prot...](https://www.amazon.co.uk/Fourth-Trimester-Understanding-Protecting-Nurturing-ebook/dp/B00AQDIP6M/)

* The Baby Whisperer - [https://www.amazon.co.uk/Secrets-Baby-Whisperer-Connect-Comm...](https://www.amazon.co.uk/Secrets-Baby-Whisperer-Connect-Communicate/dp/0091857023/)

The most helpful thing I read: "Nobody has been the parent of your child before. What worked for one baby may not work for yours. And remember that every parent develops nostalgia."

Also, an elderly lady in my church who had been a teacher said by the age of 8, you can't tell who was breastfed or bottlefed, who had 'baby led weaning', who used natural toys, etc. But you could tell the ones that received a lot of love from their parents.

<comment><USER3> When we had our first born, advice was to wake the baby for feeding so they get used to regular routines. We did this once and he screamed for the entirety of that day so we just fed him at irregular intervals but tried to ensure he still got the right number of feeds in a day.

When we had our second we were told not to wake her. But when she did wake she was so hungry she would have a screaming fit so we learned she preferred to get woken for lunch.

Moral of the story: try as hard as you might to generalise child rearing, they'll always find a way to contradict good advice.

<comment><USER4> This might sound a bit callous (and I know it's more left field than callous but it's my only entry point to this topic) but your story kind of reminded me of a time I visited friends for a weekend at college. A friend of theirs had a new born litter of 1/2 Black Lab 1/2 Pit Bull puppies (the cutest, jet black pups) and my buddy and his girlfriend adopted one, Kujo.

Their goal was to get their new puppy used to being and sleeping alone by making sure it slept outside of their bedroom every night. This was the second weekend they had the dog and I, of course, was outside of their bedroom on the floor. The cold carpet. The living room was the only other room besides the bathroom, which we all wanted to keep dog free for everyone's convenience, in their small college apartment. I was told to try not sleep / cuddle with the dog overnight, but not sternly.

I'm a light sleeper as it is and after about 15 minutes of listening to the little guy cry and whimper I caved in figuring one night of sleeping cuddled up with me couldn't ruin a K-9's entire life of attachment. Plus I was on the floor and as you can tell I'm soft as it comes with animals and children.

I'll never know whether my softness that night ruined Kujo's sense of attachment but I will tell you right now, as someone who has always wanted kids I can't imagine I'll be able to keep my own flesh and blood at a distance while they are crying and calling out all night long :*(.

I have so much respect and am in awe of parents of all types. Keep kicking butt!

<comment><USER3> It's not easy sometimes but you do learn the difference between kids crying because they're in distress and crying because they're just being stubborn. The real difficulty is when they're distressed but "tough love" is exactly whats needed (eg you're example of getting them to sleep in their own bed).

What I struggle the most with is when they actually put a logical argument forward to get their own way. My eldest is not long 4 and he has already been putting some pretty intelligent counter arguments for why he should get his own way for about two years now. Sometimes I cave even if I know he is just arguing because his points are so well formed that I simply cannot argue back (plus I never want to stifle a kids ability to examine and deconstruct the world). My wife often calls me a big softy for that.

Ultimately though, my wife and I compliment each other in different ways so where I struggle with parenting she excels; and visa versa. I don't even know how single parents cope because I know for a fact I wouldn't.

</comment></comment></comment></comment><comment><USER5> I think the real secret of many advice books, baby or otherwise, is that nobody knows what they're doing. It's especially hard for baby and other parenting advice, though, because the goals are so varied. What is the aim? A quiet baby? A happy baby? A hard working child, a smart child, a well-behaved child, a happy child? A well-adjusted (whatever that means) adult? A driven and successful adult? A good relationship with the kid? Any of thousands of others?

It's impossible for any scientific study to address all possible outcomes and the relationships between them.

<comment><USER6> In my view, its even misguided to try and 'make' your baby into any of these things. You can help them develop, but its largely up to them to be smart or hard-working or happy later in life. We can at most give them good examples, and try to socialize them?

<comment><USER7> You try that, I'll try the other way and we'll see whose baby gets into Harvard!

<comment><USER6> My three Eagle Scouts are respectively a Sargeant, an Engineer and a Musician. The Engineer went to CMU and works at a startup in Redwood City. The Sargent did his tour of Iraq in transportation (doing vehicle recovery) and returned a little busted up; now has a MechE degree and is a process Engineer. The Musician studied at Cleveland Institute, but turned to the dark side and now works IT.

<comment><USER8> Great work dad!

</comment></comment></comment></comment></comment><comment><USER9> When my first son was born, my wife subscribed to a website called something along the lines of "The Net Midwife". A former midwife answered health questions from parents.

All her answers were available online for free but if you wanted her to answer your questions, you would have to pay for the subscription.

Why would you want to pay for something which was freely available to you?

Well as it turns out, even though 99% of the questions parents asked were already answered parent's had this idea that their child was unique and they would ask questions like "my child coughs and it says a little noise everything she inhales right after"

The only group of people more naive and easy to persuade are modern dog people.

<comment><USER10> It's easy to be persuaded by answering services when you're dealing with what's arguably the thing you will ever be most responsible for.

Plenty of people/businesses take advantage of that.

<comment><USER9> Yup.

One thing I have never done though is read other peoples advice on how to raise my kids. That's too important to leave to others :)

<comment><USER11> There is something darkly funny and deeply meta about how this is being down voted.

<comment><USER9> Yeah, perhaps because people thought I meant I would never use an advice given. What I meant was that I would never buy a book to get advice. Anyway...

<comment><USER11> The trick is getting people to give advice when you ask for it. Having advice fired at you by every human you meet seems to be a thing. Even wearing headphones doesn't stop them.

<comment><USER10> _Especially_ on the subject of child rearing.

</comment></comment></comment></comment></comment></comment></comment><comment><USER12> I like that they started with comparison to other animals, with humans being born "sooner" in the development cycle due to our larger brains.

To me, this sets up a nice mental model for the first ~18 months of parenting: your child is still developing the extreme basics, in particular its brain, which is forming pathways based on your actions. So set to work forming those pathways with lots of talking, face time, and letting your child observe the world. After all, it came out to get an "early" start!

<comment><USER13> Many call the first 3 mo the "Fourth Trimester" for that very reason. The baby is still basically a fetus in many regards. It's around that 3 mo point that they start to really respond to external stimuli in more than basic ways and start to be able to explore their environment.

</comment></comment><comment><USER14> A business mentor of mine once gave me this wisdom:

The best selling diet books don't contain the best diet advice.

The best selling dating books don't contain the best dating advice.

The best selling business books don't contain the best business advice.

I think this is logical, to some extent, i.e.:

Advice books are optimised for excitement and the illusion of inspiration. Because results take a long time to demonstrate, massive aggregate data, and the elimination of countless other factors, nobody can possibly work out whether the advice in a book is any good before they buy it. Instead they look to reviews, which are based on enjoyment and inspiration. Someone will read it, and coincidentally find success, and you have your testimonial. Someone will read it, and fail, and nobody will know. So to make your book sell, the quality of the advice is mostly irrelevant, it is the engagement that makes the sale.

Exciting truisms and unfalsifiable chattiness sell advice books, not good advice.

Reading advice books 'just in case' you come across good advice, is like reading a string of random numbers 'just in case' you come across the lottery results.

Personally I'm a bit less sceptical, but only a very small bit.

</comment><comment><USER15> Surprised they don't mention economist Emily Oster's book Expecting Better, which is an imperfect book but takes a data-driven Freakonomics-style approach to pregnancy. I enjoyed it.

The real challenge is that there's so little good data to begin with.

</comment><comment><USER16> If you read with your kids and don't get divorced then you've already done a great job I think.

<comment><USER17> I grew up w/ divorced parents and generally most of my friends also had divorced parents. I don't think the divorce as such is such a big deal, its really whether or not both parents keep "showing up". I'd take divorced parents that show up vs married-absentee's any day.

EDIT: I realized you might be meaning -- if you don't let the struggle of parent-hood tear apart your relationship with your spouse, you're doing a good job. In which case I agree 100%.

<comment><USER10> I agree, didn't grow up with divorced parents, and I'm not a divorced parent, but it seems - especially in this day - this just isn't as much as a bad omen as it used to be.

I see more cooperative parents (whether they're living together or not) than un-cooperative ones. Married or not. It's just a title to a lot of these people.

Also, if that's what the child grew up with, it's probably less likely to affect them negatively (assuming all positives everywhere else).

</comment></comment></comment><comment><USER18> It's not just baby advice that is fuzzy, it's baby products as well. Every baby business that is ads-based (from blogs, to registries) festers insecurities in parents, so they can sell ridiculously expensive basic products to make you feel a little better: I just bought the "best" (most expensive) rocker on the market, I will be ok. Google also prioritizes the wrong things in content as well (word count and recency) - so most of the searches lead to the same crap - the same shallow ideas, reiterated with as many words and ads as possible. As a parent with the skills to build, after seeing all of these problems with my first child, I started building a private, actually safe baby registry and vetted ads-free recommendation engine under [https://www.dreamlist.com](https://www.dreamlist.com) .

The books industry leans on extremes. If it doesn't trigger controversy and insecurity in you, in some way, it doesn't sell. Every child is different and every pregnancy is different. The best source of information so far are medical studies, wherever you can dig them out.

</comment><comment><USER19> How is this any different from all the 'advice' we get on programming topics, how to write code, how to be a good leader, how to interview well, how to hire, how to fire, and on and on..

<comment><USER20> It is almost like self help is a difficult topic that has a large market of people looking for prescriptive help.

Snidely, I can't help but muse on the traps and fallacies that are abound in this sort of "looking for answers" method of searching.

Does make me wonder, do folks have collections of "experiments that failed" with speculation or answers as to why? A journal of "the experiments that failed replication this year."

</comment></comment><comment><USER21> After spending a little too much time on advice books, I put them permanently on the shelf, dispensed to used book stores as time went on. Particularly awful were the "What to Expect" books, which were doctrinaire and promised great ills if the doctrines weren't kept.

I kept a couple anthropological books, including Lancy's, and the Mayo Clinic's medical guides to pregnancy and the first year. Too, a developmental book "Touchpoints" which seemed to have a pragmatic style and gave some understanding of typical development.

For specific baby management concerns, we were trained by the nurses at the hospital, and visits to the doc addressed things that came up otherwise.

Thing is - what the anthro and historical views of baby raising taught me -

If your kid has Issues, that will be a medical situation, and should be addressed medically. If your kid does not have Issues, then largely they will turn out as they will, if you treat them decently and well, for the first year. Feed em, clean em, read to em, put em to bed, and it'll be largely _okay_. As they come to more reasoning and thinking, influence increases, but the first year is sort of a wash in many ways. There are huge variations in how different groups treat the first year, and it doesn't seem to matter in turning out functional humans.

Behavior issues can be mitigated by routine and structure, but not avoided.

The idea of each kid being this special & unique flower is sort of a 20c development. That's important to remember and contemplate.

</comment><comment><USER22> > There is also a subgenre of books aimed specifically at new fathers, but > since they are an almost uninterrupted wasteland of jokes about breasts and > beer, this article will give them the attention they deserve, which is none.

Yeah... no. As a new father of a now five-month old boy, I very highly recommend The Expectant Father and The New Father by Armin A. Brott. They are a far cry from a "wasteland of jokes about breasts and beer". It's unfortunate that this (so far) otherwise interesting article is doing what so many of the books it is criticizing do... giving little attention to the fatherhood side of parenting.

<comment><USER23> Weighing on every new dad I ever met (at least in the background) is, "How the hell am I gonna pay for all this?"

<comment><USER24> The amount of money that you can spend on a child is virtually unlimited. But almost all of it absolutely optional.

Sure, you'll need diapers and a car seat, but beyond that there's not a lot that's absolutely necessary.

There's so much stuff that people think they need to buy, ranging from special vitamins during pregnancy to hypoallergenic formula and baby swimming lessons and educational toys for every age bracket...

And then you realise that people who make half the money you do get along just fine and their kids are doing fine and somehow they only need half as much money.

Sure, we do spend a lot of money on semi-useful kids stuff (like those skiing lessons that our older son didn't want to continue after the second day...), but it's all optional, and if we didn't have kids I'd probably have a nicer car, but who cares.

<comment><USER25> In high-cost-of-living areas, there are two other major costs worth considering. First is the cost of daycare (or equivalently the opportunity cost of having a stay-at-home parent). My wife watches our son, and we're glad that she can afford to do that, but that's $100k of forgone take-home pay we're leaving on the table.

Second is the increased rent/mortgage of a house with an extra bedroom. I pay ~$600/mo more for an extra bedroom and have a substantially longer commute than most of my coworkers to live in a place that can accommodate our family.

Both of those costs far exceed anything else we've spent on our son, which mostly falls into the "optional" category you mentioned.

Both of these factors are much more important in high-cost-of-living areas, which may explain in part why there aren't many kids in San Francisco.

<comment><USER26> The cost of college is another one that every parent should consider as early as possible.

It's certainly optional (you may be comfortable letting your kids go it alone for college tuition), but definitely worth making an intentional decision on and planning for as soon as you're able.

Also, I'd strongly recommend you use several of the many "future cost of college" calculators available out there. For example, a college that costs $35,000/yr today is estimated to cost $56,000/yr in 10 years per Vanguard's calculator's defaults[1]. The "Worlds Simplest College Cost Calculator"[2] also provides a reasonably good and easy to understand picture of how much you'll have to contribute monthly to reach your goals by the time your child starts college and brings in some reasonable numbers for grants and scholarships based on your income.

You could certainly "oversave" if the insanely high cost of higher education manages to correct itself, but pretty much any tax-advantaged educational savings account can be easily converted to retirement savings.

In my case, it's also provided a bit of extra motivation to support my children in developing good study habits early on in their education. Once you understand the likely cost of college in 10, 12 or 18 years, the prospect of academic scholarships becomes really, really appealing.

[1][https://vanguard.wealthmsi.com/collcost.php](https://vanguard.wealthmsi.com/collcost.php)

[2][https://www.savingforcollege.com/calculators/worlds- simplest...](https://www.savingforcollege.com/calculators/worlds-simplest- college-cost-calculator)

<comment><USER27> > The cost of college is another one that every parent should consider as > early as possible. It's certainly optional (you may be comfortable letting > your kids go it alone for college tuition), but definitely worth making an > intentional decision on and planning for as soon as you're able.

Any parent planning on saving for college needs to have their retirement savings locked in and fully funded first. You can borrow money to go to school, but you can't borrow money to retire.

</comment></comment></comment></comment></comment></comment><comment><USER28> When I reached the age of reason, I asked my boomer parents (a mental health practitioner and a corporate V.P.) if they really thought there was a book that had every answer they'd need as parents. "Of course," they replied.

But as a former subject of the material, I can tell you they definitely didn't have all the answers. As privileged and intelligent as they were, they still fucked up. But I'm also not _dead_ , and on the whole I'm only mildly traumatized by the unnecessary drugs and suffocating restriction on personal freedom and privacy. So I really don't care about what kind of baby advice they intoned, and I don't think parents should care either. Just keep the little bastard alive until it can move out on its own, so you can have a whole new world of worries to consider.

</comment><comment><USER29> Every single baby guide book is 100% absolutely garbage. I encourage every single one of you that are about to have children to never EVER buy one. All they do is talk about the "average" baby, and you'll soon find that you and your spouse feel entirely inadequate because your baby isn't sleeping as much, eating as much, moving as much, interacting as much, etc.

What the books never tell you is that sure, there may be average numbers available, but the STANDARD DEVIATION is HUGE. No baby is average. My wife was convinced our first child had sleeping issues because he slept 2 hrs less than average. It turns out that's just who he is, he sleeps a lot less than most kids, but still at the bottom of the range of healthy. All it does is fuck with your head, so just take a cue from other parents around you.

<comment><USER30> When our kids were babies everyone we knew here in the UK seemed to have an obsession with getting their kids off to sleep as early as possible (about 7pm usually - mostly by putting them in a separate room and ignoring them) and then were amazed that their kids woke up really early.

We let our kids stay up until they went to sleep at their own pace and then they seemed to wake up at a relatively civilized time.

<comment><USER31> My kids get up with the sun regardless of when they go to bed, but if they're not in bed before about 9 they'll be cranky when they get up, especially in the summer.

With one kid it isn't too bad, but when you have multiple kids they tend to be up with whomever is the earliest riser, because they make a lot of noise when they get up and wake everybody else.

<comment><USER32> At the risk of inexpertly offering bad advice, you could try blackout curtains?

I'm 33, definitely more of a night owl but if it's sunny out I'm pretty likely to be wide awake at 6am after going to bed at 1. Black out curtains made all the difference for me.

<comment><USER31> The kids don't even like having the regular curtains closed. Besides, having them used to getting up early is good when school is in session.

</comment></comment></comment></comment></comment><comment><USER33> If you enjoyed the article, I'd recommend his book "Help", which picks apart self-help books on other subjects.

</comment><comment><USER34> Just because there is a lot of bad advice. Doesn't mean it doesn't exist.

Attunement and Attachment is real and worth investing in.

</comment><comment><USER35> My wife, an expert in early years education, was mightly impressed with raising boys by steve biddulph.

</comment><comment><USER36> I've found baby advice books to be 85% fluff/filler and 15% actionable advice. But that 15% can dramatically improve quality of life / the amount of sleep I get each night.

</comment><comment> J-J As we are born so helpless; "who or what raised the first human baby?" is the first thought that comes to mind!

<comment><USER37> That development didn't happen overnight. Our species gradually evolved into one where babies are born helpless because it apparently made evolutionary sense. Logic dictates that it was a gradual change enforced by the survival of the fittest.

</comment></comment><comment><USER38> _Attachment parenting plays on a theme familiar in self-help: the idea that you should reject outside expertise in favour of your own instincts and inner resources – except in the case of the guru offering this advice, who demands your obedience to his or her expertise._

You could replace "Attachment Parenting" with so many different ideas, from anti-vaxxer ideology to AGW denialism. It's painful to think about just how broadly applicable the observation of the author is beyond the realm of this article. As a species we're drowning in tribes, cults, and misinformation for power, profit, or comfort.

In particular New Age-ism, political identity, and alternative "medicine" are hotbeds of this.

<comment><USER39> > As a species we're drowning in tribes, cults, and misinformation for power, > profit, or comfort.

I believe this is the driving motivation behind 'attachment parenting' (what a weird term) and general movements to rely on personal knowledge.

<comment><USER38> Personal knowledge is the _source_ of these issues; it's a fallacy that we're some kind of wise and insightful creature which is only led astray in groups. Tribes, cults, and the misinformation they produce are just the result of our collectivized fantasies about ourselves and our environment. At least as a group we can start to produce something which can be tested.</comment></comment></comment>


Is NodeJS Wrong? - <AUTHOR> http://ncannasse.fr/blog/is_nodejs_wrong <comment><USER2> Given any long-running task, there are two natural things to do:

      1. Do something while the long-running task is running
      2. Do something after the long-running task has completed

Node.js' callback function convention simply makes it stupendously easy for you to write code for both cases, and leans towards making case (1) as natural as possible. Case (2) is naturally easy in Javascript (and even easier in Coffeescript) because of the way Javascript supports closures.

      application = function() {
        // do stuff
        database_call( options, function(err, callback) { // javascript closure
          // case (2) logic
        } );
        // case (1) logic
      }

How does Tora fare on this regard? Node.js is about parallelism through forking closures, not any solution to long running CPU intensive tasks.

The weakpoints of Node.js, in my opinion (and please correct me if I'm wrong, that would make me happy), is having to write a lot of boilerplate code for error and exception handling. Exception handling is particularly onerous because depending on the function call you'll never know which stack the exception will travel up. In the example above, you (probably) can't catch an exception from case (2) by wrapping the database_call in a try-catch block. Does anyone have a good solution to this?

All-in-all, I like that Node.js tries to stay pure by enforcing the above convention. Noders who stay in "userland" can't shoot themselves in the foot by making an asynchronous procedure synchronous, which may lead to faster code overall.

<comment><USER3> To me, it seems the real weakness of node.js is having to manage asynchronous control flow yourself, _at all_. It grows exponentially more ugly as the system increases in size. I really like continuation-passing-style as a technique (especially as a compiler IR), but doing that stuff by hand is _so 70s_.

I got pretty far along writing a similar system in Lua (because, hey, event- driven systems _are_ pretty nice), and unlike Javascript, Lua has well- implemented coroutines - they singlehandedly eliminate a LOT of the ugly control flow management. Still, most libraries are blocking* . I eventually decided that, for small systems, an event-loop framework wasn't _necessary_ in Lua (it's easy enough to just do it from scratch!), and for larger systems, I was better off using Erlang, which has the ideal foundation for that sort of system. In particular, I'm really not clear how much error-handling node.js does; that was what convinced me that Erlang's approach is refreshingly sane. When I started writing process-supervision and hot update code in Lua, I realized I was just re-implementing what Erlang does best.

* Which is a funny objection, like being mad that most libraries default to using decimal numbers rather than octal. It must be a conspiracy!

See also: <http://news.ycombinator.com/item?id=2150800> and <http://news.ycombinator.com/item?id=1304599>

<comment><USER2> Thanks for this, you've nailed the problem.

I'm looking for a language that can do everything that Node.js does but also solves this control flow problem, but is also _fast_ and has support for OpenCL and beefy math libraries.

I don't find Erlang to be performant in this regard, so I'm looking at Scala but I'm constantly getting pissed.at.java.packages.and.conventions. I think it also suffers from the same problems as Node.js and doesn't support the async/control-flow magic that Haskell supposedly has.

Perhaps I should consider Haskell after all. It's that or C++.

<comment><USER4> Take a look at LuaJIT.

I have some early FFI bindings for OpenCL (and OpenGL, glfw) with some simple demos. Not updated recently, but it's done by using stock luajit (take latest), and not writing a binding code at all (just FFI definitions which LuaJIT understands).

You can't do callbacks (yet). That is - you can't rely on "C" function to call you back at lua land. That's why I chose glfw instead of glut or others. There is way to setup your main loop without callbacks.

<http://github.com/malkia/luajit-opencl>

<comment><USER5> There is also a coroutine based embedding of Lua/Luajit in nginx if you want to embed into a web server environment (without callbacks). <https://github.com/chaoslawful/lua-nginx-module>

</comment></comment></comment></comment></comment><comment><USER6> Several commenters point out that long-running computations can be performed outside the main request thread without the server having to do anything special.

It's also possible to divide up long-running computations oneself. This can lead to very interesting designs.

<comment><USER7> "Several commenters point out that long-running computations can be performed outside the main request thread without the server having to do anything special."

Then why am I using Node.js? Any language has been able to do that for over a decade now, without the other hoops Node.js's style forces you to jump through. As evil and bad as shared-state multithreading truly is, this is a (or possibly "the") task it can manage without blowing up.

This is all but an admission that Node.js actually has no concurrency story at all. Hardly surprising, since it doesn't, unless "We force the programmer to do all the concurrency work" counts.

"This can lead to very interesting designs."

Yes, in the "may you live in interesting times" sense of interesting, absolutely. If you're going to reduce yourself to manually scheduling _everything_ yourself why boot an OS at all? (Yes, that's a bit of an exaggeration, but seriously, think about it for a bit, there's truth there. Runtimes/VMs/languages ought to be adding to the OS, not fundamentally subtracting from it.)

<comment><USER6> I don't really understand your comment.

No one's saying that IPC is unique to Node. The OP's criticism was: async i/o is fine, but what if you have some CPU-intensive work to do? Isn't it bad to let that block the whole server? Of course it is. OP's answer is a different server architecture; Nodians' answer is just forward that work to a different process and let Node keep doing the one thing it does well.

Why use Node? Isn't the reason that it lets you write server apps that don't block on i/o, in a high-level language?

From various comments over the last year or so, I gather that you're saying Erlang beats Node hands down at this. That may be true. Still, not everyone's going to use Erlang. What other alternatives are there? (Twisted, EventMachine, ...?)

I can see the attraction of Node's approach. First, it's conceptually simple. Second, yes, it shoves a bunch of things in your face and makes you deal with them - but they are precisely the things that make your program slow. Perhaps you _want_ to deal with them. I can understand why someone would say: I want to manage my program's control flow explicitly so I know it won't block when it shouldn't; it makes some things annoying, but other things easier (at least I don't have to worry about other code interrupting mine); just don't make me write everything in C.

(At risk of being tedious, I'll add that I'm not being polemical. You, silentb and others know a lot more about it than I do. I'd like to get clearer about what the issues are. Also... I'm tempted to reply to the second part -- about writing programs that know how to divide up their computations, and whether this is greenspunning the OS -- but this is long. Maybe we should defer it.)

<comment><USER7> "What other alternatives are there? (Twisted, EventMachine, ...?)"

For every major high-level language, there is at least one Node-like library, and sometimes more than one (Perl has POE, Event::Lib, based on my experience the raw glib wrapper isn't half bad albeit perhaps not the fastest, but you get good access to anything else based on glib, in fact Perl has so many that there's an Any::Event wrapper to remove your dependence on the underlying event library!). My point isn't that Node.js is bad. I actually don't think it is.

My point is that the _hype_ is bad. It's wrong to think it's bringing anything unique to the table, because it simply isn't doing anything that has not be done literally _dozens_ of times, except it's doing it in Javascript. If you want it done in Javascript instead of Python, more power to you. I'm particularly incensed by the idea that Node.js' approach to asynchronous is the only way to do it and the number of people it has produced who it has anti-educated into thinking Haskell and Erlang and all kinds of other languages can't possibly be asynchronous because you can't see the manually- chopped-up event handlers in the code. I'm not guessing. I've met these people online. You may know better, but a lot of people don't; whether or not it was intended the hype is actually lying to people about the state of the programming world, comparing itself to the world of 1995.

I am also trying to speed up the education cycle that all of those other dozens of attempts have been through in which manually-compiled event-based programming _inevitably_ explodes into unmaintainable complexity, and none of the dynamic languages, including Javascript, have the necessary constructs to truly contain it. Some of the dynamic languages are even more powerful than today's Javascript, such as Python with its generators (though ECMAScript is supposed to be getting those, I don't know if any browser has them yet) and it's still not enough. The structure of event-based programming demands such an explosion. Been here, done this.

You can see it already starting to poke out from under the hype, if you're watching carefully. This is going to get worse, not better (because there isn't a solution, just a variety of hacks long since tried and found to only slightly improve things at significant complexity cost themselves), and I'm actually trying to do the community a _favor_ by deflating the balloon so it doesn't pop so hard.

(If you know Haskell, and you look at the implicit type signatures being put on things like callbacks, it becomes easy to see the problem. The clearest place to see the problem is a function that takes a callback for something, until one day you need to pass in a callback that itself has to go do something that requires a callback and suddenly you've got a big problem. The usual callback in Node.js is actually just a relatively-pure function, they are _not_ in IO, which is done behind the scene for you. Then when you need to do something else, you've got some real problems. Solvable, yes, but at a fairly significant complexity cost, partially because any given issue can be addressed but you can't really address all of them simultaneously (simplicity, exception correctness, dealing with control flow across callbacks, etc.). Every time you write a callback or choose where to break the function up into a callback you're actually laying down _far_ more restrictions on the code than you can easily see, but I don't go to this explanation very often because by the time you can understand it it is also borderline obvious.)

What other alternatives are there? One, use Node.js with awareness of the issues. There are places where it is fine. I just would incredibly strongly anti-recommend it if you know you're going to be continuously developing whatever you're building in it, especially your core product, rather than writing "a proxy socket server for web sockets to conventional sockets" and being done at some point. The other alternative is to actually work in a language/runtime where you don't have to manually perform all this tedious work. There's a number of them coming out and one of them is probably going to go mainstream at some point; of the current lot Go would be my best guess. Google isn't pushing it, but it's still got Google's name on it, and I don't know of anything else right now with the equivalent name power. History suggests name power is necessary for a language to crack the mainstream in anything less than 15 years. It probably requires the least adaptation to a new style of the bunch, the other advantage it has from the mainstream point of view.

<comment><USER6> I friendlily (!) request less anti-hype and more explanation of the technical issues, preferably with illustrations in code. For example, in the above post there is one point at which you come close to being specific and then back off, saying it's borderline obvious. It wasn't obvious to me.

There is one point at which I somewhat follow you. You say that the complexity introduced by callback management grows nonlinearly with program complexity. I understand this to mean that logic organized into async callbacks isn't composable (you have to write new logic to implement the composition, as opposed to just applying some operator to combine them) and isn't orthogonal (if you want to call some code that's written this way, _your_ code also has to be written this way, and each new layer gets harder to add). It's easy to see how this could rapidly get out of control. But I'm not convinced that it must. There may be designs that nip this complexity in the bud. For example, the work done by callbacks themselves could be kept to a minimum (and preferably be standardized, i.e. when i/o is received, store the result in some standard place). In this way the callback chains always return as quickly as possible. Of course then you need some parallel strategy for managing the control flow of the program itself - some sort of state machine, perhaps.

Perhaps this is greenspunning Erlang but if so I'd like to know how.

<comment><USER2> From my experience with Node.js, your interpretation is correct. I also share your optimism for finding a general solution to this problem, but that's exactly what jerf said isn't worth the complexity once you implement it.

Even if you do manage the callback complexity issue, there is still the issue of exception handling, which jerf also explains here: <http://news.ycombinator.com/item?id=2150800>

That said, jerf hasn't proven that _trying_ is not a rite of passage. Sorry for the double negative.

<comment><USER6> Not a general solution. An app-specific solution. That is, I don't want a framework; I just want a consistent simple design for an individual app written in this style. That's a big difference.

</comment></comment></comment></comment></comment></comment></comment><comment><USER8> _This is a bit annoying since if you want to make three async requests you have to write the following_

Well, beyond a style issue. You can unfold the events and make it a lot less "annoying".

Consider,

var cb1 = function() {

}

var cb2 = function() {

      req(cb1);

}

var cb3 = function() {

      req(cb2);

}

req(cb3);

It's a lot cleaner and it looks like a state machine (and kind of looks like erlang/message passing).

<comment><USER3> More than anything, the fact that node makes you dwell on this AT ALL is a bad sign. It's like wondering if your indentation is causing bugs.

</comment></comment><comment><USER9> That first example could do with some monadic sugar - similar to how F# does Async.

[http://blogs.msdn.com/b/dsyme/archive/2010/02/15/async- and-p...](http://blogs.msdn.com/b/dsyme/archive/2010/02/15/async-and-parallel- design-patterns-in-f-part-3-agents.aspx)

</comment><comment><AUTHOR> Can anyone suggest a better architecture than that of node.js for a server side Javascript application engine?

Perhaps still using Google V8 but maybe being more intelligent about threading/multicore, maybe using something like gearman (gearman.org) to distribute tasks, and addressing some of the criticisms of node.js but still maintaining good performance.

<comment><USER10> perhaps <http://n.odecs.net> \- still in it's infancy but being built in C# on mono and integrates with threading right off the bat

</comment></comment><comment><USER11> The author mentions CPS...

There already exists a powerful cross-environment JavaScript CPS implementation called JooseX.CPS:

<https://github.com/SamuraiJack/JooseX-CPS>

Tutorials:

<http://joose.it/blog/2011/02/14/joosex-cps-tutorial-part-i/>

<http://joose.it/blog/2011/02/22/joosex-cps-tutorial-part-ii/>

If you're not familiar with the Joose object system (works great in browsers and node.js), you should give it a look: <http://joose.github.com/Joose/doc/html/Joose.html>

Also, CPS is not the only option for dumping callbacks in browsers / node.js. Another would be the Functional Reactive style. See Flapjax: <http://www.flapjax-lang.org/>

I'm working on a reimplementation of Flapjax right now: <https://github.com/michaelsbradleyjr/Jolt>

It's got Joose under the hood and I'm generalizing all the library functions for n-ary EventStreams and Behaviors (Reactive concepts). It's very much a work in progress and the test coverage is non-existant atm, but that's owing to the fact I'm working from an existing, working code base. As soon as I have all the core estream and behavior facilities in place, I'm planning to write some exhaustive tests that use JooseX.CPS together with the Joose3 author's Test.Run library: <https://github.com/SamuraiJack/test.run>

</comment><comment><USER12> Yes it is deeply wrong <http://www.theserverside.com/news/thread.tss?thread_id=61693>)

Node.js + Web Workers (<http://bit.ly/dAnzEQ>) makes more sense (in spite of I think all of this is crazy)

</comment><comment><USER13> This reminds me of a very neat trick from Windows IO completion ports. When you mix blocking and nonblocking tasks, you want more threads than the number of cores, so that the CPU is fully used even if a thread blocks. But when no thread blocks, overbooking introduces context switch overhead. Windows' trick is to track threads that got work from a IO completion port and when one blocks, wake up another thread waiting on the port. This way you can have 6 threads working a IO completion port in your quad-core CPU and adapt both to mostly CPU intensive work and blocking work.

</comment><comment><USER14> It looks like the compute situation in Node.js can be helped with a server side web workers implementation .. with the workers doing no IO and only computes. Any thoughts?

<comment><USER15> Already exists. Do whatever you want in a webworker, using (very nearly exactly) the same API as you would in an HTML5 client:

<https://github.com/pgriess/node-webworker>

<comment><USER14> Neat! .. I should've googled before posting :)

</comment></comment></comment><comment><USER16> NodeJS already provides some tools to delegate work to processes. I think it is just more low level than the framework he describes.

</comment><comment><USER17> prior threads/debates re: coroutines, Lua

<http://news.ycombinator.com/item?id=2101210>

<http://news.ycombinator.com/item?id=2276840>

</comment><comment><USER18> Now, the world don't move to the beat of just one drum, What might be right for you, may not be right for some.

</comment><comment><USER19> > Criticizing being always easy, let's see how we can make things different :

Good point!</comment>


Google's Plan to Snatch Shopping from Amazon Is Working - <AUTHOR> http://www.wired.com/business/2013/01/google-takes-on-amazon/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+wired%2Findex+%28Wired%3A+Top+Stories%29&utm_content=Google+Reader <comment><USER2> Nice library! Too bad it's so large. 32k for tooltips is a bit much. Split this up such that I can use just the tooltip style I want and keep it under 5k and I'd use it.</comment>


We're Still Not Prepared for Global Warming - <AUTHOR> https://www.nytimes.com/2018/08/09/climate/summer-heat-global-warming.html <comment><USER2> There are multiple crisis's about to happen: Oil becomes too expensive (affecting infrastructure, transport, plastic production, etc), we use wood more heavily due to lack of plastic and cause deforestation, we can't build enough batteries due to materials demands for electric vehicles (which are needed more as oil cost increases), warmer climate increases need of air conditioning units (with some companies using banned CFCs to cut time/costs), water shortages, food shortages (due to water shortages and failed harvests due to climate)... The list goes on. Any combination of those would probably trigger a global economic collapse too (stock markets in chaos as "stable" markets suddenly become unstable).

We're likely already past the point of no return, we should be considering plan B - which is: How do we live in an inhospitable world as a result of global warming?

I think if we end up in such a state, the two most important resources to have will be energy and raw materials. If it were me, I would consider harboring precious metals (for building electronics, batteries, infrastructure, etc), building renewable energy sources, building nuclear power plants (particularly salt reactors - to take up any additional load), investing into nuclear fusion (it's quite close now) and making sure the military is well funded (you need to protect whatever benefits you have). If needs be, steal technologies to further your own capability as fast as possible. To keep your society in order, you would probably want to reduce any internal resistance, so slowly reducing freedom of speech and freedom of expression to keep things in order (i.e. control the internet). Additionally, you want to protect any area (land/sea/air/space) you have and claim as much additional resource intensive and/or strategic area you can get away with. If you're going down anyway, you may as well cause as much environmental damage as needed to further your own position in the end game.

Currently the only Country that would be "ready" by this standard is China, but the shear number of people may be their downfall. The only benefit would be that as resources run out, you can reduce your numbers by claiming more resources with you military (and mandatory inscription) - with their deaths easing pressure on infrastructure.

<comment><USER3> 'crisis's' ? You mean crises.

</comment></comment><comment><USER4> It's really annoying that every discussion about global warming gets flagged immediately.

</comment><comment><USER5> Look at the equator:

[http://thwack.co/wp-content/uploads/2018/06/images-of- world-...](http://thwack.co/wp-content/uploads/2018/06/images-of-world-map- with-equator-new-map-world-equator-line-countries-map-world-equator-line- countries-best-world-map-countries-download-new-equator-map-countries-south- best-of-images-of-world-map-wit.jpeg)

And look at the countries with the highest fertility rates:

[https://en.wikipedia.org/wiki/List_of_sovereign_states_and_d...](https://en.wikipedia.org/wiki/List_of_sovereign_states_and_dependencies_by_total_fertility_rate#Country_ranking_by_verified_TFR_and_estimate)

This is not going to end well. Africa is already a net food importer, so as growing conditions deteriorate, food-growing countries will just cut the continent off.

Best we could do right now is quickly wean African nations off food and monetary aid (making up about 20% of many nations' GDPs), and replace it completely with contraception and education for women.

</comment><comment><USER6> It's unfortunate that we've let things get this bad. Maybe now that people are seeing some real effects that they can point to more action will be taken.

<comment><USER7> Curious what you've actions yoi've personally taken. Did you stop buying things you don't need? Did you stop traveling both for work and pleasure? Did you stop buying fashion/shoes? Did you stop eating things shipped from too far away or even locally that require too many resources? If you used to live somewhere where you needed are car to commute did you start car pooling or better yet move to a city and use public transportation?

<comment><USER8> I feel like you're trying to make some sort of point. But it's honestly lost on me.

<comment><USER7> the point is the poster is asking "them" to notice so "more action will be taken" by "them". Why is it always "them" who needs to take the action not the person commenting?

In other words if you're not willing to take action why should you expect anyone else to take action?

I have tons of friends and acquaintances that love to spout off on their concern for the environment and then are in the process of buring down the planet with their 3rd vacations this year to the other side of the world and their 4th 10000 mile round trip flight in the last 6 months to attend some conference followed by Instagram pictures of all the loot they bought.

Heck, most of the tech companies fly there employees all over the place. fly them to SV for orientation. Fly them to some city for a global off-site. Fly them to the yearly team gathering. Apparently none of them really care either though they all have a PR page about their concern.

<comment><USER9> [https://en.m.wikipedia.org/wiki/Tragedy_of_the_commons](https://en.m.wikipedia.org/wiki/Tragedy_of_the_commons)

</comment></comment></comment></comment></comment><comment><USER8> I feel like there are two kinds of preparations: personal and societal. I'm 100% behind working together to prepare for and mitigate global warming, but I'd really like to read more on how we can prepare personally for global warming. Besides striving for net 0, what else can an individual do to prepare for an unpredictable climate?

<comment><USER10> This is an important distinction. For example, you might have adopted a waking/cycling/transit oriented lifestyle, but if the prior inhabitants of the urban neighborhood you gentrified are now displaced to freeway sprawl, total emissions have not declined. Actually they've gotten worse, since you probably use ridesharing and rentals sometimes, whereas the urban poor were stuck with the bus.

</comment></comment><comment><USER11> Says who? Even if half of the world population were to die off, those in developed countries will barely notice. Just throw some automation at it, which we're doing anyway, and we can even increase our quality of life while third world countries go to, quite literally, hell.

<comment><USER12> You forgot the /s

</comment></comment><comment><USER13> It's hard to be ready for it when its worse every year. Plus, we don't even know half of the secondary effects yet.

We are sleepwalking to oblivion.

<comment><USER3> As indicated here: [http://www.drroyspencer.com/wp- content/uploads/UAH_LT_1979_t...](http://www.drroyspencer.com/wp- content/uploads/UAH_LT_1979_thru_July_2018_v6.jpg)

</comment></comment><comment><USER14> Some hard truths:

1\. The comparative impact of global warming relative to many other global phenomenon (including ecological phenomenon) is still comparatively low, and will continue to be comparatively low for the next 10-20 years or more. The red tide in Florida (which many don't even know is happening) is going to have a greater impact on the US GDP in 2018 than global warming.

2\. Until people who make more than $10 a day are impacted more than the occasional brownout or heat wave, nothing outside of normal market forces is going to be done.

3\. The current US administration does not accept human influenced climate change, and the current US minority party has decided to die on Mount Collusion rather than point out the many detrimental things that the majority party is doing to our environmental regulations.

I understand people are dying as a result of this. I understand that the dangers to specific parts of the globe are dire. But what's the plan? You can't shame heartless capitalists or devout technocrats into doing something they perceive as being against their best interests. The continued fearmongering isn't going to rouse any bases any more than it already has.

</comment><comment><USER15> What we're seeing now is, in some ways, worse than predictions from 20 years ago. And even now, the Trump administration is in full denial. But hey, given the lagging effects of CO2 and CH4 emissions, we're already locked into far more extreme changes. It's sad, but so it goes.

<comment><USER16> One thing I find somewhat galling is how the climate change denial rhetoric smoothly shifted from "climate change is a hoax," to "there's no evidence that climate change is caused by humans," once reality was clearly at odds with the former, without ever acknowledging the moving of goalposts. Presumably in a decade or two it will be, "No one could have seen this coming," with no acknowledgement of past discourse.

<comment><USER15> Indeed. Predictable. Maybe Google will have forgotten. And pages gone from the Internet Archive over robot bullshit :(</comment></comment></comment>


NASA to use consumer Android smartphones in new satellites - <AUTHOR> http://www.nasa.gov/offices/oct/crosscutting_capability/edison/phonesat.html <comment><USER2> I worked on this project for a few months. We ran everything like a typical agile startup with weekly iterations and a lot of testing "MVPs". Really cool project. Also its all going to be opensourced! <http://open.nasa.gov/plan/phonesat/>

<comment><USER3> What was your radiation testing like? My understanding is that there's a lot of skepticism that this thing will run for very long. NASA uses hardened processors to make sure radiation from outside the atmosphere doesn't affect electronics and using an off-the-shelf SoC built on a tight whatever nm processes has never been done before for fears of early mortality.

The only exception I can think of is laptops on the ISS and on the space shuttle, but those were within the shielding of the craft. On top of that, those laptops are hardened against radiation. I believe they took off the shelf Lenovo Thinkpads and added some shielding.

<comment><USER4> These are probably low earth orbit satellites, still protected by the geomagnetic field and their orbits wouldn't spend much time in the Van Allen belt.

To be safe, I imagine they gave the phone a tinfoil hat.

</comment></comment></comment><comment><USER5> This is exactly what I was thinking about after the Curiosity launch. Space exploration desperately needs to iterate faster, and tiny satellites running commodity hardware/OS designs. Android seems perfect for this, considering how easy it would be to deploy updates as .apk files, develop USB peripherals, etc..

The article doesn't mention anything about radiation hardening, though. Are they just not worried about it, because the idea is to make the satellite as cheap as possible?

<comment><USER6> By the sounds of things, these are temporary satellites not supposed to last for very long, so the long-term aspects of radiation damage might not be such an issue.

</comment></comment><comment><USER7> Why is it important to make satellites which are cheap to build? Isn't the total cost dominated by the cost of bringing it to orbit anyway?

<comment><USER8> No, the satellite is usually the expensive part.

Also, the reasons for not making launches cheaper has been "why is it important to make launches cheap? Isn't the total cost dominated by the cost of the satellite anyway?"

Also, ground processing and all can get very expensive because it requires so many people and clean rooms etc and can be delayed. It depends if you think it's part of the satellite or the launch cost.

Overall you need to start somewhere if you want cheaper spaceflight. If there are cheaper satellites, then that's a big incentive for developing cheaper means of launching (and launching much more often too!).

It's partly a chicken and egg style thing. Launches are extremely expensive and far between and the big standing armies and facilities sit unused but have to be trained, maintained and paid. It's hard to break that circle, but it will be done, probably through some totally new technology that is first seen as just toys.

<comment><USER9> It cost's over 20k to launch a Cubesat it often costs far less than that to build them. Build costs and R&D can be hard to separate, but the replacement costs for many generic satellites are often well below the launch costs.

</comment></comment></comment><comment><USER10> I wonder how they address radiation hardening and other space specific environmental drivers in this hardware.

<comment><USER11> Is radiation hardening really that important when you're still this side of the Van Allen belt? My understanding is that it's not, but IANARS.

<comment><USER12> Yes, it is. <http://www.solarstorms.org/SEUavionics.pdf>

<comment><USER13> Nice link, thanks. Very detailed.

</comment></comment></comment></comment><comment><USER14> I bet they'll be stuck on 2.1 _forever_.

<comment><USER15> I know this is sort of a joke, but the Nexus S shipped with Android 2.3 Gingerbread, and it's been updated to Android 4.1 Jellybean as of July 20th.

<comment><USER16> Is the update for the Nexus S OTA? I haven't gotten mine yet. In fact, I haven't gotten the 4.0 (ICS) OTA yet. I heard they released a version but pulled it... I have yet to see anything beyond 2.3 for my Nexus S.

<comment><USER15> Here you go <http://forum.xda-developers.com/showthread.php?t=1784497>

</comment></comment></comment></comment><comment><USER17> ...This raises questions about that other article that claimed everything had to be specially hardened to withstand radiation, no?

I had always assumed that was the case and the article text was obvious, but if we can launch off the shelf Android devices into space with no problems then why are the other NASA projects utilizing such out of date hardware?

<comment><USER18> Surely the phone is going to be radiation-shielded inside the satellite. I see no critical contraction here...

<comment><USER17> Right but if we can just simply "radiation-sheild" off the shelf devices, why didn't we do that instead of custom building a robot made of specifically radiation hardened parts that are also much more expensive?

Why was the most important consideration by far for the processor in the previous NASA project was designed from the ground up to be radiation-hardned, but yet we can launch this no problem?

I just don't get it. I also don't appreciate the downvotes. I'm not trolling or looking to start an argument. I don't have dog in this race, I'm genuinely confused.

<comment><USER19> I'm a huge fan of the possibility of heavily shielding off the shelf parts. It seems logical to me to try to incorporate it into unmanned craft.

However, I'm guessing there are probably people who have simulated this and it probably hasn't worked out to be very economical for past missions. I think part of the problem is that the level of shielding required would really limit your payload to orbit. It's probably going to take a huge amount of material seeing as even the Space Shuttle couldn't act as a perfect buffer between computers and radiation.

From a NASA article[1]:

"Designers also found out that laptops would crash when the shuttle passes through the "South Atlantic Anomaly," which is an area where the magnetic field draws in to Earth, again offering less radiation filtering for spacecraft flying through it."

Completely speculating here, but I would imagine that part of this experiment is to get operational experience with using standard grade electronics in space.

From the OP's article, the satellite has:

"...a watchdog circuit that monitors the systems and reboots the phone if it stops sending radio signals."

Anything with a human or with a high price tag attached to outages can't work with that caveat. If DirectTV's satellites did that, people wouldn't stay signed up for long. Imagine a Mars rover having to reboot every half hour... not very convenient.

But perhaps NASA might want to know if they can cheaply build "disposable" orbital experiments... i.e. ones that can complete their missions in a few hours. The sort of reliability where you just have to deal with the odd 30 seconds of rebooting every so often could be alright, especially if the payload can be stowed on a cargo ship and simply shoved out an air lock like the SuitSat[2].

Again spitballing, maybe they will find that things work out more or less OK if they send up five moderately shielded Raspberry Pis and they "vote" a la the Space Shuttle's flight computers[3]. If so, maybe that opens up space experimentation to universities with smaller budgets to squeeze onto resupply/manned launches that happen to have a spare square foot of space.

[1] [http://www.nasa.gov/mission_pages/shuttle/flyout/flyfeature_...](http://www.nasa.gov/mission_pages/shuttle/flyout/flyfeature_shuttlecomputers.html)

[2] [http://science.nasa.gov/science-news/science-at- nasa/2006/26...](http://science.nasa.gov/science-news/science-at- nasa/2006/26jan_suitsat/)

[3] <http://history.nasa.gov/computers/Ch4-4.html> (search for "vote" to get to the specific spot detailing how this works)

</comment></comment></comment></comment><comment><USER20> Wonder if Apple will sue to get an injunction against the launch. :)

<comment><USER21> With all respect, this isn't the kind of comment I've come to expect from HN lot on a serious article like this. It belongs to Verge/TechCrunch/Engadget/Gizmodo, or the the articles about the court ruling (those from yesterday).

<comment><USER22> Actually the comment had a purpose and was trying to raise awareness. The fact that it made you angry perhaps shows that it worked? Perhaps it might make you reconsider your opinions about your favorite company.

<comment><USER23> I don't think a comment on HN, of all places, is going to do any raising of awareness of Apple's patent position.

Reddit, Youtube, MSNBC, etc., maybe. HN? C'mon.

Also, to get the comment, you already had to have that awareness. It wouldn't make any sense to someone who doesn't know about the Apple vs. Samsung lawsuit.

</comment></comment></comment></comment><comment><USER24> And you thought Apple was famous for their "product launches"

<comment><USER25> Looks like the Mythbusters will be invited for this next product launch and they will bring a lot of explosives with them.

</comment></comment><comment><USER26> This is an interesting experiment. I think it creates an opportunity to discuss the whole cost picture. COTS alone will only achieve minor cost reductions relative to the whole enterprise.

Testing costs were orders of magnitude more than the cell phones. They ran tests with Thermal Vac, vibe and shock, and weather balloon. Each test required time at expensive test facilities and hundreds of hours.

Launch and operations will require additional hundreds of hours of labor to prepare and collect data. It will also require time on expensive range assets.

For example, a launch readiness review, where they determine if everything is ready to go, would involve a dozen engineers for a few hours. This meeting alone would cost more than the all the phones they bought to test on the ground and fly.

<comment><USER27> I'm sure it will take a long, gradual process, but I hope that using cheap components will lessen the cost of failure, so we can spend less on testing, too. Now if only we could reduce the cost of launch....

<comment><USER26> Yeah, cost control is a perennial problem. I think it is so hard to solve because, it seems to me, that any solution must address interlocking technical, cultural, commercial, and policy & political concerns all together.

</comment></comment></comment><comment><USER28> Will all these cheap satellites (from NASA or hobbyists, there are a couple of them on Kickstarter) cleanly de-orbit themselves or are we just adding up to the space junk at this point?

<comment><USER2> They are all put into orbits that decay to prevent this problem.

</comment></comment><comment><USER29> Let's just hope Apple haven't patented smartphones in space already.

<comment><USER30> Wonder how they solve the orientation problem.

</comment></comment><comment><USER31> Not so much with Android, but so much of Nasa's technology has spread to the private sector it's nice to see them using this to their advantage.

</comment><comment><USER32> From reading the article, there is no reason why Android was chosen specifically. So this experiment could have been done with any modern smartphone out there, they just happen to choose a couple of android phones. Is that right?

<comment><USER5> What else would they use? It seems pretty obvious to go with Android.

<comment><USER26> NASA flies a lot with VxWorks. They could have ported it to the nexus.

<comment><USER33> At which point the satellites can no longer be open source. Perhaps more importantly, Android already runs on the Nexus S; VxWorks doesn't. It defeats the purpose of using commodity hardware if you start over from scratch on the software running it.

<comment><USER26> I agree VxWorks would require additional porting effort. I also think that Android was the right choice for this mission.

I'm not sure I agree with the implied high priority placed on open source. The relative development costs of android, real-time linux, or even a commerical RTOS are noise in the flight software development budget. Reducing the cost is a more important driver to making space more accessible.

The big benefit, if these android cube sats fly successfully, would be to retire a lot of risks - thus opening the door for future programs to fly with android.

</comment></comment></comment></comment></comment><comment><USER34> Maybe it would be a huge experiment in redundancy fault-tolerant computing.

</comment><comment><USER35> weird why not just use openembedded ? i forgot what the other one was called.</comment>


Fake forum comments are 'eroding' trust in the web - <AUTHOR> http://www.bbc.co.uk/news/technology-15869683

<comment><USER2> Fake forum comments have helped me become the man I am today! I worry less, sleep better, and have better quality with my family! My life has been changed so much its unbelievable, you too should try fake forum comments, you won't turn back!!!</comment>


I'm putting on a Y Combinator panel at SXSW 09 and I'd like your vote (and feedback) - <AUTHOR> http://panelpicker.sxsw.com/ideas/view/2044

<comment><AUTHOR> A few people had asked me about setting this up and I've finally gotten around to it. If it gets accepted, I plan on using InsideYC.reddit.com to solicit questions to ask the panelists in the run-up to SXSW. But I'd like to know specifically from the Hacker News community -- what would you like to be covered?

<comment><USER2> I'd like to hear long-term stories of life before, during, and after YC, for the companies/founders. Not just snapshots of today. Ideally with low-level details that provide the true insights, obstacles and challenges faced and (how they were overcome or bypassed), and the life journey.

When reading books (especially those of founders/companies/history/philosophy), it is the long-term journey that I find most interesting.

<comment><AUTHOR> Great suggestion, thanks. I'll be sure every startup represented provides this to start off the panel.

I'll also be sure to bring a big pitcher of orange Kool-Aid. I'm not joking.

<comment><USER3> Hilarious, esp the orange! But why stop at a pitcher? How about some audience participation? Set up a few of those 20 gallon Gatorade buckets at the back of the room!

</comment></comment></comment></comment><comment><USER4> Voted up - 5 stars</comment>


How to read and understand a scientific paper: a guide for non-scientists - <AUTHOR> http://violentmetaphors.com/2013/08/25/how-to-read-and-understand-a-scientific-paper-2/

<comment><USER2> > "Be skeptical. But when you get proof, accept proof."

A useful article, but one that perpetuates a myth about science -- that theories are eventually either conclusively proven or disproven, as they are in mathematics. In science, because its theories are about reality, theories can be conclusively disproven (falsified), but they cannot ever be proven true once and for all. Instead, they remain potentially falsifiable by new evidence. Philosopher David Hume aptly summarized this precept by saying, "No amount of observations of white swans can allow the inference that all swans are white, but the observation of a single black swan is sufficient to refute that conclusion."

I say this because any number of times in the history of science, an established theory, one that people believed to be beyond question, was replaced by a better theory, one that explained more with fewer axioms, or that addressed new observations that invalidated the original theory. Examples include:

* The Ptolemaic solar system theory that asserted that the earth was motionless at the center of the solar system, orbited by the sun and planets. This theory was replaced about the time of Galileo by the heliocentric theory.

* The idea that disease was caused by bad air, an idea from which we get the words "miasma" and "malaria". This theory was eventually replaced by the germ theory.

* The Phlogiston theory. Phlogiston was believed to be a flammable essence that was consumed or "dephlogisticated" when things burned. We now know that combustion is caused by high temperature and a mixture of fuel and oxidizer, and there is no phlogiston.

* The ether theory, the idea that light waves propagated through a luminiferous ether, not unlike water waves in water. This idea was replaced by relativity theory, which does away with the need for a propagation medium for light.

Many scientific theories are well-supported and very likely to be true, but none of them ever becomes absolutely true, beyond refutation.

This perpetual falsifiability idea separates empirical science from mathematics. In mathematics, once formally proven, an idea is placed beyond refutation. In science, this is never true.</comment>


What normal and abnormal heart rhythms look like on an Apple watch - <AUTHOR> https://blog.cardiogr.am/what-do-normal-and-abnormal-heart-rhythms-look-like-on-apple-watch-7b33b4a8ecfa <comment><AUTHOR> OP here.

Many of you have helped out with the mRhythm Study we launched a couple of months ago:

[https://itunes.apple.com/us/app/cardiogram/id1000017994?ls=1...](https://itunes.apple.com/us/app/cardiogram/id1000017994?ls=1&mt=8)

[https://mRhythmstudy.org](https://mRhythmstudy.org)

We're planning to start publishing some of the insights we're learning from the study, and we thought we'd kick off with a post on the foundations:

* How normal rhythm varies and why an "irregular pulse" is actually normal

* What optical heart rate sensors measure, and how they're different from the ECGs commonly used in hospitals.

* An example of an "irregularly irregular" abnormal heart rhythm.

* An example of a regular abnormal heart rhythm (atrial flutter)

* An answer to one of the most common questions we hear, "Could Apple Watch detect heart attacks?" (Short answer: not yet.)

If you have questions or things you're curious about for the next few posts... we'd love to hear your thoughts!

<comment><USER2> I know this is probably not the feedback you are looking for, but: your page at [http://www.mrhythmstudy.org/](http://www.mrhythmstudy.org/) uses a non- standard font (Avenir Next) which doesn't show up in Windows; instead what I see is an ugly Times New Roman everywhere that makes the page look like it comes straight from the Geocities era. Use something like Google Fonts to embed a custom font to fix it so that every client downloads a copy of the font before displaying it.

<comment><AUTHOR> Thank you! That is helpful feedback.

</comment></comment></comment><comment><USER3> As a med student/programmer, I thoroughly appreciate this write up. Excellent job, OP.

A funny aside: many of my classmates own Apple watches/Fitbit HRs. I've heard of at least one student looking back at her heart rate data from finals week and saw spike to 120 bps that was maintained throughout one of our more stressful 8-hour exams. Her fitness tracker registered it as "exercise."

</comment><comment><USER4> Having been in A-fib several times in my life, if you ever feel like your heart rate isn't steady and isn't changing in the usual way as a result of exertion, GO TO A DOCTOR IMMEDIATELY. Lesson learned. If anyone ever releases a watch that can identify conditions like this with a great deal of specificity and sensitivity, I would consider that far more of a killer app than email notifications on my wrist :).

<comment><USER5> You might even call it an anti-killer app...

Health monitoring is going to be incredibly helpful. Beyond just pulse monitoring, I'm looking forward to analyzing trace materials in sweat and the like to notice deficiencies or issues.

</comment></comment><comment><USER6> That looks like a very interesting write-up about ECG, and I'll read it properly tonight when out of the office - thanks for writing!

I'm a Garmin Edge user of many years, always interested in HRM during activities. But that's not something I wear all the time. Hopefully when my Pebble Time 2 arrives something similar can be done on that platform.

I'm intrigued to see what sort of details may be captured from such a seemingly simple device.

</comment><comment><USER7> I've got all kinds of gaps in my cardiogram which could apparently mean atrial fibrillation, but I suspect it more means that my watch is just crappy at measuring my heartbeat. Sometimes when I'm out on a walk it says 60-70 when I know I'm at 130-140. Not sure how to make my watch more accurate, it's already strapped on pretty tight.

<comment><AUTHOR> That's part of what we're trying to quantify with the mRhythm Study--both the accuracy of heart rate sensors on average, but more importantly, how to predict in which situations and for which people the sensor is likely to work accurately enough for clinical use.

One tip I've found: if you wear the watch slightly higher up your forearm, it often gets a better reading than if you wear it directly on your wrist.

</comment></comment><comment><USER8> I sullied my apple watch by wearing it while playing hockey for science. AMA.

<comment><USER6> Does the HR graph reveal stages of grief, I mean spikes, as you realised the damage?

<comment><USER9> We have looked at my wife's data when she had a panic attack a while back. You could almost see the exact point it started as well as when it tapered off.

It was interesting in her case to see that her heart rate jumped well before she thought it did, and that the actual "trigger" to her attack may not have been what she thought it was.

<comment><USER6> That's very interesting about physical triggers happening before the perceived start of the incident.

Agoraphobia? Best wishes for working through that, it certainly takes a lot of time but you can get there (or at least to a state where it doesn't happen as often).

</comment></comment></comment></comment><comment><USER10> Looking forward monitoring via Apple Watch not just user's iPhone battery with the app like this: [https://itunes.apple.com/us/app/watchmybattery/id1024068907](https://itunes.apple.com/us/app/watchmybattery/id1024068907) , but the gas-tank

</comment><comment><USER11> i thought you needed three electrical connections for ECG?

<comment><AUTHOR> Any circuit through the heart is enough for (at least a single-lead) ECG. For example, the AliveCor is a hand-held mobile phone case—when your left hand and right hand are both touching it, you can get an ECG.

Chest ECGs done at the hospital are often 12-lead, and those give different "angles" through the heart, which gives cardiologists more clues on exactly which parts of cardiac tissue are causing a problem.

<comment><USER12> Well the 12 lead is more finnessed than that - essentially without a 12 lead your ability to definitively rule out an acute heart attack is completely impaired. 5 lead ECGs will still miss (some high percentage, above 10% and below 50%) of heart attacks.

A one (two?) lead ecg as you describe is not going to tell anyone what is going on with ST segments, particularly as you would be only looking at your aVR or aVL(depending on which way you sum the currents).

<comment><USER13> The augmented leads (aVR, aVL, and aVF) require a minimum of three electrodes (multiple electrodes are connected to ground).

An electrode on each arm gives you Lead I.

Lead I is not as useful as Lead II, but it's still plenty useful for diagnosing all sorts of cardiac issues (there's a lot more that can go wrong with your heart than just an MI).

<comment><USER14> Presumably a single lead would still be able to detect certain arrhythmias? I.e. if there are no QRS complexes, then there may be something wrong with the person wearing the device. There are benign explanations for why the signal might be weak but also lethal causes like Vfib -- with a few additional, I don't think it's implausible for a device to be able to make the decision to ask the user "hey, are you okay?" and then potentially seek help if the user doesn't confirm that they are OK within some set period.

<comment><USER13> Absolutely. Consider the fact that an AED only has one lead to work with, and it is able to recognize a couple different lethal arrhythmias in order to deliver a shock (and more importantly, _not_ deliver a shock at any other time).

To be clear, by "lead" here, I mean a pair of electrodes. A single electrode (like you might put on a watch) is useless.

</comment></comment></comment></comment></comment></comment><comment><USER15> Apple does not save lives. Neither does their watch.</comment>


Xen exploitation part 1: XSA-105, from nobody to root - <AUTHOR> http://blog.quarkslab.com/xen-exploitation-part-1-xsa-105-from-nobody-to-root.html <comment><USER3> TL;DR: If you can force emulation of the LGDT or LIDT instructions, you can replace the global memory segment descriptor table or interrupt descriptor table (resp.), since the instruction emulation code fails to check permissions properly.

<comment><USER4> Also this is privilege escalation within the DomU (guest), it does not break out into the Dom0 (hypervisor).

It looks like he'll do one of those next, though. The last paragraph in TFA:

> A future blog post will talk about a guest-to-host escape, with a working > exploit. Stay tuned!

</comment></comment><comment><USER5> It's worth nothing that very few people run HVM guests on xen if they can avoid it. The performance hit is considerable. Most xen setups I have seen are PV guests with pygrub bootloader. Host is debian amd64, guests are also debian amd64 or some variety of centos amd64.

<comment><USER6> Using paravirtualized devices is best practice, but a combination of PV and HVM ends up being faster for many operations - <USER2> [http://www.brendangregg.com/blog/2014-05-07/what-color-is- yo...](http://www.brendangregg.com/blog/2014-05-07/what-color-is-your- xen.html) . Unfortunately HVM mode brings along QEMU which is a relatively large amount of code, though the bugs in QEMU have tended to be lower impact than bugs in the hypervisor itself.

While the risk from QEMU can largely be mitigated by running QEMU in a device model stub domain, a new mode called PVH (currently being rewritten) should theoretically be best in terms of performance, resource usage, and attack surface. See [http://wiki.xen.org/wiki/Xen_Project_Software_Overview#PVH](http://wiki.xen.org/wiki/Xen_Project_Software_Overview#PVH)

pygrub runs in the context of the dom0 and should not be used with untrusted guests. Both grub legacy and grub2 work with PV mode now and there is no need for pygrub.</comment></comment>


Ask HN: What does "node" refer to in javascript code on this page? - <AUTHOR>

I am trying to understand the javascript on this page to copy it for my app to use for voting. So any help is appreciated. Thanks. <comment><USER2> Node refers to an HTML element.

HTML element:
test

JS to get a pointer to that element: var node = document.getElementById("fun");

node.id = "really_fun";

How that affects the HTML element:
test

<comment><AUTHOR> Thanks. I am also reading this <http://www.quirksmode.org/dom/intro.html></comment></comment>


UK High Court Finds Programming Languages Uncopyrightable - <AUTHOR> http://www.bailii.org/ew/cases/EWHC/Ch/2013/69.html

<comment><USER2> Much of the judgment and case was based around the copyright violation of SAS _manuals_ (which the defendant admitted do enjoy copyright) rather than the language per se, so it takes some digging to find the wheat amongst the chaff.

The guts of the "are programming languages copyrightable" question start a long way down. Link: <http://www.bailii.org/ew/cases/EWHC/Ch/2013/69.html#para17> .. particularly from point 27 onward where it is stated a computer _program_ is a literary work but a language is not (para 33).

Indeed, para 33 is the real crux, so I'll reproduce the core of it for anyone without the time to dig around:

 _[..] my provisional view is that a programming language such as the SAS Language is not capable of being a work. A dictionary and a grammar are works which describe a language. Such works record, and thereby fix, the elements of the language they describe: the meanings of its words and its syntax. It does not follow that the language is a work. Rather, the language is the material from which works (including dictionaries and grammars) may be created. The evolutionary or organic aspect of language can be left on one side for the moment, since it is clear that it is possible to create a language from scratch. Even when a language is created from scratch, however, what it amounts to is a system of rules for the generation and recognition of meaningful statements. Programming languages such as the SAS Language are no different in this respect._

Maybe someone could correct me here but my interpretation is that the judge does not _really_ decide whether or not a) a programming language is capable of being a "work" and b) SAS Language is a work, since they are not relevant to the remainder of the case. Indeed, he merely gives the above as his "provisional" view which leaves the gate somewhat open and no precedent set by this specific case.

<comment><USER3> From the language you quoted above it sounds to my un-trained ear like he's comparing a programming language to a natural language.

I wonder how many of our problems are due to deciding to call them "programming languages" rather than something like "programming notation" instead? There seems to be a conceptual problem, especially among people who don't program, as to just what a programming language actually is.

<comment><USER4> The programming language is the language used to give instructions to a machine. For me, it is very similar to a natural language. What do you mean by "programming notation" ?

<comment><USER3> For me, a programming language is closer to mathematical notation than it is to a natural language that people use to communicate with each other. It's rigorous, logical, and typically the product of one entity rather than a natural language which is the product of everyone who uses it.

To put it another way, since the quote mentioned this, I don't think it's fair to compare a dictionary for a natural language to a dictionary for a computer language, because they're quite different things. One records and documents a process already happening [language evolution], while another _is_ the process itself [language creation].

Just a personal opinion, that's all -- I just think analogies can be stretched too far, and by calling computer languages "languages" I think it's backed the discourse about them into a corner a little bit. Which is not to say all comparisons between computer language and "normal" languages are wrong, just that they're not really appropriate in this instance when discussing copypwritability.

<comment><USER5> What is meant by a 'language' is actually fairly well defined mathematically: That is something that can be described by a number of grammars. These in turn can be categorised (see the Chomsky Hierarchy: <http://en.wikipedia.org/wiki/Chomsky_hierarchy>)

In that sense, programming languages, regular expressions, and natural language can all be identified by what types of grammar can define them.

</comment></comment></comment></comment></comment><comment><USER6> _[..] to accept that the functionality of a computer program can be protected by copyright would amount to making it possible to monopolise ideas, to the detriment of technological progress and industrial development._

How are patents justified if the law recognizes that monopolizing ideas is bad?

<comment><AUTHOR> Patents protect implementation of ideas; not ideas per-se.

<comment><USER7> That's not totally true; in the case of software, an implementation is code, which is copyrightable. The idea, the functioning of the code, is not copyrightable, but it may be patentable, because a patent is a more restricted protection on a more abstract idea.

<comment><USER8> patents protect inventions, not ideas. For physical object, this is easily discerned, but sometimes, it gets muddy when talking about a protocol, or some sort of algorithm. I dislike software patents, but the intention of patents isn't to protect an abstract idea (whether its been twisted to do so is another argument for another day...)

<comment><USER7> But an invention is obviously a kind of idea. Patents and copyright both protect kinds of ideas; that's why we call them _intellectual_ property.

</comment></comment></comment></comment></comment><comment><USER9> The European Court of Justice also ruled on this in may 2012: [http://www.computerworld.com/s/article/9226783/Programming_l...](http://www.computerworld.com/s/article/9226783/Programming_languages_can_t_have_copyright_protection_EU_court_rules)

<comment><USER10> For anyone who doesn't realise: That's part of the same case. National courts refer questions about interpretations of EU directives to the CJEU. They give guidance on interpretation, but don't rule on the specifics of the case. So after they do that the case goes back back to the national court for judgment on the actual case, which is what's just happened.

</comment></comment><comment><USER11> I am no lawyer...could someone distill this for me? What does this mean if anything to your avg programmer?

<comment><USER12> AIUI, basically it means that whilst a program written in, say, python, can itself by copyrightable; the python language itself can't be. This means you, or anyone else, can implement your own python interpreter without any fear of being accused of copyright infringment.

<comment><USER13> Seems like you could extend this same argument to file by arguing you are writing an interpreter for the PDF/GIF/AutoCAD/PSD notation.

<comment><USER2> From the point of defending against copyright violation, you can. However, _patents_ and _reverse engineering_ laws present separate barriers you could need to jump over (although this is no longer a problem for at least 3 of the 4 formats you mention, I believe).

<comment><USER13> Good point (and yeah I picked poor examples).

</comment></comment></comment></comment></comment><comment><USER14> So does this all mean we can get a java VM that is not subject to Oracles whims? I guessing not.</comment>


HTTP/2 Server Push on Netlify - <AUTHOR> https://www.netlify.com/blog/2017/07/18/http/2-server-push-on-netlify/ <comment><USER2> > _It's important to understand that HTTP /2 requires secure connectivity. > Only websites with HTTPS enabled can take advantage of HTTP/2 and its > performance optimizations, like server push and header compression._

Pedantically, this is not correct. HTTP/2 does not mandate any encryption. But, all the browser vendors only support HTTP/2 with TLS. [https://http2.github.io/faq/#does-http2-require- encryption](https://http2.github.io/faq/#does-http2-require-encryption)

<comment><USER3> If you assume the second sentence explains the first, then this is correct - only websites (i.e something designed to be consumed by browsers) with HTTPS can take advantage of HTTP/2.

<comment><USER4> This is true, but no mandate on encryption in the HTTP/2 standard was an deliberate decision, one of the very few differences between HTTP/2 and SPDY. But yes, practically, you can't use HTTP/2 without encryption nowadays.

</comment></comment></comment><comment><USER5> How do people go about sending Link headers / configuring server push for resources with a changing hash in their filenames?

For example if you have your app.ab9a9a09fe9.js file, but then the next deploy you have your app.ba293dcde.js file... can you just set the resource to app.*.js somehow?

<comment><USER6> If you can write a <script> tag that references app.ab9a9a09fe9.js, presumably you can write a HTTP header that references that same file, no?

<comment><USER7> What about a static website served through nginx, for example?

<comment><USER8> I'm actually just doing that right now (changing my static website to work with Netlify's Push). Presumably, your base HTML looks something like this:

      <link href="{{ "main.css"|asseturl }}" rel="stylesheet" type="text/css" />

Then, your _headers.j2 file should look like this:

      /*
        Link: <{{ "main.css"|asseturl }}>; rel=preload; as=stylesheet

Which will just be replaced with the correct value, same as in your HTML template.

</comment></comment></comment></comment><comment><USER9> > Developers love using the CLI because everything can be done from the > command line.

What? Do users also love the UI because everything can be done by the user?

</comment><comment><USER8> This is welcome, but doesn't seem to be ready. My site broke with SPDY errors (wth?) when I enabled this.

<comment><AUTHOR> Hey StavrosK, don't hesitate to reach out to Netlify support. I'd love to take a look at your site to figure out what's going on there.

<comment><USER8> Yep, I already talked to Chris about it, thanks! I talked to you guys a week ago about HTTP/2 Push, I didn't know you'd have it ready so soon. I'm eager to get this working on stavros.io, so please feel free to email me so we can debug this!

<comment><AUTHOR> I just deployed a change that we think it should fix the problem in your site, we're going to keep an eye on it \o/

</comment></comment></comment></comment><comment><USER10> How does Netlify handle caching of push file? I would love to push my global.css and global.js; however, I don't want those files to be pushed on every subsequent request.

</comment><comment> ezequiel-garzon Do any browsers already provide a way to refuse pushed resources?

<comment><USER11> Why would you need this? The use case of Server Push is to download resources earlier than a browser can request them, but will eventually require anyway.

What are you hoping to refuse?

<comment> ezequiel-garzon Thanks for the reply, and good point. I guess I feel uneasy about letting the server "push" at will, for instance when dealing with mobile data plans. But come to think about it, I don't have much control on what I'll get once I visit a website.

</comment></comment></comment><comment><USER12> "You can read this article in the next version of Smashing Magazine, completely hosted on Netlify."

No actually quite a few resources are served by third parties.

</comment><comment><USER13> I read this as Netflix and was very confused for a while.</comment>