Wednesday, March 27, 2019

What Programming Language Should I Learn First?

The most common question I get asked from people who want to learn how to program is “What programming language should I learn first?”. Most people expect me to say something like as, “Start with programming language ‘X’.” or “I started with ‘X’, then ‘Y’ and etc….”.

If you are reading this then more than likely you're wanting to learn how to write software applications (commonly referred to as programming) and looking for a place to start. Perhaps you are thinking about going to college and want to get a head start or you have a business and need a software application or website or you just want to learn how to program because you are thinking about changing careers etc. Regardless of the reason you are here for an answer.

When I am asked “What programming language should I learn first?” Instead of giving them an answer, first I respond with a question. “What are you wanting to do?” Whereas, most experienced programmers usually say, “start with C first because most of the programming languages are based on C” and that is what they started on back in the good ole days of terminal computers. Others would say, “ learn Python because there are so many free learning tools available online and the Python community is really large”. Both of these answers are good answers and hold some of merit but I respectfully don't agree.

The purpose of this question is to find out if they really NEED to learn how to program in the first place. Allot of times people don’t realize that there are tools available (and most are free) to help them do what they want or the program has already been done so there isn’t a need to reinvent the wheel.

Is there really a need to learn programming?

The question is do you really need to learn how to write software? If all you want to do is make a website for your business, blog, or whatever then there are plenty of website building tools online and most of them are free! There is no reason to learn the intricacies of client side and server side web programming languages if you don’t plan on being a web programmer. You will end up frustrated and pay someone else to do it for you or not do it at all.

However if you are planning on starting the next big social media website then you should learn all you can about social media websites and the programming language(s) needed to make them. Maybe you are wanting to become a game designer then you will need to know all the languages associated with the game engines available.

Where do I start then?

Once you decide what it is you want to do, research what language (or languages) you will need to learn in order to create the software needed for the purpose you are writing software for. Most of the information you will be researching can be found online and usually the tools needed are available for free or at really low cost. If you still need more information, look for other people or companies that are already doing or doing something similar to what you want to do and ask them what languages and tools they use.

The next thing to do is once you know what software will be the most applicable to create your application, look online and find some tutorials on how to write programs for that language. Another option is to buy a book on the subject. Look around your area for a college bookstore. Allot of times, they have books they can’t use because the instructor changed the book and now the bookstore has excess stock so they will sell them at a discount. Another thing I recommend is sign up for a forum that specializes in the programming language you want to learn, read and ask questions.

To answer the question (kinda)

It is estimated that there are over 20,000 programming languages on this planet and they all have their strengths and weaknesses. For example Python is a very powerful scripting language heavily used on Google’s search engine and applications. Python is also used in the back end applications on most Linux operating systems. However if you are wanting to make a video game for the latest game consoles, then Python would not be the language to learn. Most game engines use C/C++.

Common Programming Languages

Below is a short list of the most popular programming languages and what they are most commonly used for to help you get an idea of where to start.

C/C++ Programming Language

This is the language that most programming languages are based on. It is very versatile and you can program just about anything with them. ‘C’ is used allot in programming microcontrollers and drivers for operating systems. It is a "low level" programming language and has a pretty steep learning curve. C++ is the object oriented version of C and is used mostly in things like Operating System sub-processes, game engines, 3D modelling programs and now it’s starting to find its way into the embedded systems world.

Java

Java is a very useful programming language and it is cross platform (which means it runs on most major operating systems that support the Java Runtime Environment) and has a very large knowledge base. Java has lately found its way in the smartphone industry and has now become one the most popular and widely used programming languages in the world and one of the highest paid too! This is a great first language to learn and there are allot of free tools for learning to program in Java and actually creating real Java applications.

The downside to Java I would say would be how big the programming language actually is. There are libraries for everything and object oriented programming in general is a little tricky to get the hang of with things like inheritance, constructors, deconstructors and etc.

Python

As stated above, the most complex web applications use Python. Python is not as easy as most people think it is to learn and I don’t recommend it as a first language because it’s more of a scripting language than actual programming. Also it’s very specific in what it was designed for and therefore limiting. But what it's designed to do, it does very well. The tools are free and the knowledge base is very large but I personally do not think a beginning programmer should start with this language.

One reason I would caution a person to learn this language first is the tab based function encapsulation. Without brackets, this can become confusing as a person would not typically learn to tab over to encapsulate or even nest functions.

HTML/CSS/JAVASCRIPT/PHP/MYSQL updated: HTML5

If you are wanting to be a web programmer, then these scripting languages are a must! They are simple to learn, the tools are already installed on your computer (except PHP and MYSQL), and the knowledge base is extremely large (arguably the largest of all the programming languages). This is a very competitive market as most entry level programmers know these languages inside and out. Most of the people who take the time to learn these languages do so for their own websites benefit or to start a web programming business.

