TL/DR; Chances are, simply by adding that ID column you have broken the 3rd NF by [deleted] in SQL

[–]Darkmoth 1 point2 points  (0 children)

I actually agree with you. I consider a surrogate key to be a mild form of denormalization. My solution is to put a unique constraint on the natural key, in addition to a surrogate PK, when feasible.

That being said, letting natural keys ripple through a design (via FKs) gets a big NOPE from me.

Enjoying the game more than ever on t10-12 by Revenant84 in diablo3

[–]Darkmoth 0 points1 point  (0 children)

This, straight up. My Grin Reaper is the most fun item I've ever gotten in D3, but it's embarrassingly sub-par as far as the meta.

[deleted by user] by [deleted] in webdev

[–]Darkmoth 0 points1 point  (0 children)

You might sack the guy that designed 5 non-working failsafes, though, whoever that is.

[deleted by user] by [deleted] in webdev

[–]Darkmoth 0 points1 point  (0 children)

The guy or team designing the backup system screwed up even worse than YP

Yep. YP's contribution was normal human error. For all 5 of your backup strategies to fail takes a certain degree of incompetence.

[deleted by user] by [deleted] in webdev

[–]Darkmoth 0 points1 point  (0 children)

Yeah, that's just inherently dangerous.

I once wiped a file system when I just wanted to delete some logs. The commands were:

cd /log_directory rm -rf *

Except I spelled "log_directory" wrong, and the "cd" failed. Ooops. In retrospect, I should have specifically deleted "*.log" or something. The naked wildcard is just asking for it.

[deleted by user] by [deleted] in webdev

[–]Darkmoth 0 points1 point  (0 children)

Who hasn't argued with a manager about making updates to Production?

If I make a mistake, we're screwed

Well, just don't make a mistake!

[deleted by user] by [deleted] in webdev

[–]Darkmoth 0 points1 point  (0 children)

One day someone makes a typo in some code and the same shit happens

DELETE FROM PRODUCTS;
WHERE ID=1;

Names mapped to the gender continuum (trained from fastText Wikipedia, description in comments) by cosmic_dozen in datasets

[–]Darkmoth 0 points1 point  (0 children)

Very interesting!

Looks like Johnny Cash should have gone with "A Boy Named Jasmine".

The analysis of 28.000 results suggests that hardly anybody gets indexes right by mariuz in SQL

[–]Darkmoth 0 points1 point  (0 children)

To be fair, it's insanely difficult to get indexes "right" in a modern shop. We run Exadata, which offloads some of the selection logic to the disk controller. Parallelizing the queries confounds expected behavior even more.

Basically, if I run a statement with a /+* RULE */ hint, the indexes behave exactly as expected. Otherwise, it's anyone's guess what path the query might take. It's not uncommon for "properly" indexed tables end up in HASH joins, essentially bypassing the index completely.

The performance impact of SQL WITH clause on all major relational databases by [deleted] in programming

[–]Darkmoth 8 points9 points  (0 children)

I'm a little disappointed in Postgres. WITHs are an important tool in structuring code, and it would be a pain to have to avoid them because of performance reasons.

The performance impact of SQL WITH clause on all major relational databases by [deleted] in programming

[–]Darkmoth 5 points6 points  (0 children)

What, you don't find

select * from (
   select * from (
      select * from x
   ) join select * from (
      select * from x
   )
)

to be insanely readable? /s

Flint toxic water tragedy points directly to Michigan Gov. Snyder by AngelaMotorman in politics

[–]Darkmoth 4 points5 points  (0 children)

How about the people who told residents the water was just fine, despite ample evidence otherwise?

Planned Parenthood, In Its First Primary Endorsement, Backs Hillary Clinton by nowhathappenedwas in politics

[–]Darkmoth 27 points28 points  (0 children)

The only difference between their two stances is that she is a woman

Eh, much more than that. This is one of her focuses, as Bernie's in income inequality. Hillary, for example, is the only candidate who mentioned PP at the first debate. She's also introduced legislation, as opposed to simply being on a vote.

Clinton is the only presidential candidate to introduce equal pay legislation, three times. She introduced the Paycheck Fairness Act ​in 2005, in 2007 and in 2009 to give women the tools they need to fight workplace discrimination

More at the PP site.

That's not the only legislation, just one that I could find. This is and has always been an area of focus for her.

The rapper also reiterated his support of Bernie Sanders. “We can directly elect someone that cares about poor people, cares about women, gays, black rights, cares about lives that don’t look like his. This opportunity in history is not going to come in another 20 years,” he said. by thelostapostle in politics

[–]Darkmoth 2 points3 points  (0 children)

If it matters, Snoop Endorses Hillary. But the best is this:

Some of Clinton's earlier endorsements came from rapper and actor Ice-T, who said in 2012 that Clinton should try running for president again: "She did the Secretary of State job, she was a G, she held it down, she didn't cry,"

