Did learning C help you understand mid/ high-level programming languages and why things work as they do under the hood?
C Programming
Other urls found in this thread:
cs.rit.edu
youtube.com
youtube.com
twitter.com
Unironically yes. I don't use C very often but learning it and writing a few projects in it unequivocally made me a better programmer.
This is something Rust programmers will never learn, incidentally, and they will continue to be shit programmers since they rely exclusively on the compiler to tell them they're wrong.
yes. plus it's actually fun solving problems that you never knew existed while programming in a higher level language.
I think pointer arithmetic and all that teach you a lot about algorithmic thinking. But the techniques themselves, I don't think they're really relevant today.
But I still think it's good to understand the power.
How would you implement classes? What are classes and objects even? Objects are just pointers pointing to arrays of pointers. Classes are just a set of functions that remember where the pointers point to.
It's good to know
But you probably don't need to know it.
Like you don't need to know that a microwave works by tuning radiowaves to the resonant frequency of water in order to cook your food.
Yes.
It's what I started with from the beginning.
Messing around in/with Ragnarok online emulated servers.
Since then I went on to learn C++, .NET vb and C#, Java, Lots of Web stuff (ASP.NET, Node.js, Django, php, etc) which is what I'm doing now. Python and perl too, I think I missed a few languages, which are most likely the ones I rarely use anymore like Maya's scripting language, can't even remember what its called.
I also remember picking up Delphi too as one of the Ragnarok servers was written in Delphi. Starting to recall Database stuff too, I can keep going the more I try and remember, but I'll stop here.
Yeah learn C.
C was the language that made me get it, feel very sorry for people who have to learn programming with dynamic typed and oop ect.
All the more complicated structures built into larger languages and their libraries are iluminated when you've already had to work without them/roll your own before
And then you can graduate to cpp if you need to take things up a notch later
If I designed a language for teaching it would pretty much be c without macros and make all type names different sized ints instead of bool char ect
No, learning assembly did.
> Objects are just pointers to arrays of pointers
this is why I wouldn't take advice from Sup Forums
>why things work as they do under the hood
I'm sure someone got that from C but there's more expedient ways of understanding these things. And I don't personally believe there's any point to try to map python to instructions or even mapping it to C code.
It's not the way you should be thinking in higher level languages.
If you feel an actual need use the C ffi.
In that case knowing C is a good idea.
You can of course also learn C because you're interested in low level programming. I'm not saying you're wrong to learn C just that the motivation is weak.
It's possible that learning to program with a reduced set of tools (as you often do in C) is useful to understand the variety of ways of doing things.
p.s. don't listen to his lies
yes. and if you are interested in osdev or writing drivers, then you must know C (and a bit of asm). C also teaches you to write precise and (more)correct code ( C wont stop you from doing/trying to do stupid things ).
second that.
everybody I know including myself stared with java/python.
That comes with so many conventions and high level abstractions that you just accept. Like an integer has 4 bytes, you always work with classes and objects, you cannot inherit from 2 classes, heap or stack allocation not my problem, garbage collection, etc.
To see that all go out the fucking window and solve yourself was refreshing. Had to write a small OS on an atmega644 with process scheduler, mem alloc/dealloc, keyboard driver, heap&stack management, garbage collection, i/o interrupts, etc.
there is tons of undefined behavior in C and learning why it is UB gave me a lot, also illustrates how much overhead other languages have to put into its' workarounds
Shit me 2. Which University?
what lies, you are fake news if you call me a liar.
It was my first language (other than VB in highschool), so dunno it's what I use as a standard which I use to compare other languages with.
Best thing about knowing C is getting jobs in non-web stuff and not startups. That said, I guess people don't get too excited about controllers and embedded shit, it looks cooler to do python scripts in your local cafe.
>reddit spacing
>literally no understanding of what an objects or classes fundamentally are in an OO language
first of all you don't need to implement that shit
second of all you're an idiot. go back.
What kind of faggot are you? I learned programming in C and Assembly. This is how you should start. This is the only way you understand what vodoo is going on in high level interpreted shit.
Tips on projects?
Fucking pleb, real programmers study physics and build their "code" atom for atom.
if C had an encapsulation mechanism would be the perfect programming language, once you learn it correctly you never forgget how to do things, other languages are bloated.
check out gobject, I wrote a file manager in C as my capstone project in uni. did it using almost entirely cstandard for the sake of the mental gymnastics, but I pulled it out of the shit pile and I've been rewriting a lot of it using it. Its cool, links right into whatever you're working with and provides nice OOP fuctionality
Of course it did.
>gobject
I know gobject bro, but I mean it would be cool if they add some syntactic sugar to avoid so much stuff like
pointer = object_init(args ...)
object_class_member(i nstance , args);
I like more the small talk approach
objectInstance (dereference operator) ( args) ..
That way you can use design patterns
the person who wrote that book had so much free time .
So... I think that I will learn C.
What is the best book?... I am new in programming.
Don't fall for the c meme. Just because all the fags on Sup Forums love c doesn't mean it's a good language to start.
>c doesn't mean it's a good language to start.
Actually its the only language for easily understand data structures and memory models.
>to do stupid things
Such as?
>undefined behavior
>C also teaches you to write precise and (more)correct code (
that is not true, C is extremelly permissive its very easy to write bad and insecure code.
chill; we're not on that thread yet.
C Programming a Modern Approach, 2nd Ed.
Assembly is like chess, normies find it intellectual and hard but once you learn what it is you find Is simple, easy, boring, repetitive and you can't represent complex strategy in there.
You can write efficient code in C, but it's not low level programming.
What every C programmer does - calling memcpy with random arguments.
>syntactic sugar
>C
Choose one.
Yeah, i'm not saying you should write in assembly, that's stupid, but playing with it is what made all the low-level details click for me.
Pointers to arrays of pointers are pointers to vtable. Classes are not just a vtable pointer unless it has no member variables.
When I really feel like learning low level was when I learn VHDL and designed a simple 4 bits µc .
That's his point, retard, it's more permissive so you can't write whatever and expect it to work. Java and C# are like a race for special needs kids even somebody without both legs is meant to finish. C is straping yourself with claymores everywhere except the feet. Now you have to run well because one trip and its gone.
Making a simple processor in logisim was fun too. I started writing one in verilog, but i was too brainlet for pipelines.
And i'm writing a compiler now, so that helps me deepen the understanding as well.
>so you can't write whatever and expect it to work.
oh no, thats the problem, sometimes code shouldn't work works and fails in the less expected moment. Modern and large C programs are not even write from scratch, thats the existence reason for many frameworks that lets you use fancy stuff like garbage collection in C.
C is not a low level programming language retards
It is not stupid, it is stupid to write a site or an accounting software in it. What? Are you going to program a CPU on Java? No, you'll probably use Assembly because it is what makes sense.
>If I designed a language for teaching it would pretty much be c without macros and make all type names different sized ints instead of bool char ect
#include
You're right.
>and you can't represent complex strategy in there.
Anybody doing anything serious in assembly was using a shitload of macros anyway. At that point, when does it start being a new language? C++ was just a C preprocessor at first.
Learning C will help you understand C
bet you thought this was really clever when you were typing it
something like that
that's even a freestanding header that can be used in C89 compilers if you needed to`
Yes. It's good to be able to at least understand how your program goes from words in a text file to instructions a computer can understand. It's good to know that no computer knows what
print("Hello, World!")
means and that Python is doing a lot of work in the background to get the output you want.
yes because
```
#include
int main() {
printf("Hello, World!\n");
return 0;
}
```
is eye-opening.
that's complete bullshit desu
learn asm or gtfo
This is what I'll keep telling people, obviously writing programs with higher level languages is much more productive but learning about what is going on at the lowest level, the CPU internals, how instructions are placed into memory locations and obviously what makes code insecure. Can teach a young coder how to be a really good coder, it isn't all that hard at all and its really quite interesting.
absolutely this. Even taught myself the ins and outs of 8086/286 architecture in case I needed to write some bare-metal piece where I have none of the 386 amenities.......
t. still a native dev in $current_year
It is actually. Perhaps it doesn't spoonfeed you but all of the instructions are clear and if you need them explaining you don't belong in the programming world.
The sky is the limit for dumb bullshit in C. Look up an obfuscated C contest.
but it is, especially if you learn how it really is...
youtube.com
youtube.com
There is a nice little series of videos by this guy, if people aren't lazy they will learn how printf is making a system call to print a string to standard out the monitor.
python and objective c only