November 9, 2009

Bruised Asses

Bruised AssesIs it just me, or is our government becoming a reality TV show? Will all this Asses vs. Elephants drama ever be broadcast at 9/8 central on Wednesdays and hosted by Carson Daly? Will we ever limit voting to only attractive bisexuals? Could New York be New York's next governor? Any of this is possible and, as far as I'm concerned, permissible. U.S. politics has already lost any semblance it had to a serious attempt at governing a country, so we might as well get it on tape.

I am pondering this, Dear Lewsers, because the news this week has me so very confused. What exactly does Barack Obama's 2012 re-election bid have to do with the governor of Virginia? It obviously has something to do with him, because everything has something to do with everything else, if you think about it. The main question is, why is the Virginia gubernatorial race (and the New Jersey one) being covered as a story about Obama and the Asses?

Let me give you a taste of what I'm talking about. Here is the opening paragraph to The Week's main story, Democrats bruised at the polls (emphasis added):

Republicans rebounded sharply from their 2008 defeat this week, winning governors' seats in New Jersey and Virginia in an election marked by crosscurrents. Virginia Republican Bob McDonnell won 62 percent of independents in crushing Democrat Creigh Deeds, 59 percent to 41 percent. In New Jersey, Republican challenger Chris Christie ousted Democratic incumbent Jon Corzine, 48 percent to 45 percent. Exit polls in both states revealed that voters remain generally positive about President Obama personally, but have soured on the economy. The president, who invested substantial time and resources campaigning for Corzine, proved to have little influence there or in Virginia, despite his victory in those states one year ago. "Americans want our presidents to succeed," said Mississippi Gov. Haley Barbour, chairman of the Republican Governors Association. "But the president's policies are very unpopular, and they are hurting Democrats."

Unless you cannot see bold, you will notice that most of that paragraph is gossip about Obama instead of news about things that actually matter. The rest of the page-long article, of course, continues in a similar fashion. Now, there are two thingies that can be pointed out about this paragraph, and out I will point them.

The first thingie is that the media cares mostly about the people in the government, not the government itself. In particular, they seem to care about which people are winning the battles of the day, frivolous though those battles may be. They could be fighting about whether Republicans or Democrats have historically bigger dicks, and the news would cover it. [1] Now, maybe two gubernatorial elections isn't frivolous. But isn't it silly to spin the elections and make it about Obama's popularity instead of about what is going to happen (or what did happen) in those two states?

It is silly to us normal, thinking people. But to the Lewsers in the media, it's another reality brawl. The focus is who is ahead, and the who is never the citizens.

One of my favorite characters in this soap is The Independents. The media loves to stir up emotion by throwing out statistics about this infamous group, The Independents, the deciders of who is more popular. Of course, we know that the Conservatives and Liberals will vote for whoever is the zaniest and whackiest on their own side. But The Independents, ah! Those are the smart ones. Get 59 percent of the vote, and well, that is fine. But 62 percent of The Independent vote, now that is something to be proud of. This candidate must truly be a winner.

The truth is (and this brings me to the second thingie), this just proves that Independents don't know what the fuck they're talking about. If they voted based on some special platform or set of values, they'd already know which party they were in. Anybody who can define their political beliefs and prioritize them can decide whether they are an Ass or an Elephant or maybe a Libertarian or some other whacky thing. But Independents are none of these, which must mean they just wing it every election. They must be voting based on the glitz and the hype (part of which, usually, is them).

The sad thing is that all of this subjectivity is encouraged. It should not matter whether voters "approve" of Obama. They should be asked if they approve of his handling of Guantanamo Bay or Iraq or Afghanistan, or if they approve of his Supreme Court nominee or his nuclear proliferation efforts. Instead, the media pollsters ask you to be polarized. Is he good or is he bad? Should his side win? Decide if you like him or not and help us affect public opinion. It's like American Idol, except without even the reasoning voice of Simon to guide us.

Another sad thing is that the politicians eat it up, too. They are like actors in a film shoot. The Independents and the media give them their motivation, and they act out the scene. Remember when the Secretary of the Treasury fell to his knees and begged Nancy Pelosi to sign on to the stimulus plan? Or when that guy threw his shoe at G.W. and he dodged it like a champ? Remember the Beer Summit? Remember the town halls?

Of course you do. We all do, because they are stupid and unimportant. They are attached to important things, like the stimulus plan, relations with the Middle East, racial profiling, and health care, but they themselves are just drama. But unlike Real World vs. Road Rules where the winners get a cash prize and the losers go home empty handed, the losers in this drama are us. We lose because nobody is willing to seriously discuss government anymore, so we don't get any Change.

Now, Dear Lewsers, take this moment of clarity I am handing you and consider the futility of our republic. What does your vote count for? If the popularity pendulum is to swing forever from Ass to Elephant, why does a vote even matter? Won't both sides eventually get to do everything they want anyways? [2].

It's depressing, I know, and I leave you with more questions than answers. But it is not my style, Dearest of Dears, to end on such a sad note. So let me just say that I personally am reveling that the Asses got beat, or at least, as The Week put it, bruised. That is something that we can all be happy about. I gave up on government a while ago, and so from this comfy futon the whole election process is just an exercise in slapstick. And slapstick goes great with popcorn. Mhmm, I love it. Get some butter on there, some salt...

Notes:

  1. Libertarians have huge dicks
  2. And forget checks and balances. That shit is long dead.

November 2, 2009

How to give a proper Turing Test

How to give a proper Turing TestIt recently occurred to me that I have not met all my online contacts in person. Although this kind of cyber-acquaintance has become increasingly common, to me it presents a conundrum: how do I know if one of my IM buddies is French? Also importantly, how do I know that I am conversing with a mortal, and not a mindless computer?

To address this second question, I introduce the concept of a Turing Test. Now, a true TT consists of three parties: the human interviewer, the control subject (a human), and the computer. The idea is that the interviewer must try and guess which subject is the computer and which is the human, after conversing with both of them.

For my more practical and less academic purposes, though, I decided to come up with a modified TT. The MTT consists of two parties: the interviewer (yours truly) and the subject, who may either be a human or a computer. The idea with the MTT is for the interviewer to make an educated guess as to whether the subject is man or machine.

After much research and development [1], I've formulated the following Modified Turing Test:

