Menu

What Broke, What Held: Three Bugs That Never Crashed My Farm App
📰

What Broke, What Held: Three Bugs That Never Crashed My Farm App

DEV Community: typescript·Jayant Bansal·9 days ago
#O41Ck0e3
#devtotypescript#devto#dev#server#wrong
Long article (998 words) — no AI summary yet.
Reading 0:00
15s threshold

I built ProFarm , a farm management app with a crop and soil guide, weather, market prices, and a planner for farms, crop cycles and tasks. The app started, the pages loaded and the features worked.

Then I went back through the project looking for things that were wrong without being broken, and I found three. None of them crashed anything or threw an error. Each one looked fine on screen, which is exactly why nothing ever pointed at them.

This post is about those three, how I proved each one with a test, and what I check first now.

Code: https://github.com/JayantBansal900/ProFarm-V2

Bug 1: The clock

The planner marks a task overdue when its due date is before "today". My first version got "today" from the server's clock. That is what everyone does, and it is wrong the moment your server and your users live in different timezones.

Servers usually run in UTC. The farms ProFarm is built for are in India, five and a half hours ahead.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.