I recently had the need to write a Monte Carlo simulation and took the same opportunity to learn the Julia language and some new programming skills. It’s good to constantly expose yourself to new approaches and languages and working with Julia for a project has given me some insight into this new language.
Learn The Julia Language With An IDE
Much like R, at core Julia is a script language that is run off a simple command line program. While this is great, it doesn’t make for a very good development environment, especially if you want to just try out a couple of things. That is where the use of Atom, combined with the uber-juno package, provides a very nice integrated development environment for Julia and makes it a lot easier to work with the language. It provides everything from a code view, code-complete and a console view. It’s truly an all-in-one package for Julia development and, best of all, it won’t cost you any money.
Is Julia Better Than R?
I had initially come across the documentation for Julia while researching other items for R and R Studio. Some of the links and commentary touted Julia as a potential replacement for R. It’s always good to look at alternatives, but I do not see Julia having any effect on someone’s choice to work with R. First of all, R does not need a replacement. It’s a great language with broadly supported tools and languages. And given that R is free, there’s really little need to research replacements. Second, I do not see Julia as having the capabilities to handle large datasets in the way that R (or even a good database installation) can handle them. In addition, R has so many statistics packages OOTB, that any new competitor would need to bring a large statistics package to even begin to think about taking on R. I can see Julia reaching this point in the future, but that is not where the language and tools is at right now.
Is Julia Better Than Python?
There are definitely more similarities between Julia and Python than there are with Julia and R. Both languages off the ability for you to quickly sketch out ideas and deal with a language that is more intuitive than most others. The structure and approach of both languages are definitely very similar. In many ways, it feels like Julia and Python are almost identical languages, you’re just sending them to different compilers. And that is where the fans of Julia would encourage you to work with the language. The Julia compiler is arguably more robust than a straight Python installation due to it’s use of C++ and the resulting performance speeds.
However, this has two straightforward counter-arguments. First, you can achieve some very impressive speeds with Python by using any number of other compilers or performance enhancers out there. Yes, this requires a little more work on your part, but no more work than starting all over with a new language. So if performance speeds are really that important to you, then Python can still be a viable option.
Second, do you really do work that can requires finely-enhanced performance speeds? Sure, there are some academic and scientific applications that are going to require the absolute best compiler performance. But for other approaches, you might not care, or even notice, a difference in compiler performance. At some point you’re just putting a finer edge – that you may not actually need – on an already good product. Therefore, when evaluating Julia and Python, you have to make sure that you are not getting caught up in the novelty of Julia when you could be perfectly fine with Python.
Learn the Julia Language Nuances
As when learning any new language, it pays to read the documentation. Of course, it’s also a boring step and usually not very exciting. So Julia has an unfortunately-named Style Guide. I think it has an unfortunate name because I have found this document to be critical when you learn the Julia language. For example, in writing my simulation, I was experiencing low performance throughput. After reading the style guide, I learned that Julia handles declared and undeclared global variables differently. That’s quite a departure from Python, so it took some getting used to. There is also other useful information in there, particularly around Julia’s preference to work with functions, not just procedural scripts like you must be used to with both R and Python. I would recommend that you use the Style Guide as an initial README into the language, it will be quite beneficial for you.
Have you worked with Julia? Do you prefer it over other languages? Feel free to tell me in the comments below.