Basic Programming Principles
Using The Language Effectively: RAMP Programming Principles
I will be teaching you the Python programming language in these tutorials. However, the language is merely a tool used to develop a product. I don’t want you to come away thinking of the “Python-y” way of doing things. Instead, I want for you to understand principles of programming that you can take with you to other languages as well. We will delve into the meat and potatoes of programming ideas in the next section of these tutorials, but before we begin I must show you the underlying principles of programming.
If you read this entire series and believe that using Python is the only way to ever code correctly, or that all languages should follow Python’s examples or constructs, then I think you should try reading over them again.
I believe in four principles of good programming that I hope to teach you throughout my series of tutorials. I call these the RAMP principles. These principles are general guidelines you should use in order to produce code that will give the desired results.
- Readability. The code you write should be easily readable by other programmers who understand the given programming language.
- Atomicity. Each section of code you write should perform only a single, predictable action.
- Modularity. The code you write should be logically divided into sections that can be easily reused.
- Portability. When writing code, keep in mind the possibility that it could be extended to other platforms or uses.
Honorable Mention: Graceful and Standard.
Lets continue on using our movie script analogy. These four principles can be easily understood if you look at them from this angle.