Video: What is a programming language?

There have been hundreds of programming languages since the start of computing. But at any given time there are perhaps a dozen or so that are popular and by popular I simply mean that language is used in a lot of current software, it's used by large numbers of people, and there is an active community and a significant job market for that language. Now as the years go by, different languages wax and wane in popularity. New languages do come along. Some are big hit but most of them aren't. So this list changes, but it changes slowly. Now most programmers will learn and use many languages over the course of their career. Once you have got the basics down, additional languages do become easier to pick up. A little later in this course we will dive deeper into the most popular languages, but if you're new to this, you might think why, why are there so many languages? If all we're doing is writing simple instructions for computer, why isn't there just one computer language? Well actually that language does exist, but it isn't any of these. You see the CPU, the chip, the central processing unit that is the brain of any computer, desktop, laptop, server, phone, game console, well it doesn't understand any of these languages. We might informally say when we are programming that we're writing code the computer understands, but we are not. Not really. You see the only thing that chip understands his called machine code or machine language. Now these are the real instructions that run directly on your computer hardware. So the question is why don't we just write machine code? Well because it's almost impossible to do. It's numerical operations, tiny instructions that work on the smallest pieces of memory inside your computer and even if you could write it, it's basically unreadable by anybody else. This is for the machine. It's not for a human being. And because machine code works of the level of the CPU, it would be different machine code for different models of CPU. Writing a full program in machine code would be like digging a tunnel through a mountain with only teaspoons. It's theoretically possible, but it would take you so long and so tedious that you wouldn't even try. So all of these languages, the popular ones and the others, are in fact a compromise. They are invented languages. They are just trying to bridge the gap between us as human beings and the computer hardware. Now, some of the languages are actually quite close to machine code. The closest is something known as assembly language. In general the closer a language is to machine code the more difficult it is to write and the more you have to know about the actual hardware. And this what's called a low-level language. Now as you move away from the CPU into what are called higher-level languages you worry less about the hardware. Now this code is often easier to write and to share even across different platforms, but it can be slower when running because these languages aren't necessarily optimized directly down to the CPU level. Having said that, these days speed differences are minimal and we will be focusing on the high-level languages in this course. But whatever we write has to be converted down to machine code before it can run. So while this machine code piece seems like the most important piece, we are not really interested in machine code. Sure we do need to know that that's what runs, but programming for us is all about the source code. That's what we call the statements we write, Java, C++, Ruby, Python whenever. We write the source code that will at some point be translated then into machine code, so it can run on the computer. When I say I'm writing code, it's source code, and when I say programming or I am coding, I mean the same thing. So to start writing any of these programming languages, writing these statements, writing our source code, we need to understand three things: 1) how to write it, literally where do we actually start typing this, 2) to understand how that source code will be converted to machine code, and 3) how do we actually run it, how do we execute our program? And some of this does depend on the language that we pick, but let's begin with how to actually start writing these statements.

This course provides the core knowledge to begin programming in any language. Simon Allardice uses JavaScript to explore the core syntax of a programming language, and shows how to write and execute your first application and understand what's going on under the hood. The course covers creating small programs to explore conditions, loops, variables, and expressions; working with different kinds of data and seeing how they affect memory; writing modular code; and how to debug, all using different approaches to constructing software applications.

Finally, the course compares how code is written in several different languages, the libraries and frameworks that have grown around them, and the reasons to choose each one.

What is a programming language?

