What programming languages should you learn for Physics?

  Рет қаралды 15,460

Jonathon Riddell

Jonathon Riddell

Күн бұрын

Consider supporting the channel: / @jonathonriddell
Try Audible and get up to two free audiobooks: amzn.to/3Torkbc
Hi everyone!
In this video I describe my workflow for computational physics. I go into why I use the languages I do, and talk about the pros and cons of different languages.
Mr . P Solver:
/ mrpsolver
Recommended textbooks:
Quantum mechanics:
amzn.to/3Ar5dbn or amzn.to/3ckXkfL
Statistical mechanics:
amzn.to/3QYcere or amzn.to/3cmZb3u
Quantum information:
amzn.to/3Kpjt96 or amzn.to/3KpjAl2
My publication list: scholar.google.com/citations?...
Instagram: / stat.mech.in.action
TikTok: www.tiktok.com/@stat.mech.in....
Twitter: / jonathonriddell
Discord: / discord

Пікірлер: 38
@MrPSolver
@MrPSolver 2 жыл бұрын
Thanks for the shoutout! ❤️. I'm actually planning on learning C++ some time in the near future, would love to see samples of your code on here!
@adwaitnaravane5285
@adwaitnaravane5285 Жыл бұрын
No you're falling for the devil. Trust in the lord and go for Julia.
@sriZzZzZ
@sriZzZzZ 8 ай бұрын
@@adwaitnaravane5285 and yes u r really right
@vishwassingh1528
@vishwassingh1528 Жыл бұрын
Thank You dost.. much needed video
@richardbennett4365
@richardbennett4365 8 ай бұрын
I doubt the presenter knows your language's word, "dost." But hey, that's okay. He gave your comment a Like, and if he doesn't know, then I will let him know here: friend; buddy; pal; dude.
@farzambahmani1404
@farzambahmani1404 Жыл бұрын
Great idea for coding series
@EpicMathTime
@EpicMathTime 2 жыл бұрын
I think people should just get skills in one typical OO language and not get too hung up on the choice of initial language. Once you do that, hopping to another one as needed is basically trivial. Off the top of my head, ancient Fortran is good for computational science, I think, as is Python. I learned Python, but I now use C# exclusively. I'm no programmer or software engineer, so I don't have a deep technical knowledge on these languages, but as a casual user, they all pretty much feel the same to me.
@JonathonRiddell
@JonathonRiddell 2 жыл бұрын
I definitely agree that you shouldn't sweat the initial choice, mine happened to be python due to a course I was taking. At the end of the day it's about solving the problem you are given in an efficient way. For a lot of problems the functionality available (or familiarity) will be more important than the speed. But once you jump into work that requires a lot of speed / has high computational complexity I think you should use a compiled language. Fortran is fine but I don't really know many people who use it anymore. C++ (for my field) seems to have a lot more support/ libraries to work off of.
@brucebarnes8138
@brucebarnes8138 11 ай бұрын
I really don't like C, Is C# hard to learn and use? Is C# like Fortran, does C# have an easy to use editor?
@victotronics
@victotronics Ай бұрын
You should not use "ancient Fortran". You should use Fortran2008 or later, which is object-oriented, supports parallelism, &c.
@swagatbordoloi9773
@swagatbordoloi9773 Жыл бұрын
I'm a freshly enrolled PhD student in astrophysics, but I changed my specializations from CMP and hence have beginner level computational knowledge. Can you give a brief roadmap on how should I proceed to learn the required things as it would help me to make my learning journey a bit better? maybe atleast for the initial stage
@JonathonRiddell
@JonathonRiddell Жыл бұрын
Do you have any numerical experience at all? Which languages? Which languages would you be working with during your PhD? I can answer better once you give me more details :). Also feel free to join the discord community, I answer quicker there and can go into more depth. For c++ I would say start on the tutorials of: cplusplus.com/ (assuming it's brand new)
@swagatbordoloi9773
@swagatbordoloi9773 Жыл бұрын
@@JonathonRiddell Thank you so much for looking at my comment. I had numerical physics classes of different series, algebra, matrices, etc. In programming, we were taught C in our undergrad computational physics classes, and i did learn different numerical methods like newton Rapson etc. But, I am learning Python on my own as I would mostly be working with this language. I inquired about the requirements, but I was given no specification and was told that anyone would work, with the only difference in syntax. But there is a large gap in my knowledge of the numerical methods as I still need to relearn those techniques. I have no prior real time experience data handling and stuff which I would be mostly working on. You can call I'm a astro enthusiast who is starting his astro journey from PhD. Looking forward to hear from you on this. Also. I would love to connect with you on discord. Username - Spydr98 . name- swagat, loved your video ❤
@JonathonRiddell
@JonathonRiddell Жыл бұрын
I see! So to me it looks like you are quite the experienced computational physicist already :) you are just out of practice. For python and computational physics I would highly recommend the channel: kzbin.info It's dedicated to computational physics in python specifically. There are intro python videos there to get you started if need be and then you can code along in the other videos!
@JonathonRiddell
@JonathonRiddell Жыл бұрын
For plotting I believe the channel I mentioned covers this, but matplotlib is easy and intuitive to work with. I'd recommend looking into AXES plotting and learn that way vs. The normal plt.plot route as you'll eventually want subplots and more fancy features :).
@swagatbordoloi9773
@swagatbordoloi9773 Жыл бұрын
@@JonathonRiddell yess. i'll look into it for sure
@bibekgautam512
@bibekgautam512 2 жыл бұрын
I’ve used python for data analysis and plots as you mention. And I’ve learnt C and basic numerical methoda through formal courses. I have a bit of free time at hand right now before grad school and would like to improve my numerical abilities. What book or other resources would you recommend? I want to learn algorithms that are common to most computational physics.
@JonathonRiddell
@JonathonRiddell 2 жыл бұрын
Before I give feedback, just curious about two things. Have you taken a class on numerical analysis or were they strictly numerical methods courses? And what area of physics will you focus on in graduate school? It seems like you have a solid foundation :) just want to make a recommendation that makes sense for you.
@bibekgautam512
@bibekgautam512 2 жыл бұрын
@@JonathonRiddell It was about a semester worth of course on basic numerical methods with things like root finding, differentiation and integration methods, and methods to solve ode like RK4 etc. I’m leaning towards numerical relativity for grad school at the moment but I’m not totally sure. I like condensed matter physics as well.
@JonathonRiddell
@JonathonRiddell 2 жыл бұрын
@@bibekgautam512 Hey! So, I don't have any experience in numerical relativity, but, I do have some suggestions here. One suggestion is to get a more formal intro to numerical analysis, this will expose you to more algorithms and allow you to understand what's going on at a deeper level. From that, I used (and enjoyed): A Graduate Introduction to Numerical Methods: From the Viewpoint of Backward Error Analysis By Rob Corless and Nicolas Fillion. For condensed matter specific algorithms, I'll instead recommend an review article that includes pseudo code, for solving a bunch of different types of problems in condensed matter systems (the author uses magnetic systems as an example but it's not limited to it: arxiv.org/pdf/1101.3281.pdf Either, or both, would be good ways to expand your knowledge. :) Hope that helps.
@bibekgautam512
@bibekgautam512 2 жыл бұрын
@@JonathonRiddell That sounds like exactly what I was looking for. Thanks a lot! Looking forward to that video series starting next week as well!
@eulefranz944
@eulefranz944 2 жыл бұрын
@@JonathonRiddell will check it out for sure... But before that I got to learn c++ in the frist place lol
@HaroldSchranz
@HaroldSchranz 7 ай бұрын
Python is good for prototyping but for serious supercomputing, there is not much to be gained by not using Fortran. Of course, if speed is not an issue, C# and C++ might be OK - though wny torture yourself with the latter.
@kim-hendrikmerk4163
@kim-hendrikmerk4163 Жыл бұрын
Do you have to work with Fortran at all? As i heard that a lot of work is present in it.
@JonathonRiddell
@JonathonRiddell Жыл бұрын
I personally don't, though some people still do. A lot of newer code seems to be written for c++, c or even Julia these days :). Sometimes python and Matlab too.
@richardbennett4365
@richardbennett4365 8 ай бұрын
You guys, @MrPSolver included could benefit from learning LAPACK and Fortran. But, Mr Riddell, if you know C++ and no Fortran, you might find Fortran odd, though its syntax or I should say its readability is not so different from python.
@JonathonRiddell
@JonathonRiddell 8 ай бұрын
With eigen in c++ I'm not sure lapack is necessary anymore / the advantages of c++ really shine. You can also construct eigen with a lapack back end if you want :)
@richardbennett4365
@richardbennett4365 8 ай бұрын
@@JonathonRiddell very good. I was just somewhat surprised you didn't mention Fortran or Haskell (kidding about the latter one; however, it is supposed to be excellent at number crunching. I did try learning it, but gave up; I could not get the hang of the syntax; it all seemed so bizarre.). Maybe younger physicists don't generally use Fortran. It is an older language, but it's a good one. The fact that it is still around and used so heavily attests to its resiliance.
@brucebarnes8138
@brucebarnes8138 11 ай бұрын
I started in Fortran back in the 70's. I tried to change to c and found it very confusing so I stayed with Fortran. I like Python a lot, but it is a little slow. I have not tried c++ is it easier to learn than c? I really like Python in linux. Is there a more modern language like python with more speed?
@JonathonRiddell
@JonathonRiddell 11 ай бұрын
Julia might be up your ally then! It's modern and designed to be easier. Still slower than c++/c. Depending on your needs modern c++ might be made a lot easier with libraries, for example eigen c++ makes linear algebra very easy (it's free and highly optimized).
@gabrielepicco3582
@gabrielepicco3582 4 ай бұрын
maybe just try to update your fortran, there is an amazing book from Milan Curcic about modern fortran. I know and use python, c, c++ and c#, but I still rely on fortran (standard 2023) for proper big number crunching :) as python is too slow and c++ syntax feels a bit more uncomfortable for maths problems.
@chaitanyavarmamudunuri7270
@chaitanyavarmamudunuri7270 Жыл бұрын
What about Julia programming language?
@JonathonRiddell
@JonathonRiddell Жыл бұрын
Julia is quite a nice language with some packages like iTensor offering support now. I get the impression that it is in general quite fast, and much easier to develop efficient code on than c++. Depending on your use case it might be a better alternative to c++, but in the end, highly optimized c++ code is going to be faster.
@SrWho1234
@SrWho1234 7 ай бұрын
Julia is great for physics
Best programming language for science in 2024
36:07
Jonathon Riddell
Рет қаралды 2,7 М.
Toolbox of a Computational Physicist
13:48
Greg Winther
Рет қаралды 13 М.
Gym belt !! 😂😂  @kauermtt
00:10
Tibo InShape
Рет қаралды 12 МЛН
Эффект Карбонаро и нестандартная коробка
01:00
История одного вокалиста
Рет қаралды 9 МЛН
APL vs BQN vs J vs Q vs NumPy vs Julia vs R
42:44
code_report
Рет қаралды 28 М.
Building a Physics Engine with C++ and Simulating Machines
11:23
AngeTheGreat
Рет қаралды 686 М.
My Favourite Textbooks for Studying Physics and Astrophysics
11:41
Lewis Cooper
Рет қаралды 68 М.
ASMR Programming - Spinning Cube - No Talking
20:45
Servet Gulnaroglu
Рет қаралды 3,7 МЛН
Cosine: The exact moment Jeff Bezos decided not to become a physicist
2:21
Tidefall Capital
Рет қаралды 2,9 МЛН
Modern computational methods in physics part 1: Diagonalization
19:20
Jonathon Riddell
Рет қаралды 4,8 М.
This Is the Calculus They Won't Teach You
30:17
A Well-Rested Dog
Рет қаралды 3,1 МЛН
New Recipe for Pi - Numberphile
14:29
Numberphile
Рет қаралды 283 М.
Is Coding Useful For Undergraduate Physics Courses?
4:50
Andrew Dotson
Рет қаралды 27 М.
Samsung Galaxy 🔥 #shorts  #trending #youtubeshorts  #shortvideo ujjawal4u
0:10
Ujjawal4u. 120k Views . 4 hours ago
Рет қаралды 8 МЛН
Как бесплатно замутить iphone 15 pro max
0:59
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 2,7 МЛН
Красиво, но телефон жаль
0:32
Бесполезные Новости
Рет қаралды 1,5 МЛН
Худшие кожаные чехлы для iPhone
1:00
Rozetked
Рет қаралды 1,3 МЛН
Todos os modelos de smartphone
0:20
Spider Slack
Рет қаралды 59 МЛН