Site icon WebDevStudios

What Programming Language Should Aspiring Developers Learn First?

TL;DR? JavaScript is eating the world, often with PHP by its side.

To give some background, my programming introductions went something like:

All of these languages I have some experience in. Am I an expert in all of them? By no means. Could I quit doing web development today and go write Java applications? Sure, but I’d need awhile to brush up on things.

The takeaway is that once you have a solid foundation, switching languages is mostly a matter of syntax and semantics. You’re always going to be the most proficient in what you do day-in, day-out. That’s not to say you shouldn’t get out of your comfort zone and try something new. That’s how we stay fresh.

Choices, choices

I recommend to anyone looking at programming to start with a high-level language. The point is to learn about logic, and get used to the syntax and semantics of programming in general – without overburdening yourself with the peculiarities of a particular language, library, development environment, operating system, or hardware platform. We can argue ’til the end of time about Unix vs. Windows, iOS vs. Android, etc. But if you truly want to learn, you’re going to want to put on your system-agnostic hat and focus on the big picture.

This is why many traditional universities start with BASIC, Java, or Python as the introductory language. It’s possible to get started in those languages without getting too bogged down in the details before you start making things happen.

Once you’ve got a grasp of how the logic works and want to go deeper, you typically go up or down language-wise. ‘Up’ being higher level concepts like object oriented programming. ‘Down’ being closer to the hardware.

Close to the metal

If you want to work on embedded systems or do real-time programming, where knowing the hardware is paramount, something like C with a sprinkling of assembly would suit you. Arduino boards, which are often used as prototypes for embedded projects, are a great example. If you’re programming for Arduino, you’re writing a dialect of C. Once considered a high-level language, C still has its roots firmly embedded in hardware, with the option of executing processor-specific assembly language commands inline. A friend who does real-time programming for the military said,

“You software guys wouldn’t know a piece of hardware if it bit you in the ass!”

There’s some truth to that. If you’ve got your sights set on embedded systems, it’s best to start with a traditional computer science foundation of C and assembly. Many science universities offer this path. You may have to grovel through the pointer arithmetic and register memorization, but you’ll come out with a great foundation of computer theory, algorithm optimization, and hardware interaction.

For everybody else, find a high-level language related to the field of work you’re interested in. In regards to learning and working professionally, is it possible to have your cake and eat it too?

JavaScript as an introductory language

Let me start by saying the first time I saw JavaScript in action, I was terrified. My friend showed me a web page in Netscape Navigator in 1997 that would display a dialog that came out of the browser window via the alert() function. We both were like:

“Holy $#!t, that’s gotta be a security problem!”

That same friend went on to work for Google and spearhead the Google Coder project – a great way to use a Raspberry Pi to learn HTML, CSS, and JS (JavaScript).  Still, even today when someone shows me something cool written in JS, I think:

“Holy $#!t, JavaScript can do that?!?”

JavaScript has shown no signs of slowing down and, yes, there have been plenty of security issues that have arisen over the years, mostly related to XSS (Cross Site Scripting). But we seem to have settled into a comfort zone where we understand and know how to prevent XSS vulnerabilities, and we’ve got somewhat clear rules on what JavaScript can and can’t do security-wise.

So why JavaScript to start?

Everyone already has a browser on their computer, which has a JavaScript engine embedded in it. Just add a text editor and you have a rudimentary development environment. Heck, in all the major browsers – Chrome, FireFox, Safari, even Internet Explorer – you can just open the developer tools panel and start typing JavaScript into the console.

Because JavaScript was born in the browser, you’re likely going to pick up on a couple of other technologies at the same time: HTML and CSS. You’ll learn how the Document Object Model (DOM) works, and how things generally function and interact on the web.

But JavaScript has also crept out of the web page and browser and into standalone server applications using Node, and even into desktop applications. Two fantastic code editors – Atom and VSCode – use Electron, a cross platform library for building desktop applications using JavaScript.

Universities have taken notice. Stanford recently started offering an alternate introductory class with JavaScript instead of Java.

The downside to JavaScript

Are there some cons? Of course. One lies in JavaScript’s inherent flexibility. JS is a multi-paradigm language, meaning it has features to support both functional programming and object-oriented programming. What it really means is there are always 10 ways to skin a cat using JS. Douglas Crockford, a leading JavaScript expert, calls it the world’s most misunderstood programming language.

Also, due to the popularity and momentum JS has enjoyed in the recent past, there are a plethora of libraries and frameworks to choose from once you get beyond the scholastic examples and into real-world projects. Some libraries adopt certain programming paradigms throughout. Some were created to solve a problem created by another library Some play nicely with others; some do not.

The maze of available options and which to choose can often be as difficult as doing the work. You have to be prepared to spend some time getting to know the ins-and-outs of any of these frameworks. No one person can know them all.

I tend to follow the industry. I don’t just work with WordPress because I like it; I work with it because 27% of the internet likes it, too. I consider adoption as part of the equation when selecting a framework or library. With backing by Facebook and adoption by Netflix, frameworks like React aren’t going anywhere. However, Vue.js (sometimes dubbed “React lite”) is a great alternative for a smaller project, and it plays nicely with other libraries like jQuery.

Confused? Don’t sweat it. Learn the basics, aka Vanilla JS (JavaScript without any libraries), and then look at some frameworks as the need arises. By the way, if you come across vanilla-js.com, don’t get fooled and think it’s a framework. It’s a joke to make your flavor-of-the-week framework-loving pointy-haired boss something to chew on, while you go about writing kick-ass JavaScript. And speaking of jokes…

The Punchline

Exit mobile version