Beej's Guide to C Programming (2007)
11–20 of 81 posts
Re: Beej's Guide to C Programming (2007)
#12I like the style. It's somewhat reminiscent of _why's Poignant Guide to Ruby. (I wouldn't be surprised if the inspiration were actually in the reverse direction.)
BeeJ has been around for longer than why
Re: Beej's Guide to C Programming (2007)
#13Beej's Guide to Network programming ( http://beej.us/guide/bgnet/ ) is also pretty good. It was effectively used as the textbook in my networking class. (There was also an actual textbook, but almost nobody bothered to read it.)
It's definitely worth reading, but be aware that it's quite old-fashioned in that it focuses entirely on blocking I/O and select(). Also this page fails to explain why you would call shutdown(): http://beej.us/guide/bgnet/output/html/multipage/shutdownman...
Re: Beej's Guide to C Programming (2007)
#14Prior discussion: http://news.ycombinator.com/item?id=5241220
Re: Beej's Guide to C Programming (2007)
#15Re: Beej's Guide to C Programming (2007)
#16Beej's Guide to Network programming ( http://beej.us/guide/bgnet/ ) is also pretty good. It was effectively used as the textbook in my networking class. (There was also an actual textbook, but almost nobody bothered to read it.)
Used it to implement ICMP echo heh.
Re: Beej's Guide to C Programming (2007)
#17Beej's Guide to Network programming ( http://beej.us/guide/bgnet/ ) is also pretty good. It was effectively used as the textbook in my networking class. (There was also an actual textbook, but almost nobody bothered to read it.)
Jens Gustedt has also written a rather nice ebook on how to program in modern C: https://gustedt.wordpress.com/2016/11/25/modern-c-is-now-fea...
Re: Beej's Guide to C Programming (2007)
#18BeeJ's guides don't get as much visibility as they deserve.
Re: Beej's Guide to C Programming (2007)
#19Re: Beej's Guide to C Programming (2007)
#20A pet peeve is that it consistently says "sizeof()", like this:
You can use the sizeof() operator to determine how many bytes of memory a certain type uses. (I know, sizeof() looks more like a function than an operator, but there we are.)
BUT: sizeof does not in fact need the parentheses always!
Syntactically they are part of the argument, and only needed when the argument is a type name, i.e. the argument looks like a cast to that type.
So:
int x;
printf("%zu == %zu\n", sizeof x, sizeof (int));
It's very annoying to see the guide kind of glance off the way things really are, into confusion.Very glad to see it doesn't cast the return value of malloc(), too. :)