I honestly believe that it's a game-balancing oversight that painting is so incredibly lucrative. Not at first of course, but with the right traits and rewards, you can make boatloads with painting alone. Writing will also make a lot of money, since it all stacks, and royalties last 3-4 weeks or so. I think writing would ultimately make more money than painting if you kept doing it, and kept publishing everything you wrote.
But with programming, it takes a really long time to get anything done. Completing a mobile app might get you $2000 up front, and daily royalties of $100, but a single book that makes $500 daily, and took an hour or two to complete, is going to make more money. It's basic math. An app will make you $2500 in the first five days, and a book will also make you $2500 in the first five days. After 10 days however, that app has made $3000, and the single book has made $5000. Factoring in that you can eke out three books in the time it takes to complete one app, and you see the difference.
Painting is a bit high-risk as far as money goes. While nearly every painting will at least recoup the cost of the canvas, you can't always guarantee a masterpiece or a big seller. Plus it seems that each sim has a 'preferred genre' that will make the most money. When I was playing Doris, she made the most money off of Surrealism painting, while Ixion could only turn a decent buck from Realism painting. Meanwhile my main sim Kato makes a killing in Pop Art and Abstract, but just barely turns a profit from realism. This might be related to traits.