I've stayed alive for 109 days in Minecraft by doing the following:
Carry a diamond sword.
Carry a bow with a full stack plus a working stack of arrows.
Wear iron armor with never more than three notches gone off it.
Keep full or nearly full hearts, and always carry at least two pork chops.
Look where you're going to land when you jump.
Never fall more than three meters.
Do not ride waterfalls into unknown territory.
Never dig straight down or hold forward as you dig out the block in front of you.
Don't go into unknown territory without a way back out.
Always carry plenty of torches as well as extra coal and wood.
Crouch near edges.
Don't go near open lava more than necessary.
Shoot creepers, skeletons, and most spiders with your bow.
Don't work on ledges at dawn or dusk when computer usage spikes due to lighting updates.
Don't dig straight up, and don't panic when gravel, sand or lava comes at you from above.
When tunneling to the surface, be prepared to duck back in your hole if it's dark, or if you're under ice.
Don't wander around outside after dark.
Eliminate night as much as possible by sleeping.
Sleep at the earliest possible moment, especially when near forests.
Sleep with sword in hand, and make sure your bed is secure.
Make multiple exits from your base, with glass exit rooms so you can see around the door.
Carry a bucket of water and a stack of cobblestone in belt slots.
Remap your drop item button.
To eliminate a heavy monster infestation, travel far away and then come back.
Create closed off dark areas or a mob tower where most monsters can spawn harmlessly.
Don't use more than a single TNT block at a time, and get at least fifteen blocks from it.
Don't go away from your keyboard unless you're 100% secure.
When digging gravel or sand, avoid standing on gravel or sand that's connected, unless you've already dug in the area.
Add fences to ledges in heavily traveled areas.
Don't build with wood anywhere near fire or especially lava.
When exploring near heights or lava, kill everything in the area first.
Never hit a zombie pig man.
Hide from ghasts, and if you must kill them, take a fishing pole.
Use guerilla tactics to gather glowstone.
When noob towering after high glowstone, come down when you first hear the ghast shoot.
Be especially careful when tunneling in the nether.
Always carry plenty of wood.
Put glass over deep pits.
Keep your base and tunnels and any caverns you explore well lit.
Look around you every once in a while, especially if you hear footsteps.