Is the C programming language still worth learning?

  Рет қаралды 83,390

Jacob Sorber

Jacob Sorber

8 ай бұрын

Patreon ➤ / jacobsorber
Courses ➤ jacobsorber.thinkific.com
Website ➤ www.jacobsorber.com
---
Is the C programming language still worth learning? C is old (well by program language standards), and people often ask if it's worth learning, or if it's on its way out. This video talks about some of C's strengths and weaknesses.
Related Videos:
***
Welcome! I post videos that help you learn to program and become a more confident software developer. I cover beginner-to-advanced systems topics ranging from network programming, threads, processes, operating systems, embedded systems and others. My goal is to help you get under-the-hood and better understand how computers work and how you can use them to become stronger students and more capable professional developers.
About me: I'm a computer scientist, electrical engineer, researcher, and teacher. I specialize in embedded systems, mobile computing, sensor networks, and the Internet of Things. I teach systems and networking courses at Clemson University, where I also lead the PERSIST research lab.
More about me and what I do:
www.jacobsorber.com
people.cs.clemson.edu/~jsorber/
persist.cs.clemson.edu/
To Support the Channel:
+ like, subscribe, spread the word
+ contribute via Patreon --- [ / jacobsorber ]
Source code is also available to Patreon supporters. --- [jsorber-youtube-source.heroku...]

