I usually quit to the xmb and check my messages before I turn the system off but I never turn it off completely, the stand-by mode uses very little electricity anyway and it's so convenient to be able to turn your system back on with the controller.
If a game locks up then it's a different story though. First make sure the hard drive light stops flashing as not all game freezes lock up your system (Fallout 3). Then press and hold the power button on front of your PS3 till it beeps, it will then shut itself down safely but your controller will stay on - to shut down your controller hold down the sony button (the one u use to exit games and shut down your system) for a few seconds until the light goes out on the controller. You can then turn your system back on using the controller.
I would take the disc out first before shutting it down. Then again I have this weird OCD thing about leaving a disc in a machine.
My procedure is quit the game via XMB, eject the disc and then shutdown via XMB.
I don't think you are doing any damage doing it your way, like I said I have and OCD about leaving discs in the PS3.
switch it off in game either by holding the ps button for 3-4 secs and chosing turn off
or press the ps button and navigate the xmb to turn off
no harm will come to it if you turn it off mid game just as long as its not saving or loading (sony put the feature in so it is safe)
I turn off my ps3 when not in use thats because I have had a two experiences with my pc tft monitors which I also used to leave on standby all the time. twice I went to bed and when I attempted to turn it on in the morning the monitor malfunctioned.
PS4 Preordered - yipeeee!
what i do is, press the ps button then press quit game and then i go over to the playstation and press the eject on the console and take out the game and then i press the power button on the console to shut it down, i dont like leaving a game in, just incase either it YLOD's or the blu-ray drive just all of a sudden dunt power up or the eject button dunt work.