Unlocking Digital Superpowers
Unlocking Digital Superpowers
SUPERPOWERS
Open-source
friendly
Windows
Linux
macOS
Nick Touran
Digital Superpowers
Nick Touran
[Link]
Revision: 2.0
1 Introduction 1
Intended audience . . . . . . . . . . . . . . . . . . . . . . . 2
About me . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Philosophy . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Fundamentals 5
Basic parts of computers . . . . . . . . . . . . . . . . . . . 5
Operating systems . . . . . . . . . . . . . . . . . . . . . . . 6
Files and folders . . . . . . . . . . . . . . . . . . . . . . . . 7
The command line . . . . . . . . . . . . . . . . . . . . . . . 12
Programs and package managers . . . . . . . . . . . . . . 15
Password managers . . . . . . . . . . . . . . . . . . . . . . 17
Making secure but memorizable passwords with Dice-
ware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Two-factor authentication . . . . . . . . . . . . . . . . . . 20
Common scams . . . . . . . . . . . . . . . . . . . . . . . . . 21
i
Opening ports . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Virtual machines . . . . . . . . . . . . . . . . . . . . . . . . 32
Ad-blockers . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Using a VPN Service . . . . . . . . . . . . . . . . . . . . . . 36
The Onion Router and the dark web . . . . . . . . . . . . 40
Planning a night of star-gazing . . . . . . . . . . . . . . . 42
5 Art Studio 77
Basic image manipulation . . . . . . . . . . . . . . . . . . 77
Computer graphics . . . . . . . . . . . . . . . . . . . . . . . 84
The digital darkroom . . . . . . . . . . . . . . . . . . . . . 93
Making podcasts, music, and sound effects . . . . . . . . 97
DJing a party or show . . . . . . . . . . . . . . . . . . . . . 105
Movies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Making games . . . . . . . . . . . . . . . . . . . . . . . . . 110
6 Publishing 113
Publishing online . . . . . . . . . . . . . . . . . . . . . . . . 114
Publishing PDFs . . . . . . . . . . . . . . . . . . . . . . . . 120
Publishing eBooks (and books) . . . . . . . . . . . . . . . 128
7 Programming 131
Tracking changes of anything . . . . . . . . . . . . . . . . 131
Why program? . . . . . . . . . . . . . . . . . . . . . . . . . 137
Programming languages . . . . . . . . . . . . . . . . . . . 138
Writing Python programs . . . . . . . . . . . . . . . . . . . 139
The bridge to machine learning . . . . . . . . . . . . . . . 151
ii
Graphical User Interfaces . . . . . . . . . . . . . . . . . . 154
Web applications . . . . . . . . . . . . . . . . . . . . . . . . 154
9 Self-Hosting 175
Getting your own server . . . . . . . . . . . . . . . . . . . 176
Well-polished self-hosted catch-all . . . . . . . . . . . . . 178
Self-hosted home automation and security . . . . . . . . 178
Set up your own VPN Server . . . . . . . . . . . . . . . . . 183
Your own webserver . . . . . . . . . . . . . . . . . . . . . . 185
Hosting your own contacts and calendar . . . . . . . . . 185
Personal cloud for documents and photos . . . . . . . . . 186
Self-hosting your own e-mail . . . . . . . . . . . . . . . . . 186
10 Conclusion 189
11 Glossary 191
Index 197
iii
iv
Introduction
1
Computers are everywhere. They’re in our purses, our offices, our TVs,
our hobby-dens, our cars, and our toasters. Many of us spend significant
parts of our days operating these machines in the palms of our hands and
on our desks or couches. They entertain us and make us laugh. They
connect us to family and help us find love. They help us get reports
written and make project videos at school. They facilitate our work by
crunching numbers, formatting documents, and helping us express our
ideas. In a sense, they are extensions of our brains. But many of us
could be getting more out of our computers. This book will show you
how.
Computers are capable of being dozens of appliances, gadgets, and even
large facilities. This overwhelming breadth of capability is easy to over-
look. I’ve been keeping a list:
1
, Release 2.0
This book posits that some powerful capabilities of the computers many
people have on hand are neither well-known nor easy to discover. Get-
ting exposure to some of them will directly improve your life at home,
school, work, and play. Seeing these in action should inspire thoughts
to blossom about new achievements you can reach, as well as how to do
your current activities better and with more pleasure.
Intended audience
2 Chapter 1. Introduction
, Release 2.0
About me
I’m a lifelong computer lover who has spent many personal and pro-
fessional years learning about them. As much as I love computers, I
really wanted to work on the energy/climate problem, so I went into nu-
clear engineering. Conveniently, it’s a field that can be computationally
heavy. So I applied computer interests to simulating nuclear chain re-
actions. Guided by many mentors through the years, I enjoyed seeking
out and learning new or interesting technologies, and after many years,
found myself with a fairly significant body of knowledge on hand.
Along the way, I got into technical communication by founding https:
//[Link]. I have been told that I have a knack for explaining
complex things.
Then one day I thought, “Sheesh! A lot of people could use some help
looking deeper into computers in their daily lives.” and so here we are.
Philosophy
. About me 3
, Release 2.0
4 Chapter 1. Introduction
Fundamentals
2
This chapter starts with basics and covers a few bits of info and best
practices that everyone who uses computers regularly will benefit from
knowing. We’ll build more superpowers based on this foundation in the
later chapters.
Computers bring in, manipulate, and present data with lightning speed
and hardly any moving parts. This is why they’ve had such a massive
impact on our lives, and have brought forth the information age. For a
bit of context, here are the key components in computers that perform
all that wonder:
5
, Release 2.0
Component Purpose
Central Processor The CPU is the brain and does most of the num-
Unit ber crunching. Faster is better, speed is mea-
sured in billions of computation cycles per sec-
ond (gigahertz).
Memory (RAM) The working short-term fast-acting memory; it
holds the data while the CPU crunches it. More
is better, measured in billions of octets of ones
and zeros (gigabytes).
Hard drive The long-term but slower memory. It saves your
files and photos and spreadsheets. Also mea-
sured in gigabytes.
Monitor Displays information visually. On phones, it’s
an input device too. Measured in the number
of horizontal and vertical picture elements (pix-
els).
Network card Sends and receives data to/from other comput-
ers for posting cat pictures, etc. Measured in
billions of ones and zeros communicated per sec-
ond (Gbps).
Operating systems
6 Chapter 2. Fundamentals
, Release 2.0
Note: If you are unfamiliar with copy/paste, you are in for a treat.
It is a core superpower but you may benefit more from this book after
1
learning about it. The WikiHow page on it is fantastic. I’d also be a little
worried that this book is slightly too advanced for you. If you already
know about copy/paste but not the keyboard shortcuts (Ctrl-C, Ctrl-V)
just know that those shortcuts are speed-demons.
We’ve all lost files in folders before. Many of us have opened a document
from e-mail and worked on it all day only to close the editor and then
never find the file again. This usually happens when it gets saved to
some temporary folder where files downloaded from the internet go.
I’ve done this myself many times, and have fielded dozens of calls for
help from friends through the years due to this. The solution is the Save
As button, which is distinct from Save in that it lets you choose where
to save a file as opposed to just saving it where it was opened from.
Click it, navigate to a normal place like Documents, and save it there.
Problem solved!
1
[Link]
Backups
Backups are really important, and I don’t know a lot of people who take
them very seriously besides professional IT staff. I personally am really
obsessed with my document, photo, and music collections and would
be just heartbroken if I lost them in a fire, robbery, hardware failure,
electromagnetic pulse, earthquake, volcano, and/or nuclear war. But
even I am not great with backups. The main categories of data loss to
protect against are:
• Hardware fails and data can’t be recovered
• Hardware is stolen or hacked and can’t be recovered
• User (or family member) accidentally deletes data
A reasonable and easy solution for backups is the cloud which we will
discuss momentarily.
A more-difficult-to-implement but conceptually straightforward method
for slow-moving data is to buy two external USB hard drives with a few
terabytes of space. Copy all your important files over to them both. Take
one to work or a friend’s house or some other off-site location. Every
month or six months or whenever (depends on your pace of accumulat-
ing new stuff that you care about), copy new files onto them and swap
them. This will protect your archival data against robbery and fire but
not necessarily earthquakes or EMPs. For those, you need more dis-
tance.
8 Chapter 2. Fundamentals
, Release 2.0
Of course, there’s the challenge of finding out which files are out of date,
and having the discipline to regularly update the backups. Figuring
this out and quickly synchronizing is the job of the thousands of backup
software products you’ll hear about out on the market. Sure, you could
just copy everything over every day, but that would take a long time and
wear out your disks. Most modern operating systems like Windows,
Linux, and macOS come with backup utilities. Try those out or look for
third-party commercial products.
As your digital superpowers develop, you will become knowledgeable
in a few other systems that will lead you to exceedingly slick backup
options. git-annex is an advanced option worth noting that builds on
the git tool you’ll learn about in Programming. It’s quite powerful for
keeping well-organized and secure backups. For scientific, engineer-
ing, and data users, the datalad tool builds further upon git-annex
to add reproducibility on top of backups, so your scientific results can
be perfectly replicated by anyone in the future. In particular, datalad
auto-discovers any output files created by running particular commands
and tracks the input, commands, and output.
It’s not too uncommon these days to have a NAS in the home. These
are lightweight computer/appliances containing big hard drives that you
can connect to your home computers. Professional photographers and
videographers all have these. They offer some benefits in terms of shar-
ing files across the family’s computers and in terms of data reliability
(they’re often resilient against a single failure of one hard drive). You
can buy them for a few hundred bucks or, if you’re into the hobby of
it, you can turn an old computer into a NAS. PC Magazine2 (bless their
hearts) runs a review of the latest and greatest NAS machines every
year, so check them out for more advice.
Warning: NAS provides some level of backup, but they do not help
in the event of fires, burglary, or sometimes even accidental deletion.
2
[Link]
Some NAS products come with nicely polished backup software that
can help with your offsite backups.
File Encryption
If your phone or laptop gets lost or stolen with all your work and online
dating on it, no problem, right? Because you have a backup? Great job!
But you may still worry because there’s a lot of personal and confidential
stuff on most devices. It’s wise to keep your private matters private no
matter if they’re just your mom’s recipes. You DO have something to
hide! If someone gets access to your e-mail for instance, they can reset
your bank password and cause all sorts of ruckus. So let’s just hide your
data.
Encryption is the process of scrambling the bits on your hard drive in
such a fashion that even if someone steals the computer/phone, they
will not be able to access the information within. Without encryption,
a bad guy or random teen could just plug a cable in and see all your
information. Math to the rescue!
Options for encrypting your hard drives in different systems:
10 Chapter 2. Fundamentals
, Release 2.0
The Cloud
The Cloud is a nebulous term that really just means “a large semi-
automated collection of nearly identical computers out there on the
internet that is operated by some company.” A lot of computation is
moving to The Cloud because of the efficiencies of scale inherent to
mega-operators like Amazon Web Services. The deal The Cloud offers
to new business owners is that they will deal with the hassle of procur-
ing, maintaining, and servicing the computers, allowing you to focus
on software, marketing, and users. In other words, you do you. If you
do really well and need 10,000 new computers right now, they click a
button and (bloop-bleep) it’s done. If you mess up and everyone starts
deleting their account on your service, (bleep-bloop) those computers
are no longer reserved for you. What a deal! Services like Netflix and
Uber run on cloud-based back ends operated by other companies, like
Amazon, Google, or Microsoft.
What does it mean to you? Many services offer the ability to automat-
ically synchronize files on your hard drive with their hard drives in the
cloud (via the network card). This is nice because when you take a
photo on your phone, it shows up on your computer. If you experience
a tsunami, anything that was synced in The Cloud far away will survive
and re-sync when you get a new computer.
Services like Dropbox, Microsoft’s OneDrive, and Apple’s iCloud do this.
If you’re uninterested in running your own server or dealing with your
own backups, I have to recommend using these services. The risk, as
always, is that you have to trust them, because they can see all of your
files. Also, with computer systems being so complex, they always have
some new severe vulnerability, so it’s probably just a matter of time until
these services are breached. At that point, the biggest services will be
the most likely target. On the other hand, they also probably have the
12 Chapter 2. Fundamentals
, Release 2.0
only. I don’t think this is true at all, and I hope I can convince you that
it’s accessible and useful for everyone. We’ll leverage the command line
quite frequently in this book.
Note: When you read something like “Type this in” from now, and it’s
unclear where to type it, it’s very likely the command line.
Let’s type some commands in to see that it’s fun and easy.
14 Chapter 2. Fundamentals
, Release 2.0
Your computer undoubtedly came with some programs, and you have
probably downloaded and installed others. It was once a big pain to
go out and find/install the latest versions of various programs and to
keep them up to date. In the Linux world, this was solved years ago
with special programs called Package managers, which are simple little
commands that know how to go find, download, install, keep up-to-date,
and (if desired) uninstall programs. macOS and Windows have started
catching up and there are now good package managers for them as well.
Without further ado, it’s time for your next superpower: package man-
agement!
Note: This is optional but will make it easier to follow along in sections
of the book that rely on special programs. In all future uses, you can al-
ternatively search for the program at hand, find its web page, download
it, and run its installer.
ing the choice that has the word “Administrator” in it (or by right-
clicking the normal Command Prompt choice and choosing “Run as
Administrator”). Once you’re in, copy/paste the command shown at
[Link] into it and press Enter to run it (it’s sim-
ply too long to reasonably put in this book expecting you to type it). You
may have to right-click and choose Paste to paste, or (in Windows) just
press Control-V.
Now you have a package manager and can install common programs
16 Chapter 2. Fundamentals
, Release 2.0
with simple commands! The commands will look similar to what’s shown
below. We’ll provide similar tables frequently.
OS Command
After issuing a command like these, there may be some prompts and
alerts that scroll by as the packages are downloaded and installed. In
some cases, if things look frozen, you may have to just press Enter (I
had to do this in choco a few times). If you install a large package, the
process may take a few minutes depending on your internet connection
speed.
You can just as easily uninstall anything installed through these systems
by running the same kind of command but with uninstall or remove
instead of install. And you can update as well.
Life’s getting easier already! Let’s put that new skill to work.
Password managers
You know that feeling when you are trying to buy something and the web
page forces you to make a new account? Many of us just reuse the same
old password again and again, maybe with a few modifications based on
the site name. This ends up being really dangerous in addition to annoy-
ing because the likelihood that Arnold’s Pizza Shop has rock-solid secu-
. Password managers 17
, Release 2.0
rity practices is low, and after you give (roughly) the same password to
a billion such establishments, the probability of some nefarious hacker
breaking into them and getting your password approaches 100%.
Annoying and dangerous!? Hopefully there’s a superpower for that.
Indeed, there is: Password Managers. Password managers are pro-
grams you run on your computer or phone that do two essential things:
• They act as your own personal encrypted vault of passwords so you
can look them up easily when you need them
• They have random password generators that will whip up a 25-
character password whenever you need a new one for Arnold’s
Pizza Shop or similar
If you use a unique and random password for everything, the threat dis-
cussed above is neutralized. Plus you don’t have to type in the password
ever, Password Managers allow you to copy it and then paste it right into
the web form. In this workflow, you never actually know most of your
passwords.
Tip: You will still need to memorize a few key passwords for extra-
important accounts. Just keep them unique. See Making secure but
memorizable passwords with Diceware below for ways to do this well.
There are some great open-source password managers out there like
5
KeePassXC as well as commercial offerings (with better support) such
as LastPass6 or 1Password7 . A good combo is to put your KeePassXC
database in a cloud synchronization program so it synchronizes across
all your devices.
To try out KeePassXC with a package manager (see above), run the fol-
lowing in the Command Line:
5
[Link]
6
[Link]
7
[Link]
18 Chapter 2. Fundamentals
, Release 2.0
OS Command
You may also want to store credit cards in your password manager, mak-
ing it really easy to copy/paste them into web forms when shopping.
Of course there is a new threat now: If someone finds out the one pass-
word you use for your password manager and has access to your files,
they can get all of your passwords at once. This is less likely to happen,
but you should consider it when typing your master password into the
password manager. Keep in mind that Edward Snowden puts a blanket
over his head whenever he types a password, and he’s somebody who
knows what’s going on out there.
Tip: Does your password at work auto-expire every few months? Com-
panies used to think this was good for security but in 2016, NIST re-
leased guidelines saying that unnecessary auto-expiry was leading peo-
ple to choose weak passwords. They now recommend to only force
someone to change a password if there’s been evidence of a data breach.
Same with password complexity (it’s no longer wise to require mixes of
uppercase and symbols), just make a long password and check it against
a common password list.
For the few very strong passwords you do need to memorize, the Dice-
ware method is here to help. Here are the steps:
• Grab a Diceware word list like one of these8 from the EFF. These
have 5-digits between 1 and 6 (for each possible value of a die).
Here is an excerpt:
46663 reflex
46664 reflux
46665 refocus
46666 refold
51111 reforest
51112 reformat
51113 reformed
51114 reformer
• Get 5 dice and roll them. Line them up and then look up the word
that corresponds to the values you rolled (if you had 4, 6, 6, 6, 4,
your first word would be reflux, from the list above).
• Roll 4–7 more times. Now you have 5–8 random words. String
them together and that’s your super-secure but still memorizable
password.
Note: Don’t have 5 dice sitting around? You can find online genera-
tors of diceware passwords. Just know that they aren’t random enough
and the Diceware method recommends against using anything but ac-
tual dice. Besides, everyone should have some dice around for playing
10,0009 .
Two-factor authentication
20 Chapter 2. Fundamentals
, Release 2.0
typing your zip code at the gas pump when using a credit card10 , or a PIN
with a ATM card. For your most important accounts, it’s really essential
to turn it on to minimize the likelihood that someone can access them.
Banks, big shopping sites, and e-mail providers are good first places to
start. You can learn how to activate it with a web search along the lines
of:
The new risks here are that it takes longer to log in and, if you lose
your phone, it’s extra hard to just reset your password. Such are the
tradeoffs. Many companies are relaxing the pain by only requiring that
you use the 2FA code on new computers so it’s not all that bad. Other
companies make you obtain and enter a 2FA token twice per transaction,
which is really annoying.
Common scams
Billions of dollars are lost each year to fraud, much of which occurs on
computers. You should always be a little skeptical if someone you don’t
know asks you to pay for anything or give you access. Here are a few
guidelines for avoiding fraud.
10
In the USA, ZIP codes are used for credit card authentication at many self-serve
gas pumps because the cards themselves don’t have PINs like they do in most of the
rest of the world.
11
[Link]
. Common scams 21
, Release 2.0
22 Chapter 2. Fundamentals
, Release 2.0
Well, that sums up chapter one. I hope you’ve learned something new
and useful.
. Common scams 23
, Release 2.0
24 Chapter 2. Fundamentals
Around the House
3
You browse the web through your phone and computers at home, you
print stuff, you e-mail friends, you learn, you play. In this chapter, we’ll
make these more pleasant, productive, and safe.
25
, Release 2.0
Here’s the kicker: for all of these “move cursor” shortcuts, you can
throw a SHIFT in there as well to select everything from where you are
now to where the cursor’s going to go. Once something is selected you
can delete it, copy it, change the formatting… You can do anything!
Exercise
Try these out. Open an e-mail editor and type out a sentence of your
choosing. Now don’t leave the keyboard! From the end of the sentence
press Shift-Control-Left (to select the previous word) and then press
Left three more times (while keeping Shift-Control held). This should
have selected the previous three words. Copy them with Control-C,
press End, and press Control-V a few times to paste them.
Now try Control-Shift-Home followed by Backspace. You’re really
hauling now!
(macOS people use the equivalents from the table above)
!d Dictionary !a Amazon
!g Google !gi Google images
!gschol Google Scholar !wu Weather Underground
!w Wikipedia !cl Craigslist
!fb Facebook !yt YouTube
!tw Twitter !pub PubMed
Printers have a bad reputation for never working right and having re-
ally expensive ink. Regarding the ink issue, InkJet printer jets dry out if
they’re not used frequently. So if you’re shocked by a printer never re-
ally working or always needing its jets cleaned, that’s why. If you print
less than once a month but still really need that printer when you need
it, consider getting a laser printer instead. They’re a bit more expen-
sive (especially for color or combo printer/scanner), and their color for
photo-printing is not as good, but their ink reliability is usually worth it
for a lot of people.
Your router is a little computer in itself and it has settings where you
can change your Wi-Fi password, set up a guest network, adjust security
settings, and other things. It doesn’t have a screen or keyboard like your
laptop so it presents its user interface through a web browser. To get to
it, simply point your web browser to its IP address, which is very often
[Link] or [Link]. If you struggle, check the bottom of your
router for a sticker that says what its default address is.
With more smart-this and smart-that in the home, the security of your
Wi-Fi router is fairly important. It’s easy for people driving around with
laptops to get onto unsecured networks or ones with easy-to-crack pass-
words (they’re called war-drivers). It’s no problem to tote around ter-
abytes of pre-hashed passwords (called rainbow tables) and try to get
in. So try to come up with a password that is unlikely ever to have been
used before. As always, no single dictionary words.
Note: Did you know? Wi-Fi doesn’t really stand for anything. It’s just
riding upon the good reputation of Hi-Fi stereo equipment, which means
You can use your password manager to make a random Wi-Fi password.
This might annoy your family if it’s too hard, but you can at least make
it easy to get on by generating a 2-D barcode (QR code) in a special
1
format. Websites like [Link] do this for you in a few seconds. Once
it’s done, anyone can use a barcode scanner app and just scan it to get
online. Just don’t make it visible from any windows! Also beware that
some devices like printers will still require you to type the password in
manually.
Guest networks
Many Wi-Fi routers allow you to set up a separate network for guests.
Doing so gives them unfettered internet access without exposing your
devices to any viruses or misbehavior they may be dealing with.
It may be wise to connect your Smart TVs and other devices with ulte-
rior motives to the guest network. Some devices have been known to
monitor other devices on the network to try to figure out how to send
better ads or otherwise track you. If they’re on a different network they
can’t watch your phone and laptop.
. Guest networks 31
, Release 2.0
Opening ports
In this form you choose which port number to forward and which inter-
nal device it should get forwarded to. So if you had a Raspberry Pi at
[Link] you wanted to remote into on Port 22, you’d enter 22 for
both the internal and external port, and the IP address for internal IP
address. Make sure that Raspberry Pi is on lock-down though because
it will be subject to Script Kiddies trying to hack into it almost immedi-
ately. Consider using a non-standard port number as the external port
to reduce this.
Virtual machines
Virtual Machines (VMs) are programs that emulate a fresh, empty com-
puter. They allow you to run an entire other operating system as a pro-
gram on your computer. At home, this can be really useful if you have
a particularly curious family member who really wants to mess around
with computers, but you don’t want them to break yours. You can let
them mess around all they want in the virtual computer on your com-
puter!
OS Installation method
When you run virtualbox it will pop up a window from which you can
either import pre-made virtual machine “appliances” or make new ones.
Here are the steps to try out Ubuntu Linux in a VM:
• Download the latest Ubuntu image from here4 .
• Open virtualbox and choose Machine → New. Name it Ubuntu and
set type to Linux, version: Ubuntu_64.
• Click through the defaults for Memory size, hard disk, etc. (or
adjust as you please)
• Click Start to boot the empty machine.
2
You can grab a functional Windows 11 VM from Microsoft at [Link]
[Link]/en-us/windows/downloads/virtual-machines. It took me a while to fig-
ure it out, but they’re zip files that when unzipped can be loaded in VirtualBox.
3
[Link]
4
[Link]
. Virtual machines 33
, Release 2.0
• It will prompt you for a start-up disk. Click the browse button and
choose the downloaded Ubuntu iso image.
• Click Start and the Ubuntu installation process will begin!
• If you haven’t been exposed to Linux before, bask in the glory of
how nice it is.
Note: Related to VMs, you’ll also hear about containers which set
up isolated “jails” for programs to run in while sharing the same host
operating system. Containers require less hard-disk space, are faster
to spin up and down, and require fewer system resources, so they’re
really popular in modern cloud-based data centers and infrastructure.
The Docker container manager is the most popular. Some software de-
velopers/vendors are distributing their programs these days in docker
containers to simplify the setup process for users.
Nostalgia alert
Ad-blockers
Ads are like a sad knock-off of Santa Claus. They track us and watch over
our shoulders as we shop. They try to get us to buy boots for months
after we buy some boots. We can’t afford to give up precious brain
cycles. If they ever sneak onto Netflix, it’s game over. You can do a
few things to reduce your shopper footprint in the nefarious systems of
commercial retail if you so desire. Here are some options:
• Use the Firefox web browser instead of Chrome or Edge, and install
the EFF’s Privacy Badger8 plugin and/or the uBlock ad blocker9 .
8
[Link]
9
[Link]
. Ad-blockers 35
, Release 2.0
Google at its core makes most of its money off of advertising. Fire-
fox works on your phone as well as on your laptop. Try using your
package manager to install firefox if you don’t have it yet.
• Enable the “DO NOT TRACK” setting in your web browser.
• If you’re into Raspberry Pis (small $30 computers) get another one
and install Pi-Hole10 on it. This is slightly advanced (you have to
adjust your Wi-Fi router settings as part of the setup) but is really
effective in the home. It “hijacks” the internet phonebook system
(DNS) that maps human-readable internet names (such as https:/
/[Link]) to the actual IP addresses that underlie networking
(like [Link]) and compares them to a crowd-sourced blacklist
of advertisers and baddies. If the name is on the blacklist, the re-
quest just gets sent to the abyss. Ads on all your devices on your
home network simply disappear. It’s pretty nice. My Roku tries
to talk to a blacklisted site like 5,000 times per day but can’t get
through. Muahahaha.
• Turn off your Wi-Fi and Bluetooth when you’re in malls. They’re
apparently watching metadata from your phone’s modem as you
walk around even if you don’t connect to the hotspot. Look up
“people counters” if you don’t believe me.
• Just don’t ever shop or carry a cell phone.
• Move to Antarctica.
Virtual Private Network (VPN) providers are useful for peace of mind,
especially while traveling or in places where you don’t trust the Wi-Fi
operators (hotels, coffee shops, on travel with sensitive business infor-
mation, hacker-friends’ houses, etc.). When you get on a network, any-
one else on the same access point and especially the people operating
it can “sniff” the network to see what websites you’re going to and, if
there’s no green lock in your browser window, what information you are
10
[Link]
sending and receiving (though more and more websites have the green
lock these days as a best practice).
You can pay a VPN provider that will help with this. You can click a but-
ton on your computer and it will create a strongly-encrypted connection
between you and the VPN server. Then you will tell the VPN server
which sites you want to interact with and it will go out and do your
bidding, sending the results back to you through the super-encrypted
channel. Anyone between you and the VPN is now in the dark as to
what you’re doing online. They can’t see what servers you interact with
nor what data is being sent to and fro. Instead of trusting dozens of
operators and their staff along the way, you only have to trust the VPN
provider. Huzzah!
Figure4: Browsing the web from a hotel. Everyone along the way can
see any non-TLS (i.e. green lock in browser window) traffic and all meta-
data, including what sites you’re browsing and for how long. This is bad
if you don’t want people along the way to know what you’re doing.
Website
Figure5: Browsing the web through a VPN hides what you’re up to from
almost everyone. After the VPN service, metadata is available but it’s
anonymized to everyone except the VPN operator themselves. So you
only have to trust the VPN operator in this scenario.
The downside here is that your connection will be at least a little slower
since it has to route everything through the VPN service, wherever it
may be.
Companies offering VPN services include ExpressVPN, Private Internet
Access VPN, IPVanish, NordVPN, Cyber Ghost, and many others. Prices
are borderline $40–$50/year.
Instead of connecting each of your individual devices to the VPN, you
can alternatively choose to configure your Wi-Fi router as a VPN client
(only certain router models have this feature). I’m not sure this makes
too much sense at home unless you really don’t trust your ISP. Some
people actually take a travel router with them on trips that automati-
cally connects to their VPN, and they only connect through it. That is
particularly neat.
Depending on your interests, you can also run your own VPN service
right from your home as discussed in Set up your own VPN Server.
OS Installation method
Launch Tor Browser (it’s in your Start Menu in Windows) and you’re
good to go. Don’t go logging into your Facebook now though, that would
deanonymize you rather quickly. On second thought Facebook did make
a Tor Service address ([Link] and that might
be a fun first Tor Service to try to access. This would be useful to ac-
cess your Facebook when you’re not supposed to. Again, if Facebook is
banned where you are, connecting to Tor might raise some red flags too
so just be careful.
Note: Due to the nature of Tor, browsing the web through it is inher-
ently slower.
To wrap up this chapter, let’s leave the network and take a step out into
the yard or a nearby park. Have you ever wondered which star, planet,
constellation, or moon you’re looking at in the night sky? Ever need to
know exactly when an eclipse is going to peak at a particular location?
If so, you’re in luck because your computer and phone can easily have
12
all this information on it. Stellarium is an open-source planetarium
for your computer, available on all platforms, and Androids and iPhones
have apps with some related features.
OS Installation method
12
[Link]
After you have Stellarium installed, open it and you’ll see its best esti-
mate of your current sky in your current location. If you push the mouse
to the left edge, some widgets will appear. The first one lets you adjust
your location, and the second lets you adjust the time. Change these to
see how the sky changes. If it’s not night, try spinning the clock until it is
night. When you push the mouse to the bottom of the screen, you’ll see
various toggles to turn on and off constellation labels and other points
of interest. Now just click and drag in the screen to turn your view, and
scroll with the mouse wheel to zoom in and out. If you click an object
like the Moon, you’ll see all sorts of interesting information about it.
This is a wonderful program for people of all ages.
That’s all we’ll cover for the home. I hope you are already enjoying some
of your newfound superpowers!
45
, Release 2.0
Concentrating in offices
Offices are loud. Open floor plans are making them even louder. Many
victims of such an environment have already discovered how impor-
tant noise-canceling headphones are (they’re worth it and can even
drown out baby cries on airplanes). I still struggle sometimes because
it’s often difficult for me to concentrate when music is playing. I dis-
covered a simple solution in the form of a wonderful web page called
MyNoise.net2 . They feature free, high-quality noise generators with dif-
ferent ambiances (like Café Restaurant, Rain, Temple Bells, etc.). I can
concentrate fully again; they’re really a lifesaver. Best of all, they re-
cently released an app that can do offline playback which is a godsend
on airplanes.
You can also make custom white noise in Audacity, discussed below. If
you’re on Linux, you also have a nice noise-generator available on the
command line. You can pipe the random number generator into your
speakers at various frequencies (e.g. 10 kHz) like this:
2
[Link]
Note Taking
OS Installation method
Logseq starts with a daily journal of bullet points. You can write how
your day is going. You can put [[ and ]] characters around certain key
phrases (for recurring meetings, big projects, specific people, specific
things) when you mention them, and logseq will set up bidirectional
links to them. So for instance if you mention [[Tom]] a bunch of times,
you can Shift-Click on it as a link and a side window will open up
and show all the times you ever mentioned Tom. It’s exhilarating and
extremely useful. It’s the only note taking system I’ve used daily for
over a year.
3
[Link]
4
[Link]
5
[Link]
. Note Taking 47
, Release 2.0
Screenshots
Many digital superpowers we’ll soon see involve manipulating files con-
taining only text. There’s minimalism and elegance in pure text files that
puts them at the forefront of power. Text files are the universal medium
upon which many digital power-tools operate. Text files are what web
pages and new programs are written in (as you’ll see in Programming).
Some poets and writers prefer writing in pure text to minimize distrac-
tions.
“Surprisingly”6 , many computers don’t come with overly useful pro-
grams for viewing and manipulating text files. We’re all used to word
processors but those add special whitespace characters and formatting
controls in proprietary (or at least widely varied) formats that we want
to avoid when dealing with text and data. Many computers come with
default text editors (like Notepad) that are bad at dealing with text files
properly.
Fortunately, this is easy to reconcile. In Windows, an excellent option
6
Not too surprisingly; many software companies have a profit motive to push you
into their more expensive software tools.
called Notepad++7 can hop into your digital toolbox with a flourish via
your package manager (see Programs and package managers) using:
On Linux, the often-included editors (like gedit) are likely sufficient for
what we’ll be doing here.
Tip: For those of you who work in text a lot, whether it be for writing
books, programming, making web pages, etc., you may be interested
in the next-level text editors like vim. It’s available on all platforms
and has a significant learning curve. Most people’s first experience is
rebooting their computer because they can’t quit it (hint: use :q). But it
is extraordinarily useful if you dedicate yourself to it. It took me years,
but I got to a point where I couldn’t live without it. It’s basically an
advanced magic wand. The best resource to get started is a book called
Practical Vim by Drew Neil9 .
We should mention file extensions too. The extension is just the filename
suffix; the stuff after the dot, like txt in [Link]. By convention, it
determines the type of a file, and therefore which program your com-
puter will pass it to when you click on it. Windows and macOS hide these
extensions by default, but you can turn it them back on if you want:
7
[Link]
8
[Link]
9
[Link]
OS Operations
In text editors, when you are creating a new file and you press Save As,
the save dialog will let you specify both a file name and a file type. If the
file type section is set to something like Text files (*.txt) and you
type [Link] there is a reasonable chance it will actually get written
as [Link]. So if you want to specify a different extension (e.g.
for making a .py file when making a Python program), then first choose
All files (*.*) from the file type dialog and then type your desired
extension in the file name area.
Column editing
This superpower really blew my mind when I first experienced it. Did
you know you can edit an entire column of a text file at the same time?
Well, you can, and it’s called Column Edit or Block Editing. This can
really be a time-saver in certain scenarios. For example, the screenshot
below was made by entering Column Select mode and then just typing
testing 123 OK HERE GO a single time:
I could just as easily go in there and delete all the OKs in another easy
swoop. This is remarkably useful for rapidly manipulating columnar
data.
Column editing isn’t available in every text editor, but here are a few
that can do it:
. Column editing 51
, Release 2.0
OS Installation method
To try it out, let’s add a cover page to a PDF. If you have a cover page
called [Link] and another called [Link] and you’d like to put
the cover page on the document, pdftk can do it with its cat command
(short for concatenate, which means slap together in a certain order):
Many more commands and operations are available, and you can read
all about them in the pdftk manual11 .
Note: You’ll see a whole world of PDF creation from scratch in Pub-
lishing
10
[Link]
11
[Link]
OS Installation method
The [Link] file generated will have a OCR layer and be in the PDF/A
format. I use this all the time.
(509) 123-4567
But your boss is trying to be more international and has asked you to
convert them all to the format:
+15091234567
You could go through one by one and do them, but that’d be tedious, inef-
ficient, and frustrating. Worse, what if you had ten thousand to modify?
You can’t use regular-old find and replace for this because each phone
number is slightly different. This is exactly the kind of thing regular
expression are made to handle!
REs have special symbols to match different classes of characters. For
instance, \d represents any single number. So the following regular
expression matches all phone numbers in the format above:
\(\d\d\d\) \d\d\d-\d\d\d\d
\(\d+) \d+-\d+,
which will still match the phone numbers, and would also match pat-
terns that have 20-digit long area codes (if that were a thing for some
reason). See? They look scary but aren’t that bad!
Here are some RE identifiers and their interpretations:
Character Interpretation
\((\d+)\) (\d+)-(\d+)
+1\1\2\3
OS Installation method
The syntax we need to have perl swap one pattern for another is weird
looking, but straightforward. It starts with the program name (perl)
then some options -pe which tell it to run an in-line program and print
the output, then the s/ command (for substitute), then the MATCH PAT-
TERN, then a / separator, then the REPLACEMENT PATTERN, then a / to
close out the replacement pattern, then a g for global (meaning change
all occurrences on a line, not just the first), and then finally the file-
name to operate upon. So it’s going to substitute the match with the
replacement on each line and print the results. Explicitly:
(509) 123-4567
(123) 555-4567
(continues on next page)
15
Arguably, sed is the simplest program to do line-by-line RE find/replace. However,
it uses a more basic (and in my opinion uglier) RE format instead of the Perl-style REs.
Now run this command in your command line (filling in MATCH PATTERN
and REPLACEMENT PATTERN from above):
+15091234567
+11235554567
+10005091234
+15555510000
Wow! To further illustrate, let’s leave the match pattern the same and
make a more complex replacement pattern, changing the order of the
groups and everything:
This gives:
Tip: If you want to create a new file with that output, redirect it to a
file by adding the following to the end of the command:
> [Link]
This is a fairly universal way to save command line output as a file rather
than printing it on the screen.
Or even better, if you want to find and replace inside the file itself, use
the in-place option of perl with perl -i -pe followed by the rest of the
replacement command.
Let’s do one more example with something other than just numbers.
Imagine your input looks as follows:
Further imagine that we want to get rid of the Dr., add Mc to their last
name, and add M.D., Ph.D. at the end. The grouped match pattern
would be:
Encrypted communications
We talked about how to keep the bits on your hard drive safe in File
Encryption and how to browse the web with encryption in The Onion
Router and the dark web, so now let’s talk about how to securely commu-
nicate directly with our friends and business associates over networks.
For text messaging and encrypted voice calling over the internet, there’s
really no good reason to not use Open Whisper System’s Signal17 app
on your phone and computer. This is an open-source, user-friendly app
(with a Desktop version) that does it all without any complications. The
encrypted voice sound quality is far superior to normal, and the messag-
ing is very straightforward. If that doesn’t convince you, it was made
by a dreadlocked anarchist hacker sailor named Moxie Marlinspike and
is funded through privacy-oriented donations to its foundation. There is
no profit motive to this organization to snoop on you or build a profile of
you. Also, Edward Snowden uses it. Go to [Link]
to get it on any phone or computer. I like having it on my computer for
longer text conversations because I can type faster there.
17
[Link]
. Encrypted communications 61
, Release 2.0
OS Installation method
gpg --gen-key
You will encounter a series of prompts that you should fill in with your
name and e-mail address. When it prompts you with Change (N)ame,
(E)mail, or (O)kay/(Q)uit?, choose O if all looks good and press
Enter. Now it will ask for a password that you’ll need to type every
time you access your Private key. If all goes well, there will be a short
delay while it generates good random numbers, and you should see text
along these lines:
Encrypting a file
Make or choose a file to try encrypting. I’ll make a little text file called
[Link]:
To encrypt it, run the encryption command with the armor option (to put
it in a nice format) and the recipient option (-r), filling in your e-mail
address followed by the file name we wish to encrypt:
Note: As is typical on the command line, you can type gpg --help to
see a list of available commands and short descriptions.
In the same folder, you’ll now see a file called [Link] which
will look something like this:
. Encrypted communications 63
, Release 2.0
Figure2: A very strongly encrypted message that really beats the heck
out of Pig Latin.
You can decrypt any file encrypted against your public key with your
private key. If in the previous step you entered your own e-mail as the
recipient then you can try this out:
gpg --decrypt [Link]
It will prompt you for the password you made while generating your key
pair. If you enter it correctly, you will see something like:
gpg: encrypted with 3072-bit RSA key, ID 477C7591734F478E,␣
,→created 2018-12-26
It’s working! If you want to make a decrypted file rather than just print-
ing to the screen (useful for any non-text file like a zip or pdf), just add
the -o output_name option right after the --decrypt flag.
For this to be useful we have to make sure our friends know our public
keys so they can encrypt stuff to us, and vice-versa. To write your public
key to a file, run (with your e-mail, not mine):
Easy! Once you have your public key, spread it widely. You can even put
it on your Facebook profile in the Contact Information section.
Exercise
Convince a friend also generate a key pair and have them send you their
public key (e-mail is reasonable to start). Import their key and encrypt
a message to them. See if they can receive it. Have them send you one
back.
Warning: You have to make sure your friend’s public key is the one
you got. Check the fingerprint that’s printed out upon import and
verify it over another channel (like Signal!) or in person. Once you
trust that the public key you got is indeed from your friend, the rest
. Encrypted communications 65
, Release 2.0
of the system should be rock solid. Don’t forget to keep your private
key private too.
You will have to type your password to unlock your private key. If
you have more than one private key, you can choose one with the
-u encryption-demo@[Link] command (with your
e-mail address, of course). Now you’ll find a file called declaration.
[Link] alongside the original file. This is the signature! Send it along
with the file to your contacts or associates, or post it online. Given the
file, the signature, and your public key, anyone (including yourself) can
verify the signature on the receiving end. Here’s how:
Exercise
Try modifying the [Link] after signing it and see what the veri-
fication step does.
Admittedly, not everything is best in the command line. There are ways
to integrate this into e-mail. For instance, the e-mail client, Thunder-
bird20 , works great with any kind of e-mail account and has built-in sup-
port of GPG encryption. Since most people are using web-based mail,
it’s also worth highlighting FlowCrypt21 , which is a Chrome extension
that puts these features on top of a Gmail account. Some people elec-
tronically sign all their outgoing e-mail for good measure automatically
with these tools.
For drag-and-drop file encryption/decryption that you can then e-mail
around without any special extension, Windows users can look at the
20
[Link]
21
[Link]
. Encrypted communications 67
, Release 2.0
GUIs that come with Gpg4win, and other OS users will find similar tools
for their system with brief web searches.
Note: Estonia actually went all-in on this kind of thing and put cryp-
tographic key pairs on their national IDs. They had a hiccup in that the
system used to generate the keys was weak and then it was hard to re-
place them, but I think they’re absolutely on the right track. This kind of
thing can make our lives more efficient and secure in many ways. Our
social security numbers are significantly weaker than those Estonian
keys. If people learn about these capabilities and realize that they can
use them right away on their computers, I hope we can improve process
efficiencies and security. Data is important and it’s important for us to
become more comfortable with encryption.
Making flowcharts
Start
Point and
click?
No Yes
graphviz dia
Profit
. Making flowcharts 69
, Release 2.0
OS Installation method
(Hey! There’s that output redirection that we saw earlier. Don’t forget
it or else you’ll see what a text representation of a binary png image file
looks like.)
The downside is that it’s hard to get the flowchart looking just how you
want it. That’s where dia comes in, allowing you to just draw out your
own in detail. If you do want to use declarative text to create flowcharts
with precise layouts, the more advanced library that can do this is called
Tikz25 .
25
[Link]
OS Installation method
Unit conversion
Perhaps my favorite utility here is units, which converts units from one
system to another. It can be run interactively or with one-offs. Let’s
show it interactively first. Type units and press Enter. Type 10 cups
at the prompt and press Enter. Then type tablespoons and press Enter
again. Behold! It tells you that there are 160 tablespoons in 10 cups:
That’s not even getting started. Press Control-C to quit. Now let’s try
it in one-liner mode. You just say units "what you have" what you
This thing has over 3000 units in it. Here are some more to try:
• units "2 dozen feet" meters gives 7.3152
• units "2 bakersdozen feet" meters gives 7.9248
• units "2 dozen bakersdozen feet" meters gives 95.0976
• units "1.7 meters" "feet;in" gives 5 feet + 6.9291339 in
(Woah! It split those out!)
• units "tempC(32)" tempF gives 89.626
• units "1 googol femtobarns" "teraparsecs^2" gives, astound-
ingly, 1.050265 (that’s an obscure nuclear unit of area converted
to square astronomical units of distance made famous by the Mil-
lennium Falcon’s Kessel Run)
Read more about it at [Link]
The grep utility gets a regular expression and then prints it. This is end-
lessly useful when dealing with large datasets, especially when chained
together with other utilities. For the next few examples let’s assume
we’re maintaining a website for our company and it involves a deeply
nested folder structure with thousands upon thousands of text files in
it (HTML, CSS, etc.). At the bottom of each page is a footer that says
something like Copyright © 2025 My Company, LLC. Say we want to
just find and print all of those for any year. We can use grep with the
-R(ecursive) and -P(erl mode) options to do this:
The last command printed out every line. But what if we only want to
grab the year out of that because we’re going to put it in a spreadsheet
and do something with it. The awk tool can be chained to grep to process
each line that grep prints. There’s a whole world of awk commands, but
one to know is the print command, which can print the first, second,
third, or nth column in an output stream. In the example above, the year
is the third column (space-delimited) so we would use this (| can be
typed with Shift - \):
Giving:
2025
2025
2024
2023
Tip: Throw a | clip on the end of that last command and the re-
sults will be in your system clipboard. Now you can paste into another
program, like a spreadsheet.
Multi-file find/replace
You’ve seen how we can find matches in multiple files and even down-
select things in the lines we want to see. Earlier, you saw how to do RE
find/replace with perl. For the grand slam, we need to find and replace
in all those files. In our example, we will update all © years to 2026.
Here’s the command if all the files were in one directory:
Try it out and you’ll see all html files in a folder (put some there if you
need to build this example up). That command is looking in the current
folder (called .) for any files matching the regular expression listed,
which, as you learned above, is anything ending in .html.
As you can see, all files found have been passed as one long chain of
arguments to the echo command. Now we can substitute our perl com-
mand in and let the magic happen:
You will often want to crop an image, rotate it, add some text, touch
it up slightly, or make significant modifications. Adobe Photoshop has
held the crown for professionals in this regard for many years. One
high-quality and open-source program that also excels in doing these
things is GIMP1 . We will go through a few basic examples of how to use
it here.
1
[Link]
77
, Release 2.0
OS Installation method
Once you open an image in GIMP, you will find many options, including
these useful and basic ones:
• Image → Scale Image → Change image size by pixels or percentage
• Image → Transform → Rotate → Rotate or flip image
The toolbar on the left has lots of tools for cropping and selecting while
the tools on the right deal with layers.
Figure1: The photo on the left is the original, and the one on the right
has been clone stamped.
Is it magic? Nope! It just allows you to clone parts of the image onto
another location. So it didn’t see under the digits; that’s impossible.
Instead, the space between digits was carefully cloned over the digits.
Less obviously (and more usefully), the smudge over the CASIO logo
has been removed, and some scratches were removed on the band just
below the face. Here’s how to do it in GIMP.
• Load up your first image and choose the clone stamp tool (hover
your mouse over all the tools in the toolbar until you find it; it kind
of looks like a stamp). Your cursor will now be a dotted circle.
Adjust the size by changing the Size slider in the left-hand toolbar.
• Find the area you want to clone from and put the mouse over it.
Press and hold the Ctrl key (it may be Command in macOS) and
click once with the left mouse button to mark the clone-from area.
In my example above, this was the empty space between digits.
• Zoom in as much as you need (try Ctrl with Mouse Wheel)
• Now move the mouse to where you want to clone to. Click with
the left mouse button and paint over it carefully. You will see an
indicator in the clone-from area moving in sync with your cursor.
If/when you mess up, press Control-Z to undo.
• Adjust the clone-from area a few times to make it look extra realis-
tic (by repeating the second step).
Exercise
Try the clone stamp tool out on one of your photos. See if you can add or
remove someone from a family portrait, or do something else fun. Note
that you can load two photos at once and clone from one to the other.
Editing images from the command line may sound odd, but its utility
comes up surprisingly often. You can modify images dynamically as part
of a bigger system (like an interactive website that applies filters to im-
ages that people upload, for instance, hint hint), do something complex
without a bunch of clicks, and apply the same modification to a whole
set of images.
For example, if you set your camera out all night with an intervalome-
ter and star-tracking camera mount to capture a new astrophotography
time-lapse (or any other kind of time-lapse), you may want to crop them
all the same, add some text, put a border around them, etc. Or maybe
you have a bunch of still images from a simulation and you want to make
them into a movie but need to shrink them all down first. A delightfully
powerful suite of tools called ImageMagick2 can do all sorts of things
like this.
OS Installation method
You can convert them to pdf or bmp or many other things. If you have a
bunch of files, use mogrify instead of convert:
What if you want to make a bunch of thumbnails for all the JPGs in a
folder, while rotating them 45° and making them black-and-white? We
got you:
mkdir thumbnail
mogrify -path thumbnail -thumbnail 100x100 -rotate 45 -
,→colorspace Gray *.jpg
You can add the -tile 4x1 option for a row montage and boost the
margins a bit:
Exercise
Try it yourself with some images of your own but stack them vertically
like a photo booth.
Sure you could do that kind of thing by clicking and dragging and per-
fecting this and that, but that’d take a really long time. This command
line option is nearly instantaneous and can be repeated trivially on dif-
ferent images.
This utility is also excellent for adding Copyright © messages to images
in bulk.
See hundreds of more examples at the Usage manual3 . Another must-
see resource on this topic is Fred’s ImageMagick Scripts4 , which has
hundreds of examples of kind of crazy and amazing things you can do
with this tool. It’s not the prettiest presentation, nor the most discov-
erable, but if you click through some of those you’ll get a real taste of
what this can do. The wheels of creation in your head are going to al-
most red-line.
3
[Link]
4
[Link]
Computer graphics
Making graphics from scratch on a computer for fun and profit is an-
other computer superpower. You can design your own logo, make signs
for your neighbors, make diagrams for your research or web page, make
your own comic strip, draw, trace, animate, and so on. It’s a whole won-
derful world. This is another one of those areas where full 4-year+ col-
lege programs exist to teach people how to do it well. But that doesn’t
mean you can’t get started right away. I’ve used these tools in many
technical publications as well as for public communications.
Vector graphics
Note: Different bitmap formats have pros and cons too. JPG uses lossy
compression and can give small file sizes, but you have to be careful as
the quality can degrade significantly. PNG uses lossless compression, so
quality remains high, but file sizes can be larger.
OS Installation method
Here is a vector graphic made in Inkscape using the Rectangle tool, the
Pen tool, and the Circle tool:
• After opening Inkscape, hover the mouse over the icons along the
left panel until the tooltip tells you that you’ve reached the Draw
Bézier curves and straight lines tool. Click it.
• On the canvas, click once somewhere in the middle to start (we’re
drawing a sail/triangle)
• While holding Control but no mouse buttons, move the mouse to
the right a bit and click again. Holding the key constrains you to a
perfectly horizontal line.
. Computer graphics 85
, Release 2.0
• Now move up and to the left until you’re over the first point. Click
once again. If you hold Control here it will constrain you to one of
a few particular angles.
• Now go back to the starting point of this curve. It will turn into
a red square (indicating that clicking will close and terminate the
path). This time, click and hold the mouse button. While holding
it, drag down and slightly to the right. This will make the previous
line a bit curved, like a sail. Let go when you’re happy with it.
It should look like this:
Figure5: My sail
• Repeat the sail process but draw a boat structure under it (be cre-
ative)
• Click the sail (you have to hit one of the lines because the inside is
currently empty). Now click one of the colors from the bottom (it
scrolls) to color it how you like.
• Do the same with the boat.
• Click the Text tool on the left (big letter A) and draw a text box with
it under the sailboat. Write “SAIL LIFE” or something else in it.
• Click the circle tool and click/drag to make a circle around the boat.
Hold Control to constrain it to a perfect circle.
• If it’s solid, click the X in the far left of the color bar to make it
clear/empty.
• Find the Fill and Stroke dialog (on the right-hand side). It has
three tabs in it: Fill, Stroke paint, and Stroke style. In the
Stroke style tab, increase the Width. You’ll see the circle getting
larger.
• Choose a stroke color from the Stroke paint section to color it,
(or Shift-Click a color in the color selector at the bottom of the
screen).
• Save it as an SVG (native vector format).
• Export it as a png by going to the Export PNG Image option (on
the right), choosing a file name in the Export As field and then
pressing Export.
. Computer graphics 87
, Release 2.0
This just barely scratches the surface of this tool and others like it, so
explore around and, as usual, check out more serious tutorials for the
real magic if this strikes your interest. I suggest looking into the bitmap
tracing capability for your next superpower (it converts bitmap graphics
into vector graphics).
Another serious open-source graphics tool out there is Krita6 , known
mostly for concept art, illustrations, and comics. A lot of people use
digital pen hardware with this program like a Wacom tablet.
For current or aspiring cartoonists, a truly professional tool used by Stu-
dio Ghibli and others called OpenToonz7 was made open-source in 2016.
It has been used in the production of Futurama, Anastasia, and Balto. An
older version is currently available in chocolatey for Windows. There
is a snap for Ubuntu Linux. Mac users can get it directly from the link
above.
Color lifehack
One neat way to get a bunch of colors that look borderline good to-
gether is to choose them in the Hue-Saturation-Lightness (HSL) space
instead of the more typical Red-Green-Blue (RGB) space. Pick one color
anywhere in HSL and then choose all others by adjusting the Hue only
(keeping saturation and lightness constant). These always end up look-
ing like they belong together. All graphics programs allow you to choose
colors in HSL these days. Of course, color wheels can also help you fig-
ure out complementary colors.
Here’s what a few boxes made with this trick in Inkscape look like:
Figure7: Some nice colors that go together with the same S and L val-
ues. (Sorry B&W readers, this also looks better when viewed in color)
6
[Link]
7
[Link]
8
Blender is a 3-D modeling program. It is considered one of the best
open-source programs ever made. With it, you can create objects for
3-D printing, animated characters for games, and even entire animated
scenes with physics modeling such as a swinging ball-and-chain smash-
ing into a pile of little boxes that go flying all over the place. You can
get it the usual way:
OS Installation method
. Computer graphics 89
, Release 2.0
10
Ray tracing actually transports virtual photons backwards from the camera to
the light source. This ensures that the computer only spends time on light that will
actually be seen rather than wasting computer cycles on light that goes way off into
the distance.
While Blender can be used to design physical objects, it’s more special-
ized for making visual scenes intended to be viewed on a screen. The
field of Computer-aided Design (CAD) covers programs that are special-
ized for making real objects like machine parts, structures, skyscrapers,
sculptures, and so on. Many mechanical and structural engineers live
and breathe by a commercial tool called SolidWorks11 . It is extremely
expensive, but when you’re making a $30M part, it’s worth it. This class
of tool includes sophisticated physics and material modeling so that as
you adjust the shape and composition of your object you can also subject
it to various conditions (like wind, temperature gradients, earthquakes)
and make sure it survives or otherwise performs as required. You can
also make sure the part is fabricable with the process you plan to build
it with. Welcome to mechanical and civil/structural engineering.
For around the home, studio, and small shop, you can get started learn-
ing concepts of CAD and designing real things with an open-source
parametric CAD system called FreeCAD12 . It’s not as sophisticated as
the commercial tools, but it can still do an incredible amount. Many
CAD experts have given it mediocre-to-poor reviews over the years but
a growing excitement surrounds its recent releases and potential. Try
it out right now via your package manager:
OS Installation method
As with most valuable and powerful skills, CAD is non-trivial to pick up,
requiring dedication to achieve expertise.
Notably, a Building Information Modeling (BIM) Workbench plug-in13 to
11
[Link]
12
[Link]
13
[Link]
. Computer graphics 91
, Release 2.0
14
[Link]
15
[Link]
In the olden days, photography (”writing with light”) had two artistic
phases: going out into the field and making beautiful compositions on
film and then deciding how to expose and crop them to a print in the
darkroom. Digital photography has been revolutionary, largely elimi-
nating the darkroom step for most of us.
It’s worth noting, however, that we do have digital darkrooms now in
each of our computers, and the opportunities for artistic expression
within are staggering. While anyone can take beautiful snapshots with
their phone, those who are interested can go deeper and unlock the
really fun and rewarding world of digital darkrooming.
When you take a digital picture, light comes through a lens and excites
a bunch of little electric light buckets in a grid called a digital sensor.
Each light bucket records how bright either the reds, greens, or blues
are in each point on the grid (different colored filters are overlayed on
the grid in a pattern, often as a Bayer filter). The size of the grid deter-
mines the resolution of the image you get, and that is often proportional
to sharpness. Thus, more is considered better. You’ve heard these mea-
sured in megapixels (“millions of picture elements”). A 25-megapixel
image may record one 14-bit number per pixel, so the total size of the
file would be:
That’s a lot of megabytes (MB). But if you look at the size of a picture
from your phone, it’s closer to 10 MB. BUT HOW? The answer is that
the bits from the sensor get sent to a microprocessor in the camera
that compresses them mathematically to smaller sizes using the JPEG
algorithm. Conceptually, if an image has 500 zeros in a row, the RAW file
has 500 repeated numbers whereas a compressed file just has a few bits
that say: “500 zeros in a row”. The compression used is lossy, meaning
information is lost when you compress a RAW image to a JPG. Worse
still, JPEG images only have 8-bits of information per pixel instead of
the full 12- or 14-bits your camera collected. More bits means more
possible brightness values for each individual pixel.
To make a long story short, professional photographers shoot in RAW
mode to skip this compression because they will process the image in
their computer’s digital darkroom. When you work in RAW you can do
incredible things, like pull details out of underexposed shadows, change
the white balance, reconstruct overexposed highlights, denoise, and
much more. If you didn’t have the exposure settings quite right on an
incredible shot, RAW is very forgiving and will help you get the print
just right.
If you want to try out the digital darkroom, set your camera to save files
in RAW format (note that you won’t be able to store as many on one
memory card, but I’m not even worried because you can still fit a lot of
RAW files on a 128 GB card).
Here is an example. First, an image as taken right out of the camera:
And the same photo after a bit of time in the digital darkroom:
Look at all that detail that was effectively black in the first one that was
brought out!
OS Installation method
There’s this great track on Daft Punk’s Random Access Memories where
Italian electronic dance music pioneer, Giorgio, explains how he got
started making music with synthesizers. At the end of his monologue
there’s a perfect pause and then these epic synth arpeggios hit and it’s
just amazing. In Giorgio’s pioneering days, the synthesizers were all
analog circuits, but way back in the 1980s, digital synthesizers became
widespread. Today your own personal computer can churn out synth
beats and sounds like you wouldn’t believe.
In about 1992 Sound Cards were an exciting accessory you could add to
home computers. I vividly remember our family getting a Sound Blaster
Pro card and installing it in our DOS-powered CompuAdd computer. At
the time it seemed that the possibilities were endless. This hardware to
synthesize sound came with demo programs including18 :
• A talking parrot that would repeat anything you said in the micro-
phone in a high pitch.
• A talking psychiatrist program (Dr. SBAITSO) who would psycho-
analyze you in a robot voice.
• An organ you could play that would auto-accompany you as you
pressed buttons.
• A sound recording program where you could pitch-shift, reverse,
and otherwise edit things you said into the microphone.
This was really exciting, fun, and inspiring. Even though computers
making sound seems a bit mundane at first glance, it still can be awe-
some. Tools and processes have just gotten better with time. Most peo-
ple don’t look at their laptop and consider the possibilities as a sound
studio. Maybe you will from now on.
OS Installation method
Fire it up and press the big red circle Record button and just speak your
name. You should see some audio waveforms showing up. Then press
stop. (If you just flatline then you may have to hunt for your Sound
Settings and select your microphone from the input section; just use a
web search if you have trouble). You will see something similar to this:
Try playing it back (by pressing the green Play button). Now for the fun
part. Select the whole waveform by clicking/dragging over it. In the
menu, select Effect → Reverse. Play it back again and you’ll hear your
name reversed. Reverse it again to get back to normal.
Exercise
Now that you have heard your name spoken backwards, try recording
yourself mimicking how it sounds backwards. Reverse it with the com-
puter to see how you did. This is a decidedly fun party trick.
It’s fun to try other effects as well, especially the Change Pitch one,
creating laughs for days. As you dig into computer audio you’ll also
find ways to do live processing of what you say in the mic or play with
an instrument. Beyond the hilarity of live pitch-shifting, your computer
can be an entire post-recording or live effects system.
Compo- Purpose
nent
Press the little play/pause button to hear it. You can build dozens or
hundreds of measures like this and use the grid above to schedule how
they evolve with time. For instance, you can do 4 repeats of an intro-
ductory rhythm and then start activating more layers that build upon it.
Fire up Audacity to record and plug in a microphone so you can make
your first rap.
Exercise
Record your first rap using Hydrogen and Audacity.
We’ll need to use a synth to put down a melody and bass line. Soft-
ware synthesizers can be explored with a computer keyboard or even
a mouse, but musicians will find this inadequate and want an older
20
[Link]
kind of keyboard: that of a piano. MIDI keyboards are perfect for this.
They have a piano keyboard but don’t make any sound on their own;
they’re just a musical input device for your computer. They often in-
clude pressure-sensitive pads you can tap on for drums or other controls,
a bunch of sliders, and dial controls. These can all be tied to whatever
you want in the software synth. For instance, you can hook one of the
sliders to something that changes some quality of the waveform and
then control it during recording or a live show. There are specific MIDI
ports on some sound cards, but many modern MIDI keyboards just use
USB.
There are not many multi-platform open-source synthesizer sys-
tems/DAWs, but LMMS21 has emerged as a high-quality, easy-to-get-
started, and powerful system.
OS Installation method
It’s the kind of program that will have you playing the Mission Impossi-
ble theme in exciting glory within a half hour (it’s in 5/4 time, FYI). The
documentation is good, and this tutorial22 will have you rocking out. Try
it out, it will absolutely bring a smile to your face and get your creative,
expressive wheels turning into overdrive.
21
[Link]
22
[Link]
DJing a good party or show requires a lot of work to set the mood and
shift it through emotional highs and lows all while keeping a coherent,
continuous story or pace going. To produce such a show requires either
two turntables that you swap between, or a laptop. If you go the laptop
route, you will find some excellent software tools that can get you up
and MCing in no time.
We’ll highlight the cross-platform open source Mixxx23 program here.
It’s available in your package manager and is designed to help you get
started even if you’ve never DJed before.
23
[Link]
OS Installation method
This program will scan your music library and present you with the list
of songs. You can drag one to the player on the left and another to the
player on the right. There’s a left/right cross-fader control in the middle
that will let you switch volume from one side to the other gradually.
Here’s the idea:
• Load a song in the left player and drag the cross-fader all the way
to the left. Press the play button under the CUE icon. You should
hear it start playing, and the waveform on top will start moving.
• Try clicking/dragging the moving waveform back and forth jerkily
a little (trust me).
• Load up the next song in the right player and drag it to where you
want it to start from. If you want, you can rig this up with dual
soundcards so you can preview what you’ll play next in your head-
phones while still playing over the main room system (this is why
DJs always are holding up headphones to their ears and bobbing
their heads).
• Adjust the tempo if needed, or press SYNC to match the same tempo
as the currently playing song.
• Press the play button on the right to get it rolling (it’s still silent
due to the cross-fader).
• When the time is right, drag the cross-fader right until the song on
the right is the only one heard.
• Repeat this process, but this time going from right to left.
• Do not stop until either the world ends or the sun comes up.
You can do this live or use something like Audacity to record your show
in advance if you’re putting out a mash-up album or whatever.
Movies
The most universal command-line video tool is called ffmpeg24 . It’s use-
ful for recording, converting, and streaming video (and audio).
24
[Link]
. Movies 107
, Release 2.0
OS Installation method
ffmpeg can slice and dice videos. For example, if you have a long video
(input.mp4) that you only want a two-minute clip from (between 12:21
and 14:21, for example), you can use a command along the lines of:
Note: If the video doesn’t end up cutting right, then there probably
is no keyframe at the time you cut it. To get around this you have to
re-encode the video by omitting the acodec and vcodec option, which
will take some processing time.
To convert from one video format to another, you specify the video codec
(-c:v) and/or audio codec (-c:a). The commands are like:
ffmpeg can make time-lapse videos from image sequences. This is useful
in research environments (e.g. stitching together stills from a simula-
tion) or in hobby or art spaces just the same (e.g. combining a year’s
worth of security camera stills into a year-in-review project). The input
options to ffmpeg are very versatile, but also complex and frequently
changing. Thus, it’s best to use web searches to find the best command
for what you want to do. For instance, if you search something like
ffmpeg stitch photos into time-lapse you may find something like:
Video editing
When you’re going to produce a movie from video you shot around town
for whatever reason, you need graphical video editing software to ar-
range the clips how you want them, to add smooth transitions (fade,
blur, etc.), to add rolling credits at the end, and to insert a soundtrack.
There really is no universal standard multi-platform video editing soft-
25
ware. Each OS has its favorites. OpenShot is one open source option
available on all platforms that is well-worth trying out. It’s user-friendly,
and has most of the features you’ll want for video editing. It’s a bit slow,
and I got frustrated with how frequently it crashed a few years back, but
they’ve been working hard on stability since then. There’s absolutely a
strong potential.
OS Installation method
25
[Link]
. Movies 109
, Release 2.0
26
If you’re on Linux, KdenLive is also worth a look. It seems significantly
faster. Blender actually has full-featured video editing capabilities as
well, and is quite stable. The user interface may take extra work and
training to get used to, but it may actually be the most stable multi-
platform experience. Tutorial playlists like Mikeycal Meyers’27 can get
you operational fairly quickly.
Other than that, Windows Movie Maker on Windows and iMovie on Mac
are very polished and usable. The real point is to get that phone camera
out and try to make little movie productions. As much as we have video
cameras in our pockets these days, it’s a bit uncommon to see someone
put a film together. You have all you need at your fingertips already,
so making a movie could be a fun activity for some rainy day. At least
personally, I really cherish the old home videos I have from my childhood
a lot more than the photos.
Making games
In the 1990s I was hoping to learn how to make video games. I got a
book about doing it in the C programming language and it started with
putting the graphics card into VGA mode 13h and writing pixels to the
double-buffer one at a time. In other words, it was a bit inaccessible for
me at the time, and I never got very far.
With the advent of widely available game engines, things have changed
dramatically. These are software systems that make games. They come
with so many features that you can make simple games without writing
any code whatsoever. Of course, for advanced games and logic, code
will eventually be needed.
Unity3D28 is such a game engine that makes games for phones, com-
puters, and game consoles. A free beginner version lets you try it out
(though you do have to pay once your games start making over $100k
on app stores). The free version is more than sufficient to start going
26
[Link]
27
[Link]
28
[Link]
through some of the training material. The tutorials29 will walk you
through the basics and whet your appetite so you can see if you want to
keep going with it or not.
This high-level game programming is a fun way to start. That said, you’ll
still gain much in going under the hood to learn what’s really going on.
The world will always need low-level developers to keep the lights on
for the rest of us. For that, you’ll need the chapter on Programming.
From cropping photos to DJing parties, I hope you’ve enjoyed this taste
of what kind of creative things you can do on your computer. We’ll con-
tinue along these lines in the next chapter as we learn about getting the
written word out there.
29
[Link]
113
, Release 2.0
Publishing online
Aside from posting on Facebook, the easiest and fastest way to get your
words online is to sign up with a service provider who offers publishing.
Wordpress1 is a famous example of such a service that is used to make
some large fraction of the world’s web pages. Medium2 is another. Wix
is another. These are polished services that will guide you through ev-
erything you need to get your words out there. You will be able to type
your content in a nice web-based form that has all the formatting op-
tions you’re used to from a word processor. If you get a free account,
they may show advertisements to people who visit your page.
If you want the [Link] domain name, you have to pay some-
one a modest fee (typically around $10/year) to register the name. The
Domain Name System (DNS) behind this works much like a phonebook
for the internet. I have used Namecheap3 to buy my domain names
for decades and have never had a complaint. Countless others exist as
well. When you go to these services (called domain registrars), they
1
[Link]
2
[Link]
3
[Link]
will present you with a search form. You type in the name you are seek-
ing and it will tell you whether it’s available, and how much it will cost.
Many names are taken, but if you do find one that’s really catchy, they
may charge you a premium. If [Link] is not available, you may
be able to get [Link] or even [Link], among many other
top-level domains, as these suffixes are called.
Once you find a name and buy it, you configure it by pointing the name to
your server, or by telling anyone who goes to your name to forward the
lookup request to some other name server. You can generally point your
own domain name to any of the polished web services mentioned above.
On Wordpress, for example, you will point your domain’s lookup servers
to [Link] and Wordpress will make sure to forward people
on to your page. Behind the scenes, something like this will happen:
Customer goes
to [Link]
Nameserver points
Handled by host
to web server
(e.g. Wordpress)
IP address
If you want more control and flexibility, and are willing to learn more to
get it, you can always make your own web page. Do this if you either
want to make a hobby of web development, or you are interested in
going professional someday in tech. You need two things:
• An internet-accessible place to put your content (a web server)
• The ability to make web-browsable content that displays in a web
browser
Web hosting companies will allow you to put files and content manage-
ment systems on their servers for a modest fee. PC Magazine ranked
HostGator, Dreamhost, and Hostwinds highest in 2019. Once you have
your server space, you point your domain name to it. Some people even
use their home computers as servers and leave them on all the time for
this, but many internet service providers frown upon this.
Now you have to put content up. You may create the content on your
local computer and then upload it to the web server using a secure file
transfer program such as SSH or WinSCP.
<html>
<head>
<title>My neat web page</title>
</head>
<body bgcolor="green">
<h1>Welcome to my web page</h1>
<hr />
<p>I am a business consultant and you can hire me.␣
,→Please contact me at <a
You can save this to a file called bad_webpage.html and load it in your
browser (by double-clicking the file, usually). It looks like this:
Exercise
Write a similar web page in a text editor and open it up in your web
browser.
If you upload this to your web server, you will have your own web page,
written from scratch by you.
In reality, very few people do it this way anymore. It’s just too hard to
update hundreds of pages that may get broken links. Or if you want to
change the look and feel of the site, you can’t be expected to change
each page individually. There is, however, value in knowing the basics
of HTML because the syntax and features are often used in other tools.
Other Topics
This just scratches the surface of web publishing. There’s a whole world
of front-end design and development covering things like JavaScript and
Cascading Style Sheets (CSS) that allow you to tweak and polish every
aspect of what the web user sees. Entire back end systems make web
pages interactive. You’ll read more about that in Programming.
Publishing PDFs
Web pages aren’t for every kind of document. Reports, articles, and
books are often better suited for documents that come across the in-
ternet as PDFs and look great when printed. Here we’ll learn how to
efficiently build beautiful PDF documents.
This is particularly interesting to all you scientists out there. Here we’ll
learn about some systems that make it easy to get journal manuscripts
into the right format, with all the cross-references just right and all the
citations in the right format. It’s not your job to get a bibliography for-
matted correctly; that’s the computer’s job.
The systems we’ll learn about also excel at generating stunning, elegant,
and unique resumes.
Introduction to LaTeX
Note: The TeX in LaTeX is related to a Greek root that means both
art and technology. It’s pronounced roughly like “teck”. The La part is
pronounced “lah” or “lay”, you get to choose which one you prefer.
OS Installation method
Make a text file called [Link] and put something along these lines
in it:
\documentclass{article}
\begin{document}
\maketitle
\section{Writing the source file}
\label{sec:writing}
Writing the source may look odd at first, but once you start, it
,→'s not so
it easier.
One thing that's really nice about \LaTeX{} is math. Here is an␣
,→equation:
\begin{displaymath}
R = \sum_{g=0}^{G-1} N_i \phi_g \sigma_g
\end{displaymath}
\bibliography{myrefs}
\bibliographystyle{ieeetr}
\end{document}
Also, make a separate text file for the references called [Link].
This file can be built with a reference manager (like Zotero5 with the
Better BibTeX plugin6 or JabRef7 ) but for starters let’s fill it manually.
You can find citations in the proper format through Google Scholar8 .
Find the reference you want, click the little " icon, and then click the
BibTeX link at the bottom. It will present you with text that you can copy
and paste directly into [Link]. Choose your own journal citation
to use, or if you want to type one in yourself, it looks like this:
@article{brown2018endf,
title={ENDF/B-VIII. 0: The 8 th Major Release of the Nuclear␣
,→Reaction Data Library with CIELO-project Cross Sections, New␣
Now you should see [Link] in that directory, which looks like this:
. Figure3: A beautifully-rendered
Publishing PDFs document with automatic references
125
and citations.
, Release 2.0
Most major journal publishers give out LaTeX style files to authors.
These put the formatting completely in their control; you just write your
content. For example, Science Magazine offers their template here9 .
Universities also typically have these for dissertations.
Modern GUIs for editing LaTeX files are quite good. They let you lever-
age most of the ease of a word processor with the added power of LaTeX.
They’ll automatically insert section labels and offer dialogs to help you
build tables, insert figures, provide spell-checking, give integrated PDF
previews, and so on. TeXstudio10 is the most popular GUI TeX editor. It
is available in your package manager if you’d like to try it out.
OS Installation method
Another option is to use LyX11 , which actually keeps the TeX code behind
the scenes for the most part. It is the closest thing to a word processor
that uses LaTeX. I wrote my dissertation with LyX.
For web-based collaboration, ShareLaTeX12 is the cutting edge.
See also: Wikipedia’s comparison of TeX editors13 .
9
[Link]
10
[Link]
11
[Link]
12
[Link]
13
[Link]
Even though it’s very powerful, I cannot deny that writing in pure La-
TeX can be tedious. Nor is it overly versatile; it directly produces PDF
documents but not web pages or other commonly-desired formats from
a single source. The concept of lightweight markup languages (LMLs),
also known as humane markup languages, can help get the powers of
LaTeX without as much pain.
Two popular LMLs are Markdown and reStructuredText (RST). Mark-
down is particularly simple, while RST is slightly more complicated (but
also significantly more featureful). It’s becoming more common for
people to write technical documentation, reports, web pages (often for
static site generators), and even books in LMLs.
RST is usually associated with a tool called Sphinx14 which was origi-
nally created to help write documentation for the Python programming
language. It includes facilities for cross-references, indices, code snip-
pets, glossaries, and citations, plus it can output to HTML, LaTeX, ePub,
and more. As it turns out, this system is useful for more than just tech-
nical documentation and finds wide usage in other things. Indeed, this
book itself was written in RST and processed through Sphinx to ePub,
PDF, and HTML formats!
Pandoc15 is an outstanding tool that simply converts various document
formats between one and the other. It’s a good way to go from an LML to
HTML for the web, LaTeX for print or PDFs, ePub for e-books, or even
MS Word (and vice versa). You can try making a diary in Markdown
and render it to a beautiful PDF with pandoc on demand. It does an
incredible job and continues to just surprise me by working so well.
Let’s convert that LaTeX sample from above to a Word docx file.
14
[Link]
15
[Link]
OS Installation method
Then run the following in the command line (in the same folder as
[Link] from above):
pandoc -s [Link] -t docx -o [Link]
The options are -s for source, -t for to, and -o for output file name.
Open this up in Word or LibreOffice and voila! Baffling, isn’t it?
Best of all, these kinds of workflows can be revision-controlled and col-
laborated upon using git, which you’ll read about soon.
It must be stated that Microsoft Word has improved mightily through
the years in terms of section numbering, cross-referencing, and cita-
tions. It integrates with many powerful reference management tools
like EndNote and really isn’t all that bad. For the data-centric world
of the near future, where information presentation must come from di-
verse sources and come together elegantly and collaboratively, the tools
we’ve discussed here unlock many superpowers.
control, but you’re on the hook for making sure everything is good, and
for advertising/promoting the book. If nothing else, it’s fairly low-risk
if you don’t invest too much on artists, editors, advertisements, or your
book tour. The exciting point is that, with a computer in hand, you have
everything you need to self-publish your first book.
E-readers use a variety of formats, many of which are locked down with
special encryption called Digital Rights Management (DRM) that pre-
vents people from copying books left and right. Before getting con-
verted to a locked-down file, manuscripts often pass through the ePub
format, which is similar to HTML and has the benefit over the PDF for-
mat of being reflowable (so it works with different font and screen sizes).
Many authors write manuscripts for eBooks in a word processor and
use services to convert them into the ePub and/or the DRM-friendly for-
mats. For example, Kindle Direct Publishing16 offers tools that can con-
vert .docx files from MS Word into the format necessary for publishing
Kindle eBooks and printed-on-demand paperbacks. They’ve automated
much of the work, and provide great tutorials and videos to walk people
through all steps. They even have a Cover Creator tool, but I bet you
can do a great job on your own with Inkscape for your first book. If you
plan to sell a lot of copies, engaging a professional cover artist will run
between $300-$1200. Besides KDP, Lulu.com17 offers similar services
in case you’d like to shop around.
Barring those services, the LaTeX system discussed previously is per-
fectly capable of creating ready-for-print physical books, but it won’t be
very useful for getting something onto an e-reader (PDFs generally look
bad on e-readers specifically because they are not reflowable). Perhaps
surprisingly, the Sphinx system and the ReStructuredText LML are a
fairly powerful combination for self-publishing. It’s advanced enough
to let you add metadata that will generate the entire book including an
index, a table of contents, cross-references, footnotes, images, hyper-
links, and a glossary in ePub (for e-readers), PDF (for print), and HTML
(for the web). Once you have an ePub file, Amazon provides something
called KindleGen on Windows, macOS, and Linux that will convert it to
a mobi format appropriate for uploading to Amazon/KDP.
For example, to have an index point to the proper page numbers for
16
[Link]
17
[Link]
some keywords, you simply list them before the paragraph that they
appear in, like this:
.. index::
single: Horses
This concludes the chapter on publishing. You’ve learned many new and
interesting ways to get the written word out to the public. I hope the
opportunity arises for you to exercise these tools.
Even if you never program, you will benefit from knowing about version
control systems (VCS). A VCS allows you to create a rewindable timeline
of anything you’re working on. Think of it like the “Track Changes”
feature of a word processor, but more powerful and for more than just
documents.
VCSs are generally associated with programmers because they really
benefit from having a rewindable timeline of their software. This comes
in handy often, such as when a program that used to work no longer
works. Programmers look at the timeline of the source code changes,
131
, Release 2.0
rewind it, and play it back, all the while running their program to find
out where the bug was introduced.
Some people keep their résumé in a VCS. They want to see it progress,
and also “branch” it to make slightly different versions for various job
applications.
A VCS is also wonderful for collaboration. You know
how people e-mail around versions of documents like
Proposal_FINAL_final_nt_jrc2_draft.docx? A VCS can make
that kind of operation much better. Everyone can work on their own
copy of a document and then these can be merged together. One
hiccup with this approach is that VCS works best with pure text files so
if you want to go this route, consider a lightweight markup language
like ReST or Markdown (see Publishing).
Some notable VCSs include git1 , mercurial2 , subversion3 , and Perforce4 .
Git is a fairly universal favorite. It’s the eponym of the famous GitHub,
which Microsoft acquired in 2018 for several billion dollars.
Using git
Git has a slight reputation of being hard to learn. Fear not, it’s not that
bad. Git is made for the command line, but can be used graphically if
you prefer. For the most common uses, you only need to know a few
commands. Here they are:
1
[Link]
2
[Link]
3
[Link]
4
[Link]
Command Purpose
OS Command
In a new empty folder, run git init to start a new repository. Create
a new text file called [Link] in the folder using your text editor and
write a few lines in of your choosing. For example:
Uncle Dave: Married to Rose; likes putt-putt
Aunt Malia: Went to University of Michigan
Cousin Jingjing: From Hawai'i
(continues on next page)
Stage it with:
Commit it with:
Make some changes to the file. Delete a line or add a new one. View
the differences from the last commit by running:
git diff
Stage and commit the new changes (by repeating the steps above). Now
let’s say you want to go back to the initial version of the file by rewinding
it to the first commit. First, you need to find out what the commit’s
“address” is, which is a long string of letters and numbers. Run:
git log
Now look at the file and you’ll see that it’s at its original commit. Go
back to the latest commit with:
There, you’ve used most of the primary git operations now. Undoubt-
edly some of these commands will feel a bit mysterious still. There’s a
whole free book on it on the official git web page called Pro Git5 and
countless tutorials on the internet. We’ll do a similar example but on a
collaborative repository in the next section.
5
[Link]
Besides working on text files, there is also an extension called Git Large
File Storage6 (LFS) that can be used to store big binary assets efficiently
in a git repository (graphics design files, science files, etc.). Git-annex7 ,
as alluded to in Backups, can track information about large sets of files
without storing the files themselves in the git repository. This was origi-
nally built for managing metadata and synchronization of photo and mu-
sic libraries. It’s finding uses in advanced areas like big-data research
as well.
Note: Make sure the repository has recent activity or else the main-
tainer may not ever respond to your pull request.
6
[Link]
7
[Link]
8
[Link]
Operation Description
10
You can alternatively set up SSH keys to avoid typing in passwords all the time.
There are many tutorials on this available.
That’s it. As usual, this is just scratching the surface, but these are the
fundamentals. If you can do this, you are basically ready to participate
in collaborative development or publishing using git. And with that, let’s
get to the actual programming.
Why program?
Programming languages
Note: You can skip this step if you already have Python installed. Find
out by running python -V in your command line and seeing if it throws
an error.
OS Command
Run python -V to make sure it works. If you just execute python at the
command line, you’ll be presented with a Python prompt that looks like
>>>. Typing exit() will exit out when you’re done. You can type Python
commands here, and they will execute one after the other. For example,
we can use it as a calculator. First just with numbers:
>>> 2+2
4
All programming languages have variables where you can store the re-
sult of some operation in a name like x or number_of_customers:
>>> x=2
>>> y=5
>>> x+y
7
You can also define sequences and then repeat an operation on all ele-
ments in the sequence in a loop:
Built-in libraries provide the ability to do useful things like sample ran-
dom numbers. When you run these, you will see different numbers.
phy. That last line is basically a universal 8-ball, which is useful if you
need help deciding what’s for dinner.
Note: At this point, you’re well poised to run through the official Python
tutorial11 . It mostly targets people who have programmed a little before,
but even if you haven’t, it’s easy to follow along and get some exposure
to the syntax and possibilities.
A program to approximate π
0
0 1 2
Square Area = s2
( s )2
Circle Area = π
2
Dividing those equations gives:
Square Area 4
=
Circle Area π
or
Circle Area
π =4×
Square Area
import random
pi = 4*num_in_circle/float(num_darts)
print('Pi is approximately: {}'.format(pi))
$ python [Link]
Enter the number of darts: 100000
Pi is approximately: 3.14504
only operating in the first quadrant of the dartboard (top left). This is
OK because the dartboard is symmetrical.
What if we want to plot our results? We’ll need some third-party libraries
to do that (things that are part of the Python community but not included
in Python itself). To get them, use the Python package manager, which
is called pip. It’s very similar to the system package managers we’ve
been using, but it just pulls in Python modules. We need two things to
have plotting:
pip install --user numpy
pip install --user matplotlib
import random
RADIUS = 1.0
coords_inside = []
coords_outside = []
d = x**2 + y**2
if d < RADIUS:
# add to the list of coords inside circle
coords_inside.append((x,y))
else:
(continues on next page)
# Make plot
# unpack x's and y's into their own lists
xinside, yinside = zip(*coords_inside)
[Link](xinside, yinside, 'b.',label='Inside')
Warning: For this version, you better not try running too many
darts or else your machine really might crash.
A linear regression
Python is great for stats. This is often useful for your research teams
and around the house (I once used regressions to estimate what time the
furnace had to turn itself on to get up to the desired temperature given
the outdoor temperature each morning during the Michigan winter).
Let’s do a simple example of reading data in directly from Excel. The
pandas14 library provides high-level data analysis capabilities, but we’re
just going to use it for reading from Excel:
y = mx + b + ϵ
where:
m = 3.5
b = 2.3
ϵ = Uniform noise from -4 to 4
Note: If you have your own data you want to do a regression on, just
load that up instead!
In a new spreadsheet, label the first two columns X and Y. In the first
column, enter the formula: =RAND()*5 to get random x-values between
0 and 5. Click the little black box in the bottom right corner of the cell
and drag it down 30 or more cells to get lots of random X values. Then
in the Y column enter our line as =3.5*A1 + 2.3 + (RAND()*8-4)15 .
Double-click its little black box to fill down. Save the file as [Link].
It will look like this:
14
[Link]
15
To get our noise from -4 to 4 we do a random number between 0 and 8 and subtract
4 from it.
Figure3: Example noisy data simulating our line. Yes we could use
Python to make these data but many of us receive data in spreadsheets.
To do the regression:
from scipy import stats
import pandas
# Read data
data = pandas.read_excel('[Link]')
# Display results
print('Slope: {}'.format(slope))
print('Intercept: {}'.format(intercept))
print('R-squared: {}'.format(r_val**2))
print('P-val: {}'.format(p_val))
[Link]('[Link]')
Figure4: The random data plotted with the best linear fit.
Hey, not bad! Note that by defining the plot in code, we can afford
to spend time polishing its look to be very professional because we only
have to do that part once. We can then throw a billion different data sets
at this program and not have to spend a second plotting the results; we
already did it once, the computer’s got it from here.
Exercise
Make the noise go from -1 to 1 and see if your r2 value gets closer to
1.0!
Note: Another great tool for data processing is called R. There’s plenty
of debate about whether Python’s better than it. It’s fair to say that
Python is sufficiently good at stats for production research and has the
advantage of being very general-purpose, so if you learn it, you get stats
plus anything else it can do, whereas R is more specialized for stats only.
Figure6: Plotting and analyzing the intensity data. Looks like it’s spin-
ning at about 32 vanes per second. These devices, actually called
Crookes radiometers, were originally scientific equipment that could be
combined with a stroboscope to measure the intensity of light.
Web applications
Almost every web page you go to these days is actually a web appli-
cation, meaning it’s running some program behind the scenes and pre-
senting the results to you through a web browser like Firefox or Chrome.
Almost always, there’s a database sitting on the back end containing the
information. For instance, Facebook is conceptually a web-based view
of user data stored in a database and governed by rules and process.
The possibilities with web apps are nearly endless. Unfathomable yet-to-
be-created businesses and services will be web apps. A home inventory
could be a web app. Twitter is a web app. Reddit is a web app. The pro-
grams driving web apps are written in many varieties of programming
languages, just like offline applications. Through the years, though, var-
ious frameworks have evolved that contain commonly-needed pieces of
web applications, like user authentication, secure form submission, and
secure database access. Starting with a web framework is a great way
to become productive at making safe and performant web apps rapidly.
The hundreds of web frameworks out there all have distinct pros and
cons. We will highlight only one of them here.
Instagram and the Washington Post are among the thousands of web
apps built upon a web framework called Django19 (“The D is silent”).
Django is surprisingly nice to use. Having come from a Python back-
ground, the fact that it uses Python made it extra easy for me to pick
up. I went through their Writing your first Django app tutorial20 and was
off and running. This was really an exciting moment for me because I
could just feel my mind expanding… “So many new possibilities. I can
make any web app out there with this thing!” It’s the closest thing to
leveling-up I think I’ll ever experience.
Django is extremely well documented and has a fun, engaged commu-
nity. For example, Django Girls21 is a non-profit centered on teaching
Django to girls around the world while building interest in program-
ming.
Note: One mental model that’s often used in these kinds of applica-
tions is the “Model-Viewer-Controller” (MVC) pattern. The model is the
database organized somehow, the viewer is the web page rendered with
the data in it, and the controller is the code running to figure out what to
show when, and what you are and are not allowed to do. By separating
these units out, the code remains easy to maintain. Django is designed
around MVC.
The sheer magnitude of capabilities Django and its add-ons bring is im-
19
[Link]
20
[Link]
21
[Link]
pressive. Once you get to the point where you’re defining models, a lot
of impressive systems activate automatically. For example, let’s say you
were making a discussion forum where you had made some models that
look like this:
class Post([Link]):
title = [Link](max_length=300)
poster = [Link](User)
posted = [Link]()
votes = [Link](default=0)
class Comment([Link]):
title = [Link](max_length=300)
poster = [Link](User)
post = [Link](Post)
posted = [Link]()
votes = [Link](default=0)
Note: Sysadmin skills in running a web server are useful for setting
up production-caliber Django apps, though you can start building apps
right away using the built-in test server that comes with Django.
And there you have it, the ultimate computer superpower. The skills
you’ve started here can change the world, or simply make your life a
little better. I hope you’ll find some exciting, interesting, and helpful
uses of these technologies.
159
, Release 2.0
Since the early 2000s, the market has been flooded with circuit boards
containing a low-powered CPU, some memory, digital and analog in-
put/output ports (for interacting with the external world), and network
capabilities. These are basically mini-computers that you can program
with your normal computer and then disconnect to put in a robot, your
garden, an art installation, and so on.
One such product is the Arduino1 , an open-source microcontroller (the
hardware design is open as well as the software) that really started the
cheap-microcontroller revolution. To use, you attach various sensors,
buttons, lights, or other circuits to it and then write a small program
(called a sketch) on the computer. You transfer the program via the
USB port to the Arduino, where it gets stored on the board and be-
gins executing. These sketches are generally written in the C program-
ming language, which is lower-level than Python (C is more powerful
and faster but harder to read and write). Getting started, many users
keep it attached to the computer’s USB port as a power source and/or
to have it interact with the computer while executing. For robots and
other things away from the computer, a battery can be used for power
while the embedded program runs.
1
[Link]
Large collections of add-on boards (called shields) have been built and
are on the market that add additional features to Arduinos.
can often hear relays clicking on and off, and you may recognize the
sound from your turn signal relays in your car clicking on and off.
• PIR motion sensor — Passive Infrared motion sensors are those
white plastic motions sensors you see all over. They are cheap and
sensitive. You can build things that respond to motion with them,
like a security system or a Halloween product that yells when peo-
ple walk by.
• Sonar — Sonar uses sound reflections to measure distances. You
can mount sonar peripherals on your projects to see how far away
they are from a wall, or to increase audio pitch as something gets
closer, or whatever.
• Photoresistor — Responds to light. Can be used to build a
flashlight-tag game, respond to darkness, or turn off a light when
the sun comes up.
• Transistors — Fundamental components similar to relays but with
no moving parts and a continuum of responses, rather than just
on and off. These are the basis of digital technology behind all
of computer technology, but can also be useful for sending more
current than a microcontroller can safely provide to a bright LED
or a series of LEDs, among nearly infinite other things. You will
need some for various examples during your training.
• Patch cables — You’ll want a bunch of short multi-colored cables
to connect your hardware pieces together. These are available
with double-male, double-female, and mixed end connectors, and
all three styles come in handy.
• Power supplies — While a lot of fun, small stuff can run on USB
power, you’ll likely want more power supplies for certain projects.
For example, the LED light strips generally require 12V power (not
the 5V that comes out of a USB port) and a lot of amps. If you want
to control LED light strips you’ll need a power supply and a relay
board. These power supplies are exactly what you plug your laptop
and phone in with, but they have different voltages and amp ratings
which can be chosen based on your needs.
I’d like to share an example of what kinds of things become possible with
the superpowers we are discussing. A Sweden-based artist named Mary
Coble happened upon a project I had done using a Raspberry Pi to blink
a laser in Morse code to communicate with light. She had used Morse
code in previous projects and wanted to set a new one up. Patrons would
type protest chants into a form on their phones, and the installation
would beam them out in Morse code across the town. I agreed to help
out, and so began a rewarding and exciting foray into the world of the
art technician.
The project wasn’t simple. Mary had to do all the artistic design and
physical implementation. I provided a shopping list (including a Rasp-
berry Pi, LED lights, and relays), instructions on how to set up the Pi
and wire the lights, and remote software support. Once Mary had the
Pi on her network, I was able to remotely connect and add the software I
had written to receive messages from a web page and switch the relays
on and off accordingly.
In the end, the system had the following schematic:
It went well, and Mary did an even larger version of the system in her
SHOUT FIRE exhibit at the Röda Sten Konsthall, in Göteborg, Sweden.
Note: For remote installations of any kind, a reverse SSH tunnel can be
useful. Wherever your controller is plugged into a network, it will seek
out and connect to your server. Once it does, you can connect to the
remote device through the tunnel. If you want to change the behavior
of the art installation once it’s installed, this can be a good option for
doing so.
Working with this artist from across the Atlantic, whom I had never met
in person, in such an engaging and cool project was really just wonder-
ful. It felt like the internet really was bridging gaps in the way people
had dreamed of in the early days. What an experience!3
The Earth rotates 360° every 24 hours, making it difficult to take a long-
exposure photograph of stars with the shutter open more than a few
seconds without getting streaks. A simple solution is to put the camera
on a mount that rotates the same exact speed but in the opposite direc-
tion, canceling out the rotation and keeping the stars deadlocked with
the lens. You can buy a camera mount that does this, or you could make
one yourself using your digital superpowers. One simple mechanism is
to put two boards together with a hinge and have a motor slowly turn a
If you make the distance L equal to 29 cm, a motor that turns at 1 RPM
will give you very close to the right speed. In that case, this project is
fairly simple and no fancy software is needed. But that rate will only
work for short exposures. If you want very long exposures, the motor
has to speed up as the screw is inserted more. Mathematically, just note
that the long arm of the triangle in the figure gets longer as the screw
slides along the bottom of the upper board to see why.
If you use a stepper motor controlled by a microcontroller (like the
ESP8266), you can precisely control the speed with which the motor
turns, and you can even speed it up as time goes on to do the tangent
correction (as its called) in software!! This is extremely cool and works
very well.
Note: By the way, the Sun is a star like any other, and this project can
be adapted with larger motors to track it with a solar-panel, increasing
the efficiency of your solar installation. The software is the same!
Detailed pictures, source code, and construction steps for doing this ex-
act project are available under an open-source license at [Link]
com/partofthething/startracker
If you’d like to interface with some hardware but you don’t want or need
to bother with microcontrollers, you can just use your laptop directly for
many of these activities. You do need a bridge to the hardware world.
When I first read about Bunny Hwang’s “heirloom laptop” that he added
General Purpose Input/Output (GPIO) ports to, I was really jealous and
thought that was a great idea. That would allow you to control relays,
read signals, blink lights, read data from various sensors, and all sorts
of things people do with microcontrollers right on a laptop. It turns out
that you can get a USB device that adds GPIO ports to any computer
quite easily.
4
The Adafruit FT232H breakout is one such device. Most of the demos
you may find online about doing such things with an Arduino or Rasp-
berry Pi can also probably be done with a board like this and software
on your computer.
For example, if you have a simple digital level and you’d like to read the
data in live to support some experiment or other project, this breakout
board is perfect. An example usage would be to precisely measure and
calibrate the rate of change of the angle in a star-tracker like the one
just discussed.
Figure7: Level data with best fit line for calibrating a star-tracker. The
Python code that read these data and made this plot are included in the
star-tracking code referenced in the previous section, in the calibra-
tion folder.
using combinations of the components you read about here. What new
product can you dream up?
Warning: By self-hosting your data you may avoid the prying eyes
of companies out there, but you take on the full responsibility of pro-
tecting what you host. It’s a constantly changing world out there.
New threats come up fairly regularly. It’s often safest to leave host-
ing important data or processes to professionals. But that’s also a lot
less fun and educational.
175
, Release 2.0
The first step in self-hosting is to get or choose your server (or servers).
Perhaps the easiest way to do this is to pay a Virtual Private Server
(VPS) company money. They’ll spin up a fresh (virtual) server in one of
their data centers and give you login credentials. You can log in from
your terminal and begin immediately. Companies like DigitalOcean1 and
Linode2 will get you up and running in mere minutes starting around
$5/month. The big companies (Amazon, Google, Microsoft) offer similar
services. In this option, you’re still trusting the VPS host with your data
but you’re much more unique, and there’s at least a little security in
obscurity. This is a very good option for trying things out in any case.
You could get a server going in your own home. This would involve either
configuring an old PC or laptop you have sitting around as a server,
buying something like a Dell PowerEdge entry-level server, or cobbling
one of your own together by choosing components and installing them
in a case. This option is not ideal for hosting things like web pages
and e-mail (your home IP address changes frequently, and many ISPs
don’t allow hosting), but it can be really nice for personal things like file
storage, home automation, ad-blocking, or a VPN.
1
[Link]
2
[Link]
You could also buy a rack-mount server and pay a data center to let you
put it in there. That will give you reliable power, cooling, and networking
but will be pretty expensive.
Most hard-core of all is to build your own rack and get a business inter-
net connection from your ISP that does explicitly allow hosting. Do this
if you want to start your own data center or something.
Once you have a server up and running, you have to choose which ser-
vices and programs to run on it and then install/configure them.
Home Assistant uses text files in the YAML format for configuration. The
best way to get the hang of it is to look through a lot of the example
configurations people have posted online. Then, try to make your own
automation. The best part about the community is that you can ask, and
they’ll really help guide you through. There’s even a chat room for help.
Here’s one that plays a little beep every time someone opens a door:
shell_command:
door_chime: play -v 0.6 /pool/Systems/AptPi/Videos/beep.mp3
automation:
- alias: Doorbell
trigger:
- platform: state
entity_id: binary_sensor.sliding_door
from: 'off'
to: 'on'
- platform: state
entity_id: binary_sensor.front_door
from: 'off'
to: 'on'
- platform: state
entity_id: binary_sensor.garage_door
from: 'off'
to: 'on'
- platform: state
entity_id: binary_sensor.porch_door
from: 'off'
to: 'on'
action:
service: shell_command.door_chime
These structured-text input files are yet another example of the utility
of pure text files.
You may have a workplace that lets you connect to their VPN to get
onto the corporate network and access your files. If you’re feeling up
to it, you can actually set up a personal VPN server for yourself in your
home using an open source VPN system called OpenVPN7 . You can get
all the benefits from Using a VPN Service for free while also accessing
7
[Link]
your home network from wherever you are, and quite securely! Who
can you trust to not snoop on you better than yourself8 ? People who
are into security cameras, home automation, and other advanced home
networking would like this “road warrior” option. You can even install
a VPN server on some of the more powerful home Wi-Fi routers them-
selves (some even come with a VPN server capability out of the box!).
Setting up a VPN server may be cheapest if you install an after-market
firmware system on your home router. This isn’t particularly easy and
can damage your router if you do it wrong, so I can’t recommend it
unless you have a backup to fiddle with, and are willing to struggle a
little while reading forums on advanced troubleshooting. The standout
aftermarket router firmware is called OpenWrt9 . Once you install it on
a supported router, setting up the VPN server functionality requires a
few steps:
• Generating cryptographic keys for the server and all the clients
you wish to connect with (all laptops, phones, etc. you have, and
maybe your friends’ too if you want to charge them).
• Entering the server keys and settings into the router’s configura-
tion (through the router web interface)
• Adjusting the firewall on the router appropriately
• Downloading and installing OpenVPN clients on all your laptops
and phones (use the app called OpenVPN Connect)
• Copying the cryptographic client keys to each device and importing
them into the client
• Keeping track of your home’s public IP address, typically by setting
up something called Dynamic DNS
The tutorials about doing this are very long10 , commiserate with how
complex these systems are. Although that particular one is a bit longer
than it needs to be (no use of the LuCI user-interface!?). It looks like the
internet as a whole is short of a great OpenVPN server tutorial at the
moment. Of course, you can also install OpenVPN on any other server,
8
Of course your ISP can always snoop on your metadata. Unless you use the ulti-
mate in network security: The Onion Router.
9
[Link]
10
[Link]
including a VPS. That may honestly be the best bet for privacy, but you’ll
miss out on accessing your home devices.
One of the major societal advances evident when one loses a phone is
that when you get a new one and sign in, your contacts and calendar
often are still there. This is because they are “in the cloud” or as we
learned earlier “on someone’s server somewhere”. If you have your
own server, you can get the same capability without giving anyone else
your info.
The internet standards governing the exchange of contact and calendar
information are called CardDAV and CalDAV. Most calendar and contact
apps on phones or computers will be able to interact with any server
telling you of any server configuration issues you still have to work out.
Once you get a 10/10 score, you’re good to go.
That wraps up this bonus chapter. I hope this brief tour will inspire
the brave and curious among you to investigate the fascinating world of
self-hosting.
189
, Release 2.0
2-factor authentication
2FA is a means for a computer user to identify themself and au-
thenticate using both something they know (usually a password)
with something they have (often a phone or keychain with chang-
ing digits on it).
Bit
A single one or zero; the fundamental digit in the binary number
system.
Byte
Eight bits together, representing a number between 0 and 28 − 1 or
255
Bitmap
Computer graphics represented as a connected grid of pixels of
different colors that make up an image. Used often to represent
photographs on computers.
Cascading Style Sheets
A system of text files that define the look and feel of a web page
separately from the files and/or data that make up the content of
the page.
CMS
A content management system is Web-based software that assists
in building and maintaining websites in user-friendly ways.
191
, Release 2.0
Cloud
Always-available computer servers running on the internet. Often
used as an alternate place to store files or e-mails rather than on a
local hard disk drive.
Command line
The interface on many computer systems that allows the user to
enter text commands to be processed. Infamous for looking hacky
but actually being extremely expressive and useful.
Central Processing Unit
The CPU is the “brain” of a computer, it’s a microprocessor that
crunches all the numbers. Made of billions and billions of little
transistors etched onto a silicon wafer.
Dark web
Any part of the internet that isn’t readily available for browsing
by the public. Technically includes your friends’ e-mails since not
everyone is authorized to see them. Typically used in practice to
refer to the black market networks running alongside more legiti-
mate services in The Onion Router.
Database
A computer system designed to receive, store, and retrieve large
amounts of information from multiple concurrent other computer
systems.
DNS
The Domain Name System is a “phonebook” for computer networks
that maps readable names like [Link] to computer-
usable IP addresses like [Link].
EFF
Electronic Frontier Foundation1 is a nonprofit defending digital pri-
vacy, free speech, and innovation.
Encryption
The process of hiding information from prying eyes on network or
elsewhere using math. Can also validate that information was sent
unchanged from a particular individual.
GNU
1
[Link]
193
, Release 2.0
uninstall it. These pre-date app stores but are very similar in con-
cept. These allow for easy program management, often though
at least nominally more secure channels than random downloads.
Each OS has its own package managers.
Password manager
A program or service that stores various passwords for various ser-
vices in one place. It also has facilities for generating random pass-
words to avoid the problems of password-reuse.
Programming
Writing a sequence of operations for a computer to perform. The
process of creating software.
Regular expressions
A general pattern representing some combination of letters, num-
bers, punctuation, and other characters that is used for advanced
searching and replacing in text and data processing.
Router
A network component that receives packets and forwards them to a
client or other network that it knows about but perhaps the sender
does not (and vice versa).
Secure Shell (SSH)
A means for accessing the command line of a computer that’s con-
nected to you by a network that maintains strong security along the
network as commands and responses are passed back and forth.
Static site generator
A program or system that converts lightweight markdown lan-
guage code and images into a full HTML website. It’s effectively a
lightweight CMS.
Text editor
A program that views and modifies text files.
Text file
A universal file that only contains sequences of characters without
any embedded information about font, style, etc. These are very
useful and fundamental as an interface file between various steps
of data processing, publishing, programming, etc.
Top-level domain
195
, Release 2.0
2
[Link]
197
, Release 2.0
F K
KdenLive, 109
ffmpeg, 107 Key pair, 60
File extensions, 48 Keyboard shortcuts, 25
Files, 7 Kindle, 128
Find and replace, 54, 73 Krita, 85
Firefox, 35
Firewall, 31
Flowcharts, 68
L
Folders, 7 LaTeX, 120, 193
Fraud, 21 LEDs, 162
FreeCAD, 90 Lightweight markup language, 126,
Fusion 360, 90 193
Linear regression, 193
G Linux, 193
Logos, 85
Game engine, 110 Logseq, 46
GIMP, 77 LyX, 126
git, 131
GNU, 192
GNU utilities, 70
M
GnuPG, 60 Machine learning, 151
Gpg4win, 67 macOS, 194
Graphviz, 68 Making thumbnails, 80
Grep, 72 Markdown, 126
GUI, 193 Markup language, 194
Medium, 114
H Memory, 194
Mixxx, 105
Hard drive, 193
mogrify, 80
HSL, 88
Montages, 80
HTML, 117
Movies, 107
Hydrogen, 102
Music, 97, 102
[Link], 46
I
iCloud, 11
Image conversion, 80
N
Name server, 114
Image manipulation, 77
Network Attached Storage, 194
ImageMagick, 80
Network attached storage, 9
Index, 128
Noise, 194
Inkscape, 84
Noise generator, 46
Install, see Package managers
198 Index
, Release 2.0
Index 199
, Release 2.0
vim, 48
Text file, 195
Tikz, 68
Time-lapse, 80, 107
Top-level domain, 195
Top-level domain, 114
Tor, see Onion routing
Track changes, 131
Transistor, 162
U
Uninstall, see Package managers
Unit conversion, 71
Unity3D, 110
V
Vector graphics, 84, 196
Version control system, 131
Video conversion, 107
Video editing, 109
Video games, 110
Virtual machine, 32, 196
Virtualbox, 32
VPN, 36, 196
VST, 196
W
Wardriving, 29
Web application, 154
Web page, 114, 116
Web server, 116
Wi-Fi, 29
Windows, 196
Wix, 114
Wordpress, 114, 118
200 Index