This conclusion doesn't follow from your premises, unless you include the hidden premise that more wealth in the world is the only criterion you're using.
Once you begin looking at things like wealth distribution or the like as measures of "better", your argument doesn't reach that conclusion.
But logic must take a backseat to ideology.
I could argue the exact opposite. The barista assists those who'd like to drink a cup of coffee and contemplate, and increasing contemplation creates a lot of value (intrinsic value) -- maybe not every barista, but this particular one does -- whereas the software developer writes programs that make soul-crushing economic activities more efficient, and so sucks away value from the world.
> The world is then better off.
Or worse off. It all depends on how you see value, which, naturally, is part of your personal value system. For example, in my opinion, a single crippled cat may create more inspiration for a great work of art than, say, Uber. I therefore see a single crippled cat (or any cat, for that matter) as making the world much better off than an inane ride-sharing smartphone app. I would venture to guess that you believe Uber is more valuable than a cat. You value efficiency, I value inefficiency (or, rather, freedom from efficiency); you value rational behavior while I value spite -- or freedom from rationality (not all the time, of course); you value freedom from the will of the masses, while I value freedom from the will of corporations.
BTW, are you a Dark Enlightenment believer? If so, I'd love to shoot you an email, if you don't mind.
You got that completely backwards. A developer can be productive during the commute. Given modern offices with their distractions, an hour commute each way can give a developer much needed time for design and analysis. The barista, on the other hand, does nothing productive while commuting.
This is of course completely tangential to the main point, namely that they both can live in SF if we build more housing.