I graduated with a BS in nuclear engineering (which at NCSU is very close to a mechanical engineering degree). I now work the computational engineering angle, working both the CS and engineering model side of things. I can show what I did, but I don't have a singular piece of advice that can act as a silver bullet.
- I was formally educated in FORTRAN up 'til the 95 spec. Many engineering codes still exist in it, so I've since rounded out OO Fortran. It helps me read legacy code, talk to the older engineers, and maintain it if need be.
- I built a computer with a nVidia GPU chip: It helped me appreciate the hardware side of things and enabled me to write and run CUDA (CPU/GPU) programs, which offers a window into high performance computing (HPC).
- I learned as much about the OSI stack as possible (I had the fortunate opportunity to take a week-long CCNA bootcamp training class) so I could have a rough mental model how networking works, which helps in distributed computing or HPC scenarios.
- I already knew C, so I spent time spinning up on C++ and its ecosystem, as it can be popular in engineering contexts.
If you are wanting to go the pure developer route then there are plenty of others who can provide better advice. I have come to enjoy the inter-discipline of CS and engineering.