Proper Programming Practices
Roche, MCSD, MCSE, MVP
Roche & Associates, LLC
If you've coded that routine once, you've
written it a million times. But are you doing it right? In 15 years
of xBase development, much of it as a consultant, Ted has seen (and
done) nearly every mistake that can be done. This session covers
Ted's Top Ten Developer Mistakes, ideas on development methodologies
that improve code quality, and resources on testing, coding tools,
peer-to-peer support, and books, articles and web sites worth keeping
up with in order to improve your programming.
You can never
know it all. In hanging out with many top-notch developers over the
year, there is one consistent topic of conversation I hear over and
over again: something new the developer has just learned. It may be a
new notation for object-oriented design, a new book on database
normalization, or a new web site on component development, but the
lesson is clear: the best developers recognize the need for
continuing, on-going education.
Books, magazines, journals, forum
Check out the book lists on Hentzewerke.com or
StevenBlack.com for nearly every book I would recommend. There are
new books coming out all of the time – watch web sites and
magazines to find out about new ones.
There are many magazines you should consider.
Industry specific magazines, such as FoxPro Advisor, FoxTalk, UT
Magazine, and CoDE, are required to stay up on what is happending in
the FoxPro world. Consider also more general magazines such as
Software Development, Dr. Dobb’s Journal (www.ddj.com)
or general computer magazines such as PC Magazine.
An online presence is nearly required to keep up
with everything going on. Consider the FoxPro Wiki
the Virtual Fox User Group (www.vfug.com)
and the latest entry, FoxCentral (http://www.foxcentral.net).
Certifications: Microsoft, ICCP
Certifications can serve many purposes. You can
use them to self-validate your level of learning, You may need them
in your work environment to establish standards for your workers.
Some programs you get involved with, such as the Microsoft Solution
Provider program, may require a certain level of certification. And,
finally, you can use a certification as a marketing advantage over
competitors who lack the certification.
Degree programs can offer similar advantages to an
industry-specific certification, with the added benefit of being
recognized outside of that industry, as well.
Lawyers, doctors, nurses, EEs, plumbers and other
professionals have regulated CE – it’s coming.
In light of the many security problems that have
occurred because of programming glitches, and a growing body of
evidence that failing to follow commonly accepted practices of good
software development leads to expensive and sometimes dangerous
failures, it is likely that governments will consider starting to
regulate or license the practive of software development. If you have
already started a program of continuing education, and have achieved
industry certification or a university degree, it is possible that
you can be “grandfathered” into the program without as
much effort as someone who had not documented their educational
What’s Out There?
It’s impossible to keep track of everything
going on the software development world. Here are a few items that
have really caught my attention over the past year.
Extreme Programming (“XP”) comes from
a zealous group of Smalltalk programmers, who have spent nearly 10
years refining a methodology.
Kent Beck is the ringleader of a group of
programmers who developed a major software application for Chrysler
Corporation. These programmers have gone on to write a half-dozen
books for Addison-Wesley with the “XP” logo.
Small, short, measurable iterations
Minimal upfront design
All developers own all code
Unit test, integrate and test each piece
Two programmers to a keyboard
Martin Fowler (also the XP gang)
Martin Fowler was also a member of the C3 project
at Chrysler, and contributes to some of the Addison-Wesley books. In
addition, his own book, “Refactoring” is the equivalent
of design patterns for performaing maintenance on existing OOP code.
The idea is that there are ways to “refactor” –
modify, merge, rename, reassign – method code that works, and
there are other ways that are problematic. This book covers the most
common pattersns, when they apply, the problems they can cause, and
the step-by-step instructions of how to start with working code,
taking small steps to convert it, testing along the way, and ending
up with better, more reliable working code.
A catalog of patterns
These patterns describe transformations to
objects and interfaces for more efficient and bug-free usage
The Agile Alliance
Alliance was a great excuse for a business expense. Held 11-13 Feb
2000, at Snowbird Lodge, in Utah, US, leaders in the development
disciplines for many of the major methodologies came together and set
forth these declarations:
Manifesto for Agile Software
We are uncovering better ways of developing
by doing it and helping others do it.
Through this work we have
come to value:
Individuals and interactions over
processes and tools
Working software over
collaboration over contract negotiation
Responding to change over
following a plan
That is, while there is value in the items on
right, we value the items on the left more.
Robert C. Martin
© 2001, the above signatories
may be freely copied in any form,
but only in its entirety
through this notice.
C2.com is the
Original Wiki. What’s a Wiki? A Wiki is a web site with a
clever piece of software, often a database and versioning repository,
that allows visitors to the web site to change the content. As an
interactive web-based bulletin board system, in the hands of the
right community, a wiki can develop phenomenal collections of
knowledge and wisdom. An entire community can capture its knowledge
and wisdom on a web site! Cunningham & Cunningham are the two C’s
in the web domain. This wiki has tons of material on programming,
Extreme Programming, links to great sites on patterns, wiki software
and many other topics.
is nothing new, and the term Unit Testing has been around for many
years as a description of testing individual modules. Unit Testing,
as used in XP involves a framework that can support test each or all
units. The key with XP is that you write the tests first, then
the code. In the process of writing the tests, you discover all the
“What if…” cases rather than when you are writing
code. When you have completed developing your modules and it passes
your unit tests, you integrate your tests into the main testing
matrix, and then integrate your code into the main code stream. By
having a machine set aside to do this integration, you can
immediately test then you can use all tests to verify your code
didn’t break something else
Monolithic apps are rare
Components require more care in design of
QA techniques: review, walk-through,
Effects of scale on quality
Putting It All Together
Read The Fine Manuals
VFP Manuals are among the best in Microsoft!
The Help file is huge!
There are many fine 3rd party
Check out the magazines – Foxtalk,FPA,
99% of the questions answered on the forums
come right out of one of these sources
Be One With The Fox
you choose to ride the tiger,
you must go where the tiger goes
Learn the FoxPro Way of coding
Get A Support Group
How many have solved a problem by explaining
it to someone else?
On-line forums: UT, CompuServe, FoxForum.com
Newsgroups: Microsoft and uunet
User Groups: monthly, free (or cheap),
Sharpen The Saw
None of us know it all (except maybe Calvin)
Improve your development and consulting
Reading books (in
and out of the industry)
Top Ten Mistakes
It ran fine on my system!
It worked great with ten records!
I could write that in a week!
We’re just converting an existing
system – two weeks, maybe four weeks, max!
Our situation is unique…
Top Ten Mistakes
We don’t have time to document it now…
I know how the system should work…
Upper management has no idea what we do.
But, what if….
Those who fail to learn from the past…
… will be past by those of us who have!
Continuing education ensures continued
New tools and methods help improve coding
Quality improvements required for