Question 1: Who's your daddy? Provide an example.

Question 2: Are you French?

Question 3: Explain human emotion and prove that you have it.

This test can be given via email, IM, or any other internet protocol. Typically, I feel it is only polite (assuming that your subject turns out to be human) to preface the test with a disclaimer like the following:

Since I have never met you in person, I am unsure if you are a human or a machine. Therefore, I will administer unto you a Turing Test which will allow me to decide.

Questions one and three should be self-explanatory. On question two, the normal human response is "God, no!" or something to that affect. Of course, French people will respond by saying something along the lines of "Oui, monsieur ou maddame. Je suis un Francophone."

If you have any questions, feel free to email me. I do not accept emails from robots, so I do ask that you include your answers to the above three questions in the subject line.

Notes:

  1. Before I created this test, I had another method. It involved me flying to Miami to meet the subject in person. This worked out well, but I decided to devise the written test in order to be more cost- and fuel-efficient.

October 1, 2009

Why We Hate Microsoft

Why we hate Microsoft I was recently smirked at for declaring that Microsoft is evil.

To be fair, my own smirk probably did deserve to be smirked back at--it usually does. What really bothered me was the gentleman's response to my statement, which was something akin to, "I know it's popular to hate Microsoft, but if it weren't for them you wouldn't be clicking and dragging those nice boxes on the screen all the time--you know, windows."

Ahem.

It really gets to me when people pretend that I don't understand something obvious. The gentleman was right in one respect: it is popular for young computer/programming enthusiasts like myself to hate Microsoft. What he didn't recognize is the reason that we hate Microsoft. I understand that Microsoft has accomplished quite a bit in the world of technology; this is not what I hate them for. I hate them because it is time for them to go away or change drastically, and they are unlikely to do either.

People like me believe that we are entering a new age in computing. This new age is different from the previous one in the following ways:

  1. Source code and protocol standards are usually open
  2. Services are free or cheap, and they are monetized using advertising
  3. Nothing is centralized

Don't think this is true? Think about the great new things that you use every day. Firefox: open source, free, maintained with input from the internet community. Twitter: open API (that's where all the sweet Twitter apps come from), free, usable from a million different places (not just Twitter.com). Facebook has similar properties. So does Gmail. So do lots of blogs and other popular web sites. So do most popular new things.

Obviously, the prominence of a company like Microsoft is a problem in such an age. In the Microsoft Age, the rules played out more or less like this:

  • Source code is secret, because...
  • All software products and services are expensive, because...
  • Everything is centralized around Microsoft products

This was fine when Microsoft had all the best products for most peoples' needs, and it is why they've had so much success. But peoples' needs are changing drastically and quickly, and their model no longer fits. Which is why it's such a pain when they continue using their model, and why we hate them.

A few days ago I was at a presentation/networking event held by Microsoft and a couple of other big companies at Northeastern University. The idea was to convince business majors that they want to work at Microsoft. At a few points, I couldn't help laughing out loud (or at least smirking out loud) at some things the presenter had in his PowerPoint presentation and his speech that I found to be oh-so-typical Microsoft talk:

  • To become the Thought Leaders of tomorrow, you must be surrounded and mentored by the Thought Leaders of today
  • Life @ Microsoft = Work + Play + People
  • We invented the fun and then others took it and continued to do it (said during an answer to a question)

On a more serious note, Microsoft really does get in the way of the modern developer.

Internet Explorer is a great example. A good deal of being a good web developer is being good at getting things to work in IE despite its many quirks and bugs. Were it not for IE, web sites could be made twice as fast. [1]

Of course, the other Microsoft platform that programs are commonly developed for is Windows, which is just as naggy and annoying. Why is it that great software so often premiers only on Windows, with the Linux/Mac versions released months down the line (ahem, Chrome)? It premiers on Windows because Windows dominates the operating system market. It takes months to develop versions for everything else because developing for everything else is totally different. This explains why horrible languages such as Java are so popular: Java developers only have to deal with a slightly-less-annoying "virtual machine" and can forget the nightmare that is Windows.

And don't even get me started on Windows from the user's perspective. It is a nightmare. Try setting up some simple server mirrors on Windows without buying something really expensive. When working at a development company recently, I remember noticing how much time I spent just grappling with different Microsoft products in order to get my work done. But when it came time to commit to the CVS server running on a Linux box? No problem. Deploying a new build on another Linux server? Smooth. It's hard to pinpoint what exactly the problem is with Windows, but it's there. [2]

This is why we hate Microsoft. They are the big hippopotamus that won't go away. And yes, hating them is popular now. Bite me.

Notes:

  1. Granted, IE8 is a promising improvement. But still, how long did it take them to catch up to the rest of the internet? Clue: answer in years.
  2. I know I sound like a hack for having an unexplainable, mystery gripe with Windows. The fact is that everything just seems to go more smoothly when I'm not using it. Maybe it's just a placebo effect. As the presenter at that Northeastern event said at least five times, "Mac really did a good marketing job with those commercials."

September 3, 2009

The MyFox Drinking Game

Throughout Boston, frustrated college students have been searching for new ways to get drunk. My brothers and sisters, I bring you the MyFox Drinking Game, inspired by Fox 25's chief "meteorologist", Kevin Lemanowicz.

The rules are simple: watch for each of the below Kevin Lemannerisms and, when you spot one, call out the corresponding phrase and enjoy the appropriate number of chugs with all your drinking buddies (if you're drinking alone, it's recommended that you call them out anyways; maybe your neighbors will be intrigued and tune in for a taste of the smugness).

The game is best played with beer, wine, or champagne--anything you can chug. If you're playing with hard alcohol, you can decide whether to substitute a single chug for a full shot or a half. Either way, you can trust Kevo to get you totally crunk any night of the week except Beach Wednesdays. Let's take Boston by storm!!

The Kevin Lemannerisms

Pointing into the camera: one chug

Take a chug whenever Kevin points into the camera--presumably at you, the viewer. We're still not sure whether this is a conscious Lemannerism or not. Most Lemannerists to date think it is a subconscious attempt to remind the audience that we are here and he is there, soaking up the spotlight. Shout out: Fuck you, Kevin!

The Fonzi Point: two chugs

