But the deadlines! I am sleeping so little, got too much caffeine in my system, dunno, thanks for the advice though, will try to take a nap and see some posts in 9gag
If you aren't getting enough sleep, that is the reason you're fatigued. Prioritize fixing your sleep over everything else because without a well-rested brain, it is impossible to consistently write good software. Without writing good software, you can't hit your deadlines.
Seriously, your brain is a part of your body. Take care of both of them. This isn't just some feel-good advice. Taking care of yourself is actually necessary for solving difficult problems.
Also, make sure you understand the abstractions you are working with. Not doing so means you go around in circles. Make sure you have a clear "Definition of Done" for what you are building. Not doing so means you're going to go back-and-forth with your client/employer/TA and waste a lot of effort. Make sure you write automated tests as you write your code. Not doing so means that when you write a bug you could spend hours trying to chase it down.
Coding is not an assembly line. If you're too tired when you do it, you move more slowly, and you make more mistakes. You then have to find and fix the mistakes, which is even harder when you're tired.
Extreme Programming (XP) is about going absolutely as fast as you can. Two of XP's maxims are "Quit when you're tired" and "Never work overtime for more than one week in a row" - because you go faster when you quit when you're tired and don't work tons of overtime.
If coding was an assembly line, you wouldn't want to do it while tired. That would be a good way to get <insert unpleasant description of industrial accident>.
If you aren't getting enough sleep, that is the reason you're fatigued. Prioritize fixing your sleep over everything else because without a well-rested brain, it is impossible to consistently write good software. Without writing good software, you can't hit your deadlines.
Seriously, your brain is a part of your body. Take care of both of them. This isn't just some feel-good advice. Taking care of yourself is actually necessary for solving difficult problems.
Also, make sure you understand the abstractions you are working with. Not doing so means you go around in circles. Make sure you have a clear "Definition of Done" for what you are building. Not doing so means you're going to go back-and-forth with your client/employer/TA and waste a lot of effort. Make sure you write automated tests as you write your code. Not doing so means that when you write a bug you could spend hours trying to chase it down.
Don't treat necessities as if they were luxuries.