How Are Ocean Waves Created
There is a disturbing lack of serious literature on this. Potential #blog-ideas to document how bad the literature on this is and publish a more scientific explanation.
The most intuitive explanation I could find is that when two fluids (like air and water) rub against each other, friction opposes the direction of the water (which is going in the relative opposite direction of the wind). This causes some water to get left behind and pile up, which forms the wave. Note: A wave consists of movement of energy, not water itself.
What this doesn’t explain - why are there peaks and troughs of water, as opposed to a constant raised wave wherever there is wind? Better phrased: if there is a constant wind for a given distance, why is the general wavelength of a wave much shorter than that distance?
Another question: Why are waves at the beach periodic? This is answered by this article: https://physics.stackexchange.com/questions/434524/ocean-wave-periodicity
#update 01-23-23 — I actually found the rigorous explanation on this wikipedia page: Wind wave - Wikipedia 202301231537. I wasn’t able to take great notes on the explanation, but this is what
Note for myself: Stackexchange is a good resource for rigorous explanations 202301160116
uid: 202301160000 tags: #knowledge
# How do transistors work, anyway?
source: https://ift.tt/PapCxL9 tags: #literature #inbox uid: 202301090055 —
In most materials, valence electrons are tightly bound to the substrate, and a considerable energy is needed to knock them out; that energy is often sufficient to set things on fire along the way. This situation is different in metals, where some electrons at their normal energy levels can freely drift from one atom to another — forming what’s known as the electron gas.
Pure semiconductors have poor electrical properties, but their conductivity improves significantly in the presence of impurities known as dopants. An n-type dopant, such as phosphorus, adds mobile electrons to the semiconductor substrate, in effect increasing the number of charge carriers available at any given time. A p-type dopant, such as boron, does the opposite — trapping other electrons and thus creating long-lived valence shell vacancies (“holes”) in the base material. Interestingly, the slack afforded by these holes means that the distribution of non-excited valence electrons can all of sudden shift with ease in response to external electric fields. You can think of this as electrons opportunistically slithering into nearby vacancies, or you can look at holes as weird disembodied “particles” that drift in the opposite direction in a sea of valence electrons. However you approach it, both n-type and p-type materials conduct much better than pure silicon.
It should be noted that doped semiconductors remain electrically neutral. Only the mobility of electrons is changing, not the ratio of electrons to protons in the crystal lattice.
How to host a cronjob in 2022
Source: https://news.ycombinator.com/item?id=34056812
- Modal, although I’m still on the waitlist
- fly.io, but I need to provide a Dockerfile and a schedule
- Github Actions, but I would need to a) create a repo for no reason, create a workflow, and keep committing to that repo
- If you are comfortable using AWS, You could us AWS Batch (free) with Spot Fargate jobs with Cloudwatch cron as the trigger . You only pay for the vcpu hours your job consumes https://aws.amazon.com/fargate/pricing/ , it’s a set it up once and forget it model.
- “I’m not sure what you mean when you say there is no easy solution… procure a small vm on Linode or your choice of provider for like $20/mo. SSH into it, set up the crontab to run your web scraping script. I could literally have that set up and running in 15 minutes flat.”
- LMAO
- https://workers.cloudflare.com/
- GCP Cloud Run with a schedule set to call the HTTP endpoint once an hour.
- Linux DigitalOcean server
- cron-job.org, but it needs me to already have an HTTP endpoint
- render.com
- https://airplane.dev <— this is the one that I’m going to try
- Raspberry PI! This would be cool to try sometime
- Retool workflows - Retool Workflows
- https://repeat.dev.
- Wow, there’s so many tools in this workspace
uid: 202301020315 tags: #inbox
# Using launchd agents to schedule scripts on macOS
source: https://ift.tt/hZg8kmo tags: #literature #software-engineering uid: 202212291518 —
Write a plist for your agent
Unlike crontab jobs, LaunchAgents are written in (quite verbose) plist XML. We define a Label according to the name of our agent and then go on describing how it should behave (which program to run, what arguments, when to run it, etc.).
Example:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>de.davidhamann.my-program</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/python3</string> <-- note how to run Python
<string>/Users/user/path/to/my-program.py</string>
</array>
<key>StartInterval</key>
<integer>30</integer>
</dict>
</plist>
Load and start the agent 🚀
LaunchAgents can be loaded, started and unloaded with launchctl. To do so, we need to supply the ID of our target user and the plist file we just created. You can get your user-id via id -u
or id -u <the-username>
, respectively.
Assuming we are in ~/Library/LaunchAgents/ we can now load our agent by executing the following command:
launchctl bootstrap gui/<your-user-id> de.davidhamann.my-program.plist
The Disconnect Between Using Readwise As A Source Of Truth And Taking Notes On The Archive
I’ve mentioned several times previously that I’d love to have a single source of truth for my highlights and online readings. (“source of truth”). So far, this has been Readwise 202212271446. Recently, I’ve come to the realization that highlights and notes are by far more useful if they’re integrated within my regular note-taking system, so I can easily link other notes to them (Zettelkasten-style 202007121547) and add my own commentary on them. However, I have a somewhat tangential goal, which admittedly I haven’t focused on too much so far — build a spaced repetition 202212271223 for my highlights so I retain the information that I’ve found online. These two goals are very difficult to manage in tandem, because any notes that I take on Readwise are not currently synced to my Zettelkasten (because I’ve chosen to use The Archive over Obsidian 202204102121), and any notes that I take on my Zettelkasten won’t be synced to Readwise. (This would be true regardless of whether I decide to use The Archive 202207051453 or Obsidian 202006031443 as my note-taking system. )
uid: 202212271522 tags: #tools-for-thought
Realizations After Christmas Night Discussion
- Japanese products are just elite
- I love really good products. (This is partly inspired by Ali Abdaal’s favorites)
- I should finish listening to the Japanese podcast
- I need to go to equinox every day once I get back from break. Classes / cardio / weights / swimming
- Physical health is very important. Healthcare is absolutely miserable in this country. Ideally you never put yourself in a position of needing healthcare.
- A lot of reflections after reading first they killed my father 202212260016:
- communism just straight up doesn’t work.
- other notes and reflections in the book.
- 202211260136 Watch Ayushmann Khurana’s movies, including dream girl
- Why doesn’t there exist a Goodreads but for movies? Is that IMDB?
- You shouldn’t have water for 1 hr before and 1 hr after eating a meal. It apparently interferes with digestion. Maybe this is why my metabolism is slow? I should at least experiment with this. #insights
uid: 202212260011 tags: #self-reflection