Originally the "double point", the Fonzi Point occurs when Kevin points both fingers at once into the camera. Just cover up all those gray hairs, throw a leather jacket on him, and, ayyyyyy! We got ourselves a regular Fonzi! Shout out: Ayyyyyy!

The Pat: one chug

The Pat is a rather flamboyant gesture whereby Kevin seems to pat an imaginary puppy or some other cute animal on the head. If you watch Fox 25 long enough, you'll get what I mean. Or you could try imagining your ex-girlfriend's hand motions as she explains last week's episode of Gossip Girl. Shout out: Omg omg!

The CLAW: one chug

The CLAW is one of the most special Lemannerisms we know of. It occurs when Kevin shapes one of his hands in the form of a bear claw, as if he is attempting to scratch the life out of the nearest storm or low pressure zone. Shout out: THE CLAWWWWWW!

The Double CLAW: two chugs

The Double CLAW, while frightening to most viewers, is completely harmless. Just imagine he is doing the Monster Mash. It happens, of course, when Kevin makes the CLAW shape in both of his hands. Shout out: we-do-the-MASH (sung)

Smug skies ahead: two chugs

Only use this rule if you can hold your drinks, as it happens in nearly every one of Kevin's intros and outros. Take two chugs if Kevin says something smug or makes a smug grin. Not only is this a frequent occurrence, but if you're partying with smart people (MIT sorority girls, for example) it can lead to interesting and hilarious drunk debates about what is considered smug and what isn't. Shout out: smug skies ahead!

For Advanced Players

There is an additional variant of the MyFox Drinking Game whereby the last person to make the appropriate shout-out must suffer a cruel and unusual punishment. You can settle for an extra chug or two, or you can make them spin around on one foot singing "We Love You Conrad" from Bye Bye Birdie, replacing "Conrad" with "Kevin", of course. You'll have to YouTube the song if you don't know it, but here are the lyrics:

We love you Kevin
Oh yes we do
We love you Kevin
And we'll be true
When you're not near us
We're blue
Oh, Kevin, we love you!

For Kevin Lemanowicz

No hard feelings, Kev. You just have a hilarious weathercast. You know I'm just playin' wichu dog!! Just think, you are now responsible for thousands of college-age jerks getting drunk off the weather. The next generation of weathermen is in your claws.

August 20, 2009

Flation

I recently stumbled on a great opinion piece about deflation. My aim here is to shamelessly plagiarize it and hopefully add my own two cents.

First, the basics. To understand inflation and deflation, one must first understand something about money. Money, of course, represents value. We know that any item we buy in a store has a certain value in dollars. A medium cup of coffee at my neighborhood Dunkin Donuts has a value of $2.00. However, the reverse is also true: money has value that can be expressed in terms of items. I know that a cup of coffee has a value of $2.00; therefore I know that the value of $2.00 in terms of coffee is one cup, and that $100.00 is valued at fifty cups. This is simple.

Now consider the derivation of an item's value. Typically, the value of items is based on their rarity. Diamonds are rare, so they have a high value. A food like corn is not rare, so it has a low value. Water is rare in some countries, so there it is expensive. But in a country like America water is plentiful, so its value is very low.

This is why items produced in China are so cheap. Consider t-shirts manufactured in China. The population there is very large, which means labor is not rare. The factories that make the t-shirts use materials that are not rare (cotton or synthetics). Furthermore, they make a lot of them. This means that t-shirts from China are not rare at all, which means they have a low value, which means they have a low price in dollars.

So, if money has value and value is determined by rarity, how do we determine the value of money? How can money be "rare" or "not rare"? It is just money. The answer is the same as it is with other things: the more dollars there are the less rare each one is.

Let's say that a t-shirt produced in China has a value of $5.00, and, in total, China produces ten million t-shirts each year. Now let's say one year China decides to produce twenty million t-shirts instead. Since there are now twice as many t-shirts they are each half as rare, and therefore have half the value. The price of a t-shirt would drop to $2.50.

Now the same can be applied to the money supply. Imagine that China simply keeps producing ten million t-shirts per year and they cost $5 each, and the total amount of dollars in the economy is one trillion. Now imagine that the number of dollars in the economy doubles to two trillion. Just like before, the rarity would be cut in half, and so would the value. Since the dollar would now be half as rare and half the value it was before, the price of a t-shirt would rise to $10.00.

The value of money changes when the total amount of money changes. Simple.

Which brings us to inflation. Inflation occurs when money becomes worth less. Money becomes worth less when there is more of it in existence. When money becomes worth less, prices rise. Inflation.

Deflation, you would think, should then be the exact opposite. It is, but it isn't. If the amount of money in existence did decline its rarity would increase and so would its value. This would certainly be considered deflation.

The reality, though, is that the money supply rarely decreases. In economies where gold is the basis of money, the amount of gold usually increases ever so slightly year by year as more is discovered and mined. In economies where money is entirely an imaginary entity (like ours), the government tends to print more money rather than destroy it.

But deflation can occur even if the money supply is increasing slightly. Deflation occurs naturally as technology advances. Computers are an excellent example. As humans become more and more efficient at building computers, it costs less to make them. Computers become less and less rare every year. Therefore, the price of computers is steadily declining. In this sense, the dollar (in terms of how many computers it could buy) is deflating; the value is increasing.

Now imagine an economy where the amount of money is always constant, like in the one trillion dollar economy we imagined earlier. In such an economy, there would probably be a slight deflationary trend, since the only changing factor would be technology. Most items, whether they be t-shirts or computers, would constantly become less and less rare. Therefore, each dollar would have a higher and higher value.

So there you have it, inflation and deflation and why they happen. Now the question is, which one is more desirable?

Deflation is.

If you have ever discussed economics with just about anyone, you probably scoffed at that last remark. The general consensus amongst most popular economists (and politicians, from whom most people learn their economics) is that deflation is dangerous and should be avoided. This is the conspiracy that is discussed in the article I mentioned earlier. To claim to a politician that deflation is more desirable than inflation is almost like claiming to a Viking that the Earth is round. In fact it is exactly like this, because both claims are equally true, both parties mentioned are equally wrong, and both facts are equally obvious.

