Absolutely! I always tell people who want to learn to program to have a goal in mind. Something they want to actually build and use, not just yet another todo list they do not care about and won't touch ever again. In a way, it is better to have a problem first, then learn a programming language to fix that problem instead of the other way round.