Beej's Guide to Network Programming is a freely available educational resource that demonstrates strong alignment with the UDHR through its explicit commitment to knowledge access and freedom of expression. The guide champions these principles through its licensing architecture (CC BY-NC-ND with translation exception, public domain code), structural openness to mirroring and translation, and direct encouragement for educational use by teachers. While the technical content itself does not address human rights themes, the framework through which it is shared embodies Articles 19 (freedom of expression and information), 26 (right to education), and related provisions.
Socket programming never clicked for me before I learned about the protocols themselves first. My brain just rejected using an API for something I didn't understand. So if you're like me, I highly recommend reading Comer's "Internetworking with TCP/IP" first, and sitting down to socket programming later.
Back in 2010 I had my first embedded programming job. I needed to do some network programming in C (controlling a PLC over ethernet). My boss at the time told me "just read Beej's guide and you'll be fine". He was right. That system is running 24/7 since then.
Good to see that the guide is still being updated.
I had the most wonderful déjà vu the other day. I needed to do some serious-ish network programming for the first time in 20 years. I googled around a bit for a refresher. What do I find? Beej's guide – the same Beej's guide that was my first introduction to the topic 20 years prior!
It was wonderfully poetic to me that the same document that taught me how to make a wildly dangerous IRC bot in my teenage room for the lulz also re-taught me the stuff I needed to deliver a low-latency ML offloading demo at my serious(-ish) job 20 years later. Gave me a real warm fuzzy feeling :-)
Strangely no mention of High Performance Browser Networking
https://hpbn.co
I also would mention Distributed systems for fun and profit
http://book.mixu.net/distsys/
while being not exactly about network programming, it is likely a next step for anyone who's building apps that is scattered across several backends/services connected by the network
My first job out of university reqiured networking a small Linux device to an FPGA running a UDP stack, with nothing else. I'd never done anything with networking in C before, and this guide just made everything click
One if the best guides/books on programming I've ever read. This taught me the foundations of network programming and the fact it's available for free is incredible. I just took a second and ordered the paperback right now because of how fantastic it is.
Aside from the book being really in-depth and understandable, Beej adds in quite a bit of humor and that is something I love in a good software book.
Production failures due to bugs in both TCP-based servers and clients happen all the time, long time ago I invested a little time to learn basic socket programming in C and the ROI on this has really been spectacular. "Unix Network Programming" by Stevens is a great book on this topic, in particular it carefully discusses all the different ways things can go wrong. Wish there was something more up to date that could be recommended, but I don't know anything of comparable quality, so I think you still have to read it and later work out all the Linux-specific details, more modern APIs like epoll etc.
To anyone writing tutorials or guides, this is the gold standard - at least for me. After many years I still remember writing my first tcp client following this tut. I wish more content would be as focused and concise as this.
I remember particularly enjoying the warm and jovial tone in his guide.
I first read through it some 20 years ago while being a student in an easter-european university, where the tone and style of professors was very "dictatorial", dry, and overly-technical.
Beej's style of exposure was a breath of fresh air, and brought a major realisation for the then young-me, that you can teach complex topics in a friendly manner.
This "Beej" fellow is a legend. This is an example of very clear documentation that scales well with your level. When I was learning C/C++ as a teenager, I found the guides to be very accessible. They were recommended all the time to people asking questions on cprogramming.com forums. As I've referred back to them as a professional I still find them comprehensive and helpful. This is an excellent model and level of quality for other technical writers to aim for.
I had the privilege of working with Beej for a couple years at my last job. He was one of my favorite coworkers I've ever had. Just great to be around and work with. Incredibly sharp, but also humble, easygoing, and eager to just solve problems.
All your kind words are literally bringing tears to my eyes--thank you!
My current plan is to keep writing freely-available guides for as long as I can reach the keyboard. And maybe even longer with what will undoubtedly be awesome futuristic speech recognition--or mind-reading! That's not scary at all!
I'm leaning on bash/zsh scripting one I finish the utterly gigantic C guide I'm on now... hopefully later this year. But I'm always open to suggestion for topics... :)
A couple of decades ago, I spent a few years teaching an introduction to network programming using C on an embedded board running uCLinux for Network Engineering students. While my primary text was Stevens, Beej's guides were an invaluable secondary reference for my students. There were many, many occasions where students who were were having difficulty understanding my explanations could recover using Beej's approachable, application-oriented notes. Eventually, I found myself frequently abandoning my own notes and just lecturing from Beej's work. I miss the days when I still worked
with students that close to the metal, helping them build their own network devices. Thanks for the reminder of a time I still have fond memories of.
I thought I'd add: I know that this is a very normal thing in some sense. Many textbooks remain relevant for decades and decades (I'm a mathematician, we know this perhaps better than most). But still, it's rarely the case for an online document – one about computer technology even more so!
Yes, I used the guide in 2006 I think or it at least looks similar. I had used it to write a little webserver in C to talk between the Flash UI and the internals of the device. Worked well :)
> It was wonderfully poetic to me that the same document that taught me how to make a wildly dangerous IRC bot in my teenage room for the lulz also re-taught me the stuff I needed to deliver a low-latency ML offloading demo at my serious(-ish) job 20 years later. Gave me a real warm fuzzy feeling :-)
My experience with CTCP flooding large channels channels and causing netsplits in my youth provided a perfect base of understanding for when my production servers started flooding status updates to each other and couldn't stay connected.
PS sorry, undernet admins and users. Also, thanks to the admin on #quebec who asked me to flood his channel so he could tune his bot to block flooders.
Your guide single-handedly got me through network programming in C at university. This was back in the early 2000s. Thank you! And I'm so happy to see your guide still getting updated.
Wait... the Lambda School that's constantly on HN for its disgruntled students, questionable success rates, and murky financials? What possessed beej to associate his name with them?
> while being a student in an easter-european university, where the tone and style of professors was very "dictatorial"
I know it's just I typo, but now I have an image stuck in my head of a large rabbit, dressed up like Mussolini, lecturing about computer science.
Beej's guide was so amazingly helpful and welcoming when I found it over a decade ago.
Poorly written guides that try to be friendly or conversational are often worse than dry and terse guides of similar caliber, which really makes me appreciate the good and truly great ones.
Your page was what bring me into "magical" programming as a teen 20 years ago. Being able to communicate with a remote program on a free shell and actually understand how it works was the best feeling.
This indirectly shaped my life in many ways. Thank you!
When was the first edition? I feel like I remember using it in the early 90s ... maybe 1991? The mods have put the dates "1994-2020" in the title, but I feel like I remember it from earlier than that.
Edit:
OK, on 2003/07/06 15:11:16 the wayback machine captured Version 1.5.5 (13-Jan-1999). At the end it says:
For the brief amount of time I was your student at Lambda, you made a huge impression. Beyond this tutorial, you're a gifted teacher and inspirational person. Much respect and love!
I'll read your future-brainwave-transmission tutorials, anytime, even if they run the risk of causing minor insanity!
I feel so nostalgic when I read this Beej's Guide. It's a resource that my computer science professor highly recommended back in the early 2000s. The writing is so clear and concise that it's a pleasure to read (as opposed to some dry and technical materials). It's more useful than some textbook that cost hundreds of dollars. It saved me so much time and sleepless nights to figure out how to complete my network programming assignment.
Let me give you a virtual elbow bump! You really made an impact in my academic and professional career!
Editorial Channel
What the content says
+0.70
Article 19Freedom of Expression
High Advocacy Framing Practice
Editorial
+0.70
SETL
-0.28
The content explicitly advocates for freedom of expression and information through its licensing philosophy. It frames knowledge sharing as a fundamental good ('dying to share the information'), and the author maintains open communication channels for corrections and improvements.
FW Ratio: 57%
Observable Facts
'this guide may be freely translated into any language, provided the translation is accurate'—explicit permission to express and disseminate in any language.
'You are more than welcome to mirror this site, whether publicly or privately'—enables free distribution.
'The C source code... is hereby granted to the public domain'—eliminates restrictions on information sharing.
'I'm generally available to help out with email questions so feel free to write in'—open communication for dialogue and critique.
Inferences
The licensing framework materially enables freedom to share, translate, and disseminate information globally.
Multiple distribution pathways (mirroring, translation, public domain code) amplify the practical realization of information freedom.
Author's openness to feedback and dialogue embodies commitment to two-way communication.
+0.70
Article 26Education
High Advocacy Practice
Editorial
+0.70
SETL
-0.28
The entire guide is framed as an educational resource. It explicitly advocates for educator use: 'Educators are freely encouraged to recommend or supply copies of this guide to their students.' The content describes itself as a 'tutorial' designed to help learners understand complex material.
FW Ratio: 57%
Observable Facts
'Educators are freely encouraged to recommend or supply copies of this guide to their students.'
'This document has been written as a tutorial, not a complete reference.'
'There you will also find example code and translations of the guide into various languages'—supports multilingual education.
Free online access without login, paywall, or membership requirement enables universal educational access.
Inferences
Explicit encouragement for educator use demonstrates strong commitment to right to education.
Free, unrestricted access removes economic and structural barriers to education.
Support for translation enables education across linguistic communities.
+0.50
Article 27Cultural Participation
Medium Framing Practice
Editorial
+0.50
SETL
-0.24
The content celebrates participation in intellectual and cultural life through FOSS. The dedication section frames the guide's creation as rooted in collaborative culture: 'I dedicate this guide to... the entire Free and Open Source Software Community.' The author acknowledges 'literally thousands of you who have written in with suggestions for improvements.'
FW Ratio: 57%
Observable Facts
'And finally a big thank-you to the literally thousands of you who have written in with suggestions for improvements and words of encouragement.'
'I dedicate this guide to... the entire Free and Open Source Software Community.'
Code is released to public domain, enabling creative participation and derivative works.
'If you want to translate the guide into another language, write me at beej@beej.us and I'll link to your translation'—invites active participation.
Inferences
Community contribution acknowledgment and FOSS dedication show alignment with collaborative cultural values.
Public domain release enables cultural participation through modification and derivative works.
Translation invitation empowers cultural adaptation and participation.
+0.40
Article 23Work & Equal Pay
Medium Practice
Editorial
+0.40
SETL
0.00
The content explicitly empowers readers toward work by teaching technical skills. 'This document should give the average competent C programmer the edge s/he needs to get a grip on this networking noise'—framed as career skill development.
FW Ratio: 50%
Observable Facts
'This document should give the average competent C programmer the edge s/he needs to get a grip on this networking noise.'
Tutorial format with working code examples enables practical skill development for employment.
Inferences
Free access to technical education enables self-directed professional development and work readiness.
Practical instruction in in-demand skills supports right to work.
+0.40
Article 29Duties to Community
Medium Practice
Editorial
+0.40
SETL
-0.22
The content demonstrates community responsibility through the choice to release source code publicly and encourage others to build upon it rather than hoard intellectual property.
FW Ratio: 60%
Observable Facts
'The C source code... is hereby granted to the public domain, and is completely free of any license restriction'—prioritizes community benefit.
'You are more than welcome to mirror this site'—enables others to maintain and distribute.
Permission for derivative translations: 'may be freely translated into any language'—enables others to serve their communities.
Inferences
Public domain release fulfills responsibility to share knowledge with community.
Open permission for mirroring and derivatives enables others to serve their local communities.
+0.30
PreamblePreamble
Medium Framing Practice
Editorial
+0.30
SETL
-0.42
The content explicitly frames its licensing philosophy—Creative Commons with translation exception and public domain code—as a commitment to universal knowledge sharing and removal of artificial barriers.
FW Ratio: 60%
Observable Facts
The guide is licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 with explicit exception: 'this guide may be freely translated into any language'.
The C source code is 'hereby granted to the public domain, and is completely free of any license restriction'.
'You are more than welcome to mirror this site, whether publicly or privately.'
Inferences
The licensing architecture prioritizes accessibility and knowledge dissemination despite commercial restrictions.
Public domain dedication of code treats knowledge as shared intellectual commons rather than private property.
+0.30
Article 1Freedom, Equality, Brotherhood
Medium Framing Practice
Editorial
+0.30
SETL
-0.42
The content frames all learners as equals in dignity; no hierarchy or stratification of access based on identity, credentials, or demographic status.
FW Ratio: 60%
Observable Facts
No requirements mentioned for age, identity, credentials, nationality, or demographics to access the guide.
'Educators are freely encouraged to recommend or supply copies of this guide to their students'—treatment is universal.
Translation encouragement explicitly states 'provided the translation is accurate'—no gatekeeping by status or language.
Inferences
The structure enables non-discriminatory access to all potential readers.
Explicit welcome to educators suggests commitment to equal educational opportunity across contexts.
+0.30
Article 17Property
Medium Practice
Editorial
+0.30
SETL
-0.42
The content treats source code as shared intellectual property by releasing it to the public domain, rejecting proprietary ownership models.
FW Ratio: 50%
Observable Facts
'The C source code presented in this document is hereby granted to the public domain, and is completely free of any license restriction.'
Source code examples throughout the document receive this public domain dedication, enabling property-like ownership by all.
Inferences
Public domain dedication treats code as shared communal resource rather than private property.
Removal of all restrictions enables anyone to possess, modify, and distribute the code freely.
+0.10
Article 2Non-Discrimination
Medium Framing
Editorial
+0.10
SETL
-0.45
The content does not explicitly discuss discrimination or protected characteristics, but the framing implicitly treats all programmers as worthy of instruction regardless of background.
FW Ratio: 67%
Observable Facts
Content addresses 'the average competent C programmer' without further specification, suggesting openness to all backgrounds.
No conditions of access are gatekept based on membership, identity, or protected characteristics.
Inferences
The neutral, inclusive framing suggests non-discriminatory intent.
ND
Article 3Life, Liberty, Security
Not engaged with provided content
ND
Article 4No Slavery
Not engaged with provided content
ND
Article 5No Torture
Not engaged with provided content
ND
Article 6Legal Personhood
Not engaged with provided content
ND
Article 7Equality Before Law
Not engaged with provided content
ND
Article 8Right to Remedy
Not engaged with provided content
ND
Article 9No Arbitrary Detention
Not engaged with provided content
ND
Article 10Fair Hearing
Not engaged with provided content
ND
Article 11Presumption of Innocence
Not engaged with provided content
ND
Article 12Privacy
Content teaches socket programming without explicit engagement with privacy considerations, encryption, or secure communication practices.
ND
Article 13Freedom of Movement
Not engaged with provided content
ND
Article 14Asylum
Not engaged with provided content
ND
Article 15Nationality
Not engaged with provided content
ND
Article 16Marriage & Family
Not engaged with provided content
ND
Article 18Freedom of Thought
Not engaged with provided content
ND
Article 20Assembly & Association
Not engaged with provided content
ND
Article 21Political Participation
Not engaged with provided content
ND
Article 22Social Security
Not engaged with provided content
ND
Article 24Rest & Leisure
Not engaged with provided content
ND
Article 25Standard of Living
Not engaged with provided content
ND
Article 28Social & International Order
Not engaged with provided content
ND
Article 30No Destruction of Rights
Not engaged with provided content
Structural Channel
What the site does
+0.80
Article 19Freedom of Expression
High Advocacy Framing Practice
Structural
+0.80
Context Modifier
ND
SETL
-0.28
The site actively enables freedom of expression through multiple structural mechanisms: public translation permitted, open mirroring allowed, source code public domain, content available without censorship or gatekeeping, communication channels open for feedback.
+0.80
Article 26Education
High Advocacy Practice
Structural
+0.80
Context Modifier
ND
SETL
-0.28
The site removes all barriers to educational access: free online, no registration, no paywall, explicitly distributable to students. Encourages translation for multilingual education. Open mirroring enables global educational distribution.
+0.60
PreamblePreamble
Medium Framing Practice
Structural
+0.60
Context Modifier
ND
SETL
-0.42
The domain structure enables free, unrestricted access; mirroring and translation are explicitly permitted and encouraged; no paywall or registration barrier.
+0.60
Article 1Freedom, Equality, Brotherhood
Medium Framing Practice
Structural
+0.60
Context Modifier
ND
SETL
-0.42
The site structure enables equal access regardless of geography, language, identity, or economic status; mirroring and translation remove barriers that would create hierarchical access.
+0.60
Article 17Property
Medium Practice
Structural
+0.60
Context Modifier
ND
SETL
-0.42
The site structure enables unlimited copying, modification, and redistribution of code; no licensing restrictions on reuse or derivative works.
+0.60
Article 27Cultural Participation
Medium Framing Practice
Structural
+0.60
Context Modifier
ND
SETL
-0.24
The site enables cultural participation by accepting translations, improvements, and derivatives. Public domain code enables others to participate in and build upon the intellectual work. Open feedback channels invite community participation.
+0.50
Article 2Non-Discrimination
Medium Framing
Structural
+0.50
Context Modifier
ND
SETL
-0.45
No structural mechanisms for discriminatory access detected; the site applies identical terms to all visitors.
+0.50
Article 29Duties to Community
Medium Practice
Structural
+0.50
Context Modifier
ND
SETL
-0.22
The site structure fulfills community responsibility by enabling distribution and derivative use. Public domain dedication prioritizes communal benefit over individual control. Mirroring permission enables others to disseminate and maintain the resource.
+0.40
Article 23Work & Equal Pay
Medium Practice
Structural
+0.40
Context Modifier
ND
SETL
0.00
The site structure enables work readiness by providing free, skill-building education. No barriers prevent practitioners from learning network programming skills required for professional practice.
ND
Article 3Life, Liberty, Security
No structural elements detected
ND
Article 4No Slavery
No structural elements detected
ND
Article 5No Torture
No structural elements detected
ND
Article 6Legal Personhood
No structural elements detected
ND
Article 7Equality Before Law
No structural elements detected
ND
Article 8Right to Remedy
No structural elements detected
ND
Article 9No Arbitrary Detention
No structural elements detected
ND
Article 10Fair Hearing
No structural elements detected
ND
Article 11Presumption of Innocence
No structural elements detected
ND
Article 12Privacy
No privacy-related structural features evident from provided content
ND
Article 13Freedom of Movement
No structural elements detected
ND
Article 14Asylum
No structural elements detected
ND
Article 15Nationality
No structural elements detected
ND
Article 16Marriage & Family
No structural elements detected
ND
Article 18Freedom of Thought
No structural elements detected
ND
Article 20Assembly & Association
No structural elements detected
ND
Article 21Political Participation
No structural elements detected
ND
Article 22Social Security
No structural elements detected
ND
Article 24Rest & Leisure
No structural elements detected
ND
Article 25Standard of Living
No structural elements detected
ND
Article 28Social & International Order
No structural elements detected
ND
Article 30No Destruction of Rights
No structural elements detected
Supplementary Signals
How this content communicates, beyond directional lean. Learn more
build 08564a6+3seh · deployed 2026-02-28 15:25 UTC · evaluated 2026-02-28 15:14:40 UTC
Support HN HRCB
Each evaluation uses real API credits. HN HRCB runs on donations — no ads, no paywalls.
If you find it useful, please consider helping keep it running.