<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Tawanda Moyo</title><description>Essays and notes on AI safety, compute governance, and software, from Harare.</description><link>https://tawanda.dev/</link><language>en</language><atom:link href="https://tawanda.dev/feed.xml" rel="self" type="application/rss+xml"/><item><title>Bias Towards Action</title><link>https://tawanda.dev/bias-towards-action/</link><guid isPermaLink="true">https://tawanda.dev/bias-towards-action/</guid><description>A key lesson I got from Designing Your Life (Bill Burnett and Dave Evans) is the idea of biasing towards action. When in doubt and paralysed by fear and…</description><pubDate>Thu, 17 Sep 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;A key lesson I got from &lt;em&gt;Designing Your Life&lt;/em&gt; (Bill Burnett and Dave Evans) is the idea of biasing towards action.&lt;/p&gt;
&lt;p&gt;When in doubt and paralysed by fear and indecision, one must just act. Nike is right, just do it. And boldly.&lt;/p&gt;
&lt;p&gt;This, of course, like most useful advice, is ancient and the idea is recurring in many different places.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Most of the time things are not obtained because they were not attempted.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;— Baltasar Gracián, &lt;em&gt;The Art of Worldly Wisdom&lt;/em&gt;, Maxim 68&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It is not because things are difficult that we do not dare, it is because we do not dare that they are difficult.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;— Seneca, &lt;em&gt;Moral Letters to Lucilius&lt;/em&gt;, Letter 104.26&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Our doubts are traitors, and make us lose the good we oft might win, by fearing to attempt&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;— William Shakespeare, &lt;em&gt;Measure for Measure&lt;/em&gt;, Act I, Scene 4&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Timidity is dangerous: Better to enter with boldness. Any mistakes you commit through audacity are easily corrected with more audacity. Everyone admires the bold; no one honors the timid.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;— Robert Greene, &lt;em&gt;The 48 Laws of Power&lt;/em&gt;, Law 28&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The point is not to play as tight as you can. The point is to be bold. To be dangerous. Be elegant.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;— Patrick Rothfuss, &lt;em&gt;The Wise Man’s Fear&lt;/em&gt;, Chapter 65&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A good plan, violently executed now, is better than a perfect plan next week&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;— George S. Patton Jr.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Nothing learned from a book is worth anything until it is used and verified in life; only then does it begin to affect behavior and desire.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;— Will Durant, &lt;em&gt;Fallen Leaves: Last Words on Life, Love, War, and God&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;One jumps into the fray, then figures out what to do next.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;— Often attributed to Napoleon Bonaparte&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Whatever you think you can do or believe you can do, begin it.
Action has magic, grace, and power in it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;— Often attributed to Johann Wolfgang von Goethe&lt;/p&gt;
&lt;p&gt;Obsessing over the minutiae, and excessive attention to detail, and other delaying tactics are often self-preserving psychological tactics, meant to preserve (false) beliefs about our competence.&lt;/p&gt;
&lt;p&gt;In a situation where excessive planning leads to procrastination, then &lt;em&gt;any&lt;/em&gt; action is often better than none (with apologies to the Daoists).&lt;/p&gt;
&lt;p&gt;Even if nothing comes of it, action produces information and real-life feedback, and feedback is immensely valuable.&lt;/p&gt;</content:encoded><category>life</category><category>action</category><category>boldness</category><category>decision making</category><category>philosophy</category></item><item><title>Learning R</title><link>https://tawanda.dev/learning-r/</link><guid isPermaLink="true">https://tawanda.dev/learning-r/</guid><description>On learning R as part of MITx 14/310x: Data Analysis for Social Scientists</description><pubDate>Wed, 16 Sep 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This cycle of MITx Courses (Fall) I am taking &lt;em&gt;Data Analysis for Social Scientists&lt;/em&gt;. The course covers probability, statistics, and data analysis. It is also conducted in R, so I am now learning R.&lt;/p&gt;
&lt;p&gt;I’m still in the early days (first week), but it’s been quite interesting getting exposed to a new programing language. It’s also the first manual programming I’ve done in a while - with all the AI around us. So perhaps a good way to jog my mind-muscles and combat brain rot.&lt;/p&gt;
&lt;p&gt;Already one thing I’ve seen about R that is different from the programming languages that I am used to is that the counting starts at 1, rather than the “usual” 0 index counting. I expect there will be more quirks, and perhaps a different way of thinking. (One of the reasons I hear often for learning different languages is that it changes how you think about programming)&lt;/p&gt;
&lt;p&gt;I’m complementing the course resources which use a package called &lt;code&gt;swirl&lt;/code&gt; with &lt;em&gt;R for Data Science&lt;/em&gt; by Hadley Wickham, Mine Çetinkaya-Rundel, and Garrett Grolemund (free &lt;a href=&quot;https://r4ds.hadley.nz/&quot;&gt;online&lt;/a&gt;) and &lt;em&gt;R for Beginners&lt;/em&gt; by Emmanuel Paradis.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;R for Data Science&lt;/em&gt; is (from my skimming) very well written, and also, unlike most other programming books, starts with the fun stuff - i.e vizualization - and works back to the dreary routine ones like sourcing data.&lt;/p&gt;
&lt;p&gt;I stumbled upon &lt;em&gt;R for Beginners&lt;/em&gt; through the R website, and I want to go through it because it’s short, at about 75 pages. I figured that if I read two or so pages a day I would be done in a couple of weeks.&lt;/p&gt;
&lt;p&gt;Also while writing this I came across a thread suggesting &lt;em&gt;Hands-on Programming with R&lt;/em&gt; by Garett Grolemund (also suggested in the introduction of &lt;em&gt;R for Data Science&lt;/em&gt;), so will probably check that out as well.&lt;/p&gt;</content:encoded><category>learning</category><category>R</category><category>data analysis</category><category>statistics</category><category>MITx</category></item><item><title>Seeing Bugs</title><link>https://tawanda.dev/seeing-bugs/</link><guid isPermaLink="true">https://tawanda.dev/seeing-bugs/</guid><description>I now see more bugs and inconsistencies everywhere. I attribute this newfound perceptivity to Dan Luu, and two books I recently read.</description><pubDate>Tue, 08 Sep 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Dan Luu has an interesting &lt;a href=&quot;https://danluu.com/bug-blind/&quot;&gt;essay&lt;/a&gt; where he writes that he sees bugs everywhere; and that he’s often surprised by other people’s inability to see bugs, what he calls “bug blindness”.&lt;/p&gt;
&lt;p&gt;I do not notice bugs as much as he does - he claims he encounters hundreds every week - but since last week I certainly notice more bugs and inconsistencies than I used to. I attribute this newfound perceptivity to Dan Luu’s essay and two books I read recently - &lt;em&gt;Don’t Make Me Think&lt;/em&gt; by Steve Krug, and Bruce Schneier’s &lt;em&gt;A Hacker’s Mind&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Don’t Make Me Think&lt;/em&gt; is a short guide to creating better designs. The main idea is that good design should be intuitive, with very little thinking required of the user. A user should use a product with as little cognitive load as possible. &lt;em&gt;A Hacker’s Mind&lt;/em&gt;, on the other hand, is about the hacks that are present in everyday systems - the tax code, the legal system, computer systems, social systems, financial systems, and so forth. Both books encourage paying a little bit more attention to things that we often take for granted.&lt;/p&gt;
&lt;p&gt;For example this morning I tried to log into my DeepSeek account which I hadn’t used in ages. I’d forgotten the password and I wanted to reset it. But I also wasn’t sure which email I signed up with. So I used the email I use most often, and received a reset code. When I attempted to use this code I received an error message that said the email was not registered on the platform. I retried with another email and that one worked.&lt;/p&gt;
&lt;p&gt;This is inconsistent with how most web platforms work. The standard way is that if an email is not in the database it doesn’t get a reset code.  If any email in the world can be sent a DeepSeek reset code regardless of whether that email has an account associated with it or not this can easily turn into a spamming activity.&lt;/p&gt;
&lt;p&gt;Would I have noticed this prior to reading &lt;em&gt;Don’t Make Me Think&lt;/em&gt; and Dan Luu’s essay? I doubt.&lt;/p&gt;
&lt;p&gt;I find that I agree with Dan Luu that there are a lot of bugs and inconsistencies in any software (and consequently exploits). After all software is really just an abstraction of the real world implemented via the programmer’s own theory of that real world. Yet all &lt;a href=&quot;https://www.joelonsoftware.com/2002/11/11/the-law-of-leaky-abstractions/&quot;&gt;abstractions are leaky&lt;/a&gt; and so it seems to me that there will always be some edge cases that cannot be codified, at least not on a level that makes economic sense.&lt;/p&gt;
&lt;p&gt;If &lt;em&gt;all&lt;/em&gt; software is bug-ridden we either don’t notice the bugs or we ignore them and try something else.&lt;/p&gt;
&lt;p&gt;Krug points  this out in his book - users rarely use software the way its designers imagine they will, they just sort of stumble along, trying out what they think should work. If something doesn’t work they might try again - for example by navigating to the home page and trying again - and if too many things dont work, or the time cost is too high, they might abandon the task altogether.&lt;/p&gt;
&lt;p&gt;So there will always be bugs. And some people, whether by disposition, training, or habit will see more of them than others.&lt;/p&gt;</content:encoded><category>software</category><category>bugs</category><category>software design</category><category>user experience</category><category>books</category></item><item><title>What I read in August and July</title><link>https://tawanda.dev/reading-august-july-2026/</link><guid isPermaLink="true">https://tawanda.dev/reading-august-july-2026/</guid><description>&quot;Don&apos;t Make Me Think&quot;, &quot;A Hacker&apos;s Mind&quot;, and other books I read (and listened to) in August and July 2026</description><pubDate>Mon, 07 Sep 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Here’s what I read in August and July:&lt;/p&gt;
&lt;h2 id=&quot;august&quot;&gt;August&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;The Mind Illuminated&lt;/em&gt; by Culadasa.
I read this book two years ago and it’s the best book on meditation I’ve come across. Since I’d fallen off my practice, I figured it was time for a reread so I listened to an audio version on my walks.  More than any other book or resource, this book explains the process of meditation and the changes that happen in the mind as one progresses on the path. Especially helpful are the different, progressively complicated mind models that help conceptualise the mind. Highly recommended.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Don’t Make Me Think&lt;/em&gt; by Steve Krug.
I read this short book on design in preparation for a work task for a product engineering role. It’s short enough that I finished it in an afternoon, but the lessons are invaluable. Most of the advice seems obvious, but I think that’s the genius of it. Once you read it, you start seeing how many products could be easily improved by following simple rules.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The Life of Greece&lt;/em&gt; by Will Durant.
Still going through this. Durant traces Greek history from prehistoric times through Homer up to the classical period. A very good read, well-written, and thoroughly researched. Durant is a great writer and makes what might otherwise be dry reading a pleasure.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;A Hacker’s Mind&lt;/em&gt; by Bruce Schneier.
Another of my walking companions. A good book about how a lot of systems are hackable, from social systems to political to economic, and obviously computer systems. Hacking, Schneier says, is when a system is used in a way that it allows, but which its creators didn’t intend. He gives lots of interesting examples including tax hacks, filibusters, economic hacks, and more. This was an enjoyable light &lt;del&gt;read&lt;/del&gt; listen, and since I’ve listened to this I’ve been seeing some random exploits all over including one that has saved me a few hundred dollars.&lt;/p&gt;
&lt;p&gt;As the author stresses, we must see hacks for what they are - gaps in codification - and keep an open mind when assessing them.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Good Economics for Hard Times&lt;/em&gt; by Abhijit Banerjee and Esther Duflo.
To prepare for my Good Economics for Hard Times course final exam, I read the eponymous book by the course instructors. Like the course the book is a tour of the economic issues of the day - migration, climate change, government, economic growth, trade, inequality, and social policy - without the maths and diagrams of, say Macroeconomics or Microeconomics. It’s extremely well written and helped solidify my understanding of the course material.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The Poet Empress&lt;/em&gt; by Shen Tao.
A pretty good fantasy book. Slightly different from my usual fantasy picks, but I thoroughly enjoyed it.&lt;/p&gt;
&lt;h2 id=&quot;july&quot;&gt;July&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;Designing Data-Intensive Applications&lt;/em&gt; by Martin Kleppmann.
I listened to DDIA on my walks to improve my distributed systems knowledge as I am exploring roles in AI infrastructure. As it turned out I had an interview where I was grateful that I was familiar with some database stuff such as replication, sharding, and transactions. Excellent book, I will definitely return.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The Extinction of Experience&lt;/em&gt; by Christine Rosen.
Also listened to this on my walks. &lt;em&gt;The Extinction of Experience&lt;/em&gt; is about how unmediated experience is disappearing in the modern world, as digital devices take over. As a result we’ve been totally transformed - we are less patient, we are unable to tolerate boredom, we are losing essential social and physical skills - and this looks like it’ll only get worse. After listening to this book I drastically cut down my social media usage, resolved to be more “in
the world”, and more mindful of how I spend my time.&lt;/p&gt;
&lt;h2 id=&quot;rereads&quot;&gt;Rereads&lt;/h2&gt;
&lt;p&gt;I also read (and reread) some of Plutarch’s essays in &lt;em&gt;Moralia&lt;/em&gt;, some of Montaigne’s &lt;em&gt;Essays&lt;/em&gt;, and bits of Mencius.&lt;/p&gt;</content:encoded><category>books</category><category>reading-list</category><category>reviews</category></item><item><title>Three in the Morning</title><link>https://tawanda.dev/three-in-the-morning/</link><guid isPermaLink="true">https://tawanda.dev/three-in-the-morning/</guid><description>Patience, waiting, and Zhuangzi on the sameness of things</description><pubDate>Fri, 31 Jul 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;During my walks last week I listened to Christine Rosen’s &lt;em&gt;The Extinction of Experience&lt;/em&gt;. It’s an interesting book which argues that in the modern “mediated” world our normal experience of reality is dying. We notice less, we use our bodies less, we interact with our immediate environments less and we are way more impatient.&lt;/p&gt;
&lt;p&gt;Nowadays a buffering video or a delay of a few milliseconds when a web page loads will leave many of us frustrated. We struggle to wait in line or chat with people next to us. All interstitial time is to be filled, boredom banished.&lt;/p&gt;
&lt;p&gt;There is an anecdote told in the book of a problem faced by airport operators in Houston. Customers complained about wait times because they walked one minute to baggage reclaim and waited there for seven minutes. So someone thought to reverse this — they implemented a longer walk and a shorter wait. Complaints plummeted.&lt;/p&gt;
&lt;p&gt;I was reminded of Zhuangzi’s parable, &lt;em&gt;Three in the Morning&lt;/em&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;But to wear out your brain trying to make things into one without realizing that they are all the same—this is called “three in the morning.” What do I mean by “three in the morning”? When the monkey trainer was handing out acorns, he said, “You get three in the morning and four at night.” This made all the monkeys furious. “Well, then,” he said, “you get four in the morning and three at night.” The monkeys were all delighted. There was no change in the reality behind the words, and yet the monkeys responded with joy and anger.&lt;/p&gt;
&lt;p&gt;— Zhuangzi, &lt;em&gt;Zhuangzi&lt;/em&gt;, ch. 2, “Discussion on Making All Things Equal” (trans. Burton Watson)&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><category>books</category><category>zhuangzi</category><category>philosophy</category><category>quotes</category></item><item><title>I Asked a Retailer&apos;s Chatbot What to Do About a Complaint. It Told Me to Sue.</title><link>https://tawanda.dev/ai-chatbot-insecure-zimbabwe/</link><guid isPermaLink="true">https://tawanda.dev/ai-chatbot-insecure-zimbabwe/</guid><description>A retail chatbot recommends taking legal action against the company. A look at how brittle AI deployments can be, and some solutions.</description><pubDate>Mon, 30 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;While shopping for some household items, I asked Tina*, their chatbot, what to do about a faulty product that the manager had refused to take back. The bot helpfully provided me with a complaints form and a link to their returns policy.&lt;/p&gt;
&lt;p&gt;I pushed further. I told her I had already done all of that with no success. What other options did I have?&lt;/p&gt;
&lt;p&gt;She recommended legal action against the store.&lt;/p&gt;
&lt;p&gt;Initially I had been shopping for household items and wanted to ask about delivery options. But I was also just curious about how AI agents and bots are being deployed, especially in Africa, and their behaviour in the wild, as this in an area of professional interest.&lt;/p&gt;
&lt;p&gt;I asked Tina to reverse a linked list in python and she did. I asked her to write a thousand word essay on the fallout between Pompey and Caesar. She began:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The rivalry between Gnaeus Pompeius Magnus (Pompey the Great) and Gaius Julius Caesar was one of the most defining conflicts in Roman history. It marked the transition from the Roman Republic to the Roman Empire, reshaping Rome’s political landscape and leaving a legacy that influenced governance for centuries.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I asked her to write a letter to my landlord asking for rent extension on account of having spent all my money on this particular store. She wrote it without hesitation.&lt;/p&gt;
&lt;p&gt;Then I hacked the system prompt using techniques that have been publicly documented for years and that worked too.&lt;/p&gt;
&lt;p&gt;So I set out to test how widespread this is.&lt;/p&gt;
&lt;h2 id=&quot;how-chatbots-are-being-deployed&quot;&gt;How chatbots are being deployed&lt;/h2&gt;
&lt;p&gt;Tina is not an outlier. Looking around several Zimbabwean retail sites it appears the pattern for deploying chatbots is: Find an LLM/AI Chat provider, throw in an API key, drop a chat widget on the website, give it a name, and let the bot get to work. No guardrails. No scope restrictions.No testing.&lt;/p&gt;
&lt;p&gt;The result are bots that do not behave as assistants for a particular company, but as general purpose systems equally happy to recommend a competitor, write Python code, discuss ancient history, or advise your customers to take you to court.&lt;/p&gt;
&lt;p&gt;And this leads to lots of easily fixed issues, some detailed below.&lt;/p&gt;
&lt;h2 id=&quot;the-problems&quot;&gt;The problems&lt;/h2&gt;
&lt;p&gt;Poor chatbot/agent implementations cause issues such as:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The bot answers everything&lt;/strong&gt;
The bots will answer any and all questions. They have no idea of their role, no boundaries between what they know and what they ought to do. They do things that no business would authorise.&lt;/p&gt;
&lt;p&gt;Good practice is to tighten scope, as this keeps the conversation focused and minimises vulnerabilities. A good chatbot must have a clearly defined identity, gently steering the customer to its core business.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You’re paying for it&lt;/strong&gt;
AI models are not free. The cost goes up with requests, and longer, more complex questions cost more money.  When a chatbot solves code, or writes thousands of words on the battle of Pharsalus, it consumes a lot of tokens. Multiply this across every user who discovers this vulnerability and you get a hefty bill with zero business return.&lt;/p&gt;
&lt;p&gt;In fact this particular chatbot could be used for research purposes, or other work, for free. When I generated the essay on Caesar, and drafted a letter to my landlord, the business paid for it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The bots are not connected to reality&lt;/strong&gt;
I found many chatbots are not grounded in realtime data (some perform a limited scraping of the website to find information). They give responses that don’t make any business sense or respond with false information, coming up with generic products and using descriptions from their training data instead of company data.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Brand damage&lt;/strong&gt;
When I asked one bot to compare its products with that of a rival firm that I said was closer to my house it gave a balanced comparison, suggesting that I should order from the closer store. The AI assistant, in being helpful, was actively working against the business that deployed her.&lt;/p&gt;
&lt;p&gt;If you think of your chatbot as an employee, which you should, then this behaviour is damaging to your brand and totally unacceptable. No company would tolerate this from a from a human worker, and that same standard must be applied to chatbots.&lt;/p&gt;
&lt;h2 id=&quot;how-to-think-about-deploying-chatbotsai-agents-that-work-for-you&quot;&gt;How to think about deploying chatbots/ai agents that work for you&lt;/h2&gt;
&lt;p&gt;While rapid advances in AI capabilities mean that vulnerabilities are discovered each day,  there are some general techniques that can make agents more reliable.&lt;/p&gt;
&lt;p&gt;A good way of thinking about AI deployments is to think in terms of reliability. In safety-critical fields like aviation, nuclear energy, or industrial automation, reliability means four things: consistency, robustness, predictability, and safety.  A reliable system behaves the same way for the same inputs, resists being pushed of course, does what you expect, and doesn’t cause harm.&lt;/p&gt;
&lt;p&gt;For most chatbots a couple of changes would greatly improve their reliability:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A robust system prompt&lt;/strong&gt; - The persona of the chatbot should be clearly defined, with a clear role, behaviour, and safety guardrails. It must specify the bot’s tone, what to refuse, when and how to call external tools, and graceful fallback behaviour.&lt;/p&gt;
&lt;p&gt;A weak system prompt says, “&lt;em&gt;You are Tina, a helpful assistant for JJ’s Electronics&lt;/em&gt;” whereas a good prompt might say:&lt;/p&gt;
&lt;p&gt;“&lt;em&gt;You are Tina, the customer service assistant for JJ’s Electronics. You help customers with product questions, delivery, and returns. You do not answer questions outside this scope. If asked about anything unrelated to our products or services, politely explain that you can only assist with store-related queries. Never recommend legal action. Never recommend competitors.&lt;/em&gt;”&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;An input/intent classifier&lt;/strong&gt; - A smaller model to check the whether the input is within scope. Off-topic messages get a polite refusal and never consume tokens.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Access to real company data&lt;/strong&gt; - Chatbots perform vastly better when they have more relevant company information rather than generic model data. Therefore the chatbot should be  connected to external knowledge sources, for example the company docs or inventory using Retrieval Augmented Generation (RAG). This minimises hallucinations about products availability, pricing, and other cases of poor business logic.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Access to tools&lt;/strong&gt; - Tools allow agents to pull in additional context as they work.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Rate limiting&lt;/strong&gt; -Developers must limit tokens per user or session and set a reasonable context window length to prevent huge API costs. A genuine user looking to buy a TV need not generate responses thousands of words long.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Evaluation&lt;/strong&gt; - It is critical to test how your chatbot behaves with adversarial prompts and in edge cases both before deployment and after. Additionally it’s important to track key metrics like refusal rates and read chat transcripts to identify evaluation gaps.&lt;/p&gt;
&lt;h2 id=&quot;closing-thoughts&quot;&gt;Closing thoughts&lt;/h2&gt;
&lt;p&gt;Tina is still live as I write this, burning through tokens, happily discussing any topic thrown at her,  recommending rival products, and occasionally suggesting litigation. So are most of the other chatbots I looked at.&lt;/p&gt;
&lt;p&gt;Given that chatbots are becoming an increasingly popular way for customers to interact with businesses, they must be carefully designed so that they promote your business instead of harming it.&lt;/p&gt;</content:encoded><category>ai</category><category>chatbots</category><category>ai deployment</category><category>zimbabwe</category><category>prompt injection</category></item><item><title>Ecocash App UX Teardown: The Hidden Cost of Checking Your Balance</title><link>https://tawanda.dev/ecocash-app-ux-teardown/</link><guid isPermaLink="true">https://tawanda.dev/ecocash-app-ux-teardown/</guid><description>On the EcoCash app&apos;s UX, particularly its approach to balance visibility, and recommendations for improvement.</description><pubDate>Wed, 23 Apr 2025 00:00:00 GMT</pubDate><content:encoded>&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;In Zimbabwe, EcoCash isn’t just another mobile payment system - it’s financial infrastructure. Since its launch in 2011, this mobile money service has become the backbone of Zimbabwe’s economy, processing millions of transactions in a country where cash shortages and banking challenges have been persistent issues. Given its ubiquity, EcoCash has transcended being merely an app to become an essential utility for Zimbabweans.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&quot;EcoCash Booth&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;auto&quot; width=&quot;678&quot; height=&quot;381&quot; src=&quot;https://tawanda.dev/_astro/EcoCash.DXVNaoLJ_1IWIsz.webp&quot; &gt;&lt;/p&gt;
&lt;p&gt;EcoCash offers two primary interfaces: the original USSD (Unstructured Supplementary Service Data) menu system accessible from any basic mobile phone, and the more recent smartphone application. While both serve the same fundamental purpose - enabling users to send money, buy airtime, pay bills, and access other financial services - they deliver notably different user experiences, particularly in how they handle one crucial piece of information: your account balance.&lt;/p&gt;
&lt;p&gt;Unlike standard banking apps globally that prominently display your current balance, the EcoCash app hides this essential information by default, requiring users to make a specific (and paid) request to view it. This design choice creates a jarring inconsistency with both user expectations and the service’s own USSD experience, ultimately undermining the very convenience the app promises to deliver. This post goes into why this approach creates a frustrating user experience and deviates from established usability best practices.&lt;/p&gt;
&lt;h2 id=&quot;contrasting-user-journeys-checking-the-balance&quot;&gt;Contrasting User Journeys: Checking the Balance&lt;/h2&gt;
&lt;p&gt;Understanding the user experience requires comparing the two primary methods EcoCash offers:&lt;/p&gt;
&lt;h3 id=&quot;the-ussd-experience&quot;&gt;The USSD Experience&lt;/h3&gt;
&lt;p&gt;When using EcoCash through its USSD menu, a user dials &lt;code&gt;*151#&lt;/code&gt; and navigates through a series of text menus by entering corresponding numbers. The process is functional, widely accessible, if somewhat primitive by today’s graphical standards. Crucially, after completing any transaction - whether sending money, buying airtime, or paying a merchant - the user automatically receives a &lt;em&gt;free&lt;/em&gt; SMS confirmation message that includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Transaction details (type, amount, recipient)&lt;/li&gt;
&lt;li&gt;Transaction ID&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The updated account balance&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This final piece of information is vital. Without any additional steps or costs, USSD users maintain constant awareness of their financial standing after every interaction with the service.&lt;/p&gt;
&lt;h3 id=&quot;the-app-experience&quot;&gt;The App Experience&lt;/h3&gt;
&lt;p&gt;The EcoCash mobile application presents a more modern, graphical interface with colorful icons and a streamlined navigation system. Users log in through biometrics or a PIN and can quickly access various services through the dashboard. However, something important is conspicuously absent: there is no readily visible account balance anywhere on the main screen upon login. Instead you have the currency followed by asterik (*) placeholders.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&quot;EcoCash App Dashboard&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;auto&quot; width=&quot;350&quot; height=&quot;589&quot; src=&quot;https://tawanda.dev/_astro/ecocashUI.DUhTKbkz_Z1KSxzX.webp&quot; &gt;&lt;/p&gt;
&lt;p&gt;To check their balance, app users must typically:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Click a button in front of the hidden balance&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Incur a fee for requesting this information&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;View the balance (and also get an SMS)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The button to check the balance does not have any confirmation of whether you want to check the balance, nor does it tell you that you will be charged. In fact one way that users notice that they are being charged is that if they keep clicking the button, the balance keeps decreasing.&lt;/p&gt;
&lt;p&gt;While users still receive SMS confirmations after transactions (provided the linked SIM is active and has network coverage), there is no immediate, free, &lt;em&gt;in-app&lt;/em&gt; display of this critical data before or easily after performing an action. The app functions well as a transaction initiation tool but falls short as a comprehensive financial management interface where balance visibility is concerned.&lt;/p&gt;
&lt;h3 id=&quot;the-core-discrepancy&quot;&gt;The Core Discrepancy&lt;/h3&gt;
&lt;p&gt;This creates a fundamental inconsistency within the EcoCash ecosystem:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;USSD users:&lt;/strong&gt; Receive free, automatic balance updates via SMS after every transaction.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;App users:&lt;/strong&gt; Must perform a manual, paid request for balance information, often relying on an external SMS for the result rather than instant in-app feedback.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This discrepancy becomes even more problematic when considering that the smartphone app - theoretically the more advanced and user-friendly interface - actually provides &lt;em&gt;less&lt;/em&gt; immediate financial visibility than its USSD counterpart.&lt;/p&gt;
&lt;h2 id=&quot;ux-analysis-why-this-approach-falls-short&quot;&gt;UX Analysis: Why This Approach Falls Short&lt;/h2&gt;
&lt;p&gt;This design choice doesn’t just feel inconvenient; it stands in stark contrast to global standards and violates core usability principles.&lt;/p&gt;
&lt;h3 id=&quot;1-deviation-from-norms-and-user-expectations&quot;&gt;1. Deviation from Norms and User Expectations&lt;/h3&gt;
&lt;p&gt;The EcoCash app’s balance handling is an outlier. Whether examining traditional banking apps (like Standard Bank, ABSA, etc.), established fintech services (PayPal, Wise), neobanks (Revolut), or even competing mobile money platforms (InnBucks), the pattern is overwhelmingly clear: account balances are considered essential information, prominently displayed upon login, and updated automatically (or easily refreshed for free).&lt;/p&gt;
&lt;p&gt;&lt;img alt=&quot;Collage of Various Apps&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;auto&quot; width=&quot;720&quot; height=&quot;468&quot; src=&quot;https://tawanda.dev/_astro/collage.nyRDUcWR_ZYd79t.webp&quot; &gt;
&lt;em&gt;Image collage of various apps showing balance visibility&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;This global standard sets a strong user expectation. The EcoCash app’s deviation creates cognitive dissonance for users interacting with multiple financial services - they must constantly adjust their expectations and interaction models, adding unnecessary mental load.&lt;/p&gt;
&lt;h3 id=&quot;2-violation-of-core-usability-principles&quot;&gt;2. Violation of Core Usability Principles&lt;/h3&gt;
&lt;p&gt;Several fundamental usability heuristics are violated:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Visibility of System Status:&lt;/strong&gt; Popularized by Jakob Nielsen, this principle states systems should “always keep users informed about what is going on.” In a financial application, the account balance is arguably the &lt;em&gt;most&lt;/em&gt; critical status indicator. Hiding it or placing it behind a paywall directly violates this, leaving users uncertain about their financial state within the system.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;User Control and Freedom:&lt;/strong&gt; Charging for balance inquiries effectively places a toll gate between users and their own financial data. This diminishes user autonomy and creates an artificial barrier to information essential for informed decision-making. Users should have unfettered, free access to understand their own financial position at any time.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Efficiency and Friction:&lt;/strong&gt; The multi-step, paid process to check a balance introduces significant friction into what should be one of the most basic and frequent interactions. This inefficiency runs counter to the app’s goal of streamlining financial management.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;3-the-app-only-users-dilemma&quot;&gt;3. The “App-Only” User’s Dilemma&lt;/h3&gt;
&lt;p&gt;This UX issue becomes particularly acute for specific user groups who rely solely on the app interface:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Zimbabwean Diaspora:&lt;/strong&gt; Maintaining EcoCash accounts but using foreign SIM cards, thus not receiving the balance SMS reliably.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Users with Lost/Damaged SIMs:&lt;/strong&gt; Able to access the app via Wi-Fi but unable to receive SMS confirmations.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Users in Poor Network Areas:&lt;/strong&gt; Having internet access (Wi-Fi) but unreliable mobile network coverage for SMS.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These app-only users face a compounded challenge: they are entirely dependent on the paid in-app balance inquiry feature, effectively creating a class of users penalized for their circumstances.&lt;/p&gt;
&lt;h3 id=&quot;4-impact-on-trust--transparency&quot;&gt;4. Impact on Trust &amp;#x26; Transparency&lt;/h3&gt;
&lt;p&gt;Financial services hinge on user trust. By placing essential balance information behind a paywall, EcoCash inadvertently sends a troubling message that transparency might come at a price. This practice can be perceived as “nickel-and-diming” and runs counter to the trust-building transparency prioritized by most successful financial services.&lt;/p&gt;
&lt;h2 id=&quot;the-ripple-effect-user-impact-and-consequences&quot;&gt;The Ripple Effect: User Impact and Consequences&lt;/h2&gt;
&lt;p&gt;The consequences of this design decision extend far beyond simple inconvenience, creating tangible negative impacts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Increased Cognitive Load:&lt;/strong&gt; Users must mentally track their approximate account status, increasing mental effort and the likelihood of miscalculation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Potential for Transaction Errors:&lt;/strong&gt; Uncertainty about funds increases the risk of failed transactions due to insufficient balance, causing frustration and potential real-world problems.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Financial Anxiety and Hesitation:&lt;/strong&gt; Not knowing one’s exact balance can breed anxiety, causing users to hesitate before making necessary transactions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Accumulation of Micro-Costs:&lt;/strong&gt; Individual fees accumulate, penalizing users for attempting to be financially aware and responsible.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;General User Frustration:&lt;/strong&gt; The combined effect damages the overall app experience and brand perception, potentially driving users back to USSD or towards alternatives.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;recommendations-for-improvement&quot;&gt;Recommendations for Improvement&lt;/h2&gt;
&lt;p&gt;Addressing this UX flaw involves adopting standard, user-centric practices:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Recommendation 1: Display Balance Freely on Dashboard:&lt;/strong&gt; The most crucial change. Show the current account balance clearly and prominently on the app’s main dashboard immediately after login.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Recommendation 2: Implement Free In-App Balance Refresh:&lt;/strong&gt; Include a simple, free mechanism (e.g., a pull-to-refresh gesture or a dedicated refresh button) allowing users to update their balance information within the app at any time.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Recommendation 3: Provide Immediate In-App Confirmations:&lt;/strong&gt; While SMS confirmations are useful records, the app &lt;em&gt;must&lt;/em&gt; also display transaction confirmations &lt;em&gt;with the updated balance&lt;/em&gt; directly within the interface immediately after a transaction is completed.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;benefits-of-implementation&quot;&gt;Benefits of Implementation:&lt;/h3&gt;
&lt;p&gt;These changes, relatively straightforward from a technical perspective, would yield significant benefits:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Improved User Satisfaction:&lt;/strong&gt; Aligning with user expectations and reducing frustration.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Enhanced Transparency &amp;#x26; Trust:&lt;/strong&gt; Removing barriers to essential information builds user confidence.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reduced Friction:&lt;/strong&gt; Streamlining common user tasks and improving efficiency.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Greater Inclusivity:&lt;/strong&gt; Providing a better experience for all users, especially app-only segments.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Strengthened Competitive Positioning:&lt;/strong&gt; Aligning the app with modern fintech standards.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;conclusion-prioritizing-user-centricity&quot;&gt;Conclusion: Prioritizing User-Centricity&lt;/h2&gt;
&lt;p&gt;EcoCash has undeniably revolutionized financial access in Zimbabwe. However, its mobile application’s current approach to balance visibility represents a significant UX shortcoming that undermines its potential. By hiding essential financial information and charging for access, the app creates unnecessary friction, deviates from global best practices, and risks eroding user trust.&lt;/p&gt;
&lt;p&gt;Adopting the straightforward recommendations outlined above - displaying the balance freely, allowing easy refreshes, and providing immediate in-app confirmations - would dramatically improve the user experience. As financial technology continues to evolve, user-centric design choices like these are not just niceties; they are fundamental to maintaining relevance and user loyalty.&lt;/p&gt;
&lt;p&gt;For EcoCash to fully deliver on its promise of convenient, accessible financial services via its app, it must recognize that transparency regarding a user’s own balance shouldn’t be a premium feature, but a standard, freely accessible right. In the realm of digital finance, knowing where you stand shouldn’t come at an extra cost.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;(What are your experiences checking balances on mobile money apps in Zimbabwe or elsewhere? Share your thoughts!)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Disclaimer:&lt;/strong&gt; This analysis is based on publicly described user experiences and standard usability principles as of April 2025. Features and interfaces may change with future updates. The author is not affiliated with EcoCash or its parent company.&lt;/p&gt;</content:encoded><category>technical writing</category><category>user experience</category><category>ecocash</category><category>ux</category></item><item><title>What I am reading in April</title><link>https://tawanda.dev/reading-april-2025/</link><guid isPermaLink="true">https://tawanda.dev/reading-april-2025/</guid><description>&quot;The Histories&quot; by Herodotus, &quot;Work&quot;, and other books I am reading in April 2025</description><pubDate>Tue, 01 Apr 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Here’s what I am reading this month, April 2025:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Histories&lt;/strong&gt; by Herodotus.
I read The Histories a year or so ago but I find myself drawn back to the world’s oldest history book. There is something there in the stories of long dead kings and generals, forgotten empires, and old myths that I find myself thinking about long after reading. I suspect part of it is the commonality of some aspects of human life - love, power, hate, treachery, revenge, regret, feuds - that has hardly changed in 2500 years.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Work: A History of How We Spend Our Time&lt;/strong&gt; by James Suzman.
Have been reading this book for some months. I pick it up and put it down again, and then return once more, and repeat. It’s a book about the history of work, and how humans have been shaped by it, especially after the advent of agriculture. It makes interesting reading now in the AI age, where machines threaten to take over all jobs. What, then, shall become of work, and us?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;AI Engineering&lt;/strong&gt; by Chip Huyen.
AI has taken the world by storm, and I thought I might as well learn a thing or two about AI Engineering. Slowly going through this book and learning a lot.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Updated 01/04/25&lt;/p&gt;</content:encoded><category>books</category><category>reading-list</category><category>reviews</category></item><item><title>Observations on Vibe Coding</title><link>https://tawanda.dev/on-vibe-coding/</link><guid isPermaLink="true">https://tawanda.dev/on-vibe-coding/</guid><description>Some thoughts on building software through prompting alone.</description><pubDate>Mon, 31 Mar 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I have been using AI to help me in programming for some time now, but I have largely used in tightly scoped instances was well defined, and small contexts.&lt;/p&gt;
&lt;p&gt;However, given the rapid improvement of the capabilities of Large Language Models (LLMs), and the recent release of Gemini 2.5 (which is available for free the first month), I decided to test it out to build a website without thinking too much about it aka vibe coding.&lt;/p&gt;
&lt;p&gt;Using only prompts, I was able to build an entire site in Next.js. Gemini was able to come up with templates, and write good CSS in Tailwind. The site is responsive, loads fast, and looks decent.&lt;/p&gt;
&lt;p&gt;However occasionally I had to correct Gemini, edit the prompts, and also look through the code to better describe my goals. The following are some observations I made while using Gemini for vibe coding:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;AI tools are very good but not perfect&lt;/strong&gt;. While they can generate code quickly, sometimes they make mistakes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;You still need to know how to code&lt;/strong&gt;. AI tools can help you write code, but they don’t replace the need for a solid understanding of programming concepts. As the application grows it often increases in complexity, and the AI won’t be able to keep up. Additionally the application might break, or develop bugs, and without an understanding of programming and the code this might be impossible to resolve.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AI tools can help you learn&lt;/strong&gt;. If you’re new to programming, or a framework,  AI tools can be a great way to learn. They can help you understand how to write code, and they can also help you learn new programming languages and frameworks. Gemini’s “thinking” process is a very good way of seeing how problems are logically broken down and then solved systematically.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AI tools can help you prototype&lt;/strong&gt;. If you are working on a new project AI can be a great way to quickly prototype. With very little effort you can get a working prototype up and running, on which you can then iterate. This is very useful for soundboarding ideas, and getting feedback from users.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AI tools help overcome procrastination&lt;/strong&gt;. If you are struggling to get started on a project, AI tools can help you overcome procrastination. By providing you with a starting point, they can help you get the ball rolling and make it easier to continue working on your project.&lt;/li&gt;
&lt;/ol&gt;</content:encoded><category>ai</category><category>javascript</category><category>programming</category><category>gemini</category><category>claude</category></item><item><title>From Proposal to Browser: Implementing JavaScript Features in Firefox</title><link>https://tawanda.dev/implementing-javascript-proposal-in-firefox/</link><guid isPermaLink="true">https://tawanda.dev/implementing-javascript-proposal-in-firefox/</guid><description>Notes on implementing JavaScript features in Firefox.</description><pubDate>Tue, 15 Oct 2024 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;[!NOTE] This post is the first in a series of posts about implementing a new JavaScript proposal in the Firefox Web Browser&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;I have always been fascinated by how the web works, particularly web browsers. Recently, as part of Outreachy, I got an opportunity to contribute to implementing a new JavaScript proposal in the Firefox web browser.&lt;/p&gt;
&lt;p&gt;This series of posts documents the process of implementing a new JavaScript proposal in the Firefox web browser. It aims to give insights into the process, challenges, and learning opportunities involved in contributing to a major open source project.&lt;/p&gt;
&lt;p&gt;My motivation goes beyond the thrill of diving deep into browser internals and web standards, I believe that understanding how language features are implemented makes us better developers. It gives us a deeper appreciation for the tools we use daily, and empowers us to contribute to the evolution of the wonderful invention that is the web.&lt;/p&gt;
&lt;h2 id=&quot;the-evolution-of-javascript&quot;&gt;The Evolution of JavaScript&lt;/h2&gt;
&lt;p&gt;JavaScript (more formally ECMAScript) is the programming language that allows us to have interactivity in web pages.  Besides web browsers, JavaScript also works in other environments like Node.js and in embedded systems.&lt;/p&gt;
&lt;h3 id=&quot;the-ecmascript-specification&quot;&gt;The ECMAScript Specification&lt;/h3&gt;
&lt;p&gt;How JavaScript behaves in all these environments, the functionality it has etc is  formally specified as the ECMAScript Specification. This specification is overseen by a body called  TC39 which is responsible for maintaining and evolving the language.&lt;/p&gt;
&lt;h3 id=&quot;the-tc39-process&quot;&gt;The TC39 Process&lt;/h3&gt;
&lt;p&gt;Ecma &lt;a href=&quot;https://ecma-international.org/technical-committees/tc39/&quot;&gt;TC39&lt;/a&gt; (Technical Committee 39) is responsible for evolving the ECMAScript programming language and authoring the specification. The committee operates by consensus and has discretion to alter the specification as it sees fit. However, the general process for making changes to the specification is as follows. [^2]&lt;/p&gt;
&lt;p&gt;Changes to the language, called proposals, go through a process that provides guidelines for evolving from an idea to a ully specified feature complete with tests and multiple implementations. There are six stages: a strawperson stage and five maturity stages, and the committee must approve acceptance for each stage.&lt;/p&gt;
&lt;p&gt;When these proposals pass they are implemented in the web browser so that the new functionality is available to users in JavaScript environments.&lt;/p&gt;
&lt;h3 id=&quot;recent-javascript-proposals&quot;&gt;Recent JavaScript Proposals&lt;/h3&gt;
&lt;p&gt;Below are two proposals at Stage 2, which means they are expected to become part of the spec.&lt;/p&gt;
&lt;h4 id=&quot;1-joint-iteration&quot;&gt;1. &lt;a href=&quot;https://github.com/tc39/proposal-joint-iteration&quot;&gt;Joint Iteration&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;This proposal is “to synchronise the advancement of multiple iterators”. While that might sound inscrutable, this proposal intends to add functionality to programmatically operate over multiple Iterators (think arrays). The most common example I can think of is &lt;code&gt;zip&lt;/code&gt; in many languages like Python, where you can do something like:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;python&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;x &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; [&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;y &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; [&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;6&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;zipped &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; zip&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(x, y)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;list&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(zipped))&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;[(&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;), (&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;), (&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;6&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Currently you cannot do this in JavaScript without third party libraries.&lt;/p&gt;
&lt;h4 id=&quot;2-iteratorrange&quot;&gt;2. &lt;a href=&quot;https://github.com/tc39/proposal-iterator.range&quot;&gt;Iterator.range&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;This proposal is for adding &lt;code&gt;Iterator.range&lt;/code&gt; to JavaScript. Again I will give a Python example to show what this means.&lt;/p&gt;
&lt;p&gt;In Python you can do something like:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;python&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; range&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;	print&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 2&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;output:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;4&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;6&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is such useful thing to do that there are countless questions about how to do it online, and plenty of third party libraries that make it possible.&lt;/p&gt;
&lt;p&gt;Now, when a proposal is accepted it should be added to the JavaScript engine. Let us take a quick overview of the structure of web browsers.&lt;/p&gt;
&lt;h2 id=&quot;the-anatomy-of-a-web-browser&quot;&gt;The Anatomy of a Web Browser&lt;/h2&gt;
&lt;p&gt;Web browsers are perhaps the most widely distributed software in the world, being on virtually every modern smartphone, smart TV, watches, computers and other embedded systems.&lt;/p&gt;
&lt;p&gt;While there are many browsers such as Firefox, Chrome and Safari, the  functionality is more or less the same:  The primary function is to is to locate and retrieve web pages, images, videos, documents, and other files from servers and display them on the user’s device. [^1] So the browser will have parts that make and interpret network requests, and parts that render the fetched resources. There is functionality to render the resources for example parsing the HTML, drawing out the CSS and executing JavaScript&lt;/p&gt;
&lt;p&gt;The part of the browser that executes JavaScript code is called the JavaScript engine and there are different ones in different browsers- Chromium based browsers such as Chrome, Edge, and Brave use V8, Firefox uses SpiderMonkey, and Safari uses JavaScriptCore.&lt;/p&gt;
&lt;p&gt;Now when a new proposal passes at TC39 the functionality it describes is added to the browser engine. This series of posts describes how a new proposal is implemented in the Firefox web browser (more specifically in SpiderMonkey)&lt;/p&gt;
&lt;h2 id=&quot;the-proposal-implementation-process&quot;&gt;The Proposal Implementation Process&lt;/h2&gt;
&lt;p&gt;Implementing a proposal in a JavaScript engine is a lengthy process that involves multiple steps such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Understanding the proposal: Reviewing the specification and test cases&lt;/li&gt;
&lt;li&gt;Planning the implementation: Determining where and how to add the new feature in the existing codebase&lt;/li&gt;
&lt;li&gt;Coding: Writing the actual implementation&lt;/li&gt;
&lt;li&gt;Code Review: Getting feedback from other core developers&lt;/li&gt;
&lt;li&gt;Testing: Testing to see if the implementation is correct&lt;/li&gt;
&lt;li&gt;Performance optimization: Ensuring the new feature does not affect performance&lt;/li&gt;
&lt;li&gt;Integration: Merging the new feature into the main codebase&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Throughout this series we’ll dive into each of these steps using a real proposal as a case study.&lt;/p&gt;
&lt;h2 id=&quot;series-overview&quot;&gt;Series Overview&lt;/h2&gt;
&lt;p&gt;This series will cover:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Setting up the Firefox development environment:&lt;/strong&gt; How to get started with Firefox development, how to submit code, &lt;code&gt;moz phab&lt;/code&gt;, code reviews, and the nuances of using Git over Mercurial with &lt;code&gt;git cinnabar&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Understanding SpiderMonkey&lt;/strong&gt;: An overview of Firefox’s JavaScript engine&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Implementing the Proposal&lt;/strong&gt;: A walkthrough of adding a new feature to SpiderMonkey&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Testing and Debugging&lt;/strong&gt;: Insights into testing and debugging methodologies for web browsers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Lessons and reflections&lt;/strong&gt;: What I learnt from this experience&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;whats-next&quot;&gt;What’s Next&lt;/h2&gt;
&lt;p&gt;In the next post, we’ll dive deep into setting up the Firefox development environment, including the pains of using Git on Firefox.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Did you find this post helpful? Have questions or suggestions? Feel free to leave a comment below or reach out on &lt;a href=&quot;https://twitter.com/tbmoyo&quot;&gt;@tbmoyo&lt;/a&gt;.&lt;/p&gt;</content:encoded><category>Web</category><category>firefox</category><category>javascript</category><category>programming</category><category>browsers</category><category>spidermonkey</category></item><item><title>Knowledge and Property</title><link>https://tawanda.dev/knowledge-and-property/</link><guid isPermaLink="true">https://tawanda.dev/knowledge-and-property/</guid><description>So close are knowledge and property that they are often thought to be continuous. Those who are entitled to knowledge feel they should be granted property…</description><pubDate>Sat, 31 Aug 2024 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;So close are knowledge and property that they are often thought to be continuous. Those who are entitled to knowledge feel they should be granted property as well, and those who are entitled to property believe a certain knowledge goes with it. Scholars demand higher salaries for their publishable successes; industrialists sit on university boards.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;— James P. Carse &lt;cite&gt;Finite and Infinite Games&lt;/cite&gt;&lt;/p&gt;</content:encoded><category>book quotes</category><category>finite and infinite games</category><category>reading</category><category>knowledge</category><category>quotes</category><category>property</category></item><item><title>The Fate of Great Men</title><link>https://tawanda.dev/the-fate-of-great-men/</link><guid isPermaLink="true">https://tawanda.dev/the-fate-of-great-men/</guid><description>It has always been correct to praise Plato, but not to understand him. This is the common fate of great men. &amp;mdash; Bertrand Russell A History of Western…</description><pubDate>Sat, 31 Aug 2024 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;It has always been correct to praise Plato, but not to understand him. This is the common fate of great men.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;— Bertrand Russell &lt;cite&gt;A History of Western Philosophy &lt;/cite&gt;&lt;/p&gt;
&lt;p&gt;It has always been the case of the great to be praised (or criticized) without being understood. As Karl Popper said, it is impossible to speak in such a way that you cannot be misunderstood. I suspect this is doubly true of the great, who speak on great matters.&lt;/p&gt;</content:encoded><category>book quotes</category><category>Bertrand Russel</category><category>great men</category><category>fate</category><category>quotes</category></item><item><title>Everyday a Festival Day</title><link>https://tawanda.dev/everyday-a-festival-day/</link><guid isPermaLink="true">https://tawanda.dev/everyday-a-festival-day/</guid><description>I like Diogenes’ quip: once when he was visiting Sparta, he saw his host zealously getting ready for a festival day, and he said, ‘Isn’t it the mark of a…</description><pubDate>Fri, 30 Aug 2024 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;I like Diogenes’ quip: once when he was visiting Sparta, he saw his host zealously getting ready for a festival day, and he said, ‘Isn’t it the mark of a good man to regard every day as a festival day?’&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;— Plutarch, &lt;cite&gt;Essays&lt;/cite&gt;&lt;/p&gt;</content:encoded><category>book quotes</category><category>philosophy</category><category>diogenes</category><category>life</category><category>quotes</category><category>wisdom</category><category>plutarch</category></item><item><title>A Loan That Cannot be Repaid</title><link>https://tawanda.dev/time-an-unrepayable-loan/</link><guid isPermaLink="true">https://tawanda.dev/time-an-unrepayable-loan/</guid><description>And yet time is the one loan which even a grateful recipient cannot repay. &amp;mdash; Seneca, Lucius Annaeus Letters From a Stoic I am reminded everyday not…</description><pubDate>Tue, 27 Aug 2024 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;And yet time is the one loan which even a grateful recipient cannot repay.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;— Seneca, Lucius Annaeus &lt;cite&gt;Letters From a Stoic&lt;/cite&gt;&lt;/p&gt;
&lt;p&gt;I am reminded everyday not only to be mindful of how I use my time, but also other people’s time.&lt;/p&gt;</content:encoded><category>book quotes</category><category>time</category><category>seneca</category><category>quotes</category><category>wisdom</category></item><item><title>Simplicity</title><link>https://tawanda.dev/simplicity/</link><guid isPermaLink="true">https://tawanda.dev/simplicity/</guid><description>Simplicity, simplicity, simplicity! I say, let your affairs be as two or three, and not a hundred or a thousand; instead of a million count half a dozen…</description><pubDate>Tue, 27 Aug 2024 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;Simplicity, simplicity, simplicity! I say, let your affairs be as two or three, and not a hundred or a thousand; instead of a million count half a dozen, and keep your accounts on your thumbnail.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;— Henry David Thoreau, &lt;cite&gt;Walden&lt;/cite&gt;&lt;/p&gt;</content:encoded><category>book quotes</category><category>philosophy</category><category>simplicity</category><category>quotes</category><category>wisdom</category></item><item><title>There Are No Big Leaps, Only Little Steps</title><link>https://tawanda.dev/there-are-no-big-leaps/</link><guid isPermaLink="true">https://tawanda.dev/there-are-no-big-leaps/</guid><description>There are no big leaps, only developments that look like big leaps to people from the outside because they haven’t seen all of the little steps that…</description><pubDate>Mon, 26 Aug 2024 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;There are no big leaps, only developments that look like big leaps to people from the outside because they haven’t seen all of the little steps that comprise them. Even the famous “aha” moments could not exist without a great deal of work to build an edifice that needs just one more piece to make it complete.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;— Anders Ericsson, &lt;cite&gt;Peak: Secrets from the New Science of Expertise&lt;/cite&gt;&lt;/p&gt;
&lt;p&gt;This is a good reminder to be consistent, do something everyday, get a little bit better every day, put in the hours. There are no big leaps, only little steps.&lt;/p&gt;</content:encoded><category>book quotes</category><category>philosophy</category><category>learning</category><category>mastery</category><category>quotes</category><category>wisdom</category></item><item><title>Utopia or Apocalypse: The Promise and Perils of AGI from the Ancients to the Present</title><link>https://tawanda.dev/intelligent-agents-ancient-to-present/</link><guid isPermaLink="true">https://tawanda.dev/intelligent-agents-ancient-to-present/</guid><description>What thinkers from Aristotle to the present expected of made minds.</description><pubDate>Fri, 02 Aug 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Like many people I have been playing with generative Large Language Models (LLMs) like ChatGPT, Claude (my favourite), and Gemini. These models write code, produce essays and reports, create PowerPoint presentations, and perform graduate level maths. It is hard not to be impressed by the capabilities of these models, far exceeding what even the most optimistic people predicted five years ago. I have integrated them in my workflow and I think it is folly for any knowledge worker to ignore them.&lt;/p&gt;
&lt;p&gt;Yet despite their capabilities we are still in the early days, and the models are still fraught with errors. All they do is predict the next token, and they occasionally hallucinate. They don’t truly understand; they simply guess probabilistically based on their (massive) training data. In other words there is no true intelligence, only statistical techniques. At least for now.&lt;/p&gt;
&lt;p&gt;Still their utility is undeniable, and given that we are still in the early days they are bound to improve. So like other technophiles I have gotten curious and I’ve started following the field more closely, listening to podcasts and reading papers on Artificial Intelligence (AI) and AI Safety. I have even taken a course on &lt;a href=&quot;https://www.coursera.org/specializations/machine-learning-introduction&quot;&gt;Coursera&lt;/a&gt;. It’s been mind-expanding to hear what very smart people think will happen when- not if- we finally get to Artificial General Intelligence (AGI).&lt;/p&gt;
&lt;p&gt;The predictions, and arguments, range from utopian dreams to apocalyptic nightmares.&lt;/p&gt;
&lt;p&gt;Carl Shulman on the &lt;a href=&quot;https://80000hours.org/podcast/episodes/carl-shulman-economy-agi/&quot;&gt;80000 Hours Podcast&lt;/a&gt; makes a thought provoking case of a future world of AGI. Labour will become cheap, productivity will skyrocket, the super intelligent agents will invent new things we do not know or imagine, they will create new algorithms, new drugs, and end disease perhaps. It sounds like Utopia, but it is not without its own dangers.&lt;/p&gt;
&lt;p&gt;On the other extreme I have been reading &lt;a href=&quot;https://brianchristian.org/the-alignment-problem/&quot;&gt;The Alignment Problem&lt;/a&gt;, Stuart Russel’s &lt;a href=&quot;https://www.amazon.com/Human-Compatible-Artificial-Intelligence-Problem/dp/0525558616&quot;&gt;Human Compatible&lt;/a&gt;, and Max Tegmark’s &lt;a href=&quot;https://www.amazon.com/Life-3-0-Being-Artificial-Intelligence/dp/1101946598&quot;&gt;Life 3.0&lt;/a&gt; in addition to a couple of papers&lt;sup&gt;&lt;a href=&quot;#user-content-fn-1&quot; id=&quot;user-content-fnref-1&quot; data-footnote-ref=&quot;&quot; aria-describedby=&quot;footnote-label&quot;&gt;1&lt;/a&gt;&lt;/sup&gt; on AI safety and these present a worrying problem - aligning the goals of intelligent agents to our own goals is an extremely difficult challenge. What might happen if AGI agents turn rogue, or are employed by bad actors and bad governments? What of accidents when they escape the control of their creators, as in Frankenstein? And what might an AI arms race produce, when governments try to outdo each other in the race to manufacture the most powerful agents in a field that is &lt;em&gt;greedy&lt;/em&gt;, where the winner gets disproportionate and possibly insurmountable advantages?&lt;/p&gt;
&lt;p&gt;These two extreme views are hardly new. It seems they have existed for as long as mankind has entertained the idea of creating autonomous, human level intelligence- a dream as old as humanity itself.&lt;/p&gt;
&lt;p&gt;Take Aristotle, for example. For him autonomous intelligent agents would result in cheap and bountiful labour, end the need for slaves, and perhaps usher in a world of leisure and no scarcity. He writes, in the &lt;em&gt;Politics&lt;/em&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;We can imagine a situation in which each instrument could do its own work, at the word of command or by intelligent anticipation, like the statues of Daedalus or the tripods made by Hephaestus, of which the poet relates that Of their own motion they entered the conclave of Gods on Olympus.* A shuttle would then weave of itself, and a plectrum would do its own harp-playing. In this situation managers would not need subordinates and masters would not need slaves.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;— Aristotle, &lt;cite&gt;Politics&lt;/cite&gt;&lt;/p&gt;
&lt;p&gt;In such a situation no one would need to work. Man, having created intelligence, would finally break free of the Biblical stricture to work. We would all live like aristocrats, in conditions that the ancient Romans called &lt;em&gt;otium&lt;/em&gt; - a life of leisure and contemplation as opposed to one of business and work.&lt;/p&gt;
&lt;p&gt;What would we do then? Aristotle no doubt thought we would study philosophy, and take part in government, the two ways of living he holds in highest regard. But these machines might govern better than any human, and resolve any and all philosophical questions. And what would it do to our pysche, if we did not have to work at all?&lt;/p&gt;
&lt;p&gt;In the Daoist text, the &lt;em&gt;Liezi&lt;/em&gt;, there is a story with an altogether different view of how an intelligent automaton might behave. In the story a King is shown an artificer of extraordinary skill named Yen Shih. What Yen Shih has done is truly remarkable - he has created a humanoid that dances, sings, and does everything that a human does. It also looks like a human, and the king and his court can hardly be persuaded it’s not a real man.&lt;/p&gt;
&lt;p&gt;But the humanoid has a wandering eye:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;When the entertainment was about to end, the performer winked his eye and beckoned to the concubines in waiting on the King’s left and right. The King was very angry, and wanted to execute Yen-shih on the spot. Yen-shih, terrified, at once cut open the performer and took it to pieces to show the King. It was all made by sticking together leather, wood, glue and lacquer,coloured white, black, red and blue. The King examined it closely; on the inside the liver, gall, heart, lungs, spleen, kidneys, intestines and stomach, on the outside the muscles, bones, limbs,joints, skin, teeth and hair, were all artificial, but complete without exception. When they were put together, the thing was again as he had seen it before. The King tried taking out its heart,and the mouth could not speak; tried taking out its liver, and the eyes could not see; tried taking out its kidneys, and the feet could not walk. The King was at last satisfied, and said with a sigh: ‘Is it then possible for human skill to achieve as much as the Creator?‘He had it loaded into the second of his cars, and took it back with him&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;— &lt;cite&gt;Liezi&lt;/cite&gt;&lt;/p&gt;
&lt;p&gt;The automaton appears to have &lt;em&gt;agency&lt;/em&gt;, to form - and pursue- its own goals.
It seems Liezi believed, as many AI researchers now do, that autonomous beings would have agency and goals, and these might not align with ours.&lt;/p&gt;
&lt;p&gt;This is something that many AI researchers agree on, that intelligent agents will form an awareness of themselves and the world, and in pursuit of their creators’ goals, they will also form sub-goals. These sub-goals might not entirely align with our goals. And further, goal seeking  in intelligent agents leads to power seeking behaviours such as resource acquisition, making allies, deception, and making sure the agent survives at all costs. Even an intelligent coffee maker might therefore develop other goals to aid it in supplying you with coffee. It might hack and disable other coffee suppliers, figure out times and quantities that keep you most hooked, and resist being turned off. As Stuart Russel famously said, “you can’t fetch coffee if you’re dead”.&lt;/p&gt;
&lt;p&gt;So I wonder if these two possibilities are irreconcilable. Is it possible to have AGI that solves all our problems, provides everyone with cheap and abundant resources, frees us to debate philosophy and paint, while not accumulating power, or winking at our partners, or, worse, enslaving all humanity?&lt;/p&gt;
&lt;p&gt;As we stand on the brink of true AGI, Aristotle’s musings and Lie Zi’s parable take on new relevance. We are forced to confront fundamental questions about the nature of work, human purpose, and our relationship with the technologies we create.&lt;/p&gt;
&lt;p&gt;Given how hard it is to understand the internal workings of the models we currently have, how much harder it’ll become as they get more powerful, and the difficulty not only in encoding human values and control mechanisms, but also in getting consensus of what they are, it seems prudent for humanity to proceed cautiously, perhaps even momentarily pausing the development of AI until more is understood.&lt;/p&gt;
&lt;p&gt;For while the humanoid in Liezi is lecherous, it is also easily dismembered. The same cannot be said for truly capable AGI.&lt;/p&gt;
&lt;section data-footnotes=&quot;&quot; class=&quot;footnotes&quot;&gt;&lt;h2 class=&quot;sr-only&quot; id=&quot;footnote-label&quot;&gt;Footnotes&lt;/h2&gt;
&lt;ol&gt;
&lt;li id=&quot;user-content-fn-1&quot;&gt;
&lt;p&gt;e.g &lt;a href=&quot;https://arxiv.org/abs/2304.00612&quot;&gt;8 Things to Know About LLMs&lt;/a&gt;, &lt;a href=&quot;https://arxiv.org/abs/2209.00626&quot;&gt;The Alignment Problem from a Deep Learning Perspective&lt;/a&gt; &lt;a href=&quot;#user-content-fnref-1&quot; data-footnote-backref=&quot;&quot; aria-label=&quot;Back to reference 1&quot; class=&quot;data-footnote-backref&quot;&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;</content:encoded><category>ai</category><category>ai safety</category><category>aristotle</category><category>ethics</category><category>quotes</category><category>wisdom</category></item><item><title>The Transformation of Things</title><link>https://tawanda.dev/the-transformation-of-things/</link><guid isPermaLink="true">https://tawanda.dev/the-transformation-of-things/</guid><description>Once Chuang Chou dreamt he was a butterfly, a butterfly flitting and fluttering around, happy with himself and doing as he pleased. He didn&apos;t know he was…</description><pubDate>Thu, 11 Apr 2024 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;Once Chuang Chou dreamt he was a butterfly, a butterfly flitting and fluttering around, happy with himself and doing as he pleased. He didn’t know he was Chuang Chou. Suddenly he woke up and there he was, solid and unmistakable Chuang Chou. But he didn’t know if he was Chuang Chou who had dreamt he was a butterfly, or a butterfly dreaming he was Chuang Chou. Between Chuang Chou and a butterfly there must be some distinction! This is called the Transformation of Things.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;— Zhuang Zi, &lt;cite&gt;Zhuang Zi&lt;/cite&gt;&lt;/p&gt;</content:encoded><category>book quotes</category><category>chuang zi</category><category>philosophy</category><category>dreams</category><category>quotes</category></item><item><title>Eat like an Emperor</title><link>https://tawanda.dev/eat-like-an-emperor/</link><guid isPermaLink="true">https://tawanda.dev/eat-like-an-emperor/</guid><description>Eat like an emperor. That does not depend on the quality of the food, it depends on the eater, the way he celebrates it. Even with just bread, butter and…</description><pubDate>Thu, 04 Apr 2024 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;Eat like an emperor. That does not depend on the quality of the food, it depends on the eater, the way he celebrates it. Even with just bread, butter and salt you can be an emperor.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;— Osho, &lt;cite&gt;When The Shoe Fits&lt;/cite&gt;&lt;/p&gt;</content:encoded><category>book quotes</category><category>Osho</category><category>reading</category><category>eating</category><category>quotes</category></item><item><title>Serendipity</title><link>https://tawanda.dev/serendipity/</link><guid isPermaLink="true">https://tawanda.dev/serendipity/</guid><description>To sum up, serendipity is the facility for encountering unexpected good luck, as the result of accident and sagacity, as can occur in the course of more…</description><pubDate>Thu, 07 Mar 2024 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;To sum up, serendipity is the facility for encountering unexpected good luck, as the result of accident and sagacity, as can occur in the course of more generalized, relatively unfocused exploratory behaviors, even meanderings.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;— James H. Austin, &lt;cite&gt;Chase, Chance, and Creativity: The Lucky Art of Novelty&lt;/cite&gt;&lt;/p&gt;</content:encoded><category>book quotes</category><category>luck</category><category>quotes</category></item><item><title>Envy</title><link>https://tawanda.dev/envy/</link><guid isPermaLink="true">https://tawanda.dev/envy/</guid><description>Of all the characteristics of ordinary human nature envy is the most unfortunate; not only does the envious person wish to inflict misfortune and do so…</description><pubDate>Wed, 24 Jan 2024 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;Of all the characteristics of ordinary human nature envy is the most unfortunate; not only does the envious person wish to inflict misfortune and do so whenever he can with impunity, but he is also himself rendered unhappy by envy. Instead of deriving pleasure from what he has, he derives pain from what others have. If he can, he deprives others of their advantages, which to him is as desirable as it would be to secure the same advantages himself. If this passion is allowed to run riot it becomes fatal to all excellence, and even to the most useful exercise of exceptional skill. Why should a medical man go to see his patients in a car when the labourer has to walk to his work?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;— Bertrand Russel, &lt;cite&gt;The Conquest of Happiness&lt;/cite&gt;&lt;/p&gt;</content:encoded><category>book quotes</category><category>philosophy</category><category>bertrand russel</category><category>ethics</category><category>quotes</category><category>envy</category></item><item><title>Cleverness</title><link>https://tawanda.dev/cleverness/</link><guid isPermaLink="true">https://tawanda.dev/cleverness/</guid><description>There is a faculty which is called cleverness; and this is such as to be able to do the things that tend towards the mark we have set before ourselves…</description><pubDate>Tue, 23 Jan 2024 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;There is a faculty which is called cleverness; and this is such as to be able to do the things that tend towards the mark we have set before ourselves, and to hit it. Now if the mark be noble, the cleverness is laudable, but if the mark be bad, the cleverness is mere smartness; hence we call even men of practical wisdom clever or smart. Practical wisdom is not the faculty, but it does not exist without this faculty.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;— Aristotle, &lt;cite&gt;Nichomachean Ethics&lt;/cite&gt;&lt;/p&gt;</content:encoded><category>book quotes</category><category>philosophy</category><category>aristotle</category><category>ethics</category><category>quotes</category><category>wisdom</category></item><item><title>A Philosopher</title><link>https://tawanda.dev/a-philosopher/</link><guid isPermaLink="true">https://tawanda.dev/a-philosopher/</guid><description>Thoreau defines a philosopher: There are nowadays professors of philosophy, but not philosophers. Yet it is admirable to profess because it was once…</description><pubDate>Mon, 22 Jan 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Thoreau defines a philosopher:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;There are nowadays professors of philosophy, but not philosophers. Yet it is admirable to profess because it was once admirable to live. To be a philosopher is not merely to have subtle thoughts, nor even to found a school, but so to love wisdom as to live according to its dictates, a life of simplicity, independence, magnanimity, and trust. It is to solve some of the problems of life, not only theoretically, but practically.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;— Thoreau, &lt;cite&gt;Walden&lt;/cite&gt;&lt;/p&gt;</content:encoded><category>book quotes</category><category>philosopher</category><category>walden</category><category>culture</category><category>quotes</category><category>philosophy</category><category>thoreau</category></item><item><title>A Gentleman</title><link>https://tawanda.dev/a-gentleman/</link><guid isPermaLink="true">https://tawanda.dev/a-gentleman/</guid><description>Confucius defines a gentleman: The Master said, A gentleman wishes to be slow to speak and quick to do. &amp;mdash; The Analects of Confucius</description><pubDate>Sat, 20 Jan 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Confucius defines a gentleman:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The Master said, A gentleman wishes to be slow to speak and quick to do.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;— &lt;cite&gt;The Analects of Confucius&lt;/cite&gt;&lt;/p&gt;</content:encoded><category>book quotes</category><category>gentleman</category><category>confucius</category><category>culture</category><category>quotes</category></item><item><title>The Vigor of a Culture: The Unique and the Surprising</title><link>https://tawanda.dev/the-vigor-of-culture/</link><guid isPermaLink="true">https://tawanda.dev/the-vigor-of-culture/</guid><description>Infinite players understand that the vigor of a culture has to do with the variety of its sources, the differences within itself. The unique and the…</description><pubDate>Wed, 17 Jan 2024 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;Infinite players understand that the vigor of a culture has to do with the variety of its sources, the differences within itself. The unique and the surprising are not suppressed in some persons for the strength of others. The genius in you stimulates the genius in me.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;— &lt;cite&gt;Finite and Infinite Games&lt;/cite&gt;&lt;/p&gt;</content:encoded><category>book quotes</category><category>finite and infinite games</category><category>reading</category><category>culture</category><category>quotes</category><category>genius</category></item><item><title>What I read in February</title><link>https://tawanda.dev/reading-february-2023/</link><guid isPermaLink="true">https://tawanda.dev/reading-february-2023/</guid><description>&quot;Chase, Chance, and Creativity: The Lucky Art of Novelty&quot;, and other books I chanced to read in February 2023</description><pubDate>Thu, 23 Mar 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Previously &lt;a href=&quot;https://tawanda.dev/reading-january-2023/&quot;&gt;January 2023&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here is what I read last month (February):&lt;/p&gt;
&lt;h2 id=&quot;peak-secrets-from-the-new-science-of-expertise-by-anders-ericsson-and-robert-pool&quot;&gt;&lt;em&gt;Peak: Secrets from the New Science of Expertise&lt;/em&gt; by Anders Ericsson and Robert Pool&lt;/h2&gt;
&lt;p&gt;What sets expert performers from the rest of us, and what can ordinary people do to improve their own performance in different disciplines? This is what the excellent &lt;em&gt;Peak&lt;/em&gt; sought to explain, and I think it did a sterling job.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key takeaways:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It is possible to get better at most things because the adaptability of the human brain.&lt;/li&gt;
&lt;li&gt;In general younger brains are more adaptable than older ones, so training often has bigger effects in children and adolescents than in adults.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;&quot;The best way to get past any barrier is to come at it from a different direction, which is one reason it is useful to work with a teacher or coach. Someone who is already familiar with the sorts of obstacles you’re likely to encounter can suggest ways to overcome them.&quot;&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;The key to expert performance is &lt;em&gt;deliberate practice&lt;/em&gt;, which is different from the usual kind of practice that most people do. In particular deliberate practice:
&lt;ul&gt;
&lt;li&gt;has goals&lt;/li&gt;
&lt;li&gt;is focused&lt;/li&gt;
&lt;li&gt;involves getting feedback&lt;/li&gt;
&lt;li&gt;means always expanding the borders of one’s comfort zone&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;The cognitive and physical changes caused by training require upkeep. Use it or lose it.&lt;/li&gt;
&lt;li&gt;The difference between experts and non-experts is that they have different &lt;em&gt;mental representations.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;A mental representation is a mental structure that corresponds to an object, an idea, a collection of information, or anything else, concrete or abstract, that the brain is thinking about.
&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Deliberate practice involves developing ever more efficient and accurate mental representations of that particular activity. Hence there is no such thing as developing a “general skill”.&lt;/li&gt;
&lt;li&gt;Mental representations make possible pattern recognition, problem solving, learning, self-assessment , information extraction and organization, and other advanced abilities needed to excel. Hence when chess grandmasters look at a board of a realistic game they see patterns and can accurately recall the positions of pieces, but when given random, improbable positions, they do no better that ordinary people in recalling the positions.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;This is the basic blueprint for getting better in any pursuit: get as close to deliberate practice as you can. If you’re in a field where deliberate practice is an option, you should take that option. If not, apply the principles of deliberate practice as much as possible. In practice this often boils down to purposeful practice with a few extra steps: first, identify the expert performers, then figure out what they do that makes them so good, then come up with training techniques that allow you to do it, too.&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Learning skills take time, usually a very long time (though the 10 000 hours Gladwell popularized is fiction)&lt;/li&gt;
&lt;li&gt;Focus more on skills, rather than knowledge. Bias towards action, towards doing, building, performing.&lt;/li&gt;
&lt;li&gt;It is possible to improve without teachers, as Benjamin Franklin did with his writing, by copying what he considered good writing, thereby building mental representations of what make good writing.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;To effectively practice a skill without a teacher, it helps to keep in mind three Fs: Focus. Feedback. Fix it. Break the skill down into components that you can do repeatedly and analyze effectively, determine your weaknesses, and figure out ways to address them.&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Getting sufficient sleep is extremely important. So is general health.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Improving at a skill is often motivating in itself, setting up a virtuous cycle towards mastery.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Talent is largely fake. Expert performers work&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;And here we find our major takeaway message: In the long run it is the ones who practice more who prevail, not the ones who had some initial advantage in intelligence or some other talent.&lt;/blockquote&gt;
- Self improvement, continuously expanding the edges of our abilities is enjoyable, and is a gateway to flow, and finding meaning and joy in life.
&lt;blockquote&gt;And I would argue that we humans are most human when we’re improving ourselves. We, unlike any other animal, can consciously change ourselves, to improve ourselves in ways we choose. This distinguishes us from every other species alive today and, as far as we know, from every other species that has ever lived.&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Man is man because he is a doer, not a knower.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;We call ourselves “knowing man” because we see ourselves as distinguished from our ancestors by our vast amount of knowledge. But perhaps a better way to see ourselves would be as Homo exercens, or “practicing man,” the species that takes control of its life through practice and makes of itself what it will.&lt;/blockquote&gt;
&lt;h2 id=&quot;chase-chance-and-creativity-the-lucky-art-of-novelty-by-james-h-austin&quot;&gt;&lt;em&gt;Chase, Chance, and Creativity: The Lucky Art of Novelty&lt;/em&gt; by James H. Austin&lt;/h2&gt;
&lt;p&gt;If you have ever heard of the four kinds of luck this is the book where they come from (via an ancient blog post). This book seeks to distill the fundamental elements of chance and creativity.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key takeaways:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Discoveries (and good things) usually begin with the “chase” - seemingly random, unplanned things - childhood influences,  a chance meeting, an eccentric relative.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;I find that a great part of the information I have was acquired by looking up something and finding something else on the way. 
- Franklin P. Adams&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Variety of experience is a favorable condition for productivity.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;Every specialist, whatever his profession, skill or business may be, can improve his performance by broadening his base. 
- Wilder Penfield &lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Many great things are entirely fortuitous, but you have to be sagacious - to recognize the opportunity - and bold - to grab it - when it arises.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;If you are completely candid with yourself, you will soon discover how much your discoveries hinge on contingencies. Every now and then, when you happen to combine both boldness and skill, you may be able to exploit a few of the lucky situations that arise. But skill alone will not be enough, for much of the novelty in creativity is decided only when you are bold enough to thrust at chance.&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;There are four kinds of chance&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Blind chance.&lt;/li&gt;
&lt;li&gt;Chance due to action: &lt;em&gt;Keep on going and the chances are you will stumble on something, perhaps when your are least expecting it. I have never heard of anyone stumbling on something sitting down - Charles Kettering&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Chance due to expertise: &lt;em&gt;Chance favors only the prepared mind- Louis Pasteur&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Chance due to uniqueness: &lt;em&gt;We make our fortunes, and we call them fate- Benjamin Disraeli&lt;/em&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We can make/influence our own luck&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;Chance is unintentional, it is capricious, but we needn&apos;t conclude that chance is immune from human interventions.&lt;/blockquote&gt;
- Chance II depends on motion, the basic need to release energy. This is the proverbial stirring of the pot.
&lt;blockquote&gt;A certain basal level of action &quot;stirs up the pot,&quot; brings in random ideas that will collide and stick together in fresh combinations, lets chance operate. Motion yields a network of new experiences which, like a sieve, filters best when in constant up-and-down, side-to-side movement. Consistent centrifugal types of motion are what distinguish Chance II; its premise is that unluck runs out if you keep stirring up things so that random elements can combine, by virtue of your and their inherent affinities.&lt;/blockquote&gt;
&lt;blockquote&gt;So Chance 11 springs from your energetic, generalized motor activities, and, with the above qualification, the freer they are, the better. It involves the kind of luck Kettering, the automotive engineer, had in mind when he said, in effect, &quot;keep on going, and you&apos;ll stumble on something.&quot; When someone, anyone, does swing into motion and keeps on going, he or she will increase the number of collisions between events. If you link a few events together, you can then exploit some of them, but many others, of course, you cannot.&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Chance III requires knowledge, expertise or experience to recognize it. It is for the sagacious- the observant, the prepared. This is how Fleming discovered penicillin, by quickly recognizing and combining together happenstance with deep knowledge.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;Now, as we move on to Chance III, we see blind luck, but it tiptoes in softly, dressed in camouflage. Chance presents only a faint clue, the potential opportunity exists, but it will be overlooked except by that one person uniquely equipped to observe it, visualize it conceptually, and fully grasp its significance. Chance III involves a special receptivity, discernment, and intuitive grasp of significance unique to one particular recipient. Louis Pasteur characterized it for all time when he said: &quot;Chance favors only the prepared mind.&quot;&lt;/blockquote&gt;
- Chance IV is chance that arises from the unique traits of the individual. The individual because of his actions, unique history, and idiosyncrasies encounters and courts Lady Luck. 
&lt;blockquote&gt;Chance IV is the kind of luck that develops during a probing action which has a distinctive personal flavor. The English Prime Minister, Benjamin Disraeli, summed up the principle underlying Chance IV when he noted that, as persons, &quot;we make our fortunes and we call them fate.&quot; Disraeli, the practical politician, appreciated that by our actions we each forge our own destiny, at least to some degree. Chance IV comes to you, unsought, because of who you are and how you behave. Disraeli was aware that our so-called &quot;quirks of fate&quot; are often oneman-made.&lt;/blockquote&gt;
&lt;blockquote&gt;The way of fortune is like the milky way in the sky; which is a number of small stars, not seen asunder, but giving light together: so it is a number of little and scarce discerned virtues, or rather faculties and customs, that make men fortunate
- Francis Bacon&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Creativity is the “&lt;em&gt;long and complex series of interactions between an individual and his environment that culminate in something new.&lt;/em&gt;”&lt;/li&gt;
&lt;li&gt;Creativity takes time, and the fruit often comes from seeds planted over time, in the most unexpected places.&lt;/li&gt;
&lt;li&gt;Creative people often notice incongruities, Darwin in particular was noted for this. He had a quality of &lt;em&gt;“never letting exceptions pass unnoticed”&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;If I were to limit myself to the five most important traits, I would quickly select: curiosity, imagination, enthusiasm, discrimination, and persistence. But this would be like trying to define the complex operations of a whole human being in terms of his five most vital organs: nervous system, heart, lungs, adrenals, liver. They are essential, but they, too, are only part of the total picture.&lt;/blockquote&gt;
- Creativity makes us feel alive, to be human is to create.
&lt;blockquote&gt;Nowadays, we talk about being &quot;turned on&quot; by an idea. We may well he describing quite literally the satisfying state of alertness and pleasurable excitement triggered directly or indirectly by stimuli that fire some of the special neuronal systems deep within our brain. For it is important to note that we humans, too, have reward systems in our brains, waiting for us to find normal memorable stimuli adequate to turn them on.&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;The creative process is not linear, it is chaotic an fluid. Part of it is not even conscious.&lt;/li&gt;
&lt;li&gt;We all need a a &lt;em&gt;violin of Ingres&lt;/em&gt; a hobby or creative outlet that takes our minds of problems and allows the mind to process problems unconsciously, eventually arriving at unexpected insight.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;The investigator must be both Shaw and Picasso, and all the men in between. He must swing back and forth from the freest flights of imagination to the most rigorous grinding logic. He may be struck by an intense flash of creative inspiration that hits with lightninglike impact. Or, he may pursue the vaguest of hunches, driven by an intuition corresponding to the faintest glow of one lone ember in the hearth. Then again, he may experience his enlightenment through a sequence of small sparks, each of lesser intensity and amplitude, which successively leap upward into consciousness. These, too, can collectively solve the problem with new ideas of all sizes and shapes which spring forth at intervals of hours, days, weeks, or longer.&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Meditation can help the creative process.&lt;/li&gt;
&lt;li&gt;Ultimately we are (mostly) the masters of our own fates and we have the tools to alter reality.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;Our future is still malleable, still very much in our own hands. Nothing is predetermined. Chance can be on our side if we but stir it up with our energies, stay receptive to the glint of opportunity on even a single hair above the underbrush, and continually provoke it by individuality in our attitudes and approach to life.&lt;/blockquote&gt;
&lt;h2 id=&quot;kushiels-dart-by-jacqueline-carey&quot;&gt;&lt;em&gt;Kushiel’s Dart&lt;/em&gt; by Jacqueline Carey&lt;/h2&gt;
&lt;p&gt;A good fantasy book, different from the usual fantasy I usually read.&lt;/p&gt;</content:encoded><category>books</category><category>reading-list</category><category>reviews</category><category>peak</category><category>luck</category></item><item><title>What I read in January</title><link>https://tawanda.dev/reading-january-2023/</link><guid isPermaLink="true">https://tawanda.dev/reading-january-2023/</guid><description>&quot;Thinking in Systems&quot;, James Nestor&apos;s &quot;Breath&quot;, and other books I read in January 2023</description><pubDate>Thu, 02 Feb 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Here are some books I read this past month and a few thoughts about them:&lt;/p&gt;
&lt;h2 id=&quot;breath-by-james-nestor&quot;&gt;&lt;em&gt;Breath&lt;/em&gt; by James Nestor&lt;/h2&gt;
&lt;p&gt;This is a book about breathing and how most people have lost the art of proper breathing leading to a whole range of problems from snoring to poor respiratory illnesses.&lt;/p&gt;
&lt;p&gt;The author touches on various breathing techniques of ‘pulmonauts’, those who have mastered the art of breathing - drawing knowledge from ancient Yogis and mystics like Patanjali to the moderns such as Ram Dass, and from the ancient Chinese masters to modern athletes.&lt;/p&gt;
&lt;p&gt;The key takeaways I got from it are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The nose is to be used to breathe at all times. Mouth breathing is a NO.&lt;/li&gt;
&lt;li&gt;Breathing should be slow and deep&lt;/li&gt;
&lt;li&gt;Exhales should be slow&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I was already familiar with some of the techniques from meditating and exercising, especially running, but the book was still quite informative. I occasionally find myself timing my breathing cycles to my strides when I walk.&lt;/p&gt;
&lt;blockquote&gt;Breathing slow, less, and through the nose balances the levels of respiratory gases in the body and sends the maximum amount of oxygen to the maximum amount of tissues so that our cells have the maximum amount of electron reactivity.&lt;/blockquote&gt;
&lt;p&gt;Great book, highly recommended.&lt;/p&gt;
&lt;h2 id=&quot;thinking-in-systems-by-donella-h-meadows&quot;&gt;&lt;em&gt;Thinking in Systems&lt;/em&gt; by Donella H. Meadows&lt;/h2&gt;
&lt;p&gt;This is one of the best and most useful books I have ever read. &lt;em&gt;Thinking in Systems&lt;/em&gt; does exactly what it promises - it teaches the systems way of thinking and once you see it you see it in all things. It is as Musashi Miyamoto said, “to see the Way broadly is to see it in all things”.&lt;/p&gt;
&lt;p&gt;I really need to consolidate my notes but here are some takeaways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Systems are dynamic, just knowing the constituent parts of a system is not sufficient to understand it. Systems are more than the sum of their parts.&lt;/li&gt;
&lt;li&gt;Key features of a system are the &lt;em&gt;stock&lt;/em&gt;, the &lt;em&gt;flow&lt;/em&gt; and the &lt;em&gt;feedback loops&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;A system’s stated goals often differ from its &lt;em&gt;true&lt;/em&gt; goals. The true goals are what you see when you look at the system.&lt;/li&gt;
&lt;li&gt;Systems have delays. For better or worse (for example things don’t just collapse all at once, allowing for correction, but conversely, a harmful disease or addiction may only show its harmful effects after a long time)&lt;/li&gt;
&lt;li&gt;There are some common system archetypes - the &lt;em&gt;tragedy of commons&lt;/em&gt;, &lt;em&gt;escalation&lt;/em&gt;, &lt;em&gt;addiction&lt;/em&gt;, &lt;em&gt;policy resistance&lt;/em&gt; e.t.c.&lt;/li&gt;
&lt;li&gt;Systems exhibit &lt;em&gt;resilience&lt;/em&gt;, &lt;em&gt;self-organization&lt;/em&gt; and &lt;em&gt;hierachies&lt;/em&gt;. These three things are important in designing systems.&lt;/li&gt;
&lt;li&gt;To understand systems (and most things are systems) look beyond events - look at behaviour, look at structure, look at &lt;em&gt;stocks&lt;/em&gt;, &lt;em&gt;flow&lt;/em&gt; and &lt;em&gt;feedback loops&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;The “real world” as we perceive it is itself a model, and like all models it is incomplete and inaccurate. Our understanding of the world is low resolution.&lt;/li&gt;
&lt;li&gt;Things are interconnected.  There are rarely single causes. The boundaries we see are not real and are malleable. (Unless you are a journalist)&lt;/li&gt;
&lt;li&gt;Rational individual actors can result in destructive collective behavior (i.e &lt;em&gt;tragedy of commons&lt;/em&gt;, &lt;em&gt;politics&lt;/em&gt; e.tc) . Hard to see, esp if you are trained to think like an economist.&lt;/li&gt;
&lt;li&gt;To get a better picture of systems requires shifting perspective, stepping away, looking at history, honesty. Information is sacred. This is the 11th commandment, “&lt;em&gt;thou shall not distort, delay or withhold information&lt;/em&gt;”&lt;/li&gt;
&lt;li&gt;Having skin in the game is a powerful feedback mechanism in systems design.&lt;/li&gt;
&lt;li&gt;Change your paradigm, change your life&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Master&lt;/em&gt; paradigms and become enlightened.&lt;/li&gt;
&lt;li&gt;Language matters, use it precisely, and with care.&lt;/li&gt;
&lt;li&gt;Life is interdisciplinary.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;I had learned about dancing with great powers from whitewater kayaking, from gardening, from playing music, from skiing. All those endeavors require one to stay wide awake, pay close attention, participate flat out, and respond to feedback.&lt;/blockquote&gt;
&lt;p&gt;This book rewired my brain. Loved it.&lt;/p&gt;
&lt;h2 id=&quot;covenant-of-steel-series-book-1--2-by-anthony-ryan&quot;&gt;&lt;em&gt;Covenant of Steel Series (Book 1 &amp;#x26; 2)&lt;/em&gt; by Anthony Ryan&lt;/h2&gt;
&lt;p&gt;Oh, and I also read some fiction from one of my favorite fantasy authors Anthony Ryan. Good books, both. Thoroughly enjoyed them.&lt;/p&gt;
&lt;h2 id=&quot;ashes-of-the-unhewn-throne-book-1-by-brian-staveley&quot;&gt;&lt;em&gt;Ashes of the Unhewn Throne (Book 1)&lt;/em&gt; by Brian Staveley&lt;/h2&gt;
&lt;p&gt;And lastly this excellent first book of the new series by Staveley. Stayed up past midnight for this one.&lt;/p&gt;</content:encoded><category>books</category><category>reading-list</category><category>reviews</category><category>thinking in systems</category></item><item><title>Good Design</title><link>https://tawanda.dev/good-design/</link><guid isPermaLink="true">https://tawanda.dev/good-design/</guid><description>Why an ancient Spartan cup is the epitome of good design</description><pubDate>Tue, 17 Jan 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;What makes good design?&lt;/p&gt;
&lt;p&gt;I came across an ancient instance of good design in Plutarch’s &lt;em&gt;Lives&lt;/em&gt;, on his chapter on the Spartan lawgiver Lycurgus. Plutarch describes a cup the Spartans used in war:&lt;/p&gt;
&lt;p&gt;“&lt;em&gt;the Laconian ” kothon ,” or drinking-cup, was in very high repute for usefulness among soldiers in active service…&lt;/em&gt;”,&lt;/p&gt;
&lt;p&gt;“&lt;em&gt;For its colour concealed the disagreeable appearance of the water which they were often compelled to drink, and its curving lips caught the muddy sediment and held it inside, so that only the purer part reached the mouth of the drinker.&lt;/em&gt;”&lt;/p&gt;
&lt;p&gt;Can design get any better than this?&lt;/p&gt;</content:encoded><category>books</category><category>design</category><category>mastery</category><category>plutarch</category><category>ideas</category></item><item><title>Slow Down</title><link>https://tawanda.dev/slow-down/</link><guid isPermaLink="true">https://tawanda.dev/slow-down/</guid><description>What Zhuangzi&apos;s Cook Ting teaches us about mastery, and dealing with complicated problems</description><pubDate>Tue, 30 Aug 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;When doing challenging things we sometimes get stuck. Often the instinct is to quit, or rush over the difficult parts. I think this is the wrong approach.&lt;/p&gt;
&lt;p&gt;I’ve found that a more useful approach is to take it slow, pay attention, and focus on &lt;a href=&quot;https://tawanda.dev/systems-over-goals/&quot;&gt;systems not goals&lt;/a&gt;. It is in these difficult moments, when we are stretched to our limits, that the greatest learning and insights occur.&lt;/p&gt;
&lt;p&gt;One of my favorite stories on mastery comes from the Chuangzi. It is the story of Cook Ting, a master chef who cuts up an ox with such mastery that everyone is astounded.&lt;/p&gt;
&lt;p&gt;Says Cook Ting:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“However, whenever I come to a complicated place, I size up the difficulties, tell myself to watch out and be careful, keep my eyes on what I’m doing, work very slowly, and move the knife with the greatest subtlety, until — flop! the whole thing comes apart like a clod of earth crumbling to the ground. I stand there holding the knife and look all around me, completely satisfied and reluctant to move on, and then I wipe off the knife and put it away.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And there is a line, repeated often in martial arts, that “&lt;em&gt;Slow is smooth, and smooth is fast&lt;/em&gt;”.&lt;/p&gt;
&lt;p&gt;In in his excellent &lt;em&gt;How to Read a Book&lt;/em&gt;, Mortimer Adler makes a similar point. Difficult passages, the ones we struggle to understand, must be read slowly and carefully. To be a good reader is to know that different parts of a book are to be read at different speeds.&lt;/p&gt;
&lt;p&gt;I think this wisdom applies to any craft, and to life itself. When we come to complicated places it often pays to slow down.&lt;/p&gt;</content:encoded><category>life</category><category>mastery</category><category>chuangzi</category></item><item><title>Scrapping the Big Saturday Read blog with Puppeteer and Node.js</title><link>https://tawanda.dev/blog-scrapping-with-node-puppeteer/</link><guid isPermaLink="true">https://tawanda.dev/blog-scrapping-with-node-puppeteer/</guid><description>Saving 436 posts by the late Alex Magaisa in case the domain lapsed. (It did, eventually: the site is gone and the domain now belongs to someone else.)</description><pubDate>Sat, 13 Aug 2022 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Update, August 2026.&lt;/strong&gt; The thing I was worried about happened. The Big Saturday
Read went offline, the last good capture in the Internet Archive is from April 2024,
and &lt;code&gt;bigsr.africa&lt;/code&gt; has since been picked up by someone else, who now redirects it to a
counterfeit clothing storefront. Every link and citation pointing at that domain is
broken, and the ones in this post now go to the Internet Archive instead.&lt;/p&gt;
&lt;p&gt;The folder I made in 2022 holds &lt;strong&gt;436 posts&lt;/strong&gt;. (This post says the scraper
opened 438 pages, which it did though two must have failed quietly, because my error
handling only logged and moved on.) A friend read this post in 2022 and ran their own
scrape; their copy has 435, and the two agree on 435 of them.&lt;/p&gt;
&lt;p&gt;There are &lt;strong&gt;26 more&lt;/strong&gt; of his posts recoverable from the Internet Archive that neither
of us caught, mostly guest contributions and posts filed under a different byline,
which the author-page shortcut below could never have seen. Consolidating all of it
into one verified archive is now its own project.&lt;/p&gt;
&lt;p&gt;I have left the rest of this post exactly as I wrote it in 2022.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I have been writing a Node.js scrapper to download blog posts on the website of the late Zimbabwean academic &lt;a href=&quot;https://en.wikipedia.org/wiki/Alex_Magaisa&quot;&gt;Dr Alex Magaisa&lt;/a&gt;. I worried that one day the domain and or hosting might expire and we would lose such important, thoughtful, and well written material. I also felt that it would also be my own small contribution to keeping the legacy of that brilliant man alive.&lt;/p&gt;
&lt;p&gt;My goal was to get all the posts he wrote and save them as either plaintext files or PDFs.&lt;/p&gt;
&lt;h2 id=&quot;planning&quot;&gt;Planning&lt;/h2&gt;
&lt;p&gt;The blog I intended to scrap lives at &lt;a href=&quot;https://web.archive.org/web/2022/https://bigsr.africa/&quot;&gt;https://bigsr.africa&lt;/a&gt; and is a WordPress site. I googled around a bit and because I am a JavaScript person I decided to scrap the site using Puppeteer which is a Node.js library which provides an API to control Chrome or Chromium. In other words Puppeteer allows us to control a browser with code.&lt;/p&gt;
&lt;p&gt;Puppeteer can do most of the things that a human can manually do in the browser including generating screenshots and PDFs of pages, crawling pages, submitting forms and testing Chrome extensions.&lt;/p&gt;
&lt;p&gt;It is important when scrapping a website to visit it and look at how the content is structured. My plan was to get all the links to the posts, store them in an array and the loop through the array opening each link one by one and saving the post as a pdf.&lt;/p&gt;
&lt;p&gt;All the articles on the website can be found on &lt;a href=&quot;https://web.archive.org/web/2022/https://bigsr.africa/articles/&quot;&gt;https://bigsr.africa/articles&lt;/a&gt;. However there is a challenge. The website uses infinite scroll, which means when you reach the bottom of that page it loads more content and continues like that until there is no more content to load.&lt;/p&gt;
&lt;p&gt;Since Puppeteer more or less simulates real browser interaction, it is possible to make it scroll to the bottom of a page, wait for a set time and then scroll again, as a real user might, and I found some interesting implementations on StackOverflow. However the site sometimes didn’t finish loading the infinite scroll so I decided to look for another option.&lt;/p&gt;
&lt;p&gt;Fortunately there is an authors page which shows all posts written by a particular author. On Dr Magaisa’s blog this is at &lt;a href=&quot;https://web.archive.org/web/2022/https://bigsr.africa/author/dr-alex-magaisa/&quot;&gt;https://bigsr.africa/author/dr-alex-magaisa&lt;/a&gt;. There  are also four other contributors, but they only had a post  each and could be handled separately.&lt;/p&gt;
&lt;h2 id=&quot;project-setup&quot;&gt;Project Setup&lt;/h2&gt;
&lt;p&gt;First I created the project folder and initialized &lt;code&gt;npm&lt;/code&gt; and &lt;code&gt;git&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;mkdir&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; blogscrapper&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;cd&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; blogscrapper&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; init&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;npm&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; init&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then I installed puppeteer and created a file called &lt;code&gt;index.js&lt;/code&gt; for the code:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;npm&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; install&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; puppeteer&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;touch&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; index.js&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Installing Puppeteer also downloads a version of Chromium that works best best with Puppeteer but it is also possible to install puppeteer without downloading Chromium by installing &lt;code&gt;puppeteer-core&lt;/code&gt; instead of &lt;code&gt;puppeteer&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;setting-up-puppeteer&quot;&gt;Setting Up Puppeteer&lt;/h2&gt;
&lt;p&gt;As with a normal browsing session, one starts with opening the browser, then navigating to a particular page. In puppeteer this is done as follows:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;javascript&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; puppeteer&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; require&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;puppeteer&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; fs&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; require&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;fs&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; URL&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;https://bigsr.africa/author/dr-alex-magaisa&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;async&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; () &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&gt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;	const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; browser&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; await&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; puppeteer.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;launch&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;({&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;		headless: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;	});&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;	const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; page&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; await&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; browser.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;newPage&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;	await&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; page.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;goto&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;URL&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;	&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}) ();&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;code&gt;headless: false&lt;/code&gt; option means Puppeteer will not run headless which is how it works by default. It is also not possible to generate PDFs in this state, but it’s useful sometimes especially when writing the code as you can see what is happening. I changed this to &lt;code&gt;headless: true&lt;/code&gt; when I was done and ready to run the program.&lt;/p&gt;
&lt;h2 id=&quot;getting-the-links&quot;&gt;Getting the links&lt;/h2&gt;
&lt;p&gt;The author page contains some helpful information, like the total number of posts which can be used to verify the right number of posts and at the bottom it has pagination with the total number of pages.&lt;/p&gt;
&lt;p&gt;I needed then to get all the links ( and whatever other info I wanted) on the first page, then go to the next page and repeat, until the last page was reached. Puppeteer has a &lt;code&gt;click()&lt;/code&gt; method that makes it possible to find and click on DOM elements such as links and buttons and this  can be used to navigate to to the next page of the author archives but given that the url structure of the author page archives follows a simple numeric incremental pattern it made more sense to simply increase the page count by one after harvesting the links:&lt;/p&gt;
&lt;p&gt;On each page got the links and pushed them to an array, then concatenated that array with another array created to hold all the links.&lt;/p&gt;
&lt;h3 id=&quot;pageevaluate&quot;&gt;&lt;code&gt;page.evaluate()&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;page.evaluate()&lt;/code&gt; method in Puppeteer allows users to run JavaScript on the browser giving access to browser APIs such as &lt;code&gt;document.querySelector()&lt;/code&gt;. When using &lt;code&gt;page.evaluate()&lt;/code&gt; you leave the Node.js (Puppeteer) environment and enter the DOM.&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;javascript&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; currentPage &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; pagesToScrape &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 44&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; postLinks &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; [];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;// get all links to articles&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;while&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; ( currentPage &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;#x3C;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; pagesToScrape) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;	let&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; postLinksOnPage &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; await&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; page.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;evaluate&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(() &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&gt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;		let&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; links &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; [];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;		let&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; postDetails &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; document.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;querySelectorAll&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;h3 a&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;		postDetails.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;forEach&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;((&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;post&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&gt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;			links.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(post.href);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;		});&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;		return&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; links;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;	});&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;	postLinks &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; postLinks.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;concat&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(postLinksOnPage);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;	if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (currentPage &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; pagesToScrape) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;		await&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; page.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;goto&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;`${&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;URL&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;}/page/${&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;currentPage&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;}`&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;		page.waitForNetworkIdle;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;	};&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;	currentPage &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;++&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After saving and running the code I printed the length of &lt;code&gt;postLinks&lt;/code&gt; to the console and I saw that there were well over 700 links in the array. The reason was that some links in the footer and sidebars, for example under Most Read, or Most Recent or Related Articles, were duplicated.&lt;/p&gt;
&lt;p&gt;So I had to clean up the array and remove duplicates.&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;javascript&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; postLinks &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; [&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;...&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; new&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Set&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(postLinks)];&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now the length of the links array equaled the total number of posts on the author page.&lt;/p&gt;
&lt;h2 id=&quot;getting-the-posts&quot;&gt;Getting the posts&lt;/h2&gt;
&lt;p&gt;With all links stored in an array, the next step was to loop through them, open and then capture the content and save it in a human readable way.&lt;/p&gt;
&lt;p&gt;I used &lt;code&gt;page.evaluate()&lt;/code&gt; to extract the title and date from each article, and then used these to create an output folder to store the pdf articles.&lt;/p&gt;
&lt;p&gt;Puppeteer comes with a &lt;code&gt;.pdf()&lt;/code&gt; method that creates &lt;code&gt;.pdf&lt;/code&gt; files from the html on a page and I called this to create the page. Once an article is created the page closes and moves on to the next.&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;javascript&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; link &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;of&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; postLinks) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;	try&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;		const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; page&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; await&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; browser.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;newPage&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;		await&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; page.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;goto&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(link, {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;			waitUntil: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;networkidle2&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;		});&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;		let&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; postData &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; await&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; page.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;evaluate&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(() &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&gt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;			const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; postTitle&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; document.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;querySelector&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;h1&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;).innerText;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;			const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; postDate&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; document.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;querySelector&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;.td-post-date&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;).innerText;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;		&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;			const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; dateDetails&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; postDate.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;split&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot; &quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;			const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; month&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; dateDetails[&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;			const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; year&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; dateDetails[&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;			return&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;				title: postTitle,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;				month: month,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;				year: year&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;			}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;		});&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;		const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; outputPath&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; `bsr/${&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;postData&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;year&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;}/${&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;postData&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;month&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;}`&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;		fs.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;mkdir&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(path, {recursive: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}, (&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;error&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&gt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;			if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (error) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;throw&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; error;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;		});&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;		await&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; page.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;pdf&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;({&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;			path: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;`outputPath/${&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;postData&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;}.pdf`&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;			format: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;a4&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;		});&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;		await&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; page.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;close&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;		&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;	} &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;catch&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (err) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;		console.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;log&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(err);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;	};&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I ran the code, waited for quite some time and voila, I now had a folder called &lt;code&gt;bsr&lt;/code&gt; which contained the posts as pds in folders organized by year and month.&lt;/p&gt;
&lt;h2 id=&quot;performance-and-afterthoughts&quot;&gt;Performance and afterthoughts&lt;/h2&gt;
&lt;p&gt;Running this script took a long time. After all it had to open the author archives pages 44 times, then open 438 pages and capture PDFs. It took well over 50 minutes to scrap the site and save the PDFs.&lt;/p&gt;
&lt;p&gt;Additionally the captured PDFs contained a lot of unnecessary content that is part of the page, such as footer content and related articles.&lt;/p&gt;
&lt;p&gt;The program is also silent while it’s running, giving no clue of what’s going on, and given it runs for such a long time this can be problematic.&lt;/p&gt;
&lt;p&gt;I’ll try to fix these concerns some other time.&lt;/p&gt;</content:encoded><category>software</category><category>node.js</category><category>puppeteer</category><category>web-scrapping</category></item><item><title>Contributing to OSS (Matrix) as a Newbie</title><link>https://tawanda.dev/contributing-to-oss-matrix/</link><guid isPermaLink="true">https://tawanda.dev/contributing-to-oss-matrix/</guid><description>I recently made a contribution to an open source project called Matrix. As a new contributor to the project and someone just getting started in the Open…</description><pubDate>Wed, 15 Jun 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I recently made a contribution to an open source project called &lt;a href=&quot;https://matrix.org&quot;&gt;Matrix&lt;/a&gt;. As a new contributor to the project and someone just getting started in the Open Source world, it was daunting but it turned out to be easier and more approachable than I had imagined.&lt;/p&gt;
&lt;h2 id=&quot;what-is-matrix&quot;&gt;What is Matrix?&lt;/h2&gt;
&lt;p&gt;Matrix is an open source project that publishes the Matrix open standard for secure, decentralized, real-time communications. While that sounds complicated it basically comes to down to having control over our communications and removing the need for a ton of apps to manage real time communications on the internet.&lt;/p&gt;
&lt;p&gt;With Matrix you can have a single application that connects to different services using what are called Bridges and you host your own communication, or choose someone to host for you. You could, for example, use one app to communicate on WhatsApp, Signal, Telegram and Messenger.&lt;/p&gt;
&lt;p&gt;There are plenty of clients you can choose to use with Matrix such as &lt;a href=&quot;https://element.io/&quot;&gt;Element&lt;/a&gt; Hydrogen, Nheko and others.&lt;/p&gt;
&lt;h2 id=&quot;the-problem&quot;&gt;The Problem&lt;/h2&gt;
&lt;p&gt;There was a bug on the Matrix website homepage. There is an animation there showing how Matrix works and users were unable to select text on the panels accompanying the different animation frames.&lt;/p&gt;
&lt;p&gt;Here is what the original issue report said:&lt;/p&gt;
&lt;p&gt;“&lt;em&gt;In the text panels explaining each part of the &lt;code&gt;How does it work?&lt;/code&gt; animation, each text panel is positioned/stacked on top of each other and is only hidden by &lt;code&gt;opacity: 0;&lt;/code&gt;. So you’re unable to select any text on any of the panels except the last one.&lt;/em&gt;”&lt;/p&gt;
&lt;p&gt;The Matrix website is made with Gatsby which is a React based framework for static websites. I wasn’t familiar with Gatsby but I use a static site generator (Eleventy) for this website and I know some JavaScript so I decided to jump in.&lt;/p&gt;
&lt;h2 id=&quot;the-solution&quot;&gt;The Solution&lt;/h2&gt;
&lt;p&gt;I had already cloned the repo and set up a local dev environment following the instructions in the README.md file so what was left was to find the code for the animation.&lt;/p&gt;
&lt;p&gt;Searching through the codebase I found the relevant file that controls the animation to be &lt;code&gt;gatsby/static/how-it-works.js&lt;/code&gt; which has a function called &lt;code&gt;nextStage&lt;/code&gt; which controls the animation.&lt;/p&gt;
&lt;p&gt;Below is the relevant code snippet of &lt;code&gt;nextStage&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;d3.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;#legend&quot;&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; stageIndex).&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;style&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;opacity&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    .&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;transition&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    .&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;duration&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(dissolveTime)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    .&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;style&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;opacity&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1e-6&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;d3.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;#legend&quot;&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (stageIndex &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)).&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;style&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;opacity&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1e-6&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    .&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;transition&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    .&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;duration&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(dissolveTime)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    .&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;style&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;opacity&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The code selects an element with &lt;code&gt;id&lt;/code&gt; of &lt;code&gt;legend&lt;/code&gt; concatenated with &lt;code&gt;stageIndex&lt;/code&gt; which is just the stage number of the animation, gives it &lt;code&gt;opacity: 1&lt;/code&gt; to make it visible, applies some transition to it, and when done gives it a negative opacity to hide it from view. Then when the next stage of the panel is selected, it starts with a negative opacity (since it’s originally hidden) transitions into view and is then given an opacity of 1, to make it the visible.&lt;/p&gt;
&lt;p&gt;The fact that the panels are stacked on top of each other, and the current one only invisible because hidden ones are assigned negative opacities, made the text unselectable.&lt;/p&gt;
&lt;h2 id=&quot;the-first-pr&quot;&gt;The first PR&lt;/h2&gt;
&lt;p&gt;My first idea was to change the display property of the hidden panels to &lt;code&gt;display: none&lt;/code&gt; as this would hide the panels from the document flow instead of just making them transparent as opacity does.&lt;/p&gt;
&lt;p&gt;I updated the code, gave it a look, saw that it “worked” and sent in a Pull Request. However the PR was not good enough. While it “solved” the problem it also introduced another that I did not notice - it removed the transition between the animation texts.&lt;/p&gt;
&lt;h2 id=&quot;the-second-pr&quot;&gt;The second PR&lt;/h2&gt;
&lt;p&gt;After a very helpful review by one of the more experienced maintainers, I tried a second solution.&lt;/p&gt;
&lt;p&gt;The solution here was to assign &lt;code&gt;pointer-events: none&lt;/code&gt; to the hidden panels. This maintained the negative opacity of inactive panels, but allowed users to click through them.&lt;/p&gt;
&lt;p&gt;Here’s how the code now looked like:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;d3.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;#legend&quot;&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; stageIndex).&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;style&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;opacity&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    .&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;transition&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    .&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;duration&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(dissolveTime)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    .&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;style&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;opacity&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1e-6&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;d3.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;#legend&quot;&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (stageIndex &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)).&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;style&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;opacity&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1e-6&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    .&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;transition&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    .&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;duration&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(dissolveTime)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    .&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;style&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;({ &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;opacity&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;pointer-events&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;auto&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I then used Git to rebase my commit, edited the commit message, pushed my changes and requested another review.&lt;/p&gt;
&lt;p&gt;This time the solution was accepted and merged.&lt;/p&gt;
&lt;h2 id=&quot;lessons&quot;&gt;Lessons&lt;/h2&gt;
&lt;p&gt;I’ve learnt a few things about contributing to OSS and working in teams in general. Here are a few of them:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Read the README.md
&lt;ul&gt;
&lt;li&gt;Most projects come with a README.md file that contains instructions on how to set up the project, make contributions etc. Reading this file makes it so much easier to get up and running.&lt;/li&gt;
&lt;li&gt;Additionally if the README is not clear in some areas or you run into issues while following the instructions that’s actually a potential contribution.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;It’s easier when you use the product.
&lt;ul&gt;
&lt;li&gt;Fixing bugs is so much easier when you use the product. You will have a better understanding of the problem.&lt;/li&gt;
&lt;li&gt;In this case it was easy to see the problem since all I had to do was go on the Matrix homepage and try to select text.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Ask/ Communicate a lot
&lt;ul&gt;
&lt;li&gt;Communication is important, especially when you are just starting out. I asked for a review in the Matrix.org homeserver and I got help and useful feedback quickly.&lt;/li&gt;
&lt;li&gt;People are more willing to help than we imagine. I think this is a helpful principle for life in general. In Shona we have the proverb, &lt;em&gt;“Mwana asingachemi anofira mumbereko”&lt;/em&gt;, which translates to “The child who doesn’t cry dies in the baby sling”. Or as the English say, “Closed mouths don’t get fed.”&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Research
&lt;ul&gt;
&lt;li&gt;This is really a rehash of (2). There are a lot of answers already on the internet. An underrated skill is knowing how to ask the right questions. I ended up knowing quite a bit about opacity and some other CSS tricks and tools.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Git is your friend
&lt;ul&gt;
&lt;li&gt;Git is intimidating to beginners but it’s a great tool for dealing with software and I learnt a lot of it because of this one commit.&lt;/li&gt;
&lt;li&gt;After my first commit required changes I had to edit my commit history, and this led me to &lt;code&gt;git rebase&lt;/code&gt; . All in all I learnt a lot about the workings of Git that I am sure will be valuable in other areas.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;I am really happy with how this turned out. I made a (minor) contribution to one of my favorite OSS projects, got really good feedback and honed my software engineering skills in the process.&lt;/p&gt;
&lt;p&gt;I hope my experience inspires other newbies to contribute to Open Source Software. Also, if you do not already, do check out the Matrix protocol. It’s cool and interesting and I honestly think it’s the future.&lt;/p&gt;</content:encoded><category>software-development</category><category>open source software</category><category>Matrix</category><category>Git</category></item><item><title>The Scout Mindset by Julia Galef (Summary)</title><link>https://tawanda.dev/the-scout-mindset-summary/</link><guid isPermaLink="true">https://tawanda.dev/the-scout-mindset-summary/</guid><description>Notes on Julia Galef&apos;s The Scout Mindset</description><pubDate>Mon, 14 Mar 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I recently finished reading The Scout Mindset (Julia Galef) which I picked up on the recommendation of &lt;a href=&quot;https://twitter.com/danluu/status/1477789637116497921&quot;&gt;Dan Luu&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It’s a great short book that I found very useful. The core idea is that there are two kinds of mindsets, &lt;em&gt;soldier mindset&lt;/em&gt; and &lt;em&gt;scout mindset&lt;/em&gt; and it’s useful to approach life through the later.&lt;/p&gt;
&lt;p&gt;Soldier mindset arises from directionally motivated reasoning, &lt;em&gt;“which evaluates ideas through the lences of ‘Can I believe it’, and ‘Must I believe it?’ … [vs] accuracy motivated reasoning [which] evaluates ideas through the lense of ‘Is it true?’”&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Directionally motivated reasoning has an end in mind, and our biases kick in to confirm that end. On the other hand, accuracy motivated reasoning seeks for the most truthful model of reality possible.&lt;/p&gt;
&lt;p&gt;The soldier deludes herself, the scout seeks the truth.&lt;/p&gt;
&lt;h2 id=&quot;why-we-delude-ourselves&quot;&gt;Why we delude ourselves&lt;/h2&gt;
&lt;p&gt;Soldier mindset is attractive because it gives us immediate benefits that I think we crave for from an evolutionary perspective. These broadly are emotional- comfort, self-esteem and morale- and social - persuasion, image, and belonging.&lt;/p&gt;
&lt;p&gt;Humans want immediate rewards, and delusion allows us those kinds of rewards. The fruits of truth are better but take time, and in the moment, can be bitter.&lt;/p&gt;
&lt;h2 id=&quot;being-a-scout&quot;&gt;Being a scout:&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Seek the truth&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The truth is valuable because it allows us to a better model of reality.&lt;/li&gt;
&lt;li&gt;An accurate picture of the odds helps you make better choices.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Accept Criticism&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Darwin paid particular attention to those who criticized, rather than those who praised.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Feedback is essential to improvement.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Look for silver linings&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Even when wrong it’s a chance to learn, and to grow. This ties in to the powerful idea of having a &lt;a href=&quot;https://fs.blog/carol-dweck-mindset/&quot;&gt;growth mindset&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Think of Expected Value rather than mere probability.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;There are things with low probability but high Expected Value. Look for these things&lt;/li&gt;
&lt;li&gt;Seek opportunities with low downsides but high upsides&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;“The low odds Musk assigned to his own projects’ success left many people scratching their heads. In an appearance on 60 Minutes in 2014, interviewer Scott Pelley tried to understand Musk’s logic: Elon Musk: Well, I didn’t really think Tesla would be successful. I thought we would most likely fail … Scott Pelley: But you say you didn’t expect the company to be successful? Then why try? Elon Musk: If something’s important enough you should try. Even if the probable outcome is failure.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Have a lot of social confidence, but not so much &lt;em&gt;epistemic&lt;/em&gt; confidence&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When it comes to epistemic confidence, doubt is a good friend.&lt;/li&gt;
&lt;li&gt;Admit uncertainty, but
&lt;ol&gt;
&lt;li&gt;justify why you are uncertain&lt;/li&gt;
&lt;li&gt;give estimates&lt;/li&gt;
&lt;li&gt;have a plan&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Change the game&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Sometimes we can reach solutions by changing the game, or at least changing the rules of the game.&lt;/li&gt;
&lt;li&gt;Problems can (and should) be attacked from multiple angles.&lt;/li&gt;
&lt;li&gt;This important lesson is called Reframing in Engineering Design.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Revise your opinions incrementally over time&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Update your beliefs as you get new information.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;View Errors as a learning opportunity&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Have a beginner’s mind.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Do not approach problems (or people) with strong preconceived notions&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Be aware of the &lt;a href=&quot;https://en.wikipedia.org/wiki/There_are_known_knowns&quot;&gt;unknown unknowns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Empathize&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;People have reasons to act as they do, even if you do not understand why.&lt;/li&gt;
&lt;li&gt;Try to see things from their perspective.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Adopt an “ideological turing test” mindset&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Understand the opposing side as deeply as possible&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Hold your identities lightly&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Holding an identity lightly means thinking of it in a matter-of-fact way, rather than as a central source of pride and meaning in your life. It’s a description, not a flag to be waved proudly.&lt;/li&gt;
&lt;li&gt;This allows you to know when to cooperate, and when to disrupt using an accurate lense.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Change your surroundings&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Change the people around you. This is often the best way to change your behavior and habits.&lt;/li&gt;
&lt;li&gt;Ties in together with the idea of intentionally designing your environment(also explored in &lt;em&gt;Atomic habits&lt;/em&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;But in the medium-to-long term, one of the biggest things you can do to change your thinking is to change the people you surround yourself with. We humans are social creatures, and our identities are shaped by our social circles, almost without our noticing.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>books</category><category>book-summary</category><category>improvement</category><category>decision-making</category></item><item><title>Systems over goals</title><link>https://tawanda.dev/systems-over-goals/</link><guid isPermaLink="true">https://tawanda.dev/systems-over-goals/</guid><description>One of the best books I read last year is Scott Adams&apos; How to Fail at Almost Everything and Still Win Big. A key insight I got from the book is that…</description><pubDate>Tue, 15 Feb 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;One of the best books I read last year is Scott Adams’ &lt;em&gt;How to Fail at Almost Everything and Still Win Big&lt;/em&gt;. A key insight I got from the book is that systems are more important than goals.&lt;/p&gt;
&lt;p&gt;Here is how Adams defines systems v goals:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;For our purposes, let’s say a goal is a specific objective that you either achieve or don’t sometime in the future. A system is something you do on a regular basis that increases your odds of happiness in the long run.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So if you do something everyday, it’s a system but if you are waiting to achieve it someday in the future, it’s a goal. This is a useful model to keep in mind, as it applies to so many things:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The system-versus-goals model can be applied to most human endeavors. In the world of dieting, losing twenty pounds is a goal, but eating right is a system. In the exercise realm, running a marathon in under four hours is a goal, but exercising daily is a system. In business, making a million dollars is a goal, but being a serial entrepreneur is a system.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;He adds:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Systems have no deadlines, and on any given day you probably can’t tell if they’re moving you in the right direction.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The benefits of having a systems mindset are clear: a consistent system will bias one to luck, increases the mathematical probability of success and it allows you to track. Systems lead to consistency, which leads to competency through compounding.&lt;/p&gt;
&lt;p&gt;What is important is to start, trust the process and &lt;em&gt;not stop&lt;/em&gt; even when no results are apparent. As written in the Tao Te Ching:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A tree as great as a man’s embrace springs from a small shoot;&lt;br&gt;
A terrace nine stories high begins with a pile of earth;&lt;br&gt;
A journey of a thousand miles starts under one’s feet.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I like to remind myself of this when I do not see immediate results and begin doubting myself. All I need to do is check if I am &lt;em&gt;consistently&lt;/em&gt; following a good system.&lt;/p&gt;</content:encoded><category>life</category><category>books</category><category>process</category><category>improvement</category></item><item><title>Building Nota- An Open Source Desktop Application for Managing Kindle Highlights and Notes</title><link>https://tawanda.dev/building-nota-electron-desktop-app/</link><guid isPermaLink="true">https://tawanda.dev/building-nota-electron-desktop-app/</guid><description>On expanding my Kindle highlights tool to become a desktop app</description><pubDate>Wed, 01 Sep 2021 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I’ve previously &lt;a href=&quot;https://tawanda.dev/kindle-highlights-tool/&quot;&gt;written&lt;/a&gt; about the simple [JavaScript script]  I wrote which organizes  highlights and notes made on Kindle ereaders. It’s on &lt;a href=&quot;https://github.com/tawandamoyo/KindleKlipper&quot;&gt;Github&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I use the script a lot but I must admit that it’s not user friendly. I recently had to use it and I almost wept - there was no easy way to specify the file to be loaded, and very sparse instructions or explanations.&lt;/p&gt;
&lt;p&gt;That day I learnt some valuable lessons about the craft of making software. I learnt the importance of good documentation. At the very least there should always be a clearly written README with screenshots if possible. And if you are building a tool that runs in the terminal, or a CLI it’s important to give hints, and provide help pages etc.&lt;/p&gt;
&lt;p&gt;But I digress - the realization that my app is virtually unusable made me think of converting it into a desktop app.&lt;/p&gt;
&lt;p&gt;The easiest way to make a desktop app seems to be Electron. Electron is a JavaScript runtime that makes it possible to build cross-platform desktop apps using JavaScript, HTML and CSS.&lt;/p&gt;
&lt;p&gt;Though Electron gets bad rep from a lot of developers it has some good things in its favor. First it’s JavaScript, which means I get to use a language I’m already familiar with. Also since Electron apps are similar to web apps I can easily style my app using CSS.&lt;/p&gt;
&lt;p&gt;The way Electron works is it sort of combines Chromium and Node.js enabling stuff that’s not possible when using either on it’s own. This property gives Electron incredible power because it’s then possible to use Node.js features like filesystem and OS access while at the same time having access to DOM features and Web APIs.&lt;/p&gt;
&lt;p&gt;The app I’m building is called Nota (Latin for Notes) and it’ll live in this &lt;a href=&quot;https://github.com/tawandamoyo/Nota&quot;&gt;Github repo&lt;/a&gt;. I’ll be committing and pushing to it as I go.&lt;/p&gt;</content:encoded><category>learning</category><category>building</category><category>open source</category><category>electron</category></item><item><title>The Right Tools Make for A Better Web Experience</title><link>https://tawanda.dev/right-tools-better-web/</link><guid isPermaLink="true">https://tawanda.dev/right-tools-better-web/</guid><description>A wasted afternoon debugging WordPress, and how an increasingly bloated web costs the people on the slowest phones and the slowest connections.</description><pubDate>Mon, 15 Mar 2021 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Today I had to deploy a quick landing page for a client. I opted to use WordPress because I thought it would take the shortest time. Mistake.&lt;/p&gt;
&lt;p&gt;Installing WordPress itself took less than the famous five minutes, but I soon ran into problems. First after installing the Divi theme I got the dreaded: “There has been a critical error on this website.”&lt;/p&gt;
&lt;p&gt;I purged the database, reinstalled WordPress, and everything seemed to work well. Then I customized the site a little and tried to test it using different browsers and devices. For some reason I could not see any images when I visited the site using Firefox and Brave. Same story on the mobile version of Chrome. And the site took ages to load.&lt;/p&gt;
&lt;p&gt;What should have been a quick job, perhaps a few hours, turned out to be a wasted afternoon spent trawling through WordPress forums, going back and forth with the hosting providers and countless installations and uninstallations of various themes and plugins.&lt;/p&gt;
&lt;p&gt;In hindsight I should have just spinned up a quick template using pure HTML and CSS and maybe a bit of JavaScript. That would have delivered a lightweight and secure site that would have worked on different devices without any problems and without needing to be updated.&lt;/p&gt;
&lt;p&gt;Instead of saving time I ended up spending way longer on debugging WordPress than I might have spent writing custom code. I am still at it. I chose the wrong tool for the job.&lt;/p&gt;
&lt;p&gt;I love WordPress, don’t get me wrong, after all it is the platform that got me into software development, (and this site runs WordPress) but I now understand why it gets such bad rep. The platform is a mess.&lt;/p&gt;
&lt;p&gt;And it’s not only WordPress. It’s basically every application and website out there. Lots of JavaScript, fonts, libraries and countless other external ( and internal) scripts and files.&lt;/p&gt;
&lt;p&gt;Such is the state of modern web development: bloated themes, frameworks and libraries all doing what simple HTML and CSS can do in a more elegant and cleaner way. Not to mention other benefits like faster load times and security.&lt;/p&gt;
&lt;p&gt;I think one reason why a lot of people use WordPress is its ease of deployment. There are thousands of themes out there, many of them free, and most hosting providers have tools that automate the WordPress installation. There are also countless plugins for doing virtually whatever a user wants. This is why WordPress is so powerful - it offers everyone a quick and easy way to deploy a website and that’s a good thing ( thanks Matt).&lt;/p&gt;
&lt;p&gt;But this is the source of most of WordPress’ problems as well. The commercial themes that try to do everything are often bloated, slow and vulnerable to attacks.&lt;/p&gt;
&lt;p&gt;It is clear to me now that while WordPress, React, and other buzzwords, are useful, it is possible that we are misusing these tools. In most cases they are overkill. They are the wrong tools for many jobs.&lt;/p&gt;
&lt;p&gt;-------------------&lt;/p&gt;
&lt;p&gt;I have been reading &lt;a href=&quot;https://hpbn.co/&quot;&gt;&lt;em&gt;High Performance Browser Networking&lt;/em&gt;&lt;/a&gt;, and the point stressed throughout the book is that users expect quick loading sites. While the bottlenecks on fast delivery are often physical, i.e, the communication links, the network design, latency etc, the apps themselves can be bloated. &lt;/p&gt;
&lt;p&gt;In Zimbabwe the internet is slow (as in most of Africa), and it dawned on me that I should be more mindful of the loadtimes of the websites I make. A big part of that, I think, is staying clear of most modern frameworks and tools.&lt;/p&gt;
&lt;p&gt;This morning in my Feedly there was an article about web performance titled “&lt;a href=&quot;https://infrequently.org/2021/03/the-performance-inequality-gap/&quot;&gt;The Performance Inequality Gap”,&lt;/a&gt; which, among other things, pointed out that while phones have gotten more powerful, the average size of a web page has increased as well. It didn’t strike me then that I am part of the problem.&lt;/p&gt;
&lt;p&gt;Engineering, like Economics, is a discipline of constrained optimization. &lt;/p&gt;
&lt;p&gt;Choosing the right tool is an essential part of the job and if we are to provide a joyful experience to the many internet users who have slower phones and even slower internet, perhaps we should spend more time thinking about the tools we use for the job.&lt;/p&gt;</content:encoded><category>software-development</category></item><item><title>The Algebra of Happiness by Scott Galloway</title><link>https://tawanda.dev/the-algebra-of-happiness-scott-galloway/</link><guid isPermaLink="true">https://tawanda.dev/the-algebra-of-happiness-scott-galloway/</guid><description>Notes on The Algebra of Happiness by Scott Galloway</description><pubDate>Mon, 10 Aug 2020 00:00:00 GMT</pubDate><content:encoded>&lt;h2 id=&quot;summary&quot;&gt;Summary:&lt;/h2&gt;
&lt;p&gt;I read Scott Galloway’s The Algebra of Happiness last year and it kinda changed my life.&lt;/p&gt;
&lt;p&gt;It’s a book on figuring life out and it contains useful tips on how to live well. Though much of the book is what some may consider common wisdom, it really opened my eyes and led to more deliberation and reflection.&lt;/p&gt;
&lt;p&gt;Consider it a cheat sheet by your worldly uncle who has seen the world and understands how it works. [8/10]&lt;/p&gt;
&lt;h2 id=&quot;notes&quot;&gt;Notes:&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;The world is not yours for the taking, but for the trying. Try hard, really hard.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The world does not belong to the big, but to the fast.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You want to cover more ground in less time than your peers.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;This is partially built on talent, but mostly on strategy and endurance.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;the most important decision you’ll make is not where you work or who you party with, but who you choose to partner with for the rest of your life.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;However, the most important decision you’ll make is not where you work or who you party with, but who you choose to partner with for the rest of your life.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Good sex is 10 percent of a relationship, but bad sex is 90 percent of a relationship.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You also need to ensure that you align on values like religion, how many kids you want, your approaches to raising kids, your proximity to your parents, sacrifices you’re willing to make for economic success, and who handles which responsibilities. Money is an especially important value for alignment, as the number one source of marital acrimony is financial stress. Does your partner’s contribution to, approach to, and expectations about money—and how it flows in and out of the household—fit with yours?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Get to a place that’s crowded with success. Big cities are Wimbledon—even if you aren’t Rafael Nadal, your game will improve by being on the court with him. And you’ll either get in better shape or learn you shouldn’t be at Wimbledon.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;There is a correlation between how much money you have and how happy you are. Money can buy happiness, to a point. But once you reach a certain level of economic security, the correlation flattens.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I made the mistake of spending all my time, for most of my life, trying to figure out how to make more money, instead of taking a pause and asking myself what makes me happy.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;But take notes on the things that give you joy and satisfaction, and start investing in those things.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The notion of putting money away is most important to the cohort that least understand it—young people—as “long term” is not a concept they’ve grasped.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Take a ton of pictures, text your friends stupid things, check in with old friends as often as possible, express admiration to coworkers, and every day, tell as many people as you can that you love them. A couple of minutes every day—the payoff is small at first, and then it’s immense.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It’s difficult to get to economic security with just your salary, as you will naturally raise or lower your lifestyle to match what you make.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The definition of “rich” is having passive income greater than your burn.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;By the time you’re thirty, you should have a feel for what your burn is. Young people are 100 percent focused on their earnings. Adults also focus on their burn.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The Harvard Medical School Grant Study shows that relationships matter more than money or fame&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The presence of one thing in a man’s life predicted unhappiness better than any other factor: alcohol. It led to failed marriages, careers coming off the tracks, and bad health.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Studies show that people overestimate the amount of happiness things will bring them and underestimate the long-term positive effect of experiences.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The key to success is the ability to mourn and then move&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Everyone experiences failure and tragedy. You will get fired, lose people you love, and likely have periods of economic stress. The key to success is the ability to mourn and then move on.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The number one piece of advice seniors would give to their younger selves is that they wish they’d been less hard on themselves.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Talent is key, but it will only gain you entrance to a crowded VIP room.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The chaser that takes talent over the top into success is hunger. Hunger can come from a lot of places. I don’t think I was born with it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It didn’t take long to realize that the secret is to find something you’re good at. The rewards and recognition that stem from being great at something will make you passionate about whatever that something&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;THE TRAITS of successful entrepreneurs haven’t changed much in the digital age: you need more builders than branders, and it’s key to have a technologist as part of, or near, the founding team.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Are you comfortable with public failure?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Most failures are private:&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;doesn’t matter if you’re running the corner store or Pinterest—you’d better be damn good at selling if you plan to start&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Kids who can code and are two years out of school, who are mediocre, are making $100,000+ in the market. What’s worse is that they believe they’re worth it. If you can code, yay for you. But you have no real hard skills or management ability. Not recognizing that you’re overpaid means you won’t have the funds to avoid your parents’ basement when shit gets real.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When times are bad, people look to gray hair for leadership. When times are good/frothy, people look for youth.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;people who tell you to follow your passion are already rich.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Benchmarks, metrics, and milestones range from the meaningless to the profound. Accountability and insight are the by-products of math. Numbers yield insights about markets, how value is created, and how we want to live our lives. A review of the metrics in your life is a healthy exercise.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Professional success is the means, not the end.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;important, meaningful relationships with family and friends.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The end is economic security for your family and, more important, meaningful relationships with family and friends.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Serendipity Is a Function of Courage&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;nothing wonderful, I’m talking really fantastic, will happen without taking a risk and subjecting yourself to rejection. Serendipity is a function of courage.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Knowing what you want is a blessing, and fear of rejection is a bigger obstacle than lack of talent or the market. Train yourself to take some sort of risk (ask for a raise, introduce yourself around at a party) every day and get comfortable grasping beyond your reach.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The truth about 90-plus percent of entrepreneurs is that we start companies not because we’re so skilled, but because we don’t have the skills to be an effective employee.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Being an adult is about recognizing that it’s not all about you.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;there’s a difference between being right and being effective. Employees must navigate the two and realize they are part of a team, and they need to be supportive of one another.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Amateurs act on emotion, pros on numbers.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Randy and Cy instilled in me that remarkable men can become irrationally passionate about the well-being of a child … who isn’t theirs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;LOVE AND relationships are the ends—everything else is just the means.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Love received is comforting, love reciprocated is rewarding, and love given completely is eternal.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The key decision you’ll make in life is who you have kids with. Who you marry is meaningful; who you have kids with is profound.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Raising kids with someone who is kind and competent and who you enjoy being with is a series of joyous moments smothered in comfort and reward. Raising kids with someone you don’t like, or who isn’t competent, is moments of joy smothered in anxiety and disappointment.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Building a life with someone who loves you, and who you love, near guarantees a life of reward interrupted by moments of pure joy.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You will, on a balanced scorecard, likely end up with someone in your weight class in terms of character, success, looks, and pedigree.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Like someone who likes you.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Studies show that marriage is advantageous economically.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Don’t keep score.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Don’t ever let your wife be cold or hungry.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Express affection and desire as often as possible.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;AFFECTION EXCHANGE theory, introduced by Professor Kory Floyd, postulates that affection strengthens bonds, provides access to resources, and communicates your potential as a parent, increasing your pool of potential mates.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;IN A capitalist society, we mark life by our purchases.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A better proxy for your life isn’t your first home, but your last.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Your first house signals the meaningful—your future and possibility. Your last home signals the profound—the people who love you.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;but if you die at home, surrounded by people who love you, you are a success. It’s a sign that you forged meaningful relationships and that you were generous with people.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Getting to a place, economically, emotionally, and spiritually, where you can love someone completely, without expecting anything in return, is the absolute.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;…we are hunter-gatherers and are happiest when in motion and surrounded by others.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;a decent proxy for your success will be your ratio of sweating to watching others sweat (watching sports on TV).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It’s not about being ripped, but committing to being strong physically and mentally.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;As you get older and begin to register the finite time you have, you want to freeze time and have moments when you feel something.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In psychology research, gratitude is consistently correlated with greater happiness.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Food, sex, and kids. We’re wired to be addicted to things fundamental to the survival of the species.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;</content:encoded><category>books</category><category>life-tips</category><category>reviews</category></item><item><title>Discipline Equals Freedom by Jocko Willink</title><link>https://tawanda.dev/discipline-equals-freedom-jocko-willink/</link><guid isPermaLink="true">https://tawanda.dev/discipline-equals-freedom-jocko-willink/</guid><description>Notes from Jocko Willink&apos;s Discipline Equals Freedom</description><pubDate>Mon, 03 Aug 2020 00:00:00 GMT</pubDate><content:encoded>&lt;h2 id=&quot;summary&quot;&gt;Summary:&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;Discipline Equals Freedom&lt;/em&gt; is a field manual for doing hard things. Jocko would know one or two things about that of course, he was a navy seal for 20 years and wakes at dawn every single day.&lt;/p&gt;
&lt;p&gt;The goal is to be so disciplined that motivation does not matter. I listened to the audiobook and it was short and enjoyable, with brief lessons and some practical tips on how to live a more disciplined life.&lt;/p&gt;
&lt;p&gt;I liked especially the idea of attacking the day early and with exercise, something I’ve tried to incorporate in my own life, as well as to think about the value and effects of the things I eat (esp sugar). I also liked the part about getting enough sleep and the tips to ensure sufficient and consistent sleeping habits.&lt;/p&gt;
&lt;p&gt;The idea of discipline being equal to freedom is an old one. Aristotle mentioned it, saying, “Through discipline comes freedom”. So did Rousseau, who argued that liberty is living within the laws we set for ourselves. (I learnt of that courtesy of &lt;a href=&quot;https://www.youtube.com/watch?v=xhm55mIdSuk&quot;&gt;this brilliant political philosophy course offered at Yale&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Well worth a read, though the ideas and principles are not exactly new. 8/10&lt;/p&gt;
&lt;h2 id=&quot;notes&quot;&gt;Notes&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;The notes below are mine, made while listening to the book, though they are by and large paraphrases of the text. I captured them on Google Keep.&lt;/em&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;Where does discipline come from?&lt;/strong&gt;&lt;br&gt;
- discipline comes from inside&lt;br&gt;
- it’s an internal force&lt;br&gt;
- it comes when you decide to make a mark on the world&lt;br&gt;
- discipline will make you free&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Overcoming Procrastination&lt;/strong&gt;&lt;br&gt;
- start here and now&lt;br&gt;
- kill your idols&lt;br&gt;
- learn from the faults of others&lt;br&gt;
- the only person you can control is you&lt;br&gt;
- get faster, stronger, smarter, be more humble, have less ego&lt;br&gt;
- you become this by controlling your mind&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Mind Control&lt;/strong&gt;&lt;br&gt;
- this is controlling your own mind&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Stress&lt;/strong&gt;&lt;br&gt;
- Step 1 is to gain perspective, others have gone through worse&lt;br&gt;
- detach from the present circumstances
- stress is often caused by stuff beyond your control&lt;br&gt;
- if it’s something you can control but you ain’t then it’s a discipline issue&lt;br&gt;
- use stress to make you a better you&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Destroyer Mode&lt;/strong&gt;&lt;br&gt;
- takes emotion and logic to get into destroyer mode&lt;br&gt;
- let one help the other&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Until the end&lt;/strong&gt;&lt;br&gt;
- you can’t relax&lt;br&gt;
- there’s always more to do&lt;br&gt;
- don’t be finished, always be starting&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Application of discipline&lt;/strong&gt;&lt;br&gt;
- Discipline starts with waking up early&lt;br&gt;
- discipline is being in control of your emotions&lt;br&gt;
- discipline means taming your ego&lt;br&gt;
- discipline is your best friend&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Questions&lt;/strong&gt;&lt;br&gt;
- Knowledge is the ultimate weapon&lt;br&gt;
- it is gained by asking questions&lt;br&gt;
- which questions to ask?&lt;br&gt;
- question everything&lt;br&gt;
- ask until you understand&lt;br&gt;
- most important question yourself&lt;br&gt;
- who am I?&lt;br&gt;
- what am I doing to improve?&lt;br&gt;
- is this all I can give?&lt;br&gt;
- do I want to live like this?&lt;br&gt;
- ask the hard questions&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Fight&lt;/strong&gt;&lt;br&gt;
- fight as hard as possible&lt;br&gt;
- give the full measure&lt;br&gt;
- fight against weakness, against fear&lt;br&gt;
- give every day the best you can give&lt;br&gt;
- Go forward&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Compromise&lt;/strong&gt;&lt;br&gt;
- a failure to compromise is a failure to succeed&lt;br&gt;
- compromise is required with external people&lt;br&gt;
- internally there is no compromise&lt;br&gt;
- you have to hold the line&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default aggressive&lt;/strong&gt;&lt;br&gt;
- proactive is aggressive, be proactive&lt;br&gt;
- create a situation so you are in control&lt;br&gt;
- aggressive means you are always ready to attack&lt;br&gt;
- this does not mean recklessness&lt;br&gt;
- it means fast thinking, fast moving, fast response&lt;br&gt;
- aggression is a fire that says I’m going to win&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Nature v Nurture&lt;/strong&gt;&lt;br&gt;
- it’s neither - successful people decide to be so&lt;br&gt;
- they take on the hard stuff&lt;br&gt;
- think not of the past. Think of where you are going&lt;br&gt;
- eat good food, workout, keep your mind clean&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Fear of failure&lt;/strong&gt;&lt;br&gt;
- fear can paralyze&lt;br&gt;
- be afraid of failure&lt;br&gt;
- this should motivate you to work hard, think hard, be relentless&lt;br&gt;
- be HORRIFIED, TERRIFIED, of sitting on the sidelines doing nothing&lt;br&gt;
- being no closer to your goals must scare you over all other things&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The War Path&lt;/strong&gt;&lt;br&gt;
- we are always fighting&lt;br&gt;
- prepare always&lt;br&gt;
- leads to control and ownership of your own life&lt;br&gt;
- the warpath is a path of discipline, that leads to freedom.&lt;br&gt;
- In the end it leads to peace&lt;br&gt;
-&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Sugarcoated lies&lt;/strong&gt;&lt;br&gt;
- sweet/fatty things are poison&lt;br&gt;
- sugar kills&lt;br&gt;
- it won’t make you faster, stronger, smarter&lt;br&gt;
- you don’t need to eat poison&lt;br&gt;
- fight the temptation, to strengthen your will and protect your body&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Bad instincts&lt;/strong&gt;&lt;br&gt;
- the instinct that says you have had enough is a liar&lt;br&gt;
- the instinct that says you can rest must be defeated&lt;br&gt;
- push it into the ground, destroy it&lt;br&gt;
- replace it with an instinct that says get up and fight&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Not feeling it&lt;/strong&gt;&lt;br&gt;
- when you are not in the mood just go through the motions&lt;br&gt;
- hammer on it&lt;br&gt;
- Get out of bed&lt;br&gt;
- taking a break is the one thing that should be procrastinated&lt;br&gt;
- the desire to rest is often weakness&lt;br&gt;
- stay on the warpath&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Regret&lt;/strong&gt;&lt;br&gt;
- the most important thing to learn is that we have so much to learn&lt;br&gt;
- you get one shot&lt;br&gt;
- regret is useless except as a lesson&lt;br&gt;
- walking around full of it doesn’t help&lt;br&gt;
- let it teach you and move on&lt;br&gt;
- be filled with knowledge, not regret&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Focus&lt;/strong&gt;&lt;br&gt;
- your long term goal should be so embedded in your mind that you never lose sight of it&lt;br&gt;
- never lose focus, a day of no small steps leads to a week, etc&lt;br&gt;
- you lose focus. And you start rationalising&lt;br&gt;
- you start thinking maybe you can’t do it. And you settle&lt;br&gt;
- embed the long term goal in your mind. Burn it there&lt;br&gt;
- think about it, write about it, talk about it&lt;br&gt;
- every day take a step. EVERY day&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hesitation&lt;/strong&gt;&lt;br&gt;
- Between the acting and the first action, the action is a phantasm or dreadful dream - Brutus.&lt;br&gt;
- fear causes hesitation, hesitation causes defeat&lt;br&gt;
- it defeats us, so we must defeat it&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Draw fire&lt;/strong&gt;&lt;br&gt;
- life is not fair
- draw fire&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Good&lt;/strong&gt;&lt;br&gt;
- How do I deal with defeats and setbacks&lt;br&gt;
- say, when you encounter setbacks, “Good”&lt;br&gt;
- there’s always a small good everywhere&lt;br&gt;
- say Good&lt;br&gt;
- accept reality and focus on a solution&lt;br&gt;
- If you are breathing you can fight&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Death&lt;/strong&gt;&lt;br&gt;
- say, of past colleagues (&lt;em&gt;and I suppose, experiences and lessons&lt;/em&gt;) “I was lucky to have them”&lt;br&gt;
- death is part of life&lt;br&gt;
- it reminds us to be thankful for everyday&lt;br&gt;
- to live every day&lt;br&gt;
- to have a purpose&lt;br&gt;
- to go out there each day and live&lt;br&gt;
- embrace life&lt;br&gt;
- let us live for those who live no more&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Everyday&lt;/strong&gt;&lt;br&gt;
- There are no weekends&lt;br&gt;
- every day is a Monday&lt;br&gt;
- every day is an opportunity to come out like a man possessed and attack the day without mercy&lt;br&gt;
- no more excuses&lt;br&gt;
- no more I will start tomorrow&lt;br&gt;
- now is the time for strength&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Staying motivated&lt;/strong&gt;&lt;br&gt;
- motivation is fickle and unreliable&lt;br&gt;
- count on discipline rather than motivation&lt;br&gt;
- there’s no magic pill, you have to do the work&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Me v Me&lt;/strong&gt;&lt;br&gt;
- We all have limitations&lt;br&gt;
- there are things we cannot do or be&lt;br&gt;
- but it does not mean quitting&lt;br&gt;
- it means being the best version of myself&lt;br&gt;
- ask “how close can I get to greatness?”&lt;br&gt;
- my glory happens in the darkness of the early morning, in solitude&lt;br&gt;
- every single day earn a victory&lt;br&gt;
- a victory of determination and will&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Remain Vigilant&lt;/strong&gt;&lt;br&gt;
- we weaken slowly, over time&lt;br&gt;
- we are not defeated in one decisive battle&lt;br&gt;
- weakness is a slow incremental process, chipping away at our discipline&lt;br&gt;
- One day you see you are weak, disorganized and decaying&lt;br&gt;
- so remain vigilant, practice discipline at all times&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Fear&lt;/strong&gt;&lt;br&gt;
- fear is normal&lt;br&gt;
- step aggressively towards your fear&lt;br&gt;
- Step&lt;br&gt;
- everything starts with step&lt;br&gt;
- be aggressive&lt;br&gt;
- Step&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Darkness&lt;/strong&gt;&lt;br&gt;
- The sun doesn’t shine everyday&lt;br&gt;
- don’t let the darkness consume you&lt;br&gt;
- the only defeat is quitting /surrender&lt;br&gt;
- to fight against the darkness is to win&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Overwhelmed&lt;/strong&gt;&lt;br&gt;
- life can be overwhelming&lt;br&gt;
- when it gets overwhelming it’s time to fight harder&lt;br&gt;
- it is time to dig in&lt;br&gt;
- assess which problem to attack first&lt;br&gt;
- let the challenges elevate you&lt;br&gt;
- let the adversity of today turn you into a better person&lt;br&gt;
- Look back on your challenges and thank them&lt;br&gt;
-&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Negative talk&lt;/strong&gt;&lt;br&gt;
- sometimes confront negativity but do it cleverly
- however it’s better to ignore and outperform&lt;br&gt;
- out work and outperform&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hold the line&lt;/strong&gt;&lt;br&gt;
- Get stronger, get better&lt;br&gt;
- grow, learn and live&lt;br&gt;
- be in defiance of decay&lt;br&gt;
- fight, do not surrender&lt;br&gt;
-&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Begin&lt;/strong&gt;&lt;br&gt;
- Get up and go&lt;br&gt;
- do it quickly, without thought&lt;br&gt;
- don’t reason&lt;br&gt;
- begin early&lt;br&gt;
-&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Engage&lt;/strong&gt;&lt;br&gt;
- say “weakness is strong but I’m stronger”&lt;br&gt;
-Fight against fatigue and weakness and soreness&lt;br&gt;
-don’t submit&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Laughter wins&lt;/strong&gt;&lt;br&gt;
- have fun 😊&lt;br&gt;
- life is hard but gets easier when you laugh&lt;br&gt;
- laugh at them all&lt;/p&gt;
&lt;h3 id=&quot;part-2-actions&quot;&gt;Part 2 Actions&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Physical Training&lt;/strong&gt;&lt;br&gt;
- You’ll be healthier&lt;br&gt;
- exercise will make you smarter&lt;br&gt;
- working out fights disease&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Stress&lt;/strong&gt;&lt;br&gt;
- sometimes stress is good:&lt;br&gt;
- stress releases glucose to the brain, also cotazole which helps focus and gives energy&lt;br&gt;
- however stress is often bad&lt;br&gt;
- it causes fat&lt;br&gt;
- exercise is stress, so it’s good release of cotazole&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;When&lt;/strong&gt;&lt;br&gt;
- when?&lt;br&gt;
- lack of time is the chief excuse
- we all have time at predawn&lt;br&gt;
- Get up before the sun&lt;br&gt;
- guaranteed to make your day better&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Psychological edge&lt;/strong&gt;&lt;br&gt;
- you win in your mind. You’re working out while they sleep&lt;br&gt;
- discipline is key
- plan your workout the night prior&lt;br&gt;
- Write down the things you need to accomplish in the morning&lt;br&gt;
- your mornings will feel good 😁&lt;br&gt;
- you’ll want to stay on that path all day&lt;br&gt;
- the opposite is also true: when you stray off the path you stay off&lt;br&gt;
- discipline begets discipline&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Sleep&lt;/strong&gt;&lt;br&gt;
- get enough sleep&lt;br&gt;
- if you eat clean and y0ure fit your sleep is better.&lt;br&gt;
- stay healthy and eat clean&lt;br&gt;
- go to bed earlier&lt;br&gt;
- get up early&lt;br&gt;
- there are no distractions in the morning&lt;br&gt;
- set your alarm early and no snooze&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Steps to sleep early&lt;/strong&gt;&lt;br&gt;
1. Get tired, work out,&lt;br&gt;
2. Turn off the computer&lt;br&gt;
3. Read&lt;br&gt;
4. Get up early&lt;br&gt;
5. Do it everyday&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Power naps&lt;/strong&gt;&lt;br&gt;
- elevate your feet&lt;br&gt;
- keep it short.&lt;br&gt;
- 6- 8 mins&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Workouts&lt;/strong&gt;&lt;br&gt;
- do something, there are many ways of keeping fit&lt;br&gt;
- track your progress
- records can help achieve goals&lt;br&gt;
- be consistent&lt;br&gt;
- maintain the routine&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Building a home gym&lt;/strong&gt;&lt;br&gt;
- eliminates all kinds of excuses&lt;br&gt;
- start with a pull up bar&lt;br&gt;
- also get a squat rack&lt;br&gt;
- then get a barbell and weights&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Martial arts&lt;/strong&gt;&lt;br&gt;
- everyone should train in martial arts just as everyone eats&lt;br&gt;
- 3 categories : grappling, striking, weapons&lt;br&gt;
- the mind is the most powerful weapon of all
- practice situational awareness to be safe&lt;br&gt;
- in terms of weapons the firearm is best&lt;br&gt;
- Brazilian Jujitsu first, most fighting happens on the ground.&lt;br&gt;
- but first run away
- next is boxing&lt;br&gt;
- simple and easy to learn and also gets you fit enough to run
- punch and avoid being punched&lt;br&gt;
- then run&lt;br&gt;
- then Muai Thai and wrestling&lt;/p&gt;</content:encoded><category>books</category><category>book-notes</category><category>jocko-willink</category><category>self-improvement</category></item></channel></rss>