Python Exploration Round 3
by adweb.admin
If you are new to this series of posts then here is what you missed: Nick is challenged by Jason to learn a programming language, Nick accepts challenge, chooses Python, and begins to explore, kids learn Python with Nick, and Steve Jobs speaks from the grave via a .swf video…okay not so sure about that last part.
So…where were we….oh yes
Programs
What are they really? Well, simply put:
[note] You don’t say?[/note]
I was able to deduce from this section of the online book on Python that programs are really designed to break down the information of complex languages into simple languages that virtual machines can understand, which include: Input, Output, Math, Conditional Execution, and repetition.
[note]This is starting to sound like 6th grade science…very reminiscent of the scientific method.[/note]
Input involves getting the data from some source, a keyboard, a file or other device. Output involves displaying or sending the data. Math…well, I never was good at math. Conditional Execution checks for conditions and executes sequences. Repetition essentially repeats the process with occasional variations.
[note]I am sure we are going somewhere with this…not sure where…but we are going.[/note]
Evidently this is what every program boils down to in its rawest form. The gist of it is to break down information. We will learn more about this when we discuss algorithms.
Next we learned about Bugs.
[note]These are what Jason (our fearless C.T.O.) calls a “PEBKAC Error” which is an acronym for Problem Exists Between Keyboard And Chair” Which I hear quite often from Jason when trying a new trick that I learned in a cartoon or something.[/note]
Bugs are essentially errors made by people. Since programs can only do what we tell them to do the blame rests solely on the only factor that is capable of making a mistake: the human factor. What I learned from this section is that there are essentially (3) kinds of errors that are possible that are defined as bugs. The funny thing is that a lot of programmers will create a program full of bugs and work backwards to perfect a program through the process of eliminating bugs until they get the program they are looking for.
Syntax errors are simply errors in the way the code is structured when it is written. Python will return an error message if every “i” is not dotted and “t” crossed. This tells me that learning syntax will be imparitive along the way. I am sure that there will be many a PEBKAC Error that will require me to debug!
Runtime errors don’t occur until after the program is executed. The program will throw and exception (which is a bad thing) and will not allow the program to perform its intended task.
Semantic Errors are the tomato/tomahto argument. You may get the code correct in a way that it does not throw syntax or runtime errors only to find that the program does not perform the way that you wanted it to. This is because programming is very literal.
[note]Reminds me of what Mitch Hedburg once said, “I once saw a forklift lift a crate of forks. And it was way to literal for ME.”[/note]
And there it is…..my suspicions are well founded…the next section talks about experimental debugging.
[note]Wow! I got really excited reading that quote! You? I mean…really….that was a compelling statement…I am up for the challenge.[/note]
Essentially what this section is talking about is debugging will become natural and the more you program the less you will have to do it, since you will become better and better and less apt to make errors that need to be debugged. From what I gathered this is something that even the most astute programmer still has to do, and is really part of the fun of programming.
[note]The next section on formal and natural language is a bit esoteric for me but feel free to read it if you want (section1.8)[/note]
On to the next section….
The next section is called the First Program. Usually the first program in any language is the “Hello World” program (as commonly seen in WordPress blogs) and programs are rated on how well their “Hello World” program runs.
The next section is a glossary of terms…you don’t have to go there as I am going to include it in the following quote:
Recommended Posts

713-397-3833
December 6, 2022

What Are Google Posts and How Can I Use Them?
August 26, 2022

Megadeth Christmas Cards
June 23, 2022