Showing posts with label C. Show all posts
Showing posts with label C. Show all posts

Friday, October 18, 2013

Versioning For Dummies

This post has moved! Click here to view the new home of this post.

If you are writing a library you need to understand version numbers, otherwise you will create hell for everyone who every wants to use it. There is a formal writeup for this approach on semver.org which I recommend you read, but I am going to go into depth about making your software future proof for you and everyone who uses it.

Friday, March 22, 2013

C Comment Fun

This post has moved! Click here to view the new home of this post.

Hello, I was wasting time doing silly things so I thought I would let you in on the fun.

Occasionally, even my programs have a error when I run them for the first time. You can of course whip out the debugger but sometimes it is quicker and easier to add a diagnostic print statement. Now you have solved your problem and remove the statement, but what if you want it again? You could use a fancy logging framework where you can turn on and off debug messages for sections of your code but that is often overkill. That is where the following commenting techniques come in. These work with C style languages provided you have both C (/* */) and C++ (//) style comments at your disposal.