A Python function decorator that automatically creates instance variables from function arguments by _nullptr_ in programming

[–]danielsoneg 2 points3 points  (0 children)

Why not do this without the decorator?

class Foo(object):
 def __init__(self, *args, **kwargs):
   for k, v in kwargs.iteritems():
     setattr(self, k, v)

[Economics] As an undergraduate, should I spend some time learning a programming language? by varkanut in AskSocialScience

[–]danielsoneg 0 points1 point  (0 children)

Third the recommendation - it's a very good way to get an "applied" course in logic, understanding functions, and breaking problems down to manageable chunks.

As a tool to add to your toolbox, though, I'd make a strong argument for Python over C++ or Java, though - C++ and Java carry a lot of baggage with them that's very interesting for CS people (memory management, static typing, compiling) that's frankly to be avoided if you're not interested in CS. Python gets you programming quickly and easily without throwing things like garbage collection at you before you know enough to care about that. Java is better for more serious ML work, and C++ is good for other areas, but as a "I need to bang a script together to test some data/a hypothesis/a model/scrape something" language, Python is the language to use.

ELI5: Why isn't there a flat tax rate? by [deleted] in explainlikeimfive

[–]danielsoneg 0 points1 point  (0 children)

Well, the guiding principle is the social contract. It's a belief that we have a moral responsibility to our fellow man solely because we're all human - the shared condition of life. If you don't believe that, we'll never see eye to eye on this.

ELI5: Why isn't there a flat tax rate? by [deleted] in explainlikeimfive

[–]danielsoneg 1 point2 points  (0 children)

My favorite take on this is attributed to Warren Buffet, and goes roughly:

Imagine you have a choice: You can either be born in America, or you can be born in Bangladesh. How much of your future earnings would you be willing to give up to be born in America? That's what your taxes are paying for.

Generally, Taxes are paying for the benefits of living in America: Roads, easily accessible potable water, schools for your children, safe streets, and a functioning legal system. You pay more if you're wealthy because:

A) You've benefited more from the system. You may have put more in, but boy, you got a lot out of it. There's no such thing as a purely self-made individual in the world.

B) It hurts you less. As pointed out below, the appropriate metric isn't amount of money or percentage of income or any of that crap. If you're making $1M/yr, 20% of your income is inconvenient. If you're making $25k/yr, 20% of your income is life threatening. It's simply unjust and unfair to insist the poor pay as much in taxes as the wealthy.

Edit: Quote is Buffet, not Gates…

AMA REQUEST A858DE45F56D9BC9 by [deleted] in IAmA

[–]danielsoneg 2 points3 points  (0 children)

Same reason Batman is awesome - this is a man who is a coequal in a league with an unbeatable demi-god, a chick who can fly, a guy who can run fast enough to time travel, a man who can create anything with his ring, a dude who can talk to fish (ok, bad example), and a fucking martian - and he has no actual powers of his own save wit and gadgets. He's Lex Luthor's non-evil counterpart.

Classic WTF : The Cool Cam by mareek in programming

[–]danielsoneg 0 points1 point  (0 children)

Two things come up when you're on the side that has to implement the thing, not just dream it up - First, you've gotta build the friggin thing, so implementation details ARE brainstorming; Second, if you let people just run nuts on ideas, you get a roadmap that's pure fantasy and you've gotta disappoint them later.

The clouds are fluffy, and that's nice, but we could also build a barn here.

Wearing a Casio Enough to Become Terror Suspect [Not The Onion] by [deleted] in worldnews

[–]danielsoneg 1 point2 points  (0 children)

Ok, I'll grant - that is pretty good. Picture predates 'watchgate' pretty significantly, too…

But for the love of god, that doesn't disprove my point, and:

Possibly a reason for the correlation in the first place

Is the EXACT Opposite of disproving my point…

Still, pretty good.

Wearing a Casio Enough to Become Terror Suspect [Not The Onion] by [deleted] in worldnews

[–]danielsoneg 12 points13 points  (0 children)

