Beginner's Guide to Programming - guidetoprogramming.com

  • Increase font size
  • Default font size
  • Decrease font size

How does it work?

You don’t need to know this stuff in order to start writing programs, but if you would like an idea what is going to go on behind the scenes, read on.

If you are going to write full fledged programs in a language like Visual Basic, C, C++ or Java, you are writing in what is called a high level language. This is language that is created to read in easily understandable usage and formatting, although you may not think so at first! When you compile the program, the compiler first checks to make sure you follow the structure and rules of the language. After that, the program you wrote is broken down into machine code that can be read by the computer. Essentially, machine code is what you may have seen referred to in the past as binary code – numbers like “00101101”. Everything you write is broken down to its base level - sets of zeros and ones that can be understood by the end machine.

If you are writing in a web formatting language like HTML or web scripting language like PHP, the process is a little different. Ultimately everything is still broken down into machine code so the processor can interpret it, but you are using a script rather than a full fledged compiled programming language. The script is run through the interpreter at the time the script is called, and translated into results on the browser screen. It is never compiled, rather it is a set of commands the browser is prepared to deal with when it is called.

Stuff you don’t really need to know at this point, but you might find interesting:

 

There are two main design processes languages use today : Functional/algorithm based and Object Oriented.

Functional program design was the standard for many years, and even today most things can be accomplished using a simple functional approach. The functional approach can be thought of this way: Ok, I have some data here. Do step one. Ok, do step two. Do I need to go to step three or four? Ok, go to step four. On and on until the program execution is completed. Sounds logical, eh? It is still the way I find easiest to understand programming for the beginner.

Objected oriented programming (OOP) is considered the new paradigm in program design. C++ and Java are both objected oriented languages, though you can still use them as functional languages. We don’t think learning object oriented design should be a priority for the beginner – this site is designed to get you where you want to go with minimal confusion, and trying to understand OOP is frankly quite confusing for the beginner. After the beginner understands functional programming and how it works, then perhaps trying to learn OOP and its benefits are justified. Frankly, most people never need to get that far to do what they want. If you have the intellectual curiosity, or the career need, you will continue on a course to OOP, otherwise it will just stall your progress in writing working programs that are useful to you. That being said, understand that OOP (when fully understood and used) allows what is considered a more “elegant” design and increased usefulness of your programs by advanced programmers (not beginners) and if you move on to writing more advanced programs you may likely work your way into OOP. Regardless of what some programmers might say, you can have a fully satisfying programming career without ever using OOP.