Programming Guidelines for Newbies
Programming is not a task to be taken lightly. Programming consists of logical thinking, workingthrough bugs and series of algorithms working together. In "Programming Guidelines for Newbies," you will learn simple techniques that have been aquired by me throughout the time I have been programming (6 years now). These guidlines for programming that will be layed out for you would of helped greatly when I started out programming. Self teaching programming is not as easy as it sounds and is very intuitive. Once you are ready to learn programming read on.
Picking a Language
Object Oriented Programming
Every language has many different types of programming. Languages such as PHP, ASP, and Visual Basic to name a few use the power of Object Oriented Programming to provide security and ease of use. Object Oriented Programming is a tough concept to learn. Perhaps it is best described in baking a cookie. You have a recipe for baking a cookie, this is essentially the class in Object Oriented Programming. With this recipe contains ingredients and instructions. The ingredients are Properties. In order for code to be ran variables and properties have to help guide the program in the right direction. The instructions are functions that help provide the directions for the cookie.
In our recipe our properties will be as follows: Chocolate Chips (yes or no), Butter (1/4Tbps), and Flour (2 cups). Notice how Chocolate Chips is a Boolean (true/false) meaning they will be present in our cookies or they will not be present in our cookies. Now that we have the properties set for our class using Object Oriented Programming, we need to define the functions or directions. The directions for baking the cookies will be as follows: Combine Ingredients, Stir Ingredients, Add Chocolate Chips, Prepare Pan, Place Cookie Dough on Pan, Bake Cookies.
With the guidance of our functions/directions we can now create our very own batch of cookies. First we will need to create a new instance of the cookie class. Now that a new instance of the cookie class is instantiated we define our ingredients. Once all of our ingredients are defined we follow the directions, or call the functions as our directions can also be called. After going in the right order we will end up with a perfect batch of cookies created by you using Object Oriented Programming.
Do not feel discouraged if Object Oriented Programming is jibberish. Learning Object Oriented Programming has taken me about 2 years to get down solid and yet Object Oriented Programming still confuses me to this day.
Non-Object Oriented Programming
Although Object Oriented Programming is very secure, reliable, and can make programming easier once learned, Object Oriented Programming is probably not the best way to learn programming for a newbie. Creating basic statements such as If/Else and Loops will perhaps plant the starting grounds of your programming expierence.
If statements are just as they sound, If bob likes apples then bob eats apples. Simple enough. Since bob likes apples he will eat them. Although bob may not like apples, this is where the else comes into play. If bob likes apples then bob eats apples else bob hits apples with a baseball bat. Essentially if bob really does not like apples we give him an alternate to eating the apples, hitting them with a baseball bat. Writing out code is a lot simpler than writing code in a programming language. Namely because every programming language has different syntax and ways of processing code. A very good strategy before you write code is to plan out what you will be doing. Write out some of the code and figure out the usage. Once that part of the programming is planned out you should breeze right through the coding.
Aside from If/Else statements there are Loops. Loops are exactly how they sound, loops loop. The great idea behind loops in programming is the fact that the user decides how many times the loop goes around. The main types of loops are While, DoWhile, For, and Foreach. An example of a While loop is While the time of day is daytime write daytime end while. This will write daytime until nighttime finally approaches. Loops need to be handled with care as creating an infinate loop is very easy to do and will crash your program. Do not get discouraged if you create an infinate loop. To this day I will sometimes create an infinate loop while programming. The best way to avoid them is to examine your code logically and say, "Is there a way for this loop to come to an end." If you answer is no, than an infinate loop is inevitable.
Functions are programming's babies. Without functions almost every main software, website, or code would not function properly. Functions are very useful in many ways. Functions can reduce repetitive code, increase programs speed, and make for ease of programming. Functions can be very simple or complex in programming. An example of a function is: function displayHello() when this function will be called the code inside of it says "print hello" which will print "hello" to the screen. The example provided above is a simple example of a function. Functions are a technique that must be learned to advanced in the programming world.
The Programming Guidelines for Newbies is a breif guide about certain aspects of programming and programming langauges. The programming for newbies guide is to be used as an accessory to helping a person understand complex aspects of certain programming languages. As always I am willing to help anybody out just contat me in some way or form. Comments are welcomed and apperciated. Thank you.
Denver CO Blog
Programming Guidelines for Newbies