Bonaventure OgetoBy Bonaventure Ogeto|

Studying Tech in Kenya During Power Cuts: Backup Plans That Work

Kenyan coding students can survive power cuts by keeping their laptop battery above 50 percent at all times, working offline using locally saved resources, investing in a power bank for phone and router backup, and scheduling heavy tasks (video calls, downloads) during reliable power hours. A laptop with a healthy battery lasts 4 to 8 hours on a single charge, enough to code through most unplanned outages.

The Reality of Power in Kenya

If you live in Kenya, you have a relationship with KPLC. It is not a good relationship. Load shedding is scheduled in advance but often extends beyond the published hours. Unplanned outages happen when a transformer blows or a tree falls on a line in your neighbourhood. Some areas lose power for 2 hours. Some lose it for 12.

As a coding student, this is not just an inconvenience. Your laptop is your classroom, your workshop, and your office. When the power goes, your ability to study goes with it, unless you have a plan.

The good news: coding is one of the most power-efficient things you can do on a laptop. You are not rendering video or running heavy simulations. You are typing text into a code editor. A laptop with a healthy battery can run VS Code, a terminal, and a browser for 4 to 8 hours on a single charge. That is enough to survive most outages.

The bad news: your internet probably dies with the power. Your Wi-Fi router, your fibre ONT, and possibly your mobile signal (some base stations have limited backup power) all depend on electricity. No internet means no video calls, no documentation lookups, and no pushing code to GitHub.

The plan below handles both problems: keeping your laptop alive and keeping yourself productive when the internet disappears.

Battery Management: The First Line of Defence

Rule 1: Never let your battery drop below 50 percent when power is on. When the lights are on, plug in. Charge to 100 percent and keep it there. The moment power goes out, you start your outage session with a full battery and 4 to 8 hours of runway.

Rule 2: Reduce battery drain during outages.

  • Lower screen brightness to 40 to 50 percent. This alone extends battery life by 30 minutes to an hour.
  • Close unnecessary browser tabs. Each tab consumes CPU and RAM, both of which drain battery.
  • Turn off Bluetooth if you are not using it.
  • Switch to a dark theme in VS Code and your browser. Dark pixels use less power on some screens.
  • Disable Wi-Fi if your router is dead anyway. No point searching for a network that does not exist.

Rule 3: Know your battery's actual capacity. A new laptop battery holds its rated charge. A two-year-old battery might hold 60 percent of its original capacity. If your "full charge" only lasts 90 minutes, your battery needs replacing. A new battery costs KES 3,000 to KES 8,000 depending on the laptop model. It is one of the best investments a Kenyan coding student can make.

Coding Offline: What You Can Do Without Internet

More than you think.

Write and test code locally. Your code editor, your terminal, and your local development server do not need internet. HTML, CSS, and JavaScript run entirely in your browser. Node.js runs locally. React development server runs locally. You can build, debug, and test complete applications without any internet connection.

Read downloaded documentation. DevDocs.io allows you to download documentation sets for offline access. Download docs for JavaScript, React, Node.js, CSS, and HTML when you have internet. During outages, read them offline. MDN Web Docs also has downloadable content.

