r/cprogramming • • 17d ago

Would learning C as my first programming language also be useful for picking up other languages later on? What are your thoughts on this course?

Wanting to learn C as an intro into software engineering. I know it’s low level and I’d like to eventually switch over to high level languages such as JS/TS, Java, and GO.

Does the “The Complete C Programming Bootcamp” course by Byte Garage be a good choice to learn from?

33 Upvotes

54 comments sorted by

View all comments

Show parent comment

1

u/Previous-Box2169 16d ago

You have been extremely helpful and I must thank you for your time and patience. Since we're at it, are there any other "complex" syntaxes in C that I would need to parse first in order to understand it? Anything that comes to mind. I'm thinking the creators of C might have condensed two different things together (like in this case) for efficiency purposes (definitely not for readability!). Also if you don't mind suggest one good source to learn C from, as I'm currently doing most of the job being tutored by AI

2

u/70Shadow07 15d ago

You welcome, I am glad i could help a lost soul navigate this topic hahaha

Truth be told you might be giving creators of C programming language a bit too much credit - the self-reflective declaration syntax is widely considered as one of C's worst sins and I think even creators admitted that it's bad. (Function pointers are bad alone, but you will snap when you see how to define a function that returns a function pointer) There is a reason no other C-style language made since does types this way. (I admit though that I kinda vibe with the atriociously unintuitive C declarations cuz they seem so magical once you finally get them)

I can't think of any syntaxes in C that are more complex than C variable/typedef declarations. Aside from this little thing, most constructs in this language are pretty simple. If I had to direct you to niche syntax things worth knowing maybe, then check out "compound literals", "anonymous structs/unions" and learn what *ptr++ does as its an idiom quite often used by some programmers.

When it comes to footguns and mind-bending shit then you should probably know a bit about, then it would be "strict aliasing" optimization (and what unexpected undefined behaviour it can cause and how to turn it off in compiler flags so you can sleep at night)

Unfortunately there's no 1 god source to learn this language from and a lot of publically available info is very low quality. You need to dig deeper and learn computer fundmanentals a bit too, but its not too bad.

I once wrote a comment about learning resources as a reponse to someone in similar situation as yours so I will let myself just give you the link to it and not repeat myself.

https://www.reddit.com/r/cprogramming/comments/1nyufor/comment/nhxzpmy/?context=3

1

u/Previous-Box2169 15d ago

Hearing someone call C declarations "atrociously unintuitive" is a relief, I thought I was loosing my mind! To be honest it's a shame all the online resources are low quality as one would think that such an old language would have high quality learning sources by now. I'll take a look at the links in your other post and the more obscure syntaxes you talked about. Thanks again and have a nice day (or night)

2

u/70Shadow07 15d ago

Not *all* resources are bad. Some are really really good, it's just hard to separate gold from the weeds. Especially when you are starting out and do not know where to look. By "no 1 god source" I meant that theres no single definitive source, the knowledge is fragmented over various websites, blogposts, conference talks and books.

Either way, good luck on your quest for knowledge.