Bitwise operators in most of the programming languages are common and inherited from the C (e.g.: &, |, ^, >>, …). These operations are critical in the low-level programming (for instance for writing drivers). In the beginning of this post I’ll just briefly pass over them and present some tricks using them. As a programming [...]
Archive for the ‘Software Engineering’ Category
Bitwise Operators and Binary Tricks for System Programming
PHP IPv6 address to Decimal Format Conversion
27 Jun 2011 at 09:15
caglar
Computer Science, Network Engineering, Programming, Software Engineering, Web
Storing IP addresses in database as decimal have several advantages on storing as a string (storing, efficiency, processing… etc). But my goal was to be able to easily query if an IP address is in a block or between a given IP range. The following two functions are often handy for converting a string IPV6 [...]
Traverse Files In the Source Folder for C++ Lint
Google has an awesome C++ coding style guideline and they have done a very good job on creating a very handy C++ lint based on that guideline. I have downloaded it renamed that script to cpplint, chmod to executable and move to /usr/bin to use. (Also changed the shebang to /us/bin/env python, because default shebang [...]
A Few Interesting Articles from LWN
07 Dec 2010 at 10:07
caglar
Engineering, Linux, Programming, Software Engineering, Softwares, system administration, Systems
Neil Brown has written very nice and helpful series of articles about the design patterns used in linux kernel: Linux Kernel Design Patterns Part 1 Linux Kernel Design Patterns Part 2 Linux Kernel Design Patterns Part 3 But recently he has written a great analysis and criticism on the design of UNIX: Ghosts of Unix [...]
Standard C library Functions That You Should Avoid Using Because of Security
OpenSolaris Project has a very good reference about the security considerations for the standard C library functions. But here I compiled a list of the most used ones. Also refer to the ACM’s C library Reference page about the functionalities of these functions. gets: This function can cause buffer overflows, because it is impossible to [...]
Solving CUDA Compiler Version Problem in Linux
19 Sep 2010 at 15:18
caglar
Computer Science, Programming, Software Engineering, system administration
CUDA’s default SDK(version 3) and compiler uses an older version of gcc (gcc-4.3); and if the gcc installed on your computer doesn’t match with CUDA’s version, it will fail installing. But there are ways to bypass this problem without removing your current compiler. To compile a CUDA code with a specific version of a compiler: [...]
A Very Nice Reference for Software Design Patterns
A few days ago I found Sourcemaking’s design patterns reference page. It is a really good reference for fundemental Object Oriented Design Patterns and I recommend it anyone who wants to dive into Design Patterns. Although I usually find Head First series very basic and childish but their design patterns book Head First Design Patterns [...]
A Brief Guide to Socket Programming in C
28 Nov 2009 at 23:39
caglar
Computer Science, Network Engineering, Programming, Software Engineering
This brief guide is prepared for the people who knows C and have some knowledge about computer networks and protocols. This guide is mainly a summary of several resources indicated in the resources part. For the folks who want to get more information related to some fundemental knowledge related to essentials of computer networks. Please [...]

Recent Comments