In defense of the Google Chef (2011) - <AUTHOR> http://blog.rongarret.info/2011/11/in-defense-of-google-chef.html <comment><USER6> "Charlie didn't make $20M for cooking, he made $20M for taking the risk that the company he was joining would fail and that he could end up five years older, unemployed, and with nothing to show for his trouble."

Precisely--and the article should have ended there. It's all about the risk. Arguing for the raw amount of contribution a chef can have is a distraction from the core point and detracts from it.

<comment><USER7> I don't think so. If it stopped there, he would only be a lucky gambler.

<comment><USER6> I'd characterize it as an _investment_ , rather than gambling.

<comment><USER8> I do not understand the difference between investing and gambling.

<comment><USER9> The level of confidence you have in the expected value.

</comment></comment></comment></comment></comment><comment><USER10> Having worked in a professional kitchen during my time at the university, I can second a lot of what the author wrote on the pressure while working (and I only had to feed about 70 to 100 guests during a normal evening).

So anybody taking him as an example for undeserved money, is just some big idiot (stronger words come to my mind, but have to stay there).

Look at very strenuous working-environments like drilling rigs or anything like this and ask anyone there, what role the "ship's cook" plays.

<comment><USER11> That's not the right argument to make in favour of him becoming rich - <USER2> you think all chefs deserve a $20m payout?

The argument is that he took a risk (presumably accepting a below market rate salary) and worked hard in the hope it would pay off, which it did. Sure, the fact that his job isn't piss easy to do, and is useful to the company, is what makes this argument work, but it isn't the argument in itself.

</comment></comment><comment><USER12> I don't understand why anyone would feel that the "Google Chef" scenario was a problem. By joining a young company, that probably can't pay you a market rate salary and that has a significant chance of failing, you are taking risks. You are compensated for those risks with equity.

It's an out of the money call option - you expect that 90% (95%? 99%?) of the time it won't pay out, but when it does pay out, the payoff could be anywhere from "pretty good" to "life changing".

Sure, the early Google employees are way out in the tails of the distribution (just like the early Facebook employees, early Twitter employees, early LinkedIn employees etc). But _someone_ has to be in the tails of the distribution, and the fact that you see someone there certainly doesn't mean that they don't deserve their payout.

<comment><USER13> >I don't understand why anyone would feel that the "Google Chef" scenario was a problem

This feels like classism to me. I think they'd have the same issue with a support worker or even QA making the same payday, no matter what their contribution was. Being compensated for taking risks is "for people like them".

<comment><USER14> bi~ngo

</comment></comment></comment><comment><USER15> "Zynga's argument is that they don't want people who joined the company early to get disproportionately large rewards compared to someone who joined the company later but contributed more."

And we can stop right here. That's an excuse, not a reason. It's purely PR bullshit to make it seem like they're trying to do something right. It's nothing more than the company (whether executives or investors) going back on their word when they realized how much money their stock was going to be worth at IPO. This is one of the biggest reasons I loathe Zynga.

</comment><comment><USER16> Regardless of whether or not one feels he's deserving of this - it's the payment all parties agreed to. Do companies now consider compensation notional? Should they be able to take it back whenever they feel like it? If they think that actually a chef was totally useless for the first year - <USER3> stop with options - why not make him pay back 50% of his salary?

This whole line of reasoning is senseless. Compensation was agreed to - <USER4> in the end Zynga valued their options less than they ought to have should be irrelevant to employees retaining them.

</comment><comment><USER17> Previous discussion:

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

</comment><comment><USER18> So what terms should employees ask for in their contracts to "avoid a Zynga scenario"?

Options automatically vest on firing? Options transfer to a major charity on firing?

</comment><comment><USER19> The OP completely missed the point on the value that Google Chef brought to google. One of the hardest things at a startup is hiring. Google Chef became such a phenomenon so fast that everyone wanted to work at google. He became the poster child of what it's like to work at google! "You even get a private Chef cooking for you."

<comment><USER20> I remember when a friend of mine went to work at Google, relatively early in their history. I'm sure he told me that there were smart people working there, working on cool things -- but I don't remember much of that. _What I do remember_ is that if he was going to be working late, he could order up a steak and it would get delivered to his office. _That_ anecdote stuck with me.

</comment></comment><comment><USER21> This was posted in 2011. Zynga is barely relevant anymore.

</comment><comment><USER22> Posting this on HN is preaching to the choir.

Early employees are rewarded for the risk taking first and their contributions next. Later employees are rewarded for making a well-running company better. That's what's profit sharing programs are for, not stock options.

<comment><USER23> Um checkout BT's share save that's just about to payout my mate is going to clear £60k tax free.

How many Sv options are worth more than say $100,000 after tax.

ps and the BT scheme is the grunt one gasp even clerical assistants and como's are allowed to participate

</comment></comment><comment><USER24> I wish more chefs got the opportunity to walk away with millions in stock options. Because chefs are some of the people who deserve it the most.

I spent a few hard years at a health food delivery startup in Oakland - <USER5> spent those years sometimes working in a support role for two different chefs that busted their ass like any other chef I've ever met. (I say support role because I was the server/dba/programmer at the startup but it was all hands in the kitchen when we got big orders. All hands in the kitchen starting at 4am, son.)

</comment><comment><USER25> First of all I find it inappropriate to discuss who deserved what.

Second of all, it is wrong to bring an example of a chef in the context of the problem of disproportionally large reward of people who joined the company early compared to someone who joined the company later but contributed more.

Early joiners get paid for the risk. They acknowledge the risk before joining the startup and have a choice. Unfortunately chefs don't have a choice and in most cases they have to accept what they are being offered, because there is no other alternative.

Third of all, paying $20M a chef can be treated as an extremely successful public relations move. This helped Google to gain that image of the "don't be evil" Robin Hood operating on the Land Of Opportunities. On the other side, rich Zynga executives paint themselves in evil tones when denying money from a poor chef.

The real question is what should be encouraged more: risk taking or professionalism. Zynga executives believe the later. Which probably reflects the fact startups are becoming more like corporations.

But this is a first world problem and has nothing to do with the poor chef who was lucky enough to win a lottery in form of Google.

</comment><comment><USER26> I won't even go into my opinions on what kind of people Zynga is run by... sheesh.

However, in my opinion:

The greater question here shouldn't be whether the metaphorical chef (or literal in Google's case) brought as much value in the in the early days as he or she receive(s|ed) after the IPO. It should be about 2 principles:

1\. The company gave a large amount of stock to employees at an early stage, which most definitely propelled the company to success, because the employees had an incentive to help the company succeed (see economics 101) 2\. The company gave a large amount of stock to employees at an early stage, which were quite valueless at the time, representing a risk on the side of the employee, assuming the stock was taken as (partial) consideration for employment 3\. The company gave a large amount of stock to employees at an early stage, and that's their own fault.

It seems the employees without preferred stock will be bamboozled at any rate.

</comment><comment><USER27> The comments of support on that site for Charlie really inspire me and show that there is still good in the world. He has $20m in the bank now, so he is happy, but like any young company, every role feels a part of the family and should be able to profit as such.

I would love it my company organised lunch for us.

<comment><USER28> "He has $20m in the bank now, so he is happy"

What?

</comment></comment><comment><USER29> Needs a 2011 tag

