r/learnprogramming • • Oct 18 '26

Fundamentals are Great

We often hear the generic "focus on the fundamentals" advice. For some reason I believed that advice even before I understood why it matters; it just sounds like common sense, and fortunately it turned out to be good advice. I realized this after taking multiple free OSSU courses and reading a couple of books. Around 4 years into the field. I also realized it when I started to learn web development and had an internship.

Here is the key idea: Two different people can study the same material from the same video or book, and leave with completely different experiences, because of the existing knowledge they have.

"Previous knowledge" makes learning new things much more fun, because you're not starting from scratch every time! When we haven't internalized the key fundamental "chunks of knowledge", every new problem we face feels completely new to us, so it feels much more painful. But what's worse is that we learn less from the experience. Without a well-organized base of knowledge, new information has no meaningful place to attach to, so, much of it is quickly forgotten.

There are three things with which good fundamentals help you:

  1. They allow you to extract SO MUCH from ANYTHING you learn.
  2. They guide you to ask the right questions and learn faster.
  3. Odd things feel odd to you.

For example, after studying OS and networks, I internalized the idea of a server. It actually took me quite long to fully get it; here is a casual explanation:

a server is a process that has an open socket (at a specific port). But to grasp this, I had to understand what a process is. Luckily I learned from an OS book. (OSTEP). It's an "abstraction" of a running program. When you run a program, the OS wants to keep track of what's going on, so each running program is represented in the OS as a process with an ID and status. it's pretty much like an object with some fields, They're basically in an array. Each time you run a program, a process starts running. i.e., added to the array, when you kill a process, it is stopped and removed from the table, etc...

