Readit News logoReadit News
greenyoda · 3 years ago
This was discussed here a month ago: https://news.ycombinator.com/item?id=34946811
dang · 3 years ago
Yup - almost exactly the same case as https://news.ycombinator.com/item?id=35343696 - we put it in the second-chance pool without realizing it was a dupe. Sorry!
daveslash · 3 years ago
For those who might not be familiar with Beej, this is not his first or only guide. They're all excellent. There's a link near the top of the page: "Click here for other Guides"

Also, see previous posts here on HN https://news.ycombinator.com/from?site=beej.us

rhussmann · 3 years ago
Beej's Guide to Network Programming was how I fumbled my way into socket programming AND C. I can't remember if I first encountered it in the late 90's or early 2000's. It's funny to think about that world now. Unless you had a shell account or ran Linux or some sort of Unix you had to _pay_ (or... not pay) to get access to a C compiler.

If you were lucky you'd get access to some FTP servers via IRC that might have some ZIP files full of good text docs, or wander upon some hacking clan's site that had good tutorials or info. But more likely you'd try to cobble it all together from as many sources as you could find.

I'm really glad we're in a time, and for the most part a community, that values sharing information free and wide, and supporting FOSS tools that put all this knowledge within reach.

Gordonjcp · 3 years ago
Somewhere in the depths of a comms room at a Very Very Big Company, there's a very very old laptop running a very very old install of Slackware, which does one job - run a server that Radio-over-IP boxes connect to, so they can have their G.711 streams picked apart, some DSP applied to add or remove certain high frequency tones and generally clean up the audio, and be fired back out into another interface.

That was all made possible by Beej's Guide to Network Programming and the RBJ Biquad Cookbook, mostly.

Just a temporary bodge until the vendor got their shit together. I doubt it'll ever be replaced.

beej71 · 3 years ago
It was some random socket program I found on an FTP server that got me going on writing this whole thing. The sockets API was pretty confusing in terms of the sequence of what to call when and how, but this sample program spelled it out pretty simply. (So thank you, anonymous author!)

Then it was just lucky timing with the web picking up around then and the fact that we had just gotten NCSA Mosaic installed on the computers at school. :)

Edit: Pretty sure the first version of the guide was ~1995.

wing-_-nuts · 3 years ago
>Unless you had a shell account or ran Linux or some sort of Unix you had to _pay_ (or... not pay) to get access to a C compiler.

That was actually how I got my introduction to nix. I was taking a c++ class in highschool, and I was mad that I couldn't compile my homework without paying for borland. Someone pointed me to g++, and I actually got a shell account with the university of colorado (it's wild to me they would give those away for free!). I kept pestering the admins about installing this or that, and they told me 'hey kid, why don't you install linux on your own* machine and then you can install whatever you like.

So I went and installed redhat on an old computer. Free compilers for basically every language in existence, and an entire OS worth of source code, heaven!

The rest as they say, is history.

mistrial9 · 3 years ago
your timeline is a bit off there, but yes
Legion · 3 years ago
My past undergraduate self will always be thankful to Beej for the network socket programming guide.
hot_gril · 3 years ago
That was the first programming guide I ever read.

Dead Comment

qwertyuiop_ · 3 years ago
Are there any modern c tutorials that teach and guide the learner through practical programs. For instance a real world backend service ?
ornornor · 3 years ago
I’ve been learning with beej’s guide and exercism.il for the last few weeks and it’s very effective paired with the (free!) mentoring there and asking random questions on libera.chat as well.
saperyton · 3 years ago
Seconding. This would be great to see.
lubesGordi · 3 years ago
ape4 · 3 years ago
In the time section it has:

    .tm_sec=04,    // seconds after the minute -- [0, 60]
Since a leading zero means octal I wouldn't suggest writing a number this way. Of course, in this case octal 4 == decimal 4.

beej71 · 3 years ago
Good catch... I warn people of this very problem elsewhere in the guide. :)

Lucky I didn't go with nine...

sdsd · 3 years ago
I learned about this when I was a teenager doing the Vortex game from OverTheWire. I ended up learning and falling in love with C and networking in general.
asicsp · 3 years ago
Dupe. Discussed last month, though the link was a bit different: https://news.ycombinator.com/item?id=34946811
carapace · 3 years ago
See also Wikibooks' "C Programming": https://en.wikibooks.org/wiki/C_Programming