Fear of deflation is quite silly. According to those who fear it, people do not buy things if their money is increasing in value. When you think about this for less than three seconds, it almost makes sense. A person may decide not to buy something today if he knows it will be cheaper tomorrow (or, more realistically, next year). If deflation ruled, everything would certainly become cheaper and cheaper all the time. So, to the skeptics, this means that if deflation occurred the economy would come to a halt.

Of course, if you have ever heard of an iPod you see the flaw in this theory. iPods get cheaper all the time and, even better, they get cooler and more advanced all the time. This doesn't mean that people simply wait endlessly because they know there is always something better around the corner. People buy iPods because they like iPods, obviously. The same applies to computers and TVs. It applies to lots of things on varying scales. When automobiles were first invented they were expensive and not very nice. Over time they continually got cheaper and better. But did people from the 30's to the 80's decide to hold off on buying a car? Of course not. They bought lots of them.

As you may have gleaned by now, it would be better for most people if deflation ruled, or, at least, if inflation weren't so rampant. People would always be buying better things, and so good things would become less valuable, opening the door to even better things and even more advanced technologies. As is pointed out in the Bloomberg article, there really is no historical precedent that suggests deflation is dangerous.

Economists and politicians defend the inflationary economy so staunchly because it benefits them the most. Prices tend to increase first, before wages do. Therefore, working people are forced into debt in order to buy the things they need. Debt is a gold mine for the elite that run the economy. Under deflation, debt is not needed as much and it is easier to pay off. It is also much easier to save money.

For the government, inflation is a way to tax without increasing tax rates. If a government prints a large amount of new money, they will inflate the economy and prices will rise. But the inflation takes some time to occur. In the mean time, the government can spend its new money at pre-inflationary prices. Later on when inflation hits, the companies that the government paid realize that their money is worth less. In order to get the same value of money as they lost by giving away items to the government, they raise prices. The consumer fills in the gap.

The sad result of this is that neither Republicans nor Democrats will ever stop inflating our money supply. Republicans tend to be friendly with big corporations that benefit from inflation. Democrats like to spend money on government programs, so they need the invisible tax caused by inflation. Even worse, most politicians don't even understand these concepts. They simply learn at some point (probably from popular economists, who often get research grants from the government) that inflation is safe and deflation is not. And in their minds, that is that.

Damn Vikings.

I have been rambling on about flation for so long because it is so very important. When you frame political issues in terms of monetary policy they start to look very different then the way they come out of Barack Obama's mouth on TV.

Everybody has heard Obama and others lament about the growing distance between the upper and lower class: the rich are getting richer and the poor are getting poorer. The middle class is disappearing. Not realizing (or not caring) that this is the result of inflation of the money supply, the president and the rest of Washington decide to solve this issue by inflating the money supply at an accelerated rate.

It changes so much that it is hard to keep track, but it is sounding like the government is going to double the national debt over the next several years, or maybe just this year. Either way, this will cause more inflation and more disparities between rich and poor. When the government buys things with imaginary money, it increases the supply of imaginary money. Money becomes less rare. It loses value. It inflates. Simple.

The ramifications of this are enormous. All of a sudden a "recovery act" that is supposed to create all kinds of jobs and wealth starts looking like an inflationary device that will simply keep debt-ridden, poor Americans exactly as they were before: debt-ridden and poor. This is the power of flation. It's not an exaggeration!

Knowing this, you can understand why Ron Paul talks about inflation (and the Federal Reserve, who facilitates most of it) so much. Almost every question he is asked, he ends up coming back to the Federal Reserve and monetary policy. To people who don't think about flation, this makes him seem like a one-line fool. But people who grasp its importance understand that our government's rampant inflation of the money supply is really the root of many of our problems. Really.

This is also why, no matter how many new regulations he puts in place, Barack Obama will not really change America. The economy will continue to work the same way as long as the government continues this behavior, and Barack Obama certainly plans to. "Regulations" are trivial compared to monetary policies that throw trillions of dollars around like they're day-old Skittles.

The most important question is, how do normal people deal with an economy they don't control? There are two answers.

One way to deal with it is to ignore it. Money isn't everything, after all. And, heck, if the country does eventually crumble in depression and get taken over by China, think of all the pork fried rice we'd be eating!

The second way to deal with it is not to vote for idiots. Okay, okay, "idiots" was the wrong word. Politicians like Barack Obama and George Bush aren't idiots, they just haven't accepted flation, and they never will. I recommend checking out Libertarians, or Libertarian-in-the-closet-Republicans, like Ron Paul. It's also a good idea to try and learn economics, which I do by checking out books recommended by Ron Paul. Seriously, that guy's just the man. (And he's so adorable!)

Either way, I suggest you buy your coffee early and often. You never know when Dunkin's gonna pull a fast one on you. That day will come, my friends.

July 8, 2009

I'll finally make millions

I want to officially copyright the drunk frowney face:

];

June 30, 2009

Targeted Advertising

This is what I see when I log in to Facebook:

See the "More ads" link at the bottom? I've never clicked that.

June 26, 2009

Lies

Sometimes I'm just not in the mood to be spammed. :(

Then I got this one, the subject being something about "Out of office":

May 18, 2009

Re: Technology Bill of Rights

*** Disclaimer as to the tone of this response ***

Sometimes people misread the tone of a blog post, response, or comment. Since I don't have an expertly-developed tone, I'll make it clear: I'm nice. I respect other peoples' thoughts and the opinions of those that I disagree with. If you feel I am being nasty, just pause and re-read the sentence. Imagine someone smiling. There you go.

I recently read an interesting blog post by Paul Venezia about a Technology Bill of Rights. While the post makes some great points and is great for initiating dialogue, I think that some of Venezia's ideas are woefully mislead.

To begin with, I disagree with the notion that a Technology Bill of Rights is necessary, and in fact that it would be a good idea. When a nation needs to address the issues of a changing society, there are generally three options.

1) We predict the future and write laws based on that. If that were possible, the founding fathers would have already made laws about blog posts :)

2) We make new laws every time something changes. This is the general approach that our government takes, and it is the approach that is implied by a Technology Bill of Rights.

3) We take the laws that were created centuries ago in the Bill of Rights and decide their interpretations through the courts, like we were meant to.

This third approach is the one I recommend. As I will note later, I think most of the issues that Venezia addresses in his post can be handled by interpreting and/or enforcing current law.

Venezia lists six articles as possible starting points for a Technology Bill of Rights. In my opinion, he's on the right track with most of them. But, here are my qualms:

