What programming language should I learn first?

Read this guide to Find out what is the best programming language to learn in your particular case. What programming language should I learn first? It is a question that many people want when decided to learn to program. In this section, we will see the elements and criteria to direct that selection.

PHP, Java, Javascript, Python, Swift, Objective C, Kotlin, C ++, Ruby, Scala, R, Pig, Hive, SQL. They are not simply different ways of expressing the same thing. The programming language is the part of the programming that will infuse less in your life if you dedicate yourself to programming. That’s why the key is not in the selection of the language but in what you want to achieve when programming. That will open a range of possibilities, which will be more limited according to the activities, work team, type of companies, type of applications, environments that you choose.

Nature of programming

Programming is like being an actor. Nobody can work as an actor mentioning only the profession of an actor. When we act, I represent a role: a king, a thief, (a thief king), a policeman, a depressed person, a lover. But we have to act on something. The same thing happens with software. We do not simply program. When we program, we usually build an application that serves something. To exercise, to keep accounts, to communicate, to draw.

Then, related to a specific domain, what many times called the “industry” there will be a set of variants, possibilities, related actions in which applications can be made. And those applications will be expressed in at least one programming language if it has a single component, or very possibly in several if the solution involves several parts.

When they ask, I want to program what programming language to study first? I find a question similar to I want to play sports, with what sport I should start: Running, Swimming, Fencing, Bullet Throw, Rugby, Baseball, Soccer … It

Sounds weird, does not it? We see that we can have preferences beyond that we like sports. The same goes for programming languages. While there are things that can be done in more than one language, each language confronts us with a context, with an environment, and with certain types of applications, even with a social group.

The languages also arise as the solution to express the way to automate the solution of a problem. So many times they have the orientation of the problem they solve.

Specific Languages for Specific Industries

Then we saw that we can ask ourselves … what kind of applications do we want to make? Music, sports, commercial applications, for small companies, for multinational companies, related to IOT, related to Big Data, for data analysis? If we choose the type of applications first, we will see a subset of smaller languages that point to the area we are choosing.

One way to train our intuition is the site https://sourceforge.net The site has many applications from which you can see the source code. It has a set of categories. We can browse the categories and see how many applications are made in each language. If the distribution is not even, and we find for one area many applications of one language and a few of another, it may be an indication that this language is more suitable for that area.

Specific Languages for Specific Devices

 

Another thing that we can evaluate is about the type of application, and in this case, the variety of languages is more narrow When I say the type of application I mean “web application”, “mobile application”, “desktop application”, business application. Big Data application, IOT application

Outside of these, if we want to program a specific device such as a printer, a musical keyboard, or an Arduino type application, in each case the option will generally be one, and it is the language that comes with that. team.

Now let’s look at the more general ones.

Web Application

What is a Web application ?. In general terms, it is an application available on the internet, which we generally use through a browser such as Chrome, Firefox, Opera.

The particularity that Web applications have is that the browser generates the visual part that we use. In general, the web application runs on a server (for example, Facebook, Google, Instagram or the Online Bank) and, upon our orders, sends to our browser a set of characters that the browser interprets from which it shows us something (the web page ). That set of characters that the browser interprets is normally written in a language: HTML

So HTML is a language, and if we want to make web applications it may be the first language we should learn.

The peculiarity of HTML is that it represents “static” elements that the browser shows. For example, you can have elements like

<title> The title of the article </ title> <p> The first paragraph </ p>

And the browser knows how to show each thing. You can see the HTML of a page in your browser by clicking on the right mouse button and choosing “View source code”.

In general, HTML has to do with content. While you could also express format (such as red text, or larger font) in general, another more specialized language is used in combination with HTML to express those styles, and it is CSS.

So CSS is the other language, maybe the second one to study (it is not necessary so full, simply understand the bases, if you do not dedicate yourself to the design)

Both HTML and CSS are static. This means that normally they do not react in themselves to what happens, such as user intervention (except for a few operations)

Just as HTML is combined with CSS for styles and design. HTML is combined with JavaScript (not Java) for actions. So if we want to add behavior to the website … as when filling out a form we forget to load a mandatory data, and that data becomes “red” to indicate it. That operation was probably done with Javascript.

So for web applications HTML + CSS + Javascript are a fundamental part. These are the languages that the browser interprets.

