“Shopping Sundays” – a case study of strategic learning

The following is a short case study of my latest learning venture and how it lead me to create an app that solves a real-world issue and might earn me some money in the future.

I recently wanted to learn Angular 5. The first instinct in those cases is to follow the official tutorial, and so I did. Thus, my first Angular 5 application was the “Tour of heroes” app.

Not long after finishing the tutorial, however, I decided that the Tour of Heroes looks a bit… unimpressive, visually. I decided it was a perfect time to take the next step in learning – fiddle around with the code. I tore out the CSS guts of the tutorial app and replaced the HTML with Bootstrap elements. Not long after, I had a prettier Tour of Heroes… And a better understanding of Angular:

I still felt like I needed to get a better grasp on how services and components work. I didn’t, however, feel like tinkering around with the Tour of Heroes any further. It didn’t seem interesting.

So I paused my Angular training for the day.

The following day was a Monday and I had planned to do some shopping. Now, a thing you should know is that I currently live in Poland, where the government recently passed a new law, according to which all shops must be closed on most Sundays.

I had decided to go shopping on a Monday right after a non-shopping Sunday… It was an unpleasant experience. Nevertheless, it inspired me to Google for a list of Shopping Sundays, so that I might be better prepared for the future (i.e. know when to dress in armor plating). To my surprise, it turned out that there wasn’t a place where I could easily access this information in a convenient manner.

Ding! What a great way to dive deeper into the framework I’d been learning.

I decided to write a simple application – one which would display the nearest Sunday and say if shops would be open then. Later, I decided to add a list of “upcoming Shopping Sundays”.

Documentation in hand, I started the work. It turned out a bit harder than I had imagined, but still manageable. I created a component for displaying the nearest Sunday, and one for displaying a list of upcoming Shopping Sundays. A service for providing Shopping Sundays was needed. Soon enough, I decided a decomposition was in order and so, among others, DateUtilsService, DayOfWeekProvider and HolidayProvider were created.

Then, a realization. This needs unit tests. Does Angular have unit tests? Oh boy, does it. More reading, more googling, my first unit test was born. Then another, and another. I hadn’t planned on writing tests for my first real Angular application, but there they were.

Some more manual testing and… Hey, this app actually seems useful! So I bought a cheap domain and hosted the app on Heroku. It turned out that my domain provider does not support root CNAMEs, which Heroku requires, so, after more googling, I linked them using Cloudflare. And hey, free SSL!

It’s still too early to say if a wider audience will want to use my application. Nonetheless, solving this issue was extremely rewarding and if I keep getting hits on my page, I might even make some money on the site from advertisements.

What was supposed to be a learning project is now a fully functioning web application, thanks to focusing on solving a real life issue, instead of writing another Todo List. I suppose that is what this post is trying to encourage you to do. Try to pick interesting, real life issues to solve for your hobby projects, even if you’re just using them to learn a new technology. It might pay off, and makes for a hell of a more attractive repo on Github.

You can check out the finished application here.

Daniel Frąk Written by:

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *