February 22, 2008 @ 10:18 pm
There is no “right” or “wrong”
MySQL or Microsoft SQL Server? Should we use Factories in our code? What about static methods? What are the right answers?
As software developers, our goal is to produce working code that contributes to a software system or application. How we get to that working system could take many different paths. There is an infinite number of routes to that working software, and any number of decisions along the way could have gone the other way and you could still end up with working code. So how is it, that we can say that there is a right way and a wrong way to write some method, or there is a right and a wrong framework, or even a right and a wrong language for any task?
The answer is that there is no right or wrong way to do most any thing in software development. There is, however, a better way and a worse way. That is to say, there are some decisions that you make along the way that will make your software better, and some decisions that will make it worse?
Better how and worse in what way?
Better and worse are subjective terms, but generally “better” software is easier to maintain, preforms better, is easier to read and understand, more reliable, and improves upon all of the other software development goals. (By the way, cyclic dependencies hurt a software system’s goals read more…)
So whats the point? The next time you’re faced with making a decision, or learn of a decision that someone else has made, don’t judge the decision as right or wrong. Understand that both options, or many different options are all good solutions, but that some are better and some are worse fits for the software that is under discussion.
What does this mean for us at 72 Miles? Once we grasp this simple concept, we’re able to produce code faster, by not agonizing over every decision. No matter what decision is made, we are one step closer to a product that users can get their hands on, and after all, thats why we write the code. In the web applications that we write, most any aspect of any of our software can be refactored, removed, or replaced in the future, once an alternative is discovered. I think this is referred to as being agile.
So the question is, should we use factories in our code?
Filed under Software Development Permalink · 4 Comments »