I finished my doctorate (work completed in Matlab/call outs to C) just as Julia was starting to mature (I started getting into 0.6 just at the tail end of my degree). 100% agree with the other posters that it’s more about the science than the tools themselves. It totally depends on how much baseline infrastructure is already out there in Julia for what you’re trying to do. Trying to load datasets in industry-standard formats? Solve differential equations? Do multi-dimensional signal-processing/statistics? Solve large-scale optimization problems? Julia’s pretty good at a lot of those things in its current state (potentially the industry-specific stuff might not be as developed depending on your specific area of research). How much time will you need to write those baseline tools before you can get on doing your research? My supervisor was always willing to experiment and try whatever works best for his research group and they’ve since moved completely to Julia since I graduated. It’s definitely possible to do a full PhD in Julia, it’ll just take some planning and consideration, like most things.
My PhD involved solving differential equations for the internal and atmospheric structure of planets.
When I started, I was doing everything in Python, but soon rewrote it in Julia and never looked back. That was a decision based on speed, on the fact that standard differential equation solvers had patchy support for the kind of stuff I wanted to do, and on how poorly I understood C/Cython/the other options available to speed things up.
By the time I submitted, DifferentialEquations.jl was a thing. While I was making the corrections requested by the examiners, I ended up rewriting the differential equation components again. My hacky code wasn’t extensible enough to make the changes they wanted, and this new library was unquestionably already the better tool for the job.
So anyway, look for the best tool for the job!
I’m doing my PhD right now using Julia. My professor gave me the choice to use it (the alternative was Fortran). After two years, I think it turned out to be beneficial overall for me, but I spend one (covid/home-office) year basically searching for the right tools and learning Julia.
In short: I don’t regret picking Julia, I became a better programmer and I really enjoy the community here. However, it was a rabbit hole for me, and as always with newer technology, it is a bet about the future.
Maybe you could tell use more about the topics which are interesting for you? (Will it be modelling/simulation? Will you do a lot of statistics? Are there big python packages everyone uses? Will programming be your primary task or more a secondary tool?)
Some experiences I had:
- If your collaborators don’t use Julia, it will be extra effort for them to run your code. In my case, it delayed one of my projects by at least three months.
- If you want to go with Julia, I would advise you to find experienced Julia programmers in your field whom you can directly contact (directly, not per discord/zulip/etc). They can give you advice about which packages/tools to use for your topic. They can save you a lot of time!
(For example: which plotting package should you use? Answering this question for me took long, and the answer also changed recently since Makie became much more mature/stable now.)
Why is that exactly? In my experience sharing Julia code (to users, not programmers) has been much easier and smooth than sharing Fortran code.
definitely this, but in some people’s (including mine) case, you need to become one yourself. I’m “only” in my second year so hopefully people related to our research will have many years of my tech support to come
If people are used to run python code (with the packages one needs) they don’t have to do anything. That will always be easier than the best package manager etc, even if it’s literally one installer and one command. (Especially when one shares with non-programmers)
You mentioned that the alternative was Fortran for your PhD, so I thought that was the comparison (also if all of them use Fortran and you share the source code with them, using Fortran would be easier, of course).
My experience is:
I did my PhD in 2002-2007. I used just Fortran, with some small pieces of development in gnuplot, tcl, python, for plotting and simple data analysis.
My main advice is: write code to be shared, always, because that will make the code useful to yourself in the future.
Most of what I wrote is completely useless, unmaintainable, and lost. I have/had to rewrite stuff many times. The complete packages I wrote are there, being used and useful, but as end-user tools only.
This is not Fortran’s fault, of course. But Julia stimulates you to do that, with the great packaging and documentations tools, and modularity. The fact that in Julia packages can be very light weight can make every small tool you write something useful to others and to yourself in other projects.
I see more and more Julia packages that have Python and/or R wrappers (and intriguingly one recent package that generates code for many languages including Python, Julia and C, code). Of course somebody had to make these wrappers, could have helped in your case. Actually you don’t strictly need to make them, as you can call bidirectionally from both these languages.
Calling Python (or R) from Julia is very possible, while you have the problem of installing dependencies. I think it may actually be easier from the other direction. Would be nice to see either direction work (more) smoothly.
I did my Ph.D from 2010-2014 in applied industrial data science. It involved a lot of monte carlo simulations, ordinary differential equations, kernel density estimation, and numerical optimization. I was basically given MATLAB to work with. If you’ve ever tried multivariate optimization over a custom-built system of nonlinear differential equations in MATLAB, you will know the pain of using interpreted code for a lower level function.
I only wish I had Julia in its current state when I did that work. I remember jumping on board the Julia train with version 0.6, and re-wrote some of my old Ph.D MATLAB in Julia. It was actually fun (which is more than I could say for writing that code in MATLAB; the agony of trying to avoid for loops). The only unpleasant experience from this exercise was the tinge of jealousy toward people who are doing their PhD now and have Julia at their disposal.
Same here! I rewrite one of my C++ package recently. I enjoy the coding experience with Julia, while it is such a pain to wrote and maintain the C++ codes years ago. If Julia were at the present stage in 2010, it will save me tremendous coding time and give me a more pleasant coding experience!
Hi Inna!
I am working in Climate Science / Atmospheric Science. This very much depends on your professor and advisor, but although most of my group works in MATLAB/Python, my Professor is perfectly fine with me working in Julia as long as I get things done.
For me, that generally means that I would have to code everything up from scratch, but since Julia’s syntax is in many ways similar to Python and MATLAB it is generally easy to port such code without too much difficulty (I basically was rewriting MATLAB code into Julia last semester for a class, which the teaching professor was cool with and very much appreciated, and I learned a lot while doing it i.e. had to use new packages)
You definitely should keep familiarity with MATLAB and Python, but in my experience the programming language you’re going to bash your head against in the Climate field (esp if you do modelling) is going to be Fortran since most models are written in Fortran in some form. MATLAB, Python, etc. are more for analysis of model output and no one really cares imo what language you write it in as long as it’s reproducible and easily understood.
Julia may not be mainstream (yet, who knows in the future), but it is definitely something you should look into, especially if your advisor uses MATLAB. Julia-MATLAB syntax has much more similarities in my opinion compared to Julia-Python.
If you have any more questions, don’t hesitate to ask. You can also join us on the #climate channel on the Julia Slack.
I sometimes regret the time I spend on turning some niche algorithm or function into its own package… except when I don’t, skip writing detailed unit tests (because code I wrote is obviously correct, cannot be any other way), and later find that some calculation that ran for two weeks aborted (bad) or delivered incorrect results (worse) because of some trivial error.
Among programming languages, Julia probably has the lowest cost for turning some special-cased code into a more or less generic tool. I am not arguing that it should always be done, especially in the initial exploratory phase, but for nontrivial, long-running scientific projects it tends to happen anyway.
Hello Dear all,
Thank you very much for submitting your opinions.
In my master’s degree, I preferred to work in Julia instead of python, doing data analysis using Gnuplot.jl.
I am sure that in a PhD the data can be analyzed and more with Julia.
I want to do modelling, so i need Fortran too. Because it seems, many supervisors prefer python/r/matlab, I am going to learn some basics for Python as well.
I was mainly worried if the supervisor ‘imposes’ the programming language but it seems to me that most of them accept the different as long as the work comes out.
Forgot to mention JuliaClimate org.
I don’t see this as a given. Even if you’re using some pre-existing Fortran routines as part of your modeling, you can call these from Julia Calling C and Fortran Code · The Julia Language
if you’re writing code from scratch, there’s no need to write in Fortran for speed, just write directly in Julia.
Most of the big climate models, and even the idealized ones, often use Fortran. So if you need to go and modify the model itself which is part and parcel of what many climate PhDs do, you definitely need to know Fortran.