1)I love C, nothing better then C imo 2)I tried rust but didn't use it much to say anything 3)Python is really good when I just want a smol program to compute anything 4) I know C++ but only use it in competitive programming
I have used a lot C and C++, Now I am into learning new cool languages: Nim, Crystal and Zig, Those 3 languages have some pretty interesting ideas and all are high performance languages because otherwise i would not have bothered to even look at them.
My naive ass tried rust as first language to learn "for real" since it's the new hot chick in the block. Naturally it felt more like a lobotomy than learning programming so I instead learnt python. Maybe I'll try again when I feel more comfortable with data structures and that sort of thing
So far I have been learning C++ and Python. I only have started programming recently, I don't understand most stuff on the channel, but I still like the content cause it stimulates my brain to learn more and be as good as people I follow on youtube (namely you and javidx9)
Depends on the problem. If you need to graph some formula then python is great for that. If you need to make a server application that needs to run 24/7, then you're creating another problem of you use python.
@@nextlifeonearth small edit then: use Python to solve a simple problem, C to understand what the machine is doing, and something else (nearly anything else will work better) for moderate to large sized projects.
Nah. If you want to understand what the machine is doing go through the Nand2Tetris tutorial. Use C if you are doing embedded programming, so you need small, high performance code.
Perhaps the one thing left out of most teaching is the debugger. I learned to program after I learned how to really use an interactive debugger. Writing code and getting past syntax checking is good but watching the machine step through the code and understanding what did happen is the only way I have been able to really learn to code well.
I can also throw in computer (hardware) architecture. People that program should understand how exactly computers work. Meaning: What is ALU, how is a CPU structured, what is memory, busses, registers, etc. Also how are "modern" constructs made? What ARE objects, what ARE classes? Not just what they are semantically, but how they are represented internally, be it the computer itself of the VM (like in Java). And I don't agree with what LLL said in the video about how you should understand how a computer works using C. You should widen your knowledge with it, try it our in a practical environment. But you should learn computer architecture in theory too. But I do agree with him on the general topic. I don't even know why I clicked this video. I have been a software developer for a few years now.
For Python check out Thonny for debugging, i've never seen a debugger that steps through code an instruction at a time instead of a line at a time, but thonny does it. It's very good for beginners.
To be honest for me it was the other way around, I first learned Python and then C (C++ first actually but eh). I think that this way is especially good for children as Python easily gives you rewards and ignites that spark of interest and curiousity, learning how a PC actually works is harder and more frustrating for kids. Other than that, totally true and a good advice in my opinion!
Start with a interpreted language. The ability to get to a state, see your variables, and type stuff in the console and see what happens is the quickest way to learn. It also teaches you debugging which is generaly more painfull in compiled languages, especialy when you mess up with memory (which you will because you forget the scope rules) in c.
@@someonespotatohmm9513 I'd beg to differ with the second half. I started with C/C++ in Visual Studio and learnt to use the debugger early on. God-knows-how-many years later, I still think it's one of the best debuggers in an IDE out there. Point being, debugging being easy or hard depends more on the tool than the language you're debugging.
In my early CS classes I did learn things like binary trees and linked list in C++. I didn't feel like it was so much harder than python that beginners should be afraid to try it.
@@LowLevelTV One of the key things that seems to be missing in many C/C++ classes, and others for that matter. Is HOW to actually debug and HOW to use the IDE to help you. Most people are left to bump around on their own till they kind of can do it, but they are not doing it efficiently or effectively.
@@StreuB1 True, many of my classmates were intimidated by the debugging tools and didn't use them because the professors never taught them how to use them properly. Same for Git. We were just told "google it" instead of given a proper explanation in class. I learned eventually through some guides and experimentation, but I don't think there should be an excuse for not teaching students proper use of debugging tools and Git in the modern age.
Yes i totally agree that C is still the best language to get into programming. I speak from personal experience. When i started my journey 4 years ago, i started with the free courses from FCC and my first language was JavaScript. At first i was doing fine, but the further i got in the course the more confused i got because i couldn't imagine what was going on behind the scenes. Luckily i stumbled over Harvard's CS50 course and started from the beginning, but this time with C (best course i have ever taken. Its free, can not recommend enough). Even though i just wanted to do web development, it was such a cool experience learning the basics with C and learning how it works under the hood. The abstraction that JS or Python provide you can be a blessing or a curse, depending on what you're trying to learn.
The crucial part for me was finding a programming problem that you WANT to solve!! My coding courses at university were BORING. It didnt click and I dropped out. Years later, I wanted reverse engineer file formats for modding a game. I then taught myself how to code, and fell in love with it. I wrote some modding tools for the game, and expanded the capabilities of modding the for the whole community.
Dude, I'm struggling because I might be the exact opposite. There's literally nothing I feel like solving, but I'd love to dive deep into a language's concepts and understand how computers work.
@@michalsvihla1403 So what is it you are struggling with? Finding the right language to start with? If so, I would say start with C. Once you do learn a language, what will you use it for? You must have an aim in mind, or is it purely academic?
@@JamieT1986 I feel like it's just for the pleasure of understanding. I'm pretty "lazy" when it comes to doing stuff. I feel like a lot of software out there is redundant, common and an utter mess - and I don't feel like contributing.
@@JamieT1986 But there's a sensible side to my psyche that tells me I should learn something that's marketable, something that can make me money. But I wouldn't know what that would be.. I don't really like that kind of mentality, but it's ultimately what I feel like I have to do in this world.
Iv been a programmer for a long time. I appreciate what you said about learning to fail. This is a rule for your entire career. You will build something and think it is great, only then to realize that after DEV, TEST, QA, it breaks in PROD. That is just the nature of things and so long as you continue to learn and be humble you can go very far in a career.
I personally did python and then c instead. and honestly I prefer it in this order. python was really easy to learn and I learned many necessary basic skills like how to debug a program or how to approach building one in the first place, which is a lot easier done in python. afterwards I learned C and since I had those skills already I could focus on actually understanding the caveats with C and understanding how a computer works. The only downside is that you still have to learn some basics about memory and really basic pointer knowledge to avoid doing certain things wrong with python without fully understanding whats going on. but for me this was a blazingly fast and easy way to learn. I never had to deal with the frustration of being stuck with something multiple days, all I had to do is find ways to program what I wanted, and I was either already practiced on all the skills or what I'm doing is precisely practicing the new thing I just learned. I had all the knowledge to solve all my problems exactly as I needed it.
Your way is better for beginners. Anyone who never had a programming experience start with C instead of python gonna have a really bad time and think they are stupid. Your way is WAAAY smarter and efficient
Another point in favour of learning C early: Java and C# are both commonly used in enterprise, and are much easier to learn if you understand the difference between passing by value and passing by reference, and the fact that you do this manually in C makes this much easier. In university, I had friends who struggled with Java in first year, then when we started with C in second year, they found it much easier - and then found Java much easier once they understood what they'd learned in C. Nowadays, that university teaches Arduino C for its first semester module, then Java for its second semester.
Times have changed. Back in 1966 I took a programming class for an IBM 1620. First we learned to program in machine language. Second we learned SPS (Symbolic Programming System) which was the assembler for the 1620. Then we learned FORTRAN II. All used punch cards. The memory for the 1620 was small ferrite rings. The first program that was demonstrated to the class manipulated the memory so that the electromagnetic waves produced by turning on and off various memory locations played a song on a transistor radio (constructed with discrete transistors) placed on top of the memory compartment.
Great video! I've been telling budding devs for like 10 years about how impactful it is to learn C. For myself I felt like it made me better at every programming language I use. I think one big factor in getting comfortable with C was writing it on and for Linux. The libraries and tools you use make a huge difference in the quality of the experience, imo
Before even watching, here's a guess based on my experience: One is high-level (Python/Lua), so you can get started doing interesting stuff quickly, and because a lot of stuff is done in high-level languages. The other is middle-level (C/C++) or perhaps even low-level (Assembly?), so you understand how things work under the hood.
Great video, completely agree with your take on C, and also on Python as a good second language. Personally, I would recommend learning a functional programming language as well (meaning Lisp, not Haskell 🤮), not because that is what you eventually will be working in, but because mastering functional programming gives you a very good understanding of how code and data intertwined, and it will teach you to very clearly think about how to design an algorithm efficiently and also along the lines of a proof-of-correctness.
Great video! I also want to share the CS route which I had in uni. I consider it to be quite effective. First we had Pascal to learn basic operators, pointers and data structures. Pascal is pretty strict so you kinda learn some boundaries of what you should and probably should not do. Then we had computer architecture + assembly language course, so we learned how the processor and memory actually work. Also we started learning C here (already knowing what a pointer is through Pascal). We were given an instrument with great power but we had some good practice boundaries in our heads thanks to Pascal. After that we went deeper into C, studying unix system programming, multiprocessing, shared objects, signals etc. Also we started learning C++ (on the base of C, adding some C++-specific stuff). Then we had a huge course of Java/C# (we had to choose one), where we properly studied all major aspects of that language, ending with writing client-server multiprocessing heavy-calculating app with both web and desktop interfaces. We also had basic SQL, networking, UML, programming patterns and methodology cources on the way, and a loooot of math. And some other stuff too ofc. I hope this info will be useful to somebody. Cheers!
I think there is no magic bullet that will teach anyone to learn to program fast. We're all different, and we want to do different things. Want to write web-based games? Learn HTML and Javascript. Want to learn microcontrollers? Pick up an Arduino and start learning C (yes, it's technically C++, but it's really C with classes). It doesn't really matter what you're learning as long as it's something that will keep you interested long enough to pick up the basics. Once you have the basics, it's much easier to pick up additional languages and learn new paradigms. Sure, you have to unlearn bad habits and learn new ways of thinking about things, but if you can't do that then you'll probably never be all that good a programmer anyway.
This is the most beautiful "first steps" video I've ever seen. As an professional it guy I agree with this approach. It would had helped me a lot to get into professional programming/development. It's one thing to program. But it's a whole another thing to understand what's going on under the hood..and it's the under the hood stuff what explains why things are done on a higher level language and how. As one who is bad in plain memorizing it is critical to really understand how things work. Well done
Bro I appreciate my profesor so much… we learned with C++ and man, memory management was a thing we had some insight into, and first day of class he spoke about memory and using the terminal in some way…. I never fully understood what he was doing until later on… amazing professor
a good pick of two languages but imo it should be the other way around. maybe even switching back and forth, like python first to get the basics of programming down, then c to learn more about how stuff actually works (maybe even start with 6502 assembly in an emulator if you wanna start with the fundamentals), then jump back to python to learn more complex data structures, networking, etc, and then a language overview class that shows ppl about a ton of languages, new and old, and similarities and differences, and then use what you like most to write more complex like complete programs that would be a good thing to show that you know how to program not just the stuff you made for an assignment and everyone not making the same thing and instead doing something that interests them
Thanks for the video! I agree with your choices. Also it was cool to finally to see your face, I think it made the video more personable. I feel like your channel is the systems programming equivalent of Web Dev Simplified, which is *exactly* what I've wanted for a long time
1 thing that I found interesting while going from a low level language (C/C++) to a higher programming language (Py/Php) is that debuggability is oddly reduced. Exception is with C#
The whole “you will fail” part is reminding me so much of the 2nd programming class I had, we were using C# though the situation could have happened in any language (it was in a CIS program). I forget what the loop was supposed to be doing, but it was our call for if we chose for or while. I wrote it as a for loop first, I couldn’t figure out why the app froze on the loop, after I’d rewritten the whole thing as a while loop I realized I made the stupidest mistake, inside the loop I for some reason used i again, and reset it to 1 or 2 or something, so the exit condition never applied. I laughed so hard at myself.
I've been learning C for the past half year just to better understand how computers work and to be able to play around with open source code. Watching this video gave me a feeling I did the right choice.
People who think C should be your first programming language are like people who think that you should take a graduate course on physics before taking the undergraduate courses. Just no. I don’t need to know Maxwells equations to get a rough idea of how circuits work. I will keep using Python, because, for me, it’s fine.
This is very good advice and this channel has very good content. I couldn't help smiling at C being a low level langauge. When I started systems programming in 1980 (in assembly) we eventually (some 8-10 years later) were able to use C but considered it a high-level langauge. I know times are different now. Makes me smile though. If you can get modern programmers to have the vaguest clue how machines actually work that would also be great.
Thank you for the on point video. I personally started with C, the reason being at that time ( and still ) I was only interested in emulators and how they were developed, then learned C++, realising that It's the bane of my existence, and currently accumulating knowledge so I can start learning assembly with more confidence. So coming from experience, If beginning with python is like crossing a desert, then beginning learning with C is like a trial by fire, both are possible only if you are willing to endure the pain. As you've said, learning C is hard because you have to know the inner workings of your computer to be able to use it, and no matter what you have to do your own research ay some point. The biggest argument against it on the internet is that you don't need to know all of this stuff because you don't use it. I think If you are serious about programming or you want to know more about your computer learning C is essential, but I think its fine if you don't care about it if you think it's not useful to you ( but I swear if I see another underperforming garbage developed with Electron I'll go insane. )
Great video! Although I wouldn't exactly say that C shows you what the computer is doing. Assembly is for that, but it's true that it will just scare away an absolute beginner. I always considered C + Python to be the perfect combo for learning and it's very beneficial to jump between them the more you learn. That will give you solid foundations for other things. My language of choice though is Java. You can't do everything but for most use cases it's almost as fast as C-family languages and almost as easy syntactically as Python.
30 years of experience writing software for a living here: was already subscribed, but I would have subscribed again if I could for your explanation on why to learn C. I've seen way too many programmers in my career who may know how to write software, but they have no idea what that software actually does at a low level. There's even an argument there to learn Assembly.
same but I think you should start early. For example I started programming in university with Java, then a year later we started with C and continued in parallel with more advanced Java. I think it worked well since we got to see an object-oriented language with a garbage collector so we didn't have to bother with pointers, but also we saw lower-level and different paradigm language like C
I totally agree with you.! many people who doesn't start programming with C is not understand how program is work. for example, They can't explain how referencing class in java and C# work.
I've put languages and my computer knowledge to the test trying to write a 6502 emulator in C and JavaScript. It really de-abstracted for me how pointers and other semantics work under the hood. Obviously I've known what pointers do for many years. Coding a virtual CPU, however, gave me more insight. It also gave me insight on how compilers and assemblers work at the lowest level.
The thing is that using rust fulfills both the learning goals of rust and python. With this added space for another language, one should (imo) pick up a lisp dialect like clojure. Lisp is the ultimate high-level language and everyone should at some point learn it. Rust for learning OS, pointers, data-structure, threading, types, etc. and clojure for learning application patterns, maintainability, flexible functional patterns, refactoring, and overall sound program architecture.
Prototyping and general messing around: python Anything serious: c++/c# The issue i have with c is that it's no longer developed. It is also (mostly, not entirely) a subset of c++. In c you have to do things in certain ways. You can do them that way in c++, but you also get more flexibility and scalability with namespaces and classes, not to mention you develop a whole lot faster with the STL, templating in general, be safer with smart pointers, you get all the cool language features like lambdas and ranges and stuff like that. Of course the code compiles to something slightly larger and slower, but that's really only an issue on embedded systems or super speed critical applications. And for those you'll either use FPGAs or hand optimized assembler, though typically the compiler does a better job than you anyway. If you do a one time thing where you just want to crunch some numbers or mess around with some strings or do a quick plot or have a dirty socket application, then python is the right thing. Vast numbers of libraries to choose from, rapid development times. Of course it's filthy with it's lack of type safety, though you can at least use type hinting. And then there is javascript. Nobody does javascript because they like the language. Except those strange people who use node for some reason. They should all come to their senses. Javascript is a horrible mess, conceptualized in one week. Unfortunately it stuck around. It's inconsistent, it's ugly, it's a mess. At the same time if you do webdev, you won't get around it.
Thank you for this! I've learned the basic with C (well, C++ actually but okay I guess) to the point where I can make decent arduino codes but then I don't know where to progress further as I planned on making an interface software for my projects or a simple game. I do have some experience with using MATLAB and a bit of python for data analysis. Wish me luck!
That's interesting. Why were you forced to learn Lisp? I know MIT used to start CS students with Scheme, but I didn't think that was common at other schools. (Also, which Lisp? And which textbook? Sorry, I'm a Lisp nerd and this sort of thing interests me.)
Taking CS currently and it starts with an intro to programming in Python, then moves to 2 semesters of Java, then finally to C as an option. I was surprised when the first few days the class was told the CS is NOT about learning how a computer works, but instead what it can do to advance human endeavors. I can partially agree, although at the same time I think that if you don't know how a computer works then how the hell are you going to be an effective programmer. At this point I might as well go really old school and learn Cobol, ya that language created in 59' that still has 200+ billion lines of code active that runs on mainframes that all the original programmers have retired, died or stroked out. Yearly salary in California of approximately $97k for Cobol programmers. Mainframes are far from dead, 90% of all credit/debit card transactions go through a mainframe as well as virtually every airline ticket transaction as well. Just about every fortune 500 company uses mainframes to process transactional data. Although I don't hear anyone talking about mainframes or their programming language(s).
As to the schools, that's because they're run almost entirely by leftists these days. They're mental midgets who give participation trophies to ensure that no one is special because everyone is. Technical subjects shouldn't be taught by these creatures because they don't know what anything means or how anything works, they just want things to work on unicorn farts and sprinkles. As to the issue of mainframes using Cobol, the financial institutions that use them want something that is solid, not something that will need debugging and they're smart enough to see that new code is often garbage. Also, they don't like spending money where they don't need to, and since the old code works, why spend money to replace it with something untested and untrusted. So if you want to make serious bank, yeah, learn Cobol. If you want to make fun programs that millions *know* they're using and might make you good money, learn C++. If you want to make useful programs that people *know* they're using but might not make you good money, then learn C. No one will know you wrote it if you use Cobol, but billions will use it, so if you want fortune but no fame, then go the Cobol route.
The problem with that approach to CS is that it fails to teach the _next_ generation how to write the low level stuff that their high level stuff depends on. We'll end up with a glut of Python programmers, but no-one left to write the operating systems, compilers, etc that the "next Python" will run on.
COBOL has traditionally not been taught in CS courses, even back when new COBOL programs were still being written (those COBOL jobs you're seeing are almost all maintenance jobs - Java is the new COBOL). It was usually taught as a business course. The reason for this is because CS is a relatively new field and emerged out of mathematics and engineering - both of which COBOL is ill suited for. In any event, the vast majority of programmers out there don't know how a processor adds the contents of two registers together, and they get along just fine. It's similar to how most truck drivers make a living driving 2500+ miles a week and don't know how a four-stroke diesel engine works. As an example, a web developer is better off learning networking, the HTML, CSS, and DOM standards, and the interfaces provided by browsers and web servers. The processors and memory and cache lines involved for web development are light years away conceptually. You probably have a couple high-level undergrad courses coming up named something like "Operating Systems" and "Computer Organization." Operating Systems should teach you all the stuff the OS is doing behind the scenes to create an abstracted machine for your programs to run on. Computer Organization (horrible name) teaches you what's going on inside the processor, memory controller, etc. and usually has you working with assembly. These two classes should be among the hardest classes you'll take - if they're not, then they're not being taught right. Mix in a class on microcontrollers (if CS doesn't have one, check the engineering department) and you should be well set up for doing low-level coding.
@@jeffspaulding9834 Thanks for taking the time to respond, I appreciate it. I am on a 2 semester track for Java currently and look forward to seeing where that takes me. My interest in Cobol is purely from a monetary standpoint, California pays up $97k for experienced cobol programmers. It is also likely a field not flooded with fresh CS graduates ;)
@@Wandering_Horse Depending on what field you go into, $97k isn't that much. Especially for California. More and more COBOL is being transitioned over to other platforms, mostly Java and C#. Instead of mainframes, everything's moving to "the cloud." AWS does support COBOL, but you'll notice if you search for it you'll find a lot of "transforming COBOL to Java" articles. If you want a field that doesn't have a flood of CS graduates (and involves low level programming), consider embedded programming or industrial automation. There's always jobs in those fields, and they pay well. I make more than that $97k and I live in Oklahoma where the cost of living is negligible. You'll want to pick up basic electronics knowledge and some IT, but you can rake it in if you get a job working with SCADA and PLCs. Either way, good luck!
I like how you talk about C like if it was Assembly language lol. C is low level by today’s standards but if you REALLY wanna how a computer works under the hood, I recommend knowing a bit of Assembly as well.
That's what my uni is doing to us as EEs. First semester C , next semester C++. While having a course on how the voltage in the transistors makes binary -> octal -> hexadecimal -> logic -> floating points -> calculations -> a chip
Hmm, regarding C, you mentioned registers. Now, I generally agree with using C to learn how computers work at a fairly low level. But one thing you can't do in C (well, pure C, anyway) is mess around with registers. For that, you need assembly. But maybe that's too low-level? It also has the distinct disadvantage of being rather different depending on what CPU architecture you're writing for. But I just had to bring up this nitpick.
I tried learning how to use C, it was rather fun, even pointers were starting so sound intuitive in my head. Until I found out about malloc. Malloc made me feel miserable and sad and dumb. Then I took my experience with C (the little experience I hade wikth some of the very basics), and went into Python. It made me smile again as I was able to easily build more and more complex applications. Of course, I still dont quite get how multiprocessing works nor how to properly slice a pie in exactly the same way with no remainder. But im getting there, im slowly starting to think like a programmer and solve problems like one. Someday I will go back to C and conquer malloc.
I think a better way to learn how computers work is a combination of going through something like Ben Eaters 8bit breadboard computer series on UA-cam (you don’t actually have to build the computer just watch the playlist until you fully understand everything that’s going on)and learning c. I find a lot a resources for learning C just say things like” the stack is like a pile of plats” or “think of a register as a single memory address which is faster and better for storing stuff in the super short term” which is a good way to think about it but it can be helpful to actually understand what’s happening on a real world example instead of using a metaphor of a pile of plates.
I think it depends upon what interests you most about programming. Are you most interested in knowing how to make websites, how to build games, develop apps, understand how computers work, etc? When I first tried to learn programming I spent 3 years trying to learn programming for making websites and made very little progress. I assumed it was because I am bad at programming. I am bad at programming, but that was not the issue. The issue is that I don't like making websites. Its not my cup of tea. I do like making games. Once I realized that, I started making way more progress. I am still bad at programming, but the knowledge is sticking more so that's something.
When I read it was only two languages, I somehow directly thought of C/C++ and Python. So I guess I agree, as well as agree that for some going for Python first would make more sense and get them going so that learning how the computer works would become valuable/interesting to them for it to become motivation.
I started with Basic ('79). Then assembly ('81). Then C (K&R) ('85). C is the most important language IMHO to learn, as a super macro assembler language. Makes you think like a computer without the initial complexity of assembly. Nearly all microcontroller code is written in C for a good reason. Learning only high-level languages with so much abstraction leads to stupid design choices due to an ignorance to what is actually required to make the code function. But starting with C is not something I'd recommend. High-level, python is good for a starting language now, if you recognize it will be slow in execution. SQL would be my next choice. Understanding SQL and using it effectively is vital to nearly any program in business. Abstraction here is of the devil - don't do it. Starting with a small board computers is the best way, not with a PC with lots of threads and tons of memory - most of which is wasted by huge libraries with functions you don't need. Constraints make you think and be resourceful. Doing this will eventually make you realize the fastest program has lazy code - doing as little as possible to accomplish the required functionality.
My story is similar - simple BASIC on a UK-101 (6502 Ohio superboard clone) in '80, followed swiftly by machine code (I had no assembler), then followed in early '82 by a very nice structured BASIC (BBC BASIC) with an integrated assembler. I started Fortran and C at the start in my Engineering degree in '87.
I've been a Software Engineer for over 30 years. I write code for Windows applications and embedded systems. The only languages I use are C, C++ and C# (and sometimes assembly). I have no need for any other languages.
For me (speaking strictly form personal experience) starting with C++ is a more sensible choice than C. If starting with C is like learning to ride a bicycle but the floor is lava, C++ is the same but with training wheels. And Bjarne Stroustrup's "Programming Principles and Practice using C++" (PPP) is one of the best resources to start learning C++ and programming in general. I tried learning programming a few different times using different resources (Python the hard way, Raspberry introductory course to C, UA-cam videos etc...) But nothing really clicked until I did PPP. (If you do PPP please don't skip chapter 6)
Programming C++ the "proper" and "modern" way doesn't really teach you a lot about how computers work. Despite being a (mostly) superset of C, C++ programs aren't supposed to deal with all the low-level minutia that C programs do. If your C++ program looks like a C program, you're not taking advantage of what C++ can do for you. (This isn't a dig on C++, BTW. Abstracting away the hardware is a feature of the language and is usually a good thing.) That said, I don't really agree with the premise of the video anyway. Learning C isn't going to teach you how the computer works. It will teach you how the C environment in your operating system works. If you want to learn how the computer works, either start programming microcontrollers with C and assembly or take a Computer Organization class.
Don't even need to watch to hear C and Python most likely as recommendations.The truth is quite simple, pick whatever interests you and learn there. Learn however you learn and don't quit because you're not understanding. Ask questions, basically all the time, and in all honestly basically none of us can look at code for 30 seconds and know what's going on. Don't undermine yourself and just keep at it.
I would say to be sure to work on what interests you. If you don't like data structures and algorithms, work on something that you want to figure out yourself. What you'll find is you will need data structures and algorithms eventually, and you will be excited to learn them when you understand their application
I agree with some other commentators in the comments to start with an interpreted lanugage first, and then learning how things work under the bonnet with C. The reason is simply that people need encouragement and feedback, especially when they're starting out and very prone to making mistakes. It's too easy for beginners to fall frustrated and dismayed if they are constantly fighting C trying to make the simplest of programs work. Much better IMO, to start with something much more forgiving such as Python or Javascript, so that our natural desires for instant gratification could be satiated. I mean, imagine which one of the following is more satisfying for an average beginner programmer - writing a 10-line JS script to remove an annoying ad on a website they use, or writing a 20-line C program to reverse a string in the terminal. I think the answer is pretty obvious for most people.
K&R C book is one of the hardest book on C to read for 'beginners'. Totally agree with struggling to reverse a string in C while JavaScript can do wonders in less lines of code
I don't think I had ever seen your face before :P I really like your approach, and I had subconsciously taken a similar path: I learnt to code with arduino, getting a feel for how the microcontroller itself works. Then I tried C# and java to make little tools and apps I used. Moved to linux and fell in love with rust. Now I'm learning rust with the rust book and Python with Python Crash Course (second edition, by Eric Matthes) If you're a new programmer looking to learn python, I can't recommend that last book enough. It has tons of very clear examples, good explanations, and you even end up building 3 cool projects.
I'm a very lazy person and I always have to think how can I do more with less. At the beginning, when you have no other tool, I think learning just a few elements of programming through Python is going to net you the most. It will let you start to play around and get hooked. Initially starting with less friction, like syntax, lets you dip your feet in and warm up and before you know it you'll start asking "but wait, wtf is up with copying stuff in python"... and off you go... Though at the end of the day, I think its about motivation, its about the kinda projects you'd like to be able to implement and that may inform what you should start with. (Python then is only an automatic recommendation because of the lower friction)
I agree completely, but I wonder if one of the "better C" languages could be a better and less painful learning experience. I mean things like Zig or Odin. I don't agree with many philosophical decisions of those languages, but they offer low level control and closer-to-python language facilities.
Start with JS because JS can do everything. Then you can find what you like by yourself. For me it was JS, C, C++, then Lua, Processing, and now Golang. I know next is Rust. But all you need to know is to start, take a computer and start writing some code. But you can bet on JavaScript.
Gonna copy my reply from another comment:- "Yeah maybe just start with something very simple but practical like Python to atleast get used to programming and then just directly start C when you reach intermediate level in Python. Either way, you HAVE to learn C. Just get the book (The C programming Language, get a free pdf cause book is expensive) and you are done. Literally just follow that and watch videos on topics where you feel like you want more info." I personally followed this technique, I did python for 1.5 months (everyday 2-4 hours) and read the C book when I was bored (was a gift from Dad who didn't knew much about programming but wanted to help). Later on I got seriously amazed on how much flexibility you had in this language and so I started doing this in conjunction with learning Python. Great method, and if possible start with C as early as you can but starting with C right at the start isn't that great because learning programming and learning how a computer works are different even though they are connected and leaning programming first is the easier route. So yeah, I guess my method is opposite to yours but honestly I would learn Programming first and get motivated rather than try to learn how a computer actually works. After a while you end up being curious anyways so no need to make things hard for yourself.
Many things I never understood about DSA at uni because I was overwhelmed with C's memory or Java's OOP. Python is good. Don't let complexity kill playfulness.
My journey so far is C# > python > Assembly > C > JavaScript > C++ and soon, Rust. Not a master of any of these languages, but I did have to use them for projects, and so I learned. It's hasn't even been 2 years since I picked up programming, either. 😂 The point being, the most important part is that you start learning. Don't be afraid to look at other languages. P.S. I would also say python is a good place for people to start!
I started with C at 14, after a while, moved to C++ for a few years and then C#... today I work with TypeScript, which I love. Python seems cool but I really hate the syntax. It's ugly and I find it convoluted, mostly because it lacks curly brackets. I think using identation was a terrible idea... just my humble opinion, though...
i say the same thing but swap c and smth else. i think you should learn any language you want which fits what you want to do first. want to make a game? that is fine. there are tools and languages for that. they arent the best, but the first priority is to start a positive feedback loop of self satisfaction and internal motivation. do you want to make a website? html isnt that bad. once you have a sense of comfort creating soltuions which meet your preferences, then go back and try making them better using C. the other reason i take this position of smth other than c first, is that it smooths and eases zealots. some say that haskell should be the first language people learn, others like ada. their preferences are various and what they lack is the social element. the point of learning c isn't it being low level. but it being a refined mapping of most assemblies, which makes it objective or neutral, and it also becomes a medium to talk to other programmers over. want to learn haskell because some zealot says that it is the future, great. learn it, get comfortable, and then follow up on your completed projects by redoing them in c. not for the performance, not for some superiority of code style, but to get it so you can talk to someone and write psuedo code in the c style to get help even when they have wildly different language preferences. the problem i have with python as a medium, is that it looks alot like c but it violates the shared syntax. the loop rework makes it look like it doesn't work when it does, due to itterator changes. this decieves readers about how it works. learnign python isn't exactly bad. it is simpler with moving parts taken out, but why something works or doesn't work is often those moving parts. so just like the computer cant figure out why one would try parsing a null array, a programmer overlooking a bit of code wont be able to see what was being attempted. to be able to get at that we need a shared medium of exchange.
I would say, learn C for the computer's knowledge, as you said but for the second thing, use C# or Java. While yes you have all keywords, the boilerplate and all this, their syntax is close enough to the likes of C/C++,(heck C# and Java use the same boilerplate) that you could quite easily port it over to C(without the OOP aspects) and can be abstract enough that you can pick up Python. Ofcourse C# and Java can be complex, but they can also be as complex as you want them to be.
I started seriously learning programming as a high schooler around 2002 in... Java. Why? J2ME. C/C++ for me was more complicated. And React Native/Ionic/etc hadn't invented that time :D
My issue with starting with a low-level language like C is that it's just not very fun or engaging. In my experience, most people who advise this are people who started with higher-level languages and then learned C later and thought "If I knew C from the very start, it would have greatly improved my programming in other languages." But learning C is difficult and boring for beginners. If someone started with C, they could easily become disillusioned with programming as a whole and quit early on. With a language like Python, though, they're able to quickly learn how to accomplish cool stuff without needing to spend hours on the nitty-gritty details that will become useful later on.
Asserting that you must* learn C to go low-level is kinda egregious to me - from personal experience I can say that many young programmers start in low-level languages and get discouraged... never to grow. Most concepts relevant to programming are language agnostic, I am learning JavaScript [my first big language] and I can easily interpret almost any other programming language's code now. The fundamentals are all there if you study how the JavaScript engine operates: how functions work, memory management [GC in js], the big data types [numbers, strings, objects, etc], what statements are, what expressions are, how loops operate, etc. And, I found this way a much easier foray into programming than jumping into C. I think if I started with C I prob wouldn't be writing this post write now.
Probably my two favorites (that I've used so far). I gotta say though, pointers are pretty useful for understanding data structures in a more intimate way. I would recommend doing a couple different linked lists in C and then maybe some other simple structures (stacks, queues, maybe a binary tree) in C++. But I absolutely agree that if you're going to start doing more complex things python will be a much faster way to learn what you are trying to learn without getting caught up in segfaults and overly verbose code.
What wasn't said that eventually you'll dabble with pretty much every relevant language anyway if you're building a career in software engineering. Different languages are not just skills, they eventually become tools to solve specific problems.
I'm not an IT guy by profession, but I already learned C and Python so I feel good. I've avoided C++ like the plague. I know Java too, but absolutely hate it.
programming in "c" is interesting and informative, but compiling a program for some custom embedded Linux( for example friendly arm and eth.) is a pain in the ass!
Excellent choices, though I'd actually advise doing that in the reverse order. C may put off someone who starts learning because it's low level in comparison to Python, C#, Kotlin, ... It's about motivation. First do the fun part and get healthy habits with a high-level language - Python is good because it can be used interactively and teaches how to write clean code, but Kotlin is great too, not just a scripting language and it opens the door to Android programming. Then dig into the low level with C to see how it works under the hood, by then you should be able to realize how what you did before actually works in the system. Besides, it's not for everyone, but it's a very good school that too few go through today.
BTW, great video, but the constant jumps are very distracting. I think it's not just editing, you seem to do that intentionally with different zoom levels. Please don't.
While I think C has a valuable place in learning how things work, I don't think it's a good choice as a first language unless your explicit goal is to make a weed-out course since you have to put so much effort in to do really basic things that you could easily do on Day 1 of the beginner Python course and help learners build confidence while they learn the basics, and then if they want to get better, they'll be in a better position to learn C than if they had chosen it as their first language, which can lead to "This seems really hard and I'm not sure it's worth the effort it will take to learn" instead of "I can do this". Sure, Python has way more stuff in its base kit and standard library than C does, but ultimately that's what makes it easier to use, because in Python, you're largely picking and choosing how to connect these ready-made parts together, while in C, you still need to do that, but you also have to go make/find the parts yourself. And that's ignoring things like 3rd party libraries, which you have to manually link in C/C++, and build systems, which are an entire extra thing you have to learn how to use with C/C++ once your project grows large enough, and contrary to the apparent beliefs of the designers of make and cmake, I don't have a passion for configuring build systems manually.
Absolutely disagree on only the ordering. Python is a much better starter because it gets you quicker to solving problems and building that confidence and curiosity, rather than learning everything all at once before you can do anything at all
PLZ SUBSCRIBE 💕 What's your favorite language to learn with?
Javascript - keeps you motivated with projects, and starts numbing you to bloat xD
1)I love C, nothing better then C imo
2)I tried rust but didn't use it much to say anything
3)Python is really good when I just want a smol program to compute anything
4) I know C++ but only use it in competitive programming
I have used a lot C and C++, Now I am into learning new cool languages: Nim, Crystal and Zig, Those 3 languages have some pretty interesting ideas and all are high performance languages because otherwise i would not have bothered to even look at them.
My naive ass tried rust as first language to learn "for real" since it's the new hot chick in the block. Naturally it felt more like a lobotomy than learning programming so I instead learnt python. Maybe I'll try again when I feel more comfortable with data structures and that sort of thing
So far I have been learning C++ and Python. I only have started programming recently, I don't understand most stuff on the channel, but I still like the content cause it stimulates my brain to learn more and be as good as people I follow on youtube (namely you and javidx9)
I've been saying for a while now: code in Python if you just want to solve a problem, and C if you want to understand what the machine is doing.
Depends on the problem. If you need to graph some formula then python is great for that. If you need to make a server application that needs to run 24/7, then you're creating another problem of you use python.
@@nextlifeonearth small edit then:
use Python to solve a simple problem, C to understand what the machine is doing, and something else (nearly anything else will work better) for moderate to large sized projects.
Nah. If you want to understand what the machine is doing go through the Nand2Tetris tutorial. Use C if you are doing embedded programming, so you need small, high performance code.
And JavaScript if you want to get a job offer
Do you think Rust might be a good language to understand the underlying system
Perhaps the one thing left out of most teaching is the debugger. I learned to program after I learned how to really use an interactive debugger. Writing code and getting past syntax checking is good but watching the machine step through the code and understanding what did happen is the only way I have been able to really learn to code well.
I can also throw in computer (hardware) architecture. People that program should understand how exactly computers work. Meaning: What is ALU, how is a CPU structured, what is memory, busses, registers, etc.
Also how are "modern" constructs made? What ARE objects, what ARE classes? Not just what they are semantically, but how they are represented internally, be it the computer itself of the VM (like in Java).
And I don't agree with what LLL said in the video about how you should understand how a computer works using C. You should widen your knowledge with it, try it our in a practical environment. But you should learn computer architecture in theory too. But I do agree with him on the general topic.
I don't even know why I clicked this video. I have been a software developer for a few years now.
debugger is for professionals - printf for beginners :)
For Python check out Thonny for debugging, i've never seen a debugger that steps through code an instruction at a time instead of a line at a time, but thonny does it. It's very good for beginners.
OwO face revealed
AM I BEAUTIFUL
@@LowLevelTV yes.
@@LowLevelTV absolutely
@@LowLevelTV Ofcourse you are.
@@LowLevelTV you are zamn beautiful 😳
To be honest for me it was the other way around, I first learned Python and then C (C++ first actually but eh).
I think that this way is especially good for children as Python easily gives you rewards and ignites that spark of interest and curiousity, learning how a PC actually works is harder and more frustrating for kids.
Other than that, totally true and a good advice in my opinion!
Agreed I am doing similar and if it were not for my knowledge of python I would have dropped c a while back lol
Hello default profile pic twin :)
Start with a interpreted language. The ability to get to a state, see your variables, and type stuff in the console and see what happens is the quickest way to learn. It also teaches you debugging which is generaly more painfull in compiled languages, especialy when you mess up with memory (which you will because you forget the scope rules) in c.
@@someonespotatohmm9513 I'd beg to differ with the second half. I started with C/C++ in Visual Studio and learnt to use the debugger early on. God-knows-how-many years later, I still think it's one of the best debuggers in an IDE out there.
Point being, debugging being easy or hard depends more on the tool than the language you're debugging.
In my early CS classes I did learn things like binary trees and linked list in C++. I didn't feel like it was so much harder than python that beginners should be afraid to try it.
I think new programmers get scared when their program crashes and they don't have the skills early on to debug what happened.
@@LowLevelTV One of the key things that seems to be missing in many C/C++ classes, and others for that matter. Is HOW to actually debug and HOW to use the IDE to help you. Most people are left to bump around on their own till they kind of can do it, but they are not doing it efficiently or effectively.
Well if you did use C++ tools like smart pointers, then it's much easier, but it's not C anymore...
@@StreuB1 True, many of my classmates were intimidated by the debugging tools and didn't use them because the professors never taught them how to use them properly. Same for Git. We were just told "google it" instead of given a proper explanation in class. I learned eventually through some guides and experimentation, but I don't think there should be an excuse for not teaching students proper use of debugging tools and Git in the modern age.
@@StreuB1 we are learning C, but our lector doesnt seem to use an IDE(is notepad++ one?), how would i go about learning the debugger, say, in vscode?
Yes i totally agree that C is still the best language to get into programming. I speak from personal experience.
When i started my journey 4 years ago, i started with the free courses from FCC and my first language was JavaScript.
At first i was doing fine, but the further i got in the course the more confused i got because i couldn't imagine what was going on behind the scenes.
Luckily i stumbled over Harvard's CS50 course and started from the beginning, but this time with C (best course i have ever taken. Its free, can not recommend enough).
Even though i just wanted to do web development, it was such a cool experience learning the basics with C and learning how it works under the hood.
The abstraction that JS or Python provide you can be a blessing or a curse, depending on what you're trying to learn.
I'm learning C, Python and also… Haskell. ☺ I started with Python, then added C and then was Haskell. A very balanced and satisfying experience! 😊
The crucial part for me was finding a programming problem that you WANT to solve!! My coding courses at university were BORING. It didnt click and I dropped out. Years later, I wanted reverse engineer file formats for modding a game. I then taught myself how to code, and fell in love with it. I wrote some modding tools for the game, and expanded the capabilities of modding the for the whole community.
Dude, I'm struggling because I might be the exact opposite. There's literally nothing I feel like solving, but I'd love to dive deep into a language's concepts and understand how computers work.
@@michalsvihla1403 So what is it you are struggling with? Finding the right language to start with? If so, I would say start with C. Once you do learn a language, what will you use it for? You must have an aim in mind, or is it purely academic?
@@JamieT1986 I feel like it's just for the pleasure of understanding. I'm pretty "lazy" when it comes to doing stuff. I feel like a lot of software out there is redundant, common and an utter mess - and I don't feel like contributing.
@@JamieT1986 But there's a sensible side to my psyche that tells me I should learn something that's marketable, something that can make me money. But I wouldn't know what that would be.. I don't really like that kind of mentality, but it's ultimately what I feel like I have to do in this world.
Iv been a programmer for a long time. I appreciate what you said about learning to fail. This is a rule for your entire career. You will build something and think it is great, only then to realize that after DEV, TEST, QA, it breaks in PROD. That is just the nature of things and so long as you continue to learn and be humble you can go very far in a career.
I personally did python and then c instead. and honestly I prefer it in this order. python was really easy to learn and I learned many necessary basic skills like how to debug a program or how to approach building one in the first place, which is a lot easier done in python. afterwards I learned C and since I had those skills already I could focus on actually understanding the caveats with C and understanding how a computer works.
The only downside is that you still have to learn some basics about memory and really basic pointer knowledge to avoid doing certain things wrong with python without fully understanding whats going on.
but for me this was a blazingly fast and easy way to learn. I never had to deal with the frustration of being stuck with something multiple days, all I had to do is find ways to program what I wanted, and I was either already practiced on all the skills or what I'm doing is precisely practicing the new thing I just learned. I had all the knowledge to solve all my problems exactly as I needed it.
Your way is better for beginners. Anyone who never had a programming experience start with C instead of python gonna have a really bad time and think they are stupid. Your way is WAAAY smarter and efficient
Another point in favour of learning C early: Java and C# are both commonly used in enterprise, and are much easier to learn if you understand the difference between passing by value and passing by reference, and the fact that you do this manually in C makes this much easier. In university, I had friends who struggled with Java in first year, then when we started with C in second year, they found it much easier - and then found Java much easier once they understood what they'd learned in C. Nowadays, that university teaches Arduino C for its first semester module, then Java for its second semester.
I’m a simple guy, I see VHDL in the thumbnail, I click
LOL. I think that thumbnail scared off a few people, had to change it XD
Times have changed. Back in 1966 I took a programming class for an IBM 1620. First we learned to program in machine language. Second we learned SPS (Symbolic Programming System) which was the assembler for the 1620. Then we learned FORTRAN II. All used punch cards. The memory for the 1620 was small ferrite rings. The first program that was demonstrated to the class manipulated the memory so that the electromagnetic waves produced by turning on and off various memory locations played a song on a transistor radio (constructed with discrete transistors) placed on top of the memory compartment.
Great video! I've been telling budding devs for like 10 years about how impactful it is to learn C. For myself I felt like it made me better at every programming language I use.
I think one big factor in getting comfortable with C was writing it on and for Linux. The libraries and tools you use make a huge difference in the quality of the experience, imo
Good stuff!
C language is the best ever!
Before even watching, here's a guess based on my experience: One is high-level (Python/Lua), so you can get started doing interesting stuff quickly, and because a lot of stuff is done in high-level languages. The other is middle-level (C/C++) or perhaps even low-level (Assembly?), so you understand how things work under the hood.
Great video, completely agree with your take on C, and also on Python as a good second language.
Personally, I would recommend learning a functional programming language as well (meaning Lisp, not Haskell 🤮), not because that is what you eventually will be working in, but because mastering functional programming gives you a very good understanding of how code and data intertwined, and it will teach you to very clearly think about how to design an algorithm efficiently and also along the lines of a proof-of-correctness.
What about F#
Why the Haskell hate? It has a lot to teach you too
@@ccgarciab I donno I think it's personal
my uni's cs courses start with teaching you python and C, exactly for the reasons you said, great vid!
That's awesome!
Great video! I also want to share the CS route which I had in uni. I consider it to be quite effective.
First we had Pascal to learn basic operators, pointers and data structures. Pascal is pretty strict so you kinda learn some boundaries of what you should and probably should not do.
Then we had computer architecture + assembly language course, so we learned how the processor and memory actually work. Also we started learning C here (already knowing what a pointer is through Pascal). We were given an instrument with great power but we had some good practice boundaries in our heads thanks to Pascal.
After that we went deeper into C, studying unix system programming, multiprocessing, shared objects, signals etc. Also we started learning C++ (on the base of C, adding some C++-specific stuff).
Then we had a huge course of Java/C# (we had to choose one), where we properly studied all major aspects of that language, ending with writing client-server multiprocessing heavy-calculating app with both web and desktop interfaces.
We also had basic SQL, networking, UML, programming patterns and methodology cources on the way, and a loooot of math. And some other stuff too ofc.
I hope this info will be useful to somebody. Cheers!
got hooked to C after watching bugswriter. you have increased my interest in low level stuff. Thank you for that!
Welcome aboard!
I think there is no magic bullet that will teach anyone to learn to program fast.
We're all different, and we want to do different things. Want to write web-based games? Learn HTML and Javascript. Want to learn microcontrollers? Pick up an Arduino and start learning C (yes, it's technically C++, but it's really C with classes). It doesn't really matter what you're learning as long as it's something that will keep you interested long enough to pick up the basics.
Once you have the basics, it's much easier to pick up additional languages and learn new paradigms. Sure, you have to unlearn bad habits and learn new ways of thinking about things, but if you can't do that then you'll probably never be all that good a programmer anyway.
I completely agree with you at the C part
This is the most beautiful "first steps" video I've ever seen. As an professional it guy I agree with this approach. It would had helped me a lot to get into professional programming/development. It's one thing to program. But it's a whole another thing to understand what's going on under the hood..and it's the under the hood stuff what explains why things are done on a higher level language and how. As one who is bad in plain memorizing it is critical to really understand how things work. Well done
I started with C in my bachelor degree, followed by Java to understand algorithms and data structures. Python was expected by my profs to be known.
Bro I appreciate my profesor so much… we learned with C++ and man, memory management was a thing we had some insight into, and first day of class he spoke about memory and using the terminal in some way…. I never fully understood what he was doing until later on… amazing professor
Thanks for the guide, am learning go right now, but I will start making a little project in C to remind how really a computer works, thanks bro
Best of luck!
a good pick of two languages but imo it should be the other way around. maybe even switching back and forth, like python first to get the basics of programming down, then c to learn more about how stuff actually works (maybe even start with 6502 assembly in an emulator if you wanna start with the fundamentals), then jump back to python to learn more complex data structures, networking, etc, and then a language overview class that shows ppl about a ton of languages, new and old, and similarities and differences, and then use what you like most to write more complex like complete programs that would be a good thing to show that you know how to program not just the stuff you made for an assignment and everyone not making the same thing and instead doing something that interests them
Thanks for the video! I agree with your choices. Also it was cool to finally to see your face, I think it made the video more personable.
I feel like your channel is the systems programming equivalent of Web Dev Simplified, which is *exactly* what I've wanted for a long time
Yay, thank you!
1 thing that I found interesting while going from a low level language (C/C++) to a higher programming language (Py/Php) is that debuggability is oddly reduced. Exception is with C#
The whole “you will fail” part is reminding me so much of the 2nd programming class I had, we were using C# though the situation could have happened in any language (it was in a CIS program). I forget what the loop was supposed to be doing, but it was our call for if we chose for or while. I wrote it as a for loop first, I couldn’t figure out why the app froze on the loop, after I’d rewritten the whole thing as a while loop I realized I made the stupidest mistake, inside the loop I for some reason used i again, and reset it to 1 or 2 or something, so the exit condition never applied. I laughed so hard at myself.
I've been learning C for the past half year just to better understand how computers work and to be able to play around with open source code. Watching this video gave me a feeling I did the right choice.
People who think C should be your first programming language are like people who think that you should take a graduate course on physics before taking the undergraduate courses. Just no. I don’t need to know Maxwells equations to get a rough idea of how circuits work. I will keep using Python, because, for me, it’s fine.
"Its really hard to do anything in c without having a program crash" I felt that
you are pretty ngl
my favorite language is probably C or Rust. I focus on low-level development and hobbyist OSDev so naturally I use those the most.
This is very good advice and this channel has very good content. I couldn't help smiling at C being a low level langauge. When I started systems programming in 1980 (in assembly) we eventually (some 8-10 years later) were able to use C but considered it a high-level langauge. I know times are different now. Makes me smile though. If you can get modern programmers to have the vaguest clue how machines actually work that would also be great.
Thank you for the on point video.
I personally started with C, the reason being at that time ( and still ) I was only interested in emulators and how they were developed, then learned C++, realising that It's the bane of my existence, and currently accumulating knowledge so I can start learning assembly with more confidence.
So coming from experience, If beginning with python is like crossing a desert, then beginning learning with C is like a trial by fire, both are possible only if you are willing to endure the pain.
As you've said, learning C is hard because you have to know the inner workings of your computer to be able to use it, and no matter what you have to do your own research ay some point.
The biggest argument against it on the internet is that you don't need to know all of this stuff because you don't use it. I think If you are serious about programming or you want to know more about your computer learning C is essential, but I think its fine if you don't care about it if you think it's not useful to you ( but I swear if I see another underperforming garbage developed with Electron I'll go insane. )
Great video! Although I wouldn't exactly say that C shows you what the computer is doing. Assembly is for that, but it's true that it will just scare away an absolute beginner. I always considered C + Python to be the perfect combo for learning and it's very beneficial to jump between them the more you learn. That will give you solid foundations for other things. My language of choice though is Java. You can't do everything but for most use cases it's almost as fast as C-family languages and almost as easy syntactically as Python.
30 years of experience writing software for a living here: was already subscribed, but I would have subscribed again if I could for your explanation on why to learn C. I've seen way too many programmers in my career who may know how to write software, but they have no idea what that software actually does at a low level. There's even an argument there to learn Assembly.
I dont think you need to use C first, for me it worked to go from high level to low level
same but I think you should start early. For example I started programming in university with Java, then a year later we started with C and continued in parallel with more advanced Java. I think it worked well since we got to see an object-oriented language with a garbage collector so we didn't have to bother with pointers, but also we saw lower-level and different paradigm language like C
This channel is gold
I totally agree with you.! many people who doesn't start programming with C is not understand how program is work. for example, They can't explain how referencing class in java and C# work.
Who ever say c is dead and old probably does know nothing about computers
Really great advices here! Thanks
I've put languages and my computer knowledge to the test trying to write a 6502 emulator in C and JavaScript. It really de-abstracted for me how pointers and other semantics work under the hood. Obviously I've known what pointers do for many years. Coding a virtual CPU, however, gave me more insight. It also gave me insight on how compilers and assemblers work at the lowest level.
The thing is that using rust fulfills both the learning goals of rust and python. With this added space for another language, one should (imo) pick up a lisp dialect like clojure. Lisp is the ultimate high-level language and everyone should at some point learn it.
Rust for learning OS, pointers, data-structure, threading, types, etc. and clojure for learning application patterns, maintainability, flexible functional patterns, refactoring, and overall sound program architecture.
Very good production quality! Also content is interesting on your channel
Prototyping and general messing around: python
Anything serious: c++/c#
The issue i have with c is that it's no longer developed. It is also (mostly, not entirely) a subset of c++. In c you have to do things in certain ways. You can do them that way in c++, but you also get more flexibility and scalability with namespaces and classes, not to mention you develop a whole lot faster with the STL, templating in general, be safer with smart pointers, you get all the cool language features like lambdas and ranges and stuff like that. Of course the code compiles to something slightly larger and slower, but that's really only an issue on embedded systems or super speed critical applications. And for those you'll either use FPGAs or hand optimized assembler, though typically the compiler does a better job than you anyway.
If you do a one time thing where you just want to crunch some numbers or mess around with some strings or do a quick plot or have a dirty socket application, then python is the right thing. Vast numbers of libraries to choose from, rapid development times. Of course it's filthy with it's lack of type safety, though you can at least use type hinting.
And then there is javascript. Nobody does javascript because they like the language. Except those strange people who use node for some reason. They should all come to their senses. Javascript is a horrible mess, conceptualized in one week. Unfortunately it stuck around. It's inconsistent, it's ugly, it's a mess. At the same time if you do webdev, you won't get around it.
I actually started designing CPUs for fun before I learned any language.
So my first language would be machine code/assmebly??
Pointers are easy.
Thank you for this! I've learned the basic with C (well, C++ actually but okay I guess) to the point where I can make decent arduino codes but then I don't know where to progress further as I planned on making an interface software for my projects or a simple game. I do have some experience with using MATLAB and a bit of python for data analysis. Wish me luck!
You've actually described what happens underneath the hood of CS50 course.
I was forced to start with lisp, but this was actually very informative.
yeah lisp is probably the 3rd language to learn, because a good programmer need to hate parentheses first hand.
That's interesting. Why were you forced to learn Lisp? I know MIT used to start CS students with Scheme, but I didn't think that was common at other schools.
(Also, which Lisp? And which textbook? Sorry, I'm a Lisp nerd and this sort of thing interests me.)
@@jeffspaulding9834 yes I studied at EPITA (French school) and Lisp and oCaml are two among other languages we learn.
Coding in ASSEMBLER is the best way to learn how the underlying structure of the computer works.
Taking CS currently and it starts with an intro to programming in Python, then moves to 2 semesters of Java, then finally to C as an option. I was surprised when the first few days the class was told the CS is NOT about learning how a computer works, but instead what it can do to advance human endeavors.
I can partially agree, although at the same time I think that if you don't know how a computer works then how the hell are you going to be an effective programmer. At this point I might as well go really old school and learn Cobol, ya that language created in 59' that still has 200+ billion lines of code active that runs on mainframes that all the original programmers have retired, died or stroked out. Yearly salary in California of approximately $97k for Cobol programmers. Mainframes are far from dead, 90% of all credit/debit card transactions go through a mainframe as well as virtually every airline ticket transaction as well. Just about every fortune 500 company uses mainframes to process transactional data. Although I don't hear anyone talking about mainframes or their programming language(s).
As to the schools, that's because they're run almost entirely by leftists these days. They're mental midgets who give participation trophies to ensure that no one is special because everyone is. Technical subjects shouldn't be taught by these creatures because they don't know what anything means or how anything works, they just want things to work on unicorn farts and sprinkles.
As to the issue of mainframes using Cobol, the financial institutions that use them want something that is solid, not something that will need debugging and they're smart enough to see that new code is often garbage. Also, they don't like spending money where they don't need to, and since the old code works, why spend money to replace it with something untested and untrusted. So if you want to make serious bank, yeah, learn Cobol. If you want to make fun programs that millions *know* they're using and might make you good money, learn C++. If you want to make useful programs that people *know* they're using but might not make you good money, then learn C. No one will know you wrote it if you use Cobol, but billions will use it, so if you want fortune but no fame, then go the Cobol route.
The problem with that approach to CS is that it fails to teach the _next_ generation how to write the low level stuff that their high level stuff depends on. We'll end up with a glut of Python programmers, but no-one left to write the operating systems, compilers, etc that the "next Python" will run on.
COBOL has traditionally not been taught in CS courses, even back when new COBOL programs were still being written (those COBOL jobs you're seeing are almost all maintenance jobs - Java is the new COBOL). It was usually taught as a business course. The reason for this is because CS is a relatively new field and emerged out of mathematics and engineering - both of which COBOL is ill suited for.
In any event, the vast majority of programmers out there don't know how a processor adds the contents of two registers together, and they get along just fine. It's similar to how most truck drivers make a living driving 2500+ miles a week and don't know how a four-stroke diesel engine works.
As an example, a web developer is better off learning networking, the HTML, CSS, and DOM standards, and the interfaces provided by browsers and web servers. The processors and memory and cache lines involved for web development are light years away conceptually.
You probably have a couple high-level undergrad courses coming up named something like "Operating Systems" and "Computer Organization." Operating Systems should teach you all the stuff the OS is doing behind the scenes to create an abstracted machine for your programs to run on. Computer Organization (horrible name) teaches you what's going on inside the processor, memory controller, etc. and usually has you working with assembly. These two classes should be among the hardest classes you'll take - if they're not, then they're not being taught right. Mix in a class on microcontrollers (if CS doesn't have one, check the engineering department) and you should be well set up for doing low-level coding.
@@jeffspaulding9834 Thanks for taking the time to respond, I appreciate it. I am on a 2 semester track for Java currently and look forward to seeing where that takes me. My interest in Cobol is purely from a monetary standpoint, California pays up $97k for experienced cobol programmers. It is also likely a field not flooded with fresh CS graduates ;)
@@Wandering_Horse Depending on what field you go into, $97k isn't that much. Especially for California.
More and more COBOL is being transitioned over to other platforms, mostly Java and C#. Instead of mainframes, everything's moving to "the cloud." AWS does support COBOL, but you'll notice if you search for it you'll find a lot of "transforming COBOL to Java" articles.
If you want a field that doesn't have a flood of CS graduates (and involves low level programming), consider embedded programming or industrial automation. There's always jobs in those fields, and they pay well. I make more than that $97k and I live in Oklahoma where the cost of living is negligible. You'll want to pick up basic electronics knowledge and some IT, but you can rake it in if you get a job working with SCADA and PLCs.
Either way, good luck!
I like how you talk about C like if it was Assembly language lol. C is low level by today’s standards but if you REALLY wanna how a computer works under the hood, I recommend knowing a bit of Assembly as well.
That's what my uni is doing to us as EEs. First semester C , next semester C++.
While having a course on how the voltage in the transistors makes binary -> octal -> hexadecimal -> logic -> floating points -> calculations -> a chip
Hmm, regarding C, you mentioned registers. Now, I generally agree with using C to learn how computers work at a fairly low level. But one thing you can't do in C (well, pure C, anyway) is mess around with registers. For that, you need assembly. But maybe that's too low-level? It also has the distinct disadvantage of being rather different depending on what CPU architecture you're writing for. But I just had to bring up this nitpick.
I tried learning how to use C, it was rather fun, even pointers were starting so sound intuitive in my head.
Until I found out about malloc.
Malloc made me feel miserable and sad and dumb.
Then I took my experience with C (the little experience I hade wikth some of the very basics), and went into Python.
It made me smile again as I was able to easily build more and more complex applications. Of course, I still dont quite get how multiprocessing works nor how to properly slice a pie in exactly the same way with no remainder. But im getting there, im slowly starting to think like a programmer and solve problems like one.
Someday I will go back to C and conquer malloc.
I think a better way to learn how computers work is a combination of going through something like Ben Eaters 8bit breadboard computer series on UA-cam (you don’t actually have to build the computer just watch the playlist until you fully understand everything that’s going on)and learning c. I find a lot a resources for learning C just say things like” the stack is like a pile of plats” or “think of a register as a single memory address which is faster and better for storing stuff in the super short term” which is a good way to think about it but it can be helpful to actually understand what’s happening on a real world example instead of using a metaphor of a pile of plates.
C and Python were my first two programming languages I used to learn back when i was 14, good old days :)
I started with C and I would say it’s a great language to learn programming with.
I think it depends upon what interests you most about programming. Are you most interested in knowing how to make websites, how to build games, develop apps, understand how computers work, etc?
When I first tried to learn programming I spent 3 years trying to learn programming for making websites and made very little progress. I assumed it was because I am bad at programming. I am bad at programming, but that was not the issue. The issue is that I don't like making websites.
Its not my cup of tea.
I do like making games. Once I realized that, I started making way more progress. I am still bad at programming, but the knowledge is sticking more so that's something.
When I read it was only two languages, I somehow directly thought of C/C++ and Python. So I guess I agree, as well as agree that for some going for Python first would make more sense and get them going so that learning how the computer works would become valuable/interesting to them for it to become motivation.
I started with Basic ('79). Then assembly ('81). Then C (K&R) ('85).
C is the most important language IMHO to learn, as a super macro assembler language. Makes you think like a computer without the initial complexity of assembly. Nearly all microcontroller code is written in C for a good reason. Learning only high-level languages with so much abstraction leads to stupid design choices due to an ignorance to what is actually required to make the code function. But starting with C is not something I'd recommend.
High-level, python is good for a starting language now, if you recognize it will be slow in execution.
SQL would be my next choice. Understanding SQL and using it effectively is vital to nearly any program in business. Abstraction here is of the devil - don't do it.
Starting with a small board computers is the best way, not with a PC with lots of threads and tons of memory - most of which is wasted by huge libraries with functions you don't need. Constraints make you think and be resourceful. Doing this will eventually make you realize the fastest program has lazy code - doing as little as possible to accomplish the required functionality.
My story is similar - simple BASIC on a UK-101 (6502 Ohio superboard clone) in '80, followed swiftly by machine code (I had no assembler), then followed in early '82 by a very nice structured BASIC (BBC BASIC) with an integrated assembler. I started Fortran and C at the start in my Engineering degree in '87.
I've been a Software Engineer for over 30 years. I write code for Windows applications and embedded systems. The only languages I use are C, C++ and C# (and sometimes assembly). I have no need for any other languages.
For me (speaking strictly form personal experience) starting with C++ is a more sensible choice than C. If starting with C is like learning to ride a bicycle but the floor is lava, C++ is the same but with training wheels. And Bjarne Stroustrup's "Programming Principles and Practice using C++" (PPP) is one of the best resources to start learning C++ and programming in general. I tried learning programming a few different times using different resources (Python the hard way, Raspberry introductory course to C, UA-cam videos etc...) But nothing really clicked until I did PPP.
(If you do PPP please don't skip chapter 6)
Programming C++ the "proper" and "modern" way doesn't really teach you a lot about how computers work. Despite being a (mostly) superset of C, C++ programs aren't supposed to deal with all the low-level minutia that C programs do. If your C++ program looks like a C program, you're not taking advantage of what C++ can do for you.
(This isn't a dig on C++, BTW. Abstracting away the hardware is a feature of the language and is usually a good thing.)
That said, I don't really agree with the premise of the video anyway. Learning C isn't going to teach you how the computer works. It will teach you how the C environment in your operating system works. If you want to learn how the computer works, either start programming microcontrollers with C and assembly or take a Computer Organization class.
Please make more videos on embedded rust, especially for the ESP32
Don't even need to watch to hear C and Python most likely as recommendations.The truth is quite simple, pick whatever interests you and learn there. Learn however you learn and don't quit because you're not understanding. Ask questions, basically all the time, and in all honestly basically none of us can look at code for 30 seconds and know what's going on. Don't undermine yourself and just keep at it.
I would say to be sure to work on what interests you. If you don't like data structures and algorithms, work on something that you want to figure out yourself.
What you'll find is you will need data structures and algorithms eventually, and you will be excited to learn them when you understand their application
I agree with some other commentators in the comments to start with an interpreted lanugage first, and then learning how things work under the bonnet with C.
The reason is simply that people need encouragement and feedback, especially when they're starting out and very prone to making mistakes. It's too easy for beginners to fall frustrated and dismayed if they are constantly fighting C trying to make the simplest of programs work. Much better IMO, to start with something much more forgiving such as Python or Javascript, so that our natural desires for instant gratification could be satiated.
I mean, imagine which one of the following is more satisfying for an average beginner programmer - writing a 10-line JS script to remove an annoying ad on a website they use, or writing a 20-line C program to reverse a string in the terminal. I think the answer is pretty obvious for most people.
TL;DR, user (or learner in this case) retention is the key IMO, and there is no better way to do that than dopamine and adrenaline.
K&R C book is one of the hardest book on C to read for 'beginners'. Totally agree with struggling to reverse a string in C while JavaScript can do wonders in less lines of code
I don't think I had ever seen your face before :P
I really like your approach, and I had subconsciously taken a similar path:
I learnt to code with arduino, getting a feel for how the microcontroller itself works. Then I tried C# and java to make little tools and apps I used. Moved to linux and fell in love with rust. Now I'm learning rust with the rust book and Python with Python Crash Course (second edition, by Eric Matthes)
If you're a new programmer looking to learn python, I can't recommend that last book enough. It has tons of very clear examples, good explanations, and you even end up building 3 cool projects.
I'm a very lazy person and I always have to think how can I do more with less. At the beginning, when you have no other tool, I think learning just a few elements of programming through Python is going to net you the most. It will let you start to play around and get hooked. Initially starting with less friction, like syntax, lets you dip your feet in and warm up and before you know it you'll start asking "but wait, wtf is up with copying stuff in python"... and off you go...
Though at the end of the day, I think its about motivation, its about the kinda projects you'd like to be able to implement and that may inform what you should start with. (Python then is only an automatic recommendation because of the lower friction)
straight to the point.
I agree completely, but I wonder if one of the "better C" languages could be a better and less painful learning experience. I mean things like Zig or Odin. I don't agree with many philosophical decisions of those languages, but they offer low level control and closer-to-python language facilities.
Start with JS because JS can do everything. Then you can find what you like by yourself. For me it was JS, C, C++, then Lua, Processing, and now Golang. I know next is Rust. But all you need to know is to start, take a computer and start writing some code. But you can bet on JavaScript.
Gonna copy my reply from another comment:- "Yeah maybe just start with something very simple but practical like Python to atleast get used to programming and then just directly start C when you reach intermediate level in Python. Either way, you HAVE to learn C. Just get the book (The C programming Language, get a free pdf cause book is expensive) and you are done. Literally just follow that and watch videos on topics where you feel like you want more info."
I personally followed this technique, I did python for 1.5 months (everyday 2-4 hours) and read the C book when I was bored (was a gift from Dad who didn't knew much about programming but wanted to help). Later on I got seriously amazed on how much flexibility you had in this language and so I started doing this in conjunction with learning Python. Great method, and if possible start with C as early as you can but starting with C right at the start isn't that great because learning programming and learning how a computer works are different even though they are connected and leaning programming first is the easier route. So yeah, I guess my method is opposite to yours but honestly I would learn Programming first and get motivated rather than try to learn how a computer actually works. After a while you end up being curious anyways so no need to make things hard for yourself.
Many things I never understood about DSA at uni because I was overwhelmed with C's memory or Java's OOP. Python is good. Don't let complexity kill playfulness.
My journey so far is C# > python > Assembly > C > JavaScript > C++ and soon, Rust.
Not a master of any of these languages, but I did have to use them for projects, and so I learned.
It's hasn't even been 2 years since I picked up programming, either. 😂
The point being, the most important part is that you start learning. Don't be afraid to look at other languages.
P.S. I would also say python is a good place for people to start!
I started with C at 14, after a while, moved to C++ for a few years and then C#... today I work with TypeScript, which I love.
Python seems cool but I really hate the syntax. It's ugly and I find it convoluted, mostly because it lacks curly brackets. I think using identation was a terrible idea... just my humble opinion, though...
i say the same thing but swap c and smth else.
i think you should learn any language you want which fits what you want to do first.
want to make a game? that is fine. there are tools and languages for that. they arent the best, but the first priority is to start a positive feedback loop of self satisfaction and internal motivation.
do you want to make a website? html isnt that bad.
once you have a sense of comfort creating soltuions which meet your preferences, then go back and try making them better using C.
the other reason i take this position of smth other than c first, is that it smooths and eases zealots.
some say that haskell should be the first language people learn, others like ada. their preferences are various and what they lack is the social element. the point of learning c isn't it being low level. but it being a refined mapping of most assemblies, which makes it objective or neutral, and it also becomes a medium to talk to other programmers over.
want to learn haskell because some zealot says that it is the future, great. learn it, get comfortable, and then follow up on your completed projects by redoing them in c. not for the performance, not for some superiority of code style, but to get it so you can talk to someone and write psuedo code in the c style to get help even when they have wildly different language preferences.
the problem i have with python as a medium, is that it looks alot like c but it violates the shared syntax. the loop rework makes it look like it doesn't work when it does, due to itterator changes. this decieves readers about how it works. learnign python isn't exactly bad.
it is simpler with moving parts taken out, but why something works or doesn't work is often those moving parts. so just like the computer cant figure out why one would try parsing a null array, a programmer overlooking a bit of code wont be able to see what was being attempted. to be able to get at that we need a shared medium of exchange.
Good stuff!
Glad you enjoyed it
I would say, learn C for the computer's knowledge, as you said but for the second thing, use C# or Java.
While yes you have all keywords, the boilerplate and all this, their syntax is close enough to the likes of C/C++,(heck C# and Java use the same boilerplate) that you could quite easily port it over to C(without the OOP aspects) and can be abstract enough that you can pick up Python.
Ofcourse C# and Java can be complex, but they can also be as complex as you want them to be.
I started seriously learning programming as a high schooler around 2002 in... Java. Why? J2ME. C/C++ for me was more complicated. And React Native/Ionic/etc hadn't invented that time :D
Me as a software engineer with 6 years of experience while watching this video:
"Damn, interesting!"
My issue with starting with a low-level language like C is that it's just not very fun or engaging. In my experience, most people who advise this are people who started with higher-level languages and then learned C later and thought "If I knew C from the very start, it would have greatly improved my programming in other languages." But learning C is difficult and boring for beginners. If someone started with C, they could easily become disillusioned with programming as a whole and quit early on. With a language like Python, though, they're able to quickly learn how to accomplish cool stuff without needing to spend hours on the nitty-gritty details that will become useful later on.
Asserting that you must* learn C to go low-level is kinda egregious to me - from personal experience I can say that many young programmers start in low-level languages and get discouraged... never to grow. Most concepts relevant to programming are language agnostic, I am learning JavaScript [my first big language] and I can easily interpret almost any other programming language's code now.
The fundamentals are all there if you study how the JavaScript engine operates: how functions work, memory management [GC in js], the big data types [numbers, strings, objects, etc], what statements are, what expressions are, how loops operate, etc. And, I found this way a much easier foray into programming than jumping into C. I think if I started with C I prob wouldn't be writing this post write now.
"write some programs, crash some programs"
It's gonna happen everyday, not just when you learn C..........
Probably my two favorites (that I've used so far). I gotta say though, pointers are pretty useful for understanding data structures in a more intimate way. I would recommend doing a couple different linked lists in C and then maybe some other simple structures (stacks, queues, maybe a binary tree) in C++. But I absolutely agree that if you're going to start doing more complex things python will be a much faster way to learn what you are trying to learn without getting caught up in segfaults and overly verbose code.
What wasn't said that eventually you'll dabble with pretty much every relevant language anyway if you're building a career in software engineering. Different languages are not just skills, they eventually become tools to solve specific problems.
My boy finally showing himself. LLG FOR LIFE. Also I recommend people learn how to hack HTML.
HTML HACKERS UNITE
Also “My boy”
Honestly, id recommend Z80 assembly instead of C. Its not as crazy as x86, and you can use it to code for the gameboy!
c then python is always what I suggest lol
I'm not an IT guy by profession, but I already learned C and Python so I feel good. I've avoided C++ like the plague. I know Java too, but absolutely hate it.
programming in "c" is interesting and informative, but compiling a program for some custom embedded Linux( for example friendly arm and eth.) is a pain in the ass!
"Sucking at something is the first step to being pretty good at something." - Jake the Dog
Excellent choices, though I'd actually advise doing that in the reverse order. C may put off someone who starts learning because it's low level in comparison to Python, C#, Kotlin, ... It's about motivation. First do the fun part and get healthy habits with a high-level language - Python is good because it can be used interactively and teaches how to write clean code, but Kotlin is great too, not just a scripting language and it opens the door to Android programming. Then dig into the low level with C to see how it works under the hood, by then you should be able to realize how what you did before actually works in the system. Besides, it's not for everyone, but it's a very good school that too few go through today.
BTW, great video, but the constant jumps are very distracting. I think it's not just editing, you seem to do that intentionally with different zoom levels. Please don't.
best advice ever
While I think C has a valuable place in learning how things work, I don't think it's a good choice as a first language unless your explicit goal is to make a weed-out course since you have to put so much effort in to do really basic things that you could easily do on Day 1 of the beginner Python course and help learners build confidence while they learn the basics, and then if they want to get better, they'll be in a better position to learn C than if they had chosen it as their first language, which can lead to "This seems really hard and I'm not sure it's worth the effort it will take to learn" instead of "I can do this". Sure, Python has way more stuff in its base kit and standard library than C does, but ultimately that's what makes it easier to use, because in Python, you're largely picking and choosing how to connect these ready-made parts together, while in C, you still need to do that, but you also have to go make/find the parts yourself.
And that's ignoring things like 3rd party libraries, which you have to manually link in C/C++, and build systems, which are an entire extra thing you have to learn how to use with C/C++ once your project grows large enough, and contrary to the apparent beliefs of the designers of make and cmake, I don't have a passion for configuring build systems manually.
C isn't dead though. Whoever says that is incorrect
I love the c programming language (i also use it) even though I didn’t start with it.
If i already started learning with c, why should I go on with python after that? If you already know the c syntax, I think c# is the way to go.
Absolutely disagree on only the ordering. Python is a much better starter because it gets you quicker to solving problems and building that confidence and curiosity, rather than learning everything all at once before you can do anything at all