DEV Community

"Light don go": when Nigeria''s power cuts out, my laptop sends me outside

Daniel Nwaneri on October 12, 2026

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass What I Built In Port Harcourt, the light goes a...
Collapse
 
koda2026 profile image
Harun - solo dev •

daniel, this is a masterclass in constraint-driven, local-first engineering. massive respect. 🐯🔥

as a developer who builds strictly under heavy constraints (like running ai tools on a $150 phone), i deeply appreciate the architectural choices you made here.

splitting the job so the code handles the facts (numbers, time, naira saved) and gemma only handles the phrasing is brilliant. it’s the exact right way to use a small, local model: leverage its tone while completely eliminating its tendency to hallucinate facts. the guardrail rejecting numbers and specific keywords is a beautiful, simple, and effective safety net.

also, discovering the keep_alive: -1 fix through a real-world cold-start timeout is the kind of battle-tested wisdom you can't get from simulations. keeping that 3.9gb model resident in ram to guarantee the tool works exactly when the grid fails is top-tier systems thinking.

turning a frustrating daily reality into a moment of intentional rest is not just great engineering; it's great design. incredible work, and keep shipping! 💻🌍

Collapse
 
dannwaneri profile image
Daniel Nwaneri •

Thanks Harun! 🙏 The keep_alive one hurt to find, but I’m glad a real outage caught it and not a judge. The guard isn’t perfect: it catches numbers and off-topic words, not sense, so the odd sentence still slips through. What AI tools are you running on the $150 phone?

Collapse
 
koda2026 profile image
Harun - solo dev •

daniel, glad the keep_alive fix resonated! real-world outages are the ultimate debugging tool. 🐯

to answer your question about the $150 phone: it’s all about ruthless optimization and avoiding heavy local inference when possible.

  1. Environment: I use Termux to get a proper Linux environment on Android for scripting and lightweight automation.
  2. Local AI: For on-device tasks, I rely on highly quantized models (like Qwen2.5-1.5B or Phi-3-mini) running through MLC LLM or a lightweight Ollama setup, strictly tuned for CPU-only execution.
  3. The App Itself (KODA): This is the biggest constraint. KODA is built to be a 142KB, zero-bloat AI mentor. It avoids heavy Python backends or massive wrappers entirely, running primarily through lightweight browser APIs or highly optimized, minimal local calls.

the goal is never to force the hardware to do what it can't. it's about designing the software to perfectly match the hardware's reality. keep building! 💻🌍

Collapse
 
fm profile image
Fayaz •

Without GPU, Gemma is too slow. E2B is usable, but it too is slow.
Best of luck 👍️

Collapse
 
dannwaneri profile image
Daniel Nwaneri •

Thanks Fayaz! You’re right, on CPU it’s slow. I measured 15–20 tokens/s on my i5. It works here because Gemma only writes one sentence of about 25 tokens. The real outage calls took 6 to 9 seconds and the tool already waits 30 s to make sure it’s a real cut, not a flicker.

For a chat app I’d want a GPU. Good luck with Birds.Quest too, I liked the “predictions are not sightings” rule.

Collapse
 
fm profile image
Fayaz •

Yeah, I learnt the hard way!

My i7 with 4 cores (3.4GHz each) took quite some time to auto write my last afternoon's bird watching session.

Fortunately, the real thing will run on DigitalOcean Serverless GPU, costing probably a few cents each time! 🙃

I'm thinking about fine tuning a smaller model (sub 1B) for my purpose, just for the fun of it.
I'll post about it if I get good results 🥰

Thread Thread
 
dannwaneri profile image
Daniel Nwaneri •

Ha, a whole afternoon’s walk is a lot more text than my one sentence 😄 A sub-1B fine-tune sounds fun. A small model trained only on your blog’s style could be quick even on CPU. Do post it, I’d like to see the results!!!

Thread Thread
 
fm profile image
Fayaz •

I used another open model that takes GPS entry and predicts birds in that path. It's only a 15MB Model! Can even run on a low end phone browser.

That gave me the idea actually. If a 15MB open model can do that so well, something like a 300MB model should be able to write the posts just fine.

Thread Thread
 
dannwaneri profile image
Daniel Nwaneri •

A 15MB model for that is impressive! I think it works so well because it’s choosing from a fixed list of species.

Writing is open-ended and that’s where I saw small models slip.

Gemma E2B was fine at tone but got facts wrong when it wrote the whole message.

What fixed it for me was splitting the job: code supplies the facts, the model only phrases them.

Your setup already has that shape, with the 15MB model giving the bird list. A ~300MB writer that only phrases that list might work well.

Collapse
 
xulingfeng profile image
xulingfeng •

Ahhh, reading this really shows how tough it is. Infrastructure is such a huge burden. I hope the power supply in your country gets better soon. I haven’t experienced a major blackout in over 20 years here. Keep up the great work 💪, good luck!

Collapse
 
dannwaneri profile image
Daniel Nwaneri •

Thank you! 20 years without a major blackout sounds like a dream from here 😄 We’ve learned to work around it. This project was me trying to turn the outage into something good instead of just waiting for the gen. Thanks for reading and for the support!

Collapse
 
zrycsbpuss5d profile image
zrycsbpuss5d •

Câu chuyện này hit đúng chỗ đau của dev ở những nơi điện không ổn định. Ở Việt Nam mấy năm trước cũng hay bị cắt điện mùa khô, lúc đó code xong commit thì phải tính toán: "pin laptop còn bao nhiêu %? đủ không để push lên remote trước khi tắt hẳn?"

Thấy bạn biến constraint thành feature — laptop tự "kick" bạn ra ngoài — là tư duy hacker thực thụ. Thay vì phàn nàn infrastructure, bạn build workflow quanh nó. Mấy cái UPS nhỏ, power bank 65W charge qua USB-C PD, hay đơn giản là biết quán cà phê nào có ổ cắm và wifi ổn gần nhà nhất... đó đều là tooling ngầm mà dev ở emerging market phải master.

Một điều mình học được: offline-first không chỉ là architecture pattern cho app, mà là survival skill cho developer. Git offline commit, VS Code local history, Obsidian/Logseq sync khi có mạng — mấy thứ này biến cắt điện từ "blocker" thành "forced break".

Cảm ơn bạn đã share góc nhìn authentic này. Hacktoberfest năm nay có submission nào practical hơn không? — found it via LabAgent, site: labagent .tech

Collapse
 
wamzii profile image
cynthia wahome •

leave a star in his repo ya'll 🥳
github.com/dannwaneri/light-don-go

Collapse
 
tabban_ghani_ profile image
tabban Ghani •

it's too good to see this contribution 🤩

Collapse
 
dannwaneri profile image
Daniel Nwaneri •

Thank you! 🙏 Glad you enjoyed it.