2015-12-07

An introduction to HTML, CSS and other basic coding languages



Graphic Image by Amitabha Technology, Inc. – a web design company in Kigali, Rwanda. Visit http://www.amitabhatechnology.com

In the broadest sense: to code is to speak to, control, or otherwise communicate with a machine (computer). “Code” is a synonym for “computer language.”

Everything that you know as software – your computer’s operating system, your mobile apps, your favorite websites – is designed and coded using a computer language such as Python, C, Java, Scala, Ruby, Go, PHP and dozens more.

The purpose of these languages is to make it possible for you and I to communicate with our computers in a way that is similar to human language but can also be easily translated into machine code, the language your computer understands.

Computer languages run the gamut from highly technical and largely numerical to something that begins to resemble English. All told, there are hundreds of computer languages including ones that are entirely visual and even one in Icelandic.

This guide will discuss the major types of computer languages, how they relate to one another, which ones you should learn, and most importantly, why you would want to.

Which computer languages you should learn & why

Although there are hundreds of high-level computer languages, only a few dozen are in commercial use. You might have heard of some of them, like JavaScript, PHP and Ruby.

Before we talk specifics, let’s get one thing clear: there is no best language to learn or use.

Programmers love to bicker about one language being better than another, and in some instances, there are particular languages that are popular for specific purposes.

Most programmers will learn more than one language over the course of their coding careers and the most important factor when it comes to deciding which programming language you will use is…which one you like best.

That said, here are 15 popular computer languages:

HTML & CSS

You may have heard the terms “computer language” and “programming language” used interchangeably, but they are not actually the same thing. Programming languages are a specific subset of computer languages that program computers, meaning they tell them what to do.

HTML & CSS are two examples of computer languages that are not specifically programming languages. But that doesn’t mean you shouldn’t learn them! In fact, knowing HTML & CSS is a requirement for all web developers and most web designers, and it’s a great place for a budding web developer to start.

HTML tells your browser what to do with each part of a web page.

Understanding how browsers interpret HTML was a big “aha” moment for me – your browser (Chrome or Firefox, for example) is built to read HTML (and other languages).

What do you see when you visit a website? Probably a site title, a navigation bar, and some blocks of text. A browser can tell the difference between a paragraph and a headline because all the content on a site is marked with an HTML tag. HTML tags look like this:

You write HTML just like normal text and save it in a file with .html at the end. HTML is the only thing that you have to have in order to make a website, but it won’t be too pretty:

While HTML identifies and classifies each part of a webpage, CSS determines what they look like. In the example above, you might have deduced that the HTML

tag tells a browser that something is a paragraph. To make all of our paragraphs pink and bold, we can write some CSS like this:

Like HTML, you can write CSS in a text editor, but instead of saving it with an .html suffix, you’ll use .css.

With CSS, you can make web pages beautiful with colors, spacing, layouts, borders, fonts and more. The power of CSS lies in the fact that it controls the web pages overall, giving them a consistent style with one framework. You don’t have to make a decision about every page, and if you want to change all the pages, you can just edit the stylesheet.

HTML & CSS skills are useful for and often integrated into many different types of jobs, from social media marketers to user experience designers.

JAVASCRIPT

You know when one of those “Hey! Look at our newsletter!” popups appears in the middle of your screen? Or when your Twitter automatically updates? Or when you click a drop down menu on a mobile site? All of those are examples of JavaScript.

JavaScript makes websites interactive. It takes HTML and CSS and gives it a way to move around without reloading the page. If something moves on a website and you didn’t do anything to make it happen (like click a link to a new page), that’s JavaScript in the works.

JavaScript has been around for a while, but it didn’t become really popular until about 10 years ago, with the advent of “AJAX” and “Web 2.0.” These were sets of technology that used JavaScript in a whole new way, allowing the Web to be way more interactive than it had been before.

These days, JavaScript is incredibly popular, especially in frameworks that make it simple to incorporate HTML, CSS, and JavaScript. Popular frameworks include Ember.js, Angular.js, and Backbone.js, all of which allow for much more complex uses of AJAX, as well as Node.js, which allows you to run JavaScript on a server, have made JavaScript one of the hottest computer languages out there. A 2014 analysis of job descriptions showed that JavaScript was the most in-demand computer language, showing up in nearly 14% of all developer job ads.

