Programming Languages

Programming languages are what we use to tell computers what to do.

Computers talk to one another in binary, which looks like this:

0011101010101111000111

It doesn’t make sense to me or you, but it sure does to your computer!

Since we can’t write in binary, we need to write our instructions in a programming language. They usually looks like weird English with a lot of semicolons and extra parentheses. Then a program called a compiler or interpreter converts our instructions into binary that the computer can understand.

There are hundreds of different programming languages, and they all make you type different things to get the same result. When you write your first program, it’s traditional to make the computer print “Hello world” on the screen – take a look at how you do it in these four different languages:

C++

1
2
3
4
5
6
7
#include <iostream>
using namespace std;
int main ()
{
cout << "Hello World!";
return 0;
}

PHP

1
echo 'Hello World!';

Ruby

1
puts 'Hello World!'

Java

1
2
3
4
5
class helloworld {
public static void main(String[] args) { 
System.out.println('Hello World!'); 
}
}

No programming language is really better than another – they all have different strengths and weaknesses. Some might be faster, or better in robots, or really good at making web pages. PHP, Ruby, and Python are three popular programming languages for the Web.

Cocktail Party Fact

Up until the mid-1980’s, computer programs were written on cards with holes punched in them (punch cards). If we still used them today, a single iPhone picture would take up over 9,000 punch cards!

Backend Programming from Ruby to Node.js

Backend programming includes everything that happens behind-the-scenes in a web application, meaning all the action that takes place on the server. That includes all the work of the programming languages, all the data storage, and all that web serving. (Click here to bone up on the difference between frontend and backend.)

Let’s say you want to look for factory to produce your new awesome watch design. You hop on over to your favorite website, Makers Row, and type “watches” into the search box. Since the website is built in PHP, PHP takes your search term, heads on over to the web server that stores the site code, pokes through the MySQL database for all the American factories that manufacture watches, and then sends a list back to the frontend of the site using JSON for you to see.

Now, because of the way the web is structured you don’t ever see the backend. But it’s still a great idea to familiarize yourself with all the different parts that make up the backend, because it plays a crucial role.

With that in mind, we put together a tech-term package that covers the major components of the backend–the common web programming languages, the data storage, and the web serving.

Happy Friday!

Backend Programming Languages

PHPPHP is one of the most popular programming languages for the web.
RubyRuby is a programming language designed for productivity and fun.
PythonPython is a programming language that is fun to read, flexible and easy to use with other languages.

Backend Programming Frameworks

RailsRails, a.k.a. Ruby on Rails, is a framework for building web applications.
DjangoDjango is a framework that makes it easy to build big, robust web applications in the programming language Python.

Data Storage

DatabasesDatabases are like fancy spreadsheets where information lives.
MySQL: MySQL is one of the most popular databases in the world, and no one agrees on how to pronounce it.
JSON: JSON stands for JavaScript Object Notation and it’s one common way to pass information from a database to a website.

Web Serving

Web Servers: A web server is a computer that can be accessed through the Internet.
Node.js: Node.js is a JavaScript framework that makes it possible to use JavaScript for backend development.

Django

Django is a framework that makes it easy to build big, robust web applications in the programming language Python.

Programming language frameworks are super popular on the web. You might remember our past tech terms about Ruby on Rails (a framework for the Ruby), or Twitter Bootstrap (a frontend framework), or Node.js (a JavaScript framework that makes it possible to use JavaScript as a backend programming language).

The way frameworks work, is that they come out of the box with a certain set of standardized features already in place. Backend frameworks often ship with functionality like CRUD (create-read-update-delete) and organization principles like MVC (model-view-controller), so that you can focus on the features and functionality that are unique to your website.

Django was originally created, way back in 2005, by a group of software developers who were in charge of building news focused websites for The World Company, owner of The Lawrence World, a newspaper in Lawrence, Kansas.