Watch downloaded tutorials. If you download video tutorials when you have internet (using YouTube Premium's download feature or a video downloader tool), you can watch them offline during power cuts when your laptop still has battery.

Review and refactor old code. No internet? Open a project you completed last week and clean it up. Rename variables. Add comments. Restructure functions. This is valuable work that requires no external resources.

Practise algorithms. Open a text file and work through coding problems by hand. Write functions, trace their logic, and test them mentally. When power returns, type them into your editor and verify.

The key is preparation. Before the outage (or before going to bed the night before a scheduled load shedding), download everything you need. Save tutorial pages as PDFs. Pull your Git repositories. Install npm packages. When the power cuts, you should have everything you need on your hard drive.

Affordable Power Backup Solutions

Power bank for phone and router (KES 3,000 to KES 8,000). A 20,000mAh power bank can charge your phone 3 to 4 times and keep a small router alive for 4 to 6 hours. This solves the internet problem during outages: your phone becomes a mobile hotspot powered by the power bank, giving your laptop internet access.

UPS for router and laptop (KES 5,000 to KES 15,000). An Uninterruptible Power Supply keeps your router and laptop running for 1 to 3 hours during an outage. It also protects your devices from power surges when electricity returns. For coding students in areas with frequent outages, this is worth the investment.

Solar charger (KES 2,000 to KES 5,000). A portable solar panel can charge your phone and power bank during the day. Useful if you live in an area with frequent daytime outages. It will not charge a laptop directly, but it keeps your phone and hotspot alive.

Inverter and battery system (KES 15,000 to KES 40,000). For extended outages (4+ hours regularly), a small inverter with a car battery provides hours of power for a laptop and router. This is a bigger investment but eliminates power as a constraint entirely. Common in areas with unreliable KPLC supply.

Start with the cheapest effective solution: a good power bank. Upgrade if your area has severe power reliability issues.

Scheduling Around KPLC

KPLC publishes load shedding schedules on their website and social media. Check it every Monday and plan your week accordingly.

Schedule video calls during power hours. Bootcamp live sessions, mentor meetings, and client calls should happen when electricity is guaranteed. If your bootcamp session conflicts with a scheduled outage, inform your facilitator in advance.

Do heavy downloads before outages. If load shedding is scheduled for 10 AM to 2 PM, do all your downloads between 8 AM and 10 AM. Pull Git repos, download npm packages, save tutorial videos.

Use outage hours for offline work. Code locally. Refactor old projects. Read downloaded docs. Practice algorithms on paper. Make the outage productive instead of waiting for it to end.

Charge everything overnight. Laptop, phone, power bank, portable speaker (for coding playlists). If power is reliable at night, use those hours to charge every device you own so you start the day at 100 percent.

Treat KPLC's schedule the same way you treat a lecture timetable. Plan around it, not against it. The students who succeed in Kenya are not the ones with the best power supply. They are the ones who plan best around the worst power supply.

Key Takeaways

  • KPLC load shedding schedules are published in advance. Check the schedule weekly and plan your heavy-power tasks (video calls, downloads) during guaranteed power hours.
  • A laptop with a healthy battery is your most important backup. Keep it charged above 50 percent whenever power is available. A degraded battery that only holds 90 minutes needs replacing.
  • Coding is one of the most power-efficient activities on a laptop. VS Code, a terminal, and a browser use minimal battery. You can code for 4 to 8 hours on a single charge.
  • Download everything you need before the power cuts. Tutorials, documentation, npm packages. Offline preparation is the difference between a productive blackout and a wasted one.
  • A KES 3,000 to KES 8,000 power bank can keep your phone (for mobile hotspot) and your router alive during outages. This single purchase solves the internet-during-blackout problem.

Frequently Asked Questions

How long can I code on my laptop during a power cut?
A laptop with a healthy battery lasts 4 to 8 hours of coding (VS Code, terminal, browser). If your battery is degraded and only holds 90 minutes, consider replacing it (KES 3,000 to KES 8,000). Reduce battery drain by lowering brightness, closing unnecessary tabs, and disabling Wi-Fi when there is no connection.
How do I get internet during a power cut in Kenya?
Use your phone as a mobile hotspot. Keep the phone charged with a power bank (KES 3,000 to KES 8,000 for a 20,000mAh model). If you have a home router, a small UPS (KES 5,000 to KES 15,000) can keep it running for 1 to 3 hours during an outage.
Can I code without internet?
Yes. Most coding work happens locally: writing code in VS Code, running a local development server, testing in a browser. Pre-download documentation, tutorials, and npm packages when you have internet. The main things you cannot do offline are push to GitHub, attend video calls, and search Stack Overflow.
What is the cheapest power backup for a coding student in Kenya?
A 20,000mAh power bank (KES 3,000 to KES 5,000) is the cheapest effective solution. It keeps your phone and hotspot running during outages while your laptop runs on its own battery. For more extensive backup, a small UPS at KES 5,000 to KES 15,000 covers both laptop and router.

Ready to build real-world apps?

Join the McTaba Labs full-stack marathon (4 months full-time · 6 months part-time). Learn M-Pesa, USSD, and WhatsApp engineering while shipping 8 production apps.

Apply to the McTaba Marathon