Principios y tecnicas del programador
A Web Magazine for Software Developers
developer.*
A Web Magazine for Software Developers
Principled Programming
By Daniel Read Author’s note: This was the first essay about software development that I ever wrote, which was sometime in early 2001. I enjoyed writing it so much, that I decided to start the developer.* web site so that I could have a place to publish otherwritings. During the first two years of the site’s existence, “Principled Programming” was by far the most popular article. I had intentions at one time to expand to a list of about thirty principles, with the idea of collecting them into a book eventually. I still may do that someday. Looking back at these principles now, two years after writing them, I’m mostly happy with what I read. While I'mresisting the urge to do some re-writing on this one, I still agree 100% with the principles as stated, and hope that you’ll get something out of them.
The Principle of Personal Character
Whether we know it or not, and whether we like it or not, our character is reflected in every line of code we write, every report we design, every user interface we build, every diagram we produce. When anotherperson looks at our code—or just as important, the output of our code—that person, consciously or not, makes a judgment about us. Think back on code you have written…what would that judgment be? Would you be proud to stand up and take ownership of your code? Or would you have to sheepishly admit that it’s yours, and launch into excuses for why it’s not as good as it could be? If code is bad, thenanother developer reading that code is likely to assume that this poor quality is not an isolated event. The good news is this: we have absolute control over the quality of our code. The question is not about whether or not one has the ability to write the best code possible, but whether or not one cares to even try. If one lacks in certain abilities, but takes pains to write clear, readable, wellcommented code that at least shows that the developer has taken the time to learn some of the fundamentals, then that developer has done her due diligence—and that fact will be obvious to a keen observer. It would be unreasonable to fault a person for some level of inexperience, or ignorance of certain techniques. However, it is absolutely reasonable to find a connection between the overallquality of a developer’s code and the quality of that developer’s character. The Principle of Personal Character states: Write your code so that it reflects, or rises above, the best parts of your personal character.
The Principle of Aesthetics
DeveloperDotStar.com
2003 by the original author
Page 1 of 9
developer.*
A Web Magazine for Software Developers
One aspect of programmingin general we too often neglect is that of aesthetics. Aesthetics is about beauty and elegance, and the appreciation of these qualities. Many people, however, believe that aesthetics is only important when talking about art and literature. Too few people realize the importance of beauty and elegance in everyday things, and too few developers realize the importance of these in the writing of code.Aesthetics is especially important in software development, a realm where we are constantly dealing in layers of abstractions. The aesthetic aspects of our abstractions are directly related to their understandability, and therefore their usefulness. A developer should strive for beauty, no matter what tool or language he or she is using. Beauty can be achieved on many levels, from the high levelof the overall elegance of a system design to the lowest level of the visual appearance of code on the screen. Neatness counts. The best code not only works efficiently and correctly, and is well formed from the compiler's point of view, but the best code is also visually pleasing to the human eye—and therefore easier for the human brain to absorb and understand. Steve McConnell writes in Code...
Regístrate para leer el documento completo.