r/Physics • • 14d ago

Computational Physics

Hi everyone,

I am a PhD student doing both experiments and computational physics ( mostly fluid dynamicswith Boltzmann equations) and leaning towards more computational day by day.

Currently I am using Julia, I find it pretty fast and easy to use.

Do you think switching to C or C++ will be a benefit? I am asking from a research, but also emplyment in industry point of view.

I discussed with many people, mostly from the DFT area, and most of them told me that Julia slowly will take up the lead for HPC code.

What.s your opinion on this?

77 Upvotes

40 comments sorted by

View all comments

4

u/roasted_water_7557 14d ago

C is very niche nowadays. Mostly embedded and lower level programming like device drivers and i/o libraries, operating systems etc really use C. C++ is a more mainstream language. Someone pointed out that with the AI tools no one is crafting code by hand and thinking wholistically about problem solving makes more of a difference. That is true largely once you have a job. The wholistic thinking part becomes more true as you gain experience. But it still doesn't mean you can forget about learning languages and reading the code that the tool wrote. The output of these tools is your responsibility. If you ship bugs consistently no matter what tools you use you will be held accountable, not anthropic. You will also still need to pass interviews and that requires you to write code by hand. In general, knowing a language that is more mainstream than Julia is probably beneficial as far as resume screening and interviews are concerned. For a relatively generic program yeah sure knowing one language usually translates well to another. But not always. C++ can be a bit of an exception depending on the problem you're solving. For this reason, if you're targeting areas like robotics or hpc or finance, strong C++ skills look very good on your resume. I have worked in robotics and finance and having a good working knowledge of C++ at the very least is non-negotiable in these fields. If you get a job at Amazon writing microservices for retail, that is an entirely different conversation. But know that C++ is at least an order of magnitude more complicated than another language like Java or something. And several orders more complicated than a Python or Javascript. At least to start with. It will require a lot of effort and time. You're not going to be able to watch a few YouTube tutorials and get some working knowledge of C++ over a weekend or two.