Member-only story

Julia tricks I wish I knew earlier

Manpreet Singh
2 min readAug 29, 2021

--

Welcome back! As most of you know, Julia is an awesome programming language used heavily for numerical analysis, so here are a few tricks I wish I knew earlier about this language!

Getting Help

Another awesome trick that Julia has is entering help mode, to do this you have to type in a ? in your prompt:

By doing this, you can access documentation(s) on any of the specific methods that you may need help with!

Filtering Out File Types

Starting off, one of the coolest tricks you can do is filtering out the file types of a directory, to do this we can use the endswith method:

xlsxs = filter(endswith(“.xlsx”), readdir())

This will output all of the files that end with .xlsx in that directory and store it in a variable called xlsxs.

Instant Documentation

Another awesome feature with Julia is the instant documentation function, if you use the @ doc function before a piece of code, this will print out the documentation that’s related to your code:

--

--

Manpreet Singh
Manpreet Singh

No responses yet