Code Structure
Chaining C Functions Together
C is not generally known to offer function call chaining as is commonly found in many Object Orientated Languages. The following shows a C idiom for doing this.
C is not generally known to offer function call chaining as is commonly found in many Object Orientated Languages. The following shows a C idiom for doing this.
Unit testing C code generally has some significant challenges when compared to some other languages. The main difficulty is that it can be quite difficult to test the outcome of a function call and how it has interacted with other modules and functions. This is because the state of the module Read more…
I don’t rate myself as much of an expert in IDEs, refactoring, history of programming, or in my ability to observe trends, but I still find these topics fascinating and I have had a bit of experience evaluating different products (mainly relating to C development) and will make an attempt at presenting my viewpoint. Read more…
Introduction When writing multi-file C application, or inheriting a project others have worked on, it is always helpful to understand how the code is structured from a file level. Ideally, you want to try to keep module dependencies running in a single direction, limiting reverse dependencies. Keeping the code structure in check can Read more…
Introduction Writing bug-free code is something we all strive for, but its almost impossible to meet this lofty goal with nontrivial programs. There are many different tools and techniques that can help to get us a lot closer to this goal [and more quickly] – one should use a combination Read more…