It happens at every hackathon. Progress slows down, finishing basic functionality takes forever, the list of requirements grows and grows while motivation decreases, and eventually you stop and think:
That's it, we're screwed.
Resist the temptation to throw in the towel and don't ditch the event. The most valuable experience to be gained isn't from the app you make or the technologies you learn, it's from sticking things through and turning a situation that seems hopeless on its head.
To pick yourself up you need to figure out what's bringing things down. There are a few common causes:
The app isn't functional several hours in. Progress is slow or ideas that seemed simple to implement are blocked by bugs.
Debugging can sap the energy out of any developer. The standard advice applies(use a debugger, reduce the amount of code until you isolate the issue), but sometimes it's best to work around the problem, either with a hack that hides away the issue or simply fakes the required functionality. This helps to keep your momentum and leaves you with more time to work on the app's presentation.
Focusing too hard on writing good code is another blocker. Good code is the product of careful thinking and continuous reiteration, both difficult to manage under tight time constraints. Completing tasks quickly without worrying about code quality instead can be refreshing and motivating. Hackathons are perfect for testing a previously written engine's adaptability but are not well-suited towards writing a new one.
As you work, the idea behind the app feels less and less interesting until it seems worthless.
When you lose interest in the idea, try to remember what initially excited you: the aspect that grabs you on a personal level. Developing while personally invested keeps your mind engaged and makes your passion come across in the final product.
The deadline is looming and your hack isn't impressive enough to win. It feels like showing the app to other hackers would just be embarrassing.
Don't worry about it. Anyone experienced with hackathons has their fair share of incomplete and unfulfilled hacks under their belt, each of which helped them to grow and become a better, more focused developer. They've also struggled with the same problems you're going through and empathize with your situation. Just enjoy the thrill of last-minute hacking and remember that the kind of inspiration that makes a mediocre app into a fantastic one can strike at any moment.
As a last piece of general advice for staying motivated, go to sleep when your focus runs out and you feel exhausted. The mentality that hackathons require all-nighters is poisonous and hurts the quality of your hack. Take on ideas that are small enough in scope to afford rest and use the extra energy to finish the job. Your teammates and your body will thank you.
Completing a hackathon brings an unmatched sense of accomplishment to cherish and remember. Push through your demotivation and earn it.
Programmer, drummer and occasional blogger.