[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

All elitism aside, is K&R bad? I find it somewhat tedious.

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 70
Thread images: 4

File: 1472872337221.png (87KB, 1200x1686px) Image search: [Google]
1472872337221.png
87KB, 1200x1686px
All elitism aside, is K&R bad?
I find it somewhat tedious.
>>
There are better alternatives for learning.
K&R is a good reference, but a bad tutorial.
>>
>>61520321
I think it is a good tutorial, but requires some fundamental understanding of programming concepts imo.
If one has aboslutely no clue, then there are definitley better books
>>
Read the GNU C reference manual instead.
>>
>>61519953
Maybe, but all other tutorials are bad as well, for example >>61520369 .
The sheer lack of good C tutorials is astounding.
>I find it somewhat tedious.
Welcome to C.
>>
>>61520321
fpbp
>>
>>61519953
there are better alternatives if it's your first programming language.
>>
>>61520456
this
Also, nice sequence.
>>61520369
>>61520321
>>
>>61520456
Such as what
>>
>>61520496
LUA
U
A
>>
>>61520516
No I meant better alternatives to k&r for learning C
>>
>>61520496
Not that guy, but:
Quorum (scientifically designed as first programming language)
Logo
a subset of kotlin
Pascal (that said, finding/setting up a simple enough dialect might be hard)
Lua could have been, but first programming language implies teaching it to underages and the relevant ecosystem comes from Löve, so sooner or later they will come across inappropriate library names like AnAL, boipushy, binser, Popo etc.
>>
Am I retarded, or are K&R's exercises pretty difficult for beginners?
Programming a syntax error checker after having only covered the very basics of C is hard. I'm trying to spend time on these exercises after having read a chapter, but I often get stuck for a long time and it's not very productive. Any tips?
>>
>>61520496
start with a tutorial, reinforce with the book as necessary.

this i suggest: https://www.eskimo.com/~scs/cclass/notes/top.html

don't make finishing the book your goal, don't wait for it to start coding. the more time you spend coding the better.
>>
>>61520709
I get stuck pretty hard on them too, I can fly through web development languages though but those are notably easier.
>>
>>61520516
>all standard libraries index arrays from 1
>>
>>61520728
What's wrong with that?
>>
K&R is pretty good, you just have a short attention span.
>>
>>61520723
So, meticulously following K&R's chapters and not moving on until I've finished all their boring exercises isn't a good strategy?
I thought K&R taught good habits which is why I picked it up in the first place.
>>
>>61520321
>>61520369
>>61520392
>>61520516
>>61520569
>>61520792
OP, as you can see here you are getting lots of different opinions, and if you try and listen to all of them you will go insane. If you really want to learn programming trust your gut feeling, maybe you don't even need to change anything from what you're doing already.
>>
>>61520802
it's quite good if you have enough discipline to finish it.
>I thought K&R taught good habits
not really, it's not the book is about, read practice of programming after you have some experience in C.
>>
>>61520969
What does K&R do better than other books on C?
>>
>>61520348

Even if you know the ropes, K&R is pretty outdated. C Programming A Modern Approach is much better.
>>
>>61521389
nothing
it's just written by le epick unix meme men
>>
>>61521389
you don't be a good programmer by reading book. code as much as you can and read good code.

K&R is a safe choice because it will not impose inferior mindset of pseudo writers that write books for10 programming languages every year.

If you are not experienced, you cannot open a book and understand if it's a C book or a BASIC book with C syntax. So just go with K&R.

Also Kernighan is the greatest tech writer, Ritchie is the creator of the language (imho it's Ken Thompson tho).
>>
"Programming in C" by Kochan is better suited as a book for beginners to programming. Assumes less knowledge, conveys its concepts better, is formulated more clearly and nicer to read. But longer. Nice mix between K&R's brevity and the massive size of "C Programming: A modern approach", which is otherwise really nice as well.

>>61521489
this advice considered harmful by me.
>>
>>61521489
>BASIC book with C syntax
How do you recognize bad writers?
>>
>>61521489
>Also Kernighan is the greatest tech writer,
He couldn't even write a good OS to begin with, why would I trust this statement.
>>
>>61521676
C is a systems programming language. You write compilers, interpreters, VMs, OSes etc in it. Not text based database systems.

If a book has an exercise for parsing and evaluating reverse polish notation it's probably better than the one make you write student management or library programs.
>>
>>61521812
I have another book on C that teaches the language by working on small problems then moving on to SDL and stuff like that. Should I avoid?
>>
File: ken.png (8KB, 324x200px) Image search: [Google]
ken.png
8KB, 324x200px
>>61521724
Being able to code and being able to write book is two completely different things.

this is a reply from dennis ritchie

>The differences between Kernighan Ritchie Thompson are real but very
>subtle. We all look alike (middle aged with scruffy graying beards).
>Note these distinctions:

>-- Kernighan is slimmest, Ritchie middlest, Thompson heaviest in body
>build

>-- Ritchie got contacts a couple of years ago and so is the only
>current non-glasses wearer

>-- Thompson wouldn't touch netnews with a pole, Kernighan secretly gets
>misc.invest and misc.taxes mailed to him, Ritchie reads it more than is
>good for him and occasionally contributes

>-- Ritchie is the only one who has met five people who have appeared on
>David Letterman (Penn, Teller, Rob Pike, Mayor Koch, and the guy who
>raised the biggest hog in Ohio)

>-- Kernighan has written ten times as much readable prose as has
>Ritchie, Ritchie ten times as much as Thompson. It's tempting to say
>that the reverse proportions hold for code, but in fact Kernighan and
>Ritchie are more nearly tied and Thompson wipes us both out.

>-- Dennis

pic related from my own inbox.
>>
Is Handmade Hero alright?
>>
>>61520321
Completely agree. Especially if you're a new programmer, you're not going to understand half of K&R.
>>
>>61522205
>you're not going to understand half of K&R.
Why?
>>
>>61522333
because he is a brainlet. C is small, simple and K&R is good.
>>
K&R is bad. K.N. King's book is waaaaaaaay better for learning C in 2017.
>>
>>61522345
small and simple because it doesn't contain all the undefined behavior and other shit that makes it so unsafe
>>
>>61522345
>Talking from the perspective of someone with any experience
>>
>>61522345
dunning kruger
>>
>all these conflicting opinions
I know this is /g/ but come on.
>>
>>61522601
The only objectively good advice you'll ever get is "to learn how to program, you have to program".
>>
>>61520750
It breaks convention.
>>
K&R was never intended as an introductory to programming text.

It was for seasoned programmers, as an introductory to C text.

K&R is great, for what it is.
>>
>>61523280
What's the best introductory to programming text that uses C?
>>
>>61519953
using a mordern compiler yes, probably
>>
>>61523293
Fuck text, do CS50X
>>
Found this on a previous thread, credit to the Anon that made the post:


Step 1: Read K&R, realize the style of declarations used in it won't be used today but it still is the definitive resource on how to read a declaration/bracket order operations ect.

Step 2: Read these lecture notes, slides/additional resources http://www.cs.cmu.edu/~15122/schedule.shtml

Step 3: Watch these lectures, read the course book (click on 'old lectures') https://www.cs.cmu.edu/~213/schedule.html

Step 4: Read this modern C guide https://matt.sh/howto-c

Final step: Read this and use for reference http://www.cert.org/secure-coding/publications/books/cert-c-secure-coding-standard.cfm?

That's all you need. K&R will teach you what is undefined behavior. 15-122 will teach you to write safe programs and how to analyze existing programs. 15-213 will teach you what C looks like at the assembly level, stack frames, two's complement representation, floating point ect. That 'How to C in 2016' guide will teach you how modern C is written to avoid classic C problems like throwing around char's and ints. The CERT guide is a good desktop book to have around to make sure the shit you are writing cannot under any circumstances lead to undefined behavior. Whatever project you decide to contribute to after doing all this to obtain base competence in modern C programming, they will have a contributor's style guide which you must read like the kernel.org style guide or OpenBSD man style.
>>
>>61523588
Why
>>
>>61523754
Le Harvard class is basically free.
>>
>>61523754
It's a free college course that teaches you CS fundamentals with C. It's a much better foundation for learning than cracking some language tome
>>
>>61524131
Since I'm not a programmer, I should do CS50X rather than read K&R then? I've been putting off watching videos because with a book you can easily go back to something you haven't understood.
Do you know about >>61521962? I've heard it's also a good tutorial for learning C and good habits, though it's probably not the same as a Harvard course.
>>
>>61524223
CS50X would be a better foundation
>>
>>61524223
Absolutely start with CS50X over K&R
>>
>>61524398
How long does it take to finish it by working a few hours per day?
>>
>>61521865
What's the context of this email?
>>
>>61524901
It's a 10(?) week course.
>>
our school book; i feel i needed to google some things but it was alright i guess(i knew some python before taking C)
>>
>>61523588
Does it teach only the basics of C though?
>>
File: serveimage.jpg (22KB, 520x366px) Image search: [Google]
serveimage.jpg
22KB, 520x366px
>>61524901
not that long, there's two lectures every week iirc, every lecture is like an hour or maybe two, then some exercises (which get progressively longer in terms of hours needed I think). At the very most, 5-10 hours per course week. If you want to learn sustainably, you might want to review stuff in a pattern like pic related.
>>
>>61526402
Do you know the fundamentals of C?
>>
>>61527063
Only the basic syntax. I can write shitty word counter programs and whatnot.
>>
>>61527163
Cs50x will take you far beyond what you know.
>>
>>61527431
So, I'll be able to work on true projects afterwards? I'd like to know enough to start working on complex programs or contribute to existing ones.
>>
>>61527617
You'll work on real projects during it
>>
>>61527651
Ok, cool.
>>
>>61525326
Awful book.
Just go with >>61523654 but instead of K&R go with CS50x.
>>
Are there any other good online CS courses aside from CS50?
>>
>>61523259
not the convention that came first
>>
>>61528039
>>61528180
online courses are a huge waste of time. just stick with books. the only value of the traditional lecture format is being able to ask immediate questions, which you can't do here.

if you think you need a school-style format to maintain interest and motivation, then it's already hopeless.
>>
>>61527431
CS50 teaches C, PHP, JS, HTML/CSS and SQL though. Hardly "in depth"
Thread posts: 70
Thread images: 4


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.