Honest question - has Elon written any of the code for Tesla or SpaceX? Or has he designed any of the electrical or mechanical systems? I know he used to code at past companies, but a quick google search doesn't tell me he still does this.
Elon takes an active hand in all of the engineering discussions and contributes heavily to design deicions. Of course he doesn't write code or machine parts himself, that would be a really poor use of his time-- that's what he's hired thousands of engineers for, so that he can be head engineer overseeing the countless moving parts involved in manufacturing both rockets and cars simultaneously.