Theo Diamandis

Julia Resources for Experienced Programmers

I collected some of my favorite notes and blog posts about how to write great Julia code for numerical algorithms. These resources assume proficiency in at least one other language. For beginner resources, I'd check out the Julia Language website.

Also, I definitely missed a ton of great stuff. If you have suggested additions, please reach out.

Getting started

Getting Started with Julia (for Experienced Programmers)
Chris Rackauckas walks through setting up Julia on your computer, using environments, and basic package development.

MATLAB-Python-Julia cheatsheet
Helpful resource to translate between MATLAB or NumPy and Julia syntax from the QuantEcon folks.

Writing idiomatic Julia

Multiple dispatch is one of Julia's core features. As a result, methods and the data they act on are decoupled from each other (in contrast to OOP idioms). This behavior allows us to easily extend both the data model and the operations over it. This concept is covered in more detail in the methods section of the Julia docs.

The Unreasonable Effectiveness of Multiple Dispatch
In this Juliacon 2019 talk, Stefan Karpinski describes why multiple dispatch leads to lots of code reuse and sharing.

An Example for Mathematical Optimizers
Mathieu Besançon walks through an example of using multiple dispatch in an optimization context.

JuliaLang Antipatterns
Frames Catherine White has a great post on Julia antipatterns (some of which I used before reading this) and tips on what to do instead.

Writing fast code

Optimizing Serial Code
This lecture from the SciML course (originally taught at MIT as 18.337J/6.338J: Parallel Computing and Scientific Machine Learning) explains how to write very fast Julia code (and you'll learn a lot about Julia's compiler and memory management along the way).

7 Julia Gotchas and How to Handle Them
This blog post goes over some easy ways to speed up your Julia code (e.g., avoiding global scope, detecting type instability, etc.).

Where to go from here

The Julia docs are a fantastic resource and go quite a bit deeper than many of the resources above. One of the great things about Julia is that it is (almost entirely) written in Julia, so it's very easy to check out how functions you're using are implemented under the hood. For example, I frequently find myself looking at the linear algebra source code.

Additionally, many members of the Julia community frequently blog, and aggregates many of these. I especially enjoy Chris Rackauckas' blog, Frames Catherine White's blog, and Mathieu Besançon's blog.