Posts

The “for” Loop

The “for” Loop

What is it good for The “for” loop is a special case “while” loop. Most developers I know generally skip the “while” loop altogether and just use the “for” loop for it’s simplicity and versatility, I think you will see why shortly. Related posts: The “while” Loop The “If” Statement Variables Boolean Expressions

The “while” Loop

The “while” Loop

It’s been a while The “while” loop is the first looping structure that we will discuss, it is used to repeat a section of code until a Boolean condition is met. To me, a while loop is just an “if” statement that repeats while it’s boolean expression is true. Related posts: The “for” Loop The
+ Read More

The “If” Statement

The “If” Statement

What If? The purpose of the “if” statement is to help control the flow of logic in a program. It can be used to execute one set of code in one situation and a different set of code in a different situation. I consider “if” to be the most basic control structure in programming. Related
+ Read More

Arrays

Arrays

Array Creation An Array is just a collection of values. When creating an Array you can usually create it either with or without preset values. Some languages don’t require the size of an Array to be specified during declaration, but most do. Related posts: JavaScript: Equality

Variables

Variables

What is a variable? A variable is a named representation of a value. A variable could represent numbers, strings, collections, functions/methods, etc… anything really. Related posts: The “for” Loop Arrays The “If” Statement The “while” Loop

Boolean Expressions

Boolean Expressions

A fair amount of computer programming is checking the condition of something and then doing one thing if that condition is right and another thing if that condition is wrong. We call that a Boolean operation. There are two options and one must be chosen. Related posts: The “while” Loop JavaScript: Equality Basic Math Operators
+ Read More

How to Make a Tri-State Checkbox Using KnockoutJS

How to Make a Tri-State Checkbox Using KnockoutJS

I want to start by saying, “Don’t do this!” Now that we got that out of the way, here is how you would do it and when you might consider using it. Related posts: JavaScript: Equality Boolean Expressions

JavaScript: Equality

JavaScript: Equality

Unlike most languages that I have encountered, JavaScript has a fairly tricky way of handling equality. It is possible in JavaScript for things that are clearly not the same to be equal. Just the same, things that seem the same can be not equal. Related posts: Arrays Boolean Expressions How to Make a Tri-State Checkbox Using KnockoutJS
+ Read More

Basic Math Operators

Basic Math Operators

In computer science there are just a few universal operations, basic math operators seem to be one of them. The operators are as follows: Addition + Subtraction – Multiplication * Division / Parenthesis () Related posts: Boolean Expressions The “If” Statement JavaScript: Equality Variables

Encapsulation Examples

Encapsulation Examples

The scenario for these examples is the same as that in the encapsulation article. We have a room to clean and we want to know when it is finished so we can inspect it. Although I will be giving examples in several different languages I am not planning to get into the syntax of the
+ Read More

1 2