Article 1. Any individual shall be able to choose anonymity when posting to Internet sites. This is the one I most strongly disagree with. If people were forced to embarrass themselves in angry, misguided comments (as Venezia comically points out :) ) I would agree. But people are not forced to participate in online community activities, they make a choice. If they make the choice to go ranting in comments, they should make the choice to read the privacy policy of the site they are posting on. Should sites perhaps be required to accurately enforce their own privacy policies? I could see how that could be reasonable. But by no means should web sites be forced to provide anonymity to any user who wants it. Web sites should be able to do what they want!

Anticipated counter-argument: nobody reads privacy policies. Well, nobody asks for the nutrition facts at McDonalds, either. That doesn't mean we make McDonalds illegal just because most people don't know how to protect themselves from it. People make choices!

Article 2. No network provider may constrain or restrict access to the Internet in any way, shape, or form other than agreed-upon access speeds. I have a kind-of complicated view on Net Neutrality, but I'll just say I agree here since I mostly do.

Article 3. No individual shall be held liable for effects of malware or malicious code unknowingly run on a personal computer. Agreed, but this issue doesn't need its own law--it needs a court decision. In the American court system, the prosecution must be able to establish intent. The case of Julie Amero that Venezia mentions is something that never should have happened. It was an example of a mishandled trial on both sides (the prosecution and the defense), and luckily it was overturned. But still, we don't need to pass a law making citizens "not liable" for malware running on their computers. If all citizens were totally not liable, this would mean that, in order for a prosecutor to prove the intent of a hacker who installed malware intentionally on his own computer, he would literally have to prove that the hacker "knew" that the malware was installed, which would be impossible. Sounds like a can of worms to me.

Article 4. A company that produces and sells closed source software for use on computers shall be responsible for the security of that product, and a user has a right to seek damages in the event of a failure to secure their product. Companies are already liable for whatever they sign a contract to be liable for. If a consumer wants total liability protection from a software producer, they simply need to find one that will offer it. As with Article 1, this is a blanket law that isn't needed. Consumers need to take responsibility for who they sign up with and what those people are liable for.

Article 5. Any software or hardware used to conduct or support laws and public policy shall be open-source. Actually, I love this one. The point about the breathalyser is dead-on. Good call.

Article 6. Any media content legally purchased by an individual shall be available for private use on any device, at any time. This one falls into the same category as Articles 1 and 4. If consumers don't want DRM on their music, they don't have to buy from iTunes! CDs still exist. And so do other online music stores that let you download actual MP3s. If DRM continues to get out of hand, the free market will handle it because consumers will cut out of places that abuse their customers' loyalty.

I hope everybody will read Venezia's article. It's really well-done. Though I disagree with lots of it, I appreciate Venezia's open-minded tone and general desire for more openness. I just hope that people can see openness through a broader lens, as I feel I have presented it here.

Peace!

May 15, 2009

Secure AJAX calls without SSL

I recently spoke with an individual who was very upset that his password had been sniffed because he was using a web application that didn't offer a secure connection via HTTPS. I began to think about how the developer of that web app must have felt: either waste money on an SSL certificate for this dumb site (which doesn't even store any personal data) or incur the wrath of angry customers whose passwords get sniffed by pranksters.

During the conversation with this angry individual, I zoned out and decided to think about how I would approach this problem as a developer. Certainly, not all sites need secure access via HTTPS, but wouldn't it be nice for small sites to have encrypted form submissions and AJAX calls?

After some thought and some Googling, I did bit of work on this issue for fun. I have affectionately named the fruits of my efforts RSAJAX.

I'm a big fan of getting to the fun part. Here's a demo.

I am using several open-source libraries here. Proper attribution will appear in a more-descriptive write-up I will be doing tonight. I literally just finished it up five minutes ago, so I'll probably be cleaning and tweaking it too.

Update: A web page is now available that gives more information on RSAJAX. Check it: http://www.andrewpeace.com/rsajax/

The process here is actually very basic, even for somebody like me who isn't into crypto. All you need to understand are the basics of public-key encryption (specifically, RSA) and private-key encryption (specifically, RC4). Just Google it...

The server generates a private and public RSA key, the latter of which is shared with the client-side via a regular AJAX call. The JavaScript then generates an RC4 encryption key, which is a simple matter of generating a random 256-character-long string. JavaScript then encrypts its RC4 key with the server's public RSA key, and sends it to the server, where it is decrypted with the private RSA key and stored.

From that point on, making a secure AJAX call is simple. First, JavaScript encrypts any values being sent to the server using the public RSA key. Once the server receives an encrypted value, it decrypts it with its private key. This is exactly the same thing that happened when the client's RC4 key was shared with the server.

When the server is ready to respond, it encrypts its response via RC4 using the client's key, which it has stored. Upon receiving the AJAX response, the JavaScript can then decrypt that value using its RC4 key.

Shazam! Encrypted on the way up, encrypted on the way down.

If you are wondering why this process involves both RSA and RC4 encryption, there are good reasons for it. I'll get in to those when I do my next write-up. Anyways, I may swap out RC4 for something a bit stronger.

April 30, 2009

The Andrew Peace Scavenger Hunt

Recently a friend [1] remarked that I can be really hard to get a hold of. I spend a lot of time working and taking walks, I rarely answer my phone, and my text message replies are often cryptic or unrelated to what was asked. If you need to find me for some reason, just follow these steps:

1. Check my Facebook status. You can often determine my location just by interpreting my most recent status. If it says something about death, guns, or sex, it's probably a Marilyn Manson lyric. That means I'm on a walk. If it rhymes or contains funny names ("Attend the tail of Sweeny Todd, his skin was pale and his eye was odd") it's a show tune. This also means walking. In general, if it makes no sense it's probably some sort of song and that means walking. If it contains funny characters or academic-sounding words, that means I've been programming but became frustrated and decided to go on Facebook for a minute and then take a walk to clear my mind.

2. I hope you're the kind of person that reads ahead, because I actually deleted my Facebook a couple days ago. I realized that the only time I use Facebook is when I want to check out the inappropriate photos that hot Northeastern girls post when they're hung over, and it kind of creeps me out. Nobody that I'm really friends with uses Facebook anymore[2].

