<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Collins7-code</title>
    <description>The latest articles on DEV Community by Collins7-code (@collins7code).</description>
    <link>https://dev.to/collins7code</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4076009%2Fac8e9665-554f-4237-9bab-4e7dca3b6a67.png</url>
      <title>DEV Community: Collins7-code</title>
      <link>https://dev.to/collins7code</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/collins7code"/>
    <language>en</language>
    <item>
      <title>I'm 17 in Ghana. I built a solar-sizing tool on my phone — here's the code and every bug I hit.</title>
      <dc:creator>Collins7-code</dc:creator>
      <pubDate>Thu, 13 Aug 2026 11:10:08 +0000</pubDate>
      <link>https://dev.to/collins7code/im-17-in-ghana-i-built-a-solar-sizing-tool-on-my-phone-heres-the-code-and-every-bug-i-hit-5cbb</link>
      <guid>https://dev.to/collins7code/im-17-in-ghana-i-built-a-solar-sizing-tool-on-my-phone-heres-the-code-and-every-bug-i-hit-5cbb</guid>
      <description>&lt;p&gt;Ghana sits under some of the strongest sunshine on earth. Solar supplies&lt;br&gt;
about 1–3% of our grid electricity. The gap isn't desire — it's guesswork.&lt;br&gt;
Families want solar, but nobody can tell them plainly: &lt;em&gt;what size? what cost?&lt;br&gt;
will it pay for itself?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;So I built the answer. On a phone. Between classes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;A Streamlit app that lets any household:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enter their real appliances (fridge, TV, fans, pump…)&lt;/li&gt;
&lt;li&gt;Get a sized system: panels (kW), battery (kWh), inverter (kW), using
load math + region-aware peak sun hours&lt;/li&gt;
&lt;li&gt;See an estimated cost in cedis&lt;/li&gt;
&lt;li&gt;See the payback computed from their &lt;strong&gt;real ECG bill&lt;/strong&gt; (bill ÷ kWh = true
tariff — no invented numbers)&lt;/li&gt;
&lt;li&gt;Request a professional quote → the sized lead is emailed to me&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🔗 Live app: &lt;a href="https://ghana-solar-tool-pli6auappdapghergd2rfz.streamlit.app" rel="noopener noreferrer"&gt;https://ghana-solar-tool-pli6auappdapghergd2rfz.streamlit.app&lt;/a&gt;&lt;br&gt;
📂 Code: &lt;a href="https://github.com/collins7-code/ghana-solar-tool" rel="noopener noreferrer"&gt;https://github.com/collins7-code/ghana-solar-tool&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The bugs (an honest post-mortem, because that's the real lesson)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. The form that crashed on submit.&lt;/strong&gt;&lt;br&gt;
I pasted my lead-capture form &lt;em&gt;above&lt;/em&gt; the sizing code. It rendered fine&lt;br&gt;
(empty boxes need no math) — and threw &lt;code&gt;NameError: daily_kwh is not defined&lt;/code&gt;&lt;br&gt;
the moment someone submitted. Lesson: test the &lt;em&gt;submit path&lt;/em&gt;, not just the&lt;br&gt;
render path.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. "Make sure you open this page through a web server."&lt;/strong&gt;&lt;br&gt;
FormSubmit expects browser calls with &lt;code&gt;Origin&lt;/code&gt;/&lt;code&gt;Referer&lt;/code&gt; headers. My app&lt;br&gt;
posts server-to-server, so it looked like a local HTML file and got refused.&lt;br&gt;
Fix: attach the live app URL as &lt;code&gt;Origin&lt;/code&gt; + &lt;code&gt;Referer&lt;/code&gt; headers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. The silent activation step.&lt;/strong&gt;&lt;br&gt;
First submission to a new email only triggers a one-time activation email.&lt;br&gt;
Until you click it, leads are accepted but never delivered. I chased a&lt;br&gt;
"broken" pipeline that was just waiting for one click.&lt;/p&gt;

&lt;h2&gt;
  
  
  What real users taught me
&lt;/h2&gt;

&lt;p&gt;My first real user (a friend) left the appliance table at its &lt;strong&gt;defaults&lt;/strong&gt; —&lt;br&gt;
so her quote wasn't truly hers. Real hands &amp;gt; my assumptions. That's now an&lt;br&gt;
open UX issue: nudge users to personalise the table.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next — and where you come in
&lt;/h2&gt;

&lt;p&gt;This project is built in the open. Open issues include: real ECG tariff&lt;br&gt;
bands, measured irradiance data, Twi localization, and mobile UX.&lt;/p&gt;

&lt;p&gt;I'm also opening an &lt;strong&gt;open-data track&lt;/strong&gt; with real Ghana infrastructure data.&lt;br&gt;
To show you why it matters: in 2010 Ghana spent &lt;strong&gt;US$171M&lt;/strong&gt; on road&lt;br&gt;
maintenance — yet &lt;strong&gt;58%&lt;/strong&gt; of the 68,053 km network was still rated fair or&lt;br&gt;
poor. &lt;em&gt;Where should the next cedi go?&lt;/em&gt; That's the kind of question this&lt;br&gt;
track will explore, roads first, then energy.&lt;/p&gt;

&lt;p&gt;Grab a &lt;code&gt;good first issue&lt;/code&gt;. Read CONTRIBUTING.md. Come build with me.&lt;/p&gt;

&lt;h2&gt;
  
  
  One line for the road
&lt;/h2&gt;

&lt;p&gt;I lost version 1 of this project when my phone broke. I rebuilt it better.&lt;br&gt;
The builder survived. ⚡&lt;/p&gt;

</description>
      <category>python</category>
      <category>buildinpublic</category>
      <category>datascience</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
