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.…