Notice that writing comes last.
Version control allows us to:
commit
.push
these changes out to others.pull
down changes made by others.merge
and resolve conflicting changes.tag
when a ‘milestones’ is reached.branch
to add a feature.checkout
.Git is distributed, meaning that every computer is a potential server and a potential authority. Result: commits on a plane!
But how do people find and access your code if your ‘server’ is a home machine that goes to sleep at night? Result: GitHub.
GitHub is ‘just’ a very large Git server with a lot of nice web-friendly features tacked on: create a web site, issue/bug tracking, promote your project…
Markdown is intended to:
For those who know how to do it, you can also insert bits of real HTML and CSS (the ‘languages’ of web sites) as well.
The features that make it easy to use have real advantages for you:
See CommonMark and the Markdown Guide for more :
Format | Output |
---|---|
Plain text… | Plain text |
## A Large Heading |
A Large Heading |
### A Medium Heading |
A Medium Heading |
- A list - More list |
|
1. An ordered list 2. More ordered list |
|
[A link](http://casa.ucl.ac.uk) | A link |
Format | Output |
---|---|
![Alt Text](casa_logo.jpg) | |
`A code snippet` |
A code snippet
|
```python A block of Python code ``` |
A block of Python code
|
Here are some more resources:
And once you’re ready to get ‘serious’, check out this tutorial on Sustainable Authorship in Plain Text using Pandoc and Markdown from The Programming Historian! That’s what actually underpins Knitr and Quarto, but you can do so much more…
Ideally, we want to write code in ways that are ‘literate’.
The best programs are written so that computing machines can perform them quickly and so that human beings can understand them clearly. A programmer is ideally an essayist who works with traditional aesthetic and literary forms as well as mathematical concepts, to communicate the way that an algorithm works and to convince a reader that the results will be correct.
– Donald Knuth, Selected Papers on Computer Science
What we want:
Why do we want this?
Modern Browser + Jupyter == Tangled, Woven code in (m)any languages
Including maths:
\[ f(a) = \frac{1}{2\pi i} \oint_{\gamma} \frac{f(z)}{z-a} dz \]
JupyterLab is basically a web application:
Quarto is intended to:
knitr
to all languagesCollectively, this constitutes sustainable authorship of code and ‘documentation’ in the broadest sense.
Writing Code • Jon Reades & Fulvio Lopane