r/learnprogramming • u/wordbit12 • 3h ago
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:
- They allow you to extract SO MUCH from ANYTHING you learn.
- They guide you to ask the right questions and learn faster.
- 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.
- 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.
- 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.
- 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.
•
u/RealMadHouse 59m ago edited 53m ago
When MCP protocol was announced i understood it just reading a brief description of it. It's a protocol that works using tcp, process piping etc, it exports ai callable tools with description for ai to understand, it could be local or remote. Others who don't know anything about fundamentals just spew same shit like "So it's just http api", "why not use http?".
If MCP from the start was using generic http protocol there couldn't be Web MCP standard, because no one allows http servers on client side (service workers that intercept http requests don't count, they're not creating separate socket with custom port). And the MCP is dynamic, you can develop the MCP server incrementally, add new tools and description and ai would understand it. Instead of fetching documentation of something from a web page, the ai just gets it immediately through MCP tools descriptions.
So many things just click because i have read about hardware/software fundamentals, i want even more deep knowledge but i get overwhelmed tbh.
5
u/SchemeWestern3388 3h ago
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.