You might have also heard of “Java,” but that’s actually a completely different language (more on that later). The joke goes, “Java is to Javascript what Car is to Carpet.”

The above languages, HTML, CSS and JavaScript, are all “frontend” web languages, meaning they define, style and animate the parts of the website that you see and interact with in your browser. This means the buttons, the dropdown menus and the big bold fonts. Frontend languages allow you to affect how content is laid out on a webpage, how it is structured and styled, and how users can interact with it.

But there’s a lot more that goes into making a website work. Websites are a lot like icebergs: you only see what’s above water (the frontend), but below the water it goes hundreds of feet deep.

The “backend” is everything that happens before it gets to your browser: the systems and structures that edit, store, and source the data and content that makes up the website you see. For example, if you’re booking a flight, it’s in the backend of the website that the prices are checked, itineraries are booked, and credit cards are charged. A backend can be very simple or very complicated. The backend can also be edited without the user ever knowing that changes are being made. Typically, when someone says “programming,” they are referring to the work done behind the scenes.

All of the following languages are used in backend programming:

PYTHON

Python is a high-level programming language that you would use if you were a graduate student in biology or math because it’s great for crunching data, and academic researchers love it. Fittingly, Google also loves Python (YouTube was written in Python) because, Google too is all about the data.

Although not designed for the Web, thanks to Django and other frameworks – that would be pre-written code bundles that take care of common software tasks – more and more Web developers are turning to Python, especially for websites that involve heavy data crunching or text analysis.

COBOL

Rear Admiral Grace Hopper’s early work on compilers led to the development in 1969 of Cobol, one of the first widely adopted high-level programming languages.

Despite its age, or perhaps because of it, Cobol is still all over the Internet. “Some 23 of the world’s top 25 retailers, 92 of the top 100 banks, and the 10 largest insurers all entrust core operations to Cobol programs running on IBM mainframes,” says Deon Newman, vice president, IBM.

It’s not common for companies to write new software programs in Cobol and instead, it’s most often found in legacy software. That said, because there is so much Cobol code out there and so few new developers who take it upon themselves to learn the language, Cobol developers are in high demand. Just don’t expect to impress the hipster tech set.

C

Like Cobol, C dates back to 1969, when it was born at Bell Labs. C was actually based off of an earlier language called B (get it??). C boomed in popularity and some consider it the most popular programming language ever created. It is still commonly taught in computer science programs.

C is a versatile language in that the code doesn’t have to be altered very much to work across different operating systems, like Mac, Windows and Linux.

C is usually considered a low-level computer language because it is more closely related to machine language, and it is commonly used to make computer hardware communicate. Think: when your computer notices that you’ve inserted a CD into the disk drive.

JAVA

If you’ve ever waited for an animation or interactive element to load on a webpage and just seen a coffee cup, you were trying to load Java.

Java (no relation to JavaScript) is an object-oriented programming language that is often used for embedding media or other content across different platforms. Java coders have historically used the phrase, “Write once, run anywhere,” to emphasize how Java allows programmers to move code to different platforms or operating systems (like building an app for a PC and moving it to a mobile device) without tweaking or customizing it.

C++

Time for some code jokes.

So in programming languages, ++ stands for “take this plus add 1.” Do you remember in Super Mario when you sometimes got a “1 Up” token? That’s basically what the (brilliantly named) programmer Bjarne Stroustrup meant when he named C++. It’s one better than C…get it?

One way that C++ was an improvement on C was in the way it stored and organized information. Rather than listing out all information in long, unreadable strands of code, C++ is an object-oriented programming language – it likes to organize information in bundles. It’s the difference between carrying your lunch to work in a lunchbox and trying to make it there with an apple under your arm, a sandwich in one hand, a juice box in the other, and a bag of chips between your teeth.

Seriously, just go with the lunchbox.

Because it’s so much better at storing bundles of information, C++ is used in a lot of large, complex programs, like Windows. The downside? All those fancy packages of information take up a lot of memory.

