Archive for October, 2007

Becoming irrelevant one bit at a time

Thursday, October 18th, 2007

Dear Entertainment Industry,

If you belong to organization whose name ends in AA, this post is for you. I’m writing this, because I would like to introduce you to this relatively new concept of Internet. You see, this globe spanning computer network was designed for one thing - and one thing only: to move bits of data from one machine to another. Despite of what misconceptions you have nested in your underdeveloped brain, all that Internet does is move small electric charges between computers. These charges encode various types of information.

Now, you may think that you own some of that information - some songs or movies protected by copyright law. There are even laws that let you exercise control over that information. Unfortunately the very nature of information is that it flows freely, and expands like a viral infection. Given proper conduit channel, any piece of information, no matter how complex can travel the globe and be copied millions of times in a matter of seconds. Internet is precisely such a conduit. Once you make something publicly available on the internet you no longer have any control of how it is distributed.

Conversely any time you make something publicly available it will eventually end up on the internet. Why? Because information flows and expands - people have natural tendency to share knowledge. This natural urge to exchange data allowed us to build civilization, develop technology and create empires. The fact is, we can measure progress of mankind in the efficiency in which we transmit and share information. We continuously research ways to communicate faster, more efficiently and to share larger amounts of data. As sharing data becomes easier, protecting special kinds of content becomes more and more difficult. And there are no indications that this thread will ever stop.

The only way to stop the free flow of data is to fundamentally change the way internet works. As it is right now, any attempts to censor or control the way content is distributed online are bound to fail. Why?

“The Net interprets censorship as damage and routes around it.” John Gilmore (EFF)

For every instance of content you manage to take down using DMCA or a lawsuit, there are 15 new ones uploaded by people all over the globe - mainly out of spite. When you try to contain content locally, it simply moves off-shore to foreign lands. And it will continue to move around, until it’s too expensive, or virtually impossible for you to control it. The global community routes around silly things such as one countries information suppression laws.

You can target each file sharing protocol in turn, but there will always be new ones that we can use. The only way you can be a 100% sure no one is sharing your copyrighted data digitally is to kill the internet. But, that would only resurrect the bootleg market.

Lawsuits and threats against individual citizens? Don’t make me laugh! How many people have you sued so far? Few thousand give or take a few? How many of file sharing cases have you won? One? It’s a drop in the bucket my friends. A drop in a bucket. There are more file sharers than there are IP addresses currently in use. On average you will get 2 or 3 sharers per household. And this statistic will only continue to grow with every generation. Sure, today many senior citizens do not own, or know how to use a computer. But hey, one day the current largest file-sharing demographic (which is teenagers, and 20-30 crowd) will be senior citizens.

Ever day few people who do not know how to share data online die. And at the same time, few new people are born into a world where transmitting bits of data across the globe is as natural as breathing. Our numbers are growing, and so is our bandwidth. Your resources are limited, and you will never be able to sue everyone who owns a computer. Statistically, getting sued by RIAA or MPAA is akin to winning a lottery. It’s a really crappy lottery, but the odds are similar. So in most cases it’s a fair gamble that most people (not counting the overly paranoid) are more than willing to take.

Yes, protecting copyrighted content is a noble idea. But it becomes less and less practical every second. Anyone who bases their business model on outdated notions about intellectual property and copyright that were formed in the pre-intenret era is heading towards complete and total irrelevance at the speed of Moores Law. Every cent you spend towards the goal of stopping the flow of data, brings you closer to eventual bankruptcy.

The sooner you learn to embrace this new reality, the faster you can learn to monetize it. There is money to be made in a world where your distribution costs are exactly zero, and your market penetration is measured on a global scale. Your customers already know this and so do artists and content creators you claim to represent. One by one they come to a conclusion that they do not need you. You are the third wheel in the relationship between the content creator and the customer. Your services are outdated, your distribution models are flawed in the digital age, and your prices are obscene. Oh, and you treat all the customers as filthy thieves. Your customer base is already slipping - but it’s mostly your fault. You fail to adapt, you insult the customer at every step, and spend millions of dollars to make his life harder. When an illegally downloaded copy of a product is easier to use and provides a better customer experience than the original, you are doing something wrong. Your talent base will slip too - as soon as they realize what how horribly you treat their fans, and how little you really do for them.