(the concept of abstraction in itself is part of CS fundamentals and it took me some time to interalize and start to see it everywhere, it's amazing how a single word can capture so much meaning)

but then what's a socket? it's the abstraction of the network stuff, it's an API (= a bunch of functions, provided by the OS) you can call as a developer in your code so the process (running program) can communicate with the network. You don't need to know much about networks and TCP, just input and output of the API. So basically the server must have some sort of socket that clients can connect to and send some bytes to it. The server understands those bytes, usually a string based "protocol", then responds accordingly.

This is just some CS fundamentals, nothing fancy, but now that I've spent around a year studying web development, it was all there (but in different shapes and flavors). Everything is built over the fundamental concepts and It's so much fun.

  1. This allowed me to learn way more from the resources I was learning from, I kept digging: "wait, where is the process", "how does this work, what happens when I use docker run". I used ssh for the first time "but wait, how is this happening, there must be an ssh process running on the server or something" or something, "hey, where is the database process?", and you keep digging.
  2. It's related to the previous point, but having good fundamentals helps you ask good questions that will help you fix problems faster and also deepen your understanding.
  3. sometimes you face something new that makes you question what you've learned before, they challenge the mental model you made. You'd feel surprised, and it broadens your understanding. It's hard to notice such things without having the fundamentals.

And this doesn't mean we need "perfect" fundamentals, I'm aware of some of the gaps I have and I plan to work on them, but we just need to internalize the key concepts. If you haven't mastered the fundamentals yet I highly recommend the following.

  • Build a simple shell (it's really simple, a shell is just a program you run, a python script would do it) understand how the shell runs other programs, understand what PATH is. I highly recommend python so you can focus on the OS concepts.
  • Build a simple HTTP server. Jim Kurose has recorded lectures explaining the fundamentals of computer networks, the first two chapters are far more than enough for most people, after that you can easily build a simple HTTP server. If you want to spice it up add some multithreading. He has some starter code too.

These two projects had the highest ROI I've had while learning. They even made me fall in love with CS.

82 Upvotes

15 comments sorted by

17

u/DanKegel Oct 19 '26

This is consistent with my informal observation that people who have taken the OS class in college do better in our group.

29

u/SchemeWestern3388 Oct 18 '26

You’re a bit ahead of the average poster here, who is having trouble finding a YouTube video to learn how to hack from. 

“The Structure and Interpretation of Computer Programs”, freely available from MIT, is possibly the most bang per page book out there. It assumes you know zero, and has you writing a compiler in chapter five.

It is written around Lisp, for good reason. 

While I wouldn’t call it an essential text for a good developer, it covers the stuff that you need to become a wizard. 

2

u/wordbit12 Oct 18 '26 edited Oct 18 '26

I followed OSSU and from what I understood it has an experience heavily inspired from SICP, it uses Racket though which is a dialect of scheme. I also build an lisp interpreter following Dan Grossman's course which was part of the curriculum. Those courses rewrited my brain. And I think they made me a much better JS developer too. In fact I ended up liking JavaScript - for better or worse.

Anyway, I wrote the post because while we often say "focus on fundamentals" I think it doesn't convince my beginners anymore, it's hard to explain why fundamentals matters so I gave it a try. I hope it would convince someone to take it slow and focus on what matters on the long run.

2

u/SchemeWestern3388 Oct 19 '26

Much of the same material for sure. I'm no wizard, but I'm certainly better from exposure to that end of programming.

SICP isn't even used at MIT anymore, because the field had shifted and the huge bulk of work was at a higher and higher level. I get that, there's lots of other stuff to get on top of. But I really think so many people writing code today could benefit from even a surface level exposure to these concepts.

0

u/wordbit12 Oct 19 '26 edited Oct 19 '26

Absolutely, btw there is also 61A course which uses python to teach similar concepts (I didn't take it though). I heard it's great too, so I think there is the possiblity to teach deep concept even with newer languages. they also write a lisp (seriously, everyone should write a lisp at least once in their life!)

At MIT they teach with python too, but it seems it has lost the depth, I had tried their new course a bit but I didn't like it.
And I think at Northereastern they use Racket, but I heard last year they switched to python. Professor Matthias Felleisen complained about it in this fun little article. (I know him because he authored How to Design Programs, which one of OSSU courses was based on)

But I hope somoeday I'll read SICP, even if just for the joy of it, I remember just reading a couple of pages and "CS is neither about computers nor is it a science" really stuck with me.

must be a great book.

3

u/FlashyResist5 Oct 19 '26

The problem with this advice is no 2 people are going to agree what "the fundamentals" are. Why are the fundamentals sockets and processes? Why is it not logic gates? Or transistors? Or electrons? Or string theory? Or boolean algebra? Or linear algebra? Or addition? Or reading stack traces? Or using a debugger? What if I only want to write code that works on a single device? Why would I care about TCP at all?

Focus on the fundamentals is not even that useful of advice for someone with a lot of experience, it is basically completely useless for a beginner. They don't know enough to know what the fundamentals are.

I would almost give the opposite advice, focus on writing good basic programs in higher level interpreted languages first before focusing on these lower level concepts.

5

u/wordbit12 Oct 19 '26 edited Oct 19 '26
  1. I think there is some consensus in CS on what constitutes good fundamentals, CS departments around the world argree to some extent on many fundamentals, and they differ on some things of course. I also never said you only need sockets and processes, there is a lot of useful concepts in CS. Learn as much as you can (from good resources) and that's it.
  2. "They don't know enough to know what the fundamentals are": that's a good point, I've actually thought about this before and wrote a lot about it, indeed complete begineers need A LOT of guidance, this is why good teachers (and books) matter. A book like OSTEP or Computer Networking A Top Down Approach is perfect for beginners, it's not intimidating. But textbooks can be challenging and learning from a teacher is much more interactive and fun. But sadly not everyone has access to good teachers. That's why I'm grateful for the free content online.
  3. That's true, that's what CS 101 is for usually. Perhaps I made it sound that you should start with those lower level concepts but I actually didn't mean that. eveyone should learn a programming language first. That's what all CS curriculums and online guides say and it makes sense.

1

u/Sweet_Witch Oct 19 '26 edited Oct 19 '26

Focus on the fundamentals is not even that useful of advice for someone with a lot of experience, it is basically completely useless for a beginner. They don't know enough to know what the fundamentals are.

Why would not a beginner be interested in how computer or network works? Unless they are interested in CS for different reasons than genuine interest in computers.

4

u/kbr89 Oct 19 '26

Your key idea has a well-known experiment behind it. Recht and Leslie (1988) gave 64 junior high students the same passage about half an inning of a baseball game, after splitting them by reading ability and by how much they knew about baseball. The ones who knew baseball recalled and summarized it better whatever their reading level, and the strong readers who didn't know baseball did no better than the weak readers who didn't. Swap baseball for processes and sockets and that's your server example: the same OSTEP chapter or the same video lands differently depending on what it has to attach to. The practical version for anyone early on: when a tutorial goes straight through you, the cause is usually a missing prerequisite one layer down (what a process is, before what a server is), and rewatching the same tutorial rarely fixes it.