Coding should start with concepts. We'll use laundry to introduce the concepts of Coding. We'll use shopping to show how we can code. Let's begin.
How do we get loads of laundry? When we do laundry we have to think about how we want to do it. Will we follow the instructions on the tags of clothing? If we do we'll have a load for whites, colors, permanent press, dry clean only, delicates and so on.
Or we may decide we don't have as much time and take a conservative approach. If we go that route we'll have: white, colors and darks.
We may decide that's too long and reduce the loads to white and dark. For the person who has no time they may take all the clothes and put them in to one load and wash.
You can see the loads are dependent on how you plan to wash your clothes. Each load has its own special characteristics. Whites may need bleach, darks need code, colors are warm only, and delicates go on a gentle cycle. When you get ready to wash that load you have to know those rules or you could ruin your clothes.
In this same vein loads are like variables in coding. When you want to write code you have to decide in the beginning how many variables you need to create. Each one of these variables will have special characteristics, just like our load of clothes. Different people writing the same code can have a different amount of variables. Just like our laundry example, two people can look at the same laundry pile and come up with a different amount of loads.
A coder just like a person doing laundry has to have a plan, think about how much time they want to spend and how careful they need to be with the different variables/loads of laundry.
Today we're just introducing variables. In our later lessons we'll use them. if you have any questions on today's blog let me know.
Sign up for the Chad Bishop Newsletter