3,901 karma · joined Oct 15, 2012 (14y ago) · 1,547 submissions
comment 12y ago · link · parent
It's just like a car. You don't have to know how your car's engine works to be able to tell tell when your car isn't running like it's supposed to. As for my computer, I know it in as much detail as I think is necessary for telling whether or not the computer is "healthy", so yes. (See my response to the other comment for more.)
comment 12y ago · link · parent
Same way you can tell whether you're feeling healthy or sick.
Same way you "know" something is wrong when your car stops running the same way it usually does.
i.e., I can't prove it one way or another, but that doesn't matter. In practice, I mentally keep a tab on how my computer is running -- my computer's CPU usage, network activity, I/O activity, internet connection speed, etc. so I can tell when something's not going right. I don't keep crapware on my computer either, so when a process shows up that I don't recognize, then I can easily tell. I have notifications set up for newly-installed system services, so when a new service or driver is installed I get a popup for that too.
Obviously, I can't prove it's malware-free, but who cares? I don't need to. I simply have no evidence in support of malware existing on my computer, so as far as I'm concerned, it isn't. Just like you can't mathematically prove to me that your car is OK, I can't mathematically prove to you that my computer is running OK. But that doesn't matter because I'm reasonably sure it is, and I have no evidence to believe otherwise. And that's really all that matters.
And for that matter, it's not like I could be sure I didn't have malware if I did follow those practice either. It's just a tradeoff between the likelihood of malware and the amount of convenience you're willing to give up. You can never be sure, and you don't need to.
1146.
Frog flies as science defies gravity [1997](deseretnews.com ↗)
1 points · by wfunction · 12y ago · discuss
1148.
C++: Checking units at compile time (2003)(everything2.com ↗)
28 points · by wfunction · 12y ago · 5 comments
comment 12y ago · link · parent
comment 12y ago · link · parent
tl;dr: Just because it's "infinitely more valuable" in Java doesn't mean the same for C++.
comment 12y ago · link · parent
comment 12y ago · link · parent
I do the same thing. Not because I can't write C++11, but because I still encounter systems with older compilers that I want to run programs on. What, is this surprising?
Let's face reality: it's a little unreasonable to expect every system you work on to have a compiler less than 3 years old.
Especially true on older Linux systems, it's sometimes a massive pain or even pretty much impossible to upgrade the existing compiler in a package-manager-friendly way (try upgrading Ubuntu 12.04's compiler to GCC 4.9, for example), so you'd have to compiler the compiler from scratch. Which is a pretty massive PITA and more or less requires a PhD of its own for GCC (Clang is a little better). And on Windows VC++ isn't always exactly following the correct standard. It's not necessarily outright impossible, but it's pretty impractical.
comment 12y ago · link · parent
And how exactly would the Monte Carlo version differ here? Every single random number generated is going to be rational isn't it?
comment 12y ago · link · parent
http://jakevdp.github.io/blog/2014/06/06/frequentism-and-bay...
comment 12y ago · link · parent
Which no one cares about because (1) this isn't a probabilistic process in the first place, so "bias" itself is meaningless, and (2) there is now an exact bound on the error, unlike the previous case (I guess you can think of this as the "variance" if you want).
comment 12y ago · link · parent
comment 12y ago · link · parent
what I'm saying is that the entire point of illustrating an algorithm by example is to illustrate the power of the algorithm compared to a naive approach, regardless of whether or not there is a better way to solve the example problem.
i.e., the example should motivate the algorithm. But computing pi is one of the worst possible illustrations of why anyone would use Monte Carlo, because it's inferior to the naive approach. i.e., it doesn't motivate why anyone would want to use Monte Carlo.
comment 12y ago · link · parent
I really wish people would stop trying to find ways of calling their algorithms "Monte Carlo" just to make their work sound fancy. All it really achieves is it makes them avoid thinking about how to solve the problem. Monte Carlo isn't a universal hammer. First you're supposed to show randomness actually helps you gain something, then you're supposed to start using it.
comment 12y ago · link · parent
Why didn't you just pick the center of the square, use that to partition it into 4 pieces, and recurse for each subsquare?
Or just as easily do this? http://pastebin.com/ezi7S35N (Edit: just noticed a typo -- I should be initializing the numerator/denominator inside the loop, not outside, sorry.)
What's the point of adding randomness?
comment 12y ago · link · parent