Planning for the future doesn't mean getting the architecture right the first time, it just means being modular/layered, in such a way that you CAN refactor later, without having to rewrite the whole app from scratch. Which admittedly isn't obvious to solve, without experience under your velt.
No Stupid Questions (Developer Edition)
This is a place where you can ask any programming / topic related to the instance questions you want!
For a more general version of this concept check out !nostupidquestions@lemmy.world
Icon base by Lorc under CC BY 3.0 with modifications to add a gradient
This plus "keep it simple stupid" are 2 key things to keep in mind when writing a program. Going back to old code of mine can be painful when I didn't keep these key principals in mind/was too inexperienced.
Agree with the emphasis on modularity upfront, as it aligns with my YAGNI takeaway, start simple but layer cleanly for future refactors without a full rewrite. In my case, zero users meant no pressure for premature complexity, letting me ship fast and iterate based on actual needs. Experience definitely sharpens that balance. What's one modular pattern you'd recommend for a basic CRUD API?
Recently was tasked with building an interface to manipulate and work with a CSV file in bash. The interface would only be used by other programs and not a human user (although you could use it AS A human). Guess who coded an entire system do detect if a line in the file is broken and it even tries to recover the old data of the line to reset it. Will this ever be needs? Probably not except if some weird bitflips occur. Would it bite me in the ass if I didnt have it? Probably also no, because AS ling AS it does not happen on a regular basis the impact would be quite small, but impossible to track down without manually checking the entries.
I did not regret over engineering it (especially since it meant that I got way better at coding bash) and it did not change debugging/usage in any meaningful way. It would have saved me about 2 days or so if I wouldn't have done it, but now I'm glad I have it, because now it will probably be very hard to break this system.