Updated: September 16th, 2012
Introduction
StackOverflow is an amazing site for coding questions. It was created by Joel Spolsky of joelonsoftware.com, Jeff Atwood of codinghorror.com, and some other incredibly smart guys who truly care about user experience. I have been a total fan of SO since it went mainstream and it's now a borderline addiction (you can see my StackOverflow badge on the right sidebar).
The Story
Update 6/21/09: This server is currently under very heavy load (10-200), even with caching plugins enabled. Please bear with me as I try to resolve the situation.
Feel free to bookmark this page and return to it later when the fires have been put out.
Update 06/21/09: I think I've got the situation …
Updated: September 16th, 2012
Today I had to swap 2 columns in one of my MySQL tables. The task, which seems easily accomplishable by a temp variable, proved to be a bit harder to complete. But only just a bit.
Here are my findings:
-
The
UPDATE swap_test SET x=y, y=x;
approach doesn't work, as it'll just set both values to y.
PostgreSQL seems to handle this query differently, as it apparently uses the old values throughout the whole query. [Reference] -
Here's a method that uses a temporary variable. Thanks to Antony from the comments for the "IS NOT NULL" tweak. Without it, the query works unpredictably. See the table schema at the end of the post. This
…
The Ultimate Programming Language – LOLCODE
If you are a programmer, you, by definition, belong to the elite [awesome] human breed called geeks. If you know how to code in Python or Ruby, you might even think you’re pretty hot shit. But none of that compares in hotshitness to what you are about to learn.
Allow me to introduce LOLCODE – perhaps the most serious and, for some, cryptic, programming language. It is Turing-complete and uses an advanced compiler called Brainfuck (I’m still totally serious, and by the way if you’ve never heard of LOLCATS, then you’re not spending nearly enough time on the Internets. See the funny button that looks like a cross at the top right of your IE? Click it or your …
Basement hackers compete to best Netflix recommendations $1M
This is a great read by NY Times. An article on 6 pages rarely gets my full attention but this is one of them (though I detest the usage of "basement hacker").
Basement hackers and amateur mathematicians are competing to improve the program that Netflix uses to recommend DVDs — and to win $1 million in the process.
"THE “NAPOLEON DYNAMITE” problem is driving Len Bertoni crazy. Bertoni is a 51-year-old “semiretired” computer scientist who lives an hour outside Pittsburgh. In the spring of 2007, his sister-in-law e-mailed him an intriguing bit of news: Netflix, the Web-based DVD-rental company, was holding a contest to try to improve Cinematch, its “recommendation engine.” The prize: $1 million.
Cinematch is the bit
…
Read the rest of this article »