I’m on my development walkabout and it’s been eye-opening.
Even though I’ve preached and argued this point myself, I’ve found myself repeatedly violating it as I build my application.
Here’s the core of my experience: I’m building an app of my own design and I have ideas for what it might do in the future. When I go to create the very first iteration of some part of it I have to figure out what’s required for the bare minimum. It is so incredibly tempting to use my knowledge of my future plans to inform those decisions. While that knowledge might keep me from making a terrible mistake, more frequently it leads me to create attributes, variables, and methods that I don’t need yet, but that I know I’ll need.
It takes discipline and effort to do the bare minimum. It isn’t a desire to do more work that leads me to over-engineer, but rather a desire to save myself effort in the future.
Of course, even in the short time I’ve been working on this app, I’ve learned so much and drastically refactored significant chunks of it. That refactoring is easier when what is being refactored is simpler. The more complexity I’ve built up the more I have to think through in order to replace it.
I certainly won’t keep my API call as static and hard-coded as it is now, but rather than predicting now how I’ll construct it when I start supporting different cities, etc. (which I did), I should trust my future self to be smarter and better able to figure out the best way to construct the call to accomplish what I need.