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.
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.
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.
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.
Get weekly developer tips
Join 25,000+ developers. Practical guides, job tips, and new content — straight to your inbox.
No spam. Unsubscribe anytime.
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.
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.
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.
Create a free McTaba Academy account. Access starter lessons, join the community, and explore at your own pace.
Create Free Account