Clayton Hunt

Clayton has been programming professionally since 2005 doing mostly web development with an emphasis on JavaScript and C#. He has a focus Software Craftsmanship and is a signatory of both the Agile Manifesto and the Software Craftsmanship manifesto. He believes that through short iterations and the careful gathering of requirements that we can deliver the highest quality and the most value in the shortest time. He enjoys learning and encouraging other to continuously improve themselves.

Posts by Clayton Hunt

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.

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.

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.

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.

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.

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.

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.

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.

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 ()

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