This process worked for me.
To be clear, I wrote a useful application for myself and I even have users that aren’t me!
That application was the basis of my first interview with a Haskell company, and that’s a big part of how I got this job.
The point about writing programs about things you know is very important. The world doesn’t need my hacky web server or framework, but I know them well and can focus on learning the language and tools I’m using to build them. Once I’m more comfortable with the tools I can produce something more useful to other people.
I think it’s better to do things that were’s done yet, at least not in the language you are using. It’s not like there’s nothing new to do in web servers or frameworks, but there are areas where no libraries exist yet, like working with less common file formats. It may also be fine to reinvent some things if it makes doing just that thing simpler.
You don’t have to write things that already exist. If you understand a subject well then implementing it with new tools means you can focus on learning the tools. If you don’t understand the subject or the tools you will spend a lot of time bogged down trying to figure out if the problems you have are with the tools or your understanding/implementation of the subject.