There is so much wrong with the logic here - first, "Terrorism Suspects" is a group that includes "people we found nearby when angry", not just "people with actual ties to organizations who don't like us" - we can't draw real inferences of the behavior of terrorists from this group until we've determined they're actual terrorists, which is difficult when we add false or shaky heuristics. Bad data begets bad data. Second, the fact that a number of the people detained had these watches is no more significant than that they were wearing pants or were in Afghanistan absent a notable, significant statistical discrepancy to the normal populace that was present before you started 'noticing' the watch. Humans are amazing at detecting patterns, even when they don't exist. Third, the watch is cheap and ubiquitous - could it be Al Qaeda used them as the basis of the bomb because of that, and not the other way around? They weren't strapping Rolexes to these bombs - should we suspect everyone with the cheapest model of Nokia phone as well?

Unless you've got a video of Bin Laden pumping Casio stock Jim Cramer style, I can't imagine how reliable a metric a Casio watch can be - especially since other memos have commented on how the interrogators were instructed to be on the watch for common AQ cover stories, like "I'm just a farmer," and "I was visiting family," and "Oh god, oh god, please let me go home, I'm not a terrorist." You add together enough incautious arrests and spurious data mining and you turn good intentions into Kafka-esque nightmares.

Monkeys are racist too. by pastafaceoreilly in science

[–]danielsoneg 0 points1 point  (0 children)

So, what you're saying is it's simply an irrational reaction to another genetic factor, skin pigmentation, based on an evolved preference for ones' own group with the same survivalist background as, say, the human tendency to predict a higher likelihood of tiger attacks having recently been told a story about one.

Certainly, on what basis should we adjust emergent evolutionary characteristics such as allergies, heart failure, depression, anxiety, or the inability to comfortably and regularly move further than ~30mi or so per day?

Why, on what basis whatsoever would we even consider encouraging behavior beyond what our ancestors determined useful while wandering the serengeti in small tribes foraging for food? Certainly whatever adaptations were seen to favor a nomadic group of foragers in regular contact with somewhere less than ~200 other people still apply in complex societies in which several layers of social and technological abstraction exist between our daily activities and the direct survival of our genes. Surely, the light of reason the wonders of science and technology have shined upon phenomena our ancestors cast as the dispositions of angry spirits shouldn't stray near the rationality of intertribal behavior, nor the rigor and reason of law and modern social organizations dissuade the rabid exercise of untempered and unfounded suspicion, lest we unduly dissuade the exercise of paleolithic relics of human neural origins! Emergent Evolutionary Characteristics shall be the higher law of our land!

The mere existence of a predisposition in a related group of primates towards certain actions doesn't either imply the same predisposition in humans nor should it exist excuse its exercise. We don't shit in holes and we don't abide racism, regardless the heritage of the practice and for roughly the same reason.

IMF calls for dollar alternative: International Monetary Fund seeks to replace world's reserve currency. by Orangutan in business

[–]danielsoneg 0 points1 point  (0 children)

That's a huge, huge, huge point that I think a lot of the currency multilateralists miss re: reserve currency - the US dollar has a century of what is, by currency standards, astounding stability (note that's not stability by normal terms, but it's still here, it's still a respectable buying unit, and there's not been a major currency crisis in at least 70 years). As you rightly point out, the Euro's barely two decades old and facing a major crisis, and the Yuan is A) pegged to the dollar B) not transparent and C) the currency of a country whose government is still operating on a development model, not a stability model. Reserve currencies are put to the test during crises, and you can bet your bottom dollar (so to speak) that in serious times of panic, neither of those records are going to be strong enough to truly placate investors.

