INSERT or UPDATE in django's save() method - <AUTHOR> http://tech.karolzielinski.com/insert-or-update-in-djangos-save-method <comment><USER2> I find Django to be very inefficient in how it handles INSERT vs. UPDATE; you're better off specifing force_insert or force_update in the call to save() to avoid the extra SELECT it runs, since you almost always know whether the object you're saving is new or should be updated.

<comment><USER3> But only in the cases where it actually matters which given normal DB usage patterns for most sites is often nowhere. No point in making things more complicated when it's not needed!

</comment></comment><comment><USER4> Why doesn't Django try to do an UPDATE using the non-NULL primary key and look at the number of updated rows (which is returned by all the SQL databases I know) and if it's zero only then do an INSERT? This way it would only have to do two queries for inserts and still remain idiot-safe. An UPDATE using the primary key that can't find any rows consumes the same amount of resources as a SELECT.

(This approach would cause problems with funny black magic triggers but funny black magic triggers cause problems anyway)

</comment><comment><USER5> <http://code.djangoproject.com/ticket/9841>

It's been reported before and they consciously chose the current behavior. I don't agree with their decision, but it is something they're aware of.

EDIT: There is a way to subclass models.Model and not have it be an abstract or real model (I don't remember at the moment) and you could, in that subclass, do a force_insert or force_update based on the PK status so that everything in your project inheriting from that subclass would have that behavior.

basically:

      def save(self, *args, **kwargs):
          if self.pk:
              kwargs['force_update'] = True
              kwargs['force_insert'] = False
          else:
              kwargs['force_insert'] = True
              kwargs['force_update'] = False
          super(MyModelBase, self).save(*args, **kwargs)

So, one can modify that behavior if they want to without having to patch too much - maybe someone can comment on subclassing models.Model while not having Django consider it a model (I think I got it from the Pro Django book if someone has it available).

EDIT2: modified the code to make sure that force_insert and force_update couldn't both be True.

<comment><USER3> Why wouldn't you just make the it an abstract base model without any fields? If that's not what you want though you should be able to get that behavior using multiple inheritance:

        class AlwaysUpdate(object):
          def save(self, *args, **kwargs):
              if self.pk:
                  kwargs['force_update'] = True
                  kwargs['force_insert'] = False
              else:
                  kwargs['force_insert'] = True
                  kwargs['force_update'] = False
              return super(AlwaysUpdate, self).save(*args, **kwargs)

        class MyModel(AlwaysUpdate, models.Model):
          pass # model def here

</comment></comment><comment><USER3> This code will cause problems with some parts of Django. I forget where, but I have encountered problems writing code like this before because sometimes the save method gets called by things which expect it to take its optional parameters. This is a more robust (although certainly uglier) version:

        def save(self, *args, **kwargs):
          if not self.pk:
            pass # new object
          else:
            pass # old object
          return super(MyObject, self).save(*args, **kwargs)</comment>


Tell HN: Ongoing issue with EC2 - <AUTHOR>

I run a web app monitoring service and I aggregate data by hosting vendor. For the past hour or so, most of the 71 sites hosted by EC2 that I'm monitoring are showing increased response times. Any ideas as to why?
https://www.blamestella.com/vendor/ec2/report
There's no information about it on Amazon's status page (http://status.aws.amazon.com/). To me this really shows how important public monitoring is. <comment><USER2> Welcome to "The Cloud!"

Amazon owns your business, you don't. Seriously, I'm not joking. This is why I still operate over 100 servers in a data center.

<comment><USER3> And your data center network or transit provider couldn't suffer latency problems?

The real difference is that in your own data center you feel empowered to fix problems and in the cloud you feel helpless.

</comment></comment><comment><USER4> I have an app on Heroku that is loading slower than normal. This might be why. Is anyone else seeing a similar problem?

<comment><USER5> <http://status.heroku.com/>

They're aware of the issue as well.

<comment><USER4> Thanks</comment></comment></comment>


Russia says space station leak could be deliberate sabotage - <AUTHOR> https://m.phys.org/news/2018-09-russia-space-station-leak-deliberate.html <comment><USER2> Ridiculous. Sabotage by whom? By an Astronaut? On their shared living space? To what possible purpose? Damage the structure that was jointly built for 200+ billion dollars? What does this accomplish except for endangering their own lives?

Much more likely to just be an unreported (due to fear of repercussions) manufacturing/operational accident

<comment><USER3> It would serve to undermine the credibility of current glorious system currently in place in Russia, whatever they're calling it at the moment. (Please. I'm being ironic.)

</comment></comment><comment><AUTHOR> But more likely to be an unreported accident ...

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


A more beautiful way to explore Vine - <AUTHOR> https://bottlr.co

<comment><USER2> So much nicer and cleaner than vine.co! Good job!

<comment><AUTHOR> Thank you! More cool features soon.</comment></comment>


Scientific Integrity in a Climate of Perverse Incentives and Hypercompetition - <AUTHOR> http://online.liebertpub.com/doi/10.1089/ees.2016.0223 <comment><USER2> It's ironic that this paper is published by a predatory publisher.</comment>


Asking All Young Entrepreneurs: Are You Absolutely Sick of College Yet? - <AUTHOR> http://mindpetals.com/blog/2007/02/asking-all-young-entrepreneurs-are-you-absolutely-sick-of-college-yet/ <comment><USER2> I am finishing up my last semester of Business School and I just sit in class reading Popurls.com while teachers ramble on and on. I have learned so much more about entrepreneurship, history, news, world status, and everything else than my classes could possibly teach me. I am just glad all this training to be a sheep will be over soon.

<comment><USER3> one of my favorite pg quotes from "The Power of the Marginal"...

"You often hear people say that you shouldn't major in business in college, but this is actually an instance of a more general rule: don't learn things from teachers who are bad at them."

</comment></comment><comment><USER4> "This article was written to make young entrepreneurs hate college or want to stop doing their school work to focus more on their business"

typo?

<comment><USER5> From the tone of the article it seems like more of a Freudian slip than an outright typo.

</comment></comment><comment><USER6> I actually wrote about something similar last fall, so I just uploaded it to my homepage. It was actually an assignment for a business class, and the professor's comments are pretty funny:

http://alexkrupp.com/midterm.html</comment>


It's time for universal housing vouchers? - <AUTHOR> http://www.slate.com/articles/business/moneybox/2016/07/it_s_time_for_universal_housing_vouchers.html <comment><USER2> Just make sure my voucher is for Fresno. I'll quit my job tomorrow.</comment>


Facebook and Twitter Will Dangle Ad Revenue to Lure YouTube Stars - <AUTHOR> http://www.bloomberg.com/news/articles/2016-08-01/facebook-and-twitter-will-dangle-ad-revenue-to-lure-youtube-stars?cmpid=BBD080116_BIZ&utm_medium=email&utm_source=newsletter&utm_campaign= <comment><USER2> I like to imagine this as a technique to migrate away the producers of highly popular but low-quality content from YouTube.</comment>


'The Class Ceiling' Decodes the Cultures of Elite Workplaces - <AUTHOR> https://www.theatlantic.com/entertainment/archive/2019/02/class-ceiling-laurison-friedman-elite-jobs/582175/ <comment><USER2> I disagree with this point.

"But one way to address this is to change workplace cultures to be closer to what poor and working-class people bring rather than just trying to teach those "others" how to adapt."

The standards of many professional environments have evolved to handle the expectations of many external stakeholders. Think about what you expect from your lawyer, an ad agency, and accountant: people you trust with your money, brand, or even your personal freedom. Or the engineer designing a multi- million dollar piece of equipment for your company. Or the priest or doctor counseling you on a private matter.

Personal behavior that is culturally appropriate on a shop floor or the Wal- mart Warehouse (yes, I've worked in both of those places) would be totally out of line in a professional environment. It would, in fact, work against the goals of the organization and threaten everyone's employment.

Culture should be driven by the requirements of the job. You are playing a role. I want my doctor to be infallible and calm. I want my accountant to have their act together. It's part of the service.

<comment><USER3> I agree with the larger point, but the bit about wanting a doctor to be "infallible" doesn't make sense to me. Medicine is not like that. Many common problems are mysterious and often some trial-and-error is needed to figure them out. The patient may have to do some of that sleuthing.

What I'm looking for (ideally) is someone that can get me up to speed quickly on what the problem might be and what's the state of medical knowledge. I don't know how to find that, though.

<comment><USER4> I suspect he may mean "unflappable".

</comment></comment></comment><comment><USER5> Much as it's important to lower barriers of opportunity to people who have not grown up in privilege, I have to say that as someone responsible for hiring / managing people -- it is undeniable that people who come from much worse off backgrounds are much more likely to have a harder time working successfully in a high performing environment.

As you look to populations who didn't go through the same kind of education, social circles, family environments ("privilege" as they say nowadays), you find people who:

\-- Don't hold conversations with the same kind of productive interaction

\-- Don't have the same goals of success or motivations (individually or team)

\-- Haven't yet been exposed to professionally challenging situations and know how to handle them healthily

\-- Have a higher quotient of "fuck it" if they encounter difficulty

\-- Display gaps in judgement on how to behave / what to do or not do at work

\-- Just have more hard-to-manage stresses outside of work on their life

\-- many more personality / work-related traits

Of course I'm not saying that everyone from a less privileged background is like this. But undeniably as you "turn the knob down", you encounter more and more of these issues. If it were not true, everyone pretty much would want to hire from every stratum of society.

It's a sad truth that the indicators of a privileged background aren't just superficial meaningless markers. They actually do pretty well indicate how likely someone is to succeed. They mean that someone has gone through education / upbringing that give you a pretty good sense of how that person will behave, and perform (in general). Hence the vicious circle.

This is why efforts like at Accenture (?) to strip resumes of university background or other "biased" indicators will be unsuccessful. The noise-to- signal that results will be overwhelming.

<comment><USER6> As someone who's been through some hiring as well: I can teach a person how to talk. I can teach a person how to behave. I can even teach a person a good judgement. Actually, pretty much all college graduates have an absolutely awful judgement.

I cannot do anything with the "fuck it" attitude.

<comment><USER7> As someone who previously suffered from a fixed mindset, it's entirely possible to change the "fuck it" attitude. There are many reasons people give up too early but a lot of it has to do with 1) seeing failure as a reflection of self-worth and 2) not seeing failure as a growth opportunity. With the right culture / mentorship / communication, it's possible to correct attitude just like skillset. Whether it's worth your time is another question.

</comment></comment></comment><comment><USER8> Definitely rings true. I managed to get accepted to one of the "top-ish" business schools a decade or so back, and got to witness first-hand these non- obvious rules and norms and these invisible barriers. There's an obvious class chasm. You've got the bros (and yes they were mostly men in a narrow age band) who were already investment bankers and management consultants, going back to finishing school to "get their tickets punched". And then there was everyone else: international students trying to get a foothold in American business, non-traditional, entrepreneurial types, and working-class schmucks like myself trying to change careers into something more lucrative.

The 'bros all seemed to know each other already, and knew all these hidden rules, norms, and behaviors. They had similar interests and hobbies. Liked similar overseas vacationing spots. Did their wine tasting together. Went to the same polo and yachting clubs. They spoke the language of privilege and class fluently. They even dressed pretty much the same. Their elite backgrounds have them an enormous and obvious advantage.

When it came time to do the grueling company meet-and-greets and interview gauntlet, these guys were the only ones not sweating it. They already by and large had their elite jobs lined up by virtue of this hidden network. The rest of us did 25 interviews a week fighting over the scraps.

Never managed to do a career change, but still found the experience to be valuable. It changed a lot of my attitudes and beliefs about class mobility, how much of the world actually runs on these secret rules and understandings, and the differences between certain and uncertain paths to economic/career success. I feel the author of this article really gets it.

<comment><AUTHOR> Never underestimate the value of a good network. A lot of opportunities will show up outside a work environment first, as a passing comment or an invitation for coffee or dinner. This is a segment where first mover advantage is very significant.

Lower level jobs can be more objectively assigned because you have a much higher number of matches and mismatches to draw conclusions from. The higher up you go, the more subjective factors play a role. There has been a lot of progress in measuring ability at the top tiers, but relatively few companies hire professional psychometric assessment.

<comment><USER9> There is subjective evaluation as a necessary reality and there is flat out nepotism. The line may be fuzzy at times, but the above sounds like the latter with no doubt.

</comment></comment></comment><comment><USER10> The research linked in the first paragraph wasn't working for me. I think it's the same here: [http://eprints.lse.ac.uk/66753/](http://eprints.lse.ac.uk/66753/) and is a free download

</comment><comment><USER11> There are hidden rules and behaviors in almost every cultural group from rich to working class, educated to non-educated, young to not young, one region of the country to another, even terrain like lowland vs mountain. Being accepted and having doors opened for you is highly impacted by your behavior and how well it fits in the cultural context - whether it's up or down the economic ladder. So this article doesn't strike me as anything new or surprising.

"I think the image that we have—or the ideology, if you want to be political about it—is once you're 18 or so, you make your own way and your class origin is not an important part of how your career goes from there."

I certainly don't have that image - are there those that do? Clearly if you come from a culture of upper / upper middle class professionals you are likely to fit in to that work culture more naturally. If you are not from that culture, then your success at fitting in will depend on your ability to adapt. Isn't this expressed in the idea "dress for the position you want"? There will always be social obstacles. The key is that there not be legal obstacles. This seems pretty obvious. Am I missing something?

<comment><USER12> i have that ideology, and I grew up from a very poor background.

though, i personally dont see much merit in thinking much about things i cant control, whether they are real or imagined. i do it sometimes, but I always try to remember what Ronon (stargate atlantis) said, if it helps you: use it. if it doesn't, put it out of your mind. something like that.

</comment></comment><comment><USER13> I think this is an important article. One part that really resonated with me is the studied informality, in a way that becomes a kind of shibboleth for class membership.

 _" The name that we gave to the culture there was "studied informality"—nobody wore suits and ties, nobody even wore standard business casual. People were wearing sneakers and all kinds of casual, fashionable clothes. There was a sort of "right" way to do it and a "wrong" way to do it_

This actually does remind me of something PG wrote a while back in an essay about informal dress codes and programmers.

"Nerds don't just happen to dress informally. They do it too consistently. Consciously or not, they dress informally as a prophylactic measure against stupidity.[1]

I feel a little bad bringing this up, because I don't mean to be hard on Paul here, or dredge up an essay written 15 years ago. I'll also admit I found the statement entertaining, though it had a bit of the competitive nerd quality to it, something I found a bit off-putting even though I meet more or less every demographic check mark for "nerd" for my generation, down to dungeons and dragons and programming in basic on an appleII.

But then there's this part, from the Atlantic article, about suits. _" that was in some ways, I think, more off-putting and harder to navigate for some of our working-class respondents than hearing "just wear a suit and tie every day" might have been. The rules weren't obvious, but everybody else seemed to know them."_

Over time, I'm come to believe that the "informal" barriers to entry for programming may be far more exclusive than the formal barriers in law or medicine. We haze through whiteboard coding interviews, we (well google and many others) store results in a double secret database with scores that a candidate is never allowed to see. There's no specific degree you take, no dress code you follow, no formal, well recognized board or exam, conducted consistently by people who are known experts in their field.

I've read articles bringing law and medicine up as a counterpoint to low levels of women in programming and stem fields. After all, women were clearly discriminated against, both in terms of formal barriers and informal hostility, in law and medicine, and yet women are now at much higher levels, in some cases a majority of law and med students in elite schools. So, the argument goes, why do we conclude that discrimination is the cause of continuing lower participation in STEM?

Here's the thing - the formal barriers to entry can be addressed in a formal way. The vague, culturally implicit shibboleths that software uses to enforce entry may be vastly more insidious and difficult to even recognize, let alone abate.

I don't cheer our informal culture and dress code the way I used to. No, I'm not saying I want us all to wear suits to work (or have an ABA style organization put a 150K degree in between programmers and the right to program), but there's something about the "prophylactic barrier against stupidity", the distain of a more formal culture, that I think may be more discouraging to people who aren't as familiar with these cultural habits.

I'll leave you with this - I'm a programmer, but my father is a physician. He was invited to speak a meeting for a society of African American physicians. He wasn't sure how to dress for a lunch meeting, but decided to go formal, with a suit. He said if anything, he was ever so slightly underdressed. Casual dress wouldn't have been anything remotely resembling a prophylactic barrier against stupidity, it would have been a sign of disrespect.

There's a lot here, in this article, to think about.

[1] [http://www.paulgraham.com/bubble.html](http://www.paulgraham.com/bubble.html)

<comment><USER9> I remember reading post from some startup founder talking about how he dont hire those who came in suits - because that shows they are all about how people look instead of substance etc. Oh well ... suit is general advice, knowing not to wear it requires subtle knowledge of how people should look ...

<comment><USER13> Oh wow, you're right about suits.

I've read Wall Street people are great at figuring out who is wearing a suit the right way. I truly can't tell the difference between one off the rack at a department store.

The subtleties of suits can be certainly turned into a shibboleth as well, and have been on a regular basis throughout history.

</comment></comment></comment><comment><USER14> " _Probably the best example of this is the television-production firm we studied. The name that we gave to the culture there was "studied informality"—nobody wore suits and ties, nobody even wore standard business casual. People were wearing sneakers and all kinds of casual, fashionable clothes. There was a sort of "right" way to do it and a "wrong" way to do it: A number of people talked about this one man—who was black and from a working- class background—who just stood out. He worked there for a while and eventually left. He wore tracksuits, and the ways he chose to be casual and fashionable were not the ways that everybody else did._ "

There's a very old quote about this; I cannot remember where I saw it: "You can't be a rebel if you don't wear the right uniform." Wearing the right t-shirt and sneakers is as important in some environments as wearing the right three-piece suit or military uniform in others.

Likewise, knowing the right jokes, playing the right games, watching the right TV shows, all of these things influence how you fit into an environment and how productive you will be there.

</comment><comment><USER15> An unstated assumption behind analyses like the one in this article is that the way to get ahead is by being an employee. All of the issues about "decoding the culture" only apply if you are an employee trying to learn and adjust to a culture that someone else created. But if you are the founder of your own business, _you_ create its culture; you don't have to learn someone else's.

<comment><USER16> Until you need to raise money, then you need to convince the VCs that they should work with you. I'd say out of everyone I've ever met, investors are the most classist.

<comment><USER15> Not all businesses need to raise VC money. Not even all startups do (though it's certainly a lot more common with startups).

</comment></comment></comment><comment><USER17> This phenomenon in America is related but different, and oddly physical in that the physical presence of people from elite backgrounds often has an almost childlike, sexless affect in both men and women. I think it comes from a lack of reliance on physical competence and years of the practice of acting through others. It's easy to recognize, and almost impossible to fake for very long.

I see educated people try to replicate it, and it comes off as a kind of unctuous, false over agreeableness that catches on the same way up-talk and baby talk do among teenagers, but for a set of more subtle affectations related to their schools.

The shibboleths of class are ever present, and the best solution to monocultures is to enable better mobility instead of contriving ways to filter against them.

<comment><USER6> I'm curious. Do you have more specific details about this effect?

<comment><USER18> Possibly something along these lines: [https://en.wikipedia.org/wiki/The_Official_Preppy_Handbook](https://en.wikipedia.org/wiki/The_Official_Preppy_Handbook)

<comment><USER19> The summary on that wikipedia page made me chuckle lightly at work. All kidding aside, I'm now doing searches for all manner of 'subculture' handbooks. Looks like I'll be encountering some new reading material soon.

</comment></comment></comment></comment><comment> BXLE_1-1-BitIs1 I rose to the top in programming by fixing stuff the uni grads couldn't.

</comment><comment><USER20> >The word we use in sociology is homophily—people like people who are like themselves.

None of the studies I've seen have even considered whether a privileged background _does_ translate to higher than average merit. And why wouldn't it? We already know household income is correlated with IQ, and growing up having access to better schools, better extracurriculars, less influence from crime, etc is likely, or at least possibly going to build a more competent child.

This field is hopelessly biased. These soft "scientists" start with the premise, that we are all equally competent and set out to prove that cultural factors simply get in the way of _perception_ of merit. The irony is that these same people harp about workplace culture, with claims that "good" [PC] culture has positive effect on business outcomes - doesn't it follow that different _home_ cultures will similarly effect adult outcomes? Why won't anyone with academic clout admit that the culture of your childhood effects how much you're likely to learn, how disciplined you're likely to be and, ultimately, how well you're going to function in a professional environment?

It's a conflation between equality of opportunity and equality of outcome. Frankly, is bad for business and bad for society.

<comment><USER21> I've got to be honest, I initially reacted to this kind of emotionally, thinking that of course external circumstances don't have any bearing on intrinsic merit. I definitely have a bias toward thinking that everyone is more or less equal and that modern workplaces often enshrine a kind of cultural bias towards using inconsequential factors as proxies for merit.

That being said, it's been my impression for a while that IQ scores at least are mostly irrelevant, and not well correlated with economic performance. Is that a mistaken impression? I fully agree with the rest of the factors you bring up as positive influences, it's just the connection to IQ that I have a concern with.

I would argue, also, that the "equal competence" premise could be better stated as "that we all have an approximately equal potential for competence". I'm curious if you think this alternate premise would also be bad for business and society?

Thanks for prompting me to challenge my own assumptions and biases, btw

<comment><USER22> It is more correlated to income than wealth:

> each point increase in IQ test scores raises income by between $234 and $616 > per year after holding a variety of factors constant

From: [https://www.sciencedirect.com/science/article/pii/S016028960...](https://www.sciencedirect.com/science/article/pii/S0160289607000219)

<comment><USER21> Interesting. I don't have access to the full paper, but it appears that the individuals in that study were 28 when the research was conducted. I'll definitely be searching for recent studies conducted on the same cohort when I get the chance, but I do wonder if that correlation holds steady-ish over time, and also if it will be replicated with cohorts of a later generation as other economic climates develop.

I appreciate the information!

</comment></comment></comment></comment><comment><USER23> 16% gap pay is not that big an issue considering it's about elite workspace : If one earns 100k year, the other got "only" 84k a year. Hardly a bad income and not a life changing gap.

Their (84k earners) children will be born into wealthy/high middle class and fare well, and earn the whole 100k once in the workforce while discriminating the new generational minority.

Hate as much as you want, it's life and it will never be perfect.

Seldom immigrants make it big, but their children or grand-children might.

<comment><USER24> I think our society expends a lot of energy and political capital trying to make equality within a single generation possible. I believe that will never work. Who you were born too will always be a huge influence on where you end up on life. In addition, one of the biggest motivations for parents, is to give their children every advantage that they possibly can.

However, instead of fighting with this parental desire to better our children, we should use it. While it may not be possible to achieve equality in a single generation, it should be possible in 2-3 generations. Many immigrants have demonstrated this. The first generation may only work low-paying menial jobs, but they provide enough of an education for the second generation to get higher paying jobs and enter the middle class. The second generation works and saves and their children attend elite universities. The third generation is part of the upper middle class, and with the right connections and luck, they are their children can enter the top class of society. Thus we do not have to do the Sisyphean task of trying to make equal outcomes for everyone, we just have to work to make sure that each parent has the ability to make life better for their children.</comment></comment>


Don't Feed the Beast – The Great Tech Recruiter Infestation - <AUTHOR> https://mocko.org.uk/b/2015/10/14/dont-feed-the-beast-the-great-tech-recruiter-infestation/ <comment><USER2> I used to hate recruiters and would delete their emails or even send them letters chastising them for their inability to even do a modicum of research into my skill set.

Then I read _How to Win Friends and Influence People_ , as cheesy as that sounds, and now I'm extremely friendly with recruiters. I've realized that I am deeply privileged to be in a time and a place in society where my skills are so valuable that it feels like spam to be provided alternative job opportunities! Seriously, what kind of backwards world do we live in where we're _angry_ at people for trying to keep us gainfully employed? How rude of _me_ to have acted like a pompous rock star by not giving someone common decency and respect, even if their interests don't exactly align with mine.

So now I write back to all recruiters. I graciously thank them for even considering me for the role (no matter how off-base it was), and then simply explain to them how, for example, if you're recruiting me for a Java position, a simple look at my LinkedIn profile (which I actually link to and invite them to join my network) will show I've never held a professional job writing Java. Finally, I ask that since their time is valuable (because the higher their conversion rate, the more money they make), if they could give me the same courtesy and only send me extremely relevant leads, then I will be more likely to respond.

You know what happened?

I get thoughtful, sincere responses and apologies. They appreciate that I'm not like 99% of techies who deletes or scolds them. And then they magically disappear! I receive _the least recruiter emails I ever have in my career_. And the ones I do get now, they actually are worth checking out. Imagine that! Being decent and taking the high road can lead to a better outcome.

<comment><USER3> I agree on all points, and can vouch for this approach: Thoughtfully approaching recruiters allows you to see who is actually worth keeping in touch with. In fact this is what I do, too.

While there are some rude/inefficient/untrustworthy recruiters out there, I don't think generalizing is a valid approach (and in many other circumstances, as well).

Coming from a country where the job market has lately been (and still is) a bit stagnant and recruiting agencies have historically never been a popular option, I would say dealing with recruiters is definitely not all grey and grim.

</comment></comment><comment><USER4> That was actually a pretty good chuckle reading that, thanks :-)

One agent spammed me once because he was recruiting an architect... to build a supermarket on the south coast. The 'software' bit in my position name didn't seem to have registered!

However, I use ONE agent, who's probably one of the rarest kind: he's /careful/ of not wasting my, or his client's time and seems to have realized that if he does that, he gets returning business -- and he does, he got a 'cut' from placing me a few times now -- and I don't really care, he saves me a lot of time, 'sells' be pretty well (as he knows me well now) and has even managed to convince me to try other things... So by now he's acting more like 'my' agent instead of 'one' agent...

</comment><comment><USER5> YMMV however I have only had positive experiences with recruiters. There are obviously dicks in the industry but these are easy to block or ignore. I have used the same recruiter for my last 6 contracts over approx 5 years and she has been awesome I. E. Saved me a load of hassle or down time between contracts.

</comment><comment><USER6> Half of my linkedin is like a modelling agency. Hot young chicks making cold calls. I try to go out on a business lunches as much as possible, without any intention to commit. Two can play that game.

<comment><USER4> Lucky beepstard! All I get is cold calls; but I /did/ notice quite a few interesting recruiter pictures lately on linkedin -- I had assumed they were the equivalent of ashleymadisson hot MILFs.

Now you got me wondering :-)

</comment></comment><comment><USER7> One recruiter sent me an email saying they are looking for people with knowledge of RESTful APIs and JASON experience.....

Yep.

To this day, I still don't know who jason is.</comment>


NTSB 'unhappy' with Tesla release of investigative information in fatal crash - <AUTHOR> https://www.washingtonpost.com/news/dr-gridlock/wp/2018/04/01/ntsb-unhappy-with-tesla-release-of-investigative-information-in-fatal-crash/ <comment><USER2> The issue is that this investigation is important to Tesla but not considered 'Major' in NTSB definition. In a major investigations, such as airline crashes, the NTSB are the lead agency who give press multiple press conferences and release preliminary information to the media.

It is considered very bad form for any designated parties[0] participating to talk to the media other than with NTSB approval. Non-essential organizations like union representatives have been booted from investigations for talking to the media.

[0] [https://www.ntsb.gov/investigations/process/Pages/default.as...](https://www.ntsb.gov/investigations/process/Pages/default.aspx) (scroll down to "The Party System")

</comment><comment><USER3> Both Uber and Tesla try to discredit the victim before any official investigation ends, and in both cases it's quite clear they will try to cover their asses first. And they have all the data. How can we be sure they don't selectively hide something or don't tamper with the records before giving them to investigators?

<comment><USER4> Uber has said essentially nothing about their crash, it's the cops who rushed out and got nearly everything wrong. Uber clearly had a serious technical failure, but there's been no PR spin from them.

<comment><USER5> I think it is possible that the Tempe police chief and mayor anticipated the incident could be a problem for them, especially given the secret agreement that later came out, and chose to try to spin the story on their own account. It is not hard to imagine that, in that frame of mind, they might be receptive to someone from Uber saying "clearly this was unavoidable", but I have no way of knowing whether any such conversation took place.

Then there is the question of whether the Uber-supplied video accurately represents the lighting conditions at the time... This may seem unduly conspiratorial, but I gave both Uber and the Tempe administration the benefit of the doubt until it became clear that the initial reports were innaccurate and less complete than they could have been.

<comment><USER6> > Then there is the question of whether the Uber-supplied video accurately > represents the lighting conditions at the time...

Why would that matter? The issue here is that the LIDAR system failed to detect the pedestrian.

<comment><USER7> It's of tremendous importance from the perspective of public perception of who's at fault.

If the average observer watching the published video arrives at a conclusion of "well I would have hit that person too, she appeared out of nowhere in front of the car", it obviously matters.

<comment><USER6> It's not important at all. There's a bug in Uber's software. That's what we should be talking about.

<comment><USER5> It does seem that there is a problem with the vehicle's lidar or the associated software, so does it not strike you as strange that the story being pushed claimed that the victim "came out of the shadows", which is a misleading irrelevance if lidar is the primary sensing technology? Especially as the unrealistically dark video does not even seem to fit that story.

<comment><USER6> Yes. That's why I am posting in this thread.

<comment><USER5> Sorry, I misunderstood your point.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER8> Funny, the article says several times that the NTSB is unhappy with Tesla's release of information, but it never says why. It's not clear how it can interfere with the investigation. Maybe they just want to control the narrative? But that is no part of their function. Sorry if you're unhappy about Tesla's disclosures guys, but why, and why should we care?

<comment><USER9> Because, if Tesla signed up as a "party" to assisting with the investigation, that puts them under certain nondisclosure rules.[1] At the end of the investigation all the info comes out, but not in the early stages. Selectively releasing information that makes some party look good is not allowed if you are involved with the investigation.

This is widely understood in the aviation community. The mission of the NTSB is not to assist with either litigation or PR.

 _" Contacts with news media concerning the investigation will be made only by the NTSB, through the Board Member if on-scene, the NTSB's representative of its Office of Public Affairs, or the IIC. The guiding policy is that the NTSB is a public agency engaged in the public's business and supported by public funds. The agency's work is open for public review, and the Act under which it operates makes this mandatory. The NTSB believes that periodic factual briefings to the news media are a normal part of its investigation and that, for the public to perceive the investigation as credible, the investigation should speak with one voice, that being the independent agency conducting the investigation. Therefore, the NTSB insists that it be the sole source of public information regarding the progress of an accident investigation. Parties are encouraged to refer media inquiries to the NTSB's Office of Public Affairs. In any case, release to the media of investigative information at any time is grounds for removal as a party."_

[1] [https://www.ntsb.gov/legal/Documents/NTSB_Investigation_Part...](https://www.ntsb.gov/legal/Documents/NTSB_Investigation_Party_Form.pdf)

<comment><USER10> If they are a party to the investigation, ignoring the non-disclosure rules makes Tesla seem to me like a dodgy company willing to act against established norms designed to ensure transport safety, and I hope they get the book thrown at them for it.

If they are not a party to the investigation, I'd question why not. When was the last time an aircraft manufacturer declined to be a party to the investigation? They recognise that if they get a reputation for being unsafe that has repercussions for future sales; I'd hope the same was true of car manufacturers!

To me, there's literally no way this makes Tesla look good.

<comment><USER11> Isn't that a lose/lose for Tesla?

Are not a party to the investigation -- motives questioned, discovering facts takes longer or impossible

Are a party to the investigation and information can only be released by NTSB -- share price gets hammered every time there's a crash and everyone _else_ gets a chance to put out information

I'm inclined to lead towards "special circumstances" here. Does every Ford crash make national news?

<comment><USER10> Is the same not true for Boeing?

<comment><USER11> I'd argue Boeing (and most other companies) have the benefit of amortizating "fear" over the total installed base of similar technologies.

A Chevy engine turns out to have a design flaw, investors say "Yes, but Ford produces and sells tons of engines, so here's how much we think fixing it will cost."

It seems like the recent Uber / Tesla self-driving impact is more of the form of "Gee, maybe this isn't even possible."

If the V-22 Osprey tiltrotor were the _only_ aircraft Boeing made... then I'd say it would be a more similar analogy.

</comment></comment></comment></comment></comment></comment><comment><USER12> > "The driver had received several visual and one audible hands-on warning > earlier in the drive"

This is completely irrelevant to the crash. Anyone who uses autopilot knows that throughout the drive even if you have two hands but don't apply enough pressure on the wheel, you will get a warning and you have to jiggle the wheel for it to recognize you're there.

<comment><USER13> Related, I wondered about this bit: "Tesla said Huang had not followed guidelines intended to ensure drivers are paying attention while the vehicle is in Autopilot mode."

Even if the sensors were correct, I have deep questions about the human ability to follow instructions requiring them to be robot-like. I would love to see some studies measuring the extent to which people can really follow Tesla's guidelines to the letter for the 300-500 hours/year that somebody with this commute would be doing.

I'm sure I'm an outlier, but I would personally never use a system like Tesla's Autopilot. I already think highway driving is slightly too boring to hold my attention, so on long drives I always supplement with podcasts and audiobooks. Until I can lie down and take a nap, I'm sticking with manual driving.

<comment><USER14> The guidelines are pretty simple: When you engage autopilot it reminds you: Keep your hands on the wheel: Be prepared to take over at any time.

<comment><USER15> Didn't work for trains, now did it?

<comment><USER16> Exactly. Train drivers have whole protocols to counter attention issues. And they are trained professionals.

A tape repeating "put your hands back on the instruments" can only buy you that much safety.

</comment></comment></comment></comment></comment><comment><USER17> Tesla is the company you pay $100,000 to kill you and then make you look bad in public.

<comment><USER18> They're not doing a very good job of delivering on that then. They don't seem to have anywhere near a high enough fatality rate.

</comment></comment><comment><USER19> It's early, but it seems likely there was an issue with Autopilot that contributed to this crash. To make matters worse, the owner apparently complained about errant behavior on that section of road. Why did he continue to use it without paying attention and why didn't Telsa act much earlier?

It seems the local government or highway agency also neglected their duty to maintain the highway safety barrier, a shockingly regular occurrence where I live as well. I've wondered how often someone is injured because they failed to repair a barrier for several months.

It appears all the pieces fell into place at the right time and this man unfortunately lost his life.

<comment><USER20> > It seems the local government or highway agency also neglected their duty to > maintain the highway safety barrier, a shockingly regular occurrence where I > live as well. I've wondered how often someone is injured because they failed > to repair a barrier for several months.

While the crash attenuators should exist and the various responsible authorities should maintain them appropriately, I find it frustrating that this is brought up in this conversation as if it's a significant factor. It _might_ have saved this man's life, but this crash was sure to be incredibly violent with or without the barrier.

The existence of a crash attenuator could not and should not affect anyone's decision making that led to the car impacting the barrier. Not the driver, not Tesla, not autopilot.

I hope the NTSB comments on this and it leads to Caltrans doing a better job of replacing these quickly (if they haven't already committed to this in the aftermath of this incident), but I also hope that it has zero bearing on the rest of the report.

<comment><USER19> I understand what you're saying completely. The point of highway safety equipment is usually as a last resort to minimize injury as much as possible, this is after markings, signage, drivers and vehicles have failed to prevent a crash.

Obviously the crash should've been avoided, but poorly maintained or designed infrastructure should not be left out of the conversation.

<comment><USER21> I think it's best to split these in to two 'investigations' to talk about. Yep the barrier probably contributed to the death but are we really interested in talking about? We're here to talk about the self-driving bit! We wouldn't be talking about it if it was a 2002 Toyota Camry that hit it..

<comment><USER19> There's no need for there to be two investigations, the NTSB generally produces very thorough reports that will acknowledge all causes leading to injury or death.

<comment><USER21> I'm not saying there should be two investigations, I'm saying there should be two 'investigations' for the purposes of us talking about it.

Nobody here is actually interested in the case because of the implications for roadside maintenance - they're interested because it's a (semi) autonomous vehicle.

</comment></comment></comment></comment></comment></comment><comment><USER22> Does autopilot lead to overconfident drivers?

<comment><USER23> Background: My wife drives a Tesla Model S with AP.

Inattentive drivers more than overconfident drivers. You look down and stare at your phone for 10 seconds in a normal car and you are punished pretty quickly and learn not to do it.

You look down and start at your phone for 10 seconds in a Tesla with AP and "nothing bad happens" ... almost all of the time.

And that's the problem with this version of AP. Yes, Tesla says keep your eyes on the road. Yes, Tesla says keep your hands on the wheel. But it's pretty easy to get lax and start to slide.

For the record, I think her use is the one valid use. She has RSI issues with her hands and arms and she does a good bit of expressway driving. She absolutely keeps her eyes on the road and hands near the wheel when using it. But I bet she's in the minority of regular Tesla AP users.

<comment><USER24> The problem with Tesla's 'autopilot' is that it's anything but.

Asking drivers to keep their eyes on the road and hands on the wheel while _not steering_ guarantees that their attention will wander, because their brain isn't getting enough stimulus to keep focused on the task.

I don't know why it's not clear to most people by now. The current Tesla 'autopilot' is simply more dangerous than manual driving because it harms human reaction time during emergencies.

Tesla is using legalese to blame people for this fully predictable effect when crashes do happen, but I suspect it's only a matter of time before they're forced to rebrand Autopilot as a lane assist technology which is all it is. Its only use as a safety system is to maintain control of the car is the driver becomes incapacitated, and safely bring it to a complete stop.

<comment><USER25> I am curious how do aircraft pilots got around this? Autopilot on aircraft work same as a Tesla drive a straight line where I aimed you have way less interaction than on the car. Yet pilots are able to take over autopilot and their responsibility during it's use is mostly looking out the window and occasionally switching frequency

<comment><USER26> There are two critical differences.

1: The handover latency (time from AP requesting handover to time pilot takes over) is measured in seconds to tens of seconds. AP is designed to give up a long time before any possible issues occur. Contrast this with cars on roads where the reaction times need to be in the sub-second range to avert crashes. If AP took a plane into terrain during poor visibility conditions and the pilots only got a second or two of terrain warning prior to a crash, such a crash would never be classified as pilot error on those grounds. Contrast this with self-driving cars where the autonomy frequently _doesn 't give up at all_ and the driver's awareness of the situation is the only thing to save them.

2: There are two operators on controls at all times. Recognising the limitations of human attention spans is one of but not the only reason for this being a requirement in civilian airlines.

Boeing has a whole design philosophy about making the operations of AP completely transparent to the pilots and failsafe. That means that all key controls (thrust, trim, stick, etc.) in the cockpit are physically manipulated by the AP so the pilots can see exactly what's going on. and more importantly that the controls represent the exact state of AP when the pilot takes over, so there are no unexpected sudden changes in input. The current generation of self-driving cars is a joke compared to the safety engineering that goes into AP systems.

</comment></comment></comment></comment></comment><comment><USER12> From Feb'18

[https://www.carcomplaints.com/news/2018/insurance-company- su...](https://www.carcomplaints.com/news/2018/insurance-company-sues-tesla- model-x-crash.shtml)

The insurance company says that despite its suggestive name and marketing campaign, "Tesla produced a semi-autonomous vehicle that misleadingly appeared to be fully autonomous."

In addition, the lawsuit claims Tesla advertised the package as providing a way to "automatically steer down the highway, change lanes, and adjust speed in response to traffic," all without requiring the driver to touch the steering wheel.

</comment><comment><USER27> Given the fact that the autopilot warnings were ignored, could this possibly be a case of sudden driver incapacitation? Eg falling asleep at the wheel, a heart attack, etc?

<comment><USER28> The autopilot warnings happened earlier in the drive and aren't even relevant to the crash, they're Tesla's smokescreen.

(EDIT: This is why the NTSB is mad, Tesla is selectively releasing information like this, so they look good before the NTSB reaches any conclusion)

</comment></comment><comment><USER29> I learned everything I needed to know about Tesla's culture and Elon Musk specifically after their response a few years ago to the NYT's review criticizing the Model S's cold weather performance. All their subsequent responses to criticism haven't changed my impression at all. 'Lying with statistics' is a go-to Tesla PR move.

<comment><USER30> Even more deviously, it's "lying with true statistics".

<comment><USER31> In ancient time, it was by "the word of god" from prophets by which you controlled the masses.

Now it is statistics.

</comment></comment></comment><comment><USER32> Given the media circus that started what choice did Tesla have? If this was really an problem why didn't they make Tesla do a NDA?

</comment><comment><USER33> I respect the NTSB, but I do not like institutional secrecy aspects to try to muzzle Tesla - facts like this can help people from placing excessive reliability on self driving abilities of Tesla's autopilot - as long as personal privacy is respected. After all, calling it an autopilot is intrinsically wrong - as Tesla repeatedly asserts.

<comment><USER34> Is it institutional secrecy or is it disapproval of unilateral disclosure of only a sub-set of elements of an ongoing inquest?

<comment><USER35> What is the distinction between the two that changes the justification? I see those things as part of each other, as in institutional secrecy is bred from ongoing inquests in perpetuity.

<comment><USER13> The NTSB has a 50+ year history of producing detailed reports on accidents:

[https://www.ntsb.gov/investigations/AccidentReports/Pages/Ac...](https://www.ntsb.gov/investigations/AccidentReports/Pages/AccidentReports.aspx)

The notion that they'd suddenly turn secretive now seems absurd to me. Given their expertise and excellent track record, I think it's reasonable to trust them when they say they want to completed the investigation and publish a proper report, just like they do with other accidents.

<comment><USER35> Just to clarify, "secrecy" is not a word to which I attach negative sentiment.</comment></comment></comment></comment></comment>


Ask HN: Are there any Chrome extensions to hide HN stories? - <AUTHOR>

I'm tired of flagging stories about Valley Drama oozing comments about why so-and-so is or isn't a douchebag. Obviously the readers here like this stuff, so much so that such stories get 200+ upmods. I realize my tastes no longer match HN's tastes as it has grown in user base, much as they no longer reflect proggit's tastes as it grew.
So... Is there a simple way to hide posts? Perhaps a Chrome extension or a JS bookmarklet? I'd like to participate in a subset of HN's discussions without the distraction and without wasting the mods' time by flagging stories that are obviously popular. <comment><USER2> A naive bookmarklet isn't what you really want.

What you ideally want is a personal karma filter. A way to track your interests client-side in addition to the HN sieve. "Clickety on the Ignore button and goodbye human interest stories involving douche*"

How to make one securely, though, can be a bit of a problem.

<comment><AUTHOR> I'm not sure tackling the problem with machine learning is necessary. It's one of those things that (so far) doesn't happen often, but when it does there seems to be a wave of stories around the same topic. One hopes it will go away, but then a week later another pops up and I'd like to just click ignore and be done with it.

</comment></comment><comment><USER3> Is it really necesary to hide posts? Is it such a distraction to just skip over the stories that are not interesting to you?

I ask because on a good day, I'm interested in maybe half of the stories on the front page, and it's always been that way for me. I thought it was the same for everyone...

<comment><USER4> Once you've decided you're not interested in them, wouldn't it be nice to be able to hide them from the main screen and see new ones in their place that you might be interested in more?

</comment></comment><comment><USER5> At <http://news.ycombinator.com/item?id=1085721> it looks like some people wrote a Greasemonkey script to remove iPad stories. Maybe you could adapt that JS to your liking?

</comment><comment><USER6> You could try using Yahoo Pipes with some keywords to filter out stories you won't be interested in. That'll create another RSS (or ATOM?) feed that you can share with others of similar taste.

</comment><comment><USER7> We just need 24 hours of pure <insert obscure, fringe technology here> stories.

I think we've used Erlang in the past (no offense to the Erlangers, obviously)

<comment><USER8> That hasn't really solved anything in the past except making the site essentially unusable for day.

<comment><USER7> Yeah, that's kinda the point. HN stops being the place that people come to for fluffy/inflammatory stories as we've seen for the past few days.

<comment><USER8> And yet, here they are again - they start right back up immediately. The reason for the first "Erlanging" was because HN was getting linked to from a more mainstream news source and the intention was not to have people stay and change the community.

</comment></comment></comment></comment><comment><AUTHOR> p.s. Sorry about the whining. I haven't finished my first coffee of the day :-(

<comment><USER8> There's no artful way to ask this; but have you found any potential replacements for HN / Proggit yet?</comment></comment>


Oracle to stop patching Java 6 in February 2013 - <AUTHOR> http://www.computerworld.com/s/article/9234900/Oracle_to_stop_patching_Java_6_in_February_2013

<comment><USER2> Well, at least I can stop closing the incessant Java update prompts.</comment>


How Radar Works - <AUTHOR> https://www.daniellowengrub.com/blog/2019/10/26/radar <comment><USER2> The HB100 [0] and CDM324 [1] are very inexpensive little CW doppler radar modules at 10GHz and 24GHz respectively. Feed them 5v and send the mixer output to a small microphone amp/input jack and you can record the frequency beat of most objects in motion.

[0] [https://www.amazon.com/dp/B00FFW4AZ4](https://www.amazon.com/dp/B00FFW4AZ4)

[1] [https://www.amazon.com/dp/B07WH67J9W](https://www.amazon.com/dp/B07WH67J9W)

This is what it sounds like when you toss a quarter in front of an HB100. [https://www.youtube.com/watch?v=8riretP8ylE](https://www.youtube.com/watch?v=8riretP8ylE)

The bowtie looking part is the actual flight, the other part right after that is it bouncing off the counter.

Spinning same quarter - [https://www.youtube.com/watch?v=5lnYvJoxRak](https://www.youtube.com/watch?v=5lnYvJoxRak)

Shining it at parts of a ceiling fan - [https://www.youtube.com/watch?v=tIiFvByf1CQ](https://www.youtube.com/watch?v=tIiFvByf1CQ)

<comment><USER3> It amazes me how cheap these application-specific chips have become - it opens up so many new potentials. I can only guess that something like this would cost $1000+ roughly 10 years ago?

<comment><USER4> No, not really, doppler radar based proximity sensors (used in e.g. baths) cost about 40 € more than 10 years ago. It's not complicated technology.

<comment><USER5> What's an e.g. bath?

<comment><USER6> e.g. is [https://en.wiktionary.org/wiki/exempli_gratia](https://en.wiktionary.org/wiki/exempli_gratia)

which you can pretty much read as "for example, [example(s)]"

<comment><USER5> Sorry, I should have guessed my comment would be lost on those who don't know how to use "e.g." correctly.

<comment><USER6> Just assuming you were being earnest (perhaps learning english!) as there wasn't much to gain from interpreting it another way.

</comment></comment></comment></comment></comment></comment></comment><comment><USER7> This brings back a lot of memories. One of my proudest technical achievements was as an intern: an assignment to figure out how many unique emitters were in a field of data picked up by some antenna. The data was provided on a CD with not a lot of other info.

I ended up finding a program some college researcher had published for matching DNA patterns, and between a little data massaging and software hacking, I was amazed when results actually made sense.

As an intern, I never knew exactly who provided that CD or where the program went from there, but it was a fun problem to work on for a while.

<comment><USER8> These cross-domain hacks are very satisfying.

<comment><USER9> Is there a list somewhere about such hacks?

</comment></comment></comment><comment><USER10> Thanks OP, this is a nice resource.

One note, though. The presentation of IQ demodulation seems to mix up the real and imaginary components of the analytic signal with the electric and magnetic fields. Even if you skip the analytic signal and just generate a straight up real signal (with zero imaginary component), there will still be a magnetic field.

This seems important because the current presentation suggests the complex signal representation is somehow specific to electromagnetic signals, while it is really just a mathematical convenience applicable to any signal (EM, sound, wave on jump rope, etc).

<comment><AUTHOR> Thanks a lot for the comment - you are absolutely right.

</comment></comment><comment><USER11> Early nukes used an interesting radar design to trigger at a preset distance above ground: there was a long coil of cable inside the nuke, and the fuze would emit random electromagnetic noise towards the ground. The reflected noise would then be received by an antenna, and the original emitted signal would be delayed by the coil by a certain predetermined time delta. This allowed the nuke's fuze to compute autocorrelation (and therefore detect distance) using entirely analog methods, and in a way that's impossible to jam, because autocorrelation on random signal is pretty darn robust (it's a delta function for ideal white noise).

</comment><comment><USER12> There was a good talk about how radar (and lasers) are weaponised by police to detect the speed of vehicles (and countermeasures to that) at defcon this year too.

[https://youtu.be/vQtLms02PFM](https://youtu.be/vQtLms02PFM)

Might be interesting too.

<comment><USER4> > how radar (and lasers) are weaponised by police to detect the speed of > vehicles

How exactly is this process "weaponisation"?

<comment><USER13> If your radar gun is strong enough, it will push the car forwards. Once the plasma and gaseous metals have dissipated you can then ticket the driver for speeding even if they weren't speeding before you measured their speed.

</comment></comment></comment><comment><USER14> It's a good start, but stops short of the most interesting parts. The signal to noise section should at least mention the root of forth power in the radar equation, as this is one of the key limitations. Beam forming with mechanical scanning or phase arrays is also important from the practical standpoint, as so is the relationship between wavelength, antenna size and angular resolution. Finally, at least the concept of how the autocorelation function of a good pulse should look like is worth mentioning, with examples of complementary or pseudorandom sequences .

</comment><comment><USER15> There is fantastic webinar (consisting of 5 videos) from TI which covers CW and FMCW radar techniques: [https://training.ti.com/intro-mmwave-sensing-fmcw- radars-mod...](https://training.ti.com/intro-mmwave-sensing-fmcw-radars- module-1-range-estimation?context=1128486-1139153-1128542)

<comment><USER16> Wow, thanks!

</comment></comment><comment><USER17> Math went over my head, does anyone have a primer or intro for some of the math involved here?

<comment><USER18> Kreyszig: [https://www.oreilly.com/library/view/advanced-engineering- ma...](https://www.oreilly.com/library/view/advanced-engineering- mathematics/9780470458365/)

<comment><USER19> Well, that's the deep end...

I'm having to translate it from TeX, so I don't know, but you might want The Scientist and Engineer's Guide to Digital Signal Processing By Steven W. Smith.

[http://www.dspguide.com/](http://www.dspguide.com/)

</comment></comment></comment><comment><USER20> For the constant velocity case, the graphic shows the transmit pulse as having two cycles, and the received pulse as having four cycles of higher frequency, with the received pulse being the same length as the transmit pulse.

Shouldn't the received pulse have the same number of cycles as the transmit pules, and the received pulse be shorter than the transmit pulse (or longer in the case of the target moving away instead of toward the source)?

Or does something non-intuitive happen (probably because of special relativity) resulting in the received pulse gaining energy from the reflection, which is reflected (pun intended) as the pulse being longer than you'd expect classically?

<comment><AUTHOR> You are right that the graphic is a highly simplified cartoon of what the actual received wave looks like - I should have stated that in the post.

Regarding the question, it is true that the received pulse will be shorter or longer than the transmitted one (depending on whether the object is moving towards or away from the sensor) but since we are assuming that the speed of the object is significantly less than the speed of light, we're making the simplifying assumption that this difference is negligible. People sometimes refer to this as the "stop and hop" assumption since in practice we are assuming that the object "stops" at point x when the radio wave is emitted and then "hops" to x + dt*v once the wave has been received dt seconds later.

Regarding the number of cycles, you are again correct that the image represents a gross oversimplification. One reason for this is that since the carrier frequency is so much higher than the doppler frequency, the true graph of the received wave would not be noticeably different than the transmitted one. It is easier to plot a realistic graph of the demodulated wave which you can see in the plot titles "samples of the demodulated pulse".

</comment></comment><comment><USER21> To me, the maths of the radar are the easy part.

But the physics of it? That's something that seems entirely more complex to me.

Is it really? Could any of you explain how you emit the radio wave, and how you detect it back? In terms of hardware?

<comment><USER22> It starts with an oscillator circuit producing an alternating current sine wave at the desired frequency. The oscillator circuit often involves a crystal in order to generate an accurate and stable frequency.

The alternating current is then feed down a transmission line, which in the most basic case is just 2 wires side by side. Being side-by-side, the current going "up" in one wire is balanced by the current coming "down" in the other so that at a distance from the transmission line, the radiation from the two wires (mostly) cancel each other out. Often instead of side-by-side, one wire is often wrapped around the other with an insulator separating them (coax), but the same principal applies.

The transmission line then feeds into the antenna. A basic antenna is a piece of wire exactly 1/2 wavelength long. Electric pulses "bounce" off the wire's ends, sort of like how if you tether one end of a rope and then shake the other, the "waves" going down the rope will "bounce". The length of the wire being 1/2 wavelength is key because it takes a wave exactly one cycle to start from one end, bounce off the other, and return to the start. Just as the first wave is bouncing off the start end, it gets a new "bump" from the transmission line. This allows a lot of current to build up in the antenna, sort of like how a kid on a swing can use several small well timed kicks to swing himself much higher than just a single big one could. Of course, antennas can be much more complicated than just a dipole, for example, you could place several dipoles in a row and feed them in phase so that their transmitted signals add together at points perpendicular to the row, and cancel each other at points in line with the row. Or, you could use a parabolic dish to concentrate the signals in one direction.

In radar, the radio waves travel out, bounce off objects in the their path, and a small fraction of the original signal comes back to the antenna. Depending on the design the radar might have a separate receiving antenna, or it might receive on the same antenna it used for transmitting. From a radio perspective, a receiving antenna is exactly the same as a transmitting antenna, only, it's the radio waves coming in through space that cause it to resonate instead of the other way around in a transmitting antenna.

Finally, the signal comes down the transmission line and into a receiver circuit which analyzes and extracts whatever data (in the radar case, it deduces distance and speed by looking at the elapsed time and frequency shifts).

</comment></comment><comment><USER23> I've always wanted a way to trigger the radar detractors that people use in their cars. I've noticed for a while that when a bunch of people suddenly move to the right lane there is usually a cop with a speed gun around, so sending a fake pulse periodically seems a sneaky way to clear the traffic ahead (but would only work when there was something solid to reflect the pulse back, sorry Kansas). I've not found anything on Google or Ali Express that looks like it might help me pull this off - nobody wants to build a Rasphberry Pi speed gun it seems.

<comment><USER24> I don't think your allowed in the US to send fake pulses. Something FCC...

Otherwise I'd think you'd see a lot of radar dector jammers on the market.

<comment><USER3> Laser and radar jammers do exist and is usually targeted at high end car folks. It's not legal obviously.

<comment><USER25> Radars jammers aren't legal (because radio waves are regulated by the FCC), but laser jammers are actually legal in most of the US (because light is regulated by the FDA):

[https://youtu.be/vQtLms02PFM](https://youtu.be/vQtLms02PFM) : popped out today on my YouTube feed, pretty relevant to this whole discussion (and also really worth talk)

</comment></comment></comment></comment><comment><USER26> Of course I knew that radar measured time of flight of radio frequencies, but it never occurred to me to actually look into the math. This was presented incredibly well.

</comment><comment><USER27> While this is a good intro, a lot of radar work now relies not on square pulses but linear frequency modulated (LFM) waveforms. This greatly expands the number of image formation algorithms you can use, depending on system requirements.

</comment><comment><USER28> Side note: Same technique can be used to track a cell phone, except GSM frequencies are higher so the tracking distance is considerably shorter then a normal radar. But still good enough to do a city wide track of a person of interest.

<comment><USER4> GSM frequencies (800, 1800 MHz) are about an order of magnitude lower than typical radar frequencies (~5-20 GHz).

<comment><USER29> Mode S is 1030/1090 MHz, and L-band/S-band Primary Surveillance Radars ('real' radars) are still quite in use, especially in ground-based surveillance or Air Traffic Management. In fact 4G and wimax were threatening civilian radar bands.

</comment></comment></comment><comment><USER30> Next level: [https://en.wikipedia.org/wiki/Synthetic- aperture_radar](https://en.wikipedia.org/wiki/Synthetic-aperture_radar)

</comment><comment><USER31> Thanks, this is a nice introduction.

Two typos in this sentence: _One way to work around this problem is to use a non uniform spaceing of the pulses which is none as staggering._ (spacing, known)

<comment><USER32> Even better:

One way to work around this problem is to use a non-uniform spacing of the pulses, which is called _staggering_.

</comment></comment><comment><USER33> Lovely introduction to pulsed radar systems. Would love a similar piece on continuous wave systems (fmcw, for example). Thanks for this!

<comment><USER3> Is CW used for radar applications? (I am only familiar with pulsed radar sets).

<comment><USER4> AFAIK not much in practice because it can only detect speed and has no real way of detecting distance. Most radar applications want to detect distance, usually enhanced to position, and speed as well. You can't really do that with CW.

<comment><USER10> FMCW (mentioned by 'itcrowd) can determine distance.

</comment></comment></comment></comment><comment><USER34> I've been watching a lot of those USS Nimitz UFO videos lately, so this is very timely</comment>


EWAH – A compressed bitmap class in C++ - <AUTHOR> https://github.com/lemire/ewahboolarray <comment><USER2> At first I found intriguing to see no mention of SDSL[1], which probably is one of the best libraries in the field of compressed data structures, including compressed bitmaps.

Probably because the index is built to answer a "different kind of queries". There is a blog commenting on those "other" queries[2]. In the same blog the author discusses some other compressed data structures included in the library.

1: [https://github.com/simongog/sdsl-lite](https://github.com/simongog/sdsl- lite) 2: [http://alexbowe.com/rrr/](http://alexbowe.com/rrr/)

<comment><USER3> a) The EWAH library is reference implementation provided to support the paper. SDSL is a library that collects together a bunch of such papers. It isn't odd that there is no mention of SDSL. It is a bit odd that SDSL makes no mention of any of Daniel's work.

b) I haven't used SDSL much or RRR bit vectors, but IIRC it's more designed for maximum compactness as well as quick popcount & select type operations. You can do that with EWAH, but a lot of the power of EWAH and its ilk (BBC, WAH, etc.) is with set operators like AND, OR & ANDNOT. Does SDSL have the same kind of optimizations?

<comment><USER2> The bitmaps in SDSL are indexed to support rank and select queries: How many 1's are from the beginning until position i, and conversely, which is the position of the j-th 1) [it uses popcount but is beyond it]

So yes, the problems they are solving are different, even though the input data is the same.

</comment></comment></comment><comment><USER4> We used this incredibly fast/compact library for Hustle DB indexes. Anyone needing a good Python interface to it could pry it out of the dependencies: [https://github.com/tspurway/hustle/tree/master/deps/libebset](https://github.com/tspurway/hustle/tree/master/deps/libebset)

</comment><comment><USER5> I have had good results using his roaring bitmap index. there is a Go and Java version in addition to C++

<comment><USER3> Lemire FTW. ;-) The Roaring bitmap index is kind of the successor to EWAH.

</comment></comment><comment><USER6> EWAH is "Enhanced Word-Aligned Hybrid", for anyone wondering.

(It also reminded me of the joke "Why does Edward Woodward have so many 'd's in his name?")

</comment><comment><USER7> I appreciate projects with README like this - one including a gentle survey on the domain of the project. Nice writeup.</comment>


Health.js: CPU usage streaming and notification for Node.js - <AUTHOR> https://github.com/last/healthjs

<comment><USER2> Can be useful for building a web dashboard and/or get and send notifications of remote systems' CPU usage. And this dashboard could be viewed from mobile devices too. Good.

</comment><comment><USER3> sudo apt-get install ganglia-monitor

</comment><comment><USER4> nice, thanks for this.</comment>