I have worked in hotels before and the trick isn't figureing out the code for that particular room, but the code for one of the master keys. Housekeepers useually have one key per floor that would open any door on that floor, but someone like and engineer would have just one key that would open ANY door in the hotel. The trick with those kind of locks, is you can't take the front faceplate off of them without making a whole bunch of noise, and basically tearing it to shreds. The only way I know of to bypass them is to have a random code generator, hooked up to a magnetic card transmitter, then transmitting all the codes for the given algorithm, but creating one, and then getting the algorithm is next to impossible. It would be easier to "five finger" one from a maintenance guy, read it, then make a copy.
The thing is from what I understand in the next 2 years most hotels will be going to RFID systems, and those are incredibly easy to copy.
If you were to get this for example:
http://rfidusa.com/superstore/index.php?cPath=34
You could just read the RFID tag of someone, and then make your own. Viola you are in there room, and could even charge stuff to their room. Don't you love technology? Whats even more awesome is now RFID tags are even in Passports. Want a new identity? Done.