summaryrefslogtreecommitdiff
path: root/gemfeed
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2023-08-22 00:06:49 +0300
committerPaul Buetow <paul@buetow.org>2023-08-22 00:06:49 +0300
commit4c50097aa27cb4f71140a9425bc6737e0e546cdc (patch)
tree5098ee5d4abfd53070a15395065a5de1b0db2b60 /gemfeed
parentca3aeeed6dab6ddf79d95c935c9dc4ba9d74c44c (diff)
Update content for gemtext
Diffstat (limited to 'gemfeed')
-rw-r--r--gemfeed/atom.xml44
-rw-r--r--gemfeed/atom.xml.tmp4080
2 files changed, 22 insertions, 4102 deletions
diff --git a/gemfeed/atom.xml b/gemfeed/atom.xml
index dc01a89f..f41efc63 100644
--- a/gemfeed/atom.xml
+++ b/gemfeed/atom.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
- <updated>2023-08-20T12:41:13+03:00</updated>
+ <updated>2023-08-22T00:06:26+03:00</updated>
<title>foo.zone feed</title>
<subtitle>To be in the .zone!</subtitle>
<link href="gemini://foo.zone/gemfeed/atom.xml" rel="self" />
@@ -56,11 +56,11 @@
<br />
<h2 style='display: inline'>On-Call Culture and the Human Aspect: Prioritising Well-being in the Realm of Reliability</h2><br />
<br />
-<span>Site Reliability Engineering is synonymous with ensuring system reliability, but the human factor is an often-underestimated part of this discipline. Ensuring a healthy on-call culture is as critical as any technical solution. The well-being of the engineers is an important factor.</span><br />
+<span>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.</span><br />
<br />
-<span>Firstly, a healthy on-call rotation is about more than just managing and responding to incidents. It&#39;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 mixing SREs with other engineers (for example Software Engineers or QA Engineers), it&#39;s difficult to motivate everyone to engage. QA Engineers want to test the software, Software Engineers want to implement new features; they don&#39;t want to troubleshoot and debug production incidents. It can be depressing for the mentoring SRE.</span><br />
+<span>Firstly, a healthy on-call rotation is about more than just managing and responding to incidents. It&#39;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&#39;s difficult to motivate everyone to engage. QA Engineers want to test the software, Software Engineers want to implement new features; they don&#39;t want to troubleshoot and debug production incidents. It can be depressing for the mentoring SRE.</span><br />
<br />
-<span>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 certain degree, as who wants to receive a page out of office hours?), it&#39;s not always the volume of pages that matters most. Trust, ownership, accountability, and effective communication play the important roles.</span><br />
+<span>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&#39;s not always the volume of pages that matters most. Trust, ownership, accountability, and effective communication play the important roles.</span><br />
<br />
<span>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.</span><br />
<br />
@@ -68,9 +68,9 @@
<br />
<span>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&#39;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.</span><br />
<br />
-<span>For the junior engineer, it&#39;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 will only scale in the short run, 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 is 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&#39;s why having a blameless on-call culture is essential.</span><br />
+<span>For the junior engineer, it&#39;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&#39;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&#39;s why having a blameless on-call culture is essential.</span><br />
<br />
-<span>A blameless on-call culture is a must for fostering 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&#39;t be punished for errors, they&#39;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.</span><br />
+<span>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&#39;t be punished for errors, they&#39;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.</span><br />
<br />
<span>The fourth part of this blog series will be published soon :-)</span><br />
<br />
@@ -89,14 +89,14 @@
<name>Paul Buetow aka snonux</name>
<email>paul@dev.buetow.org</email>
</author>
- <summary>This is the second part of my Site Reliability Engineering (SRE) series. I am currently employed as a Principal Site Reliability Engineer and will attempt to share what SRE is about in this blog series.</summary>
+ <summary>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.</summary>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<h1 style='display: inline'>Site Reliability Engineering - Part 2: Operational Balance in SRE</h1><br />
<br />
<span class='quote'>Published at 2023-08-19T00:18:18+03:00</span><br />
<br />
-<span>This is the second part of my Site Reliability Engineering (SRE) series. I am currently employed as a Principal Site Reliability Engineer and will attempt to share what SRE is about in this blog series.</span><br />
+<span>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.</span><br />
<br />
<a class='textlink' href='./2023-08-18-site-reliability-engineering-part-1.html'>2023-08-18 Site Reliability Engineering - Part 1: SRE and Organizational Culture</a><br />
<a class='textlink' href='./2023-08-19-site-reliability-engineering-part-2.html'>2023-08-19 Site Reliability Engineering - Part 2: Operational Balance in SRE (You are currently reading this)</a><br />
@@ -121,19 +121,19 @@
<br />
<span>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.</span><br />
<br />
-<span>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 provide a tangible metric, allowing teams to quantify how much they can push changes while ensuring they don&#39;t compromise system health. Thus, the error budget becomes a balancing act, where teams weigh the trade-offs between innovation and reliability.</span><br />
+<span>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&#39;t compromise system health. Thus, the error budget becomes a balancing act, where teams weigh the trade-offs between innovation and reliability.</span><br />
<br />
-<span>A quintessential component 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&#39;t just a random metric; it&#39;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&#39;s problems, they are also preparing for tomorrow&#39;s challenges. </span><br />
+<span>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&#39;t just a random metric; it&#39;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&#39;s problems, they are also preparing for tomorrow&#39;s challenges. </span><br />
<br />
<span>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&#39;s approach to toil indicates its operational health and commitment to balance.</span><br />
<br />
-<span>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&#39;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 delicate balance between system stability and forward momentum.</span><br />
+<span>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&#39;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.</span><br />
<br />
<span>Moreover, operational balance isn&#39;t just a technological or process challenge; it&#39;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. </span><br />
<br />
-<span>In conclusion, operational balance in SRE is not a 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.</span><br />
+<span>In conclusion, operational balance in SRE isn&#39;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.</span><br />
<br />
-<span>That all sounds very romantic. The truth is, it is brutal to archive the perfect balance. No system will ever be perfect. But at least we should aim for it!</span><br />
+<span>That all sounds very romantic. The truth is, it&#39;s brutal to archive the perfect balance. No system will ever be perfect. But at least we should aim for it!</span><br />
<br />
<span>Continue with the third part of this series:</span><br />
<br />
@@ -154,14 +154,14 @@
<name>Paul Buetow aka snonux</name>
<email>paul@dev.buetow.org</email>
</author>
- <summary>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 is 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 attempt to share what SRE is about in this blog series.</summary>
+ <summary>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.</summary>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<h1 style='display: inline'>Site Reliability Engineering - Part 1: SRE and Organizational Culture</h1><br />
<br />
<span class='quote'>Published at 2023-08-18T22:43:47+03:00</span><br />
<br />
-<span>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 is impossible to get bored. There is always a new challenge to master, and there is always a new technology to tinker with. It&#39;s not just technical; it&#39;s also about communication, collaboration and teamwork. I am currently employed as a Principal Site Reliability Engineer and will attempt to share what SRE is about in this blog series.</span><br />
+<span>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&#39;s impossible to get bored. There is always a new challenge to master, and there is always a new technology to tinker with. It&#39;s not just technical; it&#39;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.</span><br />
<br />
<a class='textlink' href='./2023-08-18-site-reliability-engineering-part-1.html'>2023-08-18 Site Reliability Engineering - Part 1: SRE and Organizational Culture (You are currently reading this)</a><br />
<a class='textlink' href='./2023-08-19-site-reliability-engineering-part-2.html'>2023-08-19 Site Reliability Engineering - Part 2: Operational Balance in SRE</a><br />
@@ -191,19 +191,19 @@ DC on fire:
<br />
<h2 style='display: inline'>SRE and Organizational Culture: Navigating the Nexus</h2><br />
<br />
-<span>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. However, these aren&#39;t mere numbers. They reflect an organisational culture prioritising user experience and constant system alignment with user needs. </span><br />
+<span>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. </span><br />
<br />
-<span>Another defining SRE concept is 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 foster an environment where innovation is encouraged, and failures are viewed as learning opportunities.</span><br />
+<span>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.</span><br />
<br />
-<span>But SRE isn&#39;t just about technology and metrics; it&#39;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 I know it is unsustainable to be the only go-to person for every problem.</span><br />
+<span>But SRE isn&#39;t just about technology and metrics; it&#39;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&#39;s unsustainable to be the only go-to person for every problem.</span><br />
<br />
-<span>Additionally, the SRE model requires good documentation. However, it&#39;s essential to ensure that this documentation undergoes the same quality checks as code, reinforcing effective onboarding, training and communication.</span><br />
+<span>Additionally, the SRE model requires good documentation. However, it&#39;s essential ensuring that this documentation undergoes the same quality checks as code, reinforcing effective onboarding, training and communication.</span><br />
<br />
-<span>Organisations might face a significant challenge when adopting SRE. It is convincing various teams and leadership of its merits. Some might feel SRE principles counter their goals. They might prioritise feature rollouts over reliability or view SRE practices as cumbersome. Hence, fostering an SRE culture often demands patient explanations and showcasing tangible benefits, such as increased release velocity and improved user experience.</span><br />
+<span>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.</span><br />
<br />
-<span>Monitoring and observability form another SRE pillar, 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. </span><br />
+<span>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. </span><br />
<br />
-<span>Ultimately, 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&#39;s responsibility. It calls for cultural transformation from the on-call engineers to the boardroom.</span><br />
+<span>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&#39;s responsibility.</span><br />
<br />
<span>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.</span><br />
<br />
diff --git a/gemfeed/atom.xml.tmp b/gemfeed/atom.xml.tmp
deleted file mode 100644
index 4a23cb02..00000000
--- a/gemfeed/atom.xml.tmp
+++ /dev/null
@@ -1,4080 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<feed xmlns="http://www.w3.org/2005/Atom">
- <updated>2023-08-22T00:04:48+03:00</updated>
- <title>foo.zone feed</title>
- <subtitle>To be in the .zone!</subtitle>
- <link href="gemini://foo.zone/gemfeed/atom.xml" rel="self" />
- <link href="gemini://foo.zone/" />
- <id>gemini://foo.zone/</id>
- <entry>
- <title>Site Reliability Engineering - Part 3: On-Call Culture and the Human Aspect</title>
- <link href="gemini://foo.zone/gemfeed/2023-08-20-site-reliability-engineering-part-3.gmi" />
- <id>gemini://foo.zone/gemfeed/2023-08-20-site-reliability-engineering-part-3.gmi</id>
- <updated>2023-08-20T12:17:56+03:00</updated>
- <author>
- <name>Paul Buetow aka snonux</name>
- <email>paul@dev.buetow.org</email>
- </author>
- <summary>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.</summary>
- <content type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <h1 style='display: inline'>Site Reliability Engineering - Part 3: On-Call Culture and the Human Aspect</h1><br />
-<br />
-<span class='quote'>Published at 2023-08-20T12:17:56+03:00</span><br />
-<br />
-<span>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.</span><br />
-<br />
-<a class='textlink' href='./2023-08-18-site-reliability-engineering-part-1.html'>2023-08-18 Site Reliability Engineering - Part 1: SRE and Organizational Culture</a><br />
-<a class='textlink' href='./2023-08-19-site-reliability-engineering-part-2.html'>2023-08-19 Site Reliability Engineering - Part 2: Operational Balance in SRE</a><br />
-<a class='textlink' href='./2023-08-20-site-reliability-engineering-part-3.html'>2023-08-20 Site Reliability Engineering - Part 3: On-Call Culture and the Human Aspect (You are currently reading this)</a><br />
-<br />
-<pre>
- ..--""""----..
- .-" ..--""""--.j-.
- .-" .-" .--.""--..
- .-" .-" ..--"-. \/ ;
- .-" .-"_.--..--"" ..--&#39; "-. :
- .&#39; .&#39; / `. \..--"" __ _ \ ;
- :.__.-" \ / .&#39; ( )"-. Y
- ; ;: ( ) ( ). \
- .&#39;: /:: : \ \
- .&#39;.-"\._ _.-" ; ; ( ) .-. ( ) \
- " `.""" .j" : : \ ; ; \
- bug /"""""/ ; ( ) "" :.( ) \
- /\ / : \ \`.: _ \
- : `. / ; `( ) (\/ :" \ \
- \ `. : "-.(_)_.&#39; t-&#39; ;
- \ `. ; ..--":
- `. `. : ..--"" :
- `. "-. ; ..--"" ;
- `. "-.:_..--"" ..--"
- `. : ..--""
- "-. : ..--""
- "-.;_..--""
-
-</pre>
-<br />
-<h2 style='display: inline'>On-Call Culture and the Human Aspect: Prioritising Well-being in the Realm of Reliability</h2><br />
-<br />
-<span>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.</span><br />
-<br />
-<span>Firstly, a healthy on-call rotation is about more than just managing and responding to incidents. It&#39;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&#39;s difficult to motivate everyone to engage. QA Engineers want to test the software, Software Engineers want to implement new features; they don&#39;t want to troubleshoot and debug production incidents. It can be depressing for the mentoring SRE.</span><br />
-<br />
-<span>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&#39;s not always the volume of pages that matters most. Trust, ownership, accountability, and effective communication play the important roles.</span><br />
-<br />
-<span>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.</span><br />
-<br />
-<span>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.</span><br />
-<br />
-<span>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&#39;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.</span><br />
-<br />
-<span>For the junior engineer, it&#39;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&#39;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&#39;s why having a blameless on-call culture is essential.</span><br />
-<br />
-<span>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&#39;t be punished for errors, they&#39;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.</span><br />
-<br />
-<span>The fourth part of this blog series will be published soon :-)</span><br />
-<br />
-<span>E-Mail your comments to paul at buetow.org :-)</span><br />
-<br />
-<a class='textlink' href='../'>Back to the main site</a><br />
- </div>
- </content>
- </entry>
- <entry>
- <title>Site Reliability Engineering - Part 2: Operational Balance in SRE</title>
- <link href="gemini://foo.zone/gemfeed/2023-08-19-site-reliability-engineering-part-2.gmi" />
- <id>gemini://foo.zone/gemfeed/2023-08-19-site-reliability-engineering-part-2.gmi</id>
- <updated>2023-08-19T00:18:18+03:00</updated>
- <author>
- <name>Paul Buetow aka snonux</name>
- <email>paul@dev.buetow.org</email>
- </author>
- <summary>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.</summary>
- <content type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <h1 style='display: inline'>Site Reliability Engineering - Part 2: Operational Balance in SRE</h1><br />
-<br />
-<span class='quote'>Published at 2023-08-19T00:18:18+03:00</span><br />
-<br />
-<span>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.</span><br />
-<br />
-<a class='textlink' href='./2023-08-18-site-reliability-engineering-part-1.html'>2023-08-18 Site Reliability Engineering - Part 1: SRE and Organizational Culture</a><br />
-<a class='textlink' href='./2023-08-19-site-reliability-engineering-part-2.html'>2023-08-19 Site Reliability Engineering - Part 2: Operational Balance in SRE (You are currently reading this)</a><br />
-<a class='textlink' href='./2023-08-20-site-reliability-engineering-part-3.html'>2023-08-20 Site Reliability Engineering - Part 3: On-Call Culture and the Human Aspect</a><br />
-<br />
-<pre>
-⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⣷⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
-⠀⠀⠀⠀⣾⠿⠿⠿⠶⠾⠿⠿⣿⣿⣿⣿⣿⣿⠿⠿⠶⠶⠿⠿⠿⣷⠀⠀⠀⠀
-⠀⠀⠀⣸⢿⣆⠀⠀⠀⠀⠀⠀⠀⠙⢿⡿⠉⠀⠀⠀⠀⠀⠀⠀⣸⣿⡆⠀⠀⠀
-⠀⠀⢠⡟⠀⢻⣆⠀⠀⠀⠀⠀⠀⠀⣾⣧⠀⠀⠀⠀⠀⠀⠀⣰⡟⠀⢻⡄⠀⠀
-⠀⢀⣾⠃⠀⠀⢿⡄⠀⠀⠀⠀⠀⢠⣿⣿⡀⠀⠀⠀⠀⠀⢠⡿⠀⠀⠘⣷⡀⠀
-⠀⣼⣏⣀⣀⣀⣈⣿⡀⠀⠀⠀⠀⣸⣿⣿⡇⠀⠀⠀⠀⢀⣿⣃⣀⣀⣀⣸⣧⠀
-⠀⢻⣿⣿⣿⣿⣿⣿⠃⠀⠀⠀⠀⣿⣿⣿⣿⠀⠀⠀⠀⠈⢿⣿⣿⣿⣿⣿⡿⠀
-⠀⠀⠉⠛⠛⠛⠋⠁⠀⠀⠀⠀⢸⣿⣿⣿⣿⡆⠀⠀⠀⠀⠈⠙⠛⠛⠛⠉⠀⠀
-⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⣿⣿⣿⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
-⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
-⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
-⠀⠀⠀⠀⠀⠀⠴⠶⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠶⠦⠀⠀
-</pre>
-<br />
-<h2 style='display: inline'>Operational Balance in SRE: Finding the Equilibrium in Reliability and Velocity</h2><br />
-<br />
-<span>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.</span><br />
-<br />
-<span>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&#39;t compromise system health. Thus, the error budget becomes a balancing act, where teams weigh the trade-offs between innovation and reliability.</span><br />
-<br />
-<span>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&#39;t just a random metric; it&#39;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&#39;s problems, they are also preparing for tomorrow&#39;s challenges. </span><br />
-<br />
-<span>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&#39;s approach to toil indicates its operational health and commitment to balance.</span><br />
-<br />
-<span>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&#39;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.</span><br />
-<br />
-<span>Moreover, operational balance isn&#39;t just a technological or process challenge; it&#39;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. </span><br />
-<br />
-<span>In conclusion, operational balance in SRE isn&#39;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.</span><br />
-<br />
-<span>That all sounds very romantic. The truth is, it&#39;s brutal to archive the perfect balance. No system will ever be perfect. But at least we should aim for it!</span><br />
-<br />
-<span>Continue with the third part of this series:</span><br />
-<br />
-<a class='textlink' href='./2023-08-20-site-reliability-engineering-part-3.html'>2023-08-20 Site Reliability Engineering - Part 3: On-Call Culture and the Human Aspect</a><br />
-<br />
-<span>E-Mail your comments to paul at buetow.org :-)</span><br />
-<br />
-<a class='textlink' href='../'>Back to the main site</a><br />
- </div>
- </content>
- </entry>
- <entry>
- <title>Site Reliability Engineering - Part 1: SRE and Organizational Culture</title>
- <link href="gemini://foo.zone/gemfeed/2023-08-18-site-reliability-engineering-part-1.gmi" />
- <id>gemini://foo.zone/gemfeed/2023-08-18-site-reliability-engineering-part-1.gmi</id>
- <updated>2023-08-18T22:43:47+03:00</updated>
- <author>
- <name>Paul Buetow aka snonux</name>
- <email>paul@dev.buetow.org</email>
- </author>
- <summary>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.</summary>
- <content type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <h1 style='display: inline'>Site Reliability Engineering - Part 1: SRE and Organizational Culture</h1><br />
-<br />
-<span class='quote'>Published at 2023-08-18T22:43:47+03:00</span><br />
-<br />
-<span>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&#39;s impossible to get bored. There is always a new challenge to master, and there is always a new technology to tinker with. It&#39;s not just technical; it&#39;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.</span><br />
-<br />
-<a class='textlink' href='./2023-08-18-site-reliability-engineering-part-1.html'>2023-08-18 Site Reliability Engineering - Part 1: SRE and Organizational Culture (You are currently reading this)</a><br />
-<a class='textlink' href='./2023-08-19-site-reliability-engineering-part-2.html'>2023-08-19 Site Reliability Engineering - Part 2: Operational Balance in SRE</a><br />
-<a class='textlink' href='./2023-08-20-site-reliability-engineering-part-3.html'>2023-08-20 Site Reliability Engineering - Part 3: On-Call Culture and the Human Aspect</a><br />
-<br />
-<pre>
-▓▓▓▓░░
-
-DC on fire:
-
- ▓▓ ▓▓ ▓▓
- ░░ ░░ ▓▓▓▓ ██ ░░ ▓▓▓▓ ▓▓
- ▓▓░░░░ ░░ ▓▓▓▓ ▓▓░░ ▓▓▓▓
- ░░░░ ▓▓▓▓▓▓ ▓▓ ▓▓ ▓▓ ▓▓▓▓▓▓ ▓▓
- ▓▓░░ ▓▓▒▒▒▒▓▓▓▓ ▓▓ ▓▓▓▓ ▓▓▓▓▓▓ ▓▓▒▒▒▒▓▓▓▓ ▓▓▓▓
- ██▓▓ ▓▓▒▒░░▒▒▓▓ ▓▓██ ▓▓▓▓▓▓ ▓▓▒▒▓▓ ▓▓▒▒░░▒▒▓▓ ██▓▓▓▓
- ▓▓▓▓██ ▓▓▒▒░░░░▒▒▓▓ ▓▓▓▓ ▓▓▒▒▒▒▓▓ ▓▓▒▒░░▒▒▓▓██▓▓ ▓▓▒▒░░░░▒▒▓▓ ▓▓▒▒▒▒▓▓
- ▓▓▒▒▒▒▓▓▓▓▒▒░░▒▒▓▓▓▓▓▓▒▒▒▒▓▓ ▓▓▓▓░░▒▒▓▓ ▓▓▒▒░░▒▒▓▓▒▒▒▒▓▓ ▓▓▒▒░░▒▒▓▓▓▓▓▓▓▓░░▒▒▓▓
- ▒▒░░▒▒▓▓▓▓▒▒░░▒▒▓▓▓▓▒▒░░▒▒▓▓ ▓▓▒▒░░▒▒▓▓ ▓▓░░░░▒▒▒▒░░░░▒▒██████▒▒░░▒▒██▓▓▓▓▒▒░░▒▒▓▓██
- ░░░░▒▒▓▓▒▒░░▒▒▓▓▓▓▓▓▒▒░░▒▒▓▓██▒▒░░░░▒▒▓▓ ▓▓▒▒░░▒▒▓▓▒▒▒▒░░▒▒▓▓▓▓▒▒░░▒▒▓▓▓▓▓▓▒▒░░░░▒▒▓▓▓▓
- ░░░░▒▒▓▓▒▒░░░░▓▓██▒▒░░░░▒▒▓▓██▒▒░░░░▒▒██▓▓▓▓▒▒░░▒▒▓▓▓▓▒▒░░░░▒▒▓▓▒▒░░░░██▓▓▓▓▒▒░░░░▒▒████
- ▒▒░░▒▒▓▓▓▓░░░░▒▒▓▓▒▒▒▒░░░░▒▒▓▓▓▓▒▒░░░░▒▒▓▓▓▓▒▒░░░░▒▒▓▓▒▒░░▒▒▓▓▓▓▓▓░░░░▒▒▓▓▓▓▓▓▒▒░░░░▒▒▓▓
- ▒▒░░▒▒▓▓▒▒▒▒░░▒▒██▒▒▒▒░░▒▒▒▒██▒▒▒▒░░░░░░▒▒▓▓▒▒░░░░▒▒▒▒░░░░▒▒████▒▒▒▒░░▒▒██▓▓▒▒▒▒░░░░░░▒▒
- ░░░░░░▒▒░░░░░░░░▒▒▒▒▒▒░░░░▒▒▒▒▒▒░░░░░░░░▒▒▒▒░░░░░░▒▒▒▒░░░░░░▒▒▒▒░░░░░░░░▒▒▒▒▒▒░░░░░░░░▒▒
- ░░░░░░░░░░▒▒░░░░░░░░░░░░░░░░░░░░░░░░▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒░░░░░░░░░░░░░░░░░░
-</pre>
-<br />
-<h2 style='display: inline'>SRE and Organizational Culture: Navigating the Nexus</h2><br />
-<br />
-<span>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. </span><br />
-<br />
-<span>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.</span><br />
-<br />
-<span>But SRE isn&#39;t just about technology and metrics; it&#39;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&#39;s unsustainable to be the only go-to person for every problem.</span><br />
-<br />
-<span>Additionally, the SRE model requires good documentation. However, it&#39;s essential ensuring that this documentation undergoes the same quality checks as code, reinforcing effective onboarding, training and communication.</span><br />
-<br />
-<span>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.</span><br />
-<br />
-<span>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. </span><br />
-<br />
-<span>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&#39;s responsibility.</span><br />
-<br />
-<span>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.</span><br />
-<br />
-<span>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.</span><br />
-<br />
-<span>Continue with the second part of this series:</span><br />
-<br />
-<a class='textlink' href='./2023-08-19-site-reliability-engineering-part-2.html'>2023-08-19 Site Reliability Engineering - Part 2: Operational Balance in SRE</a><br />
-<br />
-<span>E-Mail your comments to paul at buetow.org :-)</span><br />
-<br />
-<a class='textlink' href='../'>Back to the main site</a><br />
- </div>
- </content>
- </entry>
- <entry>
- <title>Gemtexter 2.1.0 - Let's Gemtext again³</title>
- <link href="gemini://foo.zone/gemfeed/2023-07-21-gemtexter-2.1.0-lets-gemtext-again-3.gmi" />
- <id>gemini://foo.zone/gemfeed/2023-07-21-gemtexter-2.1.0-lets-gemtext-again-3.gmi</id>
- <updated>2023-07-21T10:19:31+03:00</updated>
- <author>
- <name>Paul Buetow aka snonux</name>
- <email>paul@dev.buetow.org</email>
- </author>
- <summary>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.</summary>
- <content type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <h1 style='display: inline'>Gemtexter 2.1.0 - Let&#39;s Gemtext again³</h1><br />
-<br />
-<span class='quote'>Published at 2023-07-21T10:19:31+03:00</span><br />
-<br />
-<pre>
--=[ typewriters ]=- 1/98
- .-------.
- .-------. _|~~ ~~ |_
- _|~~ ~~ |_ .-------. =(_|_______|_)
- =(_|_______|_)= _|~~ ~~ |_ |:::::::::|
- |:::::::::| =(_|_______|_) |:::::::[]|
- |:::::::[]| |:::::::::| |o=======.|
- |o=======.| |:::::::[]| `"""""""""`
- jgs `"""""""""` |o=======.|
- mod. by Paul Buetow `"""""""""`
-</pre>
-<br />
-<span>I proudly announce that I&#39;ve released Gemtexter version <span class='inlinecode'>2.1.0</span>. What is Gemtexter? It&#39;s my minimalist static site generator for Gemini Gemtext, HTML and Markdown, written in GNU Bash.</span><br />
-<br />
-<a class='textlink' href='https://codeberg.org/snonux/gemtexter'>https://codeberg.org/snonux/gemtexter</a><br />
-<br />
-<h2 style='display: inline'>Why Bash?</h2><br />
-<br />
-<span>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&#39;s still pretty maintainable and helps me try new Bash tricks here and then!</span><br />
-<br />
-<span>Let&#39;s list what&#39;s new!</span><br />
-<br />
-<h2 style='display: inline'>Switch to GPL3 license</h2><br />
-<br />
-<span>Many (almost all) of the tools and commands (GNU Bash, GMU Sed, GNU Date, GNU Grep, GNU Source Highlight) used by <span class='inlinecode'>Gemtexter</span> are licensed under the GPL anyway. So why not use the same? This was an easy switch, as I was the only code contributor so far!</span><br />
-<br />
-<h2 style='display: inline'>Source code highlighting support</h2><br />
-<br />
-<span>The HTML output now supports source code highlighting, which is pretty neat if your site is about programming. The requirement is to have the <span class='inlinecode'>source-highlight</span> command, which is GNU Source Highlight, to be installed. Once done, you can annotate a bare block with the language to be highlighted. E.g.:</span><br />
-<br />
-<pre>
- ```bash
- if [ -n "$foo" ]; then
- echo "$foo"
- fi
- ```
-</pre>
-<br />
-<span>The result will look like this (you can see the code highlighting only in the Web version, not in the Geminispace version of this site):</span><br />
-<br />
-<!-- Generator: GNU source-highlight 3.1.9
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><b><font color="#0000FF">if</font></b> <font color="#990000">[</font> -n <font color="#FF0000">"$foo"</font> <font color="#990000">];</font> <b><font color="#0000FF">then</font></b>
- echo <font color="#FF0000">"$foo"</font>
-<b><font color="#0000FF">fi</font></b>
-</pre>
-<br />
-<span>Please run <span class='inlinecode'>source-highlight --lang-list</span> for a list of all supported languages.</span><br />
-<br />
-<h2 style='display: inline'>HTML exact variant</h2><br />
-<br />
-<span>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 <span class='inlinecode'>gemtexter.conf</span> by adding the line <span class='inlinecode'>declare -rx HTML_VARIANT=exact</span>. 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. </span><br />
-<br />
-<h2 style='display: inline'>Use of Hack webfont by default</h2><br />
-<br />
-<span>The Hack web font is a typeface designed explicitly for source code. It&#39;s a derivative of the Bitstream Vera and DejaVu Mono lineage, but it features many improvements and refinements that make it better suited to reading and writing code.</span><br />
-<br />
-<span>The font has distinctive glyphs for every character, which helps to reduce confusion between similar-looking characters. For example, the characters "0" (zero), "O" (capital o), and "o" (lowercase o), or "1" (one), "l" (lowercase L), and "I" (capital i) all have distinct looks in Hack, making it easier to read and understand code at a glance.</span><br />
-<br />
-<span>Hack is open-source and freely available for use and modification under the MIT License.</span><br />
-<br />
-<h2 style='display: inline'>HTML Mastodon verification support</h2><br />
-<br />
-<span>The following link explains how URL verification works in Mastodon:</span><br />
-<br />
-<a class='textlink' href='https://joinmastodon.org/verification'>https://joinmastodon.org/verification</a><br />
-<br />
-<span>So we have to hyperlink to the Mastodon profile to be verified and also to include a <span class='inlinecode'>rel=&#39;me&#39;</span> into the tag. In order to do that add this to the <span class='inlinecode'>gemtexter.conf</span> (replace the URI to your Mastodon profile accordingly):</span><br />
-<br />
-<!-- Generator: GNU source-highlight 3.1.9
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><b><font color="#0000FF">declare</font></b> -xr <font color="#009900">MASTODON_URI</font><font color="#990000">=</font><font color="#FF0000">'https://fosstodon.org/@snonux'</font>
-</pre>
-<br />
-<span>and add the following into your <span class='inlinecode'>index.gmi</span>:</span><br />
-<br />
-<pre>
-=&gt; https://fosstodon.org/@snonux Me at Mastodon
-</pre>
-<br />
-<span>The resulting line in the HTML output will be something as follows:</span><br />
-<br />
-<!-- Generator: GNU source-highlight 3.1.9
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><b><font color="#0000FF">&lt;a</font></b> <font color="#009900">href</font><font color="#990000">=</font><font color="#FF0000">'https://fosstodon.org/@snonux'</font> <font color="#009900">rel</font><font color="#990000">=</font><font color="#FF0000">'me'</font><b><font color="#0000FF">&gt;</font></b>Me at Mastodon<b><font color="#0000FF">&lt;/a&gt;</font></b>
-</pre>
-<br />
-<h2 style='display: inline'>More</h2><br />
-<br />
-<span>Additionally, there were a couple of bug fixes, refactorings and overall improvements in the documentation made. </span><br />
-<br />
-<span>Other related posts are:</span><br />
-<br />
-<a class='textlink' href='./2021-04-24-welcome-to-the-geminispace.html'>2021-04-24 Welcome to the Geminispace</a><br />
-<a class='textlink' href='./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.html'>2021-06-05 Gemtexter - One Bash script to rule it all</a><br />
-<a class='textlink' href='./2022-08-27-gemtexter-1.1.0-lets-gemtext-again.html'>2022-08-27 Gemtexter 1.1.0 - Let&#39;s Gemtext again</a><br />
-<a class='textlink' href='./2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.html'>2023-03-25 Gemtexter 2.0.0 - Let&#39;s Gemtext again²</a><br />
-<a class='textlink' href='./2023-07-21-gemtexter-2.1.0-lets-gemtext-again-3.html'>2023-07-21 Gemtexter 2.1.0 - Let&#39;s Gemtext again³ (You are currently reading this)</a><br />
-<br />
-<span>E-Mail your comments to paul at buetow.org :-)</span><br />
-<br />
-<a class='textlink' href='../'>Back to the main site</a><br />
- </div>
- </content>
- </entry>
- <entry>
- <title>'Software Developmers Career Guide and Soft Skills' book notes</title>
- <link href="gemini://foo.zone/gemfeed/2023-07-17-career-guide-and-soft-skills-book-notes.gmi" />
- <id>gemini://foo.zone/gemfeed/2023-07-17-career-guide-and-soft-skills-book-notes.gmi</id>
- <updated>2023-07-17T04:56:20+03:00</updated>
- <author>
- <name>Paul Buetow aka snonux</name>
- <email>paul@dev.buetow.org</email>
- </author>
- <summary>These notes are of two books by 'John Sommez' I found helpful. I also added some of my own keypoints to it. These notes are mainly for my own use, but you might find them helpful, too.</summary>
- <content type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <h1 style='display: inline'>"Software Developmers Career Guide and Soft Skills" book notes</h1><br />
-<br />
-<span class='quote'>Published at 2023-07-17T04:56:20+03:00</span><br />
-<br />
-<span>These notes are of two books by "John Sommez" I found helpful. I also added some of my own keypoints to it. These notes are mainly for my own use, but you might find them helpful, too.</span><br />
-<br />
-<pre>
- ,.......... ..........,
- ,..,&#39; &#39;.&#39; &#39;,..,
- ,&#39; ,&#39; : &#39;, &#39;,
- ,&#39; ,&#39; : &#39;, &#39;,
- ,&#39; ,&#39; : &#39;, &#39;,
- ,&#39; ,&#39;............., : ,.............&#39;, &#39;,
-,&#39; &#39;............ &#39;.&#39; ............&#39; &#39;,
- &#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;;&#39;&#39;&#39;;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;
- &#39;&#39;&#39;
-</pre>
-<br />
-<h1 style='display: inline'>Improve</h1><br />
-<br />
-<h2 style='display: inline'>Always learn new things</h2><br />
-<br />
-<span>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&#39;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.</span><br />
-<br />
-<ul>
-<li>Learn a technology with a goal, e.g. implement a tool. Practice practise practice.</li>
-<li>"I know X can do Y, I don&#39;t know exactly how, but I can look it up."</li>
-<li>Read what experts are writing, for example follow blogs. Stay up to date and spent half an hour per day trading blogs and books.</li>
-<li>Pick an open source application, read the code and try to understand it to get a feel of the syntax of the programming language.</li>
-<li>Understand, that the standard library makes you a much better programmer.</li>
-<li>Self learning is the top skill a programmer can have and is also useful in other aspects in your life.</li>
-<li>Keep learning skills every day. Code every day. Don&#39;t be overconfident for job security. Read blogs, read books.</li>
-<li>If you want to learn, then do it by exploring. Also teach what you learned (for example write a blog post or hold a presentation).</li>
-</ul><br />
-<span>Fake it until you make it. But be honest about your abilities or lack of. There is however only time between now and until you make it. Refer to your abilities to learn.</span><br />
-<br />
-<span>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</span><br />
-<br />
-<h2 style='display: inline'>Set goals</h2><br />
-<br />
-<span>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.</span><br />
-<br />
-<h2 style='display: inline'>Ratings</h2><br />
-<br />
-<span>That&#39;s a trap: If you have to rate yourself, that&#39;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. </span><br />
-<br />
-<ul>
-<li>Don&#39;t do peer rating, it can fire back on you. What if the colleague becomes your new boss?</li>
-<li>Cooperate rankings are unfortunately HR guidelines and politics and only mirror a little your actual performance.</li>
-</ul><br />
-<h2 style='display: inline'>Promotions</h2><br />
-<br />
-<span>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.</span><br />
-<br />
-<ul>
-<li>Raise or promotion, what&#39;s better? Promotion is better as money will follow anyway then.</li>
-<li>Take projects no-one wants and make them shine. A promotion will follow.</li>
-<li>A promotion is not going to come to you because you deserve it. You have to hunt and ask for it.</li>
-<li>Track all kudos (e.g. ask for emails from your colleagues).</li>
-<li>Big corporations HRs don&#39;t expect a figjit. That&#39;s why it&#39;s so important to keep track of your accomplishments and kudos&#39;.</li>
-<li>If you want a raise be specific how much and know to back your demands. Don&#39;t make a thread and no ultimatums.</li>
-<li>Best way for a promotion is to switch jobs. You can even switch back with a better salary.</li>
-</ul><br />
-<h2 style='display: inline'>Finish things</h2><br />
-<br />
-<span>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.</span><br />
-<br />
-<ul>
-<li>Learn to finish things without motivation. Things will pay off when you stick to stuff and eventually motivation can also come back.</li>
-<li>You will fail if you don&#39;t plan realistically. Set also a schedule and follow to it as of life depends on it.</li>
-<li>Advances come only of you give more than asked. Consistency, commitment and knowing what you need to do is more key than hard work.</li>
-<li>Any action is better than no action. If you get stuck you have gained nothing.</li>
-<li>You need to know the unknowns. Identify as many unknown not known things as possible. </li>
-</ul><br />
-<span>Hard vs fun: Both engage the brain (video games vs work). Some work is hard and other is easy. Hard work is boring. The harsh truth is you have to put in hard and boring work in order to accomplish and be successful. Work won&#39;t be always boring though, as joy will follow with mastery.</span><br />
-<br />
-<span>Defeat is finally give up. Failure is the road to success, embrace it. Failure does not define you but how you respond to it. Events don&#39;t make your unhappy, but how you react to events do.</span><br />
-<br />
-<h2 style='display: inline'>Expand the empire</h2><br />
-<br />
-<span>The larger your empire is, the larger your circle of influence is. The larger the circle of influence is, the more opportunities you have.</span><br />
-<br />
-<ul>
-<li>Do the dirty work if you want to expand the empire. That&#39;s there the opportunities are.</li>
-<li>SCRUM often fails due to the lack to commitment. The backlog just becomes a wish to get completed.</li>
-<li>Apply work on your quality standards. Don&#39;t cross the line of compromise. Always improve your skills. Never be happy being good enough.</li>
-</ul><br />
-<span>Become visible, keep track that you accomplishments. E.g. write a weekly summary. Do presentations, be seen. Learn new things and share your learnings. Be the problem solver and not the blamer.</span><br />
-<br />
-<h2 style='display: inline'>Be pragmatic and also manage your time</h2><br />
-<br />
-<span>Make use of time boxing via the Pomodoro technique: Set a target of rounds and track the rounds. That give you exact focused work time. That&#39;s really the trick. For example set a goal of 6 daily pomodores.</span><br />
-<br />
-<ul>
-<li>Every time you do something question why does it make sense be pragmatic and don&#39;t follow because it is best practice.</li>
-<li>You can also apply the time boxing technique (Cal Newport) for focused deep work.</li>
-</ul><br />
-<span>You should feel good of the work done even if you don&#39;t finished the task. You will feel good about pomodoro wise even you don&#39;t finish the task on hand yet. Helps you to enjoy time off more. Working longer may not sell anything.</span><br />
-<br />
-<h3 style='display: inline'>The quota system</h3><br />
-<br />
-<span>Defined quota of things done. E.g. N runs per week or M Blog posts per month or O pomodoros per week. This helps with consistency. Truly commit to these quotas. Failure is not an option. Start with small commitments. Don&#39;t commit to something you can&#39;t fulfill otherwise you set yourself up for failure.</span><br />
-<br />
-<ul>
-<li>Why does the quota System work? Slow and consistent pace is the key. It also overcomes willpower weaknesses as goals are preset.</li>
-<li>Internal motivation is more important over external motivation. Check out Daniels book drive.</li>
-<li>Multitasking: Batching is effective. E.g. emails twice daily at pre-set times..</li>
-</ul><br />
-<h3 style='display: inline'>Don&#39;t waste time</h3><br />
-<br />
-<span>The biggest time waster is TV watching. The TV is programming you. It&#39;s insane that Americans watch so much TV as they work full time. Schedule one show at a time and watch it when you want to watch it. Most movies are crap anyways. The good movies will come to you as people will talk about them.</span><br />
-<br />
-<ul>
-<li>Social media is time waster as well. Schedule your Social Media times. For example be on Facebook only for max one hour on Saturdays.</li>
-<li>Meetings can waste time as well. Simply don&#39;t go to them. Try to cancel meeting if it can be dealt with via email.</li>
-<li>Enjoying things is not a waste of time. E.g. you could still play a game once in a while. It is important not to cut away all you enjoy from your life.</li>
-</ul><br />
-<h3 style='display: inline'>Habits</h3><br />
-<br />
-<span>Try to have as many good habits as possible. Start with easy habits, and make them a little bit more challenging over time. Set ankers and rewards. Over time the routines will become habits naturally.</span><br />
-<br />
-<span>Habit stacking is effective, which is combining multiple habits at the same time. For example you can workout on a circular trainer while while watching a learning video on O&#39;Reilly Safari Online while getting closer to your weekly step goal.</span><br />
-<br />
-<ul>
-<li>We don&#39;t have control over our habits but our own routines.</li>
-<li>Routines help to form the habits, though.</li>
-</ul><br />
-<h1 style='display: inline'>Work-life balance</h1><br />
-<br />
-<span>Avoid overwork hours. That&#39;s not as beneficial as you might think and comes only with very small rewards. Invest rather in yourself and not in your employer.</span><br />
-<br />
-<ul>
-<li>Work-life balance is a myth. Make it so that you enjoy work and your personal life and not just personal life.</li>
-<li>Maintain fewer but good relationships. As a reward, better and integrated your life will be.</li>
-<li>Life in the present Moment. Make the best of every moment of your life.</li>
-<li>Enjoy every aspect of your life. If you want to take away one thing from this book that is it.</li>
-</ul><br />
-<span>Use your most productive hours to work on you. Make that your priority. Take care of yourself a priority (E.g. do workouts or learn a new language). You can always workout 2 or 1 hour per day, but will you pay the price?</span><br />
-<br />
-<h2 style='display: inline'>Mental health</h2><br />
-<br />
-<ul>
-<li>Friendships and positive thinking help to have and maintain better health, longer Life, better productivity and increased happiness.</li>
-<li>Positive thinking can be trained and be a habit. Read the book "The Power of Positive Thinking".</li>
-<li>Stoicism helps. Meditation helps. Playing for fun helps too.</li>
-</ul><br />
-<span>Become the person you want to become (your self image). Program your brain unconsciously. Don&#39;t become the person other people want you to be. Embrace yourself, you are you.</span><br />
-<br />
-<span>In most cases burnout is just an illusion. If you don&#39;t have motivation push through the wall. People usually don&#39;t pass the wall as they feel they are burned out. After pushing through the wall you will have the most fun, for example you will be able playing the guitar greatly.</span><br />
-<br />
-<h2 style='display: inline'>Physical health</h2><br />
-<br />
-<span>Utilise a standing desk and treadmill (you could walk and type at the same time). Increase the incline in order to burn more calories. Even on the standing desk you burn more calories than sitting. When you use pomodoro then you can use the small breaks for push-ups (maybe won&#39;t do as good when you are in a fasted state).</span><br />
-<br />
-<ul>
-<li>You can only do one thing, lose fat or gain muscles. Not both at the same time.</li>
-<li>Train your strength by heavy lifting, but only with a very few repetitions (e.g. 5 max for each exercise, everything over this is body building).</li>
-<li>If you want to increase the muscle mass use medium weights but lift them more often. If you want to increase your endurance lift light weights but with even more reps.</li>
-<li>Avoid highly processed foods</li>
-</ul><br />
-<span>Intermittent fasting is an effective method to maintain weight and health. But it does not mean that you can only eat junk food in the feeding windows. Also, diet and nutrition is the most important for health and fitness. They make it also easier to stay focused and positive.</span><br />
-<br />
-<h2 style='display: inline'>No drama</h2><br />
-<br />
-<span>Avoid drama at work. Where are humans there is drama. You can decide where to spent your energy in. But don&#39;t avoid conflict. Conflict is healthy in any kind of relationship. Be tactful and state your opinion. The goal is to find the best solution to the problem.</span><br />
-<br />
-<span>Don&#39;t worry about other people what they do and don&#39;t do. You only worry about you. Shut up and get your own things done. But you could help to inspire a not working colleague.</span><br />
-<br />
-<ul>
-<li>During an argument, take the opponent&#39;s position and see how your opinion changes.</li>
-<li>If you they to convince someone else it&#39;s an argument. Of you try to find the best solution it is a good resolution.</li>
-<li>If someone is hurting the team let the manager know but phrase it nicely.</li>
-<li>How to get rid of a never ending talking person? Set up focus hours officially where you don&#39;t want to be interrupted. Present as if it is your defect that you get interrupted easily.</li>
-<li>TOXIC PEOPLE: AVOID THEM. RUN.</li>
-<li>Boss likes if you get shit done without getting asked all the time about things and also without drama.</li>
-</ul><br />
-<span>You have to learn how to work in a team. Be honest but tactful. It&#39;s not too be the loudest but about selling your ideas. Don&#39;t argue otherwise you won&#39;t sell anything. Be persuasive by finding the common ground. Or lead the colleagues to your idea and don&#39;t sell it upfront. Communicate clearly.</span><br />
-<br />
-<h1 style='display: inline'>Personal brand</h1><br />
-<br />
-<ul>
-<li>Invest your value outside the company. Build your personal brand. Show how valuable you are, also to other companies. Become an asset.</li>
-<li>Invest in your education. Make your goals known. If you want something ask for it (see also the sections about goals in this document).</li>
-</ul><br />
-<h2 style='display: inline'>Market yourself</h2><br />
-<br />
-<ul>
-<li>The best way to market yourself is to make you usable.</li>
-<li>Create a brand. Decide your focus. Throw your name out as often as possible.</li>
-</ul><br />
-<span>Have a blog. Schedule your posts. Consistency beats every other factor. E.g. post once a month a new post. Find your voice, you don&#39;t have to sound academic. Keep writing, if you keep it long enough the rewards will be coming. Your own blog can take 5 years to take off. Most people give up too soon.</span><br />
-<br />
-<ul>
-<li>Consistency of your blog is key. Also write quality content. Don&#39;t try to be a man of success but try to be a man of value.</li>
-<li>Have an elevator pitch: "buetow.org - Having fun with computers!"</li>
-<li>Have social media accounts, especially the ones which are more tech related.</li>
-</ul><br />
-<h2 style='display: inline'>Networking</h2><br />
-<br />
-<span>Ask people so they talk about themselves. They are not really interested in you. Use meetup.com to find groups you are interested and build up the network over time. Don&#39;t drink on social networking events even when others do. Talking to other people at events only has upsides. Just saying "hi" and introducing yourself is enough. What worse can happen? If the person rejects you so what, life goes on. Ask open questions and no "yes" and "no" questions. E.g.: "What is your story, why are you here?".</span><br />
-<br />
-<h2 style='display: inline'>Public speaking</h2><br />
-<br />
-<span>Before your talk go on stage 10 minutes in advance. Introduce yourself to the front row people. During the talk they will smile at you and encourage you during your talk.</span><br />
-<br />
-<ul>
-<li>Try at least 5 times before giving up public speaking. You can also start small, e.g. present a topic at work you are learning.</li>
-<li>Practise your talk and timing. You can also record your practicing.</li>
-</ul><br />
-<span>Just do it. Just go to conferences. Even if you are not speaking. Sell your boss what you would learn and "this and that" and you would present the learnings to the team afterwards.</span><br />
-<br />
-<h1 style='display: inline'>New job</h1><br />
-<br />
-<h2 style='display: inline'>For the interview</h2><br />
-<br />
-<ul>
-<li>Build up a network before the interview. E.g., follow and comment blogs. Or go to meet-ups and conferences. Join user groups.</li>
-<li>Ask to touch base before the real interview and ask questions about the company. Do "pre-interviews".</li>
-<li>Have a blog, a CV can only be 2 pages and an interview only can last only 2 hours. A blog helps you also to be a better communicator.</li>
-</ul><br />
-<span>If you are specialized then there is a better chance to get a fitting job. No one will hire a general lawyer if there are specialized lawyers available. Even if you are specialized, you will have a wide range of skills (T-shape knowledge).</span><br />
-<br />
-<h2 style='display: inline'>Find the right type of company</h2><br />
-<br />
-<span>Not all companies are equal. They have individual cultures and guidelines.</span><br />
-<br />
-<ul>
-<li>Startup: dynamic and larger impact. Many hats on.</li>
-<li>Medium size companies: most stable ones. Not cutting edge technologies. No crazy working hours.</li>
-<li>Large company: very established with a lot of structure however constant layoffs and restructurings. Less impact you can have. Complex politics.</li>
-<li>Working for yourself: This is harder than you think, probably much harder.</li>
-</ul><br />
-<span>Work in a tech. company if you want to work on/with cutting edge technologies.</span><br />
-<br />
-<h2 style='display: inline'>Apply for the new job</h2><br />
-<br />
-<span>Get a professional resume writer. Get referrals of writers and get samples from there. Get sufficient with algorithm and data structures interview questions. Cracking the coding interview book and blog </span><br />
-<br />
-<ul>
-<li>Apply for each job with a specialised CV each. Each CV fits the job better.</li>
-<li>Best get a job via a personal referral or inbound marketing. The latter is somehow rare.</li>
-<li>Inbound marketing is for example someone responds to your blog and offers you a job.</li>
-<li>Interview the interviewer. Be persistent.</li>
-<li>Create creative looking resumes, see simple programmer website. Action-result style for a resume.</li>
-</ul><br />
-<span>Invest in your dress code as appearance masters. It does make sense to invest in your style. You could even hire a professional stylist (not my personal way though).</span><br />
-<br />
-<h2 style='display: inline'>Negotiation</h2><br />
-<br />
-<ul>
-<li>Whoever names the number first loses. You don&#39;t know what someone else is expecting unless told. Low ball number may be an issue but you have to know the market.</li>
-<li>Salary is not about what you need but what you are worth. Try to find out what you are worth.</li>
-<li>Big tech companies have a pay scale. You can ask for this.</li>
-<li>Don&#39;t tell your current salary. Only do one counter offer and say "If you do X then I commit today". Be tactful and not rude. Nobody wants to be taken advantage of. Also, don&#39;t be arrogant.</li>
-<li>If the company wants to know your range, respond: "I would rather learn more about the job and compensation. You have a range in mind, correct?" Be brave and just pause here.</li>
-<li>Otherwise, if the company refuses then say "if you tell me what the range is and although I am not yet sure yet what are my exact salary requirements are I can see if the range is of what I am looking for. If they absolute refuse give a high ball range you would expect and make it conditional to the overall compensation package. E.g. 70k to 100k depending on the compensation package. THE LOW END SHOULD BE YOUR REAL LOW END. Play a little bit of hardball here and be brave. Practise it.</li>
-<li>Put 10 percent on top of the salary range into a counter offer.</li>
-<li>Everything is negotiable, not only the salary.</li>
-<li>Job markup rate: Check it regarding the recruitment rate negotiation.</li>
-<li>Don&#39;t make a rushed decision based on deadlines. Make a fairly high counter offer shortly before deadline.</li>
-<li>You should also cope with rejections while selling yourself. There is no such thing as job security.</li>
-</ul><br />
-<ul>
-<li>Never spilt the difference is the best book for learning negotiation techniques..</li>
-</ul><br />
-<h2 style='display: inline'>Leaving the old job</h2><br />
-<br />
-<span>When leaving a job make a clean and non personal as possible. Never complain and never explain. Don&#39;t worry about abandonment of the team. Everybody is replacement and you make a business decision. Don&#39;t threaten to quit as you are replaceable.</span><br />
-<br />
-<h1 style='display: inline'>Other things</h1><br />
-<br />
-<ul>
-<li>As a leader lead by example and don&#39;t lead from the Eiffel tower.</li>
-<li>As a leader you are responsible for the team. If the team fails then it&#39;s your fault only.</li>
-</ul><br />
-<h2 style='display: inline'>Testing</h2><br />
-<br />
-<span>Unit testing Vs regression testing: Unit tests test the smallest possible unit and get rewritten if the unit gets changed. It&#39;s like programming against a specification n. Regression tests test whether the software still works after the change. Now you know more than most software engineers.</span><br />
-<br />
-<h2 style='display: inline'>Books to read</h2><br />
-<br />
-<ul>
-<li>Clean Code</li>
-<li>Code Complete</li>
-<li>Cracking the Interview - Lessons and Solutions.</li>
-<li>Daniels Book "Drive" (about internal and external motivation)</li>
-<li>God&#39;s degree (inventor of Dilbert)</li>
-<li>Head first Design Patterns</li>
-<li>How to win Friends and influence People</li>
-<li>Never Split the Difference [X]</li>
-<li>Structure and programming functional programs</li>
-<li>The obstacle is the way [X]</li>
-<li>The passionate programmer</li>
-<li>The Power of Positive Thinking (Highly religious - I personally don&#39;t like it)</li>
-<li>The Pragmatic Programmer [X]</li>
-<li>The war of Art (to combat procrastination)</li>
-<li>Willpower Instinct</li>
-</ul><br />
-<span>Other book notes of mine are:</span><br />
-<br />
-<a class='textlink' href='./2023-03-16-the-pragmatic-programmer-book-notes.html'>2023-03-16 "The Pragmatic Programmer" book notes</a><br />
-<a class='textlink' href='./2023-04-01-never-split-the-difference-book-notes.html'>2023-04-01 "Never split the difference" book notes</a><br />
-<a class='textlink' href='./2023-05-06-the-obstacle-is-the-way-book-notes.html'>2023-05-06 "The Obstacle is the Way" book notes</a><br />
-<a class='textlink' href='./2023-07-17-career-guide-and-soft-skills-book-notes.html'>2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes (You are currently reading this)</a><br />
-<br />
-<span>E-Mail your comments to paul at buetow.org :-)</span><br />
-<br />
-<a class='textlink' href='../resources.html'>More books and other resources I found useful.</a><br />
-<a class='textlink' href='../'>Back to the main site</a><br />
- </div>
- </content>
- </entry>
- <entry>
- <title>KISS server monitoring with Gogios</title>
- <link href="gemini://foo.zone/gemfeed/2023-06-01-kiss-server-monitoring-with-gogios.gmi" />
- <id>gemini://foo.zone/gemfeed/2023-06-01-kiss-server-monitoring-with-gogios.gmi</id>
- <updated>2023-06-01T21:10:17+03:00</updated>
- <author>
- <name>Paul Buetow aka snonux</name>
- <email>paul@dev.buetow.org</email>
- </author>
- <summary>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.</summary>
- <content type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <h1 style='display: inline'>KISS server monitoring with Gogios</h1><br />
-<br />
-<span class='quote'>Published at 2023-06-01T21:10:17+03:00</span><br />
-<br />
-<a href='./2023-06-01-kiss-server-monitoring-with-gogios/gogios-small.png'><img alt='Gogios logo' title='Gogios logo' src='./2023-06-01-kiss-server-monitoring-with-gogios/gogios-small.png' /></a><br />
-<br />
-<h2 style='display: inline'>Introduction</h2><br />
-<br />
-<span>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 <span class='inlinecode'>foo.zone</span>, my MTAs, my authoritative DNS servers, my NextCloud, Wallabag and Anki sync server installations, etc.</span><br />
-<br />
-<span>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:</span><br />
-<br />
-<a class='textlink' href='https://codeberg.org/snonux/gogios'>https://codeberg.org/snonux/gogios</a><br />
-<br />
-<pre>
- _____________________________ ____________________________
- / \ / \
- | _______________________ || ______________________ |
- | / \ || / \ |
- | | # Alerts with status c| || | # Unhandled alerts: | |
- | | hanged: | || | | |
- | | | || | CRITICAL: Check Pizza| |
- | | OK-&gt;CRITICAL: Check Pi| || | : Late delivery | |
- | | zza: Late delivery | || | | |
- | | | || | WARNING: Check Thirst| |
- | | | || | : OutofKombuchaExcept| |
- | \_______________________/ || \______________________/ |
- | /|\ GOGIOS MONITOR 1 _ || /|\ GOGIOS MONITOR 2 _ |
- \_____________________________/ \____________________________/
- !_________________________! !________________________!
-
-------------------------------------------------
-ASCII art was modified by Paul Buetow
-The original can be found at
-https://asciiart.website/index.php?art=objects/computers
-</pre>
-<br />
-<h2 style='display: inline'>Motivation</h2><br />
-<br />
-<span>With experience in monitoring solutions like Nagios, Icinga, Prometheus and OpsGenie, these tools often came with many features that I didn&#39;t necessarily need for personal use. Contact groups, host groups, check clustering, and the requirement of operating a DBMS and a WebUI added complexity and bloat to my monitoring setup.</span><br />
-<br />
-<span>My primary goal was to have a single email address for notifications and a simple mechanism to periodically execute standard Nagios check scripts and notify me of any state changes. I wanted the most minimalistic monitoring solution possible but wasn&#39;t satisfied with the available options.</span><br />
-<br />
-<span>This led me to create Gogios, a lightweight monitoring tool tailored to my specific needs. I chose the Go programming language for this project as it comes, in my opinion, with the best balance of ease to use and performance.</span><br />
-<br />
-<h2 style='display: inline'>Features</h2><br />
-<br />
-<ul>
-<li>Compatible with Nagios Check scripts: Gogios leverages the widely-used Nagios Check API, allowing to use existing Nagios plugins.</li>
-<li>Lightweight and Minimalistic: Gogios is designed to be simple and fairly easy to set up.</li>
-<li>Configurable Check Timeout and Concurrency: Gogios allows you to set a timeout for checks and configure the number of concurrent checks, offering flexibility in monitoring your resources.</li>
-<li>Configurable check dependency: A check can depend on another check, which enables scenarios like not executing an HTTP check when the server isn&#39;t pingable.</li>
-<li>Retries: Check retry and retry intervals are configurable per check.</li>
-<li>Email Notifications: Gogios can send email notifications regarding the status of monitored services, ensuring you stay informed about potential issues.</li>
-<li>CRON-based Execution: Gogios can be quickly scheduled to run periodically via CRON, allowing you to automate monitoring without needing a complex setup.</li>
-</ul><br />
-<h2 style='display: inline'>Example alert</h2><br />
-<br />
-<span>This is an example alert report received via E-Mail. Whereas, <span class='inlinecode'>[C:2 W:0 U:0 OK:51]</span> means that we&#39;ve got two alerts in status critical, 0 warnings, 0 unknowns and 51 OKs.</span><br />
-<br />
-<pre>
-Subject: GOGIOS Report [C:2 W:0 U:0 OK:51]
-
-This is the recent Gogios report!
-
-# Alerts with status changed:
-
-OK-&gt;CRITICAL: Check ICMP4 vulcan.buetow.org: Check command timed out
-OK-&gt;CRITICAL: Check ICMP6 vulcan.buetow.org: Check command timed out
-
-# Unhandled alerts:
-
-CRITICAL: Check ICMP4 vulcan.buetow.org: Check command timed out
-CRITICAL: Check ICMP6 vulcan.buetow.org: Check command timed out
-
-Have a nice day!
-</pre>
-<br />
-<h2 style='display: inline'>Installation</h2><br />
-<br />
-<h3 style='display: inline'>Compiling and installing Gogios</h3><br />
-<br />
-<span>This document is primarily written for OpenBSD, but applying the corresponding steps to any Unix-like (e.g. Linux-based) operating system should be easy. On systems other than OpenBSD, you may always have to replace <span class='inlinecode'>does</span> with the <span class='inlinecode'>sudo</span> command and replace the <span class='inlinecode'>/usr/local/bin</span> path with <span class='inlinecode'>/usr/bin</span>.</span><br />
-<br />
-<span>To compile and install Gogios on OpenBSD, follow these steps:</span><br />
-<br />
-<!-- Generator: GNU source-highlight 3.1.9
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre>git clone https<font color="#990000">:</font>//codeberg<font color="#990000">.</font>org/snonux/gogios<font color="#990000">.</font>git
-cd gogios
-go build -o gogios cmd/gogios/main<font color="#990000">.</font>go
-doas cp gogios /usr/local/bin/gogios
-doas chmod <font color="#993399">755</font> /usr/local/bin/gogios
-</pre>
-<br />
-<span>You can use cross-compilation if you want to compile Gogios for OpenBSD on a Linux system without installing the Go compiler on OpenBSD. Follow these steps:</span><br />
-<br />
-<!-- Generator: GNU source-highlight 3.1.9
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><b><font color="#0000FF">export</font></b> <font color="#009900">GOOS</font><font color="#990000">=</font>openbsd
-<b><font color="#0000FF">export</font></b> <font color="#009900">GOARCH</font><font color="#990000">=</font>amd64
-go build -o gogios cmd/gogios/main<font color="#990000">.</font>go
-</pre>
-<br />
-<span>On your OpenBSD system, copy the binary to <span class='inlinecode'>/usr/local/bin/gogios</span> and set the correct permissions as described in the previous section. All steps described here you could automate with your configuration management system of choice. I use Rexify, the friendly configuration management system, to automate the installation, but that is out of the scope of this document.</span><br />
-<br />
-<a class='textlink' href='https://www.rexify.org'>https://www.rexify.org</a><br />
-<br />
-<h3 style='display: inline'>Setting up user, group and directories</h3><br />
-<br />
-<span>It is best to create a dedicated system user and group for Gogios to ensure proper isolation and security. Here are the steps to create the <span class='inlinecode'>_gogios</span> user and group under OpenBSD:</span><br />
-<br />
-<!-- Generator: GNU source-highlight 3.1.9
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre>doas adduser -group _gogios -batch _gogios
-doas usermod -d /var/run/gogios _gogios
-doas mkdir -p /var/run/gogios
-doas chown _gogios<font color="#990000">:</font>_gogios /var/run/gogios
-doas chmod <font color="#993399">750</font> /var/run/gogios
-</pre>
-<br />
-<span>Please note that creating a user and group might differ depending on your operating system. For other operating systems, consult their documentation for creating system users and groups.</span><br />
-<br />
-<h3 style='display: inline'>Installing monitoring plugins</h3><br />
-<br />
-<span>Gogios relies on external Nagios or Icinga monitoring plugin scripts. On OpenBSD, you can install the <span class='inlinecode'>monitoring-plugins</span> package with Gogios. The monitoring-plugins package is a collection of monitoring plugins, similar to Nagios plugins, that can be used to monitor various services and resources:</span><br />
-<br />
-<!-- Generator: GNU source-highlight 3.1.9
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre>doas pkg_add monitoring-plugins
-doas pkg_add nrpe <i><font color="#9A1900"># If you want to execute checks remotely via NRPE.</font></i>
-</pre>
-<br />
-<span>Once the installation is complete, you can find the monitoring plugins in the <span class='inlinecode'>/usr/local/libexec/nagios</span> directory, which then can be configured to be used in <span class='inlinecode'>gogios.json</span>.</span><br />
-<br />
-<h2 style='display: inline'>Configuration</h2><br />
-<br />
-<h3 style='display: inline'>MTA</h3><br />
-<br />
-<span>Gogios requires a local Mail Transfer Agent (MTA) such as Postfix or OpenBSD SMTPD running on the same server where the CRON job (see about the CRON job further below) is executed. The local MTA handles email delivery, allowing Gogios to send email notifications to monitor status changes. Before using Gogios, ensure that you have a properly configured MTA installed and running on your server to facilitate the sending of emails. Once the MTA is set up and functioning correctly, Gogios can leverage it to send email notifications.</span><br />
-<br />
-<span>You can use the mail command to send an email via the command line on OpenBSD. Here&#39;s an example of how to send a test email to ensure that your email server is working correctly:</span><br />
-<br />
-<pre>
-echo &#39;This is a test email from OpenBSD.&#39; | mail -s &#39;Test Email&#39; your-email@example.com
-</pre>
-<br />
-<span>Check the recipient&#39;s inbox to confirm the delivery of the test email. If the email is delivered successfully, it indicates that your email server is configured correctly and functioning. Please check your MTA logs in case of issues.</span><br />
-<br />
-<h3 style='display: inline'>Configuring Gogios</h3><br />
-<br />
-<span>To configure Gogios, create a JSON configuration file (e.g., <span class='inlinecode'>/etc/gogios.json</span>). Here&#39;s an example configuration:</span><br />
-<br />
-<!-- Generator: GNU source-highlight 3.1.9
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><font color="#990000">{</font>
- "EmailTo": "<font color="#FF0000">paul@dev.buetow.org</font>"<font color="#990000">,</font>
- "EmailFrom": "<font color="#FF0000">gogios@buetow.org</font>"<font color="#990000">,</font>
- "CheckTimeoutS": <font color="#993399">10</font><font color="#990000">,</font>
- "CheckConcurrency": <font color="#993399">2</font><font color="#990000">,</font>
- "StateDir": "<font color="#FF0000">/var/run/gogios</font>"<font color="#990000">,</font>
- "Checks": <font color="#990000">{</font>
- "Check ICMP4 www.foo.zone": <font color="#990000">{</font>
- "Plugin": "<font color="#FF0000">/usr/local/libexec/nagios/check_ping</font>"<font color="#990000">,</font>
- "Args": <font color="#990000">[</font> "-H"<font color="#990000">,</font> "www.foo.zone"<font color="#990000">,</font> "-4"<font color="#990000">,</font> "-w"<font color="#990000">,</font> "50,10%"<font color="#990000">,</font> "-c"<font color="#990000">,</font> "100,15%" <font color="#990000">],</font>
- "Retries": <font color="#993399">3</font><font color="#990000">,</font>
- "RetryInterval": <font color="#993399">10</font>
- <font color="#990000">},</font>
- "Check ICMP6 www.foo.zone": <font color="#990000">{</font>
- "Plugin": "<font color="#FF0000">/usr/local/libexec/nagios/check_ping</font>"<font color="#990000">,</font>
- "Args": <font color="#990000">[</font> "-H"<font color="#990000">,</font> "www.foo.zone"<font color="#990000">,</font> "-6"<font color="#990000">,</font> "-w"<font color="#990000">,</font> "50,10%"<font color="#990000">,</font> "-c"<font color="#990000">,</font> "100,15%" <font color="#990000">],</font>
- "Retries": <font color="#993399">3</font><font color="#990000">,</font>
- "RetryInterval": <font color="#993399">10</font>
- <font color="#990000">},</font>
- "www.foo.zone HTTP IPv4": <font color="#990000">{</font>
- "Plugin": "<font color="#FF0000">/usr/local/libexec/nagios/check_http</font>"<font color="#990000">,</font>
- "Args": <font color="#990000">[</font>"www.foo.zone"<font color="#990000">,</font> "-4"<font color="#990000">],</font>
- "DependsOn": <font color="#990000">[</font>"Check ICMP4 www.foo.zone"<font color="#990000">]</font>
- <font color="#990000">},</font>
- "www.foo.zone HTTP IPv6": <font color="#990000">{</font>
- "Plugin": "<font color="#FF0000">/usr/local/libexec/nagios/check_http</font>"<font color="#990000">,</font>
- "Args": <font color="#990000">[</font>"www.foo.zone"<font color="#990000">,</font> "-6"<font color="#990000">],</font>
- "DependsOn": <font color="#990000">[</font>"Check ICMP6 www.foo.zone"<font color="#990000">]</font>
- <font color="#990000">}</font>
- "Check NRPE Disk Usage foo.zone": <font color="#990000">{</font>
- "Plugin": "<font color="#FF0000">/usr/local/libexec/nagios/check_nrpe</font>"<font color="#990000">,</font>
- "Args": <font color="#990000">[</font>"-H"<font color="#990000">,</font> "foo.zone"<font color="#990000">,</font> "-c"<font color="#990000">,</font> "check_disk"<font color="#990000">,</font> "-p"<font color="#990000">,</font> "5666"<font color="#990000">,</font> "-4"<font color="#990000">]</font>
- <font color="#990000">}</font>
- <font color="#990000">}</font>
-<font color="#990000">}</font>
-</pre>
-<br />
-<ul>
-<li><span class='inlinecode'>EmailTo</span>: Specifies the recipient of the email notifications.</li>
-<li><span class='inlinecode'>EmailFrom</span>: Indicates the sender&#39;s email address for email notifications.</li>
-<li><span class='inlinecode'>CheckTimeoutS</span>: Sets the timeout for checks in seconds.</li>
-<li><span class='inlinecode'>CheckConcurrency</span>: Determines the number of concurrent checks that can run simultaneously.</li>
-<li><span class='inlinecode'>StateDir</span>: Specifies the directory where Gogios stores its persistent state in a <span class='inlinecode'>state.json</span> file. </li>
-<li><span class='inlinecode'>Checks</span>: Defines a list of checks to be performed, each with a unique name, plugin path, and arguments.</li>
-</ul><br />
-<span>Adjust the configuration file according to your needs, specifying the checks you want Gogios to perform.</span><br />
-<br />
-<span>If you want to execute checks only when another check succeeded (status OK), use <span class='inlinecode'>DependsOn</span>. In the example above, the HTTP checks won&#39;t run when the hosts aren&#39;t pingable. They will show up as <span class='inlinecode'>UNKNOWN</span> in the report.</span><br />
-<br />
-<span><span class='inlinecode'>Retries</span> and <span class='inlinecode'>RetryInterval</span> are optional check configuration parameters. In case of failure, Gogios will retry <span class='inlinecode'>Retries</span> times each <span class='inlinecode'>RetryInterval</span> seconds.</span><br />
-<br />
-<span>For remote checks, use the <span class='inlinecode'>check_nrpe</span> plugin. You also need to have the NRPE server set up correctly on the target host (out of scope for this document).</span><br />
-<br />
-<span>The <span class='inlinecode'>state.json</span> file mentioned above keeps track of the monitoring state and check results between Gogios runs, enabling Gogios only to send email notifications when there are changes in the check status.</span><br />
-<br />
-<h2 style='display: inline'>Running Gogios</h2><br />
-<br />
-<span>Now it is time to give it a first run. On OpenBSD, do:</span><br />
-<br />
-<!-- Generator: GNU source-highlight 3.1.9
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre>doas -u _gogios /usr/local/bin/gogios -cfg /etc/gogios<font color="#990000">.</font>json
-</pre>
-<br />
-<span>To run Gogios via CRON on OpenBSD as the <span class='inlinecode'>gogios</span> user and check all services once per minute, follow these steps:</span><br />
-<br />
-<span>Type <span class='inlinecode'>doas crontab -e -u _gogios</span> and press Enter to open the crontab file for the <span class='inlinecode'>_gogios</span> user for editing and add the following lines to the crontab file:</span><br />
-<br />
-<pre>
-*/5 8-22 * * * /usr/local/bin/gogios -cfg /etc/gogios.json
-0 7 * * * /usr/local/bin/gogios -renotify -cfg /etc/gogios.json
-</pre>
-<br />
-<span>Gogios is now configured to run every five minutes from 8 am to 10 pm via CRON as the <span class='inlinecode'>_gogios</span> user. It will execute the checks and send monitoring status whenever a check status changes via email according to your configuration. Also, Gogios will run once at 7 am every morning and re-notify all unhandled alerts as a reminder.</span><br />
-<br />
-<h3 style='display: inline'>High-availability</h3><br />
-<br />
-<span>To create a high-availability Gogios setup, you can install Gogios on two servers that will monitor each other using the NRPE (Nagios Remote Plugin Executor) plugin. By running Gogios in alternate CRON intervals on both servers, you can ensure that even if one server goes down, the other will continue monitoring your infrastructure and sending notifications.</span><br />
-<br />
-<ul>
-<li>Install Gogios on both servers following the compilation and installation instructions provided earlier.</li>
-<li>Install the NRPE server (out of scope for this document) and plugin on both servers. This plugin allows you to execute Nagios check scripts on remote hosts.</li>
-<li>Configure Gogios on both servers to monitor each other using the NRPE plugin. Add a check to the Gogios configuration file (<span class='inlinecode'>/etc/gogios.json</span>) on both servers that uses the NRPE plugin to execute a check script on the other server. For example, if you have Server A and Server B, the configuration on Server A should include a check for Server B, and vice versa.</li>
-<li>Set up alternate CRON intervals on both servers. Configure the CRON job on Server A to run Gogios at minutes 0, 10, 20, ..., and on Server B to run at minutes 5, 15, 25, ... This will ensure that if one server goes down, the other server will continue monitoring and sending notifications. </li>
-<li>Gogios doesn&#39;t support clustering. So it means when both servers are up, unhandled alerts will be notified via E-Mail twice; from each server once. That&#39;s the trade-off for simplicity.</li>
-</ul><br />
-<span>There are plans to make it possible to execute certain checks only on certain nodes (e.g. on elected leader or master nodes). This is still in progress (check out my Gorum Git project).</span><br />
-<br />
-<h2 style='display: inline'>Conclusion:</h2><br />
-<br />
-<span>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.</span><br />
-<br />
-<span>E-Mail your comments to paul at buetow.org :-)</span><br />
-<br />
-<a class='textlink' href='../'>Back to the main site</a><br />
- </div>
- </content>
- </entry>
- <entry>
- <title>'The Obstacle is the Way' book notes</title>
- <link href="gemini://foo.zone/gemfeed/2023-05-06-the-obstacle-is-the-way-book-notes.gmi" />
- <id>gemini://foo.zone/gemfeed/2023-05-06-the-obstacle-is-the-way-book-notes.gmi</id>
- <updated>2023-05-06T17:23:16+03:00</updated>
- <author>
- <name>Paul Buetow aka snonux</name>
- <email>paul@dev.buetow.org</email>
- </author>
- <summary>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.</summary>
- <content type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <h1 style='display: inline'>"The Obstacle is the Way" book notes</h1><br />
-<br />
-<span class='quote'>Published at 2023-05-06T17:23:16+03:00</span><br />
-<br />
-<span>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.</span><br />
-<br />
-<br />
-<pre>
- ,.......... ..........,
- ,..,&#39; &#39;.&#39; &#39;,..,
- ,&#39; ,&#39; : &#39;, &#39;,
- ,&#39; ,&#39; : &#39;, &#39;,
- ,&#39; ,&#39; : &#39;, &#39;,
- ,&#39; ,&#39;............., : ,.............&#39;, &#39;,
-,&#39; &#39;............ &#39;.&#39; ............&#39; &#39;,
- &#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;;&#39;&#39;&#39;;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;
- &#39;&#39;&#39;
-</pre>
-<br />
-<span>"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.</span><br />
-<br />
-<h2 style='display: inline'>Reframe your perspective</h2><br />
-<br />
-<span>The obstacle in your path can become your path to success. Instead of being paralyzed by challenges, see them as opportunities to learn and grow. Remember, the things that hurt us often instruct us. </span><br />
-<br />
-<span>We spend a lot of time trying to get things perfect and look at the rules, but what matters is that it works; it doesn&#39;t need to be after the book. Focus on results rather than on beautiful methods. In Jujitsu, it does matter that you bring your opponent down, but not how. There are many ways from point A to point B; it doesn&#39;t need to be a straight line. So many try to find the best solution but need to catch up on what is in Infront of them. Think progress and not perfection.</span><br />
-<br />
-<span>Don&#39;t always try to use the front door; a backdoor could open. It&#39;s nonsense. Don&#39;t fight the judo master with judo. Non-action can be action, exposing the weaknesses of others.</span><br />
-<br />
-<br />
-<h2 style='display: inline'>Embrace rationality</h2><br />
-<br />
-<span>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.</span><br />
-<br />
-<h2 style='display: inline'>Control your response</h2><br />
-<br />
-<span>You can choose how you respond to obstacles. Focus on what you can control, and don&#39;t let yourself feel harmed by external circumstances. Remember, you decide how things affect you; nobody else does. Choose to feel good in response to any situation. Embrace the challenges and obstacles that come your way, as they are opportunities for growth and learning.</span><br />
-<br />
-<h2 style='display: inline'>Practice emotional and physical resilience</h2><br />
-<br />
-<span>Martial artists know the importance of developing physical and emotional strength. Cultivate the art of not panicking; it will help you avoid making mistakes during high-pressure situations.</span><br />
-<br />
-<span>Focus on what you can control. Don&#39;t choose to feel harmed, and then you won&#39;t be harmed. I decide things that affect me; nobody else does. E.g., in prison, your mind stays your own. Don&#39;t ignore fear but explain it away, have a different view.</span><br />
-<br />
-<h2 style='display: inline'>Persistence and patience</h2><br />
-<br />
-<span>Practice persistence and patience in your pursuits. Focus on the process rather than the prize and take one step at a time. Remember, the journey is about finishing tasks, projects, or workouts to the best of your ability. Never be in a hurry and never be desperate. There is no reason to be rushed; there are all in the long haul. Follow the process and not the price. Take it one step at a time. The process is about finishing (workout, task, project, etc.).</span><br />
-<br />
-<h2 style='display: inline'>Embrace failure</h2><br />
-<br />
-<span>Failure is a natural part of life and can make us stronger. Treat defeat as a stepping stone to success and education. What is defeat? The first step to education. Failure makes you stronger. If we do our best, we can be proud of it, regardless of the result. Do your job, but do it right. Only an asshole thinks he is too good at the things he does. Also, asking for forgiveness is easier than asking for permission. </span><br />
-<br />
-<h2 style='display: inline'>Be adaptable</h2><br />
-<br />
-<span>There are many ways to achieve your goals; sometimes, unconventional methods are necessary. Feel free to break the rules or go off the beaten path if it will lead to better results. Transform weaknesses into strengths. We have a choice of how to respond to things. It&#39;s not about being positive but to be creative. Aim high, but stuff will happen; E.g., surprises will always happen.</span><br />
-<br />
-<h2 style='display: inline'>Embrace non-action</h2><br />
-<br />
-<span>We constantly push to the next thing. Sometimes the best course of action is standing still or even going backwards. Obstacles might resolve by themselves. Or going sideways. Sometimes, the best action is to stand still, go sideways, or even go backwards. Obstacles may resolve themselves or present new opportunities if you&#39;re patient and observant. People always want your input before you have all the facts. They want you to play after their rules. The question is, do you let them? The English call it the cool head. Being in control of Stress; requires practice. Appear, the absence of fear (Greek). When all others do it one way, it does not mean it is the correct or best practice.</span><br />
-<br />
-<h2 style='display: inline'>Leverage crisis</h2><br />
-<br />
-<span>In times of crisis, seize the chance to do things never done before. Great people use negative situations to their advantage and become the most effective in challenging circumstances.</span><br />
-<br />
-<span>The art of not panicking; otherwise, you will make mistakes. When overs are shocked, you know which way to take due to your thinking of the problem at Hand. A crisis gives you a chance to do things which never done before. Ordinary people shy from negative situations; great people use these for their benefit and are the most effective. The obstacle is not just turned upside down but used as a catapult.</span><br />
-<br />
-<span>Be prepared for nothing to work. Problems are an opportunity to do your best, not to do miracles. Always manage your expectations. It will suck, but it will be ok. Be prepared to begin from the beginning. Be cheerful and eagerly work on the next obstacle. Each time you become better. Life is not a sprint but a marathon. After each obstacle lies another obstacle, there won&#39;t be anything without obstacles. Passing one means you are ready for the next.</span><br />
-<br />
-<h2 style='display: inline'>Build your inner citadel</h2><br />
-<br />
-<span>Develop your inner strength during good times so you can rely on it in bad times. Always prepare for adversity and face it with calmness and resilience. Be humble enough that things which happen will happen. Build your inner citadel. In good times strengthen it. In bad times rely on it.</span><br />
-<br />
-<span>We should always prepare for things to get tough. Your house burns down: no worries, we eliminated much rubbish. Imagine what can go wrong before things go wrong. We are prepared for adversity; it&#39;s other people who aren&#39;t. Phil Jackson&#39;s hip problem example. To receive unexpected benefits, you must first accept the unexpected obstacles. Meditate on death. It&#39;s a universal obstacle. Use it as a reminder to do your best.</span><br />
-<br />
-<h2 style='display: inline'>Love everything that happens</h2><br />
-<br />
-<span>Turn an obstacle the other way around for your benefit. Use it at fuel. It&#39;s simple but challenging. Most are paralyzed instead. The obstacle in the path becomes the path. Obstacles are neither good nor bad. The things which hurt, instruct.</span><br />
-<br />
-<span>Should I hate people who hate me? That&#39;s their problem and not mine. Be always calm and relaxed during the fight. The story of the battle is the story of the smile. Cheerfulness in all situations, especially the bad ones. Love for everything that happens; if it happens, it was meant to happen. We can choose how we react to things, so why not choose to feel good? I love everything that happens. You must never lower yourself to the person you don&#39;t like.</span><br />
-<br />
-<h2 style='display: inline'>Conclusion</h2><br />
-<br />
-<span>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.</span><br />
-<br />
-<span>Other book notes of mine are:</span><br />
-<br />
-<a class='textlink' href='./2023-03-16-the-pragmatic-programmer-book-notes.html'>2023-03-16 "The Pragmatic Programmer" book notes</a><br />
-<a class='textlink' href='./2023-04-01-never-split-the-difference-book-notes.html'>2023-04-01 "Never split the difference" book notes</a><br />
-<a class='textlink' href='./2023-05-06-the-obstacle-is-the-way-book-notes.html'>2023-05-06 "The Obstacle is the Way" book notes (You are currently reading this)</a><br />
-<a class='textlink' href='./2023-07-17-career-guide-and-soft-skills-book-notes.html'>2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes</a><br />
-<br />
-<span>E-Mail your comments to paul at buetow.org :-)</span><br />
-<br />
-<a class='textlink' href='../resources.html'>More books and other resources I found useful.</a><br />
-<a class='textlink' href='../'>Back to the main site</a><br />
- </div>
- </content>
- </entry>
- <entry>
- <title>Unveiling `guprecords.raku`: Global Uptime Records with Raku</title>
- <link href="gemini://foo.zone/gemfeed/2023-05-01-unveiling-guprecords:-uptime-records-with-raku.gmi" />
- <id>gemini://foo.zone/gemfeed/2023-05-01-unveiling-guprecords:-uptime-records-with-raku.gmi</id>
- <updated>2023-04-30T13:10:26+03:00</updated>
- <author>
- <name>Paul Buetow aka snonux</name>
- <email>paul@dev.buetow.org</email>
- </author>
- <summary>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.</summary>
- <content type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <h1 style='display: inline'>Unveiling <span class='inlinecode'>guprecords.raku</span>: Global Uptime Records with Raku</h1><br />
-<br />
-<span class='quote'>Published at 2023-04-30T13:10:26+03:00</span><br />
-<br />
-<pre>
-+-----+-----------------+-----------------------------+
-| Pos | Host | Lifespan |
-+-----+-----------------+-----------------------------+
-| 1. | dionysus | 8 years, 6 months, 17 days |
-| 2. | uranus | 7 years, 2 months, 16 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. | tauceti | 2 years, 3 months, 22 days |
-| 10. | callisto | 2 years, 3 months, 13 days |
-+-----+-----------------+-----------------------------+
-</pre>
-<br />
-<h1 style='display: inline'>Introduction</h1><br />
-<br />
-<span>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.</span><br />
-<br />
-<span>As a result of this, I am introducing <span class='inlinecode'>guprecords.raku</span>, a handy Raku script that helps me combine uptime statistics from multiple servers into one comprehensive report. In this blog post, I&#39;ll explore what Guprecords is and some examples of its application. I will also add some notes on Raku.</span><br />
-<br />
-<span>Guprecords, or global uptime records, is a Raku script designed to generate a consolidated uptime report from multiple hosts:</span><br />
-<br />
-<a class='textlink' href='https://codeberg.org/snonux/guprecords'>https://codeberg.org/snonux/guprecords</a><br />
-<a class='textlink' href='https://raku.org'>The Raku Programming Language</a><br />
-<br />
-<span>A previous version of Guprecords was actually written in Perl, the older and more established language from which Raku was developed. One of the primary motivations for rewriting Guprecords in Raku was to learn the language and explore its features. Raku is a more modern and powerful language compared to Perl, and working on a real-world project like Guprecords provided a practical and engaging way to learn the language.</span><br />
-<br />
-<span>Over the last years, I have been reading the following books and resources about Raku:</span><br />
-<br />
-<ul>
-<li>Raku Guide (at raku.guide)</li>
-<li>Think Perl 6</li>
-<li>Raku Fundamentals</li>
-<li>Raku Recipes</li>
-</ul><br />
-<span>And I have been following the Raku newsletter, and sometimes I have been lurking around in the IRC channels, too. Watching Raku coding challenges on YouTube was pretty fun, too. However, nothing beats actually using Raku to learn the language. After reading all of these resources, I may have a good idea about the features and paradigms, but I am by far not an expert.</span><br />
-<br />
-<h2 style='display: inline'>How Guprecords works</h2><br />
-<br />
-<span>Guprecords works in three stages:</span><br />
-<br />
-<ul>
-<li>1. Generating uptime statistics using <span class='inlinecode'>uptimed</span>: First, I need to install and run <span class='inlinecode'>uptimed</span> on each host to generate uptime statistics. This tool is available for most common Linux and *BSD distributions and macOS via Homebrew.</li>
-<li>2. Collecting uptime records to a central location: The next step involves collecting the raw uptime statistics files generated by <span class='inlinecode'>uptimed</span> on each host. It&#39;s a good idea to store all record files in a central git repository. The records file contains information about the total uptime since boot, boot time, and the operating system and kernel version. Guprecords itself does not do the collection part, but have a look at the <span class='inlinecode'>README.md</span> in the git repository for some guidance.</li>
-<li>3. Generating global uptime stats: Finally, run the <span class='inlinecode'>guprecords.raku</span> script with the appropriate flags to create a global uptime report. For example, I can use the following command:</li>
-</ul><br />
-<!-- Generator: GNU source-highlight 3.1.9
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre>$ raku guprecords<font color="#990000">.</font>raku --stats<font color="#990000">=</font><font color="#009900">dir</font><font color="#990000">=</font><font color="#009900">$HOME</font>/git/uprecords/stats --all
-</pre>
-<br />
-<span>This command will generate a comprehensive uptime report from the collected statistics, making it easy to review and enjoy the data.</span><br />
-<br />
-<span>Guprecords supports the following features:</span><br />
-<br />
-<ul>
-<li>Supports multiple categories: Host, Kernel, KernelMajor, and KernelName</li>
-<li>Supports multiple metrics: Boots, Uptime, Score, Downtime, and Lifespan</li>
-<li>Output formats available: Plaintext, Markdown, and Gemtext</li>
-<li>Provides top entries based on the specified limit</li>
-</ul><br />
-<h2 style='display: inline'>Example</h2><br />
-<br />
-<span>You have already seen an example at the very top of this post, where the hosts were grouped by their total lifespans (uptime+downtime). Here&#39;s an example of what the global uptime report (grouped by total host uptimes) might look like:</span><br />
-<br />
-<pre>
-Top 20 Uptime&#39;s by Host
-
-+-----+-----------------+-----------------------------+
-| Pos | Host | Uptime |
-+-----+-----------------+-----------------------------+
-| 1. | *vulcan | 4 years, 5 months, 6 days |
-| 2. | uranus | 3 years, 11 months, 21 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. | tauceti-f | 1 years, 9 months, 18 days |
-| 9. | *ultramega15289 | 1 years, 8 months, 17 days |
-| 10. | *earth | 1 years, 5 months, 22 days |
-| 11. | *blowfish | 1 years, 4 months, 20 days |
-| 12. | ultramega8477 | 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, 6 days |
-| 16. | callisto | 0 years, 10 months, 31 days |
-| 17. | alphacentauri | 0 years, 10 months, 28 days |
-| 18. | london | 0 years, 9 months, 16 days |
-| 19. | twofish | 0 years, 8 months, 31 days |
-| 20. | *fishfinger | 0 years, 8 months, 17 days |
-+-----+-----------------+-----------------------------+
-</pre>
-<br />
-<span>This table ranks the top 20 hosts based on their total uptime, with the host having the highest uptime at the top. The hosts marked with <span class='inlinecode'>*</span> are still active, means stats were collected within the last couple of months. </span><br />
-<br />
-<span>My up to date stats can be seen here:</span><br />
-<br />
-<a class='textlink' href='../uptime-stats.html'>My machine uptime stats</a><br />
-<br />
-<span>Just recently, I decommissioned <span class='inlinecode'>vulcan</span> (the number one stop from above), which used to be my CentOS 7 (initially CentOS 6) VM hosting my personal NextCloud and Wallabag (which I modernised just recently with a brand new shiny Rocky Linux 9 VM). This was the last <span class='inlinecode'>uptimed</span> output before shutting it down (it always makes me feel sentimental decommissioning one of my machines <span class='inlinecode'>:&#39;-(</span>):</span><br />
-<br />
-<pre>
- # Uptime | System Boot up
-----------------------------+---------------------------------------------------
- 1 545 days, 17:58:15 | Linux 3.10.0-1160.15.2.e Sun Jul 25 19:32:25 2021
- 2 279 days, 10:12:14 | Linux 3.10.0-957.21.3.el Sun Jun 30 12:43:41 2019
- 3 161 days, 06:08:43 | Linux 3.10.0-1160.15.2.e Sun Feb 14 11:05:38 2021
- 4 107 days, 01:26:35 | Linux 3.10.0-957.1.3.el7 Thu Dec 20 09:29:13 2018
- 5 96 days, 21:13:49 | Linux 3.10.0-1127.13.1.e Sat Jul 25 17:56:22 2020
--&gt; 6 89 days, 23:05:32 | Linux 3.10.0-1160.81.1.e Sun Jan 22 12:39:36 2023
- 7 63 days, 18:30:45 | Linux 3.10.0-957.10.1.el Sat Apr 27 18:12:43 2019
- 8 63 days, 06:53:33 | Linux 3.10.0-1127.8.2.el Sat May 23 10:41:08 2020
- 9 48 days, 11:44:49 | Linux 3.10.0-1062.18.1.e Sat Apr 4 22:56:07 2020
- 10 42 days, 08:00:13 | Linux 3.10.0-1127.19.1.e Sat Nov 7 11:47:33 2020
- 11 36 days, 22:57:19 | Linux 3.10.0-1160.6.1.el Sat Dec 19 19:47:57 2020
- 12 21 days, 06:16:28 | Linux 3.10.0-957.10.1.el Sat Apr 6 11:56:01 2019
- 13 12 days, 20:11:53 | Linux 3.10.0-1160.11.1.e Mon Jan 25 18:45:27 2021
- 14 7 days, 21:29:18 | Linux 3.10.0-1127.13.1.e Fri Oct 30 14:18:04 2020
- 15 6 days, 20:07:18 | Linux 3.10.0-1160.15.2.e Sun Feb 7 14:57:35 2021
- 16 1 day , 21:46:41 | Linux 3.10.0-957.1.3.el7 Tue Dec 18 11:42:19 2018
- 17 0 days, 01:25:57 | Linux 3.10.0-957.1.3.el7 Tue Dec 18 10:16:08 2018
- 18 0 days, 00:42:34 | Linux 3.10.0-1160.15.2.e Sun Jul 25 18:49:38 2021
- 19 0 days, 00:08:32 | Linux 3.10.0-1160.81.1.e Sun Jan 22 12:30:52 2023
-----------------------------+---------------------------------------------------
-1up in 6 days, 22:08:18 | at Sat Apr 29 10:53:25 2023
-no1 in 455 days, 18:52:44 | at Sun Jul 21 07:37:51 2024
- up 1586 days, 00:20:28 | since Tue Dec 18 10:16:08 2018
- down 0 days, 01:08:32 | since Tue Dec 18 10:16:08 2018
- %up 99.997 | since Tue Dec 18 10:16:08 2018
-</pre>
-<br />
-<h2 style='display: inline'>Conclusion</h2><br />
-<br />
-<span>Guprecords is a small, yet powerful tool for analyzing uptime statistics. While developing Guprecords, I have come to truly appreciate and love Raku&#39;s expressiveness. The language is designed to be both powerful and flexible, allowing developers to express their intentions and logic more clearly and concisely.</span><br />
-<br />
-<span>Raku&#39;s expressive syntax, support for multiple programming paradigms, and unique features, such as grammars and lazy evaluation, make it a joy to work with. </span><br />
-<br />
-<span>Working on Guprecords in Raku has been an enjoyable experience, and I&#39;ve found that Raku&#39;s expressiveness has significantly contributed to the overall quality and effectiveness of the script. The language&#39;s ability to elegantly express complex logic and data manipulation tasks makes it an excellent choice for developing tools like these, where expressiveness and productiveness are of the utmost importance.</span><br />
-<br />
-<span>So far, I have only scratched the surface of what Raku can do. I hope to find more time to become a regular Rakoon (a Raku Programmer). I have many Ideas for other small tools like Guprecords, but the challenge is finding the time. I&#39;d love to explore Raku Grammars and also I would love to explore writing concurrent code in Raku (I also love Go (Golang), btw!). Ideas for future Raku personal projects include:</span><br />
-<br />
-<ul>
-<li>A log file analyzer, for generating anonymized <span class='inlinecode'>foo.zone</span> visitor stats for both, the Web and Gemini.</li>
-<li>A social media sharing scheduler a la <span class='inlinecode'>buffer.com</span>. I am using Buffer at the moment to share posts on Mastadon, Twitter, Telegram and LinkedIn, but it is proprietary and also it&#39;s not really reliable.</li>
-<li>Rewrite the static photo album generator of <span class='inlinecode'>irregular.ninja</span> in Raku (from Bash).</li>
-</ul><br />
-<span>Other related posts are:</span><br />
-<br />
-<a class='textlink' href='./2008-06-26-perl-poetry.html'>2008-06-26 Perl Poetry</a><br />
-<a class='textlink' href='./2011-05-07-perl-daemon-service-framework.html'>2011-05-07 Perl Daemon (Service Framework)</a><br />
-<a class='textlink' href='./2022-05-27-perl-is-still-a-great-choice.html'>2022-05-27 Perl is still a great choice</a><br />
-<a class='textlink' href='./2022-06-15-sweating-the-small-stuff.html'>2022-06-15 Sweating the small stuff - Tiny projects of mine</a><br />
-<a class='textlink' href='./2023-05-01-unveiling-guprecords:-uptime-records-with-raku.html'>2023-05-01 Unveiling <span class='inlinecode'>guprecords.raku</span>: Global Uptime Records with Raku (You are currently reading this)</a><br />
-<br />
-<span>E-Mail your comments to hi@foo.zone :-)</span><br />
-<br />
-<a class='textlink' href='../'>Back to the main site</a><br />
- </div>
- </content>
- </entry>
- <entry>
- <title>Algorithms and Data Structures in Go - Part 1</title>
- <link href="gemini://foo.zone/gemfeed/2023-04-09-algorithms-and-data-structures-in-golang-part-1.gmi" />
- <id>gemini://foo.zone/gemfeed/2023-04-09-algorithms-and-data-structures-in-golang-part-1.gmi</id>
- <updated>2023-04-09T22:31:42+03:00</updated>
- <author>
- <name>Paul Buetow aka snonux</name>
- <email>paul@dev.buetow.org</email>
- </author>
- <summary>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.</summary>
- <content type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <h1 style='display: inline'>Algorithms and Data Structures in Go - Part 1</h1><br />
-<br />
-<span class='quote'>Published at 2023-04-09T22:31:42+03:00</span><br />
-<br />
-<pre>
- ,_---~~~~~----._
- _,,_,*^____ _____``*g*\"*,
- / __/ /&#39; ^. / \ ^@q f
-[ @f | @)) | | @)) l 0 _/
- \`/ \~____ / __ \_____/ \
- | _l__l_ I
- } [______] I
- ] | | | |
- ] ~ ~ |
- | |
- | |
-</pre>
-<br />
-<span>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.</span><br />
-<br />
-<a class='textlink' href='./2023-04-09-algorithms-and-data-structures-in-golang-part-1.html'>2023-04-09 Algorithms and Data Structures in Go - Part 1 (You are currently reading this)</a><br />
-<br />
-<span>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.</span><br />
-<br />
-<h2 style='display: inline'>Type constraints</h2><br />
-<br />
-<span>First, the package <span class='inlinecode'>ds</span> (data structures) defines the <span class='inlinecode'>types.go</span>. All examples will either operate on the <span class='inlinecode'>Integer</span> or <span class='inlinecode'>Number</span> type:</span><br />
-<br />
-<!-- Generator: GNU source-highlight 3.1.9
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><b><font color="#0000FF">package</font></b> ds
-
-<b><font color="#0000FF">import</font></b> <font color="#990000">(</font>
- <font color="#FF0000">"golang.org/x/exp/constraints"</font>
-<font color="#990000">)</font>
-
-<b><font color="#0000FF">type</font></b> Integer <b><font color="#0000FF">interface</font></b> <font color="#FF0000">{</font>
- constraints<font color="#990000">.</font>Integer
-<font color="#FF0000">}</font>
-
-<b><font color="#0000FF">type</font></b> Number <b><font color="#0000FF">interface</font></b> <font color="#FF0000">{</font>
- constraints<font color="#990000">.</font>Integer <font color="#990000">|</font> constraints<font color="#990000">.</font>Float
-<font color="#FF0000">}</font>
-
-</pre>
-<br />
-<h2 style='display: inline'>ArrayList</h2><br />
-<br />
-<span>Next comes the <span class='inlinecode'>arraylist.go</span>, which defines the underlying data structure all the algorithms of this series will use. <span class='inlinecode'>ArrayList</span> is just a type alias of a Go array (or slice) with custom methods on it:</span><br />
-<br />
-<!-- Generator: GNU source-highlight 3.1.9
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><b><font color="#0000FF">package</font></b> ds
-
-<b><font color="#0000FF">import</font></b> <font color="#990000">(</font>
- <font color="#FF0000">"fmt"</font>
- <font color="#FF0000">"math/rand"</font>
- <font color="#FF0000">"strings"</font>
-<font color="#990000">)</font>
-
-<b><font color="#0000FF">type</font></b> ArrayList<font color="#990000">[</font>V Number<font color="#990000">]</font> <font color="#990000">[]</font>V
-
-<b><font color="#0000FF">func</font></b> NewArrayList<font color="#990000">[</font>V Number<font color="#990000">](</font>l int<font color="#990000">)</font> ArrayList<font color="#990000">[</font>V<font color="#990000">]</font> <font color="#FF0000">{</font>
- <b><font color="#0000FF">return</font></b> <b><font color="#000000">make</font></b><font color="#990000">(</font>ArrayList<font color="#990000">[</font>V<font color="#990000">],</font> l<font color="#990000">)</font>
-<font color="#FF0000">}</font>
-</pre>
-<br />
-<span>As you can see, the code uses Go generics, which I refactored recently. Besides the default constructor (which only returns an empty <span class='inlinecode'>ArrayList</span> with a given capacity), there are also a bunch of special constructors. <span class='inlinecode'>NewRandomArrayList</span> is returning an <span class='inlinecode'>ArrayList</span> with random numbers, <span class='inlinecode'>NewAscendingArrayList</span> and <span class='inlinecode'>NewDescendingArrayList</span> are returning <span class='inlinecode'>ArrayList</span>s in either ascending or descending order. They all will be used later on for testing and benchmarking the algorithms.</span><br />
-<br />
-<!-- Generator: GNU source-highlight 3.1.9
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><b><font color="#0000FF">func</font></b> NewRandomArrayList<font color="#990000">[</font>V Number<font color="#990000">](</font>l<font color="#990000">,</font> max int<font color="#990000">)</font> ArrayList<font color="#990000">[</font>V<font color="#990000">]</font> <font color="#FF0000">{</font>
- a <font color="#990000">:=</font> <b><font color="#000000">make</font></b><font color="#990000">(</font>ArrayList<font color="#990000">[</font>V<font color="#990000">],</font> l<font color="#990000">)</font>
- <b><font color="#0000FF">for</font></b> i <font color="#990000">:=</font> <font color="#993399">0</font><font color="#990000">;</font> i <font color="#990000">&lt;</font> l<font color="#990000">;</font> i<font color="#990000">++</font> <font color="#FF0000">{</font>
- <b><font color="#0000FF">if</font></b> max <font color="#990000">&gt;</font> <font color="#993399">0</font> <font color="#FF0000">{</font>
- a<font color="#990000">[</font>i<font color="#990000">]</font> <font color="#990000">=</font> <b><font color="#000000">V</font></b><font color="#990000">(</font>rand<font color="#990000">.</font><b><font color="#000000">Intn</font></b><font color="#990000">(</font>max<font color="#990000">))</font>
- <b><font color="#0000FF">continue</font></b>
- <font color="#FF0000">}</font>
- a<font color="#990000">[</font>i<font color="#990000">]</font> <font color="#990000">=</font> <b><font color="#000000">V</font></b><font color="#990000">(</font>rand<font color="#990000">.</font><b><font color="#000000">Int</font></b><font color="#990000">())</font>
- <font color="#FF0000">}</font>
- <b><font color="#0000FF">return</font></b> a
-<font color="#FF0000">}</font>
-
-<b><font color="#0000FF">func</font></b> NewAscendingArrayList<font color="#990000">[</font>V Number<font color="#990000">](</font>l int<font color="#990000">)</font> ArrayList<font color="#990000">[</font>V<font color="#990000">]</font> <font color="#FF0000">{</font>
- a <font color="#990000">:=</font> <b><font color="#000000">make</font></b><font color="#990000">(</font>ArrayList<font color="#990000">[</font>V<font color="#990000">],</font> l<font color="#990000">)</font>
- <b><font color="#0000FF">for</font></b> i <font color="#990000">:=</font> <font color="#993399">0</font><font color="#990000">;</font> i <font color="#990000">&lt;</font> l<font color="#990000">;</font> i<font color="#990000">++</font> <font color="#FF0000">{</font>
- a<font color="#990000">[</font>i<font color="#990000">]</font> <font color="#990000">=</font> <b><font color="#000000">V</font></b><font color="#990000">(</font>i<font color="#990000">)</font>
- <font color="#FF0000">}</font>
- <b><font color="#0000FF">return</font></b> a
-<font color="#FF0000">}</font>
-
-<b><font color="#0000FF">func</font></b> NewDescendingArrayList<font color="#990000">[</font>V Number<font color="#990000">](</font>l int<font color="#990000">)</font> ArrayList<font color="#990000">[</font>V<font color="#990000">]</font> <font color="#FF0000">{</font>
- a <font color="#990000">:=</font> <b><font color="#000000">make</font></b><font color="#990000">(</font>ArrayList<font color="#990000">[</font>V<font color="#990000">],</font> l<font color="#990000">)</font>
- j <font color="#990000">:=</font> l <font color="#990000">-</font> <font color="#993399">1</font>
- <b><font color="#0000FF">for</font></b> i <font color="#990000">:=</font> <font color="#993399">0</font><font color="#990000">;</font> i <font color="#990000">&lt;</font> l<font color="#990000">;</font> i<font color="#990000">++</font> <font color="#FF0000">{</font>
- a<font color="#990000">[</font>i<font color="#990000">]</font> <font color="#990000">=</font> <b><font color="#000000">V</font></b><font color="#990000">(</font>j<font color="#990000">)</font>
- j<font color="#990000">--</font>
- <font color="#FF0000">}</font>
- <b><font color="#0000FF">return</font></b> a
-<font color="#FF0000">}</font>
-</pre>
-<br />
-<h2 style='display: inline'>Helper methods</h2><br />
-<br />
-<span>The <span class='inlinecode'>FirstN</span> method only returns the first N elements of the <span class='inlinecode'>ArrayList</span>. This is useful for printing out only parts of the data structure:</span><br />
-<br />
-<!-- Generator: GNU source-highlight 3.1.9
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><b><font color="#0000FF">func</font></b> <font color="#990000">(</font>a ArrayList<font color="#990000">[</font>V<font color="#990000">])</font> <b><font color="#000000">FirstN</font></b><font color="#990000">(</font>n int<font color="#990000">)</font> <font color="#009900">string</font> <font color="#FF0000">{</font>
- <b><font color="#0000FF">var</font></b> sb strings<font color="#990000">.</font>Builder
- j <font color="#990000">:=</font> n
-
- l <font color="#990000">:=</font> <b><font color="#000000">len</font></b><font color="#990000">(</font>a<font color="#990000">)</font>
- <b><font color="#0000FF">if</font></b> j <font color="#990000">&gt;</font> l <font color="#FF0000">{</font>
- j <font color="#990000">=</font> l
- <font color="#FF0000">}</font>
-
- <b><font color="#0000FF">for</font></b> i <font color="#990000">:=</font> <font color="#993399">0</font><font color="#990000">;</font> i <font color="#990000">&lt;</font> j<font color="#990000">;</font> i<font color="#990000">++</font> <font color="#FF0000">{</font>
- fmt<font color="#990000">.</font><b><font color="#000000">Fprintf</font></b><font color="#990000">(&amp;</font>sb<font color="#990000">,</font> <font color="#FF0000">"%v "</font><font color="#990000">,</font> a<font color="#990000">[</font>i<font color="#990000">])</font>
- <font color="#FF0000">}</font>
-
- <b><font color="#0000FF">if</font></b> j <font color="#990000">&lt;</font> l <font color="#FF0000">{</font>
- fmt<font color="#990000">.</font><b><font color="#000000">Fprintf</font></b><font color="#990000">(&amp;</font>sb<font color="#990000">,</font> <font color="#FF0000">"... "</font><font color="#990000">)</font>
- <font color="#FF0000">}</font>
-
- <b><font color="#0000FF">return</font></b> sb<font color="#990000">.</font><b><font color="#000000">String</font></b><font color="#990000">()</font>
-<font color="#FF0000">}</font>
-</pre>
-<br />
-<span>The <span class='inlinecode'>Sorted</span> method checks whether the <span class='inlinecode'>ArrayList</span> is sorted. This will be used by the unit tests later on:</span><br />
-<br />
-<!-- Generator: GNU source-highlight 3.1.9
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><b><font color="#0000FF">func</font></b> <font color="#990000">(</font>a ArrayList<font color="#990000">[</font>V<font color="#990000">])</font> <b><font color="#000000">Sorted</font></b><font color="#990000">()</font> <font color="#009900">bool</font> <font color="#FF0000">{</font>
- <b><font color="#0000FF">for</font></b> i <font color="#990000">:=</font> <b><font color="#000000">len</font></b><font color="#990000">(</font>a<font color="#990000">)</font> <font color="#990000">-</font> <font color="#993399">1</font><font color="#990000">;</font> i <font color="#990000">&gt;</font> <font color="#993399">0</font><font color="#990000">;</font> i<font color="#990000">--</font> <font color="#FF0000">{</font>
- <b><font color="#0000FF">if</font></b> a<font color="#990000">[</font>i<font color="#990000">]</font> <font color="#990000">&lt;</font> a<font color="#990000">[</font>i<font color="#990000">-</font><font color="#993399">1</font><font color="#990000">]</font> <font color="#FF0000">{</font>
- <b><font color="#0000FF">return</font></b> false
- <font color="#FF0000">}</font>
- <font color="#FF0000">}</font>
- <b><font color="#0000FF">return</font></b> true
-<font color="#FF0000">}</font>
-</pre>
-<br />
-<span>And the last utility method used is <span class='inlinecode'>Swap</span>, which allows swapping the values of two indices in the <span class='inlinecode'>ArrayList</span>:</span><br />
-<br />
-<!-- Generator: GNU source-highlight 3.1.9
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><b><font color="#0000FF">func</font></b> <font color="#990000">(</font>a ArrayList<font color="#990000">[</font>V<font color="#990000">])</font> <b><font color="#000000">Swap</font></b><font color="#990000">(</font>i<font color="#990000">,</font> j int<font color="#990000">)</font> <font color="#FF0000">{</font>
- aux <font color="#990000">:=</font> a<font color="#990000">[</font>i<font color="#990000">]</font>
- a<font color="#990000">[</font>i<font color="#990000">]</font> <font color="#990000">=</font> a<font color="#990000">[</font>j<font color="#990000">]</font>
- a<font color="#990000">[</font>j<font color="#990000">]</font> <font color="#990000">=</font> aux
-<font color="#FF0000">}</font>
-
-</pre>
-<br />
-<h2 style='display: inline'>Sleep sort</h2><br />
-<br />
-<span>Let&#39;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 <span class='inlinecode'>ArrayList</span>. It&#39;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&#39;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. </span><br />
-<br />
-<br />
-<!-- Generator: GNU source-highlight 3.1.9
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><b><font color="#0000FF">package</font></b> sort
-
-<b><font color="#0000FF">import</font></b> <font color="#990000">(</font>
- <font color="#FF0000">"codeberg.org/snonux/algorithms/ds"</font>
- <font color="#FF0000">"sync"</font>
- <font color="#FF0000">"time"</font>
-<font color="#990000">)</font>
-
-<b><font color="#0000FF">func</font></b> Sleep<font color="#990000">[</font>V ds<font color="#990000">.</font>Integer<font color="#990000">](</font>a ds<font color="#990000">.</font>ArrayList<font color="#990000">[</font>V<font color="#990000">])</font> ds<font color="#990000">.</font>ArrayList<font color="#990000">[</font>V<font color="#990000">]</font> <font color="#FF0000">{</font>
- sorted <font color="#990000">:=</font> ds<font color="#990000">.</font>NewArrayList<font color="#990000">[</font>V<font color="#990000">](</font><b><font color="#000000">len</font></b><font color="#990000">(</font>a<font color="#990000">))</font>
-
- numCh <font color="#990000">:=</font> <b><font color="#000000">make</font></b><font color="#990000">(</font><b><font color="#0000FF">chan</font></b> V<font color="#990000">)</font>
- <b><font color="#0000FF">var</font></b> wg sync<font color="#990000">.</font>WaitGroup
- wg<font color="#990000">.</font><b><font color="#000000">Add</font></b><font color="#990000">(</font><b><font color="#000000">len</font></b><font color="#990000">(</font>a<font color="#990000">))</font>
-
- <b><font color="#0000FF">go</font></b> <b><font color="#0000FF">func</font></b><font color="#990000">()</font> <font color="#FF0000">{</font>
- wg<font color="#990000">.</font><b><font color="#000000">Wait</font></b><font color="#990000">()</font>
- <b><font color="#000000">close</font></b><font color="#990000">(</font>numCh<font color="#990000">)</font>
- <font color="#FF0000">}</font><font color="#990000">()</font>
-
- <b><font color="#0000FF">for</font></b> _<font color="#990000">,</font> num <font color="#990000">:=</font> <b><font color="#0000FF">range</font></b> a <font color="#FF0000">{</font>
- <b><font color="#0000FF">go</font></b> <b><font color="#0000FF">func</font></b><font color="#990000">(</font>num V<font color="#990000">)</font> <font color="#FF0000">{</font>
- <b><font color="#0000FF">defer</font></b> wg<font color="#990000">.</font><b><font color="#000000">Done</font></b><font color="#990000">()</font>
- time<font color="#990000">.</font><b><font color="#000000">Sleep</font></b><font color="#990000">(</font>time<font color="#990000">.</font><b><font color="#000000">Duration</font></b><font color="#990000">(</font>num<font color="#990000">)</font> <font color="#990000">*</font> time<font color="#990000">.</font>Second<font color="#990000">)</font>
- numCh <font color="#990000">&lt;-</font> num
- <font color="#FF0000">}</font><font color="#990000">(</font>num<font color="#990000">)</font>
- <font color="#FF0000">}</font>
-
- <b><font color="#0000FF">for</font></b> num <font color="#990000">:=</font> <b><font color="#0000FF">range</font></b> numCh <font color="#FF0000">{</font>
- sorted <font color="#990000">=</font> <b><font color="#000000">append</font></b><font color="#990000">(</font>sorted<font color="#990000">,</font> num<font color="#990000">)</font>
- <font color="#FF0000">}</font>
-
- <b><font color="#0000FF">return</font></b> sorted
-<font color="#FF0000">}</font>
-</pre>
-<br />
-<span>This Go code implements the sleep sort algorithm using generics and goroutines. The main function <span class='inlinecode'>Sleep[V ds.Integer](a ds.ArrayList[V]) ds.ArrayList[V]</span> takes a generic <span class='inlinecode'>ArrayList</span> as input and returns a sorted <span class='inlinecode'>ArrayList</span>. The code creates a separate goroutine for each element in the input array, sleeps for a duration proportional to the element&#39;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 <span class='inlinecode'>ArrayList</span> is constructed by appending the elements received from the channel in the order they arrive. The <span class='inlinecode'>sync.WaitGroup</span> is used to synchronize goroutines and ensure that all of them have completed before closing the channel.</span><br />
-<br />
-<h3 style='display: inline'>Testing</h3><br />
-<br />
-<span>For testing, we only allow values up to 10, as otherwise, it would take too long to finish:</span><br />
-<br />
-<!-- Generator: GNU source-highlight 3.1.9
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><b><font color="#0000FF">package</font></b> sort
-
-<b><font color="#0000FF">import</font></b> <font color="#990000">(</font>
- <font color="#FF0000">"fmt"</font>
- <font color="#FF0000">"testing"</font>
-
- <font color="#FF0000">"codeberg.org/snonux/algorithms/ds"</font>
-<font color="#990000">)</font>
-
-<b><font color="#0000FF">func</font></b> <b><font color="#000000">TestSleepSort</font></b><font color="#990000">(</font>t <font color="#990000">*</font>testing<font color="#990000">.</font>T<font color="#990000">)</font> <font color="#FF0000">{</font>
- a <font color="#990000">:=</font> ds<font color="#990000">.</font>NewRandomArrayList<font color="#990000">[</font>int<font color="#990000">](</font><font color="#993399">10</font><font color="#990000">,</font> <font color="#993399">10</font><font color="#990000">)</font>
- a <font color="#990000">=</font> <b><font color="#000000">Sleep</font></b><font color="#990000">(</font>a<font color="#990000">)</font>
- <b><font color="#0000FF">if</font></b> <font color="#990000">!</font>a<font color="#990000">.</font><b><font color="#000000">Sorted</font></b><font color="#990000">()</font> <font color="#FF0000">{</font>
- t<font color="#990000">.</font><b><font color="#000000">Errorf</font></b><font color="#990000">(</font><font color="#FF0000">"Array not sorted: %v"</font><font color="#990000">,</font> a<font color="#990000">)</font>
- <font color="#FF0000">}</font>
-<font color="#FF0000">}</font>
-</pre>
-<br />
-<span>As you can see, it takes <span class='inlinecode'>9s</span> here for the algorithm to finish (which is the highest value in the <span class='inlinecode'>ArrayList</span>):</span><br />
-<br />
-<!-- Generator: GNU source-highlight 3.1.9
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre>❯ go <b><font color="#0000FF">test</font></b> <font color="#990000">.</font>/sort -v -run SleepSort
-<font color="#990000">===</font> RUN TestSleepSort
---- PASS<font color="#990000">:</font> TestSleepSort <font color="#990000">(</font><font color="#993399">9</font><font color="#990000">.</font>00s<font color="#990000">)</font>
-PASS
-ok codeberg<font color="#990000">.</font>org/snonux/algorithms/sort <font color="#993399">9</font><font color="#990000">.</font>002s
-</pre>
-<br />
-<span>I won&#39;t write any benchmark for sleep sort; that will be done for the algorithms to come in this series :-).</span><br />
-<br />
-<span>E-Mail your comments to paul at buetow.org :-)</span><br />
-<br />
-<a class='textlink' href='../'>Back to the main site</a><br />
- </div>
- </content>
- </entry>
- <entry>
- <title>'Never split the difference' book notes</title>
- <link href="gemini://foo.zone/gemfeed/2023-04-01-never-split-the-difference-book-notes.gmi" />
- <id>gemini://foo.zone/gemfeed/2023-04-01-never-split-the-difference-book-notes.gmi</id>
- <updated>2023-04-01T20:00:17+03:00</updated>
- <author>
- <name>Paul Buetow aka snonux</name>
- <email>paul@dev.buetow.org</email>
- </author>
- <summary>These are my personal takeaways after reading 'Never split the difference' by Chris Voss. 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.</summary>
- <content type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <h1 style='display: inline'>"Never split the difference" book notes</h1><br />
-<br />
-<span class='quote'>Published at 2023-04-01T20:00:17+03:00</span><br />
-<br />
-<span>These are my personal takeaways after reading "Never split the difference" by Chris Voss. 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.</span><br />
-<br />
-<pre>
- ,.......... ..........,
- ,..,&#39; &#39;.&#39; &#39;,..,
- ,&#39; ,&#39; : &#39;, &#39;,
- ,&#39; ,&#39; : &#39;, &#39;,
- ,&#39; ,&#39; : &#39;, &#39;,
- ,&#39; ,&#39;............., : ,.............&#39;, &#39;,
-,&#39; &#39;............ &#39;.&#39; ............&#39; &#39;,
- &#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;;&#39;&#39;&#39;;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;
- &#39;&#39;&#39;
-</pre>
-<br />
-<h2 style='display: inline'>Tactical listening, spreading empathy</h2><br />
-<br />
-<span>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.</span><br />
-<br />
-<ul>
-<li>A mirror needs space and silence between the words. At least 4 seconds.</li>
-<li>A mirror might be awkward to be used at first, especially with a question coupled to it.</li>
-<li>We fear what&#39;s different and are drawn to what is similar.</li>
-</ul><br />
-<span>Mirror training is like Jedi training. Simple but effective. A mirror needs space. Be silent after "you want this?" </span><br />
-<br />
-<h2 style='display: inline'>Mindset of discovery</h2><br />
-<br />
-<span>Try to have multiple realities in your mind and use facts to distinguish between real and false.</span><br />
-<br />
-<ul>
-<li>Focus on what the counterpart has to say and what he needs and wants. Understanding him makes him vulnerable.</li>
-<li>Empathy understanding the other person from his perspective, but it does not mean agreeing with him.</li>
-<li>Detect and label the emotions of others for your powers. </li>
-<li>To be understood seems to solve all problems magically.</li>
-</ul><br />
-<span>Try: to put a label on someone&#39;s emotion and then be silent. Wait for the other to reveal himself. "You seem unhappy about this?"</span><br />
-<br />
-<h3 style='display: inline'>More tips </h3><br />
-<br />
-<ul>
-<li>Put on a poker face and don&#39;t show emotions.</li>
-<li>Slow things down. Don&#39;t be a problem solver.</li>
-<li>Smile while you are talking, even on the phone. Be easy and encouraging.</li>
-<li>Being right is not the key to successful negotiation; being mindful is.</li>
-<li>Be in the safe zone of empathy and acknowledge bad news.</li>
-</ul><br />
-<h2 style='display: inline'>"No" starts the conversation</h2><br />
-<br />
-<span>When the opponent starts with a "no", he feels in control and comfortable. That&#39;s why he has to start with "no".</span><br />
-<br />
-<ul>
-<li>"Yes" and "maybe" might be worthless, but "no" starts the conversation.</li>
-<li>If someone is saying "no" to you, he will be open to what you have to say next.</li>
-<li>"No" is not stopping the negotiation but will open up opportunities you were not thinking about before.</li>
-<li>Start with "no". Great negotiators seek "no" because that&#39;s when the great discussions begin.</li>
-<li>A "no" can be scary if you are not used to it. If your biggest fear is "no", then you can&#39;t negotiate.</li>
-</ul><br />
-<span>Get a "That&#39;s right" when negotiating. Don&#39;t get a "you&#39;re right". You can summarise the opponent to get a "that&#39;s right".</span><br />
-<br />
-<h2 style='display: inline'>Win-win</h2><br />
-<br />
-<span>Win-win is a naive approach when encountering the win-lose counterpart, but always cooperate. Don&#39;t compromise, and don&#39;t split the difference. We don&#39;t compromise because it&#39;s right; we do it because it is easy. You must embrace the hard stuff; that&#39;s where the great deals are.</span><br />
-<br />
-<h2 style='display: inline'>On Deadlines</h2><br />
-<br />
-<ul>
-<li>All deadlines are imaginary.</li>
-<li>Most of the time, deadlines unsettle us without a good reason.</li>
-<li>They push a deal to a conclusion.</li>
-<li>They rush the counterpart to cause pressure and anxiety.</li>
-</ul><br />
-<h2 style='display: inline'>Analyse the opponent</h2><br />
-<br />
-<ul>
-<li>Understand the motivation of people behind the table as well.</li>
-<li>Ask how affected they will be.</li>
-<li>Determine your and the opposite negotiation style. Accommodation, analyst, assertive.</li>
-<li>Treat them how they need to be treated.</li>
-</ul><br />
-<span>The person on the other side is never the issue; the problem is the issue. Keep this in mind to avoid emotional issues with the person and focus on the problem, not the person. The bond is essential; never create an enemy.</span><br />
-<br />
-<h2 style='display: inline'>Use different ways of saying "no."</h2><br />
-<br />
-<span class='quote'>I had paid my rent always in time. I had positive experiences with the building and would be sad for the landlord to lose a good tenant. I am looking for a win-win agreement between us. Pulling out the research, other neighbours offer much lower prices even if your building is a better location and services. How can I effort 200 more.... </span><br />
-<br />
-<span>...then put an extreme anker.</span><br />
-<br />
-<span>You always have to embrace thoughtful confrontation for good negotiation and life. Don&#39;t avoid honest, clear conflict. It will give you the best deals. Compromises are mostly bad deals for both sides. Most people don&#39;t negotiate a win-win but a win-lose. Know the best and worst outcomes and what is acceptable for you.</span><br />
-<br />
-<h2 style='display: inline'>Calibrated question</h2><br />
-<br />
-<span>Calibrated questions. Give the opponent a sense of power. Ask open-how questions to get the opponent to solve your problem and move him in your direction. Calibrated questions are the best tools. Summarise everything, and then ask, "how I am supposed to do that?". Asking for help this way with a calibrated question is a powerful tool for joint problem solving</span><br />
-<br />
-<span>Being calm and respectful is essential. Without control of your emotions, it won&#39;t work. The counterpart will have no idea how constrained they are with your question. Avoid questions which get a yes or short answers. Use "why?".</span><br />
-<br />
-<span>Counterparts are more involved if these are their solutions. The counterpart must answer with "that&#39;s right", not "you are right". He has to own the problem. If not, then add more why questions.</span><br />
-<br />
-<ul>
-<li>Tone and body language need to align with what people are saying.</li>
-<li>Deal with it via a labelled question. </li>
-<li>Liers tend to talk with "them" and "their" and not with "I".</li>
-<li>Also, liars tend to talk in complex sentences.</li>
-</ul><br />
-<span>Prepare 3 to 5 calibrated questions for your counterpart. Be curious what is really motivating the other side. You can get out the "Black Swan".</span><br />
-<br />
-<h2 style='display: inline'>The black swan </h2><br />
-<br />
-<span>What we don&#39;t know can break our deal. Uncovering it can bring us unexpected success. You get what you ask for in this world, but you must learn to ask correctly. Reveal the black swan by asking questions.</span><br />
-<br />
-<h2 style='display: inline'>More</h2><br />
-<br />
-<span>Establish a range at top places like corp. I get... (e.g. remote London on a project basis). Set a high salary range and not a number. Also, check on LinkedIn premium for the salaries.</span><br />
-<br />
-<ul>
-<li>Give an unexpected gift, e.g. show them my pet project and publicity for engineering.</li>
-<li>Use an odd number, which makes you seem to have thought a lot about the sum and calculated it.</li>
-<li>Define success and metrics for your next raise.</li>
-<li>What does it take to be successful here? Ask the question, and they will tell you and guide you.</li>
-<li>Set an extreme anker. Make the counterpart the illusion of losing something.</li>
-<li>Hope-based deals. Hope is not a strategy.</li>
-<li>Tactical empathy, listening as a martial art. It is emotional intelligence on steroids.</li>
-<li>Being right isn&#39;t the key to a successful negotiation, but having the correct mindset is.</li>
-<li>Don&#39;t shop the groceries when you are hungry.</li>
-</ul><br />
-<span>Slow.... it.... down....</span><br />
-<br />
-<span>Other book notes of mine are:</span><br />
-<br />
-<a class='textlink' href='./2023-03-16-the-pragmatic-programmer-book-notes.html'>2023-03-16 "The Pragmatic Programmer" book notes</a><br />
-<a class='textlink' href='./2023-04-01-never-split-the-difference-book-notes.html'>2023-04-01 "Never split the difference" book notes (You are currently reading this)</a><br />
-<a class='textlink' href='./2023-05-06-the-obstacle-is-the-way-book-notes.html'>2023-05-06 "The Obstacle is the Way" book notes</a><br />
-<a class='textlink' href='./2023-07-17-career-guide-and-soft-skills-book-notes.html'>2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes</a><br />
-<br />
-<span>E-Mail your comments to paul at buetow.org :-)</span><br />
-<br />
-<a class='textlink' href='../'>Back to the main site</a><br />
- </div>
- </content>
- </entry>
- <entry>
- <title>Gemtexter 2.0.0 - Let's Gemtext again²</title>
- <link href="gemini://foo.zone/gemfeed/2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.gmi" />
- <id>gemini://foo.zone/gemfeed/2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.gmi</id>
- <updated>2023-03-25T17:50:32+02:00</updated>
- <author>
- <name>Paul Buetow aka snonux</name>
- <email>paul@dev.buetow.org</email>
- </author>
- <summary>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.</summary>
- <content type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <h1 style='display: inline'>Gemtexter 2.0.0 - Let&#39;s Gemtext again²</h1><br />
-<br />
-<span class='quote'>Published at 2023-03-25T17:50:32+02:00</span><br />
-<br />
-<pre>
--=[ typewriters ]=- 1/98
-
- .-------.
- _|~~ ~~ |_ .-------.
- =(_|_______|_)= _|~~ ~~ |_
- |:::::::::| =(_|_______|_)
- |:::::::[]| |:::::::::|
- |o=======.| |:::::::[]|
- jgs `"""""""""` |o=======.|
- mod. by Paul Buetow `"""""""""`
-</pre>
-<br />
-<span>I proudly announce that I&#39;ve released Gemtexter version <span class='inlinecode'>2.0.0</span>. What is Gemtexter? It&#39;s my minimalist static site generator for Gemini Gemtext, HTML and Markdown written in GNU Bash.</span><br />
-<br />
-<a class='textlink' href='https://codeberg.org/snonux/gemtexter'>https://codeberg.org/snonux/gemtexter</a><br />
-<br />
-<span>This is a new major release, so it contains a breaking change (see "Meta cache made obsolete").</span><br />
-<br />
-<span>Let&#39;s list what&#39;s new!</span><br />
-<br />
-<h2 style='display: inline'>Minimal template engine</h2><br />
-<br />
-<span>Gemtexter now supports templating, enabling dynamically generated content to <span class='inlinecode'>.gmi</span> files before converting anything to any output format like HTML and Markdown.</span><br />
-<br />
-<span>A template file name must have the suffix <span class='inlinecode'>gmi.tpl</span>. A template must be put into the same directory as the Gemtext <span class='inlinecode'>.gmi</span> file to be generated. Gemtexter will generate a Gemtext file <span class='inlinecode'>index.gmi</span> from a given template <span class='inlinecode'>index.gmi.tpl</span>. A <span class='inlinecode'>&lt;&lt;&lt;</span> and <span class='inlinecode'>&gt;&gt;&gt;</span> encloses a multiline template. All lines starting with <span class='inlinecode'>&lt;&lt; </span> will be evaluated as a single line of Bash code and the output will be written into the resulting Gemtext file.</span><br />
-<br />
-<span>For example, the template <span class='inlinecode'>index.gmi.tpl</span>:</span><br />
-<br />
-<pre>
-# Hello world
-
-&lt;&lt; echo "&gt; This site was generated at $(date --iso-8601=seconds) by \`Gemtexter\`"
-
-Welcome to this capsule!
-
-&lt;&lt;&lt;
- for i in {1..10}; do
- echo Multiline template line $i
- done
-&gt;&gt;&gt;
-</pre>
-<br />
-<span>... results into the following <span class='inlinecode'>index.gmi</span> after running <span class='inlinecode'>./gemtexter --generate</span> (or <span class='inlinecode'>./gemtexter --template</span>, which instructs to do only template processing and nothing else):</span><br />
-<br />
-<pre>
-# Hello world
-
-&gt; This site was generated at 2023-03-15T19:07:59+02:00 by `Gemtexter`
-
-Welcome to this capsule!
-
-Multiline template line 1
-Multiline template line 2
-Multiline template line 3
-Multiline template line 4
-Multiline template line 5
-Multiline template line 6
-Multiline template line 7
-Multiline template line 8
-Multiline template line 9
-Multiline template line 10
-</pre>
-<br />
-<span>Another thing you can do is insert an index with links to similar blog posts. E.g.:</span><br />
-<br />
-<pre>
-See more entries about DTail and Golang:
-
-&lt;&lt; template::inline::index dtail golang
-
-Blablabla...
-</pre>
-<br />
-<span>... scans all other post entries with <span class='inlinecode'>dtail</span> and <span class='inlinecode'>golang</span> in the file name and generates a link list like this:</span><br />
-<br />
-<pre>
-See more entries about DTail and Golang:
-
-=&gt; ./2022-10-30-installing-dtail-on-openbsd.gmi 2022-10-30 Installing DTail on OpenBSD
-=&gt; ./2022-04-22-programming-golang.gmi 2022-04-22 The Golang Programming language
-=&gt; ./2022-03-06-the-release-of-dtail-4.0.0.gmi 2022-03-06 The release of DTail 4.0.0
-=&gt; ./2021-04-22-dtail-the-distributed-log-tail-program.gmi 2021-04-22 DTail - The distributed log tail program (You are currently reading this)
-
-Blablabla...
-</pre>
-<br />
-<h2 style='display: inline'>Added hooks</h2><br />
-<br />
-<span>You can configure <span class='inlinecode'>PRE_GENERATE_HOOK</span> and <span class='inlinecode'>POST_PUBLISH_HOOK</span> to point to scripts to be executed before running <span class='inlinecode'>--generate</span>, or after running <span class='inlinecode'>--publish</span>. E.g. you could populate some of the content by an external script before letting Gemtexter do its thing or you could automatically deploy the site after running <span class='inlinecode'>--publish</span>.</span><br />
-<br />
-<span>The sample config file <span class='inlinecode'>gemtexter.conf</span> includes this as an example now; these scripts will only be executed when they actually exist:</span><br />
-<br />
-<!-- Generator: GNU source-highlight 3.1.9
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><b><font color="#0000FF">declare</font></b> -xr <font color="#009900">PRE_GENERATE_HOOK</font><font color="#990000">=.</font>/pre_generate_hook<font color="#990000">.</font>sh
-<b><font color="#0000FF">declare</font></b> -xr <font color="#009900">POST_PUBLISH_HOOK</font><font color="#990000">=.</font>/post_publish_hook<font color="#990000">.</font>sh
-</pre>
-<br />
-<h2 style='display: inline'>Use of safer Bash options</h2><br />
-<br />
-<span>Gemtexter now does <span class='inlinecode'>set -euf -o pipefile</span>, which helps to eliminate bugs and to catch scripting errors sooner. Previous versions only <span class='inlinecode'>set -e</span>.</span><br />
-<br />
-<h2 style='display: inline'>Meta cache made obsolete</h2><br />
-<br />
-<span>Here is the breaking change to older versions of Gemtexter. The <span class='inlinecode'>$BASE_CONTENT_DIR/meta</span> directory was made obsolete. <span class='inlinecode'>meta</span> was used to store various information about all the blog post entries to make generating an Atom feed in Bash easier. Especially the publishing dates of each post were stored there. Instead, the publishing date is now encoded in the <span class='inlinecode'>.gmi</span> file. And if it is missing, Gemtexter will set it to the current date and time at first run.</span><br />
-<br />
-<span>An example blog post without any publishing date looks like this:</span><br />
-<br />
-<!-- Generator: GNU source-highlight 3.1.9
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><font color="#990000">%</font> cat gemfeed<font color="#990000">/</font><font color="#993399">2023</font>-<font color="#993399">02</font>-<font color="#993399">26</font>-title-here<font color="#990000">.</font>gmi
-<i><font color="#9A1900"># Title here</font></i>
-
-The remaining content of the Gemtext file<font color="#990000">...</font>
-</pre>
-<br />
-<span>Gemtexter will add a line starting with <span class='inlinecode'>&gt; Published at ...</span> now. Any subsequent Atom feed generation will then use that date.</span><br />
-<br />
-<!-- Generator: GNU source-highlight 3.1.9
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><font color="#990000">%</font> cat gemfeed<font color="#990000">/</font><font color="#993399">2023</font>-<font color="#993399">02</font>-<font color="#993399">26</font>-title-here<font color="#990000">.</font>gmi
-<i><font color="#9A1900"># Title here</font></i>
-
-<font color="#990000">&gt;</font> Published at <font color="#993399">2023</font>-<font color="#993399">02</font>-26T21<font color="#990000">:</font><font color="#993399">43</font><font color="#990000">:</font><font color="#993399">51</font><font color="#990000">+</font><font color="#993399">01</font><font color="#990000">:</font><font color="#993399">00</font>
-
-The remaining content of the Gemtext file<font color="#990000">...</font>
-</pre>
-<br />
-<h2 style='display: inline'>XMLLint support</h2><br />
-<br />
-<span>Optionally, when the <span class='inlinecode'>xmllint</span> binary is installed, Gemtexter will perform a simple XML lint check against the Atom feed generated. This is a double-check of whether the Atom feed is a valid XML.</span><br />
-<br />
-<h2 style='display: inline'>More</h2><br />
-<br />
-<span>Additionally, there were a couple of bug fixes, refactorings and overall improvements in the documentation made. </span><br />
-<br />
-<span>Other related posts are:</span><br />
-<br />
-<a class='textlink' href='./2021-04-24-welcome-to-the-geminispace.html'>2021-04-24 Welcome to the Geminispace</a><br />
-<a class='textlink' href='./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.html'>2021-06-05 Gemtexter - One Bash script to rule it all</a><br />
-<a class='textlink' href='./2022-08-27-gemtexter-1.1.0-lets-gemtext-again.html'>2022-08-27 Gemtexter 1.1.0 - Let&#39;s Gemtext again</a><br />
-<a class='textlink' href='./2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.html'>2023-03-25 Gemtexter 2.0.0 - Let&#39;s Gemtext again² (You are currently reading this)</a><br />
-<a class='textlink' href='./2023-07-21-gemtexter-2.1.0-lets-gemtext-again-3.html'>2023-07-21 Gemtexter 2.1.0 - Let&#39;s Gemtext again³</a><br />
-<br />
-<span>E-Mail your comments to paul at buetow.org :-)</span><br />
-<br />
-<a class='textlink' href='../'>Back to the main site</a><br />
- </div>
- </content>
- </entry>
- <entry>
- <title>'The Pragmatic Programmer' book notes</title>
- <link href="gemini://foo.zone/gemfeed/2023-03-16-the-pragmatic-programmer-book-notes.gmi" />
- <id>gemini://foo.zone/gemfeed/2023-03-16-the-pragmatic-programmer-book-notes.gmi</id>
- <updated>2023-03-16T00:55:20+02:00</updated>
- <author>
- <name>Paul Buetow aka snonux</name>
- <email>paul@dev.buetow.org</email>
- </author>
- <summary>These are my personal takeaways after reading 'The Pragmatic Programmer' by David Thomas and Andrew Hunt. 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.</summary>
- <content type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <h1 style='display: inline'>"The Pragmatic Programmer" book notes</h1><br />
-<br />
-<span class='quote'>Published at 2023-03-16T00:55:20+02:00</span><br />
-<br />
-<span>These are my personal takeaways after reading "The Pragmatic Programmer" by David Thomas and Andrew Hunt. 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.</span><br />
-<br />
-<pre>
- ,.......... ..........,
- ,..,&#39; &#39;.&#39; &#39;,..,
- ,&#39; ,&#39; : &#39;, &#39;,
- ,&#39; ,&#39; : &#39;, &#39;,
- ,&#39; ,&#39; : &#39;, &#39;,
- ,&#39; ,&#39;............., : ,.............&#39;, &#39;,
-,&#39; &#39;............ &#39;.&#39; ............&#39; &#39;,
- &#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;;&#39;&#39;&#39;;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;
- &#39;&#39;&#39;
-</pre>
-<br />
-<span>Think about your work while doing it - every day on every project. Have a feeling of continuous improvement. </span><br />
-<br />
-<ul>
-<li>Be a realist.</li>
-<li>Smell challenges.</li>
-<li>Care about your craft.</li>
-<li>Code can always be flawed, but it can meet the requirements.</li>
-<li>You should be proud of your code, though.</li>
-</ul><br />
-<span>No one writes perfect code, including you. However:</span><br />
-<br />
-<ul>
-<li>Paranoia is good thinking.</li>
-<li>Practice defensive programming and crash early.</li>
-<li>Crashing is often the best thing you can do. </li>
-<li>Changes should be reversible.</li>
-</ul><br />
-<span>Erlang: Defensive programming is a waste of time. Let it crash. "This can never happen" - don&#39;t practise that kind of self-deception when programming. </span><br />
-<br />
-<span>Leave assertions in the code, even in production. Only leave out the assertions causing the performance issues.</span><br />
-<br />
-<span>Take small steps, always. Get feedback, too, for each of the steps the code does. Avoid fortune telling. If you have to involve in it, then the step is too large.</span><br />
-<br />
-<span>Decouple the code (e.g. OOP or functional programming). Prefer interfaces for types and mixins for a class extension over class inheritance.</span><br />
-<br />
-<ul>
-<li>Refactor now and not later.</li>
-<li>Later, it will be even more painful.</li>
-</ul><br />
-<span>Don&#39;t think outside the box. Find the box. The box is more extensive than you think. Think about the hard problem at hand. Do you have to do it a certain way, or do you have to do it at all?</span><br />
-<br />
-<span>Do what works and not what&#39;s fashionable. E.g. does SCRUM make sense? The goal is to deliver deliverables and not to "become" agile.</span><br />
-<br />
-<h2 style='display: inline'>Continuous learning</h2><br />
-<br />
-<span>Add new tools to your repertoire every day and keep the momentum up. Learning new things is your most crucial aspect. Invest regularly in your knowledge portfolio. The learning process extends your thinking. It does not matter if you will never use it.</span><br />
-<br />
-<ul>
-<li>Learn a new programming language every year.</li>
-<li>Read a technical book every month.</li>
-<li>Take courses.</li>
-</ul><br />
-<span>Think critically about everything you learn. Use paper for your notes. There is something special about it.</span><br />
-<br />
-<h2 style='display: inline'>Stay connected</h2><br />
-<br />
-<span>It&#39;s your life, and you own it. Bruce Lee once said: </span><br />
-<br />
-<span class='quote'>"I am not on the world to life after your expectations, neither are you to life after mine."</span><br />
-<br />
-<ul>
-<li>Go to meet-ups and actively engage.</li>
-<li>Stay current.</li>
-<li>Dealing with computers is hard. Dealing with people is harder. </li>
-</ul><br />
-<span>It&#39;s your life. Share it, celebrate it, be proud and have fun.</span><br />
-<br />
-<h2 style='display: inline'>The story of stone soup</h2><br />
-<br />
-<span>How to motivate others to contribute something (e.g. ideas to a startup):</span><br />
-<br />
-<span class='quote'>A kindly, old stranger was walking through the land when he came upon a village. As he entered, the villagers moved towards their homes, locking doors and windows. The stranger smiled and asked, why are you all so frightened. I am a simple traveler, looking for a soft place to stay for the night and a warm place for a meal. "There&#39;s not a bite to eat in the whole province," he was told. "We are weak and our children are starving. Better keep moving on." "Oh, I have everything I need," he said. "In fact, I was thinking of making some stone soup to share with all of you." He pulled an iron cauldron from his cloak, filled it with water, and began to build a fire under it. Then, with great ceremony, he drew an ordinary-looking stone from a silken bag and dropped it into the water. By now, hearing the rumor of food, most of the villagers had come out of their homes or watched from their windows. As the stranger sniffed the "broth" and licked his lips in anticipation, hunger began to overcome their fear. "Ahh," the stranger said to himself rather loudly, "I do like a tasty stone soup. Of course, stone soup with cabbage -- that&#39;s hard to beat." Soon a villager approached hesitantly, holding a small cabbage he&#39;d retrieved from its hiding place, and added it to the pot. "Wonderful!!" cried the stranger. "You know, I once had stone soup with cabbage and a bit of salt beef as well, and it was fit for a king." The village butcher managed to find some salt beef . . . And so it went, through potatoes, onions, carrots, mushrooms, and so on, until there was indeed a delicious meal for everyone in the village to share. The village elder offered the stranger a great deal of money for the magic stone, but he refused to sell it and traveled on the next day. As he left, the stranger came upon a group of village children standing near the road. He gave the silken bag containing the stone to the youngest child, whispering to a group, "It was not the stone, but the villagers that had performed the magic." </span><br />
-<br />
-<span>By working together, everyone contributes what they can, achieving a greater good together.</span><br />
-<br />
-<span>Other book notes of mine are:</span><br />
-<br />
-<a class='textlink' href='./2023-03-16-the-pragmatic-programmer-book-notes.html'>2023-03-16 "The Pragmatic Programmer" book notes (You are currently reading this)</a><br />
-<a class='textlink' href='./2023-04-01-never-split-the-difference-book-notes.html'>2023-04-01 "Never split the difference" book notes</a><br />
-<a class='textlink' href='./2023-05-06-the-obstacle-is-the-way-book-notes.html'>2023-05-06 "The Obstacle is the Way" book notes</a><br />
-<a class='textlink' href='./2023-07-17-career-guide-and-soft-skills-book-notes.html'>2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes</a><br />
-<br />
-<span>E-Mail your comments to paul at buetow.org :-)</span><br />
-<br />
-<a class='textlink' href='../resources.html'>More books and other resources I found useful.</a><br />
-<a class='textlink' href='../'>Back to the main site</a><br />
- </div>
- </content>
- </entry>
- <entry>
- <title>How to shut down after work</title>
- <link href="gemini://foo.zone/gemfeed/2023-02-26-how-to-shut-down-after-work.gmi" />
- <id>gemini://foo.zone/gemfeed/2023-02-26-how-to-shut-down-after-work.gmi</id>
- <updated>2023-02-26T23:48:01+02:00</updated>
- <author>
- <name>Paul Buetow aka snonux</name>
- <email>paul@dev.buetow.org</email>
- </author>
- <summary>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. </summary>
- <content type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <h1 style='display: inline'>How to shut down after work</h1><br />
-<br />
-<span class='quote'>Published at 2023-02-26T23:48:01+02:00</span><br />
-<br />
-<pre>
- |\ "Music should be heard not only with the ears, but also the soul."
-|---|--\-----------------------|-----------------------------------------|
-| | |\ | |@ |\ |
-|---|---|--\-------------------|-------------/|----|------|--\----|------|
-| @| | |\ |O | 3 / | |@ | | |
-|---|--@|---|--\--------|------|---------/----|----|------|-------|------|
-| @| @| \ |O | / | | |@ @| @|. |
-|-----------|-----|-----|------|-----/---|---@|----|--------------|------|
-| @| | |O | | | | @|. |
-|-----------|----@|-----|------|----|---@|------------------------|------|
- @| | | Larry Komro @|.
- -@- [kom...@uwec.edu]
-</pre>
-<br />
-<span>Do you need help fully discharging from work in the evenings or for the weekend? Shutting down from work won&#39;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&#39; interest that you fully relax and shut down after work. </span><br />
-<br />
-<h2 style='display: inline'>Have a shutdown routine</h2><br />
-<br />
-<span>Have a routine. Try to finish work around the same time every day. Write any outstanding tasks down for the next day, so you are sure you will remember them. Writing them down brings wonders as you can remove them from your mind for the remainder of the day (or the upcoming weekend) as you know you will surely pick them up the next working day. Tidying up your workplace could also count toward your daily shutdown routine. </span><br />
-<br />
-<span>A commute home from the office also greatly helps, as it disconnects your work from your personal life. Don&#39;t work on your commute home, though! If you don&#39;t commute but work from home, then it helps to walk around the block or in a nearby park to disconnect from work. </span><br />
-<br />
-<h2 style='display: inline'>Don&#39;t work when you officially don&#39;t work</h2><br />
-<br />
-<span>Unless you are self-employed, you have likely signed an N-hour per week contract with your employer, and your regular working times are from X o&#39;clock in the morning to Y o&#39;clock in the evening (with M minutes lunch break in the middle). And there might be some flexibility in your working times, too. But that kind of flexibility (e.g. extending the lunch break so that there is time to pick up a family member from the airport) will be agreed upon, and you will counteract it, for example, by starting working earlier the next day or working late, that one exception. But overall, your weekly working time will stay N hours. </span><br />
-<br />
-<span>Another exception would be when you are on an on-call schedule and are expected to watch your work notifications out-of-office times. But that is usually only a few days per month and, therefore, not the norm. And it should also be compensated accordingly. </span><br />
-<br />
-<span>There might be some maintenance work you must carry out, which can only be done over the weekend, but it should be explicitly agreed upon and compensated for. Also, there might be a scenario that a production incident comes up shortly before the end of the work day, requiring you (and your colleagues) to stay a bit longer. But this should be an exceptional case.</span><br />
-<br />
-<span>Other than that, there is no reason why you should work out-of-office hours. I know many people who suffer "the fear of missing out", so slack messages and E-Mails are checked until late in the evening, during weekends or holidays. I have been improving here personally a lot over the last couple of months, but still, I fall into this trap occasionally. </span><br />
-<br />
-<span>Also, when you respond to slack messages and E-Mails, your colleagues can think that you have nothing better to do. They also will take it for granted and keep slacking and messaging you out of regular office times. </span><br />
-<br />
-<span>Checking for your messages constantly outside of regular office times makes it impossible to shut down and relax from work altogether. </span><br />
-<br />
-<h2 style='display: inline'>Distract your mind</h2><br />
-<br />
-<span>Often, your mind goes back to work-related stuff even after work. That&#39;s normal as you concentrated highly on your work throughout the day. The brain unconsciously continues to work and will automatically present you with random work-related thoughts. You can counteract this by focusing on non-work stuff, which may include:</span><br />
-<br />
-<ul>
-<li>Exercise. A half an hour workout or yoga session, followed by some stretching, helps to calm your mind after work. </li>
-<li>Play (with your family, pets, friends, or video game)</li>
-<li>Mindfully listen to music. When have you ever "really" listened to music? I mean, not just as a background stimulation but really paid attention to the melody, rhythm, voice and lyrics? That requires focused attention and distracts you from other thoughts. </li>
-<li>Think of or work on that fun passion project. I currently, for example, like to learn and code a bit in Rakulang. </li>
-<li>Read. Nothing beats reading a good Science Fiction Novel (or whatever you prefer) before falling asleep.</li>
-</ul><br />
-<span>Some of these can be habit-stacked: Exercise could be combined with watching videos about your passion project (e.g. watching lectures about that new programming language you are currently learning for fun). With walking, for example, you could combine listening to an Audiobook or music, or you could also think about your passion project during that walk. </span><br />
-<br />
-<h2 style='display: inline'>Get a pet</h2><br />
-<br />
-<span>Even if you have children, it helps wonders to get a pet. My cat, for example, will remind me a few times daily to take a few minute&#39;s breaks to pet, play or give food. So my cat not only helps me after work but throughout the day.</span><br />
-<br />
-<span>My neighbour also works from home, and he has dogs, which he regularly has to take out to the park.</span><br />
-<br />
-<h2 style='display: inline'>Journal your day</h2><br />
-<br />
-<span>If you are upset about something, making it impossible to shut down from work, write down everything (e.g., with a pen in a paper journal). Writing things down helps you to "get rid" of the negative. Especially after conflicts with colleagues or company decisions, you don&#39;t agree on. This kind of self-therapy is excellent. Brainstorm all your emotions and (even if opinionated) opinions so you have everything on paper. Once done, you don&#39;t think about it so much anymore, as you know you can access that information if required. But stopping ruminating about it will be much easier now. You will likely never access that information again, though. But at least writing the thoughts down saved your day. </span><br />
-<br />
-<span>Write down three things which went well for the day. This helps you to appreciate the day. </span><br />
-<br />
-<h2 style='display: inline'>Don&#39;t stress about what your employer expects from you</h2><br />
-<br />
-<span>Think about what&#39;s fun and motivates you. Maybe the next promotion to Principal or a Manager role isn&#39;t for you. Many fall into the trap of stressing themselves out to satisfy the employer so that the next upgrade will happen and think about it constantly, even after work. But it is more important that you enjoy your craftsmanship. Work on what you expect from yourself. Ideally, your goals should be aligned with your employer. I am not saying you should abandon everything what your manager is asking you to do, but it is, after all, your life. And you have to decide where and on what you want to work. But don&#39;t sell yourself short. Keep track of your accomplishments.</span><br />
-<br />
-<h2 style='display: inline'>Call it a day</h2><br />
-<br />
-<span>Every day you gave your best was good; the day&#39;s outcome doesn&#39;t matter. What matters is that you know you gave your best and are closer to your goals than the previous day. This gives you a sense of progress and accomplishment.</span><br />
-<br />
-<span>There are some days at work you feel drained afterwards and think you didn&#39;t progress towards your goals at all. It&#39;s more challenging to shut down from work after such a day. A quick hack is to work on a quick win before the end of the day, giving you a sense of accomplishment after all. Another way is to make progress on your fun passion project after work. It must not be work-related, but a sense of accomplishment will still be there.</span><br />
-<span> </span><br />
-<span>E-Mail your comments to paul at buetow.org :-)</span><br />
-<br />
-<a class='textlink' href='../'>Back to the main site</a><br />
- </div>
- </content>
- </entry>
- <entry>
- <title>Why GrapheneOS rox</title>
- <link href="gemini://foo.zone/gemfeed/2023-01-23-why-grapheneos-rox.gmi" />
- <id>gemini://foo.zone/gemfeed/2023-01-23-why-grapheneos-rox.gmi</id>
- <updated>2023-01-23T15:31:52+02:00</updated>
- <author>
- <name>Paul Buetow aka snonux</name>
- <email>paul@dev.buetow.org</email>
- </author>
- <summary>Art by Joan Stark</summary>
- <content type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <h1 style='display: inline'>Why GrapheneOS rox</h1><br />
-<br />
-<span class='quote'>Published at 2023-01-23T15:31:52+02:00</span><br />
-<br />
-<pre>
-Art by Joan Stark
- _.===========================._
- .&#39;` .- - __- - - -- --__--- -. `&#39;.
- __ / ,&#39;` _|--|_________|--|_ `&#39;. \
- /&#39;--| ; _.&#39;\ | &#39; &#39; | /&#39;._ ; |
- // | |_.-&#39; .-&#39;.&#39; ___ &#39;.&#39;-. &#39;-._| |
- (\) \"` _.-` / .-&#39;`_ `&#39;-. \ `-._ `"/
- (\) `-&#39; | .&#39; .-&#39;" "&#39;-. &#39;. | `-`
- (\) | / .&#39;(3)(2)(1)&#39;. \ |
- (\) | / / (4) .-. \ \ |
- (\) | | |(5) ( )&#39;==,J | |
- (\) | \ \ (6) &#39;-&#39; (0) / / |
- (\) | \ &#39;.(7)(8)(9).&#39; / |
- (\) ___| &#39;. &#39;-.._..-&#39; .&#39; |
- (\) /.--| &#39;-._____.-&#39; |
- (\) (\) |\_ _ __ _ __ __/|
- (\) (\) | |
-(\)_._._.__(\) | |
- (\\\\jgs\\\) &#39;.___________________.&#39;
- &#39;-&#39;-&#39;-&#39;--&#39;
-</pre>
-<br />
-<span>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. </span><br />
-<br />
-<a class='textlink' href='./2021-08-01-on-being-pedantic-about-open-source.html'>On Being Pedantic about Open-Source</a><br />
-<br />
-<span>What is GrapheneOS?</span><br />
-<br />
-<span class='quote'>GrapheneOS is a privacy and security-focused mobile OS with Android app compatibility developed as a non-profit open-source project. It&#39;s focused on the research and development of privacy and security technologies, including substantial improvements to sandboxing, exploits mitigations and the permission model.</span><br />
-<br />
-<span>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.</span><br />
-<br />
-<a class='textlink' href='https://GrapheneOS.org'>https://GrapheneOS.org</a><br />
-<a class='textlink' href='https://LineageOS.org'>https://LineageOS.org</a><br />
-<br />
-<h2 style='display: inline'>User Profiles</h2><br />
-<br />
-<span>GrapheneOS allows configuring up to 32 user profiles (including a guest profile) on a single phone. A profile is a completely different environment within the phone, and it is possible to switch between them instantly. Sessions of a profile can continue running in the background or be fully terminated. Each profile can have completely different settings and different applications installed.</span><br />
-<br />
-<span>I use my default profile with primarily open-source applications installed, which I trust. I use another profile for banking (PayPal, various proprietary bank apps, Amazon store app, etc.) and another profile for various Google services (which I try to avoid, but I have to use once in a while). Furthermore, I have configured a profile for Social Media use (that one isn&#39;t in my default profile, as otherwise I am tempted to scroll social media all the time, which I try to avoid and only want to do intentionally when switching to the corresponding profile!).</span><br />
-<br />
-<span>The neat thing about the profiles is that some can run a sandboxed version of Google Play (see later in this post), while others don&#39;t. So some profiles can entirely operate without any Google Play, and only some profiles (to which I rarely switch) have Google Play enabled. </span><br />
-<br />
-<span>You notice how much longer (multiple days) your phone can be on a single charge when Google Play Services isn&#39;t running in the background. This tells a lot about the background activities and indicates that using Google Play shouldn&#39;t be the norm.</span><br />
-<br />
-<h2 style='display: inline'>Proxying some of the Google offerings </h2><br />
-<br />
-<span>There&#39;s also the case that I am using an app from the Google Play store (as the app isn&#39;t available from F-Droid), which doesn&#39;t require Google Play Services to run in the background. Here&#39;s where I use the Aurora Android store. The Aurora store can be installed through F-Droid. Aurora acts as an anonymous proxy from your phone to the Google Play Store and lets you install apps from there. No Google credentials are required for that!</span><br />
-<br />
-<a class='textlink' href='https://f-droid.org'>https://f-droid.org</a><br />
-<br />
-<span>There&#39;s a similar solution for watching videos on YouTube. You can use the NewPipe app (also from F-Droid), which acts as an anonymous proxy for watching videos from YouTube. So there isn&#39;t any need to install the official YouTube app, and there isn&#39;t any need to login to your Google account. What&#39;s so bad about the official app? You don&#39;t know which data it is sending about you to Google, so it is a privacy concern. </span><br />
-<br />
-<h2 style='display: inline'>Google Play Sandboxing </h2><br />
-<br />
-<span>Before switching to GrapheneOS, I had been using LineageOS on one of my phones for a couple of years. Still, I always had to have a secondary personal phone with all of these proprietary apps which (partially) only work with Google Play on the phone (e.g. Banking, Navigation, various travel apps from various Airlines, etc.) somewhere around as I didn&#39;t install Google Play on my LineageOS phone due to privacy concerns and only installed apps from the F-Droid store on it. When travelling, I always had to carry around a second phone with Google Play on it, as without it; life would become inconvenient pretty soon. </span><br />
-<br />
-<span>With GrapheneOS, it is different. Here, I do not just have a separate user profile, "Google", for various Google apps where Google Play runs, but Google Play also runs in a sandbox!!!</span><br />
-<br />
-<span class='quote'>GrapheneOS has a compatibility layer providing the option to install and use the official releases of Google Play in the standard app sandbox. Google Play receives no special access or privileges on GrapheneOS instead of bypassing the app sandbox and receiving a massive amount of highly privileged access. Instead, the compatibility layer teaches it how to work within the full app sandbox. It also isn&#39;t used as a backend for the OS services as it would be elsewhere since GrapheneOS doesn&#39;t use Google Play even when it&#39;s installed.</span><br />
-<br />
-<span>When I need to access Google Play, I can switch to the "Google" profile. Even there, Google is sandboxed to the absolute minimum permissions required to be operational, which gives additional privacy protection.</span><br />
-<br />
-<span>The sad truth is that Google Maps is still the best navigation app. When driving unknown routes, I can switch to my Google profile to use Google Maps. I don&#39;t need to do that when going streets I know about, but it is crucial (for me) to have Google Maps around when driving to a new destination.</span><br />
-<br />
-<span>Also, Google Translate and Google Lens are still the best translation apps I know. I just recently relocated to another country, where I am still learning the language, so Google Lens has been proven very helpful on various occasions by ad-hoc translating text into English or German for me.</span><br />
-<br />
-<span>The same applies to banking. Many banking apps require Google Play to be available (It might be even more secure to only use banking apps from the Google Play store due to official support and security updates). I rarely need to access my mobile banking app, but once in a while, I need to. As you have guessed by now, I can switch to my banking profile (with Google Play enabled), do what I need to do, and then terminate the session and go back to my default profile, and then my life can go on :-). </span><br />
-<br />
-<span>It is great to have the flexibility to use any proprietary Android app when needed. That only applies to around 1% of my phone usage time, but you often don&#39;t always know when you need "that one app now". So it&#39;s perfect that it&#39;s covered with the phone you always have with you. </span><br />
-<br />
-<h2 style='display: inline'>The camera and the cloud </h2><br />
-<br />
-<span>I really want my phone to shoot good looking pictures, so that I can later upload them to the Irregular Ninja:</span><br />
-<br />
-<a class='textlink' href='https://irregular.ninja'>https://irregular.ninja</a><br />
-<br />
-<span>The stock camera app of the OASP could be better. Photos usually look washed out, and the app lacks features. With GrapheneOS, there are two options:</span><br />
-<br />
-<ul>
-<li>Use the official Google camera app with sandboxed Google Play Services running. You will get the full Google experience here.</li>
-<li>Or, just use the default GrapheneOS camera app.</li>
-</ul><br />
-<span>The GrapheneOS camera app is much better than the stock OASP camera app. I have been comparing the photo quality of my Pixel phone under LineageOS and GrapheneOS, and the differences are pronounced. I didn&#39;t compare the quality with the official Google camera app, but I have seen some comparison videos and the differences seem like they aren&#39;t groundbreaking. </span><br />
-<br />
-<span>For automatic backups of my photos, I am relying on a self-hosted instance of NextCloud (with a client app available via F-Droid). So there isn&#39;t any need to rely on any Google apps and services (Google Play Photos or Google Camera app) anymore, and that&#39;s great!</span><br />
-<br />
-<a class='textlink' href='https://nextcloud.com'>https://nextcloud.com</a><br />
-<br />
-<span>I also use NextCloud to synchronize my notes (NextCloud Notes), my RSS news feeds (NextCloud News) and contacts (DAVx5). All apps required are available in the F-Droid store.</span><br />
-<br />
-<h2 style='display: inline'>Fine granular permissions</h2><br />
-<br />
-<span>Another great thing about GrapheneOS is that, besides putting your apps into different profiles, you can also restrict network access and configure storage scopes per app individually.</span><br />
-<br />
-<span>For example, let&#39;s say you are installing that one proprietary app from the Google Play Store through the Aurora store, and then you want to ensure that the app doesn&#39;t send data "home" through the internet. Nothing is easier to do than that. Just remove network access permissions from that only app.</span><br />
-<br />
-<span>The app also wants to store and read some data from your phone (e.g. it could be a proprietary app for enhancing photos, and therefore storage access to a photo folder would be required). In GrapheneOS, you can configure a storage scope for that particular app, e.g. only read and write from one folder but still forbid access to all other folders on your phone.</span><br />
-<br />
-<h2 style='display: inline'>Termux</h2><br />
-<br />
-<span>Termux can be installed on any Android phone through F-Droid, so it doesn&#39;t need to be a GrapheneOS phone. But I have to mention Termux here as it significantly adds value to my phone experience. </span><br />
-<br />
-<span class='quote'>Termux is an Android terminal emulator and Linux environment app that works directly with no rooting or setup required. A minimal base system is installed automatically - additional packages are available using the APT package manager.</span><br />
-<br />
-<a class='textlink' href='https://termux.dev'>https://termux.dev</a><br />
-<br />
-<span>In short, Termux is an entire Linux environment running on your Android phone. Just pair your phone with a Bluetooth keyboard, and you will have the whole Linux experience. I am only using terminal Linux applications with Termux, though. What makes it especially great is that I could write on a new blog post (in Neovim through Termux on my phone) or do some coding whilst travelling (e.g. during a flight), or look up my passwords or some other personal documents (through my terminal-based password manager). All changes I commit to Git can be synced to the server with a simple <span class='inlinecode'>git push</span> once online (e.g. after the plane landed) again.</span><br />
-<br />
-<span>There are Pixel phones with a screen size of 6", and that&#39;s decent enough for occasional use like that, and everything (the phone, the BT keyboard, maybe an external battery pack) all fit nicely in a small travel pocket.</span><br />
-<br />
-<h2 style='display: inline'>So, why not use a pure Linux phone?</h2><br />
-<br />
-<span>Strictly speaking, an Android phone is a Linux phone, but it&#39;s heavily modified and customized. For me, a "pure" Linux phone is a more streamlined Linux kernel running in a distribution like Ubuntu Touch or Mobian. </span><br />
-<br />
-<span>A pure Linux phone, e.g. with Ubuntu Touch installed, e.g. on a PinePhone, Fairphone, the Librem 5 or the Volla phone, is very appealing to me. And they would also provide an even better Linux experience than Termux does. Some support running LineageOS within an Anbox, enabling you to run various proprietary Android apps occasionally within Linux.</span><br />
-<br />
-<a class='textlink' href='https://ubuntu-touch.io/'>Ubuntu Touch</a><br />
-<a class='textlink' href='https://en.wikipedia.org/wiki/Linux_for_mobile_devices'>More Linux distributions for mobile devices </a><br />
-<br />
-<span>But here, Google Play would not be sandboxed; you could not configure individual network permissions and storage scopes like in GrapheneOS. Pure Linux-compatible phones usually come with a crappy camera, and the battery life is generally pretty bad (only a few hours). Also, no big tech company pushes the development of Linux phones. Everything relies on hobbyists, whereas multiple big tech companies put a lot of effort into the Android project, and a lot of code also goes into the Android Open-Source project. </span><br />
-<br />
-<span>Currently, pure Linux phones are only a nice toy to tinker with but are still not ready (will they ever?) to be the daily driver. SailfishOS may be an exception; I played around with it in the past. It is pretty usable, but it&#39;s not an option for me as it is partial a proprietary operating system.</span><br />
-<br />
-<a class='textlink' href='https://sailfishos.org'>SailfishOS</a><br />
-<br />
-<h2 style='display: inline'>Small GrapheneOS downsides </h2><br />
-<br />
-<span>Sometimes, switching a profile to use a different app is annoying, and you can&#39;t copy and paste from the system clipboard from one profile to another. But that&#39;s a small price I am willing to pay!</span><br />
-<br />
-<span>Another thing is that GrapheneOS can only run on Google Pixel phones, whereas LineageOS can be installed on a much larger variety of hardware. But on the other hand, GrapheneOS works very well on Pixel phones. The GrapheneOS team can concentrate their development efforts on a smaller set of hardware which then improves the software&#39;s quality (best example: The camera app).</span><br />
-<br />
-<span>And, of course, GrapheneOS is an open-source project. This is a good thing; however, on the other side, nobody can guarantee that the OS will not break or will not damage your phone. You have to trust the GrapheneOS project and donate to the project so they can keep up with the great work. But I rather trust the GrapheneOS team than big tech. </span><br />
-<br />
-<span>E-Mail your comments to paul at buetow.org :-)</span><br />
-<br />
-<a class='textlink' href='../'>Back to the main site</a><br />
- </div>
- </content>
- </entry>
- <entry>
- <title>(Re)learning Java - My takeaways</title>
- <link href="gemini://foo.zone/gemfeed/2022-12-24-ultrarelearning-java-my-takeaways.gmi" />
- <id>gemini://foo.zone/gemfeed/2022-12-24-ultrarelearning-java-my-takeaways.gmi</id>
- <updated>2022-12-24T23:18:40+02:00</updated>
- <author>
- <name>Paul Buetow aka snonux</name>
- <email>paul@dev.buetow.org</email>
- </author>
- <summary>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:</summary>
- <content type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <h1 style='display: inline'>(Re)learning Java - My takeaways</h1><br />
-<br />
-<span class='quote'>Published at 2022-12-24T23:18:40+02:00</span><br />
-<br />
-<a href='./2022-12-24-ultrarelearning-java-my-takeaways/learnjava.jpg'><img src='./2022-12-24-ultrarelearning-java-my-takeaways/learnjava.jpg' /></a><br />
-<br />
-<span>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:</span><br />
-<br />
-<a class='textlink' href='./2022-04-10-creative-universe.html'>Creative universe</a><br />
-<br />
-<span>I have been programming in Java back in the days as a university student, and even my Diploma Thesis I implemented in Java (it would require some overhaul so that it is fully compatible with a recent version of Java, though - It still compiles and runs, but with a lot of warnings, though!):</span><br />
-<br />
-<a class='textlink' href='https://codeberg.org/snonux/vs-sim'>VS-Sim: Distributed systems simulator</a><br />
-<br />
-<span>However, after that, I became a Linux Sysadmin and mainly continued programming in Perl, Puppet, bash, and a little Python. For personal use, I also programmed a bit in Haskell and C. After my Sysadmin role, I moved to London and became a Site Reliability Engineer (SRE), where I mainly programmed in Ruby, bash, Puppet and Golang and a little bit of C. </span><br />
-<br />
-<span>At my workplace, as an SRE, I don&#39;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.</span><br />
-<br />
-<h2 style='display: inline'>Stuck at Java 1.4</h2><br />
-<br />
-<span>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.</span><br />
-<br />
-<h2 style='display: inline'>(Re)learning &amp; upskilling to Java 18</h2><br />
-<br />
-<h3 style='display: inline'>Effective Java</h3><br />
-<br />
-<span>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!</span><br />
-<br />
-<a href='./2022-12-24-ultrarelearning-java-my-takeaways/effective-java.jpg'><img src='./2022-12-24-ultrarelearning-java-my-takeaways/effective-java.jpg' /></a><br />
-<br />
-<span>I recommend reading the 90-part effective Java Series on <span class='inlinecode'>dev.to</span>. It&#39;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.</span><br />
-<br />
-<a class='textlink' href='https://dev.to/kylec32/series/2292'>Kyle Carter&#39;s 90-part Effective Java Series </a><br />
-<br />
-<h3 style='display: inline'>Java Pub House</h3><br />
-<br />
-<span>During my lunch breaks, I usually have a walk around the block or in a nearby park. I used that time to listen to the Java Pub House podcast. I listened to *every* episode and learned tons of new stuff. I can highly recommend this podcast. Especially GraalVM, a high-performance JDK distribution written for Java and other JVM languages, captured my attention. GraalVM can compile Java code into native binaries, improving performance and easing the distribution of Java programs. Because of the latter, I should release a VS-Sim GraalVM edition one day through a Linux AppImage ;-).</span><br />
-<br />
-<a class='textlink' href='https://www.javapubhouse.com'>https://www.javapubhouse.com</a><br />
-<a class='textlink' href='https://www.graalvm.org'>https://www.graalvm.org</a><br />
-<br />
-<h3 style='display: inline'>Java Concurrency course</h3><br />
-<br />
-<span>I also watched a course on O&#39;Reilly Safari Books online about Java Concurrency. That gave an excellent refresher on how the Java thread pools work and what were the concurrency primitives available in the standard library.</span><br />
-<br />
-<h3 style='display: inline'>Read a lot of Java code</h3><br />
-<br />
-<span>First, the source code is often the best documentation (if programmed nicely), and second, it helps to get the hang of the language and standard practices. I started to read more and more Java code at work. I did that whenever I had to understand how something, in particular, worked (e.g. while troubleshooting and debugging an issue). </span><br />
-<br />
-<h3 style='display: inline'>Observed Java code reviews</h3><br />
-<br />
-<span>Another great way to get the hang of Java again was to sneak into the code reviews of the Software Engineer colleagues. They are the expert on the matter and are a great source to copy knowledge. It&#39;s OK to stay passive and only follow the reviews. Sometimes, it&#39;s OK to step up and take ownership of the review. The developers will also always be happy to answer any naive questions which come up.</span><br />
-<br />
-<h3 style='display: inline'>Took ownership of a roadmap-Java project</h3><br />
-<br />
-<span>Besides my Pet Project, I also took ownership of a regular roadmap Java project at work, making an internal Java service capable of running in Kubernetes. This was a bunch of minor changes and adding a bunch of classes and unit tests dealing with the statelessness and a persistent job queue in Redis. The job also involved reading and understanding a lot of already existing Java code. It wasn&#39;t part of my job description, but it was fun, and I learned a lot. The service runs smoothly in production now. Of course, all of my code got reviewed by my Software Engineering colleagues.</span><br />
-<br />
-<h2 style='display: inline'>The good</h2><br />
-<br />
-<span>From the new language features and syntaxes, there are many personal takeaways, and I can&#39;t possibly list them all, but here are some of my personal highlights:</span><br />
-<br />
-<ul>
-<li>Static factory methods and public constructors both have their uses, and it pays to understand their relative merits. Often static factories are preferable (cleaner and easier to read), so avoid the reflex to provide public constructors without first considering static factories.</li>
-<li>Java streams were utterly new to me. I love how they can help to produce more compact code. But it&#39;s challenging to set the line of when enough is enough. Overusing streams can have the opposite effect: Code becomes more complex and challenging to understand. And it is so easy to parallelize the computation of streams by "just" marking the stream as <span class='inlinecode'>.parallel()</span> (more on that later in this post).</li>
-<li>Overall, object-oriented languages tend to include more and more functional paradigms. The functional interfaces, which Java provides now, are fantastic. Their full powers shine in combination with the use of streams. An entire book can be written about Java functional interfaces, so I leave it to you to do any further digging.</li>
-<li>Local type inference help to reduce even more boilerplate code. E.g. instead of <span class='inlinecode'>Hash&lt;String,Hash&lt;String,String&gt;&gt; foo = new Hash&lt;String,Hash&lt;String,String&gt;&gt;();</span> it&#39;s possible to just write <span class='inlinecode'>var foo = new Hash&lt;String,Hash&lt;String,String&gt;&gt;();</span></li>
-<li>Class inheritance isn&#39;t the preferred way anymore to structure reusable code. Now, it&#39;s composition over inheritance. E.g. use dependency injection (inject one object to another object through its constructor) or prefer interfaces (which now also support default implementations of methods) over class inheritance. This makes sense to me as I do that already when I program in Ruby. </li>
-<li>I learned the <span class='inlinecode'>try-with-resources</span> pattern. Very useful in ensuring closing resources again correctly. No need anymore for complicated and nested <span class='inlinecode'>finally</span>-blocks, which used to be almost impossible to get right previously in case of an error condition (e.g. I/O error somewhere deeply nested in an input or output stream).</li>
-<li>Optimize only when required. It&#39;s considered to be cleaner to prefer immutable variables (declaring them as <span class='inlinecode'>final</span>). I knew that already, but for Java, it always seemed to be a waste of resources (creating entirely new objects whenever states change), but apparently, it&#39;s okay. Java also does many internal tricks for performance optimization here, e.g. interning strings.</li>
-<li>I learned about the concept of static member classes and the difference between non-static member classes (also sometimes known as inner classes). Non-static member classes have full access to all members of their outer class (think of closure). In contrast, static member classes act like completely separate classes without such access but provide the benefit of a nested name that can help group functionality in the code.</li>
-<li>I learned about the existence of thread-local variables. These are only available to the current thread and aren&#39;t shared with other threads.</li>
-<li>I learned about the concept of Java modules, which help to structure larger code bases better. The traditional Java packages are different. </li>
-<li>I learned to love the new <span class='inlinecode'>Optional</span> type. I already knew the concept from Haskell, where <span class='inlinecode'>Maybe</span> would be the corresponding type. <span class='inlinecode'>Optional</span> helps to avoid <span class='inlinecode'>null</span>-pointers but comes with some (minimal) performance penalty. So, in the end, you end up with both <span class='inlinecode'>Optional</span> types and <span class='inlinecode'>null</span>-pointers in your code (depending on the requirements). But I like to prefer <span class='inlinecode'>Optional</span> over <span class='inlinecode'>null</span>-pointer when "no result" is a valid return value from a method.</li>
-<li>The <span class='inlinecode'>enum</span> type is way more powerful than I thought. Initially, I felt an <span class='inlinecode'>enum</span> could only be used to define a list of constants and then to compare an instance to another instance of the same. An <span class='inlinecode'>enum</span> is still there to define a list of constants, but it&#39;s also almost like a <span class='inlinecode'>class</span> (you can implement constructors, and methods, inherit from other enums). There are quite a lot of possible use cases.</li>
-<li>A small but almost the most helpful thing I learned is always to use the <span class='inlinecode'>@Override</span> annotation when overriding a method from a parent class. If done, Java helps to detect any typos or type errors when overriding methods. That&#39;s useful and spares a lot of time debugging where a method was mistakenly overloaded but not overridden.</li>
-<li>Lambdas are much cleaner, shorter and easier to read than anonymous classes. Many Java libraries require passing instances of (anonymous) classes (e.g. in Swing) to other objects. Lambdas are so lovely because they are primarily compatible with the passing of anonymous classes, so they are a 1:1 replacement in many instances. Lambdas also play very nicely together with the Java functional interfaces, as each Lambda got a type, and the type can be an already existing functional interface (or, if you got a particular case, you could define your custom functional interface for your own set of Lambdas, of course).</li>
-<li>I love the concept of Java records. You can think of a record as an immutable object holding some data (as members). They are ideal for pipe and stream processing. They are much easier to define (with much less boilerplate) and come with write protection out of the box.</li>
-</ul><br />
-<h2 style='display: inline'>The bad and the ugly</h2><br />
-<br />
-<span>There are also many ugly corners in Java. Many are doomed to stay there forever due to historical decisions and ensuring backward compatibility with older versions of the Java language and the Java standard library. </span><br />
-<br />
-<ul>
-<li>Finalizers and cleaners seem obsolete, fragile and still, you can use them.</li>
-<li>In many cases, extreme caution needs to be taken to minimize the accessibility of class members. You might think that Java provides the best "out-of-the-box" solution for proper encapsulation, but the language has many loopholes.</li>
-<li>In the early days, Java didn&#39;t support generics yet. So what you would use is to cast everything to <span class='inlinecode'>Object</span>. Java now fully supports generics (for a while already), but you can still cast everything to <span class='inlinecode'>Object</span> and back to whatever type you want. That can lead to nasty runtime errors. Also, there&#39;s a particular case to convert between an Array of Object to an Array of String or from an Array of String to a List of String. Java can&#39;t convert between these types automatically, and extreme caution needs to be taken when enforcing so (e.g. through explicit type casts). In many of these cases, Java would print out warnings that need to be manually suppressed via annotations. Programming that way, converting data between old and new best practices, is clunky.</li>
-<li>If you don&#39;t know what you do, Java streams can be all wrong. Side effects in functions used in streams can be nasty to debug. Also, don&#39;t just blindly add a <span class='inlinecode'>.parallel()</span> to your stream. You need to understand what the stream does and how it exactly works; otherwise, parallelizing a stream can impact the performance drastically (in a negative way). There need to be language constructs preventing you from doing the wrong things. That&#39;s so much easier to do it right in a purely functional programming language like Haskell.</li>
-<li>Java is a pretty old language (already), so there are many obstacles to consider. There are too many exceptions and different outcomes of how Java code can behave. In most cases, when you write an API, every method you program needs to be documented so the user won&#39;t encounter any surprises using your code. Writing and reading a lot of documentation seems to be quite the overhead when the method name is already descriptive.</li>
-<li>Java serialization is broken. It works, and the language still supports it, but you better not use Java&#39;s native way of object serialization and deserialization. Unbelievable how much can get wrong here, especially regarding security (injecting arbitrary code).</li>
-<li>Being a bit spoiled by Golang&#39;s Goroutines, I was shocked about the limitations of the Java threads. They are resource hungry, and you can&#39;t just spin up millions of them as you would with Goroutines. I knew this limitation of threads already (as it&#39;s not a problem of the language but of how threads work in the OS), but still, I was pretty shocked when I got reminded of them again. Of course, there&#39;s a workaround: Use asynchronous sockets so that you don&#39;t waste a whole thread on a single I/O operation (in my case, waiting for a network response). Golang&#39;s runtime does that automatically for you: An OS thread will be re-used for other tasks until the network socket unblocks. Every modern programming language should support lightweight threads or Coroutines like Go&#39;s Goroutines. </li>
-</ul><br />
-<br />
-<h2 style='display: inline'>Conclusion</h2><br />
-<br />
-<span>While (re)learning Java, I felt like a student again and was quite enthusiastic about it initially. I invested around half a year, immersing myself intensively in Java (again). The last time I did that was many years ago as a university student. I even won a Silver Prize at work, implementing a project this year (2022 as of writing this). I feel confident now with understanding, debugging and patching Java code at work, which boosted my debugging and troubleshooting skills. </span><br />
-<br />
-<span>I don&#39;t hate Java, but I don&#39;t love programming in it, either. I will, I guess, always see Java as the necessary to get stuff done (reading code to understand how the service works, adding a tiny feature to make my life easier, adding a quick bug fix to overcome an obstacle...).</span><br />
-<br />
-<span>Although Java has significantly improved since 1.4, its code still tends to be more boilerplate. Not mainly because due to lines of code (Golang code tends to be quite repetitive, primarily when no generics are used), but due to the levels of abstractions it uses. Class hierarchies can be ten classes or deeper, and it is challenging to understand what the code is doing. Good test coverage and much documentation can mitigate the problem partially. Big enterprises use Java, and that also reflects to the language. There are too many libraries and too many abstractions that are bundled with too many legacy abstractions and interfaces and too many exceptions in the library APIs. There&#39;s even an external library named Lombok, which aims to reduce Java boilerplate code. Why is there a need for an external library? It should be all part of Java itself.</span><br />
-<br />
-<a class='textlink' href='https://projectlombok.org/'>https://projectlombok.org/</a><br />
-<br />
-<span>Java needs a clean cut. The clean cut shall be incompatible with previous versions of Java and only promote modern best practices without all the legacy burden carried around. The same can be said for other languages, e.g. Perl, but in Perl, they already attack the problem with the use of flags which change the behaviour of the language to more modern standards. Or do it like Python, where they had a hard (incompatible) cut from version 2 to version 3. It will be painful, for sure. But that would be the only way I would enjoy using that language as one of my primary languages to code new stuff regularly. Currently, my Java will stay limited to very few projects and the more minor things already mentioned in this post. </span><br />
-<br />
-<span>Am I a Java expert now? No, by far not. But I am better now than before :-).</span><br />
-<br />
-<span>E-Mail your comments to paul at buetow.org :-)</span><br />
-<br />
-<a class='textlink' href='../'>Back to the main site</a><br />
- </div>
- </content>
- </entry>
- <entry>
- <title>I tried (Doom) Emacs, but I switched back to (Neo)Vim</title>
- <link href="gemini://foo.zone/gemfeed/2022-11-24-i-tried-emacs-but-i-switched-back-to-neovim.gmi" />
- <id>gemini://foo.zone/gemfeed/2022-11-24-i-tried-emacs-but-i-switched-back-to-neovim.gmi</id>
- <updated>2022-11-24T11:17:15+02:00</updated>
- <author>
- <name>Paul Buetow aka snonux</name>
- <email>paul@dev.buetow.org</email>
- </author>
- <summary>Art by \ \_! / __!</summary>
- <content type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <h1 style='display: inline'>I tried (Doom) Emacs, but I switched back to (Neo)Vim</h1><br />
-<br />
-<span class='quote'>Published at 2022-11-24T11:17:15+02:00; Updated at 2022-11-26</span><br />
-<br />
-<pre>
- _/ \ _(\(o
- / \ / _ ^^^o
- / ! \/ ! &#39;!!!v&#39;
- ! ! \ _&#39; ( \____
- ! . \ _!\ \===^\)
-Art by \ \_! / __!
- Gunnar Z. \! / \ &lt;--- Emacs is a giant dragon
- (\_ _/ _\ )
- \ ^^--^^ __-^ /(__
- ^^----^^ "^--v&#39;
-</pre>
-<br />
-<span>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&#39;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&#39;s emulating Vim within Emacs), and I am pretty sure I won&#39;t be ready to give up all the muscle memory I have built over more than a decade.</span><br />
-<br />
-<a class='textlink' href='https://www.gnu.org/software/emacs/'>GNU Emacs</a><br />
-<a class='textlink' href='https://github.com/doomemacs/'>Doom Emacs</a><br />
-<br />
-<span>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&#39;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).</span><br />
-<br />
-<a class='textlink' href='https://www.vim.org'>Vim</a><br />
-<a class='textlink' href='https://neovim.io'>NeoVim</a><br />
-<br />
-<span>So why did I switch back to the Vi-family?</span><br />
-<br />
-<h2 style='display: inline'>Emacs is a giant dragon</h2><br />
-<br />
-<span>Emacs feels like a giant dragon as it is much more than an editor or an integrated development environment. Emacs is a whole platform on its own. There&#39;s an E-Mail client, an IRC client, or even games you can run within Emacs. And you can also change Emacs within Emacs using its own Lisp dialect, Emacs Lisp (Emacs is programmed in Emacs Lisp). Therefore, Emacs is also its own programming language. You can change every aspect of Emacs within Emacs itself. People jokingly state Emacs is an operating system and that you should directly use it as the <span class='inlinecode'>init 1</span> process (if you don&#39;t know what the <span class='inlinecode'>init 1</span> process is: Under UNIX and similar operating systems, it&#39;s the very first userland processed launched. That&#39;s usually <span class='inlinecode'>systemd</span> on Linux-based systems, <span class='inlinecode'>launchd</span> on macOS, or any other init script or init system used by the OS)!</span><br />
-<br />
-<span>In many aspects, Emacs is like shooting at everything with a bazooka! However, I prefer it simple. I only wanted Emacs to be a good editor (which it is, too), but there&#39;s too much other stuff in Emacs that I don&#39;t need to care about! Vim and NeoVim do one thing excellent: Being great text editors and, when loaded with plugins, decent IDEs, too. </span><br />
-<br />
-<h2 style='display: inline'>Magit love</h2><br />
-<br />
-<span>I almost fell in love with Magit, an integrated Git client for Emacs. But I think the best way to interact with Git is to use the <span class='inlinecode'>git</span> command line directly. I don&#39;t worry about typing out all the commands, as the most commonly used commands are in my shell history. Other useful Git programs I use frequently are <span class='inlinecode'>bit</span> and <span class='inlinecode'>tig</span>. Also, get a mechanical keyboard that makes hammering whole commands into the terminal even more enjoyable.</span><br />
-<br />
-<a class='textlink' href='https://magit.vc/'>Magit</a><br />
-<a class='textlink' href='https://github.com/jonas/tig'>Tig</a><br />
-<br />
-<span>Magit is pretty neat for basic Git operations, but I found myself searching the internet for the correct sub-commands to do the things I wanted to do in Git. Mainly, the way how branches are managed is confusing. Often, I fell back to the command line to fix up the mess I produced with Magit (e.g. accidentally pushing to the wrong remote branch, so I found myself fixing things manually on the terminal with the <span class='inlinecode'>git</span> command with forced pushes....). Magit is hotkey driven, and common commands are quickly explorable through built-in hotkey menus. Still, I found it challenging to navigate to more advanced Git sub-commands that way which was much easier accomplished by using the <span class='inlinecode'>git</span> command directly.</span><br />
-<br />
-<h2 style='display: inline'>Graphical UI</h2><br />
-<br />
-<span>If there is one thing I envy about Emacs is that it&#39;s a graphical program, whereas the Vi-family of editors are purely terminal-based. I see the benefits of being a graphical program as this enables the use of multiple fonts simultaneously to embed pictures and graphs (that would be neat as a Markdown preview, for example). There&#39;s also GVim (Vim with GTK UI), but that&#39;s more of an afterthought.</span><br />
-<br />
-<span>There are now graphical front-end clients for NeoVim, but I still need to dig into them. Let me know your experience if you have one. Luckily, I don&#39;t rely on something graphical in my text editor, but it would improve how the editor looks and feels. UTF8 can already do a lot in the terminal, and terminal emulators also allow you to use TrueType fonts. Still, you will always be limited to one TTF font for the whole terminal, and it isn&#39;t possible to have, for example, a different font for headings, paragraphs, etc... you get the idea. TTF+UTF8 can&#39;t beat authentic graphics. </span><br />
-<br />
-<h2 style='display: inline'>Scripting it</h2><br />
-<br />
-<span>It is possible to customize every aspect of Emacs through Emacs Lisp. I have done some Elk Scheme programming in the past (a dialect of Lisp), but that was a long time ago, and I am not willing to dive here again to customize my environment. I would instead take the pragmatic approach and script what I need in VimScript (a terrible language, but it gets the job done!). I watched Damian Conway&#39;s VimScript course on O&#39;Reilly Safari Books Online, which I greatly recommend. Yes, VimScript feels clunky, funky and weird and is far less elegant than Lisp, but it gets its job done - in most cases! (That reminds me that the Vim team has announced a new major version of VimScript with improvements and language changes made - I haven&#39;t gotten to it yet - but I assume that VimScript will always stay VimScript).</span><br />
-<br />
-<a class='textlink' href='https://en.wikipedia.org/wiki/Emacs_Lisp'>Emacs Lisp</a><br />
-<a class='textlink' href='http://sam.zoy.org/elk/'>Elk Scheme</a><br />
-<a class='textlink' href='http://vimscript.org/'>VimScript</a><br />
-<a class='textlink' href='https://www.oreilly.com/library/view/scripting-vim/9781491996287/'>Scripting Vim by Damian Conway</a><br />
-<br />
-<span>NeoVim is also programmable with Lua, which seems to be a step up and Vim comes with a Perl plugin API (which was removed from NeoVim, but that is a different story - why would someone remove the most potent mature text manipulation programming language from one of the most powerful text editors?).</span><br />
-<br />
-<a class='textlink' href='https://neovim.io/doc/user/lua.html'>NeoVim Lua API</a><br />
-<br />
-<span>One example is my workflow of how I compose my blog articles (e.g. this one you are currently reading): I am writing everything in NeoVim, but I also want to have every paragraph checked against Grammarly (as English is not my first language). So I write a whole paragraph, then I select the entire paragraph via visual selection with <span class='inlinecode'>SHIFT+v</span>, and then I press <span class='inlinecode'>,y</span> to yank the paragraph to the systems clipboard, then I paste the paragraph to Grammarly&#39;s browser window with <span class='inlinecode'>CTRL+v</span>, let Grammarly suggest the improvements, and then I copy the result back with <span class='inlinecode'>CTRL+c</span> to the system clipboard and in NeoVim I type <span class='inlinecode'>,i</span> to insert the result back overriding the old paragraph (which is still selected in visual mode) with the new content. That all sounds a bit complicated, but it&#39;s surprisingly natural and efficient.</span><br />
-<br />
-<span>To come back to the example, for the clipboard integration, I use this small VimScript snippet, and I didn&#39;t have to dig into any Lisp or Perl for this:</span><br />
-<br />
-<!-- Generator: GNU source-highlight 3.1.9
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><i><font color="#9A1900">" Clipboard</font></i>
-vnoremap ,<b><font color="#0000FF">y</font></b> !pbcopy<font color="#FF6600">&lt;CR&gt;</font>ugv
-vnoremap ,<b><font color="#0000FF">i</font></b> !pbpaste<font color="#FF6600">&lt;CR&gt;</font>
-nmap ,<b><font color="#0000FF">i</font></b> !wpbpaste<font color="#FF6600">&lt;CR&gt;</font>
-</pre>
-<br />
-<span>That&#39;s only a very few lines and does precisely what I want. It&#39;s quick and dirty but get&#39;s the job done! If VimScript becomes too cumbersome, I can use Lua for NeoVim scripting.</span><br />
-<br />
-<h2 style='display: inline'>The famous Emacs Org mode</h2><br />
-<br />
-<span>Org-mode is an Emacs mode for keeping notes, authoring documents, computational notebooks, literate programming, maintaining to-do lists, planning projects, and more — in a fast and effective plain-text system. There&#39;s even a dedicated website for it:</span><br />
-<br />
-<a class='textlink' href='https://orgmode.org/'>https://orgmode.org/</a><br />
-<br />
-<span>In short, Org-mode is an "interactive markup language" that helps you organize everything mentioned above. I rarely touched the surface during my two-month experiment with Emacs, and I am impressed by it, so I see the benefits of having that. But it&#39;s not for me.</span><br />
-<br />
-<span>I use "Dead Tree Mode" to organize my work and notes. Dead tree? Yeah, I use an actual pen and a real paper journal (Leuchtturm or a Moleskine and a set of coloured <span class='inlinecode'>0.5</span> Muji Pens are excellent choices). That&#39;s far more immersive and flexible than a computer program can ever be. Yes, some automation and interaction with the computer (like calendar scheduling etc.) are missing. Still, an actual paper journal forces you to stay simple and focus on the actual work rather than tinkering with your computer program. (But I could not resist, and I wrote a VimScript which parses a table of contents page in Markdown format of my scanned paper journals, and NeoVim allows me to select a topic so that the corresponding PDF scan on the right journal page gets opened in an external PDF viewer (the PDF viewer is <span class='inlinecode'>zathura</span>, it uses Vi-keybindings, of course) :-). (See the appendix of this blog post for that script).</span><br />
-<br />
-<a class='textlink' href='https://pwmt.org/projects/zathura/'>Zathura</a><br />
-<br />
-<span>On the road, I also write some of my notes in Markdown format to NextCloud Notes, which is editable from my phone and via NeoVim on my computers. Markdown is much less powerful than Org-mode, but I prefer it the simple way. There&#39;s a neat terminal application, <span class='inlinecode'>ranger</span>, which I use to browse my NextCloud Notes when they are synced to a local folder on my machine. <span class='inlinecode'>ranger</span> is a file manager inspired by Vim and therefore makes use of Vim keybindings and it feels just natural to me. </span><br />
-<br />
-<a class='textlink' href='https://github.com/ranger/ranger'>Ranger - A Vim inspired file manager</a><br />
-<span>Did I mention that I also use my <span class='inlinecode'>zsh</span> (my default shell) and my <span class='inlinecode'>tmux</span> (terminal multiplexer) in Vi-mode?</span><br />
-<br />
-<a class='textlink' href='https://zsh.sourceforge.io/'>Z shell</a><br />
-<a class='textlink' href='https://github.com/tmux/tmux'>tmux terminal multiplexer</a><br />
-<br />
-<h2 style='display: inline'>Seeking simplicity</h2><br />
-<br />
-<span>I am not ready to dive deep into the whole world of Emacs. I prefer small and simple tools as opposed to complex tools. Emacs comes with many features out of the box, whereas in Vim/NeoVim, you would need to install many plugins to replicate some of the behaviour. Yes, I need to invest time managing all the Vim/NeoVim plugins I use, but I feel more in control compared to Doom Emacs, where a framework around vanilla Emacs manages all the plugins. I could use vanilla Emacs and manage all my plugins the vanilla way, but for me, it&#39;s not worth the effort to learn and dive into that as all that I want to do I can already do with Vim/NeoVim.</span><br />
-<br />
-<span>I am not saying that Vim/NeoVim are simple programs, but they are much simpler than Emacs with much smaller footprints; furthermore, they appear to be more straightforward as I am used to them. I only need Vim/NeoVim to be an editor, an IDE (through some plugins), and nothing more.</span><br />
-<br />
-<h2 style='display: inline'>Conclusion</h2><br />
-<br />
-<span>I understand the Emacs users now. Emacs is an incredibly powerful platform for almost everything, not just text editing. With Emacs, you can do nearly everything (Writing, editing, programming, calendar scheduling and note taking, Jira integration, playing games, listening to music, reading/writing emails, browsing the web, using as a calculator, generating HTML pages, configuring interactive menus, jumping around between every feature and every file within one single session, chat on IRC, surf the Gopherspace, ... the options are endless....). If you want to have one piece of software which rules it all and you are happy to invest a large part of your time in your platform: Pick Emacs, and over time Emacs will become "your" Emacs, customized to your own needs and change the way it works, which makes the Emacs users stick even more to it.</span><br />
-<br />
-<span>Vim/NeoVim also comes with a very high degree of customization options, but to a lesser extreme than Emacs (but still, a much higher degree than most other editors out there). If you want the best text editor in the world, which can also be tweaked to be a decent IDE, you are only looking for: Pick Vim or NeoVim! You would also need to invest a lot of time in learning, tweaking and customizing Vim/NeoVim, but that&#39;s a little more straightforward, and the result is much more lightweight once you get used to the "Vi way of doing things" you never would want to change back. I haven&#39;t tried the Emacs vanilla keystrokes, but they are terrible (that&#39;s probably one of the reasons why Doom Emacs uses Vim keybindings by default).</span><br />
-<br />
-<span class='quote'>Update: One reader recommended to have a look at NvChad. NvChad is a NeoVim config written in Lua aiming to provide a base configuration with very beautiful UI and blazing fast startuptime (around <span class='inlinecode'>0.02</span> secs ~ <span class='inlinecode'>0.07</span> secs). They tweak UI plugins such as telescope, nvim-tree, bufferline etc well to provide an aesthetic UI experience. That sounds interesting!</span><br />
-<br />
-<a class='textlink' href='https://github.com/NvChad/NvChad'>https://github.com/NvChad/NvChad</a><br />
-<br />
-<span>E-Mail your comments to paul at buetow.org :-)</span><br />
-<br />
-<a class='textlink' href='../'>Back to the main site</a><br />
- </div>
- </content>
- </entry>
- <entry>
- <title>Installing DTail on OpenBSD</title>
- <link href="gemini://foo.zone/gemfeed/2022-10-30-installing-dtail-on-openbsd.gmi" />
- <id>gemini://foo.zone/gemfeed/2022-10-30-installing-dtail-on-openbsd.gmi</id>
- <updated>2022-10-30T11:03:19+02:00</updated>
- <author>
- <name>Paul Buetow aka snonux</name>
- <email>paul@dev.buetow.org</email>
- </author>
- <summary>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 :-)</summary>
- <content type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <h1 style='display: inline'>Installing DTail on OpenBSD</h1><br />
-<br />
-<span class='quote'>Published at 2022-10-30T11:03:19+02:00</span><br />
-<br />
-<pre>
- ,_---~~~~~----._
- _,,_,*^____ _____``*g*\"*,
-/ __/ /&#39; ^. / \ ^@q f
- @f | | | | 0 _/
-\`/ \~__((@/ __ \__((@/ \
- | _l__l_ I &lt;--- The Go Gopher
- } [______] I
- ] | | | |
- ] ~ ~ |
- | |
- | |
- | | A ;
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~|~~~,--,-/ \---,-/|~~,~~~~~~~~~~~~~~~~~~~~~~~~~~~
- _|\,&#39;. /| /| `/|-.
- \`.&#39; /| , `;.
- ,&#39;\ A A A A _ /| `.;
- ,/ _ A _ / _ /| ;
- /\ / \ , , A / / `/|
- /_| | _ \ , , ,/ \
- // | |/ `.\ ,- , , ,/ ,/ \/
- / @| |@ / /&#39; \ \ , &gt; /| ,--.
- |\_/ \_/ / | | , ,/ \ ./&#39; __:..
- | __ __ | | | .--. , &gt; &gt; |-&#39; / `
- ,/| / &#39; \ | | | \ , | /
- / |&lt;--.__,-&gt;| | | . `. &gt; &gt; / (
- /_,&#39; \\ ^ / \ / / `. &gt;-- /^\ |
- \\___/ \ / / \__&#39; \ \ \/ \ |
- `. |/ , , /`\ \ )
- \ &#39; |/ , V \ / `-\
- OpenBSD Puffy ---&gt; `|/ &#39; V V \ \.&#39; \_
- &#39;`-. V V \./&#39;\
- `|/-. \ / \ /,---`\ kat
- / `._____V_____V&#39;
- &#39; &#39;
-</pre>
-<br />
-<span>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 :-)</span><br />
-<br />
-<span> 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!</span><br />
-<br />
-<a class='textlink' href='https://dtail.dev'>https://dtail.dev</a><br />
-<br />
-<span>I am using Rexify for my OpenBSD automation. Check out the following article covering my Rex setup in a little bit more detail:</span><br />
-<br />
-<a class='textlink' href='./2022-07-30-lets-encrypt-with-openbsd-and-rex.html'>Let&#39;s Encrypt with OpenBSD and Rex</a><br />
-<br />
-<span>I will also mention some relevant <span class='inlinecode'>Rexfile</span> snippets in this post!</span><br />
-<br />
-<h2 style='display: inline'>Compile it</h2><br />
-<br />
-<span>First of all, DTail needs to be downloaded and compiled. For that, <span class='inlinecode'>git</span>, <span class='inlinecode'>go</span>, and <span class='inlinecode'>gmake</span> are required:</span><br />
-<br />
-<pre>
-$ doas pkg_add git go gmake
-</pre>
-<br />
-<span>I am happy that the Go Programming Language is readily available in the OpenBSD packaging system. Once the dependencies got installed, clone DTail and compile it:</span><br />
-<br />
-<pre>
-$ mkdir git
-$ cd git
-$ git clone https://github.com/mimecast/dtail
-$ cd dtail
-$ gmake
-</pre>
-<br />
-<span>You can verify the version by running the following command:</span><br />
-<br />
-<pre>
-$ ./dtail --version
- DTail 4.1.0 Protocol 4.1 Have a lot of fun!
-$ file dtail
- dtail: ELF 64-bit LSB executable, x86-64, version 1
-</pre>
-<br />
-<span>Now, there isn&#39;t any need anymore to keep <span class='inlinecode'>git</span>, <span class='inlinecode'>go</span> and <span class='inlinecode'>gmake</span>, so they can be deinstalled now:</span><br />
-<br />
-<pre>
-$ doas pkg_delete git go gmake
-</pre>
-<br />
-<span>One day I shall create an official OpenBSD port for DTail.</span><br />
-<br />
-<h2 style='display: inline'>Install it</h2><br />
-<br />
-<span>Installing the binaries is now just a matter of copying them to <span class='inlinecode'>/usr/local/bin</span> as follows:</span><br />
-<br />
-<pre>
-$ for bin in dserver dcat dgrep dmap dtail dtailhealth; do
- doas cp -p $bin /usr/local/bin/$bin
- doas chown root:wheel /usr/local/bin/$bin
-done
-</pre>
-<br />
-<span>Also, we will be creating the <span class='inlinecode'>_dserver</span> service user:</span><br />
-<br />
-<pre>
-$ doas adduser -class nologin -group _dserver -batch _dserver
-$ doas usermod -d /var/run/dserver/ _dserver
-</pre>
-<br />
-<span>The OpenBSD init script is created from scratch (not part of the official DTail project). Run the following to install the bespoke script:</span><br />
-<br />
-<pre>
-$ cat &lt;&lt;&#39;END&#39; | doas tee /etc/rc.d/dserver
-#!/bin/ksh
-
-daemon="/usr/local/bin/dserver"
-daemon_flags="-cfg /etc/dserver/dtail.json"
-daemon_user="_dserver"
-
-. /etc/rc.d/rc.subr
-
-rc_reload=NO
-
-rc_pre() {
- install -d -o _dserver /var/log/dserver
- install -d -o _dserver /var/run/dserver/cache
-}
-
-rc_cmd $1 &amp;
-END
-$ doas chmod 755 /etc/rc.d/dserver
-</pre>
-<br />
-<h3 style='display: inline'>Rexification</h3><br />
-<br />
-<span>This is the task for setting it up via Rex. Note the <span class='inlinecode'>. . . .</span>, that&#39;s a placeholder which we will fill up more and more during this blog post:</span><br />
-<br />
-<pre>
-desc &#39;Setup DTail&#39;;
-task &#39;dtail&#39;, group =&gt; &#39;frontends&#39;,
- sub {
- my $restart = FALSE;
-
- file &#39;/etc/rc.d/dserver&#39;:
- content =&gt; template(&#39;./etc/rc.d/dserver.tpl&#39;),
- owner =&gt; &#39;root&#39;,
- group =&gt; &#39;wheel&#39;,
- mode =&gt; &#39;755&#39;,
- on_change =&gt; sub { $restart = TRUE };
-
- .
- .
- .
- .
-
- service &#39;dserver&#39; =&gt; &#39;restart&#39; if $restart;
- service &#39;dserver&#39;, ensure =&gt; &#39;started&#39;;
- };
-</pre>
-<br />
-<h2 style='display: inline'>Configure it</h2><br />
-<br />
-<span>Now, DTail is fully installed but still needs to be configured. Grab the default config file from GitHub ...</span><br />
-<br />
-<pre>
-$ doas mkdir /etc/dserver
-$ curl https://raw.githubusercontent.com/mimecast/dtail/master/examples/dtail.json.examples |
- doas tee /etc/dserver/dtail.json
-</pre>
-<br />
-<span>... and then edit it and adjust <span class='inlinecode'>LogDir</span> in the <span class='inlinecode'>Common</span> section to <span class='inlinecode'>/var/log/dserver</span>. The result will look like this:</span><br />
-<br />
-<pre>
- "Common": {
- "LogDir": "/var/log/dserver",
- "Logger": "Fout",
- "LogRotation": "Daily",
- "CacheDir": "cache",
- "SSHPort": 2222,
- "LogLevel": "Info"
- }
-</pre>
-<br />
-<h3 style='display: inline'>Rexification</h3><br />
-<br />
-<span>That&#39;s as simple as adding the following to the Rex task:</span><br />
-<br />
-<pre>
-file &#39;/etc/dserver&#39;,
- ensure =&gt; &#39;directory&#39;;
-
-file &#39;/etc/dserver/dtail.json&#39;,
- content =&gt; template(&#39;./etc/dserver/dtail.json.tpl&#39;),
- owner =&gt; &#39;root&#39;,
- group =&gt; &#39;wheel&#39;,
- mode =&gt; &#39;755&#39;,
- on_change =&gt; sub { $restart = TRUE };
-</pre>
-<br />
-<h2 style='display: inline'>Update the key cache for it</h2><br />
-<br />
-<span>DTail relies on SSH for secure authentication and communication. However, the system user <span class='inlinecode'>_dserver</span> has no permission to read the SSH public keys from the user&#39;s home directories, so the DTail server also checks for available public keys in an alternative path <span class='inlinecode'>/var/run/dserver/cache</span>. </span><br />
-<br />
-<span>The following script, populating the DTail server key cache, can be run periodically via <span class='inlinecode'>CRON</span>:</span><br />
-<br />
-<pre>
-$ cat &lt;&lt;&#39;END&#39; | doas tee /usr/local/bin/dserver-update-key-cache.sh
-#!/bin/ksh
-
-CACHEDIR=/var/run/dserver/cache
-DSERVER_USER=_dserver
-DSERVER_GROUP=_dserver
-
-echo &#39;Updating SSH key cache&#39;
-
-ls /home/ | while read remoteuser; do
- keysfile=/home/$remoteuser/.ssh/authorized_keys
-
- if [ -f $keysfile ]; then
- cachefile=$CACHEDIR/$remoteuser.authorized_keys
- echo "Caching $keysfile -&gt; $cachefile"
-
- cp $keysfile $cachefile
- chown $DSERVER_USER:$DSERVER_GROUP $cachefile
- chmod 600 $cachefile
- fi
-done
-
-# Cleanup obsolete public SSH keys
-find $CACHEDIR -name \*.authorized_keys -type f |
-while read cachefile; do
- remoteuser=$(basename $cachefile | cut -d. -f1)
- keysfile=/home/$remoteuser/.ssh/authorized_keys
-
- if [ ! -f $keysfile ]; then
- echo &#39;Deleting obsolete cache file $cachefile&#39;
- rm $cachefile
- fi
-done
-
-echo &#39;All set...&#39;
-END
-$ doas chmod 500 /usr/local/bin/dserver-update-key-cache.sh
-</pre>
-<br />
-<span>Note that the script above is a slight variation of the official DTail script. The official DTail one is a <span class='inlinecode'>bash</span> script, but on OpenBSD, there&#39;s <span class='inlinecode'>ksh</span>. I run it once daily by adding it to the <span class='inlinecode'>daily.local</span>:</span><br />
-<br />
-<pre>
-$ echo /usr/local/bin/dserver-update-key-cache.sh | doas tee -a /etc/daily.local
-/usr/local/bin/dserver-update-key-cache.sh
-</pre>
-<br />
-<h3 style='display: inline'>Rexification</h3><br />
-<br />
-<span>That&#39;s done by adding ...</span><br />
-<br />
-<pre>
-file &#39;/usr/local/bin/dserver-update-key-cache.sh&#39;,
- content =&gt; template(&#39;./scripts/dserver-update-key-cache.sh.tpl&#39;),
- owner =&gt; &#39;root&#39;,
- group =&gt; &#39;wheel&#39;,
- mode =&gt; &#39;500&#39;;
-
-append_if_no_such_line &#39;/etc/daily.local&#39;, &#39;/usr/local/bin/dserver-update-key-cache.sh&#39;;
-</pre>
-<br />
-<span>... to the Rex task!</span><br />
-<br />
-<h2 style='display: inline'>Start it</h2><br />
-<br />
-<span>Now, it&#39;s time to enable and start the DTail server:</span><br />
-<br />
-<pre>
-$ sudo rcctl enable dserver
-$ sudo rcctl start dserver
-$ tail -f /var/log/dserver/*.log
-INFO|1022-090634|Starting scheduled job runner after 2s
-INFO|1022-090634|Starting continuous job runner after 2s
-INFO|1022-090644|24204|stats.go:53|2|11|7|||MAPREDUCE:STATS|currentConnections=0|lifetimeConnections=0
-INFO|1022-090654|24204|stats.go:53|2|11|7|||MAPREDUCE:STATS|currentConnections=0|lifetimeConnections=0
-INFO|1022-090719|Starting server|DTail 4.1.0 Protocol 4.1 Have a lot of fun!
-INFO|1022-090719|Generating private server RSA host key
-INFO|1022-090719|Starting server
-INFO|1022-090719|Binding server|0.0.0.0:2222
-INFO|1022-090719|Starting scheduled job runner after 2s
-INFO|1022-090719|Starting continuous job runner after 2s
-INFO|1022-090729|86050|stats.go:53|2|11|7|||MAPREDUCE:STATS|currentConnections=0|lifetimeConnections=0
-INFO|1022-090739|86050|stats.go:53|2|11|7|||MAPREDUCE:STATS|currentConnections=0|lifetimeConnect
-.
-.
-.
-Ctr+C
-</pre>
-<br />
-<span>As we don&#39;t want to wait until tomorrow, let&#39;s populate the key cache manually:</span><br />
-<br />
-<pre>
-$ doas /usr/local/bin/dserver-update-key-cache.sh
-Updating SSH key cache
-Caching /home/_dserver/.ssh/authorized_keys -&gt; /var/cache/dserver/_dserver.authorized_keys
-Caching /home/admin/.ssh/authorized_keys -&gt; /var/cache/dserver/admin.authorized_keys
-Caching /home/failunderd/.ssh/authorized_keys -&gt; /var/cache/dserver/failunderd.authorized_keys
-Caching /home/git/.ssh/authorized_keys -&gt; /var/cache/dserver/git.authorized_keys
-Caching /home/paul/.ssh/authorized_keys -&gt; /var/cache/dserver/paul.authorized_keys
-Caching /home/rex/.ssh/authorized_keys -&gt; /var/cache/dserver/rex.authorized_keys
-All set...
-</pre>
-<br />
-<h2 style='display: inline'>Use it</h2><br />
-<br />
-<span>The DTail server is now ready to serve connections. You can use any DTail commands, such as <span class='inlinecode'>dtail</span>, <span class='inlinecode'>dgrep</span>, <span class='inlinecode'>dmap</span>, <span class='inlinecode'>dcat</span>, <span class='inlinecode'>dtailhealth</span>, to do so. Checkout out all the usage examples on the official DTail page.</span><br />
-<br />
-<span>I have installed DTail server this way on my personal OpenBSD frontends <span class='inlinecode'>blowfish</span>, and <span class='inlinecode'>fishfinger</span>, and the following command connects as user <span class='inlinecode'>rex</span> to both machines and greps the file <span class='inlinecode'>/etc/fstab</span> for the string <span class='inlinecode'>local</span>:</span><br />
-<br />
-<pre>
-❯ ./dgrep -user rex -servers blowfish.buetow.org,fishfinger.buetow.org --regex local /etc/fstab
-CLIENT|earth|WARN|Encountered unknown host|{blowfish.buetow.org:2222 0xc0000a00f0 0xc0000a61e0 [blowfish.buetow.org]:2222 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9ZnF/LAk14SgqCzk38yENVTNfqibcluMTuKx1u53cKSp2xwHWzy0Ni5smFPpJDIQQljQEJl14ZdXvhhjp1kKHxJ79ubqRtIXBlC0PhlnP8Kd+mVLLHYpH9VO4rnaSfHE1kBjWkI7U6lLc6ks4flgAgGTS5Bb7pLAjwdWg794GWcnRh6kSUEQd3SftANqQLgCunDcP2Vc4KR9R78zBmEzXH/OPzl/ANgNA6wWO2OoKKy2VrjwVAab6FW15h3Lr6rYIw3KztpG+UMmEj5ReexIjXi/jUptdnUFWspvAmzIl6kwzzF8ExVyT9D75JRuHvmxXKKjyJRxqb8UnSh2JD4JN [23.88.35.144]:2222 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9ZnF/LAk14SgqCzk38yENVTNfqibcluMTuKx1u53cKSp2xwHWzy0Ni5smFPpJDIQQljQEJl14ZdXvhhjp1kKHxJ79ubqRtIXBlC0PhlnP8Kd+mVLLHYpH9VO4rnaSfHE1kBjWkI7U6lLc6ks4flgAgGTS5Bb7pLAjwdWg794GWcnRh6kSUEQd3SftANqQLgCunDcP2Vc4KR9R78zBmEzXH/OPzl/ANgNA6wWO2OoKKy2VrjwVAab6FW15h3Lr6rYIw3KztpG+UMmEj5ReexIjXi/jUptdnUFWspvAmzIl6kwzzF8ExVyT9D75JRuHvmxXKKjyJRxqb8UnSh2JD4JN 0xc0000a2180}
-CLIENT|earth|WARN|Encountered unknown host|{fishfinger.buetow.org:2222 0xc0000a0150 0xc000460110 [fishfinger.buetow.org]:2222 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDNiikdL7+tWSN0rCaw1tOd9aQgeUFgb830V9ejkyJ5h93PKLCWZSMMCtiabc1aUeUZR//rZjcPHFLuLq/YC+Y3naYtGd6j8qVrcfG8jy3gCbs4tV9SZ9qd5E24mtYqYdGlee6JN6kEWhJxFkEwPfNlG+YAr3KC8lvEAE2JdWvaZavqsqMvHZtAX3b25WCBf2HGkyLZ+d9cnimRUOt+/+353BQFCEct/2mhMVlkr4I23CY6Tsufx0vtxx25nbFdZias6wmhxaE9p3LiWXygPWGU5iZ4RSQSImQz4zyOc9rnJeP1rwGk0OWDJhdKNXuf0kIPdzMfwxv2otgY32/DJj6L [46.23.94.99]:2222 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDNiikdL7+tWSN0rCaw1tOd9aQgeUFgb830V9ejkyJ5h93PKLCWZSMMCtiabc1aUeUZR//rZjcPHFLuLq/YC+Y3naYtGd6j8qVrcfG8jy3gCbs4tV9SZ9qd5E24mtYqYdGlee6JN6kEWhJxFkEwPfNlG+YAr3KC8lvEAE2JdWvaZavqsqMvHZtAX3b25WCBf2HGkyLZ+d9cnimRUOt+/+353BQFCEct/2mhMVlkr4I23CY6Tsufx0vtxx25nbFdZias6wmhxaE9p3LiWXygPWGU5iZ4RSQSImQz4zyOc9rnJeP1rwGk0OWDJhdKNXuf0kIPdzMfwxv2otgY32/DJj6L 0xc0000a2240}
-Encountered 2 unknown hosts: &#39;blowfish.buetow.org:2222,fishfinger.buetow.org:2222&#39;
-Do you want to trust these hosts?? (y=yes,a=all,n=no,d=details): a
-CLIENT|earth|INFO|STATS:STATS|cgocalls=11|cpu=8|connected=2|servers=2|connected%=100|new=2|throttle=0|goroutines=19
-CLIENT|earth|INFO|Added hosts to known hosts file|/home/paul/.ssh/known_hosts
-REMOTE|blowfish|100|7|fstab|31bfd9d9a6788844.h /usr/local ffs rw,wxallowed,nodev 1 2
-REMOTE|fishfinger|100|7|fstab|093f510ec5c0f512.h /usr/local ffs rw,wxallowed,nodev 1 2
-</pre>
-<br />
-<span>Running it the second time, and given that you trusted the keys the first time, it won&#39;t prompt you for the host keys anymore:</span><br />
-<br />
-<pre>
-❯ ./dgrep -user rex -servers blowfish.buetow.org,fishfinger.buetow.org --regex local /etc/fstab
-REMOTE|blowfish|100|7|fstab|31bfd9d9a6788844.h /usr/local ffs rw,wxallowed,nodev 1 2
-REMOTE|fishfinger|100|7|fstab|093f510ec5c0f512.h /usr/local ffs rw,wxallowed,nodev 1 2
-</pre>
-<br />
-<h2 style='display: inline'>Conclusions</h2><br />
-<br />
-<span>It&#39;s a bit of manual work, but it&#39;s ok on this small scale! I shall invest time in creating an official OpenBSD port, though. That would render most of the manual steps obsolete, as outlined in this post!</span><br />
-<br />
-<span>Check out the following for more information:</span><br />
-<br />
-<a class='textlink' href='https://dtail.dev'>https://dtail.dev</a><br />
-<a class='textlink' href='https://github.com/mimecast/dtail'>https://github.com/mimecast/dtail</a><br />
-<a class='textlink' href='https://www.rexify.org'>https://www.rexify.org</a><br />
-<br />
-<span>Other related posts are:</span><br />
-<br />
-<a class='textlink' href='./2021-04-22-dtail-the-distributed-log-tail-program.html'>2021-04-22 DTail - The distributed log tail program</a><br />
-<a class='textlink' href='./2022-03-06-the-release-of-dtail-4.0.0.html'>2022-03-06 The release of DTail 4.0.0</a><br />
-<a class='textlink' href='./2022-10-30-installing-dtail-on-openbsd.html'>2022-10-30 Installing DTail on OpenBSD (You are currently reading this)</a><br />
-<br />
-<span>E-Mail your comments to paul at buetow.org :-)</span><br />
-<br />
-<a class='textlink' href='../'>Back to the main site</a><br />
- </div>
- </content>
- </entry>
- <entry>
- <title>After a bad night's sleep</title>
- <link href="gemini://foo.zone/gemfeed/2022-09-30-after-a-bad-nights-sleep.gmi" />
- <id>gemini://foo.zone/gemfeed/2022-09-30-after-a-bad-nights-sleep.gmi</id>
- <updated>2022-09-30T09:53:23+03:00</updated>
- <author>
- <name>Paul Buetow aka snonux</name>
- <email>paul@dev.buetow.org</email>
- </author>
- <summary>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.</summary>
- <content type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <h1 style='display: inline'>After a bad night&#39;s sleep</h1><br />
-<br />
-<span class='quote'>Published at 2022-09-30T09:53:23+03:00; Updated at 2022-10-12</span><br />
-<br />
-<pre>
- z
- z
- Z
- .--. Z Z
- / _(c\ .-. __
- | / / &#39;-; \&#39;-&#39;` `\______
- \_\/&#39;/ __/ ) / ) | \--,
- | \`""`__-/ .&#39;--/ /--------\ \
- \\` ///-\/ / /---;-. &#39;-&#39;
-jgs (________\ \
- &#39;-&#39;
-</pre>
-<br />
-<span>Everyone has it once in a while: A bad night&#39;s sleep. Here I attempt to list valuable tips on how to deal with it.</span><br />
-<br />
-<h2 style='display: inline'>Don&#39;t take the day off.</h2><br />
-<br />
-<span>Don&#39;t take a day off after not sleeping enough the previous night. That would be wasting the holiday allowance. It wouldn&#39;t be possible to enjoy my free time anyway, so why not just work? There&#39;s still a way for an IT Engineer to be productive (sometimes even more) with half or less of the concentration power available!</span><br />
-<br />
-<h2 style='display: inline'>Start work early</h2><br />
-<br />
-<span>Probably I am already awake early and am unable to fall asleep again. My strategy here is to "attack" the day: Start work early and finish early. The early bird will also encounter fewer distractions from colleagues.</span><br />
-<br />
-<h2 style='display: inline'>Sweat the small stuff</h2><br />
-<br />
-<span>There&#39;s never a shortage of small items to hook off my list. Most of these items don&#39;t require my full concentration power, and I will be happy to get them off my list so that the next day, after a good night&#39;s sleep, I can immerse myself again in focused, deep work with all concentration powers at hand.</span><br />
-<br />
-<span>Examples of "small work items" are:</span><br />
-<br />
-<ul>
-<li>Tidying up the workspace.</li>
-<li>Installing pending computer software updates.</li>
-<li>Going through the work backlog: Create new tickets, close obsolete ones, and roughly pre-plan upcoming work.</li>
-<li>Finishing off the easy tickets from the current sprint.</li>
-<li>Going through any tedious paperwork.</li>
-<li>Catch up with the journal and mark off all trivial action items.</li>
-</ul><br />
-<h2 style='display: inline'>Enter the flow state</h2><br />
-<br />
-<span>I find it easy to enter the "flow state" after a bad night&#39;s sleep. All I need to do is to put on some ambient music (preferably instrumental chill house) and start to work on a not-too-difficult ticket.</span><br />
-<br />
-<span>Usually, the "flow state" is associated with deep-focused work, but deep-focused work isn&#39;t easily possible under sleep deprivation. It&#39;s still possible to be in the flow by working on more manageable tasks and leaving the difficult ones for the next day.</span><br />
-<br />
-<h2 style='display: inline'>Reschedule meetings</h2><br />
-<br />
-<span>I find engaging in discussions and demanding meetings challenging after a lousy night&#39;s sleep. I still attend the sessions I am invited to as "only" a participant, but I prefer to reschedule all meetings I am the primary driver of.</span><br />
-<br />
-<span>This, unfortunately, also includes interviews. Interviews require full concentration power. So for interviews, I would find a colleague to step in for me or ask to reschedule the interview altogether. Everything else wouldn&#39;t make it justice and would waste everyone&#39;s time!</span><br />
-<br />
-<h2 style='display: inline'>Invent</h2><br />
-<br />
-<span>The mind works differently under sleep deprivation: It&#39;s easier to invent new stuff as it&#39;s easier to have a look at things from different perspectives. Until an hour ago, I didn&#39;t know yet what I would be blogging about for this month, and then I just started writing this, and it took me only half an hour to write the first draft of this blog post!</span><br />
-<br />
-<h2 style='display: inline'>Fast</h2><br />
-<br />
-<span>I don&#39;t eat breakfast, and I don&#39;t eat lunch on these days. I only have dinner. Not eating means my mind doesn&#39;t get foggy, and I keep up the work momentum. This is called intermittent fasting, which not only generally helps to keep the weight under control and boosts the concentration power. Furthermore, intermittent fasting is healthy. You should include it in your routine, even after a good night&#39;s sleep.</span><br />
-<br />
-<h2 style='display: inline'>Stretch</h2><br />
-<br />
-<span>I won&#39;t have enough energy for strenuous physical exercise on those days, but a 30 to a 60-minute stretching session can make the day. Stretching will even hurt less under sleep deprivation! The stretching could also be substituted with a light Yoga session.</span><br />
-<br />
-<h2 style='display: inline'>Walk</h2><br />
-<br />
-<span>Walking is healthy, and the time can be used to listen to interesting podcasts. The available concentration power might not be enough for more sophisticated audio literature. I will have enough energy for one or two daily walks (~10k steps for the day in total). Sometimes, I listen to music during walks. I also try to catch the bright sunlight.</span><br />
-<br />
-<h2 style='display: inline'>Red Bull</h2><br />
-<br />
-<span>I don&#39;t think that Red Bull is a healthy drink. But once in a while, a can in the early afternoon brings wonders, and productivity will skyrocket. Other than Red Bull, drink a lot of water throughout the day. Don&#39;t forget to drink the sugar-free version; otherwise, your intermittent fast will be broken.</span><br />
-<br />
-<h2 style='display: inline'>Power nap</h2><br />
-<br />
-<span>I don&#39;t know how to "enforce" a nap, but sometimes I manage to power nap, and it helps wonders. A 30-minute nap sometimes brings me back to normal. If you don&#39;t tend to fast as you are too hungry, it helps to try to nap approximately 30 minutes after eating something.</span><br />
-<br />
-<h2 style='display: inline'>Don&#39;t take anything personally.</h2><br />
-<br />
-<span>It&#39;s much more challenging to keep the mind "under control" in this state. Every annoyance can potentially upset, which could reflect on the work colleagues. It is wise to attempt to go with a positive attitude into the day, always smile and be polite to the family and colleagues at work. Don&#39;t let anything drop out to the people next; they don&#39;t deserve it as they didn&#39;t do anything wrong! Also, remember, it can&#39;t be controlled at all. It&#39;s time to let go of the annoyances for the day.</span><br />
-<br />
-<h2 style='display: inline'>Meditate</h2><br />
-<br />
-<span>To keep the good vibe, it helps to meditate for 10 minutes. Meditation must nothing be fancy. It can be just lying on the sofa and observing your thoughts as they come and go. Don&#39;t judge your thoughts, as that could put you in a negative mood. It&#39;s not necessary to sit in an uncomfortable Yoga pose, and it is not required to chant "Ohhmmmmm".</span><br />
-<br />
-<h2 style='display: inline'>Write things down</h2><br />
-<br />
-<span>Sometimes something requiring more concentration power demands time. This is where it helps to write a note in a journal and return to it another day. This doesn&#39;t mean slacking off but managing the rarely available concentration power for the day. I might repeat myself: Today, sweat all the small stuff. Tomorrow, do the deep-focused work on that crucial project again.</span><br />
-<br />
-<span>It&#39;s easier to forget things on those days, so everything should be written down so that it can be worked off later. Things written down will not be overlooked!</span><br />
-<br />
-<h2 style='display: inline'>Social media</h2><br />
-<br />
-<span>I wouldn&#39;t say I like checking social media, as it can consume a lot of time and can become addictive. But once in a while, I want to catch up with my "networks". After a bad night&#39;s sleep, it&#39;s the perfect time to check your social media. Once done, you don&#39;t have to do it anymore for the next couple of days!</span><br />
-<br />
-<span>E-Mail your comments to paul at buetow.org :-)</span><br />
-<br />
-<a class='textlink' href='../'>Back to the main site</a><br />
- </div>
- </content>
- </entry>
- <entry>
- <title>Gemtexter 1.1.0 - Let's Gemtext again</title>
- <link href="gemini://foo.zone/gemfeed/2022-08-27-gemtexter-1.1.0-lets-gemtext-again.gmi" />
- <id>gemini://foo.zone/gemfeed/2022-08-27-gemtexter-1.1.0-lets-gemtext-again.gmi</id>
- <updated>2022-08-27T18:25:57+01:00</updated>
- <author>
- <name>Paul Buetow aka snonux</name>
- <email>paul@dev.buetow.org</email>
- </author>
- <summary>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.</summary>
- <content type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <h1 style='display: inline'>Gemtexter 1.1.0 - Let&#39;s Gemtext again</h1><br />
-<br />
-<span class='quote'>Published at 2022-08-27T18:25:57+01:00</span><br />
-<br />
-<pre>
--=[ typewriter ]=- 1/98
-
- .-------.
- _|~~ ~~ |_
- =(_|_______|_)=
- |:::::::::|
- |:::::::[]|
- |o=======.|
- jgs `"""""""""`
-</pre>
-<br />
-<span>I proudly announce that I&#39;ve released Gemtexter version <span class='inlinecode'>1.1.0</span>. What is Gemtexter? It&#39;s my minimalist static site generator for Gemini Gemtext, HTML and Markdown written in GNU Bash.</span><br />
-<br />
-<a class='textlink' href='https://codeberg.org/snonux/gemtexter'>https://codeberg.org/snonux/gemtexter</a><br />
-<br />
-<span>It has been around a year since I released the first version <span class='inlinecode'>1.0.0</span>. Although, there aren&#39;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.</span><br />
-<br />
-<h2 style='display: inline'>What&#39;s new?</h2><br />
-<br />
-<h3 style='display: inline'>Automatic check for GNU version requirements</h3><br />
-<br />
-<span>Gemtexter relies on the GNU versions of the tools <span class='inlinecode'>grep</span>, <span class='inlinecode'>sed</span> and <span class='inlinecode'>date</span> and it also requires the Bash shell in version 5 at least. That&#39;s now done in the <span class='inlinecode'>check_dependencies()</span> function:</span><br />
-<br />
-<!-- Generator: GNU source-highlight 3.1.9
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><b><font color="#000000">check_dependencies ()</font></b> {
- <i><font color="#9A1900"># At least, Bash 5 is required</font></i>
- <b><font color="#0000FF">local</font></b> -i <font color="#009900">required_version</font><font color="#990000">=</font><font color="#993399">5</font>
- <font color="#009900">IFS</font><font color="#990000">=.</font> <b><font color="#0000FF">read</font></b> -ra version <font color="#990000">&lt;&lt;&lt;</font> <font color="#FF0000">"$BASH_VERSION"</font>
- <b><font color="#0000FF">if</font></b> <font color="#990000">[</font> <font color="#FF0000">"${version[0]}"</font> -lt <font color="#009900">$required_version</font> <font color="#990000">];</font> <b><font color="#0000FF">then</font></b>
- log ERROR <font color="#FF0000">"ERROR, </font><font color="#CC33CC">\"</font><font color="#FF0000">bash</font><font color="#CC33CC">\"</font><font color="#FF0000"> must be at least at major version $required_version!"</font>
- <b><font color="#0000FF">exit</font></b> <font color="#993399">2</font>
- <b><font color="#0000FF">fi</font></b>
-
- <i><font color="#9A1900"># These must be the GNU versions of the commands</font></i>
- <b><font color="#0000FF">for</font></b> tool <b><font color="#0000FF">in</font></b> <font color="#009900">$DATE</font> <font color="#009900">$SED</font> <font color="#009900">$GREP</font><font color="#990000">;</font> <b><font color="#0000FF">do</font></b>
- <b><font color="#0000FF">if</font></b> <font color="#990000">!</font> <font color="#009900">$tool</font> --version <font color="#990000">|</font> grep -q GNU<font color="#990000">;</font> <b><font color="#0000FF">then</font></b>
- log ERROR <font color="#FF0000">"ERROR, </font><font color="#CC33CC">\"</font><font color="#FF0000">$tool</font><font color="#CC33CC">\"</font><font color="#FF0000"> command is not the GNU version, please install!"</font>
- <b><font color="#0000FF">exit</font></b> <font color="#993399">2</font>
- <b><font color="#0000FF">fi</font></b>
- <b><font color="#0000FF">done</font></b>
-}
-</pre>
-<br />
-<span>Especially macOS users didn&#39;t read the <span class='inlinecode'>README</span> carefully enough to install GNU Grep, GNU Sed and GNU Date before using Gemtexter.</span><br />
-<br />
-<h3 style='display: inline'>Backticks now produce <span class='inlinecode'>inline code blocks</span> in the HTML output</h3><br />
-<br />
-<span>The Gemtext format doesn&#39;t support inline code blocks, but Gemtexter now produces <span class='inlinecode'>inline code blocks</span> (means, small code fragments can be placed in the middle of a paragraph) in the HTML output when the code block is enclosed with Backticks. There were no adjustments required for the Markdown output format, because Markdown supports it already out of the box.</span><br />
-<br />
-<h3 style='display: inline'>Cache for Atom feed generation</h3><br />
-<br />
-<span>The Bash is not the most performant language. Gemtexter already takes a couple of seconds only to generate the Atom feed for around two hand full of articles on my slightly underpowered Surface Go 2 Linux tablet. Therefore, I introduced a cache, so that subsequent Atom feed generation runs finish much quicker. The cache uses a checksum of the Gemtext <span class='inlinecode'>.gmi</span> file to decide whether anything of the content has changed or not.</span><br />
-<br />
-<h3 style='display: inline'>Input filter support</h3><br />
-<br />
-<span>Once your capsule reaches a certain size, it can become annoying to re-generate everything if you only want to preview the HTML or Markdown output of one single content file. The following will add a filter to only generate the files matching a regular expression:</span><br />
-<br />
-<!-- Generator: GNU source-highlight 3.1.9
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><font color="#990000">.</font>/gemtexter --generate <font color="#FF0000">'.*hello.*'</font>
-</pre>
-<br />
-<h3 style='display: inline'>Revamped <span class='inlinecode'>git</span> support</h3><br />
-<br />
-<span>The Git support has been completely rewritten. It&#39;s now more reliable and faster too. Have a look at the <span class='inlinecode'>README</span> for more information.</span><br />
-<br />
-<h3 style='display: inline'>Addition of <span class='inlinecode'>htmlextras</span> and web font support</h3><br />
-<br />
-<span>The <span class='inlinecode'>htmlextras</span> folder now contains all extra files required for the HTML output format such as cascading style sheet (CSS) files and web fonts.</span><br />
-<br />
-<h3 style='display: inline'>Sub-section support</h3><br />
-<br />
-<span>It&#39;s now possible to define sub-sections within a Gemtexter capsule. For the HTML output, each sub-section can use its own CSS and web font definitions. E.g.:</span><br />
-<br />
-<a class='textlink' href='https://foo.zone'>The foo.zone main site</a><br />
-<a class='textlink' href='https://foo.zone/notes'>The notes sub-section (with different fonts)</a><br />
-<br />
-<h3 style='display: inline'>More</h3><br />
-<br />
-<span>Additionally, there were a couple of bug fixes, refactorings and overall improvements in the documentation made. </span><br />
-<br />
-<span>Overall I think it&#39;s a pretty solid <span class='inlinecode'>1.1.0</span> release without anything groundbreaking (therefore no major version jump). But I am happy about it.</span><br />
-<br />
-<span>Other related posts are:</span><br />
-<br />
-<a class='textlink' href='./2021-04-24-welcome-to-the-geminispace.html'>2021-04-24 Welcome to the Geminispace</a><br />
-<a class='textlink' href='./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.html'>2021-06-05 Gemtexter - One Bash script to rule it all</a><br />
-<a class='textlink' href='./2022-08-27-gemtexter-1.1.0-lets-gemtext-again.html'>2022-08-27 Gemtexter 1.1.0 - Let&#39;s Gemtext again (You are currently reading this)</a><br />
-<a class='textlink' href='./2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.html'>2023-03-25 Gemtexter 2.0.0 - Let&#39;s Gemtext again²</a><br />
-<a class='textlink' href='./2023-07-21-gemtexter-2.1.0-lets-gemtext-again-3.html'>2023-07-21 Gemtexter 2.1.0 - Let&#39;s Gemtext again³</a><br />
-<br />
-<span>E-Mail your comments to paul at buetow.org :-)</span><br />
-<br />
-<a class='textlink' href='../'>Back to the main site</a><br />
- </div>
- </content>
- </entry>
- <entry>
- <title>Let's Encrypt with OpenBSD and Rex</title>
- <link href="gemini://foo.zone/gemfeed/2022-07-30-lets-encrypt-with-openbsd-and-rex.gmi" />
- <id>gemini://foo.zone/gemfeed/2022-07-30-lets-encrypt-with-openbsd-and-rex.gmi</id>
- <updated>2022-07-30T12:14:31+01:00</updated>
- <author>
- <name>Paul Buetow aka snonux</name>
- <email>paul@dev.buetow.org</email>
- </author>
- <summary>I was amazed at how easy it is to automatically generate and update Let's Encrypt certificates with OpenBSD.</summary>
- <content type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <h1 style='display: inline'>Let&#39;s Encrypt with OpenBSD and Rex</h1><br />
-<br />
-<span class='quote'>Published at 2022-07-30T12:14:31+01:00</span><br />
-<br />
-<pre>
- / _ \
- The Hebern Machine \ ." ". /
- ___ / \
- .."" "".. | O |
- / \ | |
- / \ | |
- ---------------------------------
- _/ o (O) o _ |
- _/ ." ". |
- I/ _________________/ \ |
- _/I ." | |
- ===== / I / / |
- ===== | | | \ | _________________." |
-===== | | | | | / \ / _|_|__|_|_ __ |
- | | | | | | | \ "._." / o o \ ." ". |
- | --| --| -| / \ _/ / \ |
- \____\____\__| \ ______ | / | | |
- -------- --- / | | |
- ( ) (O) / \ / |
- ----------------------- ".__." |
- _|__________________________________________|_
- / \
- /________________________________________________\
- ASCII Art by John Savard
-</pre>
-<br />
-<span>I was amazed at how easy it is to automatically generate and update Let&#39;s Encrypt certificates with OpenBSD.</span><br />
-<br />
-<h2 style='display: inline'>What&#39;s Let&#39;s Encrypt?</h2><br />
-<br />
-<span class='quote'>Let&#39;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&#39;s largest certificate authority, used by more than 265 million websites, with the goal of all websites being secure and using HTTPS.</span><br />
-<br />
-<a class='textlink' href='https://en.wikipedia.org/wiki/Let&#39;s_Encrypt'>Source: Wikipedia</a><br />
-<br />
-<span>In short, it gives away TLS certificates for your website - for free! The catch is, that the certificates are only valid for three months. So it is better to automate certificate generation and renewals.</span><br />
-<br />
-<h2 style='display: inline'>Meet <span class='inlinecode'>acme-client</span></h2><br />
-<br />
-<span><span class='inlinecode'>acme-client</span> is the default Automatic Certifcate Management Environment (ACME) client on OpenBSD and part of the OpenBSD base system. </span><br />
-<br />
-<span>When invoked, the client first checks whether certificates actually require to be generated.</span><br />
-<br />
-<ul>
-<li>It first checks whether a certificate already exists; if not, it will attempt to generate a new one.</li>
-<li>If the certificate already exists but expires within the next 30 days, it will renew it.</li>
-<li>Otherwise, <span class='inlinecode'>acme-client</span> won&#39;t do anything.</li>
-</ul><br />
-<span>Oversimplified, the following steps are undertaken by <span class='inlinecode'>acme-client</span> for generating a new certificate:</span><br />
-<br />
-<ul>
-<li>Reading its config file <span class='inlinecode'>/etc/acme-client.conf</span> for a list of hosts (and their alternative names) to generate certificates. So it means you can also have certificates for arbitrary subdomains!</li>
-<li>Automatic generation of the private certificate part (the certificate key) and the certificate signing request (CSR) to <span class='inlinecode'>/etc/ssl/...</span>.</li>
-<li>Requesting Let&#39;s Encrypt to sign the certificate. This also includes providing a set of temporary files requested by Let&#39;s Encrypt in the next step for verification.</li>
-<li>Let&#39;s Encrypt then will contact the hostname for the certificate through a particular URL (e.g. <span class='inlinecode'>http://foo.zone/.well-known/acme-challenge/...</span>) to verify that the requester is the valid owner of the host.</li>
-<li>Let&#39;s Encrypt generates a certificate, which then is downloaded to <span class='inlinecode'>/etc/ssl/...</span>.</li>
-</ul><br />
-<h2 style='display: inline'>Configuration</h2><br />
-<br />
-<span>There is some (but easy) configuration required to make that all work on OpenBSD.</span><br />
-<br />
-<h3 style='display: inline'>acme-client.conf</h3><br />
-<br />
-<span>This is how my <span class='inlinecode'>/etc/acme-client.conf</span> looks like (I copied a template from <span class='inlinecode'>/etc/examples/acme-client.conf</span> to <span class='inlinecode'>/etc/acme-client.conf</span> and added my domains to the bottom:</span><br />
-<br />
-<pre>
-#
-# $OpenBSD: acme-client.conf,v 1.4 2020/09/17 09:13:06 florian Exp $
-#
-authority letsencrypt {
- api url "https://acme-v02.api.letsencrypt.org/directory"
- account key "/etc/acme/letsencrypt-privkey.pem"
-}
-
-authority letsencrypt-staging {
- api url "https://acme-staging-v02.api.letsencrypt.org/directory"
- account key "/etc/acme/letsencrypt-staging-privkey.pem"
-}
-
-authority buypass {
- api url "https://api.buypass.com/acme/directory"
- account key "/etc/acme/buypass-privkey.pem"
- contact "mailto:me@example.com"
-}
-
-authority buypass-test {
- api url "https://api.test4.buypass.no/acme/directory"
- account key "/etc/acme/buypass-test-privkey.pem"
- contact "mailto:me@example.com"
-}
-
-domain buetow.org {
- alternative names { www.buetow.org paul.buetow.org }
- domain key "/etc/ssl/private/buetow.org.key"
- domain full chain certificate "/etc/ssl/buetow.org.fullchain.pem"
- sign with letsencrypt
-}
-
-domain dtail.dev {
- alternative names { www.dtail.dev }
- domain key "/etc/ssl/private/dtail.dev.key"
- domain full chain certificate "/etc/ssl/dtail.dev.fullchain.pem"
- sign with letsencrypt
-}
-
-domain foo.zone {
- alternative names { www.foo.zone }
- domain key "/etc/ssl/private/foo.zone.key"
- domain full chain certificate "/etc/ssl/foo.zone.fullchain.pem"
- sign with letsencrypt
-}
-
-domain irregular.ninja {
- alternative names { www.irregular.ninja }
- domain key "/etc/ssl/private/irregular.ninja.key"
- domain full chain certificate "/etc/ssl/irregular.ninja.fullchain.pem"
- sign with letsencrypt
-}
-
-domain snonux.land {
- alternative names { www.snonux.land }
- domain key "/etc/ssl/private/snonux.land.key"
- domain full chain certificate "/etc/ssl/snonux.land.fullchain.pem"
- sign with letsencrypt
-}
-</pre>
-<br />
-<h3 style='display: inline'>httpd.conf</h3><br />
-<br />
-<span>For ACME to work, you will need to configure the HTTP daemon so that the "special" ACME requests from Let&#39;s Encrypt are served correctly. I am using the standard OpenBSD <span class='inlinecode'>httpd</span> here. These are the snippets I use for the <span class='inlinecode'>foo.zone</span> host in <span class='inlinecode'>/etc/httpd.conf</span> (of course, you need a similar setup for all other hosts as well):</span><br />
-<br />
-<pre>
-server "foo.zone" {
- listen on * port 80
- location "/.well-known/acme-challenge/*" {
- root "/acme"
- request strip 2
- }
- location * {
- block return 302 "https://$HTTP_HOST$REQUEST_URI"
- }
-}
-
-server "foo.zone" {
- listen on * tls port 443
- tls {
- certificate "/etc/ssl/foo.zone.fullchain.pem"
- key "/etc/ssl/private/foo.zone.key"
- }
- location * {
- root "/htdocs/gemtexter/foo.zone"
- directory auto index
- }
-}
-</pre>
-<br />
-<span>As you see, plain HTTP only serves the ACME challenge path. Otherwise, it redirects the requests to TLS. The TLS section then attempts to use the Let&#39;s Encrypt certificates.</span><br />
-<br />
-<span>It is worth noticing that <span class='inlinecode'>httpd</span> will start without the certificates being present. This will cause a certificate error when you try to reach the HTTPS endpoint, but it helps to bootstrap Let&#39;s Encrypt. As you saw in the config snippet above, Let&#39;s Encrypt only requests the plain HTTP endpoint for the verification process, so HTTPS doesn&#39;t need to be operational yet at this stage. But once the certificates are generated, you will have to reload or restart <span class='inlinecode'>httpd</span> to use any new certificate.</span><br />
-<br />
-<h3 style='display: inline'>CRON job</h3><br />
-<br />
-<span>You could now run <span class='inlinecode'>doas acme-client foo.zone</span> to generate the certificate or to renew it. Or you could automate it with CRON.</span><br />
-<br />
-<span>I have created a script <span class='inlinecode'>/usr/local/bin/acme.sh</span> for that for all of my domains:</span><br />
-<br />
-<pre>
-#!/bin/sh
-
-function handle_cert {
- host=$1
- # Create symlink, so that relayd also can read it.
- crt_path=/etc/ssl/$host
- if [ -e $crt_path.crt ]; then
- rm $crt_path.crt
- fi
- ln -s $crt_path.fullchain.pem $crt_path.crt
- # Requesting and renewing certificate.
- /usr/sbin/acme-client -v $host
-}
-
-has_update=no
-handle_cert www.buetow.org
-if [ $? -eq 0 ]; then
- has_update=yes
-fi
-handle_cert www.paul.buetow.org
-if [ $? -eq 0 ]; then
- has_update=yes
-fi
-handle_cert www.tmp.buetow.org
-if [ $? -eq 0 ]; then
- has_update=yes
-fi
-handle_cert www.dtail.dev
-if [ $? -eq 0 ]; then
- has_update=yes
-fi
-handle_cert www.foo.zone
-if [ $? -eq 0 ]; then
- has_update=yes
-fi
-handle_cert www.irregular.ninja
-if [ $? -eq 0 ]; then
- has_update=yes
-fi
-handle_cert www.snonux.land
-if [ $? -eq 0 ]; then
- has_update=yes
-fi
-
-# Pick up the new certs.
-if [ $has_update = yes ]; then
- /usr/sbin/rcctl reload httpd
- /usr/sbin/rcctl reload relayd
- /usr/sbin/rcctl restart smtpd
-fi
-</pre>
-<br />
-<span>And added the following line to <span class='inlinecode'>/etc/daily.local</span> to run the script once daily so that certificates will be renewed fully automatically:</span><br />
-<br />
-<pre>
-/usr/local/bin/acme.sh
-</pre>
-<br />
-<span>I am receiving a daily output via E-Mail like this now:</span><br />
-<br />
-<pre>
-Running daily.local:
-acme-client: /etc/ssl/buetow.org.fullchain.pem: certificate valid: 80 days left
-acme-client: /etc/ssl/paul.buetow.org.fullchain.pem: certificate valid: 80 days left
-acme-client: /etc/ssl/tmp.buetow.org.fullchain.pem: certificate valid: 80 days left
-acme-client: /etc/ssl/dtail.dev.fullchain.pem: certificate valid: 80 days left
-acme-client: /etc/ssl/foo.zone.fullchain.pem: certificate valid: 80 days left
-acme-client: /etc/ssl/irregular.ninja.fullchain.pem: certificate valid: 80 days left
-acme-client: /etc/ssl/snonux.land.fullchain.pem: certificate valid: 79 days left
-</pre>
-<br />
-<h2 style='display: inline'>relayd.conf and smtpd.conf</h2><br />
-<br />
-<span>Besides <span class='inlinecode'>httpd</span>, <span class='inlinecode'>relayd</span> (mainly for Gemini) and <span class='inlinecode'>smtpd</span> (for mail, of course) also use TLS certificates. And as you can see in <span class='inlinecode'>acme.sh</span>, the services are reloaded or restarted (<span class='inlinecode'>smtpd</span> doesn&#39;t support reload) whenever a certificate is generated or updated.</span><br />
-<br />
-<h2 style='display: inline'>Rexification</h2><br />
-<br />
-<span>I didn&#39;t write all these configuration files by hand. As a matter of fact, everything is automated with the Rex configuration management system.</span><br />
-<br />
-<a class='textlink' href='https://www.rexify.org'>https://www.rexify.org</a><br />
-<br />
-<span>At the top of the <span class='inlinecode'>Rexfile</span> I define all my hosts:</span><br />
-<br />
-<pre>
-our @acme_hosts = qw/buetow.org paul.buetow.org tmp.buetow.org dtail.dev foo.zone irregular.ninja snonux.land/;
-</pre>
-<br />
-<h3 style='display: inline'>General ACME client configuration</h3><br />
-<br />
-<span>ACME will be installed into the frontend group of hosts. Here, blowfish is the primary, and twofish is the secondary OpenBSD box.</span><br />
-<br />
-<pre>
-group frontends =&gt; &#39;blowfish.buetow.org&#39;, &#39;twofish.buetow.org&#39;;
-</pre>
-<br />
-<span>This is my Rex task for the general ACME configuration:</span><br />
-<br />
-<pre>
-desc &#39;Configure ACME client&#39;;
-task &#39;acme&#39;, group =&gt; &#39;frontends&#39;,
- sub {
- file &#39;/etc/acme-client.conf&#39;,
- content =&gt; template(&#39;./etc/acme-client.conf.tpl&#39;,
- acme_hosts =&gt; \@acme_hosts,
- is_primary =&gt; $is_primary),
- owner =&gt; &#39;root&#39;,
- group =&gt; &#39;wheel&#39;,
- mode =&gt; &#39;644&#39;;
-
- file &#39;/usr/local/bin/acme.sh&#39;,
- content =&gt; template(&#39;./scripts/acme.sh.tpl&#39;,
- acme_hosts =&gt; \@acme_hosts,
- is_primary =&gt; $is_primary),
- owner =&gt; &#39;root&#39;,
- group =&gt; &#39;wheel&#39;,
- mode =&gt; &#39;744&#39;;
-
- file &#39;/etc/daily.local&#39;,
- ensure =&gt; &#39;present&#39;,
- owner =&gt; &#39;root&#39;,
- group =&gt; &#39;wheel&#39;,
- mode =&gt; &#39;644&#39;;
-
- append_if_no_such_line &#39;/etc/daily.local&#39;, &#39;/usr/local/bin/acme.sh&#39;;
- };
-</pre>
-<br />
-<span>And there is also a Rex task just to run the ACME script remotely:</span><br />
-<br />
-<pre>
-desc &#39;Invoke ACME client&#39;;
-task &#39;acme_invoke&#39;, group =&gt; &#39;frontends&#39;,
- sub {
- say run &#39;/usr/local/bin/acme.sh&#39;;
- };
-
-</pre>
-<br />
-<span>Furthermore, this snippet (also at the top of the Rexfile) helps to determine whether the current server is the primary server (all hosts will be without the <span class='inlinecode'>www.</span> prefix) or the secondary server (all hosts will be with the <span class='inlinecode'>www.</span> prefix):</span><br />
-<br />
-<pre>
-# Bootstrapping the FQDN based on the server IP as the hostname and domain
-# facts aren&#39;t set yet due to the myname file in the first place.
-our $fqdns = sub {
- my $ipv4 = shift;
- return &#39;blowfish.buetow.org&#39; if $ipv4 eq &#39;23.88.35.144&#39;;
- return &#39;twofish.buetow.org&#39; if $ipv4 eq &#39;108.160.134.135&#39;;
- Rex::Logger::info("Unable to determine hostname for $ipv4", &#39;error&#39;);
- return &#39;HOSTNAME-UNKNOWN.buetow.org&#39;;
-};
-
-# To determine whether the server is the primary or the secondary.
-our $is_primary = sub {
- my $ipv4 = shift;
- $fqdns-&gt;($ipv4) eq &#39;blowfish.buetow.org&#39;;
-};
-</pre>
-<br />
-<span>The following is the <span class='inlinecode'>acme-client.conf.tpl</span> Rex template file used for the automation. You see that the <span class='inlinecode'>www.</span> prefix isn&#39;t sent for the primary server. E.g. <span class='inlinecode'>foo.zone</span> will be served by the primary server (in my case, a server located in Germany) and <span class='inlinecode'>www.foo.zone</span> by the secondary server (in my case, a server located in Japan):</span><br />
-<br />
-<pre>
-#
-# $OpenBSD: acme-client.conf,v 1.4 2020/09/17 09:13:06 florian Exp $
-#
-authority letsencrypt {
- api url "https://acme-v02.api.letsencrypt.org/directory"
- account key "/etc/acme/letsencrypt-privkey.pem"
-}
-
-authority letsencrypt-staging {
- api url "https://acme-staging-v02.api.letsencrypt.org/directory"
- account key "/etc/acme/letsencrypt-staging-privkey.pem"
-}
-
-authority buypass {
- api url "https://api.buypass.com/acme/directory"
- account key "/etc/acme/buypass-privkey.pem"
- contact "mailto:me@example.com"
-}
-
-authority buypass-test {
- api url "https://api.test4.buypass.no/acme/directory"
- account key "/etc/acme/buypass-test-privkey.pem"
- contact "mailto:me@example.com"
-}
-
-&lt;%
- our $primary = $is_primary-&gt;($vio0_ip);
- our $prefix = $primary ? &#39;&#39; : &#39;www.&#39;;
-%&gt;
-
-&lt;% for my $host (@$acme_hosts) { %&gt;
-domain &lt;%= $prefix.$host %&gt; {
- domain key "/etc/ssl/private/&lt;%= $prefix.$host %&gt;.key"
- domain full chain certificate "/etc/ssl/&lt;%= $prefix.$host %&gt;.fullchain.pem"
- sign with letsencrypt
-}
-&lt;% } %&gt;
-
-</pre>
-<br />
-<span>And this is the <span class='inlinecode'>acme.sh.tpl</span>:</span><br />
-<br />
-<pre>
-#!/bin/sh
-
-&lt;%
- our $primary = $is_primary-&gt;($vio0_ip);
- our $prefix = $primary ? &#39;&#39; : &#39;www.&#39;;
--%&gt;
-
-function handle_cert {
- host=$1
- # Create symlink, so that relayd also can read it.
- crt_path=/etc/ssl/$host
- if [ -e $crt_path.crt ]; then
- rm $crt_path.crt
- fi
- ln -s $crt_path.fullchain.pem $crt_path.crt
- # Requesting and renewing certificate.
- /usr/sbin/acme-client -v $host
-}
-
-has_update=no
-&lt;% for my $host (@$acme_hosts) { -%&gt;
-handle_cert &lt;%= $prefix.$host %&gt;
-if [ $? -eq 0 ]; then
- has_update=yes
-fi
-&lt;% } -%&gt;
-
-# Pick up the new certs.
-if [ $has_update = yes ]; then
- /usr/sbin/rcctl reload httpd
- /usr/sbin/rcctl reload relayd
- /usr/sbin/rcctl restart smtpd
-fi
-</pre>
-<br />
-<h3 style='display: inline'>Service rexification </h3><br />
-<br />
-<span>These are the Rex tasks setting up <span class='inlinecode'>httpd</span>, <span class='inlinecode'>relayd</span> and <span class='inlinecode'>smtpd</span> services:</span><br />
-<br />
-<pre>
-desc &#39;Setup httpd&#39;;
-task &#39;httpd&#39;, group =&gt; &#39;frontends&#39;,
- sub {
- append_if_no_such_line &#39;/etc/rc.conf.local&#39;, &#39;httpd_flags=&#39;;
-
- file &#39;/etc/httpd.conf&#39;,
- content =&gt; template(&#39;./etc/httpd.conf.tpl&#39;,
- acme_hosts =&gt; \@acme_hosts,
- is_primary =&gt; $is_primary),
- owner =&gt; &#39;root&#39;,
- group =&gt; &#39;wheel&#39;,
- mode =&gt; &#39;644&#39;,
- on_change =&gt; sub { service &#39;httpd&#39; =&gt; &#39;restart&#39; };
-
- service &#39;httpd&#39;, ensure =&gt; &#39;started&#39;;
- };
-
-desc &#39;Setup relayd&#39;;
-task &#39;relayd&#39;, group =&gt; &#39;frontends&#39;,
- sub {
- append_if_no_such_line &#39;/etc/rc.conf.local&#39;, &#39;relayd_flags=&#39;;
-
- file &#39;/etc/relayd.conf&#39;,
- content =&gt; template(&#39;./etc/relayd.conf.tpl&#39;,
- ipv6address =&gt; $ipv6address,
- is_primary =&gt; $is_primary),
- owner =&gt; &#39;root&#39;,
- group =&gt; &#39;wheel&#39;,
- mode =&gt; &#39;600&#39;,
- on_change =&gt; sub { service &#39;relayd&#39; =&gt; &#39;restart&#39; };
-
- service &#39;relayd&#39;, ensure =&gt; &#39;started&#39;;
- };
-
-desc &#39;Setup OpenSMTPD&#39;;
-task &#39;smtpd&#39;, group =&gt; &#39;frontends&#39;,
- sub {
- Rex::Logger::info(&#39;Dealing with mail aliases&#39;);
- file &#39;/etc/mail/aliases&#39;,
- source =&gt; &#39;./etc/mail/aliases&#39;,
- owner =&gt; &#39;root&#39;,
- group =&gt; &#39;wheel&#39;,
- mode =&gt; &#39;644&#39;,
- on_change =&gt; sub { say run &#39;newaliases&#39; };
-
- Rex::Logger::info(&#39;Dealing with mail virtual domains&#39;);
- file &#39;/etc/mail/virtualdomains&#39;,
- source =&gt; &#39;./etc/mail/virtualdomains&#39;,
- owner =&gt; &#39;root&#39;,
- group =&gt; &#39;wheel&#39;,
- mode =&gt; &#39;644&#39;,
- on_change =&gt; sub { service &#39;smtpd&#39; =&gt; &#39;restart&#39; };
-
- Rex::Logger::info(&#39;Dealing with mail virtual users&#39;);
- file &#39;/etc/mail/virtualusers&#39;,
- source =&gt; &#39;./etc/mail/virtualusers&#39;,
- owner =&gt; &#39;root&#39;,
- group =&gt; &#39;wheel&#39;,
- mode =&gt; &#39;644&#39;,
- on_change =&gt; sub { service &#39;smtpd&#39; =&gt; &#39;restart&#39; };
-
- Rex::Logger::info(&#39;Dealing with smtpd.conf&#39;);
- file &#39;/etc/mail/smtpd.conf&#39;,
- content =&gt; template(&#39;./etc/mail/smtpd.conf.tpl&#39;,
- is_primary =&gt; $is_primary),
- owner =&gt; &#39;root&#39;,
- group =&gt; &#39;wheel&#39;,
- mode =&gt; &#39;644&#39;,
- on_change =&gt; sub { service &#39;smtpd&#39; =&gt; &#39;restart&#39; };
-
- service &#39;smtpd&#39;, ensure =&gt; &#39;started&#39;;
- };
-
-</pre>
-<br />
-<span>This is the <span class='inlinecode'>httpd.conf.tpl</span>:</span><br />
-<br />
-<pre>
-&lt;%
- our $primary = $is_primary-&gt;($vio0_ip);
- our $prefix = $primary ? &#39;&#39; : &#39;www.&#39;;
-%&gt;
-
-# Plain HTTP for ACME and HTTPS redirect
-&lt;% for my $host (@$acme_hosts) { %&gt;
-server "&lt;%= $prefix.$host %&gt;" {
- listen on * port 80
- location "/.well-known/acme-challenge/*" {
- root "/acme"
- request strip 2
- }
- location * {
- block return 302 "https://$HTTP_HOST$REQUEST_URI"
- }
-}
-&lt;% } %&gt;
-
-# Gemtexter hosts
-&lt;% for my $host (qw/foo.zone snonux.land/) { %&gt;
-server "&lt;%= $prefix.$host %&gt;" {
- listen on * tls port 443
- tls {
- certificate "/etc/ssl/&lt;%= $prefix.$host %&gt;.fullchain.pem"
- key "/etc/ssl/private/&lt;%= $prefix.$host %&gt;.key"
- }
- location * {
- root "/htdocs/gemtexter/&lt;%= $host %&gt;"
- directory auto index
- }
-}
-&lt;% } %&gt;
-
-# DTail special host
-server "&lt;%= $prefix %&gt;dtail.dev" {
- listen on * tls port 443
- tls {
- certificate "/etc/ssl/&lt;%= $prefix %&gt;dtail.dev.fullchain.pem"
- key "/etc/ssl/private/&lt;%= $prefix %&gt;dtail.dev.key"
- }
- location * {
- block return 302 "https://github.dtail.dev$REQUEST_URI"
- }
-}
-
-# Irregular Ninja special host
-server "&lt;%= $prefix %&gt;irregular.ninja" {
- listen on * tls port 443
- tls {
- certificate "/etc/ssl/&lt;%= $prefix %&gt;irregular.ninja.fullchain.pem"
- key "/etc/ssl/private/&lt;%= $prefix %&gt;irregular.ninja.key"
- }
- location * {
- root "/htdocs/irregular.ninja"
- directory auto index
- }
-}
-
-# buetow.org special host.
-server "&lt;%= $prefix %&gt;buetow.org" {
- listen on * tls port 443
- tls {
- certificate "/etc/ssl/&lt;%= $prefix %&gt;buetow.org.fullchain.pem"
- key "/etc/ssl/private/&lt;%= $prefix %&gt;buetow.org.key"
- }
- block return 302 "https://paul.buetow.org"
-}
-
-server "&lt;%= $prefix %&gt;paul.buetow.org" {
- listen on * tls port 443
- tls {
- certificate "/etc/ssl/&lt;%= $prefix %&gt;paul.buetow.org.fullchain.pem"
- key "/etc/ssl/private/&lt;%= $prefix %&gt;paul.buetow.org.key"
- }
- block return 302 "https://foo.zone/contact-information.html"
-}
-
-server "&lt;%= $prefix %&gt;tmp.buetow.org" {
- listen on * tls port 443
- tls {
- certificate "/etc/ssl/&lt;%= $prefix %&gt;tmp.buetow.org.fullchain.pem"
- key "/etc/ssl/private/&lt;%= $prefix %&gt;tmp.buetow.org.key"
- }
- root "/htdocs/buetow.org/tmp"
- directory auto index
-}
-</pre>
-<br />
-<span>and this the <span class='inlinecode'>relayd.conf.tpl</span>:</span><br />
-<br />
-<pre>
-&lt;%
- our $primary = $is_primary-&gt;($vio0_ip);
- our $prefix = $primary ? &#39;&#39; : &#39;www.&#39;;
-%&gt;
-
-log connection
-
-tcp protocol "gemini" {
- tls keypair &lt;%= $prefix %&gt;foo.zone
- tls keypair &lt;%= $prefix %&gt;buetow.org
-}
-
-relay "gemini4" {
- listen on &lt;%= $vio0_ip %&gt; port 1965 tls
- protocol "gemini"
- forward to 127.0.0.1 port 11965
-}
-
-relay "gemini6" {
- listen on &lt;%= $ipv6address-&gt;($hostname) %&gt; port 1965 tls
- protocol "gemini"
- forward to 127.0.0.1 port 11965
-}
-</pre>
-<br />
-<span>And last but not least, this is the <span class='inlinecode'>smtpd.conf.tpl</span>:</span><br />
-<br />
-<pre>
-&lt;%
- our $primary = $is_primary-&gt;($vio0_ip);
- our $prefix = $primary ? &#39;&#39; : &#39;www.&#39;;
-%&gt;
-
-pki "buetow_org_tls" cert "/etc/ssl/&lt;%= $prefix %&gt;buetow.org.fullchain.pem"
-pki "buetow_org_tls" key "/etc/ssl/private/&lt;%= $prefix %&gt;buetow.org.key"
-
-table aliases file:/etc/mail/aliases
-table virtualdomains file:/etc/mail/virtualdomains
-table virtualusers file:/etc/mail/virtualusers
-
-listen on socket
-listen on all tls pki "buetow_org_tls" hostname "&lt;%= $prefix %&gt;buetow.org"
-#listen on all
-
-action localmail mbox alias &lt;aliases&gt;
-action receive mbox virtual &lt;virtualusers&gt;
-action outbound relay
-
-match from any for domain &lt;virtualdomains&gt; action receive
-match from local for local action localmail
-match from local for any action outbound
-</pre>
-<br />
-<h2 style='display: inline'>All pieces together</h2><br />
-<br />
-<span>For the complete <span class='inlinecode'>Rexfile</span> example and all the templates, please look at the Git repository:</span><br />
-<br />
-<a class='textlink' href='https://codeberg.org/snonux/rexfiles'>https://codeberg.org/snonux/rexfiles</a><br />
-<br />
-<span>Besides ACME, other things, such as DNS servers, are also rexified. The following command will run all the Rex tasks and configure everything on my frontend machines automatically:</span><br />
-<br />
-<pre>
-rex commons
-</pre>
-<br />
-<span>The <span class='inlinecode'>commons</span> is a group of tasks I specified which combines a set of common tasks I always want to execute on all frontend machines. This also includes the ACME tasks mentioned in this article!</span><br />
-<br />
-<h2 style='display: inline'>Conclusion</h2><br />
-<br />
-<span>ACME and Let&#39;s Encrypt greatly help reduce recurring manual maintenance work (creating and renewing certificates). Furthermore, all the certificates are free of cost! I love to use OpenBSD and Rex to automate all of this.</span><br />
-<br />
-<span>OpenBSD suits perfectly here as all the tools are already part of the base installation. But I like underdogs. Rex is not as powerful and popular as other configuration management systems (e.g. Puppet, Chef, SALT or even Ansible). It is more of an underdog, and the community is small.</span><br />
-<br />
-<span>Why re-inventing the wheel? I love that a <span class='inlinecode'>Rexfile</span> is just a Perl DSL. Also, OpenBSD comes with Perl in the base system. So no new programming language had to be added to my mix for the configuration management system. Also, the <span class='inlinecode'>acme.sh</span> shell script is not a Bash but a standard Bourne shell script, so I didn&#39;t have to install an additional shell as OpenBSD does not come with the Bash pre-installed.</span><br />
-<br />
-<span>E-Mail your comments to paul at buetow.org :-)</span><br />
-<br />
-<a class='textlink' href='../'>Back to the main site</a><br />
- </div>
- </content>
- </entry>
- <entry>
- <title>Sweating the small stuff - Tiny projects of mine</title>
- <link href="gemini://foo.zone/gemfeed/2022-06-15-sweating-the-small-stuff.gmi" />
- <id>gemini://foo.zone/gemfeed/2022-06-15-sweating-the-small-stuff.gmi</id>
- <updated>2022-06-15T08:47:44+01:00</updated>
- <author>
- <name>Paul Buetow aka snonux</name>
- <email>paul@dev.buetow.org</email>
- </author>
- <summary>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:</summary>
- <content type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <h1 style='display: inline'>Sweating the small stuff - Tiny projects of mine</h1><br />
-<br />
-<span class='quote'>Published at 2022-06-15T08:47:44+01:00; Updated at 2022-06-18</span><br />
-<br />
-<pre>
- _
- /_/_ .&#39;&#39;&#39;.
- =O(_)))) ...&#39; `.
- jgs \_\ `. .&#39;&#39;&#39;
- `..&#39;
-</pre>
-<br />
-<span>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&#39;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:</span><br />
-<br />
-<a class='textlink' href='https://jvns.ca/blog/2022/03/08/tiny-programs/'>Tiny programs</a><br />
-<a class='textlink' href='https://thesephist.com/projects/'>The Sephist&#39;s project list</a><br />
-<br />
-<span>Working on tiny projects is a lot of fun as you don&#39;t need to worry about any standards or code reviews and you decide how and when you work on it. There aren&#39;t restrictions regarding technologies used. You are likely the only person working on these tiny projects and that means that there is no conflict with any other developers. This is complete freedom :-).</span><br />
-<br />
-<span>But before going through the tiny projects let&#39;s take a paragraph for the <span class='inlinecode'>1y</span> anniversary retrospective.</span><br />
-<br />
-<h2 style='display: inline'><span class='inlinecode'>1y</span> anniversary</h2><br />
-<br />
-<span>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:</span><br />
-<br />
-<ul>
-<li>I practice English writing (I am not a native speaker). I am far from being a novelist, but this blog helps improves my writing skills. I also tried out tools like Grammarly.com and Languagetool.org and also worked with <span class='inlinecode'>:spell</span> in Vim or the LibreOffice checker. This post was checked with the <span class='inlinecode'>write-better</span> Node application. </li>
-<li>I force myself to "finish" some kind of project worth writing about every month. If its not a project, then its still a topic which requires research and deep thinking. Producing 2k words of text can actually be challenging.</li>
-<li>It&#39;s fun to rely on KISS (keep it simple &amp; stupid) tools. E.g. use of Gemtexter and not WordPress, use of Vim instead of an office suite or a rich web editor.</li>
-</ul><br />
-<span>Retrospectively, these have been the most popular blog posts of mine over the last year:</span><br />
-<br />
-<a class='textlink' href='./2021-09-12-keep-it-simple-and-stupid.html'>Keep it simple and stupid</a><br />
-<a class='textlink' href='./2022-04-10-creative-universe.html'>Creative universe</a><br />
-<a class='textlink' href='./2021-11-29-bash-golf-part-1.html'>Bash Golf series</a><br />
-<a class='textlink' href='./2021-12-26-how-to-stay-sane-as-a-devops-person.html'>How to stay sane as a DevOps person</a><br />
-<a class='textlink' href='./2022-05-27-perl-is-still-a-great-choice.html'>Perl is still a great choice</a><br />
-<br />
-<span>But now, let&#39;s continue with the small projects worth mentioning :-)</span><br />
-<br />
-<h2 style='display: inline'>Static photo album generator</h2><br />
-<br />
-<span><span class='inlinecode'>photoalbum.sh</span> is a minimal static HTML photo album generator. I use it to drive "The Irregular Ninja" site and for some ad-hoc (personal) albums to share photos with the family and friends.</span><br />
-<br />
-<a class='textlink' href='https://codeberg.org/snonux/photoalbum'>https://codeberg.org/snonux/photoalbum</a><br />
-<br />
-<h3 style='display: inline'>The Irregular Ninja</h3><br />
-<br />
-<span>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.</span><br />
-<br />
-<a href='./2022-06-15-sweating-the-small-stuff/ninja.jpg'><img src='./2022-06-15-sweating-the-small-stuff/ninja.jpg' /></a><br />
-<br />
-<span>More than 10 years ago I wrote the bespoke small static photo album generator in Bash <span class='inlinecode'>photoalbum.sh</span> 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 <span class='inlinecode'>irregular.ninja</span> has been registered.</span><br />
-<br />
-<span>The thumbnails are presented in a random order and there are also random CSS effects for each preview. There&#39;s also a simple background blur for each page generated. And that&#39;s all in less than 300 lines of Bash code! The script requires ImageMagick (available for all common Linux and *BSD distributions) to be installed.</span><br />
-<br />
-<span>As you can see, there is a lot of randomization and irregularity going on. Thus, the name "Irregular Ninja" was born.</span><br />
-<br />
-<a class='textlink' href='https://irregular.ninja'>https://irregular.ninja</a><br />
-<br />
-<span>I only use a digital compact camera or a smartphone to take the photos. I don&#39;t like the idea of carrying around a big camera with me "just in case" so I keep it small and simple. The best camera is the camera you have with you. :-)</span><br />
-<br />
-<span>I hope you like this photo site. It&#39;s worth checking it out again around once every other month!</span><br />
-<br />
-<h2 style='display: inline'>Random journal page extractor</h2><br />
-<br />
-<span>I bullet journal. I write my notes into a Leuchtturm paper notebook. Once full, I am scanning it to a PDF file and archive it. As of writing this, I am at journal #7 (each from 123 up to 251 pages in A5). It means that there is a lot of material already.</span><br />
-<br />
-<span>Once in a while I want to revisit older notes and ideas. For that I have written a simple Bash script <span class='inlinecode'>randomjournalpage.sh</span> which randomly picks a PDF file from a folder and extracts 42 pages from it at a random page offset and opens them in a PDF viewer (Evince in this case, as I am a GNOME user). </span><br />
-<br />
-<a class='textlink' href='https://codeberg.org/snonux/randomjournalpage'>https://codeberg.org/snonux/randomjournalpage</a><br />
-<br />
-<span>There&#39;s also a weekly <span class='inlinecode'>CRON</span> job on my servers to send me a reminder that I might want to read in my old journals again. My laptop also runs this script each time it boots and saves the output to a NextCloud folder. From there, it&#39;s synchronized to the NextCloud server so I can pick it up from there with my smartphone later when I am "on the road".</span><br />
-<br />
-<h2 style='display: inline'>Global uptime records statistic generator</h2><br />
-<br />
-<span><span class='inlinecode'>guprecords</span> is a Perl script which reads multiple <span class='inlinecode'>uprecord</span> files (produced by <span class='inlinecode'>uptimed</span> - a widely available daemon for recording server uptimes) and generates uptime statistics of multiple hosts combined. I keep all the record files of all my personal computers in a Git repository (I even keep the records of the boxes I don&#39;t own or use anymore) and there&#39;s already quite a collection of it. It looks like this:</span><br />
-<br />
-<pre>
-❯ perl ~/git/guprecords/src/guprecords --indir=./stats/ --count=20 --all
-Pos | System | Kernel | Uptime | Boot time
- 1 | sun | FreeBSD 10.1-RELEA.. | 502d 03:29:19 | Sun Aug 16 15:56:40 2015
- 2 | vulcan | Linux 3.10.0-1160... | 313d 13:19:39 | Sun Jul 25 18:32:25 2021
- 3 | uugrn | FreeBSD 10.2-RELEASE | 303d 15:19:35 | Tue Dec 22 21:33:07 2015
- 4 | uugrn | FreeBSD 11.0-RELEA.. | 281d 14:38:04 | Fri Oct 21 15:22:02 2016
- 5 | deltavega | Linux 3.10.0-957.2.. | 279d 11:15:00 | Sun Jun 30 11:42:38 2019
- 6 | vulcan | Linux 3.10.0-957.2.. | 279d 11:12:14 | Sun Jun 30 11:43:41 2019
- 7 | deltavega | Linux 3.10.0-1160... | 253d 04:42:22 | Sat Apr 24 13:34:34 2021
- 8 | host0 | FreeBSD 6.2-RELEAS.. | 240d 02:23:23 | Wed Jan 31 20:34:46 2007
- 9 | uugrn | FreeBSD 11.1-RELEA.. | 202d 21:12:41 | Sun May 6 18:06:17 2018
- 10 | tauceti | Linux 3.2.0-4-amd64 | 197d 18:45:40 | Mon Dec 16 19:47:54 2013
- 11 | pluto | Linux 2.6.32-5-amd64 | 185d 11:53:04 | Wed Aug 1 07:34:10 2012
- 12 | sun | FreeBSD 10.3-RELEA.. | 164d 22:31:55 | Sat Jul 22 18:47:21 2017
- 13 | vulcan | Linux 3.10.0-1160... | 161d 07:08:43 | Sun Feb 14 10:05:38 2021
- 14 | sun | FreeBSD 10.3-RELEA.. | 158d 21:18:36 | Sat Jan 27 10:18:57 2018
- 15 | uugrn | FreeBSD 11.1-RELEA.. | 157d 20:57:24 | Fri Nov 3 05:02:54 2017
- 16 | tauceti-f | Linux 3.2.0-3-amd64 | 150d 04:12:38 | Mon Sep 16 09:02:58 2013
- 17 | tauceti | Linux 3.2.0-4-amd64 | 149d 09:21:43 | Mon Aug 11 09:47:50 2014
- 18 | pluto | Linux 3.2.0-4-amd64 | 142d 02:57:31 | Mon Sep 8 01:59:02 2014
- 19 | tauceti-f | Linux 3.2.0-3-amd64 | 132d 22:46:26 | Mon May 6 11:11:35 2013
- 20 | keppler-16b | Darwin 13.4.0 | 131d 08:17:12 | Thu Jun 11 10:44:25 2015
-</pre>
-<br />
-<span>It can also sum up all uptimes for each host to generate a total per host uptime top list:</span><br />
-<br />
-<pre>
-❯ perl ~/git/guprecords/src/guprecords --indir=./stats/ --count=20 --total
-Pos | System | Kernel | Uptime |
- 1 | uranus | Linux 5.4.17-200.f.. | 1419d 19:05:39 |
- 2 | sun | FreeBSD 10.1-RELEA.. | 1363d 11:41:14 |
- 3 | vulcan | Linux 3.10.0-1160... | 1262d 20:27:48 |
- 4 | uugrn | FreeBSD 10.2-RELEASE | 1219d 15:10:16 |
- 5 | deltavega | Linux 3.10.0-957.2.. | 1115d 06:33:55 |
- 6 | pluto | Linux 2.6.32-5-amd64 | 1086d 10:44:05 |
- 7 | tauceti | Linux 3.2.0-4-amd64 | 846d 12:58:21 |
- 8 | tauceti-f | Linux 3.2.0-3-amd64 | 625d 07:16:39 |
- 9 | host0 | FreeBSD 6.2-RELEAS.. | 534d 19:50:13 |
- 10 | keppler-16b | Darwin 13.4.0 | 448d 06:15:00 |
- 11 | tauceti-e | Linux 3.2.0-4-amd64 | 415d 18:14:13 |
- 12 | moon | Darwin 18.7.0 | 326d 11:21:42 |
- 13 | callisto | Linux 4.0.4-303.fc.. | 303d 12:18:24 |
- 14 | alphacentauri | FreeBSD 10.1-RELEA.. | 300d 20:15:00 |
- 15 | earth | Linux 5.13.14-200... | 289d 08:05:05 |
- 16 | makemake | Linux 5.11.9-200.f.. | 286d 21:53:03 |
- 17 | london | Linux 3.2.0-4-amd64 | 258d 15:10:38 |
- 18 | fishbone | OpenBSD 4.1 .. | 223d 05:55:26 |
- 19 | sagittarius | Darwin 15.6.0 | 198d 23:53:59 |
- 20 | mars | Linux 3.2.0-4-amd64 | 190d 05:44:21 |
-</pre>
-<br />
-<a class='textlink' href='https://codeberg.org/snonux/guprecords'>https://codeberg.org/snonux/guprecords</a><br />
-<br />
-<span>This all is of no real practical use but fun!</span><br />
-<br />
-<h2 style='display: inline'>Server configuration management</h2><br />
-<br />
-<span>The <span class='inlinecode'>rexfiles</span> project contains all Rex files for my (personal) server setup automation. A <span class='inlinecode'>Rexfile</span> is written in a Perl DSL run by the Rex configuration management system. It&#39;s pretty much KISS and that&#39;s why I love it. It suits my personal needs perfectly. </span><br />
-<br />
-<a class='textlink' href='https://codeberg.org/snonux/rexfiles'>https://codeberg.org/snonux/rexfiles</a><br />
-<a class='textlink' href='https://www.rexify.org'>https://www.rexify.org</a><br />
-<br />
-<span>This is an E-Mail I posted to the Rex mailing list:</span><br />
-<br />
-<span class='quote'>Hi there! I was searching for a simple way to automate my personal OpenBSD setup. I found that configuration management systems like Puppet, Salt, Chef, etc.. were too bloated for my personal needs. So for a while I was configuring everything by hand. At one point I got fed up and started writing Shell scripts. But that was not the holy grail so that I looked at Ansible. I found that Ansible had some dependencies on Python on the target machine when you want to use all the features. Furthermore, I am not really familiar with Python. But then I remembered that there was also Rex. It&#39;s written in my beloved Perl. Also, OpenBSD comes with Perl in the base system out of the box which makes it integrate better than all my scripts (automation and also scripts deployed via the automation to the system) are all in the same language. Rex may not have all the features like other configuration management systems, but its easy to work-around or extend when you know Perl. Thanks!</span><br />
-<br />
-<h2 style='display: inline'>Fancy SSH execution loop</h2><br />
-<br />
-<span><span class='inlinecode'>rubyfy</span> is a fancy SSH loop wrapper written in Ruby for running shell commands on multiple remote servers at once. I also forked this project for work (under a different name) where I added even more features such as automatic server discovery. It&#39;s used by many colleagues on a frequent basis. Here are some examples:</span><br />
-<br />
-<pre>
-# Run command &#39;hostname&#39; on server foo.example.com
-./rubyfy.rb -c &#39;hostname&#39; &lt;&lt;&lt; foo.example.com
-
-# Run command &#39;id&#39; as root (via sudo) on all servers listed in the list file
-# Do it on 10 servers in parallel
-./rubyfy.rb --parallel 10 --root --command &#39;id&#39; &lt; serverlist.txt
-
-# Run a fancy script in background on 50 servers in parallel
-./rubyfy.rb -p 50 -r -b -c &#39;/usr/local/scripts/fancy.zsh&#39; &lt; serverlist.txt
-
-# Grep for specific process on both servers and write output to ./out/grep.txt
-echo {foo,bar}.example.com | ./rubyfy.rb -p 10 -c &#39;pgrep -lf httpd&#39; -n grep.txt
-
-# Reboot server only if file /var/run/maintenance.lock does NOT exist!
-echo foo.example.com |
-./rubyfy.rb --root --command reboot --precondition /var/run/maintenance.lock
-</pre>
-<br />
-<a class='textlink' href='https://codeberg.org/snonux/rubyfy'>https://codeberg.org/snonux/rubyfy</a><br />
-<br />
-<h2 style='display: inline'>A KISS dynamic DNS solution</h2><br />
-<br />
-<span><span class='inlinecode'>dyndns</span> is a tiny shell script which implements "your" own DynDNS service. It relies on SSH access to the authoritative DNS server and the <span class='inlinecode'>nsupdate</span> command. There is really no need to use any of the "other" free DynDNS services out there.</span><br />
-<br />
-<span>Syntax (this must run from the client connecting to the DNS server through SSH): </span><br />
-<br />
-<pre>
-ssh dyndns@dyndnsserver /path/to/dyndns-update \
- your.host.name. TYPE new-entry TIMEOUT
-</pre>
-<br />
-<span>This is a real world example: </span><br />
-<br />
-<pre>
-ssh dyndns@dyndnsserver /path/to/dyndns-update \
- local.buetow.org. A 137.226.50.91 30
-</pre>
-<br />
-<a class='textlink' href='https://codeberg.org/snonux/dyndns'>https://codeberg.org/snonux/dyndns</a><br />
-<br />
-<h2 style='display: inline'>CPU information gatherer for Linux</h2><br />
-<br />
-<span>This is a tiny GNU Awk script for Linux which displays information about the CPU. All what it does is presenting <span class='inlinecode'>/proc/cpuinfo</span> in an easier to read way. The output is somewhat more compact than the standard <span class='inlinecode'>lscpu</span> command you find commonly on Linux distributions.</span><br />
-<br />
-<pre>
-❯ ./cpuinfo
-cpuinfo (c) 1.0.2 Paul Buetow
-
- 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz GenuineIntel 12288 KB cache
-
-p = 001 Physical processors
-c = 004 Cores
-s = 008 Siblings (Hyper-Threading enabled if s != c)
-v = 008 [v = p*c*(s != c ? 2 : 1)] Total logical CPUs
- Hyper-Threading is enabled
-
-0003000 MHz each core
-0012000 MHz total
-0005990 Bogomips each processor (including virtual)
-0023961 Bogomips total
-</pre>
-<br />
-<a class='textlink' href='https://codeberg.org/snonux/cpuinfo'>https://codeberg.org/snonux/cpuinfo</a><br />
-<br />
-<h2 style='display: inline'>Show differences of two files over the network</h2><br />
-<br />
-<span>This is a shell wrapper to use the standard diff tool over the network to compare a file between two computers. It uses NetCat for the network part and also encrypts all traffic using OpenSSL. This is how its used:</span><br />
-<br />
-<span>1. Open two terminal windows and login to two different hosts (you could use ClusterSSH or <span class='inlinecode'>tmux</span> here). 2. Run on the first host <span class='inlinecode'>netdiff otherhost.example.org /file/to/diff.txt</span> and run on the second host <span class='inlinecode'>netdiff firsthost.example.org /file/to/diff.txt</span>. 3. You then will see the file differences.</span><br />
-<br />
-<a class='textlink' href='https://codeberg.org/snonux/netdiff'>https://codeberg.org/snonux/netdiff</a><br />
-<br />
-<h2 style='display: inline'>Delay sending out E-Mails with Mutt</h2><br />
-<br />
-<span>This is a shell script for the Mutt email client for delaying sending out E-Mails. For example, you want to write an email on Saturday but don&#39;t want to bother the recipient earlier than Monday. It relies on CRON.</span><br />
-<br />
-<a class='textlink' href='https://codeberg.org/snonux/muttdelay'>https://codeberg.org/snonux/muttdelay</a><br />
-<br />
-<h2 style='display: inline'>Graphical UI for sending text messages</h2><br />
-<br />
-<span><span class='inlinecode'>jsmstrade</span> is a minimalistic graphical Java swing client for sending SMS messages over the SMStrade service.</span><br />
-<br />
-<a href='./2022-06-15-sweating-the-small-stuff/jsmstrade.png'><img src='./2022-06-15-sweating-the-small-stuff/jsmstrade.png' /></a><br />
-<br />
-<a class='textlink' href='https://codeberg.org/snonux/jsmstrade'>https://codeberg.org/snonux/jsmstrade</a><br />
-<a class='textlink' href='https://smstrade.de'>https://smstrade.de</a><br />
-<br />
-<h2 style='display: inline'>IPv6 and IPv4 connectivity testing site</h2><br />
-<br />
-<span><span class='inlinecode'>ipv6test</span> is a quick and dirty Perl CGI script for testing whether your browser connects via IPv4 or IPv6. It requires you to setup three sub-domains: One reachable only via IPv4 (e.g. <span class='inlinecode'>test4.ipv6.buetow.org</span>), another reachable only via IPv6 (e.g. <span class='inlinecode'>test6.ipv6.buetow.org</span>) and the main one reachable through both protocols (e.g. <span class='inlinecode'>ipv6.buetow.org</span>).</span><br />
-<br />
-<span>I don&#39;t have it running on any of my servers at the moment. This means that there is no demo to show now. Sorry!</span><br />
-<br />
-<h2 style='display: inline'>List open Jira tickets in the terminal</h2><br />
-<br />
-<span><span class='inlinecode'>japi</span> s a small Perl script for listing open Jira issues. It might be broken by now as the Jira APIs may have changed. Sorry! But feel free to fork and modernize it. :-)</span><br />
-<br />
-<a class='textlink' href='https://codeberg.org/snonux/jsmstrade'>https://codeberg.org/snonux/jsmstrade</a><br />
-<span> </span><br />
-<h2 style='display: inline'>Debian running on "your" Android phone</h2><br />
-<br />
-<span>Debroid is a tutorial and a set of scripts to install and to run a Debian <span class='inlinecode'>chroot</span> on an Android phone.</span><br />
-<br />
-<a class='textlink' href='./2015-12-05-run-debian-on-your-phone-with-debroid.html'>Check out my previous post about it</a><br />
-<br />
-<span>I am not using Debroid anymore as I have switched to Termux now.</span><br />
-<br />
-<a class='textlink' href='https://termux.com'>https://termux.com</a><br />
-<br />
-<h2 style='display: inline'>Perl service framework</h2><br />
-<br />
-<span>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.</span><br />
-<br />
-<a class='textlink' href='./2011-05-07-perl-daemon-service-framework.html'>Checkout my previous post about it</a><br />
-<br />
-<h2 style='display: inline'>More</h2><br />
-<br />
-<span>There are more projects on my Codeberg page but they aren&#39;t as tiny as the ones mentioned in this post or aren&#39;t finished yet so I won&#39;t bother listing them here. However, there also a few more scripts used frequently by me (not publicly accessible (yet?)) which I would like to mention here:</span><br />
-<br />
-<h3 style='display: inline'>Work time tracker</h3><br />
-<br />
-<span><span class='inlinecode'>worktime.rb</span>, for example, is a command line Ruby script I use to track my time spent working. This is to make sure that I don&#39;t overwork (in particular useful when working from home). It also generates some daily and weekly stats and carries over work time (surpluses or minuses) to the next work day, week or even year.</span><br />
-<br />
-<span>It has some special features such as tracking time for self-improvement/development, days off and time spent at the lunch break and time spent on Pet Projects.</span><br />
-<br />
-<span>An example weekly report looks like this (I often don&#39;t track my lunch time but what I do instead I stop the work timer when I go out for lunch and start the work timer once back at the desk):</span><br />
-<br />
-<pre>
- Mon 20211213 50: work:5.92h
- Tue 20211214 50: work:7.47h lunch:0.50h pet:0.42h
- Wed 20211215 50: work:8.86h pet:0.50h
- Thu 20211216 50: work:8.02h pet:0.50h
- Fri 20211217 50: work:9.81h
- * Sat 20211218 50: work:0.00h selfdevelopment:1.00h
- * Sun 20211219 50: work:2.08h pet:1.00h selfdevelopment:-2.08h
-================================================
- balance:0.06h work:42.15h lunch:0.50h pet:2.42h selfdevelopment:-1.08h buffer:8.38h
-</pre>
-<br />
-<span>All I do when I start work is to run the <span class='inlinecode'>wtlogin</span> command and after finishing work to run the <span class='inlinecode'>wtlogout</span> command. My shell will remind me when I work without having logged in. It uses a simple JSON database which is editable with <span class='inlinecode'>wtedit</span> (this opens the JSON in Vim). The report shown above can be generated with <span class='inlinecode'>wtreport</span>. Any out-of-bounds reporting can be added with the <span class='inlinecode'>wtadd</span> command.</span><br />
-<br />
-<h3 style='display: inline'>Password and document store</h3><br />
-<br />
-<span><span class='inlinecode'>geheim.rb</span> is my personal password and document store ("geheim" is the German word for secret). It&#39;s written in Ruby and heavily relies on Git, FZF (for search), Vim and standard encryption algorithms. Other than the standard <span class='inlinecode'>pass</span> Unix password manager, <span class='inlinecode'>geheim</span> also encrypts the file names and password titles.</span><br />
-<br />
-<span>The tool is command line driven but also provides an interactive shell when invoked with <span class='inlinecode'>geheim shell</span>. It also works on my Android phone via Termux so I have all my documents and passwords always with me. </span><br />
-<br />
-<h3 style='display: inline'>Backup procedure</h3><br />
-<br />
-<span><span class='inlinecode'>backup</span> is a Bash script which does run once daily (or every time on boot) on my home FreeBSD NAS server and performs backup related tasks such as creating a local backup of my remote NextCloud instance, creating encrypted (incremental) ZFS snapshots of everything what&#39;s stored on the NAS and synchronizes (via <span class='inlinecode'>rsync</span>) backups to a remote cloud storage. It also can synchronize backups to a local external USB drive.</span><br />
-<br />
-<a class='textlink' href='./2016-04-03-offsite-backup-with-zfs.html'>Check out my offsite backup series</a><br />
-<br />
-<h2 style='display: inline'>konpeito.media</h2><br />
-<br />
-<span>Here&#39;s a bonus...</span><br />
-<br />
-<pre>
- ▄ █ ▄ ▄ █ ▄ ▄ █ ▄
- ▄▀█▀▄ ▄▀█▀▄ ▄▀█▀▄
- ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▀ ▀ ▀
- █ ▄▄ ▄▄ █
- █ █ █▀▀▀█ █ █ █ ▄▀ ▄▀▀▀▀▄ █▄ █ █▀▀▀▀▀▄ ▄▀▀▀▀▄ █ ▀▀▀█▀▀▀ ▄▀▀▀▀▄
- █ ▀▀▀▀▀▀▀▀▀ █ █ ▄█ █ █ █ ▀▄ █ █▄▄▄▄▄▀ █▄▄▄▄▄▄█ █ █ █ █
- █ ▄▀▀▀▀▀▀▀▀▀▀▀▄ █ █▀ ▀▄ ▀▄ ▄▀ █ ▀▄█ █ ▀▄ ▄ █ █ ▀▄ ▄▀
- ▀▄█▄█▄▄▄▄▄▄▄█▄█▄▀ ▀ ▀ ▀▀▀▀ ▀ ▀ ▀ ▀▀▀▀ ▀ ▀ ▀▀▀
-</pre>
-<br />
-<span>*THIS ISN&#39;T MY PROJECT* but I found KONPEITO an interesting Gemini capsule. It&#39;s a quarterly released Low-Fi music mix tape distributed only through Gemini (and not the web). </span><br />
-<br />
-<a class='textlink' href='gemini://konpeito.media'>gemini://konpeito.media</a><br />
-<br />
-<span>If you wonder what Gemini is:</span><br />
-<br />
-<a class='textlink' href='./2021-04-24-welcome-to-the-geminispace.html'>Welcome to the Geminispae</a><br />
-<br />
-<span>E-Mail your comments to paul at buetow.org :-)</span><br />
-<br />
-<a class='textlink' href='../'>Back to the main site</a><br />
- </div>
- </content>
- </entry>