Opinionated Advice served for breakfast
26 February, 2024
Note
Different people will give you different advice. You will have to find the best mix for yourself.
Important
There is no point being fundamentalist. Not in life, and not when discussing workflows. βοΈ
Minimum Requirement
There should be a separation along:
Example?
.
βββ 20211107ext_2v1.do
βββ 20220120ext_2v1.do
βββ 20221101wave1.dta
βββ james
β βββ NLSY97
β βββ nlsy97_v2.do
βββ mary
β βββ NLSY97
β βββ nlsy97.do
βββ matlab_fortran
β βββ graphs
β βββ sensitivity1
β β βββ data.xlsx
β β βββ good_version.do
β β βββ script.m
β βββ sensitivity2
β βββ models.f90
β βββ models.mod
β βββ nrtype.f90
βββ readme.do
βββ scatter1.eps
βββ scatter1_1.eps
βββ scatter1_2.eps
βββ ts.eps
βββ wave1.dta
βββ wave2.dta
βββ wave2regs.dta
βββ wave2regs2.dta
(scroll down! π)
.
βββ README.md
βββ code
β βββ R
β β βββ 0-install.R
β β βββ 1-main.R
β β βββ 2-figure2.R
β β βββ 3-table2.R
β βββ stata
β β βββ 1-main.do
β β βββ 2-read_raw.do
β β βββ 3-figure1.do
β β βββ 4-figure3.do
β β βββ 5-table1.do
β βββ tex
β βββ appendix.tex
β βββ main.tex
βββ data
β βββ processed
β βββ raw
βββ output
βββ plots
βββ tables
README
Note
There is no unique best way to organize your project: Make it simple, intuitive and helpful.
Important
Ideally your entire project is under version control.
Never again will I code a latex table by hand.
Never again will I copy and paste any kind of result.
There are no screenshots in my pipeline.
My codes are not just a bunch of scripts.
run
script which runs my entire pipeline.output
folder frequently. Fully reproducible anyway. πUse at least one of those
Questions 1
Questions 2
Donald Knuth: Premature Optimization is the Root of All Evil
Programmers waste enormous amounts of time thinking about, or worrying about, the speed of noncritical parts of their programs, and these attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered. We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%.
π First: make sure itβs correct, then worry about making it fast.
π Unit Tests!