Пікірлер: 622
@sergeychistov8162
@sergeychistov8162 8 ай бұрын
As a python programmer, learning C have changed my mind and how I look at the code I'm making. So yes, It's worth it!
@unperrier5998
@unperrier5998 8 ай бұрын
can you please expand/elaborate?
@mirzakadic9174
@mirzakadic9174 8 ай бұрын
Same here, Learned JS first, now learning C++
@paulklasmann1218
@paulklasmann1218 8 ай бұрын
Any of the fast python libraries and functions that require speed are compiled from C++.
@IBelieveInCode
@IBelieveInCode 8 ай бұрын
@@unperrier5998 If you are really interested in it, learn computer science. This can not be taught buy YT comments, lol. If you are not, do not ask.
@nonconsensualopinion
@nonconsensualopinion 8 ай бұрын
@@unperrier5998 I learned assembly, C, C++, and all the way up to more modern languages in Python. I feel that knowing about registers, a bit of hardware, and the need to allocate and free memory (on stack or heap) really helps me understand what Python is doing for me. I think that helps to write code in Python which is more optimal for a CPU, giving greater performance. I've always felt that Python was something you "earned". It lets you do things which are not really great in practice but if you understand that you are doing it you have a bit of an excuse.
@tempura8390
@tempura8390 7 ай бұрын
Having 2 semesters of pure C, learning how the memory works, implementing Data Structures and complex algorithms, helped me A LOT to understand programming in general, it's way easier to go to another language once you have done everything in C
@DevlogBill
@DevlogBill 2 ай бұрын
Just a side note. I played around a little with C, about 2 months on my own. What I noticed C has a unique still when referencing int and strings. Recently I starting learning Golang and Go feels so much like C. Compared to other languages like JavaScript, Kotlin, Dart. Go in my personal opinion has the most similarities to C. If you are a C fan boy and would like to try another language which has a lot of similarities to C then I highly recommend GO. Go even has pointers but some what different.
@dimitrioskalfakis
@dimitrioskalfakis 8 ай бұрын
the things that C 'lacks' actually make you a better programmer since they force you to think and also use the language to its full extent so as to overcome the apparent weaknesses. after 50 years we can still claim that 'if C is good for UNIX it ought to be good for everything'.
@nikozdev
@nikozdev 8 ай бұрын
Do restrictions and limitations really make a better programmer ? What if I wanna have namespaces, more generic programs with templates and compile-time evaluation ? Something that cannot be achieved because of language limitations is frustrating. C-strings could be built other way but they cannot be changed anymore
@legacywolf443
@legacywolf443 8 ай бұрын
@@nikozdev By definition, everything possible in C++ is possible in C because C++ is written in C. So you can't say "things that cannot be achieved".
@legacywolf443
@legacywolf443 8 ай бұрын
100% agree
@nikozdev
@nikozdev 8 ай бұрын
@@legacywolf443 I mean language features. Can you have destructors in C ? You can explicitly call functions, but this is not automatic destruction, so zero-cost automatic destruction cannot be achieved in C, so smart pointers are impossible. There are no namespaces - so I always have to manage global names. No templates - only macros, which is much harder to debug and harder choose the right names. Sure, we can write in assembly to achieve everything because that is our back-end. But we would not have many quality-of-life features because language compilers don't do that for us.
@oracleoftroy
@oracleoftroy 8 ай бұрын
​@@legacywolf443_"...because C++ is written in C."_ Not entirely sure what you mean by this, but chances are your C compiler is written in C++ actually. The three major ones certainly are. C++ at the very beginning started out as a transpiler to C, but that hasn't been the case for decades. C++ as a language mostly compiles valid C, though it isn't a perfect superset. Maybe one of those is what you meant. It's true that you can do anything in C, though at some point I think the simplistic nature of C hurts it. Personally I think if C added destructors and completely replaced the unsafe bits of the standard library with something much harder to shoot yourself in the foot with, it would be a lot nicer to work with while still being it's overly minimalistic self. Personally, I'd like stronger types, namespaces and templates/generics too.
@bonehelm
@bonehelm 8 ай бұрын
I think C's age is a plus! It basically proves it's a great language. if it wasn't good it wouldn't have stuck around for so long.
@stefanalecu9532
@stefanalecu9532 8 ай бұрын
Well, Pascal, Fortran and Cobol are great too and yet they aren't on the same level as C (disclaimer: I use all 3, not in production but still) so I'm not sure if your argument is 100% airtight
@bonehelm
@bonehelm 8 ай бұрын
@@stefanalecu9532 what I mean by "stuck around" is that C is still in top 10 most used language according to GitHub. While Pascal, Fortran, and Cobol are nowhere near that in terms of current usage. So C is very old and still in the top 10 most popular, therefore it's a good language. Whereas Fortran is very old, but not in the top 10 most popular, therefore it's not a good language.
@compilemylife3192
@compilemylife3192 8 ай бұрын
Well said 👏🏼👏🏼
@rajaroychowdhury6246
@rajaroychowdhury6246 8 ай бұрын
​@@stefanalecu9532please don't compare between the real programming language and a scripting language. Anyway I am sure you are involved with user space application software production but not with kernel space system calls, device driver software development. C is the mother of all programming languages as OS, Compilers, loaders etc and last but the least interpreters are written in C language. Regards and blessings.
@anon_y_mousse
@anon_y_mousse 8 ай бұрын
@@stefanalecu9532 Except that not as many new projects are started in any of those three languages compared to C.
@HansBezemer
@HansBezemer 8 ай бұрын
I like C because it's predictable. I mean, there are not that many layers between C and me. I have a pretty good idea what code it pushes out and how that will work out. With languages like Python, Rust and Java I'm always wondering "Yeah, but what's *really* happening? What does this thing under the hood? How many bugs are hiding there that I don't know of?"
@varadinagypal
@varadinagypal 8 ай бұрын
Implicit declarations -- so many people think the warnings are for losers to read ;)
@LucasGabriel-xz8nk
@LucasGabriel-xz8nk 8 ай бұрын
This is the cost of abstraction. The same way I could say I program in x86 assembly because I need to understand what a "for" do or a "malloc" do under the hood. That being said, I also agree with you that the predictability is important and should be a feature of any low level language
@HansBezemer
@HansBezemer 8 ай бұрын
@@LucasGabriel-xz8nk The best C programmers have at least a hunch of what kind of assembly is pushed out. And they have a good idea of how the C runtime functions. One could argue that a "for" is an abstraction in itself, of course. Or even a malloc() - and they'd probably be right. Even if one did assembly, I guess one would introduce a few fancy macros to "abstract" the boring details out of a program. But see the difference - one is still very involved and *KNOWS* what these abstractions boil down to. Can you tell me you *WHY* a vanilla "for-next" in Python is dozens of times slower than its C equivalent? I thought so.. Too many magical layers. (I made plenty of C VMs that were much, much faster than Pythons VM - so it can be done). But it boils down to a simple preference. To some, fast is fast enough. And they don't bother about predictability as long as it gets the job done. But I'm not that kind of guy. If I have to hunt down a bug, it'd better be mine - and not someone elses. But I agree wholeheartedly I'm just voicing my personal opinion and preferences here - not stating an indisputable scientific fact.
@gigachad8810
@gigachad8810 6 ай бұрын
I wouldn't call C predictable. Implicit conversions, UB literally everywhere, differences in implementations, etc. Also, thinking that the std library has bugs is.... outdated? (Rust btw has none of the issues above, and I would call it incredibly more predictable than C, would be happy if you could say why you think that it's unpredictable)
@LucasGabriel-xz8nk
@LucasGabriel-xz8nk 6 ай бұрын
​@@gigachad8810good point
@Vixikats
@Vixikats 8 ай бұрын
Learning C was the best thing I've ever done for my C++ programming. I get all of the benefits of a very fast workflow by being able to leveage C++'s standard library of features while being able to utilize the nitty gritty of C when I really need it. Learning C has pushed me into writing better C++ code because I'm now understanding what those abstracted C++ functions are doing under the hood and can make considerations for each.
@ANAND...TIWARI
@ANAND...TIWARI 4 ай бұрын
Bro, I have started learning c.... But don't know how can I start my career after learning it. What will be the future after it, If you could tell me regarding this I will be grateful to you 🙏
@josephlandry8787
@josephlandry8787 8 ай бұрын
Learning C was the best choice I’ve made. I don’t want to waste my time learning technologies that won’t be around in a few years.
@smallSphere69
@smallSphere69 8 ай бұрын
Learning C >>> Learning random crap JS framework which'll loose popularity in 1 week.
@legacywolf443
@legacywolf443 8 ай бұрын
@@smallSphere69 way too based, watch out for trendsters crying about it
@_________________404
@_________________404 8 ай бұрын
First learn C, then learn C++. There are things where C++ will be better than C, like GUI programming for an example.
@jasonenns5076
@jasonenns5076 8 ай бұрын
Like rust
@alvarohigino
@alvarohigino 8 ай бұрын
Me too. And I simply like its simplicity.
@tir0__
@tir0__ 8 ай бұрын
Real engineering happens in companies where whole stack is based around C/C++ and low level languages
@apostolisparga
@apostolisparga 8 ай бұрын
Define real engineering...
@student99bg
@student99bg 8 ай бұрын
Wrong. The Us Defense uses Ada. Universities used Pascal for many years.
@gloverelaxis
@gloverelaxis 8 ай бұрын
no, real engineering happens in publicly-owned organisations where there is no stack and people are developing new languages to replace pieces of shit like C/C++
@charafedd1374
@charafedd1374 8 ай бұрын
@@student99bg the 2nd part kulled me 😂😂😂
@christopherlucas1475
@christopherlucas1475 8 ай бұрын
I know someone who is a young software engineer who was just hired as a COBOL programmer. He never used and didn't know what it was before. His new company is teaching it to him.
@LogicEu
@LogicEu 8 ай бұрын
Not only C is the grandfather of most modern languages, but it's also the corner stone of humanity's tech stack (Linux, Windows, MacOS, etc)
@edgeeffect
@edgeeffect 8 ай бұрын
I'd have thought Algol-60 was the "grandfather"... C isn't THAT old.
@heruhday
@heruhday 7 ай бұрын
@@edgeeffect what about fortran?
@edgeeffect
@edgeeffect 7 ай бұрын
@@heruhday Algol-60 has blocks, repeat and while loops. All the things people would recognise in a "C like" language. Fortran doesn't.
@heruhday
@heruhday 7 ай бұрын
@@edgeeffect fortran has repeat dan while loop.. Example: INTEGER A(4,4), C, R ... C = 4 R = 1 DO WHILE ( C .GT. R ) A(C,R) = 1 C = C - 1 END DO Example
@heruhday
@heruhday 7 ай бұрын
@@edgeeffect Block example: PROGRAM foo INTEGER :: a add1 : BLOCK INTEGER :: res1 res1 = a + 1 BLOCK INTEGER :: res2 res2 = res1 + 1 END BLOCK END BLOCK add1 END PROGRAM foo
@notremarchedelafin
@notremarchedelafin 7 ай бұрын
I was a programmer from 1994 to 2002. Graduated in computer science from university of Montreal. I moved to another field of work in 2003. I was a C programmer. I still remember a lot of things, and I believe I could pick up programming again very fast. I knew (and still know. I have not forgotten) C++ as well, but not using it very much. I did many things in C that I cannot imagine how I would have done them without the "low-levelness" of C (dynamic hashing tables (dynamic matrices, 2 dimensions, double pointers). I think it was a major pain the the ass, sometimes, because OOP programing would have made the code clearer. Good ol times...
@pcuser80
@pcuser80 8 ай бұрын
C is the no.1 language for me. I do all in C even create gui programs for windows.
@hypnoz7871
@hypnoz7871 8 ай бұрын
God I love C for everything, but a GUI must be next level in term of difficulty.
@pcuser80
@pcuser80 8 ай бұрын
@@hypnoz7871 Its very easy, The base of win32 api is also written in C.
@matyasmarkkovacs8336
@matyasmarkkovacs8336 8 ай бұрын
​​@@hypnoz7871It's not easy, but really not that bad. For eg. you can use gtk with C as well which is easier than winapi.
@anon_y_mousse
@anon_y_mousse 8 ай бұрын
@@hypnoz7871 Depends on what library you're using. If you need cross platform, go with GTK. If you're on Windows only, the base Win32 API isn't too bad, or at least wasn't for me back when I developed with Win98. Though, I would still argue for GTK if someone even wants to consider a transition to a good OS.
@not_kode_kun
@not_kode_kun Ай бұрын
@@hypnoz7871 depends. if your program is simple, a simple GUI library like raygui works really well and isn't hard to work with at all. Very easy to modify too since its so simple, so if you know a bit of graphics programming you can add any feature you want
@RedPotato13
@RedPotato13 8 ай бұрын
Beginner programmer here, I'd say C is a fantastic first language tbh. The fact that it doesn't have a lot of the pre-built functions in it's libraries compared to other languages really makes the learning worth it since you basically need to make them by yourself. The way that I had to comprehend how memory work really increased my understanding when coding as well as improving how I view my code. Although other languages like Python can serve as an easier and more beginner friendly, C is in a threshold that's still doable by a beginner as well as providing a solid thinking process that will help when learning other languages. Learning programming by starting with C was probably one of the best choices I've made.
@keto6789
@keto6789 8 ай бұрын
Learn assembly
@jal051
@jal051 6 ай бұрын
I don't like python for begineers because it hides how types work (and yet has types). Types are foundational to coding in any language. A learning language should use strict types, imo.
@cyberchef8344
@cyberchef8344 6 ай бұрын
@@jal051Hot take - all languages should use strict types. The amount of time you "save" by not having to type "int, string, etc..." is easily lost the instant you make one mistake with your types that only shows up at runtime rather than compile time. Plus the code is by far more readable on its own to other developers.
@jal051
@jal051 6 ай бұрын
@@cyberchef8344 Absolutely agree! I don't even think I save any time not typing the type. One still has to make the decision of what type it is that variable you're declaring, so what's the point in not being explicit with it. You don't win anything. It's a fake simplification which only introduces troubles on the long end.
@ANAND...TIWARI
@ANAND...TIWARI 4 ай бұрын
Bro, I have started learning c.... But don't know how can I start my career after learning it. What will be the future after it, If you could tell me regarding this I will be grateful to you 🙏
@alenmumo
@alenmumo 8 ай бұрын
I'm not a C guy, however I ended up writing a thesis about web programming in C, just to realize by myself that there is not, and probably I wont ever know, any other language like this. It certainly rocks, it's certainly the winner at the poker table.
@edgarbonet1
@edgarbonet1 7 ай бұрын
Great video! I would just like to add that, in the realm of embedded Linux, if you have a C cross-compiler targeting your board, that's all you need to build a complete system: bootloader, kernel, libc, shell, editor, command-line tools, Perl and Python interpreters, etc.
@oliverr4946
@oliverr4946 7 ай бұрын
The first language I learned was C on crappy linux machine. It really forces me to learn how language, compiler, linker, os, hardware, build system, and libraries work together. That learning process really help me a lot later when I was learning other language and many aspects of computer programming in general.
@kevinyonan2147
@kevinyonan2147 8 ай бұрын
A bonus I want to add to this video: Because C is simple, there's usually only one way to do things, and alot of behavior isn't hidden from you, memory bugs are actually pretty easy to debug, especially when using any standard debugging tool out there. Honestly, the only bad thing about C's age is its standard library. It has alot of useful stuff you'll need but its not-so-good design is definitely showing.
@samuraijosh1595
@samuraijosh1595 8 ай бұрын
memory bugs are also extremely easy to make at the same time....
@kevinyonan9666
@kevinyonan9666 8 ай бұрын
@@samuraijosh1595 with experience you figure out ways to heavily reduce that. 1. NULL check your pointers. 2. Set pointers to NULL after freeing an allocated pointer. 3. Limit how much memory allocation you're doing. 4. Initialize any pointers to NULL if you're not immediately Initializing them to an address.
@captainfordo1
@captainfordo1 8 ай бұрын
@@samuraijosh1595I suggest you look into the arena allocator
@varadinagypal
@varadinagypal 8 ай бұрын
"there's usually only one way to do things" -- what? Looking at production code, all I see is idiosyncratic shenanigans, the same problem gets solved differently each and every time. Can you guess how a menu is implemented? Parallel shallow arrays, not an array of a certain struct. Mix in a ton of ifdefs, and now reorder the elements.
@JohnCDSMB
@JohnCDSMB 8 ай бұрын
​@@kevinyonan9666Exactly
@Grab-Deals
@Grab-Deals 3 ай бұрын
Hi i am a up and coming C developer i just wanted to say i really appreciate this kind of content it helps me to better grasp things about my studies so ty so much!
@loc4725
@loc4725 8 ай бұрын
From an educational perspective I find that C is a much better teacher of how a computer works behind the scenes, and I like that it forces learners to pay close attention to and understand what it is they are writing.
@niggacockball7995
@niggacockball7995 8 ай бұрын
yup going from python to C was like enlightement to me
@asowers1
@asowers1 6 ай бұрын
I spoke to an engineering manager at Lockheed Martin a few weeks ago who hadn’t even heard of Rust. Expect C to be around for as long as it’s been here for government and military applications.
@User-bl5ce
@User-bl5ce 2 ай бұрын
I've heard they also use Ada a lot
@user-mr3mf8lo7y
@user-mr3mf8lo7y 8 ай бұрын
Are you guys kidding? We would not have any development in our daily computing lives without C.
@user-lt9oc8vf9y
@user-lt9oc8vf9y 8 ай бұрын
That's true but C could still get outdated. Like horses got replaced by cars, C could become similarly irrelevant. I personally love C but your point is weak
@RamsLiff
@RamsLiff 8 ай бұрын
​@@user-lt9oc8vf9yC stood the test of time, probably it wont be replaced at all, it has all the things you want. Although it takes time to create something, on the way you wrote your own libs and can probably be more productive
@matyasmarkkovacs8336
@matyasmarkkovacs8336 8 ай бұрын
​​@@user-lt9oc8vf9yYeah, but what could replace C? Rust? Cmon it has a very ugly syntax. C is designed to be simple and efficient. It never wanted to be memory safe.
@tommyqjr
@tommyqjr 8 ай бұрын
Your videos are awesome. Thank you!
@johnpawlicki1184
@johnpawlicki1184 8 ай бұрын
Using C since K&R first edition (1978). It is the underpinnig of almost everything (including C++). If I had to pick one language for the rst of my life it would be C. But every other language brings something else to the table. All languages that find a purpise have something to offer. Python is great for teaching and casual learning. In the old says we had to pay for languages, hunderds even thousands of dollars for a compiler. Now there seem to be free versions of everything. Sometimes the old days were NT as good as today. ;-)
@edgeeffect
@edgeeffect 8 ай бұрын
My advice would always be "If you have to pick ONE language for the rest of your life..." - don't! ;)
@suborno9249
@suborno9249 8 ай бұрын
C is the reason how I learn about how classes and packages works.
@victorgallet3174
@victorgallet3174 8 ай бұрын
C is highly productive when you got to the point where you wrote lots of small libs to help on some low level stuff. Features in other languages can most of the time be adding as small libs in C. But C will always be waaayyyy faster to compile than any new language. It's a small, simple language. That won't change a lot in the future, that's a real plus.
@varadinagypal
@varadinagypal 8 ай бұрын
Hm... yeah. A clean build for a not-so-enormous microcontroller we use, depending on the features we compile with, takes anywhere from a few minutes to go grab a coffee, take a walk in the building, take a dump and it is still not done.
@xhivo97
@xhivo97 8 ай бұрын
@@varadinagypal You really wanna use single translation unit builds if you want fast compiles in C/C++ otherwise as your project grows it will get slower and slower. It's really rare that you have the freedom to do that though. Some newer languages are trying to solve the issues with compile times though, we'll have to wait and see what happens.
@anon_y_mousse
@anon_y_mousse 8 ай бұрын
@@xhivo97 How is it rare having the freedom to do that? C allows you to put every function in its own file, if you want, and you can even add the prototypes for them all into one header to make using them from anywhere easy. And with tools like `ar` you can even update a library one module at a time and build super fast. Learn the tools and their proper uses and you'll be happier.
@savclaudiu2133
@savclaudiu2133 8 ай бұрын
In an extreme situation, with little contact to outside word I would chose C and maybe Python. C is one of the few languages in which I can program without the need for online documentation. For all the other languages I know the path most traveled, but as soon as I wander outside of it I need some way to refresh my knowledge. I added Python because it's fast (not necessary safe) to code in it but you still need proper documentation for the used libraries.
@Argletrough
@Argletrough 8 ай бұрын
For basic stuff like what function arguments mean, Python's built in help function can be useful. E.g. help(random)
@dfolegna
@dfolegna 7 ай бұрын
In my opinion C has 2 unique things: it is one to one mapping to the von neumann machine execution model, so you program with the control data flow in mind AND has all the basic tools for algorithmic recursion,, stacks and so on. The example you gave about code lenght does not say the other one was calling a library. if you have a great library, you do the same with C. The last thing is memory access: you can teach how to write safe c, it is totally possible if you do well from the beginning and you know what arw you doing. A simole example: you can use pointers only on specific restricted and controlled part of your code, so every memory plays is there and the algorithms are in another place.
@BigA1
@BigA1 8 ай бұрын
Perhaps a good test for a programming language is to see how well you can work out what someone else's program is doing and how it is doing it. That said, I'm struggling to learn C as it seems to be the defacto language for embedded systems - which is what I need it for.
@zoltannemeth8864
@zoltannemeth8864 6 ай бұрын
I wrote a whole custom server and desktop provisioning system for a company over 15 years ago in C. It’s so good, that multiple attempts to replace it (because someone in management was being told by vendor salespersons that they should an commercially available product), but every attempt has failed because the custom solution works so well. Because I did not rely on any libs other than what is in the core OS, it doesn’t have fragile runtimes that require constant updates and releases, etc…. Anyway, my point is that C is powerful, it is fast, it is secure (if you know what you’re doing) and it can reduce the need for “framework update driven releases”.
@martinhaub2602
@martinhaub2602 7 ай бұрын
C is indispensable for one simple reason: Speed. And the vast back-library of C material is incredible.
@arnthorla
@arnthorla 8 ай бұрын
I think Rust is more a C++ replacement. A language which I find much more appealing in the same way I find C more appealing than C++, is zig. Their objective is explicitly to make a better C. The main drawbak at this time is just lack of maturity, but it holds promise.
@bluesillybeard
@bluesillybeard 8 ай бұрын
100% agree. Rust has way too many features and is way too hard to learn to be a C replacement. Zig is much better suited for that, although it still needs a few years to mature, once it has I bet it will blow up in popularity
@normbograham
@normbograham 7 ай бұрын
Years ago, I worked for a company that "bought" old code (java and C/C++), and recompiled it, etc. I love C/C++. Love it. But old C and C++ code does not want to compile on new compilers. And to add insult to injury, there was not any work at all to converting the old java code. It all worked right out of the box. I have not used it much, but it did make you like java. The C/C++ code, when compiled on a new compiler, was sorta buggy. We spent a month compiling, and getting it to work, writing new make files, etc.
@normbograham
@normbograham 7 ай бұрын
Bugs that pop out from moving from one compiler to another, are failure to initialize variables, and even small details in the language, like holding a string.c_ptr too long, and reusing when it left scope. Or worse. dereferencing null ptrs, is a feature in AIX xlc. so, they do memcmp's against NULL
@RAMB0VI
@RAMB0VI 8 ай бұрын
Could you make a guide about programming an embedded device/board from scratch? Considering an empty project, what datasheets do you need to study to get 1. the board and 2. the devices in the board to breathe? Where do you start with the board code and while going through these steps, explaining the registers and other relevant stuff in making the board come alive.
@BrianOSheaPlus
@BrianOSheaPlus 4 ай бұрын
Hahaha, sick burn at 1:28 (the caption at the top-left). 😂 🔥 I too have a love-hate relationship with Perl.
@Kotesu
@Kotesu 7 ай бұрын
This has been alluded to in the video and in the comments, but after 16 years in both software and embedded systems - the number one reason for C is “control”. As you’re writing, you can pretty much know exactly what instructions the compiler will generate and how data is accessed and moves throughout your system. I don’t know of many other popular languages where that is the case and it serves as a good and predictable intermediary between assembly and higher-level languages. (And as as aside, if you think developing in C is slow, try writing in pure assembly.) In most application software, you typically don’t need explicit control over both “what” and “how” the CPU works, but in certain subdomains it’s absolutely critical: high performance or tight memory requirements, finite timing (e.g. cryptography or hardware drivers), determinism (e.g. aerospace, controls, or other intrinsically-safe domain). So when I hear bunch of people complaining the language isn’t relevant, I hear people saying that it’s not relevant for the domains they’re familiar with
@gigachad8810
@gigachad8810 6 ай бұрын
I would say "control if you know every detail of the arch and os and compiler you are using/compiling for"
@derektan6987
@derektan6987 8 ай бұрын
As a CS student who has been touching C for at least two years, I think that besides its familiarity (syntax and awareness of it) with lean, mean execution, there are two other reasons. For the other points, I compare C programming to philosophy. You do it for enjoyment. And the more you get into it, you gain insights into how things work or why things are the way they are. Overall, the best thing anyone going into programming can do is to keep learning. My heart is big enough for Python and Java too.
@cyberchef8344
@cyberchef8344 6 ай бұрын
As a former CS student currently working in industry... I don't see a place for Java, other than when required because it's already in use in a project. If you need to be fast/close to the hardware you have C, C++, and Rust. If you need fast prototyping you can use Python. If you want to be able to quickly (or even for production) throw together GUI applications you can use C#. Java's original pro was that it provided: object oriented design patterns, garbage collection, and portability. Object oriented design patterns are largely falling out of favor because they end up making the code more complex than it needs to be - not to mention it inevitably blows up into a non-maintainable mess the instant the goal of of the project changes. Garbage collection is implemented in other high level languages as well - plus you could just learn how to correctly manage memory and the whole thing becomes a non-issue. Portability... not really sure where this myth that other languages aren't portable came from. Sure the binaries don't transfer... but who cares. It's really not that hard to set up a few toolchains. For the most part you have Windows, Linux, and Mac OS -- and that's assuming you want to support all 3. I really just don't see how Java has a place.
@derektan6987
@derektan6987 5 ай бұрын
@@cyberchef8344 Ah, I forgot to check replies earlier. As my update, I agree that Java felt sluggish to use even for leisure projects. The documentation was fine, but looking at all the extra OOP patterns tossed in along with the forced use of classes made me come to a similar conclusion. Java is clunky- development-wise and syntax-wise which made me grow tired of it. At this point I would only use Java for writing Minecraft plugins. With that being said, what are your thoughts on Kotlin in terms of the programming experience?
@chrissaltmarsh6777
@chrissaltmarsh6777 8 ай бұрын
I got to C from assemblers, programming close to the metal (as a physicist). That taught me a lot. 'The C Programming Language' - K&R - was a revelation. Now Rust is around; That might be the follower for close to the metal. But running the rust tools on a PDP-11 would not work unless you have a lot of spare time.
@Burnr-hw6zs
@Burnr-hw6zs 8 ай бұрын
Regarding "rust tools": Do you mean running the Rust compiler on a PDP-11 or the resulting binary?
@Burnr-hw6zs
@Burnr-hw6zs 8 ай бұрын
Probably both but I think porting the compiler to work within the limitations of the PDP-11 would be more difficult than simply writing a PDP-11 backend.
@chrissaltmarsh6777
@chrissaltmarsh6777 8 ай бұрын
@@Burnr-hw6zs I meant the whole rust stack. A binary would work fine, at a guess, although you'd have to build a compiler; and that is a very clever and informative compiler. Squeezing that into a PDP would be a mite tricky.
@chrissaltmarsh6777
@chrissaltmarsh6777 8 ай бұрын
@@Burnr-hw6zs That is why I used raw C. Better than assembler and close to the hardware. Now I can cross-compile Rust (or C, for that matter) to the little machines, microproccers, that I use to hit the hardware. Which is fun. (I'm mostly retired - my PDP era was getting on for 50 years ago, but the notion that 'os C useful?' is, I think, on the money, especially if you use it to get at hardware addresses. You learn a lot of what a computer has to do, without the nuisance of learning assembler)
@joshgibson3618
@joshgibson3618 8 ай бұрын
Great video, thanks! The newest iso version is c23, I’m curious how soon will the next version come out?
@rdubb77
@rdubb77 7 ай бұрын
I think it’s good if you actually need it, or as a teaching language because manual memory management is very good to learn in general, even if you never use it. Pointers are good for visualization ability.
@roberthuff3122
@roberthuff3122 3 ай бұрын
🎯 Key Takeaways for quick navigation: 00:00 📅 *Introduction to C's relevance* - Discussing the relevance of the C programming language in modern times. 02:26 🕰️ *Common complaints about C* - Addressing common complaints about C, including its age, lack of certain features, and perceived inefficiency. 05:16 🚀 *Advantages of C* - Highlighting the strengths of C, such as its speed, versatility, and foundational role in computing. 07:32 🎓 *Educational value of C* - Discussing the educational value of C due to its simplicity, hands-on nature, and ability to deepen understanding of computer systems. Made with HARPA AI
@camilogoyenechea757
@camilogoyenechea757 3 ай бұрын
I’m currently taking Harvard’s CS50 and I have to say that it’s great for understanding what’s “going under the hood” plus that when we swap to python it will be definitely much more easier.
@psionl0
@psionl0 8 ай бұрын
If there is one thing I don't like about C it is that C doesn't permit nested functions. Frequently the sole purpose of helper/auxiliary functions is to provide information to a single function. These have to be coded separately with their own unique names, stack frames and copies of local variables. Grrr. Otherwise, I agree with everything you have said. When I do LeetCode problems, having to write my own data structure routines proves to be very educational. Not needing to include the kitchen sink for every problem means that I can reduce the code and running time of the problem.
@gergoo007_
@gergoo007_ 8 ай бұрын
Hey, I don't know your stance on GNU C, but it does have nested functions.
@anon_y_mousse
@anon_y_mousse 8 ай бұрын
I'd actually like an explanation of what your use case is before I comment further on it. I have my suspicions, but sometimes people have really niche needs.
@psionl0
@psionl0 8 ай бұрын
@@anon_y_mousse Why? There are heaps of examples where a function might need a recursive helper function. You can find them in Dynamic Programming, Graph traversals etc.
@anon_y_mousse
@anon_y_mousse 8 ай бұрын
@@psionl0 Most of those helper functions aren't much more difficult to use or simply put above the current function. Capturing state can be annoying, but it's not impossible or super onerous, just a *little* bit more annoying.
@psionl0
@psionl0 8 ай бұрын
@@anon_y_mousse You CAN code auxiliary functions separately but making that mandatory as is done in C doesn't make it a good thing. There are many examples where a function makes several calls to an auxiliary function but no other function does. In those situations it may make sense to embed the auxiliary function within the function so that they can share parameters and local variables. As it is, when I create an auxiliary function, I often have to pass a long list of parameters and local variables from the function to the auxiliary function and it gets messy.
@arrowrod
@arrowrod 6 ай бұрын
C has got to be good. I learned C 25 years ago at community college. I started 50 years ago writing code using assembler language. C could have enhanced function libraries. Assembler used prewritten Macros. Maintaining systems written by other programmers. Invigorating.
@golfstix83
@golfstix83 7 ай бұрын
As a newbie, C really taught me about the mechanics of how variables are declared and work. That is from a view of what's actually happening in the hardware. Compared to something like python, which is like riding a bike with training wheels
@cyberchef8344
@cyberchef8344 6 ай бұрын
Did it? I honestly didn't really understand how variables work until I learned assembly. C hides it from you by creating the abstraction of "types". A computer doesn't understand types
@JorgeMartinez-xb2ks
@JorgeMartinez-xb2ks 7 ай бұрын
Absolutely worth it. It was my third language I learned 35 years ago. First was Basic language, then Z80 Assembly. If you know C well, it's very easy to learn mostly all other languages. For example, getting into Go or Rust is very fast. I learned it with K&R book but nowadays I recommend the book Head First C, it'll give you a very good idea of Linux inner workings too.
@nikozdev
@nikozdev 8 ай бұрын
I like c for learning but cannot endure it’s lack of generic programming that cpp has. Templates and concepts, constexpr, namespaces made me fully switch to cpp. But I am still looking for modern alternatives.
@IBelieveInCode
@IBelieveInCode 8 ай бұрын
"I like c for learning but cannot endure it’s lack of generic programming" Generic programming in C needs programers that have strong brains.
@anon_y_mousse
@anon_y_mousse 8 ай бұрын
C doesn't have the best syntax for generic programming, but if you read the standard and play with some example code you can still do everything with it that you can in C++, just with less sugar. For reference, look up _Generic in the C standard.
@nikozdev
@nikozdev 8 ай бұрын
​@@anon_y_mousse , I've found that for the first time =D Thanks for this
@chieeyeoh6204
@chieeyeoh6204 8 ай бұрын
Ya, the concepts of the technology is more important than the how some language/framework deal with them. It will lay a stronger foundation and allow user to have easier transition to other language/framework.
@evancourtney7746
@evancourtney7746 Ай бұрын
I learned C at a New Jersey community college, taught by an old gray-beard retired from Bell Labs; was the best math class I've ever had! These days I'm mostly using Python and Javascript, but when it's easier to just write a plugin for SQLite, I dust off my old C chops and delve into malloc() and void (*)() and all my old friends. C is portable assembly; it will teach you how computers work and that knowledge is foundational to any competent programmer.
@WillsJazzLoft
@WillsJazzLoft Ай бұрын
Fabless manufacturing and electronic design automation are two growth areas where the talents of someone skilled in C are essential. One could be picked up by companies such as Intel, Apple, NVIDIA, Google, AMD, Microsoft
@danielAgorander
@danielAgorander 8 ай бұрын
As a "Rust Enthusiast": C is the best thing that ever happened to me. I came in the weird way with no formal training (I studied Journalism, then ended up building Sawmills, later ended up with Video Game QA, and am now doing Test Engineering at some rando website people use). Through that last, the TE, I have grown to like certain ideas in Rust, certain approaches, so I wanted to learn it. But it's hard. It's got a lot of stuff that can be difficult to pick up. And nothing has been as good at teaching me that, as taking a step back, using C (often with the help of a certain Sorber's videos), to achieve the same thing. Eventually I figure out that there's a thing I had misunderstood about how things REALLY work under the hood, that other languages I use (Shell, JavaScript, or the Rust I was learning) was sort of hiding from me. After that, I can drop C (until next issue), go back to Rust, and the latter is suddenly WAY easier. Because I spent some time with C. Or, as we call it: "Vitamin C". :)
@nerdycode
@nerdycode 8 ай бұрын
Would you say to someone learning Rust to first learn C? Asking for a friend 😅
@alonsob4069
@alonsob4069 8 ай бұрын
Hey Jacob, do you know a book/course to learn about OS (linux) with C? I have already 2 years of experience with javascript, typescript and python as web dev
@TheCocoaDaddy
@TheCocoaDaddy 7 ай бұрын
Long live C! :) Great video, thanks for posting!
@frankreich5018
@frankreich5018 6 ай бұрын
Little too long introduction, but you mentioned valid points for pro and con -> thumbs up.
@SolathPrime
@SolathPrime 8 ай бұрын
C is divine anything else is heresy
@godnyx117
@godnyx117 8 ай бұрын
Even when I finish the development of Nemesis and release it, I think that the C programming language will still be worth learning as it has some very useful tutorial that help you understand pointers and low level stuff (that will be useful to optimize) that will be very hard to fully modify and translate to Nemesis.
@anon_y_mousse
@anon_y_mousse 8 ай бұрын
Is that the name of your programming language? What is going to set it apart from all the rest?
@godnyx117
@godnyx117 8 ай бұрын
@@anon_y_mousse Yes, Nemesis is the name. Nemesis will ("will" as, It's very early in development) be a language focused in safety, reliability and re-usability! The official implementation of the language will be a compiler that uses LLVM for the backend! Even tho the compiler is not ready yet, you can see the public repository that is hosted on Codeberg (I don't give links because I think KZbin does not allow it) that contains code examples about how it will look under the directory called "code_examples" and there is even documentation that I have written ahead of time using "sphinx-docs". Of course, it also contains the source code but who wants to see that right? Star the project to stay up with the progress ;)
@billkendrick1
@billkendrick1 7 ай бұрын
Every time you mentioned Rust, I kept thinking "but will I be able to cross compile to 6502 with it, like I can with C?" ;) (I've been writing games and apps for the Atari 8-bit conputer in C... after decades of BASIC and an Algol-style language called "Action!".)
@argonwheatbelly637
@argonwheatbelly637 6 ай бұрын
MAC/65 did change the game after using the Assembler Editor cartridge for a long time. Took a massive, but powerful, Atari BASIC program and sped it up considerably. However, I did right a one-pager in BASIC (including more REM than not) that I find people unable to write even today in an efficient manner. It solved the "birthday problem" in about 30 seconds. "Find the number of people required to have a greater than 50% chance of two people having the same birthday. [People are born throughout the year with equal likelihood.]" Yeah, on an 8-bit machine with 4k of RAM. It's a good program for students to try in any language.
@imqqmi
@imqqmi 6 ай бұрын
I think learning assembly (I learned Z80) and C gives you the low level understanding how a system works, how optimizations work and what performs best. C is usually the first high level language on any given new system as a bootstrap language. C is still used in many embedded systems, drivers, kernels, high performance applications etc. The number of languages that can rival c is increasing but can't still beat the maturity of tools for c yet. Imagine the carbon footprint of youtube, ai training, processing of big data using python or even C# and java. It's not only not performant, it's irresponible for our little homeworld!
@DevlogBill
@DevlogBill 2 ай бұрын
I am learning programming for web development with Golang and JavaScript. BUT I would like to eventually later on make games as a hobby with C. My focus with C is to learn memory management and to get better at algorithms and making games with C sounds like it can be fun. On the subject of making games with C when I looked on KZbin most were making games on Window and they all were using Visual Studio as their IDE as well they were using Power Shell. But what if you are on macOS? Can you still make games with C on a different operating system? side note: Visual Studio on mac has been deprecated.
@metaltyphoon
@metaltyphoon 25 күн бұрын
What sucks about C and would solve 80% of the problems: 1) Missing an Array List 2) Missing a hash map 3) Add defer keyword, gotos suck for cleanup code 4) Missing a string type. Every project reinvents one 5) Have a package manager You don’t even have to make threads.h non optional …
@PiotrPilinko
@PiotrPilinko 13 күн бұрын
Package manager is usually a part of dev environment. But standard containers (array/list/map/hashmap/set/hashset) would be very helpful. Handling errors by goto is just crap (and C++ handles it with RAII on much cleaner way).
@jal051
@jal051 6 ай бұрын
I love C. It's supereasy and I feel in control. My only complaint is how painful it can be to setup a project sometimes. Linking libraries can be really annoying, specially when half of the times you need to recompile them. I hate this part of the proccess. I find my self writting things in Python just because I don't want to setup a C project, even when I feel way more comfortable with C.
@milasudril
@milasudril 6 ай бұрын
To be fair, when you program in C or C++, you program what the standard calls an "abstract machine". While it is a good model of a von Neumann computer, it certainly misses some parts of a modern system, like caches, branch predictors and SIMD, though SIMD is on the way to C++. Thus, code that looks fast can be slow depending on memory layout, any potential aliasing etc. Also, on some machines, floating point operations must be emulated in software. If the result becomes a subnormal number, many processors (even on servers and desktops), need software support.
@solaire_of_the_east
@solaire_of_the_east Ай бұрын
I started programming with python like most of the beginners do, though Python has eclectic libraries for almost everything, if someone wants to understand how a computer works under the hood, C is the lang one should look up to. After learning C, a lot of concepts that previously sounded unconvincing to me, started making sense.
@dmytrk
@dmytrk 8 ай бұрын
Definitely yes. While, writing in C#, i decided to make some CLI prog on C and discovered so many concepts, like actually using gdb, or thinking on how to allocate memory for different scenarios, that I can project onto my C# workflow. Also, Vim is the best editor for C/C++😅
@mosaed_b
@mosaed_b 8 ай бұрын
Java runtime is written in C, even javac compiler is initially written in C (yet others claim it is now Java compiled in Java, still it is compiled first by C then bootstraped to Java), majority of big Python libraries that require high computations are written in C, JavaScript V8 engine is written in C and Assembly, etc. but for me I develop in Java, specifically using Spring Framework, because that serves my work purpose, and my self interest..
@crashcode8503
@crashcode8503 7 ай бұрын
Hello
@papasmurf9146
@papasmurf9146 6 ай бұрын
The coding example where only a few lines of Ruby compared to lots of lines for C highlights the value of libraries, not necessarily differences in the language. The C code is great for showing what is really happening versus just library magic. If someone wanted to, they can create a library that would make the C code as simple as the Ruby code. After someone has a firm grasp on C, I would argue they should learn an assembly language. Not that they'll ever program in assembly professionally, but it will help them understand what is going on under the covers much better. My team at work has a mix of developer experiences, all coding in C++. If something goes sideways, one of the guys that learned assembly is more likely to fix the problem them someone who only knows C++. Not that assembly is called for, but an understanding of what is going on under the covers is required.
@jonbezeau3124
@jonbezeau3124 8 ай бұрын
What I like from C is how explicit the language is. There is no name mangling, there are no function or operator overrides. In the final exam from last term, one student answered a question, basically "what does this code do?" with "who knows? Is += overloaded?". I feel the same looking at any language that took hints from C++ About those language features: other languages don't have features C lacks, they have features that were probably *built in C in the first place*. As I love telling my class, serious C doesn't look like C any more. You've been rolling your own libraries for a decade so common tasks are one-liners, there's a framework for handling runtime errors, and your output code or array slicing is concise just like any high level lang... that nobody else understands. In short turn your capability issues into compatibility issues lol
@gigachad8810
@gigachad8810 6 ай бұрын
Whats so explicit about C? I'd rather stick to a real explicit language like Rust, thx
@Soengiac0001
@Soengiac0001 8 ай бұрын
I only code in C
@matyasmarkkovacs8336
@matyasmarkkovacs8336 8 ай бұрын
True gigachad.
@coolbrotherf127
@coolbrotherf127 7 ай бұрын
C is easy to learn because it's not very abstracted, but hard to use because it's not very abstracted. It can do a lot with it's basic tools, but knowing how to do a lot with it takes a lot of time and effort. Every time I sit down to use C, it does feel like building a house with popsicle sticks, slightly better than the toothpicks of assembly, but not as effective as the bricks of C++. It really comes down to what software tools are best for the specific project that the programmer is working on. While I think it is good for many programmers to learn a bit of C to better understand how computers work, I don't think that every programmer needs to master it in order to be a "real programmer". Many jobs focus on completely different languages and skills that don't require any advanced knowledge of C so it's totally viable to not worry about it too much if it's not something you'll need very often. Then as far as Rust (and Zig?) go, the student programmer should probably focus on C first and then learn the newer languages as C is much more established. 99% of systems jobs require C and some assembly knowledge anyway, and universities still tech it, so it's hard to avoid it if the student wants to do that kind of work. It's also pretty easy to pick up newer languages later anyway as they'll only have to learn the features that are different that C instead of all of programming all over again. The newer languages still use many of the foundational concepts in C, just with improvements with the hindsight to see what didn't work as well.
@argonwheatbelly637
@argonwheatbelly637 6 ай бұрын
Summary: Driving a manual transmission is nice, but becoming quaint, as ever more people drive automatics with so many features. That can be a good thing; however, the trade-off is usually needing to return to a dealer for proprietary componentry, even if an aftermarket place is willing to work on the vehicle. But that's not the same as programming or coding for a job. Then it's about business needs, not personal preferences.
@disgruntledtoons
@disgruntledtoons 6 ай бұрын
Yes, it's relevant. When you go into industry, there is a good chance you will code in C++, Java, JavaScript, or C#. The syntax of all four of these is based on C. A new developer who only learned C in college can be brought up to speed in minimal time in any software house that codes in these other languages.
@toby9999
@toby9999 6 ай бұрын
I've learned many different languages over the past 40 years to varying degrees of proficiency. I'm strongest in C and C++ . Recently tried learning java again after a number of false starts, the first being back in the 90s. Not going well at all. I hate it and I hate it's awful ecosystem. And don't get me onto the monstrosity commonly known as "Eclipse" %$#@&%$. Piece of crap. So you're probably correct in general, but some tools and/or languages can simply be a bad fit... I'll never be a productive java developer. That has again become crystal clear.
@purpasmart_4831
@purpasmart_4831 Ай бұрын
C has been my goto language for almost 9 years, Still my favorite, but I'm now learning golang, I think it's good language to pick up if you already know C.
@DevlogBill
@DevlogBill 3 ай бұрын
It's amazing how C gave birth to so many interesting programming languages. Some of my favorites like Kotlin, Golang, JavaScript and PHP and yes Python. My only gripe with C is what can a new programmer build with C? Seems only advanced developers are able to create compilers with this language.
@jaydunna2645
@jaydunna2645 26 күн бұрын
hello, can you advice on what language to begin with? I have no specific goal in terms of what i want to do with the language. I'm only learning for knowledge sake, with the aim of maybe using it for automation and AI/ML in the far future. (I have no interest in doing this for a living) i heard differing things from experienced programmers. "Dont start with Python, it doesn't teach you anything about how computers work" "Start with python, its easy" "Dont learn JS, its trash" "Start with Assembly, then move to C, and then Python". etc, etc... So you see why im conflicted. Any advice and rationale for it would be much appreciated.
@jorgensigvardsson9749
@jorgensigvardsson9749 7 ай бұрын
Great video! I'd just like to add that the age isn't a negative in my opinion. It's tried and proven, and has stood up against the test of time. As for lacking features, that's OK. C was meant to be a better assembler. You typically don't want to surprise developers with hidden cost of features, at least not those who use it as a better/portable assembler. Also, it's quite possible to implement many of the features found in other languages. You just don't get the syntax support for it. You will however get an appreciation for the cost of using those features.
@kowalski2031
@kowalski2031 8 ай бұрын
I tend to avoid using C because I’m a C++ programmer and since both languages are very similar I made the choice to only use C++ to not get confused. But the drawback is that I don’t know C that much. 😅
@_________________404
@_________________404 8 ай бұрын
C++ is mostly backwards compatible with C. You can program in C++ the same way you'd do in C, though it's not seen as a good thing because C++ offers "better" ways of doing the same thing.
@xCwieCHRISx
@xCwieCHRISx 8 ай бұрын
Basically C is C++ without classes, namespaces, templates, references and overloading.
@vitalyl1327
@vitalyl1327 8 ай бұрын
There are things that C++ simply cannot do. There is no MISRA-C equivalent for C++.
@kowalski2031
@kowalski2031 8 ай бұрын
@@vitalyl1327 MISRA C++ exists
@unperrier5998
@unperrier5998 8 ай бұрын
Love C because of the control it provides. True it's verbose, you've got to manage everything, it's unsafe and the language feature set is basic (ah ah you didn't see that coming!) but it's just powerful.
@hypnoz7871
@hypnoz7871 8 ай бұрын
C is NOT unsafe if you know how to manage memory. And static analysis become better and better every year.
@RamsLiff
@RamsLiff 8 ай бұрын
​@@hypnoz7871I think the most "unsafe" part is handling user string inputs, but theres lots of solutions. C is "unsafe" because those who use it dont know how to use
@argonwheatbelly637
@argonwheatbelly637 6 ай бұрын
In the before time. I started in FORTRAN in the mid-70s with punch cards. As for C, I heard about it in the late 70s, and started programming in it in 1980. Still do. It's like driving a manual transmission. I could compile decent programs without having to drop into machine-specific assembly; however, I still wrote in assembler until around 1983 for fast stuff and in BASIC for generic on the then-new home computers. For mainframe work, it was still a lot of COBOL, and I treasured my JCL cards. I did use LISP for a brief spell in the mid-to-late 80s. Today. I've used C++, but it's clunky and heavy enough, that I simply write in Java at that point or drop back into C. That's for compiled or mostly-compiled programs. The rest are scripting languages. Perl, Python, Ruby. Learn C. It works in the snow.
@user-tg2gm1ih9g
@user-tg2gm1ih9g 16 күн бұрын
if execution speed is important, then C is a very good choice. C forces you to think about data structures and algorithms -- which are essential to efficient program execution.
@yevgeniygrechka6431
@yevgeniygrechka6431 8 ай бұрын
The last point is excellent! I think C is the best language to learn programming. After you spend a few weeks executing malloc by all means learning something else, but you'll have a great foundation in understanding how things work under the hood.
@carlh8256
@carlh8256 8 ай бұрын
I'm an embedded software developer that uses C. Of course it's worth it.
@mback3713
@mback3713 7 ай бұрын
OS kernels (even modern kernels) are almost universally (arguably necessarily) written in C. C is basically tuned to work at a low level of abstraction while also being portable to multiple architectures. If an application needs to obsess about every clock cycle and every bit of memory being used by the program while at the same time needing to be portable and readable... then that application (for better or worse) is probably begging to be written in C.
@gigachad8810
@gigachad8810 6 ай бұрын
Yea I'm sure that won't change. I also don't know any OS that has been adopting another language well. I mean why would anyone want to avoid C? Theres absolutely 0 issues with it
@osmanbajraktarevic833
@osmanbajraktarevic833 5 ай бұрын
Simply put, it’s the heart of embedded software engineering. If you don’t understand the importance of embedded systems then you have much more to worry about than if C language is still relevant
@jakobfredriksson2272
@jakobfredriksson2272 8 ай бұрын
I miss pointers when I'm not coding in C. Yes, I really do =)
@gigachad8810
@gigachad8810 6 ай бұрын
You know there are other languages with pointers.
@jakobfredriksson2272
@jakobfredriksson2272 6 ай бұрын
No, I thought C was the only language with pointers (irony). @@gigachad8810
@motivred152
@motivred152 6 ай бұрын
thanks the best Jacob
@rockerdudeb
@rockerdudeb 8 ай бұрын
I'd be interested in seeing you compare Rust and Zig. Both are trying to fill the General Systems Programming space, but Zig is leaner and takes a different approach from Rust as a successor to C.
@hypnoz7871
@hypnoz7871 8 ай бұрын
Rust is a "kitchen sink" language that is good for replacing C++. Rust is NOT a successor of C. It can't be. It's too complicated. A better successor of C is Zig and even then it is FAR from complete and the technical debt of C is likely too big to be overcome in my opinion.
@savclaudiu2133
@savclaudiu2133 8 ай бұрын
@@hypnoz7871 Can you detail what you mean by the technical debt of C?
@oracleoftroy
@oracleoftroy 8 ай бұрын
​@@hypnoz7871That's interesting as it appears to me that many Rust adopters are often C and C+ (that is, C with classes) types that weren't on board with modern good C++ practice. The C++ guys are interested in Rust, but more to borrow the good ideas and bring it into C++ rather than switching over wholesale. Consider the Linux kernel looking to add Rust support even though Linus famously has an irrational rant against the language that pioneered many of Rust's most loved features.
@gloverelaxis
@gloverelaxis 8 ай бұрын
@@savclaudiu2133 I think they're stretching the definition of "technical debt" to mean "the existing real-life programs people currently depend on", which is really describing a very different thing to "technical debt"
@vincebelansky425
@vincebelansky425 6 ай бұрын
C is fast and efficient in both execution time and memory space. Is there a good preprocessor to help us write C code faster and satisfy some of people's complaints about it or simply speed up the process of writing C code? if there is, I would like to be told of it. With these advances in AI, you would think someone has come up with something--or should come up with something. I would even like to contribute to a program like that, providing it's written in C. I came across your Chanel while looking for AI or neural networks written in C. My personal experience was as an AGC (Automatic Gauge Control) engineer starting in the late 1980's when hardware wasn't that fast and we were writing feedback control loops for rolling mills and the managers wanted as much of the strip to be on gauge as possible, so execution speed was paramount.
@timothykeith1367
@timothykeith1367 Ай бұрын
I'd like a C--. It would be C that's better for large projects. It would have encapsulation and simple objects - but essentially minimalist C that is extensible through libraries
@F_Around_and_find_out
@F_Around_and_find_out Күн бұрын
Rust can do a lot of things, and that can make the language more complex (like you can do fullstack web with Rust or something). C doesn't even try, C is simple that way. C don't have any guardrails either so, how can you know you did something catastrophically wrong if the program doesn't even compile? Like you know it's wrong but how wrong??? Rust stops you short. C can show it to you, C will compile, C will run, and things can go downhill from there, and you don't really grow if you haven't been hurted yet.
@turdwarbler
@turdwarbler 4 ай бұрын
yes, enough said. !!!!
@biscuits6576
@biscuits6576 5 ай бұрын
I'm just a student that's getting into programming. I started with Python but now I'm picking up C, and it's more to type but fun nevertheless.
@shanmugasundaram5866
@shanmugasundaram5866 7 ай бұрын
I love learning and working in C
@user-gh4lv2ub2j
@user-gh4lv2ub2j 8 ай бұрын
Yup, still relevant.
@MrMeltdown
@MrMeltdown 7 ай бұрын
Learn some form of assembler…. Then understand that that will be specific to a processor or platform. Then realise that C is a reasonably good portable assembler that hides an awful lot (but not all) of the implementation details.
@jdfesa
@jdfesa 4 ай бұрын
Le tengo cariño a C, fue unos de mis primeros lenguajes de programación. Saludos.
@LunaticEdit
@LunaticEdit 22 күн бұрын
I know over 15 programming languages. I still use C as my primary language. It's simple, powerful, and easy to understand.
@suheelhussain4975
@suheelhussain4975 8 ай бұрын
I am still confused about Rust and Go? What are the problems they are trying to solve. I have worked with embedded system for 20 years, and cannot visualize how Rust will replace C in embedded systems. Any suggestions?
@gigachad8810
@gigachad8810 6 ай бұрын
Ever had... a segfault? a use after free? a double free? UB because you: accessed an array with an invalid index? forgot to initialise something? wrote a value that was being read by another thread? Invalid behaviour: because you didn't support utf8? because something was implicitly casted? Ever used `int` and expected it to hold more than 2 bytes? Did it work for you? If so, you are lucky.
@Burnr-hw6zs
@Burnr-hw6zs 8 ай бұрын
My main concern is actually none of the three: It is memory safety. I think there is also a distinction to be made whether it is worth learning C vs writing C. As many important API of libraries and operating systems are C, one should definitely learn C, but since almost everything interfaces with C it is not required to write your projects in C. I agree that learning C is worthwhile to learn low level programming, learning how memory works, and that is so great about it. On not being able to articulate in which areas C is old: Null terminated strings, Header Files (I think the whole compiler/linker split is not that great but most languages use it), Poor macro system, No standard fat pointers, Unsafe APIs in the standard library (format string vulnerabilities, strncpy not null terminating, etc., ischar UB), weird global state like errno and locale. I think even though C has problems, they are known and you can learn to work around most of them by writing your own helpers, enabling appropriate warnings, etc.. I think C will stay with us for a long time. There is simply no other language that has a stable ABI, allows you to handle allocation failure, does not abstract you too much from the machine (yes, this can be a good thing!), makes interfacing with hardware easy, has a lightweight runtime and stellar performance. I think C is a good starting point for systems programming, but I see Zig and Rust gaining popularity. These languages have learned from the mistakes of C, but I think it is unlikely for them to fully replace C. Besides, they have issues of their own.
@anon_y_mousse
@anon_y_mousse 8 ай бұрын
Weird, because as long as I'm writing the code myself I have no concerns for memory safety. But if it's really all that concerning to you, it'll be a false assurance from any other language if you have to depend on others' code, and I doubt that you don't if you're complaining about these things with C. For instance, null terminated strings are only the de facto standard with C when using the C standard library, but need not be for your own code. And if you use strncpy wrong then that's on you considering that you know its quirks. Format string vulnerabilities are only a problem if you're not checking user input, which is a really bad idea. Also, other languages can handle allocation failure, even C++ can and that's even if you're writing idiomatic C++.
@Burnr-hw6zs
@Burnr-hw6zs 8 ай бұрын
@@anon_y_mousse Well my problem is that C does not protect programmers. Details like pointer provenance, strict aliasing, unsigned integer wraparound (what if i want to trap?), shifting signed integers, realloc with size 0 in C23, all these things are to look out for when writing C. But these are only the things I know. So what about the things I do not know about, will my application be secure and continue to be secure? (I am being hypocritical since none of my applications I wrote are security relevant) Even a typo in a call to malloc can get you hacked. Obviously you can stick to your own guidelines and use tools, but keeping track of C's shenanigans makes the C language more complex than it could be. You see, applications like sudo and operating systems written in C have many security vulnerabilities, which are only found after years. Maybe the next operating system (components) should not be written in C. With Rust you write a secure abstraction of a system API and you do not need to worry about most of this (Though I agree with you that providing a safe abstraction is hard, so if it is not done well it'll be false assurance). With regard to your last part I was talking more about the sum of all the features, you know Swift has a stable API too, Zig also handles allocation failure, Assembly does not abstract too much from the machine and Fortran also has stellar performance. (I also meant it as a hyperbole, there are C like languages but none of them are that popular (well if you disregard C++, but C++ has more problems than C).
@anon_y_mousse
@anon_y_mousse 8 ай бұрын
@@Burnr-hw6zs Okay, so you want the language to do everything for you so you don't have to think. Got it. C's quirks are not only known, but written for all to see in the standard. If you have problems with them, then you're doing something weird that's an edge case, but you're probably doing it on purpose because you can easily write conformant C that doesn't hit the weird quirks. Rust doesn't make your code secure, and the abstraction prevents you from fully understanding what your code is doing which is a really bad idea on top of making it ill-suited for systems programming. No one should have to use a stupid keyword to access necessary features to do their job. It's part of why I hate languages like C# and Rust, because they want to hold you back with an "unsafe" keyword, and why I tend to hate modern idiomatic C++ because no one uses "using" and everyone has std:: littered throughout. Of course, that said, I'd still rather use C++ than Rust because its syntax is better. And it's laughable that someone would advocate for a language like Rust and then call C complex.
@Hofer2304
@Hofer2304 8 ай бұрын
I miss a beginner friendly C tutorial with a linter. Which are the most secure C libraries? How secure is diet lib?
@sanderbos4243
@sanderbos4243 8 ай бұрын
Personally I would've understood computers the quickest if I learnt C + NASM at the same time, comparing implementations on them constantly, and after that learnt Zig. The creator of Zig roughly described his language as being C, but with all the cruft removed. Hope you try it out! Rust tends to feel more complex to understand than Zig to me, with the tons of feature it has. Zig reminds me a bit of Lua in its simplicity. :)
@SassyToll
@SassyToll 7 ай бұрын
For games development C is your best friend, it really helps you to create the game you want without the overhead of Java,C# etc. However C is not for Web, WinForms etc development... each language has its strengths
@tommybronze3451
@tommybronze3451 6 ай бұрын
C is like a stick shift, when you’re going sideways in the snow, you appreciate simplicity (no 163737 versions of c++) and third pedal (completely unguarded pointers) !
@afelias
@afelias 6 ай бұрын
I love teaching C to newcomers entirely so I can pull the rug under them when they switch to Python. Learning why you have those high-level abstractions by starting without them is a great way to instill a lot of natural gratitude for "more modern" languages. Though half-jokes aside C will always be relevant as a low-level thing for embedded and stuff. There's really not much to change with C for purposes that C always feels like it's built for.
@toby9999
@toby9999 6 ай бұрын
I don't like Python at all. The stupid indenting concept really grates for starters. Designing a language where whitespace defines code structure is pretty lame.
How to keep Programming from Hurting You.
10:24
Jacob Sorber
Рет қаралды 6 М.
How different are C and C++? Can I still say C/C++?
10:25
Jacob Sorber
Рет қаралды 216 М.
Super sport🤯
00:15
Lexa_Merin
Рет қаралды 15 МЛН
когда одна дома // EVA mash
00:51
EVA mash
Рет қаралды 13 МЛН
НЕОБЫЧНЫЙ ЛЕДЕНЕЦ
00:49
Sveta Sollar
Рет қаралды 8 МЛН
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
55:56
Geheimwaffe beim Clean Coding: Design Patterns!
5:47
Memory Leek
Рет қаралды 139
Why C is so Influential - Computerphile
10:50
Computerphile
Рет қаралды 1,9 МЛН
Why I Like Programming in C.
3:16
Francisco Jinto Fox
Рет қаралды 14 М.
Comparing C to machine language
10:02
Ben Eater
Рет қаралды 5 МЛН
2 Years Of Learning C | Prime Reacts
22:24
ThePrimeTime
Рет қаралды 231 М.
C Programming Language | Brian Kernighan and Lex Fridman
6:18
Lex Fridman
Рет қаралды 163 М.
"C" Programming Language: Brian Kernighan - Computerphile
8:26
Computerphile
Рет қаралды 1,8 МЛН
Super sport🤯
00:15
Lexa_Merin
Рет қаралды 15 МЛН