I loved software engineering so much that I decided to turn it into a career, so that I could do it every day. But now you want me to do it every day and every night? No. My work during the day is fulfilling. My hobbies provide variety and an opportunity to pursue other interests.
A "portfolio" does not have to, and should not, consist of side projects. Don't have any real code that you are allowed to share? Obviously, many employers won't hire engineers without reviewing existing code or having you engage in a coding exercise, but here's an idea: take a bunch of screenshots of public-facing applications/functionality you've built for your current and/or past employers. With WordPress and a $25 portfolio theme, you can have a decent-looking showcase of your work product up and running in a matter of hours.
If you have absolutely nothing that you can share (code, screenshots, a URL, a "case study") with a prospective employer, it's not the prospective employer that has a problem.
Not being able to show "code" or "screenshots" is not the fault of the prospective employee (as you "oh so subtly" implied with your last sentence).
The point here is not what you share, but that you have something to share and can present it in a manner that's compelling to your prospective employer. In some cases, that might be nothing more than a well-written, detailed description of what you developed. In others, a picture is worth a thousand words and can a preferable format for somebody who isn't a great writer.
And finally, while I wouldn't be so naive as to argue that "engineering" equals "working on public-facing applications", engineers should consider the risks of roles that do not enable them to work on systems that are "visible" or "close to the money". Obviously, there are some industries and specializations that provide lucrative opportunities that don't do this, so there are exceptions. Not every young engineer, however, can realistically count on being able to build a decades-long career in these industries/roles.
I agree with this
> If you have absolutely nothing that you can share (code, screenshots, a URL, a "case study") with a prospective employer, it's not the prospective employer that has a problem.
I disagree with this. If you require this to be true, you've instantly excluded everyone's experience in either government (particularly defense), or industry when you work on internal services. There's a huge number of enterprise developers at my current company who will never be able to show you their work because they're all internal applications. Maybe a "case study" would work, but you have to be real careful of not to cover anything that doesn't fall into the trade secret category.
If your resume is significant, then I will probably add to the signals with a phone call followup. I'm not looking to create false negatives.
I also want to point out that taking some time to develop a small and interesting project (say, a pure left-leaning red-black tree with deletion - not much code, but tricky to get right) does not take that much time and massively demonstrates your capability over having nothing at all. It also demonstrates your social awareness of the state of the field when you have a github account with projects in recent technology.
On the upside, the person with a code portfolio and less other hobbies is also more likely to be winning to commit more of their time to work, stay later, do "hackathons." It's a win-win for the employer! /s