URL query parameters and how laxness creates de facto requirements on the web - <AUTHOR> https://utcc.utoronto.ca/~cks/space/blog/web/DeFactoQueryParameters <comment><USER2> Years ago I worked on Google Maps, we spent an inordinate amount of time making sure that we didn't break backwards compatibility. Sometimes we would be trying to refactor some old code, but we'd get stuck trying to support some ancient client that was sending us like 4 requests a day with some wacky query parameters.

On the other hand, our Maps still worked on all 5 Blackberries that people were still using.

<comment><USER3> Err, from a user perspective you actually spent an inordinate amount of time changing things for the sake of it.

It was really annoying.

Google APIs have always been some of the worst.

It honestly felt like ever time I had to use the maps API for a client, you'd changed the whole thing.

<comment><USER2> Yeah, I think people felt less compunction changing the published APIs. I was talking about the "internal" APIs, especially the tile API which still serves ancient clients.

<comment><USER4> That is an _extremely_ strange order of priorities, right?

<comment><USER5> Probably because the "internal" API was used by someone who paid a lot of dollars?

</comment></comment></comment></comment></comment><comment><USER6> My favorite story to tell in this area: many years ago in the early days of Chrome, there was some logic that followed HTTP redirects that had a cap on how many redirects to follow before giving up. (The rationale here is that if you hit too many in a row you probably had encountered a broken site , like one where /foo?q=1 redirects to /foo?q=2 redirects to q=3 and so on).

As I recall, the cap on redirects was 10, and then Darin (who had previously worked on Firefox) was like "no, you have to allow up to 30 or you break the New York Times". And so, it was upped to to 30. Intuitively I'd think a site that redirected you 10 times was broken, but I guess someone built one that needed more.

PS: Looking online now to confirm my facts, I see one claim that both Chrome and FF limit redirects to 20. So either my memory exaggerated it as 30 or they both managed to lower the limit at some point.

<comment><USER7> What could they be doing with all those redirects?

<comment><USER8> Run you through all the spying services' cookies & other fingerprinters. Just like Twitter's t.co.

<comment><USER9> IIRC you can mitigate this by lowering network.http.redirection-limit

<comment><USER10> Wouldn't that prevent reaching the page?

<comment><USER8> It would prevent reaching the page, _and still give your contact to trackers_ \- you might just prevent one of the last ones from running.

</comment></comment></comment></comment></comment></comment><comment><USER11> > One of the ways that DWiki (the code behind Wandering Thoughts) is unusual > is that it strictly validates the query parameters it receives on URLs, > including on HTTP GET requests for ordinary pages. If a HTTP request has > unexpected and unsupported query parameters, such a GET request will > normally fail.

