FastMail's Email Search Architecture - <AUTHOR> http://blog.fastmail.com/2014/12/01/email-search-system/ <comment><USER4> If you want Xapian search on a local maildir, I highly recommend notmuch[1]. Adding new mail and updating the index can take noticable time, but searching is super fast, it allows easy custom tagging, and search results are better than gmail in my experience.

I use it from the emacs notmuch mode.

[1] [http://notmuchmail.org/](http://notmuchmail.org/)

<comment><USER5> I'm always a bit jealous when I see this setup (or mu).

But I don't use emacs, and that seems to lead to subpar support and crazy hacks to get something up and working, unfortunately.

<comment><USER6> _But I don 't use emacs,_

Me neither, but mutt-kz had built-in support for notmuch. Not the hacky kind that calls 'notmuch', but it actually links against libnotmuch.

[http://kzak.redcrew.org/doku.php?id=mutt:start](http://kzak.redcrew.org/doku.php?id=mutt:start)

<comment><USER5> That looks really neat. You ruined my day (in terms of productivity), but might've given me a nice early Christmas present. Thank you!

</comment></comment></comment></comment><comment><USER7> An obvious question that I didn't hit on in the blog is "what about host crashes"? The nice thing is, every index knows exactly which messages it covers - and we can quite quickly (within an hour or so for an entire server) scan all mailboxes and index the missing messages - it's more efficient than doing it in a real time, because you are often indexing multiple messages in the same mailbox.

Once the indexes are up to date, we can switch back to being masters again. We index on all the replicas independently so that they are always ready.

<comment><USER7> (during a clean shutdown, we copy all the indexes over to the SSD, and they get compacted to data in the next day's compact run)

</comment></comment><comment><USER8> Although in the past I've implemented Xapian [1] over Sphinx [2], Sphinx today seems to be much better, but both Xapian and Sphinx are under-appreciated compared to Solr [3] and Elasticsearch [4].

[1] [http://xapian.org/](http://xapian.org/)

[2] [http://sphinxsearch.com/](http://sphinxsearch.com/)

[3] [http://lucene.apache.org/solr/](http://lucene.apache.org/solr/)

[4] [http://www.elasticsearch.org/](http://www.elasticsearch.org/)

<comment><USER7> All of those last three are awesome if you either put all the user's search indexes into a single engine, or have a shit-ton of memory.

With sphinx, we found we had to start and stop daemons all over the place to manage memory, and it was just unworkable. It was either that or run one big index per machine, but there are operational reasons I'd rather not be doing that. We try to keep everything user-sized.

That said, there's still stub Sphinx code in there. Both engines are have GPL licensing on them, which means compiling against Cyrus (BSD licensed) causes a non-BSD licensed end result. Not an issue for us, since we publish all our Cyrus code anyway.

There is talk of building an Elasticsearch backed into Cyrus as well - <USER2> free, it's all open source. We'd definitely take the patch if it's good code (he says with his Cyrus Project Board Member hat on rather than his FastMail Director hat on)

<comment><USER9> Sphinx also had a bunch of really bad bugs around server startup and shutdown, and some ugly code. I ended re-writing some of their pthreads code and submitting patches, I have no idea if they ever used them or not because their development tree is internal and not visible outside their company.

Solr (well, Lucene) has awesome natural language stemming abilities, many more languages supported than Xapian. In particular it's much smarter than Xapian about Chinese. But a) the memory requirement makes running multiple shards on the same machine hard, and b) nobody in the company wanted to learn how to handle Java operationally.

EDIT: since 2012 Sphinx appear to have made a public mirror of their internal tree at [https://code.google.com/p/sphinxsearch/source/checkout](https://code.google.com/p/sphinxsearch/source/checkout)

</comment></comment></comment><comment><USER10> Apache Solr is best suited for such applications. AOL Mail uses Solr to power search for all users [0].

[0] - [http://lucidworks.com/blog/podcast-solr-at-scale-at- aol/](http://lucidworks.com/blog/podcast-solr-at-scale-at-aol/)

<comment><USER11> That advice is a bit dated honestly, Solr is fine but the current "best practice" if you will is to use ElasticSearch.

Not saying you can't do it with Solr or that Solr doesn't scale, it does. You'll just have an easier and more fun time doing it with ES.

Couple of related/examples:

[http://highscalability.com/blog/2014/1/6/how-hipchat- stores-...](http://highscalability.com/blog/2014/1/6/how-hipchat-stores-and- indexes-billions-of-messages-using-el.html)

[http://exploringelasticsearch.com/github_interview.html](http://exploringelasticsearch.com/github_interview.html)

</comment></comment><comment><USER12> Seems like they independently invented a sort of log structured merge tree.

<comment><USER13> LSM-type storage is frequently used in IR; it's not a new technique. I accidentally "invented" it a few years ago before I realized it had a name. Even Lucene 1.x used a variation of this for its "segment" files (which it still does, at least up to 3.x, afaik).

The reason is that you want to keep the inverted indexes sorted on disk, but you don't want to sort the entire index every time you update. So you create one mini-index per update and merge them lazily when you get too many of them.

</comment></comment><comment><USER14> During the compaction phase, when a new temp db is installed while the old is being compacted, isn't there a window where messages in the old temp db are not searchable?

</comment><comment><USER15> Does anyone know why they chose Xapian over elasticsearch?

<comment><USER4> For me it would be the use of Java. I've just had too much bad luck with it. Admittedly that's not really very objective reasoning.

<comment><AUTHOR> From memory (sorry, it was a while back) we actually started with Elasticsearch, but it was way to heavy and looked for an alternative solution. Even with a single user it was consuming way too much memory.

<comment><USER16> Sorry Alfie, your memory fails. We started with Sphinx.

We use Elasticsearch elsewhere (ELK stack), but not for mail search.

</comment></comment></comment></comment><comment><USER17> Fastmail is a great service, however iCloud completely fails with their web client. I have >50k emails, probably closer to 100k and searching simply times out. Never has worked for me. It's sad, really...

<comment><USER7> Sorry, I don't understand what you mean. iCloud is a service, and FastMail's web client doesn't talk to iCloud, it only talks to FastMail's servers - <USER3> least for now.

<comment><USER17> I was contrasting the iCloud interface to FastMail, an implication they were connected wasn't intended.

<comment><USER7> Ahh, ok. I misread your post then, sorry.</comment></comment></comment></comment>


Ask HN: Any experience with defiant children? - <AUTHOR> My oldest son is now 6 years old and grows more defiant by the day. He frequently tries to physically hurt me, his mom, and his younger sisters (ages 1 and 3).
We've tried the whole "natural consequences" thing and he doesn't care. He just uses it as an excuse to get angrier and call you names.
Timeouts don't work either. It's gotten to the point that we cannot get him to settle down without physically restraining him. I literally tied him to his bedpost this weekend so he would stop slamming doors and breaking stuff in his room while he was supposed to be on timeout.
Since the HN crowd comes from such a diverse background, I was hoping someone out there has experience with this kind of behavior and can offer some advice. None of the methods we know of are working and he is quickly wearing our family down to the bone. I'm not sure how much more my wife can take. <comment><USER2> Being a parent can be super hard. It sounds like your wife could use some down time and space from your son. Please encourage her to go out with a friend, get a pedicure or do something that will fill her cup.

I have a high needs 8 year old. I find there are certain things that always trigger her -- poor sleep, hunger, watching TV/playing video games, too much play with other people. It takes a lot of discipline to keep these in balance, but the effort pays off most of the time.

As far as discipline goes, every child has different needs and every parent has their own style. Most likely there is an underlying cause to the behavior -- be it developmental, physical, emotion -- and as parents we rarely know the true cause.

"Time in" rather than "Time out," reading together, going outside in nature can all be healing.

Hand in Hand Parenting has some good gentle discipline resources. "Raising Your Spirited Child" or "The Highly Sensitive Child" may be good resource to assess your son's temperament.

The "Your X-Year Old" series of books is often a good measuring stick to figure out age expected behaviors.

Time ins, punishment, rewards, etc are all linked to short term wins -- not long term success. "Unconditional Parenting" is one of my favorite books on the subject.

Finally, if this is a new behavior, it is possible there was an outside catalyst -- not what a parent wants to think about. Do work on giving your son tools to communicate -- words, drawings, a good understanding of his biology (age appropriate). Having a neutral professional he can talk to is helpful as well.

Good luck -- what a lucky son to have a father so humble as to ask for help.

<comment><USER3> Agree with the above. My daughter is nearly 3 and very confident and energetic. My wife picked up this book [https://www.amazon.co.uk/1-2-3-Magic- Effective-Discipline-Pa...](https://www.amazon.co.uk/1-2-3-Magic-Effective- Discipline-Parenting/dp/1889140430) and is using the techniques. It seems to be working. It's more a means of training the adult not the child. Try not to freak out when they do the wrong thing but make them know it's not acceptable. Reward and give attention for good behavior and don't hold a grudge.

Good luck!

</comment></comment><comment><USER4> My son went through a similar stage when he was just learning about his own anger.

Once we all realised that he didn't want to be angry it got a lot easier for everyone. We gave him words and guidance to let him analyse his anger, helped him to try different means of coping with his feelings and then incentives to apply those tools.

BTW StackExchange's parenting community[0] is a good place to find answers to issues like this.

[0] [http://parenting.stackexchange.com/](http://parenting.stackexchange.com/)

<comment><AUTHOR> Thanks, hopefully that's the stage we're getting to. My wife hung posters on the walls with exercises to help him calm down and I've been quitting work early to be able to spend more 1-on-1 time with him in the afternoons.

What incentives worked for you? We've tried the points/sticker chart thing without any luck (allowing him to redeem his points for audio books, tv shows, treats, and even Dave and Buster's if he saved up a lot).

<comment><USER4> Motivating factors are different for everyone so find what ticks his boxes.

We had a chart of 7 faces which could be happy or sad, one per day for a week, that he fills in at the end of each day. He gets a warning when he first starts to act up then a sad face if he carries on. All smiley faces means a small toy at the weekend.

Filling in the chart some long time after the behaviour was important as it allowed for calm(er) reflection on the consequences of bad behaviour.

It took a couple of weeks to see an improvement but over all has worked really well for us.

<comment><AUTHOR> Sounds like a great idea. We've tried the point chart but haven't tried to capture his behavior over time in a way that's visible to him.

</comment></comment></comment></comment><comment><USER5> Hang in there. I have a 5 year old who went through a phase like that. Mom gets really worked up and short tempered due to his acting up, talking back, slamming doors, etc. In our situation I observed that the escalation and increasing punishment didn't accomplish much. What worked in our situation was to try to understand what was driving his behavior and getting him to talk about what he was feeling and to try to get him to understand I would help him. He still has a tendency to some odd behavior but he's 5 and we are all a bit weird at that age. I'm hopeful it'll pass.

<comment><AUTHOR> Yeah the stress it's causing my wife is one of the hardest parts about it. She got her BS in child development, worked at the local CDRC in college, and always assumed parenting would come easy for her. Thank god our 3-year old daughter is the sweetest thing in the world.

When I was in high school I remember my mom losing it one night and saying she wished I was never born. Those things stick for life and my wife is very much at that point.

<comment><USER5> Yeah that's a point I've tried keep us from but she's said similar things not in his presence thankfully.

For us we definitely saw a correlation with acting out and timing of him becoming a big brother. He was already going through a phase of acting out and testing limits but when he found out he was going to be a big brother all that behavior escalated a bit and was more frequent.

At this age they are too young to know how to deal with emotions of not being the center of attention. You almost can't reason with them because they don't act rationally and they just don't know how to deal with their emotions. I've been able to break through with him quite a bit by removing him from the escalating situations and talking to him and convincing him I'm trying to help. It's hard, and doesn't always work but when it does he actually calms down and will tell the truth about his feelings - much of which is related to his brother and some of it is us just not understanding his intent on his actions and reacting to something we think is bad.

In my son's case he's already a bit weird and my wife has on more that one occasion suggested he has autism because he won't eat certain foods, doesn't like loud noises, etc. I think he's unique and creative and has a big imagination like all kids do. I'm not interested in diagnosing him and making him a robot. It's tough at times but we take it day by day.

<comment><AUTHOR> Sounds like we're very much in the same boat. He definitely took a turn for the worse when his little sis was born.

He's a very creative and strong willed boy. Loves people and loves to talk. If he's left to his own he does alright, but unfortunately he has zero concern for anyone else's safety so he's not able to do that very often. The words "no" and "stop" have been far too frequent in our house lately but it's really hard when you have a newborn and he's jumping off his bunk bed and nearly crushing her.

We like weird too. We have friends raising robots and I'm honestly not sure which is more painful to watch -- my son losing it or their kids acting like grownups.

<comment><USER5> Yeah really does sound like we're in the same boat, you just described my son.

</comment></comment></comment></comment></comment><comment><USER6> Kids sports. It's a stress reliever and teaches them discipline, respect for rules, and social skills with other kids.

I actually coach kids from ages 6 - 12 in Judo but team sports can be good also. It's rewarding to see kids mature mentally through training in sports. I have had some real problem kids improve their behaviour over time.

Once they get to about 6, they are mentally ready to learn an organized sport and the challenge is good for them.

</comment><comment><USER7> This is a really a hard place to be. It's great that you recognize that there is a problem, are working to fix it, and are moving your schedule around to give your wife a break.

Somewhere in our firstborn's terrible twos, my wife and I also were trying everything, and nothing was working. Here's the big thing I figured out:

I'm used to working with computer programs and computers. If you give computers the right input, you get the right output. Right then and there. Kids are not nearly that deterministic. When you have a big issue like this, you can do the exact, perfect, correct action, and your son would still likely respond badly. This makes it really hard to judge how good your actions are when you naturally measure your actions by your son's responses. This results in a desperate flailing around trying to find something that works.

With our son, I finally realized that I had to just make a plan with the best I knew so far, stick to it, and keep a good humor throughout. A change in my child's thinking will pretty much only happen when they decide to change. You create the conditions where there's obvious, immediate feedback, avoid turning it into a personal fight, and one day they'll wake up and stop battling.

(If you'd like to talk specifics, or anything else, feel free to email me.)

</comment><comment><USER8> I would recommend trying to show the defiant child that he really does need others.

If he tears up his room, then remove anything you care about and let him tear the rest up.

If he is not nice and polite during mealtime, then he does not eat. Or the meal that is provided is very basic, and must be eaten in the room.

Eventually you may have to remove all forms of pleasure, including toys, games, nice clothes, etc.

During this process, communicate that you all love him, but do not like how he is acting. Explain that nice polite behavior will be rewarded. You will eventually feel like you are running a small jail, but eventually it will sink in.

Also hard work is very good at wearing kids out. If you have the opportunity then digging a hole is good therapy. Make him dig a good hole before he can have dinner, and it must be done right, or back to the room. After dinner, make him fill it back up. Once he starts correcting, give more useful chores like sweeping floors.

Keep up the communication, and work on directing the energy towards physical activities and praising polite behavior. Perhaps a game of horse with dad would be a good reward.

Good luck!

</comment><comment><USER9> Having read through all the comments and your responses it appears your son is capable of controlling himself, but knows he can get away with his behaviour in private. There is only one solution which is for him to learn that his private behaviour is not going to be tolerated any more. How you do this is up to you and your wife, but once you go down this path do not turn back.

<comment><AUTHOR> He can to a point, but once he gets tired / bored the behavior comes out even in public.

Yesterday my wife took the kids to the beach and tried to get a photo of the three of them together. In the sequence you see him pull our 3-year old down and then start chewing on his fingers while he's smacking our 1-year old in the back (not hard but quick repeated pats). The last shot is him staring at the camera with his fingers in his mouth and his other hand hitting the side of his head.

It's an incredibly sad photo for my wife and I to look at. He's obviously tormented by something internally but nobody we've worked with has a clue what it is or how to help him cope with it.

<comment><USER9> In this case this might be a situation that you just need to endure since if he can't control himself then nothing you can do can really help.

Do you have a relative that it he could go and stay with for a time? Moving to a new location can break people out of the behavioural mould that have got stuck in and having him spend some time in a new location with new people might allow him stop his self-distructive behaviour.

</comment></comment></comment><comment><USER10> I have a child with severe ADHD and ODD (oppositional defiant disorder)

My only advice: Seek professional assistance. Now.

<comment><USER11> This.

As a parent, you want to remain calm and not accidentally start giving a child a bunch of problems that he may not actually have. At the same time, it's quite useful to have somebody's opinion who's seen hundreds of different kids and can provide you with some context.

So find an expert, and then go spend some time talking to them -- both with and without the kid. At the end of the day, it's your decision what to do, but it's always good to talk to somebody with a bit wider view than you might have. After all, it's basically the same thing you're doing now on HN, except this would be talking to somebody who actually specializes in these things.

</comment></comment><comment><USER12> Get him drawing or some other outlet.

Is he on the autism spectrum. The right teacher or school program might transform him. Please ffs stop restraining him.

</comment><comment><USER13> There have been lots of good suggestions.

I am just adding to that. I do not know your real situation so I am just extrapolating. It could be that his siblings are taking a good share of parental attention that was once fully his. Especially his mother's.

If so, you will need to patiently work with him to show you are fair to all kids. Once the mother is free enough to spend time with him, this behaviour will subside. She will currently be having her hands full with the little ones and you might have to pitch in.

With time and patience he will be back to his calm self. Next to your 3 and 1 year old, he might seem older but remember that he is still just a kid and not too emotionally different from a 3 year old.

When, the going gets difficult, remember this too shall pass and some time in the future, you will use this experience to help out another harried parent!

Outdoor free play can release some of the kid's pent-up energy and that certainly helps

Ensure the kid is getting enough sleep too.

<comment><AUTHOR> Thanks for the encouragement.

Your point about remembering he's just a kid is spot on. He seems SO old compared to his sisters, but every once in a while he'll say something that strikes that chord and makes you remember just how young he still is and how much help he still needs.

We've been hiring baby sitters this summer so my wife can do 1-on-1 dates with him twice a week. He has a blast with her but then immediately relapses as soon as they get back to the house. Almost makes things worse because you feel like you're doing something right for once and then it ultimately ends up backfiring.

He usually gets about 10 hours of sleep (goes down around 7:30 and usually up around 6 or 6:30).

</comment></comment><comment><USER14> I have a five-year-old with a big defiant streak. Every kid is different, and what works for one kid or one parent won't necessarily work for another.

One strategy that works sometimes is defuse and distract. When the kid is fighting against you and not listening, go to "oh, so you want to be tickled" and get them laughing long enough to forget that they were mad or defiant.

Or suggest silly alternatives -- put his pants on his head if he fights getting dressed, or pretend-feed his food to the teddy bear, and the plant, and the microwave, etc., if he won't eat it.

Timeouts with the kid alone don't work well for us either; but sitting with them and waiting until they sit still and settle down does sometimes.

The hard part is always time. With enough patient one-on-one grownup time we can get through any one defiant fight well enough, but when you are in a rush and the other kids need attention too... it is hard.

<comment><USER14> Other ideas: make a deal and put it in writing. When he is calm after some incident, sit down and talk through it. Ask him what he should have done, and what you should have done. Let him come up with the ideas. (Really! He will surprise you and come up with good ones!) Then write it down and you both sign it. Next time the same situation comes up, follow the script you agreed on and remind him he signed it.

I got this one from a parenting book. I tried it one time with my kid, and now we have an agreement when she misbehaves in public I will tell her "What the heck!" and she will remember to snap out of it. It kind of works, not perfect, but it surely helped.

</comment></comment><comment><USER15> The obvious thing to do is seek professional assistance, starting with a child psychologist and / or a family therapist.

<comment><AUTHOR> He's already seeing an OT at his school but it doesn't seem to be helping much. Not sure what the next step up is.

For the most part he behaves fine out in public (or when he knows he's being tested). But once he gets home he's an absolute terror.

<comment><USER16> Have you considered recording him and playing back the recordings to him? It might embarrass him a bit or hopefully let him see how outrageous he's acting? At the very least it might be helpful to show a professional specializing in child behaviour.

I am not a parent but had experience raising a family members child. I was also a "problem child" similar to your description (probably worse).

</comment></comment></comment><comment><USER17> _Timeouts don 't work either_

This avoids the problem.

 _physically restraining him_

This exacerbates the problem. How can anyone trust someone who physically ties them down? Can you start any kind of relationship like this, let alone continue one with your parent? One cannot respond to emotional abuse and physical abuse with emotional abuse and physical abuse, and expect the relationship to improve.

 _natural consequences_

Googling this.

        Natural consequences are the inevitable result of a child's
        own actions. For example, despite Dad's urging him to put on
        his coat, Tommy goes outside when it's cold without wearing a
        coat. The natural result is that Tommy gets cold.

If you mean he wouldn't wear a coat even if it's cold, and ignores the cold, then by all means let him continue.

 _get angrier and call you names._

How do you feel when he is angry and call you names? Not the "parent armor" that you wear. Turn that off, turn off the "I'm doing this for your own good", turn off the "I'm parent so I can tell you what to do". But how do you, the child inside you, the one who feel secure in the love of your parents, feel inside? Let that child out. If you're going to cry and stay at home in bed all day hiding because you can't handle the emotions, then do that.

That's natural consequence.

Avoid raising your voice, avoid coercing him to do your wish, avoid tieing him down. If he would stay at home than go with you to picnic, trust him, and let you or your wife stay at home to make sure he is safe, while the rest of the family continue on. Let him physically hurt you (but not your wife or other children), unless your life is in danger.

The fact that you put natural consequence in quotes, shows you can respect it a little more.

EDIT; But it is very good you are asking for help, it is on the path to becoming a good father.

<comment><AUTHOR> The natural consequences are more along the lines of...

Don't like dinner? That's fine, don't eat. Then he goes in and makes a bowl of ice cream. What's the natural consequence approach there?

Same when he's taking his frustration out on his toys. Eventually one actually breaks and now he's sad _and_ angry and directs his emotions at his mom and sisters.

Just this week he figured out how to climb over our fence and out into the street. Is the natural consequence to let him be run over or kidnapped?

I put "natural consequences" in quotes because I think it's a joke. If your dealing with problems that have natural consequences you don't actually have much of a problem.

<comment><USER17> _What 's the natural consequence approach there?_

I would ask him for his favourite ice cream, take him out to the supermarket if he likes to come with me, buy a 2L box of it, and let him eat it the whole night if he wishes. Be happy he's enjoying the moment, enjoy it yourself, connect with him. Repeat this every night until he wants to eat something else. He has to find out, using his own experience, why it's unpleasant to eat only ice cream for dinner every night, so that, one day, a week from now, a month, two months, he would choose to eat proper dinner because he truly wants to, from his heart, rather than doing it because his parents are forcing him to.

If he's going to be a broken man either way, at least he grew up with a father who listened and empathised with him, and accepted him for who he is, rather than being physically restrained in bed, yelled at and controlled.

To love someone, we accept their choices, even when we know those choices have bad consequences, at the same time we trust they will eventually find their own way.

 _mom and sisters._

How does your wife react, and what does she actually feel? Inside she's upset and hurt and worn out to be blamed for something outside of her control, but I have a hunch she doesn't act that way in front of him. You can't force her to be vulnerable in front of him, but you could redirect his anger to yourself, explain to him why you're doing that (your wife is worn out and you want to protect her), and then you could choose to show him your sadness when he's angry at you.

 _I put "natural consequences" in quotes because I think it's a joke._

I'd love to know if any techniques I could try, that would work, while treating it as a joke. I'm serious.

        The very highest if barely known.
        Then comes that which people know and love.
        Then that which is feared,
        Then that which is despised.

        Who does not trust enough will not be trusted.

        When actions are performed
        Without unnecessary speech,
        People say, "We did it!"

        Tao Te Ching - Chapter 17

<comment><USER18> I'm going to venture a guess that you yourself have never raised children. This is classic armchair parenting advice that sounds good to the philosophic mind, but falls apart in the real world. If you've never raised kids, you probably shouldn't offer parenting advice. If you have actually raised kids, let us know then know how long your kid ate ice cream before they acquired a taste for broccoli.

Developmentally, a 6 year old is just not ready to be in control of defining all their own boundaries. They need adults to help them with this. Often times the reason kids are acting out is because they don't know where the boundary is or they sense where it is but it feels too unsteady. Clearly defining boundaries around a child's behavior is going to help them feel more secure.

<comment><USER17> No, but I've had to see a therapist since I could move out and not tell my parents about it, because I've parenting that shares similarities to what OP described. My suggestion is only based on what the therapist told me I needed, instead of what I actually experienced.

You're right, I should wait till I have had kids before giving out this advice.

I take my comments back and endorse the following two comments.

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

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

<comment><USER18> Yeah, parenting can be kind of a balancing act. I think there is a valid point that your posts were getting at which is it's important to give your kids the space to make their own decisions and learn from their own consequences. The hard part about parenting though is having a good understanding of where your child is at developmentally, and then figuring out which decisions are developmentally appropriate for them to be making for themselves.

</comment></comment></comment></comment></comment></comment><comment><USER19> Webster Stratton parenting courses may be useful. These are available by referral in the UK to some families, but importantly they're seen as so good that other parents pay to go through them.

There are probably books (I think there's a book called "wonder years" or similar).

Mostly it seems to be about relentless praise and attention for good behaviour, where "good" includes "not actively bad". Thos can include sticker charts and rewards, or "listening beans" (the child has a small pot which they decorate. You then give them a bean everytime they do somethin good or tehy listen well. When the pot is full they get a reward. You need to keep praising them for their positive behaviours - "look how many beans you've got. Great job! You've worked really hard for this."

You might also want to consider seeking a diagnosis for ADD or similar.

There's also "how to talk so kids will listen" which seems to get metioned in conversations like this.

(Sorry, on terrible monile at the moment so unable to provide links).

</comment><comment><USER20> He needs attention.

Reassure him that he still is your "Numero Uno" in every way. Spend some one on one time with him doing things he likes. Take him movies, parks or zoo etc alone.

Reestablish that "exclusive" relationship you once had with him. He feels that your original relationship is under threat after those two Johnny-come-lately arrived on the scene ... one after another!

Good luck.

<comment><USER20> Oh ... and ... apologise to him for your behaviour of having to tie him up the bedpost! That's bullying. Exactly what you are facing. Our kids learn by copying and imitating, not by being told. (My hard lesson learned with 3 boys)

<comment><AUTHOR> He actually thought it was fun. I tied him up with one of the play silks we have and a couple loose knots. Only took him a few minutes to work his way out of them but at least it diverted his attention and helped him calm down for a bit.

</comment></comment></comment><comment><AUTHOR> Thank you everyone that offered advice and encouragement on this. Here's a few of the top resources that were shared for anyone else in a similar situation:

[http://parenting.stackexchange.com/](http://parenting.stackexchange.com/)

[https://www.amazon.com/Unconditional-Parenting-Moving- Reward...](https://www.amazon.com/Unconditional-Parenting-Moving-Rewards- Punishments/dp/0743487486/)

[https://www.amazon.com/How-Talk-Kids-Will- Listen/dp/14516638...](https://www.amazon.com/How-Talk-Kids-Will- Listen/dp/1451663889/)

[https://www.amazon.com/Highly-Sensitive-Child-Children- Overw...](https://www.amazon.com/Highly-Sensitive-Child-Children- Overwhelms/dp/0767908724)

[https://www.amazon.com/No-Drama-Discipline-Whole-Brain- Nurtu...](https://www.amazon.com/No-Drama-Discipline-Whole-Brain-Nurture- Developing/dp/034554806X/)

[https://www.amazon.com/Whole-Brain-Child-Revolutionary- Strat...](https://www.amazon.com/Whole-Brain-Child-Revolutionary-Strategies- Developing/dp/0553386697/)

[https://www.amazon.com/Explosive-Child-Understanding- Frustra...](https://www.amazon.com/Explosive-Child-Understanding-Frustrated- Chronically/dp/0062270451)

[https://www.amazon.com/Simplicity-Parenting-Extraordinary- Ca...](https://www.amazon.com/Simplicity-Parenting-Extraordinary-Calmer- Happier/dp/0345507983/)

[https://www.amazon.com/1-2-3-Magic-Effective-Discipline- Chil...](https://www.amazon.com/1-2-3-Magic-Effective-Discipline- Children/dp/0963386190)

<comment><AUTHOR> [https://www.amazon.com/Siblings-Without-Rivalry-Children- Tog...](https://www.amazon.com/Siblings-Without-Rivalry-Children- Together/dp/0393342212/)

</comment></comment><comment><USER21> I'm pretty sure defiant children were not a 'thing' when it was still socially acceptable to use corporal punishment.

And I don't mean parents being sadists for the sake of it, but using it judiciously.

The lesson that resorting to violence results in even more violence thrown back at you and therefore violence is not something to start is a useful one.

Of course, this only works on people or animals with the mental faculties to understand this, so probably it's useless on children less than 6 years old.

<comment><USER22> You're "pretty sure" defiant children weren't a thing? Based on what exactly? You think kids just started being defiant in the last couple decades, and before that they were little angels?

Throwing around ignorant information without anything to back it up is typical, but maybe when the implication is that a person should physically abused his child you should hold off until you have more than your gut feeling.

<comment><AUTHOR> I don't think abuse was the reason kids were less defiant before.

In the old days they just had more space and time to explore things on their own, work out mini conflicts with other kids on their own, and basically learn the rules of life on their own.

It's really sad how little room there is for kids to do anything truly on their own these days. Once I've saved enough money I'm going to open an adventure land here on Oahu to give kids like my son a place to breathe and be their selves.

<comment><USER22> [http://rationalwiki.org/wiki/Good_old_days](http://rationalwiki.org/wiki/Good_old_days)

Show me some proof that anything is different.

</comment></comment></comment></comment><comment><USER23> When he gets angry, kick him out of the house to go play soccer, or climb a tree, or whatever.

If he breaks things in his room, let him, and don't buy new toys/furniture.

</comment><comment><USER24> A new take on this, at least for me, is that a child explodes when they don't have the skillset to deal with life. Try the book "The Explosive Child" by Ross W. Greene and see if it helps. If nothing else it's a very different viewpoint on the problem, and one that lends itself to compassion.

</comment><comment><USER25> Are you using a punishment model or a discipline model? Some bright kids have a strong sense of justice and will react really poorly to being punished. The difference is this:

When my kids did something my husband did not like, he would take away a video game or lock up their controllers to make them suffer. He did not give them back until a set time had passed, even if their behavior improved.

In contrast, I took away a game or the controllers if the games per se were the cause of the problem. If they were fighting over a particular game or if they were taking a "10 minute" break from doing school work that turned into 2 hours of gaming. I would let them have it back if they resolved their problem or finished their school work.

My kids were vey loyal to me. They resented their dad and lied to him and so forth. They were not at all cooperative with a punishment model.

I have a few posts on a private parenting blog I am trying to develop and may eventually publish publicly. If you are interested in getting an invitation and reading what is there, send me an email with the subject "Memoirs of a mom".

</comment><comment><USER26> My background: I'm the parent of an 11 year old boy with "highly verbal" autism spectrum disorder (think Sheldon Cooper from Big Bang Theory) and have made many connections with parents, children with all forms of special needs, and caregivers through peer groups, school interventions, etc.. He wasn't always verbal, that came with therapy.

A peer of his in school, I'll call him John, has a problem. To parents, his own and his friends', he's what one would politely describe as a terror. No respect for property or rights, no consideration for feelings, constant lashing out, and an almost masochistic "bring it, bitch" attitude to anyone who might suggest disciplinary action or consequences he might find unfavorable. He invites it.

He was diagnosed with _conduct disorder_. His parents' unpredictable methods of discipline, their lower income status compared to their peers, and lack of an "always home when I'm home" parent were significant factors in what developed into the behavior ultimately diagnosed as _conduct disorder_. At 7 years of age (3-4 years ago) he had already identified other kids who would support his behavior, even encourage it. There was even a time when substance abuse was considered, but his parents spied on him pretty hardcore (that didn't help, either, I might add, and it often won't) and determined that not to be the case.

I've followed this family for five years, and seen encouraging improvements since diagnosis last year. First, it qualified him as having a disability, so ADA kicks in and makes programs available to him in school, such as an IEP (individual education plan), disciplinary changes, and support staff/interventions (sometimes called "pull-outs", where he goes to a different classroom for part of his day). Second, a developmental pediatrician and pediatric psychiatrist worked with the family on a treatment program. One that, in his case, included prescription medication, and I mention that incidentally; I know many folks have problems with their child being given a prescription that changes their behavior or mental mode, but I don't want it to go unnoticed that, for many, they can indeed help. In John's case, it gave him enough of a "mental quiet" that the behavioral therapies at home and school would have a chance to reach his mind before his rage shut it out.

My strongest advice is: take him to a pediatric psychiatrist. ASAP. Even if you think he'll fake it when he's being tested. And be direct and honest when asked about his home environment. If the doctor doesn't have all the data, they can't help effectively, and it can only hurt your child's future to get the wrong therapy.

And please, if you or your wife need pharmaceutical help to be calm and clear- minded with your child, talk to a doctor. Your son's parents need to be calm and _consistent_ , even though that means more work for you. Calmly remove the things he damages. Do not be goaded into a physical response, it _does not work_. If you have to take shifts standing in his doorway to keep him in his room, it's far more effective than locking him in there.

Mom and dad need to be trusted again. Therapy _will_ help.

Hang in there.

Also: read more about it here: [http://www.aacap.org/AACAP/Families_and_Youth/Facts_for_Fami...](http://www.aacap.org/AACAP/Families_and_Youth/Facts_for_Families/FFF- Guide/Conduct-Disorder-033.aspx)

<comment><AUTHOR> "Bring it, bitch" is definitely his attitude at home. He loves wrestling and any other form of deep physical contact.

His teachers say he doesn't have any problems at school, which is comforting yet extremely frustrating at the same time since that means it's very much an environmental condition. And the environment he doesn't cope well with seems to be his younger sisters.

</comment></comment><comment><USER27> Put him in a muay-thai/kickboxing/mma gym. He'll get disciplined and less angry.</comment>


Uber: 3,045 Sexual Assaults Reported in U.S. Rides Last Year - <AUTHOR> https://www.nytimes.com/2019/12/05/technology/uber-sexual-assaults-murders-deaths-safety.html <comment><USER2> The majority of sexual assaults are not reported. The true number is likely 10,000+ sexual assaults based on ratios that are used for reporting rates.

* [https://www.psychologytoday.com/us/blog/the-compassion-chron...](https://www.psychologytoday.com/us/blog/the-compassion-chronicles/201809/stop-shaming-victims-sexual-assault-not-reporting)

</comment><comment><USER3> They can't put the percentage or denominator in the headline? Seems borderline click-baity to me. Even a percentage probably wouldn't cut it -- I can't tell from either whether it's lower or higher than I should expect. Obviously I hope for 0 sexual assaults, but it'd be nice if the headline communicated meaningful information

<comment><USER4> Trying to downplay sexual assaults as a small percentage is a way of trying to dismiss that it happens, and that it happens a lot.

<comment><USER5> But if the percentage is actually small then it doesn't happen a lot. Looking at the literal number of occurrences instead of the percentage just gives you a biased impression, because any number of assaults > 0 can _seem_ like a lot.

<comment><USER6> For comparison, it looks like the probability of a random passenger on a 737 MAX dying in an MCAS related accident was about 10 times the probability that a random passenger would report a sexual assault on their Uber ride.

<comment><USER7> They grounded the 737 MAXes because that probability of death was too high.

If the probability of assault in an Uber is within an order of magnitude, that suggests to me that it is reasonable to expect some additional scrutiny / regulation.

<comment><USER8> Maybe there should be government cameras in all the vehicles, and other sensors that can detect what is going on and provide it all directly to the NSA.

<comment><USER7> That seems a bit obscene! I'm sure there are much smaller / fairer measures that shouldn't be dismissed out of hand.

</comment></comment></comment></comment></comment></comment></comment><comment><USER9> Taxis if you commit assault you lose your 250k medallion hence you don't commit sexual assault. Uber driver, you switch careers or countries (happened to friend of friend, she got assaulted he fled).

<comment><USER10> But taxis are horrible in so many other ways. Either they are allowed to act in the way they do ("oops. My card reader isn't working") or the rules aren't enforced. The average Uber ride is miles better than a taxi ride and just as a matter of scale, the extremes will be worse.

<comment><USER11> If the card reader isn't working, that's their problem. Cab company policies are clear regarding payment methods. If the driver is looking for a cash fare, they can let the customer know before the ride starts. If they don't, they're SOL.

<comment><USER12> I think the comment is that even if you're willing to confront the driver, you're forced into an awkward social situation (the confrontation, yelling and anger, having them angrily "get the card reader worker").

Many people (myself included) would pay to avoid such nonsense, so the "cost" of a taxi is often much higher than the meter fare.

There's other factors: dangerous driving, refusal to take you to your destination and the following confrontation (also illegal, but happens often), etc.

All this also depends on where you are. Some cities have great taxis. I'm basing my opinion here on Toronto pre-Uber taxis.

</comment></comment></comment></comment><comment><USER13> They should provide the breakdown of accused specifically for Non-Consensual Sexual Penetration. They lump all sexual assault together and then break down by accused, which seems like they're trying to hide that it's the drivers who are doing the actual raping, and it's the backseat passengers who are trying to cop a feel during a drunken makeout session.

</comment><comment><USER14> Uber and Lyft seem to be engaged in a race to the bottom that's degrading rider experience as they struggle to bring costs and revenue into line.

It feels as if there's still a market opportunity for safe, clean, timely rides. Zoom did something similar for web conferencing, which at the time was regarded as a solved problem.

<comment><USER15> I see this comment everytime a post about ride hailing services pops up... but I can't figure out how it's relevant to this discussion this time.

The only word you mentioned that was relevant was safe... So are you suggesting that because they're fighting over costs with lyft, they pay drivers less which reduces reputable drivers and "poorer and more likely to rape" drivers join the app?

<comment><USER14> Yes, or more accurately less desirable drivers. My recent rides on Lyft and Uber have not been good. Either the cars were clapped out or the drivers were telling me how they could not make a living and were looking for other work.

</comment></comment></comment><comment><USER16> I find this interesting. 58 car related deaths from 1.3 billion rides. In the US you have about 100 car deaths per day. Let's assume 100m cars on the road each day, for 100 deaths for 200 million trips. Uber could be an order of magnitude safer.

<comment><USER17> Wouldn't most Uber trips be on roads with lower speed limits since they're almost entirely intra-urban? In that case it'd make sense that they're safer than national average.

</comment></comment><comment><USER18> I suggest that women be allowed to specify that they want a female Uber driver. Maybe some women would accept a male driver during the day time and in safe areas but require a female driver at night and in less safe areas.

<comment><USER19> A few problems with that:

* Couldn't a man identify as female, and then be in the perfect situation to find women in "less safe areas" who feel vulnerable?

* This would also allow men to request female drivers, are you sure that's a good thing?

* Only 14% of Uber drivers are female, so you might be waiting awhile for that ride...

<comment><USER20> > This would also allow men to request female drivers, are you sure that's a > good thing?

The OP explicitly mentioned women-asking-for-female drivers, and not implying the inverse. That type of program is not uncommon for safety.

<comment><USER19> I don't remember Uber ever asking for my gender, just a phone number. How would they enforce that?

<comment><USER20> Given increased political scrutiny, I wouldn't be surprised if Uber/Lyft was compelled to do more rider-side verification in the future.

<comment><USER21> What political scrutiny of Uber riders are you referring to?

<comment><USER22> Not political scrutiny of the riders, but increased scrutiny of the companies themselves and their practices.

</comment></comment></comment></comment></comment></comment></comment><comment><USER23> I hope we can regulate this somehow!

</comment><comment><USER24> Let's suppose there were 1000 rapes in NYC cabs in a year because NYPD doesn't keep good stats for various political, economic, social and tourism concerns. And ~2 billion rides/year.

Uber posted their stats: 3100 rapes/year. Let's call it 5500/year or 15/day.

NYC cabs: ~2,000,000 rides/rape

Uber: ~140,000 rides/rape

On the face of it, on average, NYC cabs seem over an order-of-magnitude safer than Uber.

</comment><comment><USER25> Was that just from the former CEO?</comment>


MALD-X Advanced Air Launched Decoy Test Is a Bigger Deal Than It Sounds - <AUTHOR> http://www.thedrive.com/the-war-zone/23126/recent-mald-x-advanced-air-launched-decoy-test-is-a-much-bigger-deal-than-it-sounds-like <comment><USER2> This is aimed purely at Russia (not implying there is anything wrong with that). The question is whether or not Russia is able to differentiate between decoys and real jets. At the very least, this will slow down the decision making process or force a trade of missile for decoy. At $350,000 a pop, that's a fairly expensive trade, though if it makes a hole in an air defense net, it makes sense.

Russia has proven unable to back up claims of its S-300/S-400 systems being able to intercept even the slowest of US cruise missiles (Tomawhawks are embarrassingly slow and high), so in practice, this probably WILL really confuse Russian systems.

<comment><USER3> I think it is aimed at anywhere in the world where we would need to put a strike package into a non-permissive environment.

People are catching on quickly to the fact that if they can keep our air assets out - they can keep America from projecting power. This has led to the proliferation of layered air-defense systems, etc. and the concept of "Anti Access/Area Denial".

</comment></comment><comment><USER4> > Considering this new MALD is networked, swarming and cooperative tactics > among a group of MALD-Xs/MALD-Ns could work to achieve their full potential > as a team. This includes classifying, prioritizing, and delegating jamming > and decoy duties on the fly during their relatively short lifespan. By > working together autonomously they can act at speeds that can break the > enemy's decision cycle and cripple their ability to respond fast enough to > impact what's going on in the battle-space.

It's often lamented that the best minds of our generation are spending their careers optimizing clicks on cat pictures.

However, I'm not sure that using advanced AI to kill people is much better. And given that this particular project is actually being publicized, it gives me the chills to speculate on what kinds of advanced AI is being developed in black projects.

I mean, imagine a pack of Boston Dynamics' agile robots running through the streets - equipped with a facial recognition database and a weapons platform.

[https://www.youtube.com/watch?v=3OKZ_n8QW4w](https://www.youtube.com/watch?v=3OKZ_n8QW4w)

<comment><USER5> _I 'm not sure that using advanced AI to kill people is much better_

bright minds worked in the US and other nuclear programs, included soviet ones, to keep geopolitical balance with minimum deaths. And with AI you want the brightest minds working on it: it doesn't matter how compassionate and good willed you are, there's always going to be another state actor willing to use it against you. And you can bet they'll employ their brightest. Assuming anything else is naive and suicidal.

</comment></comment><comment><USER6> The article says they have a range of 500Miles and a flight time of 1hr - that's 500M/hr.

Do current radar systems track a plane with enough frequency/detail to observe an aircrafts performance (turn rate, climb, speed, etc)?

I ask, because they claim to be matching an aircrafts electronic signature, which is fine. But if they're not also matching their performance envelope that seems like an easy way to identify the decoys. Though it still might take enough time to be a useful tool.

<comment><USER7> It's said that the US AESA radar on the F-22 can perform aircraft identification by counting the spin rate and number of blades on the opposing aircraft's compressor.

</comment></comment><comment><USER8> > So basically, when you talk about 'day one' air combat operations against a > peer-state adversary

Is that a realistic threat? A peer-state adversary? Is it a legit concern the USA will need to enter into air combat against a country?

<comment><USER5> you want to make sure anyone thinks it would be suicidal to challenge you in order to call it deterrance

e.g. if the US Navy wasn't vastly superior, shipping routes would be constantly threatened

if you get to the point of being at actual peer level, you're past done. Look at China: they're still not there, and yet they're aggressively taking positions in the South China sea

<comment><USER9> This isn't to challenge Russia or China, that war will be fought at least initially from behind a computer screen and if they do their job right the other side will take some huge blows where it hurts before the first bullet is fired - civilian life: utilities companies, internet infrastructure, communications & satellites, etc. A soldier is trained to have a harder life. How about your average Joes?

This is aimed squarely at selling to allies and at projecting power in some random corner of the world that couldn't respond in kind even if they wanted to.

All the fancy tech all sides are parading is mostly for propaganda reasons. How useful is a drone that relies on GPS signals that to this day are easily spoofed or jammed? How useful is an ultra-expensive stealth fighter that's not invisible to enemy radar?

A war between peer-countries is not good for the wallet. Unlike small wars against enemies that are more likely to fling rocks at you [0]. Then you get the chance to equip your (also rock flinging) local allies with your tech, assist them in fighting, etc. For a price of course.

[0] relative power compared to big game military.

<comment><USER4> > How useful is a drone that relies on GPS signals that to this day are easily > spoofed or jammed?

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

<comment><USER9> And here I was talking about precision warfare... :) Guess an accumulated error in the Kilometers range shouldn't be an issue.

Military drones have already been hijacked using GPS spoofing so I'll be skeptic regarding the guidance system being bullet proof thanks to INS.

<comment><USER4> Good point. And I thought I was being clever! ;-)

</comment></comment></comment></comment></comment></comment><comment><USER10> If the US is developing this as an offensive weapon, they have to be thinking of how they would defend against such tactics. Anyone know? Or does the US just trust their radar to be more advanced to correctly identify any decoy?

<comment><USER2> First of all, this doesn't apply to the US in the way that it applies to other countries. The US has over-whelming air superiority. It's biggest concern are Brahmos II missiles taking out one of its 9 carrier battle groups.

The way the US handles this threat is having an AWACS plane on each carrier providing over-the-horizon radar coverage and being able to guide its hypersonic anti-missile missiles to the approaching missiles in time. That, or getting its F/A-18Es in the air off of the carrier to intercept any incoming aircraft (not really a thing anymore).

</comment></comment><comment><USER11> Seems like this would be defeatable by radar that sends out pings with an unpredictable characteristic that the decoy won't be able to mimic with a stronger return signal.

<comment><USER12> The decoy has its own radar signature, its really small. It can mimic a larger object by receiving, amplifying, and then transmitting the signal the enemy radar signal. Smaller objects can get closer to radar before they are detected so the decoy projects an image of a larger aircraft to hide within. The radar sees the plane and starts tracking it. The decoy can likely use some fancy signal processing to move the image of the object around and even project multiple objects. Add more decoys and you can overload the object tracking of the radar station. The radar might be in range to see the actual decoy at some point but ideally the radar is seeing a bunch of phantom planes and missiles at this point so the decoy just blends in with the swarm.

Radar already does something similar to what you are suggesting, there are spread spectrum techniques that are much more jam/spoof-proof than just a constant ping or even a linear frequency sweep. You pseudo-randomly hop frequencies to avoid having someone broadcast a really strong signal at one frequency and to have someone be able to track your pattern of hopping. The pattern is generated similar to crypto, you start with a seed (the plaintext) and encrypt it with a key to get the pattern that you hop with.

</comment></comment><comment><USER13> Is there an equivalent of "Signature Augmentation System" that targets LIDAR sensors?</comment>


JoinJS – An Alternative to Complex ORMs - <AUTHOR> https://archfirst.org/joinjs-an-alternative-to-complex-orms/

<comment><USER2> Thanks for posting, nauman! If any of you are using Node.js and relational databases, you might have tried ORMs such as Sequelize, Bookshelf or Waterline. In my experience, these ORMs do not produce efficient queries required for production applications.

JoinJS gives you direct control over database interactions and maps query results easily to JavaScript objects. Would love to hear your thoughts and am happy to answer any questions here.

<comment><AUTHOR> no worries find it interesting, want to know how people going to use it</comment></comment>


Immersion: a people-centric view of your email life - <AUTHOR> https://immersion.media.mit.edu/ <comment><USER2> This is from 2013.</comment>


Draft of Trump's Executive Order on Social Media Companies - <AUTHOR> https://twitter.com/byjacobward/status/1265864271138828289 <comment><USER2> Related discussion of the Reuters story [https://news.ycombinator.com/item?id=23334830](https://news.ycombinator.com/item?id=23334830)</comment>


A Scientist Predicts the Future - <AUTHOR> http://www.nytimes.com/2013/11/28/opinion/kaku-a-scientist-predicts-the-future.html?pagewanted=all&_r=0

<comment><USER3> When you don't specify how far ahead in the future you are projecting these things to happen, technological innovations like "Robots Will Be Commonplace" are quite easy to predict. Especially when he appears to be lumping much of AI into the "robots" category.

I would much rather see a long form of this where he further explains why he makes these predictions and when he sees them happening. I'll readily admit I don't know what sells for the times but this opinion piece makes me feel like I just wasted time (I guess I probably shouldn't have commented on it as well to exacerbate the problem).

</comment><comment><USER4>
        10. Intellectual Capitalism Will Replace Commodity Capitalism

So he's predicting a future where we "trade in people"? What of those who are not born into intellectual prowess. Will the divide become even larger than it is today? That doesn't fit in with the tone of the article, which is nauseatingly utopian.

</comment><comment><USER5> I pessimistically see a much worse future. A kind of cross between:

\- Orwell's 1984

\- Aldus Huxley's Brave New World

\- Philip K. Dick's Minority Report

\- Andrew Niccol's Gattica

<comment><USER6> I see a much more mundane dystopia, where almost no progress happens anymore, as the US Congress clearly intends.

<comment><USER7> This is Huxley's "Brave New World", full of make work programs, opiates for the people, and no change.

<comment><USER6> I would love a make work program that paid people at least subsistence.

</comment></comment></comment></comment><comment><USER8> This author isn't grounded in reality of how systems currently work - <USER2> trapped in purely theoretical thinking.

"Perfect capitalism" can't exist because for-profit businesses create and maintain the frictions mentioned that would be greatly reduced.

There's a whole social/sociology and psychology of human behaviour layer missing from these thoughts.

</comment><comment><USER9> #8 about aging repair is basically what's in Thor. Godin said they are not God but just living being that can last up to 5000 years. Once in awhile, Godin has to go into hyper sleep or something like that to repair his cells / DNA (I assume).

They are just more advance version of Wolverine who can live hundreds of years.

</comment><comment><USER10> technology will overcome all problems, solve injustice and everyone will be happy. sure.

no mention of climate change, ever-increasing debts, failing antibiotics or social problems because of differences between people who can buy these "cybermedicine" / body-parts-replacements and those who cannot.</comment>


What pythonistas think of ruby - <AUTHOR> http://blog.pluralsight.com/what-pythonistas-think-of-ruby

<comment><USER2> First, this is from 2010 and is a repost to HN.

Second, this site's favicon made me think I was redirected to a YouTube link.

Third, there are a ton of us who do both Python and Ruby programming. This whole us vs. them implication is pretty annoying.

Fourth, Grosenbach states:

      I'm not sure if the shock was from hearing someone ... or
      from learning that someone considers Larry Wall to be a
      hero.

Grosenbach is a really nice guy, so I'm curious as to how he meant that Larry Wall snipe.

Larry is also a very nice guy in my experience and is fully worthy of being considered a "hero" in the technical sense.

While Perl is considered out of style, it was _the_ scripting language throughout most of the 90s and is still in use as a glue language today. It's influence is pretty vast.

<comment><AUTHOR> I agree with you on several things:

[1] Actually I am a Rubyist and a Pythonista at the same time. I did not see the original post on the forum, so I just posted this one

[2] I am not sure if the favicon has anything to do with YouTube because I see the colours are slightly different. However, I may not argue for or against because it is of less significance to me

[3] "If there is still a high priesthood among programmers, it must be those few who know how to do this [i.e. develop a programming language]." \- (Herbert Schildt, C - The Complete Reference). I think there is a big difference between the language and the creator. We may not like all languages (because of our personal preferences) but we need to respect the creators because just to create a programming language is not an easy job. So I do not think it is good to insult, exasperate, degrade or demean a creator of a language. Larry Wall is a good man just like Matz (Ruby), Dennis Ritchie (C), James Gosling (Java), Ken Thompson (B and Go), Rasmus Lerdorf (PHP), etc

</comment></comment><comment><USER3> I think generalizing a group of people as pythonistas is murky.</comment>


'I am utterly disgusted': Legendary animator Hayao Miyazaki takes AI down a peg - <AUTHOR> http://www.recode.net/2016/12/11/13908296/hayao-miyazaki-artificial-intelligence-viral-video <comment><USER2> I think the article has mischaracterised Hayao's response to this. His main objection is that it's "creepy" and doesn't respect the pain and suffering of those with mobility disabilities.

While it's important that we respect and include those people, it's also true that had a human animator produced the same work, we should see the same response. The article's, or Hayao's response is flawed therefore in 2 ways:

1) That this is something that AI / animation technology has brought to us, truly, and

2) Just because it may not be well received by individuals with disabilities (by no means would this be rejected by all or maybe even most in that situation), that it is not effective animation (though I'm not judging its effectiveness either way, I'm just saying that this alone is a poor argument).

<comment><USER3> >While it's important that we respect and include those people, it's also true that had a human animator produced the same work, we should see the same response.

I don't think so. I think part of his point is that having humans do the animation means that the creators have empathy for the less fortunate and thus won't use them as cheap creepiness the way a neural network might if it was just solving for certain constraints.

Miyazaki's movies are often about the conflict between the human spirit and technology, and as far as high-tech goes he's not really a booster. High tech in his films is frequently cold and inhuman in creepy ways, and seeing a demo like this is probably confirmation of this theme.

<comment><USER4> I feel like this is the point that's being lost. It's not that it's AI, it could have been a paint brush, but whatever the tool there needs to be a connection between the artist and their works. The current state of AI largely erases that connection. That he mentions we're losing confidence in ourselves I feel backs this up, that we're engaged in the act of replacing ourselves from the design of the world with not enough thought in how we're negotiating our future selves.

The tech crowd are looking at this as an old artist who doesn't like future tools when I think it's meant to be deeper and more a critique on how we use our tools. An animator in touch with their disabled friend may come to tears in their work and create moments that connect with the audience on a deeper level because of it while AI will only pass over those moments in microseconds.

<comment><USER3> nailed it. spot on.

</comment></comment></comment></comment><comment><USER5> He doesn't "take down AI" a peg. He is just being really rude to the group members who came up with a dull excuse for a mostly failed project.

Not that they did a bad job; the project just seems way to ambitious. Was someone really expecting to see a humanlike walking motion from such a project? I would expect big companies to have some troubles with such things.

<comment><USER6> What are you talking about? Evolutionary algos in walking animations have been used far and wide. These guys just took out the rules for using a upright stance.

And criticizing something like that, as unsubstantial as he did, is just fear of new tech. Those zombie movements are great.

</comment></comment><comment><USER7> If the english subtitles are accurate, to me it seemed he was disgusted by the movements of the character itself, and the motivation for creating them, rather than the specific AI means by which they were created.

</comment><comment><USER8> I can't judge this without understanding the context. Was his company paying for this work? Was he invited for a presentation to a university?

Anyone who knows Miyazaki's films would have known he wouldn't like it. So if they made it FOR him they deserve the reprimanding they got. But if he was just dropping by for a casual demo it then his response was uncalled for.

Also the work was pretty bad. I wouldn't be surprised if they just made up the zombie excuse after they saw how horrible the result was.

</comment><comment><USER9> Imagine if you came to Jean Luc Picard and said "Captain, we found a way to replace exploration with the holodeck! And the best part is, none of those boring nebulas or silly aliens -- we can generate endless grotesques unlike anything you've ever seen!" I believe you'd be asked to leave the ship.

Miyazaki is a humanist. Why would he be interested in simulated zombies?

<comment><USER10> A Humanist is someone adverse to zombies?

</comment></comment><comment><USER11> At the risk of oversimplifying:

Why would anyone expect Hayao Miyazaki to be interested in programatically generated walking algorithms for 3d zombies? That seems so far outside of the realm of anything that Miyazaki has worked on that expecting meaningful feedback from him seems rather foolish.

<comment><USER12> Next up they'll be asking Monica Lewinsky and Bono what they think of it.

</comment></comment><comment><USER6> If you get such a emotional reaction out of a animator legend, on a cliche as zombies- that is success.

<comment><USER8> Depends. If he was expecting something else, a negative emotional reaction is easy to produce.

Like if you were unveiling the iPhone prototype to Steve Jobs and you pull off the handkerchief and there's a turd lying there.

</comment></comment><comment><USER13> He found this _specific instance_ of AI creepy and disgusting. Seems like a stretch (or clickbait) to interpret this as an attack on AI in general.

</comment><comment><USER14> As someone who's seen almost all Ghibli movies, I can tell you that Miyazaki is not averse to the grotesque. Most who have seen Spirited Away probably remember it as a wonderful and positive film, but when it was showed at my younger sister's 10th birthday party, most of the children were terrified, based purely on the animated monsters.

There are creatures more disturbing in his movies than that zombie. The difference is the deep human empathy that goes into their creation.

IIRC, almost every frame in Ghibli movies is drawn by hand, so to see an AI created zombie that (in his view) mimics disabilities suffered by his friend in order to achieve a creepy effect, how could he not find it disgusting?

<comment><USER15> I think it's worth noting that mythology featuring creatures similar to those depicted in Spirited Away is hugely prevalent in Japanese culture. Children grow up with stories and images of youkai, so I imagine that when they watch Spirited Away, there is an element of familiarity and the feeling of disgust is lessened.

Zombies, on the other hand, aren't as integral a part of Japanese culture, and are mostly a western influence. Since we tend to fear and find disturbing things we aren't familiar with, I can imagine zombies actually being more disturbing to a Japanese person than youkai-like creatures.

Of course, I'm sure the fact the zombies reminded Miyazaki of his friend played a big part in his reaction, too.

</comment></comment><comment><USER16> They seem to have evoked a strong emotional response in him. Just not an emotional response he typically seeks to envoke in his works - but a lot of artists who do enjoy making creepy stuff would find it delightful.

</comment><comment><USER17> It seems to me that there are several levels of misunderstanding here.

And the most interesting part is when Suzuki asks "So, what is your goal?", and the engineer answers "Well, we would like to build a machine that can draw pictures like humans do.".

This is certainly a commendable goal.

Then we cut to another sequence, where Miyazaki is drawing, and reflecting: "I feel like we are nearing the end of times. We humans are losing faith in ourselves..."

It may or may not be so, but this is an interesting point to discuss. I can certainly understand how it could feel like it, but you'd have to study the motive for wanting to "replace" humans by machines, or just have machine perform like humans.

One key misunderstanding in this exchange, and foremost on the part of the journalists reporting it (damn dumb journalists!), is that "This is a presentation of an artificial intelligence model which learned certain movements."

Obviously, they didn't teach it to move, they had a certain model of the body, and let the AI loose, trying to learn by itself how to move. This is a classical application of genetic programming. See how some of those creatures look "creepy" too:

[https://www.youtube.com/watch?v=JBgG_VSP7f8](https://www.youtube.com/watch?v=JBgG_VSP7f8) [https://www.youtube.com/watch?v=HgWQ- gPIvt4](https://www.youtube.com/watch?v=HgWQ-gPIvt4) [https://www.youtube.com/watch?v=CXTZHHQ7ZiQ](https://www.youtube.com/watch?v=CXTZHHQ7ZiQ) [https://www.youtube.com/watch?v=yci5FuI1ovk](https://www.youtube.com/watch?v=yci5FuI1ovk)

They obtained some creepy result, added a creepy texture and made it into a quick & dirty demo for "animating zombies".

Clearly, the people who assisted to this demo didn't understand what it was.

And the answer of the artist was the worst. Imagine assisting to Wright brothers' demo, and coming with: "I have a friend who is blind, this doesn't respect the pain and the suffering of those with vision disabilities who will never be able to pilot a plane." What a tool!

<comment><USER18> _And the most interesting part is when Suzuki asks "So, what is your goal?", and the engineer answers "Well, we would like to build a machine that can draw pictures like humans do.".

This is certainly a commendable goal._

Why? It's not like there is some shortage of human artists. Indeed, the main problem for artists is the difficulty of making a living at it. As a painter I feel quite depressed when I see a friend on Facebook or somesuch upload an attractive new piece of artwork that turns out to be a new Snapchat filter.

</comment></comment><comment><USER19> old man yells at cloud

</comment><comment><USER20> Looks like they succeeded at making an accurate zombie. The problem is with Hayao Miyazaki ethos that ties together artists and their creations. Certainly we would have no villains if this were taken at face value?</comment>


AAPL as mobile as a service company - <AUTHOR> https://twitter.com/biohazard3737/status/1082791071749296128 <comment><USER2> Could happen if the price were right. I see no reason why Apple couldn't offer network service as an mnvo. The original bell telephone company survived because it leased its phones.</comment>


Quinn – A web framework designed for things to come - <AUTHOR> http://quinnjs.com/

<comment><USER2> It's a rite of passage to create a crappy, half baked web framework. It's a great thing that every web developer should do so that they understand, end to end, the tensions facing the creators of web frameworks, the tradeoffs between the various attempts to balance purity with convenience, and how much 'magic' you want a framework to perform vs how much should be completely explicit.

However, nobody should ever use these frameworks, there are probably 5000 of them floating around out there in github, and beyond an exercise in pedagogy they are mostly half broken and stupid.

So to the author of Quinn: don't let this get you down, stay excited, but realize that it's possible that you can't just swoop in and do something great on your first try. OTOH, node.js' ecosystem is so amateurish and shitty that maybe you actually could.

<comment><USER3> You can call it amateurish and shitty all you want, but I'll take Express (on Node) over Flask or Tornado (on Python) any day.

<comment><USER2> Well, to be fair, Flask is kind of crappy and does anyone even use Tornado anymore?

I always just set up a project myself using Werkzeug, in the era of WSGI, almost all of the heavy lifting for web apps is done automatically and outside of your application anyway.

<comment><USER4> This is the first time I've seen Flask being called crappy. Do you mind elaborate why?

<comment><USER5> Because it's not written in javascript, obviously

</comment></comment></comment></comment></comment><comment><USER6> Reminds me of WSGI in Python – which is to say, the simplicity of functions that take requests and return responses, and then all your composition techniques are regular programming techniques. (With Promises added into the mix of course, but then you have .then() chaining with similar effect.)

It doesn't seem like a huge deal, but it's so much more convenient, makes it easier to think about the code, modify and rewrite values, all the normal programmy stuff people like to do in programs with values, instead of objects and actions. And yeah, if you use websockets or HTTP/2 or some other low-level stuff then it's going to break down, but there's only a couple of those and they should each just get their own separate layer.

</comment><comment><USER7> "It achieves breathtaking performance, made possible by the almost complete absence of features." While pithy, I'm not really sure that's the best way of selling your product.

<comment><USER8> Not really trying to sell it. It's a playground / thought experiment and not something I would propose someone use in production. Thus also all the links to other frameworks.

</comment></comment><comment><USER8> As you might have guessed by the missing/broken links, the website is still a WIP.

</comment><comment><USER9> > Quinn was created to address the utter lack of small, elegant web frameworks > in the node ecosystem.

Uhhh, that's because all those frameworks linked are designed to get you up and running with almost everything you need quickly, not just handling routing and leave you setting up boilerplate.

<comment><USER8> Yes, and if you want to seriously build a product, each and every one of those would be a better fit than Quinn. I'm saying that as the author of Quinn. It's a bunch of thought experiments, not a production-ready piece of software.

<comment><USER10> You should make it more clear. By default, when we see a page like that, we assume that someone is putting it up to use it.

<comment><USER8> Definitely a valid point. I updated the wording a bit already. It was definitely not meant for a larger audience in its current form.

</comment></comment></comment></comment><comment><USER11> On an unrelated note, do arrow functions inherit the parent context's `this` and `arguments` correctly in Node or io.js now?

<comment><USER12> They explicitly do that in ES6:

[https://developer.mozilla.org/en- US/docs/Web/JavaScript/Refe...](https://developer.mozilla.org/en- US/docs/Web/JavaScript/Reference/Functions/Arrow_functions)

<comment><USER11> Right, but implementation hadn't caught up to spec since I last checked.

<comment><USER12> It's natively supported in typescript and iojs, and babel (prev. 6to5) + other libs enable it in browsers.

</comment></comment></comment></comment><comment><USER13> Title attribute of the massive image on the top of the page

"Huge logo to hide any actual information"

</comment><comment><USER14> I'm not convinced we need more JavaScript frame works also FYI the site loads very slowly on my iPhone 6+, Australia.

<comment><USER15> While in general it's important that sites load well on mobile, I'm not sure that's a valid critique for a developer tools site where most users will have at least a well-powered laptop with a large screen. I'm sure you're familiar with that old saw about the correlation between screen size and productivity.

</comment></comment><comment><USER16> > Instead of taking the response as a second argument, the dispatch function > is expected to return the response... The moment the function returns, both > the status code and all headers are known.

I highly doubt this convention will work. You need to be able to return errors or DB information in the response code and headers, which would be impossible since Node is nonblocking. Even something as basic as storing session information in Redis suddenly becomes impossible. This seems like it gives a very minor benefit and causes a whole lot of problems.

<comment><USER17> That's why quinn uses async/await</comment></comment>


Employ Engineers, Not Librarians. Get Serious about Documentation - <AUTHOR> http://www.databoost.org/2013/07/24/employ-engineers-not-librarians/

<comment><AUTHOR> I am really interested in good ways to influence change a fast paced companies who can't seem to take a step back and look at the money actually wasted.</comment>


Simple Proof to the Container with Most Water Problem - <AUTHOR> https://leimao.github.io/blog/Proof-Container-With-Most-Water-Problem/ <comment><USER2> That dude's bio is... brutal.

"I was a Ph.D. candidate in the Department of Biochemistry at Duke University, working on DNA repair mechanisms. There, after spending almost four years, I systematically proved that most of the projects, theories and guidance from the advisor, which I was forced to do and obey, were wrong. To me, a sound Ph.D. degree or research position job title does not tell anything about the person's capability of solving a problem and whether the person is a true scientist or not. I have already proved that I am better than most of the people there. In 2016, I decided to leave Duke University, with my own glory, without a Ph.D. degree."

[https://leimao.github.io/cv/](https://leimao.github.io/cv/)

<comment><USER3> What he's describing is perfectly plausible. If you don't have a strong enough relationship with your department chair and committee to push back or are dependent on your advisor for funding the eject button is best.

<comment><USER4> Not sure if laying final judgment down in your cv really helps anyone. I don't know what goal it achieves. Write that letter to the department head in question and set the story straight. He's not reading your CV.

<comment><USER5> CV is also known as curriculum vitae, which (very) roughly translates to biography (as "events of life"). Following that and not a learned format I'd argue that all events that influenced one's professional career are welcome to be mentioned

<comment><USER6> Definitely not. You're degrees, publications, and jobs but not personal anecdotes. Except for goals and research or teaching philosophy.

</comment></comment></comment></comment></comment><comment><USER7> The official leetcode endorsed proof is quite simple: [https://leetcode.com/problems/container-with-most- water/disc...](https://leetcode.com/problems/container-with-most- water/discuss/6089/Anyone-who-has-a-O\(N\)-algorithm/7268)

It just doesn't bother with the counting argument that OP makes.

Also, the largest cross section of a cube is a rectangle of size √2, not a hexagon (3/4 √3). The largest regular polygon cross section is a hexagon.

[http://mathworld.wolfram.com/Cube.html](http://mathworld.wolfram.com/Cube.html)

</comment><comment><USER8> I am not a mathematician, but the problem seems easier to intuit. Like a lot of math problems, a formal proof is annoying but I definitely think a regular joe can convince himself why this works.

Start at i,j with heights h_i < h_j. Then we know that if i is involved in the solution, it must be paired with j.

We know this because if it's paired with any other point, the other point is either: a. shorter than h_i, which means it's shorter than h_j. And since it's also closer to i than j is, the area is smaller. b. equal or taller than h_i. But this will never make a larger area since the height will be limited by h_i, but the distance smaller than the distance from i to j.

So we can stop considering i as part of the solution space.

Of course that doesnt make it a good interview question. It relies on a brilliant stroke of insight, rather than relying on established data structures or algorithms.

<comment><USER9> I think it's much more clear if you start by trying to apply the constraint to the brute force algorithm.

The water container area is the distance the two sides are apart (width), by the height of the shorter side [therefore, the longer side acts to mimic it].

Doing brute force on array $[n_1 n_2 ... n_k]$;

You'd naturally start at $n_1$ and calculate volume $V(n_1, n_k)$ and work your way inwards calculating each volume. However, if at any point $n_1$ is the shorter side, then the secondary side $n_j$ now mimics $n_1$ in height; and therefore, any new side closer to $n_1$ cannot increase the height of the container (but would decrease the width, and therefore area).

Then you'd continue the same with $n_2$, breaking iteration when $n_2$ becomes the shorter side or if $n_2$ cannot develop a greater area than $n_1$ did (either n_1 > n_2 or oldArea > n_2 * width).

etc.

</comment></comment><comment><USER10> Nitpick about the leetcode description of the problem:

[https://leetcode.com/problems/container-with-most- water/desc...](https://leetcode.com/problems/container-with-most- water/description/)

The way it's written, the walls are uniformly spaced — located at their corresponding integers in the height array.

But the picture shows them as non-uniformly spaced: the wall to the right of the first red has a bigger separation than all the others.

</comment><comment><USER11> Why is the container not the one contained between the lines of height 8, instead of the line 7 height?

Either "walls" are porous or they aren't.

<comment><USER12> Because they're only at a distance of 5 from each other.

7x7 > 8x5.

</comment></comment><comment><USER13> I actually looked through a few LeetCode problems a couple months back and had a brief panic that I found tricky/nonintuitive to formally prove from first principles problems that were apparently "easy" or "trivial" to just intuit (as LeetCode commenters tend to characterize, anyway). I was never satisfied with people's "oh, just do xyz and it makes sense" \- I just assumed I was dumb... Still not sure what to make of this - I'm not the only one, I guess... ?

<comment><USER14> If you've ever checked out "Cracking the Coding Interview", you'll see there are many "algorithmic tricks" people can use to quickly improve performance while performing operations. An example from this problem, the author uses "a two pointer approach" to inch the head and tail pointers closer to one another, to cover all pertinent combinations and reduce run time. There are all kinds of little idioms, and many people that would take the time to comment on LeetCode forums are likely well versed in them.

</comment></comment><comment><USER15> Is this the kind of thing they are asking in interviews these days? I guess it is nice that this author can prove the correctness of their solution, but what's up with that code? Why is what would otherwise be a perfectly good free function instead a member function of a class with no other functions? Why instead of the usual C++ style of a function taking start and end iterators as arguments does this function take a mutable ref to vector<int>? Are these "leetcode" idioms? Does this site just exist to poison the minds of young developers?

<comment><USER7> It's an algorithm problem, not a C++ problem. Also, iterators prevent random access. You can always get iterators from a vector if you need them. And mutability is provided for convenience and because const doesn't matter in this situation.

<comment><USER16> Perhaps your not aware of C++ random_access iterators? You can indeed do random access with iterators and this functionality is integral to many standard library algorithms.

[http://www.cplusplus.com/reference/iterator/RandomAccessIter...](http://www.cplusplus.com/reference/iterator/RandomAccessIterator/)</comment></comment></comment>