</comment><comment><USER30> Original HN discussion is here: [https://news.ycombinator.com/item?id=3223595](https://news.ycombinator.com/item?id=3223595)

</comment><comment><USER31> Oh man, we all need to get over ourselves on this one. The burden of proof is on us to show that he didn't provide value.

</comment><comment><USER32> Nobody needs to defend anything. People win the lotto all the time. Not just money, but looks, brains, etc. It's like telling someone 'you don't deserve that hot girlfriend, what did u do to earn it? hard work?'

</comment><comment><USER33> So people are upset that a chef who makes delicious food gets a big payoff, but not upset when moronic CEOs of financial firms run companies into the ground and then still take home millions of taxpayer dollars?

</comment><comment><USER34> This says much more about Zynga's values than it does Google's.

</comment><comment><USER35> I would like to ask laughinghan what sparked the interest in this article? It has been on the front page of HN before (and during laughinghan's tenure on HN), so I am really interested to know the though process about posting it again (it was the same article as before, but with a new link). I have nothing wrong with this being posted again, but I see it over and over again with numerous topics, and I do find it kind of fascinating. At first I thought maybe laughinghan was a newbie on HN, but that's not the case, so this just makes it that much more interesting.

You can read the comments from the last time:

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

<comment><USER36> I certainly don't think I see every story I would be interested in. I don't even try to see them all. Doesn't seem complicated.

<comment><USER37> Don't you understand? Someone else read it before, therefore that must you mean you've read it before. If you didn't read it before, it must not be worth your time to read it now.

I'm with you, I truly do not understand this need to point out reposts as a negative. Sure, point out that it is a repost with a link to the original in case someone wants to read the comments from that thread as well. But there's no need to be negative about it.

</comment></comment></comment><comment><USER38> Zynga chef, if they do have one, has probably been feeding pubic hairs to the authors of this bs. Since 2011.

</comment><comment><USER30> This again?

</comment><comment><USER39> Made-up controversy. If you don't see what is going on here, then fasten your seat belt because I'll tell you.

First of all, every decent human being is going to side with "the Google Chef" (you know, he has a name: Charlie Ayers). He took a risk and it paid off. He earned every fucking cent. If you really think "Google chefs" like Charlie don't deserve to get rich on their stock, then you're an asshole.

Now, let's look at why this controversy _really_ exists. It's to emphasize the elevation of the Second Estate (programmers, data scientists, designers) over the Third Estate (workers) for the benefit of the First (executives, VCs). The First Estate of the Valley works overtime on creating divisions between the Second and Third so that the bricks go through the windows of Google buses (Second Estate) instead of houses in Atherton. It's divide-and-conquer.

Investors and executives are going overboard to make the software engineers who keep the Valley running that they're a privileged class, and that they should be happy to deal with long hours, unreasonable expectations, low autonomy, fast and dishonest firing, and age discrimination because it could be worse, they could be "out there" preparing food instead of churning through Jira tickets.

It's like telling a shit-poor, clay-eating Southern white person in 1850, "cheer up, you're still above the slaves."

<comment><USER40> There always have been and always will be class divisions. Every society has a version of the phrase "Shirtsleeves to shirtsleeves in 3 generations." But now the slaves are free. We all get world class free public educations (ask the teacher unions.) We all have access to free graduate level education in technologies online. I'll brashly assert that class mobility has never looked better, and while they are possible, there are no real-world examples of a better society than ours (at least to my view).

</comment></comment><comment><USER41> [http://en.wikipedia.org/wiki/Just- world_hypothesis](http://en.wikipedia.org/wiki/Just-world_hypothesis)

The chef got $20M because Google gave him stock options early, which later became worth $20M. That's mostly all the explanation this needs. It's mechanical. If someone bought a house unwittingly, and ended up 100x wealthier because it was on an oil reservoir, I'm sure people would still be spinning pseudo-economic yarns about some specialized type of value he provided to society, but those people would be just as misguided.

I can't say that the "risk" related explanations that this thread is full of are completely wrong. There's some small element there. But it is wrong- headed. It seems like people are really saying "Well, what does PG say about startup lottery? Isn't it something about risk, or compressing work in a short time? Well, that must have happened here." Next, you'll tell me that everyone's pay is fair ... because markets!!

And on the human/gossip-level, no I don't begrudge him in the slightest.

Whoever a company decides is eligible for Startup Lotto, is eligible for Startup Lotto.

<comment><AUTHOR> Did you even read the article, or just these comments? Who is "spinning pseudo-economic yarns about some specialized type of value he provided to society"? In the article, someone who worked at Google literally _alongside_ "the Google Chef", Charlie Ayers, is testifying that Charlie Ayers in fact contributed as much to Google as many of the engineers that also got $20M, countering the widespread perception that Charlie Ayers got more than he deserved. Which may or may not be true, but your comment seems to be almost completely unrelated?

<comment><USER41> Hacker News commenters spin pseudo-economic yarns like frogs say ribbit.

If the really real reason why the chef made $20M is really because he contributed as much value as the engineers, and if that is not just a cheering sentiment, then we should be discussing why so many cooks are unfairly paid less than engineers. But that's not really what's going on here.</comment></comment></comment>


HTML only needs two verbs; throw away the REST - <AUTHOR> http://www.onebigfluke.com/2013/08/throw-away-the-rest.html

<comment><USER2> If we want to get rid of them, why not just stick with one? Before REST came along people were doing just fine using only POST for their APIs....

 _cough_ [http://en.wikipedia.org/wiki/SOAP](http://en.wikipedia.org/wiki/SOAP) _cough_

<comment><USER3> You are completely missing the point.

He's not saying that there should _only_ ever be two methods for http.

He's saying that rest media types should be free to specify their own verbs for interacting with them. HTTP 2.0 doesn't _need_ to specify the full set of verbs because REST allows implementers to define their own.

HTML defines two methods for interacting with services that use it as a media type: GET and POST.

Soap defines 1: POST. Both are restful.

Arguments about which one is easier to use have no bearing on whether it's restful or not.

You can define other standards on top of REST using your own custom verbs but those verbs do not need to be codified in http 2.0</comment></comment>


Faust – A language for audio applications and plugins - <AUTHOR> https://github.com/grame-cncm/faust <comment><USER2> I've used Faust quite a bit few months ago. It's very powerful and expressive, and targeting many different systems/platforms is no problem. I have used generated C code on bare-metal ARM Cortex M4F platform, which is some distance away of original scope of Faust project. It was fairly easy to do. The documentation is also well written and comprehensive, it gives you very nice introduction into functional languages, time-domain DSP, as well as explanation of some common applications (pitch detector, panner...).

Two downsides I noticed (maybe they are fixed in the mean time?) are error messages and block composition. Because of the way Faust compiler works, error messages are long and not very meaningful. Some expressions are merged and simplified before error is triggered, so it's difficult correlate the expression in error output with your source code.

The other problem is that once you have the basic blocks and want to merge them into complex system, the syntax suddenly gets in your way. You have to introduce dummy wires in some blocks just to get signal to its destination. The compiler can output graphical representation of code, but it would sometimes be much easier to use visual tool like the Simulink or LabView. Perhaps this is just tooling issue, but I found language syntax to be confusing and not scaling up properly.

</comment><comment><USER3> This looks interesting!

I make music and VSTs for fun.[0] In the past I used a framework called SonicBirth[1], but recently I've moved to "IPlug"/"WDL-OL"[2], which seems very professional to me in terms of capabilities. Looking forward to doing more of this, plenty of ideas..

[0] [https://github.com/Miserlou/Autopan](https://github.com/Miserlou/Autopan) [1] [http://sonicbirth.com/](http://sonicbirth.com/) [2] [https://github.com/olilarkin/wdl-ol](https://github.com/olilarkin/wdl-ol)

<comment><USER4> faust seems to be far away from VST visual creators.

</comment></comment><comment><USER5> Common Lisp Music has the best piano synth out of any of the music generation packages I've ever used:

[http://ccrma.stanford.edu/software/clm/](http://ccrma.stanford.edu/software/clm/)

</comment><comment><USER6> That language and framework is really interesting but I was wondering about the platform "VSTi (mono)". Does this mean that VST instruments produced with it can currently only be mono? That seems like an odd limitation, so wonder if I'm misreading this statement.

<comment><USER7> Presumably in the sense of "can only play one note at a time".

At a guess, the whole business of spinning up a new instance of the sound generator for each new note that's played, (or running a fixed number of instances, and dynamically allocating new notes whichever instance will be least disruptive, aka "note stealing"), and the other business of doing modulation (such as vibrato) that needs to be applied consistently across all instances of the sound generator... remains to be implemented.

In other words, it looks to me like Faust's focus at the moment is on describing the processing in the audio signal path. Polysynths require a whole bunch of cross-cutting management functions, outside of (and between) the (multiple) audio signal paths.

<comment><USER2> This is correct interpretation, you can have stereo output but your instrument can handle only one note at the time.

There are plenty of modern synths that have "mono" or "solo" option. If you play two notes at once, the resulting tone will slide from first note to the second. This is obviously very useful for playing melodies and keyboard solos where polyphony is often not desired.

BTW there are ways to use multiple mono-synths as a poly-synth, depending on VST host.

</comment></comment></comment><comment><USER8> This looks great. Does anyone have any pointers where to start with DSP audio programming?

<comment> squeaky-clean I'm just a hobbyist, but here's some resources that have helped me. My interests are specifically for musical applications, so that might affect some things.

"The Scientist and Engineer's Guide to Digital Signal Processing" is free online. This has been my most used text so far. [0]

Introduction To Digital Filters [1]. Another book free online. I haven't dug very deep into this one yet, but select chapters have been helpful so far. Juluis O. Smith III has several other books on the topic that seem useful too.

Earlevel's Wavetable oscillator tutorial. Create a mip-mapped wavetable oscillator in C++. A really nice balance of theory and practicality in both the explanations and code/ [2]

The music-dsp mailing list and the KVR DSP forum [3] have both been extremely helpful. I'd seriously recommend lurking the KVR forum for a bit if you're interested in musical applications of dsp. It's a bit like HN in that you'll ask "how do I replicate this 80's digital synth" and sometimes the original programmer will respond.

Aside from that, blogs specific to your interests. Plugin manufacturers can often get pretty technical on their blogs. I recommend reading through the archive of the valhalladsp blog if reverbs interest you.

And not DSP specific, but working on a fun project is always a good motivator. I started off with VSTs using I-Plug/WDL-OL. Now I'm using a Hoxton OWL (guitar pedal with a Cortex M4f) and have been much more productive than ever, just because the form factor and hardware are so fun.

There's lots of repositories of code examples. AudioTK has a lot of examples and is high quality, I feel [4]. MusicDSP has a TON of code examples, though not all of them are good quality or well optimized, it's like the stack- overflow copy-pasting of DSP, but still useful for the depth. [5] There's probably a hundred others, many optimized for specific hardware, but these are the 2 that come to my mind first.

Edit: Oh, there's also tons of MOOCs and online lectures about this as well. I won't offer any advice there though, as I don't learn well through those.

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

[1] [https://ccrma.stanford.edu/~jos/filters/](https://ccrma.stanford.edu/~jos/filters/)

[2] [http://www.earlevel.com/main/category/digital- audio/oscillat...](http://www.earlevel.com/main/category/digital- audio/oscillators/wavetable-oscillators/)

[3] [http://www.kvraudio.com/forum/viewforum.php?f=33](http://www.kvraudio.com/forum/viewforum.php?f=33)

[4] [https://github.com/mbrucher/AudioTK](https://github.com/mbrucher/AudioTK)

[5] [http://musicdsp.org/](http://musicdsp.org/)

<comment><USER9> Meta: what happened to comment favorites? Wasn't this feature recently added? I always come across link lists like this and want to save them, but I'm too lazy/busy to put them in a bookmark manager. Oh well. Nice comment, thanks for the resources. :)

<comment> squeaky-clean I can only see it when I click on the "X hours ago" link on a comment. Does it appear for you then? Also thank you!

<comment><USER9> Found it, thanks :)

</comment></comment></comment></comment></comment><comment><USER10> I know the guy who created this language. He is both passionate of programming and music. Very cool guy. To try the power of Faust. Check [http://faust.grame.fr/faustplayground](http://faust.grame.fr/faustplayground)

</comment><comment><USER11> If this tickles your fancy, you should also check out AudioKit an (mac|i|tv)OS framework for doing something similar.

[https://github.com/audiokit/AudioKit](https://github.com/audiokit/AudioKit)

<comment><USER4> the goal on faust seems to be portability... im not involved though so cant say for sure

</comment></comment><comment><USER12> I was amazed to attend a seminar on Faust by Yann Orlarey in Beijing last summer. I was the only one in that room who had a programming background and happened to know a little bit of functional programming.

</comment><comment><USER4> > For all these audio platforms you may have to install the related SDK and/or > development libraries.

what have put me off from developing on top of VST is that there is no decent multi platform sdk for it. i though this was the solution, but it only adds a convenience layer for the code, not for VST hell :(

<comment><AUTHOR> you can embed faust projects inside JUCE projects. here's one example:

[https://github.com/olilarkin/juce_faustllvm](https://github.com/olilarkin/juce_faustllvm)

</comment></comment><comment><USER13> Very cool, any chance faust could be used to generate LV2 plugins?

<comment><USER14> It can: [http://lac.linuxaudio.org/2013/papers/16.pdf](http://lac.linuxaudio.org/2013/papers/16.pdf)</comment></comment>


Mandatory encryption on XMPP starts today - <AUTHOR> http://blog.prosody.im/mandatory-encryption-on-xmpp-starts-today/ <comment><USER3> I'm hoping with the ousting of Vic Gundotra, Google will reenable XMPP federation with Hangouts...

For those unaware, for years GTalk supported using XMPP/Jabber to talk to other servers. A handle of email@example.com could speak through GTalk to someone using a different XMPP server with email@example.com.

With the introduction of Hangouts, this is no longer possible. In order to talk to GTalk users, you might be using a Google account.

Now before there's too much confusion: yes, Hangouts/GTalk users can still use XMPP _clients_ , like Pidgin or Adium, to talk to other Hangouts/GTalk users. But such users can no longer talk to people using the global federated XMPP network of servers that are not Google.

For years I enjoyed being able to run my own XMPP server, do some interesting things with it, and still talk to my friends and family on GTalk. Now I'm forced to use Google to maintain this.

In other words, they took a well functioning standard that was successfully decentralized, federated, and working extremely well, and deliberately neutered the decentralized aspects. Now there is the nice decentralized XMPP, and Google's XMPP, separate, distinct, broken. It's a damn shame. Gtalk federation worked great for years, and it's only been with the G+era strangulation that it's disappeared.

<comment><USER4> Know the worst part of Hangouts?

Using any client other than the crappy extension for Chrome, you can't do group text chats. Flamingo[0] is an amazing XMPP client for Hangouts, but is useless for work because we use group chats for everything.

Drives me crazy, and Google refuse to release an actual API for Hangouts, so it's not being fixed anytime soon. I'm trying to convince work to move to IRC or HipChat, or anything other than Hangouts (but my boss loves Google everything, so that's a losing battle).

[0] [http://flamingo.im](http://flamingo.im)

<comment><USER5> > and Google refuse to release an actual API for Hangouts

In old good days we didn't ask for protocols. We just took the specs by force, by reverse engineering. Worked well with ICQ, AIM, MSN Messenger and loads of others, except for, possibly, Skype (which was reverse engineered, but late to the party)

And "alternative" messengers survived and even prospered (seriously outplaying the dysfunctional, overweight and ad-ridden "official" ones), even if they were actively fought by network owners. Given that official Hangouts "desktop" app is is nearly completely unusable - and even more for those who don't use Chrome - and even web messenging support is lacking (you just can't put a button "Contact me on Hangouts" on your site), I'm a bit curious why no one cared about Hangouts enough to play that game once again.

<comment><USER6> > I'm a bit curious why no one cared about Hangouts enough to play that game > once again.

Maybe because Hangouts was created as an unwelcome product eating a completely functional service people liked.

Nobody wants to invest in a service which just told you to fuck off.

<comment><USER5> Well, anger may lead to various possibilities. I had reverse engineered certain cloud storage service client protocol when I was told there won't be any cake (properly functioning GNU/Linux client software customers were promised for a long time) for me and I have to fuck off. And I had not published it only because RE laws in my country seem to be totally messed up - they literally say I can't publish my findings. Wish I'd live somewhere saner.

Still, as I believe, quite a lot of people use Hangouts. Sure, there must be a hacker somewhere who's upset enough to mess with the software.

</comment></comment></comment></comment></comment><comment><USER7> Still wish I had an option for encryption. - certs cost money, which I (and many other people I know) CANNOT[1] afford. StartSSL won't give me a cert (they did previously, but want $$$ now).

This problem affects more people than you probably realize. Remember that 15% of the population (48 million people people)[2] in the USA are below the poverty line. The internet has already been a powerful tool, accessible in various ways even at this end of the income spectrum. Despite that, the PKI system is serving as a barrier-to-entry if you want to encrypt.

So I ask again: what is a _FREE_ option for SSL. TCP, HTTP, DNS and most other protocols work fine once you can send packets, and do not require an extra regular fee. SSL does.

Or is the intent to have secure communication only for those that can afford it - the rest of us doomed to plaintext or rejected as "self signed" by the SSL servers of the rich and middle class? Or are we supposed to only use the internet as if it was TV, and be forced to trust our plaintext with some 3rd party?

 _sigh_ \- I suspect the answer will instead be "[-1] Don't want to be reminded of the hard issues."

[1] I realize that the idea of not having an extra $15 doesn't make sense to those of you with salaried jobs. Well, lets see you come up with that extra $15 on a tiny SSDI check. Domain (3rd level) is free. Internet is very cheap and flat-rate. An extra $15 would be some new(-ish) _clothes_ , not a SSL cert.

[2] [https://www.census.gov/hhes/www/poverty/about/overview/](https://www.census.gov/hhes/www/poverty/about/overview/)

<comment><USER8> _> StartSSL won't give me a cert (they did previously, but want $$$ now)_

Do you have reference for that? I've been using their free certs for a few things for a while and a recent renewal was free. I'll be paying for one shortly, but that is only because I want a wildcard for one of my domains in order to save some faf.

I suspect your problem is the "third level domain" thing: they would effectively need to have permission from the over of the next level up to sign a cert on your behalf for one of their names (or you would need your domain provider to take part in the validation process).

 _> for those that can afford it - the rest of us doomed to plaintext or rejected as "self signed"_

That certainly isn't the intention of the security community, but until a method is found that allows certificates to be freely produced without the security risks involved with self-signed certs that is what we (well, those in the poverty trap) are stuck with.

How StartSSL arrange their business model seems to be one solution, your current problem above not withstanding. If the depth of your free domain is the issue then perhaps the solution lies with the domain registrant taking the cost of a wildcard certificate (~$30/yr with startssl, ~$60/yr elsewhere) and so their subscribers can use it for SSL. They would have to proxy web requests to you though (with something like nginx in a reverse proxy configuration), so it would not be a zero admin option and would cost them in extra bandwidth requirements too unless they already host your content (rather than just responding to DNS requests for content hosted elsewhere), otherwise the only way you could use the cert is for you to know the private key which breaks the assurance model completely. Perhaps you could convince a provider of third level domains that taking these steps could give them with a competitive advantage over similar providers who do not.

<comment><USER7> > I suspect your problem is the "third level domain"

That's one of the problems for me at the moment. A friend in a similar situation (but with regular .net domain) triggered one of their "must pay now" criteria (ref: the StartSSL business model).

They have worked in the past, and are _sometimes_ an option, but a "second source" is unfortunately necessary.

> That certainly isn't the intention of the security community

I don't really intend to make any accusations - take any harsh tone in my post to be a general annoyance at the current situation.

I appreciate the ideas about technical workarounds. They are similar to some things I've considered already, and might yet try.

I'm more concerned about a general solution to this PKI/cert problem - <USER2> and HTTP simply being the common examples. In reference to the manifesto linked at the top of this thread, the time to encrypt _everything_ is "now". This is a great idea, but it can't happen everywhere until the money-issue needs to be solved.

<comment><USER8> _> I don't really intend to make any accusations_

Your tone was actually fine, I put that there as a preface to the next statement (which was essentially "but that is the way things sometimes work out").

 _> I appreciate the ideas about technical workarounds._

Another suggestion you might try if you know enough reliable people in a similar position as you find yourself in (happy to have a third level domain but needing a certificate potentially for commercial use) who you trust enough to do business with: club together, and rent a normal domain and wildcard certificate with it.

Of course someone will have to take responsability handling the money, for technical admin, and for enforcing certain rules such as "nothing illegal otherwise we are all at risk" (this person will need to be trusted by the other parties, it goes without saying), and if a two-or-three $ per year is the maximum you can stretch to each then you would need a small number of tens of people in (more if you can each spare less) (domain + wildcard from StartSSL ~= $75/2yr ~= $2/year each for 20 people, still not free but an order of magnitude closer), and there is the support "risk" of not particulary technically minded peopel joining and needing hekp to setup/maintain things, so the idea might be completely impractical but nonetheless there is a chance it might be worth considering.

</comment></comment></comment></comment><comment><USER9> Luckily they don't require "valid" certificates at this time - trying to get all XMPP server operators to agree on a set of CA providers they all trust will be a nightmare.

<comment><USER10> A nightmare? What gives you that idea? There's free as in beer certificates from StartCom, and free as in freedom certificates from CAcert. Agreeing on those would go a long way.

<comment><USER9> There are parties vested in _not_ supporting CAcert - so that won't happen. But I'm not even talking about those: CAs centralize trust and trust on the internet is a hot topic right now.

Right now there's a certain homogenity in which CAs are supported by vendors. And for those that aren't, it isn't much of an issue in the web browser because users can manually click through.

Now consider the talk about "Why is CNNIC/TurkTrust/Symantec in my list?" that's raised by various parties recently (concerned about the influence the governments of China, Turkey and the USA respectively can exert), what happens when XMPP servers decide not to trust CNNIC (to pick one)?

Users will only notice in that they can't talk to peers. They won't know which server is responsible (or if maybe the GFW is kicking in) and there's nothing they can do about it.

From the point of server operators, with mandantory CA signatures they have to decide if they're rather willing to drop perfectly fine connections or if they're accepting "secure" connections subverted by parties they weren't willing to trust in the first place.

<comment><USER10> Yes there is a lot of red tape surrounding certificates, but I was specifically suggesting that the authors of XMPP clients and servers could agree on these 2 alternative CAs.

</comment></comment></comment></comment><comment><USER11> One of the big problems with XMPP security was testing the server's connection. It's worth pointing out that much of this move has been supported by @xnyhps project: xmpp.net. This lets you stick in an XMPP enabled site and see the results. For example: Google - [https://xmpp.net/result.php?domain=gmail.com&type=server](https://xmpp.net/result.php?domain=gmail.com&type=server) (nothing) and prosody.im: [https://xmpp.net/result.php?domain=prosody.im&type=server](https://xmpp.net/result.php?domain=prosody.im&type=server)

</comment><comment><USER12> Well, looks like this kills off my personal XMPP server - I don't think the software I'm using (djabberd) supports encryption for s2s connections and it's not really developed anymore. That's annoying.

<comment><USER13> Considered migrating to some other XMPP server software?

<comment><USER12> Most of the XMPP server software out there is neither lightweight nor easy to configure and there's no real migration paths between them. I probably don't even have enough system resources on my personal server to run some of the more well-known servers anyway; they tend to be oriented towards deployment on large multi-user systems.

<comment><USER13> [http://prosody.im/](http://prosody.im/) is pretty light weight and easy to configure. (I'm one of the devs)

I don't know how easy it is to move data out of djabberd but I'm sure we can help you with that if you can provide schemas or example data. :)

<comment><USER12> Yeah, was looking at Prosody. It's probably relatively simple in my case since I'm using the standard SQLite backends for roster storage etc. (Large-scale djabberd deployments likely aren't so lucky - djabberd was designed to make it easy for people to write code hooking in to their existing systems and many did. The only example I can find took a couple of months[1])

[1] [http://blog.fastmail.fm/2011/08/24/new-xmppjabber- server/](http://blog.fastmail.fm/2011/08/24/new-xmppjabber-server/)

</comment></comment></comment></comment></comment><comment><USER14> Looks like things started moving for OTR support in Telepathy: [https://bugs.freedesktop.org/show_bug.cgi?id=16891](https://bugs.freedesktop.org/show_bug.cgi?id=16891)

ZRTP however is still stalled: [https://bugs.freedesktop.org/show_bug.cgi?id=29904](https://bugs.freedesktop.org/show_bug.cgi?id=29904)

</comment><comment><USER15> XMPP is an awful protocol [1] [2] .

\--

[1] [http://about.psyc.eu/Jabber#Technical_Issues_in_Jabber](http://about.psyc.eu/Jabber#Technical_Issues_in_Jabber)

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

<comment><AUTHOR> Two clearly unbiased and factual analyses there :)

It would take quite some time to sit down and address all the points gathered on the PSYC page. That page has been around a long time, and used to be a lot more aggressive than it reads now. At one point it even contained a quote from a mailing list post of mine, snipped to remove just the right amount of context. I'm glad to see they've cleaned it up a bit, to at least make it appear somewhat more objective, even if they still think it's objective to make technical statements like "XMPP isn't proper XML".

One of its main points is of performance and scalability. Well I'm afraid that horse bolted - for nearly a decade Google have been successfully running (one of?) the world's largest IM services using XMPP.

Regarding your second link, well, that seems to be set on comparing XMPP to IRC:

 _> A protocol that, despite an immense range of features, can easily be typed by a human on a telnet prompt, in real time._

Making a protocol that could be typed over telnet obviously wasn't the goal of XMPP. For what it did set out to do - create an open standard IM protocol to give normal people a path to freedom from the old IM silos that were around 10 years ago - I'd say it has been pretty successful. Maybe not as successful as one might have hoped, those silos are still around, but for political and commercial reasons rather than technical ones.

</comment></comment><comment><USER16> What happens to group chats? as far as I know encrypted group chat is still not supported yet?

<comment><AUTHOR> It's possible to achieve quite secure group chats in XMPP, as long as you have a server that you trust (emphasis on that last part). You're probably talking about OTR though, which is quite tricky for multi-party situations.

This isn't XMPP's or OTR's fault - from a high level to have a secure multi- party discussion, every participant must individually verify every other participant. This creates a lot of overhead with large groups. What you can do instead is to delegate your trust to, say, a key member of the group - if they trust every member, so do you. This is the model that XMPP supports. Set up a server that only accepts encrypted and securely-authenticated connections (using whichever mechanism you have the most faith in) and only grant access to the room to trusted individuals.

<comment><USER5> I had heard TextSecure/WhisperPush (which uses OTR-like protocol with similar properties) has multiparty/group secure conversations. However I'm unaware of any attempts to apply those to XMPP MUCs, neither I've seen any vetted solution for end-to-end encrypted MUCs.

</comment></comment></comment><comment><USER17> You're still trusting the server. This is only a gain if you were already the one running the XMPP server with everyone you talk to.

Use a real end-to-end solution to this problem: OTR.

<comment><AUTHOR> OTR only protects the text content of your messages. It doesn't protect the metadata, or many of the other features XMPP provides from status to file transfers and voice/video calls.

<comment><USER14> For media calls there is ZRTP.

<comment><AUTHOR> I'm not an expert in this field, but as far as I know ZRTP trust is bootstrapped from the signalling channel (in this case your XMPP connection). So a MITM there could also MITM your voice/video.

And again, your metadata and signalling would still be exposed without encryption - along with your IP addresses (ICE candidates), etc.

</comment></comment></comment></comment><comment><USER18> How about switching away from XML!

<comment><USER19> Why?

What potential gain could possibly justify breaking the entire protocol and extension-ecosystem?

<comment><USER10> XML has a large amount of overhead, both in bandwidth and parsing (have a look at the amount of XML that is exchanged just for logging in with XMPP). For low powered devices and low bandwidth connections such as with mobile devices, there is an undeniable gain.

It's not necessary to break anything, just as TLS and compression are optional features of the connection, something like switching to ASN.1 would be possible, given a mapping of a pre-defined subset of the main XMPP protocol and commonly used extensions.

<comment><AUTHOR> [http://xmpp.org/extensions/xep-0322.html](http://xmpp.org/extensions/xep-0322.html) (originating from the IoT community, where XMPP is commonly, and successfully, used on embedded devices like you describe).

Just please don't mention ASN.1 again :)</comment></comment></comment></comment>


Ask HN: If you were starting from scratch again, what language would you learn first? - <AUTHOR>

5-6 years ago, if you were just getting started, you only had a couple of choices, now there are dozens of choices. If you were starting from scratch again which language would you pick up first? <comment><USER2> Python! Instead they tried to teach me pascal! A language that simultaneously sucks and isn't used that much! Good thing I forgot it all after I stopped learning it. Well, okay, maybe it didn't suck, I can't remember, but I tend to forget bad memories, so it probably did.

Then again, technically I didn't learn that much pascal anyway, so I don't really count it as my first language(and there was logo before it, but I learned even less of it).

</comment><comment><USER3> Assembly language.

I firmly believe that people will never use high-level languages well until/unless they understand how those high-level languages translate into machine code.

</comment><comment><USER4> Scheme, because of this book:

<http://mitpress.mit.edu/sicp/>

Why argue with the MIT folks?

Followed immediately by: C, Javascript, and a scripting language (Ruby or Python are good choices).

You've also got to work Java in there somewhere, just so you know where people are coming from. It could come first, or last, depending on your tastes.

If you love Windows technologies you can probably substitute C# for one of those things. Maybe even for several of them. I have never seen .NET but I hear good things about it from those who have.

If you can't stand SICP, or can't follow it (perhaps because you are seven years old?) then the initial choice is harder. Javascript is sitting on your desk right now, so it's an obvious possibility. Try Ruby or Python. Or just give in and learn PHP like everybody else seems to do. You'll run into problems, but you can fix them later.

<comment><USER5> Why argue with the MIT folks? Because even MIT changed its intro programming class's language from Scheme to Python.

That said, I would still have liked to learn Scheme or a Lisp as a first language. It's a tiny language at its foundations and allows you to express many different computer science concepts with little effort. Also, it's much, much easier to write a Scheme interpreter in Scheme than a Python interpreter in Python.

</comment></comment><comment><USER6> Python. I actually wanted to learn it in earnest around 2001-02, but never really pushed myself.

Given that I'm now attempting to make it my primary language, especially since django came out, I would love to have had 6-7 years of experience behind me.

</comment><comment><USER7> Python, then LISP and (SML or Ocaml), then C and assembly and compilers, then Python again.

Though I like what Norvig said in <http://norvig.com/21-days.html>

"Use your friends [...] Keep it simple. [...] Play. [...] Given these criteria, my recommendations for a first programming language would be Python or Scheme. But your circumstances may vary, and there are other good choices. If your age is a single-digit, you might prefer Alice or Squeak (older learners might also enjoy these). The important thing is that you choose and get started."

</comment><comment><USER8> 5-6 years ago there were only a "couple of choices" compared to "dozens" now?

Nearly all of today's practical languages were around 5 - 6 years ago.. Perl, Python, C, C++, Java, Ruby, JavaScript, etc. Of the major languages only C# wasn't particularly well developed at that point (and Ruby lacked a good usage case at the time).

I doubt many here will chose a language that's come along in the last 5 years (Io, Clojure, Scala).. though I'd like to be surprised :)

</comment><comment><USER9> I started with assembly, moved to C, dabbled in C++ and some of the microsoft solutions (c#, VB), then moved to ruby for web stuff...

Cant say I would want to learn in a different order, but I do wish I would have moved out of my assembly language stage faster...

</comment><comment><USER10> I'd still choose Java as my bread and butter language.

</comment><comment><USER11> C.

</comment><comment><USER12> C</comment>


I Challenge You to Debug These 7 Lines of Code Under 9 Minutes - <AUTHOR> http://www.theodo.fr/blog/2017/02/i-challenge-you-to-debug-those-7-lines-of-code-under-9-minutes/ <comment><USER2> Experienced in Python? This will take you less than one minute.

<comment><USER3> The first line tipped me off :p

         def foo(a, methods=[]): # methods defaults to [] if not specified
         ohno.

<comment><USER4> I got that one, but the rest confused me - I need to work with lambdas more!

</comment></comment></comment><comment><AUTHOR> It's mystifying to me that the author comes to the conclusion that the solution to this is to educate people on debugging tools and edge-case semantics. The reason the code is difficult to debug is because the "bug" is that functions are apparently completely broken and violate every reasonable assumption anybody is likely to make about them without a priori knowledge about this specific edge case. Why isn't the conclusion then, that Python is broken, and has a serious and fundamental problem? Why doesn't anybody see this as a "broken window", that leads us as a culture to believe that this sort of thing is acceptable and to be expected and not an ugly, horrible, and utterly unnecessary problem? Is this really the language we're supposed to teach to beginners? How many combined hours have been wasted on solving problems generated by this behavior, and for what purpose? I don't understand why people accept this.

</comment><comment><USER5> It took me a minute to see the problems, but - not having touched Python for over a decade - I can't for the life of me bring the lambda to capture the value of the variable.

I know this doesn't work (because python assignment rules)

        def foo(a, methods=[]):
        m=[];
        for bla in methods:
            m.append(bla)

        for i in range(3):
            k = i
            m.append(lambda x: x + k)

But this should work, according to quick'n'dirty google (because default assignment), and yet it doesn't.

        for i in range(3):
            def bar(c, d=i): return c+d
            m.append(lambda x: bar(x))

EDIT: Ok, I'm something missing here.

This doesn't capture the value of i

        for i in range(3):
            m.append(lambda x,i=i: x+i)

But this does. WTH?!

        for i in range(3):
            m.append(lambda i=i: i)

<comment><USER6> That's an interesting try! I think the default assignment is done by reference as well, so when i changes in the loop the default value changes as well? Similarly to methods=[]. Can't say for sure though. The solution I give in the article is the only one I could come up with, I'm interested if you find another one :)

<comment><USER5> Ah - the answer was so simple: I'm an idiot.

        for i in range(3):
            m.append(lambda x,i=i: x+i)

actually works, I just had a brain fart. :)

</comment></comment></comment><comment><USER7> Great intro to PDB, but I have to be critical of: "The second group took 9 minutes on average, and the first one 14 minutes! Those are not completely statistically significant, but that's still a 35% speedup on an 8-line-long program."

If you want to talk about statistical significance, don't say "not completely". It either is or it isn't. If you think the p-value is important (and I'm not saying it is, but don't bother mentioning it if you don't think it is), then you can't claim a 35% speedup. If you're reporting results in the context of significance, and you decided that your results were not significant, then the 35% speedup is meaningless.

<comment><USER6> Article author here. I agree with your point, I shouldn't have been so cautious. I consistently observed people being faster when using debuggers and I wanted to give it a test on this problem. Most people don't see that they can get a significant speedup in using debuggers, so that sentence wanted to give a sense on how much quicker you can be. I'd be happy to hear of a better way to convince a non-debugger user that he could have debugged this code faster with a debugger!

<comment><USER7> Well I was convinced :) If it were me, I'd probably just remove the mention of significance -- or if you have more people and some time you can probably set up a proper experiment, control for some confounds and you'll probably get significant results.

</comment></comment></comment><comment><USER8> "If I lied, you are allowed to insult me abundantly through your favorite channel."

Haha racket can here is how.

        #lang racket

        (define (foo a [methods empty])
          (let ([methods
                 (append methods
                         (for/list ([i (range 3)])
                           (lambda (x) (+ x i))))])
            (for/sum ([m methods])
              (m a))))

        (foo 0)  ;; Should be 3
        (foo 1)  ;; Should be 6
        (foo 2)  ;; Should be 9
        (foo 2 (list (lambda (x) x)))  ;; Should be 11
        (foo 0)
        (foo 1)
        (foo 2)

        ;; Now the wrong way

        ;; The lambda capturing wrong
        (define (foo a [methods empty])
          (define i 0)
          (let ([methods
                 (append methods
                         (for/list ([z (range 3)])
                           ;; modifying the variable i
                           (set! i z)
                           (lambda (x) (+ x i))))])
            (for/sum ([m methods])
              (m a))))

        ;; this one doesn't do the default parameter wrong, because
        ;; methods and methods-default share an imutable list and we
        ;; modify only methods so beside "empty" they won't share the same
        ;; reference anymore, to get it wrong we should use a mutable list
        ;; (doesn't exist in racket).
        (define foo
          (let ([methods-default empty])
            (lambda (a [methods methods-default])
              ;; (printf "~a ~a\n" (length methods) (length methods-default))
              (define i 0)
              (for ([z (range 3)])
                (set! i z)
                (set! methods (cons (lambda (x) (+ x i))
                                            methods)))
              (for/sum ([m (append methods methods-default)])
              (m a)))))

        ;; So i use a box to make it mutable.
        (define foo
          (let ([methods-default (box empty)])
            (lambda (a [methods methods-default])
              ;; (printf "~a ~a\n" (length (unbox methods)) (length (unbox methods-default)))
              (define i 0)
              (for ([z (range 3)])
                (set! i z)
                ;; methods and methods-default share the same reference of box.
                (set-box! methods (cons (lambda (x) (+ x i))
                                        (unbox methods))))
              (for/sum ([m (unbox methods)])
                (m a)))))

The moral of the story, language design matter, immutable by default is good, lexical scoping is good, binding over variable is good, ruby, python, php and javascript (the languages the author mention) are bad in that regards.

One thing php, ruby, python (but not javascript) has good over racket their identatation tend to be flat and racket (let form, no return statement) tend to go all the way to the right.

<comment><USER6> I'm glad I haven't been insulted yet

</comment></comment><comment><USER9> Is this a designed feature or something that just happened? I really think that this behaviour is erroneous and unexpected.

With python (and many other languages) I find myself getting bitten by behaviour like this every now and then. I use scheme for almost all my personal projects, and I can only remember getting bitten twice. Once was unexpected, and the other was laziness on my part.

<comment><USER10> Basically it just boils down to reference vs value. Both of the errors in this code occur because python uses a reference instead of a value – I agree that they can be annoying and somewhat unexpected, but they make sense once you realize what's behind them.

In the method=[] part, the error occurs because python creates a single list, and passes that list by reference (as all lists are passed) into the function.

In the lambda part, the error occurs because python captures the variable from the enclosing scope by reference, not by value (as normal functions do with globals).

<comment><USER11> I understand the "capturing i in a closure by reference" part, since that error is also common in other languages which capture variables by reference, and don't create a new reference per loop iteration.

However the default parameter issue looks like a python specific issue which is really strangely designed. I would normally say [] is a literal for an empty list which creates a new instance of an empty list every time it's used. So when it's used as a default parameter a fresh empty list should be created all times.

Is [] is global reference to a single mutable list which is only initially empty? That would make it pretty useless, since everyone could mutate it. If it's a single reference then that should at least be an immutable list which throws some exception when someone messes around with it.

<comment><USER3> >Is [] is global reference to a single mutable list which is only initially empty?

No, the problem is default arguments to methods are evaluated once, when the method is created and that value is used for all calls. I don't know why that is, its definitely strange - any other language would evaluate the default args each time a function is called just like the regular args.

<comment><USER12> Then you would have the problem that something like mydefault=3, def f(default=mydefault):... would change it's evaluation if anyone ever defined mydefault=4. That would leave users unable to define any variable thats ever mentioned in default values of any function in any library they are using without causing very unexpected behaviors.

What languages are you thinking of where default values set to a references are set to a copy of that reference as it was at definition time at every evaluation?

<comment><USER3> Not sure if i completely understand, but the example you mentioned would work in Scala. If a mutable variable is referenced in default args, its value at define-time is used.

Example:

        scala> var x = 5
        x: Int = 5

        scala> def func(arg1: Int = (x+1)) = { println(arg1)}
        func: (arg1: Int)Unit

        scala> func()
        6

        scala> var x = 7
        x: Int = 7

        scala> func()
        6 //unchanged

For reference vars the closure captures a local copy:

        scala> var list = List(1,2,3)
        list: List[Int] = List(1, 2, 3)

        scala> def printList(arg1: List[Int] = lis) = { println(arg1) }
        printList: (arg1: List[Int])Unit

        scala> printList()
        List(1, 2, 3)

        scala> var list = List(4,5,6)
        list: List[Int] = List(4, 5, 6)

        scala> printList()
        List(1, 2, 3)

</comment></comment></comment></comment></comment></comment><comment><USER13> The fact that "methods" is somehow kept defined in the scope of the function _and preserved when you call it again_ and isn't always reinitialized to [] is just dumb. No wonder this was a bug, who the hell would see that and how is this "feature" ever useful except to create bugs?

<comment><AUTHOR> It's absolutely insane that this is apparently the expected behavior. It makes no sense whatsoever except to give people who know this an ego boost when they can successfully work around Python's unintuitive semantics while inexperienced people cannot. It completely breaks functions, the most fundamental unit of encapsulation and abstraction in every modern programming language.

<comment><USER13> It's surprising how few languages actually support anonymous functions _with closures_ properly.

Not to plug my 2 favorites that do (Ruby and Elixir/Erlang) or anything...

</comment></comment></comment><comment><USER14> It's a common JavaScript interview question to ask about capturing variables in a closure.

What really frustrates me with go is that it doesn't have a mature debugger so I have to resort to inserting print statements everywhere.

<comment><USER15> So long as you are not using cgo, the VSCode debugger (which uses Delve as the backend) is fantastic. cgo breaks everything[1].

[1]: [https://github.com/golang/go/issues/10776](https://github.com/golang/go/issues/10776)

</comment></comment><comment><USER16> Worth bearing in mind that if you develop and ship software to third parties, you're going to want a lot of debug statements in the logs, so don't omit them completely!

</comment><comment><USER17> Took me less than 7 minutes with a single print statement. I'm a FE developer though, and python feels awfully similar to JavaScript.

<comment><USER6> Just one? I guess you found out about the methods default value this way, did you find the other one by eye?

</comment></comment><comment><USER18> This is a common mistake in pretty much any language that captures a closure inside a lambda: C++, JS, etc. Unfortunately, debugging this the first time takes 20 minutes; the next time, it takes 0 seconds.

<comment><USER19> > common mistake in C++

Not really. You have to explicitly specify you want capture-by-reference with C++ lambdas.

The code would also look very out-of-place to a C++ programmer, because you would never capture a loop counter by reference if you intend to use the lambda outside of the loop. Lifetimes don't just get magically extended into completely unrelated scopes.</comment></comment>


Microplastics now being found in human organs - <AUTHOR> https://www.independent.co.uk/environment/microplastics-pollution-oceans-human-organs-a9674701.html <comment><USER2> This reminds me of George Carlin: "The planet will be here for a long, long, LONG time after we're gone and it will heal itself, it will cleanse itself cause that's what it does. It's a self-correcting system. The air and the water will recover, the earth will be renewed, and if it's true that plastic is not degradable, well, the planet will simply incorporate plastic into a new paradigm: The Earth plus Plastic. The Earth doesn't share our prejudice towards plastic. Plastic came out of the Earth! The Earth probably sees plastic as just another one of its children. Could be the only reason the Earth allowed us to be spawned from it in the first place: it wanted plastic for itself, didn't know how to make it, needed us. Could be the answer to our age-old philosophical question: "Why are we here?" PLASTIC!!! ASSHOLES!!!"

<comment><USER3> I get where he's coming from but there's a limit to this kind of thinking... If you treat everything as nature's course, there's no reason to do anything. For example pollution can cause diseases for people. It's not some abstract thing.

<comment><USER4> George Carlin is a comedian. He's telling a joke.

<comment><USER3> Yes, I know. I've seen it used enough to motivate the do nothing attitude that it's worth mentioning.

<comment><USER5> Seems more like a "DO SOMETHING" rant to me...</comment></comment></comment></comment></comment>


What Is the Male Marriage Premium? - <AUTHOR> http://econlog.econlib.org/archives/2012/02/what_is_the_mar.html <comment><USER3> There may be one under-reported angle on this.

[https://www.researchgate.net/publication/264513198_Penalizin...](https://www.researchgate.net/publication/264513198_Penalizing_Men_Who_Request_a_Family_Leave_Is_Flexibility_Stigma_a_Femininity_Stigma)

There is clearly a correlation between men having children and men getting higher salaries, and the reverse for women. However, this may reflect the fact that women are more likely to withdraw from work to take care of children (regardless of whether they'd prefer to), and men may double down on work.

Women are more likely to incur a penalty for taking time off due to child care needs, but that is largely because they are more likely to do so in the first place. Men do this much less often. However, there is evidence that the relatively small number of men who do this pay an unusually heavy career penalty for it.

This can be a problem for women. If we reduce the stigma for taking time off and provide generous leave, but only for women, but penalize men for doing this, then we actually end up putting even more pressure on women to carry this obligation.

<comment><USER4> So, is it fair to pay women less?

/dons firesuit

Discussing marriage, pregnancy, childbearing status or the like is an absolute no-go for employers. So, the ideal solution is to consider all women capable of this.

Because of women's protected status of childbearing and leaving/returning, it would seem from a pure business perspective, that women are liabilities that can leave the job at any time and get it back, legally. What is this... scheduling latitude actually worth? I'd really like to see statistics on this. But on a sniff-test, this seems probably true and the reason why women are paid less: more risk.

Men don't have the same options here, at least in the US. Ideally, to "Level the Playing Field", I'd like to see men with the same rights as women. But alas, we're not really headed into more workers' rights territory.

<comment><USER5> From an individual homo economicus perspective, paying people who have heavy life obligations like kids less than people who can work tons of hours is rational. That's why government regulation is important if we want a different result.

<comment><USER4> > From an individual homo economicus perspective, paying people who have heavy > life obligations like kids less than people who can work tons of hours is > rational.

Oh absolutely. That's why I'm coming at this from a purely business/economics viewpoint. It's stark, dehumanizing, and pretty damned depressing.

I'd also argue, it's very much true (as in, fact practiced regularly, not a value judgement).

> That's why government regulation is important if we want a different result.

I agree. However, the majority party in office (in the USA) now wants nothing more than to repeal any and every business law and regulation. I do not see us little people with getting these kinds of equality laws passed. If anything, I'd expect that the meager protections women have would arguably be demolished.

<comment><USER6> >It's stark, dehumanizing, and pretty damned depressing

Most of all it's pretty short sighted and myopic. Even from a strictly economical perspective, and assuming all of the above is correct, we need new generations of people to be born, and someone needs to take care of them.

If women would be penalised for taking time off they would be less inclined to have children, at least if they have a well paying job. The long term consequences of that are quite bad.

Greedy algorithms are never optimal in macro economics. The local maxima are never global.

<comment><USER3> It is a problem. In some ways, this is why I'm ok with the government setting the rules, sometimes fairly strict ones. One example might be laws limiting business hours, or laws the make a certain amount of vacation leave mandatory. They violate individual freedom, but they may also make it possible for people to close shop or take a vacation.

Sweden recognized this problem - it created very generous programs for women, but realized that this was providing an incentive for women to leave the workforce, often in their 30s, an important decade for rising through the ranks, while men remained in the workforce. They then created more generous incentives for me, but discovered that the men weren't taking them - <USER2> because of social and organizational pressure not to (perhaps related to the article I posted above). They finally created a very generous "use it or lose it" system where the men were just walking away from too much benefit not to take the policy, and I believe launched a major campaign to get men to take the leave. The idea is to create enough of a critical mass that the "male child leave" stigma would fade and this would become the norm.

<comment><USER6> Well Sweden doesn't really have the same views on "individual freedom" as the US, but even here a lot of people were upset at the "mandatory" 3 months to be taken by the father when it was instituted.

Even as a fairly libertarian person, I didn't mind it, since it's just an option, nobody's forcing anyone to take it. And nudging fathers to take a more active role in child rearing is definitely a good investment for society, even economically speaking.

I'm not sure it had much of an effect though, at least in my circles I haven't noticed any big shift in paternal leave taking. And I must say that at certainly for the last 10 years there's been no stigma at all around it, again in my circles.

</comment></comment></comment></comment></comment></comment></comment><comment><USER7> Follow up posts:

What Is the Female Marriage Penalty?

[http://econlog.econlib.org/archives/2012/02/what_is_the_fem....](http://econlog.econlib.org/archives/2012/02/what_is_the_fem.html)

Policy Implications of the Marriage Premium

[http://econlog.econlib.org/archives/2013/03/policy_implicat....](http://econlog.econlib.org/archives/2013/03/policy_implicat.html)

9 Short Observations about the Marriage Premium

[http://econlog.econlib.org/archives/2013/03/22_short_argume....](http://econlog.econlib.org/archives/2013/03/22_short_argume.html)

</comment><comment><USER8> They missed the obvious: Married men are more productive because they have a woman at home doing the "women's work." This both raises their quality of life AND frees up both time and energy to put into their job instead of into self- maintenance.

I have seen this from both sides of the equation: I was a full time wife and mom for a lot of years. Then, I got divorced. I told my sons I would rather they take over the "women's work" so I could put more into my job than for them to get some kind of part time, minimum wage job.

This is basically a form of transferring her energy to him and the employer paying for getting the extra energy and mental focus he can now bring to the table. This works reasonably well (societally speaking) in a traditional society where women are primarily homemakers and moms. It works less well in a world where people are getting married later, we are actively discouraging people from having more kids because there are already more than 7 billion people on the planet, etc. We need to find another answer, one that allows for young, single people, childless couples, etc to all have full lives. Otherwise, it is just the married men who get The Good Life and everyone else is shorted.

<comment><USER9> This falls under the Explanation #2: Human capital. By the way, the post does not mention whether the study controlled for wives staying at home.

<comment><USER8> Except for the detail that the article entirely credits the man with being more productive and in no way whatsoever suggests that his wife's work in any way whatsoever contributes to it:

 _Maybe marriage makes men work more hours; maybe it makes them work harder per hour; maybe it makes them control their tempers better; maybe all of these and more._

It gives zero credit to the wife somehow genuinely enhancing his life by cooking, cleaning, having sex with him, etc. It just suggests that married men choose to be more virtuous. Done.

<comment><USER10> Yeah, the omission of unpaid female labor at home as a factor to consider is glaring.

<comment><USER8> Thank you.

</comment></comment></comment></comment></comment><comment><USER11> In my own case, I'm working and making as much as I do because I'm married and have kids and my wife is a stay-at-home-mom. This is still a very socially acceptable arrangement.

If I weren't married with kids, I'd be a semi-retired snowboard instructor. I am _not_ driven by my career at all. I'm good at it, and I make good money, but I wouldn't otherwise be doing it.

<comment><USER12> Right! I guess economically you are "more productive" than your unmarried counterpart but it's important to note this isn't the result of natural ability manifesting in greater likelihood of being selected by a partner (utter nonsense) but rather, now that you have a partner you have a responsibility to someone else to maximize your income.

<comment><USER13> I'll be married myself in a month and the mere thought of children at some point in the future has caused me to begin accepting any overtime offered to me. I can't imagine a more powerful motivator except a gun to my head.

</comment></comment></comment><comment><USER14> They routinely give the men with children/wives the better hours, pay, and whatever else at my work. They just changed several peoples' schedules so that my peer could have Saturdays off with his kid. Contrast that with myself: I have requested the same shift and been denied. I don't have kids. I also have better reasons to be on that shift. In my anecdotal experience, it appears classist. I would file that under 'human capital'.

<comment><USER13> You say you have "better reasons", childcare is pretty important when you consider all the downstream effects. Are you certain you are objective on this?

<comment><USER15> It shouldn't matter if his reasons are he wants to sit at home, get high, and eat doritos.

Businesses aren't families, employees shouldn't be discriminated against because another employee needs/wants help.

<comment><USER16> It's possible that the business is making a bet that the married person needs better compensation to be stay at that job, simple supply and demand.

OR, as the article states, it has nothing to do with marriage and the married person is better at their job and gets to push their weight around more where scheduling is concerned.

</comment></comment></comment></comment><comment><USER12> I didn't get much past the 3 hypothesis in TFA because I stopped and had to ask, isn't it obvious that married men earn more because they have to in order to support their families?

It seems to me that the biggest factor in earnings is how hard you work. Nothing quite as motivating as needing to support your family... Married men earn more because they have to.

There is definitely a secondary effect I have seen though, it seems like having kids can boost your salary independent of ability/productivity due to the boss believing your are justified in asking for more money. Pay is set more based on what your boss thinks you need than what you are worth.

<comment><USER17> Your points are encompassed in hypotheses #2 & #3...

<comment><USER12> Not at all! Married men are certainly not more productive because they are married -- marriage, and kids in particular, are a massive _drain_ on productivity.

And being married certainly isn't a signal of being more productive, if anything the opposite.

I think the OP is assuming far more rationality in wage-setting than actually exists.

A single man in his 20s or 30s will be way more productive than the married man with the same experience. But the married man will be paid more "because he has a family to support."

<comment><USER18> You want stereotypes? OK, I'll give you stereotypes.

A single man in his 20s is a slacker. He works hard enough to not get fired, and not much past that. A married man of the same age works hard enough to try to get promoted so he gets paid more. Which is going to be more productive? (Yeah, I know, you say the married man has a lot more distractions - but the single guy is hitting Tinder every minute his boss's back is turned. That single guy is _less_ distracted? I doubt it's an unambiguous win.)

<comment><USER12> I think the ambiguity is between productivity as a result of feeling compelled to work, versus productivity as a result of being more competent.

I think people confound competency into the so-called "marriage penalty" and think along the lines of "more competent workers are more suitable mates and therefore more likely to be married".

But I think it's more likely the increased productivity (if there is any, as there are clearly countervailing forces) is a result of being compelled to work harder because there's a family to support.

So it's not at all clear to me that there's some positive signal to employers from being married. Certainly in the end the married guys get paid _a lot_ more though!

</comment></comment></comment></comment></comment><comment><USER19> In the U.S., even with the ACA, it's still easier to have health insurance through your job. When I was single and solely responsible for having health insurance, I couldn't as easily jump back and forth between contract jobs and permanent jobs. I couldn't take advantage of high pay with no benefits like I can now.

My wife having good family health insurance has allowed me to be more aggressive about opportunities.

I know other people who own a business and their wife works at low paying government jobs with good benefits.

</comment><comment><USER20> Would have been interesting to see a breakdown by dual-income vs single- income, unmarried with/without dependants, etc.

If you get married, and find yourself supporting a spouse, and potentially, children, you have new motivation to make more money.

<comment><USER21> On the flip side, if you find yourself with a partner at home who isn't employed, you may work longer or harder because you feel less pressure to cook and clean.

<comment><USER22> That depends on the partner...

</comment></comment></comment><comment><USER23> Have they controlled for age? Or is that included in their claim of having controlled for experience?

Older men are more likely to be married (since finding a partner takes a variable amount of time, and the marriage rate is higher than the divorce rate). And salaries also tend to go up over time as employees build their careers.

This would of course be part of the author's "Explanation #1: Ability bias.". I'm just surprised that this sub-explanation isn't explicitly called out.

<comment><USER24> Yes, it is mentioned further in the series they have controlled for age. How effective that control was is not described. I'd like a full methodology.

</comment></comment><comment><USER25> I'm noticing that the right type of girl stimulates me to be a better me. It also stabilizes my sleeping rhythm.

\-- not married by the way, just my observations with GFs

<comment><USER26> I agree. There's a measurable relationship "bonus" to my life in happy relationships - having someone who double checks my logic, notices things I missed, works when I'm sick, etc. make things _much_ smoother.

</comment></comment><comment><USER27> Until a couple weeks ago, I worked at a large Bay Area tech company with very generous parental leave. I noticed that a lot of people there were having kids.

I think it makes sense from a conpany perspective, because having kids (and a marriage) seems to make people much more risk-averse, so they're more likely to stay at the nice, stable company.

Which is helpful for the company when attrition is one of your big problems.

</comment><comment><USER28> Suggested reading related to the topic: Smart & Sexy by R. Kaynes ([https://www.amazon.com/Smart-Sexy-Evolutionary- Underpinnings...](https://www.amazon.com/Smart-Sexy-Evolutionary- Underpinnings-Differences/dp/1910524743))

I wonder how he would comment this study...

\- higher IQ men are more likely to get married (because a higher IQ gives them an advantage hence they are more desirable to women), and higher IQ men earn more

\- married men have more pressure to dedicate their time and effort to provide for their family, hence they end up earning more

\- married men have more pressure and make different career choices to better provide for their family

\- this is a small leftover from a past, more conservative, more family oriented society (before women entered the workforce) which valued married men more (because more useful to society)

</comment><comment><USER29> I don't really see a full fledged regression analysis here: [http://econlog.econlib.org/archives/2012/01/the_college_pre....](http://econlog.econlib.org/archives/2012/01/the_college_pre.html)

There are several potentially correlated variables (College grad and cognitive ability?). That's not necessarily a problem but I think it would necessitate showing different models, not just one.

It's also atheoretical - it's not advisable just to slap a model together and find regression coefficients with high t-stats. In economics, it's important to start with a believable hypothesis grounded in reasonable theory.

This study is like a half-hearted attempt at exploratory data analysis - half- hearted because only the results of one model are shown and there are no charts or graphs to give a feel for the data.

You really can't just jump to a conversation about causes unless you've done more work on the data (maybe Caplan did, but he really needs to show it to stimulate the conversation he wants to have).

</comment><comment><USER30> I think it's mostly of the first. Having an income makes dating easier, having a higher one makes it even more so.

One way to test that might be to follow a group of unmarried men who are all the same age, and then 10 years later and compare the still unmarried with the long-time married (5+ years).

</comment><comment><USER31> Enjoyed the analysis.

I wonder if our educational system will ever reach the point where the layperson doesn't immediately think "I should get married to increase my income".

Tho many people seem to believe that moving to the Bay Area will increase their earnings... post hoc ergo propter hoc.

<comment><USER32> If the third hypothesis (signaling) is correct, then you _should_ get married to increase your income.

<comment><USER33> If domestic partnerships are still possible in the bay area (they were when I lived there 5 years ago). You can get all the upsides without the downsides (taxes & AMT).... and just call the other person your partner, they'll assume you're married.

</comment></comment></comment><comment><USER34> How much is the unmarried disparity correlated with divorce?

For people paying a % of income in child support/alimony, the incentive to make more money is often missing or inverted.

</comment><comment><USER35> It would be interesting to see the number of working hours for married men vs unmarried men. And I guess that data should actually be relatively simple to get.

That could explain some unanswered questions in this article. I.E. If a married men is working more time than an unmarried one, that would be a good indication that a married men felt more pressured to work more after getting married and that was where this premium was mostly coming from.

</comment><comment><USER36> There is absolutely no reason to believe that restricting your data to shotgun weddings would control for the things that they claimed to be controlling for.

<comment><USER37> The number of confounding factors is enormous.

1\. The man may be more likely to acquiesce to the wedding if they have a stable income and can support a family.

2\. The interested parties on the bride's side may be more interested in pursuing a shotgun wedding if the man has a stable income.

3\. The same reasons that lead women to pursue marriage with high-income men may also lead them to pursue pre-marital unprotected sex with those men.

I'm sure you can think of more. This seems like a very suspect way to segment a population.

<comment><USER38> It's even further compounded by the fact that weddings with preconceived children are unlikely to be genuine shotgun weddings in 2017. The social pressure to reluctantly marry after conception is drastically less intense than it was 60 years ago.

<comment><USER26> They'd probably need to conduct them in the regions where the "shotgun" part isn't a metaphor, like deep Appalachia or rural Missouri. I'm from Missouri and I promise, it's not always just a figure of speech.

<comment><USER38> If they did so, then the scope of their study wouldn't be national; it would only be regional. It wouldn't be relevant to national employment.

</comment></comment></comment></comment></comment><comment><USER39> I'm not buying the article's premise, i.e. that pay is determined by productivity or its fascimile. As a counter-hypothesis, I offer the following:

Men are selected / promoted / rewarded based on reliability, women on desirability.

By reliability, I don't mean something mechanical such as defects per million, but closer in meaning to political reliability -- the tendency to adhere to norms and expectations.

By desirability, I don't mean attractiveness, though that might form the largest component, but also availability (would she like me if our situation were a little different?)

</comment><comment><USER40> I've always wondered what, if any, is the multi-generational benefit/penalty of mothers working full time in lieu of raising their own children.

</comment><comment><USER41> I'm 41 and am hoping to be engaged very soon (god and my gf willing!). I sure as hell don't expect to earn a raise. lol

</comment><comment><USER42> Isn't obvious?

Higher value men are more likely to get married (He's a "good catch")

<comment><USER22> That's assuming there's high-value women to be had. From what I hear, that's just not the case in Silicon Valley; the single-male/single-female ratio is horribly skewed. I also hear Seattle is almost as bad. Over in NYC, however, there's scads of single women who can't find a boyfriend.

</comment></comment><comment><USER43> 1\. Women seek men with high income,

2\. Having a housewife leaves the man with more free time to work.

See, no need to make a study.

<comment><USER44> > _2\. Having a housewife leaves the man with more free time to work._

That's hypothesis 2 of the three that they looked at, that marriage "makes a man a more productive worker".

There is a need for a study. What if employers are simply assuming that married men are better workers (hypothesis 3), but married men aren't actually better workers? Than as an unmarried man, I'm getting discriminated against, and marital status is a protected class. This is good shit to look at.

<comment><USER43> I forgot 3, then:

3\. Employers assume married men, especially if they have children, are hard workers and responsible

<comment><USER44> I'm glad you're being complete :)

But, can you see why it'd be good to study this? Which one of the three is it? Or if it a mix, and what is the mix?

<comment><USER43> Of course it would be good! My comment was facetious... in part ;-)

</comment></comment></comment></comment></comment><comment><USER45> Let's read this through the current hysterical liberal lens: unmarried men are unacceptably discriminated! Companies must publish statistics on how they pay married vs unmarried male employees. And they need to train their staff to understand and fight their own bias against unmarried men! The reason for this imbalance can only be outrageous discrimination. Anyone who thinks or suggests otherwise should be silenced.

<comment><USER46> It sounds like you're looking through some kind of lens that makes liberals look hysterical to you, and you sound pretty hysterical about liberals yourself. You should get your prescription checked, because you're seeing things that aren't there.

Remember: liberals are the one who are for paid family leave, which today's "family values" conservatives are against (except for themselves). [1]

"Speaker of the House Paul Ryan drew scrutiny this fall when he said, "I cannot and will not give up my family time" as a condition of his speaker candidacy. Ryan, who is a devout Catholic, has opposed family leave measures proposed over the past several years. A spokeswoman for Ryan declined to share the office's policy on family leave for its congressional employees." [2]

[1] [http://abetterminnesota.org/2016/05/conservatives-rally- agai...](http://abetterminnesota.org/2016/05/conservatives-rally-against-paid- family-leave/)

[2] [https://www.washingtonpost.com/news/acts-of- faith/wp/2015/11...](https://www.washingtonpost.com/news/acts-of- faith/wp/2015/11/30/in-the-paid-family-leave-debate-pro-life-pro-family- groups-parental-leave-policies-are-all-over-the-map/?utm_term=.4bc1b4d503d8)

<comment><USER47> Paul Ryan did not pass a law requiring the government to offer him family leave. He set the expectations of the people who were considering electing him.

This is the same thing as telling the job interviewer that weekends are off- limits. Ryan is negotiating for himself, not using the government to enforce the policy on an employer who is otherwise unwilling. That is 100% consistent with his political position. He is not in favor of making family leave illegal, he just opposes making it mandatory.

<comment><USER46> Is your point that it's technically legal for him to be a huge hypocrite totally lacking in empathy and compassion? I'll grant you that.

<comment><USER47> My point is that he's not being hypocritical.

There's a difference between believing something should be guaranteed by law and negotiating that same thing as a perk of your employment package.

<comment><USER46> I see you can use it in a sentence, but I don't think you really understand what the word hypocrisy means.

</comment></comment></comment></comment></comment></comment><comment><USER48> This is pure causation. Men with more income and stability in their lives are more capable of attracting women, therefore more likely to be married. How could they miss such an obvious answer?

<comment><USER49> "Explanation #1: Ability bias. The causal effect of marriage on male income is smaller than it seems....Maybe income makes it easier to attract a spouse".

<comment><USER42> Yep. No need to make a study.</comment></comment></comment>


Show HN: Low-frequency Bitcoin/altcoin trading bot - <AUTHOR> https://github.com/nfriedly/Coin-Allocator

<comment><AUTHOR> It's a command-line tool, but I have it running on heroku using their scheduler add-on. I'm up 15% since I started working on it a month or two ago :)</comment>


You're bad at entrepreneurship. Plain and simple. - <AUTHOR> http://www.startupplays.com/blog/how-entrepreneurs-learn/

<comment><USER2> Agree that procedural knowledge is important. But I think the critical decisions that make a startup a success or failure don't have a specific procedure as they're unique problems that nobody has every faced before. I also believe that moving out of the box is the only way to truly take what you've built and make it much bigger than it is.

<comment><AUTHOR> lets take optimizing a facebook ad for increasing paid traffic.

1\. take 50 images all else equal, put budget against the 50 ads, find top 5

2.take 50 headlines, rotate against top 5 images all else equal. determine highest performing picture headline combo by CTR.

... rotate in variations of body test, rotate in coloured borders on images...

Now, build an audience of facebook users using demographics, interests, job titles, pages liked.

This is procedural, and a better starting point that will save you thousands of dollars in paid traffic.

<comment><USER2> Completely agree, but what about understanding who that customer is, connecting the right features with the right group of people with the right marketing. That kind of information has a lot of theory but not a step by step guide guaranteeing success. I suppose this is more idea decisions and direction decisions rather than implementation but I think my point still applies.

</comment></comment></comment><comment><USER3> LOVE This! Entrepreneurship is rough.</comment>


Ask HN: What do you think of someone getting a GED and moving to the valley? - <AUTHOR>

What are your thoughts on a 16 year old getting his GED and graduating high school a bit early to pursue his dreams as an entrepreneur?<p>He's getting ready for his first round of funding for his start-up, but school is a problem for him, and he can't manage both. <comment><USER2> You have to follow your heart. I graduated high school early because I hated it too. It is never to early to start building those relationships and the valley is the place where age doesn't matter. Many of the very successful people are self taught and just followed their passion. Don't listen to me or anyone else, you have to do what is right for you with the information that you have.

</comment><comment><USER3> I think graduating early is the most under-rated approach to High School there is. On the other hand, cutting off one's formal education at 16 is likely to be a severe handicap for most people over the long term.</comment>