3. Check the futon in Wabisabi (that's what I call my apartment). That's where I like to do programming. Don't give up if I'm not on the futon, just check around. It's a pretty small place but there are lots of nooks and crannies. My roommate found me sleeping in the bathtub once, and that's not a joke. You may want to try and locate my black beanie with a Google logo on the side. If it's not there, it's probably cold enough that I need to wear it while I'm walking.

4. Check the time. If it is a weekday between 7AM - 7PM I am working or riding to/from work. After 7PM is when I usually take a walk. For weekends, it is a bit different. I should be sleeping until about noon, so you're out of luck until after then. Past noon, you can start by checking Park Drive or the Fenway area in general. That's near where I live, I walk there a lot.

5. Check my Twitter. No reason, really. Just thought it would be fun.

6. Go to the Subway on Boylston and ask them if they've seen a funny-looking character who ordered a Spicy Italian with lettuce, cucumber, and spinach. If they remember me, you're on the right track. Search for a trail of cookie crumbs near the door. If you find a trail but end up loosing it, don't worry. That probably just means I've gone on an after-dinner walk.

7. If you found the Google beanie in step 3, take a picture on your cell phone and send it to me. I may interpret this as a ransom demand and set up a secret meeting time and location. The only thing is that sometimes if I'm walking I don't feel my phone vibrate, so it's 50/50.

If you've followed those steps and have come to the conclusion that I am working or on a walk, you're screwed and I probably won't be getting back to you.

Notes:

  1. Actually, a mop
  2. Don't be confused: if you are a hot Northeastern girl, you are my friend automatically

April 25, 2009

Teaching Programming

I think there is a lot of debate about how programming should be taught, and I think the debate basically centers on how to teach it to freshmen in college. I say "I think" because I don't really know anything about this. But, it's been my MO lately to talk about things I know nothing about, so eff it.

The complicated thing about this (as I perceive it) is that there don't appear to be only two sides, because there isn't only one issue. There's the issue of functional versus imperative programming style. Then there's a several-way split about historical versus newer versus popular programming languages. It seems there's even a debate about what kinds of programs to begin teaching with.

Well, here are my thoughts. Someday when I have influence we can look back on this and decide it's smart. And by then I will have changed my mind.

Some principals

Agreed: choosing a language based on its historical significance (C++) or its usage in "the field" (Java) is BS. If teaching were about practicing for the real world, high school teachers wouldn't make you read Jane Eyre and write analytical essays on it. Very few people end up actually writing analytical essays about literature for a living.

Granted, it's different in programming. Java is very widely used and lots of languages are similar to C/C++. But I think it's assumed that, if we can figure out how to teach programming well, we can either teach how to write Java/C later or we can depend on the student to pick it up when they need to.

Wait, how is that different? Anyways...

Starting out writing GUIs is ridiculous. That means no making desktop calculators until semester two. It is a waste of time to start out writing GUIs just so students can feel like they are actually doing something cool. You won't be successful in programming unless you think that figuring out how to write a tough function is cool, sorry. And anyways, the time spent writing that calculator is mostly spent learning how to use the particular GUI library you have chosen, which seems like a big waste.

Functional versus imperitive? One, then the other. And it doesn't matter the order, in my opinion. Having a good understanding of loops and having a good understanding of recursion are both really important. I think a really effective programming program (sorry, trying to refrain from saying "computer science program") stresses that recursion and iteration are both commonly-used tools, both simple once you get to know them, and both dangerous in different situations. Of course, it seems the most reasonable way to teach both is to chose one, teach it, and then teach the other with the first in mind.

On object-oriented programming: definitely leave that junk for later. Understanding object-oriented paradigms is obviously important, but for people who are trying to understand for the first time how to make computers do stuff, it's a mind fuck.

Tests on paper. I actually don't think this is debated too heavily, but it's worth saying. At Northeastern, I've realized that writing a program on paper during an exam can only be done if you have learned how to program. More on this later.

My perspective

I have a fairly unique perspective on this issue given my age and lack of time spent in the real (or academic) world. I've had the opportunity to semi-teach some material from Northeastern's CS program, which uses SCHEME and focuses on functional programming to begin with. The first time, I was teaching it to seventh graders after school. Don't ask. The second time, I was tutoring freshmen CS students at Northeastern, grading their homework, and proctoring their lab exercises.

I like Northeastern's program a lot, and it's at least tripled my skill at programming in my first two years. But I had been programming for years before going to college, so learning in SCHEME was both easy for me and really different and interesting. So, I don't know how it felt for newbies (or, how it felt for the newbies after they learned SCHEME and went to try something else).

One thing I learned from watching freshman (a full year younger than me!) and seventh graders writing SCHEME is that new programmers are good at remembering keywords. I don't know how many times I went over to help a student who had written simply (define or in the body of their function (cond (uhm, I'm sure somebody will yell at me for calling those keywords, but you know what I mean). I'm not exactly sure what this keyword-recognition ability means to a programming program, but it exists.

The other thing I learned, as I mentioned before, is that on-paper quizzes and tests are great for teaching programming. Programming homework assignments and projects is supposedly good practice, so fine. But college students cheat. You simply can't write a program down if you don't know how to program. On another level, even for students who don't cheat on homework, getting a program on paper is a different experience than coding it on your computer where you can get in the habit of testing it every fifteen seconds. Paper doesn't compile code (yet).

The Language

I think it's Python.

I swear it's not because it's trendy! It's just the language that best fits how I think programming should be taught.

For one, you can easily teach iteration and recursion in it. Both the functional and imperative programming style come very easily in Python. In fact, I would have chosen Perl were it not for the fact that in Perl you can't pass functions by their exact name. There's no funky syntax involved in Python.

Again, I loved learning SCHEME at Northeastern. But aside from the iteration thing, here's my main beef.

I think that students can pick up programming faster if the syntax they are using is just right. There are too many parenthesis in SCHEME. Sure, it's beautiful to me. But to a first-time programmer, I think it helps to see some colons, some equals signs, and some keywords. Like return, for example.

Python programs can really look any way you want. If you want to start by teaching functional style, do it. If you want to start by teaching iteration, start writing loops. The only thing that Python forces on you is good indentation practices, and I don't think anyone's complaining about that. What better way is there for freshman to learn good style than to program in the most inheritly stylish language out there?

