Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×

Comment Re:Quant vs Qual (Score 4, Insightful) 184

And this is why there is so little truth to be found in the humanities.

Here's a scenario: A white nationalist kills dozens of Muslims. Someone looks at this and sees evidence that the normalization of fringe views, characteristic of the way president Trump talks, is emboldening these maniacs to act violently. Someone else looks at this and sees evidence that white middle-class uneducated men have been marginalized by our economic system and are at their wits' end, which is the same phenomenon that lead to Trump being elected.

The kind of narrative-based elaborate analyses that you advocate doesn't help us decide which of the points of view above is right, and we carry on with our preconceptions, unable to learn anything.

Narratives allow you to explain the past perfectly using models that have no predictive value. The only way to make progress when trying to understand a complex system is to come up with very simple hypotheses and try to validate them empirically. Of course this is very hard to do, but I think people in the humanities do a poor job and fool themselves into thinking they understand things they don't understand.

Comment Allow the receiver to charge a fee (Score 4, Interesting) 161

Just let the receiver of the call charge a fee to the caller if they are not happy with the call. Say $1. If I receive an unwanted robocall, I dial some code on my phone after the call and the previous caller gets charged $1. It can go to the receiver's account or it can be split between the receiver and his phone company. It doesn't really matter, because unwanted calls would almost completely disappear overnight.

Given that billing for phone calls is already in place, I don't see where the obstacle to implementing something like this would be.

Comment Re: Yes (Score 1) 603

Iterating with indices is sometimes very useful. For instance you can do something different for the first element (if (index==0)...) or you may want to push new elements at the end of the vector as you go (which invalidates iterators).

Comment Re:What drives up prices... (Score 1) 188

I am in the 1%. Can you explain to me what I am doing that is so wrong, other than having a successful career? This mindset that people that are doing well are necessarily exploiting the people who are not doing well is poisonous.

Of course people that are wealthy can tolerate recessions better than those that don't have any savings. I don't like very many expensive things, so I live under my means. The main thing that money buys me is peace of mind.

Comment Re:8 queens? (Score 1) 125

Good grief. It's amazing all you could deduce from reading one line of text I wrote and from not reading the code associated with it. You didn't understand what the code is about, but somehow that indicates some problem with me, not with you. I see.

The program I wrote works. It's a straightforward implementation of simulated annealing (look it up) for this problem, where the word "energy" is the standard term for the thing you are trying to minimize. I didn't bother making it for general n (although you can substitute 1000 by n and be done), I didn't comment it and I didn't give the variables reasonable names because it was a quick exercise to see whether finding a solution for n=1000 is very hard or not (it isn't), not production code.

Now, take your pill and breathe.

Comment Re:8 queens? (Score 1) 125

About a half a minute on my laptop after programming for about 20 minutes. I am sure that's not what the prize is about.

(C++14 using gcc on Linux)

#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <cmath>

int s[1000];

double energy() {
    int result = 0;
    for (int i = 1; i < 1000; ++i) {
        for (int j = 0; j < i; ++j) {
            if (std::abs(s[i]-s[j]) == i - j)
        ++result;
        }
    }
    return double(result);
}

int main() {
    std::srand(0);
    srand48(2);
    std::iota(s, s+1000, 0);
    double e = energy(), r = e;
    for (double T = 1.0; ; T *= .9999) {
        int i = std::rand() % 1000;
        int j = std::rand() % 1000;
        std::swap(s[i], s[j]);
        double n = energy();
        if (drand48() > std::exp((e-n)/T))
            std::swap(s[i], s[j]);
        else {
            e = n;
            if (e < r) {
        std::cout << T << ' ' << e << '\n';
        r = e;
        if (e == 0)
            break;
            }
        }

    }

    for (int i = 0; i < 1000; ++i)
        std::cout << s[i] << ' ';
    std::cout << '\n';
}

Comment Re: Television...Radio...Books... (Score 1) 330

You are absolutely right. The GP's argument has the same structure as the teleological argument for god, which is just a fallacy of lack of imagination: "We observe X; Y would explain X; I cannot think of any other explanation for X; therefore Y."

We don't need to provide an alternative explanation to prove that argument wrong: The argument is wrong, because its structure is wrong. You can plug in true premises and deduce false conclusions. Perhaps you are just not smart enough to come up with the correct explanation.

Slashdot Top Deals

An Ada exception is when a routine gets in trouble and says 'Beam me up, Scotty'.

Working...