At that point then, I imagine absolutely everything will have already been automated. Lawyers would certainly no longer be needed, nor would much of the judicial system. Music would be automated, hell maybe even animated movies. We might have celebrity neural nets that produce the best music/paintings/memes.
I definitely agree that coding will look different after AI has permeated most of our information systems, but fully automated coding by 2040? Really? I honestly only see mundane boilerplate type of coding tasks being automated -- though arguably that is probably what a large majority of software developers are currently doing.