Programming language jokes
Programming language jokes

What Programming Language Should I Learn? A 2024 Guide for Beginners

Embarking on the journey of learning to program often begins with a simple question typed into a search engine late at night. It usually looks something like, “Learn __.” But the real puzzle isn’t how to learn, but what to learn in the first place. How does one decide which programming language to invest their time and energy into?

Perhaps snippets of pop culture influence the decision: “Isn’t Java always mentioned on that show Silicon Valley? Maybe I should start there.” Or, trendier notions pop up: “Haskell, isn’t that the hot language right now?” And let’s not forget the appeal of pure aesthetics: “That Go gopher mascot is undeniably cute!”

For most aspiring programmers, the search is more direct and practical: “Which programming language should I learn first?” This is such a common question that it’s even been visualized in infographic form, highlighting its significance for newcomers.

Deciding on your initial programming language might seem like a lighthearted personality quiz – “Which programming language are you?” – tempting you to pick Ruby because you enjoyed playing with Play-Doh as a child. However, it’s crucial to recognize the weight of this decision. Mastering a programming language, even to a basic level of competence, demands hundreds of hours of dedicated practice. Therefore, it’s wise to consider several key factors before making your choice.

These factors should include:

  • The current job market demand for the language.
  • The long-term prospects and growth potential of the language.
  • The relative ease of learning the language for a beginner.
  • The types of projects you can build while learning, providing motivation and tangible results to share.

The programming landscape is constantly evolving, with new languages emerging annually, accompanied by academic research and, inevitably, internet memes.

The sheer number of programming languages available can be overwhelming when you’re starting out. To help narrow down your options, let’s examine the trends in Google searches related to learning programming over the past decade.

Java’s popularity has fluctuated, while Python has steadily climbed to become a dominant choice for beginners. However, quietly gaining momentum in recent years is JavaScript, the “Little Engine That Could” of programming languages.

Before diving deeper, let’s clarify a few points:

  • This isn’t about declaring one language objectively superior to all others. Each language has its strengths and weaknesses, suited for different tasks and preferences.
  • Learning multiple languages is beneficial in the long run. A polyglot programmer has a broader toolkit and can adapt to diverse projects and challenges.
  • The initial focus should be on mastering one language thoroughly. Building a solid foundation in a single language makes learning subsequent languages significantly easier.

And, as hinted at earlier, the recommendation here is that JavaScript should be your first programming language. Let’s explore why, starting with how programming is traditionally taught and how that’s changing.

Computer Science 101: The Academic Approach

Historically, universities have taught programming within the framework of computer science, often viewing it as an extension of mathematics or a component of electrical engineering.

However, as famously stated:

“Computer science education cannot make anybody an expert programmer any more than studying brushes and pigment can make somebody an expert painter.” – Eric S. Raymond

Many academic institutions still approach programming from a computer science perspective, and computer science itself is often treated like applied mathematics. Consequently, introductory programming courses frequently lean towards low-level languages like C or mathematically oriented languages such as MATLAB.

Department heads often justify this approach by referencing annual programming language rankings like the TIOBE Index or the IEEE Spectrum ranking.

These rankings often show remarkable consistency year after year, seemingly resistant to rapid changes. However, even in academia, shifts do occur.

Notably, in 2014, Python surpassed Java as the most popular language for introductory computer science programs at top universities in the United States.

Yet, the languages actually used in the professional world paint a very different picture.

According to Stack Overflow’s Developer Survey, JavaScript is the most widely used language among nearly 50,000 respondents.

Over half of all developers utilize JavaScript. It’s essential for front-end web development, increasingly important for back-end development, and expanding into fields like game development and the Internet of Things (IoT).

Job market analysis also highlights JavaScript’s prominence, with job postings mentioning it more frequently than any language except Java.

This prevalence is a key reason why many modern coding bootcamps and online learning platforms, like learns.edu.vn, prioritize JavaScript in their curricula. It’s not just because it’s taught here; JavaScript is recommended because it offers a direct and effective path to securing a first developer job.

But is JavaScript the right choice for you as your first programming language? Let’s re-examine the factors mentioned earlier in this context.

Factor #1: The Job Market – Demand and Opportunity

If your motivation to learn programming is purely intellectual curiosity, this factor might be less relevant. However, if your goal – like most aspiring programmers – is to gain job-ready skills, the job market is a critical consideration.

As noted, Java currently appears in slightly more job postings. JavaScript closely follows, often interchanged at the top depending on the source and time period. However, a crucial nuance exists with JavaScript. Despite its 20-year history, JavaScript has only recently emerged as a robust tool for large-scale applications at companies like Netflix, Walmart, and PayPal.

This relatively recent surge in enterprise adoption means that while companies are actively seeking JavaScript developers, the supply of experienced professionals hasn’t fully caught up with demand.

For every open Java position, there are approximately 2.7 Java developers competing. PHP and iOS development roles face similar levels of competition. In contrast, for each JavaScript job opening, there are only about 0.6 JavaScript developers available. This signifies a strong seller’s market for individuals proficient in JavaScript, offering better odds for job seekers.

Factor #2: Long-Term Prospects – Growth and Evolution

JavaScript’s future looks exceptionally bright. GitHub data reveals that JavaScript projects receive twice as many pull requests compared to the average Java, Python, or Ruby project, indicating a vibrant and actively contributing community. Furthermore, JavaScript is experiencing faster growth than any other widely adopted language.

The JavaScript ecosystem benefits from substantial investment and engineering talent from tech giants like Google, Microsoft, Facebook, and Netflix. TypeScript, for example, a statically-typed extension of JavaScript, boasts over 100 open-source contributors, many of whom are paid by Microsoft and Google to work on its development.

