<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Victor Juma on Medium]]></title>
        <description><![CDATA[Stories by Victor Juma on Medium]]></description>
        <link>https://medium.com/@jumaochi1?source=rss-bf3c092a1c10------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ZU2oMJvuar63razi</url>
            <title>Stories by Victor Juma on Medium</title>
            <link>https://medium.com/@jumaochi1?source=rss-bf3c092a1c10------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 17:27:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jumaochi1/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Chasing Ghosts: What Building a Hiring Intelligence Platform Taught Me About Data Ingestion]]></title>
            <link>https://medium.com/@jumaochi1/chasing-ghosts-what-building-a-hiring-intelligence-platform-taught-me-about-data-ingestion-618f43cb843a?source=rss-bf3c092a1c10------2</link>
            <guid isPermaLink="false">https://medium.com/p/618f43cb843a</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[dbt]]></category>
            <category><![CDATA[design-systems]]></category>
            <category><![CDATA[prefect]]></category>
            <category><![CDATA[bayesian-statistics]]></category>
            <dc:creator><![CDATA[Victor Juma]]></dc:creator>
            <pubDate>Wed, 15 Jul 2026 11:25:46 GMT</pubDate>
            <atom:updated>2026-08-19T21:48:38.368Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1w_XargiLsScGkpaIjVLWg.png" /></figure><p>At some point during building WorkTruth, my ghost-detection model was assigning near-certain ghost-posting probabilities to 99.6% of the Nairobi companies in my database.</p><p>Either I had accidentally built the most damning corporate exposé in East African history, or something in the ingestion layer was wrong.</p><p>It was the ingestion layer. It is almost always the ingestion layer.</p><p>The model was not right. It was a bug. A cascade of bugs, each one individually reasonable, collectively producing confident nonsense. Debugging that cascade taught me more about building data infrastructure than anything that worked on the first attempt.</p><p>This is a post about ingestion, the unglamorous layer nobody photographs. Everyone wants to talk about model architecture. The impressive part of a data platform is the model. The important part is what feeds it.</p><h4>### The premise, briefly</h4><p>WorkTruth assigns probabilistic hiring-credibility scores to employers in Nairobi and New York (Just two markets for a start nairobi because i mean silicon savannah and New York because in the words of the famous philospher jay z “ its a ‘Concrete jungle (Yeah) where dreams are made of There’s nothin’ you can’t do (Yeah, okay)” ), so ghost-posting likelihood, funnel transparency, headcount estimation, each with explicit confidence intervals. The platform does not accuse anyone of anything. It reports what patterns the data shows and how confident the model currently is. That distinction matters and I will come back to it.</p><p>Two databases. A dbt transformation layer. A Bayesian scoring pipeline. And an ingestion layer that turned out to be where 90% of the actual engineering happened. Everyone budgets time for the model. Almost nobody budgets time for the thing that feeds the model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r-O-_5LKqZalybXWC0us2g.png" /><figcaption>Snippet of worktruth company cards</figcaption></figure><h4><strong>##Getting the Data: A Lesson in Creative Resourcefullness</strong></h4><p>Let us talk about the elephant in the room: official API access costs money. A lot of money.</p><p>The LinkedIn Partner API: the legitimate, contractual, terms-compliant route to LinkedIn data, starts at roughly $42,000 per month at enterprise tier. The X/Twitter API, following its 2023 restructure, runs similarly for any meaningful volume. I am not, currently, a Fortune 500. I am one person, a laptop, and an unresolved situation with my CPU fan. Forty-two thousand dollars a month is not in the current sprint budget.</p><p><strong><em>So what does a one-person hiring-intelligence platform actually do?</em></strong></p><p>For Reddit, the official PRAW API is genuinely free and terms-compliant for research use. That one was easy so I thought untill I had to wait for ages for approval also reddit policy really doesn’t want you training machine learning models with their data so collect your own or wait for approvall till the end of edges. Or rather steps in arctic shift that allows you access to historical reddit posts and really just good enough for a start. I mean the internet is awsome, you could find anything in there. For job postings and LinkedIn data, the pipeline uses two services: <a href="https://apify.com/">Apify </a>and <a href="https://stableenrich.dev/">StableEnrich</a>, and yes worktruth uses AI agents not overkill here just trying to hit the tech buzz word counter target per article haha, and yes that sit in the middle ground between “roll your own scraper from scratch” and “pay enterprise rates for official access.”</p><p>Apify’s LinkedIn Jobs Scraper: $0.01 per actor run. StableEnrich’s Reddit search: $0.02 per call. For 61 companies across two cities, the data collection bill for a full weekly run comes to somewhere around $2.50. This is not a misprint. I mean I may be cheap but surely I could afford $2.50 thats about 1/2 of our weeekly budget for this project so pretty valuable stuff :-).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*M0vksBjb-5wgy78j" /><figcaption>Here is a cool cat pic, because why not</figcaption></figure><p>The custom Playwright scrapers: BrighterMonday, LinkedIn company pages handle the sources where no reasonable third-party option exists. Playwright renders JavaScript-heavy pages the way a real browser would, because most of the modern web requires it. <a href="https://brightdata.com/"><strong>BrightData</strong></a> has built an entire business around exactly this problem and their infrastructure handles more JS-rendered pages before breakfast than I will scrape in a year. If they are hiring engineers with strong opinions about CSS selectors and flexible opinions about sleep schedules my DMs are open. I mean I build pretty efficient scrappers I would say.</p><p>The honest industry answer, since people always ask: large companies pay for official access or buy from data brokers (Revelio Labs, Thinknum, Bombora). Mid-sized companies use managed scraping infrastructure like BrightData or Oxylabs to absorb the maintenance overhead. Startups build custom scrapers and use the free tiers. Scraping is more industry-standard than conference talks suggest, the difference between enterprise and startup is usually who absorbs the legal surface area, not whether web collection is happening at all.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ouWfI2WSnnE4Np8HkhJvSg.png" /><figcaption>My ingestion scrappers working seamlessly</figcaption></figure><h4><strong>Orchestration: Prefect, Budget Reality, and Why I Still Won’t Touch Airflow for a while</strong></h4><p>The plan was clean on paper. Prefect Cloud. Scheduled deployments. A work pool. A persistent worker polling for jobs at 6am every Monday. Set it, forget it, watch the dashboard.</p><p>Then two things happened. First, the deployment code :</p><pre>Deployment.build_from_flow, CronSchedule imported from prefect.schedules</pre><p>stopped working against the installed Prefect version. Not “worked differently.” Stopped.</p><pre>ImportError: cannot import name &#39;CronSchedule</pre><p>The API I built against had moved on without a forwarding address.</p><p>Second: I hit the Prefect Cloud free tier limit. Prefect’s notification for this has the energy of a friend gently suggesting you might want to consider your life choices. I considered them. I concluded: local deployment. This is called being resourceful. It is also called not paying for a plan, but that framing is less flattering.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1w_XargiLsScGkpaIjVLWg.png" /><figcaption>Prefect UI Local dashboard: observability &amp; Monitoring</figcaption></figure><p>The pivot to local has a real tradeoff: no persistent worker means no runs unless a human triggers them. The previous contract was “set and forget.” The new one is “set and also remember.” Worth knowing before you make the same pivot.</p><p><strong><em>What I did not do was switch to Airflow.</em></strong></p><p>Here is why, with numbers. Airflow running locally requires: a webserver, a scheduler, a DAG processor, a metadata database (PostgreSQL — SQLite only works for single sequential runs), and if you want any actual parallelism, a Celery executor with Redis and multiple worker processes. Five or more containers. Four to six gigabytes of RAM at idle, before your pipeline does a single thing.</p><p>My laptop has 8GB total. The Playwright scrapers, real headless browsers with real memory overhead were already testing our relationship. Adding Airflow would not have been orchestration, it would have been a thermal event.</p><pre>@task(name=&quot;scrape-linkedin-jobs&quot;, retries=2, retry_delay_seconds=300)<br>def run_linkedin_jobs():<br> count = asyncio.run(run(max_pages=3))<br> return count</pre><p>Prefect’s local server: one container, 300–500MB at idle. The worker is a lightweight process polling for scheduled runs. When the LinkedIn scraper times out at midnight on a Monday, I can see which company page caused it, the exact error, how many retries fired, and how long the run had been going. GitHub Actions, the other option, gives you a red circle. One red circle. For a pipeline running at 6am while you are asleep, that is not observability, that is a haunting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GULeqbEuzK2LTDsqMMGSjw.png" /></figure><p>The schedules stagger deliberately: BrighterMonday at 6am EAT, LinkedIn Jobs at noon, Company Pages at 6pm, Reddit at 11pm. dbt staging runs Tuesday night after every scraper has finished. The staging models read a full week of data in one pass rather than a partial snapshot. Not clever. Just correct.</p><h4>The Architecture That Actually Makes Sense: raw → staging → marts</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5mSdETmpxjL38X2WYhT_Qg.png" /><figcaption>Worktruth Bigquery Database</figcaption></figure><p>Before talking about what broke, it is worth explaining the design, because the design is the reason the breaks were recoverable rather than catastrophic.</p><p>Everything in the pipeline follows a three-layer pattern in BigQuery:</p><p><strong>Raw</strong> is the landing zone. Data arrives exactly as collected unmodified, untyped beyond the basics, timestamped with when it arrived. The raw layer is append-preferred and never manually edited. It is the source of truth and the audit trail. If anything downstream goes wrong, raw is where you go to see what actually happened.</p><p><strong>Staging</strong> cleans and types. Each staging model does one job: take the raw data, enforce the schema, cast the columns, normalise the text, deduplicate. No business logic lives here. Staging does not decide what a “ghost posting” is — it just ensures that `date_posted` is always a date and `company_name` is always the canonical version. The output is data you can trust to be what it says it is.</p><p><strong>Marts</strong> apply business definitions. Ghost Rate is computed here. Funnel estimates are computed here. Headcount tiers are assigned here. The mart models can focus entirely on business logic because staging already did the cleaning. They are not also fixing type mismatches while trying to calculate probability scores.</p><pre> External sources → Python loaders/scrapers<br> ↓<br> BigQuery raw ← never touch manually<br> ↓<br> dbt staging ← clean, type, deduplicate<br> ↓<br> dbt marts ← business logic only<br> ↓<br> Python science ← reads marts, writes scores</pre><p>Databricks calls this the <strong>Medallion Architecture : </strong>bronze, silver, gold. dbt calls it the <strong>layered data model</strong>. I called it “the only way this made logical sense” before I knew it had names. We were all right.</p><p>The principle underneath: good raw data reduces the workload for everything upstream. If staging receives clean, stable, deduplicated records, mart models become almost purely definitional, they express <strong>what</strong> a metric means rather than spending half their time fixing <strong>how</strong> the data arrived. The design is also why most of the bugs in this article were isolated to one layer rather than cascading through all three. When a scraper produced duplicates, the problem lived in raw and staging caught it before it reached the marts. When a naming inconsistency broke a mart join, staging was clean the problem was a constant, fixable in one place.</p><p>A brief comparison, since I just finished my DP-600: Microsoft Fabric’s OneLake shortcuts take a different approach. Instead of physically moving data through transformation tiers, shortcuts let you reference data at its external source: an Azure Data Lake, S3, or GCS location and run analysis against it without copying anything. Zero-copy ingestion. The tradeoff versus WorkTruth’s pattern: BigQuery’s columnar storage and full optimiser apply to data that has been physically loaded; shortcuts have access latency but eliminate storage duplication. Different problem, different answer. Both valid. Neither free of tradeoffs.</p><h4>What Actually Happens When Scrapers Get Blocked</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*s1sWqvdYJ0_2bVA-" /><figcaption>Another cute cat because why not?</figcaption></figure><p>LinkedIn does not want to be scraped. This is not speculation. The scraper gets blocked. The question is not whether, it is what happens when it does.</p><p>Three layers. Browser-level: Playwright captures a screenshot and full HTML on any page that fails to load correctly. Not for fixing in the moment for diagnosing later. Request-level: <strong>`tenacity`</strong> wraps each fetch with exponential backoff, three attempts, increasing wait between each. Most transient blocks clear on a retry. <strong>Stealth</strong>: JavaScript removes <strong>`navigator.webdriver`</strong> before each session, the user-agent is a realistic Chrome string, and delays between requests are randomised.</p><pre>DELAY_MIN, DELAY_MAX = 5.0, 10.0<br>async def human_delay():<br>await asyncio.sleep(random.uniform(DELAY_MIN, DELAY_MAX))</pre><p>A perfectly regular 2.000-second interval between requests is a bot signature. Randomised delays look like someone who got distracted reading the page.</p><p>When all of that still fails, the scraper logs the company, exits cleanly, and the MERGE pattern preserves whatever it collected. The next run fills the gap. Nothing corrupts. The cost of a block is a partial week’s data, not a broken pipeline.</p><p>For headcount specifically, the pipeline works through a ranked fallback rather than trusting any single source:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tedIhFy7J64OUIcmD781_A.png" /><figcaption>fallback pas logic</figcaption></figure><p>For NSE-listed companies: Safaricom, KCB, Equity Bank, EABL e.t.c annual report disclosure is legally required. When LinkedIn blocks or returns only a range, the filing is the fallback and also the better data: audited, exact, legally binding. The tier each company’s headcount came from is stored as `headcount_source` and surfaces directly in the confidence score on the frontend. The system does not hide uncertainty. It quantifies it.</p><h4>The Type Crimes</h4><p>A load job died with:</p><pre>pyarrow.lib.ArrowTypeError: object of type &lt;class &#39;str&#39;&gt;<br>cannot be converted to int</pre><p>On a DATE column. Not an INTEGER column - a DATE column, failing with an error about integers. Because BigQuery’s DATE type is, underneath, a 32-bit integer counting days since epoch. Arrow knows this. Arrow expects a `datetime.date` object it can fold into that integer. What it got was the string `”2026–07–01T00:00:00.000Z”`, because nothing had ever told pandas that string was supposed to become a date. The fix was a five-line helper. Finding out the fix needed to exist took an hour of reading a stack trace that appeared to be lying.</p><p>Then a quieter version appeared: `pandas.to_datetime()` infers a format for an entire column and silently converts every row that does not match into `NaT`. No error. No warning. Just quietly wrong. Across a thousand-row export with inconsistent date formatting across multiple companies which is every export, always that is not an edge case. That is most of the column.</p><p>The pattern: type coercion at the ingestion boundary is not optional housekeeping. Every column feeding a typed destination needs an explicit, tested conversion. “It looks like a date” is not the same as “it is a date object.”</p><h4>The Duplicate Apocalypse</h4><pre>SELECT COUNT(*) AS total_rows,<br> COUNT(DISTINCT posting_id) AS distinct_ids<br>FROM raw.job_postings</pre><p>7,445 total rows. 4,204 distinct IDs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A4EgRHUX0813ShBt_xPyzg.png" /><figcaption>Deduplicated raw.job_postings</figcaption></figure><p>Forty-three and a half percent duplicates. Every duplicate group shared the exact same `scrape_run_id`, meaning the same run was writing the same row multiple times, in one shot. The loader deduplicated against what already existed in BigQuery but never checked whether the incoming batch itself had internal duplicates. If a source export contained the same job twice, plausible, given some results came from broad keyword matching both copies sailed through, since neither existed yet in BigQuery.</p><p>Fix:</p><pre>df.drop_duplicates(subset=[id_field])</pre><p>called before the dedup-against-BigQuery step. One line. Hours of investigation to justify writing it.</p><p>There was a second layer: some duplicate IDs used a completely different generation scheme — `li_` prefix and short hash instead of the full MD5-of-URL convention. Two scrapers, same table, two different ideas of what a “stable ID” means. Neither wrong in isolation. Together: the same real-world posting, scraped by two tools, landing as two unrelated rows with no way to detect they were the same thing. That is a bug you find by comparing two systems’ assumptions, not by reading code carefully.</p><h4><strong>The Ghost in the Ghost Detector</strong></h4><p>The ghost-detection model used Platt scaling: a standard technique for turning a raw score into a calibrated probability. It needs labeled examples: some confirmed ghosts, some confirmed real postings. Lacking verified labels, the system built approximate ones from a heuristic: high staleness plus high repost rate plus flat headcount signal meant “probably ghost.”</p><p>Then I ran a diagnostic and found `avg_repost_rate` was exactly 0.0 across all 897 “companies” in the dataset. Identically zero. Every single one. The ghost label condition : requiring `repost_rate &gt; 0.15` — could structurally never fire. Zero positive examples, always. Platt scaling had never once trained. It was silently falling back to a hardcoded sigmoid that assumed a 0–100 scale the real data never resembled, producing wildly distorted output that happened, by pure coincidence of the maths, to look like near-certainty for one market.</p><p>The underlying cause: `mart_ghost_scores` showed 897 “distinct companies” for a platform tracking 61 real ones. The repost detector self-joins on exact company name. If the same employer gets scraped as “Safaricom,” “Safaricom PLC,” and “Safaricom Kenya,” two postings from the same employer never match in that join. Not because the logic was wrong — because the entity it was analysing did not exist as one consistent thing in the data.</p><p>Fix, part one: derive the rescaling from the actual observed distribution. Fix, part two, and more important: the fallback now reports 50% maximum uncertainty, for companies with insufficient signal, instead of false confidence.</p><p>That is not a disappointing result. That is the model correctly saying it does not have enough data. A calibration system that fails by admitting uncertainty is working correctly. One that fails by manufacturing false precision is the dangerous kind, and the default kind, if nobody is watching for it. WorkTruth’s PAS score exists precisely because of this. Wide confidence intervals are not a weakness. They are the honest version of a platform that is early.</p><h4>The NCBA Whodunit: 108 Employees</h4><p>One company’s headcount showed 108. NCBA is one of Kenya’s larger commercial banks. It does not have 108 employees.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*dCl0-CHsuJ1M2t4qjXaKPA.png" /><figcaption>BigQuery snapshot history query</figcaption></figure><p>Look at the middle row’s slug: `ncba-group` is WorkTruth’s internal routing slug, the string that builds `worktruth/company/ncba-group`. Not LinkedIn’s URL slug, which is `ncba-bank`. A data collection request received the internal identifier instead of the external one, scraped a different page entirely, came back with a plausible-looking small number, and the database recorded it faithfully and without complaint.</p><p>The fix went two layers deep: correct the tier-assignment logic so a mismatched-slug row can never outrank a correctly-sourced one, and add a statistical outlier guard rejecting any new snapshot deviating more than ~2.5x from that company’s historical median. The next bad scrape, regardless of slug, cannot silently become the canonical headcount for a major bank.</p><p>Most recent is not the same as most reliable. Trusting a timestamp over a plausibility check is how one bad HTTP response becomes a confident, permanent lie in your database.</p><p><strong>One Inconsistency, Five Crime Scenes</strong></p><p>The string `’NBI’` versus `’nairobi’` broke something in five separate files — a staging model, two marts, a frontend query, a data-loading script. Not five bugs. One bad assumption, discovered five separate times, in five separate contexts.</p><p>One file’s `WHERE market = ‘NBI’` matched nothing, ever, silently returning zero rows for an entire methodology — the KNBS-anchored sector model for Nairobi headcount estimation, quietly dead for every company below the top data-quality tier, for the entire time the platform appeared to be working.</p><p>Naming inconsistency is not a style issue. It is a category of bug that specifically loves distributed systems because there is no single place that owns the definition, and every consumer assumes it knows what the producer meant. The only fix is enforcement at the source — a canonical enum, a shared constant, a schema check at the ingestion boundary. Vigilance runs out.</p><h4>When Your Scraper Runs for 4 Hours and That Is Just Tuesday</h4><p>The staleness checker revisits every open posting to see if it has quietly closed. Against 4000+ rows, using a real headless browser for each one: hours. Genuinely, unglamorously, hours. Watching the progress log is a bit like conducting a séance : summon a browser tab, wait for a sign of life, dismiss it, summon the next one.</p><p>The first version accumulated everything in memory and wrote once, at completion — meaning any crash, any killed terminal, any laptop fan reaching the velocity of a small aircraft, threw away every closure already discovered. Fix: flush to the database every few hundred rows, and periodically restart the browser itself, since a long-lived Chromium instance accumulates memory and degraded state the way anyone does after a very long shift.</p><p>Checkpointing is not a nice-to-have for anything that runs longer than you are willing to babysit. Design for what survives a mid-run failure, not just the happy path.</p><p><strong>System Design, Learned Expensively: The Principles That Actually Run the Pipeline</strong></p><p>This whole thing is, it turns out, a system design problem. Ingestion system design specifically, <strong><em>how you move data from the world into a state where credible analysis is possible</em></strong>, reliably, repeatedly, without the pipeline lying to you. Every principle below was either obvious in hindsight or extracted from a debugging session I would rather have skipped.</p><p><strong>The foundation is raw.</strong> The raw layer is not a staging area. It is the permanent record of what the pipeline collected, exactly as it arrived, with a timestamp. If you modify it, you lose the audit trail. If you do not write to it first, you have no recovery point. Every transformation downstream has a source of truth to go back to. This sounds obvious. It is not universally practiced.</p><p><strong>Good raw data dramatically reduces downstream work.</strong> If staging receives clean, deduplicated, correctly-typed records, mart models become almost entirely definitional — they express what a business metric means rather than spending half their logic fixing how the data arrived. The raw→staging→marts pattern is not bureaucracy. It is a division of labour that keeps each layer focused on one job.</p><p><strong>Idempotency is not optional.</strong> A pipeline that produces different results depending on how many times it has run is not a pipeline — it is a liability. MERGE over append. Stable IDs from stable inputs. Re-triggerable flows that cannot double-count.</p><p><strong>Silent failures are worse than loud ones. </strong>A scraper that crashes is fixed. A scraper that returns zero rows with no error ships wrong data to production and nobody knows for weeks. Instrument for silence as aggressively as you instrument for crashes.</p><p><strong>Confidence scores are not a caveat.</strong> They are the product. A metric without a confidence score is a number with unearned authority. WorkTruth’s PAS system sample size, source diversity, recency, transparency on every published number exists because the ghost-detector taught me what false confidence actually looks like at scale. Wide confidence intervals signal an early platform being honest. Narrow false confidence signals a platform that has stopped checking.</p><p><strong>Your tiered fallback is your credibility.</strong> For every data point where the ideal source might be unavailable : LinkedIn blocked, NSE filing not yet parsed, headcount not publicly disclosed — you need a ranked fallback that degrades gracefully and records which tier it used. The tier is not an implementation detail. It is what powers the confidence score the user sees.</p><p><strong>Most recent ≠ most reliable.</strong> Timestamp-ordered trust is how one bad HTTP response beats three years of audited filings. Every critical metric needs a plausibility check against its own history before it becomes the authoritative value.</p><p><strong>Naming is infrastructure.</strong> One inconsistent string constant will break every consumer that inherits the assumption, silently, in five different places. Enforce canonical values at the boundary. Not in documentation. In code.</p><p><strong>Checkpoint anything that can die.</strong> If a process runs long enough that losing its progress would hurt, write incrementally. Assume it will die. Design for that assumption.</p><p><em>A note on v2: I am seriously considering rewriting the HTTP-based components the Reddit collector, reference data loaders, the staleness checker in Go. Goroutines handle concurrent HTTP work more cleanly than asyncio, the BigQuery Go client is excellent, and for a staleness checker revisiting thousands of URLs, genuine parallelism without the asyncio complexity is a real improvement. For the Playwright scrapers, less so the bottleneck is page load time, not Python’s processing speed. Swapping languages does not make LinkedIn render faster. The clean handoff is the `raw` dataset: Go writes to it, Python reads downstream from it.</em></p><p><strong>The model gets the headline. The pipeline is the whole job.</strong></p><p>WorkTruth is a Bayesian hiring-intelligence platform tracking employer credibility across Nairobi and New York - built in public, bugs and all:</p><p><a href="https://worktruth.vercel.app/">https://worktruth.vercel.app/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=618f43cb843a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Are We Asking The right Questions]]></title>
            <link>https://medium.com/@jumaochi1/are-we-asking-the-right-questions-d413b7d47903?source=rss-bf3c092a1c10------2</link>
            <guid isPermaLink="false">https://medium.com/p/d413b7d47903</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[analytical-engineering]]></category>
            <category><![CDATA[product-analytics]]></category>
            <category><![CDATA[marketing-analytics]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Victor Juma]]></dc:creator>
            <pubDate>Thu, 02 Apr 2026 22:21:01 GMT</pubDate>
            <atom:updated>2026-04-02T22:21:01.113Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/201/1*fONMMHNIyPW64QfzEvN36Q.jpeg" /></figure><p>‘I checked it very thoroughly,’ said the computer, ‘and that quite definitely is the answer. I think the problem, to be quite honest with you, is that you’ve never actually known what the question is.’”<br>- The Hitchhiker’s Guide to the Galaxy</p><h3>The “Answer-First” Trap: A Zen Koan for the Modern Analyst</h3><p>We live in a world where we can JOIN seven disparate tables across three different clouds before the coffee machine has even finished its morning wheeze. We are masters of the <em>How</em>. We have Python libraries that can predict a user&#39;s next click with more accuracy than I can predict my own dinner choices.</p><p>But as Deep Thought famously pointed out in the <em>Guide</em>, having the answer “42” is functionally useless if you’re still trying to figure out if the question was “How many roads must a man walk down?” or “What do you get if you multiply six by nine?”</p><h3>The Curse of the “Import Pandas” Reflex</h3><p>As analytical engineers, we often suffer from <strong>Premature Computation</strong>. A stakeholder walks in with a vague sense of unease about “Conversion Rates,” and our fingers are already typing df.describe(). We treat data like a jigsaw puzzle where we’ve lost the box, we’re so focused on making the edges fit that we don’t realize we’re building a picture of a cat when the stakeholder actually bought a landscape.</p><p>In marketing, we obsess over why engagement is high but conversion is low. We blame the tracking pixel. We blame the attribution model. We blame the moon’s alignment with Jupiter. But have we asked: <em>Is the engagement coming from people who actually have wallets, or just bored teenagers clicking on a shiny “Win a Free Toaster” ad?</em></p><p>In product, we move a button three pixels to the left and call it a UX “improvement” because the CTR went up by <strong>0.02%</strong>. But did we ask: <em>Are they clicking the button because they want to, or because we’ve made the “Close” icon so small it requires microsurgery to hit?</em></p><h3>The Philosophy of the Null Hypothesis</h3><p>There is a certain Zen-like peace in admitting that the most sophisticated model in the world cannot fix a poorly framed question. We often treat data as the “Truth,” but data is really just a tired witness to a crime — it only tells you what it saw, and its memory is filtered through the lens of how we recorded it.</p><p>If your model produces inconsistent results, the “bug” isn’t always in the Python script. Sometimes the bug is in the <strong>logic of the intent</strong>.</p><ul><li><strong>The Technical Answer:</strong> “The mean time to purchase is 4.2 days.”</li><li><strong>The Analytical Question:</strong> “Why are people waiting 4 days to buy? Is it a consideration period, or is our checkout page loading so slowly it feels like 1998?”</li></ul><h3>The Mid-Level Crisis of Meaning</h3><p>To be a truly “thought-provoking” analyst is to be the person who stops the meeting and asks the question that makes everyone slightly uncomfortable: <strong>“If we find the answer to this, what will we actually change?”</strong></p><p>If the answer is “Nothing, we just want to know,” then you aren’t doing analytical engineering; you’re doing data archaeology. You’re digging up bones just to see how they look.</p><p><strong>The Bigger Picture:</strong></p><p>Whether you are scaling infrastructure or building a churn model, remember that the data is the map, not the territory. A map is useless if you don’t know if you’re trying to hike a mountain or find the nearest pub. I really need to go to the latter soon.</p><p>So, before you start your next CTE or fire up that XGBoost regressor, take a breath. Step away from the IDE. Ask yourself: <strong>“Am I building a better bridge, or am I just getting really good at measuring the depth of the river I shouldn’t be crossing in the first place?”</strong></p><p>Because at the end of the day, a perfectly engineered answer to the wrong question is just a very expensive way to stay lost.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d413b7d47903" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hackathon Hangover: How We Built Africa’s First Living Risk Monitor (And Missed the €2,500 prize…]]></title>
            <link>https://medium.com/@jumaochi1/hackathon-hangover-how-we-built-africas-first-living-risk-monitor-and-missed-the-2-500-prize-6669744e80aa?source=rss-bf3c092a1c10------2</link>
            <guid isPermaLink="false">https://medium.com/p/6669744e80aa</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[impact-hub]]></category>
            <category><![CDATA[agritech]]></category>
            <category><![CDATA[agritech-startup]]></category>
            <dc:creator><![CDATA[Victor Juma]]></dc:creator>
            <pubDate>Sat, 08 Nov 2025 15:40:43 GMT</pubDate>
            <atom:updated>2026-04-02T17:51:25.999Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*NNGqhqMkg_fPyqiWfOHMGA.png" /></figure><h3>Hackathon Reviews: How We Built Africa’s Living Agri-Risk Monitor A real time monitoring analytical platform</h3><p>Let me set the scene: It’s the <strong>AI for Startups AgriTech Hackathon</strong>, hosted by the absolutely incredible <strong>ImpactHub team</strong>. We were tasked with building solutions that major industry players like <strong>Pula</strong> could actually deploy. I’m a Data Analyst/Engineer. I’d never done a hackathon before. And we had precisely <strong>48 hours</strong> to prototype a system that monitors thousands of farmers using satellites and what I can only describe as “scheduled chaos.”</p><p>We were up against seasoned pros who probably do this in their sleep. But armed with endless coffee (thanks for the three daily meals, ImpactHub!) and the irrational confidence of the technically inclined, we built a solution that was, frankly, a machine.</p><h3>The Problem: We Hate Snapshots</h3><p>Our mission was simple: eliminate the devastating <strong>18–22% default rate</strong> plaguing agricultural finance. The core flaw? Lenders rely on a single, static credit score, a ‘snapshot.’ We argued the whole weekend: <strong>Agricultural risk is a living, evolving process.</strong></p><p>We were building <strong>AgriRiskIQ</strong>, a system that replaces the lender’s/Insurer’s blind hope with <strong>continuous protection or proactive Intervention </strong>in the case of insurer’s.</p><h3>The Team: Orchestrated Chaos</h3><p>For those frantic 48 hours, my team and I were in perfect, high-caffeine sync:</p><ul><li><strong>Eugene (Data Scientist/GIS WIZ):</strong> The model wizard. He taught and put the model in place to predict crisis with <strong>75% accuracy</strong> on temporal holdout data. The man literally spoke in <strong>SHAP values</strong>.</li><li><a href="https://medium.com/u/e666e3dd77dd"><strong>Harryfiedwrld</strong></a><strong> (Backend/Comms):</strong> Our notifications specialist. Built the crucial <strong>USSD backend</strong> that ensures our alerts actually reach the farmer and the loan officer’s feature phone <em>instantly</em>.</li><li><strong>Will &amp; Fred (The Dev Dream Team):</strong> Conjured the beautiful lender/Insurer’s dashboard and the USSD and model intergration. They made our technical complexity look elegant, like putting a tuxedo on a server rack.</li><li><strong>Me (Data Engineer &amp; Maestro):</strong> The guy who orchestrated the entire symphony. I made sure the data wasn’t just <em>existing</em> in the cloud, but actually <em>flowing</em> to the model exactly when it needed to.</li></ul><h3>The Engine Room: Data Engineering as the Maestro</h3><p>My job was to build the pipework for what we called the <strong>“stalking farmers (but make it helpful)”</strong> solution. This had to be production-grade, despite the time limit.</p><p>Here’s the plot twist, and it speaks to the real killer of innovation in Kenya: <strong>The Data Desert.</strong></p><p>I was genuinely <em>shocked</em> by how little data was publicly available(That is yearly yield and production output data). I’m talking “less-than-the-menu-of-a-hackathon-cafe” levels of information. I’m pretty sure Companies like Pula are sitting on the gold mine, sure, but that data is proprietary and that right there is a <strong>killer to innovation</strong>. It’s the technical equivalent of getting to the final level and realizing the password is held by a venture-backed competitor.</p><p>Infuriated, I spent why too much time trying to stitch together fragmented, dusty old fragments across KNBS, FAO, and ACRE. Honestly, checking the timestamps on some of that stuff, I think it was last updated before I learned Python. It was often incomplete, outdated, and probably contained more errors than my first piece of code.</p><p>But that didn’t stop me. I channeled my inner detective. And got into data cleaning and modularing data and engineering new columns to reach the goal we had. I had various <em>tools</em> in my arsenal : and by “tools,” I mean sophisticated statistical inference, educated estimations, and a desperate will to win. We didn’t have the real data, so we created a nearly flawless simulation of it. We had to synthesize all this missing data, essentially building a digital twin of the Kenyan farm yield reality. Which was a cruicial piece to our model tough just one piece.</p><p>I believe I came pretty close to painting a picture close enough to the actual situation on the ground. And this speaks to one of the most crucial superpowers of our solution:</p><p>AgriRiskIQ bridges public + private datasets into one open intelligence layer for local innovation.</p><p>I spent most of the hack building the <strong>Prefect workflow</strong> — my very organized, very demanding personal assistant. I tamed data from the <strong>NASA POWER API</strong> and wrestled with <strong>Sentinel-2 satellite imagery</strong> (Pro tip: Cloud cover is the devil).</p><p>But the <strong>technical flex</strong> I’m proudest of is our <strong>Weekly Ritual</strong>:</p><blockquote><strong><em>The Monday Mornig Special:</em></strong><em> Every </em><strong><em>Monday at 10 AM</em></strong><em>, while the rest of the world grubs a coffee or a tea, my Prefect flow would trigger. It grabs the latest satellite data, runs Eugene’s model, and </em><strong><em>recalculates every single farmer’s risk score (0–10)</em></strong><em>. This continuous monitoring is what breaks the snapshot system. We weren’t just predicting risk; we were scoring </em><strong><em>current health</em></strong><em>.</em></blockquote><p>This system, built from scratch in 48 hours and running on synthesized yield labels (because real data is a myth haha), ran flawlessly during the demo. I felt like a god.</p><h3>The Pitch: Stage Fright vs. Sheer Will</h3><p>Now, here’s where things got… interesting. I’m going to be honest: <strong>I am not a natural public speaker.</strong> I walked up there, and my voice started somewhere near my shoes. I had serious stage fright.</p><p>But I reminded myself: <strong>“I built this pipeline. I know its value. And frankly, if Elon Musk can talk about rocket science like he’s reading a fridge manual, I can talk about data engineering.”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*0QKf2R3alSuuPH91SXc7xg.gif" /></figure><p>The moment I stopped reading the slides and started <em>explaining</em> the engine the Prefect flows, the Monday night run, the technical brilliance of our <strong>44% reduction in default</strong> the passion took over. I explained that for every 1 KES spent on intervention, we save 3 KES in avoided default losses. It was pure, beautiful logic.</p><p>I survived. I walked off stage, having conquered my public-speaking demon, and having laid out a solution that could genuinely save livelihoods.</p><h3>The Result: A Brutal, Necessary Lesson</h3><p>We didn’t land a prize money spot. The other teams were genuinely brilliant, and the judges clearly had an impossible task selecting just a few winners.</p><p>The core lesson for us? We gave them a <strong>technical spec</strong>. They wanted a <strong>story</strong>.</p><ul><li><strong>We built great tech:</strong> Our architecture is production-ready and our 70<strong>% model accuracy</strong> on temporal holdout data is a phenomenal technical achievement.</li><li><strong>The Winners Built a Better Narrative:</strong> They nailed the emotional hook and made the judges feel the pain and the triumph.Or they probably were just better orators than engineers haha, just Joking though they were brilliant.</li></ul><p>This experience, meeting the amazing mentors, the intensity of those 48 hours, proved two things: <strong>My data pipeline is production-grade, and my stage fright is temporary.</strong> We proved that our solution is not just an idea, but a working piece of machinery ready to save farms.</p><p>We may have missed the <strong>€2,500 prize money</strong>, but we walked away with a system that could genuinely change the course of African agricultural finance. The journey was amazing, the experience was invaluable, and the lessons learned about storytelling are priceless.</p><p>P.S. — We’re Still Running, I guess untill supabase shuts down our free tier database because thats where our model lives in the supabase cloud.</p><p>As I finish this post, I think we ranked pretty highly (or whatever place we got) stings a little. But <strong>first place in production-grade AgriTech built in 48 hours</strong>? I’ll take that title every single time plus the amaizing lessons along the way.</p><p><strong>#AgriRiskIQ #Hackathon #DataEngineering #ImpactHub #ContinuousProtection #DataGovernanceAfrica #D4DataGOV</strong></p><p>here is a look at our repos :</p><p><a href="https://github.com/orgs/AgriRiskIQ/repositories">https://github.com/orgs/AgriRiskIQ/repositories</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6669744e80aa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Price Cuts That Hurt Profits: A Love Letter to Shareholder Value]]></title>
            <link>https://medium.com/@jumaochi1/price-cuts-that-hurt-profits-a-love-letter-to-shareholder-value-e71efef5bed3?source=rss-bf3c092a1c10------2</link>
            <guid isPermaLink="false">https://medium.com/p/e71efef5bed3</guid>
            <category><![CDATA[tech-humor]]></category>
            <category><![CDATA[storytelling]]></category>
            <category><![CDATA[pricing-strategy]]></category>
            <category><![CDATA[business-intelligence]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Victor Juma]]></dc:creator>
            <pubDate>Sat, 26 Apr 2025 01:19:30 GMT</pubDate>
            <atom:updated>2026-02-17T13:11:35.385Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*NWND-cnPaFQeWwSvAbzHSA.jpeg" /></figure><p>Really caught your attention there, didn’t I?</p><p>Well, in a world where nothing matters more than shareholder value okay, maybe the Trump–China tariff standoff mattered a bit more at some point (at least before one of them gets gutsy enough to hit the red button and wipe out competition). Perfect competitive strategy, really. No local manufacturers to protect if they’re all gone. Just kidding haha, sort of.</p><p>Anyway, in a world where online retail rules the roost, Amazon stands tall, flexing a delivery network that could probably ship your feelings if they had a SKU for it. I heard they recently delivered Katy Perry to space. Unfortunately, the order was returned, haha.</p><p>So my curiosity got the better of me. I wanted to know: how much are everyday salespeople making Amazon? Are discounts helping or hurting profits? And in a world where impulse buying is easier than breathing, can we actually decode regional pricing behavior?</p><p>This is the story of a pricing analytics pipeline built from scratch that follows the money, the losses, and the over-discounting sins. A dashboard built not just to look good, but to whisper sweet nothings to CFOs everywhere.</p><p>So my curiosity peeked, and I decided to get my hands on some Amazon sales data you know, for science. Turns out, getting that data was harder than stealing a dragon’s egg. Or whatever the data equivalent is. A public API? Who knows. Web scraping? Meh. Let’s just say Jeff doesn’t exactly leave the warehouse doors open.</p><p>And sure, I’m not yet an Amazon insider (despite my very reasonable offer to make them millions), but you’d think someone out there would want to help build better analytics tools, right? Apparently not. People really don’t want better. lol.</p><p>Anyway, enter Kaggle the ultimate data warehouse, bless the founders. Wait, who is the founder of Kaggle? Had to consult google here. Shoutout to<strong> Ben Hamner</strong> and A<strong>nthony Goldbloom</strong>, may your servers never crash.</p><p>That’s where I stumbled upon a dataset uploaded by an absolute legend, <strong>Rahul Jangid</strong>. 5,000+ rows of pure speculative gold. Okay, sure, we both know Bezos moves that in like a slow Tuesday afternoon, but for a demo project, this was just enough juice to simulate the real thing.</p><p>Ideally, this kind of data would be piped straight from a data warehouse or lake, using tools like Snowflake, BigQuery, or Redshift — maybe even synced via Airbyte or Stitch, modeled through dbt, and analyzed in Looker. But this isn’t a Fortune 500 company (yet), it’s a solo data cowboy operation. And with just a CSV file and a dream, I got to work.</p><p>Shoutout again to Rahul, open-source heroes, and the internet for connecting total strangers to build something better. Armed with that dataset, I was ready to build a pricing analytics tool the likes of which finance bros and SaaS startups dream about during investor calls.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*AeCsidkBU82-hqg-mLKibg.gif" /></figure><h3>Building the Pipeline: From CSVs to Shareholder Nirvana</h3><p>Once I had the data, the real fun began. And by fun, I mean… installing 11 dependencies and debugging a psycopg2 error at 1 AM. Classic.</p><p>But here’s how the full analytics pipeline shaped up:</p><h4>The Tech Stack</h4><blockquote>aka: Tools I used to build something Wall Street would pay millions for… if they only knew.</blockquote><ul><li><strong>Data Storage</strong>: Supabase (PostgreSQL in the cloud, because I’m classy like that)</li><li><strong>ETL Scripts</strong>: Custom Python scripts for cleaning and formatting shoutout to pandas for not falling apart.</li><li><strong>SQL Modeling</strong>: Views on views on views, built modular SQL models for segmentation, loss analysis, pricing metrics, and more.</li><li><strong>Experimentation</strong>: Jupyter notebooks with regression experiments, clustering, and simulation logic. Like a digital lab coat.</li><li><strong>Dashboard</strong>: Streamlit app because I believe stakeholders should see insights before their next coffee.</li><li><strong>Deployment</strong>: Streamlit Cloud, secured with Supabase creds via secrets.toml. No leaky passwords, just vibes.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*A3F-v6NotGGE1hjkf6UyeA.gif" /></figure><h3>SQL Modeling: Where the Magic Happens</h3><p>This wasn’t just a couple of joins and a GROUP BY. No sir. This was a <em>strategic orchestration</em> of SQL views each one answering a core business question that has probably haunted Amazon board meetings.</p><p>Core Views:</p><ul><li>order_loss_analysis — What’s slipping through the cracks? Let’s talk about those unfulfilled orders.</li><li>product_pricing_metric — Price sensitivity metrics by category and region. Aka, where discounts actually matter.</li><li>region_behaviour_matrix — Customer discount response by geography. You know, for when Europe wants deals and Asia just wants cheaper.</li><li>clv_by_segments — Lifetime value by customer cluster.</li><li>salesperson_summary — Performance league tables for your inner fantasy sales league.</li><li>discount_impact_analysis — Profit vs discount deep dive. When &quot;30% off&quot; becomes &quot;shareholder lawsuit&quot;.</li><li>what_if_simulation_value_results — My absolute favorite test new prices without needing to, in the words of the wise(Hii ni muijiza).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_jeh_WSLwlM69TeX2lWipw.png" /></figure><p>“Asia likes Cheaper, Europe loves luxury— and North America really loves toys for some reason, beats me!”</p><h3>Bash Scripts &amp; Automation: Because Manual Work is a Crime</h3><p>You didn’t think I was running ETL or those SQL views one by one, did you?</p><p>I built a db_views.py utility that auto-renders all views from SQL files to PostgreSQL. It’s cleaner than most corporate codebases and runs with a single line:</p><pre>./main.sh</pre><p>This main script:</p><ul><li>Loads tables</li><li>Refreshes SQL views</li><li>Logs output</li><li>Keeps the pipeline honest</li></ul><p>-This was followed by the beautifull data dump to Supabase that would be our cloud PostgreSQL. So our Streamlit could access all our tables &amp; views ofcos. Supabase is actually really cool</p><h3>The Dashboard: Streamlit but I made It Cool</h3><p>This dashboard didn’t just answer questions — it <em>anticipated them</em>. It spoke the language of CFOs and product managers. Some might say it whispered sweet nothings in SQL.</p><p>Key Sections:</p><p><strong>Overview &amp; Executive Summary</strong><br> High-level KPIs and how much revenue was lost to uncompleted orders. Spoiler: A lot.</p><p><strong>Price Sensitivity</strong><br> Insights by region and category. Know when to slash prices, and when to just… don’t.</p><p><strong>Discount Effectiveness</strong><br> Who knew that 10% off could make or break your bottom line? You, now.</p><p><strong>Salespeople Performance</strong><br> Celebrate your top performers. Fire the ones giving away the store.</p><p><strong>What-If Simulation</strong><br> Run new pricing scenarios, measure revenue outcomes. Like a sandbox for your CFO’s dreams.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P7oq1LraOFwUNhuGWg8RVA.png" /><figcaption>Warning: Side effects of this dashboard may include improved margins and smug grins in finance meetings.</figcaption></figure><h3>The Big Reveal: What Did We Learn?</h3><blockquote><em>TL;DR: Discounts aren’t always your friend, salespeople matter more than you think, and simulations are your new pricing crystal ball.</em></blockquote><h4>Some Important Insights</h4><p><strong>Price-Sensitive Regions</strong>: Beauty in Asia, Toys in Europe, those customers are <em>very</em> responsive to discounts.</p><p><strong>Optimal Discounting</strong>: Low-discount orders earned the highest margins. High-discount ones? Felt cute, with nothing more to it.</p><h3>The Sign-Off: In Dashboards We Trust</h3><p>So there you have it, a full-blown pricing analytics pipeline built from open-source gold, duct-taped together with Bash, SQL, Python, and delusions of corporate grandeur.</p><p>If this doesn’t get amazon to hire me, at least I’ll know I made something that would make a shareholder somewhere whisper, <em>“now that’s EBITDA magic.”</em></p><p>This is <strong>Version 0.0.1</strong> — which in software terms means: it works, it’s mostly not broken, and it’s one cup of coffee away from being amazing. Contributions, ideas, memes, performance improvements, bug reports, or existential questions about pricing are all welcome.</p><h3>Try the Live App</h3><p><a href="https://pricinganalyticspipeline.streamlit.app/">https://pricinganalyticspipeline.streamlit.app/</a></p><p>Whether you’re a recruiter, a fellow data nerd, or just someone who appreciates the art of not giving away 30% discounts like candy this one’s for you.</p><p><em>Built with caffeine, sarcasm, and a deep love for shareholder value.</em><br>xoxo,<br><strong>The Data Whisperer</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e71efef5bed3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Robust Voting Platform]]></title>
            <link>https://medium.com/@jumaochi1/a-robust-voting-platform-193f220ed41b?source=rss-bf3c092a1c10------2</link>
            <guid isPermaLink="false">https://medium.com/p/193f220ed41b</guid>
            <dc:creator><![CDATA[Victor Juma]]></dc:creator>
            <pubDate>Fri, 13 Jan 2023 13:55:58 GMT</pubDate>
            <atom:updated>2023-01-13T13:55:58.926Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RkJt86yCViUmt5IVuHwRTQ.png" /><figcaption>VoteChain23</figcaption></figure><p>VoteChain is an online, blockchain voting platform with the goal of increasing the credibility of democracy and making voting available from home. For a new-be like me this was quite an ambitious task. But I was highly motivated and ready for the task ahead. The system employs “Blockchain” technology a disruptive technology of the current era and promises to improve the overall resilience of e-voting systems. That is being able to achieve an end-to-end verifiable e-voting scheme.</p><p>This being my first portfolio project I was privileged to work with <a href="https://medium.com/u/93fa7ca7ebc3">Elisha Mbadi</a> who helped me fill in the various gaps in my knowledge with regards to blockchain, and who was my project partner going into this. Having come from an election year we noticed the process was faced with various problems and was very expensive. Our points of interest was enabling a secure and credible election that is verifiable with the use of blockchain, Ensuring ease of practicing democratic right by enabling voting from home and increasing reach by ussd integration, and Proper transmission and real time view of the election promoting trust from all players.</p><p>From the onset we wanted to be able to produce a system that would be credible so we embarked on a learning and long research journey. After a few days we met and set out our architecture and the various technologies that we intended to use. For the frontend, we settled on HTML5, CSS3 and Javascript assisted by Jinja’s Templating Engine, for the backend, we chose to use Flask a low weight python framework for the client side of our application and Node.js for the server or API side. The Nodejs API would interface with our blockchain service. As for our data, we used a blockchain and a regular database. The choice of which blockchain to use required a lot of iteration, moving from Ethereum to Hyperledger Fabric, we eventually settled on Hyperledger Sawtooth.</p><p>Yes this was quite a lot to learn and required a lot of dedication. We concurred this would give us a simple transaction based platform on which to build from. The Hyperledger Sawtooth application was hosted o docker containers. And finally for the database we opted for a <strong>non</strong>-<strong>relational database, </strong>MongoDB which was exposed through Mongoose to give us more flexibility in the data storage. Up until this point I had not worked with a non-relationship database. But this expanded my knowledge base and realised it was a suitable option since our data didn’t have strong relations.</p><p>We began with a simple MVP that could accept votes and we built on that over time. Some features we came up with are:</p><p>-The website is compatible with mobile. This was made possible using. Bootstrap and CSS media queries.</p><p>-The project can store unchangeable data in the blockchain, and the. blockchain data is open to everyone. The record was immutable unless a whole new election was created.</p><blockquote><strong>Architecture</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IXpEGUuVK3tUzjBy3LHx2A.png" /><figcaption>flow of data</figcaption></figure><p>All set we had our architecture laid out now came implementation. The beginning of our nightmare. We soon realised we had a steep learning curve with the blockchain, given our tight project timelines of having to build a Minimum Viable Product in a week. After our first review with our mentor we were distraught. He said the project was great but for a viable grade everything needed to work seamlessly. At this point we believed we were punching way beyond our weight.</p><p>In a desperate attempt with the team to run away and pick something some what simpler. I couldn’t help but remember the words of <strong>Fred Swaniker</strong> ring loud in my head. And I quote “<strong>The only way that we can justify privilege is by solving the world’s biggest problems, and by doing hard things.” </strong>o Anyway we had come so far to give up. We motivated each other and urged each other to focus on the work at hand, that it was doable, and we just had to figure it out. So we all agreed to push forward.</p><p>The blockchain we chose was relatively new and yet not quite well documented. It was like the documentation jumped from A to Z skipping letters in-between. This led to a steep learning curve where we had to learn to use the blockchain in a really short time. Most online articles proved to be shorter than expected, and didn’t give a deep-dive into the transactions, batches, hashing and consensus algorithms. Fortunately, we were able to find a few online teachers who gave us a step-by-step walk-through, which enabled our team to finally build our chain! From that point, it was just querying the Node.js API endpoint to get and send our data.</p><p><strong>Pushing the limits</strong></p><p>This has to be one of the most intense projects Iv worked on given the strict and short deadlines in the project. Notwithstanding, I believe I gained way much more for instance learning nodejs and the use of the various modules and the various tools it gave us access to for instance express. And yeah I thought it was a javascript framework just like flask is for python. Yeah noob awards go to me, lol! Apparently Node.js runs JavaScript code on the server side using just-in-time compilation. While some call Node.js a framework, it’s not accurate. The purpose of a framework is to provide a programmer with a set of reusable tools to speed up development. No, it’s a JavaScript runtime that gives us access to frameworks such as express. Pretty cool.</p><p>And yes, it goes without mentioning blockchain proved to be quit an interesting technology. All this was made quite easy with the help of sawtooth. Hyperledger Sawtooth is an open source enterprise blockchain-as-a-service platform that can run customized smart contracts without needing to know the underlying design of the core system. Hyperledger Sawtooth segregates the core ledger system from the application specific environment, thereby simplifying the application development yet keeping the system safe and secure. Using this architecture, a developer can build applications in their programming language of choice that can be hosted, operated, and run on the system periphery without interfering with the core blockchain system.</p><p>All in all I learned that dedication and commitment to a task goes a long way. Evenn when it seems impossible. Even when things seem to be falling apart their is always a glimmer of hope. Key takeways throughout the process was that resilience and teamwork goes a long way.</p><p>My name is Victor Juma a Software Engineer, writer and SRE enthusiast and creator . I also enjoy music and play rugby and the guitar from time to time.</p><p>Github : <a href="https://github.com/JumaOchi/VoteChain23">https://github.com/JumaOchi/VoteChain23</a></p><p>Linked In : <a href="https://www.linkedin.com/in/victor-juma-837034185">https://www.linkedin.com/in/victor-juma-837034185</a></p><p>Landing Page : <a href="https://github.com/JumaOchi/VoteChain23.github.io">https://github.com/JumaOchi/VoteChain23.github.io</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=193f220ed41b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>