2,312 karma · joined August 30, 2013
It's fine if you want to use different words. But you either have words for the different types or not. And if you have separate words, you either use the five existing ones or try to push five new ones. I think it's significant that you objected to my claim about the popular taxonomy without suggesting five alternative terms with even a fraction of the adoption. (I've built an entire career partly on popularizing this stuff and I've never even encountered a competing set of terms!)
It's unfortunate that people who aren't already experts on a topic can't tell whether that kind of decree represents consensus or someone's idiosyncratic opinion (and there's plenty of both in general).
Framing is a different thing, though, and I can't comment there since I haven't re-read the whole article recently.
One group of people says "these should all be called mocks". Another group says "these are mocks, stubs, spies, and fakes, respectively, and collectively these are called test doubles". You can prefer the simplicity of calling them all "mocks" (simplicity is nice) but that leaves you with no way to distinguish between the types.
These categories seem like hair-splitting if you've written relatively few tests using test doubles. Once you've written a few thousand, you start to wish for even finer-grained distinctions. This is how basically everything works as you get deeper into the details: you need words for the fine-grained distinctions.
As far as I know, there has never been a competing set of terms. The only major positions are "we should use [the words I mentioned above]", which is mostly favored by those who have used a lot of doubles; and "we should not use separate words at all", mostly favored by those who haven't used a lot of doubles.
* Some talks are long, intricate stories, and you get much more out of them by paying close attention. (David Beazley comes to mind.) From experience, I can say that I'm far more likely to divide my attention at home than in an in-person talk, and I'm not unusual here.
* Sometimes, there's no talk that grabs you in a time slot, but that can lead to pleasant surprises. This is especially effective if you intentionally choose topics that are unfamiliar, then let the physicality of the room force you to pay attention (because it would be rude not to).
* Running into people randomly in the hall makes for serendipitous conversations that wouldn't have happened otherwise. People get jobs this way; open source projects start this way. The global Code Retreat movement started this way due to a conversation at CodeMash years ago. (That conversation began by us talking about the ethics of the meat in the sandwiches.)
* If there are people who you put on a pedestal as untouchable divine entities, meeting them will usually fix that. I don't mean that they don't deserve respect, but simply that everyone is human. You might be appalled to learn that your favorite programming tool's author likes music that you find repugnant. This is valuable; we're people. You'll be less likely to appeal to authority unthinkingly if you've been appalled by authorities' taste in music.
* It's vulgar to put this so bluntly, but a lot of power is brokered in person at conferences. Not through mysterious back channel conspiracies, but through normal human interactions. If I've met you in person, I'm more likely to trust you; you're more likely to come to mind when someone asks "do you know anyone who can do x?"; etc. Anyone who doesn't participate is at a disadvantage here (and many surely don't care, which is fine).
(Source: I've spoken at about 40 conferences, give or take, and attended many without speaking as well; I've made a lot of friends who do the same; I shot an unpublished documentary that was sort of about this; and I have repugnant taste in music.)
To get specific, the wording in PEP 20 is: "there should be one, and preferably only one, obvious way to do it". Note that the dominant idea here is that there should exist some obvious way. It's merely preferable that there be only one way. Again: this is sensible, but it's not good fodder for newcomers craving purity, or for detractors craving straw men.
PEP 20 itself is often elevated to religious levels of importance, as if it were a design document that served as a blueprint for the design of Python. It's absolutely not that; it was written by Tim Peters (not Guido!) fully eight years after Python's first release. Here's the original email that Tim sent to comp.lang.python on 4 June, 1999: https://groups.google.com/d/msg/comp.lang.python/B_VxeTBClM0.... Note how he finishes: "If the answer to any Python design issue isn't obvious after reading those -- well, I just give up <wink>." Tim is very particular about his winks, and that's not even a <0.5 wink> or a <0.9 wink>, but a full, unqualified <wink>.
To put all of those pieces together: (1) we have a short, tongue-in-cheek document written after-the-fact. (2) It's misinterpreted as a design document for an entire language and ecosystem. (3) A secondary portion of one of its points is misinterpreted to be the entirety of the point. (4) This is done by exuberant newcomers and skeptical detractors who don't accurately represent the Python culture as a whole. This is why you get the impression that the community is adamant about "one way to do it". It's a reasonable extrapolation from the visible evidence, but it's not true.
Most of my work that you've praised so highly concerns improving software quality and the experience of programming. Wat is about one of the underlying causes of low software quality and unpleasant experiences of programming.
Specifically, none of that JavaScript behavior is undefined. Brendan Eich specifically chose to define all of those conversions in those ways. JavaScript was designed to do what the programmer doesn't want (silently perform nonsensical conversions) rather than what they do want (throw an error). There are reasons for this, but in its current use context that decision is not what we want. Many people watch Wat and go on to learn all of this; there are dozens of blog posts, Stack Overflow questions, etc. where the behavior in Wat is dissected in detail. For example: http://stackoverflow.com/questions/9032856/what-is-the-expla... or http://blog.caplin.com/2012/01/27/the-why-of-wat/
Many programmers think that their tools work reliably; that they don't encounter problems often; that popular programming systems are fundamentally reasonable; that mistakes are always the programmer's fault. These people are wrong, to everyone's detriment. The easiest remedy is to show them, rather than tell them. Many people -- far too many now to count -- have said that Wat made them begin to realize how broken our tools are. That's a prerequisite to engaging with my (and others') longer-form work on improving things.
I could do a talk explaining all of this with examples and so on, but it would be full-length, not a lightning talk. My full-length talks get maybe 100k views, so the audience would be 5% of Wat's 2m views. Wat must be short, and therefore context-free, to work.
Fortunately, the PyPy folks have stuck with it, and PyPy is now faster than CPython across the board. Many other languages have also been implemented using its considerable infrastructure. Compiler experts have been minted from scratch. Should it have been done? Yes.
Even with the vulgar assumption that "practical utility" is the only source of good, this type of project is good.
When using NPM, I don't have that guarantee. The docs for these libraries could clearly state that they'll integrate around the datetime type, but that may be false in practice. And I'll only know that ahead of time if (1) I know that they both use datetime internally, (2) I know exactly the versions of datetime that they use, and (3) I know exactly how datetime changed in between those versions. With non-vendoring package management, I don't have to know any of these things.