arisuchan    [ tech / cult / art ]   [ λ / Δ ]   [ psy ]   [ ru ]   [ random ]   [ meta ]   [ all ]    info / stickers     temporarily disabledtemporarily disabled

/λ/ - programming

structure and interpretation of computer programs.
Name
Email
Subject
Comment

formatting options

File
Password (For file deletion.)

Help me fix this shit. https://legacy.arisuchan.jp/q/res/2703.html#2703

Kalyx ######


File: 1522929051089.png (80.86 KB, 255x404, LearningC.png)

 No.1056

I am learning C after getting 2 books from some friends. I got "Learn C the hard way" and "K&R 2nd Ed."

I want to try to optimize my learning as fast as possible does Alice recommend any way to speeding up my learning?

 No.1057

What kind of previous experience do you have? Do you know any other languages or is this your first attempt at programming?

Anyway, in my opinion the most important with these books is to actually do most, preferably all, the exercises. If you have someone who knows the language and you trust you could also ask them to check your solutions where you are not satisfied with them or don't understand something. You can also ask here. A good exercise for beginners to do is to trace on paper or in your head what a program does, line-by-line. In schools they usually give you some code and ask you what the output will be, I think most people hate that but it's a pretty good way to understand what the code actually does and that's probably the most important part. You could grab your book, get away from your computer, trace on paper what an example does with some random inputs, then go back to the computer, type the program in and check your answers. If the program disagrees with you you can start debugging your mental model, it helps a lot!

Oh, and of course the fastest way to learn is to enjoy it, so don't push yourself too hard. A quick break often helps a lot more with fixing a problem than a long session of bashing your head against the keyboard.

 No.1058

>>1057
My first language was python and I learned js for a job but I want to learn a statically type language and when I got the books from my friends I thought it would be a good time to try to learn

 No.1059

>>1058
In that case just read the books and do the exercises.

 No.1060

K&R is obsolete, the exercises won't compile with modern tools
The C Premier Plus should serve you better
Dunno about Learning C the Hard Way

 No.1061

I can attest to Learn C the Hard Way as being a good book. It's a nice read; imo all you should need to learn C.

 No.1076

>>1061
Learn C the hard way seems good any book for C++ and networking ?

 No.1079

>>1076
I learned C++ well after learning C and being familiar with programming in general, so I just looked up how to use specific facilities provided in C++ in favor of reading any C++ books. Sadly I have no titles I can recommend.

As for networking, the holy grail is beej's guide to socket programming in C.
>https://beej.us/guide/bgnet/

Use this to learn the basics (and not so basics), implement the things you learned in simple projects like a chat server or something. Make sure to look at open source projects to see how other people organize their socket code.

I'm sure there's a higher level networking library available in C, so if you need to write networking code for a project you might want to search one of those out over rolling your own.

 No.1098

C Programming A modern approach 2e, is a really good book. I happen to buy all my books because I find myself more comfortable and focused when I use something physical, so I don't know if you can find the epub or pdf for it.

 No.1099

>>1098
>so I don't know if you can find the epub or pdf for it.
yeah it's on libgen. it is a goodie.

Learn C the Hard Way will get you barely started and won't take you much further.

My personal recommendation is Modern C by Jens Gustedt available for free from http://icube-icps.unistra.fr/index.php/File:ModernC.pdf as a good second text.

 No.1109


 No.1110

>>1056

First work through K&R 2nd edition. Once you've got the material in it down solidly, track down a copy of C Interfaces and Implementations, by Hanson. It'll be challenging, but you'll learn a lot, quickly.

 No.1111

>>1056
C or Assembly?
i have been thinking of learning x86 assembly before C. What does alice think?

 No.1112

>>1111
One compiles into another, why not learn both at the same time? Compile incredibly simple mains, study what it's compiled to. You'll learn both x86 AND how C compiles to it. Very useful skills to have.

 No.1113

>>1111
If it's your first programming language, I would say C, otherwise assembly. Doing what >>1112 said is fun and you can learn a lot, but if you want to learn assembly you will have to write it too, not just read it.

 No.1114

>>1112
>>1113
Both it is then. Thanks for the advice i really apreciate it

 No.1115

>>1111
Assembly is only useful for certain needs. I think you should learn C, then assembly, in that order, if you learn both. Also, waiting to learn an open-source assembly like RISC-V might help you preserve your freedoms.



[Return] [Go to top] [ Catalog ] [Post a Reply]
Delete Post [ ]