What Programming Language to Learn First?


background image

Some of you will remember that last year I made a resolution: to learn programming. I have not written about it, but I have been sticking to this resolution ever since.

In fact I have put most of my websites on auto-pilot, so that I just need to spend one or two hours working every day (i.e., 30 minutes answering emails, 30 minutes doing general maintenance tasks, and 30 to 60 minutes researching and writing a post for DBT). The rest of the time I am either coding, reading programming/math books, or attending lessons on a local university (I’ll talk about this on a future post).

I know there are many readers who would like to learn programming as well, so occasionally I’ll write a post about what I am doing, what worked for me, what didn’t work and so on. I had plans to start a new blog completely dedicated to this topic, but I figured this would take away time from coding, so I dropped the idea.

Today I want to talk about the first decision I had to make when learning to code, which is what programming language to learn first.

If you are going to college then you don’t need to worry too much about this question. The college will pretty much pick a language for you (e.g., some start with C, some with Python, some with Java and so on).

If you are going to learn programming by yourself, at least initially, then you need to think twice before making your decision, because the language choice will certainly affect your progress, and if you pick the wrong one you might lose motivation along the way.

I spent a great deal of time researching on the Internet, and if you do the same you’ll find that the discussions about the best first programming language are quite heated! After some days researching I decided that Python was the right choice for me. The reasons for going with Python as a first language were:

  • Python is a very high level language, which means it comes with a lot of functions and abstractions out of the box. This means you can spend more time thinking about programming logic and algorithms, and less time thinking about correct syntax.
  • Python is a general-purpose language, which means you can use it to create virtually any type of program or software, from web scripts to games. This means you should be able to use it to code projects you are actually interested in.
  • Python is an interpreted language, which means you won’t need to waste time learning how to compile code. You simply downloaded an integrated development environment (IDE), write your code and press “Run.”
  • There is a huge amount of programming books, videos and courses online that use Python as their language choice.
  • Python is used in the real world as well. Some very large companies like Google and Facebook use it on my parts of their platforms and products.

I have already moved to a new language (C), but looking back I still think that starting with Python was a smart choice. It’s like learning to drive first (i.e., coding in Python) and only then taking a look at the engine under the hood to understand how the machine actually works (i.e., coding in C or even Assembly if you want to get close to the iron).

I don’t think Python is the absolute best language to learn first, though. It depends on your goals. If you are planning to make a living writing code (either for you or for someone else) then I believe starting with Python is a great idea. After you know the basics of programming logic and algorithms you can start using lower level languages like C, and after that you can start using Object Oriented ones like C++ or Java (technically Python also offers object orientation, but I wouldn’t play with that if you are just getting started).

If you have a narrower plan, you probably should start with a language more specific to the problems you want to solve. If you want to learn programming exclusively to tweak WordPress or to create WordPress plugins, then I think starting with PHP would be smarter, as it’s pretty much the only language you’ll need to use in the future.

Similarly, if you just want to develop iPhone apps, I would recommend getting a basic understand of the C language, and then move straight to Objective-C, which is the main language used to build iPhone apps.

Finally, Java is also considered to be a good option as a first programming language. It has the advantage of introducing you to object orientation right away, and it’s also one of the most popular languages around the world.

Next week I’ll talk about the resources I used to start learning programming logic and Python.

Browse all articles on the Software category

