Tuesday, September 18, 2012

A Solution to the Debt Crisis


This cool math problem illustrates why government spending can actually reduce the debt. It is a good model for why when taxes and government spending go up, unemployment and debt goes down.

A tourist stops at a small hotel, puts a $100 bill on the counter, and goes to inspect a room.
The owner takes the bill and rushes off to pay the butcher, to whom he owes $100.
The butcher races to his wholesaler and pays off his own $100 debt.
The wholesaler hurries to the farmer and gives him $100 for the pigs he bought.
The farmer hands over $100 to the party planner who set up his bachelor bash.
The party planner heads to the hotel to pay the $100 she owes for the party room and lays the bill on the counter.
At that point, the tourist returns to the front desk, says that the room is unsatisfactory, picks up the $100, and departs. The tourist has his money back, and everyone else is $100 ahead by reducing his or her debt by that amount.

Friday, August 3, 2012

Abandoning Algebra

Andrew Hacker is a bad person:

In an opinion piece for the New York Times on Sunday, political science professor Andrew Hacker asks, “Is Algebra Necessary?” and answers, “No.” It’s not just algebra: geometry and calculus are on the chopping block, too. It’s not that he doesn’t think math is important; he wants the traditional sequence to be replaced by a general “quantitative skills” class, and perhaps some statistics.

http://blogs.scientificamerican.com/observations/2012/07/30/abandoning-algebra-is-not-the-answer/


Productivity vs. Guilt and Self-Loathing

The not getting stuff done sucks, but the guilt and self-loathing is where you really get into trouble. You likely don't say it out loud, but you think it. You might not tell your spouse, but you think it. I suck. Man, I suck. I'm just not getting a damn thing done.


http://www.hanselman.com/blog/ProductivityVsGuiltAndSelfLoathing.aspx

Thursday, August 2, 2012

Chaos Monkey


This is a Netflix service that helps test your cloud based applications.

Failures happen and they inevitably happen when least desired or expected. If your application can't tolerate an instance failure would you rather find out by being paged at 3am or when you're in the office and have had your morning coffee? Even if you are confident that your architecture can tolerate an instance failure, are you sure it will still be able to next week? How about next month? Software is complex and dynamic and that "simple fix" you put in place last week could have undesired consequences. Do your traffic load balancers correctly detect and route requests around instances that go offline? Can you reliably rebuild your instances? Perhaps an engineer "quick patched" an instance last week and forgot to commit the changes to your source repository?



http://techblog.netflix.com/2012/07/chaos-monkey-released-into-wild.html


Halide image programming language

I could use some help looking into this:

http://web.mit.edu/newsoffice/2012/better-programming-language-for-image-processing-0802.html

Cybersecurity bill stopped by a senator who admits he can't use email

John McCain led the Republican opposition to block the cybersecurity bill that would have encouraged businesses to protect themselves from attacks.  The original version of the bill which would have required businesses to put safeguards in place was watered down to make them optional, then blocked all together.

McCain has admitted that his wife checks his email for him because he doesn't know how previously has sponsored legislation to end network neutrality and now has helped block this bill at the urging of the US Chamber of Commerce.


Mr. Lieberman, the independent from Connecticut who is chairman of the Homeland Security and Government Affairs Committee, and the bill’s other sponsors, including the committee’s ranking member Senator Susan Collins, Republican of Maine, had worked for the past several years to pass cybersecurity legislation.

At a meeting last week, Mr. Lieberman got into an argument with Mr. McCain, his closest ally and friend in the Senate, about his opposition to the bill. Mr. Lieberman questioned why Mr. McCain was doing the bidding of the U.S. Chamber of Commerce and what Mr. McCain would say if the nation was crippled by a cyberattack.

Mr. McCain angrily said his reputation on national security issues was unquestionable.

Putting short term greed ahead of long term national security seems very questionable to me.

http://www.nytimes.com/2012/08/03/us/politics/cybersecurity-bill-blocked-by-gop-filibuster.html

http://www.telegraph.co.uk/news/newstopics/uselection2008/johnmccain/2403704/John-McCain-technology-illiterate-doesnt-email-or-use-internet.html

Update:

In Silicon Valley, “regulation” is often treated like a four-letter word. But the Valley seems to have made an exception for cybersecurity, where a sort of Wild Wild West has taken hold.

