1. Different programming languages for different tasks

Posted on:  


It could be the first shock when you’re planning to learn to code — there are so many different languages you can use.

How come? Why can’t we just have one and make it easier for everyone?

Well, it’s not as simple as that. Each language is designed for different tasks. There is a saying: “If all you have is a hammer, everything looks like a nail”. What we need to do is pick the best language for the job in hand, not fit the task to what the tool can do.

Let’s split our languages into three sub-categories:

The best way to think about front- vs back-end languages is to imagine a website being like a restaurant — you have a front-of-house staffed

by the waiters, and a back-of-house where you find the cooks. A customer interacts directly with the waiters, who then tell the kitchen staff what to prepare. The cooks make your food, hand it to a waiter, who then delivers it to your table. On a website, you only see the front-end, which is what you interact with. The back-end works away behind the scenes.

Front-end web languages

The visual elements of all websites use a combination of three languages:

Back-end languages

Websites can use an assortment of languages but usually you pick just one back-end language and use that. Each has slight benefits over

others, but generally, they’re all doing the same job: showing users web pages and talking to databases.

Some languages used on the back-end include:

Some of these languages have extra libraries to help coders be even more productive. For instance, Ruby has a library for building web apps called Rails (short for Ruby on Rails). Python has one called Django and PHP has a few (Craft and Zend being two big ones). Even Javascript has a few: jQuery, React, Angular and Ember.

Mobile languages

Apps have a completely different structure to websites. For instance, if you’re building an iPhone app, you wouldn’t need any of the visual side of web coding as you’re not building a website. Apple provides a lot of the structure you need for building apps using two languages

(you can pick either), Objective-C and Swift. Swift is probably the most beginner-friendly of the two.

Android apps have a completely different structure again to the web and to iPhone apps, so developers have to build apps in Java using special libraries that Google provides.

If you want to build an app for both iPhone and Android, you’re essentially building two completely separate apps that work differently under the hood. You may notice when new apps launch they pick one or the other, depending on where they think most of their audience might be. This is purely a time issue. Why wait until you have built two apps? Build one and see if people like it.

Around all these languages there are tools that make it easier for coders to work together. You may have heard of Git, which is a version control tool (think of it as being like Dropbox for coders). Git doesn’t stand for anything, the inventor just thought the British word “git” meaning an ignorant, childish person was a funny word. What a silly git.

With Git, there’s a site called GitHub where coders can store their files to share either privately among their teammates or publicly if they’ve selflessly made some code other people could use.

How to pick the right code language for the job

With any digital project, success can heavily depend on the right choice of code language, but that doesn’t necessarily mean you should dive in with that language first.

Most languages share similar overarching processes in how they work. They take in data, do something with that data, then return something out the other side. For instance, if you’re logging into a site or an app, all code will be doing the same thing: taking the user’s name and password, checking then against a database, and if they are correct, logging in that user. The code might be different but the process is

the same.

Before I write any code, I always use pen and paper to sketch out the overarching process. If it’s taking a payment on SuperHi’s site, what is the order I should ask for things? Do I ask for an email address first or do I ask for which start date the customer wants? Do I make it a stepped process or should I do it in one big form?

This overall process is the real part of coding. It’s working out how to untangle a user’s requirements and make things easier for them.

With this in mind, it’s worth asking what code language to learn first. The real answer is it doesn’t matter too much. As long as you understand the overall process, it’s easy to apply it to any given language. Once you know one, it’s a lot easier to pick up another. The same is true with spoken languages: bilingual speakers can pick up

another language a lot quicker than someone with only their mother tongue.

Having said that, there are definitely some languages which SuperHi’s students have found a lot easier to pick up than others. Here’s is a list of the languages we identified a few pages ago, ranked in order of easiness to learn (with the hardest at the bottom):

We won’t go into detail about why we picked this order, but mostly it’s to do with the structure of the languages. The hardest ones have more ways to go wrong, whereas the easiest ones are more flexible.

Does this mean you should learn Ruby before Javascript? Possibly, but the opposite can be true too: if you learn Javascript and grasp its difficulty, Ruby will make sense a lot sooner. It’s whether you prefer a deep dive or a more gradual learning curve.

On our courses we learn HTML, CSS and Javascript together as it makes sense to show how all the visual parts of the web work

together, but we spend the first half of courses making sure students are comfortable with HTML and CSS before we even touch Javascript. Always make sure you’re comfortable with the first language before trying out a second.




Code


Art


Design


UI/UX


Video


Projects


Social