Drowning Doesn't Look Like Drowning - <AUTHOR> http://mariovittone.com/2010/05/154/ <comment><USER4> To this should be added some information for would-be rescuers of drowning people.

The instinctive drowning response is a _climbing_ response. What you see are twin splashes as the person's arms flail wide looking for something to grab on to. If they find it the automatic response is to grab it, climb up, and stand on top. The person doing this is panicked and has massively more strength than you think. If you are swimming and a young child does that to you, you will go under water. If you panic, you will get the same reflex, and will drown yourself.

Therefore if you wish to rescue someone who is drowning, you have 4 basic options.

1\. The most common response is to go to them and try to rescue directly. If the water is shallow enough that you can stand, letting them climb up you can be OK. Otherwise this is suicide. Frequently one drowning leads to multiple others, and this is exactly how they get started.

2\. Keep your distance and hand them something to climb on. They can't see a pole to grab it, but if they touch, they will climb, which gives them air.

3\. Wait until the drowning person is unconscious. Then go to them and tow them in. If you can't stand in the water, and don't have anything to do 2) with, this is recommended.

4\. (For trained people only.) Swim up _behind_ them, grab them from where they can't grab you, and lift them up to get air. Talk soothingly to them until they relax, and then tow them in. If they get hold of you, _DIVE_ so they let go, back off, circle around, and start again.

If you do not have lifeguard training then I strongly recommend against trying #4. Unless you know how to do the eggbeater you won't know how to hold them out of water. And if they grab you, you have surprisingly little time to make the correct response before you are drowning as well.

Oh yes, and another data point. Drowning is the #1 cause of death in toddlers. It is quiet. It is fast. Beware of the backyard pool.

<comment><USER5> Someone who may or may not be btilly posted exactly the above to Mario Vittone's blog, and got a response from Vittone saying, inter alia, "Your four points contain some good as well as some dangerous advice. There are often too many variables for lists of possible rescue techniques - but _waiting for unconsciousness is a very (very) bad idea_."

(Emphasis mine.)

<comment><USER6> It sounds cold, but if you are not a trained professional, they are in deep water, and you cannot throw them something, you run the very (very) real risk of having you BOTH drown and die if you try to save them while conscious. In case you didn't read the article, if they get a hand on you they will climb you like a tree and have the strength of a million doses of adrenaline.

What solution do you propose instead?

It's not unprecedented either. In CPR training, you are taught the Heimlich. You are also taught that you have to ask someone who is choking if they want help (or you will be sued, regardless if you save them). If they say no, they don't want help, you can either leave them to die, do it anyway and get sued for all you are worth (don't count on mercy, the law is 1000% against you), or wait until they pass out and then do it anyway (you are then protected by the Good Samaritan law)

<comment><USER7> If someone can _say_ no, they do not need the Heimlich -- at worst, they have a partially occluded airway, in which case using a finger to try to sweep the object out, or turning the person face down so the object falls out, is the correct course of action. (of course, if someone is non-verbally communicating no, then what you say applies, but I'd still be getting into position, and gesturing either sweep the mouth themselves, or use a convenient chair to do it.)

<comment><USER6> I was referring to when they are using non-verbal communication. Of course you do not do the Heimlich when they can still talk, that is Heimlich 101.

</comment></comment></comment></comment></comment><comment><USER8> This reminds me of something from scuba certification. After doing all this scary stuff underwater( like taking the regulator out of your mouth, dropping it, then recovering and re-inserting with your eyes closed) one of the last tests was to take off your mask, put it back on, and use your regulator bubbles to blow your mask clear of water. Easy, I thought. You get to keep your regulator in the whole time. So you could literally spend 60 minutes getting this right with absolutely no danger. Frankly, it sounded about as intimidating as washing your hair in the shower.

Oh, how wrong I was. Despite the fact that I knew I was perfectly safe, the second my face was immersed in water, I had to fight hard to not panic. I felt waves of fear threatening to engulf me, and it took every ounce of self control not to bolt for the surface (which can injure or kill you). Two other students did bolt for the surface before being grabbed by instructors. I later learned that this is a very common, instinctive reaction.

I was amazed at how powerful this reaction was, and gained a newfound respect for the lizard brain.

<comment><USER9> In hindsight, and after taking more advanced courses, it became quite clear that scuba instruction was all about teaching the students how not to panic. I hope they make that clear to the instructors, as I only went for personal instruction.

<comment><USER10> Cave training places an extremely strong emphasis on controlling panic. In open water, if you bolt to the surface you might get bent, but there are chambers for that. In a cave, you either swim out, or you drown. You don't even have the option of a quick, merciful DCS hit. Keeping a clear head is essential when your own self-rescue is on the line.

<comment><USER11> I just went for my Cavern Diver Cert and am not ashamed to say I had to withdraw, washout as it were.

The odd thing was that the place I was taking the Certification allowed fun divers with only an Open water Cert to dive the caverns (with guides, of course). After my experience, there is absolutely no way I would ever, ever, ever advise anyone to ever go cavern/cave diving without the appropriate instruction and cert level. If for only the reason of exposure to cave(rn) panic inducing situations. It is the lack of exposure that will bring on a massive panic attack at the absolute worst moment that can kill not only the diver, but the entire group.

Personally, I had a weighting issue. As in I was too heavy. the instructor told me to use 10% bodyweight + 6 lbs. as the weight. 175 lbs, head to toe 7mm wetsuit, one AL80 tank @ 2500 psi, fresh water - anyone know the algo for figuring weight with these variables? Haven't done my peak performance buoyancy yet... My trim was off, we went over a cliff with an overhang, I was in the process of calling the dive at this point as my trim was positioning me vertically. As soon as I hit vertical my belt slid right off into the 150 ft abyss taking a fin with it and I started ascending quicker than I would have liked. At that point my self rescue brain kicked in with my Rescue diver training. I absolutely made sure i was breathing, put my right hand above my head to protect from the overhang, made sure my reg was in my mouth, my mask was on and tried to deflate my bcd but could not get the proper positioning. I was also tied up in the line. The safety instructor saw all this, was able to hang onto my leg and flaire out to increase drag on the way up.

Needless to say, I made it out alive. I have a new respect for diving and the cardinal rules that you learn in your Rescue class that are the key ingredients in what makes an accident an accident.

[edited for buoyancy variables]

<comment> Tuna-Fish > Personally, I had a weighting issue. As in I was too heavy. the instructor > told me to use 10% bodyweight + 6 lbs. as the weight. 175 lbs, head to toe > 7mm wetsuit, one AL80 tank @ 2500 psi, fresh water - anyone know the algo > for figuring weight with these variables?

This was a total failure from your instructor. You do not try to calculate the correct weighting -- there is too much of individual variance. Instead you just measure. Get in shallow water and add weight until you are comfortable. (Make sure you are not either almost too heavy or almost too light, both can be problematic.).

Even small things like differences in what you ate last night can have serious effect on the amount of weighting you need. (too much gas in intestines...)

</comment></comment></comment></comment></comment><comment><USER12> Less than a year ago me and a few friends of mine were about to drown and I had accepted it before I got out. A few of my friends were at shore, I was able to wave and yell for a bit, because I had realized I was going to drown before I actually did start to (there was a rip current and so it was pulling my friends and I backward very quickly). From my perspective, it was amazing to me that:

1) I was Yelling and screaming, and my friends at shore continued to stare toward me like everything was completely normal.

2) I was not thinking clearly that the noise from the ocean and waves would not allow my friends at shore to hear me.

3) I was stupid enough at that moment to waste energy by waving and yelling rather than trying to stay afloat.

4) Knowing how to swim well in a pool had little to do with knowing how to swim well in the ocean.

5) During the panic, I did not try to lay on my back on the water, knowing salt water keeps you afloat without much movement necessary

6) Having friends with you is no benefit at all during such a situation. In fact, it's usually a bad thing, because everyone is fighting for their lives, and no one cares what they need to push down to pull themselves up.

Admittedly, we had had a few drinks and lots of food before we went in. Luckily we all survived, but we had all accepted the worst possible outcome. I was able to get out without a lifeguard, but needed to go call one for 2 of my friends who were in worse conditions than I was.

If you ever get stuck in a rip current, swim diagonally toward shore.

<comment><USER13> And importantly, learn to recognise a rip so that you never get in one. As I remember as a kid growing up in Australia, you can tell a rip when you can see the curl and break of a wave on either side of a part of a wave, but not in the middle. This is caused by the water that is flowing from the beach back out to sea.

Also, if you get tired don't fight the rip because you will risk drowning. Float on your back and wait for help.

<comment><USER14> Also, rips have a sandy colour to them, as they are carrying out all the churned up water back out into the stiller deep water.

If you are on a patrolled beach, and you find yourself in a rip, the easiest thing to do is just roll on to your back and wait for help to arrive - <USER2> waving a hand in the air occassionally. You certainly don't need to worry about getting swept out to sea, never to be seen again - lifesavers check rips roughly about once every 15 seconds or so (and no, I'm not exagerating - <USER3> know where the rips are, and they know that these are a big source of danger). If you are an ok swimmer you might try swimming parralel to the beach to get out of the rip before turning into the beach again. If you're a strong swimmer you can probably swim back diagonally, although if you're a strong enough swimmer for this you probably never thought of yourself as being in trouble anyway, so you probably don't need the advice.