But here does not end everything.

We saw that this information reaches the browser because someone generates it (Facebook, Instagram, Google or The bank that has the website) It is to that part what we call “Server”.

Then on the server side, there is an application written in one or more languages that in front of an order, send the HTML + CSS + Javascript to the browser.

What languages are on the server side?

There may be several. But without trying to be rigorous, I can mention that the most common and that has a lower learning curve, and that has fewer syntactic elements (less complexity) is PHP. I think the server side is the simplest thing.

PHP does not generate graphic elements on a screen. Since it was made to give web solutions, it allows to take an order (through the network .. not by screen) … and in front of that request, it allows “to do things” and then of those things to emit an answer …. which is going to be a set of characters.

How can an application be made with that? Clearly, the order will be a network request that will be attentive, and the response will normally be HTML, CSS + Javascript + other files that will be sent to a browser that will show something to the user.

 

Web Alternatives for Server Side

For web applications, there are several alternatives, such as

PHP: In principle the simplest of all for the server side. It is also in all the servers (hosting) economic. For web applications and for anxious people who want quick results is the best option.
Java (more components, more business, a structure with more formalities than PHP, and with more powerful syntactic expressions ..)
Python (as powerful as java in terms of what it can express, but more efficient … uses several paradigms as a solution) (In addition is available in almost all cheap hosting services)
NodeJs: It is very interesting since NodeJs is server-side Javascript. It is interesting because if you have already learned Javascript for the browser side, you have half a way done and you could solve the whole web solution avoiding learning another language. The counter of this option is that it is not available in the economic servers. (Usually, PHP and Python are in the basic plan)

Web Alternatives for Client Side

Variations on web applications

As we saw in the web application on the browser side, the natural thing is to work with

HTML + CSS: Static content
Javascript: Dynamic content, actions, behavior
But Javascript when it does something, it does about HTML. So that after validating the form, the empty data appears in “red” is because the Javascript modified the HTML in that field and changed the value to “red”

Therefore, in the browser, we have 2 options

1.- See code source: In that option, we see the HTML code that the browser received from the server

2.- Inspect: If we go to the “Elements” part we will also see HTML. Peo will be showing the HTML as it is now.

What is the difference? If the Javascript made a change, in the first we will see that the element was sent in black (original color)

And in the inspect we will see that the element is now “red” (HTML modified after the javascript changed it in front of our attempt to send the form with that empty field)

Then the javascript manipulates the original HTML so that we see changes in our browser screen.

Single Page Application

Since the Javascript can manipulate the HTML, some instead of sending an HTML and letting the Javascript only modify some parts in front of some actions …. they choose to send the browser a Javascript that has instructions to generate the HTML of 0.

That is to say, the Javascript arms the complete HTML that the browser shows. Even if we learn this way of making applications it does not take away the responsibility of knowing HTML

Even these applications made with Javascript are usually associated with other technologies that facilitate or structure that solution, such as React / Angular or Vue. But you should definitely take the first steps with JavaScript

Variations on the server side

For the case of the server, I mentioned Java / PHP / Python / NodeJs

There may be others, but we saw that the main function would be to

listen to a network call
process something
send a response (HTML + Javascript + CSS) or simply Javascript that Build the HTML
Even these languages have alternatives to better structure our application when it grows. Among the alternatives, there are Frameworks and Libraries.

 

Libraries and Frameworks

Libraries are libraries of functions that are not in the base of the language but that we can acquire for specific operations.

For example, Python has libraries for complex mathematical calculation or scrap (browse sites and get information from them). Both PHP and Java as NodeJs also have innumerable libraries. (Libraries … not libraries)

Frameworks are solutions that provide us with a skeleton or main structure to solve something and we instead of programming the entire application from scratch, we simply fill in the gaps that make that general structure work.

For example, for almost all applications there are common operations such as login, register user, menu, error messages, communications, which are independent of the industry in which we work.

There are many frameworks that provide general functionality and many other frameworks that provide specific functionality such as allowing our application to receive credit card payments.

Among these we can mention:

PHP: Laravel
Python: Django
Java: Spring and Java EE
Java EE is special since it is the Java Standard for business applications.