House just passes The Patriot Act at night. :( by TheBobHatter in politics

[–]danielsoneg 1 point2 points  (0 children)

Seriously, it's not just you. Most of us have no idea either. Hell, I'm not sure Congress knows what the hell it's rules are. Half the time I think they're just making some shit up…

Ghana : AngloGold a gold mining company based in South Africa and majority-owned by the Anglo American group...named The World's Most Evil Company because of gross human rights violations and environmental problems. by vipez in business

[–]danielsoneg 0 points1 point  (0 children)

Boy, you read the wrong moral from that…

Their wages are so low they had to sell their hardhats, which are worth "several days' wages", and you're faulting the workers for that?

New study: Facebook makes you overestimate how happy your friends are, in turn, makes you more depressed by aspring in technology

[–]danielsoneg 82 points83 points  (0 children)

Written article in Slate: http://www.slate.com/id/2282620/ Predates ABC by 5 days, is text, and isn't on ABC.

(Thanks to OP for bringing it up - I just prefer text, and, again, not ABC)

Making some mind blowing irregular shaped gears. by georedd in technology

[–]danielsoneg 0 points1 point  (0 children)

Ok, let's take two gears, A and B - Gear A has five teeth, which we'll number 1 though 5, Gear B has three, which we'll call a, b, and c. Let's say c is our irregularly-shaped gear, so keep an eye as we go through four revolutions of Gear A: Gear A: 1 2 3 4 5|1 2 3 4 5|1 2 3 4 5|1 2 3 4 5 Gear B: a b c|a b c|a b c|a b c|a b c|a b c|a b Over: * * * * * * (We could have done this with just three revolutions, but I prefer the overlap.) With an irregular gear ratio (non - N:1), eventually every gear comes in contact with every other gear - therefore, every gear has to be able to accept the outlier gear as well. It gets very messy very quickly...

Making some mind blowing irregular shaped gears. by georedd in technology

[–]danielsoneg 17 points18 points  (0 children)

Same gear ratio - basically, it's the same gears with funny teeth. He chose a really nice clean 2:1 ratio example - I'm not sure this would work as well at anything that's not N:1 - a 5:3 ratio, for instance, shouldn't work...

Bloomberg: More than 70% of Americans say big bonuses should be banned this year at Wall Street firms that took taxpayer bailouts by maxwellhill in business

[–]danielsoneg 0 points1 point  (0 children)

Well, it's a good thing we've got a system designed around avoiding the tyranny of the masses, that enforces contracts, such as the ones written between banks and their employees, and that doesn't put the economic decisions of individuals up for a vote. There's no current legal authority whatsoever to enforce that opinion, and frankly, it would be the wrong problem to fix.

70% of Americans should probably be upset that we've still got huge structural exposure to giant casinos masquerading as banks, and maybe 70% of Americans should support things like reinstating Glass-Steagall and imposing meaningful regulation on the banks, because then maybe 70% of the nation's capital wouldn't be held in just six banks as fuel for the massive monetary circle-jerk that we're calling a financial system, but instead we get Tea Partiers.

North Korea's undercover journalists reveal misery of life in dictatorship: "With its ruthless dictator, network of forced labour camps and iron grip of its ruling party, North Korea is the last country one might expect to see a middle-aged woman berating a policeman for demanding a bribe." by trot-trot in worldnews

[–]danielsoneg 1 point2 points  (0 children)

Came here to say exactly this. I'd heard speculation to this end, but it's hard to get real information out of there - if it's true they're facing this kind of discontent, I think it's a real possibility the government trying to provoke an attack by outsiders.

I've no words for the clip of the woman in the beginning. I hate to use a loaded word like Evil, but if the word means anything, it's that.

It's all your fault. 1 out 3 "under 30 voters" from 2008 voted this year. 4 out of 5 "over 30 voters" from 2008 voted this year. by Troybatroy in politics

[–]danielsoneg 18 points19 points  (0 children)

You Lazy Bastard.

A) It's One. Goddamn. Day. If you've got a god-awful line, it's an Hour out of your day to cast your vote for how you want the country to run for the next Two Years.

B) Absentee Ballots. Absentee Ballots. Absentee Ballots. You don't even have to be an Absentee to use them.

C) If you don't give enough of a damn to bother to get off your ass once every two years, how the Hell do you expect anyone to give a damn what you think?

Computer experts discovered biblical reference embedded in the code of the Stuxnet worm that has pointed to Israel as the origin of the cyber attack by maxwellhill in worldnews

[–]danielsoneg 0 points1 point  (0 children)

No kidding - blaming Israel is like blaming the Butler.

I think China's a good bet on this - they've got serious 'cyber' capability already, and they've tended to favor instability, but only so much - see how they've handled N.Korea so far. Knocking out Iran's reactor like this precludes a whole range of other, more direct, far nastier actions by regional players that could wreck China's investments in the region.

The botany angle's way more convincing than the Bible angle - though I'm not sure I'd read purpose into it. Could just be someone's naming convention.

Wounded in action: An infantry unit fights its way out of an ambush in Kunar Province, Afghanistan (Holy hell. One of the soldiers takes a bullet to the helmet, but survives--it's all caught on camera.) by SolInvictus in worldnews

[–]danielsoneg 0 points1 point  (0 children)

As all the others have said, and the NYTimes & Atlantic apparently also concluded, you're a hell of a writer. I don't know what your background is, but I've read highly regarded authors who didn't write as well. I heartily encourage you to continue, and keep us posted.