Coding

Julia

I primarily use Julia for my research. For computationally intensive work like structural estimation, Julia's pace and ease-of-use has been well documented. Below I list some helpful resources.

  1. Julia's Getting Started manual: The section on Performance Tips is particularly useful.

  2. Difference from other languages: The difference between copy, assign, and mutation are important to understand (especially for someone switching from Matlab). Another important difference is that if a function modifies an array, the change is visible to the caller.

  3. DataFramesMeta: This is a near-clone of R's superb dplyr for Julia. Also includes a very helpful tutorial for those switching over from dplyr.

  4. Optim.jl: Julia's optimization package.

  5. FixedEffectModels.jl: For running regressions with many fixed effects.

  6. Other useful packages: GLM, CSV, FreqTables, LinearAlgebra, Statistics, JLD, Debugger, Infiltrator, HaltonSequences, FixedPointAcceleration.

  7. Julia's discourse page: A superb online community of Julia developers providing quick and accurate answers to questions.

  8. Cameron Pfiffer's course: A nice recorded course that talks about how to get the best performance out of Julia.


VSCode (with Vim emulator)

VS Code is a code editor that allows the user to centralize all their coding at a single location. This means a coder can do all their writing - Julia, R, Matlab, Stata, LaTEX - into a single editor (with linting extensions for all languages available on the marketplace) and execute the code from there. Given all the extensions now available in the VS Code marketplace, it's possible to create a modified interface for any specific programming language. Personally, I find it cleaner to just run all code through the terminal.

A big advantage of using a code editor is that the user can optimize their coding experience which then carries over to the rest of their work. The biggest efficiency gain I experienced for my coding was through using the Vim emulator in VSCode. This mimics the behavior and keybindings of Vim, a widely used code editor.

The advantages of Vim are many, but the one that stands out to me is the vastly improved speed of writing code. This arises for a few reasons, but the key ones are i) the keybindings operate like a language, ii) the user's hands rarely have to leave the home row, and iii) it avoids the background clutter that is built into a lot of GUIs. The gain in coding efficiency really adds up if you spend hours editing every day; see here for a detailed explanation.

The disadvantage of Vim is that its appearance and extensions aren't that great. By using the Vim emulator in VSCode, one can gain the best of both worlds.

A great resource for learning Vim can be found here.