http://bits.blogs.nytimes.com/2012/08/03/silicon-valley-sounds-off-on-failed-cybersecurity-legislation/

Wednesday, August 1, 2012

Quantum mechanics and computer science

In an interactive proof, a questioner asks a series of questions, each of which constrains the range of possible answers to the next question. The questioner doesn’t have the power to compute valid answers itself, but it does have the power to determine whether each new answer meets the constraints imposed by the previous ones. After enough questions, the questioner will either expose a contradiction or reduce the probability that the respondent is cheating to near zero.

Multiprover proofs are so much more efficient than single-respondent proofs because none of the respondents knows the constraints imposed by the others’ answers. Consequently, contradictions are much more likely if any respondent tries to cheat.

But if the respondents have access to particles that are entangled with each other — say, electrons that were orbiting the same atom but were subsequently separated — they can perform measurements — of, say, the spins of select electrons — that will enable them to coordinate their answers. That’s enough to thwart some interactive proofs.

The proof that Vidick and Ito analyzed is designed to make cheating difficult by disguising the questioner’s intent. To get a sense of how it works, imagine a graph that in some sense plots questions against answers, and suppose that the questioner is interested in two answers, which would be depicted on the graph as two points. Instead of asking the two questions of interest, however, the questioner asks at least three different questions. If the answers to those questions fall on a single line, then so do the answers that the questioner really cares about, which can now be calculated. If the answers don’t fall on a line, then at least one of the respondents is trying to cheat.

“That’s basically the idea, except that you do it in a much more high-dimensional way,” Vidick says. “Instead of having two dimensions, you have ‘N’ dimensions, and you think of all the questions and answers as being a small, N-dimensional cube.”

http://web.mit.edu/newsoffice/2012/interactive-proofs-work-even-if-quantum-information-is-used-0731.html

Tuesday, July 31, 2012

How to Choose Colours Procedurally (Algorithms)


Colour is surprisingly complex. How colour works is determined by the physics of light and materials, the biology of our eyes and brains, mixed with a bit of psychology.

Although you don’t need to know all about the physics, biology, and psychology of colour vision, it is useful to have some background information (which you can find references to at the end of this article).

http://devmag.org.za/2012/07/29/how-to-choose-colours-procedurally-algorithms/

How random is pseudo-random?

After introducing true and pseudo-random number generators, and presenting the methods used to measure randomness, this article details a number of common statistical tests used to evaluate the quality of random number generators.


http://pit-claudel.fr/clement/blog/how-random-is-pseudo-random-testing-pseudo-random-number-generators-and-measuring-randomness/

Monday, July 30, 2012

Replace recursive functions to avoid stack overflow

There are cases where we prefer to use recursive functions such as sort (Merge Sort) or tree operations (heapify up / heapify down). However, if the recursive function goes too deep in some environments, such as in Visual C++ code, an unwanted result might occur such as a stack-overflow. Many professional developers probably already know how to replace recursive functions to avoid stack-overflow problems in advance by replacing with iterative function or using stack (heap stack) and while-loop (recursive simulation function). However I thought it would be a great idea to share simple and general methods (or guidelines) to replace the recursive functions using stack (heap stack) and while-loop to avoid the stack-overflow to help novice developers.

http://www.codeproject.com/Articles/418776/How-to-replace-recursive-functions-using-stack-and

Friday, July 27, 2012

Which programming languages are fastest?

This page has an interactive comparison chart what lets you compare the speeds of a bunch of different programming languages for various benchmarks.

http://shootout.alioth.debian.org/u64/which-programming-languages-are-fastest.php

Thursday, July 26, 2012

Norvig vs. Chomsky and the Fight for the Future of AI

Geek fight between linguists and artificial intelligence researchers:

Chomsky derided researchers in machine learning who use purely statistical methods to produce behavior that mimics something in the world, but who don’t try to understand the meaning of that behavior. Chomsky compared such researchers to scientists who might study the dance made by a bee returning to the hive, and who could produce a statistically based simulation of such a dance without attempting to understand why the bee behaved that way. “That’s a notion of [scientific] success that’s very novel. I don’t know of anything like it in the history of science,” said Chomsky.