diff options
163 files changed, 8931 insertions, 1126 deletions
diff --git a/about/index.md b/about/index.md new file mode 100644 index 00000000..ffa92ddb --- /dev/null +++ b/about/index.md @@ -0,0 +1,30 @@ +# About + +* Name: Paul Buetow +* Father, Husband, Computer tinkerer, Yogi, Science fiction lover, cat owner +* Born in: Germany, currently living in: Sofia, Bulgaria +* Profession: Computerist - Solving problems with computers that we wouldn't have without them +* Current job: Site Reliability Engineer +* Education: Diplom-Informatiker (FH) (Diploma from a German University of Applied Sciences, before hey had international Bachelor and Masters programs) +* E-Mail: `paul@nospam.buetow.org` + +[](./paul.jpg) + +## My sites + +[My blog here at foo.zone](../) +[codeberg.org/snonux - My Codeberg page](https://codeberg.org/snonux) +[dtail.dev - DTail at Mimecast](https://dtail.dev) +[irregular.ninja - My street photography site (warn: multiple MBs, it's photos after all)](https://irregular.ninja) +[Books, Podcasts, Courses and Guides I recommend](./resources.md) +[Novels I've read](./novels.md) + +## Social Media and Communities + +[@snonux@fosstodon.org - Me at Mastodon](https://fosstodon.org/@snonux) +[My LinkedIn profile](https://www.linkedin.com/in/paul-buetow-b4857270/) +[Gophers Slack - Under my real name](https://gophers.slack.com) + +That's all for now... + +[Back to the main site](../) diff --git a/about/newsletters.txt b/about/newsletters.txt new file mode 100644 index 00000000..4bf9e1ca --- /dev/null +++ b/about/newsletters.txt @@ -0,0 +1,12 @@ +* Register Spill +* Ruby Weekly +* Golang Weekly +* Applied Go Weekly Newsletter +* byteSizeGo +* Andreas Brandhorst Newsletter (Sci-Fi author) +* The Imperfectionist +* The Valuable Dev +* VK Newsletter +* Monospace Mentor +* Changelog News +* The Pragmatic Engineer diff --git a/about/novels.md b/about/novels.md new file mode 100644 index 00000000..bd475694 --- /dev/null +++ b/about/novels.md @@ -0,0 +1,140 @@ +# Novels + +## Table of Contents + +* [⇢ Novels](#novels) +* [⇢ ⇢ Introduction](#introduction) +* [⇢ ⇢ Read](#read) +* [⇢ ⇢ ⇢ Alastair Reynolds](#alastair-reynolds) +* [⇢ ⇢ ⇢ Arthur C. Clarke](#arthur-c-clarke) +* [⇢ ⇢ ⇢ Andreas Brandhorst (german)](#andreas-brandhorst-german) +* [⇢ ⇢ ⇢ David Reimer (german)](#david-reimer-german) +* [⇢ ⇢ ⇢ Ian Banks](#ian-banks) +* [⇢ ⇢ ⇢ Dan Simmons](#dan-simmons) +* [⇢ ⇢ ⇢ Other authors](#other-authors) +* [⇢ ⇢ Currently reading](#currently-reading) +* [⇢ ⇢ ⇢ Andreas Brandhorst](#andreas-brandhorst) +* [⇢ ⇢ Unread books already in my shelf](#unread-books-already-in-my-shelf) +* [⇢ ⇢ ⇢ Alastair Reynolds](#alastair-reynolds) +* [⇢ ⇢ ⇢ Andreas Brandhorst](#andreas-brandhorst) + +## Introduction + +This site lists my favourite novels I have read. I prefer to read them in German though. You will notice that these are mostly Science Fiction novels. Where possible, this page shows both, english (english) and german (german), titles. + +Some were read as paperback, others as eBooks, and some were listened to (Audiobook). + +``` + . . ' . + ' . . ' . + + ` ' . ' + . ,'`. . + . .." _.-;' `. . + _.-"`.##%"_.--" ,' `. "#" ___,,od000 + ,'"-_ _.-.--"\ ,' `-_ '%#%',,/////00000HH + ,' |_.' )`/- __..--""`-_`-._ J L/////00000HHHHM + . + ,' _.-" / / _-"" `-._`-_/___\///0000HHHHMMM + .'_.-"" ' :_/_.-' _,`-/__V__\0000HHHHHMMMM + . _-"" . ' _,////\ | /000HHHHHMMMMM +_-" . ' + . . ,//////0\ | /00HHHHHHHMMMMM + ` ,//////000\|/00HHHHHHHMMMMMM +. ' . ' . . ' ,//////00000|00HHHHHHHHMMMMMM + . . . ' ,//////000000|00HHHHHHHMMMMMMM + . ' . . ,///////000000|0HHHHHHHHMMMMMMM + ' ' . ' ///////000000000HHHHHHHHMMMMMMM + + . . ' . ,///////000000000HHHHHHHMMMMMMMM + ' . ' . ///////000000000HHHHHHHHMMMMMMMM + ' . ' ///////000000000HHHHHHHHMMMMMMMM + . ' ,///////000000000HHHHHHHHMMMMMMMM +``` + +## Read + +### Alastair Reynolds + +* 2000 - Revelation Space (english) / Unendlichkeit (german) - Revelation Space Universe +* 2001 - Chasm City - Revelation Space Universe +* 2002 - Redemption Ark (english) / Die Arche (german) - Revelation Space Universe +* 2003 - Absolution Gap (english) / Offenbarung (german) - Revelation Space Universe + +### Arthur C. Clarke + +* 1973 - Rendezvous with Rama (english), Audiobook +* 1989 - Rama II (english), Audiobook +* 1991 - The Garden of Rama (english), Audiobook +* 1993 - Rama Revealed (english), Audiobook + +### Andreas Brandhorst (german) + +* 2004 - Diamant (german) - Diamant-Trilogie +* 2004 - Der Metamorph (german) - Diamant-Trilogie +* 2005 - Der Zeitkrieg (german) - Diamant-Trilogie +* 2006 - Feuervögel (german) - Graken-Trilogie +* 2007 - Feuerstürme (german) - Graken-Trilogie +* 2008 - Feuerträume (german) - Graken-Trilogie +* 2010 - Kinder der Ewigkeit (german) +* 2012 - Das Artefakt (german) +* 2013 - Der letzte Regent (german) +* 2014 - Das Kosmotop (german) +* 2015 - Ikarus (german) +* 2015 - Das Schiff (german) +* 2016 - Omni (german) - Omniversum +* 2017 - Das Arkonadia-Rätsel (german) - Omniversum +* 2017 - Das Erwachen (german) - Maschinenintelligenz-Trilogie +* 2018 - Ewiges Leben (german), Andreas Brandhorst +* 2019 - Das Netz der Sterne (german), Audiobook +* 2019 - Seelenfänger (german), Andreas Brandhorst, Audiobook +* 2020 - Die Eskalation (german) - Maschinenintelligenz-Trilogie +* 2021 - Mars Discovery (german) - Maschinenintelligenz-Trilogie +* 2022 - Eklipse (german) +* 2022 - Ruf der Unendlichkeit (german), Audiobook +* 2024 - Infinitia (german), Audiobook +* 2024 - Zeta (german), Andreas Brandhorst, Audiobook + +### David Reimer (german) + +* 2022 - Die Anomalie in der Finsternis - Die Wächter des Wissens - Band 1 (german), (Audiobook) +* 2022 - Der dunkle Reisende - Die Wächter des Wissens - Band 2 (german), (Audiobook) +* 2022 - Das Signal der Schöpfer - Die Wächter des Wissens - Band 3 (german), (Audiobook) +* 2022 - Das Ende des Universums - Die Wächter des Wissens - Band 4 (german), (Audiobook) + +### Ian Banks + +* 1987 - Consider Pheblas (english) / Bedenke Pheblas (german) - Culture Book 1 +* 1988 - The Player of Games (english) - Culture Book 2, Audiobook + +### Dan Simmons + +* 1989 - Hyperion, Audiobook +* 1990 - The fall of Hyperion, Audiobook + +### Other authors + +* 1949 - 1984, George Orwell, Audiobook +* 1979 - The Hitchhikers Guide to the Galaxy (english) / Per Anhalter durch die Galaxis (german), Adam Douglas - All books of the series +* 2009 - Quest, Andreas Eschbach +* 2010 - The Icarus Hunt (english) / Jagt auf Ikarus (german), Timothy Zahn +* 2010 - Der Astronaut (german), Andy Weir, Audiobook +* 2019 - Die Unvollkommenen (german), Theresa Hannig, Audiobook +* 2022 - Mickey 7 - Der letzte Klon (german), Edward Ashton, Audiobook + +## Currently reading + +### Andreas Brandhorst + +* 2023 - Oxygen: Welt ohne Sauerstoff, Audiobook (german) +* 2024 - Der Riss (german) + +## Unread books already in my shelf + +### Alastair Reynolds + +* 2004 - Träume von Unendlichkeit (german) + +### Andreas Brandhorst + +* 2021 - Die Tiefe der Zeit (german) + +Do you recommend a good Science Fiction Novel? E-Mail at paul at buetow dot org! :-) + +[Go back](./) diff --git a/about/old-podcasts.txt b/about/old-podcasts.txt new file mode 100644 index 00000000..ab5c691e --- /dev/null +++ b/about/old-podcasts.txt @@ -0,0 +1,6 @@ +* Java Pub House +* Modern Mentor +* CRE: Chaosradio Express [german] +* FLOSS weekly +* Go Time (predecessor of fallthrough) +* Ship It (predecessor of Fork Around And Find Out) diff --git a/about/paul.jpg b/about/paul.jpg Binary files differnew file mode 100644 index 00000000..8acac9b8 --- /dev/null +++ b/about/paul.jpg diff --git a/about/podcasts.txt b/about/podcasts.txt new file mode 100644 index 00000000..182d02cc --- /dev/null +++ b/about/podcasts.txt @@ -0,0 +1,12 @@ +* The Pragmatic Engineer Podcast +* Backend Banter +* The Changelog Podcast(s) +* Cup o' Go [Golang] +* Deep Questions with Cal Newport +* Dev Interrupted +* Fallthrough [Golang] +* Hidden Brain +* Maintainable +* Fork Around And Find Out +* The ProdCast (Google SRE Podcast) +* BSD Now diff --git a/about/resources.md b/about/resources.md new file mode 100644 index 00000000..c4f117c0 --- /dev/null +++ b/about/resources.md @@ -0,0 +1,231 @@ +# Resources + +This site contains a list of resources I find and found helpful. I am not an expert in all of these topics, but all the resources listed here impacted me. I read some of the books quite a long time ago, so there might be newer editions out there already, and I might need to refresh some of the knowledge. + +The list may not be exhaustive, but I will be adding more in the future. I firmly believe that educating yourself further is one of the most important things to advance. The lists are in random order and reshuffled every time (via *sort -R*) when updates are made. + +You won't find any links on this site because, over time, the links will break. Please use your favourite search engine when you are interested in one of the resources... + +``` + .--. .---. .-. + .---|--| .-. | A | .---. |~| .--. +.--|===|Go|---|_|--.__| S |--|:::| |~|-==-|==|---. +|%%|Lin|la|===| |~~|%%| C |--| |_|~|Perl| |___|-. +| |ux |ng|===| |==| | I | |k8s|=| | 7 |Ra|---|=| +| | | | |_|__| | I |__| | | | |ku|___| | +|~~|===|--|===|~|~~|%%|~~~|--|:::|=|~|----|==|---|=| +^--^---'--^---^-^--^--^---'--^---^-^-^-==-^--^---^-'hjw +``` + +## Table of Contents + +* [⇢ Resources](#resources) +* [⇢ ⇢ Technical books](#technical-books) +* [⇢ ⇢ Technical references](#technical-references) +* [⇢ ⇢ Self-development and soft-skills books](#self-development-and-soft-skills-books) +* [⇢ ⇢ Technical video lectures and courses](#technical-video-lectures-and-courses) +* [⇢ ⇢ Technical guides](#technical-guides) +* [⇢ ⇢ Podcasts](#podcasts) +* [⇢ ⇢ ⇢ Podcasts I like](#podcasts-i-like) +* [⇢ ⇢ ⇢ Podcasts I liked](#podcasts-i-liked) +* [⇢ ⇢ Newsletters I like](#newsletters-i-like) +* [⇢ Formal education](#formal-education) + +## Technical books + +In random order: + +* 100 Go Mistakes and How to Avoid Them; Teiva Harsanyi; Manning Publications +* The Docker Book; James Turnbull; Kindle +* Systemprogrammierung in Go; Frank Müller; dpunkt +* The Kubernetes Book; Nigel Poulton; Unabridged Audiobook +* Developing Games in Java; David Brackeen and others...; New Riders +* Perl New Features; Joshua McAdams, brian d foy; Perl School +* Object-Oriented Programming with ANSI-C; Axel-Tobias Schreiner +* DNS and BIND; Cricket Liu; O'Reilly +* Distributed Systems: Principles and Paradigms; Andrew S. Tanenbaum; Pearson +* Raku Recipes; J.J. Merelo; Apress +* Go Brain Teasers - Exercise Your Mind; Miki Tebeka; The Pragmatic Programmers +* Funktionale Programmierung; Peter Pepper; Springer +* Java ist auch eine Insel; Christian Ullenboom; +* The Go Programming Language; Alan A. A. Donovan; Addison-Wesley Professional +* The DevOps Handbook; Gene Kim, Jez Humble, Patrick Debois, John Willis; Audible +* Programming Perl aka "The Camel Book"; Tom Christiansen, brian d foy, Larry Wall & Jon Orwant; O'Reilly +* Systems Performance Tuning; Gian-Paolo D. Musumeci and others...; O'Reilly +* Higher Order Perl; Mark Dominus; Morgan Kaufmann +* 97 things every SRE should know; Emil Stolarsky, Jaime Woo; O'Reilly +* Site Reliability Engineering; How Google runs production systems; O'Reilly +* Effective Java; Joshua Bloch; Addison-Wesley Professional +* Leanring eBPF; Liz Rice; O'Reilly +* Learn You Some Erlang for Great Good; Fred Herbert; No Starch Press +* Raku Fundamentals; Moritz Lenz; Apress +* DevOps And Site Reliability Engineering Handbook; Stephen Fleming; Audible +* The Pragmatic Programmer; David Thomas; Addison-Wesley +* Ultimate Go Notebook; Bill Kennedy +* The KCNA (Kubernetes and Cloud Native Associate) Book; Nigel Poulton +* Clusterbau mit Linux-HA; Michael Schwartzkopff; O'Reilly +* Modern Perl; Chromatic ; Onyx Neon Press +* C++ Programming Language; Bjarne Stroustrup; +* Concurrency in Go; Katherine Cox-Buday; O'Reilly +* Terraform Cookbook; Mikael Krief; Packt Publishing +* Tmux 2: Productive Mouse-free Development; Brain P. Hogan; The Pragmatic Programmers +* Effective awk programming; Arnold Robbins; O'Reilly +* 21st Century C: C Tips from the New School; Ben Klemens; O'Reilly +* Pro Puppet; James Turnbull, Jeffrey McCune; Apress +* Think Raku (aka Think Perl 6); Laurent Rosenfeld, Allen B. Downey; O'Reilly +* The Practise of System and Network Administration; Thomas A. Limoncelli, Christina J. Hogan, Strata R. Chalup; Addison-Wesley Professional Pro Git; Scott Chacon, Ben Straub; Apress +* Hands-on Infrastructure Monitoring with Prometheus; Joel Bastos, Pedro Araujo; Packt +* Data Science at the Command Line; Jeroen Janssens; O'Reilly +* Learn You a Haskell for Great Good!; Miran Lipovaca; No Starch Press +* Kubernetes Cookbook; Sameer Naik, Sébastien Goasguen, Jonathan Michaux; O'Reilly +* Polished Ruby Programming; Jeremy Evans; Packt Publishing +* Amazon Web Services in Action; Michael Wittig and Andreas Wittig; Manning Publications + +## Technical references + +I didn't read them from the beginning to the end, but I am using them to look up things. The books are in random order: + +* BPF Performance Tools - Linux System and Application Observability, Brendan Gregg; Addison Wesley +* Understanding the Linux Kernel; Daniel P. Bovet, Marco Cesati; O'Reilly +* The Linux Programming Interface; Michael Kerrisk; No Starch Press +* Implementing Service Level Objectives; Alex Hidalgo; O'Reilly +* Relayd and Httpd Mastery; Michael W Lucas +* Groovy Kurz & Gut; Joerg Staudemeier; O'Reilly +* Algorithms; Robert Sedgewick, Kevin Wayne; Addison Wesley + +## Self-development and soft-skills books + +In random order: + +* Psycho-Cybernetics; Maxwell Maltz; Perigee Books +* The Bullet Journal Method; Ryder Carroll; Fourth Estate +* The Power of Now; Eckhard Tolle; Yellow Kite +* 101 Essays that change the way you think; Brianna Wiest; Audible +* The Off Switch; Mark Cropley; Virgin Books +* Eat That Frog!; Brian Tracy; Hodder Paperbacks +* Influence without Authority; A. Cohen, D. Bradford; Wiley +* Search Inside Yourself - The Unexpected path to Achieving Success, Happiness (and World Peace); Chade-Meng Tan, Daniel Goleman, Jon Kabat-Zinn; HarperOne +* The Joy of Missing Out; Christina Crook; New Society Publishers +* Who Moved My Cheese?; Dr. Spencer Johnson; Vermilion +* The Good Enough Job; Simone Stolzoff; Ebury Edge +* The Daily Stoic; Ryan Holiday, Stephen Hanselman; Profile Books +* Ultralearning; Scott Young; Thorsons +* Staff Engineer: Leadership beyond the management track; Will Larson; Audible +* Solve for Happy; Mo Gawdat +* Soft Skills; John Sommez; Manning Publications +* The 7 Habits Of Highly Effective People; Stephen R. Covey; Simon & Schuster UK +* Time Management for System Administrators; Thomas A. Limoncelli; O'Reilly +* Eat That Frog; Brian Tracy +* The Obstacle Is The Way; Ryan Holiday; Profile Books Ltd +* Atomic Habits; James Clear; Random House Business +* The Phoenix Project - A Novel About IT, DevOps, and Helping your Business Win; Gene Kim and Kevin Behr; Trade Select +* Never Split the Difference; Chris Voss, Tahl Raz; Random House Business +* Getting Things Done; David Allen +* The Complete Software Developer's Career Guide; John Sonmez; Unabridged Audiobook +* Digital Minimalism; Cal Newport; Portofolio Penguin +* Consciousness: A Very Short Introduction; Susan Blackmore; Oxford Uiversity Press +* Deep Work; Cal Newport; Piatkus +* Buddah and Einstein walk into a Bar; Guy Joseph Ale, Claire Bloom; Blackstone Publishing +* Stop starting, start finishing; Arne Roock; Lean-Kanban University +* Ultralearning; Anna Laurent; Self-published via Amazon +* Slow Productivity; Cal Newport; Penguin Random House +* So Good They Can't Ignore You; Cal Newport; Business Plus + +[Here are notes of mine for some of the books](../notes/index.md) + +## Technical video lectures and courses + +Some of these were in-person with exams; others were online learning lectures only. In random order: + +* Ultimate Go Programming; Bill Kennedy; O'Reilly Online +* Developing IaC with Terraform (with Live Lessons); O'Reilly Online +* Apache Tomcat Best Practises; 3-day on-site training +* F5 Loadbalancers Training; 2-day on-site training; F5, Inc. +* Structure and Interpretation of Computer Programs; Harold Abelson and more...; +* MySQL Deep Dive Workshop; 2-day on-site training +* Scripting Vim; Damian Conway; O'Reilly Online +* Algorithms Video Lectures; Robert Sedgewick; O'Reilly Online +* Cloud Operations on AWS - Learn how to configure, deploy, maintain, and troubleshoot your AWS environments; 3-day online live training with labs; Amazon +* The Well-Grounded Rubyist Video Edition; David. A. Black; O'Reilly Online +* Linux Security and Isolation APIs Training; Michael Kerrisk; 3-day on-site training +* Protocol buffers; O'Reilly Online +* Red Hat Certified System Administrator; Course + certification (Although I had the option, I decided not to take the next course as it is more effective to self learn what I need) +* Functional programming lecture; Remote University of Hagen +* The Ultimate Kubernetes Bootcamp; School of Devops; O'Reilly Online +* AWS Immersion Day; Amazon; 1-day interactive online training + +## Technical guides + +These are not whole books, but guides (smaller or larger) which I found very useful. in random order: + +* Raku Guide at https://raku.guide +* Advanced Bash-Scripting Guide +* How CPUs work at https://cpu.land + +## Podcasts + +### Podcasts I like + +In random order: + +* Hidden Brain +* BSD Now +* Fork Around And Find Out +* Backend Banter +* Dev Interrupted +* The Pragmatic Engineer Podcast +* The ProdCast (Google SRE Podcast) +* Cup o' Go [Golang] +* Deep Questions with Cal Newport +* Fallthrough [Golang] +* The Changelog Podcast(s) +* Maintainable + +### Podcasts I liked + +I liked them but am not listening to them anymore. The podcasts have either "finished" (no more episodes) or I stopped listening to them due to time constraints or a shift in my interests. + +* FLOSS weekly +* CRE: Chaosradio Express [german] +* Ship It (predecessor of Fork Around And Find Out) +* Modern Mentor +* Java Pub House +* Go Time (predecessor of fallthrough) + +## Newsletters I like + +This is a mix of tech and non-tech newsletters I am subscribed to. In random order: + +* Andreas Brandhorst Newsletter (Sci-Fi author) +* Applied Go Weekly Newsletter +* byteSizeGo +* Register Spill +* The Pragmatic Engineer +* Ruby Weekly +* Golang Weekly +* VK Newsletter +* The Valuable Dev +* Changelog News +* Monospace Mentor +* The Imperfectionist + +# Formal education + +I have met many self-taught IT professionals I highly respect. In my own opinion, a formal degree does not automatically qualify a person for a particular job. It is more about how you educate yourself further *after* formal education. The pragmatic way of thinking and getting things done do not require a college or university degree. + +However, I still believe a degree in Computer Science helps to understand all the theories involved that you would have never learned otherwise. Isn't it cool to understand how compilers work under the hood (automata theory) even if you are not required to hack the compiler in your current position? You could apply the same theory for other things too. This was just *one* example. + +* One year Student exchange program in OH, USA +* German School Majors (Abitur), focus areas: German and Mathematics +* Half-year internship as a C/C++ programmer in Sofia, Bulgaria +* Graduated from University as Diplom-Inform. (FH) at the Aachen University of Applied Sciences, Germany + +My diploma thesis, "Object-oriented development of a GUI based tool for event-based simulation of distributed systems," can be found at: + +[https://codeberg.org/snonux/vs-sim](https://codeberg.org/snonux/vs-sim) + +I was one of the last students handed out an "old fashioned" German Diploma degree before the University switched to the international Bachelor and Master versions. To give you an idea: The "Diplom-Inform. (FH)" means translated "Diploma in Informatics from a University of Applied Sciences (FH: Fachhochschule)". Going after the international student credit score, it can be seen as an equivalent to a "Master in Computer Science" degree. + +Colleges and Universities are costly in many countries. Come to Germany, the first college degree is for free (if you finish within a certain deadline!) + +[Go back](./) diff --git a/about/self-skills.txt b/about/self-skills.txt new file mode 100644 index 00000000..d82d7f02 --- /dev/null +++ b/about/self-skills.txt @@ -0,0 +1,33 @@ +* Eat That Frog; Brian Tracy +* Getting Things Done; David Allen +* Solve for Happy; Mo Gawdat +* 101 Essays that change the way you think; Brianna Wiest; Audible +* Slow Productivity; Cal Newport; Penguin Random House +* Search Inside Yourself - The Unexpected path to Achieving Success, Happiness (and World Peace); Chade-Meng Tan, Daniel Goleman, Jon Kabat-Zinn; HarperOne +* Atomic Habits; James Clear; Random House Business +* Buddah and Einstein walk into a Bar; Guy Joseph Ale, Claire Bloom; Blackstone Publishing +* Consciousness: A Very Short Introduction; Susan Blackmore; Oxford Uiversity Press +* Deep Work; Cal Newport; Piatkus +* Digital Minimalism; Cal Newport; Portofolio Penguin +* Eat That Frog!; Brian Tracy; Hodder Paperbacks +* Influence without Authority; A. Cohen, D. Bradford; Wiley +* Never Split the Difference; Chris Voss, Tahl Raz; Random House Business +* Psycho-Cybernetics; Maxwell Maltz; Perigee Books +* Soft Skills; John Sommez; Manning Publications +* So Good They Can't Ignore You; Cal Newport; Business Plus +* Staff Engineer: Leadership beyond the management track; Will Larson; Audible +* Stop starting, start finishing; Arne Roock; Lean-Kanban University +* The 7 Habits Of Highly Effective People; Stephen R. Covey; Simon & Schuster UK +* The Bullet Journal Method; Ryder Carroll; Fourth Estate +* The Complete Software Developer's Career Guide; John Sonmez; Unabridged Audiobook +* The Daily Stoic; Ryan Holiday, Stephen Hanselman; Profile Books +* The Good Enough Job; Simone Stolzoff; Ebury Edge +* The Joy of Missing Out; Christina Crook; New Society Publishers +* The Obstacle Is The Way; Ryan Holiday; Profile Books Ltd +* The Off Switch; Mark Cropley; Virgin Books +* The Phoenix Project - A Novel About IT, DevOps, and Helping your Business Win; Gene Kim and Kevin Behr; Trade Select +* The Power of Now; Eckhard Tolle; Yellow Kite +* Time Management for System Administrators; Thomas A. Limoncelli; O'Reilly +* Ultralearning; Anna Laurent; Self-published via Amazon +* Ultralearning; Scott Young; Thorsons +* Who Moved My Cheese?; Dr. Spencer Johnson; Vermilion diff --git a/about/technical-books.txt b/about/technical-books.txt new file mode 100644 index 00000000..fa7c6a8a --- /dev/null +++ b/about/technical-books.txt @@ -0,0 +1,45 @@ +* 100 Go Mistakes and How to Avoid Them; Teiva Harsanyi; Manning Publications +* The KCNA (Kubernetes and Cloud Native Associate) Book; Nigel Poulton +* Hands-on Infrastructure Monitoring with Prometheus; Joel Bastos, Pedro Araujo; Packt +* 21st Century C: C Tips from the New School; Ben Klemens; O'Reilly +* 97 things every SRE should know; Emil Stolarsky, Jaime Woo; O'Reilly +* Amazon Web Services in Action; Michael Wittig and Andreas Wittig; Manning Publications +* Clusterbau mit Linux-HA; Michael Schwartzkopff; O'Reilly +* Concurrency in Go; Katherine Cox-Buday; O'Reilly +* C++ Programming Language; Bjarne Stroustrup; +* Data Science at the Command Line; Jeroen Janssens; O'Reilly +* Developing Games in Java; David Brackeen and others...; New Riders +* DevOps And Site Reliability Engineering Handbook; Stephen Fleming; Audible +* Distributed Systems: Principles and Paradigms; Andrew S. Tanenbaum; Pearson +* DNS and BIND; Cricket Liu; O'Reilly +* Effective awk programming; Arnold Robbins; O'Reilly +* Effective Java; Joshua Bloch; Addison-Wesley Professional +* Funktionale Programmierung; Peter Pepper; Springer +* Go Brain Teasers - Exercise Your Mind; Miki Tebeka; The Pragmatic Programmers +* Higher Order Perl; Mark Dominus; Morgan Kaufmann +* Java ist auch eine Insel; Christian Ullenboom; +* Leanring eBPF; Liz Rice; O'Reilly +* Learn You a Haskell for Great Good!; Miran Lipovaca; No Starch Press +* Learn You Some Erlang for Great Good; Fred Herbert; No Starch Press +* Modern Perl; Chromatic ; Onyx Neon Press +* Object-Oriented Programming with ANSI-C; Axel-Tobias Schreiner +* Perl New Features; Joshua McAdams, brian d foy; Perl School +* Polished Ruby Programming; Jeremy Evans; Packt Publishing +* Programming Perl aka "The Camel Book"; Tom Christiansen, brian d foy, Larry Wall & Jon Orwant; O'Reilly +* Pro Puppet; James Turnbull, Jeffrey McCune; Apress +* Raku Fundamentals; Moritz Lenz; Apress +* Raku Recipes; J.J. Merelo; Apress +* Site Reliability Engineering; How Google runs production systems; O'Reilly +* Systemprogrammierung in Go; Frank Müller; dpunkt +* Systems Performance Tuning; Gian-Paolo D. Musumeci and others...; O'Reilly +* Terraform Cookbook; Mikael Krief; Packt Publishing +* The Kubernetes Book; Nigel Poulton; Unabridged Audiobook +* Kubernetes Cookbook; Sameer Naik, Sébastien Goasguen, Jonathan Michaux; O'Reilly +* The DevOps Handbook; Gene Kim, Jez Humble, Patrick Debois, John Willis; Audible +* The Docker Book; James Turnbull; Kindle +* The Go Programming Language; Alan A. A. Donovan; Addison-Wesley Professional +* The Practise of System and Network Administration; Thomas A. Limoncelli, Christina J. Hogan, Strata R. Chalup; Addison-Wesley Professional Pro Git; Scott Chacon, Ben Straub; Apress +* The Pragmatic Programmer; David Thomas; Addison-Wesley +* Think Raku (aka Think Perl 6); Laurent Rosenfeld, Allen B. Downey; O'Reilly +* Tmux 2: Productive Mouse-free Development; Brain P. Hogan; The Pragmatic Programmers +* Ultimate Go Notebook; Bill Kennedy diff --git a/about/technical-courses.txt b/about/technical-courses.txt new file mode 100644 index 00000000..ac67f997 --- /dev/null +++ b/about/technical-courses.txt @@ -0,0 +1,16 @@ +* Algorithms Video Lectures; Robert Sedgewick; O'Reilly Online +* Apache Tomcat Best Practises; 3-day on-site training +* AWS Immersion Day; Amazon; 1-day interactive online training +* Cloud Operations on AWS - Learn how to configure, deploy, maintain, and troubleshoot your AWS environments; 3-day online live training with labs; Amazon +* Developing IaC with Terraform (with Live Lessons); O'Reilly Online +* F5 Loadbalancers Training; 2-day on-site training; F5, Inc. +* Functional programming lecture; Remote University of Hagen +* Linux Security and Isolation APIs Training; Michael Kerrisk; 3-day on-site training +* MySQL Deep Dive Workshop; 2-day on-site training +* Protocol buffers; O'Reilly Online +* Red Hat Certified System Administrator; Course + certification (Although I had the option, I decided not to take the next course as it is more effective to self learn what I need) +* Scripting Vim; Damian Conway; O'Reilly Online +* Structure and Interpretation of Computer Programs; Harold Abelson and more...; +* The Ultimate Kubernetes Bootcamp; School of Devops; O'Reilly Online +* The Well-Grounded Rubyist Video Edition; David. A. Black; O'Reilly Online +* Ultimate Go Programming; Bill Kennedy; O'Reilly Online diff --git a/about/technical-guides.txt b/about/technical-guides.txt new file mode 100644 index 00000000..19ee85dd --- /dev/null +++ b/about/technical-guides.txt @@ -0,0 +1,3 @@ +* Advanced Bash-Scripting Guide +* Raku Guide at https://raku.guide +* How CPUs work at https://cpu.land diff --git a/about/technical-references.txt b/about/technical-references.txt new file mode 100644 index 00000000..20b34486 --- /dev/null +++ b/about/technical-references.txt @@ -0,0 +1,7 @@ +* Algorithms; Robert Sedgewick, Kevin Wayne; Addison Wesley +* BPF Performance Tools - Linux System and Application Observability, Brendan Gregg; Addison Wesley +* Implementing Service Level Objectives; Alex Hidalgo; O'Reilly +* Relayd and Httpd Mastery; Michael W Lucas +* The Linux Programming Interface; Michael Kerrisk; No Starch Press +* Understanding the Linux Kernel; Daniel P. Bovet, Marco Cesati; O'Reilly +* Groovy Kurz & Gut; Joerg Staudemeier; O'Reilly diff --git a/gemfeed/2008-06-26-perl-poetry.md b/gemfeed/2008-06-26-perl-poetry.md index 08f12e4c..5256e765 100644 --- a/gemfeed/2008-06-26-perl-poetry.md +++ b/gemfeed/2008-06-26-perl-poetry.md @@ -2,6 +2,12 @@ > Published at 2008-06-26T21:43:51+01:00; Updated at 2021-05-04 +Here are some Perl Poems I wrote. They don't do anything useful when you run them, but they don't produce a compiler error either. They only exist for fun and demonstrate what you can do with Perl syntax. + +Wikipedia: "Perl poetry is the practice of writing poems that can be compiled as legal Perl code, for example the piece known as Black Perl. Perl poetry is made possible by the large number of English words that are used in the Perl language. New poems are regularly submitted to the community at PerlMonks." + +[https://en.wikipedia.org/wiki/Perl](https://en.wikipedia.org/wiki/Perl) + ``` '\|/' * -- * ----- @@ -25,11 +31,13 @@ _~~|~/_|_|__/|~~~~~~~ | / ~~~~~ | | ~~~~~~~~ (__) (____) ``` -Here are some Perl Poems I wrote. They don't do anything useful when you run them, but they don't produce a compiler error either. They only exist for fun and demonstrate what you can do with Perl syntax. - -Wikipedia: "Perl poetry is the practice of writing poems that can be compiled as legal Perl code, for example the piece known as Black Perl. Perl poetry is made possible by the large number of English words that are used in the Perl language. New poems are regularly submitted to the community at PerlMonks." +## Table of Contents -[https://en.wikipedia.org/wiki/Perl](https://en.wikipedia.org/wiki/Perl) +* [⇢ Perl Poetry](#perl-poetry) +* [⇢ ⇢ math.pl](#mathpl) +* [⇢ ⇢ christmas.pl](#christmaspl) +* [⇢ ⇢ shopping.pl](#shoppingpl) +* [⇢ ⇢ More...](#more) ## math.pl @@ -161,12 +169,12 @@ Did you like what you saw? Have a look at Codeberg to see my other poems too: [https://codeberg.org/snonux/perl-poetry](https://codeberg.org/snonux/perl-poetry) +E-Mail your comments to `paul@nospam.buetow.org` :-) + Other related posts are: -[2008-06-26 Perl Poetry (You are currently reading this)](./2008-06-26-perl-poetry.md) -[2011-05-07 Perl Daemon (Service Framework)](./2011-05-07-perl-daemon-service-framework.md) [2022-05-27 Perl is still a great choice](./2022-05-27-perl-is-still-a-great-choice.md) - -E-Mail your comments to `paul@nospam.buetow.org` :-) +[2011-05-07 Perl Daemon (Service Framework)](./2011-05-07-perl-daemon-service-framework.md) +[2008-06-26 Perl Poetry (You are currently reading this)](./2008-06-26-perl-poetry.md) [Back to the main site](../) diff --git a/gemfeed/2008-12-29-using-my-nokia-n95-for-fixing-my-mta.md b/gemfeed/2008-12-29-using-my-nokia-n95-for-fixing-my-mta.md index acb2a67e..7f92733b 100644 --- a/gemfeed/2008-12-29-using-my-nokia-n95-for-fixing-my-mta.md +++ b/gemfeed/2008-12-29-using-my-nokia-n95-for-fixing-my-mta.md @@ -23,7 +23,7 @@ The last week I was in Vidin, Bulgaria with no internet access and I had to fix My first attempt to find an internet café, which was working during Christmastime, failed. However, I found with my N95 phone lots of free WLAN hotspots. The hotspots refused me logging into my server using SSH as I have configured a non-standard port for SSH for security reasons. Without knowing the costs, I used the GPRS internet access of my German phone provider (yes, I had to pay roaming fees). -[](./2008-12-29-using-my-nokia-n95-for-fixing-my-mta/nokia-n95.jpg) +[](./using-my-nokia-n95-for-fixing-my-mta/nokia-n95.jpg) With Putty for N95 and configuring Postfix with Vim and the T9 input mechanism, I managed to fix the problem. But it took half of an hour: diff --git a/gemfeed/2009-02-13-sgi-onyx-3200.md b/gemfeed/2009-02-13-sgi-onyx-3200.md new file mode 100644 index 00000000..f566f356 --- /dev/null +++ b/gemfeed/2009-02-13-sgi-onyx-3200.md @@ -0,0 +1,68 @@ +# SGI Onyx 3200 + +> Published at 2025-02-13T21:17:16+02:00 + +For nostalgia, I've kept this output of the 'dmesg' around. It's from an SGI Onyx 3200 graphics supercomputer running IRIX with the following specs: + +* 4 x 400 MHz IP35 MIPS CPUs +* 4GB of RAM + +[./sgi-onyx-3200/desk.webp](./sgi-onyx-3200/desk.webp) + +We used this monster when I was a student worker at the Fraunhofer Institute for Production Technology around the year 2006. It operated a walk-in 2-sided 3D cave (unfortunately, I don't have any pictures of that cave), where you could literally walk around with a set of VR glasses and see everything in 3D (that was when there wasn't any Oculus Quest yet). That was useful for running industrial simulations. + +``` +4 400 MHZ IP35 Processors +CPU: MIPS R12000 Processor Chip Revision: 3.5 +FPU: MIPS R12010 Floating Point Chip Revision: 3.5 +Main memory size: 4096 Mbytes +Instruction cache size: 32 Kbytes +Data cache size: 32 Kbytes +Secondary unified instruction/data cache size: 8 Mbytes +Integral SCSI controller 8: Version Fibre Channel QL2200A +Integral SCSI controller 6: Version QL12160, single ended +Integral SCSI controller 7: Version QL12160, low voltage differential +Integral SCSI controller 9: Version IEEE1394 SBP2 + IEEE1394 CDROM: node 1010031001a454 port 0 on SCSI controller 9 +Integral SCSI controller 0: Version Fibre Channel QL2200A + Disk drive: unit 1 on SpCSI controller 0 + Disk drive: unit 2 on SCSI controller 0 +Integral SCSI controller 5: Version IEEE1394 SBP2 + IEEE1394 CDROM: node 1010031001c080 port 0 on SCSI controller 5 +IOC3 serial port: tty3 +IOC3 serial port: tty4 +IOC3 serial port: tty10 +IOC3 serial port: tty11 +IOC3 serial port: tty12 +IOC3 serial port: tty5 +IOC3 serial port: tty6 +IOC3 serial port: tty7 +IOC3 serial port: tty8 +IOC3 serial port: tty9 +Graphics board: InfiniteReality3 +Graphics board: InfiniteReality3 +Gigabit Ethernet: eg0, module 001c04, pci_bus 2, pci_slot 2, firmware version 12.4.10 +Fast Ethernet: ef1, version 1, module 001c07, pci 4 +Integral Fast Ethernet: ef0, version 1, module 001c04, pci 4 +Iris Audio Processor: version RAD revision 13.0, number 1 +IOC3 external interrupts: 2 +IOC3 external interrupts: 1 +IEEE 1394 High performance serial bus controller 0: Type: OHCI, Version 0 0 +IEEE 1394 High performance serial bus controller 1: Type: OHCI, Version 0 0 +USB controller: type OHCI +USB Human Interface Device: device id 1 type keyboard +USB Human Interface Device: device id 1 type mouse +USB controller: type OHCI +USB Human Interface Device: device id 0 type keyboard +USB Human Interface Device: device id 0 type mouse +``` + +[./sgi-onyx-3200/collage.webp](./sgi-onyx-3200/collage.webp) + +I was mainly working on drilling simulations on this machine. Sometimes I worked directly at one of the 2 terminal screens of the Onyx, or often I used a nearby Linux machine and forwarded the X11 windows to my local screen. + +[./sgi-onyx-3200/collage2.webp](./sgi-onyx-3200/collage2.webp) + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +[Back to the main site](../) diff --git a/gemfeed/2010-04-09-standard-ml-and-haskell.md b/gemfeed/2010-04-09-standard-ml-and-haskell.md index daad07b5..cdf4c5d5 100644 --- a/gemfeed/2010-04-09-standard-ml-and-haskell.md +++ b/gemfeed/2010-04-09-standard-ml-and-haskell.md @@ -8,6 +8,16 @@ As you will see, SML and Haskell are very similar (at least when it comes to the Haskell is also a "pure functional" programming language, whereas SML also makes explicit use of imperative concepts. I am by far not a specialist in either of these languages, but here are a few functions implemented in both SML and Haskell: +## Table of Contents + +* [⇢ Standard ML and Haskell](#standard-ml-and-haskell) +* [⇢ ⇢ Defining a multi-data type](#defining-a-multi-data-type) +* [⇢ ⇢ Processing a multi](#processing-a-multi) +* [⇢ ⇢ Simplify function](#simplify-function) +* [⇢ ⇢ Delete all](#delete-all) +* [⇢ ⇢ Delete one](#delete-one) +* [⇢ ⇢ Higher-order functions](#higher-order-functions) + ## Defining a multi-data type Standard ML: diff --git a/gemfeed/2010-05-09-the-fype-programming-language.md b/gemfeed/2010-05-09-the-fype-programming-language.md index c7f8850d..3885a031 100644 --- a/gemfeed/2010-05-09-the-fype-programming-language.md +++ b/gemfeed/2010-05-09-the-fype-programming-language.md @@ -2,6 +2,12 @@ > Published at 2010-05-09T12:48:29+01:00; Updated at 2021-05-05 +Fype is an interpreted programming language created by me for learning and fun. The interpreter is written in C. It has been tested on FreeBSD and NetBSD and may also work on other Unix like operating systems such as Linux based ones. Besides learning and fun, there is no other use case of why Fype exists as many other programming languages are much faster and more powerful. + +The Fype syntax is straightforward and uses a maximum look ahead of 1 and an effortless top-down parsing mechanism. Fype is parsing and interpreting its code simultaneously. This means that syntax errors are only detected during program runtime. + +Fype is a recursive acronym and means "Fype is For Your Program Execution" or "Fype is Free Yak Programmed for ELF". You could also say, "It's not a hype - it's Fype!". + ``` ____ _ __ / / _|_ _ _ __ ___ _ _ ___ __ _| |__ / _|_ _ @@ -11,11 +17,33 @@ |___/|_| |___/ |___/ ``` -Fype is an interpreted programming language created by me for learning and fun. The interpreter is written in C. It has been tested on FreeBSD and NetBSD and may also work on other Unix like operating systems such as Linux based ones. Besides learning and fun, there is no other use case of why Fype exists as many other programming languages are much faster and more powerful. - -The Fype syntax is straightforward and uses a maximum look ahead of 1 and an effortless top-down parsing mechanism. Fype is parsing and interpreting its code simultaneously. This means that syntax errors are only detected during program runtime. - -Fype is a recursive acronym and means "Fype is For Your Program Execution" or "Fype is Free Yak Programmed for ELF". You could also say, "It's not a hype - it's Fype!". +## Table of Contents + +* [⇢ The Fype Programming Language](#the-fype-programming-language) +* [⇢ ⇢ Object-oriented C style](#object-oriented-c-style) +* [⇢ ⇢ Data types](#data-types) +* [⇢ ⇢ Syntax](#syntax) +* [⇢ ⇢ ⇢ Comments](#comments) +* [⇢ ⇢ ⇢ Variables](#variables) +* [⇢ ⇢ ⇢ Synonyms](#synonyms) +* [⇢ ⇢ Statements and expressions](#statements-and-expressions) +* [⇢ ⇢ ⇢ Parenthesis](#parenthesis) +* [⇢ ⇢ ⇢ Basic expressions](#basic-expressions) +* [⇢ ⇢ ⇢ Bitwise expressions](#bitwise-expressions) +* [⇢ ⇢ ⇢ Numeric expressions](#numeric-expressions) +* [⇢ ⇢ Control statements](#control-statements) +* [⇢ ⇢ Scopes](#scopes) +* [⇢ ⇢ Definedness ](#definedness-) +* [⇢ ⇢ System ](#system-) +* [⇢ ⇢ ⇢ I/O ](#io-) +* [⇢ ⇢ Procedures and functions](#procedures-and-functions) +* [⇢ ⇢ ⇢ Procedures](#procedures) +* [⇢ ⇢ ⇢ Nested procedures](#nested-procedures) +* [⇢ ⇢ ⇢ Functions](#functions) +* [⇢ ⇢ ⇢ Nested functions](#nested-functions) +* [⇢ ⇢ Arrays](#arrays) +* [⇢ ⇢ Fancy stuff](#fancy-stuff) +* [⇢ ⇢ May the source be with you](#may-the-source-be-with-you) ## Object-oriented C style diff --git a/gemfeed/2011-05-07-perl-daemon-service-framework.md b/gemfeed/2011-05-07-perl-daemon-service-framework.md index 3b4214c4..10588124 100644 --- a/gemfeed/2011-05-07-perl-daemon-service-framework.md +++ b/gemfeed/2011-05-07-perl-daemon-service-framework.md @@ -2,6 +2,8 @@ > Published at 2011-05-07T22:26:02+01:00; Updated at 2021-05-07 +PerlDaemon is a minimal daemon for Linux and other Unix like operating systems programmed in Perl. It is a minimal but pretty functional and fairly generic service framework. This means that it does not do anything useful other than providing a framework for starting, stopping, configuring and logging. To do something useful, a module (written in Perl) must be provided. + ``` a'! _,,_ a'! _,,_ a'! _,,_ \\_/ \ \\_/ \ \\_/ \.-, @@ -9,7 +11,18 @@ //\ //\\ //\ //\\ //\ //\\jrei ``` -PerlDaemon is a minimal daemon for Linux and other Unix like operating systems programmed in Perl. It is a minimal but pretty functional and fairly generic service framework. This means that it does not do anything useful other than providing a framework for starting, stopping, configuring and logging. To do something useful, a module (written in Perl) must be provided. +## Table of Contents + +* [⇢ Perl Daemon (Service Framework)](#perl-daemon-service-framework) +* [⇢ ⇢ Features](#features) +* [⇢ ⇢ Quick Guide](#quick-guide) +* [⇢ ⇢ How to configure](#how-to-configure) +* [⇢ ⇢ Example ](#example-) +* [⇢ ⇢ HiRes event loop](#hires-event-loop) +* [⇢ ⇢ Writing your own modules](#writing-your-own-modules) +* [⇢ ⇢ ⇢ Example module](#example-module) +* [⇢ ⇢ ⇢ Your own module](#your-own-module) +* [⇢ ⇢ May the source be with you](#may-the-source-be-with-you) ## Features @@ -158,12 +171,12 @@ You can find PerlDaemon (including the examples) at: [https://codeberg.org/snonux/perldaemon](https://codeberg.org/snonux/perldaemon) +E-Mail your comments to `paul@nospam.buetow.org` :-) + Other related posts are: -[2008-06-26 Perl Poetry](./2008-06-26-perl-poetry.md) -[2011-05-07 Perl Daemon (Service Framework) (You are currently reading this)](./2011-05-07-perl-daemon-service-framework.md) [2022-05-27 Perl is still a great choice](./2022-05-27-perl-is-still-a-great-choice.md) - -E-Mail your comments to `paul@nospam.buetow.org` :-) +[2011-05-07 Perl Daemon (Service Framework) (You are currently reading this)](./2011-05-07-perl-daemon-service-framework.md) +[2008-06-26 Perl Poetry](./2008-06-26-perl-poetry.md) [Back to the main site](../) diff --git a/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.md b/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.md index ccb9113b..f0c1af25 100644 --- a/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.md +++ b/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.md @@ -2,6 +2,12 @@ > Published at 2015-12-05T16:12:57+00:00; Updated at 2021-05-16 +You can use the following tutorial to install a full-blown Debian GNU/Linux Chroot on an LG G3 D855 CyanogenMod 13 (Android 6). First of all, you need to have root permissions on your phone, and you also need to have the developer mode activated. The following steps have been tested on Linux (Fedora 23). + +[](./run-debian-on-your-phone-with-debroid/Deboroid.png) + +A couple of years have passed since I last worked on Debroid. Currently, I am using the Termux app on Android, which is less sophisticated than a fully blown Debian installation but sufficient for my current requirements. The content of this site may be still relevant, and it would also work with more recent versions of Debian and Android. I would expect that some minor modifications need to be made, though. + ``` ____ _ _ _ | _ \ ___| |__ _ __ ___ (_) __| | @@ -11,13 +17,16 @@ ``` -You can use the following tutorial to install a full-blown Debian GNU/Linux Chroot on an LG G3 D855 CyanogenMod 13 (Android 6). First of all, you need to have root permissions on your phone, and you also need to have the developer mode activated. The following steps have been tested on Linux (Fedora 23). - -[](./2015-12-05-run-debian-on-your-phone-with-debroid/Deboroid.png) +## Table of Contents -## Foreword - -A couple of years have passed since I last worked on Debroid. Currently, I am using the Termux app on Android, which is less sophisticated than a fully blown Debian installation but sufficient for my current requirements. The content of this site may be still relevant, and it would also work with more recent versions of Debian and Android. I would expect that some minor modifications need to be made, though. +* [⇢ Run Debian on your phone with Debroid](#run-debian-on-your-phone-with-debroid) +* [⇢ ⇢ Step by step guide](#step-by-step-guide) +* [⇢ ⇢ ⇢ First debootstrap stage](#first-debootstrap-stage) +* [⇢ ⇢ ⇢ Copy Debian image to the phone](#copy-debian-image-to-the-phone) +* [⇢ ⇢ ⇢ Second debootstrap stage](#second-debootstrap-stage) +* [⇢ ⇢ ⇢ Setup of various scripts](#setup-of-various-scripts) +* [⇢ ⇢ ⇢ Entering Debroid and enable a service](#entering-debroid-and-enable-a-service) +* [⇢ ⇢ ⇢ Include to Android startup:](#include-to-android-startup) ## Step by step guide diff --git a/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.md b/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.md index 7b49b7f9..793ee5a7 100644 --- a/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.md +++ b/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.md @@ -2,6 +2,8 @@ > Published at 2016-04-09T18:29:47+01:00 +Over the last couple of years I wrote quite a few Puppet modules in order to manage my personal server infrastructure. One of them manages FreeBSD Jails and another one ZFS file systems. I thought I would give a brief overview in how it looks and feels. + ``` __ __ (( \---/ )) @@ -22,7 +24,13 @@ \ `. ``` -Over the last couple of years I wrote quite a few Puppet modules in order to manage my personal server infrastructure. One of them manages FreeBSD Jails and another one ZFS file systems. I thought I would give a brief overview in how it looks and feels. +## Table of Contents + +* [⇢ Jails and ZFS with Puppet on FreeBSD](#jails-and-zfs-with-puppet-on-freebsd) +* [⇢ ⇢ ZFS](#zfs) +* [⇢ ⇢ Jails](#jails) +* [⇢ ⇢ Inside-Jail Puppet](#inside-jail-puppet) +* [⇢ ⇢ Managing multiple Jails](#managing-multiple-jails) ## ZFS @@ -387,4 +395,15 @@ All done in a pretty automated manor. E-Mail your comments to `paul@nospam.buetow.org` :-) +Other *BSD related posts are: + +[2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts](./2025-02-01-f3s-kubernetes-with-freebsd-part-3.md) +[2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation](./2024-12-03-f3s-kubernetes-with-freebsd-part-2.md) +[2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage](./2024-11-17-f3s-kubernetes-with-freebsd-part-1.md) +[2024-04-01 KISS high-availability with OpenBSD](./2024-04-01-KISS-high-availability-with-OpenBSD.md) +[2024-01-13 One reason why I love OpenBSD](./2024-01-13-one-reason-why-i-love-openbsd.md) +[2022-10-30 Installing DTail on OpenBSD](./2022-10-30-installing-dtail-on-openbsd.md) +[2022-07-30 Let's Encrypt with OpenBSD and Rex](./2022-07-30-lets-encrypt-with-openbsd-and-rex.md) +[2016-04-09 Jails and ZFS with Puppet on FreeBSD (You are currently reading this)](./2016-04-09-jails-and-zfs-on-freebsd-with-puppet.md) + [Back to the main site](../) diff --git a/gemfeed/2016-05-22-spinning-up-my-own-authoritative-dns-servers.md b/gemfeed/2016-05-22-spinning-up-my-own-authoritative-dns-servers.md index b320bbab..23a30ce2 100644 --- a/gemfeed/2016-05-22-spinning-up-my-own-authoritative-dns-servers.md +++ b/gemfeed/2016-05-22-spinning-up-my-own-authoritative-dns-servers.md @@ -2,12 +2,20 @@ > Published at 2016-05-22T18:59:01+01:00 -## Background - Finally, I had time to deploy my authoritative DNS servers (master and slave) for my domains "buetow.org" and "buetow.zone". My domain name provider is Schlund Technologies. They allow their customers to edit the DNS records (BIND files) manually. And they also allow you to set your authoritative DNS servers for your domains. From now, I am making use of that option. [Schlund Technologies](http://www.schlundtech.de) +## Table of Contents + +* [⇢ Spinning up my own authoritative DNS servers](#spinning-up-my-own-authoritative-dns-servers) +* [⇢ ⇢ All FreeBSD Jails](#all-freebsd-jails) +* [⇢ ⇢ PF firewall](#pf-firewall) +* [⇢ ⇢ Puppet managed BIND zone files](#puppet-managed-bind-zone-files) +* [⇢ ⇢ The result](#the-result) +* [⇢ ⇢ Monitoring](#monitoring) +* [⇢ ⇢ DNS update workflow](#dns-update-workflow) + ## All FreeBSD Jails To set up my authoritative DNS servers, I installed a FreeBSD Jail dedicated for DNS with Puppet on my root machine as follows: diff --git a/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux.md b/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux.md index 4b03f475..04846fdb 100644 --- a/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux.md +++ b/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux.md @@ -2,6 +2,16 @@ > Published at 2018-06-01T14:50:29+01:00; Updated at 2021-05-08 +This text first was published in the german IT-Administrator computer Magazine. 3 years have passed since and I decided to publish it on my blog too. + +[https://www.admin-magazin.de/Das-Heft/2018/06/Realistische-Lasttests-mit-I-O-Riot](https://www.admin-magazin.de/Das-Heft/2018/06/Realistische-Lasttests-mit-I-O-Riot) + +I havn't worked on I/O Riot for some time now, but all what is written here is still valid. I am still using I/O Riot to debug I/O issues and pattern once in a while, so by all means the tool is not obsolete yet. The tool even helped to resolve a major production incident at work caused by disk I/O. + +I am eagerly looking forward to revamp I/O Riot so that it uses the new BPF Linux capabilities instead of plain old Systemtap (or alternatively: Newer versions of Systemtap can also use BPF as the backend I have learned). Also, when I wrote I/O Riot initially, I didn't have any experience with the Go programming language yet and therefore I wrote it in C. Once it gets revamped I might consider using Go instead of C as it would spare me from many segmentation faults and headaches during development ;-). I might also just stick to C for plain performance reasons and just refactor the code dealing with concurrency. + +Pleace notice that some of the screenshots show the command "ioreplay" instead of "ioriot". That's because the name has changed after taking those. + ``` .---. / \ @@ -13,17 +23,21 @@ jgs\__/'---'\__/ ``` -## Foreword +## Table of Contents -This text first was published in the german IT-Administrator computer Magazine. 3 years have passed since and I decided to publish it on my blog too. - -[https://www.admin-magazin.de/Das-Heft/2018/06/Realistische-Lasttests-mit-I-O-Riot](https://www.admin-magazin.de/Das-Heft/2018/06/Realistische-Lasttests-mit-I-O-Riot) - -I havn't worked on I/O Riot for some time now, but all what is written here is still valid. I am still using I/O Riot to debug I/O issues and pattern once in a while, so by all means the tool is not obsolete yet. The tool even helped to resolve a major production incident at work caused by disk I/O. - -I am eagerly looking forward to revamp I/O Riot so that it uses the new BPF Linux capabilities instead of plain old Systemtap (or alternatively: Newer versions of Systemtap can also use BPF as the backend I have learned). Also, when I wrote I/O Riot initially, I didn't have any experience with the Go programming language yet and therefore I wrote it in C. Once it gets revamped I might consider using Go instead of C as it would spare me from many segmentation faults and headaches during development ;-). I might also just stick to C for plain performance reasons and just refactor the code dealing with concurrency. - -Pleace notice that some of the screenshots show the command "ioreplay" instead of "ioriot". That's because the name has changed after taking those. +* [⇢ Realistic load testing with I/O Riot for Linux](#realistic-load-testing-with-io-riot-for-linux) +* [⇢ The article](#the-article) +* [⇢ ⇢ Background: Existing Techniques](#background-existing-techniques) +* [⇢ ⇢ Benchmarking the Email Cloud at Mimecast](#benchmarking-the-email-cloud-at-mimecast) +* [⇢ ⇢ Using I/O Riot](#using-io-riot) +* [⇢ ⇢ ⇢ Installation](#installation) +* [⇢ ⇢ ⇢ Recording of I/O events](#recording-of-io-events) +* [⇢ ⇢ ⇢ Test preparation](#test-preparation) +* [⇢ ⇢ ⇢ Test Initialization](#test-initialization) +* [⇢ ⇢ ⇢ Replay](#replay) +* [⇢ ⇢ I/O Riot is Open Source](#io-riot-is-open-source) +* [⇢ ⇢ Systemtap](#systemtap) +* [⇢ ⇢ More refereces](#more-refereces) # The article @@ -81,7 +95,7 @@ During recording, ioriot acts as a wrapper and executes all relevant Systemtap c % sudo ioriot -c io.capture ``` -[](./2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure1-ioriot-io-recording.png) +[](./realistic-load-testing-with-ioriot-for-linux/figure1-ioriot-io-recording.png) A Ctrl-C (SIGINT) stops recording prematurely. Otherwise, ioriot terminates itself automatically after 1 hour. Depending on the system load, the output file can grow to several gigabytes. Only metadata is logged, not the read and written data itself. When replaying later, only random data is used. Under certain circumstances, Systemtap may omit some system calls and issue warnings. This is to ensure that Systemtap does not consume too many resources. @@ -105,7 +119,7 @@ The test will most likely want to access existing files. These are files the tes To avoid any damage to the running system, ioreplay only works in special directories. The tool creates a separate subdirectory for each file system mount point (e.g. /, /usr/local, /store/00,...) (here: /.ioriot/TESTNAME, /usr/local/.ioriot/TESTNAME, /store/00/.ioriot/TESTNAME,...). By default, the working directory of ioriot is /usr/local/ioriot/TESTNAME. -[](./2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure2-ioriot-test-preparation.png) +[](./realistic-load-testing-with-ioriot-for-linux/figure2-ioriot-test-preparation.png) You must re-initialize the environment before each run. Data from previous tests will be moved to a trash directory automatically, which can be finally deleted with "sudo ioriot -P". @@ -115,7 +129,7 @@ After initialization, you can replay the log with -r. You can use -R to initiate You can also influence the playback speed: "-s 0" is interpreted as "Playback as fast as possible" and is the default setting. With "-s 1" all operations are performed at original speed. "-s 2" would double the playback speed and "-s 0.5" would halve it. -[](./2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure3-ioriot-replay.png) +[](./realistic-load-testing-with-ioriot-for-linux/figure3-ioriot-replay.png) As an initial test, for example, you could compare the two Linux I/O schedulers CFQ and Deadline and check which scheduler the test runs the fastest. They run the test separately for each scheduler. The following shell loop iterates through all attached block devices of the system and changes their I/O scheduler to the one specified in variable $new_scheduler (in this case either cfq or deadline). Subsequently, all I/O events from the io.replay protocol are played back. At the end, an output file with statistics is generated: @@ -157,13 +171,13 @@ Total time: 1213.00s In any case, you should also set up a time series database, such as Graphite, where the I/O throughput can be plotted. Figures 4 and 5 show the read and write access times of both tests. The break-in makes it clear when the CFQ test ended and the deadline test was started. The reading latency of both tests is similar. Write latency is dramatically improved using the Deadline Scheduler. -[](./2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure4-ioriot-read-latency.png) +[](./realistic-load-testing-with-ioriot-for-linux/figure4-ioriot-read-latency.png) -[](./2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure5-ioriot-write-latency.png) +[](./realistic-load-testing-with-ioriot-for-linux/figure5-ioriot-write-latency.png) You should also take a look at the iostat tool. The iostat screenshot shows the output of iostat -x 10 during a test run. As you can see, a block device is fully loaded with 99% utilization, while all other block devices still have sufficient buffer. This could be an indication of poor data distribution in the storage system and is worth pursuing. It is not uncommon for I/O Riot to reveal software problems. -[](./2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure6-iostat.png) +[](./realistic-load-testing-with-ioriot-for-linux/figure6-iostat.png) ## I/O Riot is Open Source diff --git a/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.md b/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.md index 3430990e..d5147829 100644 --- a/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.md +++ b/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.md @@ -2,8 +2,6 @@ > Published at 2021-04-22T19:28:41+01:00; Updated at 2021-04-26 -[](./2021-04-22-dtail-the-distributed-log-tail-program/title.png) - This article first appeared at the Mimecast Engineering Blog but I made it available here in my personal internet site too. [Original Mimecast Engineering Blog post at Medium](https://medium.com/mimecast-engineering/dtail-the-distributed-log-tail-program-79b8087904bb) @@ -16,6 +14,21 @@ Every engineer familiar with UNIX or a UNIX-like platform (e.g., Linux) is well Think of DTail as a distributed version of the tail program which is very useful when you have a distributed application running on many servers. DTail is an Open-Source, cross-platform, fairly easy to use, support and maintain log file analysis & statistics gathering tool designed for Engineers and Systems Administrators. It is programmed in Google Go. +[](./dtail-the-distributed-log-tail-program/title.png) + +## Table of Contents + +* [⇢ DTail - The distributed log tail program](#dtail---the-distributed-log-tail-program) +* [⇢ ⇢ A Mimecast Pet Project](#a-mimecast-pet-project) +* [⇢ ⇢ Differentiating from log management systems](#differentiating-from-log-management-systems) +* [⇢ ⇢ Combining simplicity, security and efficiency](#combining-simplicity-security-and-efficiency) +* [⇢ ⇢ The DTail family of commands](#the-dtail-family-of-commands) +* [⇢ ⇢ Usage example](#usage-example) +* [⇢ ⇢ Fitting it in](#fitting-it-in) +* [⇢ ⇢ Advanced features](#advanced-features) +* [⇢ ⇢ For the future](#for-the-future) +* [⇢ ⇢ Open Source](#open-source) + ## A Mimecast Pet Project DTail got its inspiration from public domain tools available already in this area but it is a blue sky from-scratch development which was first presented at Mimecast’s annual internal Pet Project competition (awarded with a Bronze prize). It has gained popularity since and is one of the most widely deployed DevOps tools at Mimecast (reaching nearly 10k server installations) and many engineers use it on a regular basis. The Open-Source version of DTail is available at: @@ -30,7 +43,7 @@ Why not just use a full-blown log management system? There are various Open-Sour DTail does not aim to replace any of the log management tools already available but is rather an additional tool crafted especially for ad-hoc debugging and troubleshooting purposes. DTail is cheap to operate as it does not require any dedicated hardware for log storage as it operates directly on the source of the logs. It means that there is a DTail server installed on all server boxes producing logs. This decentralized comes with the direct advantages that there is no introduced delay because the logs are not shipped to a central log storage device. The reduced complexity also makes it more robust against outages. You won’t be able to troubleshoot your distributed application very well if the log management infrastructure isn’t working either. -[](./2021-04-22-dtail-the-distributed-log-tail-program/dtail.gif) +[](./dtail-the-distributed-log-tail-program/dtail.gif) As a downside, you won’t be able to access any logs with DTail when the server is down. Furthermore, a server can store logs only up to a certain capacity as disks will fill up. For the purpose of ad-hoc debugging, these are not typically issues. Usually, it’s the application you want to debug and not the server. And disk space is rarely an issue for bare metal and VM-based systems these days, with sufficient space for several weeks’ worth of log storage being available. DTail also supports reading compressed logs. The currently supported compression algorithms are gzip and zstd. @@ -54,7 +67,7 @@ Following the UNIX philosophy, DTail includes multiple command-line commands eac * dgrep: The distributed grep client for searching text files for a regular expression pattern. * dmap: The distributed map-reduce client for aggregating stats from log files. -[](./2021-04-22-dtail-the-distributed-log-tail-program/dgrep.gif) +[](./dtail-the-distributed-log-tail-program/dgrep.gif) ## Usage example @@ -103,13 +116,13 @@ Mimecast highly encourages you to have a look at DTail and submit an issue for a [https://dtail.dev](https://dtail.dev) +E-Mail your comments to `paul@nospam.buetow.org` :-) + Other related posts are: -[2021-04-22 DTail - The distributed log tail program (You are currently reading this)](./2021-04-22-dtail-the-distributed-log-tail-program.md) -[2022-03-06 The release of DTail 4.0.0](./2022-03-06-the-release-of-dtail-4.0.0.md) -[2022-10-30 Installing DTail on OpenBSD](./2022-10-30-installing-dtail-on-openbsd.md) [2023-09-25 DTail usage examples](./2023-09-25-dtail-usage-examples.md) - -E-Mail your comments to `paul@nospam.buetow.org` :-) +[2022-10-30 Installing DTail on OpenBSD](./2022-10-30-installing-dtail-on-openbsd.md) +[2022-03-06 The release of DTail 4.0.0](./2022-03-06-the-release-of-dtail-4.0.0.md) +[2021-04-22 DTail - The distributed log tail program (You are currently reading this)](./2021-04-22-dtail-the-distributed-log-tail-program.md) [Back to the main site](../) diff --git a/gemfeed/2021-04-24-welcome-to-the-geminispace.md b/gemfeed/2021-04-24-welcome-to-the-geminispace.md index 682d5f47..662328da 100644 --- a/gemfeed/2021-04-24-welcome-to-the-geminispace.md +++ b/gemfeed/2021-04-24-welcome-to-the-geminispace.md @@ -2,14 +2,6 @@ > Published at 2021-04-24T19:28:41+01:00; Updated at 2021-06-18 -ASCII Art by Andy Hood! - -Have you reached this article already via Gemini? It requires a Gemini client; web browsers such as Firefox, Chrome, Safari, etc., don't support the Gemini protocol. The Gemini address of this site (or the address of this capsule as people say in Geminispace) is: - -[gemini://foo.zone](gemini://foo.zone) - -However, if you still use HTTP, you are just surfing the fallback HTML version of this capsule. In that case, I suggest reading on what this is all about :-). - ``` /\ @@ -30,6 +22,26 @@ However, if you still use HTTP, you are just surfing the fallback HTML version o ``` +## Table of Contents + +* [⇢ Welcome to the Geminispace](#welcome-to-the-geminispace) +* [⇢ ⇢ Introduction](#introduction) +* [⇢ ⇢ Motivation](#motivation) +* [⇢ ⇢ ⇢ My urge to revamp my personal website](#my-urge-to-revamp-my-personal-website) +* [⇢ ⇢ ⇢ My still great Laptop running hot](#my-still-great-laptop-running-hot) +* [⇢ ⇢ Discovering the Gemini internet protocol](#discovering-the-gemini-internet-protocol) +* [⇢ ⇢ My own Gemini capsule](#my-own-gemini-capsule) +* [⇢ ⇢ Gemini advantages summarised](#gemini-advantages-summarised) +* [⇢ ⇢ Dive into deep Gemini space](#dive-into-deep-gemini-space) + +## Introduction + +Have you reached this article already via Gemini? It requires a Gemini client; web browsers such as Firefox, Chrome, Safari, etc., don't support the Gemini protocol. The Gemini address of this site (or the address of this capsule as people say in Geminispace) is: + +[gemini://foo.zone](gemini://foo.zone) + +However, if you still use HTTP, you are just surfing the fallback HTML version of this capsule. In that case, I suggest reading on what this is all about :-). + ## Motivation ### My urge to revamp my personal website @@ -48,8 +60,8 @@ Around the same time, I discovered a relatively new, more lightweight protocol n The "downside" is that due to the limited capabilities of the Gemini protocol, all sites look very old and spartan. But that is not a downside; that is, in fact, a design choice people made. It is up to the client software how your capsule looks. For example, you could use a graphical client, such as Lagrange, with nice font renderings and colours to improve the appearance. Or you could use a very minimalistic command line black-and-white Gemini client. It's your (the user's) choice. -[](./2021-04-24-welcome-to-the-geminispace/amfora-screenshot.png) -[](./2021-04-24-welcome-to-the-geminispace/lagrange-screenshot.png) +[](./welcome-to-the-geminispace/amfora-screenshot.png) +[](./welcome-to-the-geminispace/lagrange-screenshot.png) Why is there a need for a new protocol? As the modern web is a superset of Gemini, can't we use simple HTML 1.0 instead? That's a good and valid question. It is not a technical problem but a human problem. We tend to abuse the features once they are available. You can ensure that things stay efficient and straightforward as long as you are using the Gemini protocol. On the other hand, you can't force every website on the modern web to only create plain and straightforward-looking HTML pages. @@ -75,17 +87,18 @@ This site was generated with Gemtexter. You can read more about it here: Check out one of the following links for more information about Gemini. For example, you will find a FAQ that explains why the protocol is named Gemini. Many Gemini capsules are dual-hosted via Gemini and HTTP(S) so that people new to Gemini can sneak peek at the content with a regular web browser. Some people go as far as tri-hosting all their content via HTTP(S), Gemini and Gopher. -[gemini://gemini.circumlunar.space](gemini://gemini.circumlunar.space) -[https://gemini.circumlunar.space](https://gemini.circumlunar.space) +[gemini://geminiprotocol.net/](gemini://geminiprotocol.net/) +[https://geminiprotocol.net/](https://geminiprotocol.net/) + +E-Mail your comments to `paul@nospam.buetow.org` :-) Other related posts are: -[2021-04-24 Welcome to the Geminispace (You are currently reading this)](./2021-04-24-welcome-to-the-geminispace.md) -[2021-06-05 Gemtexter - One Bash script to rule it all](./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md) -[2022-08-27 Gemtexter 1.1.0 - Let's Gemtext again](./2022-08-27-gemtexter-1.1.0-lets-gemtext-again.md) -[2023-03-25 Gemtexter 2.0.0 - Let's Gemtext again²](./2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.md) +[2024-10-02 Gemtexter 3.0.0 - Let's Gemtext again⁴](./2024-10-02-gemtexter-3.0.0-lets-gemtext-again-4.md) [2023-07-21 Gemtexter 2.1.0 - Let's Gemtext again³](./2023-07-21-gemtexter-2.1.0-lets-gemtext-again-3.md) - -E-Mail your comments to `paul@nospam.buetow.org` :-) +[2023-03-25 Gemtexter 2.0.0 - Let's Gemtext again²](./2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.md) +[2022-08-27 Gemtexter 1.1.0 - Let's Gemtext again](./2022-08-27-gemtexter-1.1.0-lets-gemtext-again.md) +[2021-06-05 Gemtexter - One Bash script to rule it all](./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md) +[2021-04-24 Welcome to the Geminispace (You are currently reading this)](./2021-04-24-welcome-to-the-geminispace.md) [Back to the main site](../) diff --git a/gemfeed/2021-05-16-personal-bash-coding-style-guide.md b/gemfeed/2021-05-16-personal-bash-coding-style-guide.md index 21cd38f2..4f1b8152 100644 --- a/gemfeed/2021-05-16-personal-bash-coding-style-guide.md +++ b/gemfeed/2021-05-16-personal-bash-coding-style-guide.md @@ -2,6 +2,10 @@ > Published at 2021-05-16T14:51:57+01:00 +Lately, I have been polishing and writing a lot of Bash code. Not that I never wrote a lot of Bash, but now as I also looked through the Google Shell Style Guide, I thought it is time also to write my thoughts on that. I agree with that guide in most, but not in all points. + +[Google Shell Style Guide](https://google.github.io/styleguide/shellguide.html) + ``` .---------------------------. /,--..---..---..---..---..--. `. @@ -15,9 +19,26 @@ "\__/"---------------"\__/"-+---+' ``` -Lately, I have been polishing and writing a lot of Bash code. Not that I never wrote a lot of Bash, but now as I also looked through the Google Shell Style Guide, I thought it is time also to write my thoughts on that. I agree with that guide in most, but not in all points. - -[Google Shell Style Guide](https://google.github.io/styleguide/shellguide.html) +## Table of Contents + +* [⇢ Personal Bash coding style guide](#personal-bash-coding-style-guide) +* [⇢ ⇢ My modifications](#my-modifications) +* [⇢ ⇢ ⇢ Shebang](#shebang) +* [⇢ ⇢ ⇢ Two space soft-tabs indentation](#two-space-soft-tabs-indentation) +* [⇢ ⇢ ⇢ Breaking long pipes](#breaking-long-pipes) +* [⇢ ⇢ ⇢ Quoting your variables](#quoting-your-variables) +* [⇢ ⇢ ⇢ Prefer built-in commands over external commands](#prefer-built-in-commands-over-external-commands) +* [⇢ ⇢ My additions](#my-additions) +* [⇢ ⇢ ⇢ Use of 'yes' and 'no'](#use-of--yes--and--no-) +* [⇢ ⇢ ⇢ Non-evil alternative to variable assignments via eval](#non-evil-alternative-to-variable-assignments-via-eval) +* [⇢ ⇢ ⇢ Prefer pipes over arrays for list processing](#prefer-pipes-over-arrays-for-list-processing) +* [⇢ ⇢ ⇢ Assign-then-shift](#assign-then-shift) +* [⇢ ⇢ ⇢ Paranoid mode](#paranoid-mode) +* [⇢ ⇢ Learned](#learned) +* [⇢ ⇢ ⇢ Unintended lexicographical comparison.](#unintended-lexicographical-comparison) +* [⇢ ⇢ ⇢ PIPESTATUS](#pipestatus) +* [⇢ ⇢ Use common sense and BE CONSISTENT.](#use-common-sense-and-be-consistent) +* [⇢ ⇢ Advanced Bash learning pro tip](#advanced-bash-learning-pro-tip) ## My modifications @@ -27,13 +48,13 @@ These are my modifications to the Google Guide. Google recommends using always... -``` +```bash #!/bin/bash ``` ... as the shebang line, but that does not work on all Unix and Unix-like operating systems (e.g., the *BSDs don't have Bash installed to /bin/bash). Better is: -``` +```bash #!/usr/bin/env bash ``` @@ -51,7 +72,7 @@ I hit the 80 character line length quicker with the four spaces than with two sp Google recommends breaking up long pipes like this: -``` +```bash # All fits on one line command1 | command2 @@ -64,7 +85,7 @@ command1 \ I think there is a better way like the following, which is less noisy. The pipe | already indicates the Bash that another command is expected, thus making the explicit line breaks with \ obsolete: -``` +```bash # Long commands command1 | command2 | @@ -72,11 +93,13 @@ command1 | command4 ``` +> Update: It's 2023 now, and I have changed my mind. I think Google's way is the better one. It may be a bit more to type, but the leading `|` are a nice eye catcher, so you know immediately what is going on! + ### Quoting your variables Google recommends always quote your variables. Generally, it would be best if you did that only for variables where you are unsure about the content/values of the variables (e.g., content is from an external input source and may contain whitespace or other special characters). In my opinion, the code will become quite noisy when you always quote your variables like this: -``` +```bash greet () { local -r greeting="${1}" local -r name="${2}" @@ -86,7 +109,7 @@ greet () { In this particular example, I agree that you should quote them as you don't know the input (are there, for example, whitespace characters?). But if you are sure that you are only using simple bare words, then I think that the code looks much cleaner when you do this instead: -``` +```bash say_hello_to_paul () { local -r greeting=Hello local -r name=Paul @@ -96,7 +119,7 @@ say_hello_to_paul () { You see, I also omitted the curly braces { } around the variables. I only use the curly braces around variables when it makes the code either easier/clearer to read or if it is necessary to use them: -``` +```bash declare FOO=bar # Curly braces around FOO are necessary echo "foo${FOO}baz" @@ -108,7 +131,7 @@ A few more words on always quoting the variables: For the sake of consistency (a Google recommends using the built-in commands over available external commands where possible: -``` +```bash # Prefer this: addition=$(( X + Y )) substitution="${string/#foo/bar}" @@ -132,7 +155,7 @@ I even didn't get started with what you can do with awk (especially GNU Awk), a Bash does not support a boolean type. I tend just to use the strings 'yes' and 'no' here. I used 0 for false and 1 for true for some time, but I think that the yes/no strings are easier to read. Yes, the Bash script would need to perform string comparisons on every check, but if performance is crucial to you, you wouldn't want to use a Bash script anyway, correct? -``` +```bash declare -r SUGAR_FREE=yes declare -r I_NEED_THE_BUZZ=no @@ -153,14 +176,13 @@ buy_soda $I_NEED_THE_BUZZ Google is in the opinion that eval should be avoided. I think so too. They list these examples in their guide: -``` +```bash # What does this set? # Did it succeed? In part or whole? eval $(set_my_variables) # What happens if one of the returned values has a space in it? variable="$(eval some_function)" - ``` However, if I want to read variables from another file, I don't have to use eval here. I only have to source the file: @@ -195,7 +217,7 @@ The downside is that ShellCheck won't be able to follow the dynamic sourcing any When I do list processing in Bash, I prefer to use pipes. You can chain them through Bash functions as well, which is pretty neat. Usually, my list processing scripts are of a structure like this: -``` +```bash filter_lines () { echo 'Start filtering lines in a fancy way!' >&2 grep ... | sed .... @@ -239,35 +261,38 @@ I often refactor existing Bash code. That leads me to add and removing function The solution is to use of the "assign-then-shift"-method, which goes like this: "local -r var1=$1; shift; local -r var2=$1; shift". The idea is that you only use "$1" to assign function arguments to named (better readable) local function variables. You will never have to bother about "$2" or above. That is very useful when you constantly refactor your code and remove or add function arguments. It's something that I picked up from a colleague (a pure Bash wizard) some time ago: -``` +```bash some_function () { local -r param_foo="$1"; shift local -r param_baz="$1"; shift local -r param_bay="$1"; shift - ... + + # ... } ``` Want to add a param_baz? Just do this: -``` +```bash some_function () { local -r param_foo="$1"; shift local -r param_bar="$1"; shift local -r param_baz="$1"; shift local -r param_bay="$1"; shift - ... + + # ... } ``` Want to remove param_foo? Nothing easier than that: -``` +```bash some_function () { local -r param_bar="$1"; shift local -r param_baz="$1"; shift local -r param_bay="$1"; shift - ... + + # ... } ``` @@ -277,7 +302,7 @@ As you can see, I didn't need to change any other assignments within the functio I call this the paranoid mode. The Bash will stop executing when a command exits with a status not equal to 0: -``` +```bash set -e grep -q foo <<< bar echo Jo @@ -285,14 +310,14 @@ echo Jo Here 'Jo' will never be printed out as the grep didn't find any match. It's unrealistic for most scripts to run in paranoid mode purely, so there must be a way to add exceptions. Critical Bash scripts of mine tend to look like this: -``` +```bash #!/usr/bin/env bash set -e some_function () { - .. some critical code - ... + # .. some critical code + # ... set +e # Grep might fail, but that's OK now @@ -300,11 +325,11 @@ some_function () { local -i ec=$? set -e - .. critical code continues ... + # .. critical code continues ... if [[ $ec -ne 0 ]]; then - ... + : # ... fi - ... + # ... } ``` @@ -316,7 +341,7 @@ There are also a couple of things I've learned from Google's guide. The following looks like a valid Bash code: -``` +```bash if [[ "${my_var}" > 3 ]]; then # True for 4, false for 22. do_something @@ -325,7 +350,7 @@ fi ... but it is probably an unintended lexicographical comparison. A correct way would be: -``` +```bash if (( my_var > 3 )); then do_something fi @@ -333,7 +358,7 @@ fi or -``` +```bash if [[ "${my_var}" -gt 3 ]]; then do_something fi @@ -345,7 +370,7 @@ I have never used the PIPESTATUS variable before. I knew that it's there, but I The PIPESTATUS variable in Bash allows checking of the return code from all parts of a pipe. If it's only necessary to check the success or failure of the whole pipe, then the following is acceptable: -``` +```bash tar -cf - ./* | ( cd "${dir}" && tar -xf - ) if (( PIPESTATUS[0] != 0 || PIPESTATUS[1] != 0 )); then echo "Unable to tar files to ${dir}" >&2 @@ -354,7 +379,7 @@ fi However, as PIPESTATUS will be overwritten as soon as you do any other command, if you need to act differently on errors based on where it happened in the pipe, you'll need to assign PIPESTATUS to another variable immediately after running the command (don't forget that [ is a command and will wipe out PIPESTATUS). -``` +```bash tar -cf - ./* | ( cd "${DIR}" && tar -xf - ) return_codes=( "${PIPESTATUS[@]}" ) if (( return_codes[0] != 0 )); then @@ -380,13 +405,14 @@ I also highly recommend having a read through the "Advanced Bash-Scripting Guide [Advanced Bash-Scripting Guide](https://tldp.org/LDP/abs/html/) +E-Mail your comments to `paul@nospam.buetow.org` :-) + Other related posts are: -[2021-05-16 Personal Bash coding style guide (You are currently reading this)](./2021-05-16-personal-bash-coding-style-guide.md) -[2021-06-05 Gemtexter - One Bash script to rule it all](./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md) -[2021-11-29 Bash Golf Part 1](./2021-11-29-bash-golf-part-1.md) +[2023-12-10 Bash Golf Part 3](./2023-12-10-bash-golf-part-3.md) [2022-01-01 Bash Golf Part 2](./2022-01-01-bash-golf-part-2.md) - -E-Mail your comments to `paul@nospam.buetow.org` :-) +[2021-11-29 Bash Golf Part 1](./2021-11-29-bash-golf-part-1.md) +[2021-06-05 Gemtexter - One Bash script to rule it all](./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md) +[2021-05-16 Personal Bash coding style guide (You are currently reading this)](./2021-05-16-personal-bash-coding-style-guide.md) [Back to the main site](../) diff --git a/gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md b/gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md index de6a843f..56e8df6a 100644 --- a/gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md +++ b/gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md @@ -2,6 +2,10 @@ > Published at 2021-06-05T19:03:32+01:00 +You might have read my previous blog posts about entering the Geminispace, where I pointed out the benefits of having and maintaining an internet presence there. This whole site (the blog and all other pages) is composed in the Gemtext markup language. + +This comes with the benefit that I can write content in my favourite text editor (Vim). + ``` o .,<>., o |\/\/\/\/| @@ -43,15 +47,27 @@ `+a:f:......jrei''' ``` -You might have read my previous blog posts about entering the Geminispace, where I pointed out the benefits of having and maintaining an internet presence there. This whole site (the blog and all other pages) is composed in the Gemtext markup language. - -This comes with the benefit that I can write content in my favourite text editor (Vim). +## Table of Contents + +* [⇢ Gemtexter - One Bash script to rule it all](#gemtexter---one-bash-script-to-rule-it-all) +* [⇢ ⇢ Motivation](#motivation) +* [⇢ ⇢ Output formats](#output-formats) +* [⇢ ⇢ Taking it as far as I should, but no farther](#taking-it-as-far-as-i-should-but-no-farther) +* [⇢ ⇢ ⇢ Modularization ](#modularization-) +* [⇢ ⇢ ⇢ Bash best practises and ShellCheck](#bash-best-practises-and-shellcheck) +* [⇢ ⇢ ⇢ Unit testing](#unit-testing) +* [⇢ ⇢ ⇢ HTML unit test example](#html-unit-test-example) +* [⇢ ⇢ ⇢ Markdown unit test example](#markdown-unit-test-example) +* [⇢ ⇢ Handcrafted HTML styles](#handcrafted-html-styles) +* [⇢ ⇢ Configurability](#configurability) +* [⇢ ⇢ Future features](#future-features) +* [⇢ ⇢ Conclusion](#conclusion) ## Motivation Another benefit of using Gemini is that the Gemtext markup language is easy to parse. As my site is dual-hosted (Gemini+HTTP), I could, in theory, just write a shell script to deal with the conversion from Gemtext to HTML; there is no need for a full-featured programming language here. I have done a lot of Bash in the past, but I am also often revisiting old tools and techniques for refreshing and keeping the knowledge up to date here. -[](./2021-06-05-gemtexter-one-bash-script-to-rule-it-all/blog-engine.jpg) +[](./gemtexter-one-bash-script-to-rule-it-all/blog-engine.jpg) I have exactly done that - I wrote a Bash script, named Gemtexter, for that: @@ -163,17 +179,19 @@ It was quite a lot of fun writing Gemtexter. It's a relatively small project, bu I finally revamped my personal internet site and started to blog again. I wanted the result to be exactly how it is now: A slightly retro-inspired internet site built for fun with unconventional tools. +E-Mail your comments to `paul@nospam.buetow.org` :-) + Other related posts are: -[2021-04-24 Welcome to the Geminispace](./2021-04-24-welcome-to-the-geminispace.md) -[2021-05-16 Personal Bash coding style guide](./2021-05-16-personal-bash-coding-style-guide.md) -[2021-06-05 Gemtexter - One Bash script to rule it all (You are currently reading this)](./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md) -[2021-11-29 Bash Golf Part 1](./2021-11-29-bash-golf-part-1.md) -[2022-01-01 Bash Golf Part 2](./2022-01-01-bash-golf-part-2.md) -[2022-08-27 Gemtexter 1.1.0 - Let's Gemtext again](./2022-08-27-gemtexter-1.1.0-lets-gemtext-again.md) -[2023-03-25 Gemtexter 2.0.0 - Let's Gemtext again²](./2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.md) +[2024-10-02 Gemtexter 3.0.0 - Let's Gemtext again⁴](./2024-10-02-gemtexter-3.0.0-lets-gemtext-again-4.md) +[2023-12-10 Bash Golf Part 3](./2023-12-10-bash-golf-part-3.md) [2023-07-21 Gemtexter 2.1.0 - Let's Gemtext again³](./2023-07-21-gemtexter-2.1.0-lets-gemtext-again-3.md) - -E-Mail your comments to `paul@nospam.buetow.org` :-) +[2023-03-25 Gemtexter 2.0.0 - Let's Gemtext again²](./2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.md) +[2022-08-27 Gemtexter 1.1.0 - Let's Gemtext again](./2022-08-27-gemtexter-1.1.0-lets-gemtext-again.md) +[2022-01-01 Bash Golf Part 2](./2022-01-01-bash-golf-part-2.md) +[2021-11-29 Bash Golf Part 1](./2021-11-29-bash-golf-part-1.md) +[2021-06-05 Gemtexter - One Bash script to rule it all (You are currently reading this)](./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md) +[2021-05-16 Personal Bash coding style guide](./2021-05-16-personal-bash-coding-style-guide.md) +[2021-04-24 Welcome to the Geminispace](./2021-04-24-welcome-to-the-geminispace.md) [Back to the main site](../) diff --git a/gemfeed/2021-07-04-the-well-grounded-rubyist.md b/gemfeed/2021-07-04-the-well-grounded-rubyist.md index 290b6518..07d40f0a 100644 --- a/gemfeed/2021-07-04-the-well-grounded-rubyist.md +++ b/gemfeed/2021-07-04-the-well-grounded-rubyist.md @@ -6,14 +6,28 @@ When I was a Linux System Administrator, I have been programming in Perl for yea You should learn or try out one new programming language once yearly anyway. If you end up not using the new language, that's not a problem. You will learn new techniques with each new programming language and this also helps you to improve your overall programming skills even for other languages. Also, having some background in a similar programming language makes it reasonably easy to get started. Besides that, learning a new programming language is kick-a** fun! -[](./2021-07-04-the-well-grounded-rubyist/book-cover.jpg) +[](./the-well-grounded-rubyist/book-cover.jpg) Superficially, Perl seems to have many similarities to Ruby (but, of course, it is entirely different to Perl when you look closer), which pushed me towards Ruby instead of Python. I have tried Python a couple of times before, and I managed to write good code, but I never felt satisfied with the language. I didn't love the syntax, especially the indentations used; they always confused me. I don't dislike Python, but I don't prefer to program in it if I have a choice, especially when there are more propelling alternatives available. Personally, it's so much more fun to program in Ruby than in Python. -[](./2021-07-04-the-well-grounded-rubyist/book-backside.jpg) +[](./the-well-grounded-rubyist/book-backside.jpg) Yukihiro Matsumoto, the inventor of Ruby, said: "I wanted a scripting language that was more powerful than Perl and more object-oriented than Python" - So I can see where some of the similarities come from. I personally don't believe that Ruby is more powerful than Perl, though, especially when you take CPAN and/or Perl 6 (now known as Raku) into the equation. Well, it all depends on what you mean with "more powerful". But I want to stay pragmatic and use what's already used at my workplace. +## Table of Contents + +* [⇢ The Well-Grounded Rubyist](#the-well-grounded-rubyist) +* [⇢ ⇢ My Ruby problem domain](#my-ruby-problem-domain) +* [⇢ ⇢ Being stuck in Ruby-mediocrity](#being-stuck-in-ruby-mediocrity) +* [⇢ ⇢ O'Reilly Safari Books Online](#o-reilly-safari-books-online) +* [⇢ ⇢ Key takeaways](#key-takeaways) +* [⇢ ⇢ ⇢ "Everything" is an object](#everything-is-an-object) +* [⇢ ⇢ ⇢ "Normal" objects and singleton objects](#normal-objects-and-singleton-objects) +* [⇢ ⇢ ⇢ Domain specific languages](#domain-specific-languages) +* [⇢ ⇢ ⇢ Ruby is "self-ish"](#ruby-is-self-ish) +* [⇢ ⇢ ⇢ Functional programming](#functional-programming) +* [⇢ ⇢ Perl](#perl) + ## My Ruby problem domain I wrote a lot of Ruby code over the last couple of years. There were many small to medium-sized tools and other projects such as Nagios monitoring checks, even an internal monitoring & reporting site based on Sinatra. All Ruby scripts I wrote do their work well; I didn't encounter any significant problems using Ruby for any of these tasks. Of course, there's nothing that couldn't be written in Perl (or Python), though, after all, these languages are all Turing-complete and all these languages also come with a huge set of 3rd party libraries :-). diff --git a/gemfeed/2021-08-01-on-being-pedantic-about-open-source.md b/gemfeed/2021-08-01-on-being-pedantic-about-open-source.md index a57e01aa..7fea060c 100644 --- a/gemfeed/2021-08-01-on-being-pedantic-about-open-source.md +++ b/gemfeed/2021-08-01-on-being-pedantic-about-open-source.md @@ -2,6 +2,8 @@ > Published at 2021-08-01T10:37:58+03:00; Updated at 2023-01-23 +I believe that it is essential to always have free and open-source alternatives to any kind of closed-source proprietary software available to choose from. But there are a couple of points you need to take into consideration. + ``` __ _____....--' .' @@ -14,7 +16,23 @@ '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^' LGB - Art by lgbearrd ``` -I believe that it is essential to always have free and open-source alternatives to any kind of closed-source proprietary software available to choose from. But there are a couple of points you need to take into consideration. +## Table of Contents + +* [⇢ On being Pedantic about Open-Source](#on-being-pedantic-about-open-source) +* [⇢ ⇢ The costs of open-source](#the-costs-of-open-source) +* [⇢ ⇢ Commercial providers](#commercial-providers) +* [⇢ ⇢ Earning on open-source](#earning-on-open-source) +* [⇢ ⇢ Open-source organizations and individual contributors](#open-source-organizations-and-individual-contributors) +* [⇢ ⇢ Lesser known projects and the charm of clunkiness](#lesser-known-projects-and-the-charm-of-clunkiness) +* [⇢ ⇢ The security aspect](#the-security-aspect) +* [⇢ ⇢ Always watch out for open-source alternatives](#always-watch-out-for-open-source-alternatives) +* [⇢ ⇢ What about mobile?](#what-about-mobile) +* [⇢ ⇢ Know the alternatives](#know-the-alternatives) +* [⇢ ⇢ You can't control it all](#you-can-t-control-it-all) +* [⇢ ⇢ The middle way](#the-middle-way) +* [⇢ ⇢ The downside of being a nobody](#the-downside-of-being-a-nobody) +* [⇢ ⇢ Mobile open-source OSes are still evolving](#mobile-open-source-oses-are-still-evolving) +* [⇢ ⇢ Conclusion](#conclusion) ## The costs of open-source diff --git a/gemfeed/2021-09-12-keep-it-simple-and-stupid.md b/gemfeed/2021-09-12-keep-it-simple-and-stupid.md index c596b881..8663debe 100644 --- a/gemfeed/2021-09-12-keep-it-simple-and-stupid.md +++ b/gemfeed/2021-09-12-keep-it-simple-and-stupid.md @@ -2,6 +2,8 @@ > Published at 2021-09-12T09:39:20+03:00; Updated at 2023-03-23 +A robust computer system must be kept simple and stupid (KISS). The fancier the system is, the more can break. Unfortunately, most systems tend to become complex and challenging to maintain in today's world. In the early days, so I was told, engineers understood every part of the system, but nowadays, we see more of the "lasagna" stack. One layer or framework is built on top of another layer, and in the end, nobody has got a clue what's going on. + ``` _______________ |*\_/*|_______ | ___________ | .-. .-. ||_/-\_|______ | @@ -17,25 +19,40 @@ -------------------- -------------------- ``` -A robust computer system must be kept simple and stupid (KISS). The fancier the system is, the more can break. Unfortunately, most systems tend to become complex and challenging to maintain in today's world. In the early days, so I was told, engineers understood every part of the system, but nowadays, we see more of the "lasagna" stack. One layer or framework is built on top of another layer, and in the end, nobody has got a clue what's going on. - -# Need faster hardware +## Table of Contents + +* [⇢ Keep it simple and stupid](#keep-it-simple-and-stupid) +* [⇢ ⇢ Need faster hardware](#need-faster-hardware) +* [⇢ ⇢ Too complex to be replaced](#too-complex-to-be-replaced) +* [⇢ ⇢ ⇢ On COBOL](#on-cobol) +* [⇢ ⇢ ⇢ On Kubernetes](#on-kubernetes) +* [⇢ ⇢ ⇢ The younger generation of IT professionals](#the-younger-generation-of-it-professionals) +* [⇢ ⇢ The bloated web](#the-bloated-web) +* [⇢ ⇢ Fancy log-management solutions](#fancy-log-management-solutions) +* [⇢ ⇢ More KISS](#more-kiss) +* [⇢ ⇢ ⇢ The Adslowbe PDF Reader](#the-adslowbe-pdf-reader) +* [⇢ ⇢ ⇢ The power of plain text files](#the-power-of-plain-text-files) +* [⇢ ⇢ ⇢ KISS for programmers](#kiss-for-programmers) +* [⇢ ⇢ When KISS is not KISS anymore](#when-kiss-is-not-kiss-anymore) +* [⇢ ⇢ Other relevant readings](#other-relevant-readings) + +## Need faster hardware This not just makes the system much more complex, difficult to maintain and challenging to troubleshoot, but also slow. So more experts are needed to support it. Also, newer and faster hardware is required to make it run smoothly. Often, it's so much easier to buy speedier hardware than rewrite a whole system from scratch from the bottom-up. The latter would require much more resources in the short run, but in the long run, it should pay off. Unfortunately, many project owners scare away from it as they only want to get their project done and then move on. -# Too complex to be replaced +## Too complex to be replaced -## On COBOL +### On COBOL Have a look at COBOL, a prevalent programming language of the past. No one is learning COBOL in college or university anymore, but many legacy systems still require COBOL experts. Why is this? It's just too scary to write everything from scratch. There's too much COBOL code out there that can't be replaced from today to tomorrow. [https://nymag.com/intelligencer/2020/04/what-is-cobol-what-does-it-have-to-do-with-the-coronavirus.html](https://nymag.com/intelligencer/2020/04/what-is-cobol-what-does-it-have-to-do-with-the-coronavirus.html) -## On Kubernetes +### On Kubernetes Now have a look at Kubernetes (k8s), the current trendy infrastructure thing to use nowadays. Of course, there are many benefits of using k8s (auto-scaling, reproducible deployments, dynamic resource allocation and resource sharing, saving of hardware costs, good commercial for potential employees as it is the current hot sauce of infrastructure). But all of this also comes with costs: You need experts operating the k8s cluster (or you need to pay extra for a managed cluster in the cloud), increased complexity of the system (k8s comes with a steep learning curve). The latter not only applies to the engineers managing the k8s cluster - it also applies to the software engineers, who now have to develop 'cloud native' applications and, therefore, have to change how they developed software how they used to. They all need to be re-educated on what cloud-native means, and they also need to understand the key concepts of k8s for writing optimal software for it. -## The younger generation of IT professionals +### The younger generation of IT professionals Maybe the younger generation knows all of this already after graduation, but then they are missing other critical parts of the system for sure. I have seen engineers who knew about containers and how to configure resource restrictions for a Docker container managed via k8s but have never heard the terms Linux control groups and Linux namespaces. So obviously, there is some knowledge gap of the underlying architecture. This can be a big problem when you have to troubleshoot such a system during a production incident and k8s adds a lot of abstraction to the mix which doesn't make it easier. @@ -51,7 +68,7 @@ And here is something to smile about: [https://christine.website/blog/theres-a-node-2021-10-02](https://christine.website/blog/theres-a-node-2021-10-02) -# The bloated web +## The bloated web Another example is the modern web. Have you ever wondered why the internet becomes slower and slower nowadays? The modern web is so much like lasagna that I decided to use Gemini to be the primary protocol of my website. The HTML version of this website is just a fallback as many visitors don't know what Gemini is and don't have any compatible software installed for surfing the Geminispace: @@ -59,7 +76,7 @@ Another example is the modern web. Have you ever wondered why the internet becom The Gemtext protocol is KISS. There's no way to do other formattings than headings, links, paragraphs, lists, quotes, and bare text blocks (e.g., ASCII art or code snippets). There's no way to create bloated Gemini sites, and due to its limited capabilities, there's also no way to commercialise it (e.g. there's no good way to track the site visitors as things like cookies don't exist). By design, the Gemini protocol can't be extended, so there is no chance to abuse it even in the future. Gemini sites will stay KISS forever, and there won't be any fancy HTML/JavaScript frameworks like we see on the modern web. -# Fancy log-management solutions +## Fancy log-management solutions Yet another example I want to bring up is DTail, the distributed log tail program I wrote. There are many great and fancy log-management solutions available to choose from, and they all seem complex to set up and maintain. The ELK stack, for example, requires you to operate an ElasticSearch cluster (or multiple, if you are geo-redundant), Logstash (different configurations and instances, depending on your infrastructure) and a Kibana web-frontend (which also needs to be highly available). I have operated ElasticSearch clusters on multiple occasions, and I must say that it is not an easy task to optimise it for the particular workload you might encounter. I also have seen many ES clusters operated by other people, and I have seen these clusters failing a lot (so it's not just me). The reduced complexity of DTail also makes it more robust against outages. You won't troubleshoot your distributed application very well if the log management infrastructure isn't working either. @@ -67,23 +84,23 @@ Yet another example I want to bring up is DTail, the distributed log tail progra I don't say that the ELK stack doesn't work, but it requires experts and additional hardware resources to support it. But instead, if you keep your infrastructure simple (e.g. only use DTail), it will maintain pretty much by itself. -# More KISS +## More KISS -## The Adslowbe PDF Reader +### The Adslowbe PDF Reader Another perfect example is the Adobe PDF reader. How can it be that the inventor of the PDF format creates such a terrible user experience with its official reader? The reader is awful bloated, and slow. There are much better alternatives around (especially for Linux and other UNIX like operating systems, look at Zathura for example). I believe the reason Adobe's reader is like this is featuritis, and 90% of the users don't use 90% of all available features. Less is more; keep it simple and stupid. -## The power of plain text files +### The power of plain text files Speaking of file formats, never underestimate the power of plain text files. Plain text files don't require any special software to be opened, and they outlive the software which created them in the first place. You will still be able to read a plain text file on a modern computer system ten (or twenty) years from now, but you probably won't be able to read such an old version of an Adobe Photoshop image file if the software required for reading that format isn't supported anymore and doesn't run anymore on modern computers. -## KISS for programmers +### KISS for programmers Not to mention, keeping things simple and stupid also reduces the potential malicious attack surface. It's not just about the software and services you use and operate. It's also about the software you write. Here is a nice article about the KISS principle in software development: [https://thevaluable.dev/kiss-principle-explained/](https://thevaluable.dev/kiss-principle-explained/) -# When KISS is not KISS anymore +## When KISS is not KISS anymore There is, however, a trap. The more you spend time with things, the more these things feel natural to you and you become an expert. The more you become an expert, the more you introduce more abstractions and other clever ways of doing things. For you, things seem to be KISS still, but another person may not be an expert and might not understand what you do. One of the fundamental challenges is to keep things really KISS. You might add abstraction upon abstraction to a system and don't even notice it until it is too late. @@ -94,13 +111,14 @@ There is, however, a trap. The more you spend time with things, the more these t Enough ranted for now! +E-Mail your comments to `paul@nospam.buetow.org` :-) + Other KISS-related posts are: -[2021-09-12 Keep it simple and stupid (You are currently reading this)](./2021-09-12-keep-it-simple-and-stupid.md) -[2023-06-01 KISS server monitoring with Gogios](./2023-06-01-kiss-server-monitoring-with-gogios.md) +[2024-04-01 KISS high-availability with OpenBSD](./2024-04-01-KISS-high-availability-with-OpenBSD.md) [2023-10-29 KISS static web photo albums with `photoalbum.sh`](./2023-10-29-kiss-static-web-photo-albums-with-photoalbum.sh.md) - -E-Mail your comments to `paul@nospam.buetow.org` :-) +[2023-06-01 KISS server monitoring with Gogios](./2023-06-01-kiss-server-monitoring-with-gogios.md) +[2021-09-12 Keep it simple and stupid (You are currently reading this)](./2021-09-12-keep-it-simple-and-stupid.md) > Controversially, a lack of features is a feature. Enjoy your peace an quiet. - Michael W Lucas diff --git a/gemfeed/2021-10-22-defensive-devops.md b/gemfeed/2021-10-22-defensive-devops.md index d46311ff..2fa5849a 100644 --- a/gemfeed/2021-10-22-defensive-devops.md +++ b/gemfeed/2021-10-22-defensive-devops.md @@ -2,6 +2,16 @@ > Published at 2021-10-22T10:02:46+03:00 +I have seen many different setups and infrastructures during my carreer. My roles always included front-line ad-hoc fire fighting production issues. This often involves identifying and fixing these under time pressure, without the comfort of 2-week-long SCRUM sprints and without an exhaustive QA process. I also wrote a lot of code (Bash, Ruby, Perl, Go, and a little Java), and I followed the typical software development process, but that did not always apply to critical production issues. + +Unfortunately, no system is 100% reliable, and you can never be prepared for a subset of the possible problem-space. IT infrastructures can be complex. Not even mentioning Kubernetes yet, a Microservice-based infrastructure can complicate things even further. You can take care of 99% of all potential problems by following all DevOps best practices. Those best practices are not the subject of this blog post; this post is about the sub 1% of the issues arising from nowhere you can't be prepared for. + +Is there a software bug in a production, even though the software passed QA (after all, it is challenging to reproduce production behaviour in an artificial testing environment) and the software didn't show any issues running in production until a special case came up just now after it got deployed to production a week ago? Are there multiple hardware failure happening which causes loss of service redundancy or data inaccessibility? Is the automation of external customers connected to our infrastructure putting unexpectedly extra pressure on your grid, driving higher latencies and putting the SLAs at risk? You bet the solution is: Sysadmins, SREs and DevOps Engineers to the rescue. + +You agree that fixing production issues this way is not proactive but rather reactive. I prefer to call it defensive, though, as you "defend" your system against a production issue. But, at the same time, you have to take a cautious (defensive) approach to fix it, as you don't want to make things worse. + +Over time, I have compiled a list of fire-fighting automation strategies, which I would like to share here. + ``` c=====e H @@ -12,15 +22,17 @@ ASCII Art by Clyde Watson ``` -I have seen many different setups and infrastructures during my carreer. My roles always included front-line ad-hoc fire fighting production issues. This often involves identifying and fixing these under time pressure, without the comfort of 2-week-long SCRUM sprints and without an exhaustive QA process. I also wrote a lot of code (Bash, Ruby, Perl, Go, and a little Java), and I followed the typical software development process, but that did not always apply to critical production issues. - -Unfortunately, no system is 100% reliable, and you can never be prepared for a subset of the possible problem-space. IT infrastructures can be complex. Not even mentioning Kubernetes yet, a Microservice-based infrastructure can complicate things even further. You can take care of 99% of all potential problems by following all DevOps best practices. Those best practices are not the subject of this blog post; this post is about the sub 1% of the issues arising from nowhere you can't be prepared for. - -Is there a software bug in a production, even though the software passed QA (after all, it is challenging to reproduce production behaviour in an artificial testing environment) and the software didn't show any issues running in production until a special case came up just now after it got deployed to production a week ago? Are there multiple hardware failure happening which causes loss of service redundancy or data inaccessibility? Is the automation of external customers connected to our infrastructure putting unexpectedly extra pressure on your grid, driving higher latencies and putting the SLAs at risk? You bet the solution is: Sysadmins, SREs and DevOps Engineers to the rescue. - -You agree that fixing production issues this way is not proactive but rather reactive. I prefer to call it defensive, though, as you "defend" your system against a production issue. But, at the same time, you have to take a cautious (defensive) approach to fix it, as you don't want to make things worse. - -Over time, I have compiled a list of fire-fighting automation strategies, which I would like to share here. +## Table of Contents + +* [⇢ Defensive DevOps](#defensive-devops) +* [⇢ ⇢ Meet Defensive DevOps](#meet-defensive-devops) +* [⇢ ⇢ Don't fully automate from the beginning](#don-t-fully-automate-from-the-beginning) +* [⇢ ⇢ Develop code directly on production systems](#develop-code-directly-on-production-systems) +* [⇢ ⇢ ⇢ Don't make it worse](#don-t-make-it-worse) +* [⇢ ⇢ Test your code](#test-your-code) +* [⇢ ⇢ Automation](#automation) +* [⇢ ⇢ Out of office hours](#out-of-office-hours) +* [⇢ ⇢ Retrospective](#retrospective) ## Meet Defensive DevOps diff --git a/gemfeed/2021-11-29-bash-golf-part-1.md b/gemfeed/2021-11-29-bash-golf-part-1.md index 60c4ed08..bc9ec420 100644 --- a/gemfeed/2021-11-29-bash-golf-part-1.md +++ b/gemfeed/2021-11-29-bash-golf-part-1.md @@ -2,6 +2,12 @@ > Published at 2021-11-29T14:06:14+00:00; Updated at 2022-01-05 +This is the first blog post about my Bash Golf series. This series is about random Bash tips, tricks and weirdnesses I came across. It's a collection of smaller articles I wrote in an older (in German language) blog, which I translated and refreshed with some new content. + +[2021-11-29 Bash Golf Part 1 (You are currently reading this)](./2021-11-29-bash-golf-part-1.md) +[2022-01-01 Bash Golf Part 2](./2022-01-01-bash-golf-part-2.md) +[2023-12-10 Bash Golf Part 3](./2023-12-10-bash-golf-part-3.md) + ``` '\ . . |>18>> @@ -14,10 +20,17 @@ jgs^^^^^^^`^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Art by Joan Stark ``` -This is the first blog post about my Bash Golf series. This series is about random Bash tips, tricks and weirdnesses I came across. It's a collection of smaller articles I wrote in an older (in German language) blog, which I translated and refreshed with some new content. +## Table of Contents -[2021-11-29 Bash Golf Part 1 (You are currently reading this)](./2021-11-29-bash-golf-part-1.md) -[2022-01-01 Bash Golf Part 2](./2022-01-01-bash-golf-part-2.md) +* [⇢ Bash Golf Part 1](#bash-golf-part-1) +* [⇢ ⇢ TCP/IP networking](#tcpip-networking) +* [⇢ ⇢ Process substitution](#process-substitution) +* [⇢ ⇢ Grouping](#grouping) +* [⇢ ⇢ Expansions](#expansions) +* [⇢ ⇢ - aka stdin and stdout placeholder](#--aka-stdin-and-stdout-placeholder) +* [⇢ ⇢ Alternative argument passing](#alternative-argument-passing) +* [⇢ ⇢ : aka the null command](#-aka-the-null-command) +* [⇢ ⇢ (No) floating point support](#no-floating-point-support) ## TCP/IP networking @@ -463,13 +476,14 @@ In the Bash you will have to fall back to an external command like "bc" (the arb See you later for the next post of this series. +E-Mail your comments to `paul@nospam.buetow.org` :-) + Other related posts are: -[2021-05-16 Personal Bash coding style guide](./2021-05-16-personal-bash-coding-style-guide.md) -[2021-06-05 Gemtexter - One Bash script to rule it all](./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md) -[2021-11-29 Bash Golf Part 1 (You are currently reading this)](./2021-11-29-bash-golf-part-1.md) +[2023-12-10 Bash Golf Part 3](./2023-12-10-bash-golf-part-3.md) [2022-01-01 Bash Golf Part 2](./2022-01-01-bash-golf-part-2.md) - -E-Mail your comments to `paul@nospam.buetow.org` :-) +[2021-11-29 Bash Golf Part 1 (You are currently reading this)](./2021-11-29-bash-golf-part-1.md) +[2021-06-05 Gemtexter - One Bash script to rule it all](./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md) +[2021-05-16 Personal Bash coding style guide](./2021-05-16-personal-bash-coding-style-guide.md) [Back to the main site](../) diff --git a/gemfeed/2021-12-26-how-to-stay-sane-as-a-devops-person.md b/gemfeed/2021-12-26-how-to-stay-sane-as-a-devops-person.md index 03367c30..72b3486d 100644 --- a/gemfeed/2021-12-26-how-to-stay-sane-as-a-devops-person.md +++ b/gemfeed/2021-12-26-how-to-stay-sane-as-a-devops-person.md @@ -2,6 +2,12 @@ > Published at 2021-12-26T12:02:02+00:00; Updated at 2022-01-12 +Log4shell (CVE-2021-44228) made it clear, once again, that working in information technology is not an easy job (especially when you are a DevOps person). I thought it would be interesting to summarize a few techniques to help you to relax. + +(PS: When I mean DevOps, I also mean Site Reliability Engineers and Sysadmins. I believe SRE, DevOps Engineer and Sysadmin are just synonym titles for the same job). + +[https://en.wikipedia.org/wiki/Log4Shell](https://en.wikipedia.org/wiki/Log4Shell) + ``` ) ) (( ( @@ -22,13 +28,25 @@ ||| \ __/_|| __||__ -----||-/------`-._/||-o--o---o--- ~~~~~' -``` - -Log4shell (CVE-2021-44228) made it clear, once again, that working in information technology is not an easy job (especially when you are a DevOps person). I thought it would be interesting to summarize a few techniques to help you to relax. - -(PS: When I mean DevOps, I also mean Site Reliability Engineers and Sysadmins. I believe SRE, DevOps Engineer and Sysadmin are just synonym titles for the same job). - -[https://en.wikipedia.org/wiki/Log4Shell](https://en.wikipedia.org/wiki/Log4Shell) +``` + +## Table of Contents + +* [⇢ How to stay sane as a DevOps person ](#how-to-stay-sane-as-a-devops-person-) +* [⇢ ⇢ Set clear expectations](#set-clear-expectations) +* [⇢ ⇢ Always respond to requests but set expectations and boundaries](#always-respond-to-requests-but-set-expectations-and-boundaries) +* [⇢ ⇢ ⇢ Dealing with requests](#dealing-with-requests) +* [⇢ ⇢ ⇢ Escalation is only a tool](#escalation-is-only-a-tool) +* [⇢ ⇢ Think positively](#think-positively) +* [⇢ ⇢ Go slower even if you could go faster](#go-slower-even-if-you-could-go-faster) +* [⇢ ⇢ ⇢ You work in a team](#you-work-in-a-team) +* [⇢ ⇢ ⇢ Don't rush](#don-t-rush) +* [⇢ ⇢ You are not a superhero](#you-are-not-a-superhero) +* [⇢ ⇢ ⇢ Give away some of your superpowers](#give-away-some-of-your-superpowers) +* [⇢ ⇢ Don't jump on all problems immediately](#don-t-jump-on-all-problems-immediately) +* [⇢ ⇢ Force breaks; and shutdown now](#force-breaks-and-shutdown-now) +* [⇢ ⇢ Block time every day for personal advance](#block-time-every-day-for-personal-advance) +* [⇢ ⇢ More](#more) ## Set clear expectations diff --git a/gemfeed/2022-01-01-bash-golf-part-2.md b/gemfeed/2022-01-01-bash-golf-part-2.md index f9792a39..84238b32 100644 --- a/gemfeed/2022-01-01-bash-golf-part-2.md +++ b/gemfeed/2022-01-01-bash-golf-part-2.md @@ -2,6 +2,12 @@ > Published at 2022-01-01T23:36:15+00:00; Updated at 2022-01-05 +This is the second blog post about my Bash Golf series. This series is random Bash tips, tricks and weirdnesses I came across. It's a collection of smaller articles I wrote in an older (in German language) blog, which I translated and refreshed with some new content. + +[2021-11-29 Bash Golf Part 1](./2021-11-29-bash-golf-part-1.md) +[2022-01-01 Bash Golf Part 2 (You are currently reading this)](./2022-01-01-bash-golf-part-2.md) +[2023-12-10 Bash Golf Part 3](./2023-12-10-bash-golf-part-3.md) + ``` '\ '\ . . |>18>> @@ -14,10 +20,16 @@ jgs^^^^^^^`^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Art by Joan Stark, mod. by Paul Buetow ``` -This is the second blog post about my Bash Golf series. This series is random Bash tips, tricks and weirdnesses I came across. It's a collection of smaller articles I wrote in an older (in German language) blog, which I translated and refreshed with some new content. +## Table of Contents -[2021-11-29 Bash Golf Part 1](./2021-11-29-bash-golf-part-1.md) -[2022-01-01 Bash Golf Part 2 (You are currently reading this)](./2022-01-01-bash-golf-part-2.md) +* [⇢ Bash Golf Part 2](#bash-golf-part-2) +* [⇢ ⇢ Redirection](#redirection) +* [⇢ ⇢ HERE](#here) +* [⇢ ⇢ RANDOM](#random) +* [⇢ ⇢ set -x and set -e and pipefile](#set--x-and-set--e-and-pipefile) +* [⇢ ⇢ ⇢ -x](#-x) +* [⇢ ⇢ ⇢ -e](#-e) +* [⇢ ⇢ ⇢ pipefail](#pipefail) ## Redirection @@ -47,6 +59,8 @@ Foo Foo ``` +> Update: A reader pointed out, that the redirection should actually go to `/proc/self/fd/1` and not `0`. But apparently, either way works for this particular example. Do you know why? + Other useful redirections are: * Redirect stderr to stdin: "echo foo 2>&1" @@ -480,13 +494,14 @@ To change this behaviour, pipefile can be used. Now, the pipes exit status is 1 1 ``` +E-Mail your comments to `paul@nospam.buetow.org` :-) + Other related posts are: -[2021-05-16 Personal Bash coding style guide](./2021-05-16-personal-bash-coding-style-guide.md) -[2021-06-05 Gemtexter - One Bash script to rule it all](./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md) -[2021-11-29 Bash Golf Part 1](./2021-11-29-bash-golf-part-1.md) +[2023-12-10 Bash Golf Part 3](./2023-12-10-bash-golf-part-3.md) [2022-01-01 Bash Golf Part 2 (You are currently reading this)](./2022-01-01-bash-golf-part-2.md) - -E-Mail your comments to `paul@nospam.buetow.org` :-) +[2021-11-29 Bash Golf Part 1](./2021-11-29-bash-golf-part-1.md) +[2021-06-05 Gemtexter - One Bash script to rule it all](./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md) +[2021-05-16 Personal Bash coding style guide](./2021-05-16-personal-bash-coding-style-guide.md) [Back to the main site](../) diff --git a/gemfeed/2022-02-04-computer-operating-systems-i-use.md b/gemfeed/2022-02-04-computer-operating-systems-i-use.md index 67f068f6..ea88b859 100644 --- a/gemfeed/2022-02-04-computer-operating-systems-i-use.md +++ b/gemfeed/2022-02-04-computer-operating-systems-i-use.md @@ -2,6 +2,8 @@ > Published at 2022-02-04T09:58:22+00:00; Updated at 2022-02-18 +This is a list of Operating Systems I currently use. This list is in no particular order and also will be updated over time. The very first operating system I used was MS-DOS (mainly for games) and the very first Unix like operating system I used was SuSE Linux 5.3. My first smartphone OS was Symbian on a clunky Sony Ericsson device. + ``` /( )` \ \___ / | @@ -23,7 +25,29 @@ `--{__________) \/ "Berkeley Unix Daemon" ``` -This is a list of Operating Systems I currently use. This list is in no particular order and also will be updated over time. The very first operating system I used was MS-DOS (mainly for games) and the very first Unix like operating system I used was SuSE Linux 5.3. My first smartphone OS was Symbian on a clunky Sony Ericsson device. +## Table of Contents + +* [⇢ Computer operating systems I use(d)](#computer-operating-systems-i-used) +* [⇢ ⇢ Fedora Linux](#fedora-linux) +* [⇢ ⇢ EndeavourOS](#endeavouros) +* [⇢ ⇢ FreeBSD](#freebsd) +* [⇢ ⇢ CentOS 7](#centos-7) +* [⇢ ⇢ OpenBSD](#openbsd) +* [⇢ ⇢ macOS (proprietary)](#macos-proprietary) +* [⇢ ⇢ LineageOS (mobile)](#lineageos-mobile) +* [⇢ ⇢ Samsung's Stock Android (mobile proprietary)](#samsung-s-stock-android-mobile-proprietary) +* [⇢ ⇢ iOS (mobile proprietary)](#ios-mobile-proprietary) +* [⇢ ⇢ Other OSes](#other-oses) +* [⇢ ⇢ ⇢ InfinyTime (smartwatch)](#infinytime-smartwatch) +* [⇢ ⇢ ⇢ motionEyeOS](#motioneyeos) +* [⇢ ⇢ ⇢ Kobo OS (proprietary)](#kobo-os-proprietary) +* [⇢ ⇢ ⇢ Android TV (proprietary)](#android-tv-proprietary) +* [⇢ ⇢ Other OSes..](#other-oses) +* [⇢ ⇢ ⇢ NetBSD](#netbsd) +* [⇢ ⇢ ⇢ Other OSes in use...](#other-oses-in-use) +* [⇢ ⇢ ⇢ Other OSes not used any more...](#other-oses-not-used-any-more) +* [⇢ ⇢ ⇢ Other OSes I only had a glance at...](#other-oses-i-only-had-a-glance-at) +* [⇢ ⇢ ⇢ Other OSes which seem interesting...](#other-oses-which-seem-interesting) ## Fedora Linux diff --git a/gemfeed/2022-03-06-the-release-of-dtail-4.0.0.md b/gemfeed/2022-03-06-the-release-of-dtail-4.0.0.md index dcfcea69..e3de21e0 100644 --- a/gemfeed/2022-03-06-the-release-of-dtail-4.0.0.md +++ b/gemfeed/2022-03-06-the-release-of-dtail-4.0.0.md @@ -2,6 +2,10 @@ > Published at 2022-03-06T18:11:39+00:00 +I have recently released DTail 4.0.0 and this blog post goes through all the new goodies. If you want to jump directly to DTail, do it here (there are nice animated gifs which demonstrates the usage pretty well): + +[https://dtail.dev](https://dtail.dev) + ``` ,_---~~~~~----._ _,,_,*^____ _____``*g*\"*, @@ -16,9 +20,22 @@ | | ``` -I have recently released DTail 4.0.0 and this blog post goes through all the new goodies. If you want to jump directly to DTail, do it here (there are nice animated gifs which demonstrates the usage pretty well): - -[https://dtail.dev](https://dtail.dev) +## Table of Contents + +* [⇢ The release of DTail 4.0.0](#the-release-of-dtail-400) +* [⇢ ⇢ So, what's new in 4.0.0?](#so-what-s-new-in-400) +* [⇢ ⇢ ⇢ Rewritten logging](#rewritten-logging) +* [⇢ ⇢ ⇢ Configurable terminal color codes](#configurable-terminal-color-codes) +* [⇢ ⇢ ⇢ Serverless mode](#serverless-mode) +* [⇢ ⇢ ⇢ Shorthand flags](#shorthand-flags) +* [⇢ ⇢ ⇢ Spartan (aka plain) mode](#spartan-aka-plain-mode) +* [⇢ ⇢ ⇢ Standard input pipe](#standard-input-pipe) +* [⇢ ⇢ ⇢ New command dtailhealth](#new-command-dtailhealth) +* [⇢ ⇢ ⇢ Improved documentation](#improved-documentation) +* [⇢ ⇢ ⇢ Integration testing suite](#integration-testing-suite) +* [⇢ ⇢ ⇢ Improved code](#improved-code) +* [⇢ ⇢ ⇢ Use of memory pools](#use-of-memory-pools) +* [⇢ ⇢ What's next](#what-s-next) ## So, what's new in 4.0.0? @@ -286,17 +303,17 @@ I use usually DTail at work, but I have recently installed it on my personal Ope I am a bit busy at the moment with two other pet projects of mine (one internal work-project, and one personal one, the latter you will read about in the next couple of months). If you have ideas (or even a patch), then please don't hesitate to contact me (either via E-Mail or a request at GitHub). +E-Mail your comments to `paul@nospam.buetow.org` :-) + Other related posts are: -[2021-04-22 DTail - The distributed log tail program](./2021-04-22-dtail-the-distributed-log-tail-program.md) -[2022-03-06 The release of DTail 4.0.0 (You are currently reading this)](./2022-03-06-the-release-of-dtail-4.0.0.md) -[2022-10-30 Installing DTail on OpenBSD](./2022-10-30-installing-dtail-on-openbsd.md) [2023-09-25 DTail usage examples](./2023-09-25-dtail-usage-examples.md) +[2022-10-30 Installing DTail on OpenBSD](./2022-10-30-installing-dtail-on-openbsd.md) +[2022-03-06 The release of DTail 4.0.0 (You are currently reading this)](./2022-03-06-the-release-of-dtail-4.0.0.md) +[2021-04-22 DTail - The distributed log tail program](./2021-04-22-dtail-the-distributed-log-tail-program.md) Thanks! Paul -E-Mail your comments to `paul@nospam.buetow.org` :-) - [Back to the main site](../) diff --git a/gemfeed/2022-04-10-creative-universe.md b/gemfeed/2022-04-10-creative-universe.md index f884dc1b..ff464c96 100644 --- a/gemfeed/2022-04-10-creative-universe.md +++ b/gemfeed/2022-04-10-creative-universe.md @@ -2,6 +2,22 @@ > Published at 2022-04-10T10:09:11+01:00; Updated at 2022-04-18 +I have been participating in an annual work-internal project contest (we call it Pet Project contest) since I moved to London and switched jobs to my current employer. I am very happy to say that I won a "silver" prize last week here 🎆. Over the last couple of years I have been a finalist in this contest six times and won some kind of prize five times. Some of my projects were also released as open source software. One had a magazine article published, and for another one I wrote an article on my employer's engineering blog. If you have followed all my posts on this blog (the one you are currently reading), then you have probably figured out what these projects were: + +[DTail - The distributed log tail program](./2021-04-22-dtail-the-distributed-log-tail-program.md) +[Realistic load testing with I/O Riot for linux](./2018-06-01-realistic-load-testing-with-ioriot-for-linux.md) + +Note that my latest silver prize project isn't open source software and because of that there is no public material I can refer to. Maybe the next one again? + +I want to point out that I never won the "gold" prize and it's the first time I won "silver", though. I believe, looking at the company's contest history, I am the employee with the most consecutive successful project submissions (my streak broke as I didn't participate last year) and am also the one with the highest successful project count in total. Sorry if this all sounds a bit self-promotional, but I think it is something to be proud of. Consistency beats a one-off success. + +I often put endless hours and sometimes sleepless nights into such projects and all of that in my own time. I, an engineer whose native tongue is not English, also have to present such a project in front of the CEO, CTO and CPO, the Chief Scientist, the founders of the company, and, if it is not enough, to all other staff of the company too. I usually also demonstrate a working prototype live on a production grid during the presentation. 😓 + +So why would I sign up myself for such side projects? Isn't it a lot of stress and extra work? Besides the prize in form of money (you can not count on that, you may win or you may not win something) and recognition, there are also other motivational points: + +* I want to learn new technologies or to deepen my knowledge of a given technology. I want to have a personal benefit from the project, even when I don't win any prize. So when the company is offering a contest, why not use it as a motivational trampoline? It's good to have a hard deadline for a project. And the project will also benefit the company in some way. So it's a win-win. +* I love the idea of combining several old things into a new thing. You can call this creativity. At work, we call this sometimes Lego: Building new things from given blocks. But I also love to add something new and unique to the mix, something that didn't exist as a Lego block before and could not be built by using only the already existing blocks. + ``` . + . . . . . . . . . * @@ -23,23 +39,18 @@ - the universe ``` -## Prelude +## Table of Contents -I have been participating in an annual work-internal project contest (we call it Pet Project contest) since I moved to London and switched jobs to my current employer. I am very happy to say that I won a "silver" prize last week here 🎆. Over the last couple of years I have been a finalist in this contest six times and won some kind of prize five times. Some of my projects were also released as open source software. One had a magazine article published, and for another one I wrote an article on my employer's engineering blog. If you have followed all my posts on this blog (the one you are currently reading), then you have probably figured out what these projects were: - -[DTail - The distributed log tail program](./2021-04-22-dtail-the-distributed-log-tail-program.md) -[Realistic load testing with I/O Riot for linux](./2018-06-01-realistic-load-testing-with-ioriot-for-linux.md) - -Note that my latest silver prize project isn't open source software and because of that there is no public material I can refer to. Maybe the next one again? - -I want to point out that I never won the "gold" prize and it's the first time I won "silver", though. I believe, looking at the company's contest history, I am the employee with the most consecutive successful project submissions (my streak broke as I didn't participate last year) and am also the one with the highest successful project count in total. Sorry if this all sounds a bit self-promotional, but I think it is something to be proud of. Consistency beats a one-off success. - -I often put endless hours and sometimes sleepless nights into such projects and all of that in my own time. I, an engineer whose native tongue is not English, also have to present such a project in front of the CEO, CTO and CPO, the Chief Scientist, the founders of the company, and, if it is not enough, to all other staff of the company too. I usually also demonstrate a working prototype live on a production grid during the presentation. 😓 - -So why would I sign up myself for such side projects? Isn't it a lot of stress and extra work? Besides the prize in form of money (you can not count on that, you may win or you may not win something) and recognition, there are also other motivational points: - -* I want to learn new technologies or to deepen my knowledge of a given technology. I want to have a personal benefit from the project, even when I don't win any prize. So when the company is offering a contest, why not use it as a motivational trampoline? It's good to have a hard deadline for a project. And the project will also benefit the company in some way. So it's a win-win. -* I love the idea of combining several old things into a new thing. You can call this creativity. At work, we call this sometimes Lego: Building new things from given blocks. But I also love to add something new and unique to the mix, something that didn't exist as a Lego block before and could not be built by using only the already existing blocks. +* [⇢ Creative universe](#creative-universe) +* [⇢ ⇢ How to be creative](#how-to-be-creative) +* [⇢ ⇢ ⇢ Know which problem you want to solve](#know-which-problem-you-want-to-solve) +* [⇢ ⇢ ⇢ Immerse / deep dive](#immerse--deep-dive) +* [⇢ ⇢ ⇢ Always have a notebook with you](#always-have-a-notebook-with-you) +* [⇢ ⇢ ⇢ When you didn't sleep enough](#when-you-didn-t-sleep-enough) +* [⇢ ⇢ ⇢ Have regular breaks and relax](#have-regular-breaks-and-relax) +* [⇢ ⇢ ⇢ Upside-down approach](#upside-down-approach) +* [⇢ ⇢ ⇢ Don't be busy all the time](#don-t-be-busy-all-the-time) +* [⇢ ⇢ Conclusion](#conclusion) ## How to be creative @@ -79,7 +90,7 @@ I am not saying that you should skip sleep. By all means, if you can sleep, then Have regular breaks. Don't skip your lunch break. Best, have a walk during lunchtime. And after work, do some kind of workout or visit a sports class. Do something completely unrelated to work before going to sleep (e.g. visit a parallel universe and read a Science Fiction novel). In short: Totally hit the off-switch after your work for the day is finished. You will be much more energised and motivated the next time you open your work laptop. -[I personally love to read Science Fiction novels](../other-resources.md) +[I personally love to read Science Fiction novels](../about/novels.md) I skip breakfast and lunch during the week. This means that on average, I intermittent fast on average 18-20 hours daily. It may sound odd to most people (who don't intermittent fast), but in a fasted state, I can be even more focused, thus helping me immerse myself in something even more. Not having breakfast and lunch also gives me back some time for other things (e.g. a nice walk, where I listen to podcasts or audiobooks or practise using my camera (street photography)). I relax my routine during the week ends, where I may enjoy a meal at any given time of the day. diff --git a/gemfeed/2022-05-27-perl-is-still-a-great-choice.md b/gemfeed/2022-05-27-perl-is-still-a-great-choice.md index a1c9712e..aa856001 100644 --- a/gemfeed/2022-05-27-perl-is-still-a-great-choice.md +++ b/gemfeed/2022-05-27-perl-is-still-a-great-choice.md @@ -2,13 +2,11 @@ > Published at 2022-05-27T07:50:12+01:00; Updated at 2023-01-28 -[](./2022-05-27-perl-is-still-a-great-choice/regular_expressions.png) - Perl (the Practical Extraction and Report Language) is a battle-tested, mature, multi-paradigm dynamic programming language. Note that it's not called PERL, neither P.E.R.L. nor Pearl. "Perl" is the name of the language and `perl` the name of the interpreter or the interpreter command. Unfortunately (it makes me sad), Perl's popularity has been declining over the last years as Google trends shows: -[](./2022-05-27-perl-is-still-a-great-choice/googletrendsperl.jpg) +[](./perl-is-still-a-great-choice/googletrendsperl.jpg) So why is that? Once the de-facto standard super-glue language for the web nowadays seems to have a bad reputation. Often, people state: @@ -17,6 +15,17 @@ So why is that? Once the de-facto standard super-glue language for the web nowad * Why use Perl as there are better alternatives? * Why all the sigils? It looks like an exploding ASCII factory!! +[](./perl-is-still-a-great-choice/regular_expressions.png) + +## Table of Contents + +* [⇢ Perl is still a great choice](#perl-is-still-a-great-choice) +* [⇢ ⇢ Write-only language](#write-only-language) +* [⇢ ⇢ Is Perl abandoned?](#is-perl-abandoned) +* [⇢ ⇢ Why use Perl as there are better alternatives?](#why-use-perl-as-there-are-better-alternatives) +* [⇢ ⇢ Why all the sigils? It looks like an exploding ASCII factory!!](#why-all-the-sigils-it-looks-like-an-exploding-ascii-factory) +* [⇢ ⇢ Where do I personally still use perl?](#where-do-i-personally-still-use-perl) + ## Write-only language Is Perl really a write-only language? You have to understand that Perl 5 was released in 1994 (28 years ago as of this writing) and when we refer to Perl we usually mean Perl 5. That's many years, and there are many old scripts not following the modern Perl best practices (as they didn't exist yet). So yes, legacy scripts may be difficult to read. Japanese may be difficult to read too if you don't know Japanese, though. @@ -134,13 +143,13 @@ Btw.: Did you know that the first version of PHP was a set of Perl snippets? Onl [Why Perl is still relevant in 2022](https://stackoverflow.blog/2022/07/06/why-perl-is-still-relevant-in-2022/) +E-Mail your comments to `paul@nospam.buetow.org` :-) + Other related posts are: -[2008-06-26 Perl Poetry](./2008-06-26-perl-poetry.md) -[2011-05-07 Perl Daemon (Service Framework)](./2011-05-07-perl-daemon-service-framework.md) -[2022-05-27 Perl is still a great choice (You are currently reading this)](./2022-05-27-perl-is-still-a-great-choice.md) [2023-05-01 Unveiling `guprecords.raku`: Global Uptime Records with Raku](./2023-05-01-unveiling-guprecords:-uptime-records-with-raku.md) - -E-Mail your comments to `paul@nospam.buetow.org` :-) +[2022-05-27 Perl is still a great choice (You are currently reading this)](./2022-05-27-perl-is-still-a-great-choice.md) +[2011-05-07 Perl Daemon (Service Framework)](./2011-05-07-perl-daemon-service-framework.md) +[2008-06-26 Perl Poetry](./2008-06-26-perl-poetry.md) [Back to the main site](../) diff --git a/gemfeed/2022-06-15-sweating-the-small-stuff.md b/gemfeed/2022-06-15-sweating-the-small-stuff.md index bf4b2549..43807184 100644 --- a/gemfeed/2022-06-15-sweating-the-small-stuff.md +++ b/gemfeed/2022-06-15-sweating-the-small-stuff.md @@ -2,14 +2,6 @@ > Published at 2022-06-15T08:47:44+01:00; Updated at 2022-06-18 -``` - _ - /_/_ .'''. - =O(_)))) ...' `. - jgs \_\ `. .''' - `..' -``` - This blog post is a bit different from the others. It consists of multiple but smaller projects worth mentioning. I got inspired by Julia Evan's "Tiny programs" blog post and the side projects of The Sephist, so I thought I would also write a blog posts listing a couple of small projects of mine: [Tiny programs](https://jvns.ca/blog/2022/03/08/tiny-programs/) @@ -19,6 +11,39 @@ Working on tiny projects is a lot of fun as you don't need to worry about any st But before going through the tiny projects let's take a paragraph for the `1y` anniversary retrospective. +``` + _ + /_/_ .'''. + =O(_)))) ...' `. + jgs \_\ `. .''' + `..' +``` + +## Table of Contents + +* [⇢ Sweating the small stuff - Tiny projects of mine](#sweating-the-small-stuff---tiny-projects-of-mine) +* [⇢ ⇢ `1y` anniversary](#1y-anniversary) +* [⇢ ⇢ Static photo album generator](#static-photo-album-generator) +* [⇢ ⇢ ⇢ The Irregular Ninja](#the-irregular-ninja) +* [⇢ ⇢ Random journal page extractor](#random-journal-page-extractor) +* [⇢ ⇢ Global uptime records statistic generator](#global-uptime-records-statistic-generator) +* [⇢ ⇢ Server configuration management](#server-configuration-management) +* [⇢ ⇢ Fancy SSH execution loop](#fancy-ssh-execution-loop) +* [⇢ ⇢ A KISS dynamic DNS solution](#a-kiss-dynamic-dns-solution) +* [⇢ ⇢ CPU information gatherer for Linux](#cpu-information-gatherer-for-linux) +* [⇢ ⇢ Show differences of two files over the network](#show-differences-of-two-files-over-the-network) +* [⇢ ⇢ Delay sending out E-Mails with Mutt](#delay-sending-out-e-mails-with-mutt) +* [⇢ ⇢ Graphical UI for sending text messages](#graphical-ui-for-sending-text-messages) +* [⇢ ⇢ IPv6 and IPv4 connectivity testing site](#ipv6-and-ipv4-connectivity-testing-site) +* [⇢ ⇢ List open Jira tickets in the terminal](#list-open-jira-tickets-in-the-terminal) +* [⇢ ⇢ Debian running on "your" Android phone](#debian-running-on-your-android-phone) +* [⇢ ⇢ Perl service framework](#perl-service-framework) +* [⇢ ⇢ More](#more) +* [⇢ ⇢ ⇢ Work time tracker](#work-time-tracker) +* [⇢ ⇢ ⇢ Password and document store](#password-and-document-store) +* [⇢ ⇢ ⇢ Backup procedure](#backup-procedure) +* [⇢ ⇢ konpeito.media](#konpeitomedia) + ## `1y` anniversary It has been one year since I started posting regularly (at least once monthly) on this blog again. It has been a lot of fun (and work) doing so for various reasons: @@ -47,7 +72,7 @@ But now, let's continue with the small projects worth mentioning :-) Photography is one of my casual hobbies. I love to capture interesting perspectives and motifs. I love to walk new streets and neighbourhoods I never walked before so I can capture those unexpected motifs, colours and moments. Unfortunately, because of time constraints (and sometime weather constraints), I do that on a pretty infrequent basis. -[](./2022-06-15-sweating-the-small-stuff/ninja.jpg) +[](./sweating-the-small-stuff/ninja.jpg) More than 10 years ago I wrote the bespoke small static photo album generator in Bash `photoalbum.sh` which I recently refactored to a modern Bash coding style and also freshened up the Cascading Style Sheets. Last but not least, the new domain name `irregular.ninja` has been registered. @@ -229,7 +254,7 @@ This is a shell script for the Mutt email client for delaying sending out E-Mail `jsmstrade` is a minimalistic graphical Java swing client for sending SMS messages over the SMStrade service. -[](./2022-06-15-sweating-the-small-stuff/jsmstrade.png) +[](./sweating-the-small-stuff/jsmstrade.png) [https://codeberg.org/snonux/jsmstrade](https://codeberg.org/snonux/jsmstrade) [https://smstrade.de](https://smstrade.de) diff --git a/gemfeed/2022-07-30-lets-encrypt-with-openbsd-and-rex.md b/gemfeed/2022-07-30-lets-encrypt-with-openbsd-and-rex.md index bc3800ca..0399e072 100644 --- a/gemfeed/2022-07-30-lets-encrypt-with-openbsd-and-rex.md +++ b/gemfeed/2022-07-30-lets-encrypt-with-openbsd-and-rex.md @@ -2,6 +2,8 @@ > Published at 2022-07-30T12:14:31+01:00 +I was amazed at how easy it is to automatically generate and update Let's Encrypt certificates with OpenBSD. + ``` / _ \ The Hebern Machine \ ." ". / @@ -29,9 +31,23 @@ ASCII Art by John Savard ``` -I was amazed at how easy it is to automatically generate and update Let's Encrypt certificates with OpenBSD. +## Table of Contents -## What's Let's Encrypt? +* [⇢ Let's Encrypt with OpenBSD and Rex](#let-s-encrypt-with-openbsd-and-rex) +* [⇢ ⇢ ⇢ What's Let's Encrypt?](#what-s-let-s-encrypt) +* [⇢ ⇢ Meet `acme-client`](#meet-acme-client) +* [⇢ ⇢ Configuration](#configuration) +* [⇢ ⇢ ⇢ acme-client.conf](#acme-clientconf) +* [⇢ ⇢ ⇢ httpd.conf](#httpdconf) +* [⇢ ⇢ ⇢ CRON job](#cron-job) +* [⇢ ⇢ relayd.conf and smtpd.conf](#relaydconf-and-smtpdconf) +* [⇢ ⇢ Rexification](#rexification) +* [⇢ ⇢ ⇢ General ACME client configuration](#general-acme-client-configuration) +* [⇢ ⇢ ⇢ Service rexification ](#service-rexification-) +* [⇢ ⇢ All pieces together](#all-pieces-together) +* [⇢ ⇢ Conclusion](#conclusion) + +### What's Let's Encrypt? > Let's Encrypt is a non-profit certificate authority run by Internet Security Research Group that provides X.509 certificates for Transport Layer Security (TLS) encryption at no charge. It is the world's largest certificate authority, used by more than 265 million websites, with the goal of all websites being secure and using HTTPS. @@ -658,4 +674,15 @@ Why re-inventing the wheel? I love that a `Rexfile` is just a Perl DSL. Also, Op E-Mail your comments to `paul@nospam.buetow.org` :-) +Other *BSD related posts are: + +[2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts](./2025-02-01-f3s-kubernetes-with-freebsd-part-3.md) +[2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation](./2024-12-03-f3s-kubernetes-with-freebsd-part-2.md) +[2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage](./2024-11-17-f3s-kubernetes-with-freebsd-part-1.md) +[2024-04-01 KISS high-availability with OpenBSD](./2024-04-01-KISS-high-availability-with-OpenBSD.md) +[2024-01-13 One reason why I love OpenBSD](./2024-01-13-one-reason-why-i-love-openbsd.md) +[2022-10-30 Installing DTail on OpenBSD](./2022-10-30-installing-dtail-on-openbsd.md) +[2022-07-30 Let's Encrypt with OpenBSD and Rex (You are currently reading this)](./2022-07-30-lets-encrypt-with-openbsd-and-rex.md) +[2016-04-09 Jails and ZFS with Puppet on FreeBSD](./2016-04-09-jails-and-zfs-on-freebsd-with-puppet.md) + [Back to the main site](../) diff --git a/gemfeed/2022-08-27-gemtexter-1.1.0-lets-gemtext-again.md b/gemfeed/2022-08-27-gemtexter-1.1.0-lets-gemtext-again.md index fd162e92..e0a55c37 100644 --- a/gemfeed/2022-08-27-gemtexter-1.1.0-lets-gemtext-again.md +++ b/gemfeed/2022-08-27-gemtexter-1.1.0-lets-gemtext-again.md @@ -2,6 +2,12 @@ > Published at 2022-08-27T18:25:57+01:00 +I proudly announce that I've released Gemtexter version `1.1.0`. What is Gemtexter? It's my minimalist static site generator for Gemini Gemtext, HTML and Markdown written in GNU Bash. + +[https://codeberg.org/snonux/gemtexter](https://codeberg.org/snonux/gemtexter) + +It has been around a year since I released the first version `1.0.0`. Although, there aren't any groundbreaking changes, there have been a couple of smaller commits and adjustments. I was quite surprised that I received a bunch of feedback and requests about Gemtexter so it means that I am not the only person in the universe actually using it. + ``` -=[ typewriter ]=- 1/98 @@ -14,11 +20,18 @@ jgs `"""""""""` ``` -I proudly announce that I've released Gemtexter version `1.1.0`. What is Gemtexter? It's my minimalist static site generator for Gemini Gemtext, HTML and Markdown written in GNU Bash. +## Table of Contents -[https://codeberg.org/snonux/gemtexter](https://codeberg.org/snonux/gemtexter) - -It has been around a year since I released the first version `1.0.0`. Although, there aren't any groundbreaking changes, there have been a couple of smaller commits and adjustments. I was quite surprised that I received a bunch of feedback and requests about Gemtexter so it means that I am not the only person in the universe actually using it. +* [⇢ Gemtexter 1.1.0 - Let's Gemtext again](#gemtexter-110---let-s-gemtext-again) +* [⇢ ⇢ What's new?](#what-s-new) +* [⇢ ⇢ ⇢ Automatic check for GNU version requirements](#automatic-check-for-gnu-version-requirements) +* [⇢ ⇢ ⇢ Backticks now produce `inline code blocks` in the HTML output](#backticks-now-produce-inline-code-blocks-in-the-html-output) +* [⇢ ⇢ ⇢ Cache for Atom feed generation](#cache-for-atom-feed-generation) +* [⇢ ⇢ ⇢ Input filter support](#input-filter-support) +* [⇢ ⇢ ⇢ Revamped `git` support](#revamped-git-support) +* [⇢ ⇢ ⇢ Addition of `htmlextras` and web font support](#addition-of-htmlextras-and-web-font-support) +* [⇢ ⇢ ⇢ Sub-section support](#sub-section-support) +* [⇢ ⇢ ⇢ More](#more) ## What's new? @@ -85,14 +98,15 @@ Additionally, there were a couple of bug fixes, refactorings and overall improve Overall I think it's a pretty solid `1.1.0` release without anything groundbreaking (therefore no major version jump). But I am happy about it. +E-Mail your comments to `paul@nospam.buetow.org` :-) + Other related posts are: -[2021-04-24 Welcome to the Geminispace](./2021-04-24-welcome-to-the-geminispace.md) -[2021-06-05 Gemtexter - One Bash script to rule it all](./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md) -[2022-08-27 Gemtexter 1.1.0 - Let's Gemtext again (You are currently reading this)](./2022-08-27-gemtexter-1.1.0-lets-gemtext-again.md) -[2023-03-25 Gemtexter 2.0.0 - Let's Gemtext again²](./2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.md) +[2024-10-02 Gemtexter 3.0.0 - Let's Gemtext again⁴](./2024-10-02-gemtexter-3.0.0-lets-gemtext-again-4.md) [2023-07-21 Gemtexter 2.1.0 - Let's Gemtext again³](./2023-07-21-gemtexter-2.1.0-lets-gemtext-again-3.md) - -E-Mail your comments to `paul@nospam.buetow.org` :-) +[2023-03-25 Gemtexter 2.0.0 - Let's Gemtext again²](./2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.md) +[2022-08-27 Gemtexter 1.1.0 - Let's Gemtext again (You are currently reading this)](./2022-08-27-gemtexter-1.1.0-lets-gemtext-again.md) +[2021-06-05 Gemtexter - One Bash script to rule it all](./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md) +[2021-04-24 Welcome to the Geminispace](./2021-04-24-welcome-to-the-geminispace.md) [Back to the main site](../) diff --git a/gemfeed/2022-09-30-after-a-bad-nights-sleep.md b/gemfeed/2022-09-30-after-a-bad-nights-sleep.md index 91c6f553..100c55b8 100644 --- a/gemfeed/2022-09-30-after-a-bad-nights-sleep.md +++ b/gemfeed/2022-09-30-after-a-bad-nights-sleep.md @@ -2,6 +2,8 @@ > Published at 2022-09-30T09:53:23+03:00; Updated at 2022-10-12 +Everyone has it once in a while: A bad night's sleep. Here I attempt to list valuable tips on how to deal with it. + ``` z z @@ -16,7 +18,24 @@ jgs (________\ \ '-' ``` -Everyone has it once in a while: A bad night's sleep. Here I attempt to list valuable tips on how to deal with it. +## Table of Contents + +* [⇢ After a bad night's sleep](#after-a-bad-night-s-sleep) +* [⇢ ⇢ Don't take the day off.](#don-t-take-the-day-off) +* [⇢ ⇢ Start work early](#start-work-early) +* [⇢ ⇢ Sweat the small stuff](#sweat-the-small-stuff) +* [⇢ ⇢ Enter the flow state](#enter-the-flow-state) +* [⇢ ⇢ Reschedule meetings](#reschedule-meetings) +* [⇢ ⇢ Invent](#invent) +* [⇢ ⇢ Fast](#fast) +* [⇢ ⇢ Stretch](#stretch) +* [⇢ ⇢ Walk](#walk) +* [⇢ ⇢ Red Bull](#red-bull) +* [⇢ ⇢ Power nap](#power-nap) +* [⇢ ⇢ Don't take anything personally.](#don-t-take-anything-personally) +* [⇢ ⇢ Meditate](#meditate) +* [⇢ ⇢ Write things down](#write-things-down) +* [⇢ ⇢ Social media](#social-media) ## Don't take the day off. diff --git a/gemfeed/2022-10-30-installing-dtail-on-openbsd.md b/gemfeed/2022-10-30-installing-dtail-on-openbsd.md index c0bc56ed..2ca8141b 100644 --- a/gemfeed/2022-10-30-installing-dtail-on-openbsd.md +++ b/gemfeed/2022-10-30-installing-dtail-on-openbsd.md @@ -2,6 +2,18 @@ > Published at 2022-10-30T11:03:19+02:00 +This will be a quick blog post, as I am busy with my personal life now. I have relocated to a different country and am still busy arranging things. So bear with me :-) + + In this post, I want to give a quick overview (or how-to) about installing DTail on OpenBSD, as the official documentation only covers Red Hat and Fedora Linux! And this blog post will also be used as my reference! + +[https://dtail.dev](https://dtail.dev) + +I am using Rexify for my OpenBSD automation. Check out the following article covering my Rex setup in a little bit more detail: + +[Let's Encrypt with OpenBSD and Rex](./2022-07-30-lets-encrypt-with-openbsd-and-rex.md) + +I will also mention some relevant `Rexfile` snippets in this post! + ``` ,_---~~~~~----._ _,,_,*^____ _____``*g*\"*, @@ -39,17 +51,19 @@ ' ' ``` -This will be a quick blog post, as I am busy with my personal life now. I have relocated to a different country and am still busy arranging things. So bear with me :-) - - In this post, I want to give a quick overview (or how-to) about installing DTail on OpenBSD, as the official documentation only covers Red Hat and Fedora Linux! And this blog post will also be used as my reference! - -[https://dtail.dev](https://dtail.dev) - -I am using Rexify for my OpenBSD automation. Check out the following article covering my Rex setup in a little bit more detail: - -[Let's Encrypt with OpenBSD and Rex](./2022-07-30-lets-encrypt-with-openbsd-and-rex.md) +## Table of Contents -I will also mention some relevant `Rexfile` snippets in this post! +* [⇢ Installing DTail on OpenBSD](#installing-dtail-on-openbsd) +* [⇢ ⇢ Compile it](#compile-it) +* [⇢ ⇢ Install it](#install-it) +* [⇢ ⇢ ⇢ Rexification](#rexification) +* [⇢ ⇢ Configure it](#configure-it) +* [⇢ ⇢ ⇢ Rexification](#rexification) +* [⇢ ⇢ Update the key cache for it](#update-the-key-cache-for-it) +* [⇢ ⇢ ⇢ Rexification](#rexification) +* [⇢ ⇢ Start it](#start-it) +* [⇢ ⇢ Use it](#use-it) +* [⇢ ⇢ Conclusions](#conclusions) ## Compile it @@ -339,13 +353,13 @@ Check out the following for more information: [https://github.com/mimecast/dtail](https://github.com/mimecast/dtail) [https://www.rexify.org](https://www.rexify.org) +E-Mail your comments to `paul@nospam.buetow.org` :-) + Other related posts are: -[2021-04-22 DTail - The distributed log tail program](./2021-04-22-dtail-the-distributed-log-tail-program.md) -[2022-03-06 The release of DTail 4.0.0](./2022-03-06-the-release-of-dtail-4.0.0.md) -[2022-10-30 Installing DTail on OpenBSD (You are currently reading this)](./2022-10-30-installing-dtail-on-openbsd.md) [2023-09-25 DTail usage examples](./2023-09-25-dtail-usage-examples.md) - -E-Mail your comments to `paul@nospam.buetow.org` :-) +[2022-10-30 Installing DTail on OpenBSD (You are currently reading this)](./2022-10-30-installing-dtail-on-openbsd.md) +[2022-03-06 The release of DTail 4.0.0](./2022-03-06-the-release-of-dtail-4.0.0.md) +[2021-04-22 DTail - The distributed log tail program](./2021-04-22-dtail-the-distributed-log-tail-program.md) [Back to the main site](../) diff --git a/gemfeed/2022-11-24-i-tried-emacs-but-i-switched-back-to-neovim.md b/gemfeed/2022-11-24-i-tried-emacs-but-i-switched-back-to-neovim.md index adefac5d..1f92fd71 100644 --- a/gemfeed/2022-11-24-i-tried-emacs-but-i-switched-back-to-neovim.md +++ b/gemfeed/2022-11-24-i-tried-emacs-but-i-switched-back-to-neovim.md @@ -2,6 +2,18 @@ > Published at 2022-11-24T11:17:15+02:00; Updated at 2022-11-26 +As a long-lasting user of Vim (and NeoVim), I always wondered what GNU Emacs is really about, so I decided to try it. I didn't try vanilla GNU Emacs, but Doom Emacs. I chose Doom Emacs as it is a neat distribution of Emacs with Evil mode enabled by default. Evil mode allows Vi(m) key bindings (so to speak, it's emulating Vim within Emacs), and I am pretty sure I won't be ready to give up all the muscle memory I have built over more than a decade. + +[GNU Emacs](https://www.gnu.org/software/emacs/) +[Doom Emacs](https://github.com/doomemacs/) + +I used Doom Emacs for around two months. Still, ultimately I decided to switch back to NeoVim as my primary editor and IDE and Vim (usually pre-installed on Linux-based systems) and Nvi (usually pre-installed on *BSD systems) as my "always available editor" for quick edits. (It is worth mentioning that I don't have a high opinion on whether Vim or NeoVim is the better editor, I prefer NeoVim as it comes with better defaults out of the box, but there is no real blocker to use Vim instead). + +[Vim](https://www.vim.org) +[NeoVim](https://neovim.io) + +So why did I switch back to the Vi-family? + ``` _/ \ _(\(o / \ / _ ^^^o @@ -15,17 +27,16 @@ Art by \ \_! / __! ^^----^^ "^--v' ``` -As a long-lasting user of Vim (and NeoVim), I always wondered what GNU Emacs is really about, so I decided to try it. I didn't try vanilla GNU Emacs, but Doom Emacs. I chose Doom Emacs as it is a neat distribution of Emacs with Evil mode enabled by default. Evil mode allows Vi(m) key bindings (so to speak, it's emulating Vim within Emacs), and I am pretty sure I won't be ready to give up all the muscle memory I have built over more than a decade. - -[GNU Emacs](https://www.gnu.org/software/emacs/) -[Doom Emacs](https://github.com/doomemacs/) +## Table of Contents -I used Doom Emacs for around two months. Still, ultimately I decided to switch back to NeoVim as my primary editor and IDE and Vim (usually pre-installed on Linux-based systems) and Nvi (usually pre-installed on *BSD systems) as my "always available editor" for quick edits. (It is worth mentioning that I don't have a high opinion on whether Vim or NeoVim is the better editor, I prefer NeoVim as it comes with better defaults out of the box, but there is no real blocker to use Vim instead). - -[Vim](https://www.vim.org) -[NeoVim](https://neovim.io) - -So why did I switch back to the Vi-family? +* [⇢ I tried (Doom) Emacs, but I switched back to (Neo)Vim](#i-tried-doom-emacs-but-i-switched-back-to-neovim) +* [⇢ ⇢ Emacs is a giant dragon](#emacs-is-a-giant-dragon) +* [⇢ ⇢ Magit love](#magit-love) +* [⇢ ⇢ Graphical UI](#graphical-ui) +* [⇢ ⇢ Scripting it](#scripting-it) +* [⇢ ⇢ The famous Emacs Org mode](#the-famous-emacs-org-mode) +* [⇢ ⇢ Seeking simplicity](#seeking-simplicity) +* [⇢ ⇢ Conclusion](#conclusion) ## Emacs is a giant dragon diff --git a/gemfeed/2022-12-24-ultrarelearning-java-my-takeaways.md b/gemfeed/2022-12-24-ultrarelearning-java-my-takeaways.md index 220401a4..4dedc97d 100644 --- a/gemfeed/2022-12-24-ultrarelearning-java-my-takeaways.md +++ b/gemfeed/2022-12-24-ultrarelearning-java-my-takeaways.md @@ -2,8 +2,6 @@ > Published at 2022-12-24T23:18:40+02:00 -[](./2022-12-24-ultrarelearning-java-my-takeaways/learnjava.jpg) - As a regular participant in the annual Pet Project competition at work, I always try to find a project where I can learn something new. In this post, I would like to share my takeaways after revisiting Java. You can read about my motivations in my "Creative universe" post: [Creative universe](./2022-04-10-creative-universe.md) @@ -16,6 +14,23 @@ However, after that, I became a Linux Sysadmin and mainly continued programming At my workplace, as an SRE, I don't do Java a lot. I have been reading Java code to understand the software better so I can apply and suggest workarounds or fixes to existing issues and bugs. However, most of our stack is in Java, and our Software Engineers use Java as their primary programming language. +[](./ultrarelearning-java-my-takeaways/learnjava.jpg) + +## Table of Contents + +* [⇢ (Re)learning Java - My takeaways](#relearning-java---my-takeaways) +* [⇢ ⇢ Stuck at Java 1.4](#stuck-at-java-14) +* [⇢ ⇢ (Re)learning & upskilling to Java 18](#relearning--upskilling-to-java-18) +* [⇢ ⇢ ⇢ Effective Java](#effective-java) +* [⇢ ⇢ ⇢ Java Pub House](#java-pub-house) +* [⇢ ⇢ ⇢ Java Concurrency course](#java-concurrency-course) +* [⇢ ⇢ ⇢ Read a lot of Java code](#read-a-lot-of-java-code) +* [⇢ ⇢ ⇢ Observed Java code reviews](#observed-java-code-reviews) +* [⇢ ⇢ ⇢ Took ownership of a roadmap-Java project](#took-ownership-of-a-roadmap-java-project) +* [⇢ ⇢ The good](#the-good) +* [⇢ ⇢ The bad and the ugly](#the-bad-and-the-ugly) +* [⇢ ⇢ Conclusion](#conclusion) + ## Stuck at Java 1.4 Over time, I had been missing out on many new features that were added to the language since Java 1.4, so I decided to implement my next Pet Project in Java and learn every further aspect of the language as my main goal. Of course, I still liked the idea of winning a Pet Project Prize, but my main objective was to level up my Java skills. @@ -26,7 +41,7 @@ Over time, I had been missing out on many new features that were added to the la This book was recommended by my brother and also by at least another colleague at work to be one of the best, if not the best, book about Java programming. I read the whole book from the beginning to the end and immersed myself in it. I fully agree; this is a great book. Every Java developer or Java software engineer should read it! -[](./2022-12-24-ultrarelearning-java-my-takeaways/effective-java.jpg) +[](./ultrarelearning-java-my-takeaways/effective-java.jpg) I recommend reading the 90-part effective Java Series on `dev.to`. It's a perfect companion to the book as it explains all the chapters again but from a slightly different perspective and helps you to really understand the content. diff --git a/gemfeed/2023-01-23-why-grapheneos-rox.md b/gemfeed/2023-01-23-why-grapheneos-rox.md index 765c0825..2cd45d62 100644 --- a/gemfeed/2023-01-23-why-grapheneos-rox.md +++ b/gemfeed/2023-01-23-why-grapheneos-rox.md @@ -2,6 +2,19 @@ > Published at 2023-01-23T15:31:52+02:00 +In 2021 I wrote "On Being Pedantic about Open-Source", and there was a section "What about mobile?" where I expressed the dilemma about the necessity of using proprietary mobile operating systems. With GrapheneOS, I found my perfect solution for personal mobile phone use. + +[On Being Pedantic about Open-Source](./2021-08-01-on-being-pedantic-about-open-source.md) + +What is GrapheneOS? + +> GrapheneOS is a privacy and security-focused mobile OS with Android app compatibility developed as a non-profit open-source project. It's focused on the research and development of privacy and security technologies, including substantial improvements to sandboxing, exploits mitigations and the permission model. + +GrapheneOS is an independent Android distribution based on the Android Open Source Project (AOSP) but hardened in multiple ways. Other independent Android distributions, like LineageOS, are also based on AOSP, but GrapheneOS takes it further so that it can be my daily driver on my phone. + +[https://GrapheneOS.org](https://GrapheneOS.org) +[https://LineageOS.org](https://LineageOS.org) + ``` Art by Joan Stark _.===========================._ @@ -25,18 +38,17 @@ Art by Joan Stark '-'-'-'--' ``` -In 2021 I wrote "On Being Pedantic about Open-Source", and there was a section "What about mobile?" where I expressed the dilemma about the necessity of using proprietary mobile operating systems. With GrapheneOS, I found my perfect solution for personal mobile phone use. - -[On Being Pedantic about Open-Source](./2021-08-01-on-being-pedantic-about-open-source.md) - -What is GrapheneOS? - -> GrapheneOS is a privacy and security-focused mobile OS with Android app compatibility developed as a non-profit open-source project. It's focused on the research and development of privacy and security technologies, including substantial improvements to sandboxing, exploits mitigations and the permission model. - -GrapheneOS is an independent Android distribution based on the Android Open Source Project (AOSP) but hardened in multiple ways. Other independent Android distributions, like LineageOS, are also based on AOSP, but GrapheneOS takes it further so that it can be my daily driver on my phone. - -[https://GrapheneOS.org](https://GrapheneOS.org) -[https://LineageOS.org](https://LineageOS.org) +## Table of Contents + +* [⇢ Why GrapheneOS rox](#why-grapheneos-rox) +* [⇢ ⇢ User Profiles](#user-profiles) +* [⇢ ⇢ Proxying some of the Google offerings ](#proxying-some-of-the-google-offerings-) +* [⇢ ⇢ Google Play Sandboxing ](#google-play-sandboxing-) +* [⇢ ⇢ The camera and the cloud ](#the-camera-and-the-cloud-) +* [⇢ ⇢ Fine granular permissions](#fine-granular-permissions) +* [⇢ ⇢ Termux](#termux) +* [⇢ ⇢ So, why not use a pure Linux phone?](#so-why-not-use-a-pure-linux-phone) +* [⇢ ⇢ Small GrapheneOS downsides ](#small-grapheneos-downsides-) ## User Profiles diff --git a/gemfeed/2023-02-26-how-to-shut-down-after-work.md b/gemfeed/2023-02-26-how-to-shut-down-after-work.md index 8212c60c..90a71d7b 100644 --- a/gemfeed/2023-02-26-how-to-shut-down-after-work.md +++ b/gemfeed/2023-02-26-how-to-shut-down-after-work.md @@ -2,6 +2,8 @@ > Published at 2023-02-26T23:48:01+02:00 +Do you need help fully discharging from work in the evenings or for the weekend? Shutting down from work won't just improve your work-life balance; it will also significantly improve the quality of your personal life and work. After a restful weekend, you will be much more energized and productive the next working day. So it should not just be in your own, but also your employers' interest that you fully relax and shut down after work. + ``` |\ "Music should be heard not only with the ears, but also the soul." |---|--\-----------------------|-----------------------------------------| @@ -17,7 +19,16 @@ -@- [kom...@uwec.edu] ``` -Do you need help fully discharging from work in the evenings or for the weekend? Shutting down from work won't just improve your work-life balance; it will also significantly improve the quality of your personal life and work. After a restful weekend, you will be much more energized and productive the next working day. So it should not just be in your own, but also your employers' interest that you fully relax and shut down after work. +## Table of Contents + +* [⇢ How to shut down after work](#how-to-shut-down-after-work) +* [⇢ ⇢ Have a shutdown routine](#have-a-shutdown-routine) +* [⇢ ⇢ Don't work when you officially don't work](#don-t-work-when-you-officially-don-t-work) +* [⇢ ⇢ Distract your mind](#distract-your-mind) +* [⇢ ⇢ Get a pet](#get-a-pet) +* [⇢ ⇢ Journal your day](#journal-your-day) +* [⇢ ⇢ Don't stress about what your employer expects from you](#don-t-stress-about-what-your-employer-expects-from-you) +* [⇢ ⇢ Call it a day](#call-it-a-day) ## Have a shutdown routine diff --git a/gemfeed/2023-03-16-the-pragmatic-programmer-book-notes.md b/gemfeed/2023-03-16-the-pragmatic-programmer-book-notes.md index 7c1ca4b4..6c1fe784 100644 --- a/gemfeed/2023-03-16-the-pragmatic-programmer-book-notes.md +++ b/gemfeed/2023-03-16-the-pragmatic-programmer-book-notes.md @@ -76,15 +76,17 @@ How to motivate others to contribute something (e.g. ideas to a startup): By working together, everyone contributes what they can, achieving a greater good together. +E-Mail your comments to `paul@nospam.buetow.org` :-) + Other book notes of mine are: -[2023-03-16 "The Pragmatic Programmer" book notes (You are currently reading this)](./2023-03-16-the-pragmatic-programmer-book-notes.md) -[2023-04-01 "Never split the difference" book notes](./2023-04-01-never-split-the-difference-book-notes.md) -[2023-05-06 "The Obstacle is the Way" book notes](./2023-05-06-the-obstacle-is-the-way-book-notes.md) -[2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes](./2023-07-17-career-guide-and-soft-skills-book-notes.md) +[2024-10-24 "Staff Engineer" book notes](./2024-10-24-staff-engineer-book-notes.md) +[2024-07-07 "The Stoic Challenge" book notes](./2024-07-07-the-stoic-challenge-book-notes.md) +[2024-05-01 "Slow Productivity" book notes](./2024-05-01-slow-productivity-book-notes.md) [2023-11-11 "Mind Management" book notes](./2023-11-11-mind-management-book-notes.md) +[2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes](./2023-07-17-career-guide-and-soft-skills-book-notes.md) +[2023-05-06 "The Obstacle is the Way" book notes](./2023-05-06-the-obstacle-is-the-way-book-notes.md) +[2023-04-01 "Never split the difference" book notes](./2023-04-01-never-split-the-difference-book-notes.md) +[2023-03-16 "The Pragmatic Programmer" book notes (You are currently reading this)](./2023-03-16-the-pragmatic-programmer-book-notes.md) -E-Mail your comments to `paul@nospam.buetow.org` :-) - -[More books and other resources I found useful.](../resources.md) [Back to the main site](../) diff --git a/gemfeed/2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.md b/gemfeed/2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.md index c988a01d..1fb0f838 100644 --- a/gemfeed/2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.md +++ b/gemfeed/2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.md @@ -2,6 +2,14 @@ > Published at 2023-03-25T17:50:32+02:00 +I proudly announce that I've released Gemtexter version `2.0.0`. What is Gemtexter? It's my minimalist static site generator for Gemini Gemtext, HTML and Markdown written in GNU Bash. + +[https://codeberg.org/snonux/gemtexter](https://codeberg.org/snonux/gemtexter) + +This is a new major release, so it contains a breaking change (see "Meta cache made obsolete"). + +Let's list what's new! + ``` -=[ typewriters ]=- 1/98 @@ -15,13 +23,15 @@ mod. by Paul Buetow `"""""""""` ``` -I proudly announce that I've released Gemtexter version `2.0.0`. What is Gemtexter? It's my minimalist static site generator for Gemini Gemtext, HTML and Markdown written in GNU Bash. - -[https://codeberg.org/snonux/gemtexter](https://codeberg.org/snonux/gemtexter) - -This is a new major release, so it contains a breaking change (see "Meta cache made obsolete"). +## Table of Contents -Let's list what's new! +* [⇢ Gemtexter 2.0.0 - Let's Gemtext again²](#gemtexter-200---let-s-gemtext-again) +* [⇢ ⇢ Minimal template engine](#minimal-template-engine) +* [⇢ ⇢ Added hooks](#added-hooks) +* [⇢ ⇢ Use of safer Bash options](#use-of-safer-bash-options) +* [⇢ ⇢ Meta cache made obsolete](#meta-cache-made-obsolete) +* [⇢ ⇢ XMLLint support](#xmllint-support) +* [⇢ ⇢ More](#more) ## Minimal template engine @@ -71,7 +81,7 @@ Another thing you can do is insert an index with links to similar blog posts. E. ``` See more entries about DTail and Golang: -<< template::inline::index dtail golang +<< template::inline::rindex dtail golang Blablabla... ``` @@ -136,14 +146,15 @@ Optionally, when the `xmllint` binary is installed, Gemtexter will perform a sim Additionally, there were a couple of bug fixes, refactorings and overall improvements in the documentation made. +E-Mail your comments to `paul@nospam.buetow.org` :-) + Other related posts are: -[2021-04-24 Welcome to the Geminispace](./2021-04-24-welcome-to-the-geminispace.md) -[2021-06-05 Gemtexter - One Bash script to rule it all](./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md) -[2022-08-27 Gemtexter 1.1.0 - Let's Gemtext again](./2022-08-27-gemtexter-1.1.0-lets-gemtext-again.md) -[2023-03-25 Gemtexter 2.0.0 - Let's Gemtext again² (You are currently reading this)](./2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.md) +[2024-10-02 Gemtexter 3.0.0 - Let's Gemtext again⁴](./2024-10-02-gemtexter-3.0.0-lets-gemtext-again-4.md) [2023-07-21 Gemtexter 2.1.0 - Let's Gemtext again³](./2023-07-21-gemtexter-2.1.0-lets-gemtext-again-3.md) - -E-Mail your comments to `paul@nospam.buetow.org` :-) +[2023-03-25 Gemtexter 2.0.0 - Let's Gemtext again² (You are currently reading this)](./2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.md) +[2022-08-27 Gemtexter 1.1.0 - Let's Gemtext again](./2022-08-27-gemtexter-1.1.0-lets-gemtext-again.md) +[2021-06-05 Gemtexter - One Bash script to rule it all](./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md) +[2021-04-24 Welcome to the Geminispace](./2021-04-24-welcome-to-the-geminispace.md) [Back to the main site](../) diff --git a/gemfeed/2023-04-01-never-split-the-difference-book-notes.md b/gemfeed/2023-04-01-never-split-the-difference-book-notes.md index 953e8e73..12ba5708 100644 --- a/gemfeed/2023-04-01-never-split-the-difference-book-notes.md +++ b/gemfeed/2023-04-01-never-split-the-difference-book-notes.md @@ -16,6 +16,21 @@ These are my personal takeaways after reading "Never split the difference" by Ch ''' ``` +## Table of Contents + +* [⇢ "Never split the difference" book notes](#never-split-the-difference-book-notes) +* [⇢ ⇢ Tactical listening, spreading empathy](#tactical-listening-spreading-empathy) +* [⇢ ⇢ Mindset of discovery](#mindset-of-discovery) +* [⇢ ⇢ ⇢ More tips ](#more-tips-) +* [⇢ ⇢ "No" starts the conversation](#no-starts-the-conversation) +* [⇢ ⇢ Win-win](#win-win) +* [⇢ ⇢ On Deadlines](#on-deadlines) +* [⇢ ⇢ Analyse the opponent](#analyse-the-opponent) +* [⇢ ⇢ Use different ways of saying "no."](#use-different-ways-of-saying-no) +* [⇢ ⇢ Calibrated question](#calibrated-question) +* [⇢ ⇢ The black swan ](#the-black-swan-) +* [⇢ ⇢ More](#more) + ## Tactical listening, spreading empathy Be a mirror, copy each other to be comfy with each other to build up trust. Mirroring is mainly body language. A mirror is to repeat the words the other just said. Simple but effective. @@ -120,14 +135,17 @@ Establish a range at top places like corp. I get... (e.g. remote London on a pro Slow.... it.... down.... +E-Mail your comments to `paul@nospam.buetow.org` :-) + Other book notes of mine are: -[2023-03-16 "The Pragmatic Programmer" book notes](./2023-03-16-the-pragmatic-programmer-book-notes.md) -[2023-04-01 "Never split the difference" book notes (You are currently reading this)](./2023-04-01-never-split-the-difference-book-notes.md) -[2023-05-06 "The Obstacle is the Way" book notes](./2023-05-06-the-obstacle-is-the-way-book-notes.md) -[2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes](./2023-07-17-career-guide-and-soft-skills-book-notes.md) +[2024-10-24 "Staff Engineer" book notes](./2024-10-24-staff-engineer-book-notes.md) +[2024-07-07 "The Stoic Challenge" book notes](./2024-07-07-the-stoic-challenge-book-notes.md) +[2024-05-01 "Slow Productivity" book notes](./2024-05-01-slow-productivity-book-notes.md) [2023-11-11 "Mind Management" book notes](./2023-11-11-mind-management-book-notes.md) - -E-Mail your comments to `paul@nospam.buetow.org` :-) +[2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes](./2023-07-17-career-guide-and-soft-skills-book-notes.md) +[2023-05-06 "The Obstacle is the Way" book notes](./2023-05-06-the-obstacle-is-the-way-book-notes.md) +[2023-04-01 "Never split the difference" book notes (You are currently reading this)](./2023-04-01-never-split-the-difference-book-notes.md) +[2023-03-16 "The Pragmatic Programmer" book notes](./2023-03-16-the-pragmatic-programmer-book-notes.md) [Back to the main site](../) diff --git a/gemfeed/2023-04-09-algorithms-and-data-structures-in-golang-part-1.md b/gemfeed/2023-04-09-algorithms-and-data-structures-in-golang-part-1.md deleted file mode 100644 index 9fd31bff..00000000 --- a/gemfeed/2023-04-09-algorithms-and-data-structures-in-golang-part-1.md +++ /dev/null @@ -1,231 +0,0 @@ -# Algorithms and Data Structures in Go - Part 1 - -> Published at 2023-04-09T22:31:42+03:00 - -``` - ,_---~~~~~----._ - _,,_,*^____ _____``*g*\"*, - / __/ /' ^. / \ ^@q f -[ @f | @)) | | @)) l 0 _/ - \`/ \~____ / __ \_____/ \ - | _l__l_ I - } [______] I - ] | | | | - ] ~ ~ | - | | - | | -``` - -This is the first blog post about my Algorithms and Data Structures in Go series. I am not a Software Developer in my day job. In my current role, programming and scripting skills are desirable but not mandatory. I have been learning about Data Structures and Algorithms many years ago at University. I thought it would be fun to revisit/refresh my knowledge here and implement many of the algorithms in Go. - -[2023-04-09 Algorithms and Data Structures in Go - Part 1 (You are currently reading this)](./2023-04-09-algorithms-and-data-structures-in-golang-part-1.md) - -This post is about setting up some basic data structures and methods for this blog series. I promise, everything will be easy to follow in this post. It will become more interesting later in this series. - -## Type constraints - -First, the package `ds` (data structures) defines the `types.go`. All examples will either operate on the `Integer` or `Number` type: - -```go -package ds - -import ( - "golang.org/x/exp/constraints" -) - -type Integer interface { - constraints.Integer -} - -type Number interface { - constraints.Integer | constraints.Float -} - -``` - -## ArrayList - -Next comes the `arraylist.go`, which defines the underlying data structure all the algorithms of this series will use. `ArrayList` is just a type alias of a Go array (or slice) with custom methods on it: - -```go -package ds - -import ( - "fmt" - "math/rand" - "strings" -) - -type ArrayList[V Number] []V - -func NewArrayList[V Number](l int) ArrayList[V] { - return make(ArrayList[V], l) -} -``` - -As you can see, the code uses Go generics, which I refactored recently. Besides the default constructor (which only returns an empty `ArrayList` with a given capacity), there are also a bunch of special constructors. `NewRandomArrayList` is returning an `ArrayList` with random numbers, `NewAscendingArrayList` and `NewDescendingArrayList` are returning `ArrayList`s in either ascending or descending order. They all will be used later on for testing and benchmarking the algorithms. - -```go -func NewRandomArrayList[V Number](l, max int) ArrayList[V] { - a := make(ArrayList[V], l) - for i := 0; i < l; i++ { - if max > 0 { - a[i] = V(rand.Intn(max)) - continue - } - a[i] = V(rand.Int()) - } - return a -} - -func NewAscendingArrayList[V Number](l int) ArrayList[V] { - a := make(ArrayList[V], l) - for i := 0; i < l; i++ { - a[i] = V(i) - } - return a -} - -func NewDescendingArrayList[V Number](l int) ArrayList[V] { - a := make(ArrayList[V], l) - j := l - 1 - for i := 0; i < l; i++ { - a[i] = V(j) - j-- - } - return a -} -``` - -## Helper methods - -The `FirstN` method only returns the first N elements of the `ArrayList`. This is useful for printing out only parts of the data structure: - -```go -func (a ArrayList[V]) FirstN(n int) string { - var sb strings.Builder - j := n - - l := len(a) - if j > l { - j = l - } - - for i := 0; i < j; i++ { - fmt.Fprintf(&sb, "%v ", a[i]) - } - - if j < l { - fmt.Fprintf(&sb, "... ") - } - - return sb.String() -} -``` - -The `Sorted` method checks whether the `ArrayList` is sorted. This will be used by the unit tests later on: - -```go -func (a ArrayList[V]) Sorted() bool { - for i := len(a) - 1; i > 0; i-- { - if a[i] < a[i-1] { - return false - } - } - return true -} -``` - -And the last utility method used is `Swap`, which allows swapping the values of two indices in the `ArrayList`: - -```go -func (a ArrayList[V]) Swap(i, j int) { - aux := a[i] - a[i] = a[j] - a[j] = aux -} - -``` - -## Sleep sort - -Let's implement our first algorithm, sleep sort. Sleep sort is a non-traditional and unconventional sorting algorithm based on the idea of waiting a certain amount of time corresponding to the value of each element in the input `ArrayList`. It's more of a fun, creative concept rather than an efficient or practical sorting technique. This is not a sorting algorithm you would use in any production code. As you can imagine, it is quite an inefficient sorting algorithm (it's only listed here as a warm-up exercise). This sorting method may also return false results depending on how the Goroutines are scheduled by the Go runtime. - - -```go -package sort - -import ( - "codeberg.org/snonux/algorithms/ds" - "sync" - "time" -) - -func Sleep[V ds.Integer](a ds.ArrayList[V]) ds.ArrayList[V] { - sorted := ds.NewArrayList[V](len(a)) - - numCh := make(chan V) - var wg sync.WaitGroup - wg.Add(len(a)) - - go func() { - wg.Wait() - close(numCh) - }() - - for _, num := range a { - go func(num V) { - defer wg.Done() - time.Sleep(time.Duration(num) * time.Second) - numCh <- num - }(num) - } - - for num := range numCh { - sorted = append(sorted, num) - } - - return sorted -} -``` - -This Go code implements the sleep sort algorithm using generics and goroutines. The main function `Sleep[V ds.Integer](a ds.ArrayList[V]) ds.ArrayList[V]` takes a generic `ArrayList` as input and returns a sorted `ArrayList`. The code creates a separate goroutine for each element in the input array, sleeps for a duration proportional to the element's value, and then sends the element to a channel. Another goroutine waits for all the sleeping goroutines to finish and then closes the channel. The sorted result `ArrayList` is constructed by appending the elements received from the channel in the order they arrive. The `sync.WaitGroup` is used to synchronize goroutines and ensure that all of them have completed before closing the channel. - -### Testing - -For testing, we only allow values up to 10, as otherwise, it would take too long to finish: - -```go -package sort - -import ( - "fmt" - "testing" - - "codeberg.org/snonux/algorithms/ds" -) - -func TestSleepSort(t *testing.T) { - a := ds.NewRandomArrayList[int](10, 10) - a = Sleep(a) - if !a.Sorted() { - t.Errorf("Array not sorted: %v", a) - } -} -``` - -As you can see, it takes `9s` here for the algorithm to finish (which is the highest value in the `ArrayList`): - -```sh -❯ go test ./sort -v -run SleepSort -=== RUN TestSleepSort ---- PASS: TestSleepSort (9.00s) -PASS -ok codeberg.org/snonux/algorithms/sort 9.002s -``` - -I won't write any benchmark for sleep sort; that will be done for the algorithms to come in this series :-). - -E-Mail your comments to `paul@nospam.buetow.org` :-) - -[Back to the main site](../) diff --git a/gemfeed/2023-05-01-unveiling-guprecords b/gemfeed/2023-05-01-unveiling-guprecords new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/gemfeed/2023-05-01-unveiling-guprecords @@ -0,0 +1 @@ + diff --git a/gemfeed/2023-05-01-unveiling-guprecords:-uptime-records-with-raku.md b/gemfeed/2023-05-01-unveiling-guprecords:-uptime-records-with-raku.md index 5fccb52b..4fb6d039 100644 --- a/gemfeed/2023-05-01-unveiling-guprecords:-uptime-records-with-raku.md +++ b/gemfeed/2023-05-01-unveiling-guprecords:-uptime-records-with-raku.md @@ -19,7 +19,15 @@ +-----+-----------------+-----------------------------+ ``` -# Introduction +## Table of Contents + +* [⇢ Unveiling `guprecords.raku`: Global Uptime Records with Raku](#unveiling-guprecordsraku-global-uptime-records-with-raku) +* [⇢ ⇢ Introduction](#introduction) +* [⇢ ⇢ How Guprecords works](#how-guprecords-works) +* [⇢ ⇢ Example](#example) +* [⇢ ⇢ Conclusion](#conclusion) + +## Introduction For fun, I am tracking the uptime of various personal machines (servers, laptops, workstations...). I have been doing this for over ten years now, so I have a lot of statistics collected. @@ -147,14 +155,14 @@ So far, I have only scratched the surface of what Raku can do. I hope to find mo * A social media sharing scheduler a la `buffer.com`. I am using Buffer at the moment to share posts on Mastadon, Twitter, Telegram and LinkedIn, but it is proprietary and also it's not really reliable. * Rewrite the static photo album generator of `irregular.ninja` in Raku (from Bash). +E-Mail your comments to hi@foo.zone :-) + Other related posts are: -[2008-06-26 Perl Poetry](./2008-06-26-perl-poetry.md) -[2011-05-07 Perl Daemon (Service Framework)](./2011-05-07-perl-daemon-service-framework.md) -[2022-05-27 Perl is still a great choice](./2022-05-27-perl-is-still-a-great-choice.md) -[2022-06-15 Sweating the small stuff - Tiny projects of mine](./2022-06-15-sweating-the-small-stuff.md) [2023-05-01 Unveiling `guprecords.raku`: Global Uptime Records with Raku (You are currently reading this)](./2023-05-01-unveiling-guprecords:-uptime-records-with-raku.md) - -E-Mail your comments to hi@foo.zone :-) +[2022-06-15 Sweating the small stuff - Tiny projects of mine](./2022-06-15-sweating-the-small-stuff.md) +[2022-05-27 Perl is still a great choice](./2022-05-27-perl-is-still-a-great-choice.md) +[2011-05-07 Perl Daemon (Service Framework)](./2011-05-07-perl-daemon-service-framework.md) +[2008-06-26 Perl Poetry](./2008-06-26-perl-poetry.md) [Back to the main site](../) diff --git a/gemfeed/2023-05-06-the-obstacle-is-the-way-book-notes.md b/gemfeed/2023-05-06-the-obstacle-is-the-way-book-notes.md index 9d8ab114..39e8fbd6 100644 --- a/gemfeed/2023-05-06-the-obstacle-is-the-way-book-notes.md +++ b/gemfeed/2023-05-06-the-obstacle-is-the-way-book-notes.md @@ -4,7 +4,6 @@ These are my personal takeaways after reading "The Obstacle Is the Way" by Ryan Holiday. This is mainly for my own use, but you might find it helpful too. - ``` ,.......... .........., ,..,' '.' ',.., @@ -17,6 +16,22 @@ These are my personal takeaways after reading "The Obstacle Is the Way" by Ryan ''' ``` +## Table of Contents + +* [⇢ "The Obstacle is the Way" book notes](#the-obstacle-is-the-way-book-notes) +* [⇢ ⇢ Reframe your perspective](#reframe-your-perspective) +* [⇢ ⇢ Embrace rationality](#embrace-rationality) +* [⇢ ⇢ Control your response](#control-your-response) +* [⇢ ⇢ Practice emotional and physical resilience](#practice-emotional-and-physical-resilience) +* [⇢ ⇢ Persistence and patience](#persistence-and-patience) +* [⇢ ⇢ Embrace failure](#embrace-failure) +* [⇢ ⇢ Be adaptable](#be-adaptable) +* [⇢ ⇢ Embrace non-action](#embrace-non-action) +* [⇢ ⇢ Leverage crisis](#leverage-crisis) +* [⇢ ⇢ Build your inner citadel](#build-your-inner-citadel) +* [⇢ ⇢ Love everything that happens](#love-everything-that-happens) +* [⇢ ⇢ Conclusion](#conclusion) + "The obstacle is the way" is a powerful statement that encapsulates the wisdom of turning challenges into opportunities for growth and success. We will explore using obstacles as fuel, transforming weaknesses into strengths, and adopting a mindset that allows us to be creative and persistent in the face of adversity. ## Reframe your perspective @@ -27,7 +42,6 @@ We spend a lot of time trying to get things perfect and look at the rules, but w Don't always try to use the front door; a backdoor could open. It's nonsense. Don't fight the judo master with judo. Non-action can be action, exposing the weaknesses of others. - ## Embrace rationality It is a superpower to see things rationally when others are fearful. Focus on the reality of the situation without letting emotions, such as anger, cloud your judgment. This ability will enable you to make better decisions in adversity. Ability to see things what they really are. E.g. wine is old fermented grapes, or other people behaving like animals during a fight. Show the middle finger if someone persists on the stupid rules occasionally. @@ -82,15 +96,17 @@ Should I hate people who hate me? That's their problem and not mine. Be always c Life is a marathon, not a sprint. Each obstacle we overcome prepares us for the next one. Remember, the obstacle is not just a barrier to be turned upside down; it can also be used as a catapult to propel us forward. By embracing challenges and using them as opportunities for growth, we become stronger, more adaptable, and, ultimately, more successful. +E-Mail your comments to `paul@nospam.buetow.org` :-) + Other book notes of mine are: -[2023-03-16 "The Pragmatic Programmer" book notes](./2023-03-16-the-pragmatic-programmer-book-notes.md) -[2023-04-01 "Never split the difference" book notes](./2023-04-01-never-split-the-difference-book-notes.md) -[2023-05-06 "The Obstacle is the Way" book notes (You are currently reading this)](./2023-05-06-the-obstacle-is-the-way-book-notes.md) -[2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes](./2023-07-17-career-guide-and-soft-skills-book-notes.md) +[2024-10-24 "Staff Engineer" book notes](./2024-10-24-staff-engineer-book-notes.md) +[2024-07-07 "The Stoic Challenge" book notes](./2024-07-07-the-stoic-challenge-book-notes.md) +[2024-05-01 "Slow Productivity" book notes](./2024-05-01-slow-productivity-book-notes.md) [2023-11-11 "Mind Management" book notes](./2023-11-11-mind-management-book-notes.md) +[2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes](./2023-07-17-career-guide-and-soft-skills-book-notes.md) +[2023-05-06 "The Obstacle is the Way" book notes (You are currently reading this)](./2023-05-06-the-obstacle-is-the-way-book-notes.md) +[2023-04-01 "Never split the difference" book notes](./2023-04-01-never-split-the-difference-book-notes.md) +[2023-03-16 "The Pragmatic Programmer" book notes](./2023-03-16-the-pragmatic-programmer-book-notes.md) -E-Mail your comments to `paul@nospam.buetow.org` :-) - -[More books and other resources I found useful.](../resources.md) [Back to the main site](../) diff --git a/gemfeed/2023-06-01-kiss-server-monitoring-with-gogios.md b/gemfeed/2023-06-01-kiss-server-monitoring-with-gogios.md index 9d3a777f..3ebc3eae 100644 --- a/gemfeed/2023-06-01-kiss-server-monitoring-with-gogios.md +++ b/gemfeed/2023-06-01-kiss-server-monitoring-with-gogios.md @@ -2,16 +2,31 @@ > Published at 2023-06-01T21:10:17+03:00 -[](./2023-06-01-kiss-server-monitoring-with-gogios/gogios-small.png) - -## Introduction - Gogios is a minimalistic and easy-to-use monitoring tool I programmed in Google Go designed specifically for small-scale self-hosted servers and virtual machines. The primary purpose of Gogios is to monitor my personal server infrastructure for `foo.zone`, my MTAs, my authoritative DNS servers, my NextCloud, Wallabag and Anki sync server installations, etc. With compatibility with the Nagios Check API, Gogios offers a simple yet effective solution to monitor a limited number of resources. In theory, Gogios scales to a couple of thousand checks, though. You can clone it from Codeberg here: [https://codeberg.org/snonux/gogios](https://codeberg.org/snonux/gogios) +[](./kiss-server-monitoring-with-gogios/gogios-small.png) + +## Table of Contents + +* [⇢ KISS server monitoring with Gogios](#kiss-server-monitoring-with-gogios) +* [⇢ ⇢ Motivation](#motivation) +* [⇢ ⇢ Features](#features) +* [⇢ ⇢ Example alert](#example-alert) +* [⇢ ⇢ Installation](#installation) +* [⇢ ⇢ ⇢ Compiling and installing Gogios](#compiling-and-installing-gogios) +* [⇢ ⇢ ⇢ Setting up user, group and directories](#setting-up-user-group-and-directories) +* [⇢ ⇢ ⇢ Installing monitoring plugins](#installing-monitoring-plugins) +* [⇢ ⇢ Configuration](#configuration) +* [⇢ ⇢ ⇢ MTA](#mta) +* [⇢ ⇢ ⇢ Configuring Gogios](#configuring-gogios) +* [⇢ ⇢ Running Gogios](#running-gogios) +* [⇢ ⇢ ⇢ High-availability](#high-availability) +* [⇢ ⇢ Conclusion:](#conclusion) + ``` _____________________________ ____________________________ / \ / \ @@ -236,12 +251,13 @@ There are plans to make it possible to execute certain checks only on certain no Gogios is a lightweight and straightforward monitoring tool that is perfect for small-scale environments. With its compatibility with the Nagios Check API, email notifications, and CRON-based scheduling, Gogios offers an easy-to-use solution for those looking to monitor a limited number of resources. I personally use it to execute around 500 checks on my personal server infrastructure. I am very happy with this solution. +E-Mail your comments to `paul@nospam.buetow.org` :-) + Other KISS-related posts are: -[2021-09-12 Keep it simple and stupid](./2021-09-12-keep-it-simple-and-stupid.md) -[2023-06-01 KISS server monitoring with Gogios (You are currently reading this)](./2023-06-01-kiss-server-monitoring-with-gogios.md) +[2024-04-01 KISS high-availability with OpenBSD](./2024-04-01-KISS-high-availability-with-OpenBSD.md) [2023-10-29 KISS static web photo albums with `photoalbum.sh`](./2023-10-29-kiss-static-web-photo-albums-with-photoalbum.sh.md) - -E-Mail your comments to `paul@nospam.buetow.org` :-) +[2023-06-01 KISS server monitoring with Gogios (You are currently reading this)](./2023-06-01-kiss-server-monitoring-with-gogios.md) +[2021-09-12 Keep it simple and stupid](./2021-09-12-keep-it-simple-and-stupid.md) [Back to the main site](../) diff --git a/gemfeed/2023-07-17-career-guide-and-soft-skills-book-notes.md b/gemfeed/2023-07-17-career-guide-and-soft-skills-book-notes.md index 623685dc..a14b6c22 100644 --- a/gemfeed/2023-07-17-career-guide-and-soft-skills-book-notes.md +++ b/gemfeed/2023-07-17-career-guide-and-soft-skills-book-notes.md @@ -16,9 +16,41 @@ These notes are of two books by "John Sommez" I found helpful. I also added some ''' ``` -# Improve - -## Always learn new things +## Table of Contents + +* [⇢ "Software Developmers Career Guide and Soft Skills" book notes](#software-developmers-career-guide-and-soft-skills-book-notes) +* [⇢ ⇢ Improve](#improve) +* [⇢ ⇢ ⇢ Always learn new things](#always-learn-new-things) +* [⇢ ⇢ ⇢ Set goals](#set-goals) +* [⇢ ⇢ ⇢ Ratings](#ratings) +* [⇢ ⇢ ⇢ Promotions](#promotions) +* [⇢ ⇢ ⇢ Finish things](#finish-things) +* [⇢ ⇢ Expand the empire](#expand-the-empire) +* [⇢ ⇢ Be pragmatic and also manage your time](#be-pragmatic-and-also-manage-your-time) +* [⇢ ⇢ ⇢ The quota system](#the-quota-system) +* [⇢ ⇢ ⇢ Don't waste time](#don-t-waste-time) +* [⇢ ⇢ ⇢ Habits](#habits) +* [⇢ Work-life balance](#work-life-balance) +* [⇢ ⇢ Mental health](#mental-health) +* [⇢ ⇢ Physical health](#physical-health) +* [⇢ ⇢ No drama](#no-drama) +* [⇢ Personal brand](#personal-brand) +* [⇢ ⇢ Market yourself](#market-yourself) +* [⇢ ⇢ Networking](#networking) +* [⇢ ⇢ Public speaking](#public-speaking) +* [⇢ New job](#new-job) +* [⇢ ⇢ For the interview](#for-the-interview) +* [⇢ ⇢ Find the right type of company](#find-the-right-type-of-company) +* [⇢ ⇢ Apply for the new job](#apply-for-the-new-job) +* [⇢ ⇢ Negotiation](#negotiation) +* [⇢ ⇢ Leaving the old job](#leaving-the-old-job) +* [⇢ Other things](#other-things) +* [⇢ ⇢ Testing](#testing) +* [⇢ ⇢ Books to read](#books-to-read) + +## Improve + +### Always learn new things When you learn something new, e.g. a programming language, first gather an overview, learn from multiple sources, play around and learn by doing and not consuming and form your own questions. Don't read too much upfront. A large amount of time is spent in learning technical skills which were never use. You want to have a practical set of skills you are actually using. You need to know 20 percent to get out 80 percent of the results. @@ -35,18 +67,18 @@ Fake it until you make it. But be honest about your abilities or lack of. There Boot camps: The advantage of a boot camp is to pragmatically learn things fast. We almost always overestimate what we can do in a day. Especially during boot camps. Connect to others during the boot camps -## Set goals +### Set goals Your own goals are important but the manager also looks at how the team performs and how someone can help the team perform better. Check whether you are on track with your goals every 2 weeks in order to avoid surprises for the annual review. Make concrete goals for next review. Track and document your progress. Invest in your education. Make your goals known. If you want something, then ask for it. Nobody but you knows what you want. -## Ratings +### Ratings That's a trap: If you have to rate yourself, that's a trap. That never works in an unbiased way. Rate yourself always the best way but rate your weakest part as high as possible minus one point. Rate yourself as good as you can otherwise. Nobody is putting for fun a gun on his own head. * Don't do peer rating, it can fire back on you. What if the colleague becomes your new boss? * Cooperate rankings are unfortunately HR guidelines and politics and only mirror a little your actual performance. -## Promotions +### Promotions The most valuable employees are the ones who make themselves obsolete and automate all away. Keep a safety net of 3 to 6 months of finances. Safe at least 10 percent of your earnings. Also, if you make money it does not mean that you have to spent more money. Is a new car better than a used car which both can bring you from A to B? Liability vs assets. @@ -58,7 +90,7 @@ The most valuable employees are the ones who make themselves obsolete and automa * If you want a raise be specific how much and know to back your demands. Don't make a thread and no ultimatums. * Best way for a promotion is to switch jobs. You can even switch back with a better salary. -## Finish things +### Finish things Hard work is necessary for accomplish results. However, work smarter not harder. Furthermore, working smart is not a substitute for working hard. Work both, hard and smart. @@ -272,15 +304,17 @@ Unit testing Vs regression testing: Unit tests test the smallest possible unit a * The war of Art (to combat procrastination) * Willpower Instinct +E-Mail your comments to `paul@nospam.buetow.org` :-) + Other book notes of mine are: -[2023-03-16 "The Pragmatic Programmer" book notes](./2023-03-16-the-pragmatic-programmer-book-notes.md) -[2023-04-01 "Never split the difference" book notes](./2023-04-01-never-split-the-difference-book-notes.md) -[2023-05-06 "The Obstacle is the Way" book notes](./2023-05-06-the-obstacle-is-the-way-book-notes.md) -[2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes (You are currently reading this)](./2023-07-17-career-guide-and-soft-skills-book-notes.md) +[2024-10-24 "Staff Engineer" book notes](./2024-10-24-staff-engineer-book-notes.md) +[2024-07-07 "The Stoic Challenge" book notes](./2024-07-07-the-stoic-challenge-book-notes.md) +[2024-05-01 "Slow Productivity" book notes](./2024-05-01-slow-productivity-book-notes.md) [2023-11-11 "Mind Management" book notes](./2023-11-11-mind-management-book-notes.md) +[2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes (You are currently reading this)](./2023-07-17-career-guide-and-soft-skills-book-notes.md) +[2023-05-06 "The Obstacle is the Way" book notes](./2023-05-06-the-obstacle-is-the-way-book-notes.md) +[2023-04-01 "Never split the difference" book notes](./2023-04-01-never-split-the-difference-book-notes.md) +[2023-03-16 "The Pragmatic Programmer" book notes](./2023-03-16-the-pragmatic-programmer-book-notes.md) -E-Mail your comments to `paul@nospam.buetow.org` :-) - -[More books and other resources I found useful.](../resources.md) [Back to the main site](../) diff --git a/gemfeed/2023-07-21-gemtexter-2.1.0-lets-gemtext-again-3.md b/gemfeed/2023-07-21-gemtexter-2.1.0-lets-gemtext-again-3.md index a0f703a8..a7c8bfae 100644 --- a/gemfeed/2023-07-21-gemtexter-2.1.0-lets-gemtext-again-3.md +++ b/gemfeed/2023-07-21-gemtexter-2.1.0-lets-gemtext-again-3.md @@ -2,6 +2,10 @@ > Published at 2023-07-21T10:19:31+03:00 +I proudly announce that I've released Gemtexter version `2.1.0`. What is Gemtexter? It's my minimalist static site generator for Gemini Gemtext, HTML and Markdown, written in GNU Bash. + +[https://codeberg.org/snonux/gemtexter](https://codeberg.org/snonux/gemtexter) + ``` -=[ typewriters ]=- 1/98 .-------. @@ -15,9 +19,16 @@ mod. by Paul Buetow `"""""""""` ``` -I proudly announce that I've released Gemtexter version `2.1.0`. What is Gemtexter? It's my minimalist static site generator for Gemini Gemtext, HTML and Markdown, written in GNU Bash. +## Table of Contents -[https://codeberg.org/snonux/gemtexter](https://codeberg.org/snonux/gemtexter) +* [⇢ Gemtexter 2.1.0 - Let's Gemtext again³](#gemtexter-210---let-s-gemtext-again) +* [⇢ ⇢ Why Bash?](#why-bash) +* [⇢ ⇢ Switch to GPL3 license](#switch-to-gpl3-license) +* [⇢ ⇢ Source code highlighting support](#source-code-highlighting-support) +* [⇢ ⇢ HTML exact variant](#html-exact-variant) +* [⇢ ⇢ Use of Hack webfont by default](#use-of-hack-webfont-by-default) +* [⇢ ⇢ HTML Mastodon verification support](#html-mastodon-verification-support) +* [⇢ ⇢ More](#more) ## Why Bash? @@ -91,14 +102,15 @@ The resulting line in the HTML output will be something as follows: Additionally, there were a couple of bug fixes, refactorings and overall improvements in the documentation made. +E-Mail your comments to `paul@nospam.buetow.org` :-) + Other related posts are: -[2021-04-24 Welcome to the Geminispace](./2021-04-24-welcome-to-the-geminispace.md) -[2021-06-05 Gemtexter - One Bash script to rule it all](./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md) -[2022-08-27 Gemtexter 1.1.0 - Let's Gemtext again](./2022-08-27-gemtexter-1.1.0-lets-gemtext-again.md) -[2023-03-25 Gemtexter 2.0.0 - Let's Gemtext again²](./2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.md) +[2024-10-02 Gemtexter 3.0.0 - Let's Gemtext again⁴](./2024-10-02-gemtexter-3.0.0-lets-gemtext-again-4.md) [2023-07-21 Gemtexter 2.1.0 - Let's Gemtext again³ (You are currently reading this)](./2023-07-21-gemtexter-2.1.0-lets-gemtext-again-3.md) - -E-Mail your comments to `paul@nospam.buetow.org` :-) +[2023-03-25 Gemtexter 2.0.0 - Let's Gemtext again²](./2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.md) +[2022-08-27 Gemtexter 1.1.0 - Let's Gemtext again](./2022-08-27-gemtexter-1.1.0-lets-gemtext-again.md) +[2021-06-05 Gemtexter - One Bash script to rule it all](./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md) +[2021-04-24 Welcome to the Geminispace](./2021-04-24-welcome-to-the-geminispace.md) [Back to the main site](../) diff --git a/gemfeed/2023-08-18-site-reliability-engineering-part-1.md b/gemfeed/2023-08-18-site-reliability-engineering-part-1.md index 4ce87aaf..5c61f9ac 100644 --- a/gemfeed/2023-08-18-site-reliability-engineering-part-1.md +++ b/gemfeed/2023-08-18-site-reliability-engineering-part-1.md @@ -2,11 +2,12 @@ > Published at 2023-08-18T22:43:47+03:00 -The universe of Site Reliability Engineering (SRE) is like an intricate tapestry woven with diverse technology, culture, and personal grit threads. Site Reliability Engineering is one of the most demanding jobs. With all the facets, it's impossible to get bored. There is always a new challenge to master, and there is always a new technology to tinker with. It's not just technical; it's also about communication, collaboration and teamwork. I am currently employed as a Principal Site Reliability Engineer and will try to share what SRE is about in this blog series. +Being a Site Reliability Engineer (SRE) is like stepping into a lively, ever-evolving universe. The world of SRE mixes together different tech, a unique culture, and a whole lot of determination. It’s one of the toughest but most exciting jobs out there. There's zero chance of getting bored because there's always a fresh challenge to tackle and new technology to play around with. It's not just about the tech side of things either; it's heavily rooted in communication, collaboration, and teamwork. As someone currently working as an SRE, I’m here to break it all down for you in this blog series. Let's dive into what SRE is really all about! [2023-08-18 Site Reliability Engineering - Part 1: SRE and Organizational Culture (You are currently reading this)](./2023-08-18-site-reliability-engineering-part-1.md) -[2023-08-19 Site Reliability Engineering - Part 2: Operational Balance in SRE](./2023-08-19-site-reliability-engineering-part-2.md) -[2023-08-20 Site Reliability Engineering - Part 3: On-Call Culture and the Human Aspect](./2023-08-20-site-reliability-engineering-part-3.md) +[2023-11-19 Site Reliability Engineering - Part 2: Operational Balance](./2023-11-19-site-reliability-engineering-part-2.md) +[2024-01-09 Site Reliability Engineering - Part 3: On-Call Culture](./2024-01-09-site-reliability-engineering-part-3.md) +[2024-09-07 Site Reliability Engineering - Part 4: Onboarding for On-Call Engineers](./2024-09-07-site-reliability-engineering-part-4.md) ``` ▓▓▓▓░░ @@ -32,27 +33,27 @@ DC on fire: ## SRE and Organizational Culture: Navigating the Nexus -At the heart of SRE lies the proactive mindset of "prevention over cure." Traditional IT models focused predominantly on reactive solutions, but SRE mandates a shift towards foresight. By adopting Service Level Indicators (SLIs) and Service Level Objectives (SLOs), teams are equipped with clear metrics and goals that guide them toward ensuring reliability and user satisfaction. They reflect an organisational culture prioritising user experience and constant system alignment with user needs. +At the core of SRE is the principle of "prevention over cure." Unlike traditional IT setups that mostly react to problems, SRE focuses on spotting issues before they happen. This proactive approach involves using Service Level Indicators (SLIs) and Service Level Objectives (SLOs). These tools give teams specific metrics and targets to aim for, helping them keep systems reliable and users happy. It's all about creating a culture that prioritizes user experience and makes sure everything runs smoothly to meet their needs. -Another defining SRE idea concept the "error budget." This ingenious framework accepts that no system is flawless. Failures are inevitable. However, instead of being punitive, the culture here is to accept, learn, and iterate. By providing teams with a "budget" for errors, organisations create an environment where innovation is encouraged, and failures are viewed as learning opportunities. +Another key concept in SRE is the "error budget." It’s a clever approach that recognizes no system is perfect and that failures will happen. Instead of punishing mistakes, SRE culture embraces them as chances to learn and improve. The idea is to give teams a "budget" for errors, creating a space where innovation can thrive and failures are simply seen as lessons learned. -But SRE isn't just about technology and metrics; it's deeply human. It challenges the "hero culture" that plagues many IT teams. While individual heroics might occasionally save the day, a sustainable model requires collective expertise. An SRE culture recognises that heroes achieve their best within teams, negating the need for a hero-centric environment. This philosophy promotes a balanced on-call experience, emphasising the importance of trust, ownership, effective communication, and collaboration as cornerstones of team success. I personally have fallen into the hero trap, and know it's unsustainable to be the only go-to person for every problem. +SRE isn't just about tech and metrics; it's also about people. It tackles the "hero culture" that often ends up burning out IT teams. Sure, having a hero swoop in to save the day can be great, but relying on that all the time just isn’t sustainable. Instead, SRE focuses on collective expertise and teamwork. It recognizes that heroes are at their best within a solid team, making the need for constant heroics unnecessary. This way of thinking promotes a balanced on-call experience and highlights trust, ownership, good communication, and collaboration as key to success. I've been there myself, falling into the hero trap, and I know firsthand that it's just not feasible to be the go-to person for every problem that comes up. -Additionally, the SRE model requires good documentation. However, it's essential ensuring that this documentation undergoes the same quality checks as code, reinforcing effective onboarding, training and communication. +Also, the SRE model puts a big emphasis on good documentation. It's not enough to just have docs; they need to be top-notch and go through the same quality checks as code. This really helps with onboarding new team members, training, and keeping everyone on the same page. -Organisations might face a significant challenge when adopting SRE. Some might feel SRE principles counter their goals. They might prioritise feature rollouts over reliability or view SRE practices as cumbersome. Hence, creating an SRE culture often demands patient explanations and showcasing benefits, such as increased release velocity and improved user experience. +Adopting SRE can be a big challenge for some organizations. They might think the SRE approach goes against their goals, like preferring to roll out new features quickly rather than focusing on reliability, or seeing SRE practices as too much hassle. Building an SRE culture often means taking the time to explain things patiently and showing the benefits, like faster release cycles and a better user experience. -Monitoring and observability form another SRE aspect, emphasising the need for high-quality tools to query and analyse data. This ties back to the cultural emphasis on continuous learning and adaptability. SREs, by nature, need to be curious, ready to delve into anomalies, and keen on adopting new tools and practices. +Monitoring and observability are also big parts of SRE, highlighting the need for top-notch tools to query and analyze data. This aligns with the SRE focus on continuous learning and being adaptable. SREs naturally need to be curious, ready to dive into any strange issues, and always open to picking up new tools and practices. -The success of SRE within any organisation depends on the broader acceptance of its principles. It demands a move away from siloed operations, where SRE acts as a bandage on flawed systems, to a model where reliability is everyone's responsibility. +For SRE to really work in any organization, everyone needs to buy into its principles. It's about moving away from working in isolated silos and relying on SRE to just patch things up. Instead, it’s about making reliability a shared responsibility across the whole team. -In essence, the integration of SRE principles transcends technical practices. It paves the way for a shift in organisational culture that values proactive prevention, continuous learning, collaboration, and transparent communication. The successful melding of SRE and corporate culture promises not just reliable systems but also a robust, resilient, and progressive work environment. +In short, bringing SRE principles into the mix goes beyond just the technical stuff. It helps shift the whole organizational culture to value things like preventing issues before they happen, always learning, working together, and being open with communication. When SRE and corporate culture blend well, you end up with not just reliable systems but also a strong, resilient, and forward-thinking workplace. -Organisations with the implementation of SLIs, SLOs and error budgets are already advanced in their SRE journey. It takes a lot of communication, convincing, and patience until that point is reached. +Organizations that have SLIs, SLOs, and error budgets in place are already pretty far along in their SRE journey. Getting there takes a lot of communication, convincing people, and patience. Continue with the second part of this series: -[2023-08-19 Site Reliability Engineering - Part 2: Operational Balance in SRE](./2023-08-19-site-reliability-engineering-part-2.md) +[2023-11-19 Site Reliability Engineering - Part 2: Operational Balance](./2023-11-19-site-reliability-engineering-part-2.md) E-Mail your comments to `paul@nospam.buetow.org` :-) diff --git a/gemfeed/2023-08-19-site-reliability-engineering-part-2.md b/gemfeed/2023-08-19-site-reliability-engineering-part-2.md deleted file mode 100644 index b3e908f4..00000000 --- a/gemfeed/2023-08-19-site-reliability-engineering-part-2.md +++ /dev/null @@ -1,50 +0,0 @@ -# Site Reliability Engineering - Part 2: Operational Balance in SRE - -> Published at 2023-08-19T00:18:18+03:00 - -This is the second part of my Site Reliability Engineering (SRE) series. I am currently employed as a Principal Site Reliability Engineer and will try to share what SRE is about in this blog series. - -[2023-08-18 Site Reliability Engineering - Part 1: SRE and Organizational Culture](./2023-08-18-site-reliability-engineering-part-1.md) -[2023-08-19 Site Reliability Engineering - Part 2: Operational Balance in SRE (You are currently reading this)](./2023-08-19-site-reliability-engineering-part-2.md) -[2023-08-20 Site Reliability Engineering - Part 3: On-Call Culture and the Human Aspect](./2023-08-20-site-reliability-engineering-part-3.md) - -``` -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⣷⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ -⠀⠀⠀⠀⣾⠿⠿⠿⠶⠾⠿⠿⣿⣿⣿⣿⣿⣿⠿⠿⠶⠶⠿⠿⠿⣷⠀⠀⠀⠀ -⠀⠀⠀⣸⢿⣆⠀⠀⠀⠀⠀⠀⠀⠙⢿⡿⠉⠀⠀⠀⠀⠀⠀⠀⣸⣿⡆⠀⠀⠀ -⠀⠀⢠⡟⠀⢻⣆⠀⠀⠀⠀⠀⠀⠀⣾⣧⠀⠀⠀⠀⠀⠀⠀⣰⡟⠀⢻⡄⠀⠀ -⠀⢀⣾⠃⠀⠀⢿⡄⠀⠀⠀⠀⠀⢠⣿⣿⡀⠀⠀⠀⠀⠀⢠⡿⠀⠀⠘⣷⡀⠀ -⠀⣼⣏⣀⣀⣀⣈⣿⡀⠀⠀⠀⠀⣸⣿⣿⡇⠀⠀⠀⠀⢀⣿⣃⣀⣀⣀⣸⣧⠀ -⠀⢻⣿⣿⣿⣿⣿⣿⠃⠀⠀⠀⠀⣿⣿⣿⣿⠀⠀⠀⠀⠈⢿⣿⣿⣿⣿⣿⡿⠀ -⠀⠀⠉⠛⠛⠛⠋⠁⠀⠀⠀⠀⢸⣿⣿⣿⣿⡆⠀⠀⠀⠀⠈⠙⠛⠛⠛⠉⠀⠀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⣿⣿⣿⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ -⠀⠀⠀⠀⠀⠀⠴⠶⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠶⠦⠀⠀ -``` - -## Operational Balance in SRE: Finding the Equilibrium in Reliability and Velocity - -Site Reliability Engineering has established itself as more than just a set of best practices or methodologies. Instead, it stands as a beacon of operational excellence, which guides engineering teams through the turbulent waters of modern software development and system management. - -In the universe of software production, two fundamental forces are often at odds: The drive for rapid feature release (velocity) and the need for system reliability. Traditionally, the faster teams moved, the more risk was introduced into systems. SRE offers a approach to mitigate these conflicting drives through concepts like error budgets and SLIs/SLOs. These mechanisms offer a tangible metric, allowing teams to quantify how much they can push changes while ensuring they don't compromise system health. Thus, the error budget becomes a balancing act, where teams weigh the trade-offs between innovation and reliability. - -An important part of this balance is the dichotomy between operations and coding. According to SRE principles, an engineer should ideally spend an equal amount of time on operations work and coding - 50% on each. This isn't just a random metric; it's a reflection of the value SRE places on both maintaining operational excellence and progressing forward with innovations. This balance ensures that while SREs are solving today's problems, they are also preparing for tomorrow's challenges. - -However, not all operational tasks are equal. SRE differentiates between "ops work" and "toil". While ops work is integral to system maintenance and can provide value, toil represents repetitive, mundane tasks which offer little value in the long run. Recognising and minimising toil is crucial. A culture that allows engineers to drown in toil stifles innovation and growth. Hence, an organisation's approach to toil indicates its operational health and commitment to balance. - -A cornerstone of achieving operational balance lies in the tools and processes SREs use. Effective monitoring, observability tools, and ensuring that tools can handle high cardinality data are foundational. These aren't just technical requisites but reflective of an organisational culture prioritising proactive problem-solving. By having systems that effectively flag potential issues before they escalate, SREs can maintain the balance between system stability and forward momentum. - -Moreover, operational balance isn't just a technological or process challenge; it's a human one. The health of on-call engineers is as crucial as the health of the services they manage. On-call postmortems, continuous feedback loops, and recognising gaps (be it tooling, operational expertise, or resources) ensure that the human elements of operations are noticed. - -In conclusion, operational balance in SRE isn't static thing but an ongoing journey. It requires organisations to constantly evaluate their practices, tools, and, most importantly, their culture. By achieving this balance, organisations can ensure that they have time for innovation while maintaining the robustness and reliability of their systems, resulting in sustainable long-term success. - -That all sounds very romantic. The truth is, it's brutal to archive the perfect balance. No system will ever be perfect. But at least we should aim for it! - -Continue with the third part of this series: - -[2023-08-20 Site Reliability Engineering - Part 3: On-Call Culture and the Human Aspect](./2023-08-20-site-reliability-engineering-part-3.md) - -E-Mail your comments to `paul@nospam.buetow.org` :-) - -[Back to the main site](../) diff --git a/gemfeed/2023-08-20-site-reliability-engineering-part-3.md b/gemfeed/2023-08-20-site-reliability-engineering-part-3.md deleted file mode 100644 index 831eb156..00000000 --- a/gemfeed/2023-08-20-site-reliability-engineering-part-3.md +++ /dev/null @@ -1,59 +0,0 @@ -# Site Reliability Engineering - Part 3: On-Call Culture and the Human Aspect - -> Published at 2023-08-20T12:17:56+03:00 - -This is the third part of my Site Reliability Engineering (SRE) series. I am currently employed as a Principal Site Reliability Engineer and will try to share what SRE is about in this blog series. - -[2023-08-18 Site Reliability Engineering - Part 1: SRE and Organizational Culture](./2023-08-18-site-reliability-engineering-part-1.md) -[2023-08-19 Site Reliability Engineering - Part 2: Operational Balance in SRE](./2023-08-19-site-reliability-engineering-part-2.md) -[2023-08-20 Site Reliability Engineering - Part 3: On-Call Culture and the Human Aspect (You are currently reading this)](./2023-08-20-site-reliability-engineering-part-3.md) - -``` - ..--""""----.. - .-" ..--""""--.j-. - .-" .-" .--.""--.. - .-" .-" ..--"-. \/ ; - .-" .-"_.--..--"" ..--' "-. : - .' .' / `. \..--"" __ _ \ ; - :.__.-" \ / .' ( )"-. Y - ; ;: ( ) ( ). \ - .': /:: : \ \ - .'.-"\._ _.-" ; ; ( ) .-. ( ) \ - " `.""" .j" : : \ ; ; \ - bug /"""""/ ; ( ) "" :.( ) \ - /\ / : \ \`.: _ \ - : `. / ; `( ) (\/ :" \ \ - \ `. : "-.(_)_.' t-' ; - \ `. ; ..--": - `. `. : ..--"" : - `. "-. ; ..--"" ; - `. "-.:_..--"" ..--" - `. : ..--"" - "-. : ..--"" - "-.;_..--"" - -``` - -## On-Call Culture and the Human Aspect: Prioritising Well-being in the Realm of Reliability - -Site Reliability Engineering is synonymous with ensuring system reliability, but the human factor is an often-underestimated part of this discipline. Ensuring an healthy on-call culture is as critical as any technical solution. The well-being of the engineers is an important factor. - -Firstly, a healthy on-call rotation is about more than just managing and responding to incidents. It's about the entire ecosystem that supports this practice. This involves reducing pain points, offering mentorship, rapid iteration, and ensuring that engineers have the right tools and processes. One ceavat is, that engineers should be willing to learn. Especially in on-call rotation embedding SREs with other engineers (for example Software Engineers or QA Engineers), it's difficult to motivate everyone to engage. QA Engineers want to test the software, Software Engineers want to implement new features; they don't want to troubleshoot and debug production incidents. It can be depressing for the mentoring SRE. - -Furthermore, the metrics that measure the success of an on-call experience are only sometimes straightforward. While one might assume that fewer pages translate to better on-call expertise (which is true to a degree, as who wants to receive a page out of office hours?), it's not always the volume of pages that matters most. Trust, ownership, accountability, and effective communication play the important roles. - -An important part is giving feedback about the on-call experience to ensure continuous learning. If alerts are mostly noise, they should be tuned or even eliminated. If alerts are actionable, can recurring tasks be automated? If there are knowledge gaps, is the documentation not good enough? Continuous retrospection ensures that not only do systems evolve, but the experience for the on-call engineers becomes progressively better. - -Onboarding for on-call duties is a crucial aspect of ensuring the reliability and efficiency of systems. This process involves equipping new team members with the knowledge, tools, and support to handle incidents confidently. It begins with an overview of the system architecture and common challenges, followed by training on monitoring tools, alerting mechanisms, and incident response protocols. Shadowing experienced on-call engineers can offer practical exposure. Too often, new engineers are thrown into the cold water without proper onboarding and training because the more experienced engineers are too busy fire-fighting production issues in the first place. - -An always-on, always-alert culture can lead to burnout. Engineers should be encouraged to recognise their limits, take breaks, and seek support when needed. This isn't just about individual health; a burnt-out engineer can have cascading effects on the entire team and the systems they manage. A successful on-call culture ensures that while systems are kept running, the engineers are kept happy, healthy, and supported. The more experienced engineers should take time to mentor the junior engineers, but the junior engineers should also be fully engaged, try to investigate and learn new things by themselves. - -For the junior engineer, it's too easy to fall back and ask the experts in the team every time an issue arises. This seems reasonable, but serving recipes for solving production issues on a silver tablet won't scale forever, as there are infinite scenarios of how production systems can break. So every engineer should learn to debug, troubleshoot and resolve production incidents independently. The experts will still be there for guidance and step in when the junior gets stuck after trying, but the experts should also learn to step down so that lesser experienced engineers can step up and learn. But mistakes can always happen here; that's why having a blameless on-call culture is essential. - -A blameless on-call culture is a must for a safe and collaborative environment where engineers can effectively respond to incidents without fear of retribution. This approach acknowledges that mistakes are a natural part of the learning and innovation process. When individuals are assured they won't be punished for errors, they're more likely to openly discuss mistakes, allowing the entire team to learn and grow from each incident. Furthermore, a blameless culture promotes psychological safety, enhances job satisfaction, reduces burnout, and ensures that talent remains committed and engaged. - -The fourth part of this blog series will be published soon :-) - -E-Mail your comments to `paul@nospam.buetow.org` :-) - -[Back to the main site](../) diff --git a/gemfeed/2023-09-25-dtail-usage-examples.md b/gemfeed/2023-09-25-dtail-usage-examples.md index 90c829a9..8df87a93 100644 --- a/gemfeed/2023-09-25-dtail-usage-examples.md +++ b/gemfeed/2023-09-25-dtail-usage-examples.md @@ -22,6 +22,22 @@ DTail is a distributed DevOps tool for tailing, grepping, catting logs and other | | ``` +## Table of Contents + +* [⇢ DTail usage examples](#dtail-usage-examples) +* [⇢ ⇢ Commands](#commands) +* [⇢ ⇢ Following logs](#following-logs) +* [⇢ ⇢ Aggregating logs](#aggregating-logs) +* [⇢ ⇢ How to use `dcat`](#how-to-use-dcat) +* [⇢ ⇢ How to use `dgrep`](#how-to-use-dgrep) +* [⇢ ⇢ How to use `dmap`](#how-to-use-dmap) +* [⇢ ⇢ How to use the DTail serverless mode](#how-to-use-the-dtail-serverless-mode) +* [⇢ ⇢ ⇢ Serverless map-reduce query](#serverless-map-reduce-query) +* [⇢ ⇢ ⇢ Aggregating CSV files](#aggregating-csv-files) +* [⇢ ⇢ ⇢ Other serverless commands](#other-serverless-commands) + +## Commands + DTail consists out of a server and several client binaries. In this post, I am showcasing their use! * Use `dtail` to follow logs @@ -228,17 +244,17 @@ diff /etc/test /etc/passwd Use `--help` for more available options. Or go to the DTail page for more information! Hope you find DTail useful! +E-Mail your comments to `paul@nospam.buetow.org` :-) + Other related posts are: -[2021-04-22 DTail - The distributed log tail program](./2021-04-22-dtail-the-distributed-log-tail-program.md) -[2022-03-06 The release of DTail 4.0.0](./2022-03-06-the-release-of-dtail-4.0.0.md) -[2022-10-30 Installing DTail on OpenBSD](./2022-10-30-installing-dtail-on-openbsd.md) [2023-09-25 DTail usage examples (You are currently reading this)](./2023-09-25-dtail-usage-examples.md) +[2022-10-30 Installing DTail on OpenBSD](./2022-10-30-installing-dtail-on-openbsd.md) +[2022-03-06 The release of DTail 4.0.0](./2022-03-06-the-release-of-dtail-4.0.0.md) +[2021-04-22 DTail - The distributed log tail program](./2021-04-22-dtail-the-distributed-log-tail-program.md) I hope you find the tools presented in this post useful! Paul -E-Mail your comments to `paul@nospam.buetow.org` :-) - [Back to the main site](../) diff --git a/gemfeed/2023-10-29-kiss-static-web-photo-albums-with-photoalbum.sh.md b/gemfeed/2023-10-29-kiss-static-web-photo-albums-with-photoalbum.sh.md index 1b3639e7..2121886c 100644 --- a/gemfeed/2023-10-29-kiss-static-web-photo-albums-with-photoalbum.sh.md +++ b/gemfeed/2023-10-29-kiss-static-web-photo-albums-with-photoalbum.sh.md @@ -2,6 +2,12 @@ > Published at 2023-10-29T22:25:04+02:00 +Once in a while, I share photos on the inter-web with either family and friends or on my The Irregular Ninja photo site. One hobby of mine is photography (even though I don't have enough time for it - so I am primarily a point-and-shoot photographer). + +I'm not particularly eager to use any photo social sharing platforms such as Flickr, 500px (I used them regularly in the past), etc., anymore. I value self-hosting, DIY and privacy (nobody should data mine my photos), and no third party should have any rights to my pictures. + +I value KISS (keep it simple and stupid) and simplicity. All that's required for a web photo album is some simple HTML and spice it up with CSS. No need for JavaScript, no need for a complex dynamic website. + ``` ___ .---------.._ ______!fsc!_....-' .g8888888p. '-------....._ @@ -19,13 +25,16 @@ '._____________________________________________.' ``` -## Motivation - -Once in a while, I share photos on the inter-web with either family and friends or on my The Irregular Ninja photo site. One hobby of mine is photography (even though I don't have enough time for it - so I am primarily a point-and-shoot photographer). - -I'm not particularly eager to use any photo social sharing platforms such as Flickr, 500px (I used them regularly in the past), etc., anymore. I value self-hosting, DIY and privacy (nobody should data mine my photos), and no third party should have any rights to my pictures. +## Table of Contents -I value KISS (keep it simple and stupid) and simplicity. All that's required for a web photo album is some simple HTML and spice it up with CSS. No need for JavaScript, no need for a complex dynamic website. +* [⇢ KISS static web photo albums with `photoalbum.sh`](#kiss-static-web-photo-albums-with-photoalbumsh) +* [⇢ ⇢ Introducing `photoalbum.sh`](#introducing-photoalbumsh) +* [⇢ ⇢ Installation](#installation) +* [⇢ ⇢ Setting it up](#setting-it-up) +* [⇢ ⇢ Generating the static photo album](#generating-the-static-photo-album) +* [⇢ ⇢ Cleaning it up](#cleaning-it-up) +* [⇢ ⇢ HTML templates](#html-templates) +* [⇢ ⇢ Conclusion](#conclusion) ## Introducing `photoalbum.sh` @@ -259,16 +268,18 @@ Also, I like the CSS effects which I recently added. In particular, for the Irre [`photoalbum.sh` source code on Codeberg.](https://codeberg.org/snonux/photoalbum) +E-Mail your comments to `paul@nospam.buetow.org` :-) + Other Bash and KISS-related posts are: -[2021-05-16 Personal Bash coding style guide](./2021-05-16-personal-bash-coding-style-guide.md) -[2021-06-05 Gemtexter - One Bash script to rule it all](./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md) -[2021-09-12 Keep it simple and stupid](./2021-09-12-keep-it-simple-and-stupid.md) -[2021-11-29 Bash Golf Part 1](./2021-11-29-bash-golf-part-1.md) -[2022-01-01 Bash Golf Part 2](./2022-01-01-bash-golf-part-2.md) -[2023-06-01 KISS server monitoring with Gogios](./2023-06-01-kiss-server-monitoring-with-gogios.md) +[2024-04-01 KISS high-availability with OpenBSD](./2024-04-01-KISS-high-availability-with-OpenBSD.md) +[2023-12-10 Bash Golf Part 3](./2023-12-10-bash-golf-part-3.md) [2023-10-29 KISS static web photo albums with `photoalbum.sh` (You are currently reading this)](./2023-10-29-kiss-static-web-photo-albums-with-photoalbum.sh.md) - -E-Mail your comments to `paul@nospam.buetow.org` :-) +[2023-06-01 KISS server monitoring with Gogios](./2023-06-01-kiss-server-monitoring-with-gogios.md) +[2022-01-01 Bash Golf Part 2](./2022-01-01-bash-golf-part-2.md) +[2021-11-29 Bash Golf Part 1](./2021-11-29-bash-golf-part-1.md) +[2021-09-12 Keep it simple and stupid](./2021-09-12-keep-it-simple-and-stupid.md) +[2021-06-05 Gemtexter - One Bash script to rule it all](./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md) +[2021-05-16 Personal Bash coding style guide](./2021-05-16-personal-bash-coding-style-guide.md) [Back to the main site](../) diff --git a/gemfeed/2023-11-11-mind-management-book-notes.md b/gemfeed/2023-11-11-mind-management-book-notes.md index c19ba472..2cefef51 100644 --- a/gemfeed/2023-11-11-mind-management-book-notes.md +++ b/gemfeed/2023-11-11-mind-management-book-notes.md @@ -16,6 +16,21 @@ These are my personal takeaways after reading "Mind Management" by David Kadavy. ''' ``` +## Table of Contents + +* [⇢ "Mind Management" book notes](#mind-management-book-notes) +* [⇢ ⇢ It's not about time management](#it-s-not-about-time-management) +* [⇢ ⇢ Empty slots in the calendar](#empty-slots-in-the-calendar) +* [⇢ ⇢ When you safe time...](#when-you-safe-time) +* [⇢ ⇢ Follow your mood](#follow-your-mood) +* [⇢ ⇢ Boosting creativity](#boosting-creativity) +* [⇢ ⇢ The right mood for the task at hand](#the-right-mood-for-the-task-at-hand) +* [⇢ ⇢ Creativity hacks](#creativity-hacks) +* [⇢ ⇢ Planning and strategizing](#planning-and-strategizing) +* [⇢ ⇢ Fake it until you make it. ](#fake-it-until-you-make-it-) + +## It's not about time management + Productivity isn't about time management - it's about mind management. When you put a lot of effort into something, there are: * The point of diminishing returns @@ -91,15 +106,17 @@ You could schedule exploratory tasks when you are under grief. Sound systems sho * Talk slowly and deepen your voice a bit to appear more confident. You will also become more confident. * Also, use power positions for better confidence. +E-Mail your comments to `paul@nospam.buetow.org` :-) + Other book notes of mine are: -[2023-03-16 "The Pragmatic Programmer" book notes](./2023-03-16-the-pragmatic-programmer-book-notes.md) -[2023-04-01 "Never split the difference" book notes](./2023-04-01-never-split-the-difference-book-notes.md) -[2023-05-06 "The Obstacle is the Way" book notes](./2023-05-06-the-obstacle-is-the-way-book-notes.md) -[2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes](./2023-07-17-career-guide-and-soft-skills-book-notes.md) +[2024-10-24 "Staff Engineer" book notes](./2024-10-24-staff-engineer-book-notes.md) +[2024-07-07 "The Stoic Challenge" book notes](./2024-07-07-the-stoic-challenge-book-notes.md) +[2024-05-01 "Slow Productivity" book notes](./2024-05-01-slow-productivity-book-notes.md) [2023-11-11 "Mind Management" book notes (You are currently reading this)](./2023-11-11-mind-management-book-notes.md) +[2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes](./2023-07-17-career-guide-and-soft-skills-book-notes.md) +[2023-05-06 "The Obstacle is the Way" book notes](./2023-05-06-the-obstacle-is-the-way-book-notes.md) +[2023-04-01 "Never split the difference" book notes](./2023-04-01-never-split-the-difference-book-notes.md) +[2023-03-16 "The Pragmatic Programmer" book notes](./2023-03-16-the-pragmatic-programmer-book-notes.md) -E-Mail your comments to `paul@nospam.buetow.org` :-) - -[More books and other resources I found useful.](../resources.md) [Back to the main site](../) diff --git a/gemfeed/2023-11-19-site-reliability-engineering-part-2.md b/gemfeed/2023-11-19-site-reliability-engineering-part-2.md new file mode 100644 index 00000000..29749257 --- /dev/null +++ b/gemfeed/2023-11-19-site-reliability-engineering-part-2.md @@ -0,0 +1,50 @@ +# Site Reliability Engineering - Part 2: Operational Balance + +> Published at 2023-11-19T00:18:18+03:00 + +This is the second part of my Site Reliability Engineering (SRE) series. I am currently employed as a Site Reliability Engineer and will try to share what SRE is about in this blog series. + +[2023-08-18 Site Reliability Engineering - Part 1: SRE and Organizational Culture](./2023-08-18-site-reliability-engineering-part-1.md) +[2023-11-19 Site Reliability Engineering - Part 2: Operational Balance (You are currently reading this)](./2023-11-19-site-reliability-engineering-part-2.md) +[2024-01-09 Site Reliability Engineering - Part 3: On-Call Culture](./2024-01-09-site-reliability-engineering-part-3.md) +[2024-09-07 Site Reliability Engineering - Part 4: Onboarding for On-Call Engineers](./2024-09-07-site-reliability-engineering-part-4.md) + +``` +⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⣷⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +⠀⠀⠀⠀⣾⠿⠿⠿⠶⠾⠿⠿⣿⣿⣿⣿⣿⣿⠿⠿⠶⠶⠿⠿⠿⣷⠀⠀⠀⠀ +⠀⠀⠀⣸⢿⣆⠀⠀⠀⠀⠀⠀⠀⠙⢿⡿⠉⠀⠀⠀⠀⠀⠀⠀⣸⣿⡆⠀⠀⠀ +⠀⠀⢠⡟⠀⢻⣆⠀⠀⠀⠀⠀⠀⠀⣾⣧⠀⠀⠀⠀⠀⠀⠀⣰⡟⠀⢻⡄⠀⠀ +⠀⢀⣾⠃⠀⠀⢿⡄⠀⠀⠀⠀⠀⢠⣿⣿⡀⠀⠀⠀⠀⠀⢠⡿⠀⠀⠘⣷⡀⠀ +⠀⣼⣏⣀⣀⣀⣈⣿⡀⠀⠀⠀⠀⣸⣿⣿⡇⠀⠀⠀⠀⢀⣿⣃⣀⣀⣀⣸⣧⠀ +⠀⢻⣿⣿⣿⣿⣿⣿⠃⠀⠀⠀⠀⣿⣿⣿⣿⠀⠀⠀⠀⠈⢿⣿⣿⣿⣿⣿⡿⠀ +⠀⠀⠉⠛⠛⠛⠋⠁⠀⠀⠀⠀⢸⣿⣿⣿⣿⡆⠀⠀⠀⠀⠈⠙⠛⠛⠛⠉⠀⠀ +⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⣿⣿⣿⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +⠀⠀⠀⠀⠀⠀⠴⠶⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠶⠦⠀⠀ +``` + +## Striking the Right Balance Between Reliability and Speed + +Site Reliability Engineering is more than just a bunch of best practices or methods. It's a guiding light for engineering teams, helping them navigate the tricky waters of modern software development and system management. +In the world of software production, there are two big forces that often clash: the push for fast feature releases (velocity) and the need for reliable systems. Traditionally, moving faster meant more risk. SRE helps balance these opposing goals with things like error budgets and SLIs/SLOs. These tools give teams a clear way to measure how much they can push changes without hurting system health. So, the error budget becomes a balancing act, helping teams trade off between innovation and reliability. + +Finding the right balance in SRE means juggling operations and coding. Ideally, engineers should split their time 50/50 between these tasks. This isn't just a random rule; it highlights how much SRE values both maintaining smooth operations and driving innovation. This way, SREs not only handle today's problems but also prepare for tomorrow's challenges. + +But not all operations tasks are the same. SRE makes a clear distinction between "ops work" and "toil." Ops work is essential for maintaining systems and adds value, while toil is the repetitive, boring stuff that doesn’t. It's super important to recognize and minimize toil because a culture that lets engineers get bogged down in it will kill innovation and growth. The way an organization handles toil says a lot about its operational health and commitment to balance. + +A key part of finding operational balance is the tools and processes that SREs use. Great monitoring and observability tools, especially those that can handle lots of complex data, are essential. This isn’t just about having the right tech—it shows that the organization values proactive problem-solving. With systems that can spot potential issues early, SREs can keep things stable while still pushing forward. + +Operational balance isn't just about tech or processes; it's also about people. The well-being of on-call engineers is just as important as the health of the services they manage. Doing postmortems after incidents, having continuous feedback loops, and identifying gaps in tools, skills, or resources all help make sure the human side of operations gets the attention it deserves. + +In the end, finding operational balance in SRE is an ongoing journey, not a one-time thing. Companies need to keep reassessing their practices, tools, and especially their culture. When they get this balance right, they can keep innovating without sacrificing the reliability of their systems, leading to long-term success. + +That all sounds pretty idealistic. The reality is that getting the perfect balance is really tough. No system is ever going to be perfect. But hey, we should still strive for it! + +Continue with the third part of this series: + +[2024-01-09 Site Reliability Engineering - Part 3: On-Call Culture](./2024-01-09-site-reliability-engineering-part-3.md) + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +[Back to the main site](../) diff --git a/gemfeed/2023-12-10-bash-golf-part-3.md b/gemfeed/2023-12-10-bash-golf-part-3.md new file mode 100644 index 00000000..8c6e5e01 --- /dev/null +++ b/gemfeed/2023-12-10-bash-golf-part-3.md @@ -0,0 +1,380 @@ +# Bash Golf Part 3 + +> Published at 2023-12-10T11:35:54+02:00 + +This is the third blog post about my Bash Golf series. This series is random Bash tips, tricks, and weirdnesses I have encountered over time. + +[2021-11-29 Bash Golf Part 1](./2021-11-29-bash-golf-part-1.md) +[2022-01-01 Bash Golf Part 2](./2022-01-01-bash-golf-part-2.md) +[2023-12-10 Bash Golf Part 3 (You are currently reading this)](./2023-12-10-bash-golf-part-3.md) + +``` + + '\ '\ '\ . . |>18>> + \ \ \ . ' . | + O>> O>> O>> . 'o | + \ .\. .. .\. .. . | + /\ . /\ . /\ . . | + / / . / / .'. / / .' . | +jgs^^^^^^^`^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Art by Joan Stark, mod. by Paul Buetow +``` + +## Table of Contents + +* [⇢ Bash Golf Part 3](#bash-golf-part-3) +* [⇢ ⇢ `FUNCNAME`](#funcname) +* [⇢ ⇢ `:(){ :|:& };:`](#--) +* [⇢ ⇢ Inner functions](#inner-functions) +* [⇢ ⇢ Exporting functions](#exporting-functions) +* [⇢ ⇢ Dynamic variables with `local`](#dynamic-variables-with-local) +* [⇢ ⇢ `if` conditionals](#if-conditionals) +* [⇢ ⇢ Multi-line comments](#multi-line-comments) +* [⇢ ⇢ Don't change it while it's executed](#don-t-change-it-while-it-s-executed) + +## `FUNCNAME` + +`FUNCNAME` is an array you are looking for a way to dynamically determine the name of the current function (which could be considered the callee in the context of its own execution), you can use the special variable `FUNCNAME`. This is an array variable that contains the names of all shell functions currently in the execution call stack. The element `FUNCNAME[0]` holds the name of the currently executing function, `FUNCNAME[1]` the name of the function that called that, and so on. + +This is particularly useful for logging when you want to include the callee function in the log output. E.g. look at this log helper: + +```bash +#!/usr/bin/env bash + +log () { + local -r level="$1"; shift + local -r message="$1"; shift + local -i pid="$$" + + local -r callee=${FUNCNAME[1]} + local -r stamp=$(date +%Y%m%d-%H%M%S) + + echo "$level|$stamp|$pid|$callee|$message" >&2 +} + +at_home_friday_evening () { + log INFO 'One Peperoni Pizza, please' +} + +at_home_friday_evening +``` + +The output is as follows: + +```bash +❯ ./logexample.sh +INFO|20231210-082732|123002|at_home_friday_evening|One Peperoni Pizza, please +``` + +## `:(){ :|:& };:` + +This one may be widely known already, but I am including it here as I found a cute image illustrating it. But to break `:(){ :|:& };:` down: + +* `:(){ }` is really a declaration of the function `:` +* The `;` is ending the current statement +* The `:` at the end is calling the function `:` +* `:|:&` is the function body + +Let's break down the function body `:|:&`: + +* The first `:` is calling the function recursively +* The `|:` is piping the output to the function `:` again (parallel recursion) +* The `&` lets it run in the background. + +So, it's a fork bomb. If you run it, your computer will run out of resources eventually. (Modern Linux distributions could have reasonable limits configured for your login session, so it won't bring down your whole system anymore unless you run it as `root`!) + +And here is the cute illustration: + +[](./bash-golf-part-3/bash-fork-bomb.jpg) + +## Inner functions + +Bash defines variables as it is interpreting the code. The same applies to function declarations. Let's consider this code: + +```bash +#!/usr/bin/env bash + +outer() { + inner() { + echo 'Intel inside!' + } + inner +} + +inner +outer +inner +``` + +And let's execute it: + +``` +❯ ./inner.sh +/tmp/inner.sh: line 10: inner: command not found +Intel inside! +Intel inside! +``` + +What happened? The first time `inner` was called, it wasn't defined yet. That only happens after the `outer` run. Note that `inner` will still be globally defined. But functions can be declared multiple times (the last version wins): + +```bash +#!/usr/bin/env bash + +outer1() { + inner() { + echo 'Intel inside!' + } + inner +} + +outer2() { + inner() { + echo 'Wintel inside!' + } + inner +} + +outer1 +inner +outer2 +inner +``` + +And let's run it: + +``` +❯ ./inner2.sh +Intel inside! +Intel inside! +Wintel inside! +Wintel inside! +``` + +## Exporting functions + +Have you ever wondered how to execute a shell function in parallel through `xargs`? The problem is that this won't work: + +```bash +#!/usr/bin/env bash + +some_expensive_operations() { + echo "Doing expensive operations with '$1' from pid $$" +} + +for i in {0..9}; do echo $i; done \ + | xargs -P10 -I{} bash -c 'some_expensive_operations "{}"' +``` + +We try here to run ten parallel processes; each of them should run the `some_expensive_operations` function with a different argument. The arguments are provided to `xargs` through `STDIN` one per line. When executed, we get this: + +``` +❯ ./xargs.sh +bash: line 1: some_expensive_operations: command not found +bash: line 1: some_expensive_operations: command not found +bash: line 1: some_expensive_operations: command not found +bash: line 1: some_expensive_operations: command not found +bash: line 1: some_expensive_operations: command not found +bash: line 1: some_expensive_operations: command not found +bash: line 1: some_expensive_operations: command not found +bash: line 1: some_expensive_operations: command not found +bash: line 1: some_expensive_operations: command not found +bash: line 1: some_expensive_operations: command not found +``` + +There's an easy solution for this. Just export the function! It will then be magically available in any sub-shell! + +```bash +#!/usr/bin/env bash + +some_expensive_operations() { + echo "Doing expensive operations with '$1' from pid $$" +} +export -f some_expensive_operations + +for i in {0..9}; do echo $i; done \ + | xargs -P10 -I{} bash -c 'some_expensive_operations "{}"' +``` + +When we run this now, we get: + +``` +❯ ./xargs.sh +Doing expensive operations with '0' from pid 132831 +Doing expensive operations with '1' from pid 132832 +Doing expensive operations with '2' from pid 132833 +Doing expensive operations with '3' from pid 132834 +Doing expensive operations with '4' from pid 132835 +Doing expensive operations with '5' from pid 132836 +Doing expensive operations with '6' from pid 132837 +Doing expensive operations with '7' from pid 132838 +Doing expensive operations with '8' from pid 132839 +Doing expensive operations with '9' from pid 132840 +``` + +If `some_expensive_function` would call another function, the other function must also be exported. Otherwise, there will be a runtime error again. E.g., this won't work: + +```bash +#!/usr/bin/env bash + +some_other_function() { + echo "$1" +} + +some_expensive_operations() { + some_other_function "Doing expensive operations with '$1' from pid $$" +} +export -f some_expensive_operations + +for i in {0..9}; do echo $i; done \ + | xargs -P10 -I{} bash -c 'some_expensive_operations "{}"' +``` + +... because `some_other_function` isn't exported! You will also need to add an `export -f some_other_function`! + +## Dynamic variables with `local` + +You may know that `local` is how to declare local variables in a function. Most don't know that those variables actually have dynamic scope. Let's consider the following example: + +```bash +#!/usr/bin/env bash + +foo() { + local foo=bar # Declare local/dynamic variable + bar + echo "$foo" +} + +bar() { + echo "$foo" + foo=baz +} + +foo=foo # Declare global variable +foo # Call function foo +echo "$foo" +``` + +Let's pause a minute. What do you think the output would be? + +Let's run it: + +``` +❯ ./dynamic.sh +bar +baz +foo +``` + +What happened? The variable `foo` (declared with `local`) is available in the function it was declared in and in all other functions down the call stack! We can even modify the value of `foo`, and the change will be visible up the call stack. It's not a global variable; on the last line, `echo "$foo"` echoes the global variable content. + + +## `if` conditionals + +Consider all variants here more or less equivalent: + +```bash +#!/usr/bin/env bash + +declare -r foo=foo +declare -r bar=bar + +if [ "$foo" = foo ]; then + if [ "$bar" = bar ]; then + echo ok1 + fi +fi + +if [ "$foo" = foo ] && [ "$bar" == bar ]; then + echo ok2a +fi + +[ "$foo" = foo ] && [ "$bar" == bar ] && echo ok2b + +if [[ "$foo" = foo && "$bar" == bar ]]; then + echo ok3a +fi + + [[ "$foo" = foo && "$bar" == bar ]] && echo ok3b + +if test "$foo" = foo && test "$bar" = bar; then + echo ok4a +fi + +test "$foo" = foo && test "$bar" = bar && echo ok4b +``` + +The output we get is: + +``` +❯ ./if.sh +ok1 +ok2a +ok2b +ok3a +ok3b +ok4a +ok4b +``` + +## Multi-line comments + +You all know how to comment. Put a `#` in front of it. You could use multiple single-line comments or abuse heredocs and redirect it to the `:` no-op command to emulate multi-line comments. + +```bash +#!/usr/bin/env bash + +# Single line comment + +# These are two single line +# comments one after another + +: <<COMMENT +This is another way a +multi line comment +could be written! +COMMENT +``` + +I will not demonstrate the execution of this script, as it won't print anything! It's obviously not the most pretty way of commenting on your code, but it could sometimes be handy! + +## Don't change it while it's executed + +Consider this script: + +```bash +#!/usr/bin/env bash + +echo foo +echo echo baz >> $0 +echo bar +``` + +When it is run, it will do: + +``` +❯ ./if.sh +foo +bar +baz +❯ cat if.sh +#!/usr/bin/env bash + +echo foo +echo echo baz >> $0 +echo bar +echo baz +``` + +So what happened? The `echo baz` line was appended to the script while it was still executed! And the interpreter also picked it up! It tells us that Bash evaluates each line as it encounters it. This can lead to nasty side effects when editing the script while it is still being executed! You should always keep this in mind! + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +Other related posts are: + +[2023-12-10 Bash Golf Part 3 (You are currently reading this)](./2023-12-10-bash-golf-part-3.md) +[2022-01-01 Bash Golf Part 2](./2022-01-01-bash-golf-part-2.md) +[2021-11-29 Bash Golf Part 1](./2021-11-29-bash-golf-part-1.md) +[2021-06-05 Gemtexter - One Bash script to rule it all](./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md) +[2021-05-16 Personal Bash coding style guide](./2021-05-16-personal-bash-coding-style-guide.md) + +[Back to the main site](../) diff --git a/gemfeed/2024-01-09-site-reliability-engineering-part-3.md b/gemfeed/2024-01-09-site-reliability-engineering-part-3.md new file mode 100644 index 00000000..15b9a170 --- /dev/null +++ b/gemfeed/2024-01-09-site-reliability-engineering-part-3.md @@ -0,0 +1,64 @@ +# Site Reliability Engineering - Part 3: On-Call Culture + +> Published at 2024-01-09T18:35:48+02:00 + +Welcome to Part 3 of my Site Reliability Engineering (SRE) series. I'm currently working as a Site Reliability Engineer, and I’m here to share what SRE is all about in this blog series. + +[2023-08-18 Site Reliability Engineering - Part 1: SRE and Organizational Culture](./2023-08-18-site-reliability-engineering-part-1.md) +[2023-11-19 Site Reliability Engineering - Part 2: Operational Balance](./2023-11-19-site-reliability-engineering-part-2.md) +[2024-01-09 Site Reliability Engineering - Part 3: On-Call Culture (You are currently reading this)](./2024-01-09-site-reliability-engineering-part-3.md) +[2024-09-07 Site Reliability Engineering - Part 4: Onboarding for On-Call Engineers](./2024-09-07-site-reliability-engineering-part-4.md) + +``` + ..--""""----.. + .-" ..--""""--.j-. + .-" .-" .--.""--.. + .-" .-" ..--"-. \/ ; + .-" .-"_.--..--"" ..--' "-. : + .' .' / `. \..--"" __ _ \ ; + :.__.-" \ / .' ( )"-. Y + ; ;: ( ) ( ). \ + .': /:: : \ \ + .'.-"\._ _.-" ; ; ( ) .-. ( ) \ + " `.""" .j" : : \ ; ; \ + bug /"""""/ ; ( ) "" :.( ) \ + /\ / : \ \`.: _ \ + : `. / ; `( ) (\/ :" \ \ + \ `. : "-.(_)_.' t-' ; + \ `. ; ..--": + `. `. : ..--"" : + `. "-. ; ..--"" ; + `. "-.:_..--"" ..--" + `. : ..--"" + "-. : ..--"" + "-.;_..--"" + +``` + +## Putting Well-being First + +Site Reliability Engineering is all about keeping systems reliable, but we often forget how important the human side is. A healthy on-call culture is just as crucial as any technical fix. The well-being of the engineers really matters. + +First off, a healthy on-call rotation is about more than just handling incidents. It's about creating a supportive ecosystem. This means cutting down on pain points, offering mentorship, quickly iterating on processes, and making sure engineers have the right tools. But there's a catch—engineers need to be willing to learn. Especially in on-call rotations where SREs work with Software Engineers or QA Engineers, it can be tough to get everyone motivated. QA Engineers want to test, Software Engineers want to build new features; they don’t want to deal with production issues. This can be really frustrating for the SREs trying to mentor them. + +Plus, measuring a good on-call experience isn't always clear-cut. You might think fewer pages mean a better on-call setup—and yeah, no one wants to get paged after hours—but it's not just about the number of pages. Trust, ownership, accountability, and solid communication are what really matter. + +A key part is giving feedback about the on-call experience to keep learning and improving. If alerts are mostly noise, they need to be tweaked or even ditched. If alerts are helpful, can we automate the repetitive tasks? If there are knowledge gaps, is the documentation lacking? Regular retrospectives ensure that the systems get better over time and the on-call experience improves for the engineers. + +Getting new team members ready for on-call duties is super important for keeping systems reliable and efficient. This means giving them the knowledge, tools, and support they need to handle incidents with confidence. It starts with a rundown of the system architecture and common issues, then training on monitoring tools, alerting systems, and incident response protocols. Watching experienced on-call engineers in action can provide some hands-on learning. Too often, though, new engineers get thrown into the deep end without proper onboarding because the more experienced engineers are too busy dealing with ongoing production issues. + +A culture where everyone's always on and alert can cause burnout. Engineers need to know their limits, take breaks, and ask for help when they need it. This isn't just about personal health; a burnt-out engineer can drag down the whole team and the systems they manage. A good on-call culture keeps systems running while making sure engineers are happy, healthy, and supported. Experienced engineers should take the time to mentor juniors, but junior engineers should also stay engaged, investigate issues, and learn new things on their own. + +For junior engineers, it's tempting to always ask the experts for help whenever something goes wrong. While that might seem reasonable, constantly handing out solutions doesn't scale—there are endless ways for production systems to break. So, every engineer needs to learn how to debug, troubleshoot, and resolve incidents on their own. The experts should be there for guidance and can step in when a junior gets really stuck, but they also need to give space for less experienced engineers to grow and learn. + +A blameless on-call culture is essential for creating a safe and collaborative environment where engineers can handle incidents without worrying about getting blamed. It recognizes that mistakes are just part of learning and innovating. When people know they won’t be punished for errors, they’re more likely to talk openly about what went wrong, which helps the whole team learn and improve. Plus, a blameless culture boosts psychological safety, job satisfaction, and reduces burnout, keeping everyone committed and engaged. + +Mistakes are gonna happen, which is why having a blameless on-call culture is so important. + +Continue with the fourth part of this series: + +[2024-09-07 Site Reliability Engineering - Part 4: Onboarding for On-Call Engineers](./2024-09-07-site-reliability-engineering-part-4.md) + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +[Back to the main site](../) diff --git a/gemfeed/2024-01-13-one-reason-why-i-love-openbsd.md b/gemfeed/2024-01-13-one-reason-why-i-love-openbsd.md new file mode 100644 index 00000000..531c4581 --- /dev/null +++ b/gemfeed/2024-01-13-one-reason-why-i-love-openbsd.md @@ -0,0 +1,63 @@ +# One reason why I love OpenBSD + +> Published at 2024-01-13T22:55:33+02:00 + +``` + FISHKISSFISHKIS + SFISHKISSFISHKISSFISH F + ISHK ISSFISHKISSFISHKISS FI + SHKISS FISHKISSFISHKISSFISS FIS +HKISSFISHKISSFISHKISSFISHKISSFISH KISS + FISHKISSFISHKISSFISHKISSFISHKISS FISHK + SSFISHKISSFISHKISSFISHKISSFISHKISSF + ISHKISSFISHKISSFISHKISSFISHKISSF ISHKI +SSFISHKISSFISHKISSFISHKISSFISHKIS SFIS + HKISSFISHKISSFISHKISSFISHKISS FIS + HKISSFISHKISSFISHKISSFISHK IS + SFISHKISSFISHKISSFISH K + ISSFISHKISSFISHK +``` + +I just upgraded my OpenBSD's from `7.3` to `7.4` by following the unattended upgrade guide: + +[https://www.openbsd.org/faq/upgrade74.html](https://www.openbsd.org/faq/upgrade74.html) + +```shell +$ doas installboot sd0 # Update the bootloader (not for every upgrade required) +$ doas sysupgrade # Update all binaries (including Kernel) +``` + +`sysupgrade` downloaded and upgraded to the next release and rebooted the system. After the reboot, I run: + +```shell +$ doas sysmerge # Update system configuration files +$ doas pkg_add -u # Update all packages +$ doas reboot # Just in case, reboot one more time +``` + +That's it! Took me around 5 minutes in total! No issues, only these few comands, only 5 minutes! It just works! No problems, no conflicts, no tons (actually none) config file merge conflicts. + +I followed the same procedure the previous times and never encountered any difficulties with any OpenBSD upgrades. + +I have seen upgrades of other Operating Systems either take a long time or break the system (which takes manual steps to repair). That's just one of many reasons why I love OpenBSD! There appear never to be any problems. It just gets its job done! + +[The OpenBSD Project](https://www.openbsd.org) + +BTW: are you looking for an opinionated OpenBSD VM hoster? OpenBSD Amsterdam may be for you. They rock (I am having a VM there, too)! + +[https://openbsd.amsterdam](https://openbsd.amsterdam) + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +Other *BSD related posts are: + +[2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts](./2025-02-01-f3s-kubernetes-with-freebsd-part-3.md) +[2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation](./2024-12-03-f3s-kubernetes-with-freebsd-part-2.md) +[2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage](./2024-11-17-f3s-kubernetes-with-freebsd-part-1.md) +[2024-04-01 KISS high-availability with OpenBSD](./2024-04-01-KISS-high-availability-with-OpenBSD.md) +[2024-01-13 One reason why I love OpenBSD (You are currently reading this)](./2024-01-13-one-reason-why-i-love-openbsd.md) +[2022-10-30 Installing DTail on OpenBSD](./2022-10-30-installing-dtail-on-openbsd.md) +[2022-07-30 Let's Encrypt with OpenBSD and Rex](./2022-07-30-lets-encrypt-with-openbsd-and-rex.md) +[2016-04-09 Jails and ZFS with Puppet on FreeBSD](./2016-04-09-jails-and-zfs-on-freebsd-with-puppet.md) + +[Back to the main site](../) diff --git a/gemfeed/2024-02-04-from-babylon5.buetow.org-to-.cloud.md b/gemfeed/2024-02-04-from-babylon5.buetow.org-to-.cloud.md new file mode 100644 index 00000000..f78a7d51 --- /dev/null +++ b/gemfeed/2024-02-04-from-babylon5.buetow.org-to-.cloud.md @@ -0,0 +1,180 @@ +# From `babylon5.buetow.org` to `*.buetow.cloud` + +> Published at 2024-02-04T00:50:50+02:00 + +Recently, my employer sent me to a week-long AWS course. After the course, there wasn't any hands-on project I could dive into immediately, so I moved parts of my personal infrastructure to AWS to level up a bit through practical hands-on. + +So, I migrated all of my Docker-based self-hosted services to AWS. Usually, I am not a big fan of big cloud providers and instead use smaller hosters or indie providers and self-made solutions. However, I also must go with the times and try out technologies currently hot on the job market. I don't want to become the old man who yells at cloud :D + +[](./from-.org-to-.cloud/old-man-yells-at-cloud.jpg) + +## Table of Contents + +* [⇢ From `babylon5.buetow.org` to `*.buetow.cloud`](#from-babylon5buetoworg-to-buetowcloud) +* [⇢ ⇢ The old `*.buetow.org` way](#the-old-buetoworg-way) +* [⇢ ⇢ I kept my `buetow.org` OpenBSD boxes alive](#i-kept-my-buetoworg-openbsd-boxes-alive) +* [⇢ ⇢ The new `*.buetow.cloud` way](#the-new-buetowcloud-way) +* [⇢ ⇢ The container apps](#the-container-apps) +* [⇢ ⇢ ⇢ `flux.buetow.cloud`](#fluxbuetowcloud) +* [⇢ ⇢ ⇢ `audiobookshelf.buetow.cloud`](#audiobookshelfbuetowcloud) +* [⇢ ⇢ ⇢ `syncthing.buetow.cloud`](#syncthingbuetowcloud) +* [⇢ ⇢ ⇢ `radicale.buetow.cloud`](#radicalebuetowcloud) +* [⇢ ⇢ ⇢ `bag.buetow.cloud`](#bagbuetowcloud) +* [⇢ ⇢ ⇢ `anki.buetow.cloud`](#ankibuetowcloud) +* [⇢ ⇢ ⇢ `vault.buetow.cloud`](#vaultbuetowcloud) +* [⇢ ⇢ ⇢ `bastion.buetow.cloud`](#bastionbuetowcloud) +* [⇢ ⇢ Conclusion](#conclusion) + +## The old `*.buetow.org` way + +Before the migration, all those services were reachable through `buetow.org`-subdomains (Buetow is my last name) and ran on Docker containers on a single Rocky Linux 9 VM at Hetzner. And there was a Nginx reverse proxy with TLS offloading (with Let's Encrypt certificates). The Rocky Linux 9's hostname was `babylon5.buetow.org` (based on the Science Fiction series). + +[https://en.wikipedia.org/wiki/Babylon_5](https://en.wikipedia.org/wiki/Babylon_5) + +The downsides of this setup were: + +* Not highly available. If the server goes down, no service is reachable until it's repaired. To be fair, the Hetzner cloud VM is redundant by itself and would have re-spawned on a different worker node, I suppose. +* Manual installation. + +About the manual installation part: I could have used a configuration management system like Rexify, Puppet, etc. But I decided against it back in time, as setting up Docker containers isn't so complicated through simple start scripts. And it's only a single Linux box where a manual installation is less painful. However, regular backups (which Hetzner can do automatically for you) were a must. + +The benefits of this setup were: + +* KISS (Keep it Simple Stupid) +* Cheap + +## I kept my `buetow.org` OpenBSD boxes alive + +As pointed out, I only migrated the Docker-based self-hosted services (which run on the Babylon 5 Rocky Linux box) to AWS. Many self-hostable apps come with ready-to-use container images, making deploying them easy. + +My other two OpenBSD VMs (`blowfish.buetow.org`, hosted at Hetzner, and `fishfinger.buetow.org`, hosted at OpenBSD Amsterdam) still run (and they will keep running) the following services: + +* HTTP server for my websites (e.g. `https://foo.zone`, ...) +* ACME for Let's Encrypt TLS certificate auto-renewal. +* Gemini server for my capsules (e.g. `gemini://foo.zone`) +* Authoritative DNS servers for my domains (but `buetow.cloud`, which is on Route 53 now) +* Mail transfer agent (MTA) +* My Gogios monitoring system. +* My IRC bouncer. + +It is all automated with Rex, aka Rexify. This OpenBSD setup is my "fun" or "for pleasure" setup. Whereas the Rocky Linux 9 one I always considered the "pratical means to the end"-setup to have 3rd party Docker containers up and running with as little work as possible. + +[(R)?ex, the friendly automation framework](https://www.rexify.org) +[KISS server monitoring with Gogios](./2023-06-01-kiss-server-monitoring-with-gogios.md) +[Let's encrypt with OpenBSD and Rex](./2022-07-30-lets-encrypt-with-openbsd-and-rex.md) + +## The new `*.buetow.cloud` way + +With AWS, I decided to get myself a new domain name, as I could fully separate my AWS setup from my conventional setup and give Route 53 as an authoritative DNS a spin. + +I decided to automate everything with Terraform, as I wanted to learn to use it as it appears standard now in the job market. + +All services are installed automatically to AWS ECS Fargate. ECS is AWS's Elastic Container Service, and Fargate automatically manages the underlying hardware infrastructure (e.g., how many CPUs, RAM, etc.) for me. So I don't have to bother about having enough EC2 instances to serve my demands, for example. + +The authoritative DNS for the `buetow.cloud` domain is AWS Route 53. TLS certificates are free here at AWS and offloaded through the AWS Application Load Balancer. The LB acts as a proxy to the ECS container instances of the services. A few services I run in ECS Fargate also require the AWS Network Load Balancer. + +All services require some persistent storage. For that, I use an encrypted EFS file system, automatically replicated across all AZs (availability zones) of my region of choice, `eu-central-1`. + +In case of an AZ outage, I could re-deploy all the failed containers in another AZ, and all the data would still be there. + +The EFS automatically gets backed up by AWS for me following their standard Backup schedule. The daily backups are kept for 30 days. + +Domain registration, TLS certificate configuration and configuration of the EFS backup were quickly done through the AWS web interface. These were only one-off tasks, so they weren't fully automated through Terraform. + +You can find all Terraform manifests here: + +[https://codeberg.org/snonux/terraform](https://codeberg.org/snonux/terraform) + +Whereas: + +* `org-buetow-base` sets up the bare VPC (IPv4 and IPv6 subnets in 3 AZs, EFS, ECR (the AWS container registry for some self-built containers) and Route 53 zone. It's the requirement for most other Terraform manifests in this repository. +* `org-buetow-bastion` sets up a minimal Amazon Linux EC2 instance where I can manually SSH into and look at the EFS file system (if required). +* `org-buetow-elb` sets up the Elastic Load Balancer, a prerequisite for any service running in ECS Fargate. +* `org-buetow-ecs` finally sets up and deploys all the Docker apps mentioned above. Any apps can be turned on or off via the `variables.tf` file. + +## The container apps + +And here, finally, is the list of all the container apps my Terraform manifests deploy. The FQDNs here may not be reachable. I spin them up only on demand (for cost reasons). All services are fully dual-stacked (IPv4 & IPv6). + +### `flux.buetow.cloud` + +Miniflux is a minimalist and opinionated feed reader. With the move to AWS, I also retired my bloated instance of NextCloud. So, with Miniflux, I retired from NextCloud News. + +Miniflux requires two ECS containers. One is the Miniflux app, and the other is the PostgreSQL DB. + +[https://miniflux.app/](https://miniflux.app/) + + +### `audiobookshelf.buetow.cloud` + +Audiobookshelf was the first Docker app I installed. It is a Self-hosted audiobook and podcast server. It comes with a neat web interface, and there is also an Android app available, which works also in offline mode. This is great, as I only have the ECS instance sometimes running for cost savings. + +With Audiobookshelf, I replaced my former Audible subscription and my separate Podcast app. For Podcast synchronisation I used to use the Gpodder NextCloud sync app. But that one I retired now with Audiobookshelf as well :-) + +[https://www.audiobookshelf.org](https://www.audiobookshelf.org) + +### `syncthing.buetow.cloud` + +Syncthing is a continuous file synchronisation program. In real-time, it synchronises files between two or more computers, safely protected from prying eyes. Your data is your own, and you deserve to choose where it is stored, whether it is shared with some third party, and how it's transmitted over the internet. + +With Syncthing, I retired my old NextCloud Files and file sync client on all my devices. I also quit my NextCloud Notes setup. All my Notes are now plain Markdown files in a `Notes` directory. On Android, I can edit them with any text or Markdown editor (e.g. Obsidian), and they will be synchronised via Syncthing to my other computers, both forward and back. + +I use Syncthing to synchronise some of my Phone's data (e.g. Notes, Pictures and other documents). Initially, I synced all of my pictures, videos, etc., with AWS. But that was pretty expensive. So for now, I use it only whilst travelling. Otherwise, I will use my Syncthing instance here on my LAN (I have a cheap cloud backup in AWS S3 Glacier Deep Archive, but that's for another blog post). + +[https://syncthing.net/](https://syncthing.net/) + +### `radicale.buetow.cloud` + +Radicale is an excellent minimalist WebDAV calendar and contact synchronisation server. It was good enough to replace my NextCloud Calendar and NextCloud Contacts setup. Unfortunately, there wasn't a ready-to-use Docker image. So, I created my own. + +On Android, it works great together with the DAVx5 client for synchronisation. + +[https://radicale.org/](https://radicale.org/) +[https://codeberg.org/snonux/docker-radicale-server](https://codeberg.org/snonux/docker-radicale-server) +[https://www.davx5.com/](https://www.davx5.com/) + +### `bag.buetow.cloud` + +Wallabag is a self-hostable "save now - read later" service, and it also comes with an Android app which also has an offline mode. Think of Getpocket, but open-source! + +[https://wallabag.org/](https://wallabag.org/) +[https://github.com/wallabag/wallabag](https://github.com/wallabag/wallabag) + +### `anki.buetow.cloud` + +Anki is a great (the greatest) flash-card learning program. I am currently learning Bulgarian as my 3rd language. There is also an Android app that has an offline mode, and advanced users can also self-host the server `anki-sync-server`. For some reason (not going into the details here), I had to build my own Docker image for the server. + +[https://apps.ankiweb.net/](https://apps.ankiweb.net/) +[https://codeberg.org/snonux/docker-anki-sync-server](https://codeberg.org/snonux/docker-anki-sync-server) + +### `vault.buetow.cloud` + +Vaultwarden is an alternative implementation of the Bitwarden server API written in Rust and compatible with upstream Bitwarden clients, perfect for self-hosted deployment where running the official resource-heavy service might not be ideal. So, this is a great password manager server which can be used with any Bitwarden Android app. + +I currently don't use it, but I may in the future. I made it available in my ECS Fargate setup anyway for now. + +[https://github.com/dani-garcia/vaultwarden](https://github.com/dani-garcia/vaultwarden) + +I currently use `geheim`, a Ruby command line tool I wrote, as my current password manager. You can read a little bit about it here under "More": + +[Sweating the small stuff ](./2022-06-15-sweating-the-small-stuff.md) + +### `bastion.buetow.cloud` + +This is a tiny ARM-based Amazon Linux EC2 instance, which I sometimes spin up for investigation or manual work on my EFS file system in AWS. + +## Conclusion + +I have learned a lot about AWS and Terraform during this migration. This was actually my first AWS hands-on project with practical use. + +All of this was not particularly difficult (but at times a bit confusing). I see the use of Terraform managing more extensive infrastructures (it was even helpful for my small setup here). At least I know now what all the buzz is about :-). I don't think Terraform's HCL is a nice language. It get's it's job done, but it could be more elegant IMHO. + +Deploying updates to AWS are much easier, and some of the manual maintenance burdens of my Rocky Linux 9 VM are no longer needed. So I will have more time for other projects! + +Will I keep it in the cloud? I don't know yet. But maybe I won't renew the `buetow.cloud` domain and instead will use `*.cloud.buetow.org` or `*.aws.buetow.org` subdomains. + +Will the AWS setup be cheaper than my old Rocky Linux setup? It might be more affordable as I only turn ECS and the load balancers on or off on-demand. Time will tell! The first forecasts suggest that it will be around the same costs. + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +[Back to the main site](../) diff --git a/gemfeed/2024-03-03-a-fine-fyne-android-app-for-quickly-logging-ideas-programmed-in-golang.md b/gemfeed/2024-03-03-a-fine-fyne-android-app-for-quickly-logging-ideas-programmed-in-golang.md new file mode 100644 index 00000000..1f660405 --- /dev/null +++ b/gemfeed/2024-03-03-a-fine-fyne-android-app-for-quickly-logging-ideas-programmed-in-golang.md @@ -0,0 +1,59 @@ +# A fine Fyne Android app for quickly logging ideas programmed in Go + +> Published at 2024-03-03T00:07:21+02:00 + +I am an ideas person. I find myself frequently somewhere on the streets with an idea in my head but no paper journal noting it down. + +I have tried many note apps for my Android (I use GrapheneOS) phone. Most of them either don't do what I want, are proprietary software, require Google Play services (I have the main profile on my phone de-googled) or are too bloated. I was never into mobile app development, as I'm not too fond of the complexity of the developer toolchains. I don't want to use Android Studio (as a NeoVim user), and I don't want to use Java or Kotlin. I want to use a language I know (and like) for mobile app development. Go would be one of those languages. + +[](a-fine-fyne-android-app-for-quickly-logging-ideas-programmed-in-golang/logo-small.png) + +## Table of Contents + +* [⇢ A fine Fyne Android app for quickly logging ideas programmed in Go](#a-fine-fyne-android-app-for-quickly-logging-ideas-programmed-in-go) +* [⇢ ⇢ Enter Quick logger](#enter-quick-logger) +* [⇢ ⇢ All easy-peasy?](#all-easy-peasy) + +## Enter Quick logger + +Enter Quick logger – a compact GUI Android (well, cross-platform due to Fyne) app I've crafted using Go and the nifty Fyne framework. With Fyne, the app can be compiled easily into an Android APK. As of this writing, this app's whole Go source code is only 75 lines short!! This little tool is designed for spontaneous moments, allowing me to quickly log my thoughts as plain text files on my Android phone. There are no fancy file formats. Just plain text! + +[https://codeberg.org/snonux/quicklogger](https://codeberg.org/snonux/quicklogger) +[https://fyne.io](https://fyne.io) +[https://go.dev](https://go.dev) + +There's no need to navigate complex menus or deal with sync issues. I jot down my Idea, and Quick logger saves it to a plain text file in a designated local folder on my phone. There is one text file per note (timestamp in the file name). Once logged, the file can't be edited anymore (it keeps it simple). If I want to correct or change a note, I simply write a new one. My notes are always small (usually one short sentence each), so there isn't the need for an edit functionality. I can edit them later on my actual computer if I want to. + +With Syncthing, the note files are then synchronised to my home computer to my `~/Notes` directory. From there, a small glue Raku script adds them to my Taskwarrior DB so that I can process them later (e.g. take action on that one Idea I had). That then will delete the original note files from my computer and also (through Syncthing) from my phone. + +[https://syncthing.net](https://syncthing.net) +[https://raku.org](https://raku.org) +[https://taskwarrior.org](https://taskwarrior.org) + +Quick logger's user interface is as minimal as it gets. When I launch Quick logger, I'm greeted with a simple window where I can type plain text. Hit the "Log text" button, and voilà – the input is timestamped and saved as a file in my chosen directory. If I need to change the directory, the "Preferences" button brings up a window where I can set the notes folder and get back to logging. + +For the code-savvy folks out there, Quick logger is a neat example of what you can achieve with Go and Fyne. It's a testament to building functional, cross-platform apps without getting bogged down in the nitty-gritty of platform-specific details. Thanks to Fyne, I am pleased with how easy it is to make mobile Android apps in Go. + +[](a-fine-fyne-android-app-for-quickly-logging-ideas-programmed-in-golang/screenshot-android.png) + +My Android apps will never be polished, but they will get the job done, and this is precisely how I want them to be. Minimalistic but functional. I could spend more time polishing Quick logger, but my Quick logger app then may be the same as any other notes app out there (complicated or bloated). + +## All easy-peasy? + +I did have some issues with the app logo for Android, though. Android always showed the default app icon and not my custom icon whenever I used a custom `AndroidManifest.xml` for custom app storage permissions. Without a custom `AndroidAmnifest.xml` the app icon would be displayed under Android, but then the app would not have the `MANAGE_EXTERNAL_STORAGE` permission, which is required for Quick logger to write to a custom directory. I found a workaround, which I commented on here at Github: + +[https://github.com/fyne-io/fyne/issues/3077#issuecomment-1912697360](https://github.com/fyne-io/fyne/issues/3077#issuecomment-1912697360) + +> What worked however (app icon showing up) was to clone the fyne project, change the occurances of android.permission.INTERNET to android.permission.MANAGE_EXTERNAL_STORAGE (as these are all the changes I want in my custom android manifest) in the source tree, re-compile fyne. Now all works. I know, this is more of an hammer approach! + +Hopefully, I won't need to use this workaround anymore. But for now, it is a fair tradeoff for what I am getting. + +I hope this will inspire you to write your own small mobile apps in Go using the awesome Fyne framework! PS: The Quick logger logo was generated by ChatGPT. + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +Other Go related posts are: + +[2024-03-03 A fine Fyne Android app for quickly logging ideas programmed in Go (You are currently reading this)](./2024-03-03-a-fine-fyne-android-app-for-quickly-logging-ideas-programmed-in-golang.md) + +[Back to the main site](../) diff --git a/gemfeed/2024-04-01-KISS-high-availability-with-OpenBSD.md b/gemfeed/2024-04-01-KISS-high-availability-with-OpenBSD.md new file mode 100644 index 00000000..4a53071f --- /dev/null +++ b/gemfeed/2024-04-01-KISS-high-availability-with-OpenBSD.md @@ -0,0 +1,314 @@ +# KISS high-availability with OpenBSD + +> Published at 2024-03-30T22:12:56+02:00 + +I have always wanted a highly available setup for my personal websites. I could have used off-the-shelf hosting solutions or hosted my sites in an AWS S3 bucket. I have used technologies like (in unsorted and slightly unrelated order) BGP, LVS/IPVS, ldirectord, Pacemaker, STONITH, scripted VIP failover via ARP, heartbeat, heartbeat2, Corosync, keepalived, DRBD, and commercial F5 Load Balancers for high availability at work. + +But still, my personal sites were never highly available. All those technologies are great for professional use, but I was looking for something much more straightforward for my personal space - something as KISS (keep it simple and stupid) as possible. + +It would be fine if my personal website wasn't highly available, but the geek in me wants it anyway. + +> PS: ASCII-art below reflects an OpenBSD under-water world with all the tools available in the base system. + +``` +Art by Michael J. Penick (mod. by Paul B.) + ACME-sky + __________ + / nsd tower\ ( + /____________\ (\) awk-ward + |:_:_:_:_:_| )) plant + |_:_,--.:_:| dig-bubble (\// ) + |:_:|__|_:_| relayd-castle _ ) )) (( + _ |_ _ :_:| _ _ _ (_) (((( /)\` + | |_| |_| | _| | |_| |_| | o \\)) (( ( + \_:_:_:_:/|_|_|_|\:_:_:_:_/ . (( )))) + |_,-._:_:_:_:_:_:_:_.-,_| )) ((// + |:|_|:_:_:,---,:_:_:|_|:| ,-. )/ + |_:_:_:_,'puffy `,_:_:_:_| _ o ,;'))(( + |:_:_:_/ _ | _ \_:_:_:| (_O (( )) +_____|_:_:_| (o)-(o) |_:_:_|--'`-. ,--. ksh under-water (((\'/ + ', ;|:_:_:| -( .-. )- |:_:_:| ', ; `--._\ /,---.~ goat \`)) +. ` |_:_:_| \`-'/ |_:_:_|. ` . ` /()\.__( ) .,-----'`-\(( sed-root + ', ;|:_:_:| `-' |:_:_:| ', ; ', ; `--'| \ ', ; ', ; ',')).,-- +. ` MJP ` . ` . ` . ` . httpd-soil ` . . ` . ` . ` . ` . ` + ', ; ', ; ', ; ', ; ', ; ', ; ', ; ', ; ', ; ', ; ', ; ', ; ', ; ', ; + +``` + +## Table of Contents + +* [⇢ KISS high-availability with OpenBSD](#kiss-high-availability-with-openbsd) +* [⇢ ⇢ My auto-failover requirements](#my-auto-failover-requirements) +* [⇢ ⇢ My HA solution](#my-ha-solution) +* [⇢ ⇢ ⇢ Only OpenBSD base installation required](#only-openbsd-base-installation-required) +* [⇢ ⇢ ⇢ Fairly cheap and geo-redundant](#fairly-cheap-and-geo-redundant) +* [⇢ ⇢ ⇢ Failover time and split-brain](#failover-time-and-split-brain) +* [⇢ ⇢ ⇢ Failover support for multiple protocols](#failover-support-for-multiple-protocols) +* [⇢ ⇢ ⇢ Let's encrypt TLS certificates](#let-s-encrypt-tls-certificates) +* [⇢ ⇢ ⇢ Monitoring](#monitoring) +* [⇢ ⇢ ⇢ Rex automation](#rex-automation) +* [⇢ ⇢ More HA](#more-ha) + +## My auto-failover requirements + +* Be OpenBSD-based (I prefer OpenBSD because of the cleanliness and good documentation) and rely on as few external packages as possible. +* Don't rely on the hottest and newest tech (don't want to migrate everything to a new and fancier technology next month already!). +* It should be reasonably cheap. I want to avoid paying a premium for floating IPs or fancy Elastic Load Balancers. +* It should be geo-redundant. +* It's fine if my sites aren't reachable for five or ten minutes every other month. Due to their static nature, I don't care if there's a split-brain scenario where some requests reach one server and other requests reach another server. +* Failover should work for both HTTP/HTTPS and Gemini protocols. My self-hosted MTAs and DNS servers should also be highly available. +* Let's Encrypt TLS certificates should always work (before and after a failover). +* Have good monitoring in place so I know when a failover was performed and when something went wrong with the failover. +* Don't configure everything manually. The configuration should be automated and reproducible. + +## My HA solution + +### Only OpenBSD base installation required + +My HA solution for Web and Gemini is based on DNS (OpenBSD's `nsd`) and a simple shell script (OpenBSD's `ksh` and some little `sed` and `awk` and `grep`). All software used here is part of the OpenBSD base system and no external package needs to be installed - OpenBSD is a complete operating system. + +[https://man.OpenBSD.org/nsd.8](https://man.OpenBSD.org/nsd.8) +[https://man.OpenBSD.org/ksh](https://man.OpenBSD.org/ksh) +[https://man.OpenBSD.org/awk](https://man.OpenBSD.org/awk) +[https://man.OpenBSD.org/sed](https://man.OpenBSD.org/sed) +[https://man.OpenBSD.org/dig](https://man.OpenBSD.org/dig) +[https://man.OpenBSD.org/ftp](https://man.OpenBSD.org/ftp) +[https://man.OpenBSD.org/cron](https://man.OpenBSD.org/cron) + +I also used the `dig` (for DNS checks) and `ftp` (for HTTP/HTTPS checks) programs. + +The DNS failover is performed automatically between the two OpenBSD VMs involved (my setup doesn't require any quorum for a failover, so there isn't a need for a 3rd VM). The `ksh` script, executed once per minute via CRON (on both VMs), performs a health check to determine whether the current master node is available. If the current master isn't available (no HTTP response as expected), a failover is performed to the standby VM: + +```sh +#!/bin/ksh + +ZONES_DIR=/var/nsd/zones/master/ +DEFAULT_MASTER=fishfinger.buetow.org +DEFAULT_STANDBY=blowfish.buetow.org + +determine_master_and_standby () { + local master=$DEFAULT_MASTER + local standby=$DEFAULT_STANDBY + + . + . + . + + local -i health_ok=1 + if ! ftp -4 -o - https://$master/index.txt | grep -q "Welcome to $master"; then + echo "https://$master/index.txt IPv4 health check failed" + health_ok=0 + elif ! ftp -6 -o - https://$master/index.txt | grep -q "Welcome to $master"; then + echo "https://$master/index.txt IPv6 health check failed" + health_ok=0 + fi + if [ $health_ok -eq 0 ]; then + local tmp=$master + master=$standby + standby=$tmp + fi + + . + . + . +} +``` + +The failover scripts looks for the ` ; Enable failover` string in the DNS zone files and swaps the `A` and `AAAA` records of the DNS entries accordingly: + +```sh +fishfinger$ grep failover /var/nsd/zones/master/foo.zone.zone + 300 IN A 46.23.94.99 ; Enable failover + 300 IN AAAA 2a03:6000:6f67:624::99 ; Enable failover +www 300 IN A 46.23.94.99 ; Enable failover +www 300 IN AAAA 2a03:6000:6f67:624::99 ; Enable failover +standby 300 IN A 23.88.35.144 ; Enable failover +standby 300 IN AAAA 2a01:4f8:c17:20f1::42 ; Enable failover +``` + +```sh +transform () { + sed -E ' + /IN A .*; Enable failover/ { + /^standby/! { + s/^(.*) 300 IN A (.*) ; (.*)/\1 300 IN A '$(cat /var/nsd/run/master_a)' ; \3/; + } + /^standby/ { + s/^(.*) 300 IN A (.*) ; (.*)/\1 300 IN A '$(cat /var/nsd/run/standby_a)' ; \3/; + } + } + /IN AAAA .*; Enable failover/ { + /^standby/! { + s/^(.*) 300 IN AAAA (.*) ; (.*)/\1 300 IN AAAA '$(cat /var/nsd/run/master_aaaa)' ; \3/; + } + /^standby/ { + s/^(.*) 300 IN AAAA (.*) ; (.*)/\1 300 IN AAAA '$(cat /var/nsd/run/standby_aaaa)' ; \3/; + } + } + / ; serial/ { + s/^( +) ([0-9]+) .*; (.*)/\1 '$(date +%s)' ; \3/; + } + ' +} +``` + +After the failover, the script reloads `nsd` and performs a sanity check to see if DNS still works. If not, a rollback will be performed: + +```sh +#! Race condition !# + +if [ -f $zone_file.bak ]; then + mv $zone_file.bak $zone_file +fi + +cat $zone_file | transform > $zone_file.new.tmp + +grep -v ' ; serial' $zone_file.new.tmp > $zone_file.new.noserial.tmp +grep -v ' ; serial' $zone_file > $zone_file.old.noserial.tmp + +echo "Has zone $zone_file changed?" +if diff -u $zone_file.old.noserial.tmp $zone_file.new.noserial.tmp; then + echo "The zone $zone_file hasn't changed" + rm $zone_file.*.tmp + return 0 +fi + +cp $zone_file $zone_file.bak +mv $zone_file.new.tmp $zone_file +rm $zone_file.*.tmp +echo "Reloading nsd" +nsd-control reload + +if ! zone_is_ok $zone; then + echo "Rolling back $zone_file changes" + cp $zone_file $zone_file.invalid + mv $zone_file.bak $zone_file + echo "Reloading nsd" + nsd-control reload + zone_is_ok $zone + return 3 +fi + +for cleanup in invalid bak; do + if [ -f $zone_file.$cleanup ]; then + rm $zone_file.$cleanup + fi +done + +echo "Failover of zone $zone to $MASTER completed" +return 1 +``` + +A non-zero return code (here, 3 when a rollback and 1 when a DNS failover was performed) will cause CRON to send an E-Mail with the whole script output. + +The authorative nameserver for my domains runs on both VMs, and both are configured to be a "master" DNS server so that they have their own individual zone files, which can be changed independently. Otherwise, my setup wouldn't work. The side effect is that under a split-brain scenario (both VMs cannot see each other), both would promote themselves to master via their local DNS entries. More about that later, but that's fine in my use case. + +Check out the whole script here: + +[dns-failover.ksh](https://codeberg.org/snonux/rexfiles/src/branch/master/frontends/scripts/dns-failover.ksh) + +### Fairly cheap and geo-redundant + +I am renting two small OpenBSD VMs: One at OpenBSD Amsterdam and the other at Hetzner Cloud. So, both VMs are hosted at another provider, in different IP subnets, and in different countries (the Netherlands and Germany). + +[https://OpenBSD.Amsterdam](https://OpenBSD.Amsterdam) +[https://www.Hetzner.cloud](https://www.Hetzner.cloud) + +I only have a little traffic on my sites. I could always upload the static content to AWS S3 if I suddenly had to. But this will never be required. + +A DNS-based failover is cheap, as there isn't any BGP or fancy load balancer to pay for. Small VMs also cost less than millions. + +### Failover time and split-brain + +A DNS failover doesn't happen immediately. I've configured a DNS TTL of `300` seconds, and the failover script checks once per minute whether to perform a failover or not. So, in total, a failover can take six minutes (not including other DNS caching servers somewhere in the interweb, but that's fine - eventually, all requests will resolve to the new master after a failover). + +A split-brain scenario between the old master and the new master might happen. That's OK, as my sites are static, and there's no database to synchronise other than HTML, CSS, and images when the site is updated. + +### Failover support for multiple protocols + +With the DNS failover, HTTP, HTTPS, and Gemini protocols are failovered. This works because all domain virtual hosts are configured on either VM's `httpd` (OpenBSD's HTTP server) and `relayd` (it's also part of OpenBSD and I use it to TLS offload the Gemini protocol). So, both VMs accept requests for all the hosts. It's just a matter of the DNS entries, which VM receives the requests. + +[https://man.OpenBSD.org/httpd.8](https://man.OpenBSD.org/httpd.8) +[https://man.OpenBSD.org/relayd.8](https://man.OpenBSD.org/relayd.8) + +For example, the master is responsible for the `https://www.foo.zone` and `https://foo.zone` hosts, whereas the standby can be reached via `https://standby.foo.zone` (port 80 for plain HTTP works as well). The same principle is followed with all the other hosts, e.g. `irregular.ninja`, `paul.buetow.org` and so on. The same applies to my Gemini capsules for `gemini://foo.zone`, `gemini://standby.foo.zone`, `gemini://paul.buetow.org` and `gemini://standby.paul.buetow.org`. + +On DNS failover, master and standby swap roles without config changes other than the DNS entries. That's KISS (keep it simple and stupid)! + +### Let's encrypt TLS certificates + +All my hosts use TLS certificates from Let's Encrypt. The ACME automation for requesting and keeping the certificates valid (up to date) requires that the host requesting a certificate from Let's Encrypt is also the host using that certificate. + +If the master always serves `foo.zone` and the standby always `standby.foo.zone`, then there would be a problem after the failover, as the new master wouldn't have a valid certificate for `foo.zone` and the new standby wouldn't have a valid certificate for `standby.foo.zone` which would lead to TLS errors on the clients. + +As a solution, the CRON job responsible for the DNS failover also checks for the current week number of the year so that: + +* In an odd week number, the first server is the default master +* In an even week number, the second server is the default master. + +Which translates to: + +```sh +# Weekly auto-failover for Let's Encrypt automation +local -i -r week_of_the_year=$(date +%U) +if [ $(( week_of_the_year % 2 )) -eq 0 ]; then + local tmp=$master + master=$standby + standby=$tmp +fi +``` + +This way, a DNS failover is performed weekly so that the ACME automation can update the Let's Encrypt certificates (for master and standby) before they expire on each VM. + +The ACME automation is yet another daily CRON script `/usr/local/bin/acme.sh`. It iterates over all of my Let's Encrypt hosts, checks whether they resolve to the same IP address as the current VM, and only then invokes the ACME client to request or renew the TLS certificates. So, there are always correct requests made to Let's Encrypt. + +Let's encrypt certificates usually expire after 3 months, so a weekly failover of my VMs is plenty. + +[`acme.sh.tpl` - Rex template for the `acme.sh` script of mine.](https://codeberg.org/snonux/rexfiles/src/branch/master/frontends/scripts/acme.sh.tpl) +[https://man.OpenBSD.org/acme-client.1](https://man.OpenBSD.org/acme-client.1) +[Let's Encrypt with OpenBSD and Rex](./2022-07-30-lets-encrypt-with-openbsd-and-rex.md) + +### Monitoring + +CRON is sending me an E-Mail whenever a failover is performed (or whenever a failover failed). Furthermore, I am monitoring my DNS servers and hosts through Gogios, the monitoring system I have developed. + +[https://codeberg.org/snonux/gogios](https://codeberg.org/snonux/gogios) +[KISS server monitoring with Gogios](./2023-06-01-kiss-server-monitoring-with-gogios.md) + +Gogios, as I developed it by myself, isn't part of the OpenBSD base system. + +### Rex automation + +I use Rexify, a friendly configuration management system that allows automatic deployment and configuration. + +[https://www.rexify.org](https://www.rexify.org) +[codeberg.org/snonux/rexfiles/frontends](https://codeberg.org/snonux/rexfiles/src/branch/master/frontends) + +Rex isn't part of the OpenBSD base system, but I didn't need to install any external software on OpenBSD either as Rex is invoked from my Laptop! + +## More HA + +Other high-available services running on my OpenBSD VMs are my MTAs for mail forwarding (OpenSMTPD - also part of the OpenBSD base system) and the authoritative DNS servers (`nsd`) for all my domains. No particular HA setup is required, though, as the protocols (SMTP and DNS) already take care of the failover to the next available host! + +[https://www.OpenSMTPD.org/](https://www.OpenSMTPD.org/) + +As a password manager, I use `geheim`, a command-line tool I wrote in Ruby with encrypted files in a git repository (I even have it installed in Termux on my Phone). For HA reasons, I simply updated the client code so that it always synchronises the database with both servers when I run the `sync` command there. + +[https://codeberg.org/snonux/geheim](https://codeberg.org/snonux/geheim) + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +Other *BSD and KISS related posts are: + +[2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts](./2025-02-01-f3s-kubernetes-with-freebsd-part-3.md) +[2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation](./2024-12-03-f3s-kubernetes-with-freebsd-part-2.md) +[2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage](./2024-11-17-f3s-kubernetes-with-freebsd-part-1.md) +[2024-04-01 KISS high-availability with OpenBSD (You are currently reading this)](./2024-04-01-KISS-high-availability-with-OpenBSD.md) +[2024-01-13 One reason why I love OpenBSD](./2024-01-13-one-reason-why-i-love-openbsd.md) +[2023-10-29 KISS static web photo albums with `photoalbum.sh`](./2023-10-29-kiss-static-web-photo-albums-with-photoalbum.sh.md) +[2023-06-01 KISS server monitoring with Gogios](./2023-06-01-kiss-server-monitoring-with-gogios.md) +[2022-10-30 Installing DTail on OpenBSD](./2022-10-30-installing-dtail-on-openbsd.md) +[2022-07-30 Let's Encrypt with OpenBSD and Rex](./2022-07-30-lets-encrypt-with-openbsd-and-rex.md) +[2016-04-09 Jails and ZFS with Puppet on FreeBSD](./2016-04-09-jails-and-zfs-on-freebsd-with-puppet.md) + +[Back to the main site](../) diff --git a/gemfeed/2024-05-01-slow-productivity-book-notes.md b/gemfeed/2024-05-01-slow-productivity-book-notes.md new file mode 100644 index 00000000..00349dd1 --- /dev/null +++ b/gemfeed/2024-05-01-slow-productivity-book-notes.md @@ -0,0 +1,150 @@ +# "Slow Productivity" book notes + +> Published at 2024-04-27T14:18:51+03:00 + +These are my personal takeaways after reading "Slow Productivity - The lost Art of Accomplishment Without Burnout" by Cal Newport. + +The case studies in this book were a bit long, but they appeared to be well-researched. I will only highlight the interesting, actionable items in the book notes. + +These notes are mainly for my own use, but you may find them helpful. + +``` + ,.......... .........., + ,..,' '.' ',.., + ,' ,' : ', ', + ,' ,' : ', ', + ,' ,' : ', ', + ,' ,'............., : ,.............', ', +,' '............ '.' ............' ', + '''''''''''''''''';''';'''''''''''''''''' + ''' +``` + +## Table of Contents + +* [⇢ "Slow Productivity" book notes](#slow-productivity-book-notes) +* [⇢ ⇢ It's not "slow productivity"](#it-s-not-slow-productivity) +* [⇢ ⇢ Pseudo-productivity and Shallow work](#pseudo-productivity-and-shallow-work) +* [⇢ ⇢ Accomplishments without burnout](#accomplishments-without-burnout) +* [⇢ ⇢ Do fewer things](#do-fewer-things) +* [⇢ ⇢ Work at a natural pace](#work-at-a-natural-pace) +* [⇢ ⇢ Obsess over quality ](#obsess-over-quality-) + +## It's not "slow productivity" + +"Slow productivity" does not mean being less productive. Cal Newport wants to point out that you can be much more productive with "slow productivity" than you would be without it. It is a different way of working than most of us are used to in the modern workplace, which is hyper-connected and always online. + +## Pseudo-productivity and Shallow work + +People use visible activity instead of real productivity because it's easier to measure. This is called pseudo-productivity. +Pseudo-productivity is used as a proxy for real productivity. If you don't look busy, you are dismissed as lazy or lacking a work ethic. + +There is a tendency to perform shallow work because people will otherwise dismiss you as lazy. A lot of shallow work can cause burnout, as multiple things are often being worked on in parallel. The more you have on your plate, the more stressed you will be. + +Shallow work usually doesn't help you to accomplish big things. Always have the big picture in mind. Shallow work can't be entirely eliminated, but it can be managed—for example, plan dedicated time slots for certain types of shallow work. + +## Accomplishments without burnout + +The overall perception is that if you want to accomplish something, you must put yourself on the verge of burnout. Cal Newport writes about "The lost Art of Accomplishments without Burnouts", where you can accomplish big things without all the stress usually involved. + +There are three principles for the maintenance of a sustainable work life: + +* Do fewer things +* Work at a natural pace +* Obsess over quality + +## Do fewer things + +There will always be more work. The faster you finish it, the quicker you will have something new on your plate. + +Reduce the overhead tax. The overhead tax is all the administrative work to be done. With every additional project, there will also be more administrative stuff to be done on your work plate. So, doing fewer things leads to more and better output and better quality for the projects you are working on. + +Limit the things on your plate. Limit your missions (personal goals, professional goals). Reduce your main objectives in life. More than five missions are usually not sustainable very easily, so you have to really prioritise what is important to you and your professional life. + +A mission is an overall objective/goal that can have multiple projects. Limit the projects as well. Some projects need clear endings (e.g., work in support of a never-ending flow of incoming requests). In this case, set limits (e.g., time box your support hours). You can also plan "office hours" for collaborative work with colleagues to avoid ad hoc distractions. + +The key point is that after making these commitments, you really deliver on them. This builds trust, and people will leave you alone and not ask for progress all the time. + +Doing fever things is essential for modern knowledge workers. Breathing space in your work also makes you more creative and happier overall. + +Pushing workers more work can make them less productive, so the better approach is the pull model, where workers pull in new work when the previous task is finished. + +If you can quantify how busy you are or how many other projects you already work on, then it is easier to say no to new things. For example, show what you are doing, what's in the roadmap, etc. Transparency is the key here. + +You can have your own simulated pull system if the company doesn't agree to a global one: + +* State which additional information you would need. +* Create a rough estimate of when you will be able to work on it +* Estimate how long the project would take. Double that estimate, as humans are very bad estimators. +* Respond to the requester and state that you will let him know when the estimates change. + +Sometimes, a little friction is all that is needed to combat incoming work, e.g., when your manager starts seeing the reality of your work plate, and you also request additional information for the task. If you already have too much on your plate, then decline the new project or make room for it in your calendar. If you present a large task list, others will struggle to assign more to you. + +Limit your daily goals. A good measure is to focus on one goal per day. You can time block time for deep work on your daily goal. During that time, you won't be easily available to others. + +The battle against distractions must be fought to be the master of your time. Nobody will fight this war for you. You have to do it for yourself. (Also, have a look at Cal Newport's "time block planning" method). + +Put tasks on autopilot (regular recurring tasks). + +## Work at a natural pace + +We suffer from overambitious timelines, task lists, and business. Focus on what matters. Don't rush your most important work to achieve better results. + +Don't rush. If you rush or are under pressure, you will be less effective and eventually burn out. Our brains work better then not rushy. The stress heuristic usually indicates too much work, and it is generally too late to reduce workload. That's why we all typically have dangerously too much to do. + +Have the courage to take longer to do things that are important. For example, plan on a yearly and larger scale, like 2 to 5 years. + +Find a reasonable time for a project and then double the project timeline against overconfident optimism. Humans are not great at estimating. They gravitate towards best-case estimates. If you have planned more than enough time for your project, then you will fall into a natural work pace. Otherwise, you will struggle with rushing and stress. + +Some days will still be intense and stressful, but those are exceptional cases. After those exceptions (e.g., finalizing that thing, etc.), calmer periods will follow again. + +Pace yourself over modest results over time. Simplify and reduce the daily task lists. Meetings: Certain hours are protected for work. For each meeting, add a protected block to your calendar, so you attend meetings only half a day max. + +Schedule slow seasons (e.g., when on vacation). Disconnect in the slow season. Doing nothing will not satisfy your mind, though. You could read a book on your subject matter to counteract that. + +## Obsess over quality + +Obsess over quality even if you lose short-term opportunities by rejecting other projects. Quality demands you slow down. The two previous two principles (do fewer things and work at a natural pace) are mandatory for this principle to work: + +* Focus on the core activities of your work for your obsession - you will only have the time to obsess over some things. +* Deliver solid work with good quality. +* Sharpen the focus to do the best work possible. + +Go pro to save time, and don't squeeze everything out that you can from freemium services. Professional software services eliminate administrative work: + +* Pay people who know what they are doing and focus on your stuff. +* For example, don't repair that car if you know the mechanic can do that much better than you. +* Or don't use the free version of the music streaming service if it interrupts you with commercials, hindering your ability to concentrate on your work. +* Hire an accountant for your yearly tax returns. He knows much more about that stuff than you do. And in the end, he will even be cheaper as he knows all the tax laws. +* ... + +Adjust your workplace to what you want to accomplish. You could have dedicated places in your home for different things, e.g., a place where you read and think (armchair) and a place where you collaborate (your desk or whiteboard). Surround yourself with things that inspire you (e.g., your favourite books on your shelf next to you, etc.). + +There is the concept of quiet quitting. It doesn't mean quitting your job, but it means that you don't go beyond and above the expectations people have of you. Quiet quitting became popular with modern work, which is often meaningless and full of shallow tasks. If you obsess over quality, you enjoy your craft and want to go beyond and above. + +Implement rituals and routines which shift you towards your goals: + +* For example, if you want to be a good Software Engineer, you also have to put in the work regularly. For instance, progress a bit every day in your project at hand, even if it is only one hour daily. Also, a little quality daily work will be more satisfying over time than many shallow tasks. +* Do you want to be lean and/or healthy? Schedule your daily walks and workouts. They will become habits over time. +* There's the compounding effect where every small effort made every day will yield significant results in the long run + +Deciding what not to do is as important as deciding what to do. + +It appears to be money thrown out of the window, but you get a $50 expensive paper notebook (and also a good pen). Unconsciously, it will make you take notes more seriously. You will think about what to put into the notebooks more profoundly and have thought through the ideas more intensively. If you used very cheap notebooks, you would scribble a lot of rubbish and wouldn't even recognise your handwriting after a while anymore. So choosing a high-quality notebook will help you to take higher-quality notes, too. + +Slow productivity is actionable and can be applied immediately. + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +Other book notes of mine are: + +[2024-10-24 "Staff Engineer" book notes](./2024-10-24-staff-engineer-book-notes.md) +[2024-07-07 "The Stoic Challenge" book notes](./2024-07-07-the-stoic-challenge-book-notes.md) +[2024-05-01 "Slow Productivity" book notes (You are currently reading this)](./2024-05-01-slow-productivity-book-notes.md) +[2023-11-11 "Mind Management" book notes](./2023-11-11-mind-management-book-notes.md) +[2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes](./2023-07-17-career-guide-and-soft-skills-book-notes.md) +[2023-05-06 "The Obstacle is the Way" book notes](./2023-05-06-the-obstacle-is-the-way-book-notes.md) +[2023-04-01 "Never split the difference" book notes](./2023-04-01-never-split-the-difference-book-notes.md) +[2023-03-16 "The Pragmatic Programmer" book notes](./2023-03-16-the-pragmatic-programmer-book-notes.md) + +[Back to the main site](../) diff --git a/gemfeed/2024-05-03-projects-i-currently-dont-have-time-for.md b/gemfeed/2024-05-03-projects-i-currently-dont-have-time-for.md new file mode 100644 index 00000000..8badb762 --- /dev/null +++ b/gemfeed/2024-05-03-projects-i-currently-dont-have-time-for.md @@ -0,0 +1,307 @@ +# Projects I currently don't have time for + +> Published at 2024-05-03T16:23:03+03:00 + +Over the years, I have collected many ideas for my personal projects and noted them down. I am currently in the process of cleaning up all my notes and reviewing those ideas. I don’t have time for the ones listed here and won’t have any soon due to other commitments and personal projects. So, in order to "get rid of them" from my notes folder, I decided to simply put them in this blog post so that those ideas don't get lost. Maybe I will pick up one or another idea someday in the future, but for now, they are all put on ice in favor of other personal projects or family time. + +``` +Art by Laura Brown + +.'`~~~~~~~~~~~`'. +( .'11 12 1'. ) +| :10 \ 2: | +| :9 @-> 3: | +| :8 4; | +'. '..7 6 5..' .' + ~-------------~ ldb + +``` + +## Table of Contents + +* [⇢ Projects I currently don't have time for](#projects-i-currently-don-t-have-time-for) +* [⇢ ⇢ Hardware projects I don't have time for](#hardware-projects-i-don-t-have-time-for) +* [⇢ ⇢ ⇢ I use Arch, btw!](#i-use-arch-btw) +* [⇢ ⇢ ⇢ OpenBSD home router](#openbsd-home-router) +* [⇢ ⇢ ⇢ Pi-Hole server](#pi-hole-server) +* [⇢ ⇢ ⇢ Infodash](#infodash) +* [⇢ ⇢ ⇢ Reading station](#reading-station) +* [⇢ ⇢ ⇢ Retro station](#retro-station) +* [⇢ ⇢ ⇢ Sound server](#sound-server) +* [⇢ ⇢ ⇢ Project Freekat](#project-freekat) +* [⇢ ⇢ Programming projects I don't have time for](#programming-projects-i-don-t-have-time-for) +* [⇢ ⇢ ⇢ CLI-HIVE](#cli-hive) +* [⇢ ⇢ ⇢ Enhanced KISS home photo albums](#enhanced-kiss-home-photo-albums) +* [⇢ ⇢ ⇢ KISS file sync server with end-to-end encryption](#kiss-file-sync-server-with-end-to-end-encryption) +* [⇢ ⇢ ⇢ A language that compiles to `bash`](#a-language-that-compiles-to-bash) +* [⇢ ⇢ ⇢ A language that compiles to `sed`](#a-language-that-compiles-to-sed) +* [⇢ ⇢ ⇢ Renovate VS-Sim](#renovate-vs-sim) +* [⇢ ⇢ ⇢ KISS ticketing system](#kiss-ticketing-system) +* [⇢ ⇢ ⇢ A domain-specific language (DSL) for work](#a-domain-specific-language-dsl-for-work) +* [⇢ ⇢ Self-hosting projects I don't have time for](#self-hosting-projects-i-don-t-have-time-for) +* [⇢ ⇢ ⇢ My own Matrix server](#my-own-matrix-server) +* [⇢ ⇢ ⇢ Ampache music server](#ampache-music-server) +* [⇢ ⇢ ⇢ Librum eBook reader](#librum-ebook-reader) +* [⇢ ⇢ ⇢ Memos - Note-taking service](#memos---note-taking-service) +* [⇢ ⇢ ⇢ Bepasty server](#bepasty-server) +* [⇢ ⇢ Books I don't have time to read](#books-i-don-t-have-time-to-read) +* [⇢ ⇢ ⇢ Fluent Python](#fluent-python) +* [⇢ ⇢ ⇢ Programming Ruby](#programming-ruby) +* [⇢ ⇢ ⇢ Peter F. Hamilton science fiction books](#peter-f-hamilton-science-fiction-books) +* [⇢ ⇢ New websites I don't have time for](#new-websites-i-don-t-have-time-for) +* [⇢ ⇢ ⇢ Create a "Why Raku Rox" site](#create-a-why-raku-rox-site) +* [⇢ ⇢ Research projects I don't have time for](#research-projects-i-don-t-have-time-for) +* [⇢ ⇢ ⇢ Project secure](#project-secure) +* [⇢ ⇢ ⇢ CPU utilisation is all wrong](#cpu-utilisation-is-all-wrong) + +## Hardware projects I don't have time for + +### I use Arch, btw! + +The idea was to build the ultimate Arch Linux setup on an old ThinkPad X200 booting with the open-source LibreBoot firmware, complete with a tiling window manager, dmenu, and all the elite tools. This is mainly for fun, as I am pretty happy (and productive) with my Fedora Linux setup. I ran EndeavourOS (close enough to Arch) on an old ThinkPad for a while, but then I switched back to Fedora because the rolling releases were annoying (there were too many updates). + +### OpenBSD home router + +In my student days, I operated a 486DX PC with OpenBSD as my home DSL internet router. I bought the setup from my brother back then. The router's hostname was `fishbone`, and it performed very well until it became too slow for larger broadband bandwidth after a few years of use. + +I had the idea to revive this concept, implement `fishbone2`, and place it in front of my proprietary ISP router to add an extra layer of security and control in my home LAN. It would serve as the default gateway for all of my devices, including a Wi-Fi access point, would run a DNS server, Pi-hole proxy, VPN client, and DynDNS client. I would also implement high availability using OpenBSD's CARP protocol. + +[https://openbsdrouterguide.net](https://openbsdrouterguide.net) +[https://pi-hole.net/](https://pi-hole.net/) +[https://www.OpenBSD.org](https://www.OpenBSD.org) +[https://www.OpenBSD.org/faq/pf/carp.html](https://www.OpenBSD.org/faq/pf/carp.html) + +However, I am putting this on hold as I have opted for an OpenWRT-based solution, which was much quicker to set up and runs well enough. + +[https://OpenWRT.org/](https://OpenWRT.org/) + +### Pi-Hole server + +Install Pi-hole on one of my Pis or run it in a container on Freekat. For now, I am putting this on hold as the primary use for this would be ad-blocking, and I am avoiding surfing ad-heavy sites anyway. So there's no significant use for me personally at the moment. + +[https://pi-hole.net/](https://pi-hole.net/) + +### Infodash + +The idea was to implement my smart info screen using purely open-source software. It would display information such as the health status of my personal infrastructure, my current work tracker balance (I track how much I work to prevent overworking), and my sports balance (I track my workouts to stay within my quotas for general health). The information would be displayed on a small screen in my home office, on my Pine watch, or remotely from any terminal window. + +I don't have this, and I haven't missed having it, so I guess it would have been nice to have it but not provide any value other than the "fun of tinkering." + +### Reading station + +I wanted to create the most comfortable setup possible for reading digital notes, articles, and books. This would include a comfy armchair, a silent barebone PC or Raspberry Pi computer running either Linux or *BSD, and an e-Ink display mounted on a flexible arm/stand. There would also be a small table for my paper journal for occasional note-taking. There are a bunch of open-source software available for PDF and ePub reading. It would have been neat, but I am currently using the most straightforward solution: a Kobo Elipsa 2E, which I can use on my sofa. + +### Retro station + +I had an idea to build a computer infused with retro elements. It wouldn't use actual retro hardware but would look and feel like a retro machine. I would call this machine HAL or Retron. + +I would use an old ThinkPad laptop placed on a horizontal stand, running NetBSD, and attaching a keyboard from ModelFkeyboards. I use WindowMaker as a window manager and run terminal applications through Retro Term. For the monitor, I would use an older (black) EIZO model with large bezels. + +[https://www.NetBSD.org](https://www.NetBSD.org) +[https://www.modelfkeyboards.com](https://www.modelfkeyboards.com) +[https://github.com/Swordfish90/cool-retro-term)](https://github.com/Swordfish90/cool-retro-term)) + +The computer would occasionally be used to surf the Gemini space, take notes, blog, or do light coding. However, I have abandoned the project for now because there isn't enough space in my apartment, as my daughter will have a room for herself. + +### Sound server + +My idea involved using a barebone mini PC running FreeBSD with the Navidrome sound server software. I could remotely connect to it from my phone, workstation/laptop to listen to my music collection. The storage would be based on ZFS with at least two drives for redundancy. The app would run in a Linux Docker container under FreeBSD via Bhyve. + +[https://github.com/navidrome/navidrome](https://github.com/navidrome/navidrome) +[https://wiki.freebsd.org/bhyve](https://wiki.freebsd.org/bhyve) + +### Project Freekat + +My idea involved purchasing the Meerkat mini PC from System76 and installing FreeBSD. Like the sound-server idea (see previous idea), it would run Linux Docker through Bhyve. I would self-host a bunch of applications on it: + +* Wallabag +* Ankidroid +* Miniflux & Postgres +* Audiobookshelf +* ... + +All of this would be within my LAN, but the services would also be accessible from the internet through either Wireguard or SSH reverse tunnels to one of my OpenBSD VMs, for example: + +* `wallabag.awesome.buetow.org` +* `ankidroid.awesome.buetow.org` +* `miniflux.awesome.buetow.org` +* `audiobookshelf.awesome.buetow.org` +* ... + +I am abandoning this project for now, as I am currently hosting my apps on AWS ECS Fargate under `*.cool.buetow.org`, which is "good enough" for the time being and also offers the benefit of learning to use AWS and Terraform, knowledge that can be applied at work. + +[My personal AWS setup](./2024-02-04-from-babylon5.buetow.org-to-.cloud.md) + +## Programming projects I don't have time for + +### CLI-HIVE + +This was a pet project idea that my brother and I had. The concept was to collect all shell history of all servers at work in a central place, apply ML/AI, and return suggestions for commands to type or allow a fuzzy search on all the commands in the history. The recommendations for the commands on a server could be context-based (e.g., past occurrences on the same server type). + +You could decide whether to share your command history with others so they would receive better suggestions depending on which server they are on, or you could keep all the history private and secure. The plan was to add hooks into zsh and bash shells so that all commands typed would be pushed to the central location for data mining. + +### Enhanced KISS home photo albums + +I don't use third-party cloud providers such as Google Photos to store/archive my photos. Instead, they are all on a ZFS volume on my home NAS, with regular offsite backups taken. Thus, my project would involve implementing the features I miss most or finding a solution simple enough to host on my LAN: + +* A feature I miss presents me with a random day from the past and some photos from that day. This project would randomly select a day and generate a photo album for me to view and reminisce about memories. +* Another feature I miss is the ability to automatically deduplicate all the photos, as I am sure there are tons of duplicates on my NAS. +* Auto-enhancing the photos (perhaps using ImageMagick?) +* I already have a simple `photoalbum.sh` script that generates an album based on an input directory. However, it would be great also to have a timeline feature to enable browsing through different dates. + +[KISS static web photo albums with `photoalbum.sh`](./2023-10-29-kiss-static-web-photo-albums-with-photoalbum.sh.md) + +### KISS file sync server with end-to-end encryption + +I aimed to have a simple server to which I could sync notes and other documents, ensuring that the data is fully end-to-end encrypted. This way, only the clients could decrypt the data, while an encrypted copy of all the data would be stored on the server side. There are a few solutions (e.g., NextCloud), but they are bloated or complex to set up. + +I currently use Syncthing for encrypted file sync across all my devices; however, the data is not end-to-end encrypted. It's a good-enough setup, though, as my Syncthing server is in my home LAN on an encrypted file system. + +[https://syncthing.net](https://syncthing.net) + +I also had the idea of using this as a pet project for work and naming it `Cryptolake`, utilizing post-quantum-safe encryption algorithms and a distributed data store. + +### A language that compiles to `bash` + +I had an idea to implement a higher-level language with strong typing that could be compiled into native Bash code. This would make all resulting Bash scripts more robust and secure by default. The project would involve developing a parser, lexer, and a Bash code generator. I planned to implement this in Go. + +I had previously implemented a tiny scripting language called Fype (For Your Program Execution), which could have served as inspiration. + +[The Fype Programming Language](./2010-05-09-the-fype-programming-language.md) + +### A language that compiles to `sed` + +This is similar to the previous idea, but the difference is that the language would compile into a sed script. Sed has many features, but the brief syntax makes scripts challenging to read. The higher-level language would mimic sed but in a form that is easier for humans to read. + +### Renovate VS-Sim + +VS-Sim is an open-source simulator programmed in Java for distributed systems. VS-Sim stands for "Verteilte Systeme Simulator," the German translation for "Distributed Systems Simulator." The VS-Sim project was my diploma thesis at Aachen University of Applied Sciences. + +[https://codeberg.org/snonux/vs-sim](https://codeberg.org/snonux/vs-sim) + +The ideas I had was: + +* Translate the project into English. +* Modernise the Java codebase to be compatible with the latest JDK. +* Make it compile to native binaries using GraalVM. +* Distribute the project using AppImages. + +I have put this project on hold for now, as I want to do more things in Go and fewer in Java in my personal time. + +### KISS ticketing system + +My idea was to program a KISS (Keep It Simple, Stupid) ticketing system for my personal use. However, I am abandoning this project because I now use the excellent Taskwarrior software. You can learn more about it at: + +[https://taskwarrior.org/](https://taskwarrior.org/) + +### A domain-specific language (DSL) for work + +At work, an internal service allocates storage space for our customers on our storage clusters. It automates many tasks, but many tweaks are accessible through APIs. I had the idea to implement a Ruby-based DSL that would make using all those APIs for ad-hoc changes effortless, e.g.: + +```ruby +Cluster :UK, :uk01 do + Customer.C1A1.segments.volumes.each do |volume| + puts volume.usage_stats + volume.move_off! if volume.over_subscribed? + end +end +``` + +I am abandoning this project because my workplace has stopped the annual pet project competition, and I have other more important projects to work on at the moment. + +[Creative universe (Work pet project contests)](./2022-04-10-creative-universe.md) + +## Self-hosting projects I don't have time for + +### My own Matrix server + +I value privacy. It would be great to run my own Matrix server for communication within my family. I have yet to have time to look into this more closely. + +[https://matrix.org](https://matrix.org) + +### Ampache music server + +Ampache is an open-source music streaming server that allows you to host and manage your music collection online, accessible via a web interface. Setting it up involves configuring a web server, installing Ampache, and organising your music files, which can be time-consuming. + +### Librum eBook reader + +Librum is a self-hostable e-book reader that allows users to manage and read their e-book collection from a web interface. Designed to be a self-contained platform where users can upload, organise, and access their e-books, Librum emphasises privacy and control over one's digital library. + +[https://github.com/Librum-Reader/Librum](https://github.com/Librum-Reader/Librum) + +I am using my Kobo devices or my laptop to read these kinds of things for now. + +### Memos - Note-taking service + +Memos is a note-taking service that simplifies and streamlines information capture and organisation. It focuses on providing users with a minimalistic and intuitive interface, aiming to enhance productivity without the clutter commonly associated with more complex note-taking apps. + +[https://www.usememos.com](https://www.usememos.com) + +I am abandoning this idea for now, as I am currently using plain Markdown files for notes and syncing them with Syncthing across my devices. + +### Bepasty server + +Bepasty is like a Pastebin for all kinds of files (text, image, audio, video, documents, binary, etc.). It seems very neat, but I only share a little nowadays. When I do, I upload files via SCP to one of my OpenBSD VMs and serve them via vanilla httpd there, keeping it KISS. + +[https://github.com/bepasty/bepasty-server](https://github.com/bepasty/bepasty-server) + +## Books I don't have time to read + +### Fluent Python + +I consider myself an advanced programmer in Ruby, Bash, and Perl. However, Python seems to be ubiquitous nowadays, and most of my colleagues prefer Python over any other languages. Thus, it makes sense for me to also learn and use Python. After conducting some research, "Fluent Python" appears to be the best book for this purpose. + +I don't have time to read this book at the moment, as I am focusing more on Go (Golang) and I know just enough Python to get by (e.g., for code reviews). Additionally, there are still enough colleagues around who can review my Ruby or Bash code. + +### Programming Ruby + +I've read a couple of Ruby books already, but "Programming Ruby," which covers up to Ruby 3.2, was just recently released. I would like to read this to deepen my Ruby knowledge further and to revisit some concepts that I may have forgotten. + +As stated in this blog post, I am currently more eager to focus on Go, so I've put the Ruby book on hold. Additionally, there wouldn't be enough colleagues who could "understand" my advanced Ruby skills anyway, as most of them are either Java developers or SREs who don't code a lot. + +### Peter F. Hamilton science fiction books + +I am a big fan of science fiction, but my reading list is currently too long anyway. So, I've put the Hamilton books on the back burner for now. You can see all the novels I've read here: + +[https://paul.buetow.org/novels.html](https://paul.buetow.org/novels.html) +[gemini://paul.buetow.org/novels.gmi](gemini://paul.buetow.org/novels.gmi) + + +## New websites I don't have time for + +### Create a "Why Raku Rox" site + +The website "Why Raku Rox" would showcase the unique features and benefits of the Raku programming language and highlight why it is an exceptional choice for developers. Raku, originally known as Perl 6, is a dynamic, expressive language designed for flexible and powerful software development. + +This would be similar to the "Why OpenBSD rocks" site: + +[https://why-openbsd.rocks](https://why-openbsd.rocks) +[https://raku.org](https://raku.org) + +I am not working on this for now, as I currently don’t even have time to program in Raku. + +## Research projects I don't have time for + +### Project secure + +For work: Implement a PoC that dumps Java heaps to extract secrets from memory. Based on the findings, write a Java program that encrypts secrets in the kernel using the `memfd_secret()` syscall to make it even more secure. + +[https://lwn.net/Articles/865256/](https://lwn.net/Articles/865256/) + +Due to other priorities, I am putting this on hold for now. The software we have built is pretty damn secure already! + +### CPU utilisation is all wrong + +This research project, based on Brendan Gregg's blog post, could potentially significantly impact my work. + +[https://brendangregg.com/blog/2017-05-09/cpu-utilization-is-wrong.html](https://brendangregg.com/blog/2017-05-09/cpu-utilization-is-wrong.html) + +The research project would involve setting up dashboards that display actual CPU usage and the cycles versus waiting time for memory access. + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +Related and maybe interesting: + +[Sweating the small stuff - Tiny projects of mine](./2022-06-15-sweating-the-small-stuff.md) + +[Back to the main site](../) diff --git a/gemfeed/2024-06-23-terminal-multiplexing-with-tmux.md b/gemfeed/2024-06-23-terminal-multiplexing-with-tmux.md new file mode 100644 index 00000000..c20d523a --- /dev/null +++ b/gemfeed/2024-06-23-terminal-multiplexing-with-tmux.md @@ -0,0 +1,391 @@ +# Terminal multiplexing with `tmux` + +> Published at 2024-06-23T22:41:59+03:00 + +Tmux (Terminal Multiplexer) is a powerful, terminal-based tool that manages multiple terminal sessions within a single window. Here are some of its primary features and functionalities: + +* Session management +* Window and Pane management +* Persistent Workspace +* Customization + +[https://github.com/tmux/tmux/wiki](https://github.com/tmux/tmux/wiki) + +``` + _______ + |.-----.| + || Tmux|| + ||_.-._|| + `--)-(--` + __[=== o]___ + |:::::::::::|\ +jgs `-=========-`() + mod. by Paul B. +``` + +## Table of Contents + +* [⇢ Terminal multiplexing with `tmux`](#terminal-multiplexing-with-tmux) +* [⇢ ⇢ Before continuing...](#before-continuing) +* [⇢ ⇢ Shell aliases](#shell-aliases) +* [⇢ ⇢ The `tn` alias - Creating a new session](#the-tn-alias---creating-a-new-session) +* [⇢ ⇢ ⇢ Cleaning up default sessions automatically](#cleaning-up-default-sessions-automatically) +* [⇢ ⇢ ⇢ Renaming sessions](#renaming-sessions) +* [⇢ ⇢ The `ta` alias - Attaching to a session](#the-ta-alias---attaching-to-a-session) +* [⇢ ⇢ The `tr` alias - For a nested remote session](#the-tr-alias---for-a-nested-remote-session) +* [⇢ ⇢ ⇢ Change of the Tmux prefix for better nesting](#change-of-the-tmux-prefix-for-better-nesting) +* [⇢ ⇢ The `ts` alias - Searching sessions with fuzzy finder](#the-ts-alias---searching-sessions-with-fuzzy-finder) +* [⇢ ⇢ The `tssh` alias - Cluster SSH replacement](#the-tssh-alias---cluster-ssh-replacement) +* [⇢ ⇢ ⇢ The `tmux::tssh_from_argument` helper](#the-tmuxtsshfromargument-helper) +* [⇢ ⇢ ⇢ The `tmux::tssh_from_file` helper](#the-tmuxtsshfromfile-helper) +* [⇢ ⇢ ⇢ `tssh` examples](#tssh-examples) +* [⇢ ⇢ ⇢ Common Tmux commands I use in `tssh`](#common-tmux-commands-i-use-in-tssh) +* [⇢ ⇢ Copy and paste workflow](#copy-and-paste-workflow) +* [⇢ ⇢ Tmux configurations](#tmux-configurations) + +## Before continuing... + +Before continuing to read this post, I encourage you to get familiar with Tmux first (unless you already know the basics). You can go through the official getting started guide: + +[https://github.com/tmux/tmux/wiki/Getting-Started](https://github.com/tmux/tmux/wiki/Getting-Started) + +I can also recommend this book (this is the book I got started with with Tmux): + +[https://pragprog.com/titles/bhtmux2/tmux-2/](https://pragprog.com/titles/bhtmux2/tmux-2/) + +Over the years, I have built a couple of shell helper functions to optimize my workflows. Tmux is extensively integrated into my daily workflows (personal and work). I had colleagues asking me about my Tmux config and helper scripts for Tmux several times. It would be neat to blog about it so that everyone interested in it can make a copy of my configuration and scripts. + +The configuration and scripts in this blog post are only the non-work-specific parts. There are more helper scripts, which I only use for work (and aren't really useful outside of work due to the way servers and clusters are structured there). + +Tmux is highly configurable, and I think I am only scratching the surface of what is possible with it. Nevertheless, it may still be useful for you. I also love that Tmux is part of the OpenBSD base system! + +## Shell aliases + +I am a user of the Z-Shell (`zsh`), but I believe all the snippets mentioned in this blog post also work with Bash. + +[https://www.zsh.org](https://www.zsh.org) + +For the most common Tmux commands I use, I have created the following shell aliases: + +```bash +alias tm=tmux +alias tl='tmux list-sessions' +alias tn=tmux::new +alias ta=tmux::attach +alias tx=tmux::remote +alias ts=tmux::search +alias tssh=tmux::cluster_ssh +``` + +Note all `tmux::...`; those are custom shell functions doing certain things, and they aren't part of the Tmux distribution. But let's run through every aliases one by one. + +The first two are pretty straightforward. `tm` is simply a shorthand for `tmux`, so I have to type less, and `tl` lists all Tmux sessions that are currently open. No magic here. + +## The `tn` alias - Creating a new session + +The `tn` alias is referencing this function: + +```bash +# Create new session and if alread exists attach to it +tmux::new () { + readonly session=$1 + local date=date + if where gdate &>/dev/null; then + date=gdate + fi + + tmux::cleanup_default + if [ -z "$session" ]; then + tmux::new T$($date +%s) + else + tmux new-session -d -s $session + tmux -2 attach-session -t $session || tmux -2 switch-client -t $session + fi +} +alias tn=tmux::new +``` + +There is a lot going on here. Let's have a detailed look at what it is doing. As a note, the function relies on GNU Date, so MacOS is looking for the `gdate` commands to be available. Otherwise, it will fall back to `date`. You need to install GNU Date for Mac, as it isn't installed by default there. As I use Fedora Linux on my personal Laptop and a MacBook for work, I have to make it work for both. + +First, a Tmux session name can be passed to the function as a first argument. That session name is only optional. Without it, Tmux will select a session named `T$($date +%s)` as a default. Which is T followed by the UNIX epoch, e.g. `T1717133796`. + +### Cleaning up default sessions automatically + +Note also the call to `tmux::cleanup_default`; it would clean up all already opened default sessions if they aren't attached. Those sessions were only temporary, and I had too many flying around after a while. So, I decided to auto-delete the sessions if they weren't attached. If I want to keep sessions around, I will rename them with the Tmux command `prefix-key $`. This is the cleanup function: + +```bash +tmux::cleanup_default () { + local s + tmux list-sessions | grep '^T.*: ' | grep -F -v attached | + cut -d: -f1 | while read -r s; do + echo "Killing $s" + tmux kill-session -t "$s" + done +} +``` + +The cleanup function kills all open Tmux sessions that haven't been renamed properly yet—but only if they aren't attached (e.g., don't run in the foreground in any terminal). Cleaning them up automatically keeps my Tmux sessions as neat and tidy as possible. + +### Renaming sessions + +Whenever I am in a temporary session (named `T....`), I may decide that I want to keep this session around. I have to rename the session to prevent the cleanup function from doing its thing. That's, as mentioned already, easily accomplished with the standard `prefix-key $` Tmux command. + +## The `ta` alias - Attaching to a session + +This alias refers to the following function, which tries to attach to an already-running Tmux session. + +```bash +tmux::attach () { + readonly session=$1 + + if [ -z "$session" ]; then + tmux attach-session || tmux::new + else + tmux attach-session -t $session || tmux::new $session + fi +} +alias ta=tmux::attach +``` + +If no session is specified (as the argument of the function), it will try to attach to the first open session. If no Tmux server is running, it will create a new one with `tmux::new`. Otherwise, with a session name given as the argument, it will attach to it. If unsuccessful (e.g., the session doesn't exist), it will be created and attached to. + +## The `tr` alias - For a nested remote session + +This SSHs into the remote server specified and then, remotely on the server itself, starts a nested Tmux session. So we have one Tmux session on the local computer and, inside of it, an SSH connection to a remote server with a Tmux session running again. The benefit of this is that, in case my network connection breaks down, the next time I connect, I can continue my work on the remote server exactly where I left off. The session name is the name of the server being SSHed into. If a session like this already exists, it simply attaches to it. + +```bash +tmux::remote () { + readonly server=$1 + tmux new -s $server "ssh -t $server 'tmux attach-session || tmux'" || \ + tmux attach-session -d -t $server +} +alias tr=tmux::remote +``` + +### Change of the Tmux prefix for better nesting + +To make nested Tmux sessions work smoothly, one must change the Tmux prefix key locally or remotely. By default, the Tmux prefix key is `Ctrl-b`, so `Ctrl-b $`, for example, renames the current session. To change the prefix key from the standard `Ctrl-b` to, for example, `Ctrl-g`, you must add this to the `tmux.conf`: + +``` +set-option -g prefix C-g +``` + +This way, when I want to rename the remote Tmux session, I have to use `Ctrl-g $`, and when I want to rename the local Tmux session, I still have to use `Ctrl-b $`. In my case, I have this deployed to all remote servers through a configuration management system (out of scope for this blog post). + +There might also be another way around this (without reconfiguring the prefix key), but that is cumbersome to use, as far as I remember. + +## The `ts` alias - Searching sessions with fuzzy finder + +Despite the fact that with `tmux::cleanup_default`, I don't leave a huge mess with trillions of Tmux sessions flying around all the time, at times, it can become challenging to find exactly the session I am currently interested in. After a busy workday, I often end up with around twenty sessions on my laptop. This is where fuzzy searching for session names comes in handy, as I often don't remember the exact session names. + +```bash +tmux::search () { + local -r session=$(tmux list-sessions | fzf | cut -d: -f1) + if [ -z "$TMUX" ]; then + tmux attach-session -t $session + else + tmux switch -t $session + fi +} +alias ts=tmux::search +``` + +All it does is list all currently open sessions in `fzf`, where one of them can be searched and selected through fuzzy find, and then either switch (if already inside a session) to the other session or attach to the other session (if not yet in Tmux). + +You must install the `fzf` command on your computer for this to work. This is how it looks like: + +[](./terminal-multiplexing-with-tmux/tmux-session-fzf.png) + +## The `tssh` alias - Cluster SSH replacement + +Before I used Tmux, I was a heavy user of ClusterSSH, which allowed me to log in to multiple servers at once in a single terminal window and type and run commands on all of them in parallel. + +[https://github.com/duncs/clusterssh](https://github.com/duncs/clusterssh) + +However, since I started using Tmux, I retired ClusterSSH, as it came with the benefit that Tmux only needs to be run in the terminal, whereas ClusterSSH spawned terminal windows, which aren't easily portable (e.g., from a Linux desktop to macOS). The `tmux::cluster_ssh` function can have N arguments, where: + +* ...the first argument will be the session name (see `tmux::tssh_from_argument` helper function), and all remaining arguments will be server hostnames/FQDNs to connect to simultaneously. +* ...or, the first argument is a file name, and the file contains a list of hostnames/FQDNs (see `tmux::ssh_from_file` helper function) + +This is the function definition behind the `tssh` alias: + +```bash +tmux::cluster_ssh () { + if [ -f "$1" ]; then + tmux::tssh_from_file $1 + return + fi + + tmux::tssh_from_argument $@ +} +alias tssh=tmux::cluster_ssh +``` + +This function is just a wrapper around the more complex `tmux::tssh_from_file` and `tmux::tssh_from_argument` functions, as you have learned already. Most of the magic happens there. + +### The `tmux::tssh_from_argument` helper + +This is the most magic helper function we will cover in this post. It looks like this: + +```bash +tmux::tssh_from_argument () { + local -r session=$1; shift + local first_server=$1; shift + + tmux new-session -d -s $session "ssh -t $first_server" + if ! tmux list-session | grep "^$session:"; then + echo "Could not create session $session" + return 2 + fi + + for server in "${@[@]}"; do + tmux split-window -t $session "tmux select-layout tiled; ssh -t $server" + done + + tmux setw -t $session synchronize-panes on + tmux -2 attach-session -t $session | tmux -2 switch-client -t $session +} +``` + +It expects at least two arguments. The first argument is the session name to create for the clustered SSH session. All other arguments are server hostnames or FQDNs to which to connect. The first one is used to make the initial session. All remaining ones are added to that session with `tmux split-window -t $session...`. At the end, we enable synchronized panes by default, so whenever you type, the commands will be sent to every SSH connection, thus allowing the neat ClusterSSH feature to run commands on multiple servers simultaneously. Once done, we attach (or switch, if already in Tmux) to it. + +Sometimes, I don't want the synchronized panes behavior and want to switch it off temporarily. I can do that with `prefix-key p` and `prefix-key P` after adding the following to my local `tmux.conf`: + +``` +bind-key p setw synchronize-panes off +bind-key P setw synchronize-panes on +``` + +### The `tmux::tssh_from_file` helper + +This one sets the session name to the file name and then reads a list of servers from that file, passing the list of servers to `tmux::tssh_from_argument` as the arguments. So, this is a neat little wrapper that also enables me to open clustered SSH sessions from an input file. + +```bash +tmux::tssh_from_file () { + local -r serverlist=$1; shift + local -r session=$(basename $serverlist | cut -d. -f1) + + tmux::tssh_from_argument $session $(awk '{ print $1} ' $serverlist | sed 's/.lan./.lan/g') +} +``` + +### `tssh` examples + +To open a new session named `fish` and log in to 4 remote hosts, run this command (Note that it is also possible to specify the remote user): + +``` +$ tssh fish blowfish.buetow.org fishfinger.buetow.org \ + fishbone.buetow.org user@octopus.buetow.org +``` + +To open a new session named `manyservers`, put many servers (one FQDN per line) into a file called `manyservers.txt` and simply run: + +``` +$ tssh manyservers.txt +``` + +### Common Tmux commands I use in `tssh` + +These are default Tmux commands that I make heavy use of in a `tssh` session: + +* Press `prefix-key DIRECTION` to switch panes. DIRECTION is by default any of the arrow keys, but I also configured Vi keybindings. +* Press `prefix-key <space>` to change the pane layout (can be pressed multiple times to cycle through them). +* Press `prefix-key z` to zoom in and out of the current active pane. + +## Copy and paste workflow + +As you will see later in this blog post, I have configured a history limit of 1 million items in Tmux so that I can scroll back quite far. One main workflow of mine is to search for text in the Tmux history, select and copy it, and then switch to another window or session and paste it there (e.g., into my text editor to do something with it). + +This works by pressing `prefix-key [` to enter Tmux copy mode. From there, I can browse the Tmux history of the current window using either the arrow keys or vi-like navigation (see vi configuration later in this blog post) and the Pg-Dn and Pg-Up keys. + +I often search the history backwards with `prefix-key [` followed by a `?`, which opens the Tmux history search prompt. + +Once I have identified the terminal text to be copied, I enter visual select mode with `v`, highlight all the text to be copied (using arrow keys or Vi motions), and press `y` to yank it (sorry if this all sounds a bit complicated, but Vim/NeoVim users will know this, as it is pretty much how you do it there as well). + +For `v` and `y` to work, the following has to be added to the Tmux configuration file: + +``` +bind-key -T copy-mode-vi 'v' send -X begin-selection +bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel +``` + +Once the text is yanked, I switch to another Tmux window or session where, for example, a text editor is running and paste the yanked text from Tmux into the editor with `prefix-key ]`. Note that when pasting into a modal text editor like Vi or Helix, you would first need to enter insert mode before `prefix-key ]` would paste anything. + +## Tmux configurations + +Some features I have configured directly in Tmux don't require an external shell alias to function correctly. Let's walk line by line through my local `~/.config/tmux/tmux.conf`: + +``` +source ~/.config/tmux/tmux.local.conf + +set-option -g allow-rename off +set-option -g history-limit 100000 +set-option -g status-bg '#444444' +set-option -g status-fg '#ffa500' +set-option -s escape-time 0 +``` + +There's yet to be much magic happening here. I source a `tmux.local.conf`, which I sometimes use to override the default configuration that comes from the configuration management system. But it is mostly just an empty file, so it doesn't throw any errors on Tmux startup when I don't use it. + +I work with many terminal outputs, which I also like to search within Tmux. So, I added a large enough `history-limit`, enabling me to search backwards in Tmux for any output up to a million lines of text. + +Besides changing some colours (personal taste), I also set `escape-time` to `0`, which is just a workaround. Otherwise, my Helix text editor's `ESC` key would take ages to trigger within Tmux. I am trying to remember the gory details. You can leave it out; if everything works fine for you, leave it out. + +The next lines in the configuration file are: + +``` +set-window-option -g mode-keys vi +bind-key -T copy-mode-vi 'v' send -X begin-selection +bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel +``` + +I navigate within Tmux using Vi keybindings, so the `mode-keys` is set to `vi`. I use the Helix modal text editor, which is close enough to Vi bindings for simple navigation to feel "native" to me. (By the way, I have been a long-time Vim and NeoVim user, but I eventually switched to Helix. It's off-topic here, but it may be worth another blog post once.) + +The two `bind-key` commands make it so that I can use `v` and `y` in copy mode, which feels more Vi-like (as already discussed earlier in this post). + +The next set of lines in the configuration file are: + +``` +bind-key h select-pane -L +bind-key j select-pane -D +bind-key k select-pane -U +bind-key l select-pane -R + +bind-key H resize-pane -L 5 +bind-key J resize-pane -D 5 +bind-key K resize-pane -U 5 +bind-key L resize-pane -R 5 +``` + +These allow me to use `prefix-key h`, `prefix-key j`, `prefix-key k`, and `prefix-key l` for switching panes and `prefix-key H`, `prefix-key J`, `prefix-key K`, and `prefix-key L` for resizing the panes. If you don't know Vi/Vim/NeoVim, the letters `hjkl` are commonly used there for left, down, up, and right, which is also the same for Helix, by the way. + +The next set of lines in the configuration file are: + +``` +bind-key c new-window -c '#{pane_current_path}' +bind-key F new-window -n "session-switcher" "tmux list-sessions | fzf | cut -d: -f1 | xargs tmux switch-client -t" +bind-key T choose-tree +``` + +The first one is that any new window starts in the current directory. The second one is more interesting. I list all open sessions in the fuzzy finder. I rely heavily on this during my daily workflow to switch between various sessions depending on the task. E.g. from a remote cluster SSH session to a local code editor. + +The third one, `choose-tree`, opens a tree view in Tmux listing all sessions and windows. This one is handy to get a better overview of what is currently running in any local Tmux session. It looks like this (it also allows me to press a hotkey to switch to a particular Tmux window): + +[](./terminal-multiplexing-with-tmux/tmux-tree-view.png) + + +The last remaining lines in my configuration file are: + +``` +bind-key p setw synchronize-panes off +bind-key P setw synchronize-panes on +bind-key r source-file ~/.config/tmux/tmux.conf \; display-message "tmux.conf reloaded" +``` + +We discussed `synchronized panes` earlier. I use it all the time in clustered SSH sessions. When enabled, all panes (remote SSH sessions) receive the same keystrokes. This is very useful when you want to run the same commands on many servers at once, such as navigating to a common directory, restarting a couple of services at once, or running tools like `htop` to quickly monitor system resources. + +The last one reloads my Tmux configuration on the fly. + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +[Back to the main site](../) diff --git a/gemfeed/2024-07-05-random-weird-things.md b/gemfeed/2024-07-05-random-weird-things.md new file mode 100644 index 00000000..77eac814 --- /dev/null +++ b/gemfeed/2024-07-05-random-weird-things.md @@ -0,0 +1,366 @@ +# Random Weird Things - Part Ⅰ + +> Published at 2024-07-05T10:59:59+03:00; Updated at 2025-02-08 + +Every so often, I come across random, weird, and unexpected things on the internet. I thought it would be neat to share them here from time to time. As a start, here are ten of them. + +[2024-07-05 Random Weird Things - Part Ⅰ (You are currently reading this)](./2024-07-05-random-weird-things.md) +[2025-02-08 Random Weird Things - Part Ⅱ](./2025-02-08-random-weird-things-ii.md) + +``` + /\_/\ +WHOA!! ( o.o ) + > ^ < + / - \ + / \ + /______\ \ +``` + +## Table of Contents + +* [⇢ Random Weird Things - Part Ⅰ](#random-weird-things---part-) +* [⇢ ⇢ 1. `bad.horse` traceroute](#1-badhorse-traceroute) +* [⇢ ⇢ 2. ASCII cinema](#2-ascii-cinema) +* [⇢ ⇢ 3. Netflix's Hello World application](#3-netflix-s-hello-world-application) +* [⇢ ⇢ C programming](#c-programming) +* [⇢ ⇢ ⇢ 4. Indexing an array](#4-indexing-an-array) +* [⇢ ⇢ ⇢ 5. Variables with prefix `$`](#5-variables-with-prefix-) +* [⇢ ⇢ 6. Object oriented shell scripts using `ksh`](#6-object-oriented-shell-scripts-using-ksh) +* [⇢ ⇢ 7. This works in Go](#7-this-works-in-go) +* [⇢ ⇢ 8. "I am a Teapot" HTTP response code](#8-i-am-a-teapot-http-response-code) +* [⇢ ⇢ 9. `jq` is a functional programming language](#9-jq-is-a-functional-programming-language) +* [⇢ ⇢ 10. Regular expression to verify email addresses](#10-regular-expression-to-verify-email-addresses) + +## 1. `bad.horse` traceroute + +Run traceroute to get the poem (or song). + +> Update: A reader hinted that by specifying `-n 60`, there will be even more output! + +```bash +❯ traceroute -m 60 bad.horse +traceroute to bad.horse (162.252.205.157), 60 hops max, 60 byte packets + 1 _gateway (192.168.1.1) 5.237 ms 5.264 ms 6.009 ms + 2 77-85-0-2.ip.btc-net.bg (77.85.0.2) 8.753 ms 7.112 ms 8.336 ms + 3 212-39-69-103.ip.btc-net.bg (212.39.69.103) 9.434 ms 9.268 ms 9.986 ms + 4 * * * + 5 xe-1-2-0.mpr1.fra4.de.above.net (80.81.194.26) 39.812 ms 39.030 ms 39.772 ms + 6 * ae12.cs1.fra6.de.eth.zayo.com (64.125.26.172) 123.576 ms * + 7 * * * + 8 * * * + 9 ae10.cr1.lhr15.uk.eth.zayo.com (64.125.29.17) 119.097 ms 119.478 ms 120.767 ms +10 ae2.cr1.lhr11.uk.zip.zayo.com (64.125.24.140) 120.398 ms 121.147 ms 120.948 ms +11 * * * +12 ae25.mpr1.yyz1.ca.zip.zayo.com (64.125.23.117) 145.072 ms * 181.773 ms +13 ae5.mpr1.tor3.ca.zip.zayo.com (64.125.23.118) 168.239 ms 168.158 ms 168.137 ms +14 64.124.217.237.IDIA-265104-ZYO.zip.zayo.com (64.124.217.237) 168.026 ms 167.999 ms 165.451 ms +15 * * * +16 t00.toroc1.on.ca.sn11.net (162.252.204.2) 131.598 ms 131.308 ms 131.482 ms +17 bad.horse (162.252.205.130) 131.430 ms 145.914 ms 130.514 ms +18 bad.horse (162.252.205.131) 136.634 ms 145.295 ms 135.631 ms +19 bad.horse (162.252.205.132) 139.158 ms 148.363 ms 138.934 ms +20 bad.horse (162.252.205.133) 145.395 ms 148.054 ms 147.140 ms +21 he.rides.across.the.nation (162.252.205.134) 149.687 ms 147.731 ms 150.135 ms +22 the.thoroughbred.of.sin (162.252.205.135) 156.644 ms 155.155 ms 156.447 ms +23 he.got.the.application (162.252.205.136) 161.187 ms 162.318 ms 162.674 ms +24 that.you.just.sent.in (162.252.205.137) 166.763 ms 166.675 ms 164.243 ms +25 it.needs.evaluation (162.252.205.138) 172.073 ms 171.919 ms 171.390 ms +26 so.let.the.games.begin (162.252.205.139) 175.386 ms 174.180 ms 175.965 ms +27 a.heinous.crime (162.252.205.140) 180.857 ms 180.766 ms 180.192 ms +28 a.show.of.force (162.252.205.141) 187.942 ms 186.669 ms 186.986 ms +29 a.murder.would.be.nice.of.course (162.252.205.142) 191.349 ms 191.939 ms 190.740 ms +30 bad.horse (162.252.205.143) 195.425 ms 195.716 ms 196.186 ms +31 bad.horse (162.252.205.144) 199.238 ms 200.620 ms 200.318 ms +32 bad.horse (162.252.205.145) 207.554 ms 206.729 ms 205.201 ms +33 he-s.bad (162.252.205.146) 211.087 ms 211.649 ms 211.712 ms +34 the.evil.league.of.evil (162.252.205.147) 212.657 ms 216.777 ms 216.589 ms +35 is.watching.so.beware (162.252.205.148) 220.911 ms 220.326 ms 221.961 ms +36 the.grade.that.you.receive (162.252.205.149) 225.384 ms 225.696 ms 225.640 ms +37 will.be.your.last.we.swear (162.252.205.150) 232.312 ms 230.989 ms 230.919 ms +38 so.make.the.bad.horse.gleeful (162.252.205.151) 235.761 ms 235.291 ms 235.585 ms +39 or.he-ll.make.you.his.mare (162.252.205.152) 241.350 ms 239.407 ms 238.394 ms +40 o_o (162.252.205.153) 246.154 ms 247.650 ms 247.110 ms +41 you-re.saddled.up (162.252.205.154) 250.925 ms 250.401 ms 250.619 ms +42 there-s.no.recourse (162.252.205.155) 256.071 ms 251.154 ms 255.340 ms +43 it-s.hi-ho.silver (162.252.205.156) 260.152 ms 261.775 ms 261.544 ms +44 signed.bad.horse (162.252.205.157) 262.430 ms 261.410 ms 261.365 ms +``` + +## 2. ASCII cinema + +Fancy watching Star Wars Episode IV in ASCII? Head to the ASCII cinema: + +[https://asciinema.org/a/569727](https://asciinema.org/a/569727) + +## 3. Netflix's Hello World application + +Netflix has got the Hello World application run in production 😱 + +* https://www.Netflix.com/helloworld + +> By the time this is posted, it seems that Netflix has taken it offline... I should have created a screenshot! + +## C programming + +### 4. Indexing an array + +In C, you can index an array like this: `array[i]` (not surprising). But this works as well and is valid C code: `i[array]`, 🤯 It's because after the spec `A[B]` is equivalent to `*(A + B)` and the ordering doesn't matter for the `+` operator. All 3 loops are producing the same output. Would be funny to use `i[array]` in a merge request of some code base on April Fool's day! + +```c +#include <stdio.h> + +int main(void) { + int array[5] = { 1, 2, 3, 4, 5 }; + + for (int i = 0; i < 5; i++) + printf("%d\n", array[i]); + + for (int i = 0; i < 5; i++) + printf("%d\n", i[array]); + + for (int i = 0; i < 5; i++) + printf("%d\n", *(i + array)); +} +``` + +### 5. Variables with prefix `$` + +In C you can prefix variables with `$`! E.g. the following is valid C code 🫠: + +```c +#include <stdio.h> + +int main(void) { + int $array[5] = { 1, 2, 3, 4, 5 }; + + for (int $i = 0; $i < 5; $i++) + printf("%d\n", $array[$i]); + + for (int $i = 0; $i < 5; $i++) + printf("%d\n", $i[$array]); + + for (int $i = 0; $i < 5; $i++) + printf("%d\n", *($i + $array)); +} +``` + +## 6. Object oriented shell scripts using `ksh` + +Experienced software developers are aware that scripting languages like Python, Perl, Ruby, and JavaScript support object-oriented programming (OOP) concepts such as classes and inheritance. However, many might be surprised to learn that the latest version of the Korn shell (Version 93t+) also supports OOP. In ksh93, OOP is implemented using user-defined types: + +```ksh +#!/usr/bin/ksh93 + +typeset -T Point_t=( + integer -h 'x coordinate' x=0 + integer -h 'y coordinate' y=0 + typeset -h 'point color' color="red" + + function getcolor { + print -r ${_.color} + } + + function setcolor { + _.color=$1 + } + + setxy() { + _.x=$1; _.y=$2 + } + + getxy() { + print -r "(${_.x},${_.y})" + } +) + +Point_t point + +echo "Initial coordinates are (${point.x},${point.y}). Color is ${point.color}" + +point.setxy 5 6 +point.setcolor blue + +echo "New coordinates are ${point.getxy}. Color is ${point.getcolor}" + +exit 0 +``` + +[Using types to create object oriented Korn shell 93 scripts](https://blog.fpmurphy.com/2010/05/ksh93-using-types-to-create-object-orientated-scripts.html) + +## 7. This works in Go + +There is no pointer arithmetic in Go like in C, but it is still possible to do some brain teasers with pointers 😧: + +```go +package main + +import "fmt" + +func main() { + var i int + f := func() *int { + return &i + } + *f()++ + fmt.Println(i) +} +``` + +[Go playground](https://go.dev/play/p/sPRdyDvXefK?__s=mk8u899owb9yurl256gw) + +## 8. "I am a Teapot" HTTP response code + +Defined in 1998 as one of the IETF's traditional April Fools' jokes (RFC 2324), the Hyper Text Coffee Pot Control Protocol specifies an HTTP status code that is not intended for actual HTTP server implementation. According to the RFC, this code should be returned by teapots when asked to brew coffee. This status code also serves as an Easter egg on some websites, such as Google.com's "I'm a teapot" feature. Occasionally, it is used to respond to a blocked request, even though the more appropriate response would be the 403 Forbidden status code. + +[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#418](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#418) + +## 9. `jq` is a functional programming language + +Many know of `jq`, the handy small tool and swiss army knife for JSON parsing. + +[https://github.com/jqlang/jq](https://github.com/jqlang/jq) + +What many don't know that `jq` is actually a full blown functional programming language `jqlang`, have a look at the language description: + +[https://github.com/jqlang/jq/wiki/jq-Language-Description](https://github.com/jqlang/jq/wiki/jq-Language-Description) + +As a matter of fact, the language is so powerful, that there exists an implementation of `jq` in `jq` itself: + +[https://github.com/wader/jqjq](https://github.com/wader/jqjq) + +Here some snipped from `jqjq`, to get a feel of `jqlang`: + +``` +def _token: + def _re($re; f): + ( . as {$remain, $string_stack} + | $remain + | match($re; "m").string + | f as $token + | { result: ($token | del(.string_stack)) + , remain: $remain[length:] + , string_stack: + ( if $token.string_stack == null then $string_stack + else $token.string_stack + end + ) + } + ); + if .remain == "" then empty + else + ( . as {$string_stack} + | _re("^\\s+"; {whitespace: .}) + // _re("^#[^\n]*"; {comment: .}) + // _re("^\\.[_a-zA-Z][_a-zA-Z0-9]*"; {index: .[1:]}) + // _re("^[_a-zA-Z][_a-zA-Z0-9]*"; {ident: .}) + // _re("^@[_a-zA-Z][_a-zA-Z0-9]*"; {at_ident: .}) + // _re("^\\$[_a-zA-Z][_a-zA-Z0-9]*"; {binding: .}) + # 1.23, .123, 123e2, 1.23e2, 123E2, 1.23e+2, 1.23E-2 or 123 + // _re("^(?:[0-9]*\\.[0-9]+|[0-9]+)(?:[eE][-\\+]?[0-9]+)?"; {number: .}) + // _re("^\"(?:[^\"\\\\]|\\\\.)*?\\\\\\("; + ( .[1:-2] + | _unescape + | {string_start: ., string_stack: ($string_stack+["\\("])} + ) + ) + . + . + . +``` + +## 10. Regular expression to verify email addresses + +This is a pretty old meme, but still worth posting here (as some may be unaware). The RFC822 Perl regex to validate email addresses is 😱: + +``` +(?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t] +)+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?: +\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:( +?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ +\t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\0 +31]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\ +>(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+ +(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?: +(?:\r\n)?[ \t])*))*|(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z +|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n) +?[ \t])*)*\<(?:(?:\r\n)?[ \t])*(?:@(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\ +r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ + \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n) +?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t] +)*))*(?:,@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ + \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])* +)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t] +)+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*) +*:(?:(?:\r\n)?[ \t])*)?(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+ +|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r +\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?: +\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t +>))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031 +>+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\]( +?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(? +:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(? +:\r\n)?[ \t])*))*\>(?:(?:\r\n)?[ \t])*)|(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(? +:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)? +[ \t]))*"(?:(?:\r\n)?[ \t])*)*:(?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\".\[\] +\000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]| +\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<> +@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|" +(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t] +)*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\ +".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(? +:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[ +\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*|(?:[^()<>@,;:\\".\[\] \000- +\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|( +?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)*\<(?:(?:\r\n)?[ \t])*(?:@(?:[^()<>@,; +:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([ +^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\" +.\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\ +>\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*(?:,@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\ +[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\ +r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] +\000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\] +|\\.)*\](?:(?:\r\n)?[ \t])*))*)*:(?:(?:\r\n)?[ \t])*)?(?:[^()<>@,;:\\".\[\] \0 +00-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\ +.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@, +;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(? +:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])* +(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\". +\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[ +^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\] +>))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*\>(?:(?:\r\n)?[ \t])*)(?:,\s*( +?:(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\ +".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:( +?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[ +\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t +>)*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t +>)+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(? +:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+| +\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*|(?: +[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\ +>]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)*\<(?:(?:\r\n) +?[ \t])*(?:@(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[" +()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n) +?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<> +@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*(?:,@(?:(?:\r\n)?[ + \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@, +;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t] +)*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\ +".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*)*:(?:(?:\r\n)?[ \t])*)? +(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\". +\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?: +\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[ +"()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t]) +*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t]) ++|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\ +.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z +|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*\>(?:( +?:\r\n)?[ \t])*))*)?;\s*) +``` + +[https://pdw.ex-parrot.com/Mail-RFC822-Address.html](https://pdw.ex-parrot.com/Mail-RFC822-Address.html) + +I hope you had some fun. E-Mail your comments to `paul@nospam.buetow.org` :-) + +other related posts are: + +[Back to the main site](../) diff --git a/gemfeed/2024-07-07-the-stoic-challenge-book-notes.md b/gemfeed/2024-07-07-the-stoic-challenge-book-notes.md new file mode 100644 index 00000000..0e3b0ed4 --- /dev/null +++ b/gemfeed/2024-07-07-the-stoic-challenge-book-notes.md @@ -0,0 +1,69 @@ +# "The Stoic Challenge" book notes + +> Published at 2024-07-07T12:46:55+03:00 + +These are my personal takeaways after reading "The Stoic Challenge: A Philosopher's Guide to Becoming Tougher, Calmer, and More Resilient" by William B. Irvine. + +``` + ,.......... .........., + ,..,' '.' ',.., + ,' ,' : ', ', + ,' ,' : ', ', + ,' ,' : ', ', + ,' ,'............., : ,.............', ', +,' '............ '.' ............' ', + '''''''''''''''''';''';'''''''''''''''''' + ''' +``` + +## Table of Contents + +* [⇢ "The Stoic Challenge" book notes](#the-stoic-challenge-book-notes) +* [⇢ ⇢ God sets you up for a challenge](#god-sets-you-up-for-a-challenge) +* [⇢ ⇢ Negative visualization](#negative-visualization) +* [⇢ ⇢ Oh, nice trick, you stoic "god"! ;-)](#oh-nice-trick-you-stoic-god--) + +## God sets you up for a challenge + +Gods set you up for a challenge to see how resilient you are. Is getting angry worth the price? If you stay calm then you can find the optimal workaround for the obstacle. Stay calm even with big setbacks. Practice minimalism of negative emotions. + +Put a positive spin on everything. What should you do if someone wrong you? Don't get angry, there is no point in that, it just makes you suffer. Do the best what you got now and keep calm and carry on. A resilient person will refuse to play the role of a victim. You can develop the setback response skills. Turn a setback. e.g. a handycap, into a personal triumph. + +It is not the things done to you or happen to you what matters but how you take the things and react to these things. + +Don't row against the other boats but against your own lazy bill. It doesn't matter if you are first or last, as long as you defeat your lazy self. + +Stoics are thankful that they are mortal. As then you can get reminded of how great it is to be alive at all. In dying we are more alive we have ever been as every thing you do could be the last time you do it. Rather than fighting your death you should embrace it if there are no workarounds. Embrace a good death. + +## Negative visualization + +It is easy what we have to take for granted. + +* Imagine the negative and then think that things are actually much better than they seem to be. +* Close your eyes and imagine you are color blind for a minute, then open the eyes again and see all the colours. You will be grateful for being able to see the colours. +* Now close your eyes for a minute and imagine you would be blind, so that you will never be able to experience the world again and let it sink in. When you open your eyes again you will feel a lot of gratefulness. +* Last time meditation. Lets you appreciate the life as it is now. Life gets vitalised again. + +## Oh, nice trick, you stoic "god"! ;-) + +Take setbacks as a challenge. Also take it with some humor. + +* A setback in a setback, how Genius :-) +* A setback in a setback in a setback: the stoic god's work overtime, eh? :-) + +What would the stoic god's do next? This is just a test strategy by them. Don't be frustrated at all but be astonished of what comes next. Thank the stoic gods of testing you. This is comfort zone extension of the stoics aka toughness Training. + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +Other book notes of mine are: + +[2024-10-24 "Staff Engineer" book notes](./2024-10-24-staff-engineer-book-notes.md) +[2024-07-07 "The Stoic Challenge" book notes (You are currently reading this)](./2024-07-07-the-stoic-challenge-book-notes.md) +[2024-05-01 "Slow Productivity" book notes](./2024-05-01-slow-productivity-book-notes.md) +[2023-11-11 "Mind Management" book notes](./2023-11-11-mind-management-book-notes.md) +[2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes](./2023-07-17-career-guide-and-soft-skills-book-notes.md) +[2023-05-06 "The Obstacle is the Way" book notes](./2023-05-06-the-obstacle-is-the-way-book-notes.md) +[2023-04-01 "Never split the difference" book notes](./2023-04-01-never-split-the-difference-book-notes.md) +[2023-03-16 "The Pragmatic Programmer" book notes](./2023-03-16-the-pragmatic-programmer-book-notes.md) + +[Back to the main site](../) diff --git a/gemfeed/2024-08-05-typing-127.1-words-per-minute.md b/gemfeed/2024-08-05-typing-127.1-words-per-minute.md new file mode 100644 index 00000000..94900c69 --- /dev/null +++ b/gemfeed/2024-08-05-typing-127.1-words-per-minute.md @@ -0,0 +1,230 @@ +# Typing `127.1` words per minute (`>100wpm average`) + +> Published at 2024-08-05T17:39:30+03:00 + +``` +,---,---,---,---,---,---,---,---,---,---,---,---,---,-------, +|1/2| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + | ' | <- | +|---'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-----| +| ->| | Q | W | E | R | T | Y | U | I | O | P | ] | ^ | | +|-----',--',--',--',--',--',--',--',--',--',--',--',--'| | +| Caps | A | S | D | F | G | H | J | K | L | \ | [ | * | | +|----,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'---'----| +| | < | Z | X | C | V | B | N | M | , | . | - | | +|----'-,-',--'--,'---'---'---'---'---'---'-,-'---',--,------| +| ctrl | | alt | |altgr | | ctrl | +'------' '-----'--------------------------'------' '------' + Nieminen Mika +``` + +## Table of Contents + +* [⇢ Typing `127.1` words per minute (`>100wpm average`)](#typing-1271-words-per-minute-100wpm-average) +* [⇢ ⇢ Introduction](#introduction) +* [⇢ ⇢ Kinesis review](#kinesis-review) +* [⇢ ⇢ ⇢ Top build quality](#top-build-quality) +* [⇢ ⇢ ⇢ Bluetooth connectivity](#bluetooth-connectivity) +* [⇢ ⇢ ⇢ Gateron Brown key switches](#gateron-brown-key-switches) +* [⇢ ⇢ ⇢ Keycaps](#keycaps) +* [⇢ ⇢ ⇢ Keymap editor](#keymap-editor) +* [⇢ ⇢ First steps](#first-steps) +* [⇢ ⇢ Considering alternate layouts](#considering-alternate-layouts) +* [⇢ ⇢ Training how to type](#training-how-to-type) +* [⇢ ⇢ ⇢ Tools](#tools) +* [⇢ ⇢ My `keybr.com` statistics](#my-keybrcom-statistics) +* [⇢ ⇢ Tips and tricks](#tips-and-tricks) +* [⇢ ⇢ ⇢ Relax](#relax) +* [⇢ ⇢ ⇢ Focus on accuracy first](#focus-on-accuracy-first) +* [⇢ ⇢ ⇢ Chording](#chording) +* [⇢ ⇢ ⇢ Punctuation and Capitalization](#punctuation-and-capitalization) +* [⇢ ⇢ ⇢ Reverse shifting](#reverse-shifting) +* [⇢ ⇢ ⇢ Enter the flow state](#enter-the-flow-state) +* [⇢ ⇢ ⇢ Repeat every word](#repeat-every-word) +* [⇢ ⇢ ⇢ Don't use the same finger for two consecutive keystrokes](#don-t-use-the-same-finger-for-two-consecutive-keystrokes) +* [⇢ ⇢ ⇢ Warm-up](#warm-up) +* [⇢ ⇢ Travel keyboard](#travel-keyboard) +* [⇢ ⇢ Upcoming custom Kinesis build](#upcoming-custom-kinesis-build) +* [⇢ ⇢ Conclusion](#conclusion) + +## Introduction + +After work one day, I noticed some discomfort in my right wrist. Upon research, it appeared to be a mild case of Repetitive Strain Injury (RSI). Initially, I thought that this would go away after a while, but after a week it became even worse. This led me to consider potential causes such as poor posture or keyboard use habits. As an enthusiast of keyboards, I experimented with ergonomic concave ortholinear split keyboards. Wait, what?... + +* Concave: Some fingers are longer than others. A concave keyboard makes it so that the keycaps meant to be pressed by the longer fingers are further down (e.g., left middle finger for `e` on a Qwerty layout), and keycaps meant to be pressed by shorter fingers are further up (e.g., right pinky finger for the letter `p`). +* Ortholinear: The keys are arranged in a straight vertical line, unlike most conventional keyboards. The conventional keyboards still resemble the old typewriters, where the placement of the keys was optimized so that the typewriter would not jam. There is no such requirement anymore. +* Split: The keyboard is split into two halves (left and right), allowing one to place either hand where it is most ergonomic. + +After discovering ThePrimagen (I found him long ago, but I never bothered buying the same keyboard he is on) on YouTube and reading/watching a couple of reviews, I thought that as a computer professional, the equipment could be expensive anyway (laptop, adjustable desk, comfortable chair), so why not invest a bit more into the keyboard? I purchased myself the Kinesis Advantage360 Professional keyboard. + +## Kinesis review + +For an in-depth review, have a look at this great article: + +[Review of the Kinesis Advantage360 Professional keyboard](https://arslan.io/2022/10/22/review-of-the-kinesis-advantage360-professional) + +### Top build quality + +Overall, the keyboard feels excellent quality and robust. It has got some weight to it. Because of that, it is not ideally suited for travel, though. But I have a different keyboard to solve this (see later in this post). Overall, I love how it is built and how it feels. + +[](./typing-127.1-words-per-minute/kinesis2.jpg) + +### Bluetooth connectivity + +Despite encountering concerns about Bluetooth connectivity issues with the Kinesis keyboard during my research, I purchased one anyway as I intended to use it only via USB. However, I discovered that the firmware updates available afterwards had addressed these reported Bluetooth issues, and as a result, I did not experience any difficulties with the Bluetooth functionality. This positive outcome allowed me to enjoy using the keyboard also wirelessly. + +### Gateron Brown key switches + +Many voices on the internet seem to dislike the Gateron Brown switches, the only official choice for non-clicky tactile switches in the Kinesis, so I was also a bit concerned. I almost went with Cherry MX Browns for my Kinesis (a custom build from a 3rd party provider that is partnershipping with Kinesis). Still, I decided on Gateron Browns to try different switches than the Cherry MX Browns I already have on my ZSA Moonlander keyboard (another ortho-linear split keyboard, but without a concave keycap layout). + +At first, I was disappointed by the Gaterons, as they initially felt a bit meshy compared to the Cherries. Still, over the weeks I grew to prefer them because of their smoothness. Over time, the tactile bumps also became more noticeable (as my perception of them improved). Because of their less pronounced tactile feedback, the Gaterons are less tiring for long typing sessions and better suited for a relaxed typing experience. + +So, the Cherry MX feel sharper but are more tiring in the long run, and the Gaterons are easier to write on and the tactile Feedback is slightly less pronounced. + +### Keycaps + +If you ever purchase a Kinesis keyboard, go with the PCB keycaps. They upgrade the typing experience a lot. The only thing you will lose is that the backlighting won't shine through them. But that is a reasonable tradeoff. When do I need backlighting? I am supposed to look at the screen and not the keyboard while typing. + +I went with the blank keycaps, by the way. + +[](./typing-127.1-words-per-minute/kinesis1.jpg) + +### Keymap editor + +There is no official keymap editor. You have to edit a configuration file manually, build the firmware from scratch, and upload the firmware with the new keymap to both keyboard halves. The Professional version of his keyboard, by the way, runs on the ZMK open-source firmware. + +Many users find the need for an easy-to-use keymap editor an issue. But this is the Pro model. You can also go with the non-Pro, which runs on non-open-source firmware and has no Bluetooth (it must be operated entirely on USB). + +There is a 3rd party solution which is supposed to configure the keymap for the Professional model as bliss, but I have never used it. As a part-time programmer and full-time Site Reliability Engineer, I am okay configuring the keymap in my text editor and building it in a local docker container. This is one of the standard ways of doing it here. You could also use a GitHub pipeline for the firmware build, but I prefer building it locally on my machine. This all seems natural to me, but this may be an issue for "the average Joe" user. + +## First steps + +I didn't measure the usual words per minute (wpm) on my previous keyboard, the ZSA Moonlander, but I guess that it was around 40-50wpm. Once the Kinesis arrived, I started practising. The experience was quite different due to the concave keycaps, so I barely managed 10wpm on the first day. + +I quickly noticed that I could not continue using the freestyle 6-finger typing system I was used to on my Moonlander or any previous keyboards I worked with. I learned ten-finger touch typing from scratch to be more efficient with the Kinesis keyboard. The keyboard forces you to embrace touch typing. + +Sometimes, there were brain farts, and I couldn't type at all. The trick was not to freak out about it, but to move on. If your average goes down a bit for a day, it doesn't matter; the long-term trend over several days and weeks matters, not the one-off wpm high score. + +Although my wrist pain seemed to go away aftre the first week of using the Kinesis, my fingers became tired of adjusting to the new way of typing. My hands were stiff, as if I had been training for the Olympics. Only after three weeks did I start to feel comfortable with it. If it weren't for the comments I read online, I would have sent it back after week 2. + +I also had a problem with the left pinky finger, where I could not comfortably reach the `p` key. This involved moving the whole hand. An easy fix was to swap `p` with `;` on the keyboard layout. + +## Considering alternate layouts + +As I was going to learn 10-finger touch typing from scratch, I also played with the thought of switching from the Qwerty to the Dvorak or Colemak keymap, but after reading some comments on the internet, I decided against it: + +* These layouts (Dvorak and Colemak) will minimize the finger travel for the most commonly used English words, but they necessarily don't give you a better wpm score. +* One comment on Redit also mentioned that getting stiffer fingers with these layouts is more likely than with Qwerty, as in Qwerty, he had to stretch out his fingers more often, which helps here. +* There are also many applications and websites with keyboard shortcuts and are Qwerty-optimized. +* You won't be able to use someone else's computer as there will be likely Qwerty. Some report that after using an alternative layout for a while, they forget how to use Qwerty. + +## Training how to type + +### Tools + +One of the most influential tools in my touch typing journey has been `keybr.com`. This site/app helped me learn 10-finger touch typing, and I practice daily for 30 minutes (in the first two weeks, up to an hour every day). The key is persistence and focus on technique rather than speed; the latter naturally improves with regular practice. Precision matters, too, so I always correct my errors using the backspace key. + +[https://keybr.com](https://keybr.com) + +I also used a command-line tool called `tt`, which is written in Go. It has a feature that I found very helpful: the ability to practice typing by piping custom text into it. Additionally, I appreciated its customization options, such as choosing a colour theme and specifying how statistics are displayed. + +[https://github.com/lemnos/tt](https://github.com/lemnos/tt) + +I wrote myself a small Ruby script that would randomly select a paragraph from one of my eBooks or book notes and pipe it to `tt`. This helped me remember some of the books I read and also practice touch typing. + +## My `keybr.com` statistics + +Overall, I trained for around 4 months in more than 5,000 sessions. My top speed in a session was 127.1wpm (up from barely 10wpm at the beginning). + +[](./typing-127.1-words-per-minute/all-time-stats.png) + +My overall average speed over those 5,000 sessions was 80wpm. The average speed over the last week was over 100wpm. The green line represents the wpm average (increasing trend), the purple line represents the number of keys in the practices (not much movement there, as all keys are unlocked), and the red line represents the average typing accuracy. + +[](./typing-127.1-words-per-minute/typing-speed-over-lessons.png) + +Around the middle, you see a break-in of the wpm average value. This was where I swapped the `p` and `;` keys, but after some retraining, I came back to the previous level and beyond. + +## Tips and tricks + +These are some tips and tricks I learned along the way to improve my typing speed: + +### Relax + +It's easy to get cramped when trying to hit this new wpm mark, but this is just holding you back. Relax and type at a natural pace. Now I also understand why my Katate Sensei back in London kept screaming "RELAAAX" at me during practice.... It didn't help much back then, though, as it is difficult to relax while someone screams at you! + +### Focus on accuracy first + +This goes with the previous point. Instead of trying to speed through sessions as quickly as possible, slow down and try to type the words correctly—so don't rush it. If you aren't fast yet, the reason is that your brain hasn't trained enough. It will come over time, and you will be faster. + +### Chording + +A trick to getting faster is to type by word and pause between each word so you learn the words by chords. From 80wpm and beyond, this makes a real difference. + +### Punctuation and Capitalization + +I included 10% punctuation and 20% capital letters in my `keybr.com` practice sessions to simulate real typing conditions, which improved my overall working efficiency. I guess I would have gone to 120wpm in average if I didn't include this options... + +### Reverse shifting + +Reverse shifting aka left-right shifting is to... + +* ...use the left shift key for letters on the right keyboard side. +* ...use the right shift key for letters on the left keyboard side. + +This makes using the shift key a blaze. + +### Enter the flow state + +Listening to music helps me enter a flow state during practice sessions, which makes typing training a bit addictive (which is good, or isn't it?). + +### Repeat every word + +There's a setting on `keybr.com` that makes it so that every word is always repeated, having you type every word twice in a row. I liked this feature very much, and I think it also helped to improve my practice. + +### Don't use the same finger for two consecutive keystrokes + +Apparently, if you want to type fast, avoid using the same finger for two consecutive keystrokes. This means you don't always need to use the same finger for the same keys. +However, there are no hard and fast rules. Thus, everyone develops their system for typing word combinations. An exception would be if you are typing the very same letter in a row (e.g., t in letter)—here, you are using the same finger for both ts. + +### Warm-up + +You can't reach your average typing speed first ting the morning. It would help if you warmed up before the exercise or practice later during the day. Also, some days are good, others not so, e.g., after a bad night's sleep. What matters is the mid- and long-term trend, not the fluctuations here, though. + +## Travel keyboard + +As mentioned, the Kinesis is a great keyboard, but it is not meant for travel. + +I guess keyboards will always be my expensive hobby, so I also purchased another ergonomic, ortho-linear, concave split keyboard, the Glove80 (with the Red Pro low-profile switches). This keyboard is much lighter and, in my opinion, much better suited for travel than the Kinesis. It also comes with a great travel case. + +Here is a photo of me using it with my Surface Go 2 (it runs Linux, by the way) while waiting for the baggage drop at the airport: + +[](./typing-127.1-words-per-minute/glove80.jpg) + +For everyday work, I prefer the tactile Browns on the Kinesis over the Red Pro I have on the Glove80 (normal profile vs. low profile). The Kinesis feels much more premium, whereas the Glove80 is much lighter and easier to store away in a rucksack (the official travel case is a bit bulky, so I wrapped it simply in bubble plastic). + +The F-key row is odd at the Glove80. I would have preferred more keys on the sides like the Kinesis, and I use them for `[]` `{}` `()`, which is pretty handy there. However, I like the thumb cluster of the Glove80 more than the one on the Kinesis. + +The good thing is that I can switch between both keyboards instantly without retraining my typing memories. I've configured (as much as possible) the same keymaps on both my Kinesis and Glove80, making it easy to switch between them at any occasion. + +Interested in the Glove80? I suggest also reading this review: + +[Review of the Glove80 keyboard](https://arslan.io/2024/04/22/review-of-the-moergo-glove80-keyboard/) + +## Upcoming custom Kinesis build + +As I mentioned, keyboards will remain an expensive hobby of mine. I don't regret anything here, though. After all, I use keyboards at my day job. I've ordered a Kinesis custom build with the Gateron Kangaroo switches, and I'm excited to see how that compares to my current setup. I'm still deciding whether to keep my Gateron Brown-equipped Kinesis as a secondary keyboard or possibly leave it at my in-laws for use when visiting or to sell it. + +## Conclusion + +When I traveled with the Glove80 for work to the London office, a colleague stared at my keyboard and made jokes that it might be broken (split into two halves). But other than that... + +Ten-finger touch typing has improved my efficiency and has become a rewarding discipline. Whether it's the keyboards I use, the tools I practice with, or the techniques I've adopted, each step has been a learning experience. I hope sharing my journey provides valuable insights and inspiration for anyone looking to improve their touch typing skills. + +I also accidentally started using a 10-finger-like system (maybe still 6 fingers, but better than before) on my regular laptop keyboard. I could be more efficient on the laptop keyboard. The form is different there (not ortholinear, not concave keycaps, etc.), but my typing has improved there too (even if it is only by a little bit). + +I don't want to return to a non-concave keyboard as my default. I will use other keyboards still once in a while but only for short periods or when I have to (e.g. travelling with my Laptop and when there is no space to put an external keyboard) + +Learning to touch type has been an eye-opening experience for me, not just for work but also for personal projects. Now, writing documentation is so much fun; who could believe that? Furthermore, working with Slack (communicating with colleagues) is more fun now as well. + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +[Back to the main site](../) diff --git a/gemfeed/2024-09-07-projects-i-support.md b/gemfeed/2024-09-07-projects-i-support.md new file mode 100644 index 00000000..1ed5c2e4 --- /dev/null +++ b/gemfeed/2024-09-07-projects-i-support.md @@ -0,0 +1,106 @@ +# Projects I financially support + +> Published at 2024-09-07T16:04:19+03:00 + +This is the list of projects and initiatives I support/sponsor. + +``` +||====================================================================|| +||//$\\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\//$\\|| +||(100)==================| FEDERAL SPONSOR NOTE |================(100)|| +||\\$// ~ '------========--------' \\$//|| +||<< / /$\ // ____ \\ \ >>|| +||>>| 12 //L\\ // ///..) \\ L38036133B 12 |<<|| +||<<| \\ // || <|| >\ || |>>|| +||>>| \$/ || $$ --/ || One Hundred |<<|| +||<<| L38036133B *\\ |\_/ //* series |>>|| +||>>| 12 *\\/___\_//* 1989 |<<|| +||<<\ Open Source ______/Franklin\________ Supporting />>|| +||//$\ ~| SPONSORING AND FUNDING |~ /$\\|| +||(100)=================== AWESOME OPEN SOURCE =================(100)|| +||\\$//\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\$//|| +||====================================================================|| + +``` + +## Table of Contents + +* [⇢ Projects I financially support](#projects-i-financially-support) +* [⇢ ⇢ Motivation](#motivation) +* [⇢ ⇢ OSnews](#osnews) +* [⇢ ⇢ Cup o' Go Podcast](#cup-o--go-podcast) +* [⇢ ⇢ Codeberg](#codeberg) +* [⇢ ⇢ GrapheneOS](#grapheneos) +* [⇢ ⇢ AnkiDroid](#ankidroid) +* [⇢ ⇢ OpenBSD through OpenBSD.Amsterdam](#openbsd-through-openbsdamsterdam) +* [⇢ ⇢ ProtonMail](#protonmail) +* [⇢ ⇢ `Libro.fm`](#librofm) + +## Motivation + +Sponsoring free and open-source projects, even for personal use, is important to ensure the sustainability, security, and continuous improvement of the software. It supports developers who often maintain these projects without compensation, helping them provide updates, new features, and security patches. By contributing, you recognize their efforts, foster a culture of innovation, and benefit from perks like early access or support, all while ensuring the long-term viability of the tools you rely on. + +Albeit I am not putting a lot of money into my sponsoring efforts, it still helps the open-source maintainers because the more little sponsors there are, the higher the total sum. + +## OSnews + +I am a silver Patreon member of OSnews. I have been following this site since my student years. It's always been a great source of independent and slightly alternative IT news. + +[https://osnews.com](https://osnews.com) + +## Cup o' Go Podcast + +I am a Patreon of the Cup o' Go Podcast. The podcast helps me stay updated with the Go community for around 15 minutes per week. I am not a full-time software developer, but my long-term ambition is to become better in Go every week by working on personal projects and tools for work. + +[https://cupogo.dev](https://cupogo.dev) + +## Codeberg + +Codeberg e.V. is a nonprofit organization that provides online resources for software development and collaboration. I am a user and a supporting member, paying an annual membership of €24. I didn't have to pay that membership fee, as Codeberg offers all the services I use for free. + +[https://codeberg.org](https://codeberg.org) +[https://codeberg.org/snonux - My Codeberg page](https://codeberg.org/snonux) + +## GrapheneOS + +GrapheneOS is an open-source project that improves Android's privacy and security with sandboxing, exploit mitigations, and a permission model. It does not include Google apps or services but offers a sandboxed Google Play compatibility layer and its own apps and services. + +I've made a one-off €100 donation because I really like this, and I run GrapheneOS on my personal Phone as my main daily driver. + +[https://grapheneos.org/](https://grapheneos.org/) +[Why GrapheneOS Rox](https://foo.zone/gemfeed/2023-01-23-why-grapheneos-rox.html) + +## AnkiDroid + +AnkiDroid is an app that lets you learn flashcards efficiently with spaced repetition. It is compatible with Anki software and supports various flashcard content, syncing, statistics, and more. + +I've been learning vocabulary with this free app, and it is, in my opinion, the best flashcard app I know. I've made a 20$ one-off donation to this project. + +[https://opencollective.com/ankidroid](https://opencollective.com/ankidroid) + +## OpenBSD through OpenBSD.Amsterdam + + The OpenBSD project produces a FREE, multi-platform 4.4BSD-based UNIX-like operating system. Our efforts emphasize portability, standardization, correctness, proactive security and integrated cryptography. As an example of the effect OpenBSD has, the popular OpenSSH software comes from OpenBSD. OpenBSD is freely available from their download sites. + +I implicitly support the OpenBSD project through a VM I have rented at OpenBSD Amsterdam. They donate €10 per VM and €15 per VM for every renewal to the OpenBSD Foundation, with dedicated servers running vmm(4)/vmd(8) to host opinionated VMs. + +[https://www.OpenBSD.org](https://www.OpenBSD.org) +[https://OpenBSD.Amsterdam](https://OpenBSD.Amsterdam) + +## ProtonMail + +I am not directly funding this project, but I am a very happy paying customer, and I am listing it here as an alternative to big tech if you don't want to run your own mail infrastructure. I am listing ProtonMail here as it is a non-profit organization, and I want to emphasize the importance of considering alternatives to big tech. + +[https://proton.me/](https://proton.me/) + +## `Libro.fm` + +This is the alternative to Audible if you are into audiobooks (like I am). For every book or every month of membership, I am also supporting a local bookstore I selected. Their catalog is not as large as Audible's, but it's still pretty decent. + +Libro.fm began as a conversation among friends at Third Place Books, a local bookstore in Seattle, Washington, about the growing popularity of audiobooks and the lack of a way for readers to purchase them from independent bookstores. Flash forward, and Libro.fm was founded in 2014. + +[https://libro.fm](https://libro.fm) + +E-mail your comments to `paul@nospam.buetow.org` :-) + +[Back to the main site](../) diff --git a/gemfeed/2024-09-07-site-reliability-engineering-part-4.md b/gemfeed/2024-09-07-site-reliability-engineering-part-4.md new file mode 100644 index 00000000..4af52caf --- /dev/null +++ b/gemfeed/2024-09-07-site-reliability-engineering-part-4.md @@ -0,0 +1,71 @@ +# Site Reliability Engineering - Part 4: Onboarding for On-Call Engineers + +> Published at 2024-09-07T16:27:58+03:00 + +Welcome to Part 4 of my Site Reliability Engineering (SRE) series. I'm currently working as a Site Reliability Engineer, and I’m here to share what SRE is all about in this blog series. + +[2023-08-18 Site Reliability Engineering - Part 1: SRE and Organizational Culture](./2023-08-18-site-reliability-engineering-part-1.md) +[2023-11-19 Site Reliability Engineering - Part 2: Operational Balance](./2023-11-19-site-reliability-engineering-part-2.md) +[2024-01-09 Site Reliability Engineering - Part 3: On-Call Culture](./2024-01-09-site-reliability-engineering-part-3.md) +[2024-09-07 Site Reliability Engineering - Part 4: Onboarding for On-Call Engineers (You are currently reading this)](./2024-09-07-site-reliability-engineering-part-4.md) + +``` + __..._ _...__ + _..-" `Y` "-._ + \ Once upon | / + \\ a time..| // + \\\ | /// + \\\ _..---.|.---.._ /// +jgs \\`_..---.Y.---.._`// +``` + +This time, I want to share some tips on how to onboard software engineers, QA engineers, and Site Reliability Engineers (SREs) to the primary on-call rotation. Traditionally, onboarding might take half a year (depending on the complexity of the infrastructure), but with a bit of strategy and structured sessions, we've managed to reduce it to just six weeks per person. Let's dive in! + +## Setting the Scene: Tier-1 On-Call Rotation + +First things first, let's talk about Tier-1. This is where the magic begins. Tier-1 covers over 80% of the common on-call cases and is the perfect breeding ground for new on-call engineers to get their feet wet. It's designed to be manageable training ground. + +### Why Tier-1? + +* Easy to Understand: Every on-call engineer should be familiar with Tier-1 tasks. +* Training Ground: This is where engineers start their on-call career. It's purposefully kept simple so that it's not overwhelming right off the bat. +* Runbook/recipe driven: Every alert is attached to a comprehensive runbook, making it easy for every engineer to follow. + +## Onboarding Process: From 6 Months to 6 Weeks + +So how did we cut down the onboarding time so drastically? Here’s the breakdown of our process: + +Knowledge Transfer (KT) Sessions: We kicked things off with more than 10 KT sessions, complete with video recordings. These sessions are comprehensive and cover everything from the basics to some more advanced topics. The recorded sessions mean that new engineers can revisit them anytime they need a refresher. + +Shadowing Sessions: Each new engineer undergoes two on-call week shadowing sessions. This hands-on experience is invaluable. They get to see real-time incident handling and resolution, gaining practical knowledge that's hard to get from just reading docs. + +Comprehensive Runbooks: We created 64 runbooks (by the time writing this probably more than 100) that are composable like Lego bricks. Each runbook covers a specific scenario and guides the engineer step-by-step to resolution. Pairing these with monitoring alerts linked directly to Confluence docs, and from there to the respective runbooks, ensures every alert can be navigated with ease (well, there are always exceptions to the rule...). + +Self-Sufficiency & Confidence Building: With all these resources at their fingertips, our on-call engineers become self-sufficient for most of the common issues they'll face (new starters can now handle around 80% of the most common issue after 6 weeks they had joined the company). This boosts their confidence and ensures they can handle Tier-1 incidents independently. + +Documentation and Feedback Loop: Continuous improvement is key. We regularly update our documentation based on feedback from the engineers. This makes our process even more robust and user-friendly. + +## It's All About the Tiers + +Let’s briefly touch on the Tier levels: + +* Tier 1: Easy and foundational tasks. Perfect for getting new engineers started. This covers around 80% of all on-call cases we face. This is what we trained on. +* Tier 2: Slightly more complex, requiring more background knowledge. We trained on some of the topics but not all. +* Tier 3: Requires a good understanding of the platform/architecture. Likely needs KT sessions with domain experts. +* Tier DE (Domain Expert): The heavy hitters. Domain experts are required for these tasks. + +### Growing into Higher Tiers + +From Tier-1, engineers naturally grow into Tier-2 and beyond. The structured training and gradual increase in complexity help ensure a smooth transition as they gain experience and confidence. The key here is that engineers stay curous and engaged in the on-call, so that they always keep learning. + +## Keeping Runbooks Up to Date + +It is important that runbooks are not a "project to be finished"; runbooks have to be maintained and updated over time. Sections may change, new runbooks need to be added, and old ones can be deleted. So the acceptance criteria of an on-call shift would not just be reacting to alerts and incidents, but also reviewing and updating the current runbooks. + +## Conclusion + +By structuring the onboarding process with KT sessions, shadowing, comprehensive runbooks, and a feedback loop, we've been able to fast-track the process from six months to just six weeks. This not only prepares our engineers for the on-call rotation quicker but also ensures they're confident and capable when handling incidents. + +If you're looking to optimize your on-call onboarding process, these strategies could be your ticket to a more efficient and effective transition. Happy on-calling! + +[Back to the main site](../) diff --git a/gemfeed/2024-10-02-gemtexter-3.0.0-lets-gemtext-again-4.md b/gemfeed/2024-10-02-gemtexter-3.0.0-lets-gemtext-again-4.md new file mode 100644 index 00000000..322fb989 --- /dev/null +++ b/gemfeed/2024-10-02-gemtexter-3.0.0-lets-gemtext-again-4.md @@ -0,0 +1,86 @@ +# Gemtexter 3.0.0 - Let's Gemtext again⁴ + +> Published at 2024-10-01T21:46:26+03:00 + +I proudly announce that I've released Gemtexter version `3.0.0`. What is Gemtexter? It's my minimalist static site generator for Gemini Gemtext, HTML and Markdown, written in GNU Bash. + +[https://codeberg.org/snonux/gemtexter](https://codeberg.org/snonux/gemtexter) + +``` +-=[ typewriters ]=- 1/98 + .-------. + .-------. _|~~ ~~ |_ + _|~~ ~~ |_ .-------. =(_|_______|_) + =(_|_______|_)= _|~~ ~~ |_ |:::::::::| .-------. + |:::::::::| =(_|_______|_) |:::::::[]| _|~~ ~~ |_ + |:::::::[]| |:::::::::| |o=======.| =(_|_______|_) + |o=======.| |:::::::[]| `"""""""""` |:::::::::| + jgs `"""""""""` |o=======.| |:::::::[]| + mod. by Paul Buetow `"""""""""` |o=======.| + `"""""""""` +``` + +## Table of Contents + +* [⇢ Gemtexter 3.0.0 - Let's Gemtext again⁴](#gemtexter-300---let-s-gemtext-again) +* [⇢ ⇢ Why Bash?](#why-bash) +* [⇢ ⇢ HTML exact variant is the only variant](#html-exact-variant-is-the-only-variant) +* [⇢ ⇢ Table of Contents auto-generation](#table-of-contents-auto-generation) +* [⇢ ⇢ Configurable themes](#configurable-themes) +* [⇢ ⇢ No use of webfonts by default](#no-use-of-webfonts-by-default) +* [⇢ ⇢ More](#more) + +## Why Bash? + +This project is too complex for a Bash script. Writing it in Bash was to try out how maintainable a "larger" Bash script could be. It's still pretty maintainable and helps me try new Bash tricks here and then! + +Let's list what's new! + +## HTML exact variant is the only variant + +The last version of Gemtexter introduced the HTML exact variant, which wasn't enabled by default. This version of Gemtexter removes the previous (inexact) variant and makes the exact variant the default. This is a breaking change, which is why there is a major version bump of Gemtexter. Here is a reminder of what the exact variant was: + +> Gemtexter is there to convert your Gemini Capsule into other formats, such as HTML and Markdown. An HTML exact variant can now be enabled in the `gemtexter.conf` by adding the line `declare -rx HTML_VARIANT=exact`. The HTML/CSS output changed to reflect a more exact Gemtext appearance and to respect the same spacing as you would see in the Geminispace. + +## Table of Contents auto-generation + +Just add... + +``` + << template::inline::toc +``` + +...into a Gemtexter template file and Gemtexter will automatically generate a table of contents for the page based on the headings (see this page's ToC for example). The ToC will also have links to the relevant sections in HTML and Markdown output. The Gemtext format does not support links, so the ToC will simply be displayed as a bullet list. + +## Configurable themes + +It was always possible to customize the style of a Gemtexter's resulting HTML page, but all the config options were scattered across multiple files. Now, the CSS style, web fonts, etc., are all configurable via themes. + +Simply configure `HTML_THEME_DIR` in the `gemtexter.conf` file to the corresponding directory. For example: + +```bash +declare -xr HTML_THEME_DIR=./extras/html/themes/simple +``` + +To customize the theme or create your own, simply copy the theme directory and modify it as needed. This makes it also much easier to switch between layouts. + +## No use of webfonts by default + +The default theme is now "back to the basics" and does not utilize any web fonts. The previous themes are still part of the release and can be easily configured. These are currently the `future` and `business` themes. You can check them out from the themes directory. + +## More + +Additionally, there were a couple of bug fixes, refactorings and overall improvements in the documentation made. + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +Other related posts are: + +[2024-10-02 Gemtexter 3.0.0 - Let's Gemtext again⁴ (You are currently reading this)](./2024-10-02-gemtexter-3.0.0-lets-gemtext-again-4.md) +[2023-07-21 Gemtexter 2.1.0 - Let's Gemtext again³](./2023-07-21-gemtexter-2.1.0-lets-gemtext-again-3.md) +[2023-03-25 Gemtexter 2.0.0 - Let's Gemtext again²](./2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.md) +[2022-08-27 Gemtexter 1.1.0 - Let's Gemtext again](./2022-08-27-gemtexter-1.1.0-lets-gemtext-again.md) +[2021-06-05 Gemtexter - One Bash script to rule it all](./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md) +[2021-04-24 Welcome to the Geminispace](./2021-04-24-welcome-to-the-geminispace.md) + +[Back to the main site](../) diff --git a/gemfeed/2024-10-24-staff-engineer-book-notes.md b/gemfeed/2024-10-24-staff-engineer-book-notes.md new file mode 100644 index 00000000..fe2961ca --- /dev/null +++ b/gemfeed/2024-10-24-staff-engineer-book-notes.md @@ -0,0 +1,133 @@ +# "Staff Engineer" book notes + +> Published at 2024-10-24T20:57:44+03:00 + +These are my personal takeaways after reading "Staff Engineer" by Will Larson. Note that the book contains much more knowledge wisdom and that these notes only contain points I personally found worth writing down. This is mainly for my own use, but you might find it helpful too. + +``` + ,.......... .........., + ,..,' '.' ',.., + ,' ,' : ', ', + ,' ,' : ', ', + ,' ,' : ', ', + ,' ,'............., : ,.............', ', +,' '............ '.' ............' ', + '''''''''''''''''';''';'''''''''''''''''' + ''' +``` + +## Table of Contents + +* [⇢ "Staff Engineer" book notes](#staff-engineer-book-notes) +* [⇢ ⇢ The Four Archetypes of a Staff Engineer](#the-four-archetypes-of-a-staff-engineer) +* [⇢ ⇢ Influence and Impact over Authority](#influence-and-impact-over-authority) +* [⇢ ⇢ Breadth and Depth of Knowledge](#breadth-and-depth-of-knowledge) +* [⇢ ⇢ Mentorship and Sponsorship](#mentorship-and-sponsorship) +* [⇢ ⇢ Managing Up and Across](#managing-up-and-across) +* [⇢ ⇢ Strategic Thinking](#strategic-thinking) +* [⇢ ⇢ Emotional Intelligence](#emotional-intelligence) +* [⇢ ⇢ Navigating Ambiguity](#navigating-ambiguity) +* [⇢ ⇢ Visible and Invisible Work](#visible-and-invisible-work) +* [⇢ ⇢ Scaling Yourself](#scaling-yourself) +* [⇢ ⇢ Career Progression and Title Inflation](#career-progression-and-title-inflation) +* [⇢ ⇢ Not a faster Senior Engineer](#not-a-faster-senior-engineer) +* [⇢ ⇢ The Balance](#the-balance) +* [⇢ ⇢ More things](#more-things) + +## The Four Archetypes of a Staff Engineer + +Larson breaks down the role of a Staff Engineer into four main archetypes, which can help frame how you approach the role: + +* Tech Lead: Focuses on the technical direction of a team, ensuring high-quality execution, architecture, and aligning the team around shared goals. +* Solver: Gets pulled into complex, high-impact problems that often involve many teams or systems, operating as a fixer or troubleshooter. +* Architect: Works on the long-term technical vision for an organization, setting standards and designing systems that will scale and last over time. +* Right Hand: Functions as a trusted technical advisor to leadership, providing input on strategy, long-term decisions, and navigating organizational politics. + +## Influence and Impact over Authority + +As a Staff Engineer, influence is often more important than formal authority. You’ll rarely have direct control over teams or projects but will need to drive outcomes by influencing peers, other teams, and leadership. It’s about understanding how to persuade, align, and mentor others to achieve technical outcomes. + +## Breadth and Depth of Knowledge + +Staff Engineers often need to maintain a breadth of knowledge across various areas while maintaining depth in a few. This can mean keeping a high-level understanding of several domains (e.g., infrastructure, security, product development) but being able to dive deep when needed in certain core areas. + +## Mentorship and Sponsorship + +An important part of a Staff Engineer’s role is mentoring others, not just in technical matters but in career development as well. Sponsorship goes a step beyond mentorship, where you actively advocate for others, create opportunities for them, and push them toward growth. + +## Managing Up and Across + +Success as a Staff Engineer often depends on managing up (influencing leadership and setting expectations) and managing across (working effectively with peers and other teams). This is often tied to communication skills, the ability to advocate for technical needs, and fostering alignment across departments or organizations. + +## Strategic Thinking + +While Senior Engineers may focus on execution, Staff Engineers are expected to think strategically, making decisions that will affect the company or product months or years down the line. This means balancing short-term execution needs with long-term architectural decisions, which may require challenging short-term pressures. + +## Emotional Intelligence + +The higher you go in engineering roles, the more soft skills, particularly emotional intelligence (EQ), come into play. Building relationships, resolving conflicts, and understanding the broader emotional dynamics of the team and organization become key parts of your role. + +## Navigating Ambiguity + +Staff Engineers are often placed in situations with high ambiguity—whether in defining the problem space, coming up with a solution, or aligning stakeholders. The ability to operate effectively in these unclear areas is critical to success. + +## Visible and Invisible Work + +Much of the work done by Staff Engineers is invisible. Solving complex problems, creating alignment, or influencing decisions doesn’t always result in tangible code, but it can have a massive impact. Larson emphasizes that part of the role is being comfortable with this type of invisible contribution. + +## Scaling Yourself + +At the Staff Engineer level, you must scale your impact beyond direct contribution. This can involve improving documentation, developing repeatable processes, mentoring others, or automating parts of the workflow. The idea is to enable teams and individuals to be more effective, even when you’re not directly involved. + +## Career Progression and Title Inflation + +Larson touches on how different companies have varying definitions of "Staff Engineer," and titles don’t always correlate directly with responsibility or skill. He emphasizes the importance of focusing more on the work you're doing and the impact you're having, rather than the title itself. + +These additional points reflect more of the strategic, interpersonal, and leadership aspects that go beyond the technical expertise expected at this level. The role of a Staff Engineer is often about balancing high-level strategy with technical execution, while influencing teams and projects in a sustainable, long-term way. + +## Not a faster Senior Engineer + +* A Staff engineer is more than just a faster Senior. +* A staff engineer is not a senior engineer but a bit better. + +It's important to know what work or which role most energizes you. A Staff engineer is not a more senior engineer. A Staff engineer also fits into another archetype. + +As a staff engineer, you are always expected to go beyond your comfort zone and learn new things. + +Your job sometimes will feel like an SEM and sometimes strangely similar to your senior roles. + +A Staff engineer is, like a Manager, a leader. However, being a Manager is a specific job. Leaders can apply to any job, especially to Staff engineers. + +## The Balance + +The more senior you become, the more responsibility you will have to cope with them in less time. Balance your speed of progress with your personal life, don't work late hours and don't skip these personal care events. + +Do fewer things but do them better. Everything done will accelerate the organization. Everything else will drag it down—quality over quantity. + +Don't work at ten things and progress slowly; focus on one thing and finish it. + +Only spend some of the time firefighting. Have time for deep thinking. Only deep think some of the time. Otherwise, you lose touch with reality. + +Sebactical: Take at least six months. Otherwise, it won't be as restored. + +## More things + +* Provide simple but widely used tools. Complex and powerful tools will have power users but only a very few. All others will not use the tool. +* In meetings, when someone is inactive, try to pull him in. Pull in max one person at a time. Don't open the discussion to multiple people. +* Get used to writing things down and repeating yourself. You will scale yourself much more. +* Title inflation: skills correspond to work, but the titles don't. + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +Other book notes of mine are: + +[2024-10-24 "Staff Engineer" book notes (You are currently reading this)](./2024-10-24-staff-engineer-book-notes.md) +[2024-07-07 "The Stoic Challenge" book notes](./2024-07-07-the-stoic-challenge-book-notes.md) +[2024-05-01 "Slow Productivity" book notes](./2024-05-01-slow-productivity-book-notes.md) +[2023-11-11 "Mind Management" book notes](./2023-11-11-mind-management-book-notes.md) +[2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes](./2023-07-17-career-guide-and-soft-skills-book-notes.md) +[2023-05-06 "The Obstacle is the Way" book notes](./2023-05-06-the-obstacle-is-the-way-book-notes.md) +[2023-04-01 "Never split the difference" book notes](./2023-04-01-never-split-the-difference-book-notes.md) +[2023-03-16 "The Pragmatic Programmer" book notes](./2023-03-16-the-pragmatic-programmer-book-notes.md) + +[Back to the main site](../) diff --git a/gemfeed/2024-11-17-f3s-kubernetes-with-freebsd-part-1.md b/gemfeed/2024-11-17-f3s-kubernetes-with-freebsd-part-1.md new file mode 100644 index 00000000..6cd7c6a3 --- /dev/null +++ b/gemfeed/2024-11-17-f3s-kubernetes-with-freebsd-part-1.md @@ -0,0 +1,173 @@ +# f3s: Kubernetes with FreeBSD - Part 1: Setting the stage + +> Published at 2024-11-16T23:20:14+02:00 + +This is the first blog post about my f3s series for my self-hosting demands in my home lab. f3s? The "f" stands for FreeBSD, and the "3s" stands for k3s, the Kubernetes distribution I will use on FreeBSD-based physical machines. + +I will post a new entry every month or so (there are too many other side projects for more frequent updates—I bet you can understand). + +These are all the posts so far: + +[2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts](./2025-02-01-f3s-kubernetes-with-freebsd-part-3.md) +[2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation](./2024-12-03-f3s-kubernetes-with-freebsd-part-2.md) +[2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage (You are currently reading this)](./2024-11-17-f3s-kubernetes-with-freebsd-part-1.md) + +[](./f3s-kubernetes-with-freebsd-part-1/f3slogo.png) + +> Logo was generated by ChatGPT. + +Let's begin... + +## Table of Contents + +* [⇢ f3s: Kubernetes with FreeBSD - Part 1: Setting the stage](#f3s-kubernetes-with-freebsd---part-1-setting-the-stage) +* [⇢ ⇢ Why this setup?](#why-this-setup) +* [⇢ ⇢ The infrastructure](#the-infrastructure) +* [⇢ ⇢ ⇢ Physical FreeBSD nodes and Linux VMs](#physical-freebsd-nodes-and-linux-vms) +* [⇢ ⇢ ⇢ Kubernetes with k3s ](#kubernetes-with-k3s-) +* [⇢ ⇢ ⇢ HA volumes for k3s with HAST/ZFS and NFS](#ha-volumes-for-k3s-with-hastzfs-and-nfs) +* [⇢ ⇢ ⇢ OpenBSD/`relayd` to the rescue for external connectivity](#openbsdrelayd-to-the-rescue-for-external-connectivity) +* [⇢ ⇢ Data integrity](#data-integrity) +* [⇢ ⇢ ⇢ Periodic backups](#periodic-backups) +* [⇢ ⇢ ⇢ Power protection](#power-protection) +* [⇢ ⇢ Monitoring: Keeping an eye on everything](#monitoring-keeping-an-eye-on-everything) +* [⇢ ⇢ ⇢ Prometheus and Grafana](#prometheus-and-grafana) +* [⇢ ⇢ ⇢ Gogios: My custom alerting system](#gogios-my-custom-alerting-system) +* [⇢ ⇢ What's after this all?](#what-s-after-this-all) + +## Why this setup? + +My previous setup was great for learning Terraform and AWS, but it is too expensive. Costs are under control there, but only because I am shutting down all containers after use (so they are offline ninety percent of the time and still cost around $20 monthly). With the new setup, I could run all containers 24/7 at home, which would still be cheaper in terms of electricity consumption. I have a 50 MBit/s uplink (I could have more if I wanted, but it is plenty for my use case already). + +[From `babylon5.buetow.org` to `.cloud`](./2024-02-04-from-babylon5.buetow.org-to-.cloud.md) + +Migrating off all my containers from AWS ECS means I need a reliable and scalable environment to host my workloads. I wanted something: + +* To self-host all my open-source apps (Docker containers). +* Fully under my control (goodbye cloud vendor lock-in). +* Secure and redundant. +* Cost-efficient (after the initial hardware investment). +* Something I can poke around with and also pick up new skills. + +## The infrastructure + +This is still in progress, and I need to own the hardware. But in this first part of the blog series, I will outline what I intend to do. + +[](./f3s-kubernetes-with-freebsd-part-1/diagram.png) + +### Physical FreeBSD nodes and Linux VMs + +The setup starts with three physical FreeBSD nodes deployed into my home LAN. On these, I'm going to run Rocky Linux virtual machines with bhyve. Why Linux VMs in FreeBSD and not Linux directly? I want to leverage the great ZFS integration in FreeBSD (among other features), and I have been using FreeBSD for a while in my home lab. And with bhyve, there is a very performant hypervisor available which makes the Linux VMs de-facto run at native speed (another use case of mine would be maybe running a Windows bhyve VM on one of the nodes - but out of scope for this blog series). + +[https://www.freebsd.org/](https://www.freebsd.org/) +[https://wiki.freebsd.org/bhyve](https://wiki.freebsd.org/bhyve) + +I selected Rocky Linux because it comes with long-term support (I don't want to upgrade the VMs every 6 months). Rocky Linux 9 will reach its end of life in 2032, which is plenty of time! Of course, there will be minor upgrades, but nothing will significantly break my setup. + +[https://rockylinux.org/](https://rockylinux.org/) +[https://wiki.rockylinux.org/rocky/version/](https://wiki.rockylinux.org/rocky/version/) + +Furthermore, I am already using "RHEL-family" related distros at work and Fedora on my main personal laptop. Rocky Linux belongs to the same type of Linux distribution family, so I already feel at home here. I also used Rocky 9 before I switched to AWS ECS. Now, I am switching back in one sense or another ;-) + +### Kubernetes with k3s + +These Linux VMs form a three-node k3s Kubernetes cluster, where my containers will reside moving forward. The 3-node k3s cluster will be highly available (in `etcd` mode), and all apps will probably be deployed with Helm. Prometheus will also be running in k3s, collecting time-series metrics and handling monitoring. Additionally, a private Docker registry will be deployed into the k3s cluster, where I will store some of my self-created Docker images. k3s is the perfect distribution of Kubernetes for homelabbers due to its simplicity and the inclusion of the most useful features out of the box! + +[https://k3s.io/](https://k3s.io/) + +### HA volumes for k3s with HAST/ZFS and NFS + +Persistent storage for the k3s cluster will be handled by highly available (HA) NFS shares backed by ZFS on the FreeBSD hosts. + +On two of the three physical FreeBSD nodes, I will add a second SSD drive to each and dedicate it to a `zhast` ZFS pool. With HAST (FreeBSD's solution for highly available storage), this `pool` will be replicated at the byte level to a standby node. + +A virtual IP (VIP) will point to the master node. When the master node goes down, the VIP will failover to the standby node, where the ZFS pool will be mounted. An NFS server will listen to both nodes. k3s will use the VIP to access the NFS shares. + +[FreeBSD Wiki: Highly Available Storage](https://wiki.freebsd.org/HighlyAvailableStorage) + +You can think of DRBD being the Linux equivalent to FreeBSD's HAST. + +### OpenBSD/`relayd` to the rescue for external connectivity + +All apps should be reachable through the internet (e.g., from my phone or computer when travelling). For external connectivity and TLS management, I've got two OpenBSD VMs (one hosted by OpenBSD Amsterdam and another hosted by Hetzner) handling public-facing services like DNS, relaying traffic, and automating Let's Encrypt certificates. + +All of this (every Linux VM to every OpenBSD box) will be connected via WireGuard tunnels, keeping everything private and secure. There will be 6 WireGuard tunnels (3 k3s nodes times two OpenBSD VMs). + +[https://en.wikipedia.org/wiki/WireGuard](https://en.wikipedia.org/wiki/WireGuard) + +So, when I want to access a service running in k3s, I will hit an external DNS endpoint (with the authoritative DNS servers being the OpenBSD boxes). The DNS will resolve to the master OpenBSD VM (see my KISS highly-available with OpenBSD blog post), and from there, the `relayd` process (with a Let's Encrypt certificate—see my Let's Encrypt with OpenBSD and Rex blog post) will accept the TCP connection and forward it through the WireGuard tunnel to a reachable node port of one of the k3s nodes, thus serving the traffic. + +[KISS high-availability with OpenBSD](./2024-04-01-KISS-high-availability-with-OpenBSD.md) +[Let's Encrypt with OpenBSD and Rex](./2022-07-30-lets-encrypt-with-openbsd-and-rex.md) + +The OpenBSD setup described here already exists and is ready to use. The only thing that does not yet exist is the configuration of `relayd` to forward requests to k3s through the WireGuard tunnel(s). + +## Data integrity + +### Periodic backups + +Let's face it, backups are non-negotiable. + +On the HAST master node, incremental and encrypted ZFS snapshots are created daily and automatically backed up to AWS S3 Glacier Deep Archive via CRON. I have a bunch of scripts already available, which I currently use for a similar purpose on my FreeBSD Home NAS server (an old ThinkPad T440 with an external USB drive enclosure, which I will eventually retire when the HAST setup is ready). I will copy them and slightly modify them to fit the purpose. + +There's also `zfstools` in the ports, which helps set up an automatic snapshot regime: + +[https://www.freshports.org/sysutils/zfstools](https://www.freshports.org/sysutils/zfstools) + +The backup scripts also perform some zpool scrubbing now and then. A scrub once in a while keeps the trouble away. + +### Power protection + +Power outages are regularly in my area, so a UPS keeps the infrastructure running during short outages and protects the hardware. I'm still trying to decide which hardware to get, and I still need one, as my previous NAS is simply an older laptop that already has a battery for power outages. However, there are plenty of options to choose from. My main criterion is that the UPS should be silent, as the whole setup will be installed in an upper shelf unit in my daughter's room. ;-) + +## Monitoring: Keeping an eye on everything + +Robust monitoring is vital to any infrastructure, especially one as distributed as mine. I've thought about a setup that ensures I'll always be aware of what's happening in my environment. + +### Prometheus and Grafana + +Inside the k3s cluster, Prometheus will be deployed to handle metrics collection. It will be configured to scrape data from my Kubernetes workloads, nodes, and any services I monitor. Prometheus also integrates with Alertmanager to generate alerts based on predefined thresholds or conditions. + +[https://prometheus.io](https://prometheus.io) + +For visualization, Grafana will be deployed alongside Prometheus. Grafana lets me build dynamic, customizable dashboards that provide a real-time view of everything from resource utilization to application performance. Whether it's keeping track of CPU load, memory usage, or the health of Kubernetes pods, Grafana has it covered. This will also make troubleshooting easier, as I can quickly pinpoint where issues are arising. + +[https://grafana.com](https://grafana.com) + +### Gogios: My custom alerting system + +Alerts generated by Prometheus are forwarded to Alertmanager, which I will configure to work with Gogios, a lightweight monitoring and alerting system I wrote myself. Gogios runs on one of my OpenBSD VMs. At regular intervals, Gogios scrapes the alerts generated in the k3s cluster and notifies me via Email. + +[KISS server monitoring with Gogios](./2023-06-01-kiss-server-monitoring-with-gogios.md) + +Ironically, I implemented Gogios to avoid using more complex alerting systems like Prometheus, but here we go—it integrates well now. + +## What's after this all? + +This setup may be just the beginning. Some ideas I'm thinking about for the future: + +* Adding more FreeBSD nodes (in different physical locations, maybe at my wider family's places? WireGuard would make it possible!) for better redundancy. (HA storage then might be trickier) +* Deploying more Docker apps (data-intensive ones, like a picture gallery, my entire audiobook catalogue, or even a music server) to k3s. + +For now, though, I'm focused on completing the migration from AWS ECS and getting all my Docker containers running smoothly in k3s. + +What's your take on self-hosting? Are you planning to move away from managed cloud services? Stay tuned for the second part of this series, where I will likely write about the hardware and the OS setups. + +Read the next post of this series: + +[f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation](./2024-12-03-f3s-kubernetes-with-freebsd-part-2.md) + +Other *BSD-related posts: + +[2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts](./2025-02-01-f3s-kubernetes-with-freebsd-part-3.md) +[2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation](./2024-12-03-f3s-kubernetes-with-freebsd-part-2.md) +[2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage (You are currently reading this)](./2024-11-17-f3s-kubernetes-with-freebsd-part-1.md) +[2024-04-01 KISS high-availability with OpenBSD](./2024-04-01-KISS-high-availability-with-OpenBSD.md) +[2024-01-13 One reason why I love OpenBSD](./2024-01-13-one-reason-why-i-love-openbsd.md) +[2022-10-30 Installing DTail on OpenBSD](./2022-10-30-installing-dtail-on-openbsd.md) +[2022-07-30 Let's Encrypt with OpenBSD and Rex](./2022-07-30-lets-encrypt-with-openbsd-and-rex.md) +[2016-04-09 Jails and ZFS with Puppet on FreeBSD](./2016-04-09-jails-and-zfs-on-freebsd-with-puppet.md) + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +[Back to the main site](../) diff --git a/gemfeed/2024-12-03-f3s-kubernetes-with-freebsd-part-2.md b/gemfeed/2024-12-03-f3s-kubernetes-with-freebsd-part-2.md new file mode 100644 index 00000000..5417cbdc --- /dev/null +++ b/gemfeed/2024-12-03-f3s-kubernetes-with-freebsd-part-2.md @@ -0,0 +1,312 @@ +# f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation + +> Published at 2024-12-02T23:48:21+02:00 + +This is the second blog post about my f3s series for my self-hosting demands in my home lab. f3s? The "f" stands for FreeBSD, and the "3s" stands for k3s, the Kubernetes distribution I will use on FreeBSD-based physical machines. + +We set the stage last time; this time, we will set up the hardware for this project. + +These are all the posts so far: + +[2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts](./2025-02-01-f3s-kubernetes-with-freebsd-part-3.md) +[2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation (You are currently reading this)](./2024-12-03-f3s-kubernetes-with-freebsd-part-2.md) +[2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage](./2024-11-17-f3s-kubernetes-with-freebsd-part-1.md) + +[](./f3s-kubernetes-with-freebsd-part-1/f3slogo.png) + +> Logo was generated by ChatGPT. + +Let's continue... + +## Table of Contents + +* [⇢ f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation](#f3s-kubernetes-with-freebsd---part-2-hardware-and-base-installation) +* [⇢ Deciding on the hardware](#deciding-on-the-hardware) +* [⇢ ⇢ Not ARM but Intel N100 ](#not-arm-but-intel-n100-) +* [⇢ ⇢ Beelink unboxing](#beelink-unboxing) +* [⇢ ⇢ Network switch](#network-switch) +* [⇢ Installing FreeBSD](#installing-freebsd) +* [⇢ ⇢ Base install](#base-install) +* [⇢ ⇢ Latest patch level and customizing `/etc/hosts`](#latest-patch-level-and-customizing-etchosts) +* [⇢ ⇢ After install](#after-install) +* [⇢ ⇢ ⇢ Helix editor](#helix-editor) +* [⇢ ⇢ ⇢ `doas`](#doas) +* [⇢ ⇢ ⇢ Periodic ZFS snapshotting](#periodic-zfs-snapshotting) +* [⇢ ⇢ ⇢ Uptime tracking](#uptime-tracking) +* [⇢ Hardware check](#hardware-check) +* [⇢ ⇢ Ethernet](#ethernet) +* [⇢ ⇢ RAM](#ram) +* [⇢ ⇢ CPUs](#cpus) +* [⇢ ⇢ CPU throttling](#cpu-throttling) +* [⇢ Conclusion](#conclusion) + +# Deciding on the hardware + +Note that the OpenBSD VMs included in the f3s setup (which will be used later in this blog series for internet ingress - as you know from the first part of this blog series) are already there. These are virtual machines that I rent at OpenBSD Amsterdam and Hetzner. + +[https://openbsd.amsterdam](https://openbsd.amsterdam) +[https://hetzner.cloud](https://hetzner.cloud) + +This means that the FreeBSD boxes need to be covered, which will later be running k3s in Linux VMs via bhyve hypervisor. + +I've been considering whether to use Raspberry Pis or look for alternatives. It turns out that complete N100-based mini-computers aren't much more expensive than Raspberry Pi 5s, and they don't require assembly. Furthermore, I like that they are AMD64 and not ARM-based, which increases compatibility with some applications (e.g., I might want to virtualize Windows (via bhyve) on one of those, though that's out of scope for this blog series). + +## Not ARM but Intel N100 + +I needed something compact, efficient, and capable enough to handle the demands of a small-scale Kubernetes cluster and preferably something I don't have to assemble a lot. After researching, I decided on the Beelink S12 Pro with Intel N100 CPUs. + +[Beelink Mini S12 Pro N100 official page](https://www.bee-link.com/products/beelink-mini-s12-pro-n100) + +The Intel N100 CPUs are built on the "Alder Lake-N" architecture. These chips are designed to balance performance and energy efficiency well. With four cores, they're more than capable of running multiple containers, even with moderate workloads. Plus, they consume only around 8W of power (ok, that's more than the Pis...), keeping the electricity bill low enough and the setup quiet - perfect for 24/7 operation. + +[](./f3s-kubernetes-with-freebsd-part-2/f3s-collage1.jpg) + +The Beelink comes with the following specs: + +* 12th Gen Intel N100 processor, with four cores and four threads, and a maximum frequency of up to 3.4 GHz. +* 16 GB of DDR4 RAM, with a maximum (official) size of 16 GB (but people could install 32 GB on it). +* 500 GB M.2 SSD, with the option to install a 2nd 2.5 SSD drive (which I want to make use of later in this blog series). +* GBit ethernet +* Four USB 3.2 Gen2 ports (maybe I want to mount something externally at some point) +* Dimensions and weight: 115*102*39mm, 280g +* Silent cooling system. +* HDMI output (needed only for the initial installation and maybe for troubleshooting later) +* Auto power on via WoL (may make use of it) +* Wi-Fi (not going to use it) + +I bought three (3) of them for the cluster I intend to build. + +## Beelink unboxing + +Unboxing was uneventful. Every Beelink PC came with: + +* An AC power adapter +* An HDMI cable +* A VESA mount with screws (not using it as of now) +* Some manuals +* The pre-assembled Beelink PC itself. +* A "Hello" post card (??) + +Overall, I love the small form factor. + +## Network switch + +I went with the tp-link mini 5-port switch, as I had a spare one available. That switch will be plugged into my wall ethernet port, which connects directly to my fiber internet router with 100 Mbit/s down and 50 Mbit/s upload speed. + +[](./f3s-kubernetes-with-freebsd-part-2/switch.jpg) + +# Installing FreeBSD + +## Base install + +First, I downloaded the boot-only ISO of the latest FreeBSD release and dumped it on a USB stick via my Fedora laptop: + +```sh +[paul@earth]~/Downloads% sudo dd \ + if=FreeBSD-14.1-RELEASE-amd64-bootonly.iso \ + of=/dev/sda conv=sync +``` + +Next, I plugged the Beelinks (one after another) into my monitor via HDMI (the resolution of the FreeBSD text console seems strangely stretched, as I am using the LG Dual Up monitor), connected Ethernet, an external USB keyboard, and the FreeBSD USB stick, and booted the devices up. With F7, I entered the boot menu and selected the USB stick for the FreeBSD installation. + +The installation was uneventful. I selected: + +* Guided ZFS on root (pool `zroot`) +* Unencrypted ZFS (I will encrypt separate datasets later; I want it to be able to boot without manual interaction) +* Static IP configuration (to ensure that the boxes always have the same IPs, even after switching the router/DHCP server) +* I decided to enable the SSH daemon, NTP server, and NTP time synchronization at boot, and I also enabled `powerd` for automatic CPU frequency scaling. +* In addition to `root,` I added a personal user, `paul,` whom I placed in the `wheel` group. + +After doing all that three times (once for each Beelink PC), I had three ready-to-use FreeBSD boxes! Their hostnames are `f0`, `f1` and `f2`! + +[](./f3s-kubernetes-with-freebsd-part-2/f3s-collage2.jpg) + +## Latest patch level and customizing `/etc/hosts` + +After the first boot, I upgraded to the latest FreeBSD patch level as follows: + +```sh +root@f0:~ # freebsd-update fetch +root@f0:~ # freebsd-update install +root@f0:~ # freebsd-update reboot +``` + +I also added the following entries for the three FreeBSD boxes to the `/etc/hosts` file: + +```sh +root@f0:~ # cat <<END >>/etc/hosts +192.168.1.130 f0 f0.lan f0.lan.buetow.org +192.168.1.131 f1 f1.lan f1.lan.buetow.org +192.168.1.132 f2 f2.lan f2.lan.buetow.org +END +``` + +You might wonder why bother using the hosts file? Why not use DNS properly? The reason is simplicity. I don't manage 100 hosts, only a few here and there. Having an OpenWRT router in my home, I could also configure everything there, but maybe I'll do that later. For now, keep it simple and straightforward. + +## After install + +After that, I installed the following additional packages: + +```sh +root@f0:~ # pkg install helix doas zfs-periodic uptimed +``` + +### Helix editor + +Helix? It's my favourite text editor. I have nothing against `vi` but like `hx` (Helix) more! + +[https://helix-editor.com/](https://helix-editor.com/) + +### `doas` + +`doas`? It's a pretty neat (and KISS) replacement for `sudo`. It has far fewer features than `sudo`, which is supposed to make it more secure. Its origin is the OpenBSD project. For `doas`, I accepted the default configuration (where users in the `wheel` group are allowed to run commands as `root`): + +```sh +root@f0:~ # cp /usr/local/etc/doas.conf.sample /usr/local/etc/doas.conf +``` + +[https://man.openbsd.org/doas](https://man.openbsd.org/doas) + +### Periodic ZFS snapshotting + +`zfs-periodic` is a nifty tool for automatically creating ZFS snapshots. I decided to go with the following configuration here: + +```sh +root@f0:~ # cat <<END >>/etc/periodic.conf +daily_zfs_snapshot_enable="YES" +daily_zfs_snapshot_pools="zroot" +daily_zfs_snapshot_keep="7" +weekly_zfs_snapshot_enable="YES" +weekly_zfs_snapshot_pools="zroot" +weekly_zfs_snapshot_keep="5" +monthly_zfs_snapshot_enable="YES" +monthly_zfs_snapshot_pools="zroot" +monthly_zfs_snapshot_keep="6" +END +``` + +[https://github.com/ross/zfs-periodic](https://github.com/ross/zfs-periodic) + +### Uptime tracking + +`uptimed`? I like to track my uptimes. This is how I configured the daemon: + +```sh +root@f0:~ # cp /usr/local/mimecast/etc/uptimed.conf-dist \ + /usr/local/mimecast/etc/uptimed.conf +root@f0:~ # hx /usr/local/mimecast/etc/uptimed.conf +``` + +In the Helix editor session, I changed `LOG_MAXIMUM_ENTRIES` to `0` to keep all uptime entries forever and not cut off at 50 (the default config). After that, I enabled and started `uptimed`: + +```sh +root@f0:~ # service uptimed enable +root@f0:~ # service uptimed start +``` + +To check the current uptime stats, I can now run `uprecords`: + +```sh + root@f0:~ # uprecords + # Uptime | System Boot up +----------------------------+--------------------------------------------------- +-> 1 0 days, 00:07:34 | FreeBSD 14.1-RELEASE Mon Dec 2 12:21:44 2024 +----------------------------+--------------------------------------------------- +NewRec 0 days, 00:07:33 | since Mon Dec 2 12:21:44 2024 + up 0 days, 00:07:34 | since Mon Dec 2 12:21:44 2024 + down 0 days, 00:00:00 | since Mon Dec 2 12:21:44 2024 + %up 100.000 | since Mon Dec 2 12:21:44 2024 +``` + +This is how I track the uptimes for all of my host: + +[Unveiling `guprecords.raku`: Global Uptime Records with Raku-](./2023-05-01-unveiling-guprecords:-uptime-records-with-raku.md) +[https://github.com/rpodgorny/uptimed](https://github.com/rpodgorny/uptimed) + +# Hardware check + +## Ethernet + +Works. Nothing eventful, really. It's a cheap Realtek chip, but it will do what it is supposed to do. + +```sh +paul@f0:~ % ifconfig re0 +re0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500 + options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE> + ether e8:ff:1e:d7:1c:ac + inet 192.168.1.130 netmask 0xffffff00 broadcast 192.168.1.255 + inet6 fe80::eaff:1eff:fed7:1cac%re0 prefixlen 64 scopeid 0x1 + inet6 fd22:c702:acb7:0:eaff:1eff:fed7:1cac prefixlen 64 detached autoconf + inet6 2a01:5a8:304:1d5c:eaff:1eff:fed7:1cac prefixlen 64 autoconf pltime 10800 vltime 14400 + media: Ethernet autoselect (1000baseT <full-duplex>) + status: active + nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL> +``` + +## RAM + +All there: + +```sh +paul@f0:~ % sysctl hw.physmem +hw.physmem: 16902905856 + +``` + +## CPUs + +They work: + +```sh +paul@f0:~ % sysctl dev.cpu | grep freq: +dev.cpu.3.freq: 705 +dev.cpu.2.freq: 705 +dev.cpu.1.freq: 604 +dev.cpu.0.freq: 604 +``` + +## CPU throttling + +With `powerd` running, CPU freq is dowthrottled when the box isn't jam-packed. To stress it a bit, I run `ubench` to see the frequencies being unthrottled again: + +```sh +paul@f0:~ % doas pkg install ubench +paul@f0:~ % rehash # For tcsh to find the newly installed command +paul@f0:~ % ubench & +paul@f0:~ % sysctl dev.cpu | grep freq: +dev.cpu.3.freq: 2922 +dev.cpu.2.freq: 2922 +dev.cpu.1.freq: 2923 +dev.cpu.0.freq: 2922 +``` + +Idle, all three Beelinks plus the switch consumed 26.2W. But with `ubench` stressing all the CPUs, it went up to 38.8W. + +[](./f3s-kubernetes-with-freebsd-part-2/watt.jpg) + +# Conclusion + +The Beelink S12 Pro with Intel N100 CPUs checks all the boxes for a k3s project: Compact, efficient, expandable, and affordable. Its compatibility with both Linux and FreeBSD makes it versatile for other use cases, whether as part of your cluster or as a standalone system. If you’re looking for hardware that punches above its weight for Kubernetes, this little device deserves a spot on your shortlist. + +[](./f3s-kubernetes-with-freebsd-part-2/3beelinks.jpg) + +To ease cable management, I need to get shorter ethernet cables. I will place the tower on my shelf, where most of the cables will be hidden (together with a UPS, which will also be added to the setup). + +Read the next post of this series: + +[f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts](./2025-02-01-f3s-kubernetes-with-freebsd-part-3.md) + +Other *BSD-related posts: + +[2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts](./2025-02-01-f3s-kubernetes-with-freebsd-part-3.md) +[2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation (You are currently reading this)](./2024-12-03-f3s-kubernetes-with-freebsd-part-2.md) +[2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage](./2024-11-17-f3s-kubernetes-with-freebsd-part-1.md) +[2024-04-01 KISS high-availability with OpenBSD](./2024-04-01-KISS-high-availability-with-OpenBSD.md) +[2024-01-13 One reason why I love OpenBSD](./2024-01-13-one-reason-why-i-love-openbsd.md) +[2022-10-30 Installing DTail on OpenBSD](./2022-10-30-installing-dtail-on-openbsd.md) +[2022-07-30 Let's Encrypt with OpenBSD and Rex](./2022-07-30-lets-encrypt-with-openbsd-and-rex.md) +[2016-04-09 Jails and ZFS with Puppet on FreeBSD](./2016-04-09-jails-and-zfs-on-freebsd-with-puppet.md) + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +[Back to the main site](../) diff --git a/gemfeed/2024-12-15-random-helix-themes.md b/gemfeed/2024-12-15-random-helix-themes.md new file mode 100644 index 00000000..1f5ef449 --- /dev/null +++ b/gemfeed/2024-12-15-random-helix-themes.md @@ -0,0 +1,92 @@ +# Random Helix Themes + +> Published at 2024-12-15T13:55:05+02:00; Last updated 2024-12-18 + +I thought it would be fun to have a random Helix theme every time I open a new shell. Helix is the text editor I use. + +[https://helix-editor.com/](https://helix-editor.com/) + +So I put this into my `zsh` dotfiles (in some `editor.zsh.source` in my `~` directory): + +```sh +export EDITOR=hx +export VISUAL=$EDITOR +export GIT_EDITOR=$EDITOR +export HELIX_CONFIG_DIR=$HOME/.config/helix + +editor::helix::random_theme () { + # May add more theme search paths based on OS. This one is + # for Fedora Linux, but there is also MacOS, etc. + local -r theme_dir=/usr/share/helix/runtime/themes + if [ ! -d $theme_dir ]; then + echo "Helix theme dir $theme_dir doesnt exist" + return 1 + fi + + local -r config_file=$HELIX_CONFIG_DIR/config.toml + local -r random_theme="$(basename "$(ls $theme_dir \ + | grep -v random.toml | grep .toml | sort -R \ + | head -n 1)" | cut -d. -f1)" + + sed "/^theme =/ { s/.*/theme = \"$random_theme\"/; }" \ + $config_file > $config_file.tmp && + mv $config_file.tmp $config_file +} + +if [ -f $HELIX_CONFIG_DIR/config.toml ]; then + editor::helix::random_theme +fi +``` + +So every time I open a new terminal or shell, `editor::helix::random_theme` gets called, which randomly selects a theme from all installed ones and updates the helix config accordingly. + +```sh +[paul@earth] ~ % editor::helix::random_theme +[paul@earth] ~ % head -n 1 ~/.config/helix/config.toml +theme = "jellybeans" +[paul@earth] ~ % editor::helix::random_theme +[paul@earth] ~ % head -n 1 ~/.config/helix/config.toml +theme = "rose_pine" +[paul@earth] ~ % editor::helix::random_theme +[paul@earth] ~ % head -n 1 ~/.config/helix/config.toml +theme = "noctis" +[paul@earth] ~ % +``` + +## A better version + +> Update 2024-12-18: This is an improved version, which works cross platform (e.g., also on MacOS) and multiple theme directories: + +```sh +export EDITOR=hx +export VISUAL=$EDITOR +export GIT_EDITOR=$EDITOR +export HELIX_CONFIG_DIR=$HOME/.config/helix + +editor::helix::theme::get_random () { + for dir in $(hx --health \ + | awk '/^Runtime directories/ { print $3 }' | tr ';' ' '); do + if [ -d $dir/themes ]; then + ls $dir/themes + fi + done | grep -F .toml | sort -R | head -n 1 | cut -d. -f1 +} + +editor::helix::theme::set () { + local -r theme="$1"; shift + + local -r config_file=$HELIX_CONFIG_DIR/config.toml + + sed "/^theme =/ { s/.*/theme = \"$theme\"/; }" \ + $config_file > $config_file.tmp && + mv $config_file.tmp $config_file +} + +if [ -f $HELIX_CONFIG_DIR/config.toml ]; then + editor::helix::theme::set $(editor::helix::theme::get_random) +fi +``` + +I hope you had some fun. E-Mail your comments to `paul@nospam.buetow.org` :-) + +[Back to the main site](../) diff --git a/gemfeed/2025-01-01-posts-from-october-to-december-2024.md b/gemfeed/2025-01-01-posts-from-october-to-december-2024.md new file mode 100644 index 00000000..f8cbae83 --- /dev/null +++ b/gemfeed/2025-01-01-posts-from-october-to-december-2024.md @@ -0,0 +1,337 @@ +# Posts from October to December 2024 + +> Published at 2024-12-31T18:09:58+02:00 + +Happy new year! + +These are my social media posts from the last three months. I keep them here to reflect on them and also to not lose them. Social media networks come and go and are not under my control, but my domain is here to stay. + +These are from Mastodon and LinkedIn. Have a look at my about page for my social media profiles. This list is generated with Gos, my social media platform sharing tool. + +[My about page](../about/index.md) +[https://codeberg.org/snonux/gos](https://codeberg.org/snonux/gos) + +## Table of Contents + +* [⇢ Posts from October to December 2024](#posts-from-october-to-december-2024) +* [⇢ Posts for 202410 202411 202412](#posts-for-202410-202411-202412) +* [⇢ ⇢ October 2024](#october-2024) +* [⇢ ⇢ ⇢ First on-call experience in a startup. Doesn't ...](#first-on-call-experience-in-a-startup-doesn-t-) +* [⇢ ⇢ ⇢ Reviewing your own PR or MR before asking ...](#reviewing-your-own-pr-or-mr-before-asking-) +* [⇢ ⇢ ⇢ Fun with defer in `#golang`, I did't know, that ...](#fun-with-defer-in-golang-i-did-t-know-that-) +* [⇢ ⇢ ⇢ I have been in incidents. Understandably, ...](#i-have-been-in-incidents-understandably-) +* [⇢ ⇢ ⇢ Little tips using strings in `#golang` and I ...](#little-tips-using-strings-in-golang-and-i-) +* [⇢ ⇢ ⇢ Reading this post about `#rust` (especially the ...](#reading-this-post-about-rust-especially-the-) +* [⇢ ⇢ ⇢ The opposite of `#ChaosMonkey` ... ...](#the-opposite-of-chaosmonkey--) +* [⇢ ⇢ November 2024](#november-2024) +* [⇢ ⇢ ⇢ I just became a Silver Patreon for OSnews. What ...](#i-just-became-a-silver-patreon-for-osnews-what-) +* [⇢ ⇢ ⇢ Until now, I wasn't aware, that Go is under a ...](#until-now-i-wasn-t-aware-that-go-is-under-a-) +* [⇢ ⇢ ⇢ These are some book notes from "Staff Engineer" ...](#these-are-some-book-notes-from-staff-engineer-) +* [⇢ ⇢ ⇢ Looking at `#Kubernetes`, it's pretty much ...](#looking-at-kubernetes-it-s-pretty-much-) +* [⇢ ⇢ ⇢ There has been an outage at the upstream ...](#there-has-been-an-outage-at-the-upstream-) +* [⇢ ⇢ ⇢ One of the more confusing parts in Go, nil ...](#one-of-the-more-confusing-parts-in-go-nil-) +* [⇢ ⇢ ⇢ Agreeably, writing down with Diagrams helps you ...](#agreeably-writing-down-with-diagrams-helps-you-) +* [⇢ ⇢ ⇢ I like the idea of types in Ruby. Raku is ...](#i-like-the-idea-of-types-in-ruby-raku-is-) +* [⇢ ⇢ ⇢ So, `#Haskell` is better suited for general ...](#so-haskell-is-better-suited-for-general-) +* [⇢ ⇢ ⇢ At first, functional options add a bit of ...](#at-first-functional-options-add-a-bit-of-) +* [⇢ ⇢ ⇢ Revamping my home lab a little bit. `#freebsd` ...](#revamping-my-home-lab-a-little-bit-freebsd-) +* [⇢ ⇢ ⇢ Wondering to which `#web` `#browser` I should ...](#wondering-to-which-web-browser-i-should-) +* [⇢ ⇢ ⇢ eks-node-viewer is a nifty tool, showing the ...](#eks-node-viewer-is-a-nifty-tool-showing-the-) +* [⇢ ⇢ ⇢ Have put more Photos on - On my static photo ...](#have-put-more-photos-on---on-my-static-photo-) +* [⇢ ⇢ ⇢ In Go, passing pointers are not automatically ...](#in-go-passing-pointers-are-not-automatically-) +* [⇢ ⇢ ⇢ Myself being part of an on-call rotations over ...](#myself-being-part-of-an-on-call-rotations-over-) +* [⇢ ⇢ ⇢ Feels good to code in my old love `#Perl` again ...](#feels-good-to-code-in-my-old-love-perl-again-) +* [⇢ ⇢ ⇢ This is an interactive summary of the Go ...](#this-is-an-interactive-summary-of-the-go-) +* [⇢ ⇢ December 2024](#december-2024) +* [⇢ ⇢ ⇢ Thats unexpected, you cant remove a NaN key ...](#thats-unexpected-you-cant-remove-a-nan-key-) +* [⇢ ⇢ ⇢ My second blog post about revamping my home lab ...](#my-second-blog-post-about-revamping-my-home-lab-) +* [⇢ ⇢ ⇢ Very insightful article about tech hiring in ...](#very-insightful-article-about-tech-hiring-in-) +* [⇢ ⇢ ⇢ for `#bpf` `#ebpf` performance debugging, have ...](#for-bpf-ebpf-performance-debugging-have-) +* [⇢ ⇢ ⇢ 89 things he/she knows about Git commits is a ...](#89-things-heshe-knows-about-git-commits-is-a-) +* [⇢ ⇢ ⇢ I found that working on multiple side projects ...](#i-found-that-working-on-multiple-side-projects-) +* [⇢ ⇢ ⇢ Agreed? Agreed. Besides `#Ruby`, I would also ...](#agreed-agreed-besides-ruby-i-would-also-) +* [⇢ ⇢ ⇢ Plan9 assembly format in Go, but wait, it's not ...](#plan9-assembly-format-in-go-but-wait-it-s-not-) +* [⇢ ⇢ ⇢ This is a neat blog post about the Helix text ...](#this-is-a-neat-blog-post-about-the-helix-text-) +* [⇢ ⇢ ⇢ This blog post is basically a rant against ...](#this-blog-post-is-basically-a-rant-against-) +* [⇢ ⇢ ⇢ Quick trick to get Helix themes selected ...](#quick-trick-to-get-helix-themes-selected-) +* [⇢ ⇢ ⇢ Example where complexity attacks you from ...](#example-where-complexity-attacks-you-from-) +* [⇢ ⇢ ⇢ LLMs for Ops? Summaries of logs, probabilities ...](#llms-for-ops-summaries-of-logs-probabilities-) +* [⇢ ⇢ ⇢ Excellent article about your dream Product ...](#excellent-article-about-your-dream-product-) +* [⇢ ⇢ ⇢ I just finished reading all chapters of CPU ...](#i-just-finished-reading-all-chapters-of-cpu-) +* [⇢ ⇢ ⇢ Indeed, useful to know this stuff! `#sre` ...](#indeed-useful-to-know-this-stuff-sre-) +* [⇢ ⇢ ⇢ It's the small things, which make Unix like ...](#it-s-the-small-things-which-make-unix-like-) +* [⇢ ⇢ ⇢ My New Year's resolution is not to start any ...](#my-new-year-s-resolution-is-not-to-start-any-) + +# Posts for 202410 202411 202412 + +## October 2024 + +### First on-call experience in a startup. Doesn't ... + +First on-call experience in a startup. Doesn't sound a lot of fun! But the lessons were learned! `#sre` + +[ntietz.com/blog/lessons-from-my-first-on-call/](https://ntietz.com/blog/lessons-from-my-first-on-call/) + +### Reviewing your own PR or MR before asking ... + +Reviewing your own PR or MR before asking others to review it makes a lot of sense. Have seen so many silly mistakes which would have been avoided. Saving time for the real reviewer. + +[www.jvt.me/posts/2019/01/12/self-code-review/](https://www.jvt.me/posts/2019/01/12/self-code-review/) + +### Fun with defer in `#golang`, I did't know, that ... + +Fun with defer in `#golang`, I did't know, that a defer object can either be heap or stack allocated. And there are some rules for inlining, too. + +[victoriametrics.com/blog/defer-in-go/](https://victoriametrics.com/blog/defer-in-go/) + +### I have been in incidents. Understandably, ... + +I have been in incidents. Understandably, everyone wants the issue to be resolved as quickly and others want to know how long TTR will be. IMHO, providing no estimates at all is no solution either. So maybe give a rough estimate but clearly communicate that the estimate is rough and that X, Y, and Z can interfere, meaning there is a chance it will take longer to resolve the incident. Just my thought. What's yours? + +[firehydrant.com/blog/hot-take-dont-provide-incident-resolution-estimates/](https://firehydrant.com/blog/hot-take-dont-provide-incident-resolution-estimates/) + +### Little tips using strings in `#golang` and I ... + +Little tips using strings in `#golang` and I personally think one must look more into the std lib (not just for strings, also for slices, maps,...), there are tons of useful helper functions. + +[www.calhoun.io/6-tips-for-using-strings-in-go/](https://www.calhoun.io/6-tips-for-using-strings-in-go/) + +### Reading this post about `#rust` (especially the ... + +Reading this post about `#rust` (especially the first part), I think I made a good choice in deciding to dive into `#golang` instead. There was a point where I wanted to learn a new programming language, and Rust was on my list of choices. I think the Go project does a much better job of deciding what goes into the language and how. What are your thoughts? + +[josephg.com/blog/rewriting-rust/](https://josephg.com/blog/rewriting-rust/) + +### The opposite of `#ChaosMonkey` ... ... + +The opposite of `#ChaosMonkey` ... automatically repairing and healing services helping to reduce manual toil work. Runbooks and scripts are only the first step, followed by a fully blown service written in Go. Could be useful, but IMHO why not rather address the root causes of the manual toil work? `#sre` + +[blog.cloudflare.com/nl-nl/improving-platform-resilience-at-cloudflare/](https://blog.cloudflare.com/nl-nl/improving-platform-resilience-at-cloudflare/) + +## November 2024 + +### I just became a Silver Patreon for OSnews. What ... + +I just became a Silver Patreon for OSnews. What is OSnews? It is an independent news site about IT. It is slightly independent and, at times, alternative. I have enjoyed it since my early student days. This one and other projects I financially support are listed here: + +[foo.zone/gemfeed/2024-09-07-projects-i-support.gmi (Gemini)](gemini://foo.zone/gemfeed/2024-09-07-projects-i-support.gmi) +[foo.zone/gemfeed/2024-09-07-projects-i-support.html](https://foo.zone/gemfeed/2024-09-07-projects-i-support.html) + +### Until now, I wasn't aware, that Go is under a ... + +Until now, I wasn't aware, that Go is under a BSD-style license (3-clause as it seems). Neat. I don't know why, but I always was under the impression it would be MIT. `#bsd` `#golang` + +[go.dev/LICENSE](https://go.dev/LICENSE) + +### These are some book notes from "Staff Engineer" ... + +These are some book notes from "Staff Engineer" – there is some really good insight into what is expected from a Staff Engineer and beyond in the industry. I wish I had read the book earlier. + +[foo.zone/gemfeed/2024-10-24-staff-engineer-book-notes.gmi (Gemini)](gemini://foo.zone/gemfeed/2024-10-24-staff-engineer-book-notes.gmi) +[foo.zone/gemfeed/2024-10-24-staff-engineer-book-notes.html](https://foo.zone/gemfeed/2024-10-24-staff-engineer-book-notes.html) + +### Looking at `#Kubernetes`, it's pretty much ... + +Looking at `#Kubernetes`, it's pretty much following the Unix way of doing things. It has many tools, but each tool has its own single purpose: DNS, scheduling, container runtime, various controllers, networking, observability, alerting, and more services in the control plane. Everything is managed by different services or plugins, mostly running in their dedicated pods. They don't communicate through pipes, but network sockets, though. `#k8s` + +### There has been an outage at the upstream ... + +There has been an outage at the upstream network provider for OpenBSD.Amsterdam (hoster, I am using). This was the first real-world test for my KISS HA setup, and it worked flawlessly! All my sites and services failed over automatically to my other `#OpenBSD` VM! + +[foo.zone/gemfeed/2024-04-01-KISS-high-availability-with-OpenBSD.gmi (Gemini)](gemini://foo.zone/gemfeed/2024-04-01-KISS-high-availability-with-OpenBSD.gmi) +[foo.zone/gemfeed/2024-04-01-KISS-high-availability-with-OpenBSD.html](https://foo.zone/gemfeed/2024-04-01-KISS-high-availability-with-OpenBSD.html) +[openbsd.amsterdam/](https://openbsd.amsterdam/) + +### One of the more confusing parts in Go, nil ... + +One of the more confusing parts in Go, nil values vs nil errors: `#golang` + +[unexpected-go.com/nil-errors-that-are-non-nil-errors.html](https://unexpected-go.com/nil-errors-that-are-non-nil-errors.html) + +### Agreeably, writing down with Diagrams helps you ... + +Agreeably, writing down with Diagrams helps you to think things more through. And keeps others on the same page. Only worth for projects from a certain size, IMHO. + +[ntietz.com/blog/reasons-to-write-design-docs/](https://ntietz.com/blog/reasons-to-write-design-docs/) + +### I like the idea of types in Ruby. Raku is ... + +I like the idea of types in Ruby. Raku is supports that already, but in Ruby, you must specify the types in a separate .rbs file, which is, in my opinion, cumbersome and is a reason not to use it extensively for now. I believe there are efforts to embed the type information in the standard .rb files, and that the .rbs is just an experiment to see how types could work out without introducing changes into the core Ruby language itself right now? `#Ruby` `#RakuLang` + +[github.com/ruby/rbs](https://github.com/ruby/rbs) + +### So, `#Haskell` is better suited for general ... + +So, `#Haskell` is better suited for general purpose than `#Rust`? I thought deploying something in Haskell means publishing an academic paper :-) Interesting rant about Rust, though: + +[chrisdone.com/posts/rust/](https://chrisdone.com/posts/rust/) + +### At first, functional options add a bit of ... + +At first, functional options add a bit of boilerplate, but they turn out to be quite neat, especially when you have very long parameter lists that need to be made neat and tidy. `#golang` + +[www.calhoun.io/using-functional-options-instead-of-method-chaining-in-go/](https://www.calhoun.io/using-functional-options-instead-of-method-chaining-in-go/) + +### Revamping my home lab a little bit. `#freebsd` ... + +Revamping my home lab a little bit. `#freebsd` `#bhyve` `#rocky` `#linux` `#vm` `#k3s` `#kubernetes` `#wireguard` `#zfs` `#nfs` `#ha` `#relayd` `#k8s` `#selfhosting` `#homelab` + +[foo.zone/gemfeed/2024-11-17-f3s-kubernetes-with-freebsd-part-1.gmi (Gemini)](gemini://foo.zone/gemfeed/2024-11-17-f3s-kubernetes-with-freebsd-part-1.gmi) +[foo.zone/gemfeed/2024-11-17-f3s-kubernetes-with-freebsd-part-1.html](https://foo.zone/gemfeed/2024-11-17-f3s-kubernetes-with-freebsd-part-1.html) + +### Wondering to which `#web` `#browser` I should ... + +Wondering to which `#web` `#browser` I should switch now personally ... + +[www.osnews.com/story/141100/mozilla-fo..-..dvocacy-for-open-web-privacy-and-more/](https://www.osnews.com/story/141100/mozilla-foundation-lays-off-30-of-its-employees-ends-advocacy-for-open-web-privacy-and-more/) + +### eks-node-viewer is a nifty tool, showing the ... + +eks-node-viewer is a nifty tool, showing the compute nodes currently in use in the `#EKS` cluster. especially useful when dynamically allocating nodes with `#karpenter` or auto scaling groups. + +[github.com/awslabs/eks-node-viewer](https://github.com/awslabs/eks-node-viewer) + +### Have put more Photos on - On my static photo ... + +Have put more Photos on - On my static photo sites - Generated with a `#bash` script + +[irregular.ninja](https://irregular.ninja) + +### In Go, passing pointers are not automatically ... + +In Go, passing pointers are not automatically faster than values. Pointers often force the memory to be allocated on the heap, adding GC overhad. With values, Go can determine whether to put the memory on the stack instead. But with large structs/objects (how you want to call them) or if you want to modify state, then pointers are the semantic to use. `#golang` + +[blog.boot.dev/golang/pointers-faster-than-values/](https://blog.boot.dev/golang/pointers-faster-than-values/) + +### Myself being part of an on-call rotations over ... + +Myself being part of an on-call rotations over my whole professional life, just have learned this lesson "Tell people who are new to on-call: Just have fun" :-) This is a neat blog post to read: + +[ntietz.com/blog/what-i-tell-people-new-to-oncall/](https://ntietz.com/blog/what-i-tell-people-new-to-oncall/) + +### Feels good to code in my old love `#Perl` again ... + +Feels good to code in my old love `#Perl` again after a while. I am implementing a log parser for generating site stats of my personal homepage! :-) @Perl + +### This is an interactive summary of the Go ... + +This is an interactive summary of the Go release, with a lot of examples utilising iterators in the slices and map packages. Love it! `#golang` + +[antonz.org/go-1-23/](https://antonz.org/go-1-23/) + +## December 2024 + +### Thats unexpected, you cant remove a NaN key ... + +Thats unexpected, you cant remove a NaN key from a map without clearing it! `#golang` + +[unexpected-go.com/you-cant-remove-a-nan-key-from-a-map-without-clearing-it.html](https://unexpected-go.com/you-cant-remove-a-nan-key-from-a-map-without-clearing-it.html) + +### My second blog post about revamping my home lab ... + +My second blog post about revamping my home lab a little bit just hit the net. `#FreeBSD` `#ZFS` `#n100` `#k8s` `#k3s` `#kubernetes` + +[foo.zone/gemfeed/2024-12-03-f3s-kubernetes-with-freebsd-part-2.gmi (Gemini)](gemini://foo.zone/gemfeed/2024-12-03-f3s-kubernetes-with-freebsd-part-2.gmi) +[foo.zone/gemfeed/2024-12-03-f3s-kubernetes-with-freebsd-part-2.html](https://foo.zone/gemfeed/2024-12-03-f3s-kubernetes-with-freebsd-part-2.html) + +### Very insightful article about tech hiring in ... + +Very insightful article about tech hiring in the age of LLMs. As an interviewer, I have experienced some of the scrnarios already first hand... + +[newsletter.pragmaticengineer.com/p/how-genai-changes-tech-hiring](https://newsletter.pragmaticengineer.com/p/how-genai-changes-tech-hiring) + +### for `#bpf` `#ebpf` performance debugging, have ... + +for `#bpf` `#ebpf` performance debugging, have a look at bpftop from Netflix. A neat tool showing you the estimated CPU time and other performance statistics for all the BPF programs currently loaded into the `#linux` kernel. Highly recommend! + +[github.com/Netflix/bpftop](https://github.com/Netflix/bpftop) + +### 89 things he/she knows about Git commits is a ... + +89 things he/she knows about Git commits is a neat list of `#Git` wisdoms + +[www.jvt.me/posts/2024/07/12/things-know-commits/](https://www.jvt.me/posts/2024/07/12/things-know-commits/) + +### I found that working on multiple side projects ... + +I found that working on multiple side projects concurrently is better than concentrating on just one. This seems inefficient at first, but whenever you tend to lose motivation, you can temporarily switch to another one with full élan. However, remember to stop starting and start finishing. This doesn't mean you should be working on 10+ (and a growing list of) side projects concurrently! Select your projects and commit to finishing them before starting the next thing. For example, my current limit of concurrent side projects is around five. + +### Agreed? Agreed. Besides `#Ruby`, I would also ... + +Agreed? Agreed. Besides `#Ruby`, I would also add `#RakuLang` and `#Perl` @Perl to the list of languages that are great for shell scripts - "Making Easy Things Easy and Hard Things Possible" + +[lucasoshiro.github.io/posts-en/2024-06-17-ruby-shellscript/](https://lucasoshiro.github.io/posts-en/2024-06-17-ruby-shellscript/) + +### Plan9 assembly format in Go, but wait, it's not ... + +Plan9 assembly format in Go, but wait, it's not the Operating System Plan9! `#golang` `#rabbithole` + +[www.osnews.com/story/140941/go-plan9-memo-speeding-up-calculations-450/](https://www.osnews.com/story/140941/go-plan9-memo-speeding-up-calculations-450/) + +### This is a neat blog post about the Helix text ... + +This is a neat blog post about the Helix text editor, to which I personally switched around a year ago (from NeoVim). I should blog about my experience as well. To summarize: I am using it together with the terminal multiplexer `#tmux`. It doesn't bother me that Helix is purely terminal-based and therefore everything has to be in the same font. `#HelixEditor` + +[jonathan-frere.com/posts/helix/](https://jonathan-frere.com/posts/helix/) + +### This blog post is basically a rant against ... + +This blog post is basically a rant against DataDog... Personally, I don't have much experience with DataDog (actually, I have never used it), but one reason to work with logs at my day job (with over 2,000 physical server machines) and to be cost-effective is by using dtail! `#dtail` `#logs` `#logmanagement` + +[crys.site/blog/2024/reinventint-the-weel/](https://crys.site/blog/2024/reinventint-the-weel/) +[dtail.dev](https://dtail.dev) + +### Quick trick to get Helix themes selected ... + +Quick trick to get Helix themes selected randomly `#HelixEditor` + +[foo.zone/gemfeed/2024-12-15-random-helix-themes.gmi (Gemini)](gemini://foo.zone/gemfeed/2024-12-15-random-helix-themes.gmi) +[foo.zone/gemfeed/2024-12-15-random-helix-themes.html](https://foo.zone/gemfeed/2024-12-15-random-helix-themes.html) + +### Example where complexity attacks you from ... + +Example where complexity attacks you from behind `#k8s` `#kubernetes` `#OpenAI` + +[surfingcomplexity.blog/2024/12/14/quic..-..ecent-openai-public-incident-write-up/](https://surfingcomplexity.blog/2024/12/14/quick-takes-on-the-recent-openai-public-incident-write-up/) + +### LLMs for Ops? Summaries of logs, probabilities ... + +LLMs for Ops? Summaries of logs, probabilities about correctness, auto-generating Ansible, some uses cases are there. Wouldn't trust it fully, though. + +[youtu.be/WodaffxVq-E?si=noY0egrfl5izCSQI](https://youtu.be/WodaffxVq-E?si=noY0egrfl5izCSQI) + +### Excellent article about your dream Product ... + +Excellent article about your dream Product Manager: Why every software team needs a product manager to thrive via @wallabagapp + +[testdouble.com/insights/why-product-ma..-..s-accelerate-improve-software-delivery](https://testdouble.com/insights/why-product-managers-accelerate-improve-software-delivery) + +### I just finished reading all chapters of CPU ... + +I just finished reading all chapters of CPU land: ... not claiming to remember every detail, but it is a great refresher how CPUs and operating systems actually work under the hood when you execute a program, which we tend to forget in our higher abstraction world. I liked the "story" and some of the jokes along the way! Size wise, it is pretty digestable (not talking about books, but only 7 web articles/chapters)! `#cpu` `#linux` `#unix` `#kernel` `#macOS` + +[cpu.land/](https://cpu.land/) + +### Indeed, useful to know this stuff! `#sre` ... + +Indeed, useful to know this stuff! `#sre` + +[biriukov.dev/docs/resolver-dual-stack-..-..resolvers-and-dual-stack-applications/](https://biriukov.dev/docs/resolver-dual-stack-application/0-sre-should-know-about-gnu-linux-resolvers-and-dual-stack-applications/) + +### It's the small things, which make Unix like ... + +It's the small things, which make Unix like systems, like GNU/Linux, interesting. Didn't know about this `#GNU` `#Tar` behaviour yet: + +[xeiaso.net/notes/2024/pop-quiz-tar/](https://xeiaso.net/notes/2024/pop-quiz-tar/) + +### My New Year's resolution is not to start any ... + +My New Year's resolution is not to start any new non-fiction books (or only very few) but to re-read and listen to my favorites, which I read to reflect on and see things from different perspectives. Every time you re-read a book, you gain new insights.<nil>17491 + +Other related posts: + +[2025-01-01 Posts from October to December 2024 (You are currently reading this)](./2025-01-01-posts-from-october-to-december-2024.md) + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +[Back to the main site](../) diff --git a/gemfeed/2025-01-15-working-with-an-sre-interview.md b/gemfeed/2025-01-15-working-with-an-sre-interview.md new file mode 100644 index 00000000..bf2e27d3 --- /dev/null +++ b/gemfeed/2025-01-15-working-with-an-sre-interview.md @@ -0,0 +1,178 @@ +# Working with an SRE Interview + +> Published at 2025-01-15T00:16:04+02:00 + +I have been interviewed by Florian Buetow on `cracking-ai-engineering.com` about what it's like working with a Site Reliability Engineer from the point of view of a Software Engineer, Data Scientist, and AI Engineer. + +[See original interview here](https://www.cracking-ai-engineering.com/writing/2025/01/12/working-with-an-sre-interview/) +[Cracking AI Engineering](https://www.cracking-ai-engineering.com) + +Below, I am posting the interview here on my blog as well. + +## Table of Contents + +* [⇢ Working with an SRE Interview](#working-with-an-sre-interview) +* [⇢ ⇢ Preamble ](#preamble-) +* [⇢ ⇢ Introducing Paul](#introducing-paul) +* [⇢ ⇢ How did you get started?](#how-did-you-get-started) +* [⇢ ⇢ Roles and Career Progression](#roles-and-career-progression) +* [⇢ ⇢ Anecdotes and Best Practices](#anecdotes-and-best-practices) +* [⇢ ⇢ Working with Different Teams](#working-with-different-teams) +* [⇢ ⇢ Using AI Tools](#using-ai-tools) +* [⇢ ⇢ SRE Learning Resources](#sre-learning-resources) +* [⇢ ⇢ Blogging](#blogging) +* [⇢ ⇢ Wrap-up](#wrap-up) +* [⇢ ⇢ Closing comments](#closing-comments) + +## Preamble + +In this insightful interview, Paul Bütow, a Principal Site Reliability Engineer at Mimecast, shares over a decade of experience in the field. Paul highlights the role of an Embedded SRE, emphasizing the importance of automation, observability, and effective incident management. We also focused on the key question of how you can work effectively with an SRE weather you are an individual contributor or a manager, a software engineer or data scientist. And how you can learn more about site reliability engineering. + +## Introducing Paul + +Hi Paul, please introduce yourself briefly to the audience. Who are you, what do you do for a living, and where do you work? + +> My name is Paul Bütow, I work at Mimecast, and I’m a Principal Site Reliability Engineer there. I’ve been with Mimecast for almost ten years now. The company specializes in email security, including things like archiving, phishing detection, malware protection, and spam filtering. + +You mentioned that you’re an ‘Embedded SRE.’ What does that mean exactly? + +> It means that I’m directly part of the software engineering team, not in a separate Ops department. I ensure that nothing is deployed manually, and everything runs through automation. I also set up monitoring and observability. These are two distinct aspects: monitoring alerts us when something breaks, while observability helps us identify trends. I also create runbooks so we know what to do when specific incidents occur frequently. + +> Infrastructure SREs on the other hand handle the foundational setup, like providing the Kubernetes cluster itself or ensuring the operating systems are installed. They don't work on the application directly but ensure the base infrastructure is there for others to use. This works well when a company has multiple teams that need shared infrastructure. + +## How did you get started? + +How did your interest in Linux or FreeBSD start? + +> It began during my school days. We had a PC with DOS at home, and I eventually bought Suse Linux 5.3. Shortly after, I discovered FreeBSD because I liked its handbook so much. I wanted to understand exactly how everything worked, so I also tried Linux from Scratch. That involves installing every package manually to gain a better understanding of operating systems. + +[https://www.FreeBSD.org](https://www.FreeBSD.org) +[https://linuxfromscratch.org/](https://linuxfromscratch.org/) + +And after school, you pursued computer science, correct? + +> Exactly. I wasn’t sure at first whether I wanted to be a software developer or a system administrator. I applied for both and eventually accepted an offer as a Linux system administrator. This was before 'SRE' became a buzzword, but much of what I did back then-automation, infrastructure as code, monitoring-is now considered part of the typical SRE role. + +## Roles and Career Progression + +Tell us about how you joined Mimecast. When did you fully embrace the SRE role? + +> I started as a Linux sysadmin at 1&1. I managed an ad server farm with hundreds of systems and later handled load balancers. Together with an architect, we managed F5 load balancers distributing around 2,000 services, including for portals like web.de and GMX. I also led the operations team technically for a while before moving to London to join Mimecast. + +> At Mimecast, the job title was explicitly 'Site Reliability Engineer.' The biggest difference was that I was no longer in a separate Ops department but embedded directly within the storage and search backend team. I loved that because we could plan features together-from automation to measurability and observability. Mimecast also operates thousands of physical servers for email archiving, which was fascinating since I already had experience with large distributed systems at 1&1. It was the right step for me because it allowed me to work close to the code while remaining hands-on with infrastructure. + +What are the differences between SRE, DevOps, SysAdmin, and Architects? + +> SREs are like the next step after SysAdmins. A SysAdmin might manually install servers, replace disks, or use simple scripts for automation, while SREs use infrastructure as code and focus on reliability through SLIs, SLOs, and automation. DevOps isn’t really a job-it’s more of a way of working, where developers are involved in operations tasks like setting up CI/CD pipelines or on-call shifts. Architects focus on designing systems and infrastructures, such as load balancers or distributed systems, working alongside SREs to ensure the systems meet the reliability and scalability requirements. The specific responsibilities of each role depend on the company, and there is often overlap. + +What are the most important reliability lessons you’ve learned so far? + +* Don’t leave SRE aspects as an afterthought. It’s much better to discuss automation, monitoring, SLIs, and SLOs early on. Traditional sysadmins often installed systems manually, but today, we do everything via infrastructure as code-using tools like Terraform or Puppet. +* I also distinguish between monitoring and observability. Monitoring tells us, 'The server is down, alarm!' Observability dives deeper, showing trends like increasing latency so we can act proactively. +* SLI, SLO, and SLA are core elements. We focus on what users actually experience-for example, how quickly an email is sent-and set our goals accordingly. +* Runbooks are also crucial. When something goes wrong at night, you don’t want to start from scratch. A runbook outlines how to debug and resolve specific problems, saving time and reducing downtime. + +## Anecdotes and Best Practices + +Runbooks sound very practical. Can you explain how they’re used day-to-day? + +> Runbooks are essentially guides for handling specific incidents. For instance, if a service won’t start, the runbook will specify where the logs are and which commands to use. Observability takes it a step further, helping us spot changes early-like rising error rates or latency-so we can address issues before they escalate. + +When should you decide to put something into a runbook, and when is it unnecessary? + +> If an issue happens frequently, it should be documented in a runbook so that anyone, even someone new, can follow the steps to fix it. The idea is that 90% of the common incidents should be covered. For example, if a service is down, the runbook would specify where to find logs, which commands to check, and what actions to take. On the other hand, rare or complex issues, where the resolution depends heavily on context or varies each time, don’t make sense to include in detail. For those, it’s better to focus on general troubleshooting steps. + +How do you search for and find the correct runbooks? + +> Runbooks should be linked directly in the alert you receive. For example, if you get an alert about a service not running, the alert will have a link to the runbook that tells you what to check, like logs or commands to run. Runbooks are best stored in an internal wiki, so if you don’t find the link in the alert, you know where to search. The important thing is that runbooks are easy to find and up to date because that’s what makes them useful during incidents. + +Do you have an interesting war story you can share with us? + +> Sure. At 1&1, we had a proprietary ad server software that ran a SQL query during startup. The query got slower over time, eventually timing out and preventing the server from starting. Since we couldn’t access the source code, we searched the binary for the SQL and patched it. By pinpointing the issue, a developer was able to adjust the SQL. This collaboration between sysadmin and developer perspectives highlights the value of SRE work. + +## Working with Different Teams + +You’re embedded in a team-how does collaboration with developers work practically? + +> We plan everything together from the start. If there’s a new feature, we discuss infrastructure, automated deployments, and monitoring right away. Developers are experts in the code, and I bring the infrastructure expertise. This avoids unpleasant surprises before going live. + +How about working with data scientists or ML engineers? Are there differences? + +> The principles are the same. ML models also need to be deployed and monitored. You deal with monitoring, resource allocation, and identifying performance drops. Whether it’s a microservice or an ML job, at the end of the day, it’s all running on servers or clusters that must remain stable. + +What about working with managers or the FinOps team? + +> We often discuss costs, especially in the cloud, where scaling up resources is easy. It’s crucial to know our metrics: do we have enough capacity? Do we need all instances? Or is the CPU only at 5% utilization? This data helps managers decide whether the budget is sufficient or if optimizations are needed. + +Do you have practical tips for working with SREs? + +> Yes, I have a few: + +* Early involvement: Include SREs from the beginning in your project. +* Runbooks & documentation: Document recurring errors. +* Try first: Try to understand the issue yourself before immediately asking the SRE. +* Basic infra knowledge: Kubernetes and Terraform aren’t magic. Some basic understanding helps every developer. + +## Using AI Tools + +Let’s talk about AI. How do you use it in your daily work? + +> For boilerplate code, like Terraform snippets, I often use ChatGPT. It saves time, although I always review and adjust the output. Log analysis is another exciting application. Instead of manually going through millions of lines, AI can summarize key outliers or errors. + +Do you think AI could largely replace SREs or significantly change the role? + +> I see AI as an additional tool. SRE requires a deep understanding of how distributed systems work internally. While AI can assist with routine tasks or quickly detect anomalies, human expertise is indispensable for complex issues. + +## SRE Learning Resources + +What resources would you recommend for learning about SRE? + +> The Google SRE book is a classic, though a bit dry. I really like 'Seeking SRE,' as it offers various perspectives on SRE, with many practical stories from different companies. + +[https://sre.google/books/](https://sre.google/books/) +[Seeking SRE](https://www.oreilly.com/library/view/seeking-sre/9781491978856) + +Do you have a podcast recommendation? + +> The Google SRE prodcast is quite interesting. It offers insights into how Google approaches SRE, along with perspectives from external guests. + +[https://sre.google/prodcast/](https://sre.google/prodcast/) + +## Blogging + +You also have a blog. What motivates you to write regularly? + +> Writing helps me learn the most. It also serves as a personal reference. Sometimes I look up how I solved a problem a year ago. And of course, others tackling similar projects might find inspiration in my posts. + +What do you blog about? + +> Mostly technical topics I find exciting, like homelab projects, Kubernetes, or book summaries on IT and productivity. It’s a personal blog, so I write about what I enjoy. + +## Wrap-up + +To wrap up, what are three things every team should keep in mind for stability? + +> First, maintain runbooks and documentation to avoid chaos at night. Second, automate everything-manual installs in production are risky. Third, define SLIs, SLOs, and SLAs early so everyone knows what we’re monitoring and guaranteeing. + +Is there a motto or mindset that particularly inspires you as an SRE? + +> "Keep it simple and stupid"-KISS. Not everything has to be overly complex. And always stay curious. I’m still fascinated by how systems work under the hood. + +Where can people find you online? + +> You can find links to my socials on my website paul.buetow.org +> I regularly post articles and link to everything else I’m working on outside of work. + +[https://paul.buetow.org](https://paul.buetow.org) + +Thank you very much for your time and this insightful interview into the world of site reliability engineering + +> My pleasure, this was fun. + +## Closing comments + +Dear reader, I hope this conversation with Paul Bütow provided an exciting peak into the world of Site Reliability Engineering. Whether you’re a software developer, data scientist, ML engineer, or manager, reliable systems are always a team effort. Hopefully, you’ve taken some insights or tips from Paul’s experiences for your own team or next project. Thanks for joining us, and best of luck refining your own SRE practices! + +E-Mail your comments to `paul@nospam.buetow.org` or contact Florian via the Cracking AI Engineering :-) + +[Back to the main site](../) diff --git a/gemfeed/2025-02-01-f3s-kubernetes-with-freebsd-part-3.md b/gemfeed/2025-02-01-f3s-kubernetes-with-freebsd-part-3.md new file mode 100644 index 00000000..b129dc50 --- /dev/null +++ b/gemfeed/2025-02-01-f3s-kubernetes-with-freebsd-part-3.md @@ -0,0 +1,366 @@ +# f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts + +> Published at 2025-01-30T09:22:06+02:00 + +This is the third blog post about my f3s series for my self-hosting demands in my home lab. f3s? The "f" stands for FreeBSD, and the "3s" stands for k3s, the Kubernetes distribution we will use on FreeBSD-based physical machines. + +[2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage](./2024-11-17-f3s-kubernetes-with-freebsd-part-1.md) +[2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation](./2024-12-03-f3s-kubernetes-with-freebsd-part-2.md) +[2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts (You are currently reading this)](./2025-02-01-f3s-kubernetes-with-freebsd-part-3.md) + +[](./f3s-kubernetes-with-freebsd-part-1/f3slogo.png) + +## Table of Contents + +* [⇢ f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts](#f3s-kubernetes-with-freebsd---part-3-protecting-from-power-cuts) +* [⇢ ⇢ Introduction](#introduction) +* [⇢ ⇢ Changes since last time](#changes-since-last-time) +* [⇢ ⇢ ⇢ FreeBSD upgrade from 14.1 to 14.2](#freebsd-upgrade-from-141-to-142) +* [⇢ ⇢ ⇢ A new home (behind the TV)](#a-new-home-behind-the-tv) +* [⇢ ⇢ The UPS hardware](#the-ups-hardware) +* [⇢ ⇢ Configuring FreeBSD to Work with the UPS](#configuring-freebsd-to-work-with-the-ups) +* [⇢ ⇢ ⇢ USB Device Detection](#usb-device-detection) +* [⇢ ⇢ ⇢ `apcupsd` Installation](#apcupsd-installation) +* [⇢ ⇢ ⇢ UPS Connectivity Test](#ups-connectivity-test) +* [⇢ ⇢ APC Info on Partner Nodes:](#apc-info-on-partner-nodes) +* [⇢ ⇢ ⇢ Installation on partners](#installation-on-partners) +* [⇢ ⇢ Power outage simulation](#power-outage-simulation) +* [⇢ ⇢ ⇢ Pulling the plug](#pulling-the-plug) +* [⇢ ⇢ ⇢ Restoring power](#restoring-power) + +## Introduction + +In this blog post, we are setting up the UPS for the cluster. A UPS, or Uninterruptible Power Supply, safeguards my cluster from unexpected power outages and surges. It acts as a backup battery that kicks in when the electricity cuts out—especially useful in my area, where power cuts are frequent—allowing for a graceful system shutdown and preventing data loss and corruption. This is especially important since I will also store some of my data on the f3s nodes. + +## Changes since last time + +### FreeBSD upgrade from 14.1 to 14.2 + +There has been a new release since the last blog post in this series. The upgrade from 14.1 was as easy as: + +```sh +paul@f0: ~ % doas freebsd-update fetch +paul@f0: ~ % doas freebsd-update install +paul@f0: ~ % doas freebsd-update -r 14.2-RELEASE upgrade +paul@f0: ~ % doas freebsd-update install +paul@f0: ~ % doas shutdown -r now +``` + +And after rebooting, I ran: + +```sh +paul@f0: ~ % doas freebsd-update install +paul@f0: ~ % doas pkg update +paul@f0: ~ % doas pkg upgrade +paul@f0: ~ % doas shutdown -r now +``` + +And after another reboot, I was on 14.2: + +```sh +paul@f0:~ % uname -a +FreeBSD f0.lan.buetow.org 14.2-RELEASE FreeBSD 14.2-RELEASE + releng/14.2-n269506-c8918d6c7412 GENERIC amd64 +``` + +And, of course, I ran this on all 3 nodes! + +### A new home (behind the TV) + +I've put all the infrastructure behind my TV, as plenty of space is available. The TV hides most of the setup, which drastically improved the SAF (spouse acceptance factor). + +[](./f3s-kubernetes-with-freebsd-part-3/f3s-changes.jpg) + +I got rid of the mini-switch I mentioned in the previous blog post. I have the TP-Link EAP615-Wall mounted on the wall nearby, which is my OpenWrt-powered Wi-Fi hotspot. It also has 3 Ethernet ports, to which I connected the Beelink nodes. That's the device you see at the very top. + +The Ethernet cables go downward through the cable boxes to the Beelink nodes. In addition to the Beelink f3s nodes, I connected the TP-Link to the UPS as well (not discussed further in this blog post, but the positive side effect is that my Wi-Fi will still work during a power loss for some time—and during a power cut, the Beelink nodes will still be able to communicate with each other). + +On the very left (the black box) is the UPS, with four power outlets. Three go to the Beelink nodes, and one goes to the TP-Link. A USB output is also connected to the first Beelink node, `f0`. + +On the very right (halfway hidden behind the TV) are the 3 Beelink nodes stacked on top of each other. The only downside (or upside?) is that my 14-month-old daughter is now chaos-testing the Beelink nodes, as the red power buttons (now reachable for her) are very attractive for her to press when passing by randomly. :-) Luckily, that will only cause graceful system shutdowns! + +## The UPS hardware + +I wanted a UPS that I could connect to via FreeBSD, and that would provide enough backup power to operate the cluster for a couple of minutes (it turned out to be around an hour, but this time will likely be shortened after future hardware upgrades, like additional drives and a backup enclosure) and to automatically initiate the shutdown of all the f3s nodes. + +I decided on the APC Back-UPS BX750MI model because: + +* Zero noise level when there is no power cut (some light noise when the battery is in operation during a power cut). +* Cost: It is relatively affordable (not costing thousands). +* USB connectivity: Can be connected via USB to one of the FreeBSD hosts to read the UPS status. +* A power output of 750VA (or 410 watts), suitable for an hour of runtime for my f3s nodes (plus the Wi-Fi router). +* Multiple power outlets: Can connect all 3 f3s nodes directly. +* User-replaceable batteries: I can replace the batteries myself after two years or more (depending on usage). +* Its compact design. Overall, I like how it looks. + +[](./f3s-kubernetes-with-freebsd-part-3/apc-back-ups.jpg) + +## Configuring FreeBSD to Work with the UPS + +### USB Device Detection + +Once plugged in via USB on FreeBSD, I could see the following in the kernel messages: + +```sh +paul@f0: ~ % doas dmesg | grep UPS +ugen0.2: <American Power Conversion Back-UPS BX750MI> at usbus0 +``` + +### `apcupsd` Installation + +To make use of the USB connection, the `apcupsd` package had to be installed: + +```sh +paul@f0: ~ % doas install apcupsd +``` + +I have made the following modifications to the configuration file so that the UPS can be used via the USB interface: + +```sh +paul@f0:/usr/local/etc/apcupsd % diff -u apcupsd.conf.sample apcupsd.conf +--- apcupsd.conf.sample 2024-11-01 16:40:42.000000000 +0200 ++++ apcupsd.conf 2024-12-03 10:58:24.009501000 +0200 +@@ -31,7 +31,7 @@ + # 940-1524C, 940-0024G, 940-0095A, 940-0095B, + # 940-0095C, 940-0625A, M-04-02-2000 + # +-UPSCABLE smart ++UPSCABLE usb + + # To get apcupsd to work, in addition to defining the cable + # above, you must also define a UPSTYPE, which corresponds to +@@ -88,8 +88,10 @@ + # that apcupsd binds to that particular unit + # (helpful if you have more than one USB UPS). + # +-UPSTYPE apcsmart +-DEVICE /dev/usv ++UPSTYPE usb ++DEVICE + + # POLLTIME <int> + # Interval (in seconds) at which apcupsd polls the UPS for status. This +``` + +I left the remaining settings as the default ones; for example, the following are of main interest: + +``` +# If during a power failure, the remaining battery percentage +# (as reported by the UPS) is below or equal to BATTERYLEVEL, +# apcupsd will initiate a system shutdown. +BATTERYLEVEL 5 + +# If during a power failure, the remaining runtime in minutes +# (as calculated internally by the UPS) is below or equal to MINUTES, +# apcupsd, will initiate a system shutdown. +MINUTES 3 +``` + +I then enabled and started the daemon: + +```sh +paul@f0:/usr/local/etc/apcupsd % doas sysrc apcupsd_enable=YES +apcupsd_enable: -> YES +paul@f0:/usr/local/etc/apcupsd % doas service apcupsd start +Starting apcupsd. +``` + +### UPS Connectivity Test + +And voila, I could now access the UPS information via the `apcaccess` command; how convenient :-) (I also read through the manual page, which provides a good understanding of what else can be done with it!). + +```sh +paul@f0:~ % apcaccess +APC : 001,035,0857 +DATE : 2025-01-26 14:43:27 +0200 +HOSTNAME : f0.lan.buetow.org +VERSION : 3.14.14 (31 May 2016) freebsd +UPSNAME : f0.lan.buetow.org +CABLE : USB Cable +DRIVER : USB UPS Driver +UPSMODE : Stand Alone +STARTTIME: 2025-01-26 14:43:25 +0200 +MODEL : Back-UPS BX750MI +STATUS : ONLINE +LINEV : 230.0 Volts +LOADPCT : 4.0 Percent +BCHARGE : 100.0 Percent +TIMELEFT : 65.3 Minutes +MBATTCHG : 5 Percent +MINTIMEL : 3 Minutes +MAXTIME : 0 Seconds +SENSE : Medium +LOTRANS : 145.0 Volts +HITRANS : 295.0 Volts +ALARMDEL : No alarm +BATTV : 13.6 Volts +LASTXFER : Automatic or explicit self test +NUMXFERS : 0 +TONBATT : 0 Seconds +CUMONBATT: 0 Seconds +XOFFBATT : N/A +SELFTEST : NG +STATFLAG : 0x05000008 +SERIALNO : 9B2414A03599 +BATTDATE : 2001-01-01 +NOMINV : 230 Volts +NOMBATTV : 12.0 Volts +NOMPOWER : 410 Watts +END APC : 2025-01-26 14:44:06 +0200 +``` + +## APC Info on Partner Nodes: + +So far, so good. Host `f0` would shut down itself when short on power. But what about the `f1` and `f2` nodes? They aren't connected directly to the UPS and, therefore, wouldn't know that their power is about to be cut off. For this, `apcupsd` running on the `f1` and `f2` nodes can be configured to retrieve UPS information via the network from the `apcupsd` server running on the `f0` node, which is connected directly to the APC via USB. + +Of course, this won't work when `f0` is down. In this case, no operational node would be connected to the UPS via USB; therefore, the current power status would not be known. However, I consider this a rare circumstance. Furthermore, in case of an `f0` system crash, sudden power outages on the two other nodes would occur at different times making real data loss (the main concern here) less likely. + +And if `f0` is down and `f1` and `f2` receive new data and crash midway, it's likely that a client (e.g., an Android app or another laptop) still has the data stored on it, making data recoverable and data loss overall nearly impossible. I'd receive an alert if any of the nodes go down (more on monitoring later in this blog series). + +### Installation on partners + +To do this, I installed `apcupsd` via `doas pkg install apcupsd` on `f1` and `f2`, and then I could connect to it this way: + +```sh +paul@f1:~ % apcaccess -h f0.lan.buetow.org | grep Percent +LOADPCT : 12.0 Percent +BCHARGE : 94.0 Percent +MBATTCHG : 5 Percent +``` + +But I want the daemon to be configured and enabled in such a way that it connects to the master UPS node (the one with the UPS connected via USB) so that it can also initiate a system shutdown when the UPS battery reaches low levels. For that, `apcupsd` itself needs to be aware of the UPS status. + +On `f1` and `f2`, I changed the configuration to use `f0` (where `apcupsd` is listening) as a remote device. I also changed the `MINUTES` setting from 3 to 6 and the `BATTERYLEVEL` setting from 5 to 10 to ensure that the `f1` and `f2` nodes could still connect to the `f0` node for UPS information before `f0` decides to shut down itself. So `f1` and `f2` must shut down earlier than `f0`: + +```sh +paul@f2:/usr/local/etc/apcupsd % diff -u apcupsd.conf.sample apcupsd.conf +--- apcupsd.conf.sample 2024-11-01 16:40:42.000000000 +0200 ++++ apcupsd.conf 2025-01-26 15:52:45.108469000 +0200 +@@ -31,7 +31,7 @@ + # 940-1524C, 940-0024G, 940-0095A, 940-0095B, + # 940-0095C, 940-0625A, M-04-02-2000 + # +-UPSCABLE smart ++UPSCABLE ether + + # To get apcupsd to work, in addition to defining the cable + # above, you must also define a UPSTYPE, which corresponds to +@@ -52,7 +52,6 @@ + # Network Information Server. This is used if the + # UPS powering your computer is connected to a + # different computer for monitoring. +-# + # snmp hostname:port:vendor:community + # SNMP network link to an SNMP-enabled UPS device. + # Hostname is the ip address or hostname of the UPS +@@ -88,8 +87,8 @@ + # that apcupsd binds to that particular unit + # (helpful if you have more than one USB UPS). + # +-UPSTYPE apcsmart +-DEVICE /dev/usv ++UPSTYPE net ++DEVICE f0.lan.buetow.org:3551 + + # POLLTIME <int> + # Interval (in seconds) at which apcupsd polls the UPS for status. This +@@ -147,12 +146,12 @@ + # If during a power failure, the remaining battery percentage + # (as reported by the UPS) is below or equal to BATTERYLEVEL, + # apcupsd will initiate a system shutdown. +-BATTERYLEVEL 5 ++BATTERYLEVEL 10 + + # If during a power failure, the remaining runtime in minutes + # (as calculated internally by the UPS) is below or equal to MINUTES, + # apcupsd, will initiate a system shutdown. +-MINUTES 3 ++MINUTES 6 + + # If during a power failure, the UPS has run on batteries for TIMEOUT + # many seconds or longer, apcupsd will initiate a system shutdown. + +``` +So I also ran the following commands on `f1` and `f2`: + +```sh +paul@f1:/usr/local/etc/apcupsd % doas sysrc apcupsd_enable=YES +apcupsd_enable: -> YES +paul@f1:/usr/local/etc/apcupsd % doas service apcupsd start +Starting apcupsd. +``` + +And then I was able to connect to localhost via the `apcaccess` command: + +```sh +paul@f1:~ % doas apcaccess | grep Percent +LOADPCT : 5.0 Percent +BCHARGE : 95.0 Percent +MBATTCHG : 5 Percent +``` + +## Power outage simulation + +### Pulling the plug + +I simulated a power outage by removing the power input from the APC. Immediately, the following message appeared on all the nodes: + +```` +Broadcast Message from root@f0.lan.buetow.org + (no tty) at 15:03 EET... + +Power failure. Running on UPS batteries. +``` + +I ran the following command to confirm the available battery time: + +```sh +paul@f0:/usr/local/etc/apcupsd % apcaccess -p TIMELEFT +63.9 Minutes +``` + +And after around one hour (`f1` and `f2` a bit earlier, `f0` a bit later due to the different `BATTERYLEVEL` and `MINUTES` settings outlined earlier), the following broadcast was sent out: + +``` +Broadcast Message from root@f0.lan.buetow.org + (no tty) at 15:08 EET... + + *** FINAL System shutdown message from root@f0.lan.buetow.org *** + +System going down IMMEDIATELY + +apcupsd initiated shutdown +``` + +And all the nodes shut down safely before the UPS ran out of battery! + +### Restoring power + +After restoring power, I checked the logs in `/var/log/daemon.log` and found the following on all 3 nodes: + +``` +Jan 26 17:36:24 f2 apcupsd[2159]: Power failure. +Jan 26 17:36:30 f2 apcupsd[2159]: Running on UPS batteries. +Jan 26 17:36:30 f2 apcupsd[2159]: Battery charge below low limit. +Jan 26 17:36:30 f2 apcupsd[2159]: Initiating system shutdown! +Jan 26 17:36:30 f2 apcupsd[2159]: User logins prohibited +Jan 26 17:36:32 f2 apcupsd[2159]: apcupsd exiting, signal 15 +Jan 26 17:36:32 f2 apcupsd[2159]: apcupsd shutdown succeeded +``` + +All good :-) See you in the next post of this series! + +Other BSD related posts are: + +[2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts (You are currently reading this)](./2025-02-01-f3s-kubernetes-with-freebsd-part-3.md) +[2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation](./2024-12-03-f3s-kubernetes-with-freebsd-part-2.md) +[2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage](./2024-11-17-f3s-kubernetes-with-freebsd-part-1.md) +[2024-04-01 KISS high-availability with OpenBSD](./2024-04-01-KISS-high-availability-with-OpenBSD.md) +[2024-01-13 One reason why I love OpenBSD](./2024-01-13-one-reason-why-i-love-openbsd.md) +[2022-10-30 Installing DTail on OpenBSD](./2022-10-30-installing-dtail-on-openbsd.md) +[2022-07-30 Let's Encrypt with OpenBSD and Rex](./2022-07-30-lets-encrypt-with-openbsd-and-rex.md) +[2016-04-09 Jails and ZFS with Puppet on FreeBSD](./2016-04-09-jails-and-zfs-on-freebsd-with-puppet.md) + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +[Back to the main site](../) diff --git a/gemfeed/2025-02-08-random-weird-things-ii.md b/gemfeed/2025-02-08-random-weird-things-ii.md new file mode 100644 index 00000000..00d7100e --- /dev/null +++ b/gemfeed/2025-02-08-random-weird-things-ii.md @@ -0,0 +1,251 @@ +# Random Weird Things - Part Ⅱ + +> Published at 2025-02-08T11:06:16+02:00 + +Every so often, I come across random, weird, and unexpected things on the internet. I thought it would be neat to share them here from time to time. This is the second run. + +[2024-07-05 Random Weird Things - Part Ⅰ](./2024-07-05-random-weird-things.md) +[2025-02-08 Random Weird Things - Part Ⅱ (You are currently reading this)](./2025-02-08-random-weird-things-ii.md) + +``` +/\_/\ /\_/\ +( o.o ) WHOA!! ( o.o ) +> ^ < > ^ < +/ \ MOEEW! / \ +/______\ /______\ +``` + +## Table of Contents + +* [⇢ Random Weird Things - Part Ⅱ](#random-weird-things---part-) +* [⇢ ⇢ 11. The SQLite codebase is a gem](#11-the-sqlite-codebase-is-a-gem) +* [⇢ ⇢ Go Programming](#go-programming) +* [⇢ ⇢ ⇢ 12. Official Go font](#12-official-go-font) +* [⇢ ⇢ ⇢ 13. Go functions can have methods](#13-go-functions-can-have-methods) +* [⇢ ⇢ macOS](#macos) +* [⇢ ⇢ ⇢ 14. ß and ss are treated the same](#14--and-ss-are-treated-the-same) +* [⇢ ⇢ ⇢ 15. Colon as file path separator](#15-colon-as-file-path-separator) +* [⇢ ⇢ 16. Polyglots - programs written in multiple languages](#16-polyglots---programs-written-in-multiple-languages) +* [⇢ ⇢ 17. Languages, where indices start at 1](#17-languages-where-indices-start-at-1) +* [⇢ ⇢ 18. Perl Poetry](#18-perl-poetry) +* [⇢ ⇢ 19. CSS3 is turing complete](#19-css3-is-turing-complete) +* [⇢ ⇢ 20. The biggest shell programs ](#20-the-biggest-shell-programs-) + +## 11. The SQLite codebase is a gem + +Check this out: + +[](./random-weird-things-ii/sqlite-gem.png) + +Source: + +[https://wetdry.world/@memes/112717700557038278](https://wetdry.world/@memes/112717700557038278) + +## Go Programming + +### 12. Official Go font + +The Go programming language has an official font called "Go Font." It was created to complement the aesthetic of the Go language, ensuring clear and legible rendering of code. The font includes a monospace version for code and a proportional version for general text, supporting consistent look and readability in Go-related materials and development environments. + +Check out some Go code displayed using the Go font: + +[](./random-weird-things-ii/go-font-code.png) + +[https://go.dev/blog/go-fonts](https://go.dev/blog/go-fonts) + +The design emphasizes simplicity and readability, reflecting Go's philosophy of clarity and efficiency. + +I found it interesting and/or weird, as Go is a programming language. Why should it bother having its own font? I have never seen another open-source project like Go do this. But I also like it. Maybe I will use it in the future for this blog :-) + +### 13. Go functions can have methods + +Functions on struct types? Well, know. Functions on types like `int` and `string`? It's also known of, but a bit lesser. Functions on function types? That sounds a bit funky, but it's possible, too! For demonstration, have a look at this snippet: + +```go +package main + +import "log" + +type fun func() string + +func (f fun) Bar() string { + return "Bar" +} + +func main() { + var f fun = func() string { + return "Foo" + } + log.Println("Example 1: ", f()) + log.Println("Example 2: ", f.Bar()) + log.Println("Example 3: ", fun(f.Bar).Bar()) + log.Println("Example 4: ", fun(fun(f.Bar).Bar).Bar()) +} +``` + +It runs just fine: + +```sh +❯ go run main.go +2025/02/07 22:56:14 Example 1: Foo +2025/02/07 22:56:14 Example 2: Bar +2025/02/07 22:56:14 Example 3: Bar +2025/02/07 22:56:14 Example 4: Bar +``` + +## macOS + +For personal computing, I don't use Apple, but I have to use it for work. + +### 14. ß and ss are treated the same + +Know German? In German, the letter "sarp s" is written as ß. ß is treated the same as ss on macOS. + +On a case-insensitive file system like macOS, not only are uppercase and lowercase letters treated the same, but non-Latin characters like the German "ß" are also considered equivalent to their Latin counterparts (in this case, "ss"). + +So, even though "Maß" and "Mass" are not strictly equivalent, the macOS file system still treats them as the same filename due to its handling of Unicode characters. This can sometimes lead to unexpected behaviour. Check this out: + +```sh +❯ touch Maß +❯ ls -l +-rw-r--r--@ 1 paul wheel 0 Feb 7 23:02 Maß +❯ touch Mass +❯ ls -l +-rw-r--r--@ 1 paul wheel 0 Feb 7 23:02 Maß +❯ rm Mass +❯ ls -l + +❯ touch Mass +❯ ls -ltr +-rw-r--r--@ 1 paul wheel 0 Feb 7 23:02 Mass +❯ rm Maß +❯ ls -l + +``` + +### 15. Colon as file path separator + +MacOS can use the colon as a file path separator on its ADFS (file system). A typical ADFS file pathname on a hard disc might be: + +``` +ADFS::4.$.Documents.Techwriter.Myfile +``` + +I can't reproduce this on my (work) Mac, though, as it now uses the APFS file system. In essence, ADFS is an older file system, while APFS is a contemporary file system optimized for Apple's modern devices. + +[https://social.jvns.ca/@b0rk/113041293527832730](https://social.jvns.ca/@b0rk/113041293527832730) + +## 16. Polyglots - programs written in multiple languages + +A coding polyglot is a program or script written so that it can be executed in multiple programming languages without modification. This is typically achieved by leveraging syntax overlaps or crafting valid and meaningful code in each targeted language. Polyglot programs are often created as a challenge or for demonstration purposes to showcase language similarities or clever coding techniques. + +Check out my very own polyglot: + +[The `fibonatti.pl.c` Polyglot](./2014-03-24-the-fibonacci.pl.c-polyglot.md) + +## 17. Languages, where indices start at 1 + +Array indices start at 1 instead of 0 in some programming languages, known as one-based indexing. This can be controversial because zero-based indexing is more common in popular languages like C, C++, Java, and Python. One-based indexing can lead to off-by-one errors when developers switch between languages with different indexing schemes. + +Languages with One-Based Indexing: + +* Fortran +* MATLAB +* Lua +* R (for vectors and lists) +* Smalltalk +* Julia (by default, although zero-based indexing is also possible) + +`foo.lua` example: + +```lua +arr = {10, 20, 30, 40, 50} +print(arr[1]) -- Accessing the first element +```` + +```sh +❯ lua foo.lua +10 +``` + +One-based indexing is more natural for human-readable, mathematical, and theoretical contexts, where counting traditionally starts from one. + +## 18. Perl Poetry + +Perl Poetry is a playful and creative practice within the programming community where Perl code is written as a poem. These poems are crafted to be syntactically valid Perl code and make sense as poetic text, often with whimsical or humorous intent. This showcases Perl's flexibility and expressiveness, as well as the creativity of its programmers. + +See this Poetry of my own; the Perl interpreter does not yield any syntax error parsing that. But also, the Peom doesn't do anything useful then executed: + +```perl +# (C) 2006 by Paul C. Buetow + +Christmas:{time;#!!! + +Children: do tell $wishes; + +Santa: for $each (@children) { +BEGIN { read $each, $their, wishes and study them; use Memoize#ing + +} use constant gift, 'wrapping'; +package Gifts; pack $each, gift and bless $each and goto deliver +or do import if not local $available,!!! HO, HO, HO; + +redo Santa, pipe $gifts, to_childs; +redo Santa and do return if last one, is, delivered; + +deliver: gift and require diagnostics if our $gifts ,not break; +do{ use NEXT; time; tied $gifts} if broken and dump the, broken, ones; +The_children: sleep and wait for (each %gift) and try { to => untie $gifts }; + +redo Santa, pipe $gifts, to_childs; +redo Santa and do return if last one, is, delivered; + +The_christmas_tree: formline s/ /childrens/, $gifts; +alarm and warn if not exists $Christmas{ tree}, @t, $ENV{HOME}; +write <<EMail + to the parents to buy a new christmas tree!!!!111 + and send the +EMail +;wait and redo deliver until defined local $tree; + +redo Santa, pipe $gifts, to_childs; +redo Santa and do return if last one, is, delivered ;} + +END {} our $mission and do sleep until next Christmas ;} + +__END__ + +This is perl, v5.8.8 built for i386-freebsd-64int +``` + +[More Perl Poetry of mine](./2008-06-26-perl-poetry.md) + +## 19. CSS3 is turing complete + +CSS3 is Turing complete because it can simulate a Turing machine using only CSS animations and styles without any JavaScript or external logic. This is achieved by using keyframe animations to change the styles of HTML elements in a way that encodes computation, performing calculations and state transitions. + +[Is CSS turing complete?](https://stackoverflow.com/questions/2497146/is-css-turing-complete) + +It is surprising because CSS is primarily a styling language intended for the presentation layer of web pages, not for computation or logic. Its capability to perform complex computations defies its typical use case and showcases the unintended computational power that can emerge from the creative use of seemingly straightforward technologies. + +Check out this 100% CSS implementation of the Conways Game of Life: + +[](./random-weird-things-ii/css-conway.png) + +[CSS Conways Game of Life](https://github.com/propjockey/css-conways-game-of-life) + +Conway's Game of Life is Turing complete because it can simulate a universal Turing machine, meaning it can perform any computation that a computer can, given the right initial conditions and sufficient time and space. Suppose a language can implement Conway's Game of Life. In that case, it demonstrates the language's ability to handle complex state transitions and computations. It has the necessary constructs (like iteration, conditionals, and data manipulation) to simulate any algorithm, thus confirming its Turing completeness. + +## 20. The biggest shell programs + +One would think that shell scripts are only suitable for small tasks. Well, I must be wrong, as there are huge shell programs out there (up to 87k LOC) which aren't auto-generated but hand-written! + +[The Biggest Sell Programs in the World](https://github.com/oils-for-unix/oils/wiki/The-Biggest-Shell-Programs-in-the-World) + +My Gemtexter (bash) is only 1329 LOC as of now. So it's tiny. + +[Gemtexter - One Bash script to rule it all](./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md) + +I hope you had some fun. E-Mail your comments to `paul@nospam.buetow.org` :-) + +[Back to the main site](../) diff --git a/gemfeed/4 b/gemfeed/4 new file mode 100644 index 00000000..f4c59789 --- /dev/null +++ b/gemfeed/4 @@ -0,0 +1,239 @@ +# f3s: Kubernetes with FreeBSD - Rocky Linux Bhyve VMs - Part 3 + +This is the third blog post about my f3s series for my self-hosting demands in my home lab. f3s? The "f" stands for FreeBSD, and the "3s" stands for k3s, the Kubernetes distribution we will use on FreeBSD-based physical machines. + +<< template::inline::index f3s-kubernetes-with-freebsd-part + +=> ./f3s-kubernetes-with-frhyveeebsd-part-1/f3slogo.png f3s logo + +<< template::inline::toc + +## Introduction + +In this blog post, we are going to install the Bhyve hypervisor. + +The FreeBSD Bhyve hypervisor is a lightweight, modern hypervisor that enables virtualization on FreeBSD systems. Bhyve's strengths include its minimal overhead, which allows it to achieve near-native performance for virtual machines. It is designed to be efficient and lightweight, leveraging the capabilities of the FreeBSD operating system for performance and network management. + +Bhyve supports running a variety of guest operating systems, including FreeBSD, Linux, and Windows, on hardware platforms that support hardware virtualization extensions (such as Intel VT-x or AMD-V). In our case, we are going to virtualize Rocky Linux, which later on in this series will be used to run k3s. + +## Basic Bhyve setup + +For the management of the Bhyve VMs, we are using `vm-bhyve`, a tool not part of the FreeBSD operating system but available as a ready-to-use package. It eases VM management and reduces a lot of the overhead. We also install the required package to make Bhyve work with the UEFI firmware. + +=> https://github.com/churchers/vm-bhyve + +The following commands are executed on all three hosts `f0`, `f1`, and `f2`, where `re0` is the name of the Ethernet interface (which may need to be adjusted if your hardware is different): + +```sh +paul@f0:~ % doas pkg install vm-bhyve bhyve-firmware +paul@f0:~ % doas sysrc vm_enable=YES +vm_enable: -> YES +paul@f0:~ % doas sysrc vm_dir=zfs:zroot/bhyve +vm_dir: -> zfs:zroot/bhyve +paul@f0:~ % doas zfs create zroot/bhyve +paul@f0:~ % doas vm init +paul@f0:~ % doas vm switch create public +paul@f0:~ % doas vm switch add public re0 +``` + +Bhyve stores all it's data in the `/bhyve` of the `zroot` ZFS pool: + +```sh +paul@f0:~ % zfs list | grep bhyve +zroot/bhyve 1.74M 453G 1.74M /zroot/bhyve +``` + +For convenience, we also create this symlink: + +```sh +paul@f0:~ % doas ln -s /zroot/bhyve/ /bhyve + +``` + +Now, Bhyve is ready to rumble, but no VMs are there yet: + +```sh +paul@f0:~ % doas vm list +NAME DATASTORE LOADER CPU MEMORY VNC AUTO STATE +``` + +## Rocky Linux VMs + +### ISO download + +We're going to install the Rocky Linux from the latest minimal iso: + +```sh +paul@f0:~ % doas vm iso \ + https://download.rockylinux.org/pub/rocky/9/isos/x86_64/Rocky-9.5-x86_64-minimal.iso +/zroot/bhyve/.iso/Rocky-9.5-x86_64-minimal.iso 1808 MB 4780 kBps 06m28s +paul@f0:/bhyve % doas vm create rocky +``` +### VM configuration + +The default configuration looks like this now: + +```sh +paul@f0:/bhyve/rocky % cat rocky.conf +loader="bhyveload" +cpu=1 +memory=256M +network0_type="virtio-net" +network0_switch="public" +disk0_type="virtio-blk" +disk0_name="disk0.img" +uuid="1c4655ac-c828-11ef-a920-e8ff1ed71ca0" +network0_mac="58:9c:fc:0d:13:3f" +``` + +Whereas the `uuid` and the `network0_mac` differ on each of the 3 hosts. + +but in order to make Rocky Linux boot it (plus some other adjustments, e.g. as I am intending to run the majority of the workload in the k3s cluster running on those linux VMs, I give them beefy specs like 4 CPU cores and 14GB RAM), I run `doas vm configure rocky` and modified it to: + +``` +guest="linux" +loader="uefi" +uefi_vars="yes" +cpu=4 +memory=14G +network0_type="virtio-net" +network0_switch="public" +disk0_type="virtio-blk" +disk0_name="disk0.img" +graphics="yes" +graphics_vga=io +uuid="1c45400b-c828-11ef-8871-e8ff1ed71cac" +network0_mac="58:9c:fc:0d:13:3f" +``` + +### VM installation + +To start the installer from the downloaded ISO, I run: + +```sh +paul@f0:~ % doas vm install rocky Rocky-9.5-x86_64-minimal.iso +Starting rocky + * found guest in /zroot/bhyve/rocky + * booting... + +paul@f0:/bhyve/rocky % doas vm list +NAME DATASTORE LOADER CPU MEMORY VNC AUTO STATE +rocky default uefi 4 14G 0.0.0.0:5900 No Locked (f0.lan.buetow.org) + +paul@f0:/bhyve/rocky % doas sockstat -4 | grep 5900 +root bhyve 6079 8 tcp4 *:5900 *:* +``` + +Port 5900 now also opened for VNC connections, so I connected to it with a VNC client and run through the installation dialogs. I'm sure this could be done unattended or more automated, there are only 3 VMs to install, and the automation doesn't seem worth it as we are doing it only once in a year or less often. + +### Increase of the disk image + +By default the VMs disk image is only 20G, which is a bit small for my purposes, so I stopped the VMs again and run `truncate` on the image file to enlarge them to 100G, and re-started the installation: + +```sh +paul@f0:/bhyve/rocky % doas vm stop rocky +paul@f0:/bhyve/rocky % doas truncate -s 100G disk0.img +paul@f0:/bhyve/rocky % doas vm install rocky Rocky-9.5-x86_64-minimal.iso +``` + +### Connect to VPN + +For the installation, I opened the VPN client on my Fedora laptop (GNOME comes with a simple VPN client) and ran through the base installation for each of the VMs manually. Again, I am sure this could have been automated a bit more, but there were just 3 VMs, and it wasn't worth the effort. The three VNC addresses of the VMs were: `vnc://f0:5900`, `vnc://f1:5900`, and `vnc://f0:5900`. + +I mostly selected the default settings (auto partitioning on the 100GB drive and a root user password). After the installation, the VMs were rebooted. + +## After install + +I performed the following steps for all 3 VMs. In the following, the examples are all executed on `f0` (bzw the VM `r0` running on `f0`): + +### VM auto-start after host reboot + +To automatically start the VM on the servers I added the following to the `rc.conf` on the FreeBSD hosts: + +```sh + +paul@f0:/bhyve/rocky % cat <<END | doas tee -a /etc/rc.conf +vm_list="rocky" +vm_delay="5" +``` + +The `vm_delay` isn't really required. It is used to wait 5 seconds before starting each VM, but as of now, there is only one VM per host. Maybe later, when there are more, this will be useful to have. After adding, there's now a `Yes` indicator in the `AUTO` column. + +```sh +paul@f0:~ % doas vm list +NAME DATASTORE LOADER CPU MEMORY VNC AUTO STATE +rocky default uefi 4 14G 0.0.0.0:5900 Yes [1] Running (2063) +``` + +### Static IP configuration + +After that, I changed the network configuration of the VMs to be static (from DHCP) here. As per previous post of this series, the 3 FreeBSD hosts were already in my `/etc/hosts` file: + +``` +192.168.1.130 f0 f0.lan f0.lan.buetow.org +192.168.1.131 f1 f1.lan f1.lan.buetow.org +192.168.1.132 f2 f2.lan f2.lan.buetow.org +``` + +For the Rocky VMs I added those to the FreeBSD hosts systems as well: + +```sh +paul@f0:/bhyve/rocky % cat <<END | doas tee -a /etc/hosts +192.168.1.120 r0 r0.lan r0.lan.buetow.org +192.168.1.121 r1 r1.lan r1.lan.buetow.org +192.168.1.122 r2 r2.lan r2.lan.buetow.org +END +``` + +and configured the IPs accordingly on the VMs themselves by opening a root shell via RDP to the VMs and entering the following commands on each of the VMs: + +```sh +[root@r0 ~] % dnmcli connection modify enp0s5 ipv4.address 192.168.1.120/24 +[root@r0 ~] % dnmcli connection modify enp0s5 ipv4.gateway 192.168.1.1 +[root@r0 ~] % dnmcli connection modify enp0s5 ipv4.dns 192.168.1.1 +[root@r0 ~] % dnmcli connection modify enp0s5 ipv4.method manual +[root@r0 ~] % dnmcli connection down enp0s5 +[root@r0 ~] % dnmcli connection up enp0s5 +[root@r0 ~] % hostnamectl set-hostname r0.lan.buetow.org +[root@r0 ~] % cat <<END >>/etc/hosts +192.168.1.120 r0 r0.lan r0.lan.buetow.org +192.168.1.121 r1 r1.lan r1.lan.buetow.org +192.168.1.122 r2 r2.lan r2.lan.buetow.org +END +```` + +Whereas: + +* `192.168.1.120` is the IP of the VM itself (here: `r0.lan.buetow.org`) +* `192.168.1.1` is the address of my home router, which also does DNS. + +### Permitting root login + +As these VMs arent directly reachable via SSH from the internet, I enabled `root` login by adding a line with `PermitRootLogin yes` to `/etc/sshd/sshd_config`. + +Once done, I rebooted the VM by running `reboot` inside of the vm to test whether everything was configured and persisted correctly. + +After reboot, I copied my public key from my Laptop to the 3 VMs: + +```sh +% for i in 0 1 2; do ssh-copy-id root@r$i.lan.buetow.org; done +``` + +And then I edited the `/etc/ssh/sshd_config` file again on all 3 VMs and configured `PasswordAuthentication no`, to only allow SSH key authentication from now on. + +### Install latest updates + +```sh +[root@r0 ~] % dnf update +[root@r0 ~] % dreboot +``` + +CPU STRESS TESTER VM VS NOT VM + +Other *BSD-related posts: + +<< template::inline::index bsd + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +=> ../ Back to the main site diff --git a/gemfeed/DRAFT-f3s-kubernetes-with-freebsd-part-4.md b/gemfeed/DRAFT-f3s-kubernetes-with-freebsd-part-4.md new file mode 100644 index 00000000..67371b5d --- /dev/null +++ b/gemfeed/DRAFT-f3s-kubernetes-with-freebsd-part-4.md @@ -0,0 +1,279 @@ +# f3s: Kubernetes with FreeBSD - Rocky Linux Bhyve VMs - Part 4 + +This is the thourth blog post about my f3s series for my self-hosting demands in my home lab. f3s? The "f" stands for FreeBSD, and the "3s" stands for k3s, the Kubernetes distribution we will use on FreeBSD-based physical machines. + +[2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage](./2024-11-17-f3s-kubernetes-with-freebsd-part-1.md) +[2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation](./2024-12-03-f3s-kubernetes-with-freebsd-part-2.md) +[2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts](./2025-02-01-f3s-kubernetes-with-freebsd-part-3.md) + +[](./f3s-kubernetes-with-frhyveeebsd-part-1/f3slogo.png) + +## Table of Contents + +* [⇢ f3s: Kubernetes with FreeBSD - Rocky Linux Bhyve VMs - Part 4](#f3s-kubernetes-with-freebsd---rocky-linux-bhyve-vms---part-4) +* [⇢ ⇢ Introduction](#introduction) +* [⇢ ⇢ Check for `POPCNT` CPU support](#check-for-popcnt-cpu-support) +* [⇢ ⇢ Basic Bhyve setup](#basic-bhyve-setup) +* [⇢ ⇢ Rocky Linux VMs](#rocky-linux-vms) +* [⇢ ⇢ ⇢ ISO download](#iso-download) +* [⇢ ⇢ ⇢ VM configuration](#vm-configuration) +* [⇢ ⇢ ⇢ VM installation](#vm-installation) +* [⇢ ⇢ ⇢ Increase of the disk image](#increase-of-the-disk-image) +* [⇢ ⇢ ⇢ Connect to VPN](#connect-to-vpn) +* [⇢ ⇢ After install](#after-install) +* [⇢ ⇢ ⇢ VM auto-start after host reboot](#vm-auto-start-after-host-reboot) +* [⇢ ⇢ ⇢ Static IP configuration](#static-ip-configuration) +* [⇢ ⇢ ⇢ Permitting root login](#permitting-root-login) +* [⇢ ⇢ ⇢ Install latest updates](#install-latest-updates) + +## Introduction + +In this blog post, we are going to install the Bhyve hypervisor. + +The FreeBSD Bhyve hypervisor is a lightweight, modern hypervisor that enables virtualization on FreeBSD systems. Bhyve's strengths include its minimal overhead, which allows it to achieve near-native performance for virtual machines. It is designed to be efficient and lightweight, leveraging the capabilities of the FreeBSD operating system for performance and network management. + +Bhyve supports running a variety of guest operating systems, including FreeBSD, Linux, and Windows, on hardware platforms that support hardware virtualization extensions (such as Intel VT-x or AMD-V). In our case, we are going to virtualize Rocky Linux, which later on in this series will be used to run k3s. + +## Check for `POPCNT` CPU support + +POPCNT is a CPU instruction that counts the number of set bits (ones) in a binary number. In terms of CPU virtualization and Bhyve support for the POPCNT instruction is important because guest operating systems utilize this instruction to perform various tasks more efficiently. If the host CPU supports POPCNT, Bhyve can pass this capability to virtual machines to for better performance. Without POPCNT support, some applications might not run, or they might perform suboptimally in virtualized environments. + +To check for `POPCNT` support, I run: + +```sh +paul@f0:~ % dmesg | grep 'Features2=.*POPCNT' + Features2=0x7ffafbbf<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,SDBG, + FMA,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,TSCDLT,AESNI,XSAVE, + OSXSAVE,AVX,F16C,RDRAND> +``` + +So it's there! All good. + +## Basic Bhyve setup + +For the management of the Bhyve VMs, we are using `vm-bhyve`, a tool not part of the FreeBSD operating system but available as a ready-to-use package. It eases VM management and reduces a lot of the overhead. We also install the required package to make Bhyve work with the UEFI firmware. + +[https://github.com/churchers/vm-bhyve](https://github.com/churchers/vm-bhyve) + +The following commands are executed on all three hosts `f0`, `f1`, and `f2`, where `re0` is the name of the Ethernet interface (which may need to be adjusted if your hardware is different): + +```sh +paul@f0:~ % doas pkg install vm-bhyve bhyve-firmware +paul@f0:~ % doas sysrc vm_enable=YES +vm_enable: -> YES +paul@f0:~ % doas sysrc vm_dir=zfs:zroot/bhyve +vm_dir: -> zfs:zroot/bhyve +paul@f0:~ % doas zfs create zroot/bhyve +paul@f0:~ % doas vm init +paul@f0:~ % doas vm switch create public +paul@f0:~ % doas vm switch add public re0 +``` + +Bhyve stores all it's data in the `/bhyve` of the `zroot` ZFS pool: + +```sh +paul@f0:~ % zfs list | grep bhyve +zroot/bhyve 1.74M 453G 1.74M /zroot/bhyve +``` + +For convenience, we also create this symlink: + +```sh +paul@f0:~ % doas ln -s /zroot/bhyve/ /bhyve + +``` + +Now, Bhyve is ready to rumble, but no VMs are there yet: + +```sh +paul@f0:~ % doas vm list +NAME DATASTORE LOADER CPU MEMORY VNC AUTO STATE +``` + +## Rocky Linux VMs + +### ISO download + +We're going to install the Rocky Linux from the latest minimal iso: + +```sh +paul@f0:~ % doas vm iso \ + https://download.rockylinux.org/pub/rocky/9/isos/x86_64/Rocky-9.5-x86_64-minimal.iso +/zroot/bhyve/.iso/Rocky-9.5-x86_64-minimal.iso 1808 MB 4780 kBps 06m28s +paul@f0:/bhyve % doas vm create rocky +``` +### VM configuration + +The default configuration looks like this now: + +```sh +paul@f0:/bhyve/rocky % cat rocky.conf +loader="bhyveload" +cpu=1 +memory=256M +network0_type="virtio-net" +network0_switch="public" +disk0_type="virtio-blk" +disk0_name="disk0.img" +uuid="1c4655ac-c828-11ef-a920-e8ff1ed71ca0" +network0_mac="58:9c:fc:0d:13:3f" +``` + +Whereas the `uuid` and the `network0_mac` differ on each of the 3 hosts. + +but in order to make Rocky Linux boot it (plus some other adjustments, e.g. as I am intending to run the majority of the workload in the k3s cluster running on those linux VMs, I give them beefy specs like 4 CPU cores and 14GB RAM), I run `doas vm configure rocky` and modified it to: + +``` +guest="linux" +loader="uefi" +uefi_vars="yes" +cpu=4 +memory=14G +network0_type="virtio-net" +network0_switch="public" +disk0_type="virtio-blk" +disk0_name="disk0.img" +graphics="yes" +graphics_vga=io +uuid="1c45400b-c828-11ef-8871-e8ff1ed71cac" +network0_mac="58:9c:fc:0d:13:3f" +``` + +### VM installation + +To start the installer from the downloaded ISO, I run: + +```sh +paul@f0:~ % doas vm install rocky Rocky-9.5-x86_64-minimal.iso +Starting rocky + * found guest in /zroot/bhyve/rocky + * booting... + +paul@f0:/bhyve/rocky % doas vm list +NAME DATASTORE LOADER CPU MEMORY VNC AUTO STATE +rocky default uefi 4 14G 0.0.0.0:5900 No Locked (f0.lan.buetow.org) + +paul@f0:/bhyve/rocky % doas sockstat -4 | grep 5900 +root bhyve 6079 8 tcp4 *:5900 *:* +``` + +Port 5900 now also opened for VNC connections, so I connected to it with a VNC client and run through the installation dialogs. I'm sure this could be done unattended or more automated, there are only 3 VMs to install, and the automation doesn't seem worth it as we are doing it only once in a year or less often. + +### Increase of the disk image + +By default the VMs disk image is only 20G, which is a bit small for my purposes, so I stopped the VMs again and run `truncate` on the image file to enlarge them to 100G, and re-started the installation: + +```sh +paul@f0:/bhyve/rocky % doas vm stop rocky +paul@f0:/bhyve/rocky % doas truncate -s 100G disk0.img +paul@f0:/bhyve/rocky % doas vm install rocky Rocky-9.5-x86_64-minimal.iso +``` + +### Connect to VPN + +For the installation, I opened the VPN client on my Fedora laptop (GNOME comes with a simple VPN client) and ran through the base installation for each of the VMs manually. Again, I am sure this could have been automated a bit more, but there were just 3 VMs, and it wasn't worth the effort. The three VNC addresses of the VMs were: `vnc://f0:5900`, `vnc://f1:5900`, and `vnc://f0:5900`. + +I mostly selected the default settings (auto partitioning on the 100GB drive and a root user password). After the installation, the VMs were rebooted. + +## After install + +I performed the following steps for all 3 VMs. In the following, the examples are all executed on `f0` (bzw the VM `r0` running on `f0`): + +### VM auto-start after host reboot + +To automatically start the VM on the servers I added the following to the `rc.conf` on the FreeBSD hosts: + +```sh + +paul@f0:/bhyve/rocky % cat <<END | doas tee -a /etc/rc.conf +vm_list="rocky" +vm_delay="5" +``` + +The `vm_delay` isn't really required. It is used to wait 5 seconds before starting each VM, but as of now, there is only one VM per host. Maybe later, when there are more, this will be useful to have. After adding, there's now a `Yes` indicator in the `AUTO` column. + +```sh +paul@f0:~ % doas vm list +NAME DATASTORE LOADER CPU MEMORY VNC AUTO STATE +rocky default uefi 4 14G 0.0.0.0:5900 Yes [1] Running (2063) +``` + +### Static IP configuration + +After that, I changed the network configuration of the VMs to be static (from DHCP) here. As per previous post of this series, the 3 FreeBSD hosts were already in my `/etc/hosts` file: + +``` +192.168.1.130 f0 f0.lan f0.lan.buetow.org +192.168.1.131 f1 f1.lan f1.lan.buetow.org +192.168.1.132 f2 f2.lan f2.lan.buetow.org +``` + +For the Rocky VMs I added those to the FreeBSD hosts systems as well: + +```sh +paul@f0:/bhyve/rocky % cat <<END | doas tee -a /etc/hosts +192.168.1.120 r0 r0.lan r0.lan.buetow.org +192.168.1.121 r1 r1.lan r1.lan.buetow.org +192.168.1.122 r2 r2.lan r2.lan.buetow.org +END +``` + +and configured the IPs accordingly on the VMs themselves by opening a root shell via RDP to the VMs and entering the following commands on each of the VMs: + +```sh +[root@r0 ~] % dnmcli connection modify enp0s5 ipv4.address 192.168.1.120/24 +[root@r0 ~] % dnmcli connection modify enp0s5 ipv4.gateway 192.168.1.1 +[root@r0 ~] % dnmcli connection modify enp0s5 ipv4.dns 192.168.1.1 +[root@r0 ~] % dnmcli connection modify enp0s5 ipv4.method manual +[root@r0 ~] % dnmcli connection down enp0s5 +[root@r0 ~] % dnmcli connection up enp0s5 +[root@r0 ~] % hostnamectl set-hostname r0.lan.buetow.org +[root@r0 ~] % cat <<END >>/etc/hosts +192.168.1.120 r0 r0.lan r0.lan.buetow.org +192.168.1.121 r1 r1.lan r1.lan.buetow.org +192.168.1.122 r2 r2.lan r2.lan.buetow.org +END +```` + +Whereas: + +* `192.168.1.120` is the IP of the VM itself (here: `r0.lan.buetow.org`) +* `192.168.1.1` is the address of my home router, which also does DNS. + +### Permitting root login + +As these VMs arent directly reachable via SSH from the internet, I enabled `root` login by adding a line with `PermitRootLogin yes` to `/etc/sshd/sshd_config`. + +Once done, I rebooted the VM by running `reboot` inside of the vm to test whether everything was configured and persisted correctly. + +After reboot, I copied my public key from my Laptop to the 3 VMs: + +```sh +% for i in 0 1 2; do ssh-copy-id root@r$i.lan.buetow.org; done +``` + +And then I edited the `/etc/ssh/sshd_config` file again on all 3 VMs and configured `PasswordAuthentication no`, to only allow SSH key authentication from now on. + +### Install latest updates + +```sh +[root@r0 ~] % dnf update +[root@r0 ~] % dreboot +``` + +CPU STRESS TESTER VM VS NOT VM + +Other *BSD-related posts: + +[2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts](./2025-02-01-f3s-kubernetes-with-freebsd-part-3.md) +[2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation](./2024-12-03-f3s-kubernetes-with-freebsd-part-2.md) +[2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage](./2024-11-17-f3s-kubernetes-with-freebsd-part-1.md) +[2024-04-01 KISS high-availability with OpenBSD](./2024-04-01-KISS-high-availability-with-OpenBSD.md) +[2024-01-13 One reason why I love OpenBSD](./2024-01-13-one-reason-why-i-love-openbsd.md) +[2022-10-30 Installing DTail on OpenBSD](./2022-10-30-installing-dtail-on-openbsd.md) +[2022-07-30 Let's Encrypt with OpenBSD and Rex](./2022-07-30-lets-encrypt-with-openbsd-and-rex.md) +[2016-04-09 Jails and ZFS with Puppet on FreeBSD](./2016-04-09-jails-and-zfs-on-freebsd-with-puppet.md) + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +[Back to the main site](../) diff --git a/gemfeed/a-fine-fyne-android-app-for-quickly-logging-ideas-programmed-in-golang/logo-small.png b/gemfeed/a-fine-fyne-android-app-for-quickly-logging-ideas-programmed-in-golang/logo-small.png Binary files differnew file mode 100644 index 00000000..dc29011c --- /dev/null +++ b/gemfeed/a-fine-fyne-android-app-for-quickly-logging-ideas-programmed-in-golang/logo-small.png diff --git a/gemfeed/a-fine-fyne-android-app-for-quickly-logging-ideas-programmed-in-golang/screenshot-android.png b/gemfeed/a-fine-fyne-android-app-for-quickly-logging-ideas-programmed-in-golang/screenshot-android.png Binary files differnew file mode 100644 index 00000000..a8a604e3 --- /dev/null +++ b/gemfeed/a-fine-fyne-android-app-for-quickly-logging-ideas-programmed-in-golang/screenshot-android.png diff --git a/gemfeed/bash-golf-part-3/bash-fork-bomb.jpg b/gemfeed/bash-golf-part-3/bash-fork-bomb.jpg Binary files differnew file mode 100644 index 00000000..6967c03a --- /dev/null +++ b/gemfeed/bash-golf-part-3/bash-fork-bomb.jpg diff --git a/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program/dgrep.gif b/gemfeed/dtail-the-distributed-log-tail-program/dgrep.gif Binary files differindex e2f2ac64..e2f2ac64 100644 --- a/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program/dgrep.gif +++ b/gemfeed/dtail-the-distributed-log-tail-program/dgrep.gif diff --git a/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program/dtail.gif b/gemfeed/dtail-the-distributed-log-tail-program/dtail.gif Binary files differindex 8f6b56bf..8f6b56bf 100644 --- a/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program/dtail.gif +++ b/gemfeed/dtail-the-distributed-log-tail-program/dtail.gif diff --git a/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program/title.png b/gemfeed/dtail-the-distributed-log-tail-program/title.png Binary files differindex 4e343c4f..4e343c4f 100644 --- a/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program/title.png +++ b/gemfeed/dtail-the-distributed-log-tail-program/title.png diff --git a/gemfeed/f3s-kubernetes-with-freebsd-part-1/diagram.png b/gemfeed/f3s-kubernetes-with-freebsd-part-1/diagram.png Binary files differnew file mode 100644 index 00000000..fa6b655a --- /dev/null +++ b/gemfeed/f3s-kubernetes-with-freebsd-part-1/diagram.png diff --git a/gemfeed/f3s-kubernetes-with-freebsd-part-1/f3slogo.png b/gemfeed/f3s-kubernetes-with-freebsd-part-1/f3slogo.png Binary files differnew file mode 100644 index 00000000..cc45b40e --- /dev/null +++ b/gemfeed/f3s-kubernetes-with-freebsd-part-1/f3slogo.png diff --git a/gemfeed/f3s-kubernetes-with-freebsd-part-2/3beelinks.jpg b/gemfeed/f3s-kubernetes-with-freebsd-part-2/3beelinks.jpg Binary files differnew file mode 100644 index 00000000..7da37da7 --- /dev/null +++ b/gemfeed/f3s-kubernetes-with-freebsd-part-2/3beelinks.jpg diff --git a/gemfeed/f3s-kubernetes-with-freebsd-part-2/f3s-collage1.jpg b/gemfeed/f3s-kubernetes-with-freebsd-part-2/f3s-collage1.jpg Binary files differnew file mode 100644 index 00000000..294eb37d --- /dev/null +++ b/gemfeed/f3s-kubernetes-with-freebsd-part-2/f3s-collage1.jpg diff --git a/gemfeed/f3s-kubernetes-with-freebsd-part-2/f3s-collage2.jpg b/gemfeed/f3s-kubernetes-with-freebsd-part-2/f3s-collage2.jpg Binary files differnew file mode 100644 index 00000000..77c4c0bc --- /dev/null +++ b/gemfeed/f3s-kubernetes-with-freebsd-part-2/f3s-collage2.jpg diff --git a/gemfeed/f3s-kubernetes-with-freebsd-part-2/switch.jpg b/gemfeed/f3s-kubernetes-with-freebsd-part-2/switch.jpg Binary files differnew file mode 100644 index 00000000..8fe0edeb --- /dev/null +++ b/gemfeed/f3s-kubernetes-with-freebsd-part-2/switch.jpg diff --git a/gemfeed/f3s-kubernetes-with-freebsd-part-2/watt.jpg b/gemfeed/f3s-kubernetes-with-freebsd-part-2/watt.jpg Binary files differnew file mode 100644 index 00000000..e79fe68c --- /dev/null +++ b/gemfeed/f3s-kubernetes-with-freebsd-part-2/watt.jpg diff --git a/gemfeed/f3s-kubernetes-with-freebsd-part-3/apc-back-ups.jpg b/gemfeed/f3s-kubernetes-with-freebsd-part-3/apc-back-ups.jpg Binary files differnew file mode 100644 index 00000000..15b1ca78 --- /dev/null +++ b/gemfeed/f3s-kubernetes-with-freebsd-part-3/apc-back-ups.jpg diff --git a/gemfeed/f3s-kubernetes-with-freebsd-part-3/f3s-changes.jpg b/gemfeed/f3s-kubernetes-with-freebsd-part-3/f3s-changes.jpg Binary files differnew file mode 100644 index 00000000..5752f2fc --- /dev/null +++ b/gemfeed/f3s-kubernetes-with-freebsd-part-3/f3s-changes.jpg diff --git a/gemfeed/from-.org-to-.cloud/old-man-yells-at-cloud.jpg b/gemfeed/from-.org-to-.cloud/old-man-yells-at-cloud.jpg Binary files differnew file mode 100644 index 00000000..da1170f8 --- /dev/null +++ b/gemfeed/from-.org-to-.cloud/old-man-yells-at-cloud.jpg diff --git a/gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all/blog-engine.jpg b/gemfeed/gemtexter-one-bash-script-to-rule-it-all/blog-engine.jpg Binary files differindex 844bc9fc..844bc9fc 100644 --- a/gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all/blog-engine.jpg +++ b/gemfeed/gemtexter-one-bash-script-to-rule-it-all/blog-engine.jpg diff --git a/gemfeed/index.md b/gemfeed/index.md index 5290577c..81c3326c 100644 --- a/gemfeed/index.md +++ b/gemfeed/index.md @@ -2,18 +2,39 @@ ## To be in the .zone! +[2025-02-08 - Random Weird Things - Part Ⅱ](./2025-02-08-random-weird-things-ii.md) +[2025-02-01 - f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts](./2025-02-01-f3s-kubernetes-with-freebsd-part-3.md) +[2025-01-15 - Working with an SRE Interview](./2025-01-15-working-with-an-sre-interview.md) +[2025-01-01 - Posts from October to December 2024](./2025-01-01-posts-from-october-to-december-2024.md) +[2024-12-15 - Random Helix Themes](./2024-12-15-random-helix-themes.md) +[2024-12-03 - f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation](./2024-12-03-f3s-kubernetes-with-freebsd-part-2.md) +[2024-11-17 - f3s: Kubernetes with FreeBSD - Part 1: Setting the stage](./2024-11-17-f3s-kubernetes-with-freebsd-part-1.md) +[2024-10-24 - 'Staff Engineer' book notes](./2024-10-24-staff-engineer-book-notes.md) +[2024-10-02 - Gemtexter 3.0.0 - Let's Gemtext again⁴](./2024-10-02-gemtexter-3.0.0-lets-gemtext-again-4.md) +[2024-09-07 - Site Reliability Engineering - Part 4: Onboarding for On-Call Engineers](./2024-09-07-site-reliability-engineering-part-4.md) +[2024-09-07 - Projects I financially support](./2024-09-07-projects-i-support.md) +[2024-08-05 - Typing `127.1` words per minute (`>100wpm average`)](./2024-08-05-typing-127.1-words-per-minute.md) +[2024-07-07 - 'The Stoic Challenge' book notes](./2024-07-07-the-stoic-challenge-book-notes.md) +[2024-07-05 - Random Weird Things - Part Ⅰ](./2024-07-05-random-weird-things.md) +[2024-06-23 - Terminal multiplexing with `tmux`](./2024-06-23-terminal-multiplexing-with-tmux.md) +[2024-05-03 - Projects I currently don't have time for](./2024-05-03-projects-i-currently-dont-have-time-for.md) +[2024-05-01 - 'Slow Productivity' book notes](./2024-05-01-slow-productivity-book-notes.md) +[2024-04-01 - KISS high-availability with OpenBSD](./2024-04-01-KISS-high-availability-with-OpenBSD.md) +[2024-03-03 - A fine Fyne Android app for quickly logging ideas programmed in Go](./2024-03-03-a-fine-fyne-android-app-for-quickly-logging-ideas-programmed-in-golang.md) +[2024-02-04 - From `babylon5.buetow.org` to `*.buetow.cloud`](./2024-02-04-from-babylon5.buetow.org-to-.cloud.md) +[2024-01-13 - One reason why I love OpenBSD](./2024-01-13-one-reason-why-i-love-openbsd.md) +[2024-01-09 - Site Reliability Engineering - Part 3: On-Call Culture](./2024-01-09-site-reliability-engineering-part-3.md) +[2023-12-10 - Bash Golf Part 3](./2023-12-10-bash-golf-part-3.md) +[2023-11-19 - Site Reliability Engineering - Part 2: Operational Balance](./2023-11-19-site-reliability-engineering-part-2.md) [2023-11-11 - 'Mind Management' book notes](./2023-11-11-mind-management-book-notes.md) [2023-10-29 - KISS static web photo albums with `photoalbum.sh`](./2023-10-29-kiss-static-web-photo-albums-with-photoalbum.sh.md) [2023-09-25 - DTail usage examples](./2023-09-25-dtail-usage-examples.md) -[2023-08-20 - Site Reliability Engineering - Part 3: On-Call Culture and the Human Aspect](./2023-08-20-site-reliability-engineering-part-3.md) -[2023-08-19 - Site Reliability Engineering - Part 2: Operational Balance in SRE](./2023-08-19-site-reliability-engineering-part-2.md) [2023-08-18 - Site Reliability Engineering - Part 1: SRE and Organizational Culture](./2023-08-18-site-reliability-engineering-part-1.md) [2023-07-21 - Gemtexter 2.1.0 - Let's Gemtext again³](./2023-07-21-gemtexter-2.1.0-lets-gemtext-again-3.md) [2023-07-17 - 'Software Developmers Career Guide and Soft Skills' book notes](./2023-07-17-career-guide-and-soft-skills-book-notes.md) [2023-06-01 - KISS server monitoring with Gogios](./2023-06-01-kiss-server-monitoring-with-gogios.md) [2023-05-06 - 'The Obstacle is the Way' book notes](./2023-05-06-the-obstacle-is-the-way-book-notes.md) [2023-05-01 - Unveiling `guprecords.raku`: Global Uptime Records with Raku](./2023-05-01-unveiling-guprecords:-uptime-records-with-raku.md) -[2023-04-09 - Algorithms and Data Structures in Go - Part 1](./2023-04-09-algorithms-and-data-structures-in-golang-part-1.md) [2023-04-01 - 'Never split the difference' book notes](./2023-04-01-never-split-the-difference-book-notes.md) [2023-03-25 - Gemtexter 2.0.0 - Let's Gemtext again²](./2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.md) [2023-03-16 - 'The Pragmatic Programmer' book notes](./2023-03-16-the-pragmatic-programmer-book-notes.md) @@ -54,5 +75,6 @@ [2010-05-09 - The Fype Programming Language](./2010-05-09-the-fype-programming-language.md) [2010-05-07 - Lazy Evaluation with Standard ML](./2010-05-07-lazy-evaluation-with-standarn-ml.md) [2010-04-09 - Standard ML and Haskell](./2010-04-09-standard-ml-and-haskell.md) +[2009-02-13 - SGI Onyx 3200](./2009-02-13-sgi-onyx-3200.md) [2008-12-29 - Using my Nokia N95 for fixing my MTA](./2008-12-29-using-my-nokia-n95-for-fixing-my-mta.md) [2008-06-26 - Perl Poetry](./2008-06-26-perl-poetry.md) diff --git a/gemfeed/2023-06-01-kiss-server-monitoring-with-gogios/gogios-small.png b/gemfeed/kiss-server-monitoring-with-gogios/gogios-small.png Binary files differindex aebe695c..aebe695c 100644 --- a/gemfeed/2023-06-01-kiss-server-monitoring-with-gogios/gogios-small.png +++ b/gemfeed/kiss-server-monitoring-with-gogios/gogios-small.png diff --git a/gemfeed/2022-05-27-perl-is-still-a-great-choice/googletrendsperl.jpg b/gemfeed/perl-is-still-a-great-choice/googletrendsperl.jpg Binary files differindex 397c9f29..397c9f29 100644 --- a/gemfeed/2022-05-27-perl-is-still-a-great-choice/googletrendsperl.jpg +++ b/gemfeed/perl-is-still-a-great-choice/googletrendsperl.jpg diff --git a/gemfeed/2022-05-27-perl-is-still-a-great-choice/regular_expressions.png b/gemfeed/perl-is-still-a-great-choice/regular_expressions.png Binary files differindex acbc2437..acbc2437 100644 --- a/gemfeed/2022-05-27-perl-is-still-a-great-choice/regular_expressions.png +++ b/gemfeed/perl-is-still-a-great-choice/regular_expressions.png diff --git a/gemfeed/random-weird-things-ii/css-conway.png b/gemfeed/random-weird-things-ii/css-conway.png Binary files differnew file mode 100644 index 00000000..c29d1d8b --- /dev/null +++ b/gemfeed/random-weird-things-ii/css-conway.png diff --git a/gemfeed/random-weird-things-ii/go-font-code.png b/gemfeed/random-weird-things-ii/go-font-code.png Binary files differnew file mode 100644 index 00000000..630cccfe --- /dev/null +++ b/gemfeed/random-weird-things-ii/go-font-code.png diff --git a/gemfeed/random-weird-things-ii/sqlite-gem.png b/gemfeed/random-weird-things-ii/sqlite-gem.png Binary files differnew file mode 100644 index 00000000..f3c3ceb6 --- /dev/null +++ b/gemfeed/random-weird-things-ii/sqlite-gem.png diff --git a/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure1-ioriot-io-recording.png b/gemfeed/realistic-load-testing-with-ioriot-for-linux/figure1-ioriot-io-recording.png Binary files differindex 43ac852f..43ac852f 100644 --- a/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure1-ioriot-io-recording.png +++ b/gemfeed/realistic-load-testing-with-ioriot-for-linux/figure1-ioriot-io-recording.png diff --git a/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure2-ioriot-test-preparation.png b/gemfeed/realistic-load-testing-with-ioriot-for-linux/figure2-ioriot-test-preparation.png Binary files differindex 709d7490..709d7490 100644 --- a/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure2-ioriot-test-preparation.png +++ b/gemfeed/realistic-load-testing-with-ioriot-for-linux/figure2-ioriot-test-preparation.png diff --git a/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure3-ioriot-replay.png b/gemfeed/realistic-load-testing-with-ioriot-for-linux/figure3-ioriot-replay.png Binary files differindex 3bd66b6f..3bd66b6f 100644 --- a/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure3-ioriot-replay.png +++ b/gemfeed/realistic-load-testing-with-ioriot-for-linux/figure3-ioriot-replay.png diff --git a/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure4-ioriot-read-latency.png b/gemfeed/realistic-load-testing-with-ioriot-for-linux/figure4-ioriot-read-latency.png Binary files differindex 160b2305..160b2305 100644 --- a/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure4-ioriot-read-latency.png +++ b/gemfeed/realistic-load-testing-with-ioriot-for-linux/figure4-ioriot-read-latency.png diff --git a/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure5-ioriot-write-latency.png b/gemfeed/realistic-load-testing-with-ioriot-for-linux/figure5-ioriot-write-latency.png Binary files differindex e30efdbb..e30efdbb 100644 --- a/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure5-ioriot-write-latency.png +++ b/gemfeed/realistic-load-testing-with-ioriot-for-linux/figure5-ioriot-write-latency.png diff --git a/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure6-iostat.png b/gemfeed/realistic-load-testing-with-ioriot-for-linux/figure6-iostat.png Binary files differindex 0d3fc0d8..0d3fc0d8 100644 --- a/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure6-iostat.png +++ b/gemfeed/realistic-load-testing-with-ioriot-for-linux/figure6-iostat.png diff --git a/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid/Deboroid.png b/gemfeed/run-debian-on-your-phone-with-debroid/Deboroid.png Binary files differindex f76cf226..f76cf226 100644 --- a/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid/Deboroid.png +++ b/gemfeed/run-debian-on-your-phone-with-debroid/Deboroid.png diff --git a/gemfeed/sgi-onyx-3200/collage.webp b/gemfeed/sgi-onyx-3200/collage.webp Binary files differnew file mode 100644 index 00000000..e33ea1c8 --- /dev/null +++ b/gemfeed/sgi-onyx-3200/collage.webp diff --git a/gemfeed/sgi-onyx-3200/collage2.webp b/gemfeed/sgi-onyx-3200/collage2.webp Binary files differnew file mode 100644 index 00000000..21ccbc44 --- /dev/null +++ b/gemfeed/sgi-onyx-3200/collage2.webp diff --git a/gemfeed/sgi-onyx-3200/desk.webp b/gemfeed/sgi-onyx-3200/desk.webp Binary files differnew file mode 100644 index 00000000..d82681e5 --- /dev/null +++ b/gemfeed/sgi-onyx-3200/desk.webp diff --git a/gemfeed/2022-06-15-sweating-the-small-stuff/jsmstrade.png b/gemfeed/sweating-the-small-stuff/jsmstrade.png Binary files differindex ce5276f8..ce5276f8 100644 --- a/gemfeed/2022-06-15-sweating-the-small-stuff/jsmstrade.png +++ b/gemfeed/sweating-the-small-stuff/jsmstrade.png diff --git a/gemfeed/2022-06-15-sweating-the-small-stuff/ninja.jpg b/gemfeed/sweating-the-small-stuff/ninja.jpg Binary files differindex 8a036323..8a036323 100644 --- a/gemfeed/2022-06-15-sweating-the-small-stuff/ninja.jpg +++ b/gemfeed/sweating-the-small-stuff/ninja.jpg diff --git a/gemfeed/terminal-multiplexing-with-tmux/tmux-session-fzf.png b/gemfeed/terminal-multiplexing-with-tmux/tmux-session-fzf.png Binary files differnew file mode 100644 index 00000000..7a2e9440 --- /dev/null +++ b/gemfeed/terminal-multiplexing-with-tmux/tmux-session-fzf.png diff --git a/gemfeed/terminal-multiplexing-with-tmux/tmux-tree-view.png b/gemfeed/terminal-multiplexing-with-tmux/tmux-tree-view.png Binary files differnew file mode 100644 index 00000000..672859c5 --- /dev/null +++ b/gemfeed/terminal-multiplexing-with-tmux/tmux-tree-view.png diff --git a/gemfeed/2021-07-04-the-well-grounded-rubyist/book-backside.jpg b/gemfeed/the-well-grounded-rubyist/book-backside.jpg Binary files differindex 2190e679..2190e679 100644 --- a/gemfeed/2021-07-04-the-well-grounded-rubyist/book-backside.jpg +++ b/gemfeed/the-well-grounded-rubyist/book-backside.jpg diff --git a/gemfeed/2021-07-04-the-well-grounded-rubyist/book-cover.jpg b/gemfeed/the-well-grounded-rubyist/book-cover.jpg Binary files differindex b5a00063..b5a00063 100644 --- a/gemfeed/2021-07-04-the-well-grounded-rubyist/book-cover.jpg +++ b/gemfeed/the-well-grounded-rubyist/book-cover.jpg diff --git a/gemfeed/typing-127.1-words-per-minute/all-time-stats.png b/gemfeed/typing-127.1-words-per-minute/all-time-stats.png Binary files differnew file mode 100644 index 00000000..4d8a5a8f --- /dev/null +++ b/gemfeed/typing-127.1-words-per-minute/all-time-stats.png diff --git a/gemfeed/typing-127.1-words-per-minute/glove80.jpg b/gemfeed/typing-127.1-words-per-minute/glove80.jpg Binary files differnew file mode 100644 index 00000000..80b9c4fb --- /dev/null +++ b/gemfeed/typing-127.1-words-per-minute/glove80.jpg diff --git a/gemfeed/typing-127.1-words-per-minute/kinesis1.jpg b/gemfeed/typing-127.1-words-per-minute/kinesis1.jpg Binary files differnew file mode 100644 index 00000000..1edffb84 --- /dev/null +++ b/gemfeed/typing-127.1-words-per-minute/kinesis1.jpg diff --git a/gemfeed/typing-127.1-words-per-minute/kinesis2.jpg b/gemfeed/typing-127.1-words-per-minute/kinesis2.jpg Binary files differnew file mode 100644 index 00000000..d6ae665d --- /dev/null +++ b/gemfeed/typing-127.1-words-per-minute/kinesis2.jpg diff --git a/gemfeed/typing-127.1-words-per-minute/typing-speed-over-lessons.png b/gemfeed/typing-127.1-words-per-minute/typing-speed-over-lessons.png Binary files differnew file mode 100644 index 00000000..f9f85417 --- /dev/null +++ b/gemfeed/typing-127.1-words-per-minute/typing-speed-over-lessons.png diff --git a/gemfeed/2022-12-24-ultrarelearning-java-my-takeaways/effective-java.jpg b/gemfeed/ultrarelearning-java-my-takeaways/effective-java.jpg Binary files differindex 213c6e03..213c6e03 100644 --- a/gemfeed/2022-12-24-ultrarelearning-java-my-takeaways/effective-java.jpg +++ b/gemfeed/ultrarelearning-java-my-takeaways/effective-java.jpg diff --git a/gemfeed/2022-12-24-ultrarelearning-java-my-takeaways/learnjava.jpg b/gemfeed/ultrarelearning-java-my-takeaways/learnjava.jpg Binary files differindex 4c3b9e7b..4c3b9e7b 100644 --- a/gemfeed/2022-12-24-ultrarelearning-java-my-takeaways/learnjava.jpg +++ b/gemfeed/ultrarelearning-java-my-takeaways/learnjava.jpg diff --git a/gemfeed/2008-12-29-using-my-nokia-n95-for-fixing-my-mta/nokia-n95.jpg b/gemfeed/using-my-nokia-n95-for-fixing-my-mta/nokia-n95.jpg Binary files differindex 6a11be8b..6a11be8b 100644 --- a/gemfeed/2008-12-29-using-my-nokia-n95-for-fixing-my-mta/nokia-n95.jpg +++ b/gemfeed/using-my-nokia-n95-for-fixing-my-mta/nokia-n95.jpg diff --git a/gemfeed/2021-04-24-welcome-to-the-geminispace/amfora-screenshot.png b/gemfeed/welcome-to-the-geminispace/amfora-screenshot.png Binary files differindex 093aec79..093aec79 100644 --- a/gemfeed/2021-04-24-welcome-to-the-geminispace/amfora-screenshot.png +++ b/gemfeed/welcome-to-the-geminispace/amfora-screenshot.png diff --git a/gemfeed/2021-04-24-welcome-to-the-geminispace/lagrange-screenshot.png b/gemfeed/welcome-to-the-geminispace/lagrange-screenshot.png Binary files differindex 478d2fdd..478d2fdd 100644 --- a/gemfeed/2021-04-24-welcome-to-the-geminispace/lagrange-screenshot.png +++ b/gemfeed/welcome-to-the-geminispace/lagrange-screenshot.png @@ -1,6 +1,8 @@ # foo.zone -> This site was generated at 2023-11-11T22:22:24+02:00 by `Gemtexter` +> This site was generated at 2025-02-21T11:07:02+02:00 by `Gemtexter` + +Welcome to the foo.zone. Everything you read on this site is my personal opinion and experience. You can call me a Linux/*BSD enthusiast and hobbyist. I mainly write about tech, IT, programming and sometimes also about self-improvement here. And I also like coding. ``` |\---/| @@ -11,40 +13,54 @@ (_,...'(_,.`__)/'.....+ ``` -## Introduction - -Welcome to the foo.zone. Everything you read on this site is my personal opinion and experience. You can call me a Linux/*BSD enthusiast and hobbyist. I mainly write about tech, IT, programming and sometimes also about self-improvement here. +## Some links -[All I post here on `foo.zone` is really only just for fun!](https://justforfunnoreally.dev/) -[My contact information and resources (via HTTP)](https://paul.buetow.org) -[My contact information and resources (via Gemini)](gemini://paul.buetow.org) +[About me](./about/index.md) [My machine uptime statistics](./uptime-stats.md) - -If you reach this site via the modern web, please read this: - [Welcome to the Geminispace](./gemfeed/2021-04-24-welcome-to-the-geminispace.md) -## Personal blog +## Blog -### Stay updated +### Atom and Gemfeeds [Subscribe to this blog's Atom feed](./gemfeed/atom.xml) [Subscribe to this blog's Gemfeed](./gemfeed/index.md) ### Posts +[2025-02-08 - Random Weird Things - Part Ⅱ](./gemfeed/2025-02-08-random-weird-things-ii.md) +[2025-02-01 - f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts](./gemfeed/2025-02-01-f3s-kubernetes-with-freebsd-part-3.md) +[2025-01-15 - Working with an SRE Interview](./gemfeed/2025-01-15-working-with-an-sre-interview.md) +[2025-01-01 - Posts from October to December 2024](./gemfeed/2025-01-01-posts-from-october-to-december-2024.md) +[2024-12-15 - Random Helix Themes](./gemfeed/2024-12-15-random-helix-themes.md) +[2024-12-03 - f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation](./gemfeed/2024-12-03-f3s-kubernetes-with-freebsd-part-2.md) +[2024-11-17 - f3s: Kubernetes with FreeBSD - Part 1: Setting the stage](./gemfeed/2024-11-17-f3s-kubernetes-with-freebsd-part-1.md) +[2024-10-24 - 'Staff Engineer' book notes](./gemfeed/2024-10-24-staff-engineer-book-notes.md) +[2024-10-02 - Gemtexter 3.0.0 - Let's Gemtext again⁴](./gemfeed/2024-10-02-gemtexter-3.0.0-lets-gemtext-again-4.md) +[2024-09-07 - Site Reliability Engineering - Part 4: Onboarding for On-Call Engineers](./gemfeed/2024-09-07-site-reliability-engineering-part-4.md) +[2024-09-07 - Projects I financially support](./gemfeed/2024-09-07-projects-i-support.md) +[2024-08-05 - Typing `127.1` words per minute (`>100wpm average`)](./gemfeed/2024-08-05-typing-127.1-words-per-minute.md) +[2024-07-07 - 'The Stoic Challenge' book notes](./gemfeed/2024-07-07-the-stoic-challenge-book-notes.md) +[2024-07-05 - Random Weird Things - Part Ⅰ](./gemfeed/2024-07-05-random-weird-things.md) +[2024-06-23 - Terminal multiplexing with `tmux`](./gemfeed/2024-06-23-terminal-multiplexing-with-tmux.md) +[2024-05-03 - Projects I currently don't have time for](./gemfeed/2024-05-03-projects-i-currently-dont-have-time-for.md) +[2024-05-01 - 'Slow Productivity' book notes](./gemfeed/2024-05-01-slow-productivity-book-notes.md) +[2024-04-01 - KISS high-availability with OpenBSD](./gemfeed/2024-04-01-KISS-high-availability-with-OpenBSD.md) +[2024-03-03 - A fine Fyne Android app for quickly logging ideas programmed in Go](./gemfeed/2024-03-03-a-fine-fyne-android-app-for-quickly-logging-ideas-programmed-in-golang.md) +[2024-02-04 - From `babylon5.buetow.org` to `*.buetow.cloud`](./gemfeed/2024-02-04-from-babylon5.buetow.org-to-.cloud.md) +[2024-01-13 - One reason why I love OpenBSD](./gemfeed/2024-01-13-one-reason-why-i-love-openbsd.md) +[2024-01-09 - Site Reliability Engineering - Part 3: On-Call Culture](./gemfeed/2024-01-09-site-reliability-engineering-part-3.md) +[2023-12-10 - Bash Golf Part 3](./gemfeed/2023-12-10-bash-golf-part-3.md) +[2023-11-19 - Site Reliability Engineering - Part 2: Operational Balance](./gemfeed/2023-11-19-site-reliability-engineering-part-2.md) [2023-11-11 - 'Mind Management' book notes](./gemfeed/2023-11-11-mind-management-book-notes.md) [2023-10-29 - KISS static web photo albums with `photoalbum.sh`](./gemfeed/2023-10-29-kiss-static-web-photo-albums-with-photoalbum.sh.md) [2023-09-25 - DTail usage examples](./gemfeed/2023-09-25-dtail-usage-examples.md) -[2023-08-20 - Site Reliability Engineering - Part 3: On-Call Culture and the Human Aspect](./gemfeed/2023-08-20-site-reliability-engineering-part-3.md) -[2023-08-19 - Site Reliability Engineering - Part 2: Operational Balance in SRE](./gemfeed/2023-08-19-site-reliability-engineering-part-2.md) [2023-08-18 - Site Reliability Engineering - Part 1: SRE and Organizational Culture](./gemfeed/2023-08-18-site-reliability-engineering-part-1.md) [2023-07-21 - Gemtexter 2.1.0 - Let's Gemtext again³](./gemfeed/2023-07-21-gemtexter-2.1.0-lets-gemtext-again-3.md) [2023-07-17 - 'Software Developmers Career Guide and Soft Skills' book notes](./gemfeed/2023-07-17-career-guide-and-soft-skills-book-notes.md) [2023-06-01 - KISS server monitoring with Gogios](./gemfeed/2023-06-01-kiss-server-monitoring-with-gogios.md) [2023-05-06 - 'The Obstacle is the Way' book notes](./gemfeed/2023-05-06-the-obstacle-is-the-way-book-notes.md) [2023-05-01 - Unveiling `guprecords.raku`: Global Uptime Records with Raku](./gemfeed/2023-05-01-unveiling-guprecords:-uptime-records-with-raku.md) -[2023-04-09 - Algorithms and Data Structures in Go - Part 1](./gemfeed/2023-04-09-algorithms-and-data-structures-in-golang-part-1.md) [2023-04-01 - 'Never split the difference' book notes](./gemfeed/2023-04-01-never-split-the-difference-book-notes.md) [2023-03-25 - Gemtexter 2.0.0 - Let's Gemtext again²](./gemfeed/2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.md) [2023-03-16 - 'The Pragmatic Programmer' book notes](./gemfeed/2023-03-16-the-pragmatic-programmer-book-notes.md) @@ -85,5 +101,6 @@ If you reach this site via the modern web, please read this: [2010-05-09 - The Fype Programming Language](./gemfeed/2010-05-09-the-fype-programming-language.md) [2010-05-07 - Lazy Evaluation with Standard ML](./gemfeed/2010-05-07-lazy-evaluation-with-standarn-ml.md) [2010-04-09 - Standard ML and Haskell](./gemfeed/2010-04-09-standard-ml-and-haskell.md) +[2009-02-13 - SGI Onyx 3200](./gemfeed/2009-02-13-sgi-onyx-3200.md) [2008-12-29 - Using my Nokia N95 for fixing my MTA](./gemfeed/2008-12-29-using-my-nokia-n95-for-fixing-my-mta.md) [2008-06-26 - Perl Poetry](./gemfeed/2008-06-26-perl-poetry.md) diff --git a/notes/a-monks-guide-to-happiness.md b/notes/a-monks-guide-to-happiness.md index 420470f1..be51425d 100644 --- a/notes/a-monks-guide-to-happiness.md +++ b/notes/a-monks-guide-to-happiness.md @@ -2,6 +2,17 @@ > Last updated 21.5.2023 +## Table of Contents + +* [⇢ "A Monk's Guide to Happiness" book notes](#a-monk-s-guide-to-happiness-book-notes) +* [⇢ ⇢ Understanding Happiness](#understanding-happiness) +* [⇢ ⇢ The Role of Meditation](#the-role-of-meditation) +* [⇢ ⇢ Managing Thoughts and Emotions](#managing-thoughts-and-emotions) +* [⇢ ⇢ Practice and Discipline](#practice-and-discipline) +* [⇢ ⇢ Perspectives on Relationships and Interactions](#perspectives-on-relationships-and-interactions) +* [⇢ ⇢ Reflective Questions](#reflective-questions) +* [⇢ ⇢ Miscellaneous Guidelines](#miscellaneous-guidelines) + ## Understanding Happiness * Happiness is a skill we can train. diff --git a/notes/career-guide-and-soft-skills.md b/notes/career-guide-and-soft-skills.md index 623685dc..49c0873d 100644 --- a/notes/career-guide-and-soft-skills.md +++ b/notes/career-guide-and-soft-skills.md @@ -16,9 +16,41 @@ These notes are of two books by "John Sommez" I found helpful. I also added some ''' ``` -# Improve - -## Always learn new things +## Table of Contents + +* [⇢ "Software Developmers Career Guide and Soft Skills" book notes](#software-developmers-career-guide-and-soft-skills-book-notes) +* [⇢ ⇢ Improve](#improve) +* [⇢ ⇢ ⇢ Always learn new things](#always-learn-new-things) +* [⇢ ⇢ ⇢ Set goals](#set-goals) +* [⇢ ⇢ ⇢ Ratings](#ratings) +* [⇢ ⇢ ⇢ Promotions](#promotions) +* [⇢ ⇢ ⇢ Finish things](#finish-things) +* [⇢ ⇢ Expand the empire](#expand-the-empire) +* [⇢ ⇢ Be pragmatic and also manage your time](#be-pragmatic-and-also-manage-your-time) +* [⇢ ⇢ ⇢ The quota system](#the-quota-system) +* [⇢ ⇢ ⇢ Don't waste time](#don-t-waste-time) +* [⇢ ⇢ ⇢ Habits](#habits) +* [⇢ Work-life balance](#work-life-balance) +* [⇢ ⇢ Mental health](#mental-health) +* [⇢ ⇢ Physical health](#physical-health) +* [⇢ ⇢ No drama](#no-drama) +* [⇢ Personal brand](#personal-brand) +* [⇢ ⇢ Market yourself](#market-yourself) +* [⇢ ⇢ Networking](#networking) +* [⇢ ⇢ Public speaking](#public-speaking) +* [⇢ New job](#new-job) +* [⇢ ⇢ For the interview](#for-the-interview) +* [⇢ ⇢ Find the right type of company](#find-the-right-type-of-company) +* [⇢ ⇢ Apply for the new job](#apply-for-the-new-job) +* [⇢ ⇢ Negotiation](#negotiation) +* [⇢ ⇢ Leaving the old job](#leaving-the-old-job) +* [⇢ Other things](#other-things) +* [⇢ ⇢ Testing](#testing) +* [⇢ ⇢ Books to read](#books-to-read) + +## Improve + +### Always learn new things When you learn something new, e.g. a programming language, first gather an overview, learn from multiple sources, play around and learn by doing and not consuming and form your own questions. Don't read too much upfront. A large amount of time is spent in learning technical skills which were never use. You want to have a practical set of skills you are actually using. You need to know 20 percent to get out 80 percent of the results. @@ -35,18 +67,18 @@ Fake it until you make it. But be honest about your abilities or lack of. There Boot camps: The advantage of a boot camp is to pragmatically learn things fast. We almost always overestimate what we can do in a day. Especially during boot camps. Connect to others during the boot camps -## Set goals +### Set goals Your own goals are important but the manager also looks at how the team performs and how someone can help the team perform better. Check whether you are on track with your goals every 2 weeks in order to avoid surprises for the annual review. Make concrete goals for next review. Track and document your progress. Invest in your education. Make your goals known. If you want something, then ask for it. Nobody but you knows what you want. -## Ratings +### Ratings That's a trap: If you have to rate yourself, that's a trap. That never works in an unbiased way. Rate yourself always the best way but rate your weakest part as high as possible minus one point. Rate yourself as good as you can otherwise. Nobody is putting for fun a gun on his own head. * Don't do peer rating, it can fire back on you. What if the colleague becomes your new boss? * Cooperate rankings are unfortunately HR guidelines and politics and only mirror a little your actual performance. -## Promotions +### Promotions The most valuable employees are the ones who make themselves obsolete and automate all away. Keep a safety net of 3 to 6 months of finances. Safe at least 10 percent of your earnings. Also, if you make money it does not mean that you have to spent more money. Is a new car better than a used car which both can bring you from A to B? Liability vs assets. @@ -58,7 +90,7 @@ The most valuable employees are the ones who make themselves obsolete and automa * If you want a raise be specific how much and know to back your demands. Don't make a thread and no ultimatums. * Best way for a promotion is to switch jobs. You can even switch back with a better salary. -## Finish things +### Finish things Hard work is necessary for accomplish results. However, work smarter not harder. Furthermore, working smart is not a substitute for working hard. Work both, hard and smart. @@ -272,15 +304,17 @@ Unit testing Vs regression testing: Unit tests test the smallest possible unit a * The war of Art (to combat procrastination) * Willpower Instinct -Other book notes of mine are: +E-Mail your comments to `paul@nospam.buetow.org` :-) -[2023-03-16 "The Pragmatic Programmer" book notes](./2023-03-16-the-pragmatic-programmer-book-notes.md) -[2023-04-01 "Never split the difference" book notes](./2023-04-01-never-split-the-difference-book-notes.md) -[2023-05-06 "The Obstacle is the Way" book notes](./2023-05-06-the-obstacle-is-the-way-book-notes.md) -[2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes (You are currently reading this)](./2023-07-17-career-guide-and-soft-skills-book-notes.md) -[2023-11-11 "Mind Management" book notes](./2023-11-11-mind-management-book-notes.md) +Other book notes of mine are: -E-Mail your comments to `paul@nospam.buetow.org` :-) +[2024-10-24 "Staff Engineer" book notes](./staff-engineer.md) +[2024-07-07 "The Stoic Challenge" book notes](./the-stoic-challenge.md) +[2024-05-01 "Slow Productivity" book notes](./slow-productivity.md) +[2023-11-11 "Mind Management" book notes](./mind-management.md) +[2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes (You are currently reading this)](./career-guide-and-soft-skills.md) +[2023-05-06 "The Obstacle is the Way" book notes](./the-obstacle-is-the-way.md) +[2023-04-01 "Never split the difference" book notes](./never-split-the-difference.md) +[2023-03-16 "The Pragmatic Programmer" book notes](./the-pragmatic-programmer.md) -[More books and other resources I found useful.](../resources.md) [Back to the main site](../) diff --git a/notes/eat-that-frog.md b/notes/eat-that-frog.md new file mode 100644 index 00000000..ab917bdf --- /dev/null +++ b/notes/eat-that-frog.md @@ -0,0 +1,102 @@ +# "Eat That Frog" book notes + +These are my personal book notes from Brian Tracy's "Eat That Frog!" They are for myself, but I hope they might be useful to you too. + +## Table of Contents + +* [⇢ "Eat That Frog" book notes](#eat-that-frog-book-notes) +* [⇢ ⇢ Time and Task Management](#time-and-task-management) +* [⇢ ⇢ Prioritizing Tasks](#prioritizing-tasks) +* [⇢ ⇢ Goal Setting and Planning](#goal-setting-and-planning) +* [⇢ ⇢ Efficiency and Procrastination](#efficiency-and-procrastination) +* [⇢ ⇢ Project Management and Prioritization](#project-management-and-prioritization) +* [⇢ ⇢ Effective Work Strategies](#effective-work-strategies) +* [⇢ ⇢ Maintaining Productivity](#maintaining-productivity) +* [⇢ ⇢ Attitude and Technology Management](#attitude-and-technology-management) + +## Time and Task Management + +There's never enough time to complete all tasks; it’s a never-ending river of responsibilities. Focus on what matters most instead. There is never enough time to finish everything, but there's always time to finish the most important things. Focus on one single, most important task until it's finished. Single-tasking is the most important practice in life. The key to success is action. You will always be behind on some tasks. The key is to be selective. + +## Prioritizing Tasks + +Eat the Frog: Tackle the most terrible tasks of the day, the ones you procrastinate on the most. Start with the most difficult and ugliest task first. Resist the urge to start with the easiest task. + +Three qualities necessary but learnable to form a habit of getting things done: + +* 1. Decision +* 2. Discipline +* 3. Determination + +Visualize yourself as the person who gets important stuff done on time and consistently. Definiteness of purpose and desire to achieve are crucial. Clarity is likely the most important concept in productivity. The more clarity, the more determination, and the easier it is to eat the frog. Strive for clarity. Think on paper and write out exactly what you want. Unwritten goals are merely wishes or fantasies. + +## Goal Setting and Planning + +* Set deadlines or sub-deadlines. No deadline means no urgency, leading to procrastination. +* Written goals drive achievement. The more you write, the more you think about them, and the stronger the desire to accomplish them. +* An average plan with tasks done is better than a perfect plan without action. Always get something done; never miss a day, always push forward. +* Write down the ten most important goals. Pick the one with the most impact on your life and work towards it every day to change your life. +* Plan every day in advance. Bring the future into the now so you can act immediately. + +## Efficiency and Procrastination + +With a plan, overcoming procrastination becomes easier. Ten minutes of planning can save two hours of work. It's amazing how few people actually plan their work. The subconscious mind works on items from your list overnight, providing insights when you start working. + + Create lists a day before: + +* Monthly list +* Weekly list (updated as the week progresses) +* Daily list the night before + +Plan every week and month in advance. Always work from the list. Add new items back to the list. + +## Project Management and Prioritization + +Each project should have a list of items to complete, ordered by priority. Ten percent planning can make the remaining ninety percent more efficient. Most people procrastinate on the least valuable eighty percent of items. The most valuable twenty percent of items provide eighty percent of the benefits but are also the hardest. + +Resist the habit of handling low-value tasks first, as you may never finish them. Focus on the long-term factor—it’s significant for success. + +Think in five, ten, or twenty years into the future. What you do now will have long-term impacts. Consider long-term consequences, not short-term gains. Unsuccessful people often focus on short-term goals and pleasures. + +Whatever task you undertake, add twenty percent to the planned time—then you may finish early and feel relaxed. Regularly ask, "What is the current task with the highest value at this moment?" to maintain focus. + +## Effective Work Strategies + +* Do first things first and second things never. Set clear priorities. +* Use creative procrastination by putting off less critical "ugly frogs." +* Only by controlling what you say "no" to can you control your life and time. +* Early and often, reject anything not of high value to your life. +* No spare time means new priorities replace old activities (e.g., spend more time with family, reading, or sport). +* Poor performance causes procrastination; people avoid areas where they aren't proficient. Everyone has strengths and weaknesses. +* Set goals to improve in areas that need development. +* Identify and develop skills that have the biggest positive impact on your life. +* Continual improvement transforms your life. +* Effective work leads to a decent work-life balance, enhancing life quality at home. + +## Maintaining Productivity + +Start with the highest value task of the day by just getting started—often the hardest part. A tidy desk makes starting easier. +Prepare ahead to get eighty percent right and correct the rest later. Don’t be a perfectionist. Be ready to fail; you miss one hundred percent of the shots you don't take. Focus on one thing at a time to enhance efficiency. Divide "big frogs" into many small tasks to tackle procrastination. + +Continuous learning is essential for success. When you know how to do something, procrastination decreases. Learn what you need—prioritize learning. Utilize commute times effectively (e.g., listening to educational audio). Identify key skills and limiters; prioritize improvement in these areas. Decide to excel in your chosen field and enjoy it. + +Take responsibility—don’t wait for others to motivate you. Leaders work without supervision. Develop the habit of putting pressure on yourself and choosing your own "frog." + +## Attitude and Technology Management + +The reputation you build with yourself comes with meeting self-imposed deadlines. Regardless of your mood, always appear cheerful and tell others you're feeling terrific; optimists find positives in setbacks and seek solutions. Reserve energy for achieving goals, rather than criticizing others. + +Technology can be a best friend or worst enemy. Unplug regularly (e.g., one day per week) and treat technology as a tool, not a master. + +Avoid task switching and context shifting. Minimize message checking in the mornings. Only check messages briefly if needed, and limit to twice per day. Cultivate a habit of focused work every morning (e.g., two to three hours). + +The "Salami Slice" or "Swiss Cheese" method facilitates tackling daunting projects by breaking them into smaller pieces. Urgency triggers high performance. Aim to accomplish three to five things in a workday to achieve ninety percent focus. + +Improve specific key skills to increase productivity and enter "the zone." + +Other book notes of mine are: + + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +[Back to the main site](../) diff --git a/notes/fluent-forever.md b/notes/fluent-forever.md new file mode 100644 index 00000000..e45c7596 --- /dev/null +++ b/notes/fluent-forever.md @@ -0,0 +1,7 @@ +These are my personal book notes from Gabriel Weyner's "Fluent Forever" They are for myself, but I hope they might be useful to you too. + + + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +[Back to the main site](../) diff --git a/notes/index.md b/notes/index.md index e229210c..14332954 100644 --- a/notes/index.md +++ b/notes/index.md @@ -2,13 +2,22 @@ ## To be in the .zone! +['When: The Scientific Secrets of Perfect Timing' book notes](./when.md) ['The Stoic Challenge' book notes](./the-stoic-challenge.md) +['Science of Living' book notes](./the-science-of-living.md) ['The Pragmatic Programmer' book notes](./the-pragmatic-programmer.md) +['The Power of Neuroplasticity' book notes](./the-power-of-neuroplasticity.md) ['The Obstacle is the Way' book notes](./the-obstacle-is-the-way.md) ['Staff Engineer' book notes](./staff-engineer.md) +['Slow Productivity' book notes](./slow-productivity.md) +['Search Inside Yourself' book notes](./search-inside-yourself.md) ['Never split the difference' book notes](./never-split-the-difference.md) ['Mind Management' book notes](./mind-management.md) ['Mental Combat' book notes](./mental-combat.md) +[Love People, Use Things](./love-people-use-things.md) +['Joy On Domand' book notes](./joy-on-demand.md) +['Influence without Authority' book notes](./influence-wihout-authority.md) +['Eat That Frog' book notes](./eat-that-frog.md) ['Software Developmers Career Guide and Soft Skills' book notes](./career-guide-and-soft-skills.md) ['A Monk's Guide to Happiness' book notes](./a-monks-guide-to-happiness.md) diff --git a/notes/influence-wihout-authority.md b/notes/influence-wihout-authority.md new file mode 100644 index 00000000..afdac330 --- /dev/null +++ b/notes/influence-wihout-authority.md @@ -0,0 +1,65 @@ +# "Influence without Authority" book notes + +> Last updated 28.4.2024 + +These notes capture key strategies from "Influence Without Authority" by Allan R. Cohen and David L. Bradford for effective interpersonal relationships and influencing others in the workplace without formal authority. + +These are my personal notes, but maybe you will find them usefull too. + +## Table of Contents + +* [⇢ "Influence without Authority" book notes](#influence-without-authority-book-notes) +* [⇢ ⇢ Building Relationships and Communication](#building-relationships-and-communication) +* [⇢ ⇢ Managing Emotions and Conflicts](#managing-emotions-and-conflicts) +* [⇢ ⇢ Strategic Influence and Reciprocity](#strategic-influence-and-reciprocity) +* [⇢ ⇢ Working with Management](#working-with-management) +* [⇢ ⇢ Adapting to Workplace Culture](#adapting-to-workplace-culture) +* [⇢ ⇢ Diplomacy and Discretion](#diplomacy-and-discretion) + +## Building Relationships and Communication + +* Make relationships before they are needed. A good reputation acts as a reserve for difficult times. +* Communicate inclusively by saying "we fix it" instead of "I fix it" to foster teamwork. +* Influence through a give-and-take process. Diagnose the goals of the other person to find what you can offer in exchange for what you need. +* Seeing the pressures others are under can help stop demonizing them and see them as potential allies. +* Present your thoughts in a more business-like manner, less personally. +* In remote meetings, use structured agendas and keep webcams on for better focus and easier opening up via video call as it’s less intense with fewer external clues. + +## Managing Emotions and Conflicts + +* Downplay personal feelings and focus on the task. +* Stay calm in the face of anger and avoid attacking others. Be tough and honest without being disrespectful. +* Avoid blame as it's not helpful. +* Handle conflicts by ensuring the other person feels they also won; aim for win-win situations. + +## Strategic Influence and Reciprocity + +* Insist on what is important to you but may not be to others. +* Understand the law of reciprocity: what you give is expected to be returned in one form or another. +* Give favors before you need them returned to build credit for future influence. +* Recognize the hidden costs in exchanges and represent them when negotiating to ensure fair compensation. +* Many people underestimate the "currencies" they can offer, like craftsmanship or teaching, to influence outcomes favorably. + +## Working with Management + +* Use your boss as a potential ally, seeing them as a partner. +* Be clear about your own goals and priorities when communicating with your boss. +* Ensure you fully understand your boss's directives and the resources available. +* Find projects or cases that align with your boss’s interests to involve them effectively. +* Present new ideas to your boss only when they are well thought out and the benefits are clear. +* The goal is to maintain a supportive work relationship with your boss as a partner, not to critique them. If alignment isn’t possible, consider moving on. + +## Adapting to Workplace Culture + +* Early successes can lead to better cooperation within teams. +* Adjust to company culture when asking for things. +* Recognize that truly powerful people don't need to show off but address problems directly and empower others. + +## Diplomacy and Discretion + +* The three rules of being a diplomat: never tell a lie, never tell everything, and when in doubt, go to the bathroom. +* Train your reflexes to respond appropriately in challenging situations. + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +[Back to the main site](../) diff --git a/notes/joy-on-demand.md b/notes/joy-on-demand.md new file mode 100644 index 00000000..db98f55c --- /dev/null +++ b/notes/joy-on-demand.md @@ -0,0 +1,202 @@ +# "Joy On Domand" book notes + +## Table of Contents + +* [⇢ "Joy On Domand" book notes](#joy-on-domand-book-notes) +* [⇢ ⇢ Mindfulness and Joy](#mindfulness-and-joy) +* [⇢ ⇢ Joy and Happiness](#joy-and-happiness) +* [⇢ ⇢ Training Joy: Easing, Inclining, and Uplifting](#training-joy-easing-inclining-and-uplifting) +* [⇢ ⇢ Joy and Pain](#joy-and-pain) +* [⇢ ⇢ Path to Happiness](#path-to-happiness) +* [⇢ ⇢ Difference Between Joy and Happiness](#difference-between-joy-and-happiness) +* [⇢ ⇢ The Spiral of Joy and Practice](#the-spiral-of-joy-and-practice) +* [⇢ ⇢ Inner Peace and Pain](#inner-peace-and-pain) +* [⇢ ⇢ Benefits of Mind Training](#benefits-of-mind-training) +* [⇢ ⇢ Practicing Mind Training](#practicing-mind-training) +* [⇢ ⇢ Creativity and Mindfulness](#creativity-and-mindfulness) +* [⇢ ⇢ The Joyful Mind and Creativity](#the-joyful-mind-and-creativity) +* [⇢ ⇢ Confidence and Equanimity](#confidence-and-equanimity) +* [⇢ ⇢ Resilience and Growth](#resilience-and-growth) +* [⇢ ⇢ Experiencing Joy](#experiencing-joy) +* [⇢ ⇢ Compassion and Joy](#compassion-and-joy) +* [⇢ ⇢ Meditation and Mindfulness](#meditation-and-mindfulness) +* [⇢ ⇢ The Joy of Exercise](#the-joy-of-exercise) +* [⇢ ⇢ Kick-Starting Joy](#kick-starting-joy) +* [⇢ ⇢ Benefits of Meditation](#benefits-of-meditation) +* [⇢ ⇢ Meditation Habits](#meditation-habits) +* [⇢ ⇢ Amplifying Joy](#amplifying-joy) +* [⇢ ⇢ Gratitude and Perspective](#gratitude-and-perspective) +* [⇢ ⇢ Awareness of Absence](#awareness-of-absence) +* [⇢ ⇢ Compassion and Loving-Kindness](#compassion-and-loving-kindness) +* [⇢ ⇢ Path to Compassion](#path-to-compassion) +* [⇢ ⇢ Practicing Loving-Kindness](#practicing-loving-kindness) +* [⇢ ⇢ Understanding Suffering](#understanding-suffering) +* [⇢ ⇢ Letting Go](#letting-go) + +## Mindfulness and Joy + +Happiness is highly trainable in the same way that physical qualities such as strength and agility are. People who won a lot of money in the lottery or who were paralyzed in accidents eventually returned to their average level of happiness. With physical health and fitness, every single aspect of your life improves. You have more energy, suffer fewer sick days, and become more successful at your work. You look better in the mirror, you are confident, and you feel great. Meditation is, if you will, bicep curls for the mind. We can develop major mental skills like the ability to access joy on demand and, in doing so, improve every single aspect of our lives. + +The mental equivalent of physical exercise is meditation. To practice meditation is to practice with your mind, to get better at doing certain things with it, such as experiencing joy. So mindfulness is a specific way of paying attention, and mindfulness meditation means practicing this way of paying attention. When the author heard the sentence, "It is all about cultivating the mind," in an instant, everything in his life suddenly made sense. There is now no doubt in my mind whatsoever that meditation can lead to happiness in real life. + +## Joy and Happiness + +The authors baseline happiness was once quite low, often bordering on misery. Many believe that one's baseline happiness is static and unchangeable, yet he is evidence to the contrary, having elevated his mind from a significantly low point to a much higher level through just a few years of dedicated practice. This transformation echoes the experiences of others who, inspired by spiritual teachers and through lifelong training, have attained enduring inner peace and joy, as well as what they might humbly describe as some degree of inner freedom and compassion. + +Notably, individuals who participated in meditation classes, with little or no prior experience, reported substantial increases in happiness after only a few days or weeks of meditation practice. This aligns with findings from a 2003 study, which demonstrated that a mere eight weeks of mindfulness training can lead to significant, happiness-related changes in brain structure. + +Joy and happiness are highly trainable. When we are eating chocolate, we experience joy, and when we are just sitting there not eating chocolate, we still experience joy. In order to do this, we train the mind to access joy even when it is free from stimulation. This is also the secret to raising your happiness set point. To train the mind to access stimulus-free joy, we need to understand how joy arises independent of sensual stimulation and then cultivate those skills. + +## Training Joy: Easing, Inclining, and Uplifting + +There are three main skills: easing, inclining, and uplifting. + +* Easing into Joy: Resting the mind puts it into a state of ease. When the mind is at ease, joy becomes more accessible. Be joyful at rest—no ego stroking or sensual pleasure required. +* Inclining the Mind Toward Joy: We learn to notice joy and give it our full attention. We learn where to look in order to see and appreciate joy that is already available to us in moments that we hadn't noticed before, in the pleasures of ordinary activities. Inviting and noticing joy become part of our meditation practice as well as habits in everyday life. The more the mind becomes familiar with joy, the more it perceives joy. +* Uplifting the Mind: Especially joy arising from goodness, generosity, loving-kindness, and compassion. With training in easing, inclining, and uplifting the mind comes the increasing ability to access joy on demand in most normal life circumstances (i.e., in the absence of overwhelming difficulties such as losing a livelihood or a loved one). + +Someone told one, "I have found that I can at any moment take a conscious breath and access joy. In fact, this has been so helpful that I use my watch's chronometer to remind me to take at least one breath per hour when I am fully present to it." After practicing attending to the joy of loving-kindness for two minutes, she slept better than she had in years. + +## Joy and Pain + +The same mental equipment we use to train in uplifting our minds, inclining toward joy, and easing into joy gives us the strength and skills we need to deal with difficulties and emotional pain. These three things—easing, inclining, and uplifting—make what appears to be painful less painful, and what is neutral more joyful. Your happiness set point can be upgraded. + +Most people aren't aware that joy independent of sensual or ego stimulation is even possible. Some believe you need a lot of money to experience joy, while others think happiness can only be found by giving up everything and living in a hut in the woods. You might believe you need to meditate for many years to access joy, but as you will see, you can begin to experience benefits in one breath. + +Joy that comes from within—such as from a peaceful mind as a result of taking a few breaths, joy from being kind toward others (which involves other people but does not depend on them), joy from our generosity, joy from doing the right thing—all this joy is ours to have, independent of circumstances. If we do accidentally lose our joy, or something really bad happens and overwhelms us, there's still joy in knowing we can get it back. Joy isn't elusive when you know where and how to look. + +## Path to Happiness + +Life can be strange. Sometimes you find something only when you stop looking for it—like searching for keys for an hour and then seeing them sitting on a shelf three feet in front of you. When the author of this book started to become skillful at accessing joy independent of sensual or ego pleasures, he became much happier, and his desperate desire for worldly success also began to wane. Without "proving himself," he found success. The opposite happened, and he became even more successful. Joy leads to happiness, and happiness leads to success. + +## Difference Between Joy and Happiness + +What is the difference between joy and happiness? Happiness is an optimal state of being. Joy, in contrast, is a pleasurable feeling. It is an emotion. It is in the moment, while happiness is more of a net effect, over time, of mental health and fitness and personal flourishing. Joy is a building block of happiness. A happy life is made up of many moments of joy. While happiness doesn't mean every moment is pure joy, there is no such thing as a joyless path to happiness. + +The ability to access joy on demand enables to build a happy life. In this sense, joy leads to happiness. When we think, "When I am successful, I will be happy," the opposite is true. Success does not lead to happiness. Instead, happiness leads to success. Joy and happiness are trainable. If you want to be successful, it is highly recommended to learn to be happy first. + +Since wealth is a personality multiplier, it is also an experience multiplier. If you are miserable when you are middle class, you will likely be even more miserable when you are wealthy. Similarly, if you're happy when you are middle class, you're likely to be even happier wealthy, for the same reason. The key is joyful practice. + +## The Spiral of Joy and Practice + +Perform an activity that requires some level of skill that reinforces you to do more of this. The same is true for joyful practice. You may find yourself doing it frequently and getting better at it. As you get better at it, you may derive even more enjoyment from it. When you enjoy it more, you do it even more and get even better at it, and so on. + +Joy and meditation are another pair of really nice things that form a virtuous cycle with each other. Meditation is training of the mind. Joy becomes highly accessible in a trained mind. With training, the mind learns to access inner joy with increasing ease and frequency. At the same time, the joyful mind is at peace, a peaceful mind is easily focused, and a focused mind becomes more trainable, thereby making meditation practice even more effective. Thus, a virtuous and joyful cycle forms. + +## Inner Peace and Pain + +Not every moment will be joyful, but knowing that you can count on joy to happen again, and in increasing amounts, tends to improve your overall mood. Inner joy relies on inner peace, so that is our practical starting point. Joy makes you a kinder, more compassionate person, and kindness and compassion bring you more joy. With inner peace, inner joy, and compassion, you gain confidence, charisma, creativity, self-awareness, well-being, emotional resilience, happiness, humor, popularity, courage, and success in every arena, plus personal freedom. + +Joy and pain can coexist. Just because you are in pain doesn't mean you can't also access joy. This is the silver lining of pain: whatever else it is, it's an opportunity to practice getting better. Joy can improve every aspect of life. It resets happiness set points, turning miserable people into jolly ones. With practice, joy can become your personality and your whole life. + +## Benefits of Mind Training + +The first, most basic and possibly most important benefit of mind training is the ability to calm the mind on demand. The ability to calm the mind on demand also has profound implications for leadership. Imagine you're in a meeting room with your coworkers in the middle of a crisis. A key part of leadership is the ability to think calmly and clearly under pressure. By training yourself to calm the mind, you become a more effective leader. + +The second basic benefit of mind training is clarity of mind. The third basic benefit of mind training is emotional resilience, especially in response to emotional pain. In the affective step, we manage the emotionality involved. Here, we mindfully and objectively perceive the emotions as they happen in the body. After a while, we may recognize that even these afflictive emotions are merely sensations in the body and that they are constantly changing, arising, and ceasing over time. + +## Practicing Mind Training + +Mind training enables emotional resilience. In mind training, we practice calming the mind in difficult situations, perceiving the process of emotion at a high resolution, and cultivating compassion and objectivity, thereby strengthening our ability to take all three steps when we're faced with emotional pain. With increasing calmness, clarity, and resilience, we become increasingly capable of overcoming the suffering in the life. Creativity also improves with mind training. + +The author initially made this discovery in an unexpected way: a lot of good ideas and insights came to him while he was meditating. The mind that is alert and relaxed sometimes gets creative, and when that happens, it became creative during meditation. The two most difficult engineering problems he had to solve both came to him during mindfulness practice, and because of that, he got promoted. When the mind is alert and relaxed at the same time, relaxation gives random ideas space to arise and play, and alertness lets us see them and their connections. + +## Creativity and Mindfulness + +Beyond his own first-person experience, he later learned that the relationship between relaxed attention and creativity is well-known among people who rely on creativity for a living. Steve Jobs, for example, famously said: "If you just sit and observe, you will see how restless your mind is. If you try to calm it, it only makes it worse, but over time it does calm, and when it does, there's room to hear more subtle things - that's when your intuition starts to blossom and you start to see things more clearly and be in the present more. Your mind just slows down, and you see a tremendous expanse in the moment. You see so much more than you could see before." + +It's a discipline; you have to practice. At first, his ability to focus worked against him, and he couldn't solve any puzzles. Then, he figured out how to use his extraordinary powers of cognitive control to unfocus, to let go and let his brain make what Kounios believes were necessary associations in the right hemisphere of the brain for the solution to occur. After that, he was unstoppable, solving all the puzzles the experimenters gave him. + +## The Joyful Mind and Creativity + +Not only is the alert and relaxed mind highly conducive to creativity, but studies have shown that a joyful mind is also highly conducive to creativity. One study even shows that a joyful mind's influence on creativity lasts up to two days after the positive mood was felt. In other words, if you are happy today, you are more creative today, tomorrow, and the day after, regardless of how you feel tomorrow and the day after. A joyful mind is a relaxed mind (and vice versa). + +One of the biggest surprise discoveries of his life is that self-confidence can be trained by putting the butt onto a meditation cushion. Confidence is highly sustainable because it is independent of success or failure. With enough self-awareness, you know how to play to your strengths, you know how to compensate for your weaknesses. Navigate skillfully in most situations. Occasionally you discover things about yourself that surprise you, but by and large, they are not surprising enough to floor you. + +## Confidence and Equanimity + +There is an additional aspect of confidence that arises from knowing: knowing that you can know. In other words, whatever you need to know, you are fully capable of learning. The second source of confidence is confidence arising from equanimity. This comes in part from the ability to calm the mind on demand. + +Another aspect of confidence arising from equanimity is the ability to hold your ego very lightly. The author was there entirely to serve this group of people, so his own ego and needs were totally irrelevant. At the same time, in order to serve in a way that this audience deserved, he needed to believe that he deserved to be standing in front of them, speaking to them as if he knew something that they didn't. Based on that, he allowed his ego to be (almost embarrassingly) big enough to fill the whole room. + +## Resilience and Growth + +Confidence arising from resilience is the ability to recover: knowing that when things fail, we can always eventually recover. He knows that even if he loses his cool, he can recover it in five to ten seconds under most circumstances. He decided he never wants to be the smartest person in the room. If you are the smartest person in the room, you won't learn anything. Hence, to maximize the personal growth, chose to work in a company where people seemed to be much smarter than you. + +Doing so takes two things: the self-confidence to put yourself in very uncomfortable situations, and the self-awareness to clearly know your values, priorities, and purpose in life. In life, opportunities come fairly often, but if you are unprepared for it or unwilling to jump at it, then it will pass you. People around you will wonder why you are so frequently in the right place at the right time. In fact, you probably don't get any more opportunities than they do—the difference is you can and do take advantage of the ones you get. + +## Experiencing Joy + +When the mind is at ease, it is easier to experience joy without external stimulus. Give joy your full attention to train to incline towards joy. Uplift the mind with goodness (compassion, helping others, etc.). Experience joy on demand with one breath. Joy must not depend on external factors. Joy and happiness are trainable. Train to be happy before trying to be successful. The better you get at something, the more joy you experience. The more you note joy, the better you get. That also applies to meditation. A focused mind is better at training. Every moment is the best moment of life, as we can have joy on demand. Not every moment will be joyful, but knowing that there will be joy will improve the overall mood. So incline towards joy so it becomes a habit. + +## Compassion and Joy + +Compassion is a multiplier of joy. Kindness and compassion are drivers for joy. Joy and pain can coexist. Joy can improve any aspect of your life. Calm the mind on demand, apply it in real life outside of meditation. Temporarily redirect the focus on the breath to calm the mind. Then mindfully observe the emotions happening in the body. Notice emotions are just physical feelings in the body. Restlessness and crankiness can be caused by minor issues. Meditation helps to uncover this. Answers and solutions to problems can be found through meditation. That is highly reproducible. During or after meditation, unexpected associations come. The mind then is alert and relaxed at the same time. + +## Meditation and Mindfulness + +"If I lose my cool, I know I can recover in most cases within 10 seconds." This gives confidence when walking into a room. Meditation increases charisma. It's good to work with colleagues. Treat the person you are interacting with as the most important person in the world. If you say, "I am so happy to see you," it makes you smile and sends out warmth. It makes you charismatic. + +Take on new tasks only when there is an opportunity for personal growth. Doing hard and unpleasant work can be improved by the exercises of the mind from this book. However, mind training is difficult to start and difficult to sustain long-term. Those problems are highly solvable—for example, taking one breath per day with nothing more expected from you. Once this becomes a habit, more will follow anyway. + +## The Joy of Exercise + +There is an analogy between mind training and physical training. Just as you're not sore after a time with physical training, likewise mental training can become smoother. However, both exercise and training can become boring. Joy can help to sustain both mental and physical exercise. Ease into it. The more advanced, the more joy. A virtuous cycle begins. Make exercise not too difficult but still beneficial, so it becomes easy and effective. Skillful application of ease and fun. There’s a reason for playing sports like basketball or tennis because it makes exercise joyful. + +There's the joy point in meditation, where the meditator reaches inner joy during meditation (reproducible). A certain depth enables joy on demand. Peace or joy: one of them is stronger at the joy point. + +## Kick-Starting Joy + +Introduce joy from the beginning of the exercise, whether physical or mental. Kick-start the virtuous circle by easing into the practice. Meditation must not be hard. Easing is the first step to establishing joy in meditation. + +## Benefits of Meditation + +How long to practice meditation before seeing benefits? Many assume it takes a long time, but it can be life-changing after 50 to 100 hours. Also, 100 minutes are sufficient to see some benefits (10 minutes a day for some weeks). Or just take 3 breaths in less than a minute. To calm the mind 95 percent of the time and in difficult situations, half the cases take around 1000 hours of meditation training. Meditation takes a long time to master, but it is easy to learn and brings benefits after a short time. Easy to learn and difficult to master. + +One single slow mindful breath can already make you calmer and more relaxed. If you focus on the breath, you are in the present and free from regret (past) and worry (future). So you are freed from burdens during that breath. Tennis players win grand slams because after each point, within 10 to 15 seconds, they can calm down in the present. At the professional level, tennis is a mental game more than a physical one. + +## Meditation Habits + +Create a habit loop to incorporate mindful breathing into your daily routine. For instance, take a deep breath as the first action of your day or use lying down in bed as a cue. Whenever you find yourself waiting, take a moment to breathe mindfully. Embrace meditation as a remedy for boredom—boredom can evolve into an opportunity for meditation, effectively eliminating the feeling of boredom. + +Allow the mind to settle naturally without forcing it. Use the analogy of clear water: when you throw a stone into it, the water becomes turbulent, but given time, it naturally returns to clarity. Similarly, allow your mind the time and space for things to happen on their own. In Tibetan, meditation means "to become familiar," suggesting that through meditation, you become familiar with your mind. + +Effort can sometimes hinder relaxation, so learn to apply less effort initially to encourage relaxation—don't let the desire to achieve stress you. Focus on achieving relaxation first, despite any instincts of the overachiever's ego. Once you're sufficiently relaxed, you can gradually reapply effort. + +Adopt the mindset of easing, inclining, and uplifting the mind toward joy. Instead of forcing joy, gently incline your mind so that it naturally defaults to a joyful state. This inclination toward joy comes through the familiarization process. In Tibetan, meditation translates to familiarity (if I'm not mistaken). The key is to notice joy whenever it appears. While we usually overlook it, by noticing, we realize joy is constantly present. Make a point to recognize joy, such as during a third breath in a mindfulness practice. + +## Amplifying Joy + +The next step attends joy. Pay intense attention to joy. Hold the 3rd breath of joy and amplify it. Amplify it by smiling. Emotions are encoded in facial muscles. And it goes bidirectional. Just by smiling, you can invite/experience joy. Even a half-smile works. Only loving-kindness and compassion are stronger than that joy. Attend fully to the joy of the first bite of a meal. It is subtle, but it is there. Amplify it with a smile as well. That joy is there. Attend to any pleasant experiences in the beginning (meeting someone, feeling the water in a shower...). The next thing that happens is a significant increase in happiness. As you become more and more grateful for all of those joys. + +## Gratitude and Perspective + +Habituation: Joy will go away as time passes and we take things for granted. Zen mind beginner's mind: down-regulate habituation. By noticing nice things and being grateful for it. But strongest: One day I will die, and everyone I love will die. Remind yourself you and everyone I love will die; it will put us in proper perspective and make us even more grateful for what we have now. Once daily!! The less time someone notices he still has to live, the more joy he will have from the things in life. The joy of not being in pain. When in pain, wish not to be in pain. Oh, when I would not be in pain, I would be so happy. But when you are not in pain, you aren't happy as you forgot to be happy. + +## Awareness of Absence + +Noticing the absence of something does not come naturally to us. The only way to become aware of the absence is to pay attention to it. It is trainable to get reminded. Just note "gone" is a powerful way to notice something previously experienced is no more. Watch thoughts and notice them going away and say "gone." This is especially important for seasoned meditators. The more you practice meditation, the more joy it will bring. But it will not always bring joy due to the imperfect variance of the day-to-day mood. Even for monks, but it is important to continue practices. + +## Compassion and Loving-Kindness + +If you smile more, then it is a good sign that meditation practice is helping. E.g., smile without apparent reasons. Reflexive smile when nervous. Thinking another person to be happy makes me happy (loving kindness). This is another key insight of this book. All to be happy instantly is wishing someone else to be happy. It can also be a complete stranger. After ten seconds of secretly doing that, go back to work. Familiarize with the joy of loving kindness. Concentrate fully on the joy arising. E.g. for a minute. Loving kindness: Wishing self or others to be happy. Compassion: wishing to be without suffering, e.g., compulsion to help someone not to drown. Compassion is the most joyful. Why can it be the greatest source of joy if it involves suffering? Suffering makes it so that courage arrives. Confidence arises because of courage. With courage and confidence, clarity arises. The feeling of interconnectedness arises and a selfless love. + +## Path to Compassion + +It takes thousands of hours to practice this unparalleled level of joy (compassion). Loving-kindness is the gateway drug to compassion. Just practice easily loving kindness a lot and then you become a hardcore compassionist. Always thinking you don't deserve the successes because you were just lucky? Well, still owning the attentions for success. The Four Sublime States Contemplations on Love (loving-kindness), Compassion, Sympathetic Joy, and Equanimity (mind doesn't change when things are given or taken). Equanimity: Stay calm in 8/worldly conditions 1. Gain and loss 2. Honor and dishonor 3. Praise and blame 4. Pleasure and pain. + +## Practicing Loving-Kindness + +One hour of weekly loving-kindness meditation greatly improves interactions with others towards positive emotions. If you are strong in loving-kindness people tend to love you. Loving-kindness paves the way to the remaining 3 sublime states. If you are good in loving-kindness, the remaining ones require only a little extra effort. To experience peace and joy under adversity, there must be nothing done but to let go of the pain. Joy and pain can coexist. If the joy is much stronger, then the pain will be displaced. The other way does not work. If the pain is much stronger, joy can still be there. Can be without suffering. E.g. when in pain, you have aversion. + +## Understanding Suffering + +If you have aversion, you suffer. The anger monster feeds on anger. Emotions are simply sensations in the body. They are not you. "Sitting in the fire": When there is pain, it can do what it wants. Simply watch and observe it. It's not you. Working the emotional pain: Go back and see the bigger picture, why is there the pain? Our local perception is often flawed. Need to step back for the bigger picture. Aversion is the proxy to suffering. When you master meditation, it won't resolve all the suffering. E.g., then you juggle 3 balls, it does not automatically mean that you can juggle 4 or more balls. + +## Letting Go + +When suffering, don't think, just feel. The direct causes for suffering are clinging: wanting something and aversion: not wanting something. And not the sensation or the thought. Practicing loving-kindness and compassion will greatly improve your life in the long run. It will not help in every small occasion, though. But overall in the long run. Strive to let go. + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +[Back to the main site](../) diff --git a/notes/love-people-use-things.md b/notes/love-people-use-things.md new file mode 100644 index 00000000..2f90e499 --- /dev/null +++ b/notes/love-people-use-things.md @@ -0,0 +1,108 @@ +# Love People, Use Things + +These are my personal book notes from "The Minimalist"'s "Love People, Use Things" They are for myself, but I hope they might be useful to you too. + +## The Pursuit of Minimalism and Meaning + +Love people and use things. Ask yourself, "Does this item serve a purpose in my life? Or does it spark joy?" People often believe that possessing item A will bring everlasting happiness. However, after obtaining item A, a new desire for the next item emerges. Happiness from these possessions is fleeting as you return to your baseline mood. + +* Be careful with accumulating items, as they require maintenance: replacing or charging batteries, software updates, fixing, cleaning, etc. +* Owning more reduces time for what truly matters. + +### Sentimental Items + +* For sentimental items you don't use, consider taking a photo or video and then discarding them. +* Pursue happiness by seeking freedom, not possessions. True freedom is elusive and immeasurable. + +### Advertising and Services + +* Free services bombard you with advertisements; it's better to pay for services where creators, not advertisement companies, hold influence. +* Spending on services makes your choices intentional. Time is your most valuable currency, so spend it wisely. +* Reach a state of "enough" in possessions. While more is always possible, ensure there is "enough." + +### Financial Considerations + +When purchasing something new, consider: +1. Can you afford it, both financially and mentally? +2. Does it serve a meaningful purpose? Does it truly improve your life? + +* Consider the hidden costs: storage, maintenance, psychological strain. + +### Decluttering Tips + +* Avoid bringing unnecessary items into your space. +* Limit "just in case" items; you may never need them. Focus on emergency items only within reason. +* "When" items—things you'll definitely use—are acceptable (e.g., stock of toilet paper, toothpaste, or whiskey if you enjoy it). + +### Categorizing Possessions + +Everything fits into three categories: + +* Essentials +* Non-essentials +* Junk + +## Embracing Truth and Overcoming Fear + +Truth is preferable to lies, though it can be uncomfortable, facilitating the prevalence of dishonesty. Simplify life to expose the truth, stripping away its hiding places. + +* Manufactured fears inhibit pursuing personal desires. Fear often keeps us holding onto things "just in case." +* Ask yourself, "What am I afraid of?" The answer is often irrational or rooted in manufactured fears. + +### Health and Well-being + +* The best medicine is free: good food, sleep, exercise, sunshine, and stress reduction. Avoid unnecessary medication. +* If stagnant, try diverse, unconventional methods. Failure is likely, but experimentation is vital. + +### Managing Stress + +* Identify major stressors and address them. +* Resist the fear of missing out; prioritize current focus over FOMO. +* True power lies in maintaining focus. + +* Each item you own must either serve a purpose or bring lasting joy. + +### The 90-90 Rule + +* If you haven't used an item in the last 90 days and won't use it in the next 90, let it go. This covers both seasonal changes. + +## Core Values + +* Health: Without it, nothing else matters, not even possessions. +* Relationships: Share your life with someone. +* Passion, Fulfillment, and Creativity +* Intentional Growth: If not growing, you're decaying. +* Constructive Contribution + +* Index funds outperform gold. +* Technology can transform people into unthinking "zombies." +* Embrace digital minimalism, shifting from constant doing to simply being. + +## Practical Minimalism + +"Don't Upgrade" Rule: + +* Advertising invests millions in inciting desire. Counter this by questioning each upgrade. Once something breaks, decide to leave it, fix, or replace it only if necessary. +* Consider downgrading if it significantly enriches your life. +* Use time for writing, reading, or exercising. + +## Imperfection and Creativity + +* Avoid letting perfect be the enemy of good. "Good enough" is the new perfect. +* Continuous slow progress is key. Perfectionism should not stifle creativity. +* All work, even by professionals, has imperfections. + +## Attitude Towards Possessions + +* Appreciate someone else's joy to eliminate jealousy. +* Don't cling to items; be prepared to abandon them swiftly. Detachment offers flexibility, crucial for self-care. + +## Home and Possessions + +* An expensive watch doesn't grant more time. Keep only what adds genuine value. +* Prioritize high-quality, enduring items. Though initially costly, they save money and time for meaningful activities. +* A minimalistic home can include a reminder of life's absurdities, emphasizing substance over material extravagance. + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +[Back to the main site](../) diff --git a/notes/mind-management.md b/notes/mind-management.md index c19ba472..1f2e7849 100644 --- a/notes/mind-management.md +++ b/notes/mind-management.md @@ -16,6 +16,21 @@ These are my personal takeaways after reading "Mind Management" by David Kadavy. ''' ``` +## Table of Contents + +* [⇢ "Mind Management" book notes](#mind-management-book-notes) +* [⇢ ⇢ It's not about time management](#it-s-not-about-time-management) +* [⇢ ⇢ Empty slots in the calendar](#empty-slots-in-the-calendar) +* [⇢ ⇢ When you safe time...](#when-you-safe-time) +* [⇢ ⇢ Follow your mood](#follow-your-mood) +* [⇢ ⇢ Boosting creativity](#boosting-creativity) +* [⇢ ⇢ The right mood for the task at hand](#the-right-mood-for-the-task-at-hand) +* [⇢ ⇢ Creativity hacks](#creativity-hacks) +* [⇢ ⇢ Planning and strategizing](#planning-and-strategizing) +* [⇢ ⇢ Fake it until you make it. ](#fake-it-until-you-make-it-) + +## It's not about time management + Productivity isn't about time management - it's about mind management. When you put a lot of effort into something, there are: * The point of diminishing returns @@ -91,15 +106,18 @@ You could schedule exploratory tasks when you are under grief. Sound systems sho * Talk slowly and deepen your voice a bit to appear more confident. You will also become more confident. * Also, use power positions for better confidence. -Other book notes of mine are: +E-Mail your comments to `paul@nospam.buetow.org` :-) -[2023-03-16 "The Pragmatic Programmer" book notes](./2023-03-16-the-pragmatic-programmer-book-notes.md) -[2023-04-01 "Never split the difference" book notes](./2023-04-01-never-split-the-difference-book-notes.md) -[2023-05-06 "The Obstacle is the Way" book notes](./2023-05-06-the-obstacle-is-the-way-book-notes.md) -[2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes](./2023-07-17-career-guide-and-soft-skills-book-notes.md) -[2023-11-11 "Mind Management" book notes (You are currently reading this)](./2023-11-11-mind-management-book-notes.md) +Other book notes of mine are: -E-Mail your comments to `paul@nospam.buetow.org` :-) +[2024-10-24 "Staff Engineer" book notes](./staff-engineer.md) +[2024-07-07 "The Stoic Challenge" book notes](./the-stoic-challenge.md) +[2024-05-01 "Slow Productivity" book notes](./slow-productivity.md) +[2023-11-11 "Mind Management" book notes (You are currently reading this)](./mind-management.md) +[2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes](./career-guide-and-soft-skills.md) +[2023-05-06 "The Obstacle is the Way" book notes](./the-obstacle-is-the-way.md) +[2023-04-01 "Never split the difference" book notes](./never-split-the-difference.md) +[2023-03-16 "The Pragmatic Programmer" book notes](./the-pragmatic-programmer.md) -[More books and other resources I found useful.](../resources.md) [Back to the main site](../) + diff --git a/notes/never-split-the-difference.md b/notes/never-split-the-difference.md index 953e8e73..1bfd0a86 100644 --- a/notes/never-split-the-difference.md +++ b/notes/never-split-the-difference.md @@ -16,6 +16,21 @@ These are my personal takeaways after reading "Never split the difference" by Ch ''' ``` +## Table of Contents + +* [⇢ "Never split the difference" book notes](#never-split-the-difference-book-notes) +* [⇢ ⇢ Tactical listening, spreading empathy](#tactical-listening-spreading-empathy) +* [⇢ ⇢ Mindset of discovery](#mindset-of-discovery) +* [⇢ ⇢ ⇢ More tips ](#more-tips-) +* [⇢ ⇢ "No" starts the conversation](#no-starts-the-conversation) +* [⇢ ⇢ Win-win](#win-win) +* [⇢ ⇢ On Deadlines](#on-deadlines) +* [⇢ ⇢ Analyse the opponent](#analyse-the-opponent) +* [⇢ ⇢ Use different ways of saying "no."](#use-different-ways-of-saying-no) +* [⇢ ⇢ Calibrated question](#calibrated-question) +* [⇢ ⇢ The black swan ](#the-black-swan-) +* [⇢ ⇢ More](#more) + ## Tactical listening, spreading empathy Be a mirror, copy each other to be comfy with each other to build up trust. Mirroring is mainly body language. A mirror is to repeat the words the other just said. Simple but effective. @@ -120,14 +135,17 @@ Establish a range at top places like corp. I get... (e.g. remote London on a pro Slow.... it.... down.... -Other book notes of mine are: +E-Mail your comments to `paul@nospam.buetow.org` :-) -[2023-03-16 "The Pragmatic Programmer" book notes](./2023-03-16-the-pragmatic-programmer-book-notes.md) -[2023-04-01 "Never split the difference" book notes (You are currently reading this)](./2023-04-01-never-split-the-difference-book-notes.md) -[2023-05-06 "The Obstacle is the Way" book notes](./2023-05-06-the-obstacle-is-the-way-book-notes.md) -[2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes](./2023-07-17-career-guide-and-soft-skills-book-notes.md) -[2023-11-11 "Mind Management" book notes](./2023-11-11-mind-management-book-notes.md) +Other book notes of mine are: -E-Mail your comments to `paul@nospam.buetow.org` :-) +[2024-10-24 "Staff Engineer" book notes](./staff-engineer.md) +[2024-07-07 "The Stoic Challenge" book notes](./the-stoic-challenge.md) +[2024-05-01 "Slow Productivity" book notes](./slow-productivity.md) +[2023-11-11 "Mind Management" book notes](./mind-management.md) +[2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes](./career-guide-and-soft-skills.md) +[2023-05-06 "The Obstacle is the Way" book notes](./the-obstacle-is-the-way.md) +[2023-04-01 "Never split the difference" book notes (You are currently reading this)](./never-split-the-difference.md) +[2023-03-16 "The Pragmatic Programmer" book notes](./the-pragmatic-programmer.md) [Back to the main site](../) diff --git a/notes/search-inside-yourself.md b/notes/search-inside-yourself.md new file mode 100644 index 00000000..b5659897 --- /dev/null +++ b/notes/search-inside-yourself.md @@ -0,0 +1,799 @@ +# "Search Inside Yourself" book notes + +> Last updated 23.7.2024 + +## Table of Contents + +* [⇢ "Search Inside Yourself" book notes](#search-inside-yourself-book-notes) +* [⇢ ⇢ How to Master Your Mind in 100 Minutes](#how-to-master-your-mind-in-100-minutes) +* [⇢ ⇢ Mindfulness and Personal Development](#mindfulness-and-personal-development) +* [⇢ ⇢ Three Steps of "Search Inside Yourself"](#three-steps-of-search-inside-yourself) +* [⇢ ⇢ Even an Engineer Can Thrive on Emotional Intelligence](#even-an-engineer-can-thrive-on-emotional-intelligence) +* [⇢ ⇢ Emotional Intelligence Enables Three Important Skills](#emotional-intelligence-enables-three-important-skills) +* [⇢ ⇢ ⇢ 1. Stellar Work Performance](#1-stellar-work-performance) +* [⇢ ⇢ ⇢ 2. Outstanding Leadership](#2-outstanding-leadership) +* [⇢ ⇢ ⇢ 3. The Ability to Create the Conditions for Happiness](#3-the-ability-to-create-the-conditions-for-happiness) +* [⇢ ⇢ Attention Training](#attention-training) +* [⇢ ⇢ ⇢ Train Attention](#train-attention) +* [⇢ ⇢ Self-Knowledge and Self-Mastery](#self-knowledge-and-self-mastery) +* [⇢ ⇢ Creating Useful Mental Habits](#creating-useful-mental-habits) +* [⇢ ⇢ Optimize Thyself](#optimize-thyself) +* [⇢ ⇢ Train at the Level of Physiology](#train-at-the-level-of-physiology) +* [⇢ ⇢ ⇢ High-Resolution Perception](#high-resolution-perception) +* [⇢ ⇢ Mindfulness in Two Minutes](#mindfulness-in-two-minutes) +* [⇢ ⇢ ⇢ Meditation is Exercise](#meditation-is-exercise) +* [⇢ ⇢ ⇢ Sustaining Your Practice](#sustaining-your-practice) +* [⇢ ⇢ Breathing as if Your Life Depends on It](#breathing-as-if-your-life-depends-on-it) +* [⇢ ⇢ Happiness is the Default State of Mind](#happiness-is-the-default-state-of-mind) +* [⇢ ⇢ Experience, Without Judging or Reacting](#experience-without-judging-or-reacting) +* [⇢ ⇢ Attention and Mindful Meditation is like MacGyver's Swiss Army Knife](#attention-and-mindful-meditation-is-like-macgyver-s-swiss-army-knife) +* [⇢ ⇢ Meditation techniques](#meditation-techniques) +* [⇢ ⇢ ⇢ Expensive Food Meditation](#expensive-food-meditation) +* [⇢ ⇢ ⇢ Walking Meditation](#walking-meditation) +* [⇢ ⇢ Mindful Listening](#mindful-listening) +* [⇢ ⇢ Lightness and Joy in Meditation](#lightness-and-joy-in-meditation) +* [⇢ ⇢ Mastering Both Focused and Open Attention](#mastering-both-focused-and-open-attention) +* [⇢ ⇢ ⇢ Meditation Circuit Training](#meditation-circuit-training) +* [⇢ ⇢ Zen and a Walking Baby](#zen-and-a-walking-baby) +* [⇢ ⇢ Clarity](#clarity) +* [⇢ ⇢ About Self-Awareness](#about-self-awareness) +* [⇢ ⇢ ⇢ 1. Emotional Awareness](#1-emotional-awareness) +* [⇢ ⇢ ⇢ 2. Accurate Self-Assessment](#2-accurate-self-assessment) +* [⇢ ⇢ ⇢ 3. Self-Confidence](#3-self-confidence) +* [⇢ ⇢ Developing Self-Awareness](#developing-self-awareness) +* [⇢ ⇢ ⇢ Body Scan](#body-scan) +* [⇢ ⇢ ⇢ Scan for Emotion](#scan-for-emotion) +* [⇢ ⇢ ⇢ Journaling](#journaling) +* [⇢ ⇢ My Emotions Are Not Me](#my-emotions-are-not-me) +* [⇢ ⇢ Riding Your Emotions Like a Horse](#riding-your-emotions-like-a-horse) +* [⇢ ⇢ Self-Regulation](#self-regulation) +* [⇢ ⇢ ⇢ Practice of Letting Go](#practice-of-letting-go) +* [⇢ ⇢ ⇢ Know When You Are Not in Pain](#know-when-you-are-not-in-pain) +* [⇢ ⇢ Dealing with Triggers](#dealing-with-triggers) +* [⇢ ⇢ ⇢ Siberian North Railroad](#siberian-north-railroad) +* [⇢ ⇢ ⇢ Siberian North Railroad Practice](#siberian-north-railroad-practice) +* [⇢ ⇢ ⇢ When You Get Triggered:](#when-you-get-triggered) +* [⇢ ⇢ ⇢ Creating Willingness to Experience and Accept the Emotions:](#creating-willingness-to-experience-and-accept-the-emotions) +* [⇢ ⇢ Making Friends with Emotions](#making-friends-with-emotions) +* [⇢ ⇢ Pleasure, Passion, and Higher Purpose](#pleasure-passion-and-higher-purpose) +* [⇢ ⇢ Motivation in Three Easy Steps](#motivation-in-three-easy-steps) +* [⇢ ⇢ ⇢ Alignment: Having Fun for a Living](#alignment-having-fun-for-a-living) +* [⇢ ⇢ ⇢ Flow](#flow) +* [⇢ ⇢ ⇢ Autonomy, Mastery, Purpose](#autonomy-mastery-purpose) +* [⇢ ⇢ Envisioning](#envisioning) +* [⇢ ⇢ ⇢ Discovering My Ideal Future](#discovering-my-ideal-future) +* [⇢ ⇢ Resilience](#resilience) +* [⇢ ⇢ ⇢ Meditation on Resilience](#meditation-on-resilience) +* [⇢ ⇢ Cognitive Resilience](#cognitive-resilience) +* [⇢ ⇢ Empathy](#empathy) +* [⇢ ⇢ Creating Mental Habits](#creating-mental-habits) +* [⇢ ⇢ ⇢ Just Like Me / Loving Kindness Practice](#just-like-me--loving-kindness-practice) +* [⇢ ⇢ Establishing Trust is Good for Work](#establishing-trust-is-good-for-work) +* [⇢ ⇢ ⇢ Three Assumptions](#three-assumptions) +* [⇢ ⇢ ⇢ Empathic Listening](#empathic-listening) +* [⇢ ⇢ Political Awareness](#political-awareness) +* [⇢ ⇢ Mental Habits of Highly Empathic People](#mental-habits-of-highly-empathic-people) +* [⇢ ⇢ ⇢ Being Effective and Loved at the Same Time](#being-effective-and-loved-at-the-same-time) +* [⇢ ⇢ ⇢ Using Kindness to Grow Friendship from an Ugly Situation](#using-kindness-to-grow-friendship-from-an-ugly-situation) +* [⇢ ⇢ Leading with Compassion](#leading-with-compassion) +* [⇢ ⇢ ⇢ Difficult Conversations](#difficult-conversations) +* [⇢ ⇢ Mindful E-Mailing](#mindful-e-mailing) +* [⇢ ⇢ ⇢ Practice of Mindful E-Mailing](#practice-of-mindful-e-mailing) +* [⇢ ⇢ Three Easy Steps to World Peace](#three-easy-steps-to-world-peace) +* [⇢ ⇢ ⇢ Align Meditation with Real Life](#align-meditation-with-real-life) +* [⇢ ⇢ MacGyver's Swiss Army knife](#macgyver-s-swiss-army-knife) +* [⇢ ⇢ Other](#other) +* [⇢ ⇢ Audio Book notes](#audio-book-notes) +* [⇢ ⇢ ⇢ Books to Check Out](#books-to-check-out) +* [⇢ ⇢ ⇢ Videos](#videos) + +## How to Master Your Mind in 100 Minutes + +If you are thinking of reading the book "Search Inside Yourself," you can also check out a very short summary of it in a book called "How To Master Your Mind in 100 Minutes: Increase Productivity, Creativity and Happiness (Collins Shorts, Book 8)." However, it is not the whole story! + +## Mindfulness and Personal Development + +Mindfulness is not about reaching a different destination; it's about fully inhabiting your current state and recognizing the power of your complete presence and awareness at this moment. This book is about the potential everyone has to develop an extraordinarily capable mind that is profoundly peaceful, happy, and compassionate. It emphasizes the importance of deeper emotional awareness—the ability to detect an emotion as it arises, observe it as it subsides, and notice all the subtle changes in between. + +The book also highlights the significance of giving yourself quality time, such as by reducing work hours. By prioritizing self-care, you can discover ways to achieve more while doing less. + +Additionally, it teaches you to distinguish between stories and reality. Following the exercises in this book, you will learn how to calm your mind on demand and perceive your mental and emotional processes with increasing clarity. + +## Three Steps of "Search Inside Yourself" + +1. **Attention Training** +2. **Self-Knowledge and Self-Mastery** +3. **Creating Useful Mental Habits** + +Train your attention to cultivate a mind that is both calm and clear. This quality of mind forms the foundation for emotional intelligence. + +Develop the ability to observe your thought stream and emotional processes with high clarity and from an objective, third-person perspective. This deep self-awareness eventually leads to self-mastery. + +Imagine thinking, "I wish for this person to be happy," whenever you meet anyone. This habit transforms interactions at work, as sincere goodwill is unconsciously picked up by others, fostering trust and leading to highly productive collaborations. + +## Even an Engineer Can Thrive on Emotional Intelligence + +Emotional intelligence is a strong predictor of success at work and fulfillment in life, and it is trainable for everyone. Emotional competencies are not innate talents; they are learned skills that you can acquire with practice. + +Goleman classifies emotional intelligence into five domains: + +* 1. Self-awareness: Knowledge of one's internal states, preferences, resources, and intuitions. +* 2. Self-regulation: Management of one's internal states, impulses, and resources. +* 3. Motivation: Emotional tendencies that guide or facilitate reaching goals. +* 4. Empathy: Awareness of others' feelings, needs, and concerns. +* 5. Social skills: Adeptness at inducing desirable responses in others. + +## Emotional Intelligence Enables Three Important Skills + +* 1. Stellar Work Performance +* 2. Outstanding Leadership +* 3. Creating Conditions for Happiness + +### 1. Stellar Work Performance + +Top six competencies that distinguish star performers from the average in the tech sector are: + +* 1. Strong achievement drive and high achievement standards. +* 2. Ability to focus. +* 3. Conceptual thinking (intellectual competency). +* 4. Analytical ability (intellectual competency). +* 5. Initiative in taking on challenges. +* 6. Self-confidence. + +From these, only two (conceptual thinking and analytical ability) are purely intellectual competencies. The other four are emotional competencies. So the conclusion is, that training your emotional intelligence can help everyone become outstanding at work, even engineers. + +### 2. Outstanding Leadership + +Effective U.S. Navy commanders are "more positive and outgoing, more emotionally expressive and dramatic, warmer and more sociable (including smiling more), friendlier and more democratic, more cooperative, more likable and 'fun to be with', more appreciative and trustful, and even gentler than those who are merely average." "Nice guys finish first." + +### 3. The Ability to Create the Conditions for Happiness + +Happiness is a skill that can be practiced through deliberate training. The other side effects may include resilience, optimism, and kindness. + +## Attention Training + +Train your attention to cultivate a mind that is both calm and clear. This quality of mind forms the foundation for emotional intelligence. + +### Train Attention + +How to begin training emotional intelligence? Begin by training attention. A strong, stable, and perceptive attention that offers calmness and clarity is the foundation upon which emotional intelligence is built. + +To see ourselves objectively, we need the ability to examine our thoughts and emotions from a third-person perspective. The attention should be stable, clear, and non-judgmental. "Response flexibility" refers to the ability to pause before you act, allowing a moment to consider how to react in an emotional situation. + +Between stimulus and response, there is a space. In that space lies our freedom and power to choose our response. In our response lies our growth and happiness. Attention is trained with "mindfulness meditation." + +Mindfulness is a quality of mind that we all experience and enjoy from time to time, but it can be greatly strengthened with practice. Once it becomes sufficiently strong, it leads directly to the attentional calmness and clarity that forms the basis of emotional intelligence. + +There is scientific evidence showing that improving our ability to regulate our attention can significantly impact how we respond to emotions. Simply with attention training, someone can become good at regulating a part of the brain as primitive and important as the amygdala (the part of the brain dealing with emotions). + +"Affect labeling" is a self-regulation technique, which simply means labeling feelings with words. When you label an emotion you are experiencing (for example, "I feel anger"), it helps to manage that emotion. + +## Self-Knowledge and Self-Mastery + +Develop the ability to observe your thought stream and emotional processes with high clarity and from an objective, third-person perspective. This deep self-awareness eventually leads to self-mastery. + +## Creating Useful Mental Habits + +Imagine thinking, "I wish for this person to be happy," whenever you meet anyone. This habit transforms interactions at work, as sincere goodwill is unconsciously picked up by others, fostering trust and leading to highly productive collaborations. + +## Optimize Thyself + +The aim of developing emotional intelligence is to help you optimize yourself and function at an even higher level than what you are already capable of. Emotional skillfulness frees us from emotional compulsion. Neuroplasticity tells us that we can intentionally change our brains with training. + +It is possible to train the brain to overcome even serious emotional disorders; just imagine the possibility of using it to greatly improve the quality of our emotional lives. This also works with physical pain. Suffering can be trained "away." Brain. Trainable. Good. + +Social skills are highly trainable and can also help others love you, by the way. + +## Train at the Level of Physiology + +Every emotion has a correlate in the body. Emotional experiences are not just psychological; they are also physiological. We can usually experience emotions more vividly in the body than in the mind. Therefore, when trying to perceive an emotion, it is often more effective to bring our attention to the body rather than the mind. + +### High-Resolution Perception + +Your perception can become so refined across both time and space that you can observe an emotion the moment it arises, perceive its subtle changes, and watch it in the moment it ceases. The way to develop high-resolution perception of emotion is to apply mindfulness to the body. + +Because emotions have such a strong physiological component, developing emotional intelligence necessitates operating at the level of physiology. Much of our intuition comes from our body, and learning to listen to it can be very fruitful. Our approach to cultivating emotional intelligence begins with mindfulness. + +## Mindfulness in Two Minutes + +In the evenings, sit together in mindfulness for two minutes. For two minutes a day, quietly enjoy being alive and being together. More fundamentally, for two minutes a day, enjoy just being. The good news is that mindfulness is embarrassingly easy. The hard part in mindfulness is deepening, strengthening, and sustaining it, especially in times of difficulty. + +The creatively named *Easy Way* is to simply bring gentle and consistent attention to your breath for two minutes. That's it. The *Easier Way* is, as its name may subtly suggest, even easier: All you have to do is sit without an agenda for two minutes. + +### Meditation is Exercise + +There is no such thing as bad meditation. After a few weeks or months of starting a regular meditation regime, you have more energy; your mind becomes calmer, clearer, and more joyful; you get sick less; you smile more; your social life improves (because you smile more); and you feel great about yourself. +The best meditation posture is one that helps you remain alert and relaxed at the same time for long periods of time. Use this as a guideline, and find whatever posture is comfortable for you. Keeping eyes closed during meditation is good because it helps you stay calm and keeps away distractions. However, the problem is that you may fall asleep. + +The idea is to open your eyes slightly, look slightly downward, and gaze at nothing in particular. Whether eyes are closed or opened, try out what works best for you. + +### Sustaining Your Practice + +The keyword is practice. Mindfulness is like exercise - it is not sufficient to just understand the topic; you can only benefit from it with practice. The bad news is that after the first few days, many people find it hard to sustain the practice. Happily, the difficulty of sustaining a mindfulness practice often lasts only a few months. + +It is like starting an exercise regime. The first few months are usually really hard - you probably have to discipline yourself into exercising regularly, but after a few months, you find your quality of life changing dramatically. You become happier, calmer, more emotionally resilient, more energetic, and people like you more because your positivity emanates onto them. + +* *Do less than you can:* Keep the practice from becoming a burden. If mindfulness practice feels like a chore, it's not sustainable. +* *Take one breath a day:* I may be the laziest mindfulness instructor in the world because I tell my students all they need to commit to is one mindful breath a day. Just one. Breathe in and breathe out mindfully, and your commitment for the day is fulfilled; everything else is a bonus. If you commit to one breath a day, you can easily fulfill this commitment and can then preserve the momentum of your practice. + +Also, creating the intention to meditate is itself meditation. + +## Breathing as if Your Life Depends on It + +There is nothing mysterious about meditation; it's really just mental training. Meta-attention, the attention of attention, is the ability to pay attention to attention itself. Simply put, meta-attention is the ability to know that your attention has wandered away. + +When your meta-attention becomes strong, you will be able to recover a wandering attention quickly and often. If you recover attention quickly and often enough, you create the effect of continuous attention, which is concentration. When the mind becomes highly relaxed and alert at the same time, three wonderful qualities of mind naturally emerge: calmness, clarity, and happiness. + +## Happiness is the Default State of Mind + +Happiness is not something you pursue; it is something you allow. Happiness is just being. That insight changed my life. The biggest joke is that after all that has been done in the history of the world in the pursuit of happiness, it turns out that sustainable happiness is achievable simply by bringing attention to one's breath. Life is funny. + +Mindfulness can increase happiness without changing anything else. We take for granted many of the neutral things in life, such as not being in pain, having three meals a day, and being able to walk from point A to point B. In mindfulness, these become causes of joy because we no longer take them for granted. Pleasant experiences become even more pleasant because our attention is there to fully experience them. + +## Experience, Without Judging or Reacting + +Whatever it is that you are experiencing, just experience it. Do not judge it to be good or bad. Let it be. If possible, try not to react to it. If you have to react (for example, if you really have to scratch), try to take five breaths before reacting. + +The reason for this is to practice creating space between stimulus and reaction. The more we are able to create space between stimulus and reaction, the more control we will have over our emotional lives. This skill that you develop here during sitting can be generalized to daily life. + +## Attention and Mindful Meditation is like MacGyver's Swiss Army Knife + +The reason we create a powerful quality of attention is to develop insights into the mind. Just eight weeks of mindfulness meditation made subjects measurably happier and showed an increase in immunity. Upgrading the operating efficiency of our brains with mindfulness meditation is akin to pumping iron: if you work out a lot, you will have bulging muscles even when you are not working out in the gym. Similarly, with extensive meditation training, you will have strong mental "muscles" for calmness, clarity, and joy even when you are just hanging out. + +It is remarkable that mindfulness helps improve everything from attention and brain function to immunity and skin disease. Mindfulness feels almost like MacGyver's Swiss Army knife - it is useful in every situation. Your attention naturally gravitates towards things that are either very pleasant or very unpleasant, so if you can train yourself to keep your attention on something as neutral as your breath, then you can maintain your attention on anything. + +## Meditation techniques + +### Expensive Food Meditation + +Imagine if every meal was rare and expensive. Call it "expensive food meditation." In this case, every meal becomes superb. Accelerate this by purposefully bringing mindfulness to daily activities. Bring full moment-to-moment attention to every task with a nonjudgmental mind, and every time your attention wanders away, just gently bring it back. + +It is just like sitting meditation, except the object of meditation is the task at hand rather than just the breath. + +### Walking Meditation + +Practice walking meditation every time you walk from the office to the restroom and back. Mindful walking is restful for the mind, and a relaxed mind is conducive to creative thinking. Problems often get solved in the mind during restroom breaks. + +## Mindful Listening + +When a friend or loved one is speaking to you, adopt a generous attitude by giving the person the gift of your attention and airtime. The most precious gift we can offer others is our presence. When mindfulness embraces those we love, they will bloom like flowers. If there are people in your life you care about, be sure to give them a few minutes of your full attention every day. They will bloom like flowers. + +The main reason we do not listen to others is that we get distracted by our own feelings and internal chatter. The best way to respond to these internal distractions is to notice and acknowledge them. Listening means giving the gift of attention to the speaker. Looping means closing the loop of communication by demonstrating that you have heard what the person is saying. Dipping means checking in with yourself, knowing how you are feeling about what you hear. + +You can practice mindful conversation during any interaction, but it is most useful when communication is at an impasse, such as in a conflict situation. After the speaker offers their input, repeat their remarks in your own words to ensure you understood them correctly. + +## Lightness and Joy in Meditation + +When I was new to meditation, I struggled with the simplest and silliest of all problems: I could not breathe. I tried too hard. Once I stopped trying so hard, I caught myself breathing normally. That was the first time I was able to pay attention to my breath properly. Only by not trying did I finally succeed. + + In a humorous way, meditation is like trying to fall asleep. The more relaxed you are, the less you are fixated on the goal, the easier it becomes, and the better the outcome. The better you are at letting go, the better you become at both meditating and falling asleep. Relaxation is the foundation of deep concentration. + +A similar mechanism works in the practice of mindfulness. I found lightness to be highly conducive to mindfulness. Lightness gives rise to ease of mind. When the mind is at ease, it becomes more open, perceptive, and nonjudgmental. + +A good way to practice mindfulness is by using joy as an object of meditation, especially the type of joy with a gentle quality that doesn't overwhelm the senses. For example, taking a nice walk, holding hands with a loved one, enjoying a good meal, carrying a sleeping baby, or sitting with your child while she is reading a good book are great opportunities to practice mindfulness by bringing full moment-to-moment attention to the joyful experience, to the mind, and to the body. I call it Joyful Mindfulness. + +The first effect of bringing mindfulness to joyful experiences is that they become even more enjoyable, simply because you are more present to enjoy them - extra enjoyment at no additional cost. Joyful Mindfulness is not a replacement for formal sitting practice but a complement to it. Formal practice requires you to bring mindfulness to neutral experiences like your breath. + +* Formal mindfulness: Gives you better mindfulness gains but also requires discipline. +* Joyful Mindfulness: Gives you fewer mindfulness gains but is far more sustainable. + +Doing both practices every day is like making use of the full set of gears in your car: You can start the car moving smoothly and get it to a good speed. After a while, formal meditation may be infused with a powerful quality known in Sanskrit as sukhā. The most common translations for sukhā are "bliss," "ease," and "happiness." + +Sukhā is the quality of joy that does not require energy. It is almost like white noise in the background, something that is always there but seldom noticed. It is highly sustainable and so subtle that it takes a very quiet mind to access. You need to learn to quiet the mind to reach it. Once skillful at doing that, you have a highly sustainable source of happiness that does not require sensual input. Talk about life-changing. + +## Mastering Both Focused and Open Attention + +Strength and stamina. To be a well-rounded athlete, it is good to have both. Focused attention and open attention. To be an accomplished meditator, it is good to be strong in both. Focused attention is an intense focus on a chosen object. Open attention is a quality of attention willing to meet any object that arrives at the mind or the senses. + +There are a few important features common to both focused and open attention: + +* Strong meta-attention (attention of attention) +* Clarity and vividness of attention +* Both meditations require a balance of effort and relaxation. + +Regarding the last point: Too much effort makes it tiring and unsustainable, while too little effort causes you to lose your grip on your attention. One fun way of maintaining this balance is to play it like a video game: Just difficult enough to be challenging but not so difficult that you will lose every time. In either meditation, it is possible to get into a very good state of ease and flow. Very cool. + +### Meditation Circuit Training + +* 1. Sit comfortably in a position that enables both relaxation and alertness at the same time. +* 2. Shift into focused attention. Focus on the breath or any other object of meditation you choose. Do this for 3 minutes. +* 3. Shift into open attention. Bring your attention to whatever you experience and whatever comes to mind. Do this for 3 minutes. +* 4. Repeat focused attention for 3 minutes and open attention for 3 minutes. +* 5. End by resting the mind. If you like, you can again visualize the breath to be a resting place, or a cushion, or a mattress, and let the mind rest on it. (Long pause). + +## Zen and a Walking Baby + +There seem to be two stages in one's meditation progress, which I call "initial access" and "consolidation." + +* Initial Access Stage: In this stage, you find yourself able to access a certain state of mind, but you cannot maintain that mind for very long. +* Consolidation Stage: This is when you become able to bring up a state of mind on demand, at a desired intensity and duration. Progress in this stage seems to be an exponential function. + +This means you may go for a frustratingly long time without any apparent progress, and then suddenly—boom—within a very short period, you make huge strides and arrive at full consolidation. The lesson here is to avoid feeling discouraged when your meditation does not seem to be progressing. It will come suddenly, and every moment of effort brings you closer to that point. In Zen, we call it gradual effort and sudden enlightenment. + +## Clarity + +Compare two versions of a picture: one with higher resolution and vividness than the other. The combination of resolution and vividness makes the image more useful to us. We can also make meditation more useful in two ways: + +* Increase the Resolution: Enhance the precision at which we perceive our emotions, so we can see emotions the moments they arise and cease, and notice subtle changes in between. +* Increase the Brightness and Contrast: Make our perceptions more vivid. + +This combination provides us with very useful high-definition information about our emotional life. + +## About Self-Awareness + +"I cannot scream at that guy; he is the CEO!" Our engagement of the neocortex in every experience of emotion is a necessary step in gaining control over our emotional lives. The moment you can see a raging river, it means you are already rising above it. Similarly, the moment you can see an emotion, you are no longer fully engulfed in it. + +Daniel Goleman defines emotional competence as a "learned capability based on emotional intelligence that results in outstanding performance at work." He suggests three emotional competencies under the domain of self-awareness: + +### 1. Emotional Awareness + +Recognizing one's emotions and their effects. It asks questions like: What are my strengths and weaknesses? What are my resources and limitations? What matters to me? Accurate self-assessment builds on emotional awareness. + +### 2. Accurate Self-Assessment + +Knowing one's strengths and limits. This is also referred to as "self-objectivity." On competence assessments, average performers typically overestimate their strengths, whereas star performers rarely do; if anything, the stars tend to underestimate their abilities, an indicator of high internal standards. + +### 3. Self-Confidence + +A strong sense of one's self-worth and capabilities. One is able to project confidence not because they make an effort to look confident, but because there's a sense of humor about their own ego or sense of self-importance. + +Remember to treat the ego with humor and let it be small enough that the "self" doesn't matter, but big enough that you feel perfectly comfortable speaking to a Nobel Peace Laureate at a peace conference as an equal. Understand the most immediate failure mode (e.g., stumbling on English words while speaking) and the recovery mode strategy (e.g., breathing deeply, smiling, maintaining mindfulness) and not letting occasional faltering bother you. + +The type of deep self-knowledge and blatant self-honesty needed for sustainable self-confidence means having nothing to hide from oneself. We learn about our deepest priorities in life, what is important to us, and what is not important that we can let go. With that clarity, we create space that allows us to view our own emotional lives as if seeing it as an objective third party. In other words, we gain objectivity, and we begin to perceive each emotional experience clearly and objectively as it is. + +## Developing Self-Awareness + +Self-awareness is a neutral mode that maintains self-reflectiveness even in the midst of turbulent emotions. Mindfulness means paying attention in a particular way: on purpose, in the present moment. Both mindfulness and self-awareness are trainable in similar ways. + +### Body Scan + +Emotion is a physical experience; therefore, the best way to create high-resolution awareness of emotion is by applying mindfulness to the body. The simplest way to do it is to bring mindfulness to your body all the time. The body scan is one of the core practices in stress reduction. + +### Scan for Emotion + +Did you find any emotion in your body? If there is any, just notice its presence in the body. If not, just notice the absence of emotions and catch one if it arises in the next two minutes. Notice that we only invite you to bring a positive emotion in this exercise, not a negative one. Attention drives neurological change. By bringing attention to the body, we help it relax. Very often, bodily tension builds up because we are not paying attention to the body. + +### Journaling + +Journaling is the practice of self-discovery by writing to yourself. It is an important exercise to help you discover what is in your mind that is not in clear, conscious view. You are trying to let your thoughts flow onto paper so you can see what comes up. + +The purpose is an open-ended sentence such as "What I am feeling is..." For those three minutes, write down whatever comes to mind. Try not to think about what you're going to write—just write. There is only one rule: Do not stop writing until your time is up. If you run out of things to write, just write, "I ran out of things to write. I have nothing to write. I still have nothing to write..." until you have something to write about again. + +You can think of journaling as mindfulness of thoughts and emotions: paying moment-to-moment, non-judging attention to thoughts and emotions as they arise. Researchers asked 49 college students to take two minutes on two consecutive days and write about something they found to be emotionally significant. The participants registered improvements in mood and performed better on standardized measures of physiological well-being. Four minutes can make a measurable difference. Pick out one or two prompts each day. Here are some suggested prompts: + +* What I am feeling now is... +* I am aware that... +* What motivates me is... +* I am inspired by... +* Today, I aspire to... +* What hurts me is... +* I wish... +* Others are... +* I made a happy mistake... +* Love is... + +## My Emotions Are Not Me + +As we deepen our self-awareness, we eventually arrive at a very important key insight: we are not our emotions. With enough mindfulness practice, you may eventually notice a subtle but important shift—you may begin to feel that emotions are simply what you feel, not who you are. You may begin to see emotions simply as physiological phenomena. Emotions become what we experience in the body, so we go from "I am angry" to "I experience anger in my body." + +This subtle shift is extremely important because it suggests the possibility of mastery over our emotions. If emotions are simply what I experience in my body, then feeling angry becomes a lot like feeling pain in my shoulders after an extreme workout; both are just physiological experiences over which I have influence. Possessing this insight, one creates the possibility of change within oneself. + +## Riding Your Emotions Like a Horse + +> "One can have no smaller or greater mastery than mastery of oneself." —Leonardo da Vinci + +"Rider, where are you going?" The man on the horse answered, "I don't know. Ask the horse." This story provides a metaphor for our emotional lives. The horse represents our emotions. We usually feel compelled by our emotions. We feel we have no control over the horse, and we let it take us wherever it wants to. Fortunately, it turns out that we can tame and guide the horse. It begins with understanding the horse and observing its preferences, tendencies, and behaviors. Once we understand the horse, we learn to communicate and work with it skillfully. + +## Self-Regulation + +Self-regulation is not about avoiding emotions. Self-regulation is not about never having certain emotions. It is about becoming very skillful with them. The question is if it is possible to stop an unwholesome thought or emotion from arising in the first place. + +Based on my own experience, I think it is impossible. It is impossible to stop a thought or emotion from arising. While we cannot stop such a thought or emotion from arising, we have the power to let it go. The highly trained mind can let it go the moment it arises. This is like "writing on water"—the moment it is written, it disappears. + +### Practice of Letting Go + +Pain and suffering are qualitatively distinct, and one does not necessarily follow the other. Letting go is an extremely important skill and one of the essential foundations of meditation practice. Is it possible to let go and still appreciate and fully experience the ups and downs of life? Yes. The key is to let go of two things: grasping and aversion. Grasping and aversion together account for a huge percentage of the suffering we experience—perhaps 90 percent, maybe even 100 percent. The first important opportunity is the possibility of experiencing pain without suffering. + +The theory is that aversion, not the pain itself, is the actual cause of suffering; the pain is just a sensation that creates that aversion. + +> "If you are distressed by anything external, the pain is not due to the thing itself, but to your estimate of it; and this you have the power to revoke at any moment." —Marcus Aurelius + +The second important opportunity is the possibility of experiencing pleasure without the aftertaste of unsatisfactoriness. The biggest problem with pleasant experiences is that they all eventually cease. We can fully enjoy flowers even though they eventually wilt. + +By letting go of grasping and aversion, we can fully adopt the letting-go mind and also fully experience life in its glorious Technicolor detail. In fact, we may be able to experience life more vividly with the letting-go mind because it frees us from the noisy interferences of grasping, aversion, and suffering. + +### Know When You Are Not in Pain + +When we are suffering from pain, we often tell ourselves, "I'll be so happy if I am free from this pain," but when we are free from the pain, we forget to enjoy the freedom from pain. The lack of distress encourages us to enjoy the sweetness of that freedom, thereby helping us to be happier. + +* Do not feel bad about feeling bad. +* Do not feed the monsters. We cannot stop monsters from arising or force them to leave, but we have the power to stop feeding them (take anger, for example). +* Start every thought with kindness and humor. It is all very funny. So every time I fail, it is a comedy. + +## Dealing with Triggers + +In the context of a threat, real or imagined, our emotional state can rapidly shift into fear or anxiety. Mindfulness helps our thinking brain and our emotional brain communicate more clearly, so they work better together. One common situation in which self-regulation skills really come in handy is when we get triggered. The first step in learning to deal with triggers is identifying when you have been triggered. + +* Body: Shallow breathing, rapid heartbeat, and feeling sick to the stomach +* Emotions: Experiencing a fight-or-flight response +* Thoughts: Feeling like a victim, thoughts of blame and judgment, difficulty paying attention. + +Triggers almost always have long histories behind them. When we get triggered, it is very often because it brings back something from the past, that "she's-doing-that-again" feeling. Triggers are also very often connected to a perceived inadequacy about ourselves that is a source of pain to us, sort of like a raw nerve. + +### Siberian North Railroad + +This practice helps to deal with triggers: + +* Stop +* Breathe +* Notice +* Reflect +* Respond + +SBNRR: SiBerian North RailRoad + +The first and most important step is to stop. Whenever you feel triggered, just stop. Do not react for just one moment. This moment is known as the sacred pause. It enables all other steps. Taking conscious breaths, especially deep ones, calms the body. After breathing, notice. Experience your emotion by bringing attention to your body. + +What does this feel like in the body? In the face, neck, shoulder, chest, back? Notice changes in tension and temperature. Apply mindfulness by experiencing it moment to moment without judging. Try to experience emotional difficulty simply as a physiological phenomenon. If it is anger you are experiencing, for example, your observation is not "I am angry"; it is "I experience anger in my body." + +Now we reflect. Where is the emotion coming from? Is there a history behind it? Is there a self-perceived inadequacy involved? Let's just bring this perspective into the situation. Think about these statements: + +* Everybody wants to be happy +* This person thinks acting this way will make them happy in some way. + +Finally, we respond. Bring to mind ways in which you might respond to this situation that would have a positive outcome. You do not actually have to do it - just imagine the kindest, most positive response. What would that look like? + +### Siberian North Railroad Practice + +* 1. Settling Attention: Start with three breaths. +* 2. Negative Emotion: Let's now shift gears into negative emotion for two minutes. Bring to mind a memory of an unhappy event, an experience of frustration, anger, or hurt, or an experience in which you were triggered. See if you can relive the moment and the associated emotions in your mind. +* 3. Managing Negative Emotion: The first two steps are to stop and breathe. Focus the mind on the breath and not reacting to the emotion. Slow, deep breaths can help. Stay in this state for half a minute. Next, notice. Notice the experience in your body. What does an afflictive emotion feel like in the body? Changes in tension or temperature? Experience the emotion without judging and only as a physiological phenomenon. Take a minute to experience the emotion in the body. +* 4. After that, reflect. Where are the emotions coming from? Is there a history behind it? Is there maybe another person involved? Think about "Everybody wants to be happy. This person thinks acting this way will make them happy in some way." Don't judge it as right or wrong. After 30 more seconds, respond. Bring to mind ways in which you might respond to bring a positive outcome. Take a minute to create that response. +* 5. Return to the present for two minutes. Awareness is back to the breath. In this artificial setting, the process takes only a few minutes. In real life, the whole process may be over in seconds, which may not give you a lot of time to do it right if you do not have sufficient practice. One way to practice this process is to do it retroactively. That means practicing the reflection and response steps after a triggering event is over. + +Given how quickly each episode moves, it's hard to train in real-time, but it's just as effective to do it "offline" retroactively. The more time you spend practicing the reflect-and-respond process offline, the better you will be able to do it in real-time situations. The next time you are triggered, remember to take the SBNRR. It can become a general framework on which we can add other ways of handling triggers. + +### When You Get Triggered: + +A standard practice is to count to ten, which is a more deliberate way of invoking a sacred pause. This practice also has the benefit of giving your mind something else to do, temporarily distracting it from emotions until it is capable of handling the situation. Another practice is to take slow, deep breaths. Taking deep breaths induces a calming effect. Attentional control is good and necessary, but often insufficient. Even if your mind is so highly trained that you can let go of the distress and return to calm very quickly, the issue behind the trigger will remain unresolved, and you will still be similarly triggered in the future. + +Hence, cognitive work is also necessary. Cognitive work here means reframing and reinterpreting the meaning of the situation—seeing things more objectively and with more compassion toward self and others. You can also try seeing positives in the triggers. For example, if you blew up in front of your new boyfriend and are surprised at the level of emotion, this is a perfect time to let things calm down and create space so you can both talk about it, using the situation as an opportunity to help him know you more deeply as a person. + +### Creating Willingness to Experience and Accept the Emotions: + +We suggest two practices. The first is something called "meshing," or visualizing yourself as a mesh screen. As you encounter strong feelings welling up (for example, anger, resentment, fear), let these feelings pass through your body. Observe these intense feelings moving through you, not sticking to you, and see that they are separate from you. The second practice is to pretend your life is a sitcom and appreciate the humor in every absurd situation. By knowing exactly how a system recovers after failure, you can be confident in it even when it fails because you know the conditions under which the system can come back quickly enough that failure is inconsequential. + +We can think of the practices in this chapter as upgrading our recovery mode. Experience the unpleasantness by "riding things out" and "letting your body reset" for fifteen to thirty minutes, and then the "view would open again," and the mind would be clear enough to think properly once more. It was also discovered that someone could gradually shrink the time it takes to "reset" with mindful training. Consequently, we gained confidence in ourselves. + +## Making Friends with Emotions + +Mingyur decided to look deep into his panic. He realized there are two ways to make his panic bigger and stronger: treating it like a boss and obeying its every order, or treating it like an enemy and wishing it to go away. Mingyur decided he would, instead, learn to make friends with panic, neither taking orders from it, nor wishing it to go away, but just allowing it to come and go at will and treating it with kindness. In just three days, his panic went away, permanently. "Panic became my best friend." + +"For three days I stayed in my room meditating. Gradually, I began to recognize how feeble and transitory the thoughts and emotions that had troubled me for years actually were, and how fixating on small problems had turned them into big ones. Just by sitting quietly and observing how rapidly, and in many ways illogically, my thoughts and emotions came and went, I began to recognize in a direct way that they weren't nearly as solid or real as they appeared to be." + +## Pleasure, Passion, and Higher Purpose + +There are three types of happiness: pleasure, passion, and higher purpose. + +* The happiness that arises from pleasure is highly unsustainable. +* Happiness that arises from flow is much more sustainable. +* Happiness arising from higher purpose, in contrast, is highly sustainable. This form of happiness is very resilient and can last for a very long time. + +Interestingly, we instinctively chase after pleasure believing it to be the source of sustainable happiness. This insight also suggests the best way to find motivation at work is to find our own higher purpose. When that happens, our work can become a source of sustainable happiness for us. We can then become very good at our work because we are happy doing it, which in turn allows us to enjoy the happiness of flow with increasing frequency. + +## Motivation in Three Easy Steps + +### Alignment: Having Fun for a Living + +Think of alignment as finding a way to never have to work again for the rest of your life and still get paid. The secret is to create a situation in which your work is something you do for fun, so you are doing it for your own entertainment anyway, and somebody just happens to pay for it. + +Most of the best engineers I have worked with write code as a hobby, so they really just come to the office to hobby away and get paid. Work of this nature has at least one of these two qualities, very often both: + +* The work is deeply meaningful for you +* It generates a state of flow in you + +### Flow + +Flow is a state of peak performance and can be described as "being completely involved in an activity for its own sake. The ego falls away. Time flies. Every action, movement, and thought flows inevitably from the previous one, like playing jazz." + +Flow occurs when the task at hand matches the skill level of the practitioner, such that it is difficult enough to provide a challenge but not so difficult that it overwhelms the practitioner. Flow occurs when difficulty is just right. Flow is a state of focused attention, so people skillful in focusing their attention, such as meditators or martial arts experts, are more likely to find themselves in flow. + +### Autonomy, Mastery, Purpose + +The best motivators are what he calls "intrinsic motivators"—motivation we find within ourselves. + +* Autonomy: The urge to direct our own lives +* Mastery: The desire to get better and better at something that matters +* Purpose: The yearning to do what we do in service of something larger than ourselves + +Monetary incentives do not work well; they can even be counterproductive. The only motivators that work really well are the intrinsic ones: autonomy, mastery, and purpose. "Delivering happiness" infuses autonomy, mastery, and purpose into jobs. + +You will be able to work in ways that offer you autonomy, mastery, and purpose. With that, your work will become a source of happiness. The cornerstone of knowing and aligning thyself is mindfulness. Another way is to journal. Once again, a similar mechanism is at work—the act of verbalizing abstract thoughts makes them clear and tangible. + +## Envisioning + +Envisioning is based on a very simple idea: it's much easier to achieve something if you can visualize yourself already achieving it. As Michael Jordan says: + +> "You have to expect things of yourself before you can do them." + +The basic idea is to envision, discover, and consolidate our ideal future in the mind by writing about it as if it were already true. This is a very powerful practice. + +### Discovering My Ideal Future + +This exercise takes over seven minutes. The prompt is: If everything in my life, starting from today, meets or exceeds my most optimistic expectations, what will my life be like in five years? Consider these questions before writing: + +* Who are you and what are you doing? +* How do you feel? +* What do people say about you? + +Let's spend a minute in silent contemplation before writing. After a minute, start writing. Another variation is to pretend you are already living your ideal future five years from now and to write diary entries from the future. + +Talk About Your Ideal Future a Lot: The more you talk about it, the more real it becomes to you. The second benefit is that the more you talk to people about your ideal future, the more likely you can find people to help you. + +## Resilience + +Resilience is the ability to overcome obstacles along the way. Alignment and envisioning help you find out where you want to go, and resilience helps you get there. We can train resilience on three levels: + +* Inner calm: Just do a lot of mindfulness meditation, and this aspect will be "automagically" taken care of. +* Emotional resilience: Like all emotional experiences, success and failure manifest most strongly in our bodies. The idea is to become comfortable with experiencing these emotions in our bodies. +* Cognitive resilience + +### Meditation on Resilience + +* Calming the mind: Start with 3 deep breaths. Bring gentle awareness to the breath, becoming aware of the in and out breaths, and the spaces in between. +* Failure: Let's now shift gears into an experience of failure for 4 minutes. Observe all the associated emotions and see how they manifest in the body for 2 minutes. After that, let us see if we can create the ability to experience all those emotions without aversion for 2 minutes. +* Success: Let's now have more fun and shift gears into an experience of success for 4 minutes. Let us see if we can create the ability to experience all those emotions without grasping. +* Returning to calm: Let us now return to the present for 3 minutes. Check in with your body and how it feels now. + +## Cognitive Resilience + +What distinguishes successful people is their attitude toward failure, and specifically, how they explain their own failures to themselves. When an optimist suffers a major disappointment, he responds by figuring out how he can do it better next time. In contrast, a pessimist assumes there is nothing he can do about the problem and gives up. + +We naturally pay much more attention to negative than positive occurrences in our lives. For a moment, assume you live a life in which you have twice as many happy moments as unhappy ones. It is like some rich uncle gives you two dollars for every dollar somebody else takes from you. Dude, you win! Objectively, it would look as if you are very lucky and have a very good life. Subjectively, however, since your 2:1 ratio is still well below Fredrickson's 3:1 ratio, you might think, "My life sucks." + +This insight hit me like three Zen sticks hitting my head. It is entirely possible, even likely, that we have much more success than failure in our lives, yet it does not seem that way. Just understanding this can change how you see yourself. + +The second step is mindfulness. Learning optimism requires us to be objective about our own experiences and mindfulness is the best way to create that objectivity. Whenever you experience success or failure, first bring mindfulness to your body. + +The final step is transformation. When experiencing success, take conscious note of it and accept credit for it. This creates a mental habit of paying due attention to your successes. When experiencing failure, focus on realistic evidence suggesting that this setback may be temporary. + +## Empathy + +If you are strong in self-awareness, you are very likely to be strong in empathy. The brain seems to use the same equipment for both tasks. Empathy does not necessarily mean agreeing. It is possible to understand another person at both an intellectual and visceral level with kindness, and still respectfully disagree. + +It is the mark of a developed mind to be able to understand and accept another's feelings without agreeing to them. That insight suggests that it is possible to make tough decisions while still being empathetic. + +Empathy increases with kindness. Kindness is the engine of empathy; it motivates you to care, and it makes you more receptive to others and them to you. The more kindness you offer to people, the better you can empathize with them. + +## Creating Mental Habits + +"Whatever one frequently thinks and ponders upon, that will become the inclination of his mind." In other words, what we think, we become. The method itself is simple: invite a thought to arise in your mind often enough, and it will become a mental habit. For example, if every time you see another person, you wish for that person to be happy, then eventually, it will become your mental habit, and whenever you meet another person, your instinctive first thought is to wish that person to be happy. After a while, you develop an instinct for kindness. + +### Just Like Me / Loving Kindness Practice + +When angry about another person or unhappy generally, meditate about him and think, "He is just like me, all he wants is to be happy and/or accomplish a goal." He also has a normal life just like me and has got issues there as well. Given how social we are and how social we need to be to survive, it makes sense for kindness toward other people to be intrinsically rewarding to ourselves; it is probably an important part of our survival mechanism. One study even suggests that performing one kind act a day over just ten days can measurably increase your happiness. In other words, kindness is a sustainable source of happiness — a simple yet profound insight that can change lives. + +Whenever I have a fight with my wife or a co-worker, I go to another room to calm down, and after a few minutes of calming down, I do this exercise in stealth. A large part of my anger dissipates immediately. The next time you get into conflict with someone you care about or someone you work with, I suggest doing this practice. It may do wonders for your relationships. + +## Establishing Trust is Good for Work + +Empathy is nice, but it is not just nice; it is also essential for helping you succeed at your work, especially if your work involves building a team or coaching, mentoring, and caring for others. There is one basic ability that enables you to be highly effective in all those activities, and that is your ability to establish trust. + +The coaching/mentoring cycle involves these steps: + +* Establish trust +* Listen (by "looping" and "dipping") +* Ask probing and open-ended questions +* Provide feedback +* Partner to create options and practices + +Trust has to begin with sincerity, kindness, and openness, so it is optimally productive to start every relationship that way, both at work and in life. Whenever possible, begin by assuming that the other person is a good person and deserves to be treated as such until proven otherwise. It is useful to always engage the other person as a human being. + +When establishing trust, I find that my cognitive brain is usually easy to deal with—the hard part is placating my emotional brain. To placate the emotional brain, I must recognize that the other person is a human being just like me. The other person is not just a negotiating opponent or a customer or a co-worker; he is also a human being, just like me. When your mind can operate at that level in every situation, especially in difficult situations, you create strong conditions for mutual trust. + +Most people do what they do because it feels like the right thing at the time, based on what they want to accomplish and the information they have. Their reasons make sense to them, even if their actions do not make sense to us. Assume that they are making the right choice, even if we do not understand it or might make a different choice ourselves. + +One way I can build trust with you is to assume that you are trustworthy and to treat you that way. When you feel that someone trusts you, it makes it easier to trust them back, and vice versa. + +### Three Assumptions + +* Assume that everybody in this room is here to serve the greater good, until proven otherwise. +* Given the above assumption, we therefore assume that none of us has any hidden agenda, until proven otherwise. +* Given the above assumption, we therefore assume that we are all reasonable even when we disagree, until proven otherwise. + +### Empathic Listening + +Empathic listening is a very powerful skill. As part of an exercise, I listened for my exercise partner's feelings as she spoke, and then I told her what I thought she felt. After I was done, she started to cry. We never explain to the class how to do empathic listening. They discover for themselves that empathic listening is an ability we are born with. + +Begin the conversation by thinking to yourself, "I want this person to be happy." When listening, practice mindful listening. Remind yourself to listen for the other person's feelings. Be curious about what he or she may be feeling. + +Besides listening to people empathically, something else you can do to bring out their best is to praise them. Always praise authentically (or never praise falsely). If your praise is not genuine, it will be sniffed out, and you will lose credibility. Those praised for being smart performed significantly worse than other groups, while those praised for their effort significantly outperformed other groups. Being praised for being smart is bad for you. + +The explanation offered by researchers in these and related studies is that when a person is given person praise, it reinforces a "fixed mindset," or the belief that our success is due to fixed traits that are given. When a person is given process praise, in contrast, it reinforces a "growth mindset," or the belief that our qualities can be developed through dedication and effort. + +It is better to structure feedback around effort and growth than by labeling the person as "being smart." Simply put, it's better to praise people for working hard than for being smart. + +## Political Awareness + +Political awareness is empathy++. Political awareness is one of the most useful skills you can equip yourself with in any organization. In political awareness, you understand the feelings, needs, and concerns of individual people and how those feelings, needs, and concerns interact with those of others and weave into the emotional fabric of the organization as a whole. + +There are a lot more variables to understand in political awareness, but the basic skill required is the same. If you understand people and you understand the interactions between them, you will understand the whole organization. That is political awareness. + +During a conflict, it is entirely possible for both sides to be 100 percent correct and 100 percent reasonable and still have conflict. One common reason is that people implicitly value different priorities. Unless each is able to understand and internalize the other's implicit priorities, there will be a conflict. Another common reason is that we have incomplete data and implicit assumptions. + +This reminds me of a joke: + +> "Two guys had a major disagreement they could not resolve, so they decided to consult a wise guru. The first guy presented his argument to the guru, and the guru nodded his head and said, 'Yes, you are right.' The second guy presented his diametrically opposing argument to the guru, and again the guru nodded his head and said, 'Yes, you are right.' A third guy watching the entire exchange got a little bit annoyed and asked the guru, 'Wait, something is wrong. They cannot possibly both be right at the same time.' And the guru nodded his head and said, 'Yes, you are right.'" + +## Mental Habits of Highly Empathic People + +Empathy comes pre-installed in your brain; we are all hardwired to be empathic. However, the main takeaway of this chapter is that empathy is something you can improve with practice, and most of that practice involves mindfulness and creating mental habits that are conducive to empathy. + +Chief among those mental habits is kindness. Having the mental habit of kindness means that every time you interact with a human being, the habitual and effortless thoughts that arise in your mind are, "This person is a human being just like me. I want him or her to be happy." + +Another mental habit is being open to understanding how other people can seem reasonable, at least from their own points of view, even when you disagree with them. This mental habit enables you to view social interactions with more clarity and objectivity. + +### Being Effective and Loved at the Same Time + +> You can make more friends in two months by becoming really interested in other people than you can in two years by trying to get other people interested in you. Which is just another way of saying that the way to make a friend is to be one — Dale Carnegie. + +Being Loved is Good for Your Career. They get closer to people and are significantly more open in sharing thoughts and feelings than their low-performing counterparts. We will work harder and more effectively for people we like. In fact, being liked may be the most effective way to get things done in the long term. The most effective naval commanders are also the ones with higher emotional intelligence and who are most liked. + +### Using Kindness to Grow Friendship from an Ugly Situation + +Even in difficult situations, it is sometimes possible to make important things happen while still creating happy friendships. The best place to sharpen your emotional skills is the real world. The real world is both your dojo and your zendo, from which you will get your mojo. + +## Leading with Compassion + +Compassion is the cause for the highest level of happiness ever measured, and it's a necessary condition for the most effective form of leadership known. This must be mind-blowing to many people because many of us consider compassion to be an unpleasant mental state, but here is scientific data showing precisely the reverse—that compassion is a state of extreme happiness. + +What is the second happiest state ever? It is "open awareness," a state in which the mind is extremely open, calm, and clear. Even if you perfect that practice, the most you can achieve is the second happiest state. The happiest state can only be achieved with compassion, which requires engagement in real life with real people. If you are a deep meditator, remember to open your door and go out once in a while. + +Compassionate leadership is the most effective leadership. Compassion is a mental state endowed with a sense of concern for the suffering of others and the aspiration to see that suffering relieved. Specifically, compassion has three components: + +* A cognitive component: "I understand you" +* An affective component: "I feel you" +* A motivational component: "I want to help you" + +The most compelling benefit of compassion in the context of work is that it creates highly effective leaders. Transformation from "I" to "We" is the most important process leaders go through in becoming authentic. + +I recommend you read "Good to Great." The first and perhaps the most important finding in the book is the role of leadership. It takes a very special type of leader to bring a company from goodness to greatness. Collins calls them "Level 5" leaders. These leaders are highly ambitious, but their ambition is not self-focused; instead, they are ambitious for the greater good. Because their attention is focused on the greater good, they feel no need to inflate their own egos, making them highly effective and inspiring. + +The three components of compassion can be used to train the two distinguishing qualities of Level 5 leadership: + +* Affective (I feel for you) +* Cognitive (I understand you) +* Motivational (I want to help you) + +The Ambition is for the greater good. + +And to stay humble. We can train compassion similarly to the way we train loving-kindness by creating mental habits. We increase the ability of the mind to perceive and increase goodness, both within ourselves and toward others. + +The key is not to acquire influence but to expand the influence we already have and use it for the good of all. The most important first step to expanding our influence is to understand the social brain well enough to skillfully navigate it. Our brains respond far more strongly to negative experiences than comparable positive ones. How many positive experiences does it take to balance out a comparable negative experience? It depends, but around a 3-to-1 ratio. + +A marriage to succeed must have at least five times as many positive interactions in the relationship as negative ones, a 5:1 ratio known as the "magic ratio." + +* Autonomy: The degree of control that an organism can exert over something that creates stress determines whether the stressor alters the organism's functioning. In other words, it's not the stress itself that gets to you; it's the feeling of helplessness in the face of that stress. + +* Relatedness: The only experience in life that makes people sustainably happy over time is the quality and quantity of social connections. + +* Fairness: Never underestimate a person's sense of fairness; it is overwhelming enough that one often may sacrifice their own self-interest for its sake. If you want to influence people, there is no greater power than goodness. + +### Difficult Conversations + +Difficult conversations are conversations that are hard to have. They are often important, but because they are hard, we usually prefer to avoid them. Two classic examples of difficult conversations in the workplace are asking for a raise and giving a valued employee critical feedback. Conducting difficult conversations is a skill— an extremely useful one, indeed. + +There are five steps to conducting a difficult conversation: + +* Prepare by walking through the "three conversations." +* Decide whether to raise the issue. +* Start from the objective "third story." +* Explore their story and yours. +* Problem solve. + +Sometimes, the right thing to do is not to raise the issue at all. If you decide to raise the issue, try shifting into a mode that supports learning and problem-solving. The "Third Story" is the way things happened from the perspective of a disinterested third party who is aware of the whole situation. The third story is the best one with which to start a difficult conversation. It is the most objective and the one with which you are most likely to form common ground with the other party. + +Explore their story and yours. Listen to their story. Empathize. Share your story. Explore how you each perceive the same situation differently. Reframe the stories from one of blame and accusation to one of learning. + +Problem-solve: Invent solutions that meet each side's most important concerns and interests. Find ways to continue keeping communications open and taking care of each other's interests. Happily, if you have been working hard on all the practices in Search Inside Yourself, you have already acquired most of the skills you need to conduct difficult conversations. The only thing you need is to acquire two key insights. + +The first key insight is that impact is not the same as intention. For example, if we feel hurt by something somebody said, we may automatically assume that the person intended to hurt us. In many situations, however, the impact is not the intention. For example, when Henry's wife told him to stop and ask for directions, he felt belittled, but she honestly did not set out intending to belittle his sense of manhood; she merely intended to arrive at the party on time. Her impact was not her intention. + +The second key insight is that beyond the content and emotions in every difficult conversation, there are, more importantly, issues of identity. For example, if my manager wants to talk to me about the slow progress of my project, the thing that will bother me most is not the content of that conversation or my feelings of anxiety, but my self-doubt concerning my own competence. In other words, the thing that will most bother me is the identity issue of "Am I incompetent?" + +The best way to prepare for difficult conversations is to talk to other people. If you prefer to work alone, you may do it as a writing exercise instead. + +## Mindful E-Mailing + +The biggest problem with e-mail is that the emotional context is often miscommunicated, sometimes with disastrous results. When we talk to another person face-to-face, most of the emotions we communicate with each other are done nonverbally, usually with our facial expressions, tone of voice, postures, and gestures. Most of that communication happens unconsciously. + +When we communicate via e-mail, however, we lose that entire mechanism for communicating feelings. But wait, it gets worse. When the brain receives insufficient data about others' feelings, it just makes stuff up. The brain makes assumptions about the emotional context of the message and then fabricates the missing information accordingly. It does not just fabricate information, however. It also automatically believes those fabrications to be true. Worse still, those fabrications usually have a strong negative bias - we usually assume people to have more negative intentions than they actually do. +That is why there is so much miscommunication over e-mail. We frequently get offended or frightened by e-mails that were never intended to offend or frighten. Fortunately, mindfulness can help vastly improve the quality of your e-mail communications. The first thing we recollect is that there is a human being on the other end, a human being just like me. The second thing we recollect is this insight that people who receive e-mails unconsciously fabricate missing information about the emotional context of the sender, so we apply the appropriate care and caution. + +### Practice of Mindful E-Mailing + +* Begin by taking one conscious breath. If this is a particularly sensitive situation, calm your mind with a few minutes of Mindfulness Meditation or Walking Meditation. +* Mindfully reflect that on the receiving end, there are one or more human beings. Human beings just like me. If this is a particularly difficult situation, it may be useful to visualize the receiver or receivers in your mind and to engage in a few minutes of Just Like Me / Loving Kindness exercise. +* Write your e-mail +* Before sending, mindfully reflect on the insight that if the emotional context of your message is unclear, the receiver's brain will just make something up that is likely more negative than you intended. Put yourself in the receiver's shoes, pretend you know nothing about the sender's (your) emotional context, pretend also that you have a negative bias, and read your e-mail. Revise your e-mail if necessary. +* Take one conscious breath before pressing Send. If this is a particularly delicate situation - for example, if you are writing an angry e-mail to your boss or your subordinate - take three slow, conscious breaths before pressing Send. Feel free to change your mind about pressing Send. + +## Three Easy Steps to World Peace + +With that combination of relaxation and alertness, three wonderful qualities of mind naturally emerge: calmness, clarity, and happiness. Here's an analogy: Think of the mind as a snow globe that is shaken constantly. When you stop shaking the snow globe, the white "snow" particles within it eventually settle, and the fluid in the snow globe becomes calm and clear at the same time. Similarly, the mind is normally in a constant state of agitation. With deep mental relaxation and alertness, the mind settles into calmness and clarity. In this state of mind, the third quality, inner happiness, naturally emerges. + +### Align Meditation with Real Life + +* Everybody knows that "Exercise is good for me." There is no more debate. While it is true that not everybody takes the trouble to work out, even those who don't work out know that they should and that it would be good for them. +* Anyone who wants to exercise can learn how to do it. The information is widely available, trainers are readily accessible if you want one, and many people have friends who work out who can show them how to exercise. 3. Companies understand that healthy and physically fit workers are good for business. Many companies even have gyms or provide subsidies for gym memberships. +* Exercise is taken for granted. Exercise is so taken for granted today that when you tell your friends you are going to the gym to work out, nobody looks at you funny and thinks you are some New Age crank from San Francisco. In fact, it is now the reverse. If you, for example, argue that a pious American should never exercise, people look at you funny. + +I want to create a world where meditation is widely treated like exercise for the mind. + +## MacGyver's Swiss Army knife + +There was a study which tested the development of antibodies (flu shots). One control group meditated, the other didn't before they were given flu shots. Those in the meditation group developed more antibodies to the influenza vaccine than the ones who didn't. Another study revealed, that mindfulness can greatly accelerate the healing of a skin condition known as psoriasis. + +It's also about the ability to pay attention to information for a prolonged period of time where meditation is beneficial. + +Mindfulness feels almost like MagGyver's Swiss Army knife - it is sueful in every situation. + +## Other + +I see great people. Walking around like regular people. They don't even know they are great. + +## Audio Book notes + +Understanding emotional intelligence starts with self-awareness. Mindfulness plays a crucial role in this process. Like a Swiss army knife, mindfulness is versatile and beneficial in any situation. + +A life filled with self-awareness, happiness, and kindness is enriched by meditation. Meditation has no specific goal; it simply provides time to disconnect from goals and other distractions. + +You will learn to calm your mind on demand. Response flexibility involves pausing before reacting. + +Happiness is an optimal state of being, not just a stream of positive emotions. It is a skill that can be trained and sustained over time. Our default level of happiness, or happiness setpoint, can be moved through training. + +Labeling your emotions, such as saying "I feel anger," can make it easier to manage them. You can consciously capture anger before it fully arises by noticing changes in breath or tension. + +Meta-attention is the awareness of your attention. If your mind wanders and you notice it, you can regain your focus. The stronger your meta-attention, the more continuous and robust your attention becomes. + +Mindfulness is especially useful when you can call upon it in daily life. To keep meditation sustainable, practice less than you think you can handle. For instance, meditating for just 5 minutes or taking a deep breath can be effective. Sit frequently, but for short durations. + +Ease and flow are best achieved through meditation. Simply rest for 10 minutes. Self-confidence stems from self-knowledge. + +Paying attention to the body helps it relax, leading to overall increased relaxation. Most people are stressed because their bodies are not relaxed. + +Daily journaling about emotionally impactful events, such as for 10 minutes a day, leads to improvement. + +Self-control is not about suppressing emotions but about skillfully managing them. While it is impossible to prevent a thought or emotion from arising, we have the power to let it go. + +Counting to ten is a deliberate practice to avoid reacting to emotions or triggers. Taking a restroom break can also help. Allow feelings to pass through you like a mesh. + +Uncertainty can occupy your mind, preventing you from doing other things. + +### Books to Check Out + +* *Emotional Intelligence: Why It Can Matter More Than IQ* by Daniel Goleman +* *Working with Emotional Intelligence* by Daniel Goleman +* *Difficult Conversations* - It is useful and thin, can be read during a single flight. +* *The Miracle of Mindfulness* by Thich Nhat Hanh - Short and sweet +* *Wherever You Go, There You Are* by Jon Kabat-Zinn +* *The Joy of Living* by Mingyur Rinpoche +* *Destructive Emotions: How Can We Overcome Them?* by Daniel Goleman +* *Your Brain at Work* by David Rock + +### Videos + +[Chade-Meng Tan on how compassion can be practiced in a corporate setting](http://siybook.com/v/ted_meng) +[Daniel Goleman on emotional intelligence](http://siybook.com/v/gtalk_dgoleman) +[Jon Kabat-Zinn on mindfulness](http://siybook.com/v/gtalk_jkz) +[Richie Davidson on contemplative neuroscience](http://siybook.com/v/gtalk_rdavidson) +[Philippe Goldin on the neuroscience of emotions](http://siybook.com/v/gtalk_pgolding) +[Thomas Lewis on the neuroscience of empathy](http://siybook.com/v/gtalk_tlewis) +[David Rock on your brain at work](http://siybook.com/v/gtalk_drock) +[Shinzen Young on the science and practice of mindfulness meditation](http://siybook.com/v/gtalk_shinzen) +[Dan Pink on the surprising science of motivation](http://siybook.com/v/ted_dpink) +[Jill Bolte Taylor on her "stroke of insight"](http://siybook.com/v/tdd_jbt) + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +[Back to the main site](../) diff --git a/notes/slow-productivity.md b/notes/slow-productivity.md new file mode 100644 index 00000000..43e65125 --- /dev/null +++ b/notes/slow-productivity.md @@ -0,0 +1,151 @@ +# "Slow Productivity" book notes + +> Published at 2024-04-27T14:18:51+03:00 + +These are my personal takeaways after reading "Slow Productivity - The lost Art of Accomplishment Without Burnout" by Cal Newport. + +The case studies in this book were a bit long, but they appeared to be well-researched. I will only highlight the interesting, actionable items in the book notes. + +These notes are mainly for my own use, but you may find them helpful. + +``` + ,.......... .........., + ,..,' '.' ',.., + ,' ,' : ', ', + ,' ,' : ', ', + ,' ,' : ', ', + ,' ,'............., : ,.............', ', +,' '............ '.' ............' ', + '''''''''''''''''';''';'''''''''''''''''' + ''' +``` + +## Table of Contents + +* [⇢ "Slow Productivity" book notes](#slow-productivity-book-notes) +* [⇢ ⇢ It's not "slow productivity"](#it-s-not-slow-productivity) +* [⇢ ⇢ Pseudo-productivity and Shallow work](#pseudo-productivity-and-shallow-work) +* [⇢ ⇢ Accomplishments without burnout](#accomplishments-without-burnout) +* [⇢ ⇢ Do fewer things](#do-fewer-things) +* [⇢ ⇢ Work at a natural pace](#work-at-a-natural-pace) +* [⇢ ⇢ Obsess over quality ](#obsess-over-quality-) + +## It's not "slow productivity" + +"Slow productivity" does not mean being less productive. Cal Newport wants to point out that you can be much more productive with "slow productivity" than you would be without it. It is a different way of working than most of us are used to in the modern workplace, which is hyper-connected and always online. + +## Pseudo-productivity and Shallow work + +People use visible activity instead of real productivity because it's easier to measure. This is called pseudo-productivity. +Pseudo-productivity is used as a proxy for real productivity. If you don't look busy, you are dismissed as lazy or lacking a work ethic. + +There is a tendency to perform shallow work because people will otherwise dismiss you as lazy. A lot of shallow work can cause burnout, as multiple things are often being worked on in parallel. The more you have on your plate, the more stressed you will be. + +Shallow work usually doesn't help you to accomplish big things. Always have the big picture in mind. Shallow work can't be entirely eliminated, but it can be managed—for example, plan dedicated time slots for certain types of shallow work. + +## Accomplishments without burnout + +The overall perception is that if you want to accomplish something, you must put yourself on the verge of burnout. Cal Newport writes about "The lost Art of Accomplishments without Burnouts", where you can accomplish big things without all the stress usually involved. + +There are three principles for the maintenance of a sustainable work life: + +* Do fewer things +* Work at a natural pace +* Obsess over quality + +## Do fewer things + +There will always be more work. The faster you finish it, the quicker you will have something new on your plate. + +Reduce the overhead tax. The overhead tax is all the administrative work to be done. With every additional project, there will also be more administrative stuff to be done on your work plate. So, doing fewer things leads to more and better output and better quality for the projects you are working on. + +Limit the things on your plate. Limit your missions (personal goals, professional goals). Reduce your main objectives in life. More than five missions are usually not sustainable very easily, so you have to really prioritise what is important to you and your professional life. + +A mission is an overall objective/goal that can have multiple projects. Limit the projects as well. Some projects need clear endings (e.g., work in support of a never-ending flow of incoming requests). In this case, set limits (e.g., time box your support hours). You can also plan "office hours" for collaborative work with colleagues to avoid ad hoc distractions. + +The key point is that after making these commitments, you really deliver on them. This builds trust, and people will leave you alone and not ask for progress all the time. + +Doing fever things is essential for modern knowledge workers. Breathing space in your work also makes you more creative and happier overall. + +Pushing workers more work can make them less productive, so the better approach is the pull model, where workers pull in new work when the previous task is finished. + +If you can quantify how busy you are or how many other projects you already work on, then it is easier to say no to new things. For example, show what you are doing, what's in the roadmap, etc. Transparency is the key here. + +You can have your own simulated pull system if the company doesn't agree to a global one: + +* State which additional information you would need. +* Create a rough estimate of when you will be able to work on it +* Estimate how long the project would take. Double that estimate, as humans are very bad estimators. +* Respond to the requester and state that you will let him know when the estimates change. + +Sometimes, a little friction is all that is needed to combat incoming work, e.g., when your manager starts seeing the reality of your work plate, and you also request additional information for the task. If you already have too much on your plate, then decline the new project or make room for it in your calendar. If you present a large task list, others will struggle to assign more to you. + +Limit your daily goals. A good measure is to focus on one goal per day. You can time block time for deep work on your daily goal. During that time, you won't be easily available to others. + +The battle against distractions must be fought to be the master of your time. Nobody will fight this war for you. You have to do it for yourself. (Also, have a look at Cal Newport's "time block planning" method). + +Put tasks on autopilot (regular recurring tasks). + +## Work at a natural pace + +We suffer from overambitious timelines, task lists, and business. Focus on what matters. Don't rush your most important work to achieve better results. + +Don't rush. If you rush or are under pressure, you will be less effective and eventually burn out. Our brains work better then not rushy. The stress heuristic usually indicates too much work, and it is generally too late to reduce workload. That's why we all typically have dangerously too much to do. + +Have the courage to take longer to do things that are important. For example, plan on a yearly and larger scale, like 2 to 5 years. + +Find a reasonable time for a project and then double the project timeline against overconfident optimism. Humans are not great at estimating. They gravitate towards best-case estimates. If you have planned more than enough time for your project, then you will fall into a natural work pace. Otherwise, you will struggle with rushing and stress. + +Some days will still be intense and stressful, but those are exceptional cases. After those exceptions (e.g., finalizing that thing, etc.), calmer periods will follow again. + +Pace yourself over modest results over time. Simplify and reduce the daily task lists. Meetings: Certain hours are protected for work. For each meeting, add a protected block to your calendar, so you attend meetings only half a day max. + +Schedule slow seasons (e.g., when on vacation). Disconnect in the slow season. Doing nothing will not satisfy your mind, though. You could read a book on your subject matter to counteract that. + +## Obsess over quality + +Obsess over quality even if you lose short-term opportunities by rejecting other projects. Quality demands you slow down. The two previous two principles (do fewer things and work at a natural pace) are mandatory for this principle to work: + +* Focus on the core activities of your work for your obsession - you will only have the time to obsess over some things. +* Deliver solid work with good quality. +* Sharpen the focus to do the best work possible. + +Go pro to save time, and don't squeeze everything out that you can from freemium services. Professional software services eliminate administrative work: + +* Pay people who know what they are doing and focus on your stuff. +* For example, don't repair that car if you know the mechanic can do that much better than you. +* Or don't use the free version of the music streaming service if it interrupts you with commercials, hindering your ability to concentrate on your work. +* Hire an accountant for your yearly tax returns. He knows much more about that stuff than you do. And in the end, he will even be cheaper as he knows all the tax laws. +* ... + +Adjust your workplace to what you want to accomplish. You could have dedicated places in your home for different things, e.g., a place where you read and think (armchair) and a place where you collaborate (your desk or whiteboard). Surround yourself with things that inspire you (e.g., your favourite books on your shelf next to you, etc.). + +There is the concept of quiet quitting. It doesn't mean quitting your job, but it means that you don't go beyond and above the expectations people have of you. Quiet quitting became popular with modern work, which is often meaningless and full of shallow tasks. If you obsess over quality, you enjoy your craft and want to go beyond and above. + +Implement rituals and routines which shift you towards your goals: + +* For example, if you want to be a good Software Engineer, you also have to put in the work regularly. For instance, progress a bit every day in your project at hand, even if it is only one hour daily. Also, a little quality daily work will be more satisfying over time than many shallow tasks. +* Do you want to be lean and/or healthy? Schedule your daily walks and workouts. They will become habits over time. +* There's the compounding effect where every small effort made every day will yield significant results in the long run + +Deciding what not to do is as important as deciding what to do. + +It appears to be money thrown out of the window, but you get a $50 expensive paper notebook (and also a good pen). Unconsciously, it will make you take notes more seriously. You will think about what to put into the notebooks more profoundly and have thought through the ideas more intensively. If you used very cheap notebooks, you would scribble a lot of rubbish and wouldn't even recognise your handwriting after a while anymore. So choosing a high-quality notebook will help you to take higher-quality notes, too. + +Slow productivity is actionable and can be applied immediately. + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +Other book notes of mine are: + +[2024-10-24 "Staff Engineer" book notes](./staff-engineer.md) +[2024-07-07 "The Stoic Challenge" book notes](./the-stoic-challenge.md) +[2024-05-01 "Slow Productivity" book notes (You are currently reading this)](./slow-productivity.md) +[2023-11-11 "Mind Management" book notes](./mind-management.md) +[2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes](./career-guide-and-soft-skills.md) +[2023-05-06 "The Obstacle is the Way" book notes](./the-obstacle-is-the-way.md) +[2023-04-01 "Never split the difference" book notes](./never-split-the-difference.md) +[2023-03-16 "The Pragmatic Programmer" book notes](./the-pragmatic-programmer.md) + +[Back to the main site](../) + diff --git a/notes/staff-engineer.md b/notes/staff-engineer.md index 2ccf43e2..30257d8b 100644 --- a/notes/staff-engineer.md +++ b/notes/staff-engineer.md @@ -1,11 +1,94 @@ # "Staff Engineer" book notes -> Last updated 10.8.2023 +> Published at 2024-10-24T20:57:44+03:00 + +These are my personal takeaways after reading "Staff Engineer" by Will Larson. Note that the book contains much more knowledge wisdom and that these notes only contain points I personally found worth writing down. This is mainly for my own use, but you might find it helpful too. + +``` + ,.......... .........., + ,..,' '.' ',.., + ,' ,' : ', ', + ,' ,' : ', ', + ,' ,' : ', ', + ,' ,'............., : ,.............', ', +,' '............ '.' ............' ', + '''''''''''''''''';''';'''''''''''''''''' + ''' +``` + +## Table of Contents + +* [⇢ "Staff Engineer" book notes](#staff-engineer-book-notes) +* [⇢ ⇢ The Four Archetypes of a Staff Engineer](#the-four-archetypes-of-a-staff-engineer) +* [⇢ ⇢ Influence and Impact over Authority](#influence-and-impact-over-authority) +* [⇢ ⇢ Breadth and Depth of Knowledge](#breadth-and-depth-of-knowledge) +* [⇢ ⇢ Mentorship and Sponsorship](#mentorship-and-sponsorship) +* [⇢ ⇢ Managing Up and Across](#managing-up-and-across) +* [⇢ ⇢ Strategic Thinking](#strategic-thinking) +* [⇢ ⇢ Emotional Intelligence](#emotional-intelligence) +* [⇢ ⇢ Navigating Ambiguity](#navigating-ambiguity) +* [⇢ ⇢ Visible and Invisible Work](#visible-and-invisible-work) +* [⇢ ⇢ Scaling Yourself](#scaling-yourself) +* [⇢ ⇢ Career Progression and Title Inflation](#career-progression-and-title-inflation) +* [⇢ ⇢ Not a faster Senior Engineer](#not-a-faster-senior-engineer) +* [⇢ ⇢ The Balance](#the-balance) +* [⇢ ⇢ More things](#more-things) + +## The Four Archetypes of a Staff Engineer + +Larson breaks down the role of a Staff Engineer into four main archetypes, which can help frame how you approach the role: + +* Tech Lead: Focuses on the technical direction of a team, ensuring high-quality execution, architecture, and aligning the team around shared goals. +* Solver: Gets pulled into complex, high-impact problems that often involve many teams or systems, operating as a fixer or troubleshooter. +* Architect: Works on the long-term technical vision for an organization, setting standards and designing systems that will scale and last over time. +* Right Hand: Functions as a trusted technical advisor to leadership, providing input on strategy, long-term decisions, and navigating organizational politics. + +## Influence and Impact over Authority + +As a Staff Engineer, influence is often more important than formal authority. You’ll rarely have direct control over teams or projects but will need to drive outcomes by influencing peers, other teams, and leadership. It’s about understanding how to persuade, align, and mentor others to achieve technical outcomes. + +## Breadth and Depth of Knowledge + +Staff Engineers often need to maintain a breadth of knowledge across various areas while maintaining depth in a few. This can mean keeping a high-level understanding of several domains (e.g., infrastructure, security, product development) but being able to dive deep when needed in certain core areas. + +## Mentorship and Sponsorship + +An important part of a Staff Engineer’s role is mentoring others, not just in technical matters but in career development as well. Sponsorship goes a step beyond mentorship, where you actively advocate for others, create opportunities for them, and push them toward growth. + +## Managing Up and Across + +Success as a Staff Engineer often depends on managing up (influencing leadership and setting expectations) and managing across (working effectively with peers and other teams). This is often tied to communication skills, the ability to advocate for technical needs, and fostering alignment across departments or organizations. + +## Strategic Thinking + +While Senior Engineers may focus on execution, Staff Engineers are expected to think strategically, making decisions that will affect the company or product months or years down the line. This means balancing short-term execution needs with long-term architectural decisions, which may require challenging short-term pressures. + +## Emotional Intelligence + +The higher you go in engineering roles, the more soft skills, particularly emotional intelligence (EQ), come into play. Building relationships, resolving conflicts, and understanding the broader emotional dynamics of the team and organization become key parts of your role. + +## Navigating Ambiguity + +Staff Engineers are often placed in situations with high ambiguity—whether in defining the problem space, coming up with a solution, or aligning stakeholders. The ability to operate effectively in these unclear areas is critical to success. + +## Visible and Invisible Work + +Much of the work done by Staff Engineers is invisible. Solving complex problems, creating alignment, or influencing decisions doesn’t always result in tangible code, but it can have a massive impact. Larson emphasizes that part of the role is being comfortable with this type of invisible contribution. + +## Scaling Yourself + +At the Staff Engineer level, you must scale your impact beyond direct contribution. This can involve improving documentation, developing repeatable processes, mentoring others, or automating parts of the workflow. The idea is to enable teams and individuals to be more effective, even when you’re not directly involved. + +## Career Progression and Title Inflation + +Larson touches on how different companies have varying definitions of "Staff Engineer," and titles don’t always correlate directly with responsibility or skill. He emphasizes the importance of focusing more on the work you're doing and the impact you're having, rather than the title itself. + +These additional points reflect more of the strategic, interpersonal, and leadership aspects that go beyond the technical expertise expected at this level. The role of a Staff Engineer is often about balancing high-level strategy with technical execution, while influencing teams and projects in a sustainable, long-term way. ## Not a faster Senior Engineer * A Staff engineer is more than just a faster Senior. -* A staff engineer is not a senior engineer but a bit better. (But I want to be a senior engineer but a bit better). +* A staff engineer is not a senior engineer but a bit better. It's important to know what work or which role most energizes you. A Staff engineer is not a more senior engineer. A Staff engineer also fits into another archetype. @@ -36,4 +119,16 @@ Sebactical: Take at least six months. Otherwise, it won't be as restored. E-Mail your comments to `paul@nospam.buetow.org` :-) +Other book notes of mine are: + +[2024-10-24 "Staff Engineer" book notes (You are currently reading this)](./staff-engineer.md) +[2024-07-07 "The Stoic Challenge" book notes](./the-stoic-challenge.md) +[2024-05-01 "Slow Productivity" book notes](./slow-productivity.md) +[2023-11-11 "Mind Management" book notes](./mind-management.md) +[2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes](./career-guide-and-soft-skills.md) +[2023-05-06 "The Obstacle is the Way" book notes](./the-obstacle-is-the-way.md) +[2023-04-01 "Never split the difference" book notes](./never-split-the-difference.md) +[2023-03-16 "The Pragmatic Programmer" book notes](./the-pragmatic-programmer.md) + [Back to the main site](../) + diff --git a/notes/the-obstacle-is-the-way.md b/notes/the-obstacle-is-the-way.md index 9d8ab114..c62d7c75 100644 --- a/notes/the-obstacle-is-the-way.md +++ b/notes/the-obstacle-is-the-way.md @@ -4,7 +4,6 @@ These are my personal takeaways after reading "The Obstacle Is the Way" by Ryan Holiday. This is mainly for my own use, but you might find it helpful too. - ``` ,.......... .........., ,..,' '.' ',.., @@ -17,6 +16,22 @@ These are my personal takeaways after reading "The Obstacle Is the Way" by Ryan ''' ``` +## Table of Contents + +* [⇢ "The Obstacle is the Way" book notes](#the-obstacle-is-the-way-book-notes) +* [⇢ ⇢ Reframe your perspective](#reframe-your-perspective) +* [⇢ ⇢ Embrace rationality](#embrace-rationality) +* [⇢ ⇢ Control your response](#control-your-response) +* [⇢ ⇢ Practice emotional and physical resilience](#practice-emotional-and-physical-resilience) +* [⇢ ⇢ Persistence and patience](#persistence-and-patience) +* [⇢ ⇢ Embrace failure](#embrace-failure) +* [⇢ ⇢ Be adaptable](#be-adaptable) +* [⇢ ⇢ Embrace non-action](#embrace-non-action) +* [⇢ ⇢ Leverage crisis](#leverage-crisis) +* [⇢ ⇢ Build your inner citadel](#build-your-inner-citadel) +* [⇢ ⇢ Love everything that happens](#love-everything-that-happens) +* [⇢ ⇢ Conclusion](#conclusion) + "The obstacle is the way" is a powerful statement that encapsulates the wisdom of turning challenges into opportunities for growth and success. We will explore using obstacles as fuel, transforming weaknesses into strengths, and adopting a mindset that allows us to be creative and persistent in the face of adversity. ## Reframe your perspective @@ -27,7 +42,6 @@ We spend a lot of time trying to get things perfect and look at the rules, but w Don't always try to use the front door; a backdoor could open. It's nonsense. Don't fight the judo master with judo. Non-action can be action, exposing the weaknesses of others. - ## Embrace rationality It is a superpower to see things rationally when others are fearful. Focus on the reality of the situation without letting emotions, such as anger, cloud your judgment. This ability will enable you to make better decisions in adversity. Ability to see things what they really are. E.g. wine is old fermented grapes, or other people behaving like animals during a fight. Show the middle finger if someone persists on the stupid rules occasionally. @@ -82,15 +96,17 @@ Should I hate people who hate me? That's their problem and not mine. Be always c Life is a marathon, not a sprint. Each obstacle we overcome prepares us for the next one. Remember, the obstacle is not just a barrier to be turned upside down; it can also be used as a catapult to propel us forward. By embracing challenges and using them as opportunities for growth, we become stronger, more adaptable, and, ultimately, more successful. -Other book notes of mine are: +E-Mail your comments to `paul@nospam.buetow.org` :-) -[2023-03-16 "The Pragmatic Programmer" book notes](./2023-03-16-the-pragmatic-programmer-book-notes.md) -[2023-04-01 "Never split the difference" book notes](./2023-04-01-never-split-the-difference-book-notes.md) -[2023-05-06 "The Obstacle is the Way" book notes (You are currently reading this)](./2023-05-06-the-obstacle-is-the-way-book-notes.md) -[2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes](./2023-07-17-career-guide-and-soft-skills-book-notes.md) -[2023-11-11 "Mind Management" book notes](./2023-11-11-mind-management-book-notes.md) +Other book notes of mine are: -E-Mail your comments to `paul@nospam.buetow.org` :-) +[2024-10-24 "Staff Engineer" book notes](./staff-engineer.md) +[2024-07-07 "The Stoic Challenge" book notes](./the-stoic-challenge.md) +[2024-05-01 "Slow Productivity" book notes](./slow-productivity.md) +[2023-11-11 "Mind Management" book notes](./mind-management.md) +[2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes](./career-guide-and-soft-skills.md) +[2023-05-06 "The Obstacle is the Way" book notes (You are currently reading this)](./the-obstacle-is-the-way.md) +[2023-04-01 "Never split the difference" book notes](./never-split-the-difference.md) +[2023-03-16 "The Pragmatic Programmer" book notes](./the-pragmatic-programmer.md) -[More books and other resources I found useful.](../resources.md) [Back to the main site](../) diff --git a/notes/the-power-of-neuroplasticity.md b/notes/the-power-of-neuroplasticity.md new file mode 100644 index 00000000..0b1a115c --- /dev/null +++ b/notes/the-power-of-neuroplasticity.md @@ -0,0 +1,110 @@ +# "The Power of Neuroplasticity" book notes + +These notes capture key points from "The Power of Neuroplasticity" by Shad Helmstetter. These are for my personal use, but you might find them useful, too. + +## Table of Contents + +* [⇢ "The Power of Neuroplasticity" book notes](#the-power-of-neuroplasticity-book-notes) +* [⇢ ⇢ Your thoughts can influence changes in your brain](#your-thoughts-can-influence-changes-in-your-brain) +* [⇢ ⇢ Wire on what we can do and not what we can't](#wire-on-what-we-can-do-and-not-what-we-can-t) +* [⇢ ⇢ Choose the friends you spend time woth carefully](#choose-the-friends-you-spend-time-woth-carefully) +* [⇢ ⇢ Beware of the brain's autopilot](#beware-of-the-brain-s-autopilot) +* [⇢ ⇢ Cultiate a positive mindset](#cultiate-a-positive-mindset) +* [⇢ ⇢ The monkey mind](#the-monkey-mind) +* [⇢ ⇢ Wiring good attitudes](#wiring-good-attitudes) +* [⇢ ⇢ Techniques to train the brain](#techniques-to-train-the-brain) +* [⇢ ⇢ Meditation ](#meditation-) + +## Your thoughts can influence changes in your brain + +Your thoughts can influence changes in your brain, a concept derived from the field of neuroscience. It's observed that your brain can rewire itself based on your thoughts and it doesn't remain fixed once you reach adulthood. Its plasticity allows it to adapt even in old age - yes, you can teach an old dog new tricks. If you want to change your life, you need to rewire your brain. This rewiring is a continuous feedback loop. You can program your future self by focusing on your desired outcomes, and your brain will then unconsciously guide you toward them. For instance, if you ruminate negatively about an upcoming presentation, you're likely to perform poorly. You would perform significantly better if you had approached it with a positive mindset. Ultimately, you become what you think about most. + +## Wire on what we can do and not what we can't + +The direction you want to go is more critical than where you've been. Many people tend to focus on what they can't do. Instead, we should rewire our brains to think about what we can accomplish now. The more you repeat a thought, the stronger the pathways in your brain become. It's a case of 'use it or lose it'. + +Your environment also plays a role in rewiring your brain, but this can sometimes result in unfavorable outcomes. The world feeds information into your mental computer according to its whims. Mirror neurons fire when we observe another person's behaviors. This is why you yawn when someone else yawns. It's not just actions that get copied, but also feelings and attitudes. When other people influence your thoughts and actions, it's as though they're programming your brain. We have a 'copycat' brain that helps us learn and adapt to the world, forming the basis of empathy. + +## Choose the friends you spend time woth carefully + +Choose the friends you spend time with carefully because they can influence your thoughts. Others' opinions are based on their perspectives and not necessarily aligned with yours. While they may not affect your goals and values, they can provide different viewpoints that are worth consideration when you're open to new insights. It's about exercising independence and choosing your influences wisely. Be aware that even television, if left running in the background, can subtly shape your thoughts. Question its influence and consider if there are better ways to spend your time. Your environment can affect your mood, success, and psychological well-being. Choose hobbies that nourish your mind in desirable ways. + +## Beware of the brain's autopilot + +Be mindful of your brain's autopilot mode, which often makes decisions unconsciously, like craving a dessert. It's important to consciously override these automatic behaviors. We're often so preoccupied that we rely on autopilot mode without considering who we really want to be. We need to take charge of our attitudes and feelings. It's a matter of discerning between the mind and the brain. + +## Cultiate a positive mindset + +The seven crucial elements for cultivating a positive mindset are: + +* Mindfulness: The more aware you are of your thought processes, the stronger they become. Focused mindfulness can also improve your memory. Evaluate your current actions and question whether they align with your intentions. +* Choices: Make deliberate decisions to avoid random influences and create the right thought patterns. This approach is key to forming habits. It's about conscious versus unconscious choices. +* Intention: Your intentions and thoughts can influence the outcome. Instead of dwelling on the past, focus on your plans for the future. This mindset will manifest your desired future. For instance, if you mentally visualize lifting heavier weights, you will gain more strength. Intention is the engine of change, both physically and mentally. +* Focus: Pay attention to the details of your goals. The more specific you are, the more likely you are to achieve them. For instance, saying "I'm going to Disneyland on July 16th" is more effective than saying "I'm going to Disneyland this summer". If you don't have a clear vision of your goal, your brain may create one that doesn't align with your aspirations. Visualization is key; your brain treats what you imagine as reality. +* Repetition: Repeat your goals and intentions from various angles to embed them in your mind. This practice creates neuronal pathways and solidifies habits. +* Emotion: Strong emotions make thought patterns more robust. Incorporate feelings into your goals to strengthen your mental attachment to them. For example, if you associate a goal with joy and satisfaction, it becomes easier to achieve. On the other hand, negative emotions like anger can lower your effective IQ. Visualize the success and positive outcomes associated with your goals. Use elements like music and physical movements to help generate positive emotions. These make the rewiring process more effective, and the new neurological paths stronger and more long-lasting. +* Belief: This is the spiritual component of success. People who confidently believe in their abilities and outcomes tend to achieve better results than those who don't. + +They all work together, so apply and practise of all of them. + +## The monkey mind + +"Mental noise," also known as the "monkey mind," is an indication of our active brain; these voices are not your true self. By listening to them, you can choose what to accept and what to ignore. It's like your mind running on autopilot. These voices are the programs stored in your brain over the years. They critically influence over 90 percent of your decisions. The way you talk to yourself programs your brain. Negative self-talk can be self-detrimental, while positive self-talk can be constructive. Conscious positive self-talk is the source of success and is always effective. The way you talk to yourself can mean the difference between success and failure. Listening passively to positive self-talk in the background can be beneficial, as well as before a meeting or other significant events. + +## Wiring good attitudes + +Attitudes can form either good or bad habits, and altering these attitudes can be beneficial. Attitudes can be controlled by our will, a choice that we can actively make. Foster and practice positive neuronal pathways, as it's a case of "use it or lose it." For example, anger and jealousy are automatic attitudes that we can control by mindfully thinking about them. We are not born with these attitudes; we learn them. Make a conscious choice about your attitude for the next day on the night before. + +With this clear and mindful choice, you'll have a better day laying down the construction lines to be built with repetition. Ask yourself, "Who is directing my attitude now?" and recalibrate as needed. Music is a safe and accessible means of initiating positive attitudes. It can be used to help associate a particular action, such as writing or programming, with a positive attitude. The easiest way to change an attitude is through self-talk. + +Top attitudes to wire in (post them at the wall to remember them): + +* Love +* Optimism +* Peace and Serenity (tranquillity) +* Kindness and harmony +* Determination and focus +* Intuition and awareness +* Spiritual well-being +* Service to others +* Thankfulness, read the list +* Forgiveness, all others and also myself +* Healthiness +* Patients, removing stress +* Success + +## Techniques to train the brain + +To train your brain: + +* Remember grocery list +* Learn a new language +* Meditation +* Read books about topics you don't know about yet +* Exercise +* Games which are challenging +* Write a book or blog + +Each of these attitudes helps to wire and pattern your brain for growth. Actively participate in activities that reinforce these attitudes, repeat them, and keep doing them. Real focus is not a casual event. The activities should be fun but must also present a reasonable challenge. Think of it as growing a garden, but with your brain's neurons. The more emotional involvement you have, the stronger the rewiring will be. Love your activities and approach them with enthusiasm. + +## Meditation + +Meditation changes the physical structure of your brain. It's a focusing tool for your mind. + +* Find time and place for meditation. +* Sit in a comfortable position +* Close your eyes and relax (Note: some recommend keeping eyes open during meditation). +* Breathe deeply and slowly. +* Repeat or focus on a word (e.g., "acceptance" or "this is it"). +* Ignore the past and future, focus on your central point (e.g., the task at hand). +* Let other thoughts pass, but don't fight them +* Reward yourself for not thinking about clutter; let your mind become free of distractions. +* Listen to yourself, ask questions, you will receive short precise +* Relax, breath +* Reflect.. + +Meditation is about letting go of expectations. Every practice is unique and personal. + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +[Back to the main site](../) diff --git a/notes/the-pragmatic-programmer.md b/notes/the-pragmatic-programmer.md index 7c1ca4b4..0c4b9252 100644 --- a/notes/the-pragmatic-programmer.md +++ b/notes/the-pragmatic-programmer.md @@ -76,15 +76,17 @@ How to motivate others to contribute something (e.g. ideas to a startup): By working together, everyone contributes what they can, achieving a greater good together. -Other book notes of mine are: +E-Mail your comments to `paul@nospam.buetow.org` :-) -[2023-03-16 "The Pragmatic Programmer" book notes (You are currently reading this)](./2023-03-16-the-pragmatic-programmer-book-notes.md) -[2023-04-01 "Never split the difference" book notes](./2023-04-01-never-split-the-difference-book-notes.md) -[2023-05-06 "The Obstacle is the Way" book notes](./2023-05-06-the-obstacle-is-the-way-book-notes.md) -[2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes](./2023-07-17-career-guide-and-soft-skills-book-notes.md) -[2023-11-11 "Mind Management" book notes](./2023-11-11-mind-management-book-notes.md) +Other book notes of mine are: -E-Mail your comments to `paul@nospam.buetow.org` :-) +[2024-10-24 "Staff Engineer" book notes](./staff-engineer.md) +[2024-07-07 "The Stoic Challenge" book notes](./the-stoic-challenge.md) +[2024-05-01 "Slow Productivity" book notes](./slow-productivity.md) +[2023-11-11 "Mind Management" book notes](./mind-management.md) +[2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes](./career-guide-and-soft-skills.md) +[2023-05-06 "The Obstacle is the Way" book notes](./the-obstacle-is-the-way.md) +[2023-04-01 "Never split the difference" book notes](./never-split-the-difference.md) +[2023-03-16 "The Pragmatic Programmer" book notes (You are currently reading this)](./the-pragmatic-programmer.md) -[More books and other resources I found useful.](../resources.md) [Back to the main site](../) diff --git a/notes/the-science-of-living.md b/notes/the-science-of-living.md new file mode 100644 index 00000000..c8610348 --- /dev/null +++ b/notes/the-science-of-living.md @@ -0,0 +1,51 @@ +# "Science of Living" book notes + +These notes capture key points from "The Science of Living" by Stuart Farrimond. These are for my personal use, but you might find them useful, too. + +## Morning Routine + +Don't check email or to-do lists in the first hour after awakening to avoid anxiety. Drink coffee 2 to 3 hours after waking when cortisol levels are waning. To wake up, try a cold splash shower in the morning to raise cortisol levels, similar to a caffeine kick. Light exercise in the morning can increase mood and mental performance. + +## Sleep Hygiene + +Take a warm bath 90 minutes before sleep to promote good sleep. Avoid washing for too long to retain the body's natural oils. Try to get at least 7 to 8 hours of sleep for optimum rest. Don't exercise after 8 PM to ensure good sleep. + +## Nutrition and Digestion + +Consume foods with lots of fiber, aiming for 30g per day. Avoid highly processed foods and prefer minimally processed grains like unrefined oats over highly refined cornflakes. Fiber slows down digestion and keeps you satiated. Juices are sugary and bad for your teeth. + +## Oral Health + +Bad breath can be related to microorganisms in your mouth. Fluoride helps prevent tooth decay rather than the frequency of brushing. Use toothpaste with 1450-1500 ppm fluoride and leave it in your mouth for optimal effect. Brush gently and avoid using mouthwash for 30 minutes after brushing to prevent washing away the fluoride. Use plaque-disclosing tablets to see missed parts while brushing. + +## Hydration + +* Only drink water as much as you feel thirsty, e.g., one and a half liters daily. +* Avoid eating when stressed, as it can lead to overeating and increased hunger. + +## Exercise + +* 37 percent of the genes can influence eagerness to exercise. +* Only light exercise is recommended in the morning. +* Mood-enhancing jogging or cross-training releases more endorphins than aerobic exercise. +* Exercise is best done near meal times. + +## Productivity + +Virtual commuting can help mark the start and end of the workday. Physical tasks are better done in the afternoon. Background music can improve productivity. Taking regular breaks can help you think outside the box. Incorporating plants can improve productivity by up to 15% and reduce CO2. + +## Emotional and Social Well-being + +Engage in weekly intimacy, which can increase happiness with a partner. Trans fats are harmful, but regular fats can make food taste better. The brain influences brown fat, acting like a body oven. Hugs, even with animals, have emotional benefits and can reduce stress. + +## Intuition and Decision-Making + +Trust professional intuition only if you are familiar with the situation. The more complex the problem, the better it is to rely on gut instinct rather than overanalyzing. + +## Miscellaneous + +Watching a scary movie can amplify your feelings for another person. + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +[Back to the main site](../) diff --git a/notes/the-stoic-challenge.md b/notes/the-stoic-challenge.md index 60740643..51ee2cfc 100644 --- a/notes/the-stoic-challenge.md +++ b/notes/the-stoic-challenge.md @@ -1,6 +1,29 @@ # "The Stoic Challenge" book notes -> Last updated 29.5.2022 +> Published at 2024-07-07T12:46:55+03:00 + +These are my personal takeaways after reading "The Stoic Challenge: A Philosopher's Guide to Becoming Tougher, Calmer, and More Resilient" by William B. Irvine. + +``` + ,.......... .........., + ,..,' '.' ',.., + ,' ,' : ', ', + ,' ,' : ', ', + ,' ,' : ', ', + ,' ,'............., : ,.............', ', +,' '............ '.' ............' ', + '''''''''''''''''';''';'''''''''''''''''' + ''' +``` + +## Table of Contents + +* [⇢ "The Stoic Challenge" book notes](#the-stoic-challenge-book-notes) +* [⇢ ⇢ God sets you up for a challenge](#god-sets-you-up-for-a-challenge) +* [⇢ ⇢ Negative visualization](#negative-visualization) +* [⇢ ⇢ Oh, nice trick, you stoic "god"! ;-)](#oh-nice-trick-you-stoic-god--) + +## God sets you up for a challenge Gods set you up for a challenge to see how resilient you are. Is getting angry worth the price? If you stay calm then you can find the optimal workaround for the obstacle. Stay calm even with big setbacks. Practice minimalism of negative emotions. @@ -32,4 +55,15 @@ What would the stoic god's do next? This is just a test strategy by them. Don't E-Mail your comments to `paul@nospam.buetow.org` :-) +Other book notes of mine are: + +[2024-10-24 "Staff Engineer" book notes](./staff-engineer.md) +[2024-07-07 "The Stoic Challenge" book notes (You are currently reading this)](./the-stoic-challenge.md) +[2024-05-01 "Slow Productivity" book notes](./slow-productivity.md) +[2023-11-11 "Mind Management" book notes](./mind-management.md) +[2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes](./career-guide-and-soft-skills.md) +[2023-05-06 "The Obstacle is the Way" book notes](./the-obstacle-is-the-way.md) +[2023-04-01 "Never split the difference" book notes](./never-split-the-difference.md) +[2023-03-16 "The Pragmatic Programmer" book notes](./the-pragmatic-programmer.md) + [Back to the main site](../) diff --git a/notes/when.md b/notes/when.md new file mode 100644 index 00000000..e9f27fa0 --- /dev/null +++ b/notes/when.md @@ -0,0 +1,89 @@ +# "When: The Scientific Secrets of Perfect Timing" book notes + +These are my personal book notes from Daniel Pink's "When: The Scientific Secrets of Perfect Timing." They are for myself, but I hope they might be useful to you too. + +## Table of Contents + +* [⇢ "When: The Scientific Secrets of Perfect Timing" book notes](#when-the-scientific-secrets-of-perfect-timing-book-notes) +* [⇢ ⇢ Daily Rhythms](#daily-rhythms) +* [⇢ ⇢ Optimal Task Timing](#optimal-task-timing) +* [⇢ ⇢ Exercise Timing](#exercise-timing) +* [⇢ ⇢ Drinking Habits](#drinking-habits) +* [⇢ ⇢ Afternoon Challenges ("Bermuda Triangle")](#afternoon-challenges-bermuda-triangle) +* [⇢ ⇢ Breaks and Productivity](#breaks-and-productivity) +* [⇢ ⇢ Napping](#napping) +* [⇢ ⇢ Scheduling Breaks](#scheduling-breaks) +* [⇢ ⇢ Final Impressions](#final-impressions) +* [⇢ ⇢ The Midlife U Curve](#the-midlife-u-curve) +* [⇢ ⇢ Project Management Tips](#project-management-tips) + +You are a different kind of organism based on the time of day. For example, school tests show worse results later in the day, especially if there are fewer computers than students available. Every person has a chronotype, such as a late or early peaker, or somewhere in the middle (like most people). You can assess your chronotype here: + +[Chronotype Assessment](https://www.danpink.com/mctq/) + +Following your chronotype can lead to more happiness and higher job satisfaction. + +## Daily Rhythms + +Peak, Trough, Rebound (Recovery): Most people experience these periods throughout the day. It's best to "eat the frog" or tackle daunting tasks during the peak. A twin peak exists every day, with mornings and early evenings being optimal for most people. Negative moods follow the opposite pattern, peaking in the afternoon. Light helps adjust but isn't the main driver of our internal clock. Like plants, humans have intrinsic rhythms. + +## Optimal Task Timing + +* Analytical work requiring sharpness and focus is best at the peak. +* Creative work is more effective during non-peak times. +* Biorhythms can sway performance by up to twenty percent. + +## Exercise Timing + +Exercise in the morning to lose weight; you burn up to twenty percent more fat if you exercise before eating. Exercising after eating aids muscle gain, using the energy from the food. Morning exercises elevate mood, with the effect lasting all day. They also make forming a habit easier. The late afternoon is best for athletic performance due to optimal body temperature, reducing injury risk. + +## Drinking Habits + +* Drink water in the morning to counter mild dehydration upon waking. +* Delay coffee consumption until cortisol production peaks an hour or 90 minutes after waking. This helps avoid caffeine resistance. +* For an afternoon boost, have coffee once cortisol levels drop. + +## Afternoon Challenges ("Bermuda Triangle") + +* Mistakes are more common in hospitals during this period, like incorrect antibiotic subscriptions or missed handwashing. +* Traffic accidents and unfavorable judge decisions occur more frequently in the afternoon. +* 2:55 pm is the least productive time of the day. + +## Breaks and Productivity + +Short, restorative breaks enhance performance. Student exam results improved with a half-hour break beforehand. Even micro-breaks can be beneficial—hourly five-minute walking breaks can increase productivity as much as 30-minute walks. Nature-based breaks are more effective than indoor ones, and full detachment in breaks is essential for restoration. Physical activity during breaks boosts concentration and productivity more than long walks do. Complete detachment from work during breaks is critical. + +## Napping + +Short naps (10-20 minutes) significantly enhance mood, alertness, and cognitive performance, improving learning and problem-solving abilities. Napping increases with age, benefiting mood, flow, and overall health. A "nappuccino," or napping after coffee, offers a double boost, as caffeine takes around 25 minutes to kick in. + +## Scheduling Breaks + +* Track breaks just as you do with tasks—aim for three breaks a day. +* Every 25 minutes, look away and daydream for 20 seconds, or engage in short exercises. +* Meditating for even three minutes is a highly effective restorative activity. +* The "Fresh Start Effect" (e.g., beginning a diet on January 1st or a new week) impacts motivation, as does recognizing progress. At the end of each day, spends two minutes to write down accomplishments. + +## Final Impressions + +- The concluding experience of a vacation significantly influences overall memories. +- Restaurant reviews often hinge on the end of the visit, highlighting extras like wrong bills or additional desserts. +- Considering one's older future self can motivate improvements in the present. + +## The Midlife U Curve + +Life satisfaction tends to dip in midlife, around the forties, but increases around age 54. + +## Project Management Tips + +* Halfway through a project, there's a concentrated work effort ("Oh Oh Effect"), similar to an alarm when slightly behind schedule. +* Recognizing daily accomplishments can elevate motivation and satisfaction. + +These insights from "When" can guide actions to optimize performance, well-being, and satisfaction across various aspects of life. + +Other book notes of mine are: + + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +[Back to the main site](../) diff --git a/other-resources.md b/other-resources.md deleted file mode 100644 index 784caec2..00000000 --- a/other-resources.md +++ /dev/null @@ -1,6 +0,0 @@ -# Other resources - -Please go to: - -[https://paul.buetow.org/other-resources.html](https://paul.buetow.org/other-resources.html) -[gemini://paul.buetow.org/other-resources.gmi](gemini://paul.buetow.org/other-resources.gmi) diff --git a/projects.md b/projects.md deleted file mode 100644 index 1d51e666..00000000 --- a/projects.md +++ /dev/null @@ -1,19 +0,0 @@ -# Projects - -> This site was last updated at Sat 25 Mar 20:53:33 EET 2023 - -This is a "hidden" site listing my personal project list priorities! - -* Finish and release `guprecords 2.0.0` (Raku) -* Blog about Raku and `guprecords` (Raku) -* Start blog series about Algorithms in Go (Golang) -* Update dependencies and release `DTail 4.1.1` (Golang) -* Read "The Go Notebook" and blog about it (Golang) -* Work through "Bash it out" challenges (Bash) -* Read "Programming Ruby (3.2)" (Ruby) -* Try out `kickstart.nvim` or AstroVim (NeoVim) -* Try out `Ruby LSP` in NeoVim, which is not Solar (NeoVim) -* Finish `failunderd 1.0` (Perl or Golang) -* Rewrite site stats script (Perl or Raku) -* Modernise my NextCloud and Wallabag infra (Linux, Docker) -* Release `Gemtexter 2.1.0` and blog about it (Bash) diff --git a/resources.md b/resources.md deleted file mode 100644 index 12f5ae43..00000000 --- a/resources.md +++ /dev/null @@ -1,6 +0,0 @@ -# Resources - -Please go to: - -[https://paul.buetow.org/resources.html](https://paul.buetow.org/resources.html) -[gemini://paul.buetow.org/resources.gmi](gemini://paul.buetow.org/resources.gmi) diff --git a/site-mirrors.md b/site-mirrors.md index 2020787b..776bcf49 100644 --- a/site-mirrors.md +++ b/site-mirrors.md @@ -2,21 +2,21 @@ This page summarizes all the mirrors of this site. Agreeably, that's all a bit overkill (given the importance of this internet presence), but I did it for fun. -All sites listed below are reachable via IPv4 as well as via IPv6. +All sites listed below are reachable via IPv4 as well as via IPv6. Depending on the current master node, standby or master may be located in Amsterdam, Netherlands (OpenBSD.Amsterdam) or Falkenstein, Germany (Hetzner Cloud). -## Gemini protocol +[Wondering how's decided what's the master and what's the standby host?](./gemfeed/2024-04-01-KISS-high-availability-with-OpenBSD.md) -[gemini://foo.zone - Falkenstein, Germany (Hetzner Cloud)](gemini://foo.zone) -[gemini://www.foo.zone - Amsterdam, Netherlands (OpenBSD.Amsterdam)](gemini://www.foo.zone) +## Gemini protocol -Wondering what's the Gemini protocol about? Read: +[gemini://foo.zone](gemini://foo.zone) +[gemini://standby.foo.zone](gemini://standby.foo.zone) -[Welcome to the Geminispace](./gemfeed/2021-04-24-welcome-to-the-geminispace.md) +[Wondering what's the Gemini protocol about?](./gemfeed/2021-04-24-welcome-to-the-geminispace.md) ## HTTP protocol -[https://foo.zone - Falkenstein, Germany (Hetzner Cloud)](https://foo.zone) -[https://www.foo.zone - Amsterdam, Netherlands (OpenBSD.Amsterdam)](https://www.foo.zone) +[https://foo.zone](https://foo.zone) +[https://standby.foo.zone](https://standby.foo.zone) [https://www2.buetow.org - Codeberg page, somewhere in Germany](https://www2.buetow.org) ## OpenBSD.Amsterdam diff --git a/uptime-stats.md b/uptime-stats.md index 369785ee..1a3e5f5a 100644 --- a/uptime-stats.md +++ b/uptime-stats.md @@ -1,6 +1,6 @@ # My machine uptime stats -> This site was last updated at 2023-11-11T22:22:24+02:00 +> This site was last updated at 2025-02-21T11:07:08+02:00 The following stats were collected via `uptimed` on all of my personal computers over many years and the output was generated by `guprecords`, the global uptime records stats analyser of mine. @@ -13,296 +13,3 @@ Also check out my blog post: [Unveiling `guprecords.raku`: Uptime records with Raku](./gemfeed/2023-05-01-unveiling-guprecords:-uptime-records-with-raku.md) -## Top 20 Boots's by Host - -Boots is the total number of host boots over the entire lifespan. - -``` -+-----+----------------+-------+ -| Pos | Host | Boots | -+-----+----------------+-------+ -| 1. | alphacentauri | 671 | -| 2. | mars | 207 | -| 3. | uranus | 168 | -| 4. | callisto | 153 | -| 5. | dionysus | 136 | -| 6. | tauceti-e | 120 | -| 7. | *earth | 107 | -| 8. | pluto | 51 | -| 9. | *mega15289 | 50 | -| 10. | makemake | 50 | -| 11. | *t450 | 45 | -| 12. | phobos | 40 | -| 13. | mega8477 | 40 | -| 14. | sun | 33 | -| 15. | vulcan | 19 | -| 16. | *blowfish | 19 | -| 17. | tauceti | 16 | -| 18. | sagittarius | 15 | -| 19. | deltavega | 12 | -| 20. | *fishfinger | 11 | -+-----+----------------+-------+ -``` - -## Top 20 Uptime's by Host - -Uptime is the total uptime of a host over the entire lifespan. - -``` -+-----+----------------+-----------------------------+ -| Pos | Host | Uptime | -+-----+----------------+-----------------------------+ -| 1. | vulcan | 4 years, 5 months, 6 days | -| 2. | uranus | 3 years, 11 months, 29 days | -| 3. | sun | 3 years, 9 months, 26 days | -| 4. | uugrn | 3 years, 5 months, 5 days | -| 5. | deltavega | 3 years, 1 months, 21 days | -| 6. | pluto | 2 years, 10 months, 29 days | -| 7. | tauceti | 2 years, 3 months, 19 days | -| 8. | *mega15289 | 1 years, 10 months, 14 days | -| 9. | tauceti-f | 1 years, 9 months, 18 days | -| 10. | *earth | 1 years, 9 months, 16 days | -| 11. | *blowfish | 1 years, 9 months, 6 days | -| 12. | mega8477 | 1 years, 3 months, 25 days | -| 13. | host0 | 1 years, 3 months, 9 days | -| 14. | tauceti-e | 1 years, 2 months, 20 days | -| 15. | makemake | 1 years, 1 months, 25 days | -| 16. | *fishfinger | 1 years, 1 months, 3 days | -| 17. | callisto | 0 years, 10 months, 31 days | -| 18. | alphacentauri | 0 years, 10 months, 28 days | -| 19. | london | 0 years, 9 months, 16 days | -| 20. | twofish | 0 years, 8 months, 31 days | -+-----+----------------+-----------------------------+ -``` - -## Top 20 Score's by Host - -Score is calculated by combining all other metrics. - -``` -+-----+----------------+-------+ -| Pos | Host | Score | -+-----+----------------+-------+ -| 1. | uranus | 313 | -| 2. | vulcan | 275 | -| 3. | sun | 238 | -| 4. | uugrn | 211 | -| 5. | alphacentauri | 201 | -| 6. | deltavega | 193 | -| 7. | pluto | 182 | -| 8. | dionysus | 156 | -| 9. | tauceti | 141 | -| 10. | *mega15289 | 130 | -| 11. | *earth | 125 | -| 12. | *blowfish | 110 | -| 13. | tauceti-f | 108 | -| 14. | tauceti-e | 96 | -| 15. | makemake | 90 | -| 16. | callisto | 86 | -| 17. | mega8477 | 80 | -| 18. | host0 | 76 | -| 19. | *fishfinger | 67 | -| 20. | mars | 67 | -+-----+----------------+-------+ -``` - -## Top 20 Downtime's by Host - -Downtime is the total downtime of a host over the entire lifespan. - -``` -+-----+----------------+-----------------------------+ -| Pos | Host | Downtime | -+-----+----------------+-----------------------------+ -| 1. | dionysus | 8 years, 3 months, 16 days | -| 2. | alphacentauri | 5 years, 11 months, 18 days | -| 3. | uranus | 3 years, 5 months, 8 days | -| 4. | callisto | 1 years, 5 months, 15 days | -| 5. | makemake | 1 years, 3 months, 26 days | -| 6. | mars | 1 years, 2 months, 10 days | -| 7. | tauceti-e | 0 years, 12 months, 9 days | -| 8. | *mega15289 | 0 years, 9 months, 23 days | -| 9. | *t450 | 0 years, 9 months, 17 days | -| 10. | sirius | 0 years, 8 months, 20 days | -| 11. | *earth | 0 years, 5 months, 24 days | -| 12. | deimos | 0 years, 5 months, 15 days | -| 13. | joghurt | 0 years, 2 months, 9 days | -| 14. | host0 | 0 years, 2 months, 1 days | -| 15. | fibonacci | 0 years, 1 months, 11 days | -| 16. | cobol | 0 years, 1 months, 8 days | -| 17. | mega8477 | 0 years, 1 months, 8 days | -| 18. | sun | 0 years, 1 months, 7 days | -| 19. | sentax | 0 years, 1 months, 6 days | -| 20. | sagittarius | 0 years, 1 months, 6 days | -+-----+----------------+-----------------------------+ -``` - -## Top 20 Lifespan's by Host - -Lifespan is the total uptime + the total downtime of a host. - -``` -+-----+----------------+-----------------------------+ -| Pos | Host | Lifespan | -+-----+----------------+-----------------------------+ -| 1. | dionysus | 8 years, 6 months, 17 days | -| 2. | uranus | 7 years, 4 months, 6 days | -| 3. | alphacentauri | 6 years, 9 months, 13 days | -| 4. | vulcan | 4 years, 5 months, 6 days | -| 5. | sun | 3 years, 10 months, 2 days | -| 6. | uugrn | 3 years, 5 months, 5 days | -| 7. | deltavega | 3 years, 1 months, 21 days | -| 8. | pluto | 2 years, 10 months, 30 days | -| 9. | *mega15289 | 2 years, 7 months, 5 days | -| 10. | makemake | 2 years, 4 months, 19 days | -| 11. | tauceti | 2 years, 3 months, 22 days | -| 12. | callisto | 2 years, 3 months, 13 days | -| 13. | *earth | 2 years, 2 months, 7 days | -| 14. | tauceti-e | 2 years, 1 months, 29 days | -| 15. | tauceti-f | 1 years, 9 months, 20 days | -| 16. | *blowfish | 1 years, 9 months, 7 days | -| 17. | mars | 1 years, 8 months, 19 days | -| 18. | host0 | 1 years, 4 months, 10 days | -| 19. | mega8477 | 1 years, 4 months, 1 days | -| 20. | sirius | 1 years, 2 months, 24 days | -+-----+----------------+-----------------------------+ -``` - -## Top 20 Boots's by KernelMajor - -Boots is the total number of host boots over the entire lifespan. - -``` -+-----+----------------+-------+ -| Pos | KernelMajor | Boots | -+-----+----------------+-------+ -| 1. | FreeBSD 10... | 551 | -| 2. | Linux 3... | 550 | -| 3. | *Linux 5... | 249 | -| 4. | Linux 4... | 164 | -| 5. | FreeBSD 11... | 153 | -| 6. | *FreeBSD 13... | 143 | -| 7. | *Linux 6... | 51 | -| 8. | Darwin 13... | 40 | -| 9. | *OpenBSD 7... | 40 | -| 10. | FreeBSD 5... | 25 | -| 11. | Linux 2... | 22 | -| 12. | Darwin 21... | 18 | -| 13. | Darwin 15... | 15 | -| 14. | Darwin 18... | 13 | -| 15. | *Darwin 22... | 12 | -| 16. | FreeBSD 7... | 10 | -| 17. | FreeBSD 6... | 10 | -| 18. | OpenBSD 4... | 10 | -| 19. | Darwin 20... | 6 | -| 20. | Darwin 19... | 1 | -+-----+----------------+-------+ -``` - -## Top 20 Uptime's by KernelMajor - -Uptime is the total uptime of a host over the entire lifespan. - -``` -+-----+----------------+------------------------------+ -| Pos | KernelMajor | Uptime | -+-----+----------------+------------------------------+ -| 1. | Linux 3... | 15 years, 10 months, 25 days | -| 2. | FreeBSD 10... | 5 years, 9 months, 9 days | -| 3. | *Linux 5... | 4 years, 4 months, 28 days | -| 4. | *OpenBSD 7... | 3 years, 5 months, 8 days | -| 5. | Linux 4... | 2 years, 8 months, 9 days | -| 6. | FreeBSD 11... | 2 years, 4 months, 28 days | -| 7. | Linux 2... | 1 years, 11 months, 21 days | -| 8. | Darwin 13... | 1 years, 3 months, 25 days | -| 9. | FreeBSD 6... | 1 years, 3 months, 9 days | -| 10. | *Linux 6... | 0 years, 10 months, 31 days | -| 11. | OpenBSD 4... | 0 years, 8 months, 12 days | -| 12. | Darwin 21... | 0 years, 8 months, 9 days | -| 13. | Darwin 18... | 0 years, 7 months, 18 days | -| 14. | Darwin 15... | 0 years, 6 months, 15 days | -| 15. | *Darwin 22... | 0 years, 5 months, 25 days | -| 16. | FreeBSD 5... | 0 years, 5 months, 18 days | -| 17. | *FreeBSD 13... | 0 years, 4 months, 7 days | -| 18. | Darwin 20... | 0 years, 3 months, 21 days | -| 19. | FreeBSD 7... | 0 years, 2 months, 5 days | -| 20. | Darwin 19... | 0 years, 1 months, 9 days | -+-----+----------------+------------------------------+ -``` - -## Top 20 Score's by KernelMajor - -Score is calculated by combining all other metrics. - -``` -+-----+----------------+-------+ -| Pos | KernelMajor | Score | -+-----+----------------+-------+ -| 1. | Linux 3... | 1045 | -| 2. | FreeBSD 10... | 406 | -| 3. | *Linux 5... | 296 | -| 4. | *OpenBSD 7... | 217 | -| 5. | Linux 4... | 178 | -| 6. | FreeBSD 11... | 159 | -| 7. | Linux 2... | 121 | -| 8. | Darwin 13... | 80 | -| 9. | FreeBSD 6... | 75 | -| 10. | *Linux 6... | 59 | -| 11. | Darwin 21... | 39 | -| 12. | OpenBSD 4... | 39 | -| 13. | Darwin 18... | 35 | -| 14. | *FreeBSD 13... | 31 | -| 15. | Darwin 15... | 29 | -| 16. | *Darwin 22... | 28 | -| 17. | FreeBSD 5... | 25 | -| 18. | Darwin 20... | 14 | -| 19. | FreeBSD 7... | 7 | -| 20. | Darwin 19... | 1 | -+-----+----------------+-------+ -``` - -## Top 20 Boots's by KernelName - -Boots is the total number of host boots over the entire lifespan. - -``` -+-----+------------+-------+ -| Pos | KernelName | Boots | -+-----+------------+-------+ -| 1. | *Linux | 1036 | -| 2. | *FreeBSD | 892 | -| 3. | *Darwin | 105 | -| 4. | *OpenBSD | 50 | -+-----+------------+-------+ -``` - -## Top 20 Uptime's by KernelName - -Uptime is the total uptime of a host over the entire lifespan. - -``` -+-----+------------+-----------------------------+ -| Pos | KernelName | Uptime | -+-----+------------+-----------------------------+ -| 1. | *Linux | 25 years, 6 months, 18 days | -| 2. | *FreeBSD | 9 years, 12 months, 8 days | -| 3. | *OpenBSD | 3 years, 12 months, 17 days | -| 4. | *Darwin | 3 years, 6 months, 19 days | -+-----+------------+-----------------------------+ -``` - -## Top 20 Score's by KernelName - -Score is calculated by combining all other metrics. - -``` -+-----+------------+-------+ -| Pos | KernelName | Score | -+-----+------------+-------+ -| 1. | *Linux | 1699 | -| 2. | *FreeBSD | 706 | -| 3. | *OpenBSD | 256 | -| 4. | *Darwin | 230 | -+-----+------------+-------+ -``` - |
