OVERVIEW OF SOFTWARE DEVELOPMENT COURSE
Batch File:
A computer file containing a list of instructions to be carried out in order. These are most often used in the Windows operating system. EXAMPLE: Batch files can be used to simplify repetitive tasks.
Insertion sort:
A type of sorting algorithm. In an insertion sort, the list of items is gone through, one item at a time, starting at the beginning. As each item is reached, the correct location earlier in the list is found for it, based on the desired outcome - for example, if the algorithm is meant to sort a list of numbers in ascending order, the current item would be inserted at the correct spot earlier in the list. When the end of list is reached, the whole list is sorted properly. EXAMPLE: You could use an insertion sort to sort a list of students alphabetically by last name. This is how most people sort playing cards when playing card games. Start at the first card, compare it to the second, move the second card where it should go depending on how you want the cards arranged, then go on to the third card, compare it to the two you've already inserted, put it where it goes, etc. and so on.
NOTE:
Changes made in the registry can destroy a computer and make it unusable. Students are not to make any changes in the registry of any school computer.
Generic:
Characteristic of a class or group of things; not specific. EXAMPLE: Telling your friend, "I bought a new car" would be generic. Telling them, "I bought a 2015 Toyota Camry" would be specific. In the first, you are just referring to a class or group of things - in this case, cars. In the second, you are referring to a specific example of that class or group of things.
COUNTING EVEN NUMBERS
Now, let's make a program - using a For Loop - that counts out only even numbers up to 30. Write and execute the following code: For B = 2 To 30 Step 2 TextWindow.WriteLine(B) EndFor
Sort
Ordering a collection of data according to certain pre-established criteria.
Abstract data:
"Abstract" indicates ideas, thoughts and theories as opposed to physical or concrete existence. Abstract data refers to data where we are only concerned with it in terms of its items and operations - not the implementation. In other words, we only care about what it's supposed to do - not about how it does it. EXAMPLE: A common example would be what happens when you step on the brakes of a car. The driver knows the expected behavior - a gradual slowing of the car, and eventual stoppage if the braking continues. What the driver often doesn't know, and doesn't need to know in order to use the braking system, is HOW the system accomplishes this behavior. Different cars could have different methods for accomplishing this type of behavior; to the driver, the use of the system is the same. This is a demonstration of "abstracting out" the implementation, so that only the items and operation need to be known to the users of a thing - not the mechanics of how it is done.
Abstraction:
"Abstract" indicates ideas, thoughts and theories as opposed to physical or concrete existence. Abstraction is a general idea about a type of situation, thing, or person rather than a specific example from real life. Regarding computers, abstraction is the hiding away of the implementation details, and only providing the description of the behavior to be performed. Abstraction is a less complicated way to say what task a computer is doing, without displaying the long list of details that are happening behind the scenes that are part of how the computer is doing the task. EXAMPLE: An automatic coffee dispenser machine will simply have a button that says "Make Coffee." It doesn't display data on how exactly it is done and you don't necessarily need to know what functions the machine performs - you just know the expected behavior. This is abstraction.
FOR LOOPS
A "For Loop" is used to repeat a section of code a number of times. For Loops are used when the number of iterations are known. Here's an example: for each student in the class (25), provide a grade. For B = 1 To 10 TextWindow.WriteLine(B) EndFor
WHILE LOOPS
A "While Loop" is basically a repeating "if statement." Meaning, you are telling the computer to execute certain code repeatedly while a particular condition is present. E.g. While hungry, eat. Amount = 1 While (Amount < 1025) TextWindow.WriteLine(Amount) Amount = Amount * 2 EndWhile
MEETUPS
A "meetup" is a meeting of a group of people who share similar interested. One of the most successful activities of developers who land their first technical position, or re-enter the industry, is to network. One of the best way to network is to attend local technology meetups. There are many excellent online resources for finding various technology groups and meetups. You can simply Google "Technology meetups in ____ (your city)" or "Coding meetups." One of the best websites to find meetups is meetup.com In Portland, another website is: calagator.org We highly recommend attending actual meetups throughout your training. Many Tech Academy graduates have landed tech jobs through attending meetups and networking events.
CREATING A CIRCLE WITH VARIABLES Now let's make a circle using variables. Write and execute the following code:
A = 20 B = 50 GraphicsWindow.FillEllipse(A, B, 350, 350)
BRANCHES
A branch is a point of decision. Branches are a fundamental element of how we make computers do useful work. A branch instruction tells the computer to go to somewhere other than the primary series of instructions and instead execute an alternate series of instructions; usually based on some decision the computer has to make. It is a statement written in the program's code to make the computer shift from one area to another. EXAMPLE: If you are using a computer program to order food from a restaurant, and the restaurant has a different procedure for ordering if you want the food to be delivered instead of being set aside for you to pick up, there will be a branch in the computer program where the user will be prompted as to whether their order is for pickup or delivery. In this case, the computer will have two series of steps it will perform. The branch instruction in the computer program will execute one or the other of these series, depending on the user's response.
CONDITIONAL STATEMENTS
A condition is something that other things depend on. In math, a condition is something that is required for something else to be true. Conditions are points that are necessary to be present for other points to be present. If you say something is "conditional", that means it relies on the state of another thing. EXAMPLE: The statement "Electricity is allowed to flow through this part of the computer if you type 1" could be a condition. Or say you have a word problem like this: "Come up with two digits that, when added together, equal six - but the digits 2 and 4 are never to be used to get the answer." Here, the part that tells you that you can't use the numbers 2 or 4 in your answer is a condition. A conditional statement takes place when you tell the computer: depending upon ___, do ___. An "If Statement" is a type of conditional statement that means: if this, then that.
FLOWCHARTS
A flowchart is simply a diagram that shows how to achieve a solution to a problem. Typically, a flowchart is created at the beginning of a project. They are a means of breaking down problems bit by bit in order to facilitate understanding of a problem or a complicated task. Very often, a flowchart helps to convey ideas to others in a way that is easy to understand. Just as an architect will create a blueprint for a project, a programmer should also create a blueprint before starting his or her project.
Foreign key:
A foreign key is a column in one table that holds the data from a primary key in another, related table. This is how the relationships between different tables are established.
SUBROUTINES
A subroutine is a set of computer instructions, to be used by a main computer program, that performs some task that you may want to do over and over again at various times. The main computer program could do some of its own actions in a specific sequence, then ask the subroutine to do its tasks, and then continue on where it was before it asked the subroutine to do its tasks. Another term for this is a subprogram (a term we discussed earlier in this course). EXAMPLE: Within a computer program used to operate a college, there could be a subprogram that checked to see if any new students had been enrolled since you last used the program. The main program could use that subprogram as it was starting up, get the data on any new students, and then continue on with its primary functions. To "call" means to demand or direct something. In normal English this could be used like, "This calls for celebration!" In computers, a call is a direction by a main computer program to execute the tasks of a subprogram. More specifically, when a "call" is made, a program temporarily transfers control of the computer to a subprogram. Once the subprogram is done executing, control of the computer is returned to the main program. A program could make many "calls" to multiple subprograms as the program does its sequence of tasks. EXAMPLE: If you were using a video game program, the video game program could call a "high score" subprogram after every game ended.
Bubble Sort:
A type of sorting algorithm. In a bubble sort, the list of items is gone through, one item at a time, starting at the beginning. As each item is reached, it is compared to the item previous to in the list. It is swapped if the desired outcome requires it - for example, if the algorithm is meant to sort a list of numbers in ascending order, the current item would be swapped with the previous item if it is lower than the previous item. This entire process is repeated for the whole list until all the items are in the desired order. EXAMPLE: You could use a bubble sort to sort a list of students alphabetically by last name.
Selection sort:
A type of sorting algorithm. In a selection sort, the list of items is divided into two lists: a list of sorted items (initially empty), and a list of unsorted items (initially this has all the items in the list). The unsorted list is then gone through, one item at a time. Each item is placed in the sorted list at the correct point, according to the desired outcome. Once all items in the unsorted list have been handled, the sorted list is the final product. EXAMPLE: You could use a selection sort to sort a list of students alphabetically by last name.
Alpha Test:
Alpha is the first letter of the Greek alphabet and is often used to describe things that come first in an ordered system. There are many different types of software testing approaches, systems and processes. An end user is the person or persons for whom a computer program is being developed - the people who will actually use it once it's been released. Alpha testing is a form of testing done while creating a software program. It is often the first form of testing done, hence the name "alpha". It is done by having people use the actual computer program, or a simulation of it. Often this is done on premises - meaning, at the location where the software is being developed. The people doing the testing can be the end users of the software, a team of professional testers, or others. EXAMPLE: In creating a web site for newlyweds, a person could bring in a group of newlyweds and have them go through the site to identify any problems or mistakes, give feedback on usability, etc. That would be alpha testing.
Operator:
Also called an arithmetic operator. In mathematics, an operator is a symbol used to carry out a computation. There are several different kinds of operators. Arithmetic operators such as +, -, /, *, % are used to perform math functions. Operators such as >=, ==, != are used to compare values. Logical operators like "and," "or," and "not" are used to evaluate whether an expression is true or false. EXAMPLE: In creating programs, instructions like "AND" and "OR" are considered operators. For example, an instruction might specify: If someone types in both "John" AND "Sally," then turn the screen blue (Here, AND is an operator. It is a symbol for the action of comparing whether two things are both true.) Another instruction might specify: Total price = base price + tax (Here, + is an operator. It is a symbol for addition). Other common operators are the mathematical actions for multiplication or division. The symbols used for these operations are usually an asterisk (*) for multiplication and a forward slash (/) for division.
ARRAYS
An array is a collection of data, arranged in rows and columns. In computers, an array is a group of related things that are stored together in a sequence. It is a way things can be organized in a computer in a logical way. Arrays can be quite simple, or quite complex. EXAMPLE: A simple array would be something like the numbers 7, 3 and 15. It would be written out like this: [7,3,15] These three pieces of data are called elements - they are the elements of the array. A system is needed for identifying each element of an array. The simplest method for this is to start numbering them at zero starting at the left position and count up from there. In the above example, the element "7" would be at position 0, "3" would be at position 1 and "15" would be at position 2. Another word for the position of an element is the "index" of the element - for the above example of an array, index 0 is "7", index 1 is "3", etc. The plural form if "index" is "indices", pronounced "IN-dih-sees". Each element, therefore, has two properties: its index and its value. EXAMPLE: You have three pictures of your cat and you could save them in an array: CatPic1, CatPic2 and CatPic3. Here, index 1 has a value of "CatPic2". In some computer languages, including SmallBasic, the index for an element in an array can be a unique text item, instead of a number. EXAMPLE: You could have an array with three elements: 4, 22, 8 The indices for these elements could be: "planes" "trains" "automobiles" Here, the element in the array with the index "trains" would have a value of 22.
EVENTS
An event is an action or something that occurs that is detected by a computer program. There can be system events (events that occur as a result of operations the computer does automatically), or user events, like typing on the keyboard or clicking a mouse. In Small Basic, an event is something that reacts to a user's action and is when the computer tells you that something interesting has happened. For example, if you make a program that turns the screen blue when you click on the word "blue," clicking on the word "blue" would be the event. Events can make programs more interesting and interactive. Interactive means that two things influence one another and create effects on each other. In computers, interactive refers to a computer that is able to be communicated with and gotten to perform activities by a human; these activities involve the person using the computer. An interactive computer is a computer that you can affect in some way (move a pointer on a screen and select something, etc.) and which will respond in some manner. Most, if not all, computers you've handled have been interactive. The computer game "Hangman" could be developed in Small Basic and would include events. In this game, the user makes choices and the program receives the user's input using events. There is such a thing as "event-driven programming." This is programming where the flow of the program is controlled by events. An example would be a program in which the program flow is determined by the typing of keys and clicking the mouse.
ITERATIONS
An important aspect of how loops work is the concept of an iteration. To iterate means to say or do something again; to repeat something. An iteration is the act of repeating. Iteration means to go through a defined series of actions, repeating a certain number of times. Usually this defined series of actions is repeated a certain number of times, or until a condition is met. EXAMPLE: Computer programs are usually created in iterations: Coming up with a basic working version, reviewing the program for mistakes to correct and improvements to make, doing that work, and repeating. When the program works acceptably, this process starts.
TWO-DIMENSIONAL ARRAYS We will now write a two-dimensional array. Write and execute the following code:
Animals["Princess"]["Color"] = "Black" Animals["Princess"]["Species"] = "Dog" Animals["Ivy"]["Color"] = "Gray with dark spots and stripes" Animals["Ivy"]["Species"] = "Cat" Animals["Goldie"]["Color"] = "Gold" Animals["Goldie"]["Species"] = "Fish" Animals["Tweet"]["Color"] = "Green with yellow" Animals["Tweet"]["Species"] = "Bird" TextWindow.Write("What is the name?: ") Name = TextWindow.Read() TextWindow.WriteLine("Their color is: " + Animals[Name]["Color"]) TextWindow.WriteLine("Their species is: " + Animals[Name]["Species"])
TREES
Another common nonlinear data structure is the tree.
LOOPS AND CONDITIONAL STATEMENTS
B = 29 Start: TextWindow.WriteLine(B) B = B - 2 If (0 < B) Then Goto Start EndIf
Beta Test:
Beta is the second letter of the Greek alphabet. Beta testing is a form of testing done while creating a software program. It is often the second form of testing done on the software, hence the name "beta." It is done by releasing the software to a limited number of actual end users (people that weren't involved in the development of a product and who are similar to the public that will eventually use the product) for the purpose of identifying defects that earlier testing didn't identify. After passing beta testing, the software would usually be released to all end users. EXAMPLE: In creating a web site for newlyweds, a person could first have another software programmer go through the site to identify any problems or mistakes. After fixing any issues found, the person could then share their site with twenty-five newly married couples and gather further feedback. This second wave of testing would be beta testing.
Encapsulation:
Encapsulate means to wrap something or cover it completely. Often when creating computer programs, you will have certain tasks that you need to do over and over again. In this case, it is helpful to create computer instructions that perform that task, and then turn those instructions into a small program that itself can be used by other computer programs. A common term for this is "sub program." For example, there may be a subprogram that can receive some numbers, add them together and give the answer. You can imagine that this subprogram might get used quite often. There are two aspects of a task in a computer program: WHAT it does, and HOW it does it. In computer programming, encapsulation means setting up a computer program so that the details of HOW are hidden away and only WHAT it does is visible. EXAMPLE: Let's say that two different people were assigned the task to write a subprogram called 'MultiplyTwoNumbers' which is intended to receive two numbers and give back the result of multiplying those two numbers. The subprogram can be written in more than one way, because you can do the math in more than one way: You can multiply the two numbers, or you can do the whole operation using addition. An example: If you want to multiply 3 times 4, you can do it with addition by adding up the number 3, four times: 3 + 3 + 3 + 3 = 12 Or you can do it with multiplication: 3 x 4 = 12 Either approach gives you the correct answer. This applies to encapsulation, and to computer programming, like this: If two people each solved the task differently, but the way they did it resulted in the correct answer, either one of the subprograms could be used when a person wanted to do multiplication. They wouldn't need to see HOW the subprogram arrived at the right answer - they would only need to know WHAT to give the subprogram in order for it to do its job, and WHAT they would receive as an answer. In both cases, the WHAT to give the subprogram is "the two numbers you want to multiply', and the WHAT you get back is "the product of the two numbers" (in math, "product" means "what you get when you multiply numbers"). So here, we encapsulate the implementation of the subprogram, and only give the user what they need to see to use the subprogram.
5) Exit
Every program must have an instruction that tells the computer that the program is no longer running. Much like the Entrance, the exact instruction for this varies based on the computer language used, but all computer languages will have this type of instruction.
Compilers and interpreters operate in the same way and perform duplicate functions.
False
ARRAYS Now, let's change the code you just wrote into an array. Write and execute the following code:
For A = 1 To 4 TextWindow.WriteLine("Please enter the name for User " + A + ":") Name[A] = TextWindow.Read() EndFor For B = 1 To 4 TextWindow.WriteLine("What is User " + B + "'s age?:") Age[B] = TextWindow.Read() EndFor TextWindow.Write("Hello ") For A = 1 To 4 TextWindow.Write(Name[A]) If A < 3 Then TextWindow.Write(", ") ElseIf A < 4 Then TextWindow.Write(" and ") EndIf EndFor TextWindow.Write(". You are ") For B = 1 To 4 TextWindow.Write(Age[B]) If B < 3 Then TextWindow.Write(", ") ElseIf B < 4 Then TextWindow.Write(" and ") Else TextWindow.Write(" respectively.") EndIf EndFor TextWindow.WriteLine("")
TURTLE FOR LOOP We can also draw shapes using a for loop. Let's do an octagon. Write and execute the following code:
For X = 1 To 8 Turtle.Move(75) Turtle.Turn(45) EndFor
GRAPHICS AND ARRAYS Arrays can also be used with Graphics. Write and execute the following code:
GraphicsWindow.BackgroundColor = "Black" GraphicsWindow.Height = 600 GraphicsWindow.Width = 605 Rows = 10 Columns = 10 Sides = 50 For A = 1 To Columns For B = 1 To Rows GraphicsWindow.BrushColor = "Blue" Squares[A][B] = Shapes.AddRectangle(Sides, Sides) Shapes.Move(Squares[A][B], A * Sides, B * Sides) EndFor EndFor
PROGRAM 5 Write and execute the following code:
GraphicsWindow.BackgroundColor = "DarkBlue" GraphicsWindow.Height = 600 GraphicsWindow.Width = 605 Rows = 10 Columns = 10 Sides = 50 For A = 1 To Columns For B = 1 To Rows GraphicsWindow.BrushColor = GraphicsWindow.GetRandomColor() Squares[A][B] = Shapes.AddRectangle(Sides, Sides) Shapes.Move(Squares[A][B], A * Sides, B * Sides) EndFor EndFor For A = 1 To Columns For B = 1 To Rows Shapes.Animate(Squares[B][A], 300, 0, 1000) Program.Delay(50) EndFor EndFor For A = 1 To Columns For B = 1 To Rows Shapes.Animate(Squares[B][A], 288, 500, 1000) Program.Delay(10) EndFor EndFor For A = 1 To Columns For B = 1 To Rows Shapes.Animate(Squares[B][A], 275, 250, 1000) Program.Delay(10) EndFor EndFor
PROGRAM 1 Write and execute the following code:
GraphicsWindow.BackgroundColor = "LightCyan" GraphicsWindow.PenColor = "DarkSlateBlue" GraphicsWindow.Width = 400 GraphicsWindow.Height = 400 For A = 1 To 200 Step 6 GraphicsWindow.DrawRectangle(200 - A, 200 - A, A * 2, A * 2) Program.Delay(100) EndFor For A = 1 To 200 Step 6 GraphicsWindow.DrawEllipse(200 - A, 200 - A, A * 2, A *2) Program.Delay(100) EndFor
SHAPES We can also paint and create shapes in the Graphics Window. Write and execute the following code:
GraphicsWindow.BrushColor = "Green" GraphicsWindow.FillTriangle(300,150,150,300,450,300)
DISPLAYING PHOTOS We just used a new operation called "DrawResizedImage" which allows you to display photos. The first word in the parentheses names the picture, the next two numbers are the X and Y Coordinates in the Graphics Window and the last two specify the width and length of the photo (respectively). Let's get a little tougher on events. Write and execute the following code:
GraphicsWindow.DrawBoundText(250, 200, 100, "Click the screen!") GraphicsWindow.MouseDown = Click GraphicsWindow.BrushColor = "Yellow" GraphicsWindow.BackgroundColor = "Black" Sub Click GraphicsWindow.ShowMessage("You clicked the mouse!", "NOTICE") A = GraphicsWindow.MouseX - 5 B = GraphicsWindow.MouseY - 5 GraphicsWindow.FillTriangle(A, B, 30, 30, 40, 40) EndSub
TEXT And in case you were wondering, we can also add text to the Graphics Window. Write and execute the following code:
GraphicsWindow.DrawBoundText(70, 70, 150, "John") GraphicsWindow.DrawBoundText(120, 70, 150, "Sally") GraphicsWindow.DrawBoundText(180, 70, 150, "Bill") GraphicsWindow.DrawBoundText(250, 70, 150, "Jessica") GraphicsWindow.DrawBoundText(70, 120, 150, "John") GraphicsWindow.DrawBoundText(120, 120, 150, "Sally") GraphicsWindow.DrawBoundText(180, 120, 150, "Bill") GraphicsWindow.DrawBoundText(250, 120, 150, "Jessica")
One of the cool things about the Graphics Window is the ability to draw lines. Write and execute the following code: Each line of code drew one side of the square. The X Coordinate refers to how far left to right (horizontally) something extends on a grid or a map. The Y Coordinate refers to how far top to bottom (vertically) something extends. Here's how each number in each line of code laid this out: The first number tells the computer how far left or right the line will be started (called the X Coordinate) The second number tells us where the line starts - up and down - (called the Y Coordinate) The third number tells the computer where the bottom of the line ends right to left The fourth number tells the computer where the bottom of the line (up and down) ends up
GraphicsWindow.DrawLine(10,10,200,10) GraphicsWindow.DrawLine(10,10,10,200) GraphicsWindow.DrawLine(10,200,200,200) GraphicsWindow.DrawLine(200,10,200,200)
Draw an x
GraphicsWindow.DrawLine(10,10,200,200 GraphicsWindow.DrawLine(200,10,10,200)
LINE THICKNESS We can also change the color and thickness of the line. Write and execute the following code:
GraphicsWindow.Height = 500 GraphicsWindow.Width = 500 GraphicsWindow.BackgroundColor = "Silver" GraphicsWindow.Title = "The Colored Square!" GraphicsWindow.PenColor = "Red" GraphicsWindow.DrawLine(10,10,450,10) GraphicsWindow.PenWidth = 10 GraphicsWindow.PenColor = "Blue" GraphicsWindow.DrawLine(10,10,10,450) GraphicsWindow.PenWidth = 20 GraphicsWindow.PenColor = "Yellow" GraphicsWindow.DrawLine(10,450,450,450) GraphicsWindow.PenWidth = 30 GraphicsWindow.PenColor = "Green" GraphicsWindow.DrawLine(450,10,450,450) GraphicsWindow.PenWidth = 40
CUSTOMIZING THE WINDOW Now, to customize the Graphics Window, there are some things you can do. Write and execute the following code:
GraphicsWindow.Height = 500 GraphicsWindow.Width = 700 GraphicsWindow.BackgroundColor = "Silver" GraphicsWindow.Title = "The Graphics Window!" GraphicsWindow.Show()
PAINT Now that you are familiar with subroutines, events and other key coding concepts, we can create our very own "Paint" program that will allow you to draw using the mouse. You will be able to draw in rainbow-like colors with a thick brush. In this next program, we will be using the MouseMove event, which gets the X and Y coordinates, in pixels, of the mouse cursor - based on where it is as compared to the top left of the desktop. Write and execute the following code:
GraphicsWindow.MouseMove = A GraphicsWindow.MouseDown = B GraphicsWindow.BackgroundColor = "SkyBlue" GraphicsWindow.PenWidth = (25) Sub B C = GraphicsWindow.MouseX D = GraphicsWindow.MouseY EndSub Sub A E = GraphicsWindow.MouseX F = GraphicsWindow.MouseY If (Mouse.IsLeftButtonDown) Then GraphicsWindow.PenColor = GraphicsWindow.GetRandomColor() GraphicsWindow.DrawLine(C, D, E, F) EndIf C = E D = F EndSub 'Click and hold down mouse as you move it around.
We can also draw pixels in the Graphics Window. Write and execute the following code:
GraphicsWindow.SetPixel(20, 20, "Black")
PROGRAM 3 Write and execute the following code:
GraphicsWindow.Title = "America!" GraphicsWindow.Width = 1000 GraphicsWindow.Height = 600 For A = 1 To 100000 GraphicsWindow.BrushColor = "Red" B = Math.GetRandomNumber(1000) C = Math.GetRandomNumber(1000) GraphicsWindow.FillEllipse(B, C, 4, 4) EndFor For D = 1 To 100000 GraphicsWindow.BrushColor = "Blue" B = Math.GetRandomNumber(500) C = Math.GetRandomNumber(275) GraphicsWindow.FillEllipse(B, C, 4, 4) EndFor
LOOPS AND THE GRAPHICS WINDOW We can also utilize a Loop with the Graphics Window. Write and execute the following code:
GraphicsWindow.Title = "Growing Lines!" GraphicsWindow.Height = 500 GraphicsWindow.Width = 500 GraphicsWindow.PenColor = "Red" GraphicsWindow.BackgroundColor = "Blue" For A = 1 To 15 GraphicsWindow.PenWidth = A GraphicsWindow.DrawLine(20, A * 20, 400, A * 20) EndFor
FLICKR Flickr is a website where people can store and display images. We will now use the MouseDown event in the following program (you will see what it does when you run the program). We can pull a picture from Flickr! Write and execute the following code:
GraphicsWindow.Title = "It's raining cats and dogs!" GraphicsWindow.Width = 700 GraphicsWindow.Height = 700 GraphicsWindow.MouseDown = Pics Sub Pics Picture = Flickr.GetRandomPicture("Cats, Dogs") GraphicsWindow.DrawResizedImage(Picture, 0, 0, 700, 700) EndSub
PROGRAM 2 Write and execute the following code:
GraphicsWindow.Width = 1000 GraphicsWindow.Height = 650 GraphicsWindow.BackgroundColor = "Black" A = 1000 B = 1000 For C = 1 To 100000 D = Math.GetRandomNumber(3) E = 500 Program.Delay(.1) F = 30 If (D = 1) then E = 30 Program.Delay(.1) F = 1000 EndIf If (D = 2) Then E = 1000 F = 1000 Program.Delay(.1) EndIf A = (A + E) / 2 Program.Delay(.1) B = (B + F) / 2 Random_Color = GraphicsWindow.GetRandomColor() GraphicsWindow.SetPixel(A, B, Random_Color) EndFor
PROGRAM 4 Write and execute the following code:
GraphicsWindow.Width = 275 Turtle.X = 130 Turtle.Y = 400 GraphicsWindow.PenColor = "Green" Turtle.Move(150) Turtle.X = 135 Turtle.Y = 400 GraphicsWindow.PenColor = "Green" Turtle.Move(150) Turtle.X = 100 Turtle.Y = 200 GraphicsWindow.PenColor = "MediumVioletRed" Turns = 200 Length = 300 / Turns Angle = 400 / Turns Turtle.Speed = 10 For A = 1 To 6 For B = 1 To Turns Turtle.Move(Length) Turtle.Turn(Angle) EndFor Turtle.Turn(18) EndFor Turtle.X = 128.5 Turtle.Y = 193
FILL THE CIRCLE If you want to fill in the circle so that it looks like a sun, simply change your code. Write and execute the following code:
GraphicsWindow.Width = 300 GraphicsWindow.Height = 300 GraphicsWindow.BackgroundColor = "Black" GraphicsWindow.BrushColor = "Yellow" GraphicsWindow.FillEllipse(50, 50, 200, 200)
You can also draw and paint: squares, rectangles and ellipses (ovals). To draw a circle, you would use the eclipse operation. Write and execute the following code
GraphicsWindow.Width = 300 GraphicsWindow.Height = 300 GraphicsWindow.BackgroundColor = "Black" GraphicsWindow.PenColor = "Yellow" GraphicsWindow.PenWidth = 20 GraphicsWindow.DrawEllipse(50, 50, 200, 200)
COMPARISON INSTRUCTIONS
Here is another comparison instruction: >= (greater-than sign followed by equal sign). This symbol is used to show that a comparison should be made. Specifically, this "greater-than or equal" symbol is basically an instruction to check whether the data on the left side of the symbol is more than or equal in amount or quantity than the data on the right side. The answer to this comparison is an answer of "true" or "false". EXAMPLE: 6 >= 6. This means "check whether 6 is greater than or equal to 6". The answer is "true".
EXAMPLE OF A CLASS
Here is an example, to make these concepts a bit more real: Let's say the question were, "If I were a vehicle, what would I look like and what could I do?" The structure of a vehicle would include such things as: 1. An energy source that can provide the motive force to move the vehicle. Examples might be "a gasoline engine" or "an electric motor". 2. A physical form that implements the primary purpose of the vehicle. Examples might be "sedan", "convertible", "pickup truck", etc. 3. One or more doors to provide entrance and egress for the people operating or being transported by the vehicle. 4. A mechanism for increasing the speed of the vehicle. Examples might be "an accelerator pedal" or "a speed lever". 5. A mechanism for decreasing the speed of the vehicle. Examples might be "a brake pedal" or "a brake lever". 6. A mechanism for steering the vehicle. Examples might be "a steering wheel" or "a steering lever". 7. A speed at which the vehicle is traveling. Examples might be "55 miles per hour", "10 feet per second", or "0". Another term for these structure elements is "Properties". The behaviors of a vehicle would include such things as: 1. Accelerate the vehicle. 2. Slow the vehicle. 3. Stop the vehicle. 4. Steer the vehicle to the right. 5. Steer the vehicle to the left. This would be an example of the definition of a "Vehicle" class. Again, this wouldn't be referring to any vehicle in particular, but instead to the concept of a vehicle - what things must any vehicle have, and what things can you do with or to a vehicle, if you had one. When the computer program had need for a vehicle, it would be directed to use this class definition to create, or "instantiate" one. Specifically, it would create an object of type "Vehicle". At that point, the program would set aside parts of the computer memory to keep track of the properties of that particular object of the Vehicle class. The computer program would then be directed to set the state of this new object of the Vehicle class. It would have to have specific values for the properties of this Vehicle - what type of engine it had, what physical form it was built to, what kind of steering mechanism it had, etc. It is probable that it would get these values from the user of the computer program.
TIME code 2
If (Clock.Hour < 12) Then TextWindow.WriteLine("It is a.m.") Else TextWindow.WriteLine("It is p.m.") EndIf
TIME code
If (Clock.Hour < 12) Then TextWindow.WriteLine("It is a.m.") ElseIf (Clock.Hour >= 12) Then TextWindow.WriteLine("It is p.m.") EndIf
CLOSING YOUR LOOP
If we create a loop and don't close the loop, the code will continue on forever. Here's an example: Write and execute the following code: Begin: A = 50 If A > 25 Then TextWindow.WriteLine("50 is more than 25!") Goto Begin EndIf
COMMENTS
In a larger program, subroutines become quite useful and save you from writing extra code because you can call the subroutine from anywhere in the program. Subroutines can also be used to break apart larger problems into smaller problems. An important thing to keep in mind in writing code is the readability of your code. I.e. If another developer takes over after you, they need to know the purpose of different sections of your code. To clarify our code, we use "comments." For example: PrintTime() 'this is a subroutine that prints the current time. This is called "commenting your code." In Small Basic, comments are preceded with an apostrophe ('). Comments are ignored by the computer and not executed.
USING FLAGS TO CLASSIFY ITEMS INTO CATEGORIES
In computer programming, a flag is a predefined bit or sequence of bits that holds a binary value. Flags are commonly used in a computer program to store settings or to leave a sign for another program. For example, in a system designed to handle various aspects of the font used to display text data, an 8-bit data sequence could be set up like this: 0001 (meaning "Text is normal") 0010 (meaning "Text is italic") 0100 (meaning "Text is bold") 1000 (meaning "Text is underlined") You can see from this that a piece of text could have two or more properties that apply to it: 0110 would mean the text is both italic and bold 1010 would mean the text is both italic and underlined 1100 would mean the text is both bold and underlined If you associate this data structure with a piece of text, you can check its properties and even change them with binary mathematics. As you can see, in certain programming situations, the ability to understand binary data structures and perform mathematics with that data will be valuable in your career as a technology professional.
Relational Database:
In order to understand the term relational database, you'll need to understand the term database. A database is an organized collection of related data, typically for use on a computer. Other computers might connect to a database that is stored on another computer in order to access the data in the database. This is the symbol for a database: Usually, the data in a database is organized into tables. Tables are a data structure made up of rows and columns. Each column would represent a type of data that could be stored in the table; each row would represent one entry into the table. What makes a database "relational" is when various tables in the database are related to each other in some way, and when those relationships are somehow defined and when they affect how the data in the tables is used. A typical relationship might be like this: One table hold data about students. Another table hold data about addresses. The relationship between Students and Addresses is that one or more students can live at a given address. A relationship is defined between the two tables, tying one or more students to addresses. EXAMPLE: A database containing tables with data about various vehicles and various drivers might be a relational database.
Sorting algorithm:
In order to understand the term sorting algorithm, you first need to understand the terms sort and algorithm. Sort means "to arrange as to sort, kind or class". An example might be dividing dirty clothes into two piles - whites and colors. An algorithm is a mathematical term. It is a plan for solving a problem. Algorithms consist of a sequence of steps to solve a problem or perform an action. Computers use algorithms. An algorithm is a set of instructions that is used to get something done. A sorting algorithm is an algorithm that arranges a list of items in a certain order. There are different methods one can use to sort things. Sorting algorithms are ways to sort through data. EXAMPLE: There are sorting algorithms that will have the computer look at a list of numbers, and put them in sequence, starting at the top (highest value) number and working down.
LinkedIn is a website owned by Microsoft that is mainly utilized for professional networking. During the interview process, employers commonly review the LinkedIn profiles of candidates. It is also a great tool to find employment opportunities. You can meet hiring managers and recruiters on LinkedIn, and make great connections.
TIME
Now let's create a program that can tell the difference between a.m. and p.m. Write and execute the following code: If (Clock.Hour < 12) Then TextWindow.WriteLine("It is a.m.") ElseIf (Clock.Hour >= 12) Then TextWindow.WriteLine("It is p.m.") EndIf Clock.Hour is a built-in instruction in SmallBasic that gives the time on your computer; we used that to check the time.
IDENTIFIERS - CONTINUED3
One last note about identifiers: In most programming languages, identifiers are required to conform to a certain format. For example, the identifiers in this lesson all began with letters and were composed only of letters and numbers. None of the identifiers included spaces, and constants were written in UPPERCASE letters.
Oracle:
One of the largest software companies, whose primary business is database products. Oracle was the first company to support Structured Query Language (SQL). EXAMPLE: One of the most popular software programs sold by Oracle is called Oracle Database. It is used by many companies around the world.
NETWORK COMPRESSION
One of the primary performance concerns in any computer network is the size of the data "packets" (individual sets of data being sent from one computer to another). The smaller the packet size, the faster the overall network can operate. Because of this, many methods exist for reducing the size of these packets. One approach to this problem involves reducing the size of the data you're about to send with a compression scheme that uses binary multiplication. The data is compressed in this fashion, and upon the receipt of the data at the destination computer, the same binary mathematical operation is done in reverse so that the data is restored to its original form for use on that computer.
CREATING COMPACT, HIGH-PERFORMANCE DATA STRUCTURES, WHEN WORKING WITH MEMORY CONSTRAINTS
One popular area of software development involves creating programs for small computers that are meant to be installed in machinery. For example, drones that have small on-board computers. These computers are usually called "embedded" systems, because the computer is embedded, or "set within", another machine. These computers often have low memory storage and processor capacity as compared to a desktop, a laptop or even a mobile device. Because of this, programmers have to be very efficient in how they store and manipulate data. Computer programming often involves the creation of lists of data that are connected in some way. Modern languages have many built-in functions for creating and working with such lists. These methods are perfectly fine to use when working with modern computers that have lots of memory and processing power, but they usually are less efficient with their use of memory and CPU operation than is suitable for use in an embedded computer. Because of this, developers on embedded systems often devise their own, very compact code for creating and working with lists of data. While the details of such code and the corresponding data structure are beyond the scope of this article, it's important to know that some of the most efficient solutions involve using binary mathematics to traverse through such lists of related data.
PHP:
Originally, PHP stood for "Personal Home Page". Currently it is short for "PHP: Hypertext Preprocessor." PHP is a scripting language designed for web development. This means that you could have an HTML page, and you could put a script inside it that performed some function; this script would be executed by the computer that was hosting the web page files (the "server"). The script could be written in PHP. The code written in PHP is stored on a web server, with the HTML pages it's meant to work with. PHP can also be used as a general-purpose programming language, not just for adding functionality to web pages. The main use of PHP is to create interactive websites and web applications. EXAMPLE: PHP is one of the languages utilized by Facebook.
Abstract
Relates to the theory of how something works, as opposed to the actual implementation of it.
SMALL BASIC
Small Basic is a programming language broadly released by Microsoft in 2011. Small Basic includes an Integrated Development Environment (IDE - a tool in which one writes their code) and libraries (sets of pre-manufactured code for use). It can be used to write basic programs and games. The .NET Framework is a collection of tools and pre-made software that helps software developers to make computer programs. It was created by Microsoft. It has several programming languages that it can work with. As a developer, you can write a program that uses one or more of these languages. The .NET Framework can take these programs and convert them down to instructions that will work on pretty much any computer that is compatible with this .NET Framework. This means you only have to write the program once, and not have to write variations of it for all the various types of computers you'd like to have run the program. Small Basic is based on .NET and so familiarizing yourself with Small Basic makes it easier to learn other .NET programming languages, such as C#, in the future. Factually, Small Basic makes it easier to learn any programming language in the future. The purpose of Small Basic is to provide a programming language that is designed to make programming more approachable for newcomers. It is a great learning resource for beginners!
COUNTING ODD NUMBERS
So now, let's reverse the countdown and use only odd numbers! Write and execute the following code: For B = 29 To 1 Step -2 TextWindow.WriteLine(B) EndFor
SUBPROGRAM Now let's try another subprogram that will be called three times. Write and execute the following subprogram:
TextWindow.BackgroundColor = "DarkRed" TextWindow.Write("This is a program that allows you to choose from various sounds you'd wish to hear. You'll get to choose three times! ") Sound() Sub Sound Start: TextWindow.Write("To hear a bell ring, type Bell. To hear a chime, type Chime. To hear a click sound, type Click: ") Sound_Choice = TextWindow.Read() If Sound_Choice = "Bell" Then Sound.PlayBellRing() ElseIf Sound_Choice = "Chime" Then Sound.PlayChime() ElseIf Sound_Choice = "Click" Then Sound.PlayClick() Else TextWindow.Write("Please type Chime, Bell or Click.") Goto Start EndIf EndSub Sound() Sound()
ARRAYS Write and execute the following code:
TextWindow.Write("Enter the name for User 1: ") User_1_Name = TextWindow.Read() TextWindow.Write("How old is User 1?: ") User_1_Age = TextWindow.Read() TextWindow.Write("Enter the name for User 2: ") User_2_Name = TextWindow.Read() TextWindow.Write("How old is User 2?: ") User_2_Age = TextWindow.Read() TextWindow.Write("Enter the name for User 3: ") User_3_Name = TextWindow.Read() TextWindow.Write("How old is User 3?: ") User_3_Age = TextWindow.Read() TextWindow.Write("Enter the name for User 4: ") User_4_Name = TextWindow.Read() TextWindow.Write("How old is User 4?: ") User_4_Age = TextWindow.Read() TextWindow.Write("Greetings Users! ") TextWindow.Write(User_1_Name + ", you are " + User_1_Age + " years old! ") TextWindow.Write(User_2_Name + ", you are " + User_2_Age + " years old! ") TextWindow.Write(User_3_Name + ", you are " + User_3_Age + " years old! ") TextWindow.Write(User_4_Name + ", you are " + User_4_Age + " years old! ")
PROGRAM DELAY
TextWindow.Write("Type a number that includes a decimal: ") Number = TextWindow.ReadNumber() Program.Delay(1000) TextWindow.Write("Now we will round your number! ...") Program.Delay(1000) TextWindow.Write("Your rounded number is: " + Math.Round(Number) + ".") Program.Delay(1000) Remainder = Math.Remainder(Math.Round(Number), 2) If (Remainder = 0) Then TextWindow.WriteLine(" This number is even!") Program.Delay(1000) Else TextWindow.WriteLine(" This is an odd number!") Program.Delay(1000) EndIf
REMAINDER
TextWindow.Write("Type a number that includes a decimal: ") Number = TextWindow.ReadNumber() TextWindow.Write("Now we will round your number! ...") TextWindow.Write("Your rounded number is: " + Math.Round(Number) + ".") Remainder = Math.Remainder(Math.Round(Number), 2) If (Remainder = 0) Then TextWindow.WriteLine(" This number is even!") Else TextWindow.WriteLine(" This is an odd number!") EndIf
MORE SUBROUTINES We can also use subroutines to handle variables. Write and execute the following code:
TextWindow.Write("Type a number: ") Number_1 = TextWindow.ReadNumber() TextWindow.Write("Type another number: ") Number_2 = TextWindow.ReadNumber() TextWindow.Write("Let's type another number: ") Number_3 = TextWindow.ReadNumber() TextWindow.Write("And one last number: ") Number_4 = TextWindow.ReadNumber() Largest_Number() TextWindow.WriteLine("The largest number is: " + Largest_Number) Sub Largest_Number If Number_1 > Number_2 And Number_1 > Number_3 And Number_1 > Number_4 Then Largest_Number = Number_1 ElseIf Number_2 > Number_1 And Number_2 > Number_3 And Number_2 > Number_4 Then Largest_Number = Number_2 ElseIf Number_3 > Number_1 And Number_3 > Number_2 And Number_3 > Number_4 Then Largest_Number = Number_3 Else Largest_Number = Number_4 EndIf EndSub
COMPARING NUMBERS Let's do another loop that will find out the larger of two numbers. Write and execute the following code:
TextWindow.Write("Type in a number: ") First_Number = TextWindow.ReadNumber() TextWindow.Write("Type in another number: ") Second_Number = TextWindow.ReadNumber() If (First_Number > Second_Number) Then Larger = First_Number Else Larger = Second_Number EndIf TextWindow.WriteLine("The larger number is: " + Larger)
ARRAYS Let's write another array. Write and execute the following code:
TextWindow.Write("What is your name?: ") Input["Name"] = TextWindow.Read() TextWindow.Write("How tall are you?: ") Input["Height"] = TextWindow.Read() TextWindow.Write("What year were you born?: ") Input["Birth_year"] = TextWindow.Read() TextWindow.Write("What is your favorite color?: ") Input["Color"] = TextWindow.Read() TextWindow.Write("What country were you born in?: ") Input["Country"] = TextWindow.Read() TextWindow.Write("Please type one of the following to pull relevant data: Name, Height, Birth_year, Color or Country. ") Index = TextWindow.Read() TextWindow.WriteLine("The " + Index + " you entered is " + Input[Index] + "!")
SUBROUTINES2 In Small Basic, the name of a subroutine is preceded with the statement "Sub". The instructions that make up the subroutine end off with the statement "EndSub". Write and execute the following code:
TextWindow.Write("What is your name?: ") Name = TextWindow.Read() TextWindow.Write("Hi there, " + Name + "! What time do you think it is? ") Time = TextWindow.Read() TextWindow.Write("Well " + Name + ", per your computer, the time now is actually: ") PrintTime() Sub PrintTime TextWindow.WriteLine(Clock.Time) EndSub
COMMENTS To comment the code we wrote above, we would do the following:
TextWindow.Write("What is your name?: ") 'This allows the user to enter their name Name = TextWindow.Read() 'This assigns what the user types to the variable Name TextWindow.Write("Hi there, " + Name + "! What time do you think it is? ") 'This prints text and allows the user to guess the time Time = TextWindow.Read() 'This assigns what the user types to the variable Time TextWindow.Write("Well " + Name + ", per your computer, the time now is actually: ") 'This prints text PrintTime() 'This names the subroutine Sub PrintTime 'This starts the subroutine TextWindow.WriteLine(Clock.Time) 'This accesses the computer's clock and returns the time EndSub 'This ends the subroutine
IDENTIFIERS
The first important concept in programming languages is the idea of identifiers. Identifiers are descriptive names that are mapped to locations in the computer's memory. Once a memory location is given a specific name, we can refer to that location using the identifier rather than the numeric address. This system of associating a name with a memory location allows us to choose names that give meaning to the contents of the memory location. For example, suppose you wanted to write a simple program to calculate the amount of sales tax you will need to pay on a new pair of shoes that costs $19.95. The first thing you will need to do is create an identifier called PriceOfShoes that is mapped to a particular memory location. Then you need to represent the value 19.95 in the computer at that location. Once this is done, you can use your identifier PriceOfShoes to refer to the price of the shoes in your program.
Significant digits
The numbers which are being used or taken into consideration by a computer.
The Visible and the Invisible Job Market
There are two different markets to be aware of when searching for a job: the "visible job market" and the "invisible job market". The visible job market includes listings you can see online, other publications, or elsewhere. This includes want ads, online job sites (job boards), and company websites. The invisible job market includes listings that are not online or listed publicly. This includes unadvertised positions, internal job postings, new positions. For example, you may have a friend who tells you there are some new jobs opening up where he works at Company A. You go on various job boards and Company A's website but don't see any of the positions your friend was talking about. These are jobs on the invisible market. According to the U.S. Bureau of Labor Statistics, 80% of available jobs are never advertised, and more than half of all employees land their jobs through networking. What does this mean? It means your best bet is to make connections and use your new and existing connections to help get a job.
Stack:
There are two uses for the word stack in technology. 1. The regular definition of "stack" is a pile of objects. In computer science, a "stack" is one of the basic ways of organizing and using data in a computer. It is often visualized as a vertical pile of data, with each piece of data on top of another. A stack is a set of data or tasks that are waiting to be handled. The computer (or other device) takes item 1 in the stack and handles that, then item 2, and so on. Stacks operate in this exact manner: (1) The order in which items are added to the stack is known. (2) When the computer is ready to work on another item from the stack, it takes the youngest item on the stack - that is, the one most recently added to the stack. This is called 'Last In, First Out' operation. (3) Taking an item off the stack to be worked on is called 'popping' the item off the stack. You would say 'perform a pop operation'. (4) When a new item is added to the stack, it goes to the 'top' of the stack - that is, it's now the youngest item in the stack, and therefore will be the very next one worked on, unless another item is added before the computer is ready to work on another item. (5) Adding an item to the stack is called 'pushing' the item onto the stack. You would say 'perform a push operation'. EXAMPLE: We have a stack of books in a cart at a library. The librarian is traveling throughout the library, putting books back on the shelves. She grabs the book at the top of the stack, finds out where it goes, places it on the shelf, and then grabs the next book at the top of the stack. This would be a "pop" operation. As she travels throughout the library, another librarian may walk up and put another book on the top of the stack. This would be a 'push' operation. That book is now the youngest, and will be the next one handled - unless yet another book is placed on the top of the stack before she can finish re-shelving the book she is working on.
MEMORY OPTIMIZATION WHEN INTERACTING WITH OLDER CODE
This involves putting two smaller numerical values into a memory slot intended for one large numerical value. A situation where this can be applicable is when creating certain computer programs for use on the Windows operating system. Some of the older code inside Windows can only work with numerical values with a relatively small size limit. Much of the rest of the code in the Windows operating system, however, can work with much larger size numbers. In the event your computer program needs to interact with some of this older code, you'll want to use this approach of stuffing two smaller numbers into the space where a large one could reside, simply so you aren't wasting all of the memory space that is set aside to store the data. This action is done using binary math, as it involves the low-level manipulation of the individual bits in a specific memory location.
VERY FAST MATHEMATICS OPERATIONS
This is also an area that is most applicable to embedded systems, as well as to computer programs that require very fast mathematical operations. It involves the case where you need to raise a number by a power of two. While every modern code library that gives a programmer access to mathematical functions can of course handle such an operation, that code will be slower than simply doing a binary math operation on the number. Fractionally slower, to be sure, but there are situations where computing speed is vital to satisfying the user's requirements.
IDENTIFIERS - CONTINUED
To be precise, we need to remember that most computers use the binary system for their storage and arithmetic rather than the decimal system. This means that when we associate a fractional value such as 19/20 (or 0.95) with a variable, we are actually storing a representation of 19/20 rather than the exact value. Since the binary number system has no exact representation for many fractions like 19/20, 1/3, or even 1/10, the computer must use a close approximation to represent this value. While we often think of exact values being stored in the computer's memory, the reality is that only close approximations for some numbers can be stored. However, to simplify our discussion, we will refer to exact values as being stored in memory although we know that only representations are really stored in most cases. What happens if you need to compute the sales tax on another pair of shoes with a different price? Do you need to create another identifier? Actually, all you need to do is change the value that is stored in the memory location named PriceOfShoes. You can use the same memory location and identifier but vary the value that is stored. Memory locations that are used in the fashion are known as variables. Be careful not to confuse variables and identifiers. Identifiers are only the names given to variables, but variables are the actual memory locations used to store data. You can compare this with cities on a map. Cities represent a specific location on a map just like variables represent a specific location in memory. But when we refer to a city, we use a name like Richmond to identify the city. In the same way, when we refer to a memory location, we use an identifier like PriceOfShoes to name the variable. The contents of our variable can change just like the residents of a city can change. But although the contents change, the name or identifier remains the same.
DATA STRUCTURES
To fully understand arrays, you must know what a "data structure" is. A data structure refers to the organization of related pieces of information. There are different data structures that each allow different operations to be performed on the data. A data structure refers to how the data is organized in terms of implementation (use of the data; relation of the various parts of the data). It is a particular way to organize data in a computer so that it can be used efficiently. Data structures are used as a means of organizing information in a computer so that the data can be utilized in an efficient manner. EXAMPLE: Consider two different areas of business: The shipping industry and the manufacturing industry. The types of data the shipping industry may need to collect and organize will center around vehicles and their capacity, shipping rates, fuel costs, travel times between various geographical points, etc. The types of data the manufacturing industry may need to collect and organize will center around raw materials, product manufacturing methods and times, inventory locations and amounts, shipping information, etc. The structure of the data used by computers in these two industries may have similarities, but it's certain that the data structures won't be identical. A linear data structure is simply a data structure where the data in the structure are organized one after the other - basically, a list. EXAMPLE: A list of the states in the U.S. Each element of the structure, conceptually, comes right before or after another element. When speaking about arrays, "dimension" has a specific meaning. A one-dimensional array is a linear data structure. The last program we wrote was a one-dimensional array. A two-dimensional array is basically an array of arrays. Essentially, you could think of this as a grid of rows and columns, where each entry in the grid is itself an array. You will explore this in the next section.
Iteration:
To iterate means to say or do something again; to repeat something. An iteration is the act of repeating. Iteration means to go through a defined series of actions, repeating a certain number of times. Usually this defined series of actions is repeated a certain number of times, or until a condition is met. EXAMPLE: Computer programs are usually created in iterations: Coming up with a basic working version, reviewing the program for mistakes to correct and improvements to make, doing that work, and repeating. This can be continued indefinitely. Another example is: You tell the computer to go through a list of 33 students in a class. Each time the program gets a name from the list, it is to check whether the student's grade point average is above 3.5. If it is, the program is to print the name of the student to the screen. This would mean the program iterates 33 times through the steps of: 1: 'grab the next name' 2: 'check the GPA for that name' 3: 'if the GPA is greater than 3.5, print the name to the screen' 4: 'repeat steps 1 through 3 unless you are at the end of the list of names' Each time through this series of steps is called an iteration. The process of going through these steps for all the names in the list is called iterating.
traversing
Traveling through
MOVING SHAPES You can also animate shapes and move them around. Write and execute the following code:
Triangle = Shapes.AddTriangle(50, 100, 100, 50, 150, 100) Program.Delay(1000) Shapes.Animate(Triangle, 200, 200, 1000)
TURTLE TRIANGLE Now let's have the turtle draw a triangle. Write and execute the following code:
Turtle.Angle = 45 Turtle.Move(150) Turtle.Angle = 135 Turtle.Move(150) Turtle.Angle = 270 Turtle.Move(210) ' just sayin they didn't finish'
MOVING TURTLES You can move the turtle by entering in numbers inside parentheses (1 means that the Turtle moves 1 pixel; Turtle.Move(50) means that the turtle moves 50 pixels). Write and execute the following code:
Turtle.Move(50) Program.Delay(500) Turtle.Move(25) Program.Delay(500) Turtle.Move(75) Program.Delay(500) Turtle.Move(35) Program.Delay(500)
TURTLES Write and execute the following code:
Turtle.Show()
RAINBOW TURTLE Let's make a shape that's virtually a circle. We will also use the X and Y Coordinates to place the turtle where we want it in the Graphics Window. And, to make it more fun, let's randomize some colors! It's about to get trippy... Write and execute the following code:
Turtle.X = 20 Turtle.Y = 200 Sides = 200 Angle = 360 / Sides Size = 1000 / Sides For A = 1 To Sides GraphicsWindow.PenColor = GraphicsWindow.GetRandomColor() GraphicsWindow.BackgroundColor = GraphicsWindow.GetRandomColor() Turtle.Move(Size) Turtle.Turn(Angle) EndFor
IDENTIFIERS - CONTINUED2
We can also use identifiers to name other things in programming languages beside variables. Another important use for identifiers is giving names to values that remain the same throughout a program. These values are called constants. A good example of a value that can be used as a constant is sales tax. In Virginia, the sales tax is 4.5% so we can represent this by creating a constant called TAXRATE and associating it with the value 0.045. Now whenever we need the value for the sales tax, we can use the name TAXRATE to refer to it. You might be wondering why we even bother to give a name to the value for sales tax. Why not simply use the value 0.045? The answer is that by using constants, we can easily modify our program to run under different conditions. For example, suppose a friend who lives in Tennessee wanted to use your program to compute sales tax. Since the sales tax in Tennessee is 6%, he will need to change all the sales tax computations to use 0.06 instead of 0.045. This modification is very easy if the program uses the constant TAXRATE. All he needs to do is associate the identifier TAXRATE with the new value of 0.06. Another advantage of using constants is that they make our programs more readable. The identifier TAXRATE is much more readily understood than the number 0.06. As we stated before, both variables and constants are named using identifiers. However, the purpose of variables and constants is very different.
GRAPHICS WINDOW
You can customize certain aspects of the Text Window and how it displays. We touched upon this earlier with foreground color and background color. There is also a graphics window. Graphics are pictures displayed on a computer. Graphics are art created on a computer by a person. Like the Text Window that displays text, Small Basic also has a Graphics Window for graphics. Enter and execute the following code: GraphicsWindow.Show()
List of Colors in Small Basic
https://blogs.msdn.microsoft.com/smallbasic/2015/06/20/the-hex-colors-in-small-basic/
MORE CONDITIONAL STATEMENTS
start: TextWindow.Write("Are you a vegan?: ") Vegan = TextWindow.Read() If Vegan = "Yes" Then TextWindow.WriteLine("I know, you've told me already. Several times...") ElseIf Vegan = "No" Then TextWindow.WriteLine("Looks like meat is back on the menu!") Else TextWindow.WriteLine("Please enter Yes or No.") Goto start EndIf
Boolean:
A Boolean is a data type that has only two possible values: "true" and "false." It is used in computer operations that compare one or more conditions. This is a key tool in using computers to perform different sets of operations based on the condition of certain pieces of data. It is based on Boolean logic, a form of logical analysis in which the only possible results of a decision are true and false. This logical system is based on the work of George Boole, an English mathematician, educator and philosopher. A Boolean variable would be declared and assigned like this: Boolean [variable name] = [true or false] EXAMPLE: You could have a computer keep track of whether or not a specific employee is allowed to access the company bank accounts with a Boolean variable called "AllowedFinancialAccess." You could set it to "false" like this: Boolean AllowedFinancialAccess = false Booleans are a vital part of computer programming since they are used with computer instructions that compare conditions and then execute one of two or more possible actions based on the comparison.
1) Entrance
A computer is a simple machine when you get down to it. It can only do one thing at a time, and it performs a computer program's instructions in the exact order in which the computer programmer puts them. It can only execute (perform, or run) an instruction if it is directed to. This means that any computer program has to have a clearly marked "first instruction". This is the first task that the computer will perform when the computer program is started. From that point forward, each instruction in the program will direct the computer what instruction to perform next after it performs the current instruction. There are different ways to specify the entrance point, depending on which computer programming language is being used - but every computer program has a defined entrance point.
Intellisense
A feature in the Integrated Development Environment "Visual Studio" that helps aid rapid software development by helping to predict what you may want to type when you are writing computer code. This picture shows the use of Intellisense; it's similar to predictive text on your cell phone:
Field:
A field is space in a data structure that is reserved for particular information. It is the smallest unit of information a user can access. Fields have certain attributes associated with them (numbers, text, etc.) EXAMPLE: In a spreadsheet, fields are called cells. Another example: when you are filling in a form on your computer, each box where you enter in data is called a field.
Float:
A float is a data type that represents fractional numbers. This could be numbers like 5.3, -8.92, 1024.00, 3.14159625 etc. The behavior of this data type includes mathematical operations like addition, subtraction, etc.
Primary Key:
A key is a piece of data that is used to uniquely identify a specific row in a table in a database. No two rows in a table can have the same key. If someone attempts to add a row to that table with a key that is the same as a key used in an existing row, the row will not be added to the table. EXAMPLE: In the real world this would be a Social Security Number - many people may have the same exact name, but no two people can have the same Social Security Number. The SSN is therefore a "unique identifier" for an individual citizen. In database tables, primary keys are often numbers - for example, "32546" or "33298." The important thing is that no two primary keys are ever identical. Often, these primary keys are called "ID"s, where "ID" stands for "Identification." This is because the primary key "identifies" the unique row in the table.
List:
A list is a collection of objects, where the objects are of a specific type, organized as a list of one object after another. A common example of this is a list where the objects in the list are decimal numbers. Usually, a list is written out using square brackets at the beginning and end of the list: [4.5, 3.14159265, 234.789] This list has three 'elements' - that is, three distinct objects in the list. One important thing about lists is that each object in the list has two things about it that are kept track of by the computer - its value, and its position in the list. Each object in a list is called an 'element'. The position of an element in a list is noted using what is called an 'index'. This is a number that tells where, in the order of the elements in the list, that particular element can be found. Usually, these index numbers start at the number zero, and count up from there. That is, the first element in the list would have an index of 0, the second would have an index of 1, and so on. Index numbers are often written in square brackets, much as the entire list itself can be written between square brackets. In our example above, the element at index [0] has a value of 4.5. Lists are very useful. The objects stored in a list can be objects of any type that the computer can keep track of. This means that you can have a list where the objects stored are of type string: ["cat", "bird", "chicken hawk", "Sylvester"] You can have a list where the objects are of type integer: [65, 2, 333, 678, 49, 19435] As a software developer, you will also be creating your own objects. These can be put in a list. As an example, let's say you've created a class of objects that's meant to represent customers of a business. You've called this class 'Customer'. To refresh what this means: You'll have defined the properties of the Customer class ('name', 'customer type', 'standard discount', etc.); you'll also have defined the actions that can be performed on a Customer('Activate', 'Deactivate', 'Create', 'Delete', etc.). As your program is used, new objects of type 'Customer' will be added. You could have three 'Customer' objects, for example. They could look like this: Customer object one: name='John Jones' customer type='Retail' standard discount='10%' Customer object two: name='ACME Plumbing' customer type='Wholesale' standard discount='45%' Customer object three: name='Sheryl Anderson' customer type='Retail' standard discount='14%' You could create a list of Customer objects that looks like this: [Customer object one, Customer object two, Customer object three] The Customer object at index 1 would be the Customer object whose name property has the value 'ACME Plumbing'.
Patch:
A piece of code added to a software program in order to fix a defect or add additional functionality, especially as a temporary correction. It is called a patch because it is a small set of instructions, meant to handle a specific, tightly-defined part of the program. It is contrasted with a full version of the program, in which many areas of the program might have new functionality. EXAMPLE: If there were a tax-preparation software, and a defect was discovered that could cause incorrect calculations of individual tax refunds, a patch might be sent to users of the software. Once installed, the patch would correct the defect in the program.
Registry:
A place where records are kept. In Windows computers, the registry is a database that stores setting for the operating system and some applications. The registry contains data, options, settings, and other information for hardware and program installed on the Window OS. EXAMPLE: When a program is newly installed, instructions related to the program (such as how to start the program and which version of the program it is) is stored in the registry.
File Transfer Protocol:
A protocol is a set of rules governing the exchange of data between devices. File Transfer Protocol is abbreviated "FTP." This is the standard protocol used to transfer files from one computer to another computer, using the Internet. EXAMPLE: If you were maintaining a web site, you might be creating some of the electronic files that make up the web site on a computer at your office, but you'd need to send those files to the web server. You could send those files from your computer to the web server using an FTP client program. That program would copy the files, format them to conform to the File Transfer Protocol, and then send them to the web server. The web server, itself equipped with FTP client software, would receive the files and store them in its memory storage.
Floating point:
A specific way of representing large numbers. Instead of writing out the entire number, you can write the first part of it and then a factor to multiply it by - such that performing the multiplication will get you pretty much the same number you would have written out in full. When you do this, you move the decimal point in the number - hence the name "floating point." EXAMPLE: Take the number three thousand, four hundred and twenty-five. Written normally it would be: 3425; written in floating point notation, it could be: 3.425 x 10³. Since 10³ is 1000, this means "3.425 times 1000," or 3425. Remember that 10 to the 3rd power is one thousand - which means: "Take the number 3.425 and multiply it by one thousand." That would, of course, give you 3,425. This is called floating point because you don't HAVE to have the decimal point in the same place when using floating point representation. For example, you could use this floating point representation for the exact same number above: 34.25 x 10² Or you could use this: 0.3425 x 10⁴ These all resolve to the same amount: 3,425. This method of writing and storing numbers is especially useful when dealing with very large numbers. For example, if you were dealing with this number: 4,275,982,213,844 Storing this number in a computer would take up a lot more memory than storing a smaller number like 3,425. As a trade-off between the magnitude of the number represented, and the accuracy of the number represented, you can use floating point representation. For example, the above large number could be represented as: 4.275982 x 10¹² This would be the same as: 4,275,982,000,000 (the original number was 4,275,982,213,844). You would lose some accuracy, but use much less memory to store the number. There are times when utilizing a floating point is useful; depending on the situation.
Stack: 2.
A stack is a combination of software systems that creates a platform that makes it so no other components are needed in order to support a program. The other terms for this are software stack or solution stack. EXAMPLE: In the case of a stack to support a web application, for example, it is a specific combination of the following items: An operating system A web server program A database management system A programming language With a set of those four items that can work together, a complete system exists for a web application to operate: there is a machine that has an operating system installed, the computer is running a web server program that is ready to respond to requests for web pages; there is a programming language that can be used to write programs that will run on the server to implement the logic of the web application; and there is a program to facilitate the creation and use of databases so the web application can make use of stored data as it operates.
Unicode:
A standard for representing letters and symbols in computers. Unicode is intended to represent all languages across the world. Each letter and symbol of the various languages of the world has a specific number in the Unicode system. This is important because computers are much more useful if they can display data in the language of the user. Computer programmers needed a way to clarify what letters or symbols to use in their programs if the user wanted the data displayed in another language. It was necessary that all computer manufacturers agree on this system so that computers could be used everywhere.
SUBSCRIPTS
A subscript is text written below a line, such as: ₁ ₐ ₂ ₑ ₃ ₒ ₄ ₓ ₅ Subscripts can be used to indicate the base number system. As covered earlier, the base of any number system is determined by the number of digits in that system. EXAMPLE: Binary is a base-2 number system. The way to display that we are talking about a binary number would be 10011₂ (this would be 19). The way to display that we are talking about a decimal number would be 19₁₀ (which is 19).
3) Variables
A variable is a piece data that a computer program uses to keep track of values that can change as the program is executed. This might be something like "the grade of the student paper that was just graded," or "the color of paint to use for the next car on the assembly line." Variables are a vital part of any computer program, because they make it so a computer program can be used for more than a single, pre-determined set of values. You can imagine that if "the color of paint to use for the next car on the assembly line" was only ever able to be "blue," the computer program using that data wouldn't be very useful. It would make a lot more sense to make it so the computer program could change that value for each car that was going to be painted. When you are writing variables in a computer program, they usually are written in a manner like this: [name of the variable] = [value of the variable] For example, you might have something like this: color = "red" Here, the variable is named "color", and the value of that variable has been set to "red." In other words, the variable named "color" is now "equal" to the word "red."
Pointer:
A variable who's value is the address of another variable. The pointer "points to" another value stored somewhere else. Basically, it is a link. EXAMPLE: Let's say that Y has the address "0003" in memory. Then we assign X the value 0003. X would "point" to Y's address (0003). In this case, X is the pointer.
Assembler
A(n) _____ breaks code down into machine language (1s and 0s).
Web Application:
An application is a computer program. A web application is a computer program that uses both the browser and the web server to accomplish its functions. The browser handles the display of information to the user and gives the user a place to enter instructions for the program. The web server handles various data processing actions based on the user instructions. Note that this differs from the way many computer programs work, where the entire program resides on your computer. Programs installed on your computer are referred to as "console" or "desktop" applications. EXAMPLE: Gmail is a web application.
4) Sub Programs:
As covered earlier, computer programs are generally executed in order, from the start point to the end point. This is called the "path of execution." The main series of instructions in a program is called the "main program." It is sometimes valuable to create another program that can be used by the main program as needed. This is called a sub program. It is no different from any other program - it is made up of the same elements (entrance point, variables, control & branching statements and exit point). However, a sub program isn't used all by itself. Instead, the main program can execute the subprogram as needed. Here, the main program stops executing, and the sub program starts executing. When the sub program is done executing, the main program continues on where it left off. This is called "calling" the sub program - that is, the main program calls the subprogram, the sub program starts and stops, and the main program continues on. This is useful in creating programs because the computer programmer doesn't have to enter the instructions of the sub program over and over - you only type them in once, and then when you need that subprogram to be called by the main program, you only have to type in one instruction - the instruction to call the sub program. This lets you reuse the instructions you entered in for the sub program, rather than rewriting them.
Windows Azure:
Azure is a bright blue color. It also refers to a small butterfly that is typically purple or blue. Windows Azure (simply referred to as "Azure" for short) is a set of tools from Microsoft used for cloud computing. Azure has tools for storing and managing databases, storing and running software programs, etc. - all on computers that aren't located where the user is. The advantage is that the user (and their company) doesn't have to pay for the personnel and equipment needed to have all those computers operating. Since the computers that are being used are owned and managed by another company (Microsoft in this case), the owners can use them more efficiently and charge the users less money than the users would have to spend if they had to handle the personnel and equipment themselves. EXAMPLE: Many companies host their websites and web applications on Azure.
INHERITANCE
Certain computer programming languages implement another concept related to this concept of "classes": They allow for the definition of classes that inherit the structure and behavior of another class, while also allowing for the addition of new properties and new behaviors. This concept is called "inheritance" - that is, the second class "inherits" the structure and behavior of the first class. In this system, the first class is called the "parent" class and the inheriting class is called the "child" class. Using our "Vehicle" class as an example, the programmer might create child classes like "Airplane" and "Helicopter". Each of these child classes would automatically get the structure and behavior of the parent class ("Vehicle"), but the programmer could add certain structure and behavior elements particular to that type of object. For example, the "Airplane" class might add properties like: 1. A number of wings to provide lift 2. A number of engines This "Airplane" class might add behaviors like: 1. Take off 2. Land This way of programming adds certain benefits for the computer programmer. One primary benefit is that they don't have to write the same code more than once. Besides the fact that it saves time, this is valuable because the programmer can make a change in the parent class and all its children then can make use of that change. For example, the programmer might add the properties to the Vehicle class "A number of passengers" and the behaviors "Load a passenger" and "Remove a passenger". Now, the children of the Vehicle class ("Airplane" and "Helicopter") can use those properties and behaviors with no further work from the computer programmer.
WHAT IS CODING?
Coding is computer programming. Computer programming is the act of creating computer programs, which are prepared sets of computer instructions designed to accomplish certain tasks. Programming consists of typing exact commands and instructions into a computer to create many of the things we use on computers on a day-to-day basis. To do computer programming, you must learn at least one programming language and use this language to create things on a computer that others can use. EXAMPLE: The program on your computer entitled "calculator," which you can use to do math, is the result of computer programming. Coding also refers to the creation of websites. Another word for these programs is "software". This is because the actual computer (the physical machine) is called "hardware." Therefore, the programs that run on that machine are called "software." The terms "coding" and "development" mean the same thing as programming. A software developer is a computer programmer; so is a coder. Programming is a spectacular thing because it is one of the few skills that apply to virtually all industries. Yes, companies that create software definitely utilize coding the most - but if you think about it, most industries utilize technology (software, websites, databases, etc.) And so, coders are valuable assets for companies in any industry - construction, food service, retail, transportation, etc. There are many, many programming languages, and technology is ever-changing. The whole thing can be quite overwhelming, but there are basics that apply across the vast landscape of technology. In general, the instructions in computer programs are executed in order, from the top down.
2) Control/Branching
Computers are often used to automate actions that would otherwise be performed by people. One of the most common things a person will be asked to do in performing a job is to assess the condition of a thing and, based on the condition of that thing, choose between two or more possible courses of action. In other words, they will have to make a decision. An example would be the activity of "a teacher grading a stack of papers": Take the next student paper from the top of the stack. Grade the paper. Write the grade on the paper. If the grade is 70% or higher, put the paper in a "Passed" stack. If the grade is below 70%, put the paper in a "Failed" stack. You can see that there are two possible "branches" here. A branch is: "a possible course of action arising from a decision". Think of it as what happens when you come to a fork in the road. You have to decide on a course of action - which road do you take? All but the simplest of computer programs will need to do the same thing. That is, they will have to check the condition of a piece of data, and, based on the condition of that data, they will have to execute different sets of computer instructions. In order to do this, the program will make use of special computer instructions called "control" instructions. These are just instructions that tell the computer what to look at in making a decision, and then tell the computer what to do for each possible decision. The most fundamental control statement for a computer is "if". It is used like this: IF [condition to check checked] THEN [branch of computer instructions to execute] Here, the "IF" is the control statement; the "THEN" is the pointer to the branch of the program to execute if the control statement is true.
Mapping: 2.
Creating a table that shows how the elements of one set of data correspond to the elements of another set of data. EXAMPLE: Let's say you had two schools that were going to start sharing performance data in order to increase their effectiveness. School A has a set of data with the following categories: StudentNameFirst StudentNameLast GradeLevel GradePointAverage School B has a set of data with the following categories: FirstName LastName GradeLevel GPA Even at a glance, you can see the the two schools are tracking the same types of data; they just have different names for some of the categories of data. A "mapping table" could be created that looks like this: SchoolA | SchoolB StudentNameFirst | FirstName StudentNameLast | LastName GradeLevel | GradeLevel GradePointAverage | GPA You could say that "SchoolA.StudentLastName maps to SchoolB.LastName." This "mapping table" is an example of an "associative array" - an array that describes the association between two different sets of data.
Data Type:
Data is information. There are many different kinds of information. Common types of information used in computers could be letters and numbers. When information is used in a computer, that information will have a "data type." This is two things: "what kind of information is this?," and "what kind of things can we do with this data?" Different data types can be used in different ways. When data is stored in a computer, its type is also stored - that way the computer knows how to work with that particular piece of data. The various different things you can do with data are called operations. Not all data types have the same operations available to them. EXAMPLE: "Decimal numbers" (0-10) is a data type. Typical operations you could do with decimal number data are addition, subtraction, multiplication, etc. "Text" is another data type. Typical operations you could do with text data are "convert the text to uppercase" or "concatenate." (Concatenate means to link together, as in a chain. For example, you could take the individual text elements "purple" and "?!," and then concatenate them into "purple?!," etc.) When creating computer programs, every piece of data being kept track of by the computer is a certain type of data. For example, the datum 342.98 is data of type "decimal." The datum "casserole" is data of type "text." It would not make sense to apply mathematical operations to text data - for example, trying to tell a computer to add the number 34 to the text "banana" wouldn't work - because the two types of data are different, and mathematics don't apply to text data.
Hexadecimal:
Hexadecimal/English: 0 = Zero 1 = One 2 = Two 3 = Three 4 = Four 5 = Five 6 = Six 7 = Seven 8 = Eight 9 = Nine A = Ten B = Eleven C = Twelve D = Thirteen E = Fourteen F = Fifteen Hexadecimal (abbreviated "hex") is used in computers to represent binary numbers, and is commonly used to specify the name of a computer memory address. The place value of the hexadecimal number system can be diagrammed as follows: 65536 | 4096 | 256 | 16 | 1 Meaning: in hexidecimal, the following numbers are as follow: 1 (hex) = 1 (decimal) 10 (hex) = 16 (decimal) 100 (hex) = 256 (decimal) Some more examples: EXAMPLE: A (hex) = 10 (decimal) EXAMPLE: 1B (hex) = 27 (decimal) (That is one "16" and eleven "1"s) EXAMPLE: 2AF3 (hex) = 10,995 (decimal). In binary, 2AF3 would be 0010101011110011. Hexadecimal is beneficial for two main reasons: 1) You can display large numbers with relatively few characters. 2) It is easily translatable into binary.
Mapping:
In general, mapping is the creation of a system that connects one thing to another - essentially, it answers the question "how do I get from here to there." In computers, this can take on any one of several different meanings or applications. Examples include: 1. Establishing a connection from one computer to another computer or device in a network. EXAMPLE: In a small business, you might have three computers, a printer and a fax machine. If you connected all of these physically using computer cables, you would still need to go to each computer and establish a connection so that the computer programs on each computer could locate the other computers, the printer and the fax machine. That way each computer could transfer information back and forth between itself and the other computers or devices. The process of establishing that connection to another computer or device is called "mapping" the computer or device.
Object Relational Mapping:
In general, mapping is the creation of a system that connects one thing to another - essentially, it answers the question "how do I get from here to there." Object Relational Mapping is abbreviated "O/RM." Essentially, it is a program that maps between objects in a program and tables in a database. In the database, you will find tables of data along with descriptions of how the data relates to other data in the database. In the computer program, you will find objects. Often, the tables in a database correspond to types of objects in the program. Each row in a particular table might correspond to a particular object of a certain type. As the program operates, it may change the state of a particular object. In order to keep a record of that object's new state, you might want to make a change to the row in the database that represents that particular object. Writing a program that does this is time-consuming. It is a very common thing that's needed in many situation. This task is made easier through the use of an Object Relational Mapper program. It can keep track of the mapping between various object types in a program, and the corresponding data in a database, and ensure they are kept in sync. EXAMPLE: If you had a program that kept track of the inventory of a custom bicycle manufacturing company, and that program used a database to keep a permanent record of all bicycles built and sold by the company, you might use an Object Relational Mapper to help your program keep itself in sync with the data in the database.
Variable:
In math, a variable is a symbol used to represent an unknown quantity or a quantity that may change. In computers, a variable is a construct (an idea formed from simpler elements) used to store data that may change as the computer performs its tasks. Computers often have to keep track of various pieces of information. These can be things like the name of a computer user, the color of the background shown on the computer screen, an order number for something a user ordered from a company, etc. The computer usually gives each of these pieces of data a NAME and a VALUE. The NAME is used to identify the exact piece of data, and the VALUE is used to show the actual data we need to keep track of. These things the computer is keeping track of are usually called "variables." This is because the VALUE part of it can change when you tell the computer to change it. The fact that the value can vary is why it's called a "variable" - its value is not permanent or constant. Usually the "=" symbol is used to set the VALUE of a variable. When the "=" symbol is used to set the value of a variable, it is usually used like this: [NAME of the variable] = [VALUE that is being assigned to that variable] EXAMPLE: fabricColor = "blue." Here, there is a piece of information that the computer is keeping track of that has been given the name "fabricColor." By using the "=" symbol, we can set the value of the piece of information called "fabricColor." In this case, we are setting that value to the series of letters in the word "blue."
Black Box:
In science and engineering, a black box is a system where there is a transformation between the input and output without visually seeing and understanding what occurs between. It is called this because it is figuratively a black box that is in between the process of inputting something and getting some output. This concept is used often in a variety of ways in computers. What it is based on, though, is the concept that the system takes in data, does something based on that data, and delivers an output - and the user doesn't get to see what is being done inside the system. They only get to see what goes in and what comes out. EXAMPLE: When playing a video game on a console, the system that allows the user to control the actions on the screen is a "black box." The player moves the joystick, presses buttons, etc. and inside the joystick and the console many actions take place that the user doesn't see. All that is observed by the user is the input (moving the joystick) and the output (the display on the screen changes in accord with the movement of the joystick).
Method:
Method: A method is another word for a subprogram. One of the fundamental parts of a computer program is the concept of a subprogram - repeatable sets of instructions that are only written once, but that can be used as many times as needed throughout the time the main program is functioning. When the main program needs the work done that the subprogram was created to do, it "calls" the subprogram - that is, it uses a simple instruction to tell the computer to run that subprogram, and once the subprogram is done, to return to the main program and keep moving through the instructions in the main program. Often, the main program will need to give the subprogram some information that it needs in order to perform its tasks. Often, the subprogram will do its work and then provide the main program with some information derived from its work. EXAMPLE: A subprogram could be written that calculates the average of a set of numbers. The main program could provide the subprogram with a list of numbers. The subprogram would calculate the average of the numbers. The subprogram would then return that average to the main program. The main program would then continue executing its instructions. It could call on that subprogram again whenever needed. One of the main reasons for creating subprograms is so that the people creating programs don't have to write the same set of instructions every time they want that particular set of actions to occur - instead, they just use the subprogram. In addition to method and subprogram, there are other words in technology for this concept: function, subroutine, routine.
NUMBER SYSTEMS:
Number systems are also referred to as "numeral systems." A number system is a system for writing numbers, where numbers are mathematical objects used to count, label and measure. Number systems usually have a few key elements: Digits: A digit is a symbol used to represent a certain quantity. Some of the digits you're used to using are 2, 3, 7, etc. A number system is named for how many unique symbols it has available as digits. The number system used in most parts of the world has ten symbols, or digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. It is called the decimal system because the prefix "dec-" comes from the latin word for "ten". There are other number systems that have more or fewer symbols; decimal is the most popular number system in the world. Base: The base of a number system is just the total amount of symbols, or digits, used in that system. The decimal number system has a base of ten. Place: A position of a digit in a written number, where the position affects the value of the digit used. The decimal number system has places like "ones place", "tens place", "hundreds place", etc. A number system is concerned with how many digits will be used in counting, doing math, etc., and what symbols will be used to represent those digits. EXAMPLE: There are many different number systems. The one we are used to using, decimal, uses ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.
Expression:
Numbers and symbols and operators grouped together that show the amount of something. An expression is a written math problem. In computers, an expression is a combination of values that are computed by the computer. There are different ways to write out expressions depending on which language you are programming in. EXAMPLE: Name = "What person types in the name box," could be an expression. Also: x + 5 is an expression.
Class:
Objects are created by creating "classes," using one of many specialized computer programming languages. Classes are used to describe one or more objects. This would be created by creating (or "declaring") a class called a "Customer" class. It is important to know that when you first create this class, you are describing the POTENTIAL characteristics and behavior of that TYPE of thing. You will still need to create an actual one of those things. That process is called "creating an INSTANCE" of the class, where "instance" means "an actual one" of the things described when you declared the class. When you do this, the data that makes up the object is kept in the computer's memory. EXAMPLE: In a computer program designed to track pay records for all employees, you could have a class called "Employee." Each program element representing an actual employee (John Smith, Sally Jackson, etc.) would be an instance of the "Employee" class. You would have one instance for each employee you entered into the computer. Each time you created an "employee" object, the computer would first find the "employee" class, and use the definition of that class in creating that particular "employee" instance using the data for the actual employee.
Object-oriented programming:
Objects are items that can be represented in a computer program. They are often meant to represent real-world things. In the world around you, you are surrounded by objects - your dog, the tv, etc. Objects have state and behavior. The state of an object would be the size, color, etc., at any point in time. The behavior of an object would be what the object does - the actions it can take. EXAMPLE: A race car could be an object. Things that described its state at any point in time could be: engine type, engine horsepower, wheel size, gas tank capacity, etc. Things that describe its behavior could be: accelerate, decelerate, turn right, turn left, etc. In computers, objects are parts of computer programs. They share a similarity to real life objects: they have a state and behavior. EXAMPLE: A program might work with a "Customer" object. Again, the state of an object would be the characteristics and attributes of the object, and the behavior would be what the object could do. In our example, our "Customer" object could have states like 'active' or 'deleted'. It could have behavior like 'Upgrade Rewards Level' or 'Add to Family Account'. Objects are often one of the first things you think about when designing a program. EXAMPLE: Let's say you had a computer program that let you design and order a bicycle from a custom bicycle company. That program would have a written description of the state and behavior of a bicycle. Once you started designing and ordering an actual bicycle, the program would create an actual "bicycle" object within the computer, and its state and behavior would be affected by the choices you made in designing and ordering the bicycle. There are different approaches you can take to programming. Object-oriented is an approach to programming that focuses on objects and data (as opposed to consecutive actions or some other approach). The first step in OOP is determining what types of objects you are going to be dealing with and how all the objects relate to each other. In particular, you would look at how some objects might be created that were based on state and behavior of other objects. OOP is a popular approach to programming computers that is used in many languages. EXAMPLE: If you were creating a program designed to help people operate a school, you would likely make a list of the different types of objects you'd need to work with in the program: "Student", "Teacher", "Class", "Exam", "Classroom", etc. You might then start describing the behavior of each object, and whether there might be other objects that could be created which would depend on one of those main objects for their state and behavior - for example, you might need a "Full-time Student" object and a "Part-time Student" object; they could inherit their state and behavior from the "Student" object.
Parent Class:
Objects have state and behavior. A class is a description of an object. A parent class is a class that other classes (referred to as child classes) derive properties and behavior from. EXAMPLE: A parent class could be "Insect," with the following states and behaviors: awake, asleep, move and eat. You could then create a child class called "Ant," which automatically would contain the states and behaviors contained in the parent class (awake, asleep, move and eat).
CLASSES
One of the more important custom data types a programmer can create is a type of object called a "class". Classes are not actually objects themselves. Instead, they provide a template that actual objects can be created from. The programmer defines the structure of a potential object, as well as the behaviors available to that potential object. Then, when the program needs to make use of an object of the type defined in a certain class, the program created an actual object of that type, gives it state, and then performs the behaviors defined for it in the class definition. This action of creating an actual example of the object defined by a class is called "instantiation", and the created object is called an "instance" of the class. Objects so created can also be referred to as a "class object" or "class instance." You can think of the class definition as an answer to the question of, "If I were a [type of object], what would I look like and what could I do?" Here, "what would I look like" refers to the structure of the potential object, and "what could I do" refers to the behavior of the potential object.
Public:
Open to or shared by all the people of an area. In C#, public is an access modifier used to denote that this piece of code is available to any other part of the program. EXAMPLE: OpenSource software is public.
GUI:
Pronounced 'gooey'. Stands for Graphical User Interface. The User Interface is the elements on a computer display that a user utilizes to interact with a computer program. It is where they type things in and click with the mouse, for example. This is where interaction between a machine and a user occurs. A user interface is important because a computer program usually needs some sort of user interaction in order to perform its function. EXAMPLE: If you had a computer program that was used to enter in orders for a bicycle program, the user interface would likely have an order form on the screen. Graphical means having to do with images created on a computer screen. An interface is a common point or boundary between two things. In the computer world, an interface is a device or program that enables a user to communicate with a computer. When computers were first being developed, the interface between user and computer was entirely text-based - all input and output was done in text. To access a file or program on the computer, the user would enter instructions, in text, that found that file or program and then opened or started the program. This was a challenging interface to use, as the user had to create a picture in his head of the arrangement of files and program on the computer. The development of a graphical user interface was a major event in the history of computers. A Graphical User Interface is a representation of the various objects in a computer - files, programs, etc. - in a graphical form. That is, it presents the user with pictures and diagrams that communicate the things on the computer, and their arrangement. The pictures are not the things themselves; they are a graphical representation of the things. It is much easier for a new user to move a file from one location to another by dragging the picture of a file with the mouse than by having to remember and type complicated commands to accomplish the same task. EXAMPLE: If you have an image of a folder on your computer, and an image of files inside that folder, that is actually a graphical representation of how those files are stored in the memory of your computer. When someone refers to a graphical interface, they are referring to a GUI.
Data structure:
Refers to the organization of related pieces of information. There are different data structures that each allow different operations to be performed on the data. A data structure refers to how the data is organized in terms of implementation (use of the data; relation of the various parts of the data). It is a particular way to organize data in a computer so that it can be used efficiently. EXAMPLE: Consider two different areas of business: The shipping industry and the manufacturing industry. The types of data the shipping industry may need to collect and organize will center around vehicles and their capacity, shipping rates, fuel costs, travel times between various geographical points, etc. The types of data the manufacturing industry may need to collect and organize will center around raw materials, product manufacturing methods and times, inventory locations and amounts, shipping information, etc. The structure of the data used by computers in these two industries may have similarities, but it's certain that the data structures wouldn't be identical.
Opcode:
Short for operation code. An opcode is part of a machine instruction. Opcode specifies the exact operation that is to be performed. It is a series of binary numbers that the CPU is set up to understand, that tell the CPU the exact action it should take. EXAMPLE: If a machine instruction looked like this: 0111011010, the first three digits ('011') would be the opcode. For a certain brand of CPU, this opcode could mean 'Add a number to an earlier number'. The other part of the machine instruction could give the actual number to be added to the earlier number.
Operation:
Something a computer is designed to do. An operation is an action or set of actions created by a person that makes a computer do something. EXAMPLE: If you set your computer to turn the screen black every five minutes the computer is undisturbed, the computer performs an operation to dim the screen each time five minutes pass where the computer is untouched. In math, an operation is a process in which a number is changed or handled by addition, multiplication, division, etc. EXAMPLE: 5 X 5 = 25 and 20 ÷5 = 4 are math operations.
ASCII:
Stands for "American Standard Code for Information Interchange." An ASCII chart provides a standard way to represent text characters using numbered codes. These include upper and lowercase English letters, numbers, and punctuation symbols. In this system, the commonly-recognized English letters, numbers and punctuation marks each have a unique number that identifies them. This helps computer manufacturers by providing a standard way to refer to every character used in the English language. ASCII uses binary numbers with 7 digits to represent each character. Often, these binary numbers are converted to decimal to make them more easily read and understood by people.
T-SQL:
Stands for "transact-structured query language". This is a widely-used language Microsoft made to add additional functionality to the basic language of SQL. EXAMPLE: You could use T-SQL to get data into and out of databases that are managed using Microsoft database management software.
MS-DOS:
Stands for Microsoft Disk Operating System. One of the early popular operating systems for personal computers was MS-DOS. This was an operating system that Microsoft created for the multinational technology company International Business Machines (IBM) in the early 1980s. MS-DOS was initially used for personal computers manufactured by IBM; later, many computer manufacturers began creating computers based on the IBM design, and these computers usually used MS-DOS as their operating system. EXAMPLE: MS-DOS is not in use any longer but if you bought a computer in the mid 1980s, it would likely have MS-DOS installed.
RDBMS:
Stands for Relational Database Management System. A Relational Database Management System (RDBMS) is a type of computer program that lets you manage relational databases. It is not the databases themselves; it just helps you run the databases. Programs are written instructions, entered into the computer, that make it perform certain tasks. EXAMPLE: If you were called upon to handle a database issue at work, you could download a RDBMS software program for your computer. There are many such software programs available.
SQL:
Stands for Structured Query Language (pronounced "see-quill" or "S-Q-L"). In order to understand SQL, you must know what "query" means. A query is a specific instruction to a computer to search through a database and collect all data that matches a certain set of criteria. EXAMPLE: Say you had a database that stored sales data for a bicycle manufacturer. If you were trying to analyze sales trends for the company, you might want to create a query that searched the database and gave you "all sales since the beginning of the year where the retail price was above $400 and the bicycle color was red." You would create a query to perform that search. You would need a special computer language in order to create that query. Structured Query Language is one such language. SQL is a language used to monitor and handle databases. SQL can edit, change, modify, delete, etc. data in a database.
CLI:
Stands for command-line interface. An interface is a device or program that enables a user to communicate with a computer. The command line is an interface where you can type commands into a computer. The command line allows you to perform many actions, including: moving files, deleting files, copying files, starting computer programs, etc. While these actions are typically done with a mouse, they can also be handled by typing words into a command line. As opposed to GUI (Graphical User Interface; a representation of the various objects in a computer - files, programs, etc. - in a visual form), CLI is where you control a computer and interact with it by simply reading and typing text onto the computer screen. EXAMPLE: If you type: copy schedule.txt "2016/August" "2016/September" into a CLI, you can copy the file "schedule.txt" from a location called "2016/August" to another location called "2016/September."
Stateless:
State is the condition of a person or thing. The terms stateful and stateless are used to describe whether or not a computer program is designed to remember prior events. A stateful program will have a mechanism for keeping track of events as the program is used; a stateless program will not. Stateless means that the interactions between the user and the computer are not remembered. Stateless means that there is no record of previous interactions and each interaction that occurs has to be handled based entirely on information that comes with it. EXAMPLE: A login page that doesn't remember your username or password, even if you've logged in before, would be stateless.
Query:
Structured Query Language (SQL) is a language used to monitor and operate databases. SQL can be used to create and modify databases; as well, it can be used to edit, change, modify, and delete, etc. the data in databases. In general, a query is a question that is usually expressed in a formal way. In coding, a query is a way to ask a database to bring up specific data from the full set of data in the database. Queries are utilized in SQL. For example: SELECT FROM Customer Database would be a query in SQL. EXAMPLE: If you had a database that contained records of all the sales of a large company, you might write a query that gathered the total dollar amount of sales for each quarter of the last year, organized by product line.
SUPERSCRIPTS
Superscripts are smaller characters typically displayed toward the upper right of another number - like this: 4¹² Whereas subscripts indicate the number system we are talking about, superscripts usually indicate "power." Power simply refers to how many times a number is multiplied by itself. EXAMPLE: 4³ would mean 4 X 4 X 4 (which equals 64).
Entity Framework:
The Entity Framework is an O/RM. It gives developers an automated mechanism for accessing and storing the data in the database from within the program code. O/RM is capable of connecting C# code (a programming language from Microsoft) and the database, allowing the user to code and directly interact with the database through using C#. It allows the programmer to code a lot more effectively. EXAMPLE: You could create a whole database, with many tables, and the Entity Framework could automatically create all the C# classes and methods needed to create, read, update and delete data in the database.
REGISTRY
The Windows operating system needs one central place to store data related to how it handles various aspects of its various functionality. For example, a program installed on a computer will often ask the user to specify certain preferences about how the program appears or functions. Those preferences can be stored in the registry. This same concept applies to many of the programs that come built-in to the Windows OS - you may have preferences set for the built-in Paint application, for example - those preferences are stored in the registry. Think of the registry as a built-in database that Windows uses to store settings about the various hardware and software installed on the machine. You can access the registry on your own, as the user of the computer, by using a special program that comes with Windows. It's called 'The Registry Editor'. You can also write code in your programs that accesses data in the registry. Occasionally, you'll be working on a program that uses the registry to store settings. You may need to modify this code, so it's helpful to know what the registry is and how it works. Often, this type of task will be worked on by a more experienced developer. There can be situations where you have to remove and reinstall a piece of software that you're using. Occasionally, the settings from the previous installation of the program can persist in the registry, and cause issues with the new installation. You may need to edit the registry to remove the previous settings. This is something you'll probably want the advice of a more experienced developer on. If you change or delete certain settings in the registry, you may cause problems with certain important programs used by Windows, or even with the Windows program itself - after all, the Windows operating system is itself just a large, complex software program, and many of the settings it uses to operate are stored in the registry.
HOW TO USE THE REGISTRY
The Windows registry is a special location where the OS, software, and driver configurations are managed. Anytime a piece of software is installed, special parameters specific to that piece of software are saved in the form of a "key" and "value" pair within the Registry called a "subkey". Generally, whenever the piece of software is executed, the software will check for these subkeys to help determine aspects such as user preferences. What is stored within a subkey is left solely to the software developer. The data saved may be in the form of a file path, hexadecimal, binary, or string value. While software may be written to silently access and edit subkeys, there really is little need for the average user to make any changes within the Windows Registry without specific instructions to do so by the software vendor. However, there is a tool that users can launch to manage the Window's Registry. This is done by using built-in software called, Windows Registry Editor or Regedit.exe. To do so you would open the RUN command line and type in: "regedit" and press enter. This will launch the regedit.exe. Before you begin to browse or make any changes, it is always the best idea to make a backup of your system's registry before any changes are made. If anything goes awry after you exit the Windows Registry, you may simply double click on the restore file you had exported to reinstate the registry back to its working condition before any changes were made. "Hierarchical" refers to "rank" or "importance." A hierarchical database refers to data organized in a tree-like structure. Data is stored as records which are connected by links. The Windows Registry is considered a hierarchical database of registry entries called a hive. Each root key will branch out into subkeys and each of those subkeys may be further branched out into their own sub-branch of subkeys and so on and so forth... The basic chemistry of a subkey is a Key and a value. When a specific key is highlighted, the value is displayed. To make a change, right click the value field and select, "Modify" and make your changes accordingly. Once satisfied, all your changes may be executed by selecting "Save" under "File" in the menu.
Machine instruction:
The basic job of all processors is to execute various combinations of those simple instructions built into them. It only ever performs one of these instructions at a time, but modern computers can perform billions of instructions per second. All actions you can make a computer do will be composed of various combinations of these built-in actions. These built-in instructions are called machine instructions. A machine instruction is an instruction to your computer written in a form the CPU can understand - machine code. Machine code is data that is composed of a series of 1s and 0s; computers are operated using 1s and 0s since it is very easy to make a machine that only has to differentiate between two different states. When computers are manufactured, the CPU is made so it will obey certain instructions and perform exact actions when given those instructions. The machine instructions are available from the manufacturer of the computer. EXAMPLE: Let's say "10010100 01101011 01011011 01010110" told the computer to "Delete the file called Vacation.doc." The "10010100 01101011 01011011 01010110" is a machine instruction.
Server side:
The electronic files that make up a web site are stored on specialized computers called web servers. These computers accept requests from other, remote computers for specific web pages, and deliver those files needed to make the web page display on the remote computer. The type of program you would use to view web pages is called a web browser. It is this program that would make the requests to the web server for the web site files. In this system, there are two broad areas of operation: computer operations on the web server, and computer operations on the remote computer with the browser program (the "client" computer). These two areas are called "server side" and "client side." When the web server receives a request for a web page, the server may have several computer operations it needs to do in order to retrieve, format and send the web page. These operations are called "server side" operations. Similarly, on the client computer, the web browser may have several operations it needs to do in order to receive, format and display the web page. These operations are called "client side" operations. EXAMPLE: If you requested to view a web page about the top 10 most popular news stories of the week, the server would likely have to execute a computer program that could search through a stored collection of news articles and their accompanying popularity rankings, retrieve the top ten articles, insert the text of those stories into the web page data it was preparing, and then send the web page data back to your computer. Those operations are all server side operations.
Constant:
The name given to a location in a computer's memory that a program has set aside for use in storing data, a situation where the value of the data stored in that memory location will NOT change over time. EXAMPLE: You could program a video game character to always have the same height (6' 0" tall) by creating a constant. It would not make sense to use a constant for the game character's "health" rating, as the character would likely see its health decrease and increase as the video game is played.
End user:
The person or persons for whom a computer program (programs are written instructions, entered into the computer, that make it perform certain tasks) is being developed - the people who will actually use the program once it's been released. This is different from the people who will create and maintain the program. EXAMPLE: In developing video games, the end users would be those who purchase the games from stores.
OBJECTS
The programmer doesn't need to define the structure and behavior of these built-in objects. They are often called "primitive types", in that they are data types that are the simple, well-known, common data types any programming language will need to do usual common operations. The programmer can simply write a computer program that creates objects of those types, gives them a certain state, and performs the built-in behaviors with them. Often, though, the programmer will need to define their own objects. In the examples given above, these are objects like "Student", "Email Processor", etc. Here, the object needed is unique to the problem the programmer is trying to solve through the creation of a computer program. These custom objects, also called custom types, are one of the main tools a programmer has to create useful computer programs. Here, the programmer can represent useful objects, often modeled on real-world objects, that the program can create, modify and delete in order to make a useful computer program.
Private:
The regular definition for this is "belonging to or for the use of one particular person or group of people only." In the popular programming language C#, private is used to protect some section of code from random access so it can't be damaged or changed by other parts of a computer program. An "access modifier" is something that modifies what parts of the program can access a particular thing. Access modifiers are usually applied to variables and methods in a class. Specifically, it means that if something is marked "private," only the things in that class can access it. The word "private" is an access modifier. EXAMPLE: If you wanted a class to have a method that could change a tax rate, and you wanted to protect that method from being executed by another part of the program, you could set the method to 'private', and only other methods in that class could use that method.
Storyboards:
The result of drawing out the basic ideas and sequence of a project. EXAMPLE: When doing your live project later in the boot camp, one of the first things your group may be doing is creating a storyboard that will be used to plan out what and how the program will be structured.
Data integrity:
The validity of data; the accuracy and consistency of the stored data. This can also be used as a verb, where it means "to maintain and assure the accuracy and consistency of data over its entire life-cycle." Often, this term is used when describing the creation and operation of databases. A database is an organized collection of related data, typically for use on a computer. Data integrity is imposed within a database as it is being designed and is consistently maintained through checking to see if the data being added and updated are up to standards. These standards are defined by the database management system (software used to edit databases) and by the software developer. EXAMPLE: Say you have a form you are filling out on your computer in order to sign up for a library card. The data you enter into the form will eventually be stored in a database, where it can be retrieved at a later date by computers. There could be a spot on this form where you have to enter your age. If the database is expecting you to enter a number, and you do in fact enter a number, like "29," the data integrity of the database will be maintained. If you instead spell out your age, like "twenty-nine," it could produce problems if that were actually to be stored in the database. For example, if the computer were to try to identify all people in the database who were older than 21, it would most likely not be able to properly interpret the words "twenty-nine" as a number, and therefore would not identify you as being over 21. That would be an example of not maintaining data integrity. If, on the other hand, the computer checked the data quality before storing it in the database and prompted you to enter a number instead of letters, then it would be an example of maintaining data integrity.
FIVE ELEMENTS
There are five key elements to any computer program: 1) Entrance 2) Control/branching 3) Variables 4) Sub Program 5) Exit
Syntax:
There are many different types of programming languages, each of which was created to fill a specific purpose. Usually a language is created in order to make the creation of certain types of computer programs easier. Every spoken language has a general set of rules for how words and sentences should be structured. These rules are known as the syntax of that particular language. In programming languages, syntax serves the same purpose. Syntax is the rules you must follow when writing computer programs. Each language has its own syntax. Failing to use the syntax of a particular language correctly can mean that whatever program you are designing will not work at all. EXAMPLE: If a computer language required you write "cmd:" (meaning "command") at the beginning of each instruction, that would be part of the syntax of that language. And if you didn't write "cmd:" at the beginning of an instruction, the computer would not be able to process and execute the instruction because you violated syntax.
CLASSES AND OBJECTS (article)
There is a concept in creating a computer program called "classes". A class is an object, created from the mind of the computer programmer, that represents a type of thing the programmer wants to represent in the computer program. Examples of objects include things like "integer", "string", "Student", "Teacher", "Email Processor", "Database Access Service", etc. Objects have three aspects: Their structure, their behavior and their state. Most computer programming languages have certain built-in objects that the programmer gets to use automatically. These are the common data types like "integer", "string", etc. As an example of the concepts of "structure", "behavior" and "state", we can look at the object known as an integer. Structure here is relatively simple: an integer is a quantity - a number. It usually can be positive (10, for example), negative (-1560, for example), or zero (0). Due to the need to manage the use of the available memory locations in the computer, it will have maximum positive and negative limits - say, from 65,536 to -65,535. Behavior here is also pretty straightforward - an integer object has behavior related to mathematical operations. That is, the object can be used to perform operations like addition, subtraction, multiplication, division, etc. State refers to the value or condition of the data represented by the object at any given point in time. Here, with an integer, the "state" is the actual number for a given object of the type "integer" at any point in time. For example, if a program were making use of an integer called "Age", its state might be "24", and be used to represent the age of a person.
Constraints:
Things that hold other things within certain limits or boundaries. In computer science, constraints are used to not allow certain actions by the person using the computer, so the computer can work effectively. EXAMPLE: If you are using a computer to facilitate the sale of bicycles, and if the computer had access to the records of how many bicycles were in the warehouse, a constraint could be created that prevents a salesperson from selling more bicycles than actually exist in the warehouse.
Argument:
This brings us to the concept of arguments. Arguments are the actual data passed to a subprogram when it is called. In the above example, the arguments are are the numbers 25 and 43. This comes from mathematics. In mathematics, there are formulas. These are exact math operations that are done in an exact order. Typically, these math formulas need to be given some initial values to start processing the math steps. Those initial values are called arguments. A subprogram doesn't necessarily need any arguments. Some subprograms may take one argument; some may take more than one. To clarify: when a subprogram is defined, any data items it will need are called parameters. When the subprogram is actually used, the actual data passed to it at that time is called arguments.
Nonlinear data structure:
This is a data structure where the elements of the data don't necessarily follow one after the other. EXAMPLE: A common example is a family tree; parts of it might seem linear, for example, when it lists the children of two parents - but others are not linear. This is clear when you consider the children from two different branches of a family. Conceptually, two pieces of data that represent children from different branches of the family tree do not follow one to the next.
String:
This is a data type, used in computers, that is made out of multiple characters. A string is basically a type of data that connects a bunch of characters. Often these characters signify something to the user. EXAMPLE: In the computer instruction: Print "John is smart" The series of characters "John is smart" is the string.
Bit pattern:
This is a particular layout of bits (binary digits). Binary digits are the numbers 0 and 1, and they are the only digits a computer uses. A bit pattern is the arrangement of binary digits that have been arranged in a sequence. Bit patterns are used to represent numbers, characters, etc. It is a pattern of bits that stand for something. EXAMPLE: In certain instances in a computer, the combination of binary digits "100 0001" is a bit pattern used to represent the letter "A."
Unit Test:
This is a software development process in which the smallest testable parts of an application called units are individually and independently checked for proper operation. This is a method approach of creating a program through continual testing and revision. EXAMPLE: If you were developing an app that handled recording the steps of manufacturing a car, you could have each step of the procedure tested and this would be unit testing.
Console:
This is an input/output device for a computer. It allows the user to view certain data about the computer, and to enter data and instructions into the computer. A console typically consists of a screen (for output) and a keyboard (for input). EXAMPLE: When setting up very large computers, a common arrangement is to have the computer itself in a large room where the temperature and humidity can be controlled, and where physical access to the computer can be controlled. In order for users to see information and enter information, consoles are placed in locations outside the computer room. The consoles are connected to the computer, and computer operators use the consoles to give the computer instructions and see the results of the computer's operations.
Linear data structure:
This is simply a data structure where the data in the structure are organized one after the other - basically, a list. EXAMPLE: A list of the states in the U.S. Each element of the structure, conceptually, comes right before or after another element.
Flow:
This is simply the movement of something at a certain rate, from one point to another. In computer science, when discussing the flow of something, it is referring to the sequence in which computer instructions are executed. Every computer program is different in some form, and certain instructions can change the flow of execution of instructions from start to end. Simply put, flow is the path the computer's instruction execution follows as a computer program is run. EXAMPLE: Opening a new message, typing the message, entering in the address it is being sent to and clicking send could be considered the flow of sending an email.
Assignment:
This is the action of giving a value (description, amount, etc.) to a variable. A variable is something used to represent an unknown quantity/quality or a quantity/quality that may change; it is used to store data for later use. In some programming languages, you assign a value to a variable using an equal sign (=). You are stating that that variable now has a certain characteristic. EXAMPLE: You could write a computer instruction that looked like this: WeeklySalary = $1000.00 AnnualSalary = WeeklySalary x 52 There are two assignments here. In the first line, we are assigning the value "$1000" to the variable named "WeeklySalary." In the second line, we are multiplying the value of the variable "WeeklySalary" ($1000) by the number 52, and assigning that number ($52,000) to the variable named "AnnualSalary." In beginning programming, it is very common to assign letters values, such as: A = 10.
Operand:
This is the number that is being dealt with in a mathematical operation. It is not the action being taken with the number, it is the number itself. EXAMPLE: In 5+6, the operands are 5 and 6. The "+" is the operator.
SQL Server:
This stands for "Structured Query Language Server." SQL Server is a Relational Database Management System computer program produced by the technology company Microsoft. Whereas SQL is a language, SQL server is software. EXAMPLE: SQL Server is one of the most popular computer programs in the world. It is used by many companies to manage their databases.
IDE:
This stands for Integrated Development Environment. An IDE is a set of programming tools for writing software programs. IDEs are a great aid to computer program creation. An IDE often combines many available tools into one place. Essentially, an IDE is software that helps you make software. EXAMPLE: Visual Studio, available from the technology company Microsoft, is one of the many IDEs available for software developers.
UAT:
This stands for User Acceptance Testing. Software testing is a system or process for investigating computer programs to assess their quality. This is done in order to provide those people concerned with the software (business owners, computer programmers, project managers, etc.) with vital information about such things as: How well the software meets the guidelines that were used in its creation Whether there are bugs in the program (errors in a computer program that cause it to produce an incorrect or unexpected result) Whether the software responds correctly to various inputs Whether the software operates within acceptable time frames (response time, etc.) Whether the software can be installed properly on the types of computer systems it is intended for There are many different types of software testing approaches, systems and processes. User Acceptance Testing is a common step in creating computer programs. UAT is typically the final phase in the software development process before the software is made available for full use. In the User Acceptance Testing phase, the software is given to the intended audience to be tested for functionality. EXAMPLE: Before releasing an app to the general public, one should perform UAT.
Call:
To "call" means to demand or direct something. In normal English this could be used like, "This calls for celebration!" In computers, a call is a direction by a main computer program to execute the tasks of a subprogram. A subprogram is a small program that is often used repeatedly to perform specific tasks. More specifically, a "call" happens when a main program temporarily transfers control of the computer to a subprogram. Once the subprogram is done executing, control of the computer is returned to the main program. A program could make many "calls" to multiple subprograms as the program performs its sequence of tasks. EXAMPLE: If you were playing a video game, the video game program could call a "high score" subprogram after every game ended in order to make the words "High Score" pop up on the screen.
Active Directory:
To understand what this word means, first you need to know what is "directory," "service," "authentication" and "authorization". A directory is something (such as a book) which contains listings of information in an organized manner. A service is a system (a group of things that work together in an orderly fashion - a computer system is a full computer set up with everything you need to make it run) which supplies something to other systems. Authentication is the process of verifying that an individual is, in fact, who they say they are. This can be important in computers as computers often store private data. Authorization is the process of checking whether a specific individual is allowed to access a particular computer, web site or other place/area/system. Authentication and authorization often work together in computers - the computer first authenticates a person's identity; if they are who they say they are, then the computer checks whether they are authorized to access the thing they are trying to get into. Active Directory is software from Microsoft that provides central authentication and authorization services for computers. It is used by a system administrator (someone that manages a system of computers and their associated equipment and computer software) to store information about users, assign security policy and deploy software. It can be used in organizations of all sizes, from administering one user to hundreds of thousands of users. EXAMPLE: Active Directory could be used in a large company to store all user names and passwords on a network.
Normalization:
When working with databases, database normalization is the process of organizing the tables in the database to eliminate data redundancy. Data redundancy in a database refers to a situation where you're storing the same data in more than one table in the database. This leads to problems in using the database - not the least of which is the fact that when a particular piece of data changes, you now have to change it in two or more places in the database. Normalization can be done on a gradient basis. This means that there is a minimum arrangement in order to consider a database normalized, and there are increasingly efficient ways of organizing and using the data, leading to a fully-optimized database. The minimum level of normalization is called "First Normal," or "1NF." What this basically means is that the tables you have created in your database separate out the various types of data you are tracking in the database so that each field in a table will only hold one piece of data. EXAMPLE: For example, if you've been tracking a field called "telephone number" for a customer, and you then learn that a customer might have two phone numbers, you wouldn't want to store two phone numbers in one field. This would make it difficult to use the data in the table, and the table could be described as violating "normal" form.
PRIVATE VS. PUBLIC
When writing code, you can determine which portions of your code is private or public. Public would refer to elements of the class that can be accessed or changed by objects of another class. Private would refer to sections of code that can't be accessed or changed by anything outside of that class itself. Let's say we have a "Student" class and a "Teacher" class. If the Student class had a public property called "Grade Point Average", the Teacher class would be able to have a behavior that could access and change the "Grade Point Average" property of any particular instance of the Student class. If, on the other hand, the Student class had a private property called "Name", objects of the Teacher class could not have a behavior that allowed them to access and change that "Name" property.