We study a model that integrates productive and socializing ef- forts with occupational choice in the presence of endogenous spillovers. Among other results, we show that more talented individuals work harder and contribute more to the emergence of externalities, but also have incentives to segregate. Average socializing increases in the average productivity of the occupation. Also, the size of an occupation grows in its network synergies. Turning to efficiency, we show that individuals underinvest in productive and socializing effort, and sort themselves inefficiently into occupations. We derive the optimal subsidy to achieve efficient effort within occupations and show that efficient sorting into occupations can always be achieved by a linear tax. We illustrate the importance for the government to intervene on both margins, as solving only the within occupation investment problem can exacerbate misallocations due to network choice and may even reduce welfare in presence of congestion costs.