The Path to Coding Mastery
What Makes a Good Coder?
Programming, often "coding" is a very interesting activity. The main purpose of programming is to get a machine to do what we want it to do for us, and that's about it. Once we program a machine to do precisely what we want, we can use that programming to build other programs that get the machine to do other things as well. Programmers work with the building blocks a machine offers to make it do more interesting actions.
A good programmer builds programs in much the same way a furniture maker builds a chair. The final product accomplishes a task, and we can usually tell if it does a good job at that task, or not. Sit in a new chair. Is it comfortable? Does it allow you to do things comfortably? Does it remain standing when you sit in it and get up from it? Is it portable or does it have to stay where it is placed?
Programs force the same kinds of questions and the programmer's job is to make the end result as positive as possible. Easy to use anywhere is a valuable attribute at the heart of much programming today. Good programmers always consider the needs of the final user when creating their products because somebody else will have to feel comfortable using it when the time comes; otherwise their product will probably be considered a failure.
At other times, a good programmer will think more like an architect. Architects not only design the outer structures, they design how all the systems inside the structure will work together to make the entire structure a success. For example, if an architect draws a plan for a building with one room in the corner, that room will need somebody to think of things like where wires will be routed for electricity to the room, where things will be plugged in and/or turned on and off, which walls will have windows and doors, and how those windows and doors will swing open into other spaces. If the architect doesn't plan right, a room could end up without a door into it (oops!) and the builder won't know what to do, or may decide differently from what isn't clear in the plans.
Programmers that build larger programs like operating systems or large database managers have to consider all the ways that individual pieces in the system are going to work together and also how the user may want to use them in various combinations at once, then try to tie them all together in an easy-to-understand package that helps us do better work without the program getting in the way.
Programming is problem solving. Like the furniture designer, you want your computer to do something for you. How do you do that? That's the big problem. The second problem is that, even if you know what you want the machine to do, you still have to talk to it in a way that it can understand. This requires knowledge of programming tools called "programming languages" that translate human thinking into machine thinking. They really could be thought of as simply "translators" in which humans say things within a limited vocabulary to the translator program and then the translator program tells the computer to do something in the ways it can understand.
This is another way to look at the "building blocks" concept I mentioned at the beginning. A "programming language" gives a programmer a context and syntax to string together these small blocks into a meaningful sequence, which is then translated into a series of instructions that the machine carries out. That part is often the easiest part of programming. The problems come when we realize that not everybody thinks the way the machine thinks, and we have to come up with ways to minimize the misunderstandings that can arise when humans want machines to do their bidding. This is known as the User Experience (UX) and includes not only what the user can do in your program, but what the program tries to keep them from doing! All of these things have to be considered in the problem solving activities of the programmer.
Many programmers like to analyze the way things work. They want to know how and why something works the way it does. When they figure it out, their next step is usually to figure out how they make a machine act the same way. This is why a lot of things like Artificial Intelligence and Robotics and Biomimetics are so popular, because that's where everybody's interest is aiming these days. The older "simpler" problems have become "obvious" in their solutions, but AI and Robotics, in particular, have far more challenges than answers right now. Some examples that require some difficult coding include self-driving vehicles, long distance drone delivery, exploration of other planets in our solar system, underwater explorers, and so on. These may involve programming many kinds of problem-solving procedures that a robot may draw on based on the situation, which means the device may have to weigh its choices before it decides.
The world of programming is vast, and continues to draw people who like to think about the world, solve problems people need solutions for, and push the envelope of what humans can do. If this sounds like you, check coding out for yourself - and not just at school!
A good programmer builds programs in much the same way a furniture maker builds a chair. The final product accomplishes a task, and we can usually tell if it does a good job at that task, or not. Sit in a new chair. Is it comfortable? Does it allow you to do things comfortably? Does it remain standing when you sit in it and get up from it? Is it portable or does it have to stay where it is placed?
Programs force the same kinds of questions and the programmer's job is to make the end result as positive as possible. Easy to use anywhere is a valuable attribute at the heart of much programming today. Good programmers always consider the needs of the final user when creating their products because somebody else will have to feel comfortable using it when the time comes; otherwise their product will probably be considered a failure.
At other times, a good programmer will think more like an architect. Architects not only design the outer structures, they design how all the systems inside the structure will work together to make the entire structure a success. For example, if an architect draws a plan for a building with one room in the corner, that room will need somebody to think of things like where wires will be routed for electricity to the room, where things will be plugged in and/or turned on and off, which walls will have windows and doors, and how those windows and doors will swing open into other spaces. If the architect doesn't plan right, a room could end up without a door into it (oops!) and the builder won't know what to do, or may decide differently from what isn't clear in the plans.
Programmers that build larger programs like operating systems or large database managers have to consider all the ways that individual pieces in the system are going to work together and also how the user may want to use them in various combinations at once, then try to tie them all together in an easy-to-understand package that helps us do better work without the program getting in the way.
Programming is problem solving. Like the furniture designer, you want your computer to do something for you. How do you do that? That's the big problem. The second problem is that, even if you know what you want the machine to do, you still have to talk to it in a way that it can understand. This requires knowledge of programming tools called "programming languages" that translate human thinking into machine thinking. They really could be thought of as simply "translators" in which humans say things within a limited vocabulary to the translator program and then the translator program tells the computer to do something in the ways it can understand.
This is another way to look at the "building blocks" concept I mentioned at the beginning. A "programming language" gives a programmer a context and syntax to string together these small blocks into a meaningful sequence, which is then translated into a series of instructions that the machine carries out. That part is often the easiest part of programming. The problems come when we realize that not everybody thinks the way the machine thinks, and we have to come up with ways to minimize the misunderstandings that can arise when humans want machines to do their bidding. This is known as the User Experience (UX) and includes not only what the user can do in your program, but what the program tries to keep them from doing! All of these things have to be considered in the problem solving activities of the programmer.
Many programmers like to analyze the way things work. They want to know how and why something works the way it does. When they figure it out, their next step is usually to figure out how they make a machine act the same way. This is why a lot of things like Artificial Intelligence and Robotics and Biomimetics are so popular, because that's where everybody's interest is aiming these days. The older "simpler" problems have become "obvious" in their solutions, but AI and Robotics, in particular, have far more challenges than answers right now. Some examples that require some difficult coding include self-driving vehicles, long distance drone delivery, exploration of other planets in our solar system, underwater explorers, and so on. These may involve programming many kinds of problem-solving procedures that a robot may draw on based on the situation, which means the device may have to weigh its choices before it decides.
The world of programming is vast, and continues to draw people who like to think about the world, solve problems people need solutions for, and push the envelope of what humans can do. If this sounds like you, check coding out for yourself - and not just at school!
The Joy of Coding with Scratch
Scratch is a graphical programming language used in schools that presents you with a large collection of snap-together blocks that correspond to standard computer programming actions. It was invented at MIT (Massachusetts Institute of Technology) and is being constantly revised and updated there still. It is currently up to version 3.x and has many features that can satisfy a lot of coding needs.
|
Some Computer Science elements of Scratch include: Sequence Input/Output Loops Variables and arrays Procedure calls Basic list processing Boolean conditionals Plus Scratch can interact with physical computing as a controller/trigger for things like Raspberry Pi's and Arduinos |
Using Scratch as an entry point into the wide world of Coding is a lot of fun! Many students throughout the world have started with Scratch and moved on to other programming languages, later even finding professional work in programming and other technical fields.
Even if you never intend to become a programmer, our lives are now so dependent on computer technology that if you have a working knowledge of programming, you will find dealing with these ever-changing devices all the easier in the years ahead.
Even if you never intend to become a programmer, our lives are now so dependent on computer technology that if you have a working knowledge of programming, you will find dealing with these ever-changing devices all the easier in the years ahead.
HTML5 and CSS Web Design
Responsive Web Design examples
|
CSS Zen Garden site
|
RGB Colors
Light itself technically isn't colored. It is simply emitted at different wavelengths in a range (spectrum) that we can see. Our eyes perceive the different light wavelengths as colors, much the same way our ears perceive the wavelengths of sound as pitches. The range of light we can see as colors is known as the spectrum of visible light* and runs from long wavelengths that we perceive as Red to short wavelengths that we perceive as Blue, with Green in the middle range of wavelengths. Ultraviolet colors are beyond the visible light spectrum for our eyes and are shorter than the Blue part of the spectrum, while Infrared colors are out of our sight on the longer side of the Red end of our visible spectrum.
Because the color on a computer screen enters directly into our eyes without first reflecting off something that could absorb part of the light, those colors don't work quite the same way as colors seen in, say, a painting. Colors of light, when seen directly from the source, add together their wavelengths and emit a combination. This is called additive color. The RGB system of colors is an additive system for explaining how our eyes perceive colors. The other way colors are perceived by our eyes is after they've been reflected off a surface. If you look at a painting, the light in the room is bouncing off the surface of the painting before it enters your eyes and some of the wavelengths that hit the picture are being absorbed by the paint on the canvas and sending back what's left. This is called subtractive color.
The most interesting way to think about these two systems of explaining color perception is to consider what would happen if you were to combine all colors in one or the other system. In an additive system, all the color wavelengths combine to a wavelength that looks like WHITE (like the sun). In a substractive system, nearly everything is absorbed which makes the reflected color have almost nothing left which is close to BLACK (like a black hole)[or really, a very, very, very dark gray].
As shown in the simulation above, we can think of computer colors coming from a mixture of three primary colors of light: Red, Green, and Blue. These are referred to as RGB colors. In practice, to tell the computer how much of each color to mix together to make a desired color, three numbers are required: one for the Red range, one for the Green range, and one for the Blue range of the final color. These generate a number that represents the wavelength for the combination of the three primary colors of light: basically so much Red, so much Green, and so much Blue mixed together to make the color you want. So, for example, if I put a high number for Red and a high number for Green, but no Blue, I'll end up with some shade of yellow, because the combined number will be increased in the range where we find the wavelengths we perceive as Yellow. The physics behind all of this is not so simple, but the practical use of the system is.
On modern computers, one byte is used for each part of the RGB color formula, so there's one byte for Red, one byte for Green and one byte for Blue. As we now know, one byte (eight bits) can hold a number between 0 and 255. That's 256 total combinations of bits for each color range in the mix. This means that adding up those three bytes together as color designators, we can have over 16 million different combinations of the three bytes (256 x 256 x 256), which is to say that we can generate over 16 million shades of color.
* The wavelengths of light are part of an even larger range of radiated wavelengths known as the electromagnetic spectrum.
Now let's look at a couple of examples:
1. Imagine ways you can combine Red, Green and Blue lights to make, say, Orange.
Orange is normally a mixture of red and yellow, but we don't have yellow in our primary RGB trio (another difference from the subtractive system). If, however, you know that combining Red and Green makes Yellow (as mentioned above), you can think of Orange as a combination of [Red + Green] + Red, which looks like we need about twice as much Red as Green. So, using percentages, we could have 100% Red + 50% Green + 0% Blue to make Orange. If you try it on the color blending app (up above), you can see if this is true.
2. Imagine ways you can lighten or darken a color by blending with shades of Gray.
Bright Blue is 0000FF in hex (255 in decimal). If I want a medium dark Blue, I could cut the FF down to this color 000080. And if I want something halfway in between that and full on, what would I use? (Try something that works out to 0 Red + 0 Green + 75% Blue) How would you describe these colors? #0000FF, #000080, #0000C0, #00FF00, #00C000, #008000, #FF0000, #330000, #660000, #990000, #CC0000 ?
What would happen if you mix a light shade of Gray with Dark Blue, Med Blue, or Light Blue? Remember: a shade of Gray will always result when ALL THREE RGB numbers are the same value (or really close). For example: FFFFFF, 000000, 292929, 3c3c3c, and so on will all make some shade of gray. (Black and white are the darkest and lightest forms of gray, respectively.)
What happens when you use equal amounts of Red and Green with Blue? Try something like #cccc80. Is this the way you'd go to make something like Sky Blue?
Use the Color Blender (above) to try out all of these numbers. You can type them in on one of the two Color# lines. Also, try to predict what you would get halfway between two blended colors.
Light itself technically isn't colored. It is simply emitted at different wavelengths in a range (spectrum) that we can see. Our eyes perceive the different light wavelengths as colors, much the same way our ears perceive the wavelengths of sound as pitches. The range of light we can see as colors is known as the spectrum of visible light* and runs from long wavelengths that we perceive as Red to short wavelengths that we perceive as Blue, with Green in the middle range of wavelengths. Ultraviolet colors are beyond the visible light spectrum for our eyes and are shorter than the Blue part of the spectrum, while Infrared colors are out of our sight on the longer side of the Red end of our visible spectrum.
Because the color on a computer screen enters directly into our eyes without first reflecting off something that could absorb part of the light, those colors don't work quite the same way as colors seen in, say, a painting. Colors of light, when seen directly from the source, add together their wavelengths and emit a combination. This is called additive color. The RGB system of colors is an additive system for explaining how our eyes perceive colors. The other way colors are perceived by our eyes is after they've been reflected off a surface. If you look at a painting, the light in the room is bouncing off the surface of the painting before it enters your eyes and some of the wavelengths that hit the picture are being absorbed by the paint on the canvas and sending back what's left. This is called subtractive color.
The most interesting way to think about these two systems of explaining color perception is to consider what would happen if you were to combine all colors in one or the other system. In an additive system, all the color wavelengths combine to a wavelength that looks like WHITE (like the sun). In a substractive system, nearly everything is absorbed which makes the reflected color have almost nothing left which is close to BLACK (like a black hole)[or really, a very, very, very dark gray].
As shown in the simulation above, we can think of computer colors coming from a mixture of three primary colors of light: Red, Green, and Blue. These are referred to as RGB colors. In practice, to tell the computer how much of each color to mix together to make a desired color, three numbers are required: one for the Red range, one for the Green range, and one for the Blue range of the final color. These generate a number that represents the wavelength for the combination of the three primary colors of light: basically so much Red, so much Green, and so much Blue mixed together to make the color you want. So, for example, if I put a high number for Red and a high number for Green, but no Blue, I'll end up with some shade of yellow, because the combined number will be increased in the range where we find the wavelengths we perceive as Yellow. The physics behind all of this is not so simple, but the practical use of the system is.
On modern computers, one byte is used for each part of the RGB color formula, so there's one byte for Red, one byte for Green and one byte for Blue. As we now know, one byte (eight bits) can hold a number between 0 and 255. That's 256 total combinations of bits for each color range in the mix. This means that adding up those three bytes together as color designators, we can have over 16 million different combinations of the three bytes (256 x 256 x 256), which is to say that we can generate over 16 million shades of color.
* The wavelengths of light are part of an even larger range of radiated wavelengths known as the electromagnetic spectrum.
Now let's look at a couple of examples:
1. Imagine ways you can combine Red, Green and Blue lights to make, say, Orange.
Orange is normally a mixture of red and yellow, but we don't have yellow in our primary RGB trio (another difference from the subtractive system). If, however, you know that combining Red and Green makes Yellow (as mentioned above), you can think of Orange as a combination of [Red + Green] + Red, which looks like we need about twice as much Red as Green. So, using percentages, we could have 100% Red + 50% Green + 0% Blue to make Orange. If you try it on the color blending app (up above), you can see if this is true.
2. Imagine ways you can lighten or darken a color by blending with shades of Gray.
Bright Blue is 0000FF in hex (255 in decimal). If I want a medium dark Blue, I could cut the FF down to this color 000080. And if I want something halfway in between that and full on, what would I use? (Try something that works out to 0 Red + 0 Green + 75% Blue) How would you describe these colors? #0000FF, #000080, #0000C0, #00FF00, #00C000, #008000, #FF0000, #330000, #660000, #990000, #CC0000 ?
What would happen if you mix a light shade of Gray with Dark Blue, Med Blue, or Light Blue? Remember: a shade of Gray will always result when ALL THREE RGB numbers are the same value (or really close). For example: FFFFFF, 000000, 292929, 3c3c3c, and so on will all make some shade of gray. (Black and white are the darkest and lightest forms of gray, respectively.)
What happens when you use equal amounts of Red and Green with Blue? Try something like #cccc80. Is this the way you'd go to make something like Sky Blue?
Use the Color Blender (above) to try out all of these numbers. You can type them in on one of the two Color# lines. Also, try to predict what you would get halfway between two blended colors.
Binary Numbers(Base 2)
|
GEEK JOKE:
There are 10 kinds of people in the world - - those who get binary, and those who don't. |
Counting in Binary and Hexadecimal
Don't forget that the quantity of something
(the number of things you can count) is not
the same as the name we give that quantity.
In BINARY, you can only use 2 symbols to describe quantities -- 0 and 1. Our DECIMAL system uses 10 symbols -- 1,2,3,4,5,6,7,8,9,0. So, in binary numbers we see combinations of just zeroes and ones. Yet you can still count any quantity you need.
In BINARY, each column shown in the quantity is equal to a multiple of 2 from right to left:
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
(Remember, the numbers representing each column will keep increasing to the left, just like with our decimal number system)
To figure out a BINARY number like 01010111, just figure out which columns have 1's in them and add that column's value to the total.
Example:
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
01010111 = | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 1 |
(0 x 128) + (1 x 64) + (0 x 32) + (1 x 16) + (0 x 8) + (1 x 4) + (1 x 2) + (1 x 1)
= 64 + 16 + 4 + 2 + 1
= 64 + 16 + 4 + 2 + 1
= 80 + 7
= 87
HEXADECIMAL!?! Yes, it's Base 16.
Base 16?!? But how does that work? It uses 16 digits 1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,0
You start counting using the regular digits 0-9 and then you continue counting with A, B, C, D, E and F before going back to zero.
This is when those NYBBLES we talked about come into play (half a BYTE, right?). The value of each 4-bit nybble in a byte gives you the value of the two hexadecimal digits (4 bits + 4 bits) in a byte.
But why do we need to know about hexadecimal?
In most cases it isn't necessary, but there are a couple of times you'll regularly see hexadecimal numbers when using a computer and it can be useful to know what to do with them. One of these times is in error messages, which may or may not matter to you. Another time is in entering certain kinds of machine codes in embedded processors, such as in robotic devices, but the most common time is when colors are specified for computer applications.
(the number of things you can count) is not
the same as the name we give that quantity.
In BINARY, you can only use 2 symbols to describe quantities -- 0 and 1. Our DECIMAL system uses 10 symbols -- 1,2,3,4,5,6,7,8,9,0. So, in binary numbers we see combinations of just zeroes and ones. Yet you can still count any quantity you need.
In BINARY, each column shown in the quantity is equal to a multiple of 2 from right to left:
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
(Remember, the numbers representing each column will keep increasing to the left, just like with our decimal number system)
To figure out a BINARY number like 01010111, just figure out which columns have 1's in them and add that column's value to the total.
Example:
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
01010111 = | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 1 |
(0 x 128) + (1 x 64) + (0 x 32) + (1 x 16) + (0 x 8) + (1 x 4) + (1 x 2) + (1 x 1)
= 64 + 16 + 4 + 2 + 1
= 64 + 16 + 4 + 2 + 1
= 80 + 7
= 87
HEXADECIMAL!?! Yes, it's Base 16.
Base 16?!? But how does that work? It uses 16 digits 1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,0
You start counting using the regular digits 0-9 and then you continue counting with A, B, C, D, E and F before going back to zero.
This is when those NYBBLES we talked about come into play (half a BYTE, right?). The value of each 4-bit nybble in a byte gives you the value of the two hexadecimal digits (4 bits + 4 bits) in a byte.
But why do we need to know about hexadecimal?
In most cases it isn't necessary, but there are a couple of times you'll regularly see hexadecimal numbers when using a computer and it can be useful to know what to do with them. One of these times is in error messages, which may or may not matter to you. Another time is in entering certain kinds of machine codes in embedded processors, such as in robotic devices, but the most common time is when colors are specified for computer applications.
How Do We Grasp the Biggest Quantities?

Computers are capable of using MASSIVE QUANTITIES, but we humans often can't imagine just how big those numbers are. For example, if you could stack millions of pennies in nice neat stacks, can you imagine how much space you would need?
Let's start with a stack of pennies in a space of 12 inches by 12 inches by 12 inches (a cubic foot), you would need a little over 49,000 pennies to fill that space.
Take a look here to see what even bigger numbers of pennies would look like - the MegaPenny Project
Let's start with a stack of pennies in a space of 12 inches by 12 inches by 12 inches (a cubic foot), you would need a little over 49,000 pennies to fill that space.
Take a look here to see what even bigger numbers of pennies would look like - the MegaPenny Project