Learning a programming language isn't just about learning new syntax, it's also getting proficient with new tools and workflows, an aspect of programming education that is often overlooked. Having only worked in Pluto notebooks so far, we will now take a look at alternative workflows.
We start out by looking at the Julia package manager Pkg, which allows us to write reproducible code by defining environments. We then enhance our REPL, since we will usually have an interactive REPL session running while working on our code. We will then show how to set up, write and test a Julia package.
While writing your package, you will most likely see some of your package tests fail. For non-trivial bugs, knowing how to use a debugger is crucial. And once your code is running correctly, you probably want to make it run fast. Using a profiler will tell you which parts of your code deserve your time and attention.
Finally, we take a short look at scripts and experiments. This is useful for ML research, where you will most likely be launching jobs on remote compute clusters from the command-line. We also demonstrate a template and "assistant" for scientific experiments.
These workflows should empower you to write and share your own Julia packages!
Tip
As an alternative to this page, we highly recommend reading Modern Julia Workflows.
The Missing Semester of Your CS Education: MIT course covering general programming tools and workflows. Recommended reading:
JuliaNotes: Collection of notes on everything from performance tips to package writing