For those who didn't get it - mjd is the author of the blog post linked to. Although he's also right that it's a stupid comment that deserves downvotes :)
I agree completely. I think you have a moral obligation to yourself to avoid advertising as much as is reasonably possible. This means not watching television (unless you're paying to watch it free of advertisements), not reading publications that are heavily supported by advertising (e.g. most magazines) and using an ad blocker everywhere on the web.
You will never be able to completely avoid advertising without taking yourself out of mainstream society, but you can avoid the most insidious parts, and you can try very hard to condition yourself against the rest of it.
The "second-order" advertising (e.g. critic recommendations, word of mouth) is much harder to deal with, especially if you believe that some people have good, unbiased, not-unduly-influenced opinions that you will benefit from listening to. My only recommendation is to curate the people whose opinions you listen to very carefully, and think hard about who they might be (possibly unwittingly) influenced by.
I am sympathetic to the argument that advertising pays for many of the things I like, particularly on the web. But I don't think that argument is compelling enough for it to be worth handing over control of my head.
Of course, advertising is only one factor, though it is probably the most important factor. Other systems competing for a share of your mind include religions, political parties and/or systems of political thought, philosophical systems, programming languages and/or communities (eg functional vs. object oriented), sports teams, national identities, racial identities, and more.
You may want to allow some of these access to a share of your mind (e.g. many people enjoy supporting a sports team, even when the rational part of their brain knows that their sports team isn't inherently better than any other). But for the most part, I think it's better to avoid falling into these traps.
The best exposition I can recall is one of Paul Graham's earlier essays, "Keep Your Identity Small"[0]. I would probably argue a similar point, but phrase it differently - keep your identity broad. Instead of thinking of yourself as a "Ruby programmer" or a "functional programmer" it is better to think of yourself as a "programmer" (and even better not to think of yourself as a programmer at all!). Instead of thinking of yourself as American, or Chinese, or as black, or white, try to think of yourself as a human. The broader you can make your identity, the less chance you have of accidentally falling prey to any of the theories competing for a space in your head.
Like I said, "you will never be able to completely avoid advertising without taking yourself out of mainstream society" and "second-order advertising is much harder to deal with".
I don't claim to be immune to advertising, or know how to avoid all of it! But knowing you are susceptible to advertising is the first step towards not letting it influence you (too much).
> The "second-order" advertising (e.g. critic recommendations, word of mouth) is much harder to deal with, especially if you believe that some people have good, unbiased, not-unduly-influenced opinions that you will benefit from listening to. My only recommendation is to curate the people whose opinions you listen to very carefully, and think hard about who they might be (possibly unwittingly) influenced by.
But we rely on other people's opinion precisely to avoid thinking hard about everything, which would be overkill at best, and could even kill you at worst.
What you say is idyllic, but in practice we just go with the flow. It's easy and safe, from an evolutionary point of view. Choosing requires energy, time and attention [https://en.wikipedia.org/wiki/Overchoice], and it has a big opportunity cost [http://www.brainpickings.org/2013/11/27/the-psychology-of-se...]. Do I need to thoroughly bet every "expert" that I listen to? In practice, this is infeasible. You definitely should do it for important stuff, but advertising covers many other unimportant things (such as yoghurt brands) for which it's economically optimal to just assume everyone is an expert.
Also, you approach advertising and human bias such as social proof as only bad things, and I think one needs to also consider the good side of it.
Even for things not so trivial as yoghurt, perhaps if I spend 40 hours choosing for the best car I can make an optimal decision; or perhaps choosing the one that is advertised the most is sufficient; I get a suboptimal choice but psychologically it's less demanding; socially is more acceptable (as I have the same car as the rest); heuristically it might even hold some intelligence (advertising power carries some information about financial strength, financial strength about solid business, and solid business about good products). Typically, you will shortlist a couple of cars and try them. It's a matter of being a satisficer and not a maximizer [http://www.wsj.com/articles/how-you-make-decisions-says-a-lo...].
It's not clear to me why it's necessary to include <T, U> at the start of the function definition. In Haskell, unquantified type variables are implicitly universally quantified, i.e. you assume that the signature must be valid for any types T and U.
That's the only thing I think could be substantially improved, though. Personally I find the style where you separate the type signature from the function definition easier to read, for example
Depends what you mean by "not declared". Haskell doesn't require you to provide type signatures, so if you don't put a type signature on a function, you can have parameters that aren't explicitly declared (though they still have an inferred static type, so you could use ghci to see what all the parameters are). If you do put any type signature on the function, then all parameters would have to be included.
> If I make a typo when using a value parameter in a function definition, can I accidentally introduce an extra value parameter?
No.
> If I make a typo when using a type parameter in a function definition, can I accidentally introduce an extra type parameter?
You couldn't introduce a new concrete type. You could introduce a new type variable, but the type signature would still have to typecheck, so it would difficult to come up with a non-contrived example where that would happen.
As I said, in Haskell "unquantified type variables are implicitly universally quantified" i.e. type variables (which are always lowercase in Haskell, to distinguish them from concrete types which are uppercase) are always generic.
So it's true that in the Swift examples, you would need a convention to distinguish type variables from concrete types, or else you need to explicitly mark them as generic.
There are some great retirement calculators out there (e.g. firecalc), but I wanted a sandbox where I could explore different strategies and heuristics.
Edit: I think this is the code that actually reads the numbers the user enters, see [0]
function l(){
var a=h.exec(m[1]),f=null,g=null,n=null;
return a&&(null!==a[1]&&a[1]&&(f=parseInt(a[1],10)),
null!==a[2]&&a[2]&&(g=parseInt(a[2],10)),
null!==a[3]&&a[3]&&(n=parseInt(a[3],10))),
new e(f,g,n)
}
Edit(2): Actually, I'm not so sure that's the correct code at all. They NYT game is capable of parsing floats correctly (e.g. it accepts 1.1, 1.2, 1.3 as a "Yes") so it's not just using parseInt.
var rightWrong = (inputData[0] < inputData[1]) & (inputData[1] < inputData[2]) ? right : wrong;
With a variable declaration on line 545 being
var inputData = [NaN, NaN, NaN],
revealed = false,
right = "<p class = 'g-answer g-yes'>Yes!</p>",
wrong = "<p class = 'g-answer g-no'>No.</p>";
And `inputData` is changed on text input on line 662
$("#g-input input").each(function(i) {
var val = $(this).val();
inputData[i] = $.isNumeric(val) ? Number(val) : NaN;
});
It uses the `Number()` function to convert from the input text to an actual number, so it can convert any number format defined by ES5[1] or ES6[2]. So in ES6 you can use binary (0b, 0B) and octal (0o, 0O) formatting along with exponential (1e-2) and hex (0x, 0X). Binary and octal works for me currently on Chrome 43 OS X.
"Unlike most academic work that has little to no practical implications, I think blindly following the stuff here will prove to be incalculably beneficial for you."
> I had drinks with one of the $1 billion "unicorn" CEOs last night, in a trendy Noho bar in London.
Where the hell is "Noho"? Is this some ridiculous attempt to Americanize London by trying to rename parts of it after bits of New York?
If the author means the area north of Soho, I am happy to point him in the direction of any map of London, where he will see that area labeled "Fitzrovia".
Also, who points out that they were in a 'trendy' bar without covering the word 'trendy' in a fetid, glistening layer of sarcasm? Business Insider journalists, I guess?
> Is this some ridiculous attempt to Americanize London by trying to rename parts of it after bits of New York and San Francisco?
AFAICT, SF doesn't have any role at all in the source of names, but otherwise, yes [0]. Of course, lots of the place name in the continental US (and a number of other places) are a result of the same kind of thing in reverse centering around renaming every piece of the continent after parts of Britain, and particularly England, so turn about is fair play.
Well, I'm glad that Londoners have collectively decided to tell the rebranders where to stick it. I've lived in London for ten years and have never heard someone refer to "Midtown" or "Noho". Urgh.
My favorite analysis of Buffon's needle is this one, which pulls out the correct probability of intersection without any calculus -
Consider a straight needle of length L dropped onto lines spaced 1 unit apart. It is clear that the expected number of intersections is proportional to L. If you joined two needles of length L/2 (possibly at an angle) the expected number of intersections is still L, by additivity of expectation (note that we don't need independence). By induction, the shape of the needle doesn't matter, and the expected number of intersections is proportional to L.
We can work out the constant of proportionality by considering a needle shaped like a circle of radius 0.5, which has circumference pi, and is guaranteed to intersect the lines in two places. Therefore
2 = C * pi
and hence C = 2 / pi
Now for a straight needle of length 1, we can never have more than 1 intersection. Therefore the probability of intersection is the same as the expected number of intersections, which is seen to be