

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Coding style and practice guidelines for developers, focusing on the use of specific compiler flags, avoiding threads and signals, const and static annotations, and naming conventions. It also emphasizes the importance of version control systems.
Typology: Study notes
1 / 2
This page cannot be seen from the preview
Don't miss anything!


I know. What’s an ivory tower academic doing telling you l33t haxors how to code. It’s lame. I’m sorry. If your code works 100%, I’ll never have to look at it and I won’t care. Chances are, though, that you’ll make the mistakes nearly everyone makes, and this sketch of notes may help. Some are C-specific in expression but are likely applicable to other languages.
packet->source = ntohl(packet->source);
In other words, fill in packet fields that should be in network byte order in network byte order, and read them out when needed. (You may choose to avoid this rule if you’re really smart and intend to decode as you demultiplex protocols.)