This goes counter to the robustness principle: Be conservative in what you do, be liberal in what you accept from others ([https://en.wikipedia.org/wiki/Robustness_principle](https://en.wikipedia.org/wiki/Robustness_principle)).

<comment><USER12> The robustness principle is widely considered to be a bad practice these days.

Strictly failing is a good thing, generally. Accepting arbitrary query parameters is pretty much a de facto exception though

<comment><USER13> As an example, rejecting unrecognised query parameters can cause ossification of web protocols. For example, I do a lot of work with OAuth and it is accepted security best practice now to use PKCE [1] on all authorisation requests [2]. However, despite the OAuth spec saying that authorisation servers MUST ignore unrecognised parameters [3], there are many major services that fail if you add a PKCE code_challenge parameter. This means generic client libraries either don't implement PKCE or have to maintain a list of sites that don't work (which gets stale over time) or have some risky downgrade logic.

So there is a tradeoff between strict validation and allowing future expansion and upgrades. By all means strictly validate the parameters you need, but maybe don't reject parameters you don't recognise.

[1]: [https://oauth.net/2/pkce/](https://oauth.net/2/pkce/) [2]: [https://tools.ietf.org/html/draft-ietf-oauth-security- topics...](https://tools.ietf.org/html/draft-ietf-oauth-security- topics-15#section-2.1.1) [3]: [https://tools.ietf.org/html/rfc6749#page-19](https://tools.ietf.org/html/rfc6749#page-19)

<comment><USER14> The same thing happened with TLS!

TLS 1.2 has a field for the protocol version during negotiation. The spec says that you're supposed to proceed with the lower version if the other party claims a version higher than yours.

Turns out in practice that some implementations just decided to give up instead. This meant that it wasn't possible to increase the version number for TLS 1.3, because advertising it would break a lot of people's connectivity. Instead, TLS 1.3 uses the 1.2 version, and added ANOTHER field containing the real version.

So Google introduced GREASE in RFC 8701. Long story short, Chrome now advertises a bunch of bogus extension values, thus making sure that implementations can't simply ignore unknown values.

This makes it a lot more likely that future cipher additions will not break older clients, which is pretty damn important for something as critical as TLS.

<comment><USER13> Funnily enough, I actually suggested we adopt something like GREASE for OAuth parameters: [https://mailarchive.ietf.org/arch/msg/oauth/Rqxs- QDqqdQkt36S...](https://mailarchive.ietf.org/arch/msg/oauth/Rqxs- QDqqdQkt36SO915gJJU0dI/)

There wasn't a lot of support.

<comment><USER15> That list archive suggests that although there wasn't a clamour of applause for the idea at least some people were receptive. However it also suggests that there were plenty of more subtle incompatibilities which GREASing just this one place wouldn't solve.

It also seems like you admit that in other places ForgeRock is also doing something that's unsound:

> (Basically there are quite a few clients that use JSON mapping tools with > enum types - List<JWSAlgorithm>. I know there are parts of our own codebase > where we do this too).

<comment><USER13> Well like any large codebase there will be things that need improving. The handful of places where we have similar issues are relatively unlikely to cause a real problem in the near future.

</comment></comment></comment></comment></comment></comment></comment><comment><USER16> While I respect sticking to your guns, I don't think we're putting that genie back in its bottle. Maybe a reasonable middle ground, like a less-fraught version of the HTTPS redirect, would be to have any requests containing unknown query parameters redirect to the URLs with those parameters stripped. It does nothing to deter the people slapping them on there, but at least your visitors don't spread that plague by sharing your URL.

Of course, it all comes with the problem of needing to define up-front which query parameters your app accepts. Easy in a small app, wildly impractical in a large one with plenty of legacy code.

<comment><USER17> Better yet, send people to a trampoline page saying "You have followed a broken link. Did you mean to visit ...". Let people get the content, but rub their face in the fact that Facebook is breaking things.

<comment><USER18> What is that even supposed to accomplish other than signalling to the visitors that a) you dislike Facebook, b) you don't mind punishing others for what you perceive to be Facebook's wrongdoings? Make them abandon Facebook? Make them make Facebook to do things your way?

<comment><USER17> It probably wouldn't have any effect on Facebook. But if every link from Slack was hitting a page like this, Slack would fix it, because it makes them look stupid to their technical audience.

</comment></comment></comment></comment><comment><USER19> > If a HTTP request has unexpected and unsupported query parameters, such a > GET request will normally fail. When I made this decision it seemed the > cautious and conservative approach, but this caution has turned out to be a > mistake on the modern web.

For a web page it might be a mistake. For an API it's often not a mistake, depending on the utility of the API. eg analytics reporting.

</comment><comment><USER20> Git is another offender here. When they decided to switch to the smart protocol by default, the Git people decided that the way to probe for server support was to append a query parameter to the resource. Extra parameters are ignored by default on Apache (or something), and it worked on whatever the committer tested it on, so that became how Git worked. Whereas the parameter is part of the smart protocol, any server that supports it will give a response in line with what the smart protocol dictates, and the client will proceed with having recognized a server with smart protocol support. Dumb servers who ignore extra query parameters and respond with the kind of thing that dumb servers respond with will be treated as having no support for the smart protocol, and the Git client will allow the connection to fall back to the older protocol. Meanwhile, you can have a server that only supports the dumb protocol but _doesn 't_ ignore extra parameters, and so the switch in the client defaults just broke all transactions with those servers. The Git developers either didn't test it or didn't care. And something that makes the whole thing particularly silly/frustrating is that HTTP already has ways to do content negotiation which could have been used in lieu of the boneheaded scheme they came up with.

</comment><comment><USER21> >Today's new query parameter is 's=NN', for various values of NN like '04' and '09'. I'm not sure what's generating these URLs, but it may be Slack

For a vague parameter like "s", my bet it's probably due to bad code rather than intentionally added. eg. someone constructs a URL but forgets to escape the components, and later (or downstream) some other programmer decides to "fix" it by using encodeuri ([https://developer.mozilla.org/en- US/docs/Web/JavaScript/Refe...](https://developer.mozilla.org/en- US/docs/Web/JavaScript/Reference/Global_Objects/encodeURI)), which "works", but mangles the url

<comment><USER22> Actually, I think Twitter adds "s=NN" to their URLs when you share them depending on your device. It's something like NN=19 for Android, 20 for Windows, and 21 for iOS.

<comment><USER23> I REALLY hate that sharing URL. Makes me have to do another click to see the actual thread with replies directly. A subtle, but, to me, important difference.

</comment></comment></comment><comment><USER24> IMO, query (search) parameters are originally designed for remote database search and forms. search criteria and form fields are often contain optional and conditional fields (conditional ie. only meaningful if some other field checked or having some specific value). but clients send them anyway because the logic (what is optional and which field depends on which) is known by the server. that's why client side programs consider server-side programs being lax accepting any parameter. however appending various cryptic 1-letter parameters without knowing the target http resource's semantics is unclever, since get parameters are part of the url, so changing them changes the url itself, so the new url does not necessarily points to the same resource. IMO, it's the web's originally visioned concept of identifier–resource-relation which is not adhered in today's websites. and this leads to dirty workarounds, unnecessary complexity and security holes.

</comment><comment><USER25> The enpoint is possibly not the only adressee of the parameter. They may go to some middleware component. Or the JavaScript in the browser. So it makes sense to take parameters as messages that you ignore when unknown.

<comment><USER26> but then the middleware or js could just strip out it's extra params. Though that invites it's own problems - e.g. if the application actually used the `s` param, and something came along and started using it too... but this case is in general a world of hurt.

I'm not really sure why we'd want a world where the server doesn't know about all query args, but seems like we're already stuck with this.

</comment></comment><comment><USER27> Perhaps a general compromise is to generate a rel=canonical link [1] that only includes directly supported query parameters.

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

</comment><comment><USER28> Well, I believe in Postel's Law. Any opinions on the utility or danger of redirecting to the canonical URL instead?

E.g. I don't want anyone's campaign tracking tokens in the referer of our outbound links, or in URLs being shared around by copy-paste from the address bar.

However I also don't want to inadvertently create a mechanism for someone to mechanically enumerate our routes (which we already see routinely attempted via return-path parameters), or walk into any similar trap besides.

<comment><USER29> Referenced (only partially quoted, and wholly unheeded) in the article, Postel's Law, also known as the Robustness Principle, says "be liberal in what you accept, and conservative in what you send."

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

</comment></comment><comment><USER30> Bypass the (proxy) cache: add a query parameter with a random value in it. Forgot, why I needed it but back in the day it was a big deal.

<comment><USER31> I worked at a few marketing shops a while ago where we would manually increment a cache-busting query parameter any time we changed static assets (e.g., `/css/style.css?v=20100908`). We configured Apache to tell the client to cache these resources for a year, and this was a fairly common way of getting around that.

Forgetting to update this ended up be a common source of bugs.

</comment></comment><comment><USER32> Do those extra parameters break caches? The browser's cache doesn't know it's the same URL. Does Cloudflare? Akamai?

<comment><USER33> Yes and no. I believe all CDN have config available to put no query params, all query params or specific query params into cache keys. Whether people us that options is a different question.

</comment></comment><comment><USER34> Reading this article I start to wonder about how common parameter collision is in the wild.

Probably, your service doesn't have any 'utm_*'-parameters not intended but I could see 'fbcid' being used for other ids than just Facebook clients and 's' is so generic that it must clash with thousands of services!

</comment><comment><USER35> It's worth mentioning Postel's Law:

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

That said, query parameters on a GET are one thing, but unexpected arguments on CLIs are another, especially when the command can change/delete files, so I can see both sides of this.

</comment><comment><USER36> I mean, that's almost the same debate as XHTML vs HTML5 of yesteryear...

Some people want strict requirements, but "whatever works for the end-user" usually wins.

...and as a result, we got monstrosities like user agent strings. But that's something we need to deal with I guess

</comment><comment><USER37> I have a hard time understanding why one would care about such things. Just ignore additional query parameters you don't need and be done with it forever, what's the problem with that? Is it really worth writing a rant?

<comment><USER38> The reason is stated towards the end:

> In general, any laxness in actual implementations of a system can create a > similar spiral of de facto requirements.

Those "de facto requirements" mean that writing something simple becomes inordinately complex because noone fixes broken clients. And you can't test changes because you don't have access to these broken clients.

It also leads to nasty bugs. For example, if you ignore extra parameters and provide defaults for others, now a misspelled parameter will silently fail.

The best example is how hard it is to write a browser. The standards are very complex, but it's magnified by the complexity of supporting "real," namely broken, HTML and CSS. That's contributing to the browser mono-culture.

<comment><USER18> Well, the alternative is that somehow you end with technology that no one bothers to use. Laxness allows to have multiple early, lazy implementations interoperate more or less correctly. Yes, in the later stages you end up with loads of technical depth and oligo- or mono-culture.

</comment></comment></comment><comment><USER39> The logic is incoherent. Strictness creates requirements too.

<comment><USER40> The article isn't arguing against requirements existing, it's arguing against being bound to de facto requirements because you allowed a client you don't own to depend on behavior you didn't specify. (See Hyrum's Law: [https://github.com/dwmkerr/hacker-laws#hyrums-law-the-law- of...](https://github.com/dwmkerr/hacker-laws#hyrums-law-the-law-of-implicit- interfaces)). By limiting the scope of unspecified behaviors, you also limit the scope of what makes for a de facto breaking change.

</comment></comment><comment><USER41> Something similar to URL query parameters is cookies. Most servers will ignore unknown cookies, but not always. The Great Suspender Chrome extension inserted tons and tons of cookies into various domains for some users, and there were so many cookies that this broke Google sites for some users.

[https://github.com/greatsuspender/thegreatsuspender/issues/5...](https://github.com/greatsuspender/thegreatsuspender/issues/537)</comment>


Grey hair may have roots in immune system: Research Highlights - <AUTHOR> https://www.nature.com/articles/d41586-018-05053-9 <comment><USER2> The first line of the article is a good summary: " _Grey hair may sprout when the immune system is activated by infection_ ".

I wonder if the fact that aging is characterized (among many things) by higher levels of inflammation, may explain why we get grey hair when we age?</comment>


Winner of The Attention Contest - <AUTHOR> http://dilbert.com/blog/entry/winner_of_the_attention_contest/ <comment><USER3> I might be odd, but what I find more interesting than the short article itself is comparing the Scott Adams edited version to the original. I'm a rather poor writer, so this is a concrete example of how to improve.

The original (Search for 'Lukeout'): [http://www.dilbert.com/blog/entry/the_attention_contest/?Cmt...](http://www.dilbert.com/blog/entry/the_attention_contest/?CmtOrder=Rating&CmtDir=DESC&x=31&y=17)

<comment><USER4> Here's a diff between the old and new versions:

<http://drp.ly/13YD4B>

<comment><USER5> That's a fantastic link. I just spent ten minutes reading through each version and checking for how Scott Adams reorganized the story. What program did you use to generate that view?

While looking at the diff, some of the edits struck me as overly formal - <USER2> as the hyphen, the elimination of the preposition at the end of a sentence and especially the use of the word "whom". I didn't notice a single one of those things while reading it in the article, though. It just flowed nicely.

<comment><USER6> I find the addition of the final sentence to be pretty bold. It was entirely fabricated by Mr Adams.

<comment><USER7> I don't, but then I have worked as a copy editor :)

The words were added by him, but functionally it sums up the point of the story extremely well: we associate art with creativity and inspiration, but leveraging that requires both teamwork and the confidence to trust your teammates. Many otherwise talented people fail in this area; I have, at times.

The version which ended with him saying he answers the phone with similar enthusiasm is not bad, but rather than concluding it just stops; the suspended quality is the equivalent of the awkward conversational pause where someone tells you a story and you're not quite sure if they've finished or not. If you read/hear the story as originally written, it's like a a rough canvas in a cluttered artist's studio: pretty, but increasingly hard to recall in detail as time goes by.

A strong conclusion emphasizes the underlying point and provides a contextual frame for the work, setting it apart from what surrounds it. Notice how the author's 'punchline' on 28/29 was 'made the phone call, changed my life' and he concludes by saying that his friend/mentor died, but keeps him motivated. Adams keeps it on the emotional level, moving from elation/triumph to wistful maturity, giving the advice (to make that call) far more impact: the closing sentence does not reinforce _how_ he got the job - which is the substance and satisfaction of the story - but wonderfully articulates _why_ he got it: because the artist was wise enough to learn from his audience. I could go on at length about how many levels this sentence works on, but its very best aspect is that it would work _just as well_ as an intro to the story:

      - Oh look at (impressive work), creator is/you are so awesome.
      - Yep - but there's more to (field of endeavor) than what you see here. Let me tell you a story about a guy named Keith...

Of course the story is not about Keith, per se; it's about the complex relationship between fear and ego, and how giving up control can be so much more fruitful than jealously defending one's territory. This is what makes it a much more compelling nugget than, say, another tale of making nine cold calls to reach that one customer. The latter is like a story which seems genuinely amusing, but 'you had to be there'. The well-framed story is like the professional comedian's version that everyone can appreciate - 'it's funny because it's true.'

This offers a technique that can be used in many, many contexts, from motivating yourself to communicating with your customers. Ask yourself: what is the point of what I am trying to do here? What is my basic agenda? In short, answer the basic question of _why (do you/should I care)?_ Write that down: whatever you're doing, it's basically your 'mission statement'. Answer that, and the questions of _how_ becomes much easier to articulate and to answer. When you're done, cut the beginning, and rewrite into a firm conclusion. Instead of requesting attention and then struggling to pay for it, stimulate curiosity and then supply a satisfying resolution. By doing so, you become a provider rather than a petitioner and create value for your audience instead of placing demands upon them.

It's astonishing how effectively this simple technique can improve your writing, and by extension, your thinking. An editor's role is to shape a narrative into a story.

</comment></comment></comment></comment></comment><comment><USER8> I remember in high school I had a teacher who taught us the hierarchy of communication. In person is first, by phone is second and written is third. This is because more of the message is transmitted in person ie you get words,voice and body language, with the phone you only get words and voice and with the written word you only get the words themselves. To this day if I have something important to say I do my best to say it in person or on the phone. Too often in a world of e-mail, texting, and twitter we assume we are being heard clearly through words alone, but for the really important stuff nothing beats face to face communication.

<comment><USER6> I mistyped a single letter in an email and offended a coworker for life. He was on the road; I was in the office. I argued persuasively about a difference in design, ending with "When you get it, we can talk some more". I had intended to say "When you get in, we can talk some more".

<comment><USER9> Can't you just tell him that it was a typo?

<comment><USER6> Found out far too late. By that time it would seem like a lame excuse. Live and learn.

<comment><USER10> Sounds like it was your coworker's communication skills that were lacking, not yours.</comment></comment></comment></comment></comment>


Show HN: Recurrent neural net plays 'neural slime volleyball' in JavaScript - <AUTHOR> http://otoro.net/slimevolley <comment><AUTHOR> As requested, I put up a demo of neural slime volleyball without any pre- trained agents so you can see them improve gradually as they evolve:

[http://otoro.net/slimevolley/training.html](http://otoro.net/slimevolley/training.html)

Basically, I left the computer running for a day or so, and came back realising that they have become quite good. But a day of training on a macbook pro is probably equivalent of a _few real decades_ of simulation at 30 frames per second, so to answer someone's question is that evolutionary approach will probably not work well when training with actual human players in human-time. Other approaches such as deep-q-learning may be more suitable. But you gotta wonder about the power and possibilities of simulating time at super human speeds to artificially evolve cool stuff!

<comment><USER4> Hi hardmaru.

Thats great stuff. I always want to learn AI and ML. But do not know where to start. Can you please guide where to start and how can you done this. Thanks

<comment><AUTHOR> Hi Sahilwasan

If you want to learn I found it is best to get your hands dirty and code rather than just watch videos from MOOCs. I didn't know how to do any of this stuff a few months ago.

I recommend Karpathy's Hacker's Guide to Neural Networks if you like JS

[http://karpathy.github.io/neuralnets/](http://karpathy.github.io/neuralnets/)

Most of my intro to neural nets is just by going thru programming examples in this stanford tutorial on deep learning:

[http://deeplearning.stanford.edu/wiki/index.php/UFLDL_Tutori...](http://deeplearning.stanford.edu/wiki/index.php/UFLDL_Tutorial)

</comment></comment></comment><comment><USER5> Very interesting-- slime volleyball was quite the thing back in my high school days. (See it here if you can get the Java applets to run in 2015 [1])

I was surprised to see a few months ago that the version we played back in high school had the AI programmed by Chris Coyne (of SparkNotes, OKCupid, and now Keybase). I'm curious what was behind the AI in 2004, and furthermore, impressed by Chris Coyne's seeming ubiquity...

1: [http://slimegames.eu](http://slimegames.eu)

<comment><USER6> Massive blast from the past. Slime games were awesome. I spend a ton of time in the highschool library playing volleyball. I think they guy behind the AI in the one I played was an aussie guy called Daniel Wedge. We used to play on his University provided page. Slime Cricket was great too

</comment></comment><comment><USER7> Whoa.... any chance you can write up something on how this works? I've never seen a working implementation of a recurrent net before. I would be very grateful!!

Either way, this is very impressive :)

<comment><USER8> His blog post describes how it was created: [http://blog.otoro.net/2015/03/28/neural-slime- volleyball/](http://blog.otoro.net/2015/03/28/neural-slime-volleyball/)

</comment></comment><comment><USER9> This is cute but I think it's just a really hard game to play as a human. Your little dude can't move fast enough.

<comment><USER10> Yeah, judging the angles and getting the ball to bounce in the right direction is really hard. But I'm gonna see if my kids can play this. I'm guessing they probably can.

I like these old-school games.

<comment><USER11> i'm finding a real problem with delay on jumping/direction which seems to be part of the problem? As though I'm expecting movement to behave slightly differently. could just be making excuses for myself though!

</comment></comment></comment><comment><USER12> This is massively frustrating :) although I started to develop some strategies once I got used to the controls.

I have a question though: In useful.js, there's a function like this:

function getHeight() { return $(window).height()-20 _0; }

Why is 20_0 subtracted from the window's height?

<comment> squeaky-clean It looks like it's actually

        return $(window).height()-20*0;

Which is just subtracting zero from the result. Not sure why. The only reason I know for doing that is to cast a string to a number without the function overhead of parseInt(). Furthermore, I don't actually see any code using that function.

<comment><USER13> Probably leftovers from development phase.

<comment><AUTHOR> lol - apologies about my messy code guys. It's just hacked together as a rough sketch to see if it'll work. as you can see my web coding skillz still needs work. I put it up on github though (be warned about messy hackish code):

[https://github.com/hardmaru/neuralslimevolley](https://github.com/hardmaru/neuralslimevolley)

<comment><USER14> I found the code clear and comprehensible - your genetic library for convnet.js looks useful - have you seen Karpathy's reinforce.js ?

I notice you left a training flag - I would like to watch the nets train so definitely going to have a go.

And thanks for introducing me to CNE, I am reading John Gomez's thesis right now - very very interesting, looks to have a big advantage over Q-learning.

In your blog post you compare the 'DNA' of multiple training episodes, the similar weights kind of suggests that you have exhaustively searched the problem space ?

<comment><AUTHOR> Thanks - thinking of putting up a version that has not been pretrained, so users can see the training over several generations. I think I have one lying around - remind me on twitter if I forget.

I'm also trying to learn 'deep q learning' (q-learning with a neural net as the q function) and other cool stuff that has recently been developed.

btw, I think your previous post with the 'brain' of 140 numbers is messing up this thread a bit on my browser for some reason and the comments not wrap, wonder if there's a way to fix it.

<comment><USER14> Many Thanks for the untrained version - I am working on visualising the evolving genome based on your RGBA illustration.

I read Sutton and Barto on Q-Learning but only 'got' it when I saw it hand- done with matrix math. [http://mnemstudio.org/path-finding-q-learning- tutorial.htm](http://mnemstudio.org/path-finding-q-learning-tutorial.htm)

Sutton & Barto suggest Eligibility Traces seem necessary to make Q learn fast enough. [http://webdocs.cs.ualberta.ca/~sutton/book/ebook/node79.html](http://webdocs.cs.ualberta.ca/~sutton/book/ebook/node79.html)

Gomez's thesis suggests that genetic methods have an advantage over backprop for learning sequences of actions. [http://www.cs.utexas.edu/users/nn/downloads/papers/gomez.phd...](http://www.cs.utexas.edu/users/nn/downloads/papers/gomez.phdtr03.pdf)

Deep Q Learning is brilliant - evolving the Q function would certainly be very interesting - currently trying to get the ALE sending frames to my convnet :)

mods have helped fix the errant brain code - thanks for the heads up.

<comment><AUTHOR> cool! Let's talk further offline later- I would be interested to know what you end up doing with it, and pick your (biological) brain for ideas. Ping me on Twitter message later-

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER15> I'm a little confused - the convnet.js library doesn't do recurrent neural networks, but the recurrent.js library (by the same author) does. Yet convnet.js seems to be being used for this, not recurrent.js.

Still, this is pretty awesome.

<comment><AUTHOR> Hi Thomas

I manually take the outputs of a feed forward network and out them back as inputs in the next time step, kind of making it a fully connected RNN.

Here are some details of the implementation:

[http://blog.otoro.net/2015/03/28/neural-slime- volleyball/](http://blog.otoro.net/2015/03/28/neural-slime-volleyball/)

<comment><USER15> Ah, right. That makes sense (even if it's a little tedious).

</comment></comment></comment><comment><USER16> Is the graph of the top a representation of the neural net? That is, are 11 neurons in 2 layers enough to operate the game?

<comment><USER14> [accompanying blog post]([http://blog.otoro.net/2015/03/28/neural-slime- volleyball/](http://blog.otoro.net/2015/03/28/neural-slime-volleyball/))

I too am perplexed as to what the neurons represent, the blog describes the RNN as 19 inputs connected to 7 outputs.

Examining slimevolley_pro.js (Agent.prototype.drawstate) shows only the agent states are depicted onscreen x,y,vx,vy,bx,by,bvx,bvy in the top row and actions forward, jump and backward below.

The code is well documented and builds on convnet.js by Karpathy.

The network is trained by genetic algorithm and self play - so this is a neural net trained with reinforcement learning.

The author's method seems unique and effective.

The blog post comparison of the resultant 'genomes' of network weights seem to show that the space has been searched exhaustively.

The game is played with trained networks but the code contains a training flag - it will be interesting to watch them train with self play.

<comment><USER17> The method is not unique. See some of the work of Schmidhuber's group. They are doing a lot of reinforcement learning for recurrent nets (LSTMs) and also via evolutionary algorithms. Eg see Evolino.

<comment><USER14> None of the ideas are new.

[http://people.idsia.ch/~juergen/evolino.html](http://people.idsia.ch/~juergen/evolino.html)

Yet Schmidhuber's nets are much more complex and certainly different.

I still think Otoro's very simple RNN feedback nets are unique - <USER2> when coupled with training by self-play.

Does Schmidhuber have any game playing agents ?

<comment><USER18> I was very impressed with this handwriting demo (and the accompaning paper):

[http://www.cs.toronto.edu/~graves/handwriting.html](http://www.cs.toronto.edu/~graves/handwriting.html)

Using a recurrent architecture.

To be honest I haven't played with NNs, but it puzzles me as to why the non- recurrent approach is so prevalent for complex tasks. I mean, it's the basic combinatorial circuit vs sequential circuits, which we all know are much more suited for complex or large outputs. Where's everything we learned from synchronous logic synthesis?

<comment><USER14> Grave's Handwriting Net was trained using Backpropagation - whereby the error between the net's estimate and a training target is sent backward through the net - so the net's estimates gradually become closer to the targets.

Backpropagation takes longer the deeper the net - Recurrent Neural Nets are deep in time so Back Propagation can become intractable or unstable.

Otoro's Slimeball demo evolves a Recurrent Net rather than training it - <USER3> appears to be a very efficient method, less likely to get stuck in local minima.

The slimes evolve through self-play which is a trial and error method and reinforcement methods seem to do better on control tasks than passive learning.

<comment><USER18> Ah I see. But as far as training goes the difference between the two methods ("evolution" and backprop) is a matter of locality, no? The backprop modifies weights loosely based on local gradiet towards fitness, and evolution goes in sparse random directions. In this view backprop is indeed vulnerable to local maxima if your optimization method isn't very good, but isn't it just a matter of choosing good optimization methods? In other words, combining local backprop optimization with global evolutionary methods should be the role of robust optimization algos, no?

</comment></comment></comment></comment></comment></comment></comment><comment><USER19> Please modify the bindings, the directional keys are international, without a qwerty keyboard I can't play - and no, I will not modify it systemwide for just a JS game.

Nice one nevertheless!

<comment><AUTHOR> Oops I haven't thought about that!

The arrow keys should work right?

Is there an easy way to detect non-qwerty keyboards so can implement it elegantly in JS?

</comment></comment><comment><USER20> Does it continue to learn when I take over control, eg: learn from me, or is the learning done at the time I can play?

<comment><USER14> AFAIK the game is not learning when playing a human.

There is a flag to control learning in the javascript trainingMode = false;

</comment></comment><comment><USER21> The interesting thing, to me, is how was network the trained?

<comment><USER14> Other networks learn - this network evolved.

By breeding the winners of many self-play tournaments a perfect player was born.

Training and learning show examples and mark the student against a correct answer - the student network tries to minimise their error.

Genetic Algorithms are a type of Reinforcement Learning, i.e. learning by trial and error.

The agent can direct it's own learning and explore.

Useful for training robots and other embodied agents such as oppenents.

<comment><USER21> I am aware of all of those terms. But I'd prefer to hear details about how _this particular network_ was evolved, as you put it.

<comment><USER14> Pretty comprehensive details here. [http://blog.otoro.net/2015/03/28/neural- slime-volleyball/](http://blog.otoro.net/2015/03/28/neural-slime-volleyball/)

<comment><USER21> Thanks! That's what I was looking for. Very interesting.

</comment></comment></comment></comment></comment><comment><USER22> I feel like I'm missing something here, can anyone give a brief synopsis on the significance of this?

<comment><USER23> The AI of the computer player is an RNN, which is a type of neural network. The objective of the game, what the controls do, and strategies were never hard coded into the AI, it learned them through trial and error, the way a human would. It's a lightweight implementation too, done in JS. One neat feature is that you can see the real-time activations of the neurons which are connected to the control nodes in the background.

<comment><USER22> Is the "learned" behavior stored in the javascript somewhere, or is it coming from a socket in real time? Is it just a giant data array for handling possible decisions?

<comment><USER14> Line 60 of slimevolley_pro.js contains the "learned" behaviour in 140 floats:

      "gene":{"0":7.5719,"1":4.4285,"2":2.2716,"3":-0.3598,"4":-7.8189,"5":-2.5422,"6":-3.2034,"7":0.3935,"8":-6.7593,"9":-8.0551,"10":1.3679,"11":2.1859,"12":1.2202,"13":-0.49,"14":-0.0316,"15":0.5221,"16":0.7026,"17":0.4179,"18":-2.1689,"19":1.646,"20":-13.3639,"21":1.5151,"22":1.1175,"23":-5.3561,"24":5.0442,"25":0.8451,"26":0.3987,"27":-2.6158,"28":0.4318,"29":-0.7361,"30":0.5715,"31":-2.9501,"32":-3.7811,"33":-5.8994,"34":6.4167,"35":2.5014,"36":7.338,"37":-2.9887,"38":2.4586,"39":13.4191,"40":2.7395,"41":-3.9708,"42":1.6548,"43":-2.7554,"44":-1.5345,"45":-6.4708,"46":-4.4454,"47":-0.6224,"48":-1.0988,"49":4.4501,"50":9.2426,"51":-0.7392,"52":0.4452,"53":1.8828,"54":-2.6277,"55":-10.851,"56":-3.2353,"57":-4.4653,"58":-3.1153,"59":-1.3707,"60":7.318,"61":16.0902,"62":1.4686,"63":7.0391,"64":1.7765,"65":-4.9573,"66":-1.0578,"67":1.3668,"68":-1.4029,"69":-1.155,"70":2.6697,"71":-8.8877,"72":1.1958,"73":-3.2839,"74":-5.4425,"75":1.6809,"76":7.6812,"77":-2.4732,"78":1.738,"79":0.3781,"80":0.8718,"81":2.5886,"82":1.6911,"83":1.2953,"84":-5.5961,"85":2.174,"86":-3.5098,"87":-5.4715,"88":-9.0052,"89":-4.6038,"90":-6.7447,"91":-2.5528,"92":0.4391,"93":-4.9278,"94":-3.6695,"95":-4.8673,"96":-1.6035,"97":1.5011,"98":-5.6124,"99":4.9747,"100":1.8998,"101":3.0359,"102":6.2983,"103":-2.703,"104":1.5025,"105":6.1841,"106":-0.9357,"107":-4.8568,"108":-2.1888,"109":-4.1143,"110":-3.9874,"111":-0.0459,"112":4.7134,"113":2.8952,"114":-9.3627,"115":-4.685,"116":0.3601,"117":-1.3699,"118":9.7294,"119":11.5596,"120":0.1918,"121":3.0783,"122":-6.6828,"123":-5.4398,"124":-5.088,"125":3.6948,"126":0.0329,"127":-0.1362,"128":-0.1188,"129":-0.7579,"130":0.3278,"131":-0.977,"132":-0.9377,"133":2.2935,"134":-2.0353,"135":-1.7786,"136":5.4567,"137":-3.6368,"138":3.4996,"139":-0.0685}

These are the weights on the connections between the inputs, neurons and outputs.

Everything you need to know about how to win Slime Volleyball in 140 numbers !

<comment><AUTHOR> Hi deepnet

Do you mind helping me truncate the length of the message above with the number array? It's causing issues on browser sessions not word wrapping messages

Thanks vm

<comment><USER14> Very sorry I have messed things up :(

Unfortunately I have not got an edit or delete link so I am powerless to alter my mistake.

If any mods* can help delete this rogue copypasta I would be appreciative.

[relevant xkcd]([https://xkcd.com/327/](https://xkcd.com/327/))

*emailed support

<comment><USER24> Sure. Fixed.

For future reference: I fixed it by adding two spaces before the very long line. That makes it be formatted as code and not wrap.

</comment></comment></comment></comment></comment></comment></comment><comment><USER25> A blast from the past and I'm still losing to the computer. Nothing has changed.

</comment><comment><USER26> very interesting! now you owe me 10min of my life. :)</comment>


The Matrix Calculus You Need For Deep Learning - <AUTHOR> http://arxiv.org/abs/1802.01528v2 <comment><USER2> Is this essentially a dupe of the submission 10 days ago?

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

It looks like the arXiv version of the previous submission to me ...

<comment><USER3> Ah, missed that. Thanks!

</comment></comment><comment><USER4> I will stop associating arxiv with solely research papers now. I guess they getting filled with lots of these so-called "whitepapers". I appreciate the effort of this paper, though, it seems more like an idea for a textbook. It even seems like arxiv is welcoming this what with their "Computers > Learning" breadcrumb, good to see more types of educational documents in the research realm, but I feel that teaching and research are separate for a reason.

</comment><comment><USER5> For those not familiar, Jeremy Howard (one of the two authors of this paper), is one of the founders of course.fast.ai, an excellent open course teaching machine learning geared toward software engineers and others with and without a strong academic background.

I really enjoy the course and encourage those who haven't yet looked into it to try it out, so long as one has an interest in machine learning.</comment>


Seeking Dark Matter, They Detected Another Mystery - <AUTHOR> https://www.nytimes.com/2020/06/17/science/xenon-axions-neutrinos-tritium.html <comment><USER2> One has to acknowledge that particle physicists are very good at publicity. They keep people on the edge of their seats even for something that might be just a mistake of their equipment.

<comment><USER3> For months when the LHC came online there were articles about it creating a black hole that would gobble the earth. I'm waiting for a larger accelerator to get built so everyone will claim it could lower the vacuum ground state and destroy the universe.

<comment><USER4> A cascading bubble of quantum vacuum propagating outwards at the speed of light!

I don't see the need to worry about such things, since we'll never know that they happened.

</comment></comment></comment><comment><USER5> Original paper discussed here at the time (the article in the OP is also from June):

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

</comment><comment><USER6> Last time this came up, it was something that could be accounted for by what seemed like an entirely plausible amount of tritium. Has anything been done, since, to rule out tritium contamination?

</comment><comment><USER7> >"We want to be very clear that all we are reporting is observation of an excess (a fairly significant one) and not a discovery of any kind," said Evan Shockley of the University of Chicago in an email.

Random thought: is Evan related to William Shockley?

</comment><comment><USER8> Gotta love the non clickbaity title</comment>


When Less is More: The Case for Teaching Less Math in Schools - <AUTHOR> http://www.psychologytoday.com/blog/freedom-learn/201003/when-less-is-more-the-case-teaching-less-math-in-schools

<comment><USER2> "At the present time it seems clear that we are doing more damage than good by teaching math in elementary schools."

An interesting post, but quite a leap of inference, isn't it? Start with, a) One school district once successfully started arithmetic instruction in sixth grade. Go on to b) elementary school teachers in two districts in New Jersey are weak on geometry and the principles of arithmetic. Arrive at c) the statement above.

</comment><comment><AUTHOR> The article by Kenschaft the blog author cites, recommended to him by one of his readers,

<http://www.ams.org/notices/200502/fea-kenschaft.pdf>

is a very good read. (This link may be behind a paywall for some readers. It has been posted to HN before.)</comment>


The Zen TV Experiment (1998) - <AUTHOR> http://www.spack.org/words/zentv.html <comment><USER2> I liked this article.

I'd propose two more "TV experiments" to warp your TV reality. One is to watch an event (a football game, perhaps) not in silence as per experiment #1 but with a different coverage of the same event. I went thru a short football watching phase where I watched TV with the TV muted and the AM radio play by play turned up because the radio guys were selected for their high ability at play by play as opposed to looks and past athletic achievements on TV broadcasters which results in idiocy on TV coverage, yet I wanted to watch the field while hearing quality play by play. Now during the game, this is fine... its during the commercials that things get weird / trippy.

Another perception altering "TV experiment" can be seen at moviesyncs.com. Its interesting that with the rise of mp3 singles that future generations will never experience starting up some pink floyd cds at the same time as watching 2001: a space odyssey.

Both examples illuminate the "Illusion of knowing" as discussed in the linked article. You think you know what a good sports cast or movie is, but you can trivially do a remix where the sum of the parts is arguably better than the individual parts yet its total nonsense. Maybe other thing you think you "know" are also total nonsense or random remixes that just happen to sound good.

</comment><comment><USER3> The idea in this article people pass mental control to the tv programming while watching is especially relevant and perhaps more so with new media platforms like instagram and facebook. Basically "zoning out". I don't think this started with tv though; it is just as easy to "get lost" in a good book or even when listening to the radio or just someone telling an engrossing story.</comment>


Diversity initiatives help change the face of Berkeley computer science - <AUTHOR> https://news.berkeley.edu/story_jump/diversity-initiatives-help-change-the-face-of-berkeley-computer-science/ <comment><USER2> _"Anytime someone mentioned computer science, I compared myself to them and I never quite felt like I had the ability to do what they were doing," Paniagua said. "All my misconceptions of computer science made me believe that the field wasn't meant for me."

"The program was a life-changing experience for me," says Paniagua, who now plans to major in computer science, cognitive science or both.

\----

Over the past two years, the number of women graduating with degrees in computer science and in electrical engineering and computer science (EECS) majors has increased by 47%, and the number of students from underrepresented minority backgrounds following same path has increased by 43%, reports Berkeley's EECS department, which runs the programs.

Improvements in diversity are also evident at the graduate level: Between fall 2011 and fall 2018, the percentage of women in EECS graduate programs jumped from 14.5% to 22.5% and the number of underrepresented minority students grew from 27 to 41._

\----

Kudos to Berkeley, these results are seriously impressive, and highlight how much a little bit of outreach can do to improve the quality of life of others.

</comment><comment><USER3> The picture caption says "Students share project demos during CS KickStart, a free, week-long program for incoming freshman, female-identifying and non- binary students interested in computer science."

So a guy who says he is "female-identifying" or "non-binary" can attend, but a guy is who is gender-conforming and honest about it cannot. What is the justice of that?</comment>


'We Are Not Essential. We Are Sacrificial.' - <AUTHOR> https://www.nytimes.com/2020/05/05/opinion/coronavirus-nyc-subway.html <comment><USER3> This is part of why I am not confident about any economic upside of us opening up.

We've had numerous meat processing plants close down or run at reduced capacity due to workforce illness and people refusing to work due to the concentration of COVID-19 cases.

And I think about how in the restaurant business how a rumor of someone catching food poisoning can kill your business... what's going to happen when a review lands on your Yelp/Google page that a customer took grandma to eat at your restaurant and 2 weeks later she died from COVID-19? Your reputation will be absolutely trashed.

Just seems like everyone is getting set up to fail... except for those who are already able to work comfortably from home.

<comment><USER4> > Just seems like everyone is getting set up to fail.

It does. We are seeing a dithering half-assed response to the pandemic in the USA.

If we're going to lock-down, we might as well do it until the crisis is manageable. The way things are going now, it's like we're letting up just enough to keep the damn thing circulating, killing more people needlessly and probably necessitating more lockdowns and prolonging economic consequences in the future.

This is the cost of a profound lack of leadership.

<comment><USER5> >If we're going to lock-down, we might as well do it until the crisis is manageable.

I thought the purpose of the lockdown was to keep hospitals from being overwhelmed? Maybe that is what you meant by manageable?

My two cents:

Why shouldn't we remove the lockdown if we can manage to do so without overwhelming hospitals?

We have been locked down and covid still circulates through the population, and appears that it will do so until we reach herd immunity and/or have a vaccine, with the likely/hopeful outcome, based on how these types of coronaviruses often behave, being a decrease in the danger posed by this specific virus over time.

Playing devils advocate: How much of a difference do mandated lockdowns even make? Sweden doesn't have a lockdown and they are doing better than a number of other western countries, worse than some others, but pretty much well within the same bell curve given the fuzzy data we have at the moment.

When does it become selfish to tell tens of millions of people they can't provide for themselves because you are scared of the coronavirus. They might not be. The risk profile can be very different for different people.

As long as the hospitals are not overwhelmed why not self-isolate, and let other people do what they want? That was the justification when we started these lockdowns, to keep the hospitals from being overwhelmed, right?

<comment><USER6> You are getting down voted, and I'm not sure why. I've grown the opinion that you cannot have any discussion around any measured approach related to COVID.

It seems some people view COVID as guaranteed death and any questioning of lock downs ending means that you are or are about to be a mass murderer.

<comment><USER7> One reason could be that GP seems to assume that spread to herd immunity is inevitable, ignoring the countries that have had great success in containing the virus.

<comment><USER5> What countries are you thinking of?

New Zealand has been able to pretty much eradicate the virus through lockdowns and contact tracing, but they only had 1000 cases.

There is no precedent for doing that in a country with millions of cases, like the U.S. It may be too late for that.

So is the purpose of continued lockdowns in the U.S. to eradicate the virus? That is what I am skeptical about, I don't see the evidence that such a thing is possible.

</comment></comment></comment></comment></comment></comment><comment><USER8> _Moloch whose eyes are a thousand blind windows! Moloch whose skyscrapers stand in the long streets like endless Jehovahs! Moloch whose factories dream and croak in the fog! Moloch whose smoke-stacks and antennae crown the cities!

Moloch whose love is endless oil and stone! Moloch whose soul is electricity and banks! Moloch whose poverty is the specter of genius! Moloch whose fate is a cloud of sexless hydrogen! Moloch whose name is the Mind!

...

Moloch! Moloch! Robot apartments! invisible suburbs! skeleton treasuries! blind capitals! demonic industries! spectral nations! invincible madhouses! granite cocks! monstrous bombs!_

<comment><USER9> Howl by Allen Ginsberg for anyone else who didn't know the reference - [https://www.poetryfoundation.org/poems/49303/howl](https://www.poetryfoundation.org/poems/49303/howl)

<comment><USER10> This is poetry? It doesn't rhyme.

<comment><USER11> Poetry hasn't been structured in rhyming stricture for ~150 years or so. In English, Walt Whitman was kinda the first 'famous' person to abandon rhyming and meter [0], and dive into 'free verse'. His _Leaves of Grass_ , revised over his entire life, has numerous examples. Some of his best work is here:

[https://interestingliterature.com/2017/06/10-of-the-best- wal...](https://interestingliterature.com/2017/06/10-of-the-best-walt-whitman- poems-everyone-should-read/)

Even centuries after his death, I find his poetry to be some pretty wild stuff.

 _Re-examine all that you have been told... dismiss that which insults your soul._

Fun Fact: Whitman, a staunch anti-authoritarian and overall structure hater, is one of the few English Poets taught in Chinese schools, as he is considered 'a man of the people'.

[0] Super crazy debate on who was 'first' here, if that can even be a thing that can be measured.

<comment><USER8> anglo-saxon poetry is also not interested in end-rhymes. The metric stress and alliteration are the repetitive linguistic features that shape those works, which are the direct ancestors of modern english.

 _Listen! We have heard of the glory of the Spear-Danes

in the old days, the kings of tribes—how noble princes

showed great courage!_

</comment></comment></comment></comment></comment><comment><USER12> This is why I'm so sick of all the "we're in this together" stuff coming from celebrities/rich people/brands. We are very clearly NOT in this together, socioeconomic factors are huge in your potential survival of this and executive teams are giving themselves bonuses while laying off workers or asking for permanent pay cuts. This faux positivity helps nobody.

<comment><USER13> If the US had a decent social healthcare in place, it would be. You pool together resources so everyone has a chance. Instead you are either lucky or rich.

<comment><USER14> Not really. In the event of an untreatable disease, no amount of free healthcare would make me feel better about being obligated to work in a factory if I'm vulnerable to the disease; even if factory work were the best damn job in the world.

</comment></comment></comment><comment><USER15> Why do we even consult economists when it comes to a pandemic response? Economics is already provably not great at doing its core task.

Don't ask economists how to manage a pandemic. Listen to the epidemiologists. Consult the economists to determine how much money is needed to keep people fed and sheltered until the epidemiologists say that the threat will be passed.

*I'm stereotyping economists here, but they've participated in too many conversations I've witnessed where they wade well out of their bubble of relevance. I read this somewhere on HN once, and it stuck with me: know what you're being asked to be an expert on. Economists aren't experts on infectious diseases. Fuck off, you're killing people.

My humble apologies to the majority of economists that aren't megalomaniacs like the ones they seem to find for TV interviews and Government advisor roles.

<comment><USER16> > Economics is already provably not great at doing its core task.

Can you cite any proof of this "provable" fact? ...and also a source that defines Economists "core task"?

<comment><USER15> Economics has become the tool of political ideology. It's modus operandi is language that's impenetrable to the non-economist.

My problem is primarily with politics as opposed to pure economics. Politicians use arguments provided for them by pet economists that allow them to hide behind the economy as a reason to avoid making hard decisions. Lo and behold, the status quo is best path forward ad infinitum.

Political economic decisions are often historically provably wrong and have the opposite effect to that which was the stated intent (whether or not it was the actual intent). Australia and the US recent re-implementations of trickle- down economics, by 30 years of experience, is not effective at doing what the politicians say it will. More subjectively: climate economics.

It's a complex argument but you're right to call me out on hyperbole. It's politics staining whatever it touches.

Semi-related interesting article about economics relationship with politics: [https://www.themonthly.com.au/issue/2015/july/1435672800/ric...](https://www.themonthly.com.au/issue/2015/july/1435672800/richard- denniss/clowns-and-treasurers#mtr)

</comment></comment></comment><comment><USER17> Is this another thread where everyone argues for their preferred side of the lose/lose situation we're encountering (lose income vs risk to health)?

Unfortunately, each state will make it's own decision on how to resolve this situation, and your state's decision may not line up with your preference. I can understand the frustration for those in a reopening state who are terrified of a big outbreak & getting sick, or those in a shut down state that are terrified of not having the money they need to survive from being out of work.

<comment><USER16> _insert anecdote_

 _insert politics_

</comment></comment><comment><USER18> What am I missing? I can't view any of the NYT articles posted here; all I get is a overlay with subscription options. Same goes for most WaPo, Bloomberg and economist articles.

Is everyone else on HN a subscriber to all these publications or am I missing something?

<comment><USER19> The paywall of any

        www.nytimes.com

article can be bypassed by changing the hostname to

        www.nytimes.com.

with a dot at the end.

<comment><USER20> Hmm.. it screws up CORS to get user subscription info. Good find! (and good lesson)

<comment><USER21> Could you explain that in more detail? I understand that the dot tells the DNS resolver that it's an absolute domain name rather than relative, but after that I'm lost.

</comment></comment></comment></comment><comment><USER22> This is an interesting issue.

RMT Union was absolutely up in arms against automation of their jobs, which would have made them much less vulnerable today. I wonder what MTA employees thought about the automation and if automation was even considered by NYC Subway or rail operations.

Maybe we'll finally get proper automation after this is over.

</comment><comment><USER23> "As a conductor, when I stick my head out of the car to perform the required platform observation"

I can't really believe that the country that managed to send man to the Moon is not able to put a camera somewhere in the train or on the platform, so conductor does not need to do something like this...

If camera is too much, maybe a properly installed large mirror would do the trick.

<comment><USER24> There are two checks that the conductor does. One is to ensure that all the doors are "platformed", i.e. won't open into the tunnel. This is done by pointing at a striped bar hanging from the ceiling. They lean out the window and point because it's one of those "hacks" that makes compliance with the procedure more likely. (Kind of like how checklists dramatically increased aviation safety.) The second thing they do is check that the train isn't dragging anything when it's leaving the station. People do get caught in the doors (usually their clothes or bags), and you don't read about them dying because the conductor is paying close attention and stops the train.

Can you engineer sensors to do this? Absolutely. Machine vision is getting better every year, but these procedures date from a time when digital cameras and computers didn't even exist. They work well, don't require maintenance, and are simple. An engineered sensor-based solution would be expensive, would break often in the dirty environment of the tunnels, and would be pretty imperfect.

So I think a pretty good engineering compromise has been made here. Going to the moon happened because there was an unlimited budget and we only had to do it a few times. Seeing if your train is platformed correctly and that it's not dragging any customers to their death has less funding and has to happen thousands of times a day. Hence, we have a person in the train to do that, instead of a machine learning sensor network.

<comment><USER22> There are a million approaches to this. Minority of the solutions are CV. Most are already solved engineering problems.

Elevators manage to not drag you, but multimillion dollar train cars can't?

Your thought process is one of over-engineering. Don't overengineer.

<comment><USER24> Elevators don't run outdoors at 60 miles an hour in a blizzard. Trains are taken out of service all the time because the door opening/closing machinery has stopped working. A sensor that can detect the sleeve of your shirt caught in the door would have to be more precise than what elevators use, and operate in significantly harsher conditions.

(In Japan, platform doors are common. Every installation I've seen has multiple e-stop buttons to press if you get caught in them. Clearly they don't trust the sensors, if there are even sensors. And those doors are static and don't move with the train.)

<comment><USER25> London Underground operates in the same conditions and have figured it out, without the emergency stop buttons, or platform side doors.

The Victoria line has been operating semi-automatically with driver only operation, and not getting out of the trains (because the windows don't open) since 1968.

These aren't insurmountable problems, and they've been solved for a very long time.

[https://en.m.wikipedia.org/wiki/London_Underground_1967_Stoc...](https://en.m.wikipedia.org/wiki/London_Underground_1967_Stock)

</comment></comment></comment></comment></comment><comment><USER26> While pushing for safety is a good thing, ultimately essential workers are the same as non-essential workers, except with an option to work. This is except for anyone being forced to work (there are certainly a few categories here, like the military). So while I am sure some people feel they are being sacrificed, and there are some individual circumstances that don't make sense, most essential workers are better off than non essential workers and both parties know it.

Anecdote: I work a lot with low income people and the vast majority want to be considered essential with the ability to earn. This is because they, like most people, are smart and are able to understand the risk and make decisions for themselves and their families.

So while I think pushing for safety is good and important, and extreme cases should be addressed, I find it odd that the dominant narrative around essential workers right now is not how workers are clamoring to be considered essential. It is the story not being told.

<comment><USER27> > Anecdote: I work a lot with low income people and the vast majority want to > be considered essential with the ability to earn. This is because they, like > most people, are smart and are able to understand the risk and make > decisions for themselves and their families.

Absolute bullshit.

We don't know the true prevalence. We don't know the true incidence rate. Without that, we don't know the true mortality.

Epidemiologists and infectious disease docs can't give you a reasonable "understand(ing of) the risk ... for themselves and their families" right now, only the general bounds of best- and worst-case scenarios.

Anyone else claiming to have that knowledge or understanding is deluding themselves and/or others. To point to people desperate to not end up homeless/jobless and say they're making a rational decision with understanding of risks involved is absolutely ludicrous.

<comment><USER28> The general bound of worst-case scenarios is about equal to all-cause mortality risk over a year. That's bad, but not apocalyptically bad - <USER2> within the range of risks that an individual could rationally decide to accept.

<comment><USER29> Even more so if you're in a low-risk demographic - for instance, "healthy person under 50".

</comment></comment></comment></comment><comment><USER30> Small Restaurants will die. There is no way to break even on 50% capacity / delivery only. The margins are too small to have anything less than 100% capacity.

Sure, we _can_ reopen, but we can't force people to sit next to one another, and risk getting Covid-19 to continue to keep small businesses alive.

The only solution is to ensure the workers are paid, rent freeze for both business and personal leases.

</comment><comment><USER31> Bad things need to happen for people to realize they are being exploited day by day. The "good" thing is they will forget about that when bad goes back to normal - yes normal not good.

</comment><comment><USER32> There are a whole bunch of people who do not qualify for any benefits, have little savings, and are blocked from going to work.

In a recent press conference, New York Governor Cuomo failed to provide any reasonable response to a reporter when asked about someone in a very similar situation (the person qualified for benefits, but checks have not arrived).

What is to happen to these people? Is the lockdown to protect them from something truly worse than not being able to buy food?

Anyone care to address this single point without going off-topic?

<comment><USER33> Enable them to collect benefits: pay for them to buy food, cancel their rent payments, cover their healthcare.

It's not hard, we just have a weird culture in America that couples all these basic human essentials to your work.

<comment><USER32> > Enable them to collect benefits: pay for them to buy food, cancel their rent > payments, cover their healthcare.

> It's not hard, we just have a weird culture in America that couples all > these basic human essentials to your work.

The requests for these things have already been made and are not reasonably being acted on.

<comment><USER33> So make them demands, not requests. Organize collective action like rent strikes.

</comment></comment></comment></comment><comment><USER34> [https://archive.is/jA5jJ](https://archive.is/jA5jJ)

</comment><comment><USER35> How are they sacrificial? They can walk away from their job if they think it's too dangerous. There are plenty medical jobs out there that don't require front line covid treatment

</comment><comment><USER36> To quote Tommy Boy:

Ray Zalinsky: Goin' a little heavy on the pine tree perfume there kid?

Tommy: No, it's an auto air freshener.

Ray Zalinsky: Good, you've pinpointed it, now the next step is washin' it out.

</comment><comment><USER37> > Socialism is the doctrine that man has no right to exist for his own sake, > that his life and his work do not belong to him, but belong to society, that > the only justification of his existence is his service to society, and that > society may dispose of him in any way it pleases for the sake of whatever it > deems to be its own tribal, collective good.

Ayn Rand

I am not a follower of hers but on this particular topic I am reminded of her quotes a lot

<comment><USER38> Hers is a perversion from aspect blindness that talks about rights in a vacuum without concern or care about harm. Right (i.e. morally correct) and the right (i.e. morally allowed) are often not the same. A person has the right to deny food to someone who is starving, but it makes the denier repugnant, and I would rather not have them in my society. Rand starts from the faulty premise that the two are the same and descends into madness from there.

> _I am not a follower of hers but..._

How are you both not a follower of hers and also driven to conjure quotes? That looks a lot like when someone says "I'm not racist but <overtly racist thing>". (I'm not calling you racist. I'm drawing a similarity between "I'm not X, but").

<comment><USER39> I'll go further than the parent commenter and say that I think Randian ideals are absurd and anyone who sincerely supports or buys into them is deranged. But I think the quote is interesting in this context because it's so obvious and so relevant that _capitalism_ is resulting in the same dehumanization that Rand ascribes to socialism.

To put it another way, it would be easy to imagine this variant of the quote being real (to be completely clear, it isn't):

>> _Capitalism is the doctrine that man has no right to exist for his own sake, that his life and his work do not belong to him, but belong to the capitalists, that the only justification of his existence is his service to the capitalists, and that the capitalists may dispose of him in any way they please for the sake of their own profit._

> -Karl Marx

...and that claim, unlike Rand's, would have been both accurate and relevant.</comment></comment></comment>


The Ugly American Programmer - <AUTHOR> http://www.codinghorror.com/blog/archives/001248.html "Whatever country you live in, whatever language you speak, you have the same access to the accumulated knowledge of the world as every other citizen of the planet Earth.  I believe the rules are different for programmers. So much so that I'm going to ask the unthinkable: shouldn't every software developer understand English?" <comment><USER2> When I've heard programmers criticised for the "ugly american" behavior it is not about the use of english as a technical lingua franca. The ugly american programmer is one who embeds english chauvinism into the user experience of their software. This includes lack of unicode support, and support for locales and internationalization.

<comment><USER3> To my knowledge, this is a subject that is rarely if ever covered in US schools (I don't recall seeing anything related to software internationalization listed at my university). I'd suggest that those who want to promote translatable software start by encouraging schools to teach their students how to externalize strings, deal with wide characters, etc.

<comment><USER4> I disagree. How to do localization is usually pretty straightforward, so why teach the APIs? There's barely enough time to communicate a basic understanding of complex systems to students, teaching them localization is a sideshow.

Anybody who wants their program to be used in another country needs to localize it, and that point, a simple Google search is enough.

</comment></comment></comment><comment><USER5> I should also note that being a native speaker of the English language does not automatically make one able to write coherent technical documentation in English. Unfortunately.

</comment><comment><USER6> Being Danish I can attest that this is very true - I write my code-comments in English, my business plans in Engish and do my financials in English. Even my blog is English.

It just makes it easier to communicate, and I've never met a Dane that complained about it.

<comment><USER7> Same here. English is not my native language but I just do everything in English. Code, documentation, blogs, requirement docs, etc. Really, everything.

Is this even remotely controversial these days?

<comment><USER8> I don't think so within the EU (perhaps in France ... chuckle), but I suspect it'd be more problematic in for instance Japan, Korea or China.

<comment><USER9> _I suspect it'd be more problematic in for instance Japan, Korea or China._

Linguist David Crystal, who has surveyed world use of one or another "interlanguage" for official use by international organizations, has found that actually most frequent and most exclusive use of English as an interlanguage is in east Asia. It is remarkably "natural" for a Korean person to try speaking English to a Japanese person (even though Korean and Japanese are cognate languages), and it is more expected still for a Chinese person to speak with either of them in English. What I find remarkable, but have observed more than once, is speakers of different Sinitic languages ("Chinese dialects") speaking to one another in English. Online, which is mostly the context Jeff is talking about in his blog, the early inconvenience of typing in the CJK languages (now resolved, as an in-country issue, but still a big barrier to switching among those languages) resulted in much Internet communication in east Asia being in English by default.

After edit: France was mentioned in the reply above to which I reply here, and I'll mention that the Carrefour retail chain has stores in Taiwan, and the signs inside the stores are in Chinese, of course, but also in English, NOT in French. There is no reason of national pride among the Carrefour staff sufficient to overcome the practicality of using English to reach customers in Taiwan. (Taiwan has a large population of English-speaking foreigners, the plurality of whom are Philippine guest workers.)

<comment><USER8> Is that most frequent per capita or total occurrences?

At least with the limited contact I've had with Chinese and Japanese developers the level of English wasn't particularly high, so I guess I'm a bit surprised by that. In the Chinese teams they even went as far as to try to suck in someone from Hong Kong so that he could be the bridge between the Chinese and German (the team I was on, though communicating in English) groups.

<comment><USER9> Replying to your reply to my reply to you, my main point is that if a Korean is with a Japanese person, they MIGHT speak Japanese (I have seen that happen), or they might speak Korean (I have seen that happen more rarely), but most likely they would speak English with each other. Add a Chinese person or a Thai to the conversation, and it is overwhelmingly likely that they will all be speaking English to one another. The standard of spoken English varies from one country to another in east Asia. One problem is that many of the better English speakers eventually emigrate. But English is the general language of intercommunication among people from Asian countries, for lack of any other language in which speakers have stronger proficiency that they all speak.

</comment></comment></comment></comment></comment></comment><comment><USER5> I am suddenly reminded of how, after a few months studying in an Israeli religious school, I switched my note-taking from English to Hebrew--not because I was terribly fluent in Hebrew, but because the books I was studying (canonical Jewish texts) were in Hebrew and Aramaic, and the terms used to refer to concepts in them were Hebrew, and it was just easier to write everything in Hebrew than to think about how to translate or transliterate all the vocabulary into English. Especially since the equivalent English words all took longer to write.

</comment><comment><USER10> I live in India and my native language is Hindi, yet I mostly use English for communicating over the web. If I had to explain even a slightly technical concept (say, a simple data structure) to someone in Hindi, I wouldn't know where to begin.

Given a choice, I'd always pick English over Hindi as my language of choice, not because I dislike Hindi, but because I'm much more comfortable with English. Why? Because I read books written in English, read English newspapers, watch English movies and TV shows and read a whole lot of technical content written in English. Thanks to the American tendency of "exporting" their culture, English is all I've been exposed to (and I consider it a good thing).

In real life, most (educated) Indians speak a mish-mash of English and Hindi. Modern Hindi itself is a mish-mash of words borrowed from Urdu, Farsi, Punjabi etc. It's actually pretty liberating, being able to express yourself without even having to stop to think _how_ to phrase a sentence. Can't complete a sentence in Hindi? End it in English.

<comment><USER11> "Thanks to the American tendency of "exporting" their culture..." Oh come on, surely the British share some of the responsibility there, if not all of it. Last I checked, we haven't yet liberated* India, so if Indians consume American media (movies, books, music, etc) then they are actively importing it, by their own choice. And its not like you don't have alternatives in India, with its thriving native entertainment industry.

Some countries don't have native content-producing industries, and so you could say that the importing of foreign culture squashes these industries before they can develop. On the other hand, keeping it out is basically censorship.

(* This ironic use of the work "liberate" is a sick joke that I'm not proud of, but it does sum up the cynicism most brain-holding Americans feel about their government's foreign policy.)

</comment></comment><comment><USER12> I'm Turkish and I have to agree for the most part.

Technical CS terms in Turkish get invented by a handful of academics. Since this is a pretty close knit community, the jargon does not get socialized very well and leads to unwieldy, inorganic words. I don't live in Turkey, so I pretty much don't have a chance in hell of understanding Turkish CS speak.

That said, there might be some language communities out there, large enough to be self sustaining. Chinese seems like a good candidate. The fact that there is a Chinese clone of Atwood's Stackoverflow also supports this: <http://news.ycombinator.com/item?id=537246>

</comment><comment><USER13> From the Python style guide (PEP 8), on comments:

 _Python coders from non-English speaking countries: please write your comments in English, unless you are 120% sure that the code will never be read by people who don't speak your language._

And that's for all code written in Python, not just the code that goes into Python. Guido is Dutch.

</comment><comment><USER14> Has this been inspired by CNprog.com?

</comment><comment><USER15> _why I gave up Visual Basic for C#, as painful as that was._

No Jeff, working in VB is painful.

</comment><comment><USER16> Open a 400 person coding shop in Ningbo and try to get everyone there to write in English, or even understand it. Good luck with that.

Working in markets with large numbers of non English speakers is quite difficult, as the article implies. Very profitable though. Chinese people like games as much as we do, and they will actually pay for them!!!

<comment><USER17> > Chinese people like games as much as we do, and they will actually pay for > them!!!

Yes, the Chinese would never pirate software!

<comment><USER16> They pirate plenty of software, including games, but they pay big money for the virtual goods you sell inside the games!

</comment></comment></comment><comment><USER18> This really doesn't need discussion. English is simply the language for science and computer stuff, just as latin used to be in the past (not for the computer stuff, but for science).

<comment><USER19> Another example of this would be in music composition where Italian is the language used (to describe tempo, dynamics, etc.) regardless of native tongue.

I'm not an expert, but I would suspect there many disciplines have a language that is commonly used, and it so happens that Comp Sci happens to be English.

<comment><USER20> I don't think it's that straightforward. Loanwords happen overwhelmingly with vocabulary, and not grammar. While this is obvious, the implications are thus: the closer to script of the origin language to the borrower language, it is exceedingly easy to take the target word wholesale. Since the grammar is relatively stable, you can easily make the case that the loanword, whose _origin_ is language X, is no longer language X, but language Y, the borrower's native language.

That is, words like "tempo," "crescendo," and "forte" are Italian in origin, but who's going to say, no, they're not English? They're native enough.

Now, let's take a discipline with non-English terms. Take Go for example. There are many terms in Go that are shared between Chinese, Japanese, and Korean schools. They can be written similarly in hanzi/kanji/hanja, with two catches: 1., the same characters are read differently in different places; 2., Westerners, using exclusively the Latin alphabet for their native needs, cannot read the hieroglyphs.

The result? What term should English speakers use? Pick one! Which one? Whichever! For Go, the Western world picked Japanese. You have ko, moku, seki... So which was the common language? There are now two answers. First, there was a common _script_ , which was Chinese characters. Second, there was a commonized _pronunciation_ , which came from Romanized Japanese.

It's not a "so happens to be" thing. It's a speed and scale of adoption thing, and in this way it is a "majority wins" game. And here, the winner is the Latin alphabet. To come around, I would suspect there are few disciplines that do not turn into a Latin-alphabet-standardized-, and in effect, English-, field.

</comment></comment></comment><comment><USER21> _The overwhelming majority of programming languages use English keywords_

Can anyone tell me any programming language which doesn't use english keywords!?!

English is the common language of communication throughout the world, and consequentially the effect has percolated into the hacker world too I guess !

<comment><USER5> _Can anyone tell me any programming language which doesn't use english keywords!?!_

APL?

<comment><USER22> There are lot of dialects of LOGO in other languages than English

</comment></comment></comment><comment><USER23> This post gives me the overpowering urge to write a rebuttal in Japanese just to prove that an American can.

Let me hum a few bars: if your customers don't speak English, and your colleagues don't speak English, and your business partners don't speak English, then your refusal to use languages other than English _cannot be justified by it being efficient_. It is hubris to think otherwise -- an arrogant sort of laziness of thought which is entirely different from the productive laziness that programmers generally cultivate.

A programmer who cannot talk to his colleagues and customers, and blames his inadequacy on them, is a failure at his profession : writing code which _solves problems for people_. If you only get as far as "writing code" without understanding the people and their problems, congratulations, you fail.

On the plus side, the prevalence of attitudes like this means you can do pretty well for yourself if you're bilingual. I got stopped on the train today by the guy who got me my current job (random coincidence -- we live in adjacent small towns). He started the conversation like he always does "Hey, Patrick, how's work? Say, do you know any bilingual engineers looking for employment?"

This week apparently its an aerospace project that needs them. Its always something -- there's hundreds of billions in trade happening between the US and Japan every year, huge portions of it are high-tech, and engineers here are only marginally better at speaking English than engineers in America are at Japanese. (In my experience, though, they're not aggressively proud of being ignorant.)

<comment><USER24> Did you read the article? He's talking about internal engineering efforts, not gathering requirements and general interactions with the customer.

</comment></comment><comment><USER9> "Ideally we would all use Esperanto - that's the future! Ah well."

To disagree with this comment from Jeff's blog, see

<http://www.xibalba.demon.co.uk/jbr/ranto/>

English comes by its huge network advantages honestly. All four of my grandparents were born in the United States, but three were born in households in which a non-English languages was spoken, and two were educated entirely in another language (German). Everybody learned English, and that was no big deal. The majority of Americans have ancestors who didn't speak English before they arrived in America. English is by no means perfect, but it is pragmatic, as Jeff says.

</comment><comment><USER25> just posted my rebuttal [http://odwks.com/2009/03/mandarin-chinese-programmer- communi...](http://odwks.com/2009/03/mandarin-chinese-programmer-communites/)

The HN post is here <http://news.ycombinator.com/item?id=539276>

</comment><comment><USER26> Wow,Jeff Atwood sure knows how to state a position that the vast majority will roughly agree with yet still position himself as champion of a controversial position. He's not necessarily an "Ugly American;" I think simpleton is more to the point.

</comment><comment><USER27> True, but it's a temporary situation. As an old teacher used to say: you could wake a medieval scientist in the middle of the night, and he would probably curse at you in Latin. Same holds for present day scientist and engineers (myself included), only they would curse at you in English.

</comment><comment><USER22> Eric Raymond: _it was reported to me at the time that English has a richer technical vocabulary than any other language and is therefore simply a better tool for the job_

Or probably English is simply the most easy to learn.

<comment><USER28> Well, English does have a larger technical vocabulary than most other languages. Admittedly, this is more because English accepts other languages technical words into the language, so therefore (to some extent) is the union of the technical language.

With this in mind, i would not call English easy to learn. There are far too many special cases and bizarre twists to get to true fluency (it might be east to get to a passable spoken version, though).

<comment><USER29> It's both, I think. Basic grammar is fairly easy and succinct. But then there are 60K phrasal verbs (stand up, stand down, understand, stand under, stand over, but never "overstand") and special cases, connotations, figures of speech, etc.

It's difficult to explain to a learner why it is _technically correct_ but not _usual_ to say "This is my election for lunch", or why a "hot chick" goes to college while a "hot chicken" is dinner.

<comment><USER30> Being fluent in both English and Chinese, I would have to say Chinese grammar is much easier than English. There are no irregular verbs or pluralization, and very few tenses. The difficulty in going from speaking English to Chinese is vocabulary memorization and pronunciation, but that's true for going from Chinese to English as well.</comment></comment></comment></comment>