Foundations of Programming: Fundamentals Flashcards
Statements
Statements in programming languages are kind of like sentences in English. They use words, numbers, and punctuation to express one thought, one individual piece.
Low Level Language
In general the closer a language is to machine code the more difficult it is to write and the more you have to know about the actual hardware. And this is what’s called a low-level language.
High Level Language
Moving farther away from machine code you worry less about the hardware. It’s easier to write and to share even accross different platforms.
Machine Code or Machine Language
a set of instructions executed directly by a computer’s central processing unit (CPU). Any computer program we write has to be converted down to Machine Code before it can run.
Source Code
a collection of computer instructions (possibly with comments) written using some human-readable computer language, usually as text. The source code is often transformed by a compiler program into low-level machine code understood by the computer.
Integrated Development Environments (IDE) or Interactive Development Environment
is a software application that provides comprehensive facilities to a computer programmer for software development. An IDE normally consists of a source code editor, build automation tools and a debugger.
Difference between Compiled and Interpreted Language
for a greate explination see Lynda.com >> Foundations of programming: Fundamentals with Simon Allardice >> Compiled and interpreted languages video.
It’s importante to know the difference.
Scripting Languages
Are more limited programming languages that are embedded inside another program. Usually they will have the word script at the end like: ActionScript or AppleScript or VBScript.
Variables
Variables are simply containers. What were doing is going out to the computer memory and grabbing a little piece of it, giving it a name to use while our program is running. We grab this space and we name it and then we put a value in it.
Stongly Typed Language
You can create as many variables as you want but each variable must be of one particular type.
Weakly-Typed Language
Uses generic variables that can hold whatever type of value you want.
Variable Scope
Every variable has a scope. That simply means where is this variable visible? Who can see it? Who can use it?
Off by one errors
When you are working with loops it can be tricky to determine when to stop them…ask yourself this question. If you need a fince to be build and it the fence is to be 50 ft long and you had a post at every increment of 10. How many post would you need. Not 5, it would be six. The starting post and the ending post.
Array
is a collection of values all wrapped up and given a name.
Methods
is a function that belongs to an object
Tracing (debugging method)
where a computer programmer will inject messages, saying yes, we got to this point, we got to this point, we got to another point.
Procedural Languages
where the program really is written as one long procedure. Even though it might contain functions and subroutines to make it more modular and maintainable, it’s really a long piece of code combining data and logic all mixed together.
Object-Oriented Language
a program that is split apart into self-contained objects, almost like having severa mini programs. Each object is representing a different part of the application and each object contains it’s own data and it’s own logic and they communicate between themselves.
The difference between a class and an object
Class
a class is a blueprint. It’s an idea, it’s a description, it’s a definition. It describes what something is, but it isn’t the thing itself. It’s a well-defined idea, like a blueprint for a house. They descirbe two different things: Attributes and Behavior
The class is the idea and the object is the thing itself. We create objects base on the class like creating a house based on the blueprint. Not only that, but you can create multiple objects based on one class in thesame way you could create multiple houses based on one single blueprint.
Encapsulation
This is the idea that classes are self-contained units that represent both the data and the code that works on that data, that we take our properties and our methods and we box them up, we encapsulate them.