How to fix a messed up sleeping schedule?

I suggest going cold turkey. Don't waste much time on thinking about how to change your pattern. Just change it. Do less coding one day and go to bed on time. Become zen and stop thinking. Get your rest.

Its a concentration problem man. At least at night nobody's bothering you right..
 


I have found that using f.lux and getting off of the computer 30-40 minutes before I actually go to sleep helps. Also not having any bright lights on when I go to sleep. If you need caffeine to get you going in the morning you might want to think about dialing back slowly on that as well.

You could try changing your eating schedule and see if that helps you as well.
 
making it to complicated.....stay up all day , so your actually up a day and a half and go to bed at a decent hour, repeat
 
I find the best way when it gets fucked is to just stay up as your planning for like 30+ hours, then your so tired you just crash at the time you want then keep you'll be tired by that time the next night.

Another way is to do a lot of exercise, talking like triathlon effort.
 
I have found that using f.lux and getting off of the computer 30-40 minutes before I actually go to sleep helps. Also not having any bright lights on when I go to sleep. If you need caffeine to get you going in the morning you might want to think about dialing back slowly on that as well.

You could try changing your eating schedule and see if that helps you as well.

F.lux for the win.
F.lux: software to make your life better

still doesn't help me go to sleep tho, just eases my eyes.
 
I also have messed up sleeping schedule as I sleep late in the night after surfing internet and has to wake-up early in the morning for going to college.
 
My schedule is super screwed at the moment and I do this all the time.

My suggestion is to avoid trying to just stay up all day to 'fix' your schedule because you always end up oversleeping because you're over tired (plus, it's not really good sleep).

You're better off to just say up a little bit longer each day - maybe 2 or 3 hours - and then ease your way back into a normal schedule.