Many people tell you to "learn the fundamentals" but sometimes it's difficult as a beginner to even remotely grasp what that means. And that's okay.

Let's talk about it, and let me give you some info on it (from my point of view).

🧵⏬
1️⃣ What Are Fundamentals?

Fundamentals are concepts, and maybe even techniques, that you can apply in multiple areas and multiple programming languages.

They are not tied to anything specific and are sometimes pretty theoretical.
All in all, they are the foundation you can base more specific knowledge on.

All programming languages build on those fundamentals themselves and give you a very specific way to work with them.
2️⃣ What Exactly Are These Fundamentals?

A non-exhaustive list:

▶️ How a computer works
▶️ What a programming language actually is and does
▶️ Logic (yes, separately)
▶️ Math (basics!)
▶️ Algorithms
▶️ Data Structures
▶️ Networking / I/O
You don't need to be a pro in all of them right at the beginning of your career, but sooner or later you'll need all of these. And they are transferable.

If you know how to write algorithms in JavaScript, you'll also know how to write algorithms in Python.
The syntax might change, and one language might offer different syntactic sugar than the other, but all in all, an algorithm is an algorithm.

But let's go over each point specifically, on a high level, now.
3️⃣ How a computer works

You work with a computer, and you write instructions that tell the computer what to do.

Knowing how computers work is essential to understand what you are actually doing. How each instruction you write leads to some electricity flowing ...
... in your computer's circuits, that each variable you declare and assign a value to leads to something being stored within your computer's memory and later in the CPU's cache.

As already stated, you don't need to be a pro, but basic knowledge is beneficial.
4️⃣ What a programming language actually is and does

When you have a basic understanding of how a computer works, you need to understand that the high-level languages most of us work with, do a lot to abstract away most of the low-level details.
A statement that takes one line in Python or JavaScript is actually way more code within the runtime and even more machine code that is actually executed.

And yes, understanding what a runtime is, also helps a lot. Not all languages compile to machine code.
5️⃣ Logic

Even if you never implement a single mathematical expression, you do logic, or better boolean algebra all the time.

if (conditionIsTrue) {
doThis();
} else {
doThat();
}

This s boolean algebra and mathematical logic.
And although there are some articles that state that they can show you how to write code that never needs an if-statement, the data structures used to accomplish this still use if-statements under the hood.

Hidden boolean algebra is still boolean algebra.
6️⃣ Math

We already covered logic separately, because it's so important (imho), but math itself is also necessary.

I don't talk about those complex mathematical expressions that use so many symbols that they simply look as if no one could ever solve them.
But sooner or later, you'll need some of it.

You don't need to be a math pro, but an addition or a multiplication here, another division or subtraction there, or knowing how to calculate the center of your viewport can be pretty beneficial.
7️⃣ Algorithms

This is your bread and butter. Most universities or courses use data structures to teach you algorithms, but everything you implement is an algorithm.

Even if your function only changes the color of a button. It's an algorithm.
Learning how to solve a problem in a way that a computer can understand and do something based on the statements and expressions you provide is learning algorithms.

Learning algorithms together with data structures is advantageous because it touches a lot of ...
... algorithmic fundamentals.

Iteratively solving a problem, or using recursion, or applying divide & conquer, or else, is easily touched at least once while touching data structure, search, or sort algorithms.
8️⃣ Data Structures

You'll need them. Not all of them, but many.

Knowing what arrays, lists, sets, hashtables, heaps, and trees (once again non-exhaustive) are, and what traits they have does only benefit your day-to-day-work.
For some interviews, you'll even need to know them in and out, because of companies testing for knowledge of them.

I don't tend to agree with this practice, but view it as a necessary evil.

Nevertheless, knowing at least what each of them can do for you, ...
... can only help you in writing efficient code.

If you know that you only want unique values, why should you filter an array over and over again if a set already does this for you? That's less work for you and potential bugs prevented.
9️⃣ Networking / I/O

We live in a distributed (and global) world, and so do most applications you'll create.

Your frontend will talk to a server and gather data, or start some background processing. Or our API will talk to another API.
All this traffic goes through a network. And having at least some basic knowledge about networking and network I/O helps you a lot in understanding that all of this comes at a cost.

Your JSON string needs to get serialized first, put into an HTTP message, ...
... then travel down to your network interface, through your local network, then reach your point of internet access, travel through routers...

And if you ask yourself why you need this: Knowing this might help you understand the following scenario:
1. One request is sent to a remote API
2. The same request is sent to the same remote API again, 2 seconds later
3. The second request returns a response
4. The first request returns a response a second later.

All this doesn't need to have anything to do with the server, ...
... but with the routing of your request, although in reality, it'll be more like a few milliseconds delay than seconds.

Knowing the basics of networking can help you understand such a scenario!
Oh, and you'll also need to cover disk I/O, at least a little.

Knowing that sequential file access is pretty fast because the OS and disk are usually optimized for this, and random access can be pretty slow, might help you implementing something that uses exactly this.
🔟 Conclusion

Every single point I covered above is something you can apply in any language.

You can learn it while learning a specific language, but you'll never have to relearn it for another one.

You might use different functions/libraries/frameworks ...
... to accomplish the same in different languages, but an algorithm is still an algorithm, a data structure is still a data structure, and so on.

A set has the same traits in all languages, as well as a map, and so on.

And the network doesn't change when you switch from ...
JavaScript to Python or to C, C++, or whatever the language is.

And one last and further time: You don't need to know all this before you start with a language. You can learn it on-the-fly while learning a language, BUT it should be your goal to get comfortable in ...
... all of this at some point. You'll simply need it.

And once you are comfortable in all of this, it becomes so much easier to switch languages because you only have to learn a new syntax and standard library.
1️⃣1️⃣ Before You Leave

If you like this type of content, leave a like, and if your own audience might find this thread valuable, feel free to retweet. 😊

If you want other content like this, follow me for more! 💛🙏🏻
You can follow @oliverjumpertz.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: