Setting up Julia, GitHub, and Quarto
Lab
2023-08-25
Overview
Labs are in-class exercises intended to get practice with coding or analysis workflows.
- Instructions available on website
- Download ahead of time by using link from Canvas
- You will have your own repository (more in a minute)
- Try to finish in class, but due in 1 week
Why Julia?
- Syntax
- Readable to computers and humans
- Closely parallels math notation
- Designed for numerical and scientific computing
- Fast!
- “Two language problem”
- All you need is Julia
- Open source
Julia example
A (naive) implementation of the Fibonacci sequence:
function fib(n)
if n < 2
return n
else
return fib(n - 1) + fib(n - 2)
end
end
fib(10)
GitHub
- You need a GitHub account
- Code is stored in “repositories”
clone
a repository to your computer
- Make changes and
commit
them
push
your changes to GitHub
- Using GitHub classroom, instructors can view your code
Quarto
Quarto is a tool that allows you to combine text and code and create many types of output
- This website is made with Quarto
- You will use Quarto to create reports for labs
- Everything in one place
- No running code, save a figure to
Downloads
, copy into Word, then update your code and try to remember where to paste it
- Reproducible
VS Code
- VS Code is a text editor
- If you are an advanced user of another text editor, you can use that instead, but I recommend VS Code
- VS Code can work as a Julia IDE
Detailed instructions
See Setup
Lab 01 Instructions
- Install software up following instructions on course website
clone
the repository for lab 01 (use the Github Classroom link from Canvas)
- Edit the
solutions.qmd
file to add your name and netID
commit
and push
your changes
Setting up Julia, GitHub, and Quarto Lab 2023-08-25