1 - First and Foremost - Do code walkthroughs !
If you care at all about good programming, walk through your code with another programmer.
I was a supervisor and project manager for twenty years and the worst problem that a programmer can have is to be unwilling to expose and explain (and document) his or her code. The tragedy is that some of the best and most brilliant programmers are the least willing to do this. But the failure to do it is the "kiss of death" for quality programming no matter how brilliant the programmer is.
My initial program, after all, did work. The first clue that something might be wrong came from an independent review by another programmer.
2 - Know the fundamentals.
Subjects like symbolic logic, hex and binary calculation, and the fundamental properties of data types are sometimes thought of as "bor-ing" by today's object oriented and visual programmers. I think they're still critical knowledge that every professional programmer should know. If you agree or disagree, I'd like to know. Drop a message into the Forum!
3 - Not every problem is a nail.
A favorite maxim of mine is, "When you only have a hammer, every problem looks like a nail." For the solution to this one, see rules one and two.
4 - Test, test, test. And when you're through, test some more.
In this example, we found errors in Microsoft documentation, inconsistencies in VB, and a few things that I didn't understand well enough. Even my friend missed a few things that were actually found in testing.
5 - Move up to VB .NET !
My friend, a hard core "bits and bytes" sort of guy anyway, isn't completely on board with the need to move up to VB .NET. But most of the problems encountered here simply wouldn't have happened with .NET. I note that in the About Visual Basic VB .NET poll, the percentage of people voting for VB 6 is still over half, but it's starting to drop.
All in good time, my friend and other VB 6 programmers will see the light!
First page >
Calculating a Contrasting Color Code > Page
1,
2,
3,
4
5,
6,
7