Why You Need to Learn C (as a Javascript Developer)

  Рет қаралды 49,636

Code With Ryan

Code With Ryan

2 жыл бұрын

You can get pretty far by only knowing high-level languages like JS. But if you want to take your coding skills to the next level, you should learn C.
With C, you'll learn about pointers, memory allocation, and how everything is just bytes. You'll gain a better intuition into how to write efficient code. Since many modern programming languages are heavily influenced by C, you'll have no problem picking up new programming languages.
The book that helped me understand C:
amzn.to/3tqEwzG

Пікірлер: 157
@codewithryan
@codewithryan 2 жыл бұрын
Thank you to the folks in the comments for pointing out a mistake I made in the C code. When allocating memory for the C string with malloc, you should actually allocate an additional byte and add a null terminator character '\0' (backslash zero) to end of the char array, adding up to a total of 41 bytes in the example. The null terminator is what allows C functions like strlen() and puts() to know where the end of the char array is- essentially turning it into a valid "C string" instead of just an array of bytes. Under the hood, those functions have no idea where to stop counting the bytes unless it encounters a null terminator, but might by chance give you seemingly valid results like it did for me in the example. Never take for granted all the things a high-level language does for you 😅
@vephovandenberg3181
@vephovandenberg3181 2 жыл бұрын
I think you just need to learn C as a programmer regardless of the language and level of abstraction you are working with. It is one of the must-learn things being a software developer. But anyway straight like from me bro.
@OFfic3R1K
@OFfic3R1K Жыл бұрын
Only one question. What for? So that everyone can appreciate how productive one can be with other languages? Or learn about garbage collection and memory management so that you can thank developers of that you don't have to deal with that on your own?
@jxswxnth
@jxswxnth Жыл бұрын
If you continue like this, this would be the best C programing channel, the explanation tells itself.
@Redyf
@Redyf Жыл бұрын
fax
@NotVeryCleverr
@NotVeryCleverr 8 ай бұрын
So happy to see someone actually show how pointers work instead of explaining it on a power point slide.
@hbobenicio
@hbobenicio 2 жыл бұрын
You got an invalid read with your puts in your C version, right? If you get a file size of 40 and if you want to use it as a string, you've got to allocate 41 bytes to store its data plus the '\0' (NULL) terminator. 40 is actually ok if you interpret is as just bytes. If interpreting as a C string (like puts does as it scans the bytes until a '\0' is found), you gotta put the '\0' at the end of the 40 bytes. You can do that manually by setting it as the last byte after the fread statement or you could just use calloc. You could try to compile your program with -g flag and run valgrind or use -fsanitize=address with clang to analyze it. Anyway, really nice video! keep it up.
@codewithryan
@codewithryan 2 жыл бұрын
Ah yes, I forgot about that part- thanks for catching that!
@ozzyfromspace
@ozzyfromspace 2 жыл бұрын
C is actually the first language I learned. Took me a week to figure out enough with it that I could code a microcontroller. I do web development in reactJS-TS, nodeJS, and GO these days, but this video was a very welcome blast from the past. You rock Ryan!
@powN1
@powN1 Жыл бұрын
I'm learning some C as a javascript developer for some hobby robotics use and this video had more info in 10 minutes than several, hours long C tutorials I've watched already. Great job!
@googa8859
@googa8859 Жыл бұрын
Great content, sir! I appreciate you walking through every elementary step and explaining it in a simple, step-by-step manner. More computer science KZfaqrs should aspire to be as articulate as you!
@mauricioprado6395
@mauricioprado6395 Жыл бұрын
you should allocate fileLenght+1, and make sure that the last byte is NULL. otherwise you will risk that whatever is after your memory block is not a null and you will print out some additional byes/characters.
@jameshansen801
@jameshansen801 Жыл бұрын
So fascinating! I remember way back when I dove into the infamous CS50 course, then when I went back to Javascript things were starting to become clearer. C really did help shape the way I was thinking about programming.
@brontiago
@brontiago Жыл бұрын
More specifically, learning about how memory works in a program is useful, such as knowing when it’s stored in the stack or heap. This will make it much easier to learn any lower level language and how they manage memory, not just C.
@danielmorgan6540
@danielmorgan6540 2 жыл бұрын
You're so right. I went from typing js and f# to c and c++. It was the biggest change of pace ever, but the best step i've made.
@goodeveningtech700
@goodeveningtech700 2 жыл бұрын
I haven't learned C but I've gone back to it over and over again and its great to appreciate higher level languages and everything they do for us.
@Derbb
@Derbb 2 жыл бұрын
I went from self taught fullstacj JS to C cause I switched my major to computer science. Self taught c from a book a weeek before class started, and was absolutely amazed. I have such a better handle of languages and what’s going on under the hood. I thought I was the only one who did this and felt this way
@arielsashcov99
@arielsashcov99 2 жыл бұрын
Been trying to understand pointers for a few good weeks now and finally understood in the second example 😯😯
@alijoyce2169
@alijoyce2169 2 жыл бұрын
Thanks for this. I started with Python and now I mostly use JavaScript, so seeing low level details were cool.
@SoulSukkur
@SoulSukkur 2 жыл бұрын
As someone with reasonable C experience, you just taught me a considerably less stupid way to read arbitrary-length files. I was doing it one character at a time, until I hit EOF.
@soniablanche5672
@soniablanche5672 2 жыл бұрын
That's probably the best way to read a file if the file is really large
@SirusStarTV
@SirusStarTV 2 жыл бұрын
Some streams have seek functionality (files) but others don't have (sockets). You can just ask the OS to position file cursor after the last byte, thus giving you the size of a file.
@moribundtoot8183
@moribundtoot8183 2 жыл бұрын
Just stumbled across your videos and they're fantastic! Subscribed.
@borjinator
@borjinator Жыл бұрын
Excellent video! So glad I found your channel.
@bronekszulc3272
@bronekszulc3272 2 жыл бұрын
Awesome content! I'm looking forward to seeing more vids
@xmosphere
@xmosphere Жыл бұрын
honestly understanding pointers in relation to things like arrays was really when I saw how great c is. Its probably the only time I'll read entire books on one concept in c and its implementations. I'm still pretty new and I haven't really gotten into some of the libraries out there to use.
@Nacalal
@Nacalal 2 жыл бұрын
Great video, it may seem to some like a few excessive steps were taken with the C code, but the way it's presented does make for an excellent example to give to someone who's only worked with higher level langs like JS and it pretty accurately displays the key differences in working with C as opposed to working with JS. One big thing I'd recommend for anyone new to C is get creative, never limit yourself to doing things the standard way, you're about as close to the raw ones and zeros as it gets outside of ASM and that gives you a TON of power, and the only real limit to that power is how crazy you're willing to get with what you write. Best way to see this yourself, try to figure out how to check if an int is even or odd without using division or modulus, the solution will blow your mind and you'll never see variables the same way again.
@Metadaxe
@Metadaxe 2 жыл бұрын
Are bitwise operations allowed? I'd do something like this. . . ~ Solution Spoiler ~ . . printf("x is %s", x&1 ? "odd" : "even");
@Nacalal
@Nacalal 2 жыл бұрын
​@@Metadaxe Bingo, all you need to check to tell is that first bit in the int, and no matter how large it is or what bit width it is, you'll be able to tell right away if it's even or odd just by checking if that first bit is a 1 or a 0, which you can also cast as a bool and return from a function to make it even simpler to use elsewhere.
@rogervezaro
@rogervezaro 2 жыл бұрын
Your explanation is very clear!
@heraldarnold437
@heraldarnold437 Жыл бұрын
Appreciate the effort you go into mastering the craft. Any serious developer should learn C.
@leoMC4384
@leoMC4384 Жыл бұрын
Couldn't agree more. All high level languages developers use these days are based on C. The JS compiler is written in C for f*ck sake.
@XxDarkCinisterxX
@XxDarkCinisterxX Жыл бұрын
This is the second video I watch of yours where I am like damn he made that simple, let me subscribe. I check the subscribe button. Already clicked. Appreciate your videos!
@thedelanyo
@thedelanyo Жыл бұрын
Please you should make a whole c programming video course. This alone explains a lot.
@AbhimanyuAryan
@AbhimanyuAryan 2 жыл бұрын
I would recommend learning C++ instead of C. This will help you actually contribute to NodeJS ecosystem(fix bugs, feature addition etc etc). But I like this way of teaching. Keep it up
@simonfarre4907
@simonfarre4907 2 жыл бұрын
Interfacing with other languages is horrible from c++ though. Writing C++ ffi is essentially writing a c ffi for c++ into js. Compare c++ to Rust in that regard, writing the C ffi Interface feels much, much more like still writing in Rust. But otherwise I would agree.
@Nacalal
@Nacalal 2 жыл бұрын
I think C++ is a great lang to learn in general, but I found picking up C first helped a lot with figuring out C++.
@ex-xg5hh
@ex-xg5hh 2 жыл бұрын
C is a subset of C++ (not entirely, but mostly), so it's not really a choice. If you're a beginner then I'd recommend starting with C, as it has significantly less features and is far more straightforward, and moving to advanced C++ stuff only when you understand the core concepts that C offers.
@raz0229
@raz0229 2 жыл бұрын
I'd recommend x86 assembly (since it's the closest to hardware and because of its simplicity) and most of the functionalities you take for granted in high-level languages, you get to understand them better when actually implementing them on your own with the least instructions
@numbr6
@numbr6 2 жыл бұрын
Totally agree about knowing some C. So many OS/runtime concepts about the actual computer you are writing code for are easily understood when writing C code. No worries about pointer fear, but you must understand them well to program in C. Code review other minor nit: return -1; from main won't cause the exit status to be set properly. For MacOS/Linux and probably most UNIX's will obtain a program exit status of 255. Normally, programs non-success exit codes are 1, and sometimes rarely 2 or 3; 0 is success. You are correct the convention in C for function failure is return -1, and errno contains the reason for the failure. This doesn't work for the exit code from main, as the program exit status is an unsigned byte, and there is no associated errno for a process that has quit. When writing threaded C code, even though the global errno variable has been make "thread safe" by using scary black magic [don't ask how], returning a non-zero positive error, often some valid errno.h constant status is a convention adopted by many ptheads programmers.
@jfftck
@jfftck Жыл бұрын
Rust is another lower level programming language that can help fill in the gaps, as well as C++. Older languages are mostly on par with exposing the internal workings, but their syntax isn’t used in any modern languages, so you may learn a lot and then have to figure out how to apply that knowledge to the most common syntax style of C. After you have fun with C, jump into Assembly to understand the lowered code from the many languages that don’t have a runtime and generate pure system level binaries.
@CodeActice
@CodeActice Жыл бұрын
I just started watching your videos and I really love your explanations.❤
@Ask-786
@Ask-786 9 ай бұрын
The perfect thing i was seeking for. ❤
@nikluz3807
@nikluz3807 Жыл бұрын
Excellent tutorial
@adeebsiddiqui5140
@adeebsiddiqui5140 2 жыл бұрын
Thanks for the help brother 😌
@karynamaganzini9437
@karynamaganzini9437 Жыл бұрын
Cool! Thank youuu!
@ram_bam
@ram_bam 5 ай бұрын
If anyone wants to become comfortable with pointers, learn some assembly and see how assembly code is executed.
@astralchan
@astralchan 2 жыл бұрын
The puts function automatically appends a new line, no need for " "!, just puts("Hello world"); will work ^-^
@Cossaw
@Cossaw 2 жыл бұрын
Thanks Amber ^_^
@BogdanTheGeek
@BogdanTheGeek 2 жыл бұрын
I like that you showed dynamic memory allocation, but you could have also done while(c != EOF)putc(c);fgetc(c, fp);
@nonetrix3066
@nonetrix3066 2 жыл бұрын
Next video: Why you should learn x86 assembly as a Javascript developer Next next video: Why you should learn punch cards as a Javascript developer Next next next video: Why I wrote my own OS in punch cards to write code in punch cards as a Javascript developer and you should too Next next next next video: Why I made my own CPU as a Javascript developer and you should too
@aniket-biswas
@aniket-biswas Жыл бұрын
when you use malloc(), try to type cast it to the data type(char *) you are using as the allocated memory don't have any data type. It might work sometimes but unexpected errors may happen. char *str = (char *)malloc(bytes);
@rallisf1
@rallisf1 Жыл бұрын
My 2cents is: 1) you don't have to reinvent the wheel every time, 2) never optimize before being production ready. Getting your code run faster is always desired but it should be done in the optimization phase, during beta. I am also a JS developer and lately I utilize bash scripts when manipulating large chunks of data instead of having them run in JS. Decoupling works better for me than messing with multi-threading inside JS.
@leoMC4384
@leoMC4384 Жыл бұрын
I started with JS, then Dart, and when I'm done with Java (and Spring Boot), I'm planning on learning C. I think every developer should learn it. 👍
@patrickhart8595
@patrickhart8595 2 жыл бұрын
Good explanation
@FGCVidz
@FGCVidz 2 жыл бұрын
Great tutorial
@gestiongmcg3717
@gestiongmcg3717 Жыл бұрын
Using write and directly print in the fd 1. Add even more funk
@SirusStarTV
@SirusStarTV 2 жыл бұрын
I like the ability to point (map) your struct to any memory address: struct Person { char name[10]; } *p; p = some_memory_address; printf("Name: %s", p->name); p = another_memory_address; printf("Name: %s", p->name);
@KANJICODER
@KANJICODER Жыл бұрын
C and JavaScript are my favorite languages. I write my JavaScript in a stripped down C style so I can develop quickly and re-write in C later.
@petazeta76
@petazeta76 Жыл бұрын
Copying data is allways done when passing parameters to function independent of the data type. For example passing integers copies int size that is 4, and passing pointers copies 8 that is the pointer size. Thanks fo the lesson however.
@Chalisque
@Chalisque Жыл бұрын
A few years back, I had some basic training in joinery. The thing was, at the start, we were taught hand tools only. Until we could chisel out a mortice by hand, and cut accurately with a handsaw, we weren't ready to use machines that do it for us. By spending some time learning how to do things by hand, you can an invaluable understanding of _what is being done for you_ by the machines. It is the same with programming. Going from the bottom up: an assembler does some basic things for you, such as looking up binary opcodes given mnemonics, and calculating addresses of things. Compared to manually working out the contents of memory by hand (like you had to if you had an 8bit machine from the 80s and wanted to make a cheat for a game). Then C, which gives you things like functions and loops and so on, so that you don't have to learn all the different assembly instructions for each CPU architecture you want to write for. So by learning some basic assembly, you gain an appreciation for what C is doing for you, and to some extend, why things in C are as they are. If you then proceed to higher and higher level languages, it always pays to know what's being done for you, so that it speeds up your productivity, rather than becomes a magic wand for which you have to remember umpteen incantations. The trouble with the modern tendency for abstraction and high level languages is that, while they hide complexity, they don't make it go away. And once you can't see that complexity, it's hard to reason about it.
@absentMeow
@absentMeow 9 ай бұрын
So what should I learn first?
@Chalisque
@Chalisque 9 ай бұрын
@@absentMeowIf you're new to programming, start with Python until you're comfortable with flow control (if/else) etc. Learning some C and assembly will give you an appreciation of what is going on behind the scenes when you are using a higher level language. Lisp and Haskell will train your brain, though I wouldn't use them for actual projects. Rust is another one that I've yet to take the time to have a good go at. Learning and doing are two different activities. What helps you learn involves repetition, and learning stuff that exercises your brain, but that doesn't get actual work done (like how lifting weights in the gym or doing squats helps your fitness, but doesn't get any actual work done). Imagine a sport analogy: a footballer may, say, practise boxing to improve their mental sharpness or upper body strength, or a boxer or tennis player may try some dance discipline so as to improve their footwork. It's like that with programming languages. Haskell will drill you in the kind of functional programming that you do when using map, filter, reduce, and so on. C and assembler will make you think about what you're actually asking the CPU to do. (Once you've learned the assembly constructs that C will translate loops and if/elses to, and how variables are actually stored, you can grasp what assembly your C program will turn into when compiled -- which is not the case with C++). If you don't learn how things are done at a low level, then things like map, filter, reduce, classes, and such, work like magic and this limits your understanding of what they're actually doing.
@absentMeow
@absentMeow 9 ай бұрын
@@Chalisque Thank you very much!!!
@bokunochannel84207
@bokunochannel84207 2 жыл бұрын
great content, also in C string is array of chars WITH 0 byte TERMINATOR AT THE END. so, the actual length is filelength+1. you are lucky, it doesn't crash.
@bokunochannel84207
@bokunochannel84207 2 жыл бұрын
and malloc didn't clear the memory, before give pointer to it. so it may contain some leftover data in it. to allocate string, calloc is the way to go.
@UnathiGX
@UnathiGX Жыл бұрын
Now I understand the point of pointers
@tuliomop
@tuliomop 2 жыл бұрын
Can you explain more about C in another video, i really liked the way you explained, by the way I have been a developer for 10+ years now. I would also like to know your point of view between RUST vs C in: difficulty , time to develop something(verbosity and complexity), and results in binary size, execution speed and memory etc. Thanks !
@codewithryan
@codewithryan 2 жыл бұрын
Thanks for the comment, Tulio. I've never used Rust, but my understanding is that it's a newer high-level compiled language that's suitable for modern general software development, like Golang. These languages provide a good level of safety for modern applications. But C doesn't provide any safety. C doesn't have strings, booleans, maps, dynamically sized arrays, or any of the data structures you need for modern development. For these reasons, C is a great language for learning, but not a good option for general software development. It's probably worth learning C++ if you want to build modern production-grade applications with the low-level capabilities of C.
@ericg3065
@ericg3065 2 жыл бұрын
@@codewithryan Very good explanation. I really dig your videos. You have a way of explaining things in a way that even my Grandma can understand. I only wish you had more content. I have a lot of knowledge gaps.
@climatechangedoesntbargain9140
@climatechangedoesntbargain9140 2 жыл бұрын
@@codewithryan nope, it is not worth learning C++ for that. You will never finish learning it and Rust is a good replacement for that. Rust is to C++ like what Matrix is to XMPP
@Speykious
@Speykious 2 жыл бұрын
As a Rust fan, I recommend learning C before learning Rust. It makes it way easier to understand the problems that Rust solves and why it is a good thing. Because otherwise you very likely won't understand why the borrow checker is screaming at you.
@Speykious
@Speykious 2 жыл бұрын
@@codewithryan Golang is higher-level than Rust though. For example, Rust doesn't come with a garbage collector, because the whole point of Rust is to provide memory safety without relying on that, so that you can make very efficient programs while still remaining in control of your memory, but with additional rules and guarantees to avoid the dangerous things that it entails in C and C++. Besides this safety, it also lets you write unsafe code under an unsafe block when you know what you're doing, for example when you know that in your specific case the memory will still be safe despite Rust's rules, or when you're interfacing with a C library.
@calderarox
@calderarox Жыл бұрын
you should do more comparison videos like this.
@Ak4n0
@Ak4n0 2 жыл бұрын
En realidad debe ser: char *text = malloc((fileLength+1)*sizeof(char)); Te faltó alojar el carácter '\0'.
@DevlogBill
@DevlogBill 2 жыл бұрын
Good video, I subscribed and gave 10 thumbs up! Anyways, I’ve been coding now for 4 months originally coding by learning data Science and fairly recently switched to web development because I enjoyed programming more than creating graphs and charts to show projections. Anyways, I started a week ago taking an online free course called harvards CS50 intro to computer science and on week 1 we began learning C. I am loving the language and I would like to know how long did it take for you to learn C? Also, how long would it take to learn to C well before switching to C++? My game plan is to use C as either backend support or maybe try and get into the job market using C for small devices or for OS devices. Only thing I don’t have college only some credits taking engineering science so I am fairly decent with math, but no college degree. What would you recommend someone like me to look into if I am passionate about mastering the C family.? Also I know some Python JavaScript, html, css too if they helps, thanks.
@pedrobotsaris2036
@pedrobotsaris2036 2 жыл бұрын
You could just have stored the string in the stack but I get the didactic purpose of allocating memory. I would char *text = (char*)malloc(fileLength*sizeof(char)) though :)
@ex-xg5hh
@ex-xg5hh 2 жыл бұрын
You can use sizeof with variable names so you don't have to repeat the type name. And there's really no need to cast malloc result. char *text = malloc(sizeof(*text) * fileLength)
@ChrisAthanas
@ChrisAthanas Жыл бұрын
Good explanation but I wonder why dev instructors don't use pictures and diagrams to show these concepts. The words don't tell you much but graphical representations make the concepts very clear. Like when you see a block of memory cells it's obvious what an array is or a pointer to an individual cell and the size of the cells etc
@sky_kryst
@sky_kryst Жыл бұрын
Which resource/ book to use?
@Shulkerkiste
@Shulkerkiste Жыл бұрын
Interesting video :) Fortunately, I'm a JavaScript developer 😅
@lazarok0963
@lazarok0963 2 жыл бұрын
the Java can substitute C on this perspective?
@js_programmer8423
@js_programmer8423 2 жыл бұрын
you create a lot more content, you have a way of teaching ppl in a very simple manner
@muss-raff5477
@muss-raff5477 10 ай бұрын
Bro I finished 3rd Year of college and had no idea how pointers work And this dude did it in 2 minutes 😂😂
@akj7
@akj7 Жыл бұрын
To all those watching this video in the future: C is not JavaScript. Just because you read the stream in one sluck in JavaScript doesn't mean you do the same in C. This is not how this should be done in C. You can already allocate a buffer (Here you can allocate it statically by doing char buffer[1024]; ), you then read the STREAM (don't talk about file when you consider IO operations) into the buffer with fread. Null-terminate the buffer with the result of fread (returns -1 on error and the size of what has been read on success), then print the buffer. Repeat until the stream has been fully consumed.
@ex-xg5hh
@ex-xg5hh 2 жыл бұрын
The whole "JavaScript developer" thing there seems like a person who haven't done anything other than JS. A better title would be "Why you need to learn C as a software engineer".
@srinivasreddysagi8722
@srinivasreddysagi8722 Жыл бұрын
Yaarr 😂😂😂😂
@s1nistr433
@s1nistr433 10 ай бұрын
If you're a JS developer, then learning any other language would beneficial to you.
@yacine101
@yacine101 Жыл бұрын
what a voiice ❤️
@DevlogBill
@DevlogBill 2 жыл бұрын
Hi Ryan, I am back on your channel because I know you're an experienced developer who dives into different technologies. I am still learning JavaScript, HTML and CSS and I am at the stage that I am making things now, basic websites with basic functionality like hover state and creating events using JavaScript and manipulating the DOM. My skills have improved a lot. My question to you is this. I've decided to become a C# developer for web development, this is my 5-year plan. But my main goal is to get a job as a software developer primarily as a web developer or mobile using JavaScript because you can do both. At the moment I am on the Odin Project, the Odin Project is Project based learning. I just wanted to know; how do you learn this stuff without forgetting it? I am afraid that after I complete the Odin project that I will begin to forget JavaScript, HTML and CSS once I am beginning to learn C# then .NET. How do you maintain your knowledge on previous technologies while learning a new one? Because I do want to land a job with the JavaScript tech stack, which is React, Node.js and Vanilla JavaScript, HTML, CSS and MySQL. But at the same time, I want to learn C# because I love the Microsoft ecosystem and because in NYC where I am from there is a good job market in this industry and it seems less competitive in comparison than going the React route. I check the job posting a lot and I noticed for web development there are lots and lots of people applying for React jobs or something related to JavaScript. I also noticed there is a job market for .NET with C#, there are less jobs, but I guess because it's more of a Neish, but I see the opportunity there as well. I am guessing it's because the requirements are higher. Basically, I see everyone running to React, so I figured let me run to .NET, I think my chances are better within this ecosystem. Any wisdom you could give or personal insight I would humbly appreciate, please feel free and be brutally honest and share your thoughts I would be humbled by them, thanks you very much in advance Ryan.
@Victor-Ike
@Victor-Ike 10 ай бұрын
Dang, no one replied to this impressive question for advice? 🥲
@OpenSaned
@OpenSaned 2 жыл бұрын
I’m here before this video blows up
@mehdiboujid8761
@mehdiboujid8761 2 жыл бұрын
That s not how c sees it , that made me subscribe XD i would really like to know what s ur github repo to learn more from u and thx
@mrSargi7
@mrSargi7 2 жыл бұрын
Cool voice dude
@vicyoslinuxofficial2607
@vicyoslinuxofficial2607 Жыл бұрын
Excellent video! Bruh, do you write code lay down on the bed? Can you show us the Laptop support in a video? Thank you. :)
@vukkulvar9769
@vukkulvar9769 Жыл бұрын
I tried learning c++, but the .h files are horrendous. Those files should be handled implicitly now. Unless they are and I couldn't find how to not need to make them.
@DevlogBill
@DevlogBill 2 жыл бұрын
Good video , thanks. Question? I’ve been learning JavaScript for 2 months now. I think I got most of the fundamentals down. What is the benefits in learning C? Also, should I learn C or C++ first? I noticed there are jobs in C++ but I don’t really see anything for C? What is your recommendations for becoming a web or mobile developer
@thebear3692
@thebear3692 2 жыл бұрын
If you intend to get a job try to stick with JS for now and learn data structures with algorithms for interviews prep. Later on, once you have the job C/C++ can be learned if you're still interested.
@DevlogBill
@DevlogBill 2 жыл бұрын
@@thebear3692 thanks for getting back to me. Still learning JavaScript. I think I have an understanding of the fundamentals. So, I am learning modules, arrow functions, and I just started functions called constructors? Sounds like a more complicated version of the beginner friendly version of basic functions and I learned the basics of creating an object. I am beginning to understand now how little I really know and its frustrating but I am still pushing forward. My weakness is CSS for flex-box and grid. Question? from everything I told you so far what did I leave out to progress in my learning path? For example what types of functions do I need to focus on and what types of Objects should I focus on for JavaScript to have a strong grasp on these fundamentals? Thanks once again and I will listen to your advice with the C language, really appreciate your advice.
@DevlogBill
@DevlogBill 2 жыл бұрын
@@thebear3692 thanks buddy, I appreciate your insight and wisdom.
@thebear3692
@thebear3692 2 жыл бұрын
@@DevlogBill the ultimate question is where you want to go in the industry. If it’s front end keep learning JS promises a sync await is hard to learn for beginners and may not be useful if you don’t care about front end. Then once you’ve decided think about how the data will be stored what data structures can you use (Map, Set, Stack, LinkedList etc). I did a nice course on codecademy on introduction to computer science then went on leetcode did around 100 questions and then got a junior job.
@z3rocodes
@z3rocodes 2 жыл бұрын
@@DevlogBill Stick to Javascript and focus on building applications with it. You'll learn all of the necessary skills along the way (functions, objects, classes, etc etc). I suggest starting with a Udemy course and sticking to it. I'd recommend any of the Zero To Mastery academy courses or Brad Traversys courses. You can scoop these courses up when they go on sale for less than $15 and they'll get you to a place where you feel comfortable solving real world problems and eventually that'll lead to you being able to pick up other languages like C.
@clashanime-7312
@clashanime-7312 2 жыл бұрын
next year: Why you should use Neovim instead of VScode (as a JS Dev)
@tinpham6413
@tinpham6413 2 жыл бұрын
I currently using Neovim along with the Linux Terminal. It feel incredible man. (as a JS Dev)
@dayancodes
@dayancodes 4 ай бұрын
That's not how C 'sees' it!! Killer pun!
@Afri_Culture
@Afri_Culture Жыл бұрын
some of these guys really must have sucky lives, good video bro.
@EvanEdrok
@EvanEdrok 2 жыл бұрын
Man didn’t even need to get out bed to make this vid
@bkatsevych
@bkatsevych Жыл бұрын
Watching the video laying with in the exact pose with my macbook on knees and head on a pillow. I cannot help but put a like on this video and subscribe to its author's channel.
@maelstrom254
@maelstrom254 2 жыл бұрын
Why?
@gvm271
@gvm271 Жыл бұрын
C or C++?
@nicolascossio5961
@nicolascossio5961 Жыл бұрын
I'm very thankful that in my CS degree at my university we were taught Assembly as well as C early on. I think it's one of those things that really separates the "self-taught programmer" (which are fine btw, not trying to bash them and don't think less of them) and the engineer or "real" computer scientist. What I mean is that sure you can learn JS or whatever framework and that's very worthy, but at the end of the day technologies like those change very often. I see C as the vehicle to really comprehend and understand what's really happening behind the curtain. This gives you a more thorough grasp of a lot of concepts that you might not think about when using one of those high level languages.
@sidbee604
@sidbee604 Жыл бұрын
How does JS changes often when it has to be supported by all browsers ? You are mixing frameworks with the language. It's just a purist comment and you are bashing JS developers xD
@RyanWaite28
@RyanWaite28 Жыл бұрын
My name is also Ryan, and also a software engineer....
@brunomattesco
@brunomattesco Жыл бұрын
someday i will understand this
@shimadabr
@shimadabr Жыл бұрын
I'm not sure, but i think there is an error in your C code. char *text = malloc(fileLength); Should be: char *text = malloc(fileLength + 1); That is: you allocated memory for the text inside the file, but forgot to allocate memory for the null terminator byte ('\0'). If you don't do that, your program can misbehave while trying to read or write this string. Also, you forgot to check for null pointer when using malloc. Very minor detail, since it's super rare that it can't allocate memory, but a good practice nevertheless.
@erictheawesomest
@erictheawesomest 2 жыл бұрын
C is like breathing manually
@sebastianespinosa1182
@sebastianespinosa1182 Жыл бұрын
el ql acostao en la muralla carepalo
@mesa.
@mesa. 2 жыл бұрын
Just go through the roadmap of software engineer, what developer you ain't be if u gonna be a good developer
@Warpgatez
@Warpgatez Жыл бұрын
There is C. And then there is syntactic sugar.
@snk-js
@snk-js 2 жыл бұрын
I liked too much!
@Atomos_tech
@Atomos_tech Жыл бұрын
Is he using bed disk!? It was my dream disk
@hungryghost5589
@hungryghost5589 Жыл бұрын
My guy is slept on. He be doing C from bed
@yakovd33
@yakovd33 2 жыл бұрын
This is I be coding
@rhyswoolcott
@rhyswoolcott 2 жыл бұрын
my mans legit in bed
@BuyMyBeard
@BuyMyBeard Жыл бұрын
So much for answering the question in the title. This video was a waste of my time
@panz__
@panz__ 2 жыл бұрын
want to go even lower level than this? try building a kernel, this means no use of any kind of external library, you should write everything by your own.
@Nacalal
@Nacalal 2 жыл бұрын
Man, KDev is the real endgame, you literally have to build a bootloader in ASM to load data from disk before you can even think about using C.
@Radgerayden-ist
@Radgerayden-ist 2 жыл бұрын
It's pretty fun and not that difficult to do the very basics if you have the correct learning resources (mostly the os dev wiki)
@urax5341
@urax5341 Жыл бұрын
gigachad ryan on the bed flexing on fake js devs not knowing C 😎
@frenkie_music
@frenkie_music Жыл бұрын
Then again, you still used a lot of high level C functions. To better understand this, read your files into individual fixed sized buffers char by char. This will be more memory efficient when it comes to larger files.
@w42s
@w42s 10 ай бұрын
ok bro ur completely right, but u still overcomplicating things here. u don't need to save it in heap
@ThePapanoob
@ThePapanoob 2 жыл бұрын
This video is the perfect example why you shouldnt write C (as a javadcript developer) :D C is a „simple“ language but that makes it really damn easy to fuck up majorly. It is a much better idea to learn rust, go, dlang or other modern alternatives.
@b213videoz
@b213videoz Жыл бұрын
Why need I? I'm not a JS developer 🤪
@siavashts9231
@siavashts9231 Жыл бұрын
Believe me, The high level languages make you stupid. I learned C first, and then I decided to learn Dart language. When you know C, the high level languages seem so limited to you. You can manipulate every thing in C.
@Victor-Ike
@Victor-Ike 10 ай бұрын
6 lines vs 27 lines to print text to the console. In 2023?? No sir
Advanced Golang: Channels, Context and Interfaces Explained
22:17
Code With Ryan
Рет қаралды 111 М.
Why C is so Influential - Computerphile
10:50
Computerphile
Рет қаралды 1,9 МЛН
Happy 4th of July 😂
00:12
Pink Shirt Girl
Рет қаралды 32 МЛН
МАМА И STANDOFF 2 😳 !FAKE GUN! #shorts
00:34
INNA SERG
Рет қаралды 4,7 МЛН
Nutella bro sis family Challenge 😋
00:31
Mr. Clabik
Рет қаралды 11 МЛН
Was ist im Eis versteckt? 🧊 Coole Winter-Gadgets von Amazon
00:37
SMOL German
Рет қаралды 35 МЛН
Advanced Golang: Generics Explained
13:37
Code With Ryan
Рет қаралды 57 М.
Node.js is a serious thing now… (2023)
8:18
Code With Ryan
Рет қаралды 631 М.
2 Years Of Learning C | Prime Reacts
22:24
ThePrimeTime
Рет қаралды 250 М.
JS At The Speed Of C
27:55
Theo - t3․gg
Рет қаралды 120 М.
you need to stop using print debugging (do THIS instead)
7:07
Low Level Learning
Рет қаралды 414 М.
The Most Legendary Programmers Of All Time
11:49
Aaron Jack
Рет қаралды 532 М.
Rust: When C Code Isn't Enough
8:26
CodeAhead
Рет қаралды 154 М.
Advanced Golang: Limiting Goroutines
7:31
Code With Ryan
Рет қаралды 26 М.
Monolith vs Microservices vs Serverless
23:05
Code With Ryan
Рет қаралды 75 М.
Happy 4th of July 😂
00:12
Pink Shirt Girl
Рет қаралды 32 МЛН