Do you know what source code, machine language,
and assembly language are? Find out in this video.
My name is Tim Buchalka from the Learn Programming Academy.
Let's explore software now in more detail.
In this video, I want to talk briefly about application software,
often referred to as apps.
This is the software that you and I utilize each day
to accomplish whatever we want our computers, phones, or wearables
to do for us.
Literally, the sky is the limit to the variety of these apps. So let's take a look.
All right, we're going to start with a simple program called - hello world.
So your boss has asked you to create an application program
that just displays the greeting hello world
on his display monitor when he runs the app.
So, where do you begin?
Well, hopefully, you're familiar with the type of computer and operating system your boss's using,
a Windows laptop, for example.
Next, assuming you have complete freedom of choice for programming languages,
you're more than likely pick the language that you're already familiar with,
Java in this case, for example.
So, use a simple text editor program.
It gives you the following Java language commands as you can see on the screen there,
I'm not going to go into the code
there and explain at this stage. That will happen later in this course.
For now, though, this is a very basic Java program that does display that output.
All right, so having typed that in, next, you’d save this program
as a Java program and I mean the file you save it in as HelloWorld.java.
You then quit the text editor.
Now it's time to compile your Java program.
The computer doesn't understand your program source code that text we saw on
screen and needed to be translated or compiled
into an intermediate language that can be understood and converted to machine language
by the Java Virtual Machine, or just JVM software,
which exists normally standalone program on your computer.
But it can also exist for a plugin in a web browser.
So you start the Java compiler by giving a simple command a javac
HelloWorld.java.
So the Java compiler
then converts your source code line by line into the intermediate language.
Should the compiler identify any unknown
programming statements by comparing your statements to the proper syntax
of the Java language, it will display one or more error messages on your display monitor.
If you've got any errors, then you need to edit your HelloWorld.java program file again,
to correct the errors, then repeat the compile command above again.
When the compiler doesn't find any errors,
it will create a file called HelloWorld.class.
This is a file that you'd run on your boss's computer
to have it display the Hello World text.
So the final step is to run the compiled Hello World Class program.
So all you need to do there is type java HelloWorld.
And your program should start running and display the text Hello World on the monitor.
That's all there is to create a very simple application program.
Now I move along now to say a few things about programming languages in general,
followed by a brief discussion of compiled versus interpreted languages.
Programming Language history starts with zeros and ones.
Programmers can only use the binary digits 0 and 1 to communicate instructions to the computer.
Sounds simple.
Yes, but in order to really have the computer do something significant via these 0s and 1s,
it will take tons of them working together to accomplish the goal.
The programming language that uses just 0s and 1s is called machine language
in each slide in the figure is called a machine instruction.
In reality, computers only understand 0s and 1s.
So any instructions we give the computer must ultimately
be converted or translated into 0s and 1s.
The computer was happy, so to speak, with 0s and 1s
but humans are not.
If every human had to only use 0s and 1s to communicate with computers,
it would create a serious shortage of human programmers who would want to do this type of work,
I surely would not want to do that.
So computer scientists created the assembly language,
which removed the tedious work of using 0s and 1s. In its infancy,
the assembly language was a huge improvement, but today it is considered a low-level
programming language,
even though it still has widespread use as a preferred language
for creating operating systems and utility programs.
As you can see in the figure, assembly language consists of instructions
that are mnemonic codes for corresponding machine language instructions.
So these mnemonic patterns of letters you see,
are much easier for a human to remember than a bunch of 0s and 1s.
Even the use of mnemonics challenges humans
and again limits how many humans
want to do computer programming using assembly language.
Therefore, computer scientists created high-level languages
such as we have today with Fortran and COBOL being some of the earliest ones.
Common Application Programming Languages today
include Java,
C, C++, C sharp, Python, Swift,
PHP, and JavaScript just to name a small handful.
Keeping in mind that programming languages come and go
or as some stick around for a long time, like Fortran and COBOL,
and C, even Java has been around for about 25 years now.
Many of today's programming languages,
Java, C++, C sharp, for examples
are examples of compiled languages.
What that means is that the programmer brought the entire program or a subset of it,
and then has a compiler program
to a grammar syntax check on the program
to make sure it conforms to the exact language structure,
and it translates it either into an intermediate
or machine language version of the program for the computer to actually execute.
So it's a two-step process,
in a sense of writing the programming instructions
and seeing if they compile correctly.
Integrated development environment or IDEs
have very powerful compilers built-in
and are able to compile individual lines of code written by the programmer
as it keyed into the IDE's editor.
This feature is extremely valuable
to the programmer because syntax errors are caught in real-time,
rather than after the program is written.
The other type of language translator is known as an interpreter.
Python is an example of an interpreted language,
in that the programmer can type a line of code in instruction,
and the interpreter will translate it and execute it on the spot.
Another example of an interpreted language
is the Hypertext Markup Language – HTML.
Each browser – Edge, Safari, Chrome, Firefox, etc,
interprets and converts each individual line of HTML code
as it's running in the browser. Pretty impressive.
All right, so that's the end of this video in application software.
Do you know how a programmer communicates in a program with memory or RAM?
Find out the answer in the next video. Thanks for watching.
See you in the next video.
All right, this is the part of the video.
We're meant to go in enthusiastic and to ask you well 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 to like or subscribe or comment.
I'd be grateful if you do one, both or all three.
My videos will get out there in front of a bigger audience,
if I get that level of engagement, but obviously, it's your choice.
All right, 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
to 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.
We'll 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.