Like a lot of people I have an affection for lists that condense a lot of wisdom into a brief set of statements or items. Some time ago I wrote a series of posts on Programming Proverbs for example. That list (reproduced at the bottom of this post) came from a book that was every influential to me, especially early in my career. Each proverb by it self said a lot but mostly to someone who all ready know something about the topic. The original book had a sort of chapter on each proverb and did a wonderful job of elaboration and explanation. My series of blog posts was a couple of paragraphs on each from my own experience. Why do I bring tis up now? Well I found a couple of other posts of somewhat similar “proverbs” if you will. I thought I would share them with you and perhaps suggest a look at my own series in case you missed it the first time around.
The first is “The Two Things about Computer Programming” a couple of years old but still quite relevant. Plus it is new to me so maybe it is new to you as well. Read the whole post for the explanation of “Two Things” but the Two Things about Computer Science and the Two Things about Software Engineering given are:
Computer Programming:
- Every problem can be solved by breaking it up into a series of smaller problems.
- The computer will always do exactly what you tell it to.
Software Engineering:
- Writing the code is the easy part. Writing it so someone else can understand it later is the important part.
- Make it work, then make it elegant, then make it fast.
I’m not sure these are the end all and be all and I have a mind to explore them at some length one of these days. But I thought they were worth sharing in “raw form” to see if I can get some conversation going. Are these right? Are there two more important things? Is it even helpful to have the computer programming and software engineering divide?
The other post is 20/20: Top 20 Programming Lessons I've Learned in 20 Years subtitled “This post could be viewed as hard lessons learned for newly graduated college students, entry-level programmers, or advanced developers who just want a chuckle.” Also not a new post but I just discovered it. There are some 60+ comments which may add value as well. I like this list although, as with many such lists, I’m not sure all of them would be on my top 20. But then each individual has a different experience and a different idea of what key learning's are.
The Programming Proverbs I wrote about with a link to each post is here:
- Define the problem completely
- Think first, Program later
- Use the top-down approach
- Beware other approaches
- Construct the program in logical units
- Use procedures {methods}
- Avoid unnecessary GOTO's
- Avoid side effects
- Get the syntax correct now, not later
- Use good mnemonic names
- Use intermediate variables properly
- Leave loop variables alone
- Do not recompute constants within a loop
- Avoid implementation-dependent features
- Avoid tricks
- Build in debugging techniques
- Never assume the computer assumes anything
- Use comments
- Prettyprint - format your code so that it looks nice
- Provide good documentation
- Hand-check the program before running it
- Get the program correct before trying to provide good output
- When the program is correct, produce good output
- Re-read the manual
- Consider another language
- Don't be afraid to start over
No comments:
Post a Comment