I feel like if my Northeastern professors read this they would probably beat me with a keyboard for not sharing their obsession with SCHEME, and that's fine. They have a great program and I think it's okay for them to defend it (as I've seen several do in heated conversations). All I'm saying is that I think some of my classmates and I could be even better programmers right now if we had begun learning in Python and had learned iteration early on.

Then again, I know nothing about this.

April 24, 2009

The problem with Linux

A few months ago I mentioned to my non-techy roommate that I was downloading Windows 7 Beta for a friend. His response was: "Sweet! Illegally?" Of course, he didn't know that Windows 7 Beta was a limited-time free (uh, beta) release.

Then last night I mentioned to my roommate that I was downloading Ubuntu 9.0 (or, as I referred to it for his sake, "a new Linux"). His response again: "Sweet! Illegally?"

Normal people do not realize that Linux is free. Because I was so miffed I didn't go into a discussion with him, but I bet my roomate did not realize that, in fact, everything I use on my computer I use without paying for. Of course he is aware of Firefox and programs like Pidgin, but has he been thinking all this time that I edit Office documents on a paid-for Linux office suite? Does he think I bought multimedia tools and quality disc-burning software? When he sees me working, does he think that Gedit and Eclipse are Microsoft products? What must he think when he sees me creating graphics in GIMP??

I am aghast because I am like every other geek. I didn't understand that normal people don't understand. No wonder people get pissed when I can't help them un-crash their Vista machines! They don't get that this is different.

Why Linux is only for geeks

Windows and Mac users will never know that Linux is bomb because they will never use it. They will never use it because the idea of installing a second OS does not fit into their minds. I don't mean to say they're stupid. What I mean is that, to most people who use computers, new things run as programs. Linux is a new thing to most people, so in their minds it must be a program that they can uninstall from Control Panel if they want. That's how normal people think, and that's fine. We just need to realize it.

We need to get normal people using Linux somehow. They will be generally unimpressed by the operating system itself. After all, normal people don't care about being able to write shell scripts or easily set up web servers. They will, however, be into all the free stuff. My guess is that they would also be impressed by the package managers included with most Linux distributions, with a little work. More on that later.

The problem is that Linux is an operating system, not a program, so they will never be able to see this neat stuff. At this point, the real geeks out there are screaming at me that Wubi is the solution. For those who don't know, Wubi allows you to install Ubuntu on Windows, as a program. If this is your solution, you are missing the point.

The issue is not that Linux cannot be a program, but that it is not really a program and is an operating system. There is a barrier. People won't start using an operating system within an operating system that already satisfies them.

Fixing it

Faster, sleeker, slimmer. This is why Firefox is slowly gaining market share with normal people. When I say to normal people, "Ah, I see you're using Firefox" the number one response is "Yeah, it's a lot faster". What they mean is, "Yeah, it's a lot faster than Internet Explorer" or more importantly, "Yeah, it's a lot faster than the built-in way to do the same thing with Windows".

One thing normal people certainly do understand is doing something different if it is faster, sleeker, and slimmer. This has been proven by Firefox (beats IE), Facebook (beat MySpace), Gmail (beat HotMail), and a myriad of others. I think Linux already has a pretty good leg up on this one. I could trick anyone into thinking that my junky laptop has 4GB of RAM because of the performance I get from Ubuntu. When I'm on my XP partition, it's as if there is no RAM at all. (I have 2GB, I believe).

The Linux community is smart, and geeks can push it to the limit. If we want Linux to be noticed for its speed, it's got to have some sort of speed. I say, keep it up.

Programs! Find, install, uninstall! Of course, Linux already does this very well. However, programs like Synaptic package manager need some changes to appeal to the normies.

First of all, there needs to be a version that gives less information. Normies don't want to know which dependencies have just been resolved. Ubuntu (and maybe other distros, I don't know) has been doing this for a while with the Add/Remove application off the Applications menu. It's Synaptic manager except more easily browsable, and it's an incredible start.

But it needs to be more. I'm thinking something along the lines of the Android apps market, which is extremely addicting. It's very graphical and there are thousands of options. Like iTunes for programs. We need to go there.

Free is cheaper than whatever the price of Windows is. Why is there not a popular company that is willing to market low-end laptops that come with Linux? And by market I don't mean Dell selling machines on linux.dell.com. I mean commercials on TV where they say, "Hey, this laptop is only $600 and it does all the cool stuff you want, and it's fine even though it's not Windows. See?"

I suppose this is not exactly a problem with the Linux community, but more a problem of markets. But still, it's not like we have no resources. People can get their startup Web 2.0 sites funded, so why can't someone start selling Linux machines? Like speed, price is a game-changer for normal people. Obviously, Linux has the price issue down pat. The only reason that's not recognized is that companies don't sell hardware with Linux on it.

Additional thought: there is enterprise-level software that runs on Linux. Enterprises use that stuff. They also like cutting costs. Where are the people going, "Hey, enterprises/businesses, buy hundreds of really cheap computers that easily integrate with all your other stuff and perform all your business functions!"

A start

I think a good start to all of this is as simple as me clicking "Publish Post" and starting that conversation with my roommate. I'm a geek, but all geeks are semi-normal on some level, and we retain the power to connect with other humans (most of us do). Until some things start to come together for Linux, the best thing to do as I see it is to keep the conversation up.

Normies?

I just realized that at some point in this post I started using the phrase "normies" to describe normal people. Normies?

Actually, I like it.

Shwoops

In regards to my last post, I just realized Paul Graham has said the same thing, but much more eloquently...and in 2001.

Java's Cover by Paul Graham.

A lot of the people I know using Java are using it because they feel they have to. Either it's something they felt they had to do to get funded, or something they thought customers would want, or something they were told to do by management. These are smart people; if the technology was good, they'd have used it voluntarily.

So, I'm outdated. But not crazy!

April 22, 2009

Pseudocode

This is probably old news, but I've decided that Java MVC architectures are really over valued. Lots of classes and generic interfaces and abstractions make the business people feel like they are professional and scalable, and that is why Java is used in business.

I think one of the motivating factors is that somewhere in the back of the mind of the CEO running the Java-based company is the thought that the code written there will someday have to be presented to other business types as part of a buyout or investment process, and that these investors will really be looking closely to see if everything is as abstract as is humanly possible. That's fine, but I'd rather spend five minutes writing concise code in a flexible language than spend fifteen writing rigid Java code.