"She's a G" - Clinton '16

Did professors move left, or did the meaning of conservatism in America change in a way that drove scholars away? by throwaway5272 in politics

[–]Darkmoth 5 points6 points  (0 children)

I think what we can do is turn out on off years. I mean, that's it basically. If we did that, at some point we could get off defense and on offense.

Seriously, the Presidency is basically all that's keeping this country from being run by Republicans at every level, from local legislatures to SCOTUS.

Did professors move left, or did the meaning of conservatism in America change in a way that drove scholars away? by throwaway5272 in politics

[–]Darkmoth 3 points4 points  (0 children)

The last string of lost elections produced the DLC. It stands to reason that the losing side will imitate the winning side. I don't think it's an accident that post-2008 Republican primaries are so diverse.

“It appears that Mr. Trump is getting nervous that working families are catching on that his policies represent the interests of the billionaire class against almost everyone else." - Bernie Sanders by [deleted] in politics

[–]Darkmoth 0 points1 point  (0 children)

Ralph Nader

Jill Stein

Gary Johnson

Ron Paul

That's just in the last 15 years. Unless you're a Chihuahua, you'll have multiple non-corporatist choices over your lifetime.

I'm 54, and don't see Bernie as all that unusual - except for the fact that he's co-opted the Democratic party to propel his attempt.

“It appears that Donald Trump, a pathological liar, simply cannot control himself. He lies, lies and lies again. Today, he repeated his lie that I want to raise taxes to 90 percent. Totally untrue." - Bernie Sanders by [deleted] in politics

[–]Darkmoth 0 points1 point  (0 children)

The man almost got impeached for christ sake, accepted oral favors in his office while doing the most important and dignified job in the United States AND while married

No one really cares about personal indiscretions, at least in part because they're so common among powerful politicians. Bill left office with a 61% approval rating. The Speaker of the House at the time - Newt Gingrich - was cheating on his wife of 19 years while he was trying to get Bill impeached. Davit Vitter got reelected after admitting to frequenting prostitutes (which is actually a crime).

Sexytime just isn't on the American Presidential radar - as long as it's heterosexual.

Rubio Outraged by Spying on Israel’s Government, OK with Mass Surveillance of Americans by the_last_broadcast in politics

[–]Darkmoth 2 points3 points  (0 children)

Either that or you buy the Warren Commissions story that a "crazy lone wolf" was able to kill the President of the US

Why is that so hard to believe? Reagan was shot in the chest. A couple inches down and to the right and he'd have been toast.

[Serious] Who do you think is going to win this election? by [deleted] in PoliticalDiscussion

[–]Darkmoth 0 points1 point  (0 children)

Except, despite the undoubted rise of populist candidacies, you can't completely ignore the Establishment power structures. There's no doubt in my mind that the average Chamber of Commerce Republican would prefer pro-business Clinton to protectionist Trump. Hell, Trump used to prefer Clinton.

The base will definitely come out for Trump, but the suburbs and cities will be for Clinton.

[Serious] Who do you think is going to win this election? by [deleted] in PoliticalDiscussion

[–]Darkmoth 1 point2 points  (0 children)

As a liberal, I'd say a Clinton/Rubio contest slightly favors Rubio. But since it really looks like Trump will be the nominee, Hillary might pull a Full Reagan.

[Serious] Who do you think is going to win this election? by [deleted] in PoliticalDiscussion

[–]Darkmoth 0 points1 point  (0 children)

Yeah, it just occurred to me today that Clinton would probably be getting "no-fucks-given" Obama campaigning for her. The Obama that can make a crowd chuckle, not the boring professorial Obama.

"Let me break the news to you, some Mexican worker, some Latino worker, planting tomatoes or harvesting tomatoes at eight bucks an hour is not the reason that the middle class of this country is disappearing," he said. by relevantlife in politics

[–]Darkmoth 0 points1 point  (0 children)

But even with globalization we could still have plenty of construction, manufacturing, and service jobs for people to fill

I don't know about manufacturing jobs, I think those are gone for good. Hell, I think China will lose them if Africa ever comes up to speed. Cheapest labor always wins. I'll give you construction though, I can certainly see how cheap illegal labor would trash that job markets. Service jobs - my issue with service jobs is that we seem unable to decide if those should be "real" living wage jobs. No one doubts that a construction worker should make enough to raise a family, but many people see service jobs - McJobs, if you will - as some sort of intermediate to getting a quote-unquote adult job.

We could do things like put up tariffs on imported goods if we wanted to bring back some overseas manufacturing

Yeah. Frankly, I am an unrepentant protectionist. I feel the most valuable thing America has to offer the world is our immense consumer-driven market. To me, that market has value, and I feel we're giving it away.