You can call me naive, demented, idealistic or stupid. You can claim I’m wrong. This changes nothing. You can’t be that blind. Just look around. Copyright was a great idea, but we sadly moved past it. It still has application with regards to physical media. Owning a nice looking album or a DVD you can put on a shelf is still very nice. People will continue to buy physical things because we like to collect crap like that, regardless of online availability of the data they store. But stopping the flow of information is a fool’s errand.

You are in a losing position. There is nothing you can do to change this. You can’t stop technological progress, you can’t change human nature and you cant censor all electronic communication. You must adapt or perish. And for one, I’m not going to miss you when you are gone. So for your own sake please get with the program and stop making such asses of yourselves.

Thanks,

Checkpoint Save System is Stupid

Wednesday, October 17th, 2007

In the good old days of arcade games clearing the final stage was usually an accomplishment that you could brag about to your friends. The games were made impossibly difficult in order to make you put more quarters into the damn arcade box if you ever wanted to see the ending. And you had to play it all the way through in one go. This translated into the Nintendo Hard generation of video games. With the appearance of first consoles and advent of computer gaming the focus seemingly shifted from fleecing youngsters from loose change to providing quality entertainment. But game makers took a long time to adjust. And thus we all grew up spending time cursing Mario, Mega Man, Prince of Persia and that damn Paperboy all the way to hell.

Prince of Persia

These games were very challenging, required perfect timing, twitch reflexes and punished you severely for any mistakes. Very rarely did you get the luxury of level codes that would let you start from the last level you cleared. It’s really a wonder we played these games. It was stressful, frustrating and the payoff was not that great - “Oh, btw the princes is in another castle”. Sigh…

Princess is in Another Castle

Still, these were classics and the challenging nature was part of their charm I guess. We are way past that. Few people enjoy this level of challenge. Most of gamers today, play for entertainment and are more interested story, climate and having fun. Well designed games offer adjustable level of difficulty. Casual players, and novices can set their difficulty on easy and have most of the enemies in the game shoot with accuracy of a Stormtrooper, and often forget to take cover. A seasoned player can crack up the difficulty so that every AI shot is a head-shot. This way everyone has fun.

No one expects you to play the game straight through or make you write down level codes anymore. Every modern gaming system (be in a PC rig, or a next gen console) has a spacious hard drive that can be used to store, among other things, save game files. There seem to be two approaches for saving games.

The first, in my opinion superior approach is to allow player to save anywhere, at any time. You hit a button, and the state of the game is instantly written to disk, under a file name you specified, or simply time stamped and tagged with information like current stage and time played.

The second approach is what I call “checkpoint save system”. Instead of letting player to decide what is a good stopping point, you automatically save the game when they reach a certain point in the game. Frequency of checkpoints vary from game to game, but you usually get several per stage so you don’t have to backtrack to much.

If you combine both ideas you end up with a perfect system to save the players progress. You incrementally auto-save game at certain points (usually before big battles, or surprise insta-kill situations) while still allowing the player to preserve the state anywhere in between. This method provides maximum entertainment and minimum of tedious repetition. If a player forgets to save, he can still play from the last checkpoint. If they save often, they will never have to backtrack more than few minutes. A good example of this idea put into practice is Half Life 2.

HL2

There are many reasons why HL2 was a great game. It had a great story, awesome game mechanics, great graphics - and of course the perfect save game system. Despite the game being quite challenging at times, I never felt frustrated, angry or cheated out of entertainment. And the fact that I could quick-save just before making that tricky jump did not diminish my feeling of accomplishment.

On the other side of the spectrum are games such as FarCry and the GTA series. These are the games I have real love-hate relationship. The former uses a classic checkpoint system saving your progress several times per stage. The later forces you to manually save game, but only between missions. This means that if you die or get arrested during a long and difficult story quest, you will have to start it from the begging. This usually involves driving from the jail or hospital to the mission’s starting point, picking up weapons along the way and starting over.

FarCry

Prince of Persia games pissed me off too for the same reason. While they were much more forgiving, an player friendly than the insanely difficult original they still they drove me mad. And no - the sands of time didn’t do shit for the types of blunders I was making, and I would waste them immediately.