As an experiment, I wrote a partially-complete program for a killing robot in Python (my recent favorite, after JavaScript) and in Java. Which code would you rather have your dev team/minions writing? (The actual slaying/maiming functionality has been left out)[1]

Python. killingRobot.py:

#! /usr/bin/env python3

import sys

def slay(victim):
    """Slays the given victim"""
    print('Slaying '+victim)
    # system calls
    
def maim(victim):
    """Maims the given victim"""
    print('Maiming '+victim)
    #system calls

def slayAll(filename, action=slay):
    """Applies the given action to all victims in the given file"""
    try:
        f = open(filename, 'r')
        for victim in f:
            action(victim.rstrip())
        f.close()
    except:
        print('Unable to open file')

# slay or maim all victims based on user input
if __name__ == '__main__':
    if len(sys.argv) > 2:
        action = sys.argv[1];
        filename = sys.argv[2];
        if action.lower() == 'slay':
            slayAll(filename, slay)
        elif action.lower() == 'maim':
            slayAll(filename, maim)
        else:
            print('Invalid action: use slay or maim')
    else:
        print('Give an action and a file name')

Now Java. We'll begin with the interface and implementing classes. personAction.java:

public interface personAction
{
    //applies some kind of action to some given victim
    public void doAction(String victim);
}

slayAction.java:

public class slayAction implements personAction
{
    //slays the given victim
    public void doAction(String victim)
    {
        System.out.println("Slaying "+victim);
    }
}

maimAction.java:

public class maimAction implements personAction
{
    //maims the given victim
    public void doAction(String victim)
    {
        System.out.println("Maiming "+victim);
    }
}

Finally, the program. killingRobot.java:

import java.io.*;

public class killingRobot
{
    //slay or maim all victims based on user input
    public static void main(String[] args)
    {
        if(args.length > 1)
        {
            String action = args[0];
            String filename = args[1];
            personAction pAction;
            
            if(action.equals("slay"))
                pAction = new slayAction();
            else if(action.equals("maim"))
                pAction = new maimAction();
            else
            {
                System.out.println("Invalid action: use slay or maim");
                return;
            }
            
            slayAll(filename, pAction);
        }
        else
            System.out.println("Give an action and a file name");
    }
    
    //applies the given action to all victims in the given file
    public static void slayAll(String filename, personAction action)
    {
        try
        {
            FileInputStream f = new FileInputStream(filename);
            DataInputStream d = new DataInputStream(f);
            InputStreamReader i = new InputStreamReader(d);
            BufferedReader b = new BufferedReader(i);
            String victim;
            
            while((victim = b.readLine()) != null)
            {
                action.doAction(victim);
            }
            
            i.close();
        }
        catch(Exception e)
        {
            System.out.println("Unable to open file");
        }
    }
}

I won't bother comparing line counts since both of these programs could probably be shortened by better coders. The point is that Java annoys me. And what super-annoys me are these crazy attempts to make everything generic so it can supposedly work better and be scaled more easily. It's not easier or better, it's Java-er. Blech.[2].

Notes:

  1. System calls for slaying and maiming only available in Windows ME and 7 Beta
  2. Announcing the first ever Killing Robot Programming Contest. Write the most concise (fully-functional) killing robot program. Losing entries will be slain by the winning entry's killing robot program. Go ahead. Do it in Java. I dare you.

April 19, 2009

Twittiquette

The following rules of Twitter etiquette need to be made law:

  1. Tweets must be somewhat novel and interesting[1]
  2. Follow people that you think have interesting tweets, not everyone who follows you.[2]
  3. English grammar applies to tweets. Fragment sentences are okay, obviously
  4. One URL per tweet, and it should be after the rest of the text
  5. Drunk tweeting is not cool like drunk Facebook wall-posting is[3]
  6. @ reply only once per topic. Direct messages are for conversations
  7. Creating/following fake accounts for cartoon characters is officially okay, because that's fun. But it's not okay to do that for other non-human entities or famous people that don't actually use Twitter[4]
  8. Sad/depressed/angry/satanic Tweets should be used sparingly
  9. No complaining about people who Tweet too much. That's the point. It's fun

That's my take on things. Will somebody with influence keep an eye on Oprah and Ashton Kutcher?

Notes:

  1. That means don't tweet every time you walk into a shop, eat something, or talk to your boss
  2. Ahem, Mr. President
  3. And that's only cool if you're in college and don't do it that often
  4. Doug Funnie, cool. George Bush, lame

I think I'm special

Lately, I have been obsessed with AI. For some reason, the Loebner Prize came into [1] my brain and I decided to check out the most recent contest results. This is a transcript from the best chat bot last year, Elbot:

Human: o ha you
Elbot: How about talking about yourself a bit. That's what human beings like best.
Human: do you know where are you ?
Elbot: Please tell me your inclination to talking robots first.
Human: Do you know where are you now ?
Elbot: I see your point. My own thoughts on this have lead to the conclusion that talking robots could set a good example for other robots.
Human: Do you know where are you now ?
Elbot: Didn't I just answer that question?

Are these people serious? Elbot was determined to be the most human-like chat bot at that year's competition.

I have an idea for a different kind of AI system, not based on a logic engine. It's actually more of a natural speech processor, but also kind of not. I think I will keep the lid on that one for a while, though, until I can determine if it will work. Watch your back, Elbot.

That said, I will probably never finish programming it. I started something in Python a week ago, but I recently decided to wipe it and restart. I suck. Is Python still cool, by the way? I don't care, I like it.

I tend to become obsessed with things for about three months and then forget about it. Over the past year, I have done serious programming work in the following areas:

  • Academic plagiarism detection
  • Detecting sexual predators in online chat rooms
  • Tracking UFO sightings
  • Host-to-host database synchronisation and merging
  • A CMS system for AndrewPeace.com
  • Community-run online newspapers
  • Valentine's day (don't ask)

All unfinished. Maybe I will get around to them someday. For now, it's AI.

I think I'm special.

Notes:

  1. Have you ever looked up the definition of "into" on Google? It's interesting. I always wonder if I should say "into" or "in to". Hm.