You’d think that the word “Standards” was a 4-letter offering, by reading all of the “programming for kids” sites. Possibly mentioned, somewhere, but not considered important. Key, seems to be “getting kids interested” or “making it fun”.
Maybe too harsh, but computer programs in the “real world” have very little to do with the “hour of code” or many of the structured educational offerings that I’ve seen.
Just look at the program examples. Do you see numbers in the middle of the code? They are everywhere. Why? because the concept of “variables” is “advanced” and comes “later”? OR is it because the writers just don’t know better? I’ve explained variables to 6-year-olds. (and yes, they understood)
One of the first rules that professionals learn is to get rid of all “literals’ (those are actual numbers like 140 pixels, speed = 2, etc.) inside the actual code. Literals should be either put in one place in a program or (better) be in a separate file and input when the program is run.
I know that you might not bother with that if you are writing a quick program (think spreadsheet) to just do a one-off calculation. However, if you plan to use that program in the future, why not build it properly. It really doesn’t take longer (once you know how!).
Professionals have developed standard ways of doing things. Why? Mainly for three reasons:
- 99,9% are written by teams, and the members need to understand each others designs and code.
- It will require repairs, additions, or subtractions in the future.
- The authoring team may not be there in the future.
Don’t those standards slow things down — just from the added overhead? uh, No!
Actually, the opposite. Example: naming standards: Once in place and agreed to, you’ll spend less time thinking about what to call the variables, objects, etc. Also, about 80% of any program is “standard boilerplate”. Getting data in, out, printing reports, etc. No need to be creative. Save the thinking for the parts that need it.
I won a bet with a very high-powered consultant when I mentioned that 80/20 rule. He laughed, “absurd, no way!” We went to one of his minion’s code offerings and counted lines of code. There were about 800 lines of standard input-output and less than 200 lines of actual logic that was peculiar to the application. Fun taking $ fro a “master of the universe”. But be clear: an error in the 80% part can be just as devastating as in the 20% part.
One last thing. I’m thinking that the objective for some (most?) is to make learning fun. Shouldn’t the objective be to learn a particular subject — and then figure out a way to make it fun — or at least interesting. Cart/Horse thing.
Join superSOLVRS get started right.