TL;DR There are a few good options for the start like Python, JavaScript and HTML/CSS, but to find the best one for you, complete our test
When thinking about programming it is often hard to decide which language to start with. I saw a lot of answers to this question given randomly without considering the needs different people have.
Without the context, the best answer is it depends.
Some popular options include:
- HTML & CSS
- JavaScript
- Python
- C/C++
- Java
- PHP
So let’s examine them.
HTML & CSS
These two are not programming languages, but markup languages. They don’t contain features typical to programming languages such as conditional statements or loops. Their job is to let you define the logical structure (HTML) and look of a website (CSS).
A sample HTML snippet looks like this:
and a sample CSS file linked to the HTML looks like this:
Starting with HTML and CSS may be a good choice for the first language because it is fairly easy and lets you produce visible results quickly.
It may leave you hungry to learn the actual programming languages which is a good thing.
The downside is that you can only produce static pages this way and doing any meaningful calculations or user interaction will be extremely hard or impossible.
Good resources on HTML and CSS:
JavaScript
This language is mostly used to introduce dynamical features to websites like fetching data, handling user input and perform various calculations.
A sample JavaScript snippet looks like this:
You can paste this code into your browser console to try it!
A good resource on this: JS by Mozilla
This language will be a good choice for the start in general. Combining it with HTML and CSS will let you create dynamic websites. This is both fun and can easily let you get a job in IT.
Python
Python is a simple and expressive programming language that lets you achieve a lot in short time.
The areas where Python is used most often:
- data science, machine learning and artificial intelligence
- web development
- automation of boring stuff
A sample Python script:
This language will be a good choice for the start in general. It lets you benefit from thousands of libraries written by other programmers.
It has great documentation.
You can learn the basics of Python in our platform
C/C++
These are two languages with simiar syntax. Nowadays C is used mostly to write drivers and control electronics. C++ is mostly used in game engines (like Unreal Engine) and competitive programming.
Sample C code
Sample C++ code shows that in simple examples it’s very similar to C.
You should be cautious starting with these languages.
You can build a lot of interesting low-level projects with them but the learning curve is pretty steep.
It takes long to become fluent in these languages and then it also takes long time to write code in them.
With these languages it may be too easy to get discouraged in the beginning.
A nice introduction to C can be found in a famous book by Kernighan and Ritchie
Java
Java is mostly used in corporate environment and mobile (android) application development. Although sometimes it is still recommended to beginners.
Java code looks like this
The downside of this language is its verbosity and forced object-orientation. You may need to write a lot of code to achieve the desired result.
You should probably not start with this language unless you have a very specific goal in mind like:
- getting a job the corporate/financial industry
- building a native mobile applicaiton
PHP
The most widely supported language for hosting pages. This is the language that powers Wordpress - the most popular internet platform. This is also the language that Facebook was originally written in.
You should probably not start with this language unless you have a very specific goal in mind, such as:
- extending your Wordpress page
- preparing scripts that need to run on a server that only supports PHP
Summary
In general if you are a beginner and you want to start learning programming, you should probably start with one of the following languages:
- HTML/CSS
- JavaScript
- Python
Because they let you produce visible results fast.
However, if you have different goals, the answer may be different for you.
To get a personalized recommendation complete this test. It should take you around 2 minutes.
Check out our programming app at https://codilingo.com