Blog Home RSS Kelvin Jackson

Practice Coding By Writing a Calendar App

2022-05-23

If you want to practice programming but aren't sure what to write, build a calendar app.

Thank about it. First and foremost, a calendar is something that everybody needs in this day and age — while you may not yet be ready to switch your entire schedule away from your existing calendar to the one you build, the bar for using your own code is very low when that code is a calendar. Even if you just put in a couple of events for testing, you are much more likely to be testing your code with (at least partially) real-world data, rather than depending on artificial test cases that you may subconsciously tailor to work around specific bugs. This benefit will be compounded if you genuinely start using the calendar app to manage your calendar: I won't recommend that you entrust your most critical appointments to alpha software, but by using your own app in parallel with an existing calendar tool or a paper planner, you will notice discrepencies immeidately and be able to investigate and fix them.

Furthermore, a calendar can be as simple or as complicated as you want it to be. You can easily start with something that only handles the days of the coming week, or can only schedule events at single points in time in the future, and work up from there to a more mature application capable of handling recurring events, leap years, time zones, and all the other fun intricacies of scheduling. If you get bored or need a break along the way and decide to delay implementing any of these intricacies, you will still have a tool that is useful in many common cases. And as you start using your calendar, you will see opportunities to extend it, or to add various bells and whistles tailored to your particular situation.

A calendar also gives you an excuse to touch many different types of programming. Want a nice graphical interface instead of just using the command line? You get to learn a UI framework! Want a mobile version? You get to learn how to build a mobile app! Want your calendar to be publishable to the web? You get to work with all of the layers of full-stack web development if you want to! The possibilities are nearly endless, and you will find it very rewarding to develop your skills in this way — I have even considered using a basic calendar app to flesh out the upsides and downsides of different syntax options in a novel programming language.

So: don't throw your existing calendar away just because you read this post and now want to write one, but if you feel you need a side project for practice, consider a calendar.