<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Richard Ayikwei on Medium]]></title>
        <description><![CDATA[Stories by Richard Ayikwei on Medium]]></description>
        <link>https://medium.com/@richardayikweibee?source=rss-8e5b597315eb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*IxGnT8Xszk3bgpzyFD_kQQ.jpeg</url>
            <title>Stories by Richard Ayikwei on Medium</title>
            <link>https://medium.com/@richardayikweibee?source=rss-8e5b597315eb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 11:45:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@richardayikweibee/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Building a Personal Remote Linux Server — Part 6]]></title>
            <link>https://medium.com/@richardayikweibee/building-a-personal-remote-linux-server-part-6-5f88b11e5e4d?source=rss-8e5b597315eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f88b11e5e4d</guid>
            <category><![CDATA[telegram-bot]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[monitoring]]></category>
            <dc:creator><![CDATA[Richard Ayikwei]]></dc:creator>
            <pubDate>Fri, 10 Jul 2026 13:04:12 GMT</pubDate>
            <atom:updated>2026-07-10T13:04:12.904Z</atom:updated>
            <content:encoded><![CDATA[<h3>From Monitoring to Operations: Building an Interactive Telegram Bot</h3><blockquote><strong><em>Note:</em></strong><em> This article focuses on some of the design decisions behind the Telegram bot. It isn’t intended to be a complete implementation guide. The full source code, installation instructions, and project documentation are available in the Monitor GitHub repository:</em></blockquote><blockquote><a href="https://github.com/richardayikwei/monitor"><em>https://github.com/richardayikwei/monitor</em></a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ePt3EQOQFwlPAqYV" /><figcaption>Photo by <a href="https://unsplash.com/@rozetsky?utm_source=medium&amp;utm_medium=referral">Ant Rozetsky</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>When I first started building Monitor, it was simply a Python script.</p><p>Over time it evolved into something much more useful.</p><p>It could:</p><ul><li>Monitor disk usage.</li><li>Monitor memory usage.</li><li>Check important system services.</li><li>Send Telegram alerts.</li><li>Generate daily reports.</li><li>Notify me when the server restarted.</li></ul><p>The monitor had become proactive.</p><p>There was just one thing it couldn’t do.</p><p>Answer questions.</p><h3>The Problem</h3><p>Imagine sitting away from home and wondering:</p><blockquote><em>How much disk space is left?</em></blockquote><p>Or:</p><blockquote><em>Is SSH still running?</em></blockquote><p>The information existed.</p><p>The monitoring agent already knew the answer.</p><p>But I still had to:</p><ul><li>Open an SSH session.</li><li>Log into the server.</li><li>Run commands manually.</li></ul><p>It felt unnecessary.</p><p>I wanted the monitor to become interactive.</p><h3>Why Telegram?</h3><p>I was already using Telegram for notifications.</p><p>Instead of building a web application, exposing ports, or creating another interface, I realised something.</p><p>Why not use the same application that was already delivering notifications?</p><p>Rather than opening a browser…</p><p>I could simply send my server a message.</p><h3>The First Command</h3><p>The first command I implemented was intentionally simple.</p><pre>/memory</pre><p>The bot collected the current memory usage and replied with a formatted message.</p><p>The handler itself remained very small.</p><pre>async def memory_command(<br>    update: Update,<br>    context: ContextTypes.DEFAULT_TYPE,<br>) -&gt; None:<br>    report = build_memory_report()</pre><pre>    await update.message.reply_text(<br>        report<br>    )</pre><p>One thing I tried to keep throughout the project was separating responsibilities.</p><p>The handler wasn’t responsible for calculating memory usage.</p><p>It simply asked another part of the application to build the report.</p><h3>Building More Commands</h3><p>Once one command existed…</p><p>Adding more became straightforward.</p><pre>/disk</pre><pre>/services</pre><pre>/help</pre><p>Each command followed the same pattern.</p><p>Receive a request.</p><p>Build a report.</p><p>Send a response.</p><p>That consistency made the project much easier to extend.</p><h3>Reusing Existing Code</h3><p>One design decision I was particularly happy with was avoiding duplicate logic.</p><p>The monitoring checks already existed.</p><p>Instead of writing new code for the Telegram bot, I reused the same functions.</p><p>For example:</p><pre>config = load_config()</pre><pre>report = build_services_report(<br>    config[&quot;services&quot;]<br>)</pre><pre>await update.message.reply_text(<br>    report<br>)</pre><p>The Telegram bot became another consumer of the monitoring system rather than a completely separate application.</p><h3>Running Continuously</h3><p>Unlike the monitoring scripts, the Telegram bot couldn’t run once and exit.</p><p>It needed to remain connected.</p><p>That made it a natural candidate for a long-running systemd service.</p><p>Once started, it waits for commands, responds to requests, and automatically restarts if necessary.</p><p>One more Linux service quietly doing its job.</p><h3>Looking Back</h3><p>When I started this series, my goal was simply to repurpose an old laptop.</p><p>I didn’t expect it to lead me into Linux administration, networking, Python packaging, systemd, automation, or operational tooling.</p><p>Every step created the need for the next.</p><p>Building the server led to remote access.</p><p>Remote access led to a development environment.</p><p>A development environment led to monitoring.</p><p>Monitoring led to automation.</p><p>Automation naturally led to an interactive operations interface.</p><p>None of it was planned from the beginning.</p><p>The project evolved one problem at a time.</p><h3>More Than a Monitor</h3><p>One of the biggest lessons from this project is that software rarely begins as its final form.</p><p>Monitor started as a simple script checking disk usage.</p><p>Today it includes:</p><ul><li>Health monitoring</li><li>Service monitoring</li><li>Telegram notifications</li><li>Daily reports</li><li>Boot notifications</li><li>An interactive Telegram bot</li><li>systemd integration</li><li>Documentation</li></ul><h3>The Journey Continues</h3><p>This article concludes the series on building my personal Linux server and the monitoring tools around it.</p><p>The complete Monitor project, including the implementation details, documentation, and setup instructions, is available on GitHub:</p><p><a href="https://github.com/richardayikwei/monitor">https://github.com/richardayikwei/monitor</a></p><p>My next project is considerably more ambitious.</p><p>I’m beginning work on <strong>Community Compute</strong>, an idea for a distributed computing platform that explores how underutilized personal computers could contribute computing resources while providing value back to their owners.</p><p>The project is currently in the planning stage, with the design documents available publicly on GitHub.</p><p>It will also be my opportunity to learn systems programming with Rust, distributed systems, and lower-level software development.</p><p>Like this series, I plan to document that journey as I learn.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f88b11e5e4d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Personal Remote Linux Server — Part 5]]></title>
            <link>https://medium.com/@richardayikweibee/building-a-personal-remote-linux-server-part-5-060c0a5ecb25?source=rss-8e5b597315eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/060c0a5ecb25</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[servers]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Richard Ayikwei]]></dc:creator>
            <pubDate>Fri, 03 Jul 2026 09:34:13 GMT</pubDate>
            <atom:updated>2026-07-03T09:34:13.835Z</atom:updated>
            <content:encoded><![CDATA[<h3>From Scripts to Services: Telegram Notifications, systemd Timers, and Automation</h3><blockquote><strong><em>Note:</em></strong><em> This article highlights some of the design decisions and implementation snippets behind the Monitor project. It is not intended to be a complete implementation guide. The full project structure, installation instructions, configuration, and documentation are available in the project’s GitHub repository and README:</em></blockquote><blockquote><a href="https://github.com/richardayikwei/monitor"><em>https://github.com/richardayikwei/monitor</em></a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YGkR7festCfxre0y" /><figcaption>Photo by <a href="https://unsplash.com/@markusspiske?utm_source=medium&amp;utm_medium=referral">Markus Spiske</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In Part 4, I introduced <strong>Monitor</strong>, a lightweight Linux monitoring agent I built to keep an eye on my personal server.</p><p>By then it could check:</p><ul><li>Disk usage</li><li>Memory usage</li><li>System services</li></ul><p>The problem was that it only worked if <strong>I remembered to run it</strong>.</p><p>That wasn’t monitoring.</p><p>That was just another script.</p><h3>The First Question</h3><p>I asked myself a simple question.</p><blockquote><strong><em>If the server already knows something is wrong, why should I have to log in to discover it?</em></strong></blockquote><p>The obvious answer was:</p><p>The server should tell me.</p><h3>Telegram Became the Notification Channel</h3><p>Instead of printing alerts to the terminal, I decided to send them to my phone using Telegram.</p><p>The notification function ended up being surprisingly small.</p><pre>def send_message(message: str) -&gt; None:<br>    requests.post(<br>        url,<br>        json={<br>            &quot;chat_id&quot;: chat_id,<br>            &quot;text&quot;: message,<br>        },<br>        timeout=10,<br>    )</pre><p>Suddenly the monitor became useful.</p><p>Instead of checking the server…</p><p>The server checked itself and contacted me when necessary.</p><h3>Separating Secrets from Configuration</h3><p>One lesson I wanted to apply early was keeping secrets out of the source code.</p><p>Instead of hard-coding credentials, the project loads them from environment variables.</p><pre>BOT_TOKEN = os.getenv(&quot;TELEGRAM_BOT_TOKEN&quot;)<br>CHAT_ID = os.getenv(&quot;TELEGRAM_CHAT_ID&quot;)</pre><p>Configuration such as thresholds and monitored services lives separately in a TOML file.</p><pre>disk_threshold = 90</pre><pre>memory_threshold = 90</pre><pre>services = [<br>    &quot;ssh&quot;,<br>    &quot;tailscaled&quot;,<br>    &quot;monitor-bot&quot;<br>]</pre><p>It made changing behavior much easier without modifying Python code.</p><h3>A Script Isn’t Enough</h3><p>Even with Telegram notifications, there was another problem.</p><p>Someone still had to remember to run the monitor.</p><p>Computers are much better at remembering schedules than people are.</p><p>This is where systemd timers became incredibly useful.</p><p>Instead of relying on me…</p><p>Linux became responsible for running the monitor.</p><h3>Scheduling Health Checks</h3><p>The timer itself was surprisingly simple.</p><pre>[Timer]<br>OnBootSec=5min<br>OnUnitActiveSec=15min</pre><p>Every fifteen minutes the operating system starts the monitoring service.</p><p>No cron jobs.</p><p>No background Python loops.</p><p>No additional software.</p><p>Just Linux doing what it already does well.</p><h3>Daily Reports</h3><p>Alerts are useful when something is wrong.</p><p>Sometimes I simply want confirmation that everything is healthy.</p><p>That led to daily reports.</p><p>Instead of only receiving messages during failures, I now receive a daily summary showing:</p><ul><li>Disk usage</li><li>Memory usage</li><li>Service status</li></ul><p>It’s a small feature, but it gives me confidence that everything is working as expected.</p><h3>Boot Notifications</h3><p>The next feature came from a simple observation.</p><p>If my server restarted while I wasn’t home…</p><p>I’d probably like to know.</p><p>A small boot notification solved that.</p><p>Whenever the machine starts, it sends me a Telegram message.</p><p>That tells me:</p><ul><li>The server is online.</li><li>Networking is working.</li><li>Telegram connectivity is working.</li></ul><p>One message confirms several things at once.</p><h3>Thinking Like an Operator</h3><p>Building Monitor changed the way I think about software.</p><p>Initially, I focused on writing code.</p><p>Gradually, I started thinking more about operating software.</p><p>Questions changed from:</p><blockquote><em>“Can I build this?”</em></blockquote><p>to</p><blockquote><em>“How will I know it’s still working next week?”</em></blockquote><p>That shift in thinking has probably been the biggest lesson from this project.</p><h3>Looking Ahead</h3><p>At this point the monitor could:</p><ul><li>Check the health of the server.</li><li>Run automatically.</li><li>Send notifications.</li><li>Produce daily reports.</li></ul><p>There was one inconvenience left.</p><p>Whenever I wanted to know the current state of the server…</p><p>I still had to wait for a notification or open an SSH session.</p><p>That naturally led to the next idea.</p><p>What if I could simply send my server a message?</p><p>In Part 6, I’ll cover how I extended the monitoring agent into an interactive Telegram bot capable of responding to commands such as /memory, /disk, and /services from anywhere.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=060c0a5ecb25" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Personal Remote Linux Server — Part 4]]></title>
            <link>https://medium.com/@richardayikweibee/building-a-personal-remote-linux-server-part-4-4e306cc2ac12?source=rss-8e5b597315eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e306cc2ac12</guid>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Richard Ayikwei]]></dc:creator>
            <pubDate>Mon, 22 Jun 2026 08:43:04 GMT</pubDate>
            <atom:updated>2026-06-22T08:43:04.798Z</atom:updated>
            <content:encoded><![CDATA[<h3>What Could Go Wrong? Designing and Building a Linux Monitoring Agent</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mjUSt6mRThe6nTBC" /><figcaption>Photo by <a href="https://unsplash.com/@nimavanghavim?utm_source=medium&amp;utm_medium=referral">Nima van Ghavim</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In Part 1, I turned an old laptop into a Linux server.</p><p>In Part 2, I solved remote access using SSH and Tailscale.</p><p>In Part 3, I built a reliable remote development environment using SSH keys and tmux.</p><p>By this point, I had something I depended on every day.</p><p>That raised a new question.</p><p><strong>How would I know when something went wrong?</strong></p><h3>The Problem</h3><p>Unlike a desktop computer sitting in front of me, my server could fail without me noticing.</p><p>Maybe SSH stopped running.</p><p>Maybe disk usage reached 100%.</p><p>Maybe memory usage became excessive.</p><p>Maybe the machine rebooted unexpectedly.</p><p>The real problem wasn’t that failures could happen.</p><p>It was that I wouldn’t know until I tried to connect.</p><p>I needed the server to monitor itself.</p><h3>Defining the Requirements</h3><p>Rather than immediately writing code, I started by writing requirements.</p><p>I wanted answers to six simple questions.</p><ul><li>Is the server online?</li><li>Are important services running?</li><li>Is disk usage becoming a problem?</li><li>Is memory usage becoming excessive?</li><li>Has the server restarted?</li><li>Can I receive alerts without logging in?</li></ul><p>Those requirements eventually became a small Python project called <strong>Monitor</strong>.</p><p>Repository:</p><p><a href="https://github.com/richardayikwei/monitor">https://github.com/richardayikwei/monitor</a></p><h3>Starting Small</h3><p>The very first version only checked disk usage.</p><p>Nothing more.</p><p>Using Python and psutil, checking disk utilization turned out to be surprisingly straightforward.</p><pre>usage = psutil.disk_usage(&quot;/&quot;)</pre><pre>if usage.percent &gt;= threshold:<br>    alerts.append(<br>        f&quot;Disk usage critical: {usage.percent}%&quot;<br>    )</pre><p>There were no dashboards.</p><p>No databases.</p><p>No web interface.</p><p>Just a simple health check.</p><p>Looking back, I’m glad I started this way.</p><h3>Adding Memory Monitoring</h3><p>Once disk monitoring worked, memory monitoring followed naturally.</p><p>The structure was almost identical.</p><pre>memory = psutil.virtual_memory()</pre><pre>if memory.percent &gt;= threshold:<br>    alerts.append(<br>        f&quot;Memory usage critical: {memory.percent}%&quot;<br>    )</pre><p>At this point I noticed something interesting.</p><p>Every new feature reused the same pattern.</p><ol><li>Collect information.</li><li>Compare against configuration.</li><li>Generate alerts.</li></ol><p>The project was beginning to develop an architecture.</p><h3>Monitoring Services</h3><p>The next question wasn’t about hardware resources.</p><p>It was about software.</p><p>A server isn’t very useful if SSH or Tailscale suddenly stops running.</p><p>Instead of checking manually, I used systemctl to determine whether configured services were active.</p><pre>result = subprocess.run(<br>    [<br>        &quot;systemctl&quot;,<br>        &quot;is-active&quot;,<br>        &quot;--quiet&quot;,<br>        service_name,<br>    ]<br>)</pre><pre>return result.returncode == 0</pre><p>That small function became the foundation for monitoring every service I cared about.</p><h3>Configuration Instead of Hard Coding</h3><p>Rather than embedding values directly into the code, I wanted the monitoring agent to be configurable.</p><p>The checks are driven by a simple configuration file.</p><pre>disk_threshold = 90</pre><pre>memory_threshold = 90</pre><pre>services = [<br>    &quot;ssh&quot;,<br>    &quot;tailscaled&quot;,<br>    &quot;monitor-bot&quot;<br>]</pre><p>Changing monitored services no longer required changing Python code.</p><p>It only required updating configuration.</p><h3>The First Design Decision</h3><p>Initially, every check returned alerts.</p><p>Eventually I realized I was mixing responsibilities.</p><p>Today the project is divided into modules with clear responsibilities.</p><pre>checks/<br>    disk.py<br>    memory.py<br>    services.py</pre><pre>notifications/<br>    telegram.py<br>    logger.py</pre><pre>reports/<br>    daily.py</pre><p>Each module has a single purpose.</p><p>Checks gather information.</p><p>Reports format information.</p><p>Notifications deliver information.</p><p>It made adding new features much easier.</p><h3>Automation</h3><p>Writing a monitoring script isn’t enough.</p><p>Someone has to remember to run it.</p><p>I wanted the operating system to handle that for me.</p><p>Using systemd, I created services and timers that automatically execute health checks throughout the day.</p><p>Instead of relying on memory.</p><p>Linux became responsible for scheduling the work.</p><h3>Telegram Notifications</h3><p>Printing alerts to the terminal quickly became useless.</p><p>If I wasn’t connected to the server, I’d never see them.</p><p>Telegram turned out to be a simple solution.</p><p>Whenever something important happens, the server can notify me directly.</p><p>Later, I expanded this with:</p><ul><li>Daily health reports</li><li>Boot notifications</li><li>An interactive Telegram bot</li></ul><p>Each feature solved a problem I encountered while actually using the server.</p><h3>Looking Back</h3><p>This project taught me something I wasn’t expecting.</p><p>Monitoring isn’t really about checking disk usage or memory usage.</p><p>It’s about reducing uncertainty.</p><p>The goal isn’t to know everything.</p><p>It’s to know enough that you can respond before small issues become bigger problems.</p><h3>The Project Continues</h3><p>The monitoring agent is still evolving.</p><p>What started as a few Python scripts has gradually become a small operations tool featuring:</p><ul><li>Health checks</li><li>Telegram notifications</li><li>Daily reports</li><li>Boot notifications</li><li>Interactive commands</li><li>systemd integration</li></ul><p>The full project is available on GitHub:</p><p><a href="https://github.com/richardayikwei/monitor">https://github.com/richardayikwei/monitor</a></p><p>I’m continuing to build it as I learn more about Linux administration, Python, and software architecture.</p><h3>Looking Ahead</h3><p>While the monitoring agent solved one problem, another question eventually emerged.</p><p>What if I didn’t have to wait for alerts?</p><p>What if I could simply send my server a message and ask:</p><ul><li>How much memory are you using?</li><li>How much disk space is left?</li><li>Are my services running?</li></ul><p>That idea became the next stage of the project.</p><p>In Part 5, I’ll cover how I transformed the monitoring agent into an interactive Telegram bot capable of responding to commands from anywhere.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e306cc2ac12" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Personal Remote Linux Server — Part 3]]></title>
            <link>https://medium.com/@richardayikweibee/building-a-personal-remote-linux-server-part-3-479969df5a42?source=rss-8e5b597315eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/479969df5a42</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[servers]]></category>
            <category><![CDATA[command-line]]></category>
            <dc:creator><![CDATA[Richard Ayikwei]]></dc:creator>
            <pubDate>Wed, 17 Jun 2026 14:36:33 GMT</pubDate>
            <atom:updated>2026-06-17T14:36:33.228Z</atom:updated>
            <content:encoded><![CDATA[<h3>Building a Reliable Remote Development Environment with SSH Keys and tmux</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*88qhvkGZHyx7XV7e" /><figcaption>Photo by <a href="https://unsplash.com/@mrw0rld?utm_source=medium&amp;utm_medium=referral">Ilnur</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In Part 1, I transformed an old laptop into a Linux server.</p><p>In Part 2, I solved the networking challenge by using SSH and Tailscale to access it remotely from anywhere.</p><p>At that point, I had something that looked and behaved like a server.</p><p>There was just one problem.</p><p>It wasn’t yet a comfortable place to work.</p><p>The more time I spent developing remotely, the more I realized that remote access and remote development are two very different things.</p><h3>The First Frustration</h3><p>Initially, I connected to the server using SSH, wrote some code, disconnected, and repeated the process.</p><p>It worked.</p><p>Until it didn’t.</p><p>Sometimes my internet connection would briefly drop.</p><p>Sometimes I would accidentally close my terminal.</p><p>Sometimes I needed to leave my desk while something was still running.</p><p>Every interruption meant reconnecting and figuring out where I had left off.</p><p>I quickly realized that if I wanted to use this server every day, I needed a workflow that was resilient.</p><h3>Moving Beyond Passwords</h3><p>My first improvement was switching from password authentication to SSH keys.</p><p>Passwords work.</p><p>SSH keys feel different.</p><p>Instead of typing a password every time I connected, my computer could authenticate securely using a public/private key pair.</p><p>Generating a key pair was straightforward:</p><pre>ssh-keygen -t ed25519</pre><p>The public key was copied to the server:</p><pre>ssh-copy-id username@server</pre><p>After that, connecting became as simple as:</p><pre>ssh username@server</pre><p>No password prompts.</p><p>Just a secure connection.</p><p>More importantly, I had taken another small step toward understanding how modern infrastructure is managed.</p><h3>Discovering tmux</h3><p>The biggest improvement came from a tool I had never used before: tmux.</p><p>At first, I didn’t understand why people recommended it so often.</p><p>Then I experienced my first disconnected SSH session while editing code.</p><p>Everything stopped.</p><p>Or so I thought.</p><p>The problem wasn’t that the server had stopped.</p><p>The problem was that my terminal had disappeared.</p><p>That’s an important distinction.</p><h3>Sessions Instead of Windows</h3><p>Before tmux, my workflow looked like this:</p><pre>SSH Connection<br>        │<br>        ▼<br>Terminal<br>        │<br>        ▼<br>Running Process</pre><p>If the SSH connection disappeared, everything disappeared with it.</p><p>With tmux, the picture changed completely.</p><pre>SSH Connection<br>        │<br>        ▼<br>tmux Session<br>        │<br>        ▼<br>Running Processes</pre><p>Now the work lived inside the server.</p><p>My laptop simply viewed it.</p><p>If my internet disconnected, the server continued working.</p><p>When I reconnected, everything was exactly where I had left it.</p><p>That felt almost magical the first time I experienced it.</p><h3>Multiple Workspaces</h3><p>Another advantage of tmux was organization.</p><p>Instead of opening multiple SSH windows, I could have dedicated panes and windows for different tasks.</p><p>One pane might contain:</p><ul><li>Vim</li></ul><p>Another:</p><ul><li>Git</li></ul><p>Another:</p><ul><li>Python</li></ul><p>Another:</p><ul><li>System logs</li></ul><p>All inside a single SSH session.</p><p>It transformed remote development from something that felt awkward into something that felt natural.</p><h3>Learning Vim</h3><p>This project also became my excuse to finally commit to Vim.</p><p>Initially, editing files over SSH using graphical editors felt clumsy.</p><p>Vim was already available on the server.</p><p>The more I used it, the more I understood why experienced Linux users recommend learning it.</p><p>At first, it seemed unnecessarily complicated.</p><p>Eventually, it became one of the fastest ways to edit code remotely.</p><p>I still have a lot to learn, but it has become a tool I genuinely enjoy using.</p><h3>My Daily Workflow</h3><p>Over time, a simple routine emerged.</p><p>Connect:</p><pre>ssh server</pre><p>Attach to my development session:</p><pre>tmux attach</pre><p>Continue exactly where I left off.</p><p>Whether I had been away for five minutes or two days, the environment was waiting for me.</p><h3>Building Confidence</h3><p>Something interesting happened during this phase.</p><p>I stopped thinking about the server as “that old laptop.”</p><p>It became my development machine.</p><p>I started writing code directly on it.</p><p>Managing projects.</p><p>Using Git.</p><p>Creating Python virtual environments.</p><p>Experimenting with Linux tools.</p><p>Every day I spent working there made the command line feel a little less intimidating.</p><h3>Looking Back</h3><p>This stage taught me that productive remote development isn’t just about being able to connect to a machine.</p><p>It’s about making that connection reliable enough that you stop thinking about it.</p><p>SSH keys removed friction.</p><p>tmux removed fear of disconnections.</p><p>Vim made editing fast.</p><p>Together, they created an environment where I could focus on building software instead of managing connections.</p><h3>Looking Ahead</h3><p>By this point I had:</p><ul><li>A Linux server</li><li>Secure remote access</li><li>A reliable development environment</li></ul><p>The next question naturally became:</p><p>“If I’m depending on this server every day, how do I know when something goes wrong?”</p><p>That question led directly to the project I’ve been building over the past few weeks:</p><p>a lightweight monitoring system that checks server health, sends Telegram alerts, generates daily reports, and eventually evolved into an interactive operations bot.</p><p>That’s what I’ll cover in Part 4.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=479969df5a42" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Personal Remote Linux Server — Part 2]]></title>
            <link>https://medium.com/@richardayikweibee/building-a-personal-remote-linux-server-part-2-c69c2cedeecc?source=rss-8e5b597315eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/c69c2cedeecc</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[servers]]></category>
            <category><![CDATA[ssh]]></category>
            <dc:creator><![CDATA[Richard Ayikwei]]></dc:creator>
            <pubDate>Thu, 04 Jun 2026 22:55:28 GMT</pubDate>
            <atom:updated>2026-06-04T22:55:28.918Z</atom:updated>
            <content:encoded><![CDATA[<h3>Remote Access, CGNAT, and Tailscale</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1EA1nDMA9hhWo1RL" /><figcaption>Photo by <a href="https://unsplash.com/@valentinlacoste?utm_source=medium&amp;utm_medium=referral">Valentin Lacoste</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In Part 1, I described why I decided to turned an old AMD E1 laptop running Linux Mint into a personal server.</p><p>At that point, I had a laptop but not a server.</p><p>The problem was that it was only useful when I was sitting in front of it.</p><p>The next challenge was obvious:</p><p><strong>How do I access this machine remotely?</strong></p><p>This question led me down a rabbit hole involving IP addresses, routers, ports, NAT, CGNAT, and eventually Tailscale.</p><p>Interestingly, this was the point where a lot of networking concepts I had previously read about finally became real.</p><h3>My First Goal: Remote Access</h3><p>What I wanted was simple.</p><p>I wanted to be able to:</p><ul><li>Leave the laptop at home</li><li>Go somewhere else</li><li>Open a terminal</li><li>Connect to the machine</li></ul><p>At the time, I didn’t fully appreciate how much infrastructure is involved in making that possible.</p><p>I just knew I wanted something that felt similar to working with a cloud server.</p><h3>Starting with SSH</h3><p>The first technology I needed was SSH.</p><p>SSH (Secure Shell) allows you to securely access the command line of another machine.</p><p>After installing the SSH server, I could connect to the machine from another computer on the same network.</p><pre>sudo apt install openssh-server</pre><p>Checking that it was running:</p><pre>systemctl status ssh</pre><p>Connecting from another machine:</p><pre>ssh username@192.168.1.10</pre><p>For the first time, I wasn’t physically using the server.</p><p>I was controlling it remotely.</p><p>That felt surprisingly powerful.</p><h3>When IP Addresses Became Real</h3><p>Before this project, IP addresses were mostly theoretical concepts I had encountered in books and tutorials.</p><p>Now I suddenly needed one.</p><p>Checking the server’s address:</p><pre>hostname -I</pre><p>or:</p><pre>ip addr</pre><p>produced something like:</p><pre>192.168.1.10</pre><p>I learned that this was a private IP address assigned by my router.</p><p>My router was acting like a traffic manager, assigning addresses to devices on my home network and directing traffic between them.</p><p>Networking was no longer an abstract concept.</p><p>I could see it happening.</p><h3>The Next Problem</h3><p>Everything worked perfectly.</p><p>As long as I stayed inside my house.</p><p>The moment I left my network, the server disappeared.</p><p>I could no longer reach:</p><pre>192.168.1.10</pre><p>because that address only existed inside my home network.</p><p>At that point I started researching remote access.</p><p>That’s when I discovered concepts such as:</p><ul><li>Port forwarding</li><li>NAT</li><li>Public IP addresses</li><li>Dynamic IP addresses</li></ul><h3>Understanding NAT</h3><p>One of the biggest lessons was learning that my laptop wasn’t directly exposed to the internet.</p><p>The flow looked something like this:</p><pre>Internet<br>    ↓<br>Router<br>    ↓<br>Laptop</pre><p>The router sits between the internet and all devices in the house.</p><p>This process is called Network Address Translation (NAT).</p><p>The router receives internet traffic and decides which device should receive it.</p><h3>The Traditional Solution</h3><p>Most tutorials suggested configuring port forwarding.</p><p>The idea was straightforward.</p><p>Tell the router:</p><pre>Incoming traffic on Port 22<br>        ↓<br>Send it to<br>192.168.1.10</pre><p>This would expose the SSH service to the internet.</p><p>At first this sounded like the correct solution.</p><p>Then I discovered another problem.</p><h3>Enter CGNAT</h3><p>While researching port forwarding, I learned about something called Carrier Grade NAT (CGNAT).</p><p>This was a concept I had never encountered before.</p><p>In simple terms:</p><pre>Your Router<br>        ↓<br>ISP Router<br>        ↓<br>Internet</pre><p>Instead of receiving a unique public IP address, multiple customers share one.</p><p>This makes direct inbound connections difficult or impossible.</p><p>Even if I configured my router correctly, there was a chance it still wouldn’t work.</p><p>For the first time, I understood why so many people struggle with self-hosting from home.</p><p>The problem isn’t always your configuration.</p><p>Sometimes it’s the network architecture itself.</p><h3>Discovering Tailscale</h3><p>This is where everything changed.</p><p>I came across Tailscale.</p><p>Tailscale is built on WireGuard and creates a secure private network between your devices.</p><p>What attracted me immediately was that it avoided many of the problems I had been researching.</p><p>No:</p><ul><li>Port forwarding</li><li>Public IP configuration</li><li>Dynamic DNS setup</li></ul><p>Instead, I could install Tailscale on my devices and connect them directly.</p><h3>Installation</h3><p>Installing Tailscale was surprisingly simple.</p><pre>curl -fsSL https://tailscale.com/install.sh | sh</pre><p>Then:</p><pre>sudo tailscale up</pre><p>After authenticating, my server appeared inside my Tailnet.</p><p>Checking status:</p><pre>tailscale status</pre><p>Viewing the assigned address:</p><pre>tailscale ip</pre><p>produced something similar to:</p><pre>100.x.x.x</pre><h3>The Moment It Clicked</h3><p>Once Tailscale was running, I could connect from anywhere.</p><pre>ssh username@100.x.x.x</pre><p>No router configuration.</p><p>No port forwarding.</p><p>No public IP.</p><p>It simply worked.</p><p>This was one of the most satisfying moments of the entire project.</p><p>Not because it was technically complicated.</p><p>But because I could finally see the practical value of concepts I had been reading about.</p><h3>What I Learned</h3><p>Looking back, this phase taught me much more than remote access.</p><p>It taught me:</p><ul><li>What an IP address actually does</li><li>The role of a router</li><li>How SSH works</li><li>What ports are used for</li><li>Why NAT exists</li><li>Why CGNAT complicates self-hosting</li><li>How VPN-based solutions simplify networking</li></ul><p>Most importantly, it transformed networking from theory into experience.</p><h3>Looking Ahead</h3><p>At this point I had:</p><ul><li>A Linux server</li><li>Remote SSH access</li><li>Reliable connectivity through Tailscale</li></ul><p>The next challenge wasn’t access.</p><p>It was productivity.</p><p>How do you build a development environment that survives network interruptions, disconnected terminals, and long-running tasks?</p><p>That’s what I’ll cover in Part 3:</p><p><strong>Building a Reliable Remote Development Environment with SSH Keys and tmux.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c69c2cedeecc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Personal Remote Linux Server (Part 1): Why I Decided to Build My Own Cloud]]></title>
            <link>https://medium.com/@richardayikweibee/building-a-personal-remote-linux-server-part-1-why-i-decided-to-build-my-own-cloud-d35ac693952d?source=rss-8e5b597315eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/d35ac693952d</guid>
            <category><![CDATA[do-it-yourself]]></category>
            <category><![CDATA[tunneling]]></category>
            <category><![CDATA[ssh]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[cloud]]></category>
            <dc:creator><![CDATA[Richard Ayikwei]]></dc:creator>
            <pubDate>Sat, 30 May 2026 00:18:31 GMT</pubDate>
            <atom:updated>2026-05-30T00:18:31.678Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Part 1 of a series documenting my journey of turning an old Linux laptop into a remotely accessible development server and learning infrastructure concepts along the way.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*V5a2j7Q-eVBVgbcW" /><figcaption>Photo by <a href="https://unsplash.com/@khodzinskyi?utm_source=medium&amp;utm_medium=referral">Vitalii Khodzinskyi</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>When I started working on backend projects, I realized I needed more than just a local development environment. Some of the projects I wanted to build required databases, long-running services, and an environment that felt closer to what I imagined using in the cloud.</p><p>My first thought was to use AWS or Azure. That is the path most developers eventually take. However, I quickly ran into a practical problem: cloud providers often require a payment card, and even after linking one, there is no guarantee it will satisfy all of the requirements for account verification and usage.</p><p>At the same time, I had been hearing discussions online about how powerful modern devices had become. Some people even suggested that modern smartphones could potentially act as small compute instances. That idea made me think differently about computing resources. Instead of immediately looking outward toward the cloud, I started looking at the hardware I already owned.</p><p>In the corner of my room sat an old laptop from my student days.</p><p>It was far from impressive by modern standards: a dual-core AMD E1 processor with Radeon graphics. Most people would probably consider it obsolete. But I wondered whether it could become something more useful.</p><h3>Why Linux?</h3><p>The laptop was old enough that I wanted a lightweight operating system. I decided to install Linux Mint.</p><p>By this point I wasn’t completely new to Linux. I had spent time working through command-line resources and practicing whenever I had the opportunity. I was comfortable navigating the terminal, editing files, and running commands, but I had never really built or managed a remotely accessible system before.</p><p>This project felt like an opportunity to move beyond theory.</p><h3>The Goal</h3><p>My goal was simple:</p><p>I wanted to be able to access and work on my Linux machine from anywhere in the world.</p><p>Not necessarily through a graphical desktop.</p><p>Not necessarily through a browser.</p><p>Even a terminal would be enough.</p><p>I wanted to:</p><ul><li>Access files remotely</li><li>Run applications</li><li>Work on backend projects</li><li>Experiment with databases</li><li>Gain experience with infrastructure concepts that I had only read about</li></ul><p>Most importantly, I wanted to understand what it actually felt like to deploy and manage a machine that behaved more like a server than a personal computer.</p><h3>When Theory Becomes Real</h3><p>One of the most rewarding parts of this project was seeing concepts that I had previously only encountered in books suddenly become real.</p><p>Things like:</p><ul><li>IP addresses</li><li>Ports</li><li>Network services</li><li>Remote access</li></ul><p>Before this project, they were mostly abstract concepts.</p><p>Afterward, they became things I had configured, tested, broken, and fixed.</p><p>Even something as simple as logging into a router and changing network settings felt surprisingly exciting because it connected directly to concepts I had been learning.</p><h3>The First Surprise</h3><p>I expected the project to become more difficult as I progressed.</p><p>Instead, I found the opposite.</p><p>The hardest part was often getting started.</p><p>Once I began experimenting and solving one problem at a time, things started making sense much faster than I expected.</p><p>Every successful step revealed the next one.</p><h3>Looking Ahead</h3><p>My original plan seemed straightforward:</p><ol><li>Enable SSH</li><li>Configure my network</li><li>Connect remotely</li></ol><p>What I didn’t know was that my internet connection would introduce an unexpected challenge that would eventually lead me to discover concepts like CGNAT, remote networking, and a tool called Tailscale.</p><p>In Part 2, I’ll walk through the process of setting up remote access, why traditional port forwarding failed, and how I finally managed to log into my Linux machine from another device.</p><h3>Series Roadmap</h3><p>✓ <strong>Part 1 — Why I Built My Own Cloud</strong></p><p>⏳ <strong>Part 2 — Remote Access, CGNAT, and Tailscale</strong></p><p>⏳ <strong>Part 3 — Building a Reliable Remote Development Environment with SSH Keys and tmux</strong></p><p>⏳ <strong>Part 4 — What Could Go Wrong? Designing and Building a Linux Monitoring Agent</strong></p><p>⏳ <strong>Part 5 — Telegram Notifications, Systemd Timers, and Making the Monitor Useful</strong></p><h3>Author’s Note</h3><p>This article is based on my personal experience building and configuring a remote Linux development server. AI tools were used during the editing process to improve clarity, structure, and readability, but the project, decisions, and lessons described are my own.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d35ac693952d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Who Owns Your Code]]></title>
            <link>https://medium.com/@richardayikweibee/who-owns-your-code-e9195eccf33b?source=rss-8e5b597315eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9195eccf33b</guid>
            <category><![CDATA[thoughts]]></category>
            <category><![CDATA[copyright]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Richard Ayikwei]]></dc:creator>
            <pubDate>Wed, 11 Mar 2026 03:09:55 GMT</pubDate>
            <atom:updated>2026-03-11T03:09:55.607Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WsTjMn8WvSZNX7CsVdpS2A.png" /></figure><p>The AI craze is real. You see it everywhere and feel its impact everywhere — in schools, in homes, and at work. But should we be more concerned about some of the unanswered questions about AI, such as where all the unemployed are going to go and who owns what AI produces?</p><p>As crazy as it might sound, you might not own what you produce using AI.</p><p>Let’s break it down. Here are some reasons why you might not own what you produce using AI code.</p><p><strong>1. It might come from someone else’s work<br></strong> Since AI is trained on content produced by other humans, it goes without saying that if your prompt closely matches someone’s work, there is a possibility of AI generating something very similar to what it was trained on. This means you might get a line-by-line or image replication of work someone else has already produced.</p><p><strong>2. People’s data was used to train the models<br></strong> Another reason for concern is that people’s data was used to train these models. This might include legally or illegally acquired data. In the end, in my opinion, you could say that a percentage of yourself exists within an AI model. So if AI produces something, it could be argued that you might have a stake in it, since your data may have contributed to training the model.</p><p><strong>3. Have we read the service agreements?<br></strong> I don’t know about you, but I have not read the service agreements for the AI tools I use. I don’t know if there is a clause somewhere that states that anything commercially viable I produce using AI could partially belong to the company that created the AI. Just looking at these service agreements sometimes feels like trying to read hieroglyphics. Ignorance of what exists within these documents might come back to bite us in the future.</p><p>One thing I’m most interested in right now is companies that claim a percentage of their proprietary code was produced by AI. Can these companies still say it’s their proprietary code if AI is producing it? What happens when 100% of their code is produced using AI? Could they even sue someone then?</p><p><strong>What then should you do?</strong></p><ol><li><strong>Check whether what AI produced is someone else’s proprietary product.</strong></li><li><strong>State when you use AI.<br></strong> For example, I edited this article using AI.</li><li><strong>Use history.<br></strong> If you are familiar with Git or version control, that’s great. Otherwise, version control is simply a way of keeping track of changes to text or code over time. Using software that stores and timestamps work could be very useful. Being able to prove through history that a piece of work originated from you, and not purely from AI, might become very important.</li></ol><p><strong>Article inspired by:</strong></p><ol><li>DataCamp AI Fundamentals course</li><li><a href="https://pyvideo.org/pybay-2025/ai-ip-and-your-code-what-developers-need-to-know.html">https://pyvideo.org/pybay-2025/ai-ip-and-your-code-what-developers-need-to-know.html</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9195eccf33b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An Analyst’s Notes on AWS Services: Keeping Costs Low and Analyzing Your Spend]]></title>
            <link>https://medium.com/@richardayikweibee/an-analysts-notes-on-aws-services-keeping-costs-low-and-analyzing-your-spend-7925ed90e6f4?source=rss-8e5b597315eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/7925ed90e6f4</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cost-analysis]]></category>
            <dc:creator><![CDATA[Richard Ayikwei]]></dc:creator>
            <pubDate>Thu, 31 Jul 2025 17:26:56 GMT</pubDate>
            <atom:updated>2025-07-31T17:26:56.750Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qvGcmbrayXahTsqAs8jI2A.png" /></figure><p>Analyzing data effectively requires domain knowledge or, at the very least, an understanding of the data’s context. This principle also applies when analyzing the costs associated with using AWS services.</p><p>In this post, I’ll break down key AWS services and highlight what you need to know about each one to better manage and analyze your cloud costs.</p><h3>Key Services and Cost Considerations</h3><p><strong>EC2 (Elastic Compute Cloud)</strong><br> When you stop an EC2 instance, the attached volume retains your data — and you’ll still be charged for that storage. If you <em>terminate</em> the instance, the volume and its data are deleted, and the storage is returned to AWS for reuse.<br> EC2 comes with three pricing models:</p><ul><li><strong>On-Demand Instances</strong>: Pay only for the time you use. No upfront commitment. Ideal for flexible or unpredictable workloads.</li><li><strong>Spot Instances</strong>: Purchase unused EC2 capacity at a discount. You set a maximum price, and AWS grants access when capacity is available. Best for workloads that can tolerate interruptions.</li><li><strong>Reserved Instances</strong>: Commit to a 1- or 3-year term in exchange for significant discounts. Good for steady-state or predictable workloads.</li></ul><p><strong>DynamoDB</strong><br> This service offers both on-demand and reserved capacity modes for read/write operations, with billing options to match usage patterns.</p><p><strong>RDS (Relational Database Service)</strong><br> Follows a similar model to EC2:</p><ul><li>Pay only for what you use.</li><li>Choose between on-demand and reserved instances depending on your workload stability.</li></ul><p><strong>S3 (Simple Storage Service)</strong></p><ul><li>Pricing is usage-based.</li><li>Costs vary by region, so the location of your S3 bucket matters when budgeting.</li></ul><p><strong>Lambda</strong></p><ul><li>You’re only charged when your code runs.</li><li>Pricing is based on the number of requests and the execution time.</li><li>If your function is idle, you incur no cost.</li></ul><h3>Common Pitfalls That Add Up</h3><p>Even with all these pricing models, it’s easy to miss small charges that add up over time. A few things to watch out for:</p><ul><li><strong>EBS volumes left behind</strong>: Stopping an EC2 instance doesn’t stop EBS storage charges. Always clean up unused volumes.</li><li><strong>Idle RDS instances</strong>: Just because no one is using it doesn’t mean it’s not billing you.</li><li><strong>Unmonitored Lambda execution time</strong>: A small change in logic can make your function run longer, especially with loops or recursive calls.</li><li><strong>Data transfer costs</strong>: Moving data between services or across regions can sneak up on you.</li><li><strong>Snapshots and backups</strong>: RDS and EBS snapshots can silently eat into your budget if you forget about them.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7925ed90e6f4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Having Data May Not Be Enough — You Need to Check Its Power Level]]></title>
            <link>https://medium.com/@richardayikweibee/having-data-may-not-be-enough-you-need-to-check-its-power-level-1ee0376ad57f?source=rss-8e5b597315eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ee0376ad57f</guid>
            <category><![CDATA[power]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[effect-size]]></category>
            <category><![CDATA[significance-level]]></category>
            <dc:creator><![CDATA[Richard Ayikwei]]></dc:creator>
            <pubDate>Tue, 22 Jul 2025 08:00:16 GMT</pubDate>
            <atom:updated>2025-07-22T08:00:16.910Z</atom:updated>
            <content:encoded><![CDATA[<h3>Having Data May Not Be Enough — You Need to Check Its Power Level</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VDbH3JVy_ePtw5PoTEvm6g.png" /></figure><p>I know… this might sound like something out of <em>Star Wars</em> or an anime series, but <strong>data actually has power levels</strong>.<br> And like leveling up in a video game, a higher power level means your data is better equipped to <strong>detect real effects</strong>.</p><h3>What Is Power?</h3><p>In statistics, <strong>power</strong> is the probability that a test will detect a real effect <strong>when it actually exists</strong>.</p><p>Or more simply:</p><blockquote><strong><em>Power is the ability to avoid false negatives.</em></strong></blockquote><p>Still sounds a bit abstract?<br> Let me put it in the words of John, a colleague of mine:</p><blockquote>“Imagine seeing a very obviously pregnant woman (big belly and all), giving her a pregnancy test… and the result says ‘not pregnant’.”</blockquote><p>Yikes. You don’t want to be <strong>that person</strong>.<br> In data terms, that’s what a <strong>false negative</strong> looks like — saying there’s <strong>no effect</strong> when there actually <strong>is</strong> one. Whether you’re testing a diet, a new product, or an incentive plan, <strong>low power can make you miss something important</strong>.</p><h3>What Do You Need to Calculate Power?</h3><p>To check the power level of your data, you’ll need four ingredients:</p><ol><li><strong>Effect Size</strong> — How big an effect you’re trying to detect</li><li><strong>Sample Size</strong> — How many observations you have</li><li><strong>Significance Level (α)</strong> — How much uncertainty you’re okay with</li><li><strong>A Tool</strong> — Like statsmodels in Python (my personal go-to)</li></ol><h3>What Is Effect Size?</h3><p>Effect size is how <strong>big a difference or impact</strong> you’re expecting (or care about).</p><p>Here’s a quote I love from <em>Statistical Thinking for the 21st Century</em> by Russell A. Poldrack:</p><blockquote>“If we think about a study of weight loss, then we probably don’t think that the loss of one ounce (i.e. the weight of a few potato chips) is practically significant.”</blockquote><p>Exactly!<br> Just because something is statistically significant doesn’t mean it’s <strong>meaningful</strong>. That’s where <strong>effect size</strong> comes in.</p><h4>💡 Cohen’s d: Quick Effect Size Guide</h4><p><strong>Effect Size (Cohen’s d)Interpretation</strong></p><p>0.01–0.19 Very small</p><p>0.20–0.49 Small</p><p>0.50–0.79 Medium</p><p>0.80–1.19 Large</p><p>20–1.99 Very large</p><p>2.0+ Huge</p><h3>Sample Size</h3><p>This one’s easy — it’s the number of observations in your dataset.<br> More data = more power (usually).</p><h3>Significance Level (α)</h3><p>This is the threshold we use to say something is “statistically significant.” It’s like how strict you are when deciding to trust a result.</p><p><strong>Significance Level (α)</strong> <strong>False Positive Rate</strong> <strong>Use Case</strong></p><p>0.05 (standard) or 5% chance Most common level</p><p>0.01 or 1% chance When you need higher confidence</p><p>0.10 or 10% chance More lenient</p><p>0.001 or 0.1% chance For super strict science (e.g. physics)</p><h3>Tools to Calculate Power</h3><p>There are many tools out there, but in Python I recommend using the statsmodels library. It has built-in methods to compute power given your effect size, sample size, and significance level.</p><h3>Final Thoughts</h3><p><strong>Power matters.</strong><br> If your data has low power, you might completely <strong>miss a real effect</strong>, and make decisions based on bad information.<br> It’s always a good idea to <strong>check power</strong> — before you collect data (to plan well), and after analysis (to validate your results).</p><p>So next time you run an experiment, don’t just ask “Did I get a significant result?”<br> Also ask: <strong>“Did I have enough power to detect something real in the first place?”</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ee0376ad57f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your Corner Restaurant Might Need a Data Analyst (or Even a Data Scientist)]]></title>
            <link>https://medium.com/@richardayikweibee/your-corner-restaurant-might-need-a-data-analyst-or-even-a-data-scientist-b8495fa369b4?source=rss-8e5b597315eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/b8495fa369b4</guid>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Richard Ayikwei]]></dc:creator>
            <pubDate>Thu, 17 Jul 2025 12:36:08 GMT</pubDate>
            <atom:updated>2025-07-17T12:36:08.502Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mRE_7GrwzxMLlyAteitkog.png" /></figure><p>On my way to one of my favorite street vendors (Auntie Esi) for a quick meal, a thought crossed my mind: <em>Do restaurants actually hire data analysts or data scientists?</em><br> In my opinion, running a restaurant is one of the businesses that demands a high level of optimization and forecasting. So I wondered — if a restaurant wanted to stay afloat without laying off staff, what could it do (besides advertising more)? Here’s what I came up with.</p><h3>Step 1: Show Me the Data</h3><p>The first step towards making better decisions and increasing profits is simple — start storing data. It might sound obvious, but it’s a critical and often overlooked step. Recording purchases and expenses is a good start, but if you really want to optimize operations, that’s not enough.</p><p>You’ll need data on:</p><ul><li>Customer orders</li><li>Leftover food (weight and type)</li><li>Stock levels</li><li>Waste and disposal of raw materials (weight and type)</li></ul><p>Basically, <em>everything</em>. Thanks to technology, Google Sheets or Excel can help you store this data over time in a secure and organized way.</p><p>Sure, some data might be harder to collect without a point-of-sale (POS) system. But if you can’t afford a full system, just assign someone to track things like food quantities bought and customer turnout. This is actually a better use of their time than letting them go — they’re helping you collect valuable data that can lead to smarter decisions and more profit down the road.</p><h3>Step 2: Predict Customer Turnout</h3><p>Once you have enough data, you can start predicting how many customers might show up on any given day. This helps you better plan how much food to prepare and how much raw material to buy.</p><p>You can build a simple daily chart that shows:</p><ul><li>Expected customer count</li><li>Required food quantities</li><li>Special dates or holidays</li><li>Opening hours</li></ul><p>A <strong>regression model</strong> is usually a good starting point — it predicts outcomes like customer turnout based on past data. It gives you continuous values and is simple enough to apply. If you want to get more advanced, unsupervised learning methods could work too, but for most restaurants, linear regression does the job unless your data relationships are really complex.</p><h3>Step 3: Gradually Scale Back</h3><p>Predictions are useful, but they’re not perfect. That’s why it’s risky to immediately make huge decisions based on a new model. The smart move is to <em>test your predictions gradually</em>.</p><p>Start by scaling back slowly on one aspect — like reducing the amount of raw food purchased for the day. But while doing that, continue collecting data:</p><ul><li>Customer turnout</li><li>Quantity of unsold food</li><li>Customer feedback (especially on taste!)</li></ul><p>It’s best to change <em>one variable at a time</em> so you can tell if the change is actually making a difference. Pair this with basic testing methods like <strong>A/B testing</strong> or a <strong>T-test</strong>, and you’ll start getting real insights.</p><p>And give it time — data from one week may not say the same thing as data from a whole month. Patience is part of the process.</p><h3>Step 4: Iterate</h3><p>This is not a one-time fix. Data-driven improvement is an <em>ongoing process</em>. You try something, track its effect, ask better questions, and go again.</p><p>Don’t forget to look out for confounding factors — those things that can throw off your results if you don’t account for them. The process of trial, error, and adjustment helps you think more clearly. Eventually, when all the “obvious” solutions have been tried, you’ll start to come up with creative and unexpected ideas — <em>that’s when real innovation starts</em>.</p><h3>Conclusion: Start with Data, Scale with Data</h3><p>Today, there are more tools and skilled people available than ever before to help you make your restaurant more efficient. Auditing your operations with data can lead to long-lasting results — often more so than quick fixes like cutting staff or ramping up ads.</p><p>One of the best side effects of using data to improve your processes? It makes scaling much easier. If you start with data, you’re far more likely to <em>grow with data</em> too.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b8495fa369b4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>