views:

185

answers:

7

I have worked/played as a software developer for years and have focused on programming almost exclusively (mostly OO software, design and methodology). I feel quite sure on "higher-level" networking concepts (like HTTP and SSL, for instance) but I've never studied -- at least not deeply -- lower-level networking concepts. Are they relevant to me as a programmer? If so, what should I study?

Any suggestions on books, resources, whatever, would be appreciated. I would appreciate something for programmers, as basic Computer Networking resources might bore me to tears (or should I get over it and start reading?)...

Note: This is a remix of this closed question.

+4  A: 

In this Webby world, you need to know how TCP/IP works as it includes HTTP. Back in the day I read TCP/IP Illustrated, Volume 1: The Protocols. Maybe it's dated. Maybe it's a classic. I certainly found it readable.

At uni (college for you American types) I read an earlier version of Internetworking Protocols and hated it (it's so dry).

The TCP/IP Guide: A Comprehensive, Illustrated Internet Protocols Reference seems to be highly rated on Amazon but I've never read it so can't comment.

Your networking education should include at least basic network programming, which should involve knowing the TCP handshake and how to write a basic TCP client and server.

cletus
How does TCP/IP include HTTP?
Greg Dean
HTTP is one of the TCP family of protocols. Technically an application protocl like FTP see http://www.protocols.com/pbook/tcpip1.htm
cletus
Strictly speaking, HTTP is an application layer protocol that uses TCP for its transport layer.
17 of 26
+ I recommend both books, but for the asker, probably reading only one is really needed.
benc
+1  A: 

Are you sure that link is relevant? Hehe... well...

Why would you argue that the low-level details are not relevant to you as a programmer? What kind of programmer do you want to become is really a more suitable rephrasing. I'm drawing on experience from my last place of work were we had two kinds of programmers. Great ones and good ones. The great programmers knew what was going on and the good ones often failed to recognize that the inner workings of the system did something they didn't expect.

My point is this, a deeper understanding will give you the insight you need when programming on a higher level. You should know this to realize what you sacrifice when you chose to program at a higher level.

There are some exceptions to the above statement but I'm the kind of programmer who wants to do it all and I therefore advocate knowledge is power.

I've spent a lot of time learning the inner workings of TCP, IP and integer-hackery is this what you had in mind or do you wanna go further and talk about the hardware to?

John Leidegren
I somewhat agree with u John, but I imagine that the time u spent learning those skills was also time you spent NOT learning other things. Sure there r freaks out there who can assimilate all this info, but for the young programmer I don't know if low-level networking knowledge is a top priority.
cbp
Knowledge isn't mutually exclusive and what you end up learning in one area might be applicable to others. I landed a sweet job within a gaming company due to my relentless obsession with details. If your time is better spent elsewhere well, I guess you can't have it all but you can sure try.
John Leidegren
I do agree that an obsession with details is important, and I've never met a decent programmer who couldn't diagnose basic systems/networking problems. At the same time, if you are, say, doing XML with SOAP, the TCP/IP details are of little or no consequence, except to get your TCPMON on. No?
Yar
@Joh, yeah, the link is a little nod to how I think question-closing should be handled on SO. I think that EVERYTHING is relevant to programming, it's just a question of remixing a bit :)
Yar
cpb: In today's world, if you want your code to work well, understanding the network is just as important as syntax, data structures, etc. For one thing, TCP/IP is a very mature application environment. In some circles it is fashionable to bash TCP/IP and talk about it's limitations, but for the most part, it is a lot of great stuff that has stood the test of time.
benc
+1  A: 

Whether or not networks is relevant to you is entirely dependent on your job and interests. For most programmers the answer is probably no - learning the low-level intricacies of networks is not particularly relevant to a programmer. It can also be excruciatingly boring unless you happen to be involved in it directly, so I would not recommend losing any sleep over it.

At university we studied this book: Computer Networks by Andrew Tanenbaum which I remember was reasonably enjoyable, and is supposedly a classic, but I imagine it is rapidly becoming outdated.

You should have some experience in basic networking but this is best learned hands on through solving problems. Setting up a home network is a good start, then move on to an office network if you can. Even a Dummy's guide would be fine for this sort of work. Help out with your office tech support if you have the opportunity.

cbp
Nice answer, I quite agree.
Yar
I must respectfully disagree, in the sense that this is an unrealistic recommendation.If you are a programer and you *never* code that interacts with networks, this might be true. This means: no web, no HTML, no shared drives, and nothing that makes a network connection.Recommending a dummy's book or doing tech support has actually HURT programers in my experience, because it gives them a simplistic black box view of how networks work. On several occasions, I had to explain to programmers that they need to attempt a connection to every IP address returned for a DNS name.
benc
It sounds like you have some experience with this, but I really don't think you need a lot of low-level network knowledge to be able to build websites and desktop apps. High-level, of course, yes. Can you give an example of where this type of knowledge comes in handy for the average programmer?
cbp
+1  A: 

I agree with Cleatus, TCP/IP Illustrated is a great book. Understanding TCP and IP/UDP helps you even if your only programming "higher leveL" protocols like HTTP. Interesting topics include:

  • Nagel algorithm
  • Port reuse policy
  • Packet fragmentation
  • IP Multicast
  • ARP (Address Resolution Protocol) and ARP refresh

In general, most network programming toolkits are pretty "leaky abstractions". If things just worked right all the time, you could ignore TCP / IP. But stuff breaks frequently and thats when understanding things like port reuse, subnets, vlans, tcp buffer sizes, DNS propagation, obscure WinSock errors (on windows) helps.

Mo Flanagan
Right... but in the every day way-above-HTTP-on-the-communications-stack world, how does it help you? This is obviously a bit beyond the scope of the question, but it would be nice to know if you don't mind.
Yar
I classify almost all network programming as a Leaky Abstraction, I have updated my answer
Mo Flanagan
Man I knew that "leaky abstraction" thing would come up at some point. Nice!
Yar
It's really the most important reason to understand the lower level, I pretty much never program TCP / IP directly but it just gives you so much more confidence looking at a network capture or IPCONFIG /A
Mo Flanagan
Yar: DNS, cookies, load times on pages.... plenty of stuff. Oh wait AJAX... URL parsing... etc.
benc
+2  A: 

feel quite sure on "higher-level" networking concepts (like HTTP and SSL, for instance)

There are plenty of higher levels of abstraction available (e.g. message-based systems like MSMQ and WebSphere*MQ) to reclassify HTTP/SSL as mid- if not low-level. Which leads to suggesting a different approach.

Work to understand why the "Fallacies of Distributed Computing" are fallacies, and how that should impact architecture and design of distributed systems.

Richard
Nice answer. I'll check out the link...
Yar
A: 

My suggestion related to network programming is make sure you learn/know Pthreads. There seems to be a lot of people coming out of school these days claiming to have studied "networking" but all they've ever done is fork(). I consider threading and sockets to be intimately connected. Maybe you're looking for the more concept type suggestions, like TCP/IP books as mentioned, but that's my two cents. Lots of good pthreads and BSD sockets references on the web, probably better than any book I could suggest.

mbyrne215
It is good to know these concepts exist. I wonder if I'll ever get close to them.
Yar
+1  A: 

I found TCP/IP Clearly Explained to be an excellent overview of TCP/IP and other related network protocols. It's one of those books that you can just sit down and read without having to trudge through academia style wording.

17 of 26