codewithkarani
All topics

Category

Technology

Every guide on Technology from Code With Karani - 104 field-tested articles on Technology for developers and teams.

104 articles

July 2026

  1. Ubuntu 16.04 Killed My Upstart Job: Converting an init Script to systemd

    Ubuntu 16.04 is the first LTS with systemd as PID 1, so initctl and your /etc/init job stopped working. Here is the unit file that replaces it, and how to read the failure.

    6 min read

  2. Daraja API in Production: STK Push, C2B and B2C With Callbacks That Actually Work

    A build-order guide to Safaricom's Daraja API with real payloads: OAuth token caching, STK Push, C2B v2 registration, B2C v3 with RSA security credentials, and the callback URL rules nobody documents.

    7 min read

  3. Your App Keeps Dying: A systemd Unit File That Actually Keeps It Running

    Restart=always is not high availability, it is a bandaid over a bug. Here is the systemd unit file, restart policy, resource cap and sandbox config that keeps a real app alive on a real VPS.

    8 min read

  4. The Security Checklist Every Kenyan SME Running Its Own Server Should Finish This Week

    You do not have a security budget problem, you have a completeness problem. Ten free controls with real commands, a cost table, and the weekly rhythm that keeps a self-hosted Kenyan SME system out of trouble.

    7 min read

  5. Git for Two: The Branching Model a Small Team Actually Needs

    Git Flow is costume jewellery for a two-person team. Here is the smallest workflow that stops you clobbering each other: short-lived branches, protected main, rerere, squash merges, and revert-forward.

    8 min read

  6. The State of AI in Africa 2026: A Practical Map

    Africa's AI economy in 2026 is real, funded and still small enough to shape. A grounded map of the hubs, the money, the obstacles nobody should sugarcoat, and where builders actually win.

    6 min read

  7. Build vs Buy: How African Businesses Should Decide on AI

    Build vs buy is not one decision but four options along a spectrum. A practical framework for African SMEs to decide where to spend scarce budget, skills and control - and why most should buy first.

    6 min read

  8. How to Price Software in East Africa Without Racing to the Bottom

    Underpricing does not kill your software business loudly, it kills it slowly. A worked pricing floor in Kenyan shillings, three markets you can sell into, and the terms that matter more than the headline number.

    8 min read

  9. Your M-Pesa Callback Will Fire Twice: Idempotency, Retries and the 1037 Problem

    Daraja callbacks are unreliable notifications, not a source of truth. Seven production failure modes, with the database constraints, pollers and parsers that make double charges structurally impossible.

    7 min read

  10. Nginx Reverse Proxy, TLS and Rate Limiting: The Config You Should Actually Be Running

    A one-line proxy_pass is not a reverse proxy. Real timeouts, correct forwarded headers, a Mozilla-grade TLS block and limit_req zones that stop credential stuffing without breaking your own app.

    7 min read

  11. The Compute Divide: Why Africa Risks Being Locked Out of AI

    GPUs, data centres and cheap power are the real bottleneck for African AI, and most of it sits offshore, billed in dollars. Real capital is arriving - but who owns the build is the question that decides sovereignty.

    6 min read

  12. AI That Speaks Our Languages: The Fight for African NLP

    AI reshaping the global economy barely speaks the languages of a billion Africans. Inside Masakhane, Lelapa AI's InkubaLM and Lesan - and why African-language NLP is an economic bet, not charity.

    6 min read

  13. Kenya's Data Protection Act Is an Engineering Spec: What Sections 25, 31, 41 and 43 Demand From Your Code

    The DPA 2019 is not a lawyer problem, it is a schema, retention and logging problem. Registration thresholds, the 72-hour breach clock, the encryption safe harbour, and the eight things to build this quarter.

    9 min read

  14. The True Cost of AI for Business (Beyond the Subscription)

    The monthly subscription is often just 20-30% of what AI truly costs. A clear breakdown of the hidden costs - data prep, integration, change management, compute, talent and maintenance - with an African lens.

    6 min read

  15. Docker, Finally: A Practical On-Ramp for Developers Who Kept Putting It Off

    You are not scared of containers, you are tired of the vocabulary. The mental model in four sentences, four commands, a real multi-stage Dockerfile, a Compose v2 file, and the five things that will confuse you.

    7 min read

  16. The 12 Clauses Every Software Contract Needs: A Checklist for Kenyan Developers

    A contract is not for the courtroom, it is for the awkward conversation in month three. Twelve clauses in plain English, Kenyan IP and tax realities to raise with your advocate, and what to trade when clients push back.

    9 min read

  17. M-Pesa Reconciliation That Scales: From Paybill Statement to Trial Balance

    Stop reconciling in spreadsheets. A three-way match between the Safaricom statement, your callback events and a double-entry ledger, with named break categories and a daily close job in Python and SQL.

    6 min read

  18. Where Africa Can Win with AI: Agriculture, Health and Fintech

    Africa will not win at AI with a better chatbot. It wins where pain is largest and a phone reaches people no institution can - agriculture, health and finance, with real deployments already measured.

    6 min read

  19. Killed by the Kernel: What Really Happens When Your Server Runs Out of RAM

    The OOM killer is not random and your server did not just crash. Learn to read the dmesg kill record, tell a cgroup OOM from a global one, and cap the guilty process so MariaDB stops taking the bullet.

    8 min read

  20. The Pilot Trap: Why AI Proofs-of-Concept Never Reach Production

    Demos are designed to impress, not to survive reality. Here is why AI pilots get stuck in POC purgatory, why the demo lies, and how to design a pilot that is built to ship from day one.

    6 min read

  21. How Kenyan Small Businesses Actually Get Hacked (Nobody Is Burning a Zero-Day on Your Duka)

    Five real attack chains account for almost every SME breach: infostealers, credential stuffing, exposed admin panels, unpatched plugins and invoice fraud. With the log commands to check each one today.

    8 min read

  22. The New Attack Surface: AI Security Risks Every Business Should Know

    AI opens a new attack surface that behaves nothing like traditional software. From prompt injection and data leakage to shadow AI, here is the OWASP LLM risk landscape and practical defences for African businesses.

    6 min read

  23. Ship to Your Own VPS: GitHub Actions CI/CD Without the Cloud Bill

    A complete pipeline for a 10-dollar server: test, build to GHCR, deploy over SSH, health check, roll back. Real workflow YAML with current action versions, plus the details that quietly break deploys.

    7 min read

  24. Closing the AI Skills Gap in Africa

    Africa supplies 3% of global AI talent for 20% of the world's people - but the standard skills-gap story is wrong. The real issue is absorption, not appetite. A practical path for developers.

    6 min read