[QUOTE=ratatoskK]
I don’t know Athena’s specific scenario, but I would bet she was told they’d be supporting multiple platforms, and she coded it that way, but then the company changed course for some reason. Or had a bad sales force, or had poor planning in upper management, etc. So that would just be an example of bad planning. If the plan was to support multiple platforms and it was NOT coded that way, and they went ahead with their plans, then there would be trouble!!!
On the other hand, if the plan was to just support one platform (and it was a reasonable and justified plan) then to design for multiple platforms would be a waste.
[/QUOTE]
Heh. I’ve never worked anywhere where those-who-are-in-charge were qualified to make that decision. Nope, that one goes down to the coders, who tend to go back to the old programming fact that One Should Always Plan On Changing DBs. As I’ve been the “One” who does the work on, lessee, at least three Very Large Projects, I can say that the number of times that I actually have seen the DB change is… never. And if they had wanted to change it, I can say with authority that It Won’t Work. Once you get away from the basics, you can’t expect a DB layer optimized for, say, SQL Server to just seamlessly work with Oracle, unless you don’t do anything but the most basic queries. And if you limit yourself to the most basic queries, your DB access time is going to be horrendous.
So it comes back to my original statement: for the first go-round, if you’re not, say, 90% sure you’re going to need whatever you’re writing to be generic, don’t make it generic. If it does turn out to need to be generic, take the time on the second iteration to make it generic. It’s usually not to big of a deal to do at that time, and you’ve more or less hedged your bets.
On the other hand, good coding practices are always necessary and they typically don’t take much longer than bad coding practices. Don’t use magic numbers. Don’t embed strings in your code if you can help it. Group things like DB access into logical components, don’t string them throughout your code. If it makes sense to make something into it’s own class (or library, or assembly, or whatever the appropriate container is called in your world), do it. Add comments to your code. Use variable names that mean something. If there’s a simple way to do it, do it that way; don’t obfuscate just because you can.
At least, that’s what I think is important…