I would say that this is a fun scripting environment to learn because it’s very simple and you see results immediately. I personally have used these languages as front end for larger more complex back end applications as they are easier then hard coding a user interface.

In conclusion

To restate the question, “What programming language should I learn first” is not as simple as saying, "start with this language or that one." Instead, ask yourself, "What is it I want to do and is this something I want to spend allot of my time doing?"

Leave a comments below about what you would recommend as a first language. Lets see what the world has to say about this.

How to get started in programming

So you decided you want to learn how to write software or "program"? Congratulations you have now entered a world of excitement, frustration, sleepless nights and coffee addiction. Joking aside, programming is a very rewarding (and lucrative) hobby/career. The problem is you need to know how and where to start. Fortunately I have been there too and can guide you through this process.

This article will help guide you in getting started to learn how to program but it doesn't teach you how to program. For that, you should read my article on "How to program" (coming soon).

Step 1: Pick a project

The first thing you have to do is decide what it is you are wanting to learn programming for. For example do you want to build websites? Do you want to make apps for cell phones or perhaps you are wanting to make a point of sale system for your friends startup trinket business. Whatever the reason, you need to make a decision on a project and stick with it. This step is critical in learning how to program because it gives you a goal to write the software for and in turn keeps you focused.

If you don't have a project to work on, you will window up writing small programs that don't really do anything or you won't program at all. It's like saying you want to build a car but don't pick a make and model. You will end up with a garage full of random car parts and no car.

Step 2: Research the language(s) required for the project you are going to do

This is an important step that can lead you down many paths of programming language types. For example, building a website can be done using HTML (with JavaScript and CSS), PHP (with HTML, JavaScript and CSS), Python, Java, and .Net just to name a few. Most programs are written using multiple languages that interact with each other.

For example a simple website can be build with just HTML (Hyper Text Markup Language) and it will look decent but very dated. If you want it to look like a professional website with drop down menus and slide shows, you add CSS (Cascading Style Sheet). If you want to add more interaction from the user, you add JavaScript. The point is, each language has its own unique aspects and can do cool things but together they can do some pretty awesome things.

Step 3: Setup your environment

When working with a programming language usually all you need is a text editor and compiler and you can do allot with just these but today we are blessed with IDE's (Integrated Development Environments) that help keep your source code organized and easier to navigate. Depending on the software application you are using, you may have to use a specific IDE supplied by the software environment.

But before you go downloading and installing IDE's I recommend getting a separate computer for this because you are more than likely going to downloading, installing and uninstalling multiple IDE's. This could potentially could slow down your computer if not make it crash because most of the IDE's out there are open source and could potentially effect your operating system. Another option would be to download a virtual machine and install Linux on the virtual machine.

Another good thing to do is if you are not a fast typing person, you may want to get better at typing as you will be doing this allot with writing source code. It's not a mandatory step but it would be helpful.

Step 4: Getting started

OK so you have your project in mind, the programming language you are going to use and your IDE is setup and ready to go. Now lets start writing that source code! Oh wait, you still don't know how to program yet. This is where you will start your journey on learning how to program.

First start with some simple text based programs to get you familiar with the language and the programming environment. A good place to get some learning tools is at a college bookstore. Speak with the staff there about old textbooks they may have. Allot of times, a professor will change their textbook from one semester to the next leaving an access inventory of books that the bookstore cannot sell and will usually sell them at a reduced price.

These are the small programs I recommend getting started with.

Computer programming projects:

1. Simple command line calculator
2. Complex command line calculator
3. Simple calculator with a user interface (window)
4. Complex calculator with a user interface (window)
5. Command line cash register system that calculates sales tax and discounts
6. Command line inventory management system
7. Command line cash register system that works with your inventory management system
8. Cash register system with user interface
9. Inventory management system with user interface
10. Cash register system that works with your inventory management system with a user interface

Website programming projects:

1. Simple HTML based website
2. Complex HTML based website with tables, video, pictures and etc.
3. Take your complex HTML based website and add CSS code to the layout and text
4. Make a CSS drop down menu
5. Make a CSS slide show
6. Add JavaScript to the website to enhance the drop down menu and the slide show
7. Setup a PHP server
8. Convert your HTML site into a PHP site
9. Setup a MySQL server
10. Create a blog site

Step 5: Start your project

By now you should have most of the tools and knowledge you need to start your project. Once you get started on this project and start adding more complexity to it, you will find you will be learning more and more as you go on. This is what programming is all about, research, learn and do. That is the only way you will learn how to program is by researching the problem you are having, learning how to correct it and then do it!
Remember programming is fun and rewarding but it can be very frustrating at times as well. Stick to it and keep learning. As an experienced programmer I can tell you first hand, that programming is an ongoing learning experience and you will keep learning as long as you keep programming but most importantly, HAVE FUN!


Most Viewed Post