Re: What could one do every day to get him motivated to code
Posted: Sat Oct 06, 2012 5:26 pm
Programming's Ten Commandments
Many years ago, I condensed an article found in 'Inside Visual Basic' by Scott Lewis , you may find it interesting...
Create A Code Blueprint
Outline what it is you are trying to accomplish. Take out a pen, draw some forms, and write some of the major functions and procedures you'll need. (Look to see if you have some of this code already written!) This will speed up your program development and the resulting code will be better organized.
Let Your Editor Help You
Require all variables be declared and assure your editor's other features are enabled.
Establish Naming Conventions
Create a list of naming conventions and use them. Debugging will be much easier.
Comment Your Code
Compilers don't include comments, so programs remain small, but well commented code is much easier to debug and make sense of. Comment on specific lines to assure comprehension. Don't assume the reader will be able to make sense of it, especially if they didn't write it.
Write It Once
Create routines of generic code and call them as required, rather than re-writing the same code again and again. This will also minimize errors and make modifications easy as this will be done only in one place, instead of scattered through out your code. One day you will have a large 'arsenal' of routines at your disposal.
Use 3rd Party Enhancements
If some other software can help, use it. (e.g. HTML Help) Don't be a re-inventor. Usually they specialize in an area you may not be familiar with and... purchased code is cheap, if you include your time and effort!
Check All Resources
Check out Internet sites, books, and sample code. Knowing where to find information can be your greatest asset.
Write for Your User
Don't get carried away with fancy pictures or technology. Users would rather have applications that are fast, make sense and follow common layouts and conventions.
Provide Intuitive Error Messages
Generic message boxes that don't help the user solve the problem are only a source of irritation. The best programs trap all common errors as well as some unexpected ones. They help describe a possible solution as well.
The Resume
The next time you start writing code, ask yourself if you would include this program and it's printed source code as an example of the work you are capable of producing. You'll be doing yourself a favor by writing a combination of functional and clean code.
Conclusion
Learning syntax is essential, but so is learning to program correctly. By following these simple, yet powerful rules, you can take your program development skills to a higher level.
Many years ago, I condensed an article found in 'Inside Visual Basic' by Scott Lewis , you may find it interesting...
Create A Code Blueprint
Outline what it is you are trying to accomplish. Take out a pen, draw some forms, and write some of the major functions and procedures you'll need. (Look to see if you have some of this code already written!) This will speed up your program development and the resulting code will be better organized.
Let Your Editor Help You
Require all variables be declared and assure your editor's other features are enabled.
Establish Naming Conventions
Create a list of naming conventions and use them. Debugging will be much easier.
Comment Your Code
Compilers don't include comments, so programs remain small, but well commented code is much easier to debug and make sense of. Comment on specific lines to assure comprehension. Don't assume the reader will be able to make sense of it, especially if they didn't write it.
Write It Once
Create routines of generic code and call them as required, rather than re-writing the same code again and again. This will also minimize errors and make modifications easy as this will be done only in one place, instead of scattered through out your code. One day you will have a large 'arsenal' of routines at your disposal.
Use 3rd Party Enhancements
If some other software can help, use it. (e.g. HTML Help) Don't be a re-inventor. Usually they specialize in an area you may not be familiar with and... purchased code is cheap, if you include your time and effort!
Check All Resources
Check out Internet sites, books, and sample code. Knowing where to find information can be your greatest asset.
Write for Your User
Don't get carried away with fancy pictures or technology. Users would rather have applications that are fast, make sense and follow common layouts and conventions.
Provide Intuitive Error Messages
Generic message boxes that don't help the user solve the problem are only a source of irritation. The best programs trap all common errors as well as some unexpected ones. They help describe a possible solution as well.
The Resume
The next time you start writing code, ask yourself if you would include this program and it's printed source code as an example of the work you are capable of producing. You'll be doing yourself a favor by writing a combination of functional and clean code.
Conclusion
Learning syntax is essential, but so is learning to program correctly. By following these simple, yet powerful rules, you can take your program development skills to a higher level.