I truly believe that there is just no reason to use the checkpoint system anymore. Why? Because the hybrid system is self balancing. A spastic n00b with no hand eye coordination (like me) can save every 3 seconds and get through the though spots with minimum repetition. And you have to understand that this tedious repetition is what really kills games for me. There is nothing enjoyable about re-playing the same sequence over and over, and over again - at least not for me. On the other hand someone who is into this kind of stuff, or simply enjoys a challenge may completely forgo manual saves and rely on auto-saves instead. You get the best of both worlds and everyone wins.

The whole argument that “allowing the player to save anywhere would make the game too difficult” is therefore null and void. It is simply a cheap way of increasing the games difficulty without spending resources on stuff like, say, improved, less forgiving AI. It also artificially inflates the relative time it takes to finish the game. So a reviewer for mainstream gaming press may note that it took him 60 hours to finish the game, even though around 80% of that time was spent on repeated attempts to reach one checkpoint or another.

Besides, even if you are a hard believer that giving the player unlimited freedom in saving every second negatively impacts their gaming experience (and btw, who the hell are you to tell me what gaming experience is best for me?) you can still limit the number of allowed saves without using checkpoints. This was done in the Hitman series, where based on the difficulty level you had a limited number of save slots per mission.

Hitman 2

Managing them was a challenge in itself - if you held on to them to long, you might get killed and will loose lots of progress. You use them up to quickly and you end up stranded in mid mission. Still, it was much less frustrating than praying that the next checkpoint is just around the next corner.

Which system do you prefer? Let me know:

Preferred Save Game System?
View Results

What is the most mind numbingly frustrating game you have ever played in your life? This can be either something modern or an old school title. For me, it had to be a Montezuma’s Revenge on Comodore 64.

Montezuma's Revenge

It had 3 levels, each composed of a 100 screens, and if you died, you would start all the way from the begging of the current level. That, then probably original Prince of Persia and Mega Man on NES. P

Create and Stream Video With Flash On The Buntu

Tuesday, October 16th, 2007

The other day I was handed a quicktime mov file and told to put it on the company website. The catch was that the file was obscenely large, and we didn’t want the clients to have to download Quicktime or an equivalent to view it. It pretty much boiled down to “can you make it work like Youtube without actually uploading it there?”

Sure I can! I can do it faster than Lex Luthor can fucking steal the cakes. All 40 of them. I mean, this will be done in 4 easy steps - observe, and be amazed:

Step 1

First we need to get something that will convert the MOV format to the FLV format. There are several encoders out there that can do it, but the one that is both fast and free is FFMPEG. So let’s get it, shall we?

sudo aptitude install ffmpeg

Step 2

Let’s actually do the conversion. If you want to keep it simple (and I do) you don’t really have to do much beyond:

ffmpeg -i movie.mov movie.flv

Now just sit back, and enjoy the blinkenlights till it finishes.

Step 3

Now we need something to play the movie. Sticking the FLV on the server just doesn’t cut it. We want Youtube like experience where people can pause the movie, skip ahead or rewind it back at will. Enter JW FLV Player.

Go to that website, download the zip, stick it in some web accessible directory along with the movie file, edit the HTML to take out all the useless examples, then point it to the correct FLV and you are done!

Step 4

This is the point at which you try to watch the movie and realize it has no fucking sound. Why? Because you are using Ubuntu - that’s why. Let me explain - ffmpeg usually needs to be compiled and linked with stuff like mp3 and AAC encoders. Unfortunately on Ubuntu (and debian for that matter) mp3lame and faac end up in different repositories based on their licensing terms. So the default Ubuntu ffmpeg package does not have these things included. This makes the package virtually useless for our purpose.

Good news is: there is a solution. Bad news is that you will need to roll your own copy of ffmpeg. Fortunately Paul Battley wrote a very good step by step guide on how to do it. I will replicate some of these steps here for the lazy part of the readers.

Step 4a

First let’s prepare and download all the build dependencies and tools you will need:

sudo apt-get build-dep ffmpeg
sudo aptitude install liblame-dev libfaad2-dev libfaac-dev libxvidcore4-dev checkinstall fakeroot
apt-get source ffmpeg

Note that aptitude does not have build-dep or source parameters, so we use our good old apt. First line fetches build dependencies for ffmpeg (there may be quite a few of them). Second one installs the mp3 and aac libraries on your system, along side with checkinstall and fakeroot which we will use for building.

