📦 Ship to Production — app9.1
Developer CourseModule 9: Ship to Productionapp9.1
Reading8 min

The Difference Between a Demo and a Product

📦 Module 9: Ship to Production

The Difference Between a Demo and a Product

You built an app. It works on your laptop. You showed it to your manager. Everyone clapped.

Now try running it at 3am on a Tuesday when the network drops, the API returns a 429, and nobody is awake.

That is the difference between a demo and a product.

The 5 Things That Break in Production

Every energy app that goes from sandbox to production hits the same 5 walls:

#What BreaksWhy It BreaksHow to Fix It
1Network timeoutsThe site's firewall drops idle TCP connections after 60sSet connect/read timeouts. Retry with exponential backoff.
2Rate limitsYou loop 500 assets with no delay and get 429s for 60 secondsRespect rate limits. Add 100ms delays between calls. Batch where possible.
3Stale tokensYour JWT expires mid-run at 4amRefresh tokens automatically before expiry. Never cache tokens for more than 30 minutes.
4Unhandled errorsA single bad meter reading crashes your entire scriptWrap every API call in try/except. Log the error. Continue processing the next asset.
5Silent failuresThe script runs but stops writing data. Nobody notices for 3 days.Add a /health endpoint. Monitor it. Alert when it stops responding.

The Production Mindset

Demo code asks: "Does it work?"

Production code asks: "What happens when it doesn't?"

# Demo code
response = client.read_meter(asset_id=1)
print(response)

# Production code
for attempt in range(3):
    try:
        response = client.read_meter(asset_id=1)
        logger.info("meter_read", asset_id=1, kwh=response["kwh"])
        break
    except Exception as e:
        logger.warning("meter_read_failed", asset_id=1, attempt=attempt, error=str(e))
        time.sleep(2 ** attempt)

Three retries. Structured logging. Exponential backoff. That is production code.

Log in to track your progress and earn certifications.