C#

Are you noticing that there was a lot of C-spawn? C is a powerful language, so it makes sense that other languages have grown out of it.

C is a powerful language, so it makes sense that other languages have grown out of it.

But C# doesn’t actually have a lot in common with C or C++. The # part of the name doesn’t have much meaning either. Originally called “Cool,” C# ended up with its name because Windows had also created languages like A# and F# before debuting C#.

Like C++, C# is used to build a lot of Windows programs and it’s a good choice for web development on Windows-based servers.

For practical purposes, some say that C# has a steeper learning curve, but can make for a cleaner, faster development process than C or C++.

RUBY

Ruby is founded on the belief that programming languages should be as similar to human language as possible.

In 1995, Yukihiro Matsumoto, or Matz, designed Ruby to be easier for coders to write and understand. A popular example shows how simple it is to write “Ha, ha, ha” in Ruby.

Traditional computer language languages might do it like this:

But in Ruby it’s like this:

Nice, right?

10 years later, in 2005, the Ruby on Rails framework made it possible to write web pages using Ruby. Now it’s one of the most in-demand languages out there, and it powers popular websites like Twitter and Hulu.

PHP

PHP is one of the most popular programming languages for the web, largely because it was the first programming language designed for use on the web, and it’s the language that WordPress is written in (WordPress alone accounts for over 20% of all websites in the world).

When you ask a web server for a page, it’s PHP’s job to piece it together. When you browse a WordPress blog or make a post on Facebook, PHP is making that possible also.

Unlike Ruby or Python, PHP comes preinstalled on most web servers. Anyone who has gone through a Ruby install on a Mac probably knows why that’s such a selling point (trust us).

You’ll often see PHP associated with LAMP. LAMP is the name for a common way to set up a web server, database, operating system and web language:

Linux (operating system)

Apache (web server)

MySQL (database)

PHP (web programming language)

SQL

When you build a website, your address is the URL – that’s where users can find you, but it’s NOT where all your data lives.

When you write a blog post on your blog, you’re actually sending all that text to live in a database. Every time the page loads, it retrieves the text from your database so that your user can read it.

To get information in and out of a database, you talk to the database in a programming language like SQL. Don’t confuse SQL with MySQL: SQL is the programming language and MySQL is a popular database that speaks SQL. Other popular SQL databases are Microsoft’s SQL Server and PostgreSQL.

SQL is short for “Structured Query Language,” and in some ways, it’s pretty straightforward. Say you want to retrieve every user in a database who is over 35:

You should also note: some people are anti-SQL, or part of the “NoSQL movement” and prefer to use databases that aren’t so structured. One alternate database is Cassandra, but there are others. Many companies (like Facebook and Twitter) use a combination of both, so being well-versed in multiple database formats is well-advised should you apply for a job in database management.

OBJECTIVE-C

Objective-C was created in 1983, but has recently become very popular because it powers OSX and iPhone apps. It’s kind of like C Language but with an expansion pack that that makes it more object-oriented. Some of the additional capabilities of Objective-C came from the language Smalltalk.

Although Apple did recently release a new language for programming mobile apps called Swift, Objective-C is still the language to learn if you want to go into iPhone app development.

SWIFT

Swift is a programming language designed specifically for coding Apple’s iOS and OSX, meaning you can use it both for iPhone and Mac apps. Designed by Chris Lattner starting in 2010, the brand new language was unveiled in 2014 and is based on Objective-C, but was built to improve upon some of the issues with Objective-C and make it more user friendly for developers.

At this point, there are still a lot of bugs and quirks that are being worked out with Swift, so if you want to build for iOS or OSX, you should still learn Objective-C.

R

Remember how I said Python was particularly useful for academics and other people who need to process a lot of data? R is designed for data as well, and a lot of surveys, graphics and statistical programs are built using R.

That said, R is not a particularly friendly programming language and is usually only used by academics or data scientists.

If the idea of big data appeals to you, learning R could be the way to go. – Skillcrush & Mashable –

The post You never learned to code? Start here. appeared first on Dove Magazine in English.

Show more