Actually to shed a bit of light on those of you that know nothing about programing a game.
Most codes and such are not intentionally put in, they are there because of a fault in the programing, that if it were corrected would cause many other problems, the said code, merly allows you to use the fault(this is both GameShark and others like it as well as button codes).
Easter Eggs on the other hand are usually faults in the code, that can be removed, but they don't, cause we all love trying to find the Easter Eggs in games, it's part of what makes it fun. The Talking Mudcrab Merchent in Marrowind is an Easter Egg that was decided to be left in. There is also an Easter Egg in Breath of Fire, that is a female Mortal Combat character practising a kick.
Personaly I use codes more after I've beaten the game, or after the gameplay has gotten so dull I wouldn't be playing it otherwise. Some games like Shadowman, for the PSX and N64, have cheat codes you need to find, and can activate whenever you want. But in those cases mention last the cheats are merely for fun, not usually anything like infinate ammo. Then there are some games like Twisted Metal 2, where if you know where to look you can find many cheats in game, and example for said cheat is the code to unlock Sweet Tooth, have to fall off a roof to find it, and hit pause at the right time to write it down, and be able to see it, no one can read fast enough to memorize the code in the short time it takes one to die coming off the roof of a building, yes this is a code you need to die to get on your own, but you only need to do it once.