4 ms·
> C can teach you useful things, like how memory is a huge array of bytes, but you can also learn that without writing C programs. People say, C teaches you abo
by braza 3y ago
> C can teach you useful things, like how memory is a huge array of bytes, but you can also learn that without writing C programs. People say, C teaches you about memory allocation. Yes it does, but you can learn what that means as a concept without learning a programming language.
The problem with those takes is that it always come from the people that already know it and had a lot of baggage that distorts it’s view that no one else should learn.
Due to several reasons I always worked with high level languages and last year I started to learn C and C++ and how beautiful was to know exactly how are you allocating resources in your application that I felt quite good programming mentally and intellectually.
When you come from a world of resource overprovisioning (CPU, memory) when you start to get your head about those languages that puts performance first, you feel good about it in the first moment but in the second after you feel that your whole experience was subpar due to lack of a thought process.
- zitterbewegung 3y agoFrom the article they also cite that C has wrappers around it to make the higher level code be faster. So I would also additionally say that you should learn how you can extend your program by learning how your language interact with C / C++
- gumby 3y ago> ...I started to learn ... how beautiful [it] was to know exactly how are you allocating resources in your application... Of course, as the author implies there's an MMU, register renaming, not to mention a whole OS involved, so how "exactly" are we talking about? As Blake wrote, there's "a world in a grain of sand". (Of course I'm excited for you and share your pleasure in understanding memory layout and its implications. Computing is really fun the less abstract it is. And that sheer depth means we can plumb those depths -- or heights -- as far as we like).
- braza 3y agoThanks for the words. Maybe it's about the whole experience that I got in the beginning of career that several experienced folks told me "See, learn Python/Ruby 'cause it has more jobs available and pay more". It was true on my demographic at that time. Along the time I was not exposed to those "low level" languages and it had the effect that I never had that perception. That's why I felt that my experience was subpar: In a point in time, I was living in a complete different epistemic universe even being on the technology.
- gumby 3y agoEverybody starts in a different place and nobody knows everything.
- Gud 3y agoStill, you can gain a lot of knowledge just by learning the introductory texts. In this case, Programming in C. Will it make you an expert C programmer? No. But it will absolutely increase your knowledge on how a modern computer works.
- shrimp_emoji 3y ago> It was true on my demographic at that time. Haha. It's true of webdev now, but I irrationally rejected that advice as hard as I could. Made job search more difficult. But, ever since I learned C, I felt that, if I can't "low level" program, I'd rather not program at all. >:] Inb4 C is a high level programming language. And it paid off: I now work with like-minded nerds and tech I'm passionate about. (As opposed to anything web-related, which gives me some kind of ineffable dysphoria for a multitude of reasons, some scrutable and some not.)
- theamk 3y agoIt is as close to hardware as your userspace program is allowed to get. There is definitely a whole bunch of lower layers, but you cannot really get to them, so I think it's pretty fair to call C "a lowest layer language for userspace after assembly". And probably for kernel programming, too - C gets into implementation-defined behavior when there are MMUs involved, but that's not a big practical problem. (if you work at Intel and have access to secret microcode definitions than C is not a high level language... but cases like this are super rare)
- deleted 3y ago[deleted]
- seba_dos1 3y agoNow do it the other way around - write a complex project using MicroPython while being conscious about memory allocations, because mark-and-sweep GC takes 200ms (6 frames at 30 FPS budget) to go through 8MB of SPI PSRAM. It's a nightmare that makes you cry for C :)