21 Responses to “What Programming Language to Learn First?”

  • Mohamed Shajid

    I Just thought to learn python first because python programming is very user friendly. I Read so many articles to choose which which is best programming for a beginner, i read this also but i came to decision to learn python, thanks Danny L:D

  • Nithin

    I like to become a programmer.A few days before i started learning programming(C) for the first time in my life.Some of my friends told me that begining with C will make easy for me to study other languages easily.I don’t know how true is that coz the people who told me this are not good programmers and they know only’ something’ about programming.I started my programming studies(C) through internet.
    i dont have any background of programming.i also tried tutorial’s on youtube.The begining was good,but now many doubts related to coding have arised and i don’t understand many things.
    I tried to do some programs myself and i succeed in some of them but the majority of them i didn’t succed.
    Now iam in a confusion…Do i have any future in programming?
    Or am i wasting time time studying programs which is not my thing.
    i read one article of a programmer and he says that nearly 10 years is needed for a person to become a good programmer in a single language.Is that true?
    Please suggest some way for me…

  • Ali Luke – Aliventures

    Great to hear how well you’re getting on! (And I’m really impressed how much time you’re putting into it, too.) Looking forward to reading more — especially about how programming relates to and helps your blogging goals.

  • Destination Infinity

    I might just want to learn some PHP to customize few parts of my theme. Or should I learn CSS for that? I am too confused between the two 🙂

    But I have also started learning a language – Not a programming language – but a real language – German. This has been my wish and dream since college, but somehow not been able to find time – Now I have that time!

    Daniel, since you know Portuguese, do you publish DBT in Portuguese as well? Can we publish a blog in two or more languages (same posts)? Whats your suggestion…

    Destination Infinity

    • Daniel Scocco

      I also know Spanish and Italian (apart from English and Portuguese).

      I only have websites in English though, first of all because I want to focus, and second because this is the largest possible audience.

  • Tech84

    HTML is a basic that any noob blogger or aspiring webmaster should learn first.

  • Pradeek

    I’d recommend the “Byte of Python” book to any beginner…

  • Web Marketing Tips

    Moral of this post –

    Plan perfectly if you want to have smooth ride …

  • Dave Starr

    Great update, Daniel, and congrats on following through as far as you have. I used to be able to code a bit in Pascal, I originally learned machine specific assembler on several now onscure machines.

    A couple of things in the comments ring true. If you learn data structures and algorithms properly, it doesn’t really matter what language you then use to implement. The constant bickering about which language is “easier” is usually perpetuated by those who really don’t know how to construct a working application in the first place.

    The second confusion factor I see often is pointed up in the previous comment on Java/JavaScript. I really think it was a poor decision “way back when” to name both these languages with the word java. People just don’t realize how different they are, even though both have the letters java in them. Java really is a strong contender for a universal learning/production platform, though, becuase it’s so universal, but I wouldn’t send time on JavaScript unless I had a need for JS, specifically.

    Again and again it’s been brought home to me over the years that the language means way, way less than the foundation design … a great, useful application depends much more upon the coder than the code.

    • Daniel Scocco

      I agree that once you learn algorithms and data structures properly, the language you’ll pick won’t matter that much.

      The problem is that some languages will help you learn those things, while others will hinder you (hence the discussion about picking the right one to get started).

      Try teaching a beginner algorithm design and data structures with Assembly, for instance. I bet he will give up pretty soon because even the simplest algorithm will take a heck lot of work to be translated into code.

  • Gal @ Equally Happy

    How useful is it to learn the various scripting languages like JS or the various web languages like HTML? Do they provide a common base which can be used to learn Python, C or Java? Are they completely different?

    • Daniel Scocco

      HTML or CSS are not programming languages. The first is a markup language for web documents, while the second is a style sheet language.

      JavaScript on the other hand can be considered a proper programming language, even though it’s predominantly used on the web.

      Learning JavaScript will help you if you decide to learn other programming languages like C or Java, but I don’t think it gives you a solid foundation. Usually people do the other way around: first learn C or Java, then learn scripting languages like PHP or JS.

  • Blake Howe

    I like the Java as a first languange lots of information, pretty close to C syntax. Really I dont think it matters that much it matters that much after 2 or 3 languages its just syntax.


  • DailyPhotographyTips

    First language I ever learned was C back in high school and I still think it provides foundation for every other languages you want to learn.

    In these days, who remembers syntax and who cares? Logic and algorithm is important. You can Google any syntax.

  • Peter Buzzrain

    The first language I learned was C in university. I’m so glad I did now, C is a great introduction to programming and it is also a beautiful language, at least compared to Java…

    Python also seems a good idea!

    Good luck with it, Daniel!

  • Kristoffer Rath Hansen

    I started with a WYSIWYG editor (What You See Is What You Get). Then I moved onto HTML and CSS. Then PHP.

    Now I know programming quite well. But I’m still moving on to Ruby on Rails (actually a framework based on Ruby).

    C++ is also a thing I’ve tried – it haven’t got to anything yet, but with my PHP knowledge, it’s quite easy for me to code in.

  • Peter

    Don’t forget .Net languages like VB and C#. Very good languages to know and in high demand too.

    • Daniel Scocco

      I am not a fan of proprietary languages. But yeah there is a market for them.

      • Basant

        IMO C# is the best OOP language. Learn C# with SQL and you can code any data driven app.

      • Daniel Scocco

        The problem is not with C# itself (I hear it’s a good language). The problem is that most online companies prefer to use open source stuff. If you check the “Work with us” page on Google, Facebook, Amazon, etc, you’ll notice they pretty much only ask for people with experience on C/C++, Java and scripting languages like Python and JavaScript.

  • Alex

    I cut my coder teeth on Pascal in college, but it is truly a “teaching language” rather than one that I’ve ever used in the real world. Then I learned true Object Oriented Programming in Java, which is also a fantastic learning language because it’s so strongly typed (your integers can only be integers, or else your program doesn’t go), and the ONLY way to design your Java programs is with objects–procedures aren’t an option in Java.

    In grad school I had to write a simulated operating system in C, and I didn’t have one iota of C experience. But knowing Java, I was able to wing it by just teaching myself C conventions… that’s the way it is with programming. Once you learn common data structures, logic, loops, recursion, and other design patterns, the language itself becomes irrelevant–just a matter of applying syntax.

    Same deal when I went through my PHP and Perl stages. At some point learning database design and SQL becomes important (especially if you’re building dynamic web sites, and who isn’t.) I did this in college/grad school with some giant DB no one uses any more, but these days a simple Access database can be designed in third normal form.

Comments are closed.