Do you know that there's three and only three basic building blocks
for any programming language?
Find out what they are in this video.
My name is Tim Buchalka from the learn programming academy.
And in this video, you'll learn that the three basic building blocks
for any programming language, a sequence, selection and iteration.
And in addition, I'm going to be talking about another
programming fundamental functions, also known as methods.
So in the video, I'm going to complete our talks about programming
fundamentals that are typically found in every programming language.
As I've said in earlier videos, knowing about them will help you
to apply them in any programming language you may want to learn.
Now even if you're not planning on being a programmer, this familiarity
will help you better understand what programmers need to do to
have the computer serve up our very fascinating games, apps and websites.
The real power and beauty, if you will, of a programming language
whether low level or high is in its ability to combine statements
and expressions together in an orderly way so that the program
can accomplish its goals.
There's only three ways in which programming statements can be
combined, sequence selection and iteration or looping.
What I find fascinating about these three configurations is that they
relate really well to how you and I go about each day of our real life.
The first building block is sequence.
For example, sequence can be a list of things you do every day in order,
wake up get out of bed, brush your teeth, put on your clothes etc.
Now of course, some of these sequential things can be done
in tandem or parallel, but so they can be done inside the
computer in parallel processing.
Now a programming example of this using English rather
than a specific programming language might look like this.
Input a value for the first number, input a value for the second
number as the value stored in first number and second number and
store the result in result number.
The second building block is selection.
The selection in the real world might be you deciding to either
ride your bike to work, take the bus to work or walk to work.
A programming example of this using English rather
than a specific programming language might look like this.
If the traffic signal equals green, then continue.
Else if the traffic signal equals red or the traffic signal
is not working, then stop.
Else if the traffic signal equals yellow, then proceed with
caution and if and if and if the.
Third building block iteration also known as looping.
So an iteration of what we call looping might be you repeating
the same sequence and or selection activities for several days in a row.
A very simple programming example of this using English rather
than a specific programming language might look like this.
While I'm hungry, take a bite of my food, chew the bite of food,
swallow the bite of food and while.
To summarize all programs can be written using just these three basic
building blocks, I find that amazing.
So just about every computer program contains dozens, hundreds or even
thousands or tens of thousands of programming expressions or
statements, I've heard that the windows 10 operating system consists
of over 50 million lines of code.
Wow, that's mind-boggling.
To deal more effectively with such complexity, programmers
break up or chunk their code into smaller parts generically referred
to as functions or methods.
A function is a grid for programming statements that
together perform a task.
In the real world, construction projects are always broken
up into smaller units or sub-projects to better estimate
and perform the overall project.
In the software world, we do the same type of thing.
Take for example login authentication.
We could create a function that just processes and validates the username.
We could create a second function that just processes
and validates a password.
The two functions working together become the login
authentication process.
So that concludes my conversation about software, and I hope
you've picked up the basics of programming language fundamentals
even if you don't plan to become a computer programmer.
Next up, the fascinating world of the network and internet are
going to be briefly explored.
Once we finish with that, we're going to be swimming back to programming
and getting into much more detail than what we've seen so far in the series.
As always thanks for watching, see you in the next video.
This is the part of the video.
We're meant to get all enthusiastic and to ask you will quite literally
beg you to subscribe to my channel and to like the video leave
a comment and all that stuff.
Well I'm going to leave that decision in your capable hands
to decide whether I've earned a like or a subscriber or a comment.
I'd be grateful if you do one, both or all three more videos will get out
there in front of a bigger audience if I get that level of engagement,
but obviously it's your choice.
So remember that this series was meant to be watched in order.
So if you haven't watched from the start, then how dare you watch
my video series out of order.
Click the link over here to get to the first video in the series
and watch that if you want to see the entire series in order or
come over here and click to view the previous video in the series.
Again, your choice.
All right, I'm done, catch you in the next video.