Step 4b

Now you will have a directory that starts with ffmpeg-0.cvs*. Cd into that directory. We will have to edit the debian rules file to include the mp3lame and faac in the build. Add the two following lines directly under all the other confflags entries:

confflags += --enable-mp3lame --enable-faad
confflags += --enable-faac --enable-xvid

Step 4c

Let’s fucking build this shit! But let’s do it the Ubuntu way. Screw Mrs. Configure and her two friends Mr. Make, and Mr. Make Install. We are using fakeroot!

fakeroot debian/rules binary
sudo checkinstall

Fakeroot may generate all kinds of funky warnings, but as long as you don’t run into any errors you should be just fine. You can safely just ignore the output and go grab some coffee.

When you do checkinstall change the version of your package to something bigger (ie increment the build number by 1 or something). Otherwise when you update your system, apt may want to replace your version with the current copy from the repository - and you don’t want that. Also change the name of the package to ffmpeg instead of whatever is there by default.

Once you are done, you should have a brand new ffmpeg on your system that will convert your MOV file to a FLV with sound.

So, go back to Step 2 and re-encode your video and re-embed it as in Step 3.

That’s it. Not entirely in 4 easy steps (thanks Ubuntu!) but close enough. The build process is really not that bad. And you only have to go through it once. Once you do it, you should be all set. Best part is that your newly built ffmpeg is a deb package. You can easily remove or upgrade it via apt or aptitude the way God intended.

Ambiguous One Liner Comments

Monday, October 15th, 2007

Lately I started getting lots of odd one liner comments that usually look somewhat like this:

Great post! I really enjoyed it!

There are many variations, but the message is always the same - a generic praise that does not contain any references to actual content of the post. Some of these have URL’s attached to them, and some others don’t. Most of them end up in the moderation queue or Akismet spam box.

I do realize that some people might just want to tell me I did a great job, but have nothing else to add. Still, 99.9% of these posts get deleted whether or not they contain a spammy URL.

I do this for several reasons:

  1. Even if the post does not contain a URL, it doesn’t mean it’s not a probe to cheat the first time poster moderation rule (when you post here for the first time, your post is held for moderation - after that, it’s up to Akismet and BadBehavior to keep you out). These things are likely to be followed by regular spam once the email in the email field gets white listed
  2. Even if it’s not spam, the value of such comment is very low. It does not contribute anything to the ongoing discussion. It’s generic - almost like a trackbac, but these at least let me know who links to this post and let me visit the blogs of people who read me. I found lots of cool blogs via trackbacks, or by looking at who links to me on technorati
  3. If you think about it, the only people who would genuinely post a generic message like this would usually not be regular readers. Most probably they would be random visitors who stumbled upon a post via Google. So chances are that if I mistakenly delete their post, taking it for a bot spam, they won’t get upset because they were never planning on coming back to this site anyway.

Of course this is not to say that I don’t appreciate kind words from random visitors. I do appreciate them very much, but at times it’s better to err on the side of caution. So if you posted one of those generic “Good job!” or “Nice Post” comments and it got deleted, I apologize. I don’t delete them automatically - I usually look at each one individually to see if it maybe it is less generic and off topic than I initially suspected. Unfortunately, most are not.

Do you get these types of comments on your blog? Do you think these are bots, malicious people or just some poor lost souls who leave super-genetic comments?

We Make Intellectual Jokes

Sunday, October 14th, 2007

I have absolutely nothing for today, so I will do a little trick called audience participation. Let’s post intellectual jokes in this thread right here. The idea is to find all the geekiest jokes that are only funny to a small niche group of people in the know. Usually jokes in this domain are technology or science related. I will tart you off with couple of jokes, but the rest is up to you. Here we go:

If This is Blue...

See what I did there? It doesn’t need to be image humor either. For example this one (be warned it’s been done to death so no groaning):

Q: Why do programmers often confuse Halloween and Christmas?
A: OCT 31 == DEC 25

Schrödinger’s cat jokes are all the rage these days:

Dead AND Alive

Or perhaps this:

Q: What’s a polar bear?
A: A rectangular bear after a coordinate transform.

Anyway, you get the idea. Now it’s up to you to make this post funny! mrgreen