Since it’s origins were in content based businesses, Django is especially well suited for content heavy sites. Django, like Rails, is an MVC framework, but unlike Rails, it ships with a built in admin interface that makes it easy for non-developers to accomplish the CRUD tasks that are required for any content based website.

Famous web apps that are built using Django include Disqus, Instagram, and Pinterest. On the content side, PBS.org, The Onion, and The New York Times, are also all Django websites.

Cocktail Party Fact

Can you guess who Django is named after? If you guessed the jazz guitarist Django Reinhardt, you are absolutely right.

Who said software developers aren’t soulful?

If you are a Ruby developer, never fear! There is a melodic framework for you too. Chuck that silly Rails thing, and opt instead for the crooning Sinatra framework.

Client-side vs. Server-side

Client-side means that the action takes place on the user’s (the client’s) computer. Server-side means that the action takes place on a web server.

So what do we mean by action? And why does some action take place on your computer and some on a server?

When we say action we mean all that work that programming languages do. You will remember from our term about programming languages that they are the doers of the web.

Programming languages like Ruby, Python, and JavaScript do things like: send an email, ask the bank how much money you have in your account, or tell a photo slideshow to advance to the next image.

In order for a programming language to do its job, the computer has to understand the language its speaking.

Almost every computer in the world understands one programming language: JavaScript. For this reason, most things that can be accomplished using JavaScript can be done without needing access to a web server. Thus, though you are usually connected to the Internet when you run JavaScript scripts, you could just as easily disconnect from the Internet and run those same scripts on your computer (the client-side).

On the other hand, if you want to use a programming language (Ruby, PHP, and Python, etc) you need access to a server that understands the language. Tasks that need to be accomplished with those languages happen on that server, meaning they are done server-side.

But can’t I just install a programming language on my computer?

Yes, you can install programming languages on your computer but that still won’t let you find out your bank account balance without being connect to your bank’s servers.

The reason for this is databases. Data storage is the other thing that is usually handled server-side. If data was stored client-side, your bank would have to keep track of thousands if not millions of user databases all over the world. Instead, they keep all their user data in one centralized database where they  have easy access to it, and you do too via the Internet.

Cocktail Party Fact

Alright, so I understand client-side vs. server-side, what I don’t understand is how that is any different than frontend vs. backend development!

Very good call! It’s really not that different.

The difference between client-side vs. server-side, and frontend vs. backend programming is really a difference in semantics. Client-side vs. server-side describes where the action takes place (literally on your computer vs. a server). Frontend vs. backend refers to what kind of action is taking place (the kind the user sees vs. the kind a user does not).

At the end of the day, everyone is really talking about the same set of technologies.

Python

To create a “Hello, World!” app using Python, all you need to write is:

print “Hello, World!”

Quite a bit more straightforward than some of these other examples, we think! Web applications like YouTube, Reddit, Dropbox, and Yelp are all powered by Python.

Pythoners, like Rubyists, believe in writing code that is simple, direct, and easy to understand, meaning that even people new to programming should be able to read Python and have a sense for what it’s saying. The Python language is also designed to make nice with other programming languages (it’s a social language!) and rather than force programmers to use one specific programming method, it allows them to use whichever technique they prefer (it’s a flexible language!).

Python is also known for its rich library of tools that make certain tasks easy and fast to accomplish. The language is a favorite among data journalists and natural language scientists for its mapping and text processing abilities.

Python is a great language for beginning programmers and the Python community is especially welcoming of women – Pyladies is an organization of women developers who mentor new Python lady-programmers.

Cocktail Party Fact

Think Python is named for the snake? Think again! Python is actually named after the slightly less scale-y, Monty Python.

As a tribute to the language’s British namesake, Python programmers often use ‘spam’ and ‘eggs’ when they need generic placeholders.

Now Try This
  1. Visit Learn Python The Hardway
  2. Learn why the hardway is better
  3. Enjoy your new found Python know-how!