This level of cross-company collaboration is less common in the Java world. Oracle, which controls Java after acquiring Sun Microsystems, has a history of litigating against companies attempting to extend or modify Java, sometimes hindering innovation and community-driven growth.

Factor #3: Ease of Learning – Accessibility for Beginners

Most programmers agree that high-level scripting languages are generally easier to learn, especially for beginners. JavaScript, along with Python and Ruby, falls into this category.

While universities often start with languages like Java and C++, these are considerably more complex for newcomers due to their lower-level nature, steeper learning curves, and stricter syntax. JavaScript’s more forgiving syntax and immediate feedback in web browsers make it a more approachable starting point.

Factor #4: Project Versatility – What You Can Build

This is where JavaScript truly shines. JavaScript runs natively in web browsers, the most ubiquitous software platform in the world. This means you can build a vast array of projects with JavaScript and share them easily with anyone who has a browser.

Jeff Atwood, co-founder of Stack Overflow, famously articulated Atwood’s Law:

“Any application that can be written in JavaScript, will eventually be written in JavaScript.”

This prediction continues to hold true as JavaScript’s capabilities expand and its reach extends to more domains.

While Java once aimed for cross-platform compatibility (“Write Once, Run Anywhere”), its promise faltered, and Java Applets, a browser-based technology, are now obsolete.

Python, while versatile, also faces challenges in easy distribution, particularly for browser-based or mobile applications.

In contrast, consider the diverse projects built by the freeCodeCamp community, all running directly in the browser using JavaScript:

Conway’s Game of Life

1970s-style Simon game

Star Wars-themed Wikipedia Search

A roguelike dungeon crawler game

These examples demonstrate the power of JavaScript to create interactive and engaging projects directly within the browser environment, making learning more rewarding and shareable.

Master One Language First, Then Expand Your Horizons

Jumping between languages prematurely can hinder your progress. Deeply understanding your first language is crucial before moving on. Once you have a solid foundation, learning subsequent languages becomes significantly easier.

From there, you can broaden your skillset and become a more versatile developer by exploring other languages based on your interests and career goals:

  • C: Excellent for understanding how computers work at a lower level, particularly memory management, and valuable for high-performance computing.
  • C++: A strong choice for game development and performance-intensive applications.
  • Python: Ideal for data science, machine learning, scripting, and backend development.
  • Java: Still essential if you aim to work at large enterprise companies and in Android development.

However, for your initial foray into programming, start with JavaScript.

Now, let’s address some common counterarguments you might encounter.

Objection #1: Isn’t JavaScript Slow?

The perception of JavaScript as slow is outdated. For most practical applications, modern JavaScript engines are remarkably fast, often performing on par with high-performance languages.

JavaScript (Node.js) significantly outperforms languages like Python, Ruby, and PHP in speed. It also rivals the performance of languages like C++, Java, and Go in many benchmarks.

Objection #2: But JavaScript Isn’t Statically Typed

JavaScript is dynamically typed, like Python and Ruby. While this offers flexibility, it can also lead to runtime errors if type mismatches occur. For example, accidentally assigning a string to a variable intended to be an array can cause unexpected behavior.

exampleArray = [1, 2]; // Intended array
exampleArray.length;    // Returns 2 (correct)

exampleArray = "text"; // Oops, reassigned as a string
exampleArray.length;    // Returns 4 (length of string "text")

While these types of errors are possible, experienced JavaScript developers use coding practices, linters, and testing to mitigate them effectively.

If static typing is a priority for you, JavaScript offers a smooth transition to TypeScript.

“Typescript has a learning curve, but if you already know JavaScript, it will be a smooth one.” – Alex Ewerlöf on TypeScript

TypeScript adds static typing to JavaScript, providing the benefits of type checking while building upon your existing JavaScript knowledge.

Objection #3: But I Really Want to Make a Mobile App

Even if your primary goal is mobile app development, starting with JavaScript is still a wise strategy.

  1. JavaScript can be used to build native mobile apps. Frameworks like React Native and Angular Cordova allow you to create cross-platform mobile apps using JavaScript that compile to native code for iOS and Android.
  2. Mobile apps often require backend infrastructure. To create a functional and engaging mobile app, you’ll likely need a backend server and database. Node.js, a JavaScript runtime environment, is an excellent choice for building robust and scalable backends, often used with frameworks like Express.js.

Furthermore, the mobile app landscape is evolving. While mobile apps are widely used, the initial explosion of app downloads has plateaued. Users now primarily use a few core apps (social media, maps, etc.) and are less inclined to download new ones frequently.

Web development continues to dominate the developer job market, accounting for nearly half of all roles, compared to a smaller percentage for dedicated mobile app development. The future of application development is increasingly web-centric. The web is the underlying platform connecting devices, from computers and smartphones to smart home gadgets and connected vehicles. And JavaScript is the language of the web.

Objection #4: Isn’t JavaScript a “Toy” Language Created in Just 10 Days?

JavaScript’s history is indeed quirky and rapid. The language was famously conceived and initially developed in a short timeframe. This history sometimes leads to criticisms and jokes at JavaScript’s expense.

However, many successful and widely used technologies have faced similar skepticism and criticism. C++, for example, also receives its share of criticism, yet it has become a cornerstone of modern software development.

As Bjarne Stroustrup, the creator of C++, famously said:

“There are only two kinds of programming languages: those people always bitch about and those nobody uses.”

Don’t let outdated perceptions or criticisms deter you. JavaScript is a powerful, versatile, and highly relevant language to learn in today’s tech landscape. It’s the language that powers the interactive web, and it’s an excellent choice for your first step into the world of programming.

Start your coding journey with JavaScript and unlock a world of opportunities.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *