The ‘Harrellverse’: My Favorite Computing Tools
News
I have been a major proponent of Linux since about 1999. Linux served me extremely well and I was proud to support the open source community. I converted to MacOS on 2023-11-13 for the following reasons.
- Since COVID-19 hit I have been working largely at home but now am spending more time in the office. I had powerful Linux machines at both home and office, and I used to have them automatically synchronized to each other so I could work anywhere without caring which files changed.
- My institution implemented more and more restrictive firewalls so that I could no longer synchronize between home and office computers.
- I had to create and maintain an AWS Ubuntu server that served as an intermediary so that I could semi-manually synchronize home and office computers. This process started to require too much of my time.
- To access Linux while traveling I used a Windows 11 laptop that ran Linux under Windows Subsystem for Linux 2. I was unable to get this system to run all the applications I needed, and I found the approach awkward. And I had never been able to find an all-Linux laptop that I really liked. Key issues were wifi and power management.
- So I was having to maintain/update/synchronize four computers: linux boxes for home and work, the Windows laptop, and one Amazon server. The Windows laptop needed major updates every few days thanks to Microsoft inefficiencies, and Ubuntu on AWS needed to be updated every few weeks (this required only about one minute of my time but I had to remember to log in to see if there were important security updates for Linux).
- I had a
cron
job that did nightly incremental backups of the desktop workstation at home, but this system usingrsnapshot
was sometimes complex to manage. I needed a backup system that was more built into the operating system. - In order to have one computer for everything I decided on a deluxe laptop that I could carry to work as well as take on trips. A 16” Macbook Pro M2 fit the bill.
- The total time required to configure the Mac, copy all my files, set up
Time Machine
, and get MacOS to have all the functions/apps I had on Linux was about 20 hours. This is thanks to MacOS being based on Unix which is very similar to Linux.
Tools
- R: Statistical computing and graphics
- See my R Workflow
- R: Data manipulation and munging
debian
packages: R package management (fast updates)- LaTeX: Composition and typesetting of complex documents where fine control is needed
Rmarkdown
withknitr
andRstudio
for reproducible statistical reports, handouts, presentations, using this template- Changing from
Rmarkdown
to Quarto withknitr
with or withoutRStudio
using this template and resulting html file. See this full Example. - R data manipulation and aggregation: data.table package
- MacOS: Operating system
- Helper functions: dozens of bash script functions defined inside of
~/.bashrc
e.g.findnewer() { find . -mtime $2 -type f | grep "$1" ; }
- Server:
Netlify
using static web images (directory structure) deployed from my computer toNetlify
through theNetlify
command line interface - Journal article library: part of
Netlify
deployment, to https://hbiostat.org/papers- Papers are given keywords and pdf articles are linked from a large markdown file
index.md
used to createindex.html
- PDF papers are individually password protected since they are included in the web directory
- Papers are given keywords and pdf articles are linked from a large markdown file
- Email:
- Vanderbilt work-related:
outlook.office.com
- Personal mail: zoho.com at
fh@fharrell.com
- Email archive:
gmail
- To avoid storing attachments to outgoing email (and filling up my email storage space quota) I have a shell command
cattach
that deploys the file to send to aNetlify
static web site and puts the full URL to the file in the system clipboard; I then typectrl-v
to paste this URL into the body of the email.attach
is another command similar to this that puts a one-month expiration date inside the file name. - Email space quota is never an issue
- Delete all attachments every month or so
- Often I’ll update an attachment without sending a follow-up email
- If you don’t want to set this up use ffsend which has an option to automatically place the generated URL into the clipboard
- Vanderbilt work-related:
- Browser:
Safari
- R code editor:
code
andRStudio
- LaTeX editor:
RStudio
,TeXShop
,code
- knitr + LaTeX + html + R editor:
RStudio
- http://code.visualstudio.com and Mac
TextEdit
: General purpose editors/IDEs - RSS news reader: Inoreader
- Blog platform:
Quarto
+ Google Domain:fharrell.com
directed tohbiostat.org/blog
(as of 2022-09-18) - Bibliographic database: zotero
- Quick pdf article fetching: <libkey.io/doi>
- Cloud storage:
iCloud
- Password manager: Bitwarden
- Incremental backup system:
Time Machine
- Online teaching
- Drawing during online presentations: Freeform on MacOS and iPad with Apple pencil
- For Zoom, share Freeform app
- Could not get Notes to work; when added iPad as an extra display for Macbook, Apple Pencil drawing features did not work
- Annotating and drawing on pdf or image files and writing/drawing on a whiteboard: xournalpp (see video here; see features not to miss below)
- Annotating and drawing on web pages: Annotate and Zoho Annotator (browser plugin). If you have an
annotate.net
account (free from instructors) you can permanently save your annotations (freehand drawings, text inserts, highlights). Now usehypothes.is
. - Note taking and drawing: Stylus Labs Write (standalone app)
- Now use Mac tools for these
- Creating videos and live streaming when not using Zoom: OBS Studio
- Hardware
- MacBook Pro M2 with 64GB ram, 12 processors, 2TB disk
- Drawing during online presentations: Freeform on MacOS and iPad with Apple pencil
Notes
- Two features not to miss in
xournalpp
:- click on the
TeX
icon to annotate images withLaTeX
equations that are instantly rendered - an arrow icon at the bottom cycles through all the pages for which you have added annotations; add any old annotation to create a quick bookmarking system; icons near that arrow take you instantly to the document’s first or last pdf page
- click on the
Editing Efficiency
Here are some needs for efficient editing without using the mouse. There are editors such as the ones above that handle some of these needs but there is no perfect editor that handles all of them simultaneously. In parentheses are the Emacs keys to perform the indicated function. In brackets are names of programs that handle the function elegantly.
- Delete the current line: TexStudio ^k, RStudio ^d, geany ^k
- Delete text to the right of the cursor in the current line (^k): geany ^Shift Delete, RStudio ^k
- Insert text in the clipboard (^y); RStudio ^y
- Move the cursor to the beginning of the current line (^a)
- Move the cursor to the end of the current line (^e)
- Fold logical units (e.g., functions in R, \section in LaTeX) [RStudio, TexStudio, Geany]
- Navigation tree to jump to logical units [TexStudio, Geany]
Some Useful Shortcuts to Define
TexStudio
: Meta+z (Window key + z) toggle full-screen mode under View
To Do
- http://privacytools.io