There have been hundreds of programming languages since the start of computing. But at any given time there are perhaps a dozen or so that are popular and by popular I simply mean that language is used in a lot of current software, it's used by large numbers of people, and there is an active community and a significant job market for that language. Now as the years go by, different languages wax and wane in popularity. New languages do come along. Some are big hit but most of them aren't. So this list changes, but it changes slowly. Now most programmers will learn and use many languages over the course of their career. Once you have got the basics down, additional languages do become easier to pick up. A little later in this course we will dive deeper into the most popular languages, but if you're new to this, you might think why, why are there so many languages? If all we're doing is writing simple instructions for computer, why isn't there just one computer language? Well actually that language does exist, but it isn't any of these. You see the CPU, the chip, the central processing unit that is the brain of any computer, desktop, laptop, server, phone, game console, well it doesn't understand any of these languages. We might informally say when we are programming that we're writing code the computer understands, but we are not. Not really. You see the only thing that chip understands his called machine code or machine language. Now these are the real instructions that run directly on your computer hardware. So the question is why don't we just write machine code? Well because it's almost impossible to do. It's numerical operations, tiny instructions that work on the smallest pieces of memory inside your computer and even if you could write it, it's basically unreadable by anybody else. This is for the machine. It's not for a human being. And because machine code works of the level of the CPU, it would be different machine code for different models of CPU. Writing a full program in machine code would be like digging a tunnel through a mountain with only teaspoons. It's theoretically possible, but it would take you so long and so tedious that you wouldn't even try. So all of these languages, the popular ones and the others, are in fact a compromise. They are invented languages. They are just trying to bridge the gap between us as human beings and the computer hardware. Now, some of the languages are actually quite close to machine code. The closest is something known as assembly language. In general the closer a language is to machine code the more difficult it is to write and the more you have to know about the actual hardware. And this what's called a low-level language. Now as you move away from the CPU into what are called higher-level languages you worry less about the hardware. Now this code is often easier to write and to share even across different platforms, but it can be slower when running because these languages aren't necessarily optimized directly down to the CPU level. Having said that, these days speed differences are minimal and we will be focusing on the high-level languages in this course. But whatever we write has to be converted down to machine code before it can run. So while this machine code piece seems like the most important piece, we are not really interested in machine code. Sure we do need to know that that's what runs, but programming for us is all about the source code. That's what we call the statements we write, Java, C++, Ruby, Python whenever. We write the source code that will at some point be translated then into machine code, so it can run on the computer. When I say I'm writing code, it's source code, and when I say programming or I am coding, I mean the same thing. So to start writing any of these programming languages, writing these statements, writing our source code, we need to understand three things: 1) how to write it, literally where do we actually start typing this, 2) to understand how that source code will be converted to machine code, and 3) how do we actually run it, how do we execute our program? And some of this does depend on the language that we pick, but let's begin with how to actually start writing these statements.

Find answers to the most frequently asked questions about Foundations of Programming: Fundamentals .

Here are the FAQs that matched your search "" :

Expand all | Collapse all

please wait ...

Q: Using TextEdit with Mac OS 10.9 Mavericks?

A: If you're using the built-in TextEdit program in Mavericks to write your first examples and your code doesn't seem to be working, here's one reason why: by default, "smart quotes" are now turned on in TextEdit Preferences.

This is where TextEdit will automatically change pairs of double quotes to "smart quotes" - where the opening and closing quote are different, like a 66 and 99.

While this is fine for human eyes, programming languages don't want this - when writing code, they need to be the plain, generic straight-up-and-down quotes.

So make sure that in TextEdit > Preferences, that "Smart quotes" are unchecked.

Important! Whenever you make a change to TextEdit preferences, make sure to then completely quit out of the program (Command-Q or using TextEdit > Quit TextEdit) and then re-open it, as changes won't take effect on documents you already have open.

However, we're not finished - just because you've changed the preferences, it does **not** change any *existing* smart quotes back to "regular" quotes - it just doesn't add new ones - so make sure to go through your files for any time you wrote quotes and TextEdit may have changed them to smart quotes - look in both the JavaScript, and your HTML too, and compare to the downloadable exercise files if necessary.

If that sounds like a bit of a chore, I recommend just downloading a code editor like Sublime Text (www.sublimetext.com) or TextMate (www.macromates.com) and using that instead of TextEdit - it's only a matter of time before you'd move away from TextEdit anyway - we only used it in the course because it was built-in and a quick way to get started, but it's now become more of a inconvenience than it was before.

Sorry, there are no matches for your search "" —to search again, type in another word or phrase and click search.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.

Already a member ?

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships.
Learn more

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.

Sign up and receive emails about lynda.com and our online training library:

new course releases

newsletter

general communications

special notices

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

new course releases

newsletter

general communications

special notices

Here’s our privacy policy with more details about how we handle your information.