<comment><USER12> > lifesavers check rips roughly about once every 15 seconds or so > (and no, > I'm not exagerating - they know where the rips are, and they know that these > are a big source of danger)

Where I was at, they didn't even see us drowning for approximately 5 minutes. Where one of our group members had to go tell the lifeguard that people were drowning for them to notice.

It was 5:30 in the evening, so maybe that was part of the problem, I'm not sure.

</comment></comment></comment></comment><comment><USER15> The drowning response is also why you are strongly advised to not get into the water to assist a drowning victim and why trained rescuers who do so violently manhandle drowning victims (if you administered similar aid on land it would look like a violent assault featuring a choke-hold delivered from behind). Drowning victims are virtually incapable of cooperation in their own rescue and their panicked struggles have the very real potential of drowning would-be rescuers.

I pulled someone out once (in flagrant violation of the above advice) -- my (possibly inaccurate) recollection is that he made no noise whatsoever between entering the water and exiting it beyond the sound of the first splash.

<comment><USER4> When I received lifeguard training 2 dozen years ago, I was taught ways of rescuing people that don't involve the use of force, and the person teaching the class strongly recommended against learning the more violent approaches that were once used.

As I recall, her claim was that they were less effective, and carried a significant risk of causing injury.

<comment><USER16> Risk of Injury is much better than drowning alongside then.. (But I'm not a lifeguard -- so I'll shutup)

// I was somewhat shocked when I did an L2 First Aid course a couple of years back. The Ambulance Officer running the class talked about CPR -- push much harder than you think you should. A couple of broken ribs will heal. A stopped heat beat wont.

<comment><USER17> Yes. I was advised by an Army medic that effective CPR _will_ break ribs. Also, you need to blow really hard for the breathing to be effective -- you need to see the chest actually move upwards as a result of your blowing. If you've had CPR training, hopefully you had an opportunity to use a real Resusci-Annie (sp?), which has sensors indicating that your doing both the chest compression and the breathing with sufficient force.

That same medic also told me that generally the victim will vomit, probably right into your mouth.

<comment><USER18> Typically the crunching sensation you feel is tearing of the cartilage that connects the ribs to the sternum. Unless you're doing CPR on a little old lady with osteoporosis, that cartilage is going to tear before the ribs break.

</comment></comment></comment></comment></comment><comment><USER19> _The captain was trained to recognize drowning by experts and years of experience. The father, on the other hand, had learned what drowning looks like by watching television._

It is so strange to me that television continuously presents things which are disconnected from reality, and people, who watch television for hours a day, end up using it as a replacement for life experience. I cannot really blame people for this; I think most people (here in America, at least) see most of their lives through television, so it's only natural that it's where most of their 'experience' comes from. But it's still dangerous. And things like this (choking, injuries/wounds, freezing, etc.) are all presented in such an unrealistic way, but with such consistency, that people never even question whether or not that's how it is outside of television and movies.

I wish television producers were more responsible. It's made us into a nation of incorrectly trained, mislead incompetents.

Article is light on HN content, though.

<comment><USER17> _television continuously presents things which are disconnected from reality, and people, who watch television for hours a day, end up using it as a replacement for life experience._

Aside from their absurd depiction of computers and other high tech, which go without saying...

Hollywood depiction of violence is inaccurate, and I think partly responsible for some common fears. On one hand, you'll see hand-to-hand combat go on seemingly forever, with the combatants absorbing huge amounts of damage, yet continuing on without any apparent loss of stamina.

On the other hand, guns are depicted as instant killers. A single shot, even in an extremity or the belly, is immediately incapacitated and no longer a factor (except possibly at the end of the battle when we discover they've been playing dead). In reality, there's _nothing_ that a single shot will do to _immediately_ incapacitate someone, short of outright destruction of the CNS. Even a shot to the heart, femoral artery, etc., leaves at least several seconds of consciousness during which a determined attacker could get off another shot of his own. And according to my self defense firearms instructor, in a conflict it's likely that you won't even notice you're shot immediately, or at least not be aware of the severity.

</comment></comment><comment><USER20> When I was a child (about 7 years) I nearly drowned at a public swimming pool full of people. My family was there including my mother, smiling at me from all of 5 feet away.

After I ran out of air and strength... it was actually my (then 9 year old) brother who saved me.

As a child I was simply infuriated with my mother, that she would sit there smiling acting like everything was okay while I was fighting for my life. I guess I know why now.

Thanks for this article -- it won't be forgotten.

<comment><USER21> Same thing happened to me, and it was my older her sister who pulled me out. I can vividly remember looking up and out of the water.

</comment></comment><comment><USER22> This hits home. I had a high school friend drown last week, at 11:30 AM, on a crowded beach. I still don't know much about it, but the description sounded quite similar to this:

 _Tweedy said he saw someone playing in the water. He looked again, and ocean waves were rolling the man over._

[http://www.starnewsonline.com/article/20100630/ARTICLES/1006...](http://www.starnewsonline.com/article/20100630/ARTICLES/100639975?Title=Bystanders- brother-tried-to-revive-Ocean-Isle-Beach-drowning-victim)

RIP Carter

</comment><comment><USER23> Three years ago I came close to drowning. I'm a strong swimmer, spent many years in a canoe, and am very comfortable being underwater.

I went white water rafting with some friends, and we lost it on a tricky section of water. Our instructor was stuck standing on a rock by the raft, and I was in the water holding on to the raft. Fine, except that I was facing the rapid waters head-on, unable to speak and breathe. And still I held on to the raft. It took the instructor screaming that he was willing to break my hand by stamping on it - and then giving my hands a swift warning kick - before I would let go, float away and recover myself.

It was truly scary at the time to think that whilst I'm rational, good with water etc, when in that mildly uncomfortable situation, my brain wanted to hold on, even if it meant I was taking on water. I'm not sure why the threat and warning kick were so effective, but am hugely thankful I got away with nothing but a bit of a bruised mind :)

<comment><USER24> Last year I came close to drowning because of massive cramping at the end of a one-hour training in open water. The frightening part is that it took _myself_ a long time to realize I was drowning: I probably was a bit drowsy from hypothermia. I remember going through 'left foot cramping, just continue, you'll be fine' all the way through cramping up of my upper legs & finally abdomen until I realized I was in trouble. I concur that once you are in trouble it is _very_ difficult to signal anything to bystanders.

Lessons learned: swim parallel to the coastline & don't swim alone. When you start to cramp up start to swim more conservatively, change styles, when it gets really bad, assume a fetal position & focus on floating, don't try to swim. The cramps will eventually go away, _then_ you can slowly start moving again. Watch out for hypothermia.

</comment></comment><comment><USER25> In Boy Scouts, we learned the rhyme "Reach, Throw, Row, Go", regarding the order of assistance to provide.

We also learned that if the victim tries to climb you, to submerge a bit (so they let go) and punch him (or her, sure) in the nuts, and to then rescue him.

</comment><comment><USER26> It's authoritative knowledge such as this that makes the Internet worthwhile (if you can find it among all the garbage). I had _no_ idea what drowning was like before reading this. Thanks for writing this blog post!

</comment><comment><USER11> Swimming is so fundamental to a persons survival that, according to Judaism, it is one of the four obligations a father owes his children:

"Teach them Torah, teach them a trade, teach them to swim and find them a wife."

</comment><comment><USER27> I almost drowned when I was about 8 years old and I remember it very clearly. I did exactly as is described -- I was face up, mouth just at the water level, arms flat, completely quiet. My parents -- who had two older children and spent their whole lives by the water -- spotted me and pulled me out.

The thing I remember most is that the overriding sensation was not panic, but calm -- a weird, fatalistic calm. I was gong to die: "oops". It really is an odd physiological response, and you have absolutely no control over it.

<comment><USER20> It's surprising how many people have had a close call with this.

I'm not sure exactly on my recollection, however, I had a similar incident and my reaction was not anything calm. I was angry and very frustrated. My guess is that it probably depends on the person and situation

<comment><USER28> _It's surprising how many people have had a close call with this._

It does explain why psychics often talk about how something happened in your childhood involving water. That always seemed pretty unlikely to hit to me, but I guess not.

<comment><USER29> And it still counts as a hit, when your best friend or brother had the near- drowning experience instead. Also lots of other things can happen with water. My sister made the unpleasant acquaintance of boiling water once.

</comment></comment></comment></comment><comment><USER30> Mario later on in the comments references some DVDs that show real life examples of drowning behavior: <http://www.pia- enterprises.com/watersafety.html>

It really is too bad that with all the web technology today, videos like these are not available for free. Seems like they'd help save some lives if they were.

</comment><comment><USER31> Thanks everyone for the comments and for sharing this article. You guys are great. ~ Mario Vittone

</comment><comment><USER32> Interesting instructional video: <http://www.youtube.com/watch?v=ndbGvjqEweA>

</comment><comment><USER33> So when the brain perceives drowning, it basically shuts down and starts doing self-destructive things? The article says that a rescuer being pushed down by someone who is drowning can end up in trouble too — and this is a real risk to a rescuer who normally swims and dives like a fish?

I don't mean to sound skeptical, I'd just like a little clarification. I never understood how swimmers can possibly drown unless hypothermic or completely exhausted. If this is the case, then it's horrible that we haven't evolved out of this destructive "drowning response instinct".

<comment><USER34> You call it destructive, but it sounds like it's nearly optimum for getting back out of water you just fell into. "Grab the riverbank or a tree; climb up it." That's simple and effective. The only time it causes further problem is when you're on a boat and fall in, or otherwise find yourself suddenly away from the shore.

<comment><USER35> Right. I can't swim a lick. Once, while on a solo backpacking trip very much in the middle of nowhere, many tens of miles from the next person, and while navigating a river canyon, I fell into the cold water, well over my head.

Somehow my toe touched something on the bottom and I rocketed out of the water like an explosion. The next thing I knew, I was flopped over onto a large rock like a fish, a few feet from where I fell in.

I still have no idea exactly how that all happened, but near as I can guess I gave the best leap of my life and scrambled the rest of the way up.

I really need to learn how to swim. :-(

<comment><USER36> Sign up for a course today, in fact, do it right now, it is probably just a few mouse clicks away?

</comment></comment></comment></comment><comment><USER37> I've been in situation like described - I, my father, my uncle and my 2 step sisters were swiming in a pond, the pond wasn't very deep - I could stand on the bottom, but the bottom was muddy and feet were falling throught this bottom sometimes even like 10 cm down - I could barely take a breath when standing in the deepest places.

My step sister was walking in the water, when she steped on more muddy bottom and fall under water. She was quiet and doing strange things with her hands, nobody reacted for a while, then I walked to her and give her hand (I was able to stand on the bottom there, but only barely). It looked funny and not dangerous at all - like she just were playing in water, uncle and father didn't know anything is wrong.

To this day I thought that she wasn't really drowning - because she was supposed to do the show like in TV.

</comment><comment><USER38> So, at the start, if someone is ladder-climbing-panic-drowning, then they are floating, have air, and have energy ... why are they drowning? What triggered the ladder-climb-panic mode?

<comment><USER20> Possibly some kind of instinctual trigger. Think about the moment where the entire body was fully EXPECTING a lung full of air... and ready for it... but for whatever reason you become submerged and cannot get it.

You aren't unconscious yet because you still have plenty of oxygen, but your instincts have been triggered on a more primitive level -- possibly initiated as the lungs failed to function as expected.

</comment></comment><comment><USER39> Ugh, this entire post is lifted from the original source and then a link is posted at the bottom. The person who actually wrote this great article is getting none of the revenue. Go to the original instead at gCaptain.

<comment><USER40> The person who actually wrote the article is Mario Vittone. Looks like he just cross-posted to another site.

<comment><USER31> I appreciate the traffic to either site. I wrote the post on gCaptain almost a year ago - it just never really got any play until now. Links to gCaptain are great. It's a professional site owned by a friend of mine. I'm still active duty Coast Guard so my site doesn't generate revenue. I'm just very glad to get the word out about this important subject. Thanks again everyone!</comment></comment></comment>


Bye bye Kippt, Hello... who? - <AUTHOR>

Now that Kippt announced being acquired by Coinbase, the question on everyone's mind is what are the alternatives.
Here goes the list of my favorites:
1. Dragdis: Clean & simple web app to collect and share any kind of online content (links, photos, videos and even selected text) 2. Pinterest: A visual social bookmarking tool
3. Icebergs: Visual bookmarking tool for creatives 4. Raindrop.io : Smart bookmarking tool for links, photos and videos
What do you guys use? <comment><USER2> 5\. [http://www.teamgum.com](http://www.teamgum.com) \- simple link sharing tool - it bundles notifications & reading list along with sharing button right on the extension. Built for teams - but individuals can use.

</comment><comment><USER3> This is the first I heard about this. Was this mostly an acqui-hire for the talent? I might be out of touch, but I would have guessed their business models to be pretty orthogonal.</comment>


Why Graphiti? - <AUTHOR> https://www.graphiti.dev/guides/why <comment><USER2> When it comes to modern web development I'm more of an observer than a contributor, so my opinion might not carry a lot of weight. However for me all these abstractions seems to get closer and closer to querying a database using SQL directly.

A carefully designed database schema would be able to support all of these use cases in a way that (at least for me) seems a lot simpler than wrapping it in new abstractions. Inserting multiple objects in the same transaction?, already implemented. Updating several fields at the same time as well? Getting only the entities you are interested in together with their subentities?, well that's what a relational database does.

As I said, I'm not a web developer, and I haven't touched on use cases where a lot of different things need to happen on server operations, but all the examples in the article would be easily solvable with SQL.

<comment><USER3> I completely agree!

I really don't understand why we don't simply ship SQL queries around, maybe a very simple subset of SQL so that it either works on most vendors or that it can be easily manipulated and adapt to different storage backend.

Can somebody enlight me?

<comment><USER4> it is unlikely that all the data sources you will be querying now are directly available in an SQL database.

<comment><USER3> For sure they are not available in a /rest or GraphQL engine neither.

SQL should be only the syntax used to communicate with the backend, the real implementation would be in whatever make sense.

<comment><USER5> That would require you to map the SQL to something else which would then map back to SQL or mongo or w/e. For example if you're trying to join data from multiple microservices you can't execute the join because most microservices setups are not going to allow joins. The joins would have to be mapped to service to service calls and at this point you're just rebuilding an orchestration layer which has already been solved by graphql.

<comment><USER3> So we invented a query language (GraphQL) to solve an orchestration problem?

Sorry but I don't buy this reason. Especially not to the question: "Why we don't use SQL as a query language?" especially because REST was around way earlier than GraphQL.

Your reasoning could be great to answer the question: "Why we like GraphQL where there are a lot of microservices?"

BTW, there is nothing inherent in the language in itself, if each microservices would be speaking SQL, you would simply need to _optmize your SQL query_ , decompose your optimized SQL query creating simpler queries one for each microservice, send each of those queries to the relative microservices, compute back the final result.

If you replace "microservices" with "table" here you get the standard way an SQL engine works :)

Please, it is not that I am against GraphQL, but it honestly seems like some engineer at facebook was annoyed by SQL, and decide to re-invent it. And that we are all following him or she just because they worked at facebook, which seems unwise.

Maybe the use of types? But what is the difference between a type and something that belong to a table?

Anyway, I am looking now at [GraphQL: The Documentary (Official Release)][1]

[1]: [https://www.youtube.com/watch?v=783ccP__No8&feature=youtu.be](https://www.youtube.com/watch?v=783ccP__No8&feature=youtu.be)

<comment><USER4> There is nothing about GraphQL that makes me think someone invented it because they were annoyed by SQL and decided to reinvent it, generally reinvention means a lot of similarity only badly done. You might argue GraphQl is badly done in comparison to SQL, but surely not that it is similar.

<comment><USER3> Honestly I don't use it so often, but it seems that any query in graphql could be easily and automatically translated to a SQL query. Am I wrong?

There are definitely trying to solve the same problem, aren't they? What are the advantages of GraphQL over SQL?

Please, I really want to know the answer to this question.

The previous answer was "the infrastructure we build around GraphQL is better for microservices", ok I can see that. But it is the only answer? It seems like a little weak reason to create a language so that later you can create a new infrastructure around it.

Am I missing something?

Why you don't find GraphQL similar to SQL?

<comment><USER4> Normally when I see a language that was created to fix problems somebody had with another language, then the two languages tend to be syntactically similar. I don't see any syntactic similarity.

Secondly I don't believe that GraphQl is meant to map to the relational algebra, which is the genesis of SQL.

GraphQL's benefit seems to be that you should be able to get all the data you need and nothing more with one query, and get it back in the form you want it. In the earlier comment that started this thread the commenter said something like that's what SQL gives you, but from my experience if you want to get back complicated data (3 joins, many properties with same names) your SQL statement is going to be a lot more difficult to write and organize than your GraphQL query. Writing the queries is generally really straightforward and it is quite quickly clear how to structure a query to get what you want, and indeed if it is even possible to structure the query. Ease of declaring what you want is a valid reason for having a new language.

Structuring a query in SQL or most query languages are generally more difficult than in GraphQL - in my experience. This of course does not mean there are not places where it can get complicated - just generally not at query construction time.

I can't really say if having a new infrastructure is a weak reason for creating a new language, I guess that depends on the infrastructure that one needs. Languages are generally really powerful tools for doing things, so if you want to do difficult things with higher productivity than previously you might feel encouraged to create a new language as part of your endeavors.

<comment><USER3> I really like your reasoning, thanks.

While I agree that GQL queries are simpler to write, it is also true that they are much less powerful.

I personally don't believe that it is a valid reason for creating a new language and all this infrastructure, but for some kind of project I can see the attractiveness.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER6> The biggest reason for graphql is in my opinion the enforced schema. REST apis so often had a nice written document describing the api and its fields, but nowhere was stated that some attributes can be null in some rare edge cases. In graphql the spec states an attribute can be null and i will not get some code crashing in a few months because of some undocumented behaviour.

<comment><USER7> I also miss that in GraphQL. With swagger I can exactly define how an object looks like. Not only if something is null or string, but also what the minLength the string is or what enum-values it can have.

</comment></comment><comment><USER8> I'm not sure how this differs from some of the more fully thought through hypermedia frameworks. Although it is nice that there's convention for flattening included linked resources down to something a bit more manageable.

For me, GraphQL really shines when going beyond CRUD. In my experience, many client applications aren't just querying and filtering, they're acting as a gateway for complex server processes and need to present a lot of data at once. These advantages aren't going to come through in simple CRUD examples.

GraphQL, in its current state, has some frustrating limitations, but I still think the future looks more like it than REST.

</comment><comment><USER9> At the risk of being a language advocate I wish the reference server implementation had been in Typescript rather than Ruby.

</comment><comment><USER10> Without remarking on the substance of this post, I just wanted to say I enjoyed the writing style and the design of this post tremendously. I was actually quite surprised by how much I enjoyed it haha.

<comment><USER11> On the other hand, I'm on the other side on this. I kept thinking, "get to the point, what are you trying to say?"

<comment><USER10> Haha, I hear you. If I was in a different mood, I might feel the same way. In general, though, I liked the tone of the writing and the little gifs - how did he make those btw?

<comment><USER11> No idea. gif makers are a plenty on the web nowadays.

</comment></comment></comment></comment><comment><USER12> The amount of times I've used APIs claiming to be RESTful but actually aren't consistent... If you use something like Prisma you don't need to worry about the boilerplate or having to maintain consistency when creating a GQL API.

I love the ability to browse introspection via playground most of all.

My two annoyances right now are: lack of input unions and lack of recursive fetching for tree/node based resources

</comment><comment><USER13> I've wanted this for a while actually. GraphQL is great, but it lacks convention. Which makes it hard for API discovery and code generation. I noticed that the author uses Ruby, which makes total sense, as Rails is a shining example of how conventions in REST can make generating an API incredibly easy.

I actually tried to make a GraphQL based framework in Ruby a while back that emphasized convention. By having convention, I was able to generate, say, a field that searches for a resource by ID. Not revolutionary stuff, but nice if you don't want to rewrite that boilerplate a bunch.

From what I've seen, there's a cycle of structure vs less structure in paradigms. SOAP was too unstructured, so REST was more structured. REST is too structured so now GraphQL. I suppose it's only a matter of time before a structured alternative to GraphQL comes out.

</comment><comment><USER14> This looks like an effort to bring to REST APIs some of the benefits GraphQL offers, mainly by adding extensive conventions on top of traditional HTTP endpoints. Comes with an implementation in Ruby.

The idea has some merit. That said, I am not sure I have spotted the discoverability features equivalent to what's possible in GraphQL world with a GraphiQL console.

<comment><USER15> I must admit the main thing that puts me off GraphQL is that it's not built on JSON. Maybe that's silly, but it just seems like a move away from what we know and love. Also the graphql tools seem to be based around the idea of a fixd schema, and I'm looking for something a little more flexible.

<comment><USER16> > move away from what we know and love

I didn't get the memo where we decided that we love JSON.

<comment><USER17> Especially when there are almost consensual better alternatives [https://hjson.org](https://hjson.org)

<comment> vertex-four Uhh, no. Part of the reason JSON is useful is that it's easy to write a correct parser in comparison to most other things - adding a bunch of the complexity of YAML back to JSON seems a bad idea. This makes it possible to use JSON as a serialisation layer for network protocols without introducing too much additional risk of parsing-related vulnerabilities.

</comment></comment></comment></comment></comment><comment><USER18> GraphQL doesn't not have support for dictionaries and JSON. I'd rather just use JSON schema + Mongo directly. If there is a way to batch multiple HTTP requests ... then GraphQL would be an overkill.

<comment><USER19> Neither of those is exactly true. GraphQL has support for user-defined scalars and we've defined a `JSON` scalar that is used to transfer arbitrary JSON objects as JSON-encoded strings (we also have a `map` scalar that renders as a JSON object at its field, but accepts a JSON-encoded string for input formats; we are shifting away from that because _some_ clients don't have the flexibility of producing inputs like that).</comment></comment>


What the Apple Watch is really about: Tracking your emotions - <AUTHOR> http://cannyvision.com/2014/09/10/apple-watch-emotion.html

<comment><USER2> If this was a single page, it would be easier to skim the summary and select an essay .

</comment><comment><USER3> I'm alarmed by the accuracy of the contents of this link.</comment>


Plan to Stop Rhino Poaching by Growing Horns in a Lab - <AUTHOR> http://motherboard.vice.com/read/the-hail-mary-plan-to-stop-rhino-poaching-by-growing-horns-in-a-lab

<comment><USER2> I wish this idea works. The problem is that the main cause of rhino horn use is magical thinking ([http://en.wikipedia.org/wiki/Rhinoceros#Horn_trade_and_use](http://en.wikipedia.org/wiki/Rhinoceros#Horn_trade_and_use)), but I suppose you can't grow the magic part in the lab and the users will want the real thing.

It's similar to the jewelry use of diamonds. You can create artificial diamonds in the laboratory, they are cheaper and they are used a lot in industrial applications (maybe they are better because you can control the impurities?). But for jewelry the people wants the real diamonds because they apparently have some kind of magic.

<comment><USER3> On the other hand, with diamonds, I'm guessing there are regulations ensuring synthetic diamonds are labelled differently from natural. With natural horns being illegal, who's going to know?

This might be harder for authorities to identify real horn products, but it'll also make it harder for consumers.

Hopefully the authorities don't decide to solve the former problem with some sort of certification that can also be used to solve the latter.

</comment></comment><comment> xkcd-sucks The market is probably flooded with counterfeit rhino horn already...

It's essentially just keratin, which can be reclaimed from hair and nail clippings.

Most people don't buy entire horns, as the price is really high ($50k-100k/kg according to google).

Keratin powder, or keratin pressed into chunks, would probably fool most people, and there's effectively no way for consumers to verify authenticity.

So, fake rhino horn is easier than fake drugs, fake gemstones, fake currency etc.

<comment><USER4> Wow, this suggests a really interesting hack by first setting up a 'nail salon cleaning service' :-)

<comment> xkcd-sucks The first few google hits suggest that current fakes are made of resin, etc. with some frog meat thrown in for scent. So they're not so expensive that people don't sell whole horns, unless they're all fake

</comment></comment></comment><comment><USER5> Great minds and all that -

[https://news.ycombinator.com/item?id=8248874](https://news.ycombinator.com/item?id=8248874)</comment>


Amazon Moving To Frustration-Free Packaging - <AUTHOR> http://www.amazon.com/gp/help/customer/display.html?nodeId=200285450 <comment><USER2> This strikes me as one of those great, marginal innovations that you need a giant corporation to implement. How many manufacturers are going to change their packaging line for a startup?

Congratulations, Amazon. Way to use your size for good.

<comment><USER3> Walmart has a similar initiative to reduce packaging from its vendors. This has a couple effects - increases shelf space and reduces waste. Size does have its advantages.

<comment><USER4> Not only that... Amazon no longer has to expend ANY packing material or effort (material + labor savings) when shipping these items. Slap a label on it and ship 'er out.

</comment></comment></comment><comment><USER5> I think this is brilliant on Amazon's part. The frustration factor in opening some items (children's toys, for instance) shouldn't be underestimated.

<comment><USER6> Not just the frustration factor, but the recycling factor is key too - especially in areas (such as mine) where trash is heavily limited (3 sacks for 2 weeks max) but recycling paper/cardboard is easy.

I think Amazon might have taken some influence from Sennheiser who have been trying out the whole "eco" packaging thing lately: <http://is.gd/6dHl> : It's worked out well - I believe the eco packaged headphones outsold the regular packaged ones on Amazon.co.uk for quite a while, so it might have helped them go with the idea.

<comment><USER7> Where is that?

<comment><USER6> United Kingdom. Our council is quite progressive on the recycling front. Despite the inconvenience at first, I'm in support of it. I think we recycle about 60% of our household waste now. Large families and those with babies get special allowance to have more trash, so it's reasonably fair.

The only downside, and one many are complaining about, is that they alternative trash pickup with recycling pickup, so you have to leave some trash sitting around for 2 weeks.. not pleasant to drag through the house on pickup day.

<comment><USER8> The more stuff one composts or puts in a food bin (provided by the council in some places, such as Richmond), the less smelly stuff one has to endure in the bin proper.

</comment></comment></comment></comment></comment><comment><USER9> This is totally excellent. If nothing else, it'll make kids happier since they will be able to open their own presents.

Lots of kids toys have thick binding, thick clear plastic etc., that is very difficult even for adults to open, and often requires sharp scissors.

Great move, and congratulations to Amazon.

<comment><USER10> _it'll make kids happier since they will be able to open their own presents_

That makes me smile. Excellent point and better holidays for all.

</comment></comment><comment><USER11> A lot of these packages are designed to attract customers in stores - something that is not required online.

I hope this one catches on.

</comment><comment><USER12> Amazon is one of the companies that took a very unsexy thing (book selling), and is just revolutionizing business processes. Amazon is quite an impressive company.

</comment><comment><USER13> It will probably also lower the total costs for returned items. You cannot re- ship an item when the plastic packaging has been damaged, even if the item itself has not been touched.

</comment><comment><USER14> Great idea. It says the manufacturers do the package "out of the assembly line!" That's very clever, I'm sure Amazon is saving on packaging things for shipping.

</comment><comment><USER15> The "frustration-free packaging" is incidental. The whole point is that Amazon will be saving a lot of money by not shipping empty air around. If you can send the same thing in a smaller package, this means you can fit more packages in a singe shipment to the warehouse, ship more things from a warehose to the distributor, and also send more things in a delivery truck at the end of the delivery process. Everyone saves along the way, meanwhile the customer gets a "furstration free" package, which truthfully, is probably easier to open, incidentally.

<comment><USER10> I'm sure it's cheaper for the manufacturer to package too. More efficient all around and no reason not to do it if it's already mail order.

[edit: clarification~]

</comment></comment><comment><USER16> I guess I'm confused. The video doesn't help:

<http://www.amazon.com/gp/browse.html?node=1234279011>

Why are they trying to pretend that traditional boxes are difficult to open? They aren't. Also, how exactly are they going to protect the product from shipping damage? It seems like packing foam or similar materials can't be used with the new boxes.

Do they not realize that...especially with toys, but lots of things...the packaging is part of the charm? To me, an item in a cardboard box is a factory reject or OEM. A child would likely reject a toy that didn't have the packaging of a store item.

<comment><USER6> _To me, an item in a cardboard box is a factory reject or OEM. A child would likely reject a toy that didn't have the packaging of a store item._

And that's an attitude worth changing in order to cut down on the ridiculous amount of packaging many products use (including non-recyclable plastics, etc). If it takes someone as big as Amazon to do it, bravo.

The whole glitzy packaging thing is a reasonably new invention anyway. When I was a kid things tended to come in cardboard boxes (though printed on). Playing with boxes was as fun as the toy often times!

<comment><USER16> There's exactly zero chance that store shelves will contain boxes similar to ones that Amazon is using here. Therefore, there will always be two kinds: 1) The displayable kind, and 2) The shipping kind.

Listen: I'm the _last person_ in the whole world who cares what packaging looks like. But the fact is, lots of people do, and these boxes' success will be correspondingly limited.

This whole thread is insane though. They're really doing nothing more than 10,000,000 ebay sellers have been all along. Getting manufacturers to do it is just a way of shifting costs, as Walmart is doing with RFID tags (though the total costs probably go down some, which is good).

<comment><USER6> _There's exactly zero chance that store shelves will contain boxes similar to ones that Amazon is using here. Therefore, there will always be two kinds: 1) The displayable kind, and 2) The shipping kind._

In the short term, sure. But the world changes a lot more than we think, over time. The Walmart shopping experience, as it is today, would be unfathomable to someone from even the 1970s.

Consider the success of "no frills" groceries over the last 10 years (a success that is increasing due to the credit crunch). Many who wouldn't leave their chosen brands for certain products are migrating to cheaper alternatives with incredibly dull packaging. It's a bit of a conceptual jump for toys to be the same, but I suspect it'll happen when we realize how superficial the 90s and 00s "were" (speaking from a, say, 2020s perspective).

</comment></comment></comment></comment><comment><USER17> They should start by not sending a packet of page markers the size of a credit card in a box large enough to ship a small child in. And i'm pretty sure _paper_ doesn't really need to have fancy air-pillow wrapping filling the box. A shipping envelope would suffice.

</comment><comment><USER18> First they should just make their boxes suck less. If I could open them without a box cutter, I'd be ecstatic.

<comment><USER19> supposedly not needing a box cutter to open these new boxes is part of the plan. From their site "It's designed to be opened without the use of a box cutter or knife..."

<comment><USER18> Right, but that's only for third party stuff that uses Amazon's boxing system. I just want the normal Amazon packages I've been getting for a decade to not suck, since that's near 100% of them now.

<comment><USER20> just use a key :/ Not really an issue is it?

</comment></comment></comment></comment><comment><USER21> I'd actually prefer the frustration-full packaging. + If you are gifting in this box, it just screams re-gifting to me.

<comment><USER2> You say that now, until you buy a USB flash drive or a CD and while opening it you nearly destroy the product or you cut yourself to the point that you bleed prodigiously all over it.

<comment><USER21> how do you manage to cut yourself when opening a box?

<comment><USER22> You must not have encountered the hard, welded plastic envelopes in which they typically sell small electronic goods. (where the hell do you live?) They're effectively impossible to open without a very sturdy set of scissors, and even then it's easy to scratch your hand when you get impatient and try to fish out your device.

<comment><USER21> Ah thats why. I use a box cutter to open my packages. That way nobody gets hurt.</comment></comment></comment></comment></comment>


The 12 step process to download Microsoft SQL Server Express 2014 - <AUTHOR> http://www.istartedsomething.com/20140616/the-12-step-process-to-download-microsoft-sql-server-express-2014/ <comment><USER2> Ok, now that you downloaded it, try successfully _installing_ it.

The entire installation experience is a disaster both from the outside[0], and from the inside. If I remember correctly, guys from SQL Server Setup team had to use like 16 Product Keys to work around various, err, quirks, to put it mildly, of the underlying MSI "technology"

[0]: [http://www.sqlservercentral.com/blogs/basits-sql-server- tips...](http://www.sqlservercentral.com/blogs/basits-sql-server- tips/2012/06/23/sql-server-2012-installation-guide/)

<comment><USER3> Honestly, SQL Server is one of the worst constructed and thought up installations I've ever seen - I don't think MSI had anything to do with it.

I've seen some bad installations, but whoever made that one should not be proud of that work.

<comment><USER2> Like I said, there are two sides of "badness".

The UI and UX is bad and it indeed doesn't have anything to do with the MSI.

The "undercovers" are appaling, this time all because of MSI. As a consequence, there's _no way_ you can cleanly _uninstall_ Microsoft SQL Server from the system.

<comment><USER3> I'm kinda interested in which pieces are MSI problems. There's a lot of strangeness in msi it generally it tends to work out pretty well unless you're doing weird stuff.

I'm not saying you're wrong - just interested!

</comment></comment></comment></comment><comment><USER4> Just use Google or Bing to search for download SQL Server 2014 Express. The instant download page is the second result, no registration required.

The author's complaining about the marketing pages. Marketing pages are run by marketers, and marketers are trying to get your information. The real download pages (the ones in Google & Bing search results) are run by the technical teams who want to put the product in your hands.

<comment><USER5> The inevitable "Hacker News Devil's Advocate" post.

Yes, the OP is complaining about marketing pages, because he doesn't want to deal with marketing! He wants the danged download!

If there's something wrong with that, go for it, but having to use Google to get to a download page from a vendor shouldn't be the 'solution'.

<comment><USER4> > Yes, the OP is complaining about marketing pages, because he doesn't want to > deal with marketing!

If you go to Shell.com to buy gas, you're going to be disappointed.

<comment><USER6> Quite a misleading analogy. If you go to <any site>.com to buy <anything that can't be downloaded or legally mailed to you>, you're going to be disappointed.

Should we have the same expectations for downloadable software that we do for gasoline (or any product that can't be downloaded or shipped)?

I say "no", but that's something we could disagree on.

</comment></comment></comment></comment><comment><USER7> Just recently experienced similar process for trying to download and install Microsoft Office for one of my relatives. First hit on Google was Microsoft Office web page which promised 30-day free trial, after that $10 monthly fee. I said "cool, let's try that".

The process was basically the same as OP explains for SQL Server, with the additional step to input credit card/paypal information. At that step, I simply canceled and after some more googling found another microsoft.com site that had MS Office download of 60-day trial without all the registration and payment information. However, Akamai installer was still needed (have no clue why Microsoft forces this, as it's instant spam/virus alert in many users' minds).

</comment><comment><AUTHOR> I guess some things never change!

[http://blog.seattlepi.com/microsoft/2008/06/24/full-text- an-...](http://blog.seattlepi.com/microsoft/2008/06/24/full-text-an-epic-bill- gates-e-mail-rant/)

<comment><USER8> It's great to see Gates so pissed at the state of affairs. It's obvious how all those little locally-smart-but-globally-stupid decisions can pile up into a giant pile of crap.

</comment></comment><comment><USER9> Not surprised in the slightest.

Finding anything on a Microsoft website is the biggest user experience pain I have ever encountered.

The fact that Google does not seem to index any of the Microsoft sites properly (which is probably Microsoft's fault in the first place) does not help at all. I will often search for a piece of software or an SDK on Google only to have the first hit be a still active page to an ancient version of the software in question; the newest version being buried somewhere on page two. (try and search for something like '.net download'. The first hit is 4.5, the second is 4.0, the newest is 4.5.2, the closest hit for that being number 6 and found on filehippo instead of an official Microsoft page)

That and the fact that Microsoft decides to arbitrarily and routinely change the name of everything they produce or deprecate software/SDKs/documentation without informing the user at all and naturally failing to point to the 'new and recommended' alternative are my biggest gripes.

<comment><USER10> Try figuring out what the latest service pack for any given product seems all but impossible.

</comment></comment><comment><USER11> At 1.1 GB SQL Express Advanced Version is the download you want. Because you can't easily add full text search etc after you've installed the basic version. I learnt that. That hard way.

[http://www.microsoft.com/en- us/download/details.aspx?id=4229...](http://www.microsoft.com/en- us/download/details.aspx?id=42299)

</comment><comment><USER12> When BizSparks first came out, Microsoft was pumping it as a great way for startups to get free software to use.

I went over to the site and found what seemed like an endless stream of forms and questionnaires. It was completely kafkaesque. I gave up.

A year or two later they fixed it up, but Microsoft seems to default to creating complex, byzantine, and head-scratching layers of gunk between the people they're trying to help and the help they're providing. From what I can see it's not just SQL Server downloads. It's a corporate culture thing.

</comment><comment><USER8> In the comments is a link to the direct download page: [http://www.microsoft.com/en- us/download/details.aspx?id=4229...](http://www.microsoft.com/en- us/download/details.aspx?id=42299)

I'm not sure what which (any? all?) of those options I want, but it seems much closer to a decent user experience.

<comment><USER13> Yep, it also took me 2 steps:

      * search on Google
      * download the software on the page you are linking to.

But: I agree that it's strange you can't get there via de MS site directly.

<comment><USER14> Well, you can get there much faster by using the search bar at the top of their homepage.

</comment></comment></comment><comment><USER15> It's the same for Sybase ASE/SQL Anywhere, DB2, Informix, etc. Several hoops to jump through, various registration details (I hit Forgot Password, everytime); big companies with several products and one massive site made of smaller sites to serve the needs of many people and products.

Never fear windows guys and gals, your favourite open source databases that are massively scalable are readily available, and nobody from sales will give you a call to discuss options:

* [https://downloads.mariadb.org](https://downloads.mariadb.org)

* [http://www.enterprisedb.com/downloads/postgres-postgresql-do...](http://www.enterprisedb.com/downloads/postgres-postgresql-downloads)

(if I put my tongue any further into my cheek I am going to make a hole!)

</comment><comment><USER16> I shudder from my college years when I had to install MSSQL server on my machine or VM's. It was a real test of patience, _especially_ when I had the most absolute basic use-case. I just wanted to install it and have it listen to whatever defaults it used at the time.

I remember breathing a sigh of relief every time an installation completed, because it meant my 4 hour drudgery was over with.

It's a shame to see they haven't streamlined this process. MS should release a simple installer for students or hell, even people who want the defaults. For example, I love Postgres.app - granted not an official release - but for dev work it's phenomenal. I just double click the .app and it runs on default settings.

<comment><USER17> My beef with installing stuff like Visual Studio and SQL Server was that for each conceptual product installed, a dozen mostly inscrutable items got pooped in to the mix of the Add/Remove Programs GUI. Not sure what the state of things is these days.

<comment><USER18> The state of things today is just as bad if not worse.

My thinking is that the VS and SQL teams simply don't bother with the uninstall story. It's easier to bring up a fresh new server.

</comment></comment></comment><comment><USER19> It's stupid, I know, but there are less step to do it even from microsoft.com

The trick is not to go to the SQL server page but goinf directly on the download Center. From microsoft.com you to Download->Download Center and then search for sql server 2014 express.

There you will find the one click download if you can guess what version you actually want.

Yeah, that does not improve the process that much.

</comment><comment><USER20>
        nuget install sqlserver-express

Would that work?

</comment><comment><USER21> High time to switch to Postgresql, for its maturity, free price,simple and the newly-added JSON feature.

</comment><comment><USER22> My good friends Usability and User-Friendliness just fall dead ...</comment>


Ask HN: Where are the comment links? - <AUTHOR>

Up until yesterday, I think, there used to be a link next to the name of a comment poster. It was great for referencing a part of a discussion; I personally found it invaluable to save in Evernote only the part of the conversation that interested me. It was great, as normally there are offtopic threads that are gold.<p>Is this gone, forever? Did I miss a survey? I humbly request it back... <comment><USER2> according to what @dang told me yesterday[1], the timestamp is now the link:

"Edit: Or rather, as of this evening, click on the comment's timestamp to go to its page. We decided to play with dropping "link" and just hyperlinking the timestamp instead."

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

</comment><comment><USER3> Untothebreach got it right, but just to expand a bit, a user pointed out several months ago that it has long been a standard convention on sites like this to make the timestamp—the part that says "3 hours ago" and so on—into the comment's permalink, and that if we did that, we could drop the extra "link" bit.

Since HN is minimalist at heart, it seemed worth trying. Of course we'd never take that feature away—we just merged it into the timestamp, which wasn't linking to anything.

Now if I could just find the comment by that user in order to thank him or her, that'd be great... but I looked for ages and couldn't. If anyone can dig it up, please let me know.</comment>


Ask HN: What are some best practices when you're working from home? - <AUTHOR> I'm working from home for the rest of March because of COVID-19, what are some best practices, tips, and behaviors I should put into effect to maintain quality of work? <comment><USER2> I've done WFH well, and I previously had stretches of time when I did it poorly.

My WFH improved when I realized its on me to develop a "theory of mind" for what my co-workers and boss (and others) know about my work. That means asking myself daily if the team knows what I'm working on, what my challenges are, what I did yesterday, what are the risks, etc.

I try to provide the same attention back to my peers--paying attention to what they're doing each day, even if it's not directly relevant to me.

Also offering my time to get colleagues unstuck or accelerated, and asking for their help when I know they can return the favor.

In mostly remote teams, we favor video chat over voice.

Also I like to say on team chat whenever I'm stepping away from the keyboard for appreciable time, and say when I'm back.

I favor deliverable forms of work like git commits. But sometimes half of my day has been spent on a really delicate, diplomatic email, and I say that at standup the next day.

Lastly all my friends know I don't do extra things during the week. I have a job and I like to stay focused.

For background, I'm a senior data scientist and have previously been a software engineer. For example, my home office is in L.A. One boss was in Boulder, CO and a later one in Camarillo, CA. One teammate lived in Venice near the beach, another in Irvine.

</comment><comment><USER3> The two big hazards are you either get distracted or you overwork.

Have a nice spot just to work - don't do it on the dinner table or the sofa. Ideally a chair and table. Don't get too comfortable.

Take lunch breaks. Snack breaks. Bathroom breaks. Make sure to walk around at least once an hour.

Make sure your family members understand you're at work now. Not everyone does.

Sitting too long in a cramped room builds up carbon dioxide, making it harder to focus. Leave a door or window wide open. Don't work in a closet (this seems ridiculous but I've done this thrice because I like tight spaces).

If you've gone to college, whatever environment you used for study is probably ideal for work too.

<comment><AUTHOR> Getting distracted has been a big problem for me thus far. I feel like the lack of social pressure from co-workers has been scrolling on my phone more often.

<comment><USER3> I'd recommend the book Maximum Willpower, by Dr Kelly McGonigal.

It busts a few myths that are also prevalent from many other motivational books by non-psychologists. WFH is really where many of those start to fall apart.

Like stress is actually destructive to willpower, one triggers your physiology to fight, the other gets it to be calm and in control. Simple techniques to train willpower. How to manipulate your fight-or-flight response into self- control (similar to how we balk at prices but shopaholics don't). How pressuring, rewarding, and guilting yourself makes things worse. It's easy to fall into these traps from home, and then go down a spiral of bad advice which makes things worse.

</comment></comment></comment><comment><USER4> For me, it's important to wake up, get fully dressed, and put on shoes. Something about putting on shoes signals that I'm not in "home" mode anymore.

<comment><USER5> I like the shoe idea. Excellent tip. No putting your feet up after you have your shoes on.

</comment></comment><comment><USER6> I find working in different places for different tasks. So i code best in my dining room, but might move to the kitchen if reading some documentation. Then i might take a calls in my lounge.

Also if i get stuck for a bit I try to get out at lunch to get some perspective, even if its an early lunch

Seems to give me good momentum

</comment><comment><USER7> Go outside, grab a coffee before beginning work, it sets the mood</comment>


The Next Pandemic: Not if, but When - <AUTHOR> http://www.nytimes.com/2013/05/10/opinion/the-next-pandemic-is-closer-than-you-think.html <comment><AUTHOR> I'm surprised that there is so much mention of antibiotics in this thread, as the author's book excerpt submitted here mentions a viral disease, and thus far we have very few "antibiotics" that have any effect on viruses. (Usual usage in English is to use "antibiotic" as a term for a broad-spectrum antibacterial medicine. Effective antiviral medicines have only existed since I became an adult, with the treatments for AIDS being the outstanding examples of antiviral medicines.)

I get a lot of my pandemic prevention information from the Center for Infectious Disease Research & Policy,

<http://www.cidrap.umn.edu/cidrap/index.html>

which, to be sure, has an institutional reason to raise awareness of risks of pandemics, but which also links to a lot of current, sound science reporting on infectious diseases.

Novel strains of the influenza viruses or novel strains of coronaviruses are scary to thoughtful epidemiologists because they can be spread by the everyday activity of breathing. If a new coronavirus infection has a high case mortality rate, high virulence, and long latency period, it could kill many people before any of us have a chance to practice the isolation that eventually shut down the spread of SARS back in 2003. Every year, a lot of people get the flu, and a more virulent and more lethal strain of flu-- especially one for which current seasonal flu vaccines provide no immunity-- could kill a lot of our friends and neighbors.

<comment><USER2> I mentioned this below. A lot of the high death rate from flu is due to secondary bacterial infection, which antibiotic can treat. Antibiotics would have reduced the mortality of the 1918 flu, which was novel at the time, drastically as bacterial infection counted for the majority of deaths.

We are likely to have a decent universal vaccine within the decade. Example, one test by Inovio used a unmatched vaccine on the 1918 Flu with lethal dose in mice. All the controls died but none of the vaccinated. This type of vaccine would reduce the chance greatly that something like a bat flu would emerge without us being prepared. These universal vaccines are made by bacteria or other very fast to produce and cheap methods, compared to the popular egg method today.

The biggest issue which the WHO has been working on is to make sure poorer countries have the know-how and distribution networks to ensure they can make and deliver current and next gen vaccines. This is especially important if access to antibiotics is not common and easy.

</comment></comment><comment><USER3> The problem is that mortality rates are always exaggerated, because the people that contract the virus and get very sick are the ones that come to medical attention. If 10x more people contracted the virus and fought it off, and never went to a hospital or contacted a doctor, no one would be able to factor them in and reduce the mortality by a factor of 10. That's why mortality rates tend to decrease in newly-discovered diseases, we start to look harder for people infected but not killed by them.

Of course this isn't a reason to be complacent.

</comment><comment><USER4> The frame of this OpEd is insane.

Anyone who understands what the word "Pandemic" means should also understand that pandemic disease is an inevitability.

The question is what can we do as a society (or societies) to reduce transmission, mitigate the severity and treat the afflicted if possible. It's why Public Health is so important.

(And to be fair to the author, the piece doesn't seem to pick the super weird frame that the title of the piece does. As Mitt Romney pointed out during the election regarding his GM bailout piece, the authors don't write the article titles)

</comment><comment><USER5> It boggles me that nobody find this article disturbing. Also written as some sort of warning for the future, yet classified in OPINIONS...

Furthermore, click on the author's name and get taken to his personal website... Where you can admire his book being promoted. And it's about scary diseases in the world that will kill us all.

Please.

</comment><comment><USER6> If you enjoyed this article, I strongly recommend the author's book (mentioned at the end - Spillover, by David Quammen). I am about half way through and finding it very interesting.

</comment><comment><USER7> Pandemics are overhyped. In the recent years we had 2 "pandemic" strains of flu, both of which as it turned out, were greatly exaggerated for the benefit of the pharma companies. The truth is, thousands more people die of know diseases every year (even from seasonal flu) than from any other unknown "pandemic" viruses. But this is not "exciting" at all.

<comment><USER8> No they are not - and a lot of people misunderstand why.

It's true that in any normal year more people die from known diseases, and that pandemics are a rare occurrence. But _when_ they happen they kill a lot of people. The 1918 flu pandemic killed 100 million people. 1 out of 20 inhabitants on the planet. And remember that this was back when we didn't fly around the planet giving a virus the possibility of spreading to the entire globe within a few days.

That's why pandemics are so scary - when they kill they kill a sizable portion of the earths population.

<comment><USER9> While I'm in agreement that one can't dismiss them out of hand, I wonder how likely a 1918 Style pandemic really is. I don't believe we have had a pandemic on the scale of the 1918 flu in modern times. 1918 was a _long_ time ago. The outbreak of HIV comes closest. It's easy to forget how much modern practices cut down on disease: wash hands, don't drink water people (or animals) poop in, sterilize (or dispose of) medical devices, store your food properly, don't live in a house also occupied by rodents, etc... That is all a great start, and we haven't even talked about antibiotics and other modern medical tech. Granted, access to all of this is far from uniform around the world. However, the situation has been steadily improving. Epidemiology and monitoring are also vastly better than years ago. I was working in pharma during the SARS outbreak and saw firsthand how fast research can move when people perceive something as an existential threat. Government and corporate red tape that normally gums things up immediately falls by the wayside (as does the usual academic quarreling over turf and recognition). Not wanting to see mass death has a way of focusing the minds of even the most recalcitrant beaurocrats in any organization.

<comment><USER10> > It's easy to forget how much modern practices cut down on disease: wash > hands, don't drink water people (or animals) poop in, sterilize (or dispose > of) medical devices, store your food properly, don't live in a house also > occupied by rodents, etc... That is all a great start, and we haven't even > talked about antibiotics and other modern medical tech.

With the exception of washing hands (which we don't do nearly enough) and the vague "modern medical tech", none of this would help against a flu pandemic at all...

<comment><USER9> I disagree. If your immune system is already run down by low grade infection and you've got a persistent case of diaorreah from poorly sourced drinking water, it's pretty easy for a flu virus to knock you out. No anibiotics means there's no way to keep you from getting pneumonia or other secondary lung infections. The healthier you are to start, the more likely you are to make it. The one exception to this is the paradoxical case where people's immune response goes crazy from battling all the virus particles. This can happen in really healthy young people.

My reference to medical tech is the whole system of diagnostic testing and patient monitoring. It allows for early identification, quarantine, etc... We also know a heck of a lot about proper bio safety procedures in medical centers to lessen the spread of disease through health care workers.

Again, not arguing that a pandemic like 1918 can't happen at all. I'm just saying that we're not showing up completely clueless and unarmed to a gun fight. We're bringing a knife this time :)

</comment></comment></comment></comment></comment><comment><USER11> I wonder what the second/third order effects of eradicating bats would be. I remember the consequences of eradicating mosquitoes being pretty minor, but presumably no bats would mean more insects, which would raise the incidence of various insect diseases, but also might increase birds and other insectivores. I have no great love of bats themselves, particularly due to rabies.

</comment><comment><USER12> As always the best offense is a good defense which in this case means keeping well informed of the spread of these diseases and staying away from people/places that have higher rates of infection.

</comment><comment><USER13> I'll just leave this here :D - <http://pandemic3.com/>

</comment><comment><USER14> The Next ______________: Not if, but When</comment>


Python module that makes working with XML feel like working with JSON - <AUTHOR> https://github.com/martinblech/xmltodict

<comment><USER2> Cool, although LXML (mature, fast, reliable, generally awesome) can do this (and more): [http://lxml.de/FAQ.html#how-can-i-map-an-xml-tree-into-a- dic...](http://lxml.de/FAQ.html#how-can-i-map-an-xml-tree-into-a-dict-of- dicts)

It also has the 'objectify' API, where you can access XML nodes via regular object access (i.e. `access.nodes[0].like.this`). [http://lxml.de/objectify.html](http://lxml.de/objectify.html)

<comment><USER3> Good, I had never seen this transformation tip in LXML

But usually, yes, LXML is "good" meaning it's the least worse way of dealing with XML

Also, it has some idiosyncrasies, like insisting on adding the namespace on tag names, so you end with something like {[http://example.com/your.xlsd](http://example.com/your.xlsd)}.index (I don't remember it exactly and I don't have an example here with me)

<comment><USER4> Correctly handling namespaced QNames is a requirement, not a bug. It makes things awkward at times, but that's a job for lib writers to provide decent interfaces.

I haven't used LXML in a while, but ElementTree, for example, forces you to use the QName in XPath expressions, which is technically correct but a huge pain; it would be nice if there was a ScrewNamespace option that would allow "simple" searches, although this might blow up in your face one day (when two namespaces define the same element name, and your xpath search brings up elements you didn't really want).

<comment><USER3> Actually the short name worked for the searches, the problem was reading element names from a subtree

It's not as much as dodging the requirements but rather an inconsistency in the API.

</comment></comment></comment></comment><comment><USER4> There are umpteen versions of this sort (there was even an ActiveState cookbook recipe at one point, I think). The problem is that they tend to be coded up with certain requirements in mind, without really going through XML specs, so inevitably you'll find places where they break down.

In this case, I don't see any namespace in examples nor (more damning) in unit tests, which tells me it's likely going to fail on complex documents with multiple namespaces.

</comment><comment><USER5> In 1999, there were a group of us working on a subset of XML (we called SML at the time) that had a simpler information model and syntax limitations so it'd be easier to work with. It seems that any simple encoding of XML onto JSON might find the deliberations interesting (if quaint and outdated): [http://tech.groups.yahoo.com/group/sml- dev/message/0](http://tech.groups.yahoo.com/group/sml-dev/message/0)

<comment><USER6> Today there is MicroXML. [http://www.w3.org/community/microxml/](http://www.w3.org/community/microxml/)

</comment></comment><comment><USER7> I think a better title would be make working with XML feel like native dictionaries, There are many ways for interacting with JSON dictionaries are only one of them.

For example you can do XPath style interaction with JSON in python which for many things works out just a good if not better.

</comment><comment><USER8> There is XML::Simple perl module since a century ago and it's ruby "copy" with the same name since long time ago also.

I've used the perl one and it only makes sense in very simple use-cases.

<comment><USER9> I've used the perl one as well. And while I'll agree the XML handled needs to be simple, I'd say the the use case needn't be.

At one job dealt with 10 and 20 Megabyte XML files on a daily basis - and I never thought of throwing XML::Simple at those. The results would be anything but Simple.

On the other hand I've run production code for years with an XML::Simple client to XML only RESTish API with ~100 endpoints. And that suckers still critical infrastructure - and barely being touched. Just humming along.

<comment><USER10> XML::Simple was glorious for working with 1-100K documents. I've used it on bigger docs and it actually handles them pretty gracefully although I've never tried at scale.

</comment></comment></comment><comment><USER11> 10 years ago (he was just about 16 then!!), Aaron Swartz wrote this which has been very useful to me: [http://www.aaronsw.com/2002/xmltramp/](http://www.aaronsw.com/2002/xmltramp/)

Since then the builtin interfaces have improved and I use mostly xml.etree.cElementTree

</comment><comment><USER12> What about namespaces? If you are not using namespaces you are very likely using XML as the wrong solution for a problem - still your library has use for helping cleaning up old code that did use XML as the wrong solution. Good work!

<comment><USER13> The overwhelming majority of XML I encounter in the real world does not use namespaces.

</comment></comment><comment><USER14> Doesn't this defeat some of the advantages of using XML though? Like Xpath?

<comment><USER3> Using XPath is good but it's a small comfort in the bloated and overcomplicated world of XML

I don't see any advantage in using XML to be honest

<comment><USER15> I've never understood this criticism. XML is quite simple - perhaps too simple.

If you're really offended by needing to repeat an element name in the closing tag... well... that's not exactly a serious criticism is it?

I mean, you could make various reasonable criticsms - XML sure isn't perfect. You might say the object model maps to documents, but not so well to typical programming constructs such as unordered hashes or ordered lists of unnamed items. You might complain that its data model is too simple in that it can only easily represent printable text-strings not binary data, numbers, dates etc. You might complain that namespaces are a hassle in many API's. You might complain that the distinction between attributes and elements is odd and somewhat arbitrary.

But bloated? You're just ranting.

<comment><USER16> > XML is quite simple - perhaps too simple.

I disagree pretty strongly with that statement: [http://www.jelks.nu/XML/xmlebnf.txt](http://www.jelks.nu/XML/xmlebnf.txt)

XML's grammar is far from simple.

<comment><USER17> A significant portion of that grammar is for parsing DTDs, which isn't really a fair inclusion.

<comment><USER16> why?

</comment></comment></comment></comment></comment></comment><comment><USER18> I haven't had much of a chance to play with it yet, but I wonder how it would handle a query to find all the "baz" elements for a structure like this: [http://pastebin.com/m7qTy8kw](http://pastebin.com/m7qTy8kw). Does it just support a loop, or possibly something similar to xpath like /document/foo/bar/baz to get an array of all of them. (Perhaps document["foo"]["bar"]["baz"], though I think that would break other things.)

</comment><comment><USER19> We wrote a similar utility for our ORM-for-SaaS library some time ago, using lxml if available and falling back to ElementTree:

[https://github.com/ducksboard/libsaas/blob/master/libsaas/xm...](https://github.com/ducksboard/libsaas/blob/master/libsaas/xml.py)

Bear in mind that both approaches are lossy - trying to support every XML quirk would quickly lead to reimplementing the libxml wheel...

</comment><comment><USER20> The Ruby equivalent would be XmlSimple: [http://xml- simple.rubyforge.org/](http://xml-simple.rubyforge.org/)

<comment><USER21> And the Perl equivalent is XML::Simple: [https://metacpan.org/module/XML::Simple](https://metacpan.org/module/XML::Simple)

<comment><USER22> I would not recommend XML::Simple, there are various cases (not even that uncommon - say having an attribute and an element of the same name) where it breaks down.

It may be awkward to use at times, but XML::LibXML is robust and consistent.

</comment></comment></comment><comment><USER23> I work with a lot of translation services. While the machine translation services are easy to deal with, the professional translation agencies _love_ XML. They also generally know f--- all about building usable web APIs. This looks pretty useful.

</comment><comment><USER24> This reminds me of PHP's SimpleXML [http://php.net/manual/en/book.simplexml.php](http://php.net/manual/en/book.simplexml.php) Which belongs to the good parts of PHP.

</comment><comment><USER25> Does this mean we can simply convert any xml api to a json equivalent by just json.dumps(xmltodict(xml)) ?

I am going to give it a try.

</comment><comment><USER26> I used this to build [http://showhen.me](http://showhen.me) and it worked very well for my use case.

</comment><comment><USER27> I used this to parse some XML when creating a shipping calculator. It was a huge time-saver.

</comment><comment><USER28> I recently used it for a project and I am quite a happy consumer of this library.

</comment><comment><USER29> This seems so obvious that I wonder why it wasn't done before. Well done!

<comment><USER30> Thanks!

</comment></comment><comment><USER31> There are two older similar projects - beautiful soup and untangle.

</comment><comment><USER32> Made a port for FreeBSD, thanks much!

</comment><comment><USER33> Which is a pity, because... XML is nothing like JSON.</comment>


A catalog of the active human-made machines that freckle our solar system - <AUTHOR> http://spaceprob.es

<comment><USER2> love it!</comment>


Ask YC: Autodidactic Degree Programs? - <AUTHOR>

While there is certainly inherent value in learning, and tacking alphabet soup after your name doesn't really mean anything compared to what you actually know, it seems there are tangible benefits to having formal degrees.
Has anyone experienced or know of a more or less "autodidactic" degree program?  I've sampled some distance education courses, and while they seem fine enough, I still seem to be learning mostly on my own, but within the constraints (some helpful, some not) of a formal class.
Basically, the ideal here would be to be given a syllabus of things to learn, recommended books to read, and whenever I feel ready, take an exam to pass (or fail) the course, enabling me to get done as quickly (or slowly) as my personal schedule allows.  Complete N courses, and I get a degree.
That might be asking too much, but is there anything at all along these lines? <comment><USER2> For many introductory courses and even advanced science and math courses, you can probably work out a solution with a professor where you would take the final exam early in the semester if you have a good reason. I got an A in an introductory class I was originally told I could skip just by doing the projects in the first week and handing in the final exam (another project) in the second week, but I had to have a good reason and talk to the professor first.

Another idea is to attend a local university. You can even start with a community college program that has guaranteed transfer of all credits to a four-year computer science degree--another advantage is that if you leave for another school before the Associate degree, you know the classes will count and be of some level of decency.

However, a big university far from where you live could be ideal for you. The bigger it is, the more courses it might offer, giving you more options of all types--professors, homework requirements, distance learning options, professor's own web site, audio lectures, attendance policies, scheduling, etc.

With the internet on your side, you could e-mail any professor and ask them if they require attendance in the classes you're interested in, and if they do, say that you live an hour away, or work full-time, or whatever the case might be, and you will take the responsibility for your own grade, as long as there are no specific grading penalties for missing class.

Many professors at colleges of all types do not require attendance, so you should not be afraid to enroll. Then, you can simply study on your own, or come in when necessary.

<comment><USER3> >For many introductory courses and even advanced science and math courses, you can probably work out a solution with a professor where you would take the final exam early in the semester if you have a good reason.

Never underestimate the silly requirements (e.g., "2 years residence") of a university. University's are not set up for you to teach yourself, take a test and finish fast. It's just bad business; you don't want the customers to be your competitors. Why let you take classes by exam and graduate in 1 year, when we can force you to stick around for 4 years?

Also, never underestimate the arrogance of professors:

Me: Dr. Jones, I've taken chem 2, orgo 1 and materials thermo. Your class (chem 101, a graduation requirement) conflicts with quantum chemistry (an elective which I can't substitute for chem 101). Can I take it by exam?

Jones: It's not possible that you know the material without taking this class. I won't give you the opportunity to prove me wrong. You shouldn't take graduate courses anyway.

<comment><USER2> Thank you for your post. I did not mean that you would sign up for 30 credits a semester and attempt to take tests to see what happens. You would really have to show the professor you know the class really well and have a good reason for accelerating your education. Also, faculty are not administrators, they are former students. They enjoy helping bright motivated students, no matter how much money the student pays in tuition.

However, taking many more credits "with department chair permission" is always a real option. Steve Pavlina got a B.S. in Computer Science at a state school in California in 1 and 1/2 years. He simply valued which assignments were worth doing and attempted many more credits than other people did. He also made decisions in under one minute that would normally take his peers weeks to arrive at (such as what topic to write an essay about.)

And actually, he got the department's highest honor and maintained a good GPA by doing this.

<comment><USER3> >Also, faculty are not administrators, they are former students. They enjoy helping bright motivated students, no matter how much money the student pays in tuition.

That's my approach. But my experience (as both a student and teacher) suggests that I'm a minority, and people like this guy (<http://www.insidehighered.com/views/2008/02/11/ferrall>) are more common. It varies from place to place, however.

Anyway, I'm not saying you can't push through fast. I did it myself, and it was well worth it (2 years = half price). But I had to fight the system every semester, and use various paperwork/administrative hacks to do it. It wasn't easy, and if I were a chem major (department chair: Jones, mentioned earlier), it would have been impossible.

</comment></comment></comment></comment><comment><USER4> I had a friend who graduated from college in Macedonia. Each class was an exam which you took whenever you were ready to and the exams were offered every semester. So to get the degree you needed to take all of the relevant exams.

Not sure if anywhere else in Europe does things this way.

</comment><comment><USER5> My experience is this: Make friends at the top. You will have a much easier time getting through school if you send out some e-mails to the heads of places which you are considering to see how they respond to your questions.

The tangible benefits to having formal degrees (at least an undergrad) get smaller as the size of the company you are pursuing out of school gets smaller.

I went (and left) a very large university, it was hard to get things like this considered, and often they had attendance policies which said if you wern't IN class, you could fail..so getting the syllabus and taking the exam later just was not an option.

Hope this helps. Feel free to ask about anything, it seems like I was in a similar situation a few years ago, I'd be happy to tell you about all of my experiences.

</comment><comment><USER6> You can do this at MIT: <http://web.mit.edu/registrar/www/schedules/advst.html>

<comment><USER7> Don't you have to be already registered as an undergraduate student at MIT to be eligible for those examinations?

<comment><USER6> Or a graduate student. The idea is you can study everything ahead of time and then take all the exams and get your degree(s), or at least get them in a very compressed manner.

</comment></comment></comment><comment><USER8> For many fields of study, you can use CLEP, DSST, and GRE tests to build up credit, and then have only a few actual courses you need take to get your degree. Few people do this, of course, because most people would rather sit in class than let all their credit for the course ride on a test.

</comment><comment><USER9> Lampeter University in Wales has some programs that might fit the bill.

Also, I've heard good things about the Open University.

</comment><comment><USER10> People here don't really like the word autodidactic. Try and keep it to a fifth grade level. Just a heads up.

<comment><USER11> "People here don't really like the word autodidactic". What fact do you have to back your statement?

When you are dealing with a community you should be careful when saying "People here".

"Try and keep it to a fifth grade level". Now why would you insult someone intelligence when they reach out to others for their opinions, and help.

<comment><USER3> I believe he is referring to this thread.

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