We must consider that once we learn the language, the framework does not take away the responsibility of learning what is behind the framework. While creating the applications (and follow the tutorials) we do it much faster than creating it, and in a few steps we have an application running, when we have an error or find a problem or where the system does not do what we want, if we do not know the framework … that task becomes very difficult.

It really is very useful to use the frameworks but you do not have to settle for just doing the first tutorial and have everything going. You have to know at least where to look in the reference the day we have a problem.

Here I finish the section of Web applications.

Then to start with Web I recommend:

HTML + a bit of CSS + Javascript (Client) + PHP (Server)

For the anxious, certainly PHP

There are many other reasons to choose between Javascript / Java or Python.

Mobile Applications

 

For mobile applications, the options in principle seem to be more limited.

Native Mobile Applications

For Native applications the languages available are

  • Android: Java or Kotlin
  • iPhone: Swift (new) / Objective C (previous versions)These are the “native” languages, that is, the language for which the factory operating system was prepared. Using these languages the phone or tablet will behave like the applications for which it was manufactured.

But again there are alternatives.

If you did not read the Web part, review it.

 

Hybrid Mobile Applications

In a mobile phone, we can run many applications, including a browser. So if on the cell phone we can run a browser like chrome, or the one that comes with the phone, then we can run an application that a browser understands.

Yes, we could make an application with HTML + CSS + Javascript that runs on the cell phone. In this case, we would need some help.

There are technologies that what they do is take our application made with HTML + CSS + Javascript, and with that, they build an application for either Android or iPhone and that application can be installed on the phone and it seems a native application.

Among the best known are PhoneGap / ReactNative and IONIC.

So knowing only Javascript + HTML + CSS we could make useful applications for cell phones.

The final result is not exactly the same as a native application, but it is quite acceptable depending on the type of application.

If what we want to program games, maybe we have to think about other technologies like Unity.

In the case of ReactNative, the final result takes better advantage of the possibilities of each phone, and in addition to Javascript you have to know React (which is a JavaScript visualization framework)

Desktop Applications

For desktop applications, we have both Java and Python. And surely C ++ or C #, NodeJs. Definitely, PHP is not for Desktop although there were some attempts to make PHP libraries to show things on the screen.

Use of Frameworks

Something else regarding the use of frameworks is that for applications of magnitude it will be difficult to work without them. The most accurate reason is that by involving many people in a team, acting directly with the “natural” languages makes each one choose their own solutions and forms. When working in a framework, one can leave the standards but it makes things much more difficult (the framework is not used). So when working with the framework, beyond the application program structures are achieved more predictable and more common even when we change the environment.

WordPress

Something interesting to start programming can be WordPress. for web environments. WordPress provides us with an application that when we installed it (giving Next next next-next) we have a working blog.

And if we add Woocommerce (a plugin) … giving next next next … we have a virtual store running.

The interesting thing is that what we install is a PHP application that generates HTML + CSS + Javascript.

We have a console to interact as users or as administrators.

And we have all the source code of how it was armed. That is to say that we could modify it and play with our first programming steps within WordPress.

Again, being WordPress as a framework has the disadvantage that we must know its entire structure to modify things in an accurate manner. And we have a body of knowledge that goes beyond language. But it seems a valid alternative for the very very very anxious that want to have something working NOW.

SQL

I do not want to stop mentioning another language that is SQL. This language has another purpose. And it is communicating with a type of database, which is called structured data.

It is interesting that the language has basically 3 fundamental instructions

  • INSERT
  • SELECT
  • UPDATEIt is obvious what is each. One is to create new data, another to modify them and another to obtain data that meet a condition.

In general, when our application has to persist data over time, such as remembering a user that is registered, will have to interact with a database, giving this type of instructions or similar.

It is possible that you also have to face this language if your applications save data over time.

 

What about C ++?

I noticed in several places where I published this article that in some areas many argue to start with C ++.

Again I want to clarify that if that is your preference, that is the language. Actually, languages are not easy or difficult. Simply the form of language coincides to a greater or lesser extent with the mental model that each one has to solve and express the resolution of problems. Therefore the selection of the language has to be led by your preferences. You have to like it enough so that you do not hurt the time you spend or stop doing other things to learn it.

But why do they argue that it should be C ++ and why do I think they are wrong?

It is a question of principles, priorities in life, and relationship with goals.

I understand that software development, unlike many other activities, has an incremental nature. That’s why we already had more than 20 versions of the useful Excel. Once we have the software, it invites us to change it and to want other things. Sometimes more (with more tools or features) and sometimes less (like Skype … with a simplified screen). The point is that as we use the software we realize that it could be better.

Faced with this incremental nature of software seems to me archaic any solution that is postulated as perfect and the cornerstone of something.

 

This also is related to something that I mentioned is that languages ​​have a type of expressions related to the solution they propose. There are things that are very difficult to express in a language not prepared for that solution.

An example of this is the polar coordinates and the Cartesian coordinates. Expressing a line in a Cartesian coordinate system is very simple (y = 5x for example). Now, expressing a circle has another complexity (r squared = x squared + y squared). Now draw a circle in polar coordinates is very simple (y = 5) and a spiral tambén (y = 5x) … but you would need to have advanced knowledge to draw a line in a polar coordinate system.

The same happens with programming languages. Then believe that there is a language that has the characteristics of all others … is a very limited view of reality. On the other hand hiring someone who has that vision, obviously creates the risk that in the face of a new technology try to apply it in the way that the system that you already know resolves … which makes the solutions later complicated. understand (that although it feeds the ego … it is not profitable for companies, whose main achievement is to generate the best solutions with the least seniority)

In programming languages, an example is Map Reduce. In Map Reduce you arrive at a solution through a series of steps that are applied over the entire data generating a data set closer to the solution. Each step returns to generate a total set of data that does not have the complete solution (except the last step). This form of resolution is totally inefficient in front of procedural systems where computers are directly told the next step they have to take. However, Map Reduce becomes the natural solution for distributed systems with large amounts of data wherein parallel, independent servers resolve fragments of the solution, allowing a large part of recent Big Data technologies. And while some instructions may be forced to look similar, the organization and structure of the programs will be different in essence.

And another point with priorities is another point that I mentioned. NOBODY IS INTERESTED THAT WE PROGRAM. We schedule to create software or a solution. Then I find in many who schedule a disconnect between their tasks and the ultimate goal. If the goal is to know, feed the ego by solving things that others can not solve, and exclude them because in addition to not knowing how to explain to others it seems difficult what we solve, studying and knowing a “difficult” language covers all our expectations.

Now, if what we do is answer someone who comes to ask us “What programming language should I learn first?” … We have to realize something … that the person asking does NOT KNOW ANY LANGUAGE. Most likely I have not tried any with either … because if not, I would not have asked. I would have found any tutorial on the internet and I just started to know it. That is to say that it is someone who still does not know if he will like to program or not.

Then answer: I learned C ++ because with that it will be easy for you to learn ALL LANGUAGES … How do we know that you will want to learn another language? The solution: Take a look at the HTML and look a bit of Javascript until you achieve something and see that you can generate action on a computer. And if you liked it and want to dig a little deeper, with a few PHP instructions you generate an environment that involves 2 computers and a network, you are able in a limited time to enjoy creating a simple solution, but a solution of yours. Similar to the incremental nature of software, it is better to make first tries to know if you like or not, and then take the path you want knowing a bit more and having tasted it.

Saying, I learned the hardest first, it’s the same as if someone asks us how to train to climb, answer … to start the Himalayas. If you manage to climb that, then you will be able to climb any other hill or mountain.

And this has to do with the lack of the art of teaching that many programmers have so they exclude new ones or make them seem difficult things that are simply easy if you take them by parts, if your mental model matches that type of solution and if you like it enough to spend time on that.

Conclusion

Languages are like sports. Each language will face different solutions, environments, problems. Before thinking what language you want to learn, think about what you want to do, what kind of equipment you would like to work with, or in what environments you want to work. Based on that you can choose to learn with enthusiasm the language that most combines with you.

One recommended way besides tutorials is to download an application from https://sourceforge.net/ and see the effects of check your changes on them. This can be done when you know how to install the environment related to a specific language. Changing small parts of big applications it is an interesting way of learning a language.

Another alternative could be to download from https://github.com/
In both cases, downloading from github or from SourceForge net, choose only applications that are widely distributed and really used by people, as anyone can upload any source code there. Check the indicators that show you that the application is appreciated for many people.

Changing small parts of large applications is the best way to learn once you take the first steps. That will confront you with related technologies and a real working environment.

Leave a Reply