Definitely, "Find a need and fill it."
For me it's all hobby-based (I'm retired), and mostly ham radio or sailing-related. Twenty years ago I wanted to use this new AIS system to monitor the position of ships and generate potential collision alarms. At the time, none of the available navigation software or hardware would do this so I wrote my own program to run on a Pocket PC (remember those???) This evolved to a more general nav-system monitoring program that I gave away (thousands are / were using it, although most navsystems now do a reasonable job of this.) But one thing leads to another.
Ham radio projects tend to evolve a lot. I was designing a radio-buoy (sailing stuff), and my existing frequency counter wasn't up to making the measurements I wanted. Rather than buy a new counter, I designed and built one using a uController, an FPGA, and a multi-channel analog front-end. That one needed a lot of hardware and software design, and is still evolving as I add useful features. I also needed a temperature chamber for evaluating oscillators, so I got the TEC "Reptile Incubator" described in one of the EEVBLOG videos, ripped out the guts, and built my own controller so I could automate the temperature swings and achieve better accuracy. This led to GPS Disciplined oscillators (I needed a good reference for my frequency measurements), and a little reference-clock distribution box. I was using the Si5351 clock-generator chip in my buoy design, and liked it so much that I built a three-output programmable clock source with 50 Ohm buffered outputs and an external freq reference port.
More radio stuff: A little ham digital transceiver (the QRP Labs "QDX") is a great little device, but the frequency stability isn't quite as good as is needed for some modes. Since my Frequency Counter was able to measure frequency and modulation with good precision I was able to identify the cause of the problem and develop a little reference-clock multiplier card that fit inside the QDX, allowing it to work with a precision frequency reference. Sharing this info with the ham community I was asked to provide these cards, so now I sell a few every week.
These same hams who wanted extreme frequency accuracy also wanted stable radio beacons, used for propagation research. So I wrote the code to do this on my Clock Generator box. My friends wanted more than three channels, and more power, so I designed a six-channel beacon using the same fundamentals but with 1W transmitters, and these boxes have been deployed on several continents. But wouldn't it be nice to send all these transmitter outputs to a single multi-band antenna? So I designed a multiband filter / coupler (just L's and C's). I've sold all of this at a small profit so I'm not losing money (but my labor is practically free, which is OK with me since I would be doing it anyway.)
Again, these hams are also running a lot of multi-SDR receiver sites, and they needed a better front-end anti-aliasing filter. I designed one and it's become very popular.
The common thread here is find a problem and figure out how to solve it. And the best problems are ones that, when solved, result in something useful for you, or someone else. But unless someone is paying you, it has to be an interesting problem.
You can see my projects here (
http://wb6cxc.com/) and here (
https://turnislandsystems.com/).