Retired now, but was a self-employed programmer for 35 years. Fortunate to get away from consulting and contract work (not recommended) and into developing and selling my own software product (highly recommended). Marketing was much tougher in the old days. Finding a need and filling it was very lucrative. Be ready to turn on a dime. Don't get distracted trying to solve technical challenges you think are cool but for which the market is too small. Focus on what your customers really need (as opposed to what they think they want). If you truly enjoy programming, being your own boss is challenging, but done right can be a hell of a lot of fun.