Adding Static Analysis to Your C++ GitHub Repository

Static analysis can be extremely useful for monitoring the quality of your code base. These tools analyze your source code and check for certain kinds of mistakes that can be detected purely based on how the code is written. In this post, I’ll show you how you can add two free static analysis tools to a free continuous integration build for your C++ github repository.

Read the rest of this entry »

Utah Fall Code Camp 2011

The Utah Fall Code Camp 2011 is coming up and I’ve proposed a number of talks and volunteered to present some that didn’t yet have speakers. If any of these sessions sound interesting to you, please visit the Utah Code Camp web site and vote for them.

  • Open Source Development Track: Recursive Descent Parsers with Boost.Spirit
  • Microsoft Development Track: Powering Managed Applications with the GPU and SlimDX
  • Architecture Track: High Performance C++, or How to Make Friends With the Cache

The following talks already existed but had no speaker yet, so I volunteered to give them:

  • Mobile Development Track: Push Notifications and Tiles for Windows Phone
  • Mobile Development Track: Game Development for the Windows Phone 7.5

Read the rest of this entry »

Max Iter’s Fractal Follies

Roger Alexander has been posting a series of fractint parameter sets on the fractint user’s list and to his blog “Max Iter’s Fractal Follies”. Similar to the images and RSS feed I created for Jim Muth’s Fractal of the Day series, I have created a feed of 1600×1200 high-resolution 3x antialiased images generated from the parameter sets. You can browse the images and subscribe to the RSS feed to enjoy Roger’s work. Thanks Roger!

Jim Muth’s Fractal of the Day RSS Feed Enhanced

I’ve enhanced the Fractal of the Day RSS feed to include Jim Muth’s musings and a thumbnail of the rendered image in the description. The musings and thumbnails were always included in the browsable parsets, but having them included in the feed is also desirable, particularly since I am scraping through the ten year backlog of parsets and creating images in a non-predictable order.

UltraFractal Parameters RSS Feed

UltraFractalThe UltraFractal mailing list often has parameter sets posted to it. However, due to the vagaries of internet email, there was often a variety of editing or careful copy/pasting you had to do in order to get the parameter set in a format that UltraFractal liked. I created a script that processes selected mail messages to extract out the UPR file in a form that UltraFractal likes. Its much more reliable than what I was doing by hand. The results of the script can be seen at the UltraFractal Parameters RSS feed.

Update: The public feed has been turned off. See the comments below.

Iterated Dynamics Moved From SourceForge To CodePlex

No SourceForgeOver the past few years, I’ve become increasingly disappointed with SourceForge for my open source projects. It used to be the first place I would suggest for hosting open source projects; now I would never recommend it. As a result, I’ve moved Iterated Dynamics to CodePlex.

Read the rest of this entry »

Big Fractals RSS Feed Created

2013_01_08-Candy_Drop_TreeJim Muth has been posting a “fractal of the day” FRACTINT parameter set for a number of years now. Its always nice to have a steady stream of fresh fractal images to browse and I really appreciate Jim’s effort in posting the parameter sets. However, its not always convenient for me to run FRACTINT (it is still a DOS program, after all) and render the image. So, a while back I started running a cron job on XMission’s shell that ran the X11 port of FRACTINT to render out the images. I render them at 4800×3600 to achieve 3x antialiasing for a target size of 1600×1200. This really gives a nice image, even though FRACTINT is still limited to the idea that coloring a pixel means creating an 8-bit index into a 256 entry color lookup table. The results are published on my XMission account and updated about once a day, depending on the computation time.

Recently I discovered a bug in xfractint that caused it to choke on any parameter set whose name contained a dash (-). I’ve worked around the problem and started handling the older parameter sets that previously failed in my nightly cron job. However, it was now getting hard to identify which images were newly added because they weren’t the ones with the most recent chronological date anymore. So I created an RSS feed that shows the images added in the last 30 days. It doesn’t seem possible to include item thumbnails in an RSS feed, so for now it is just a link to the final rendered image and the name and rating of the parameter set as decided by Jim Muth. If you want to browse by thumbnail, start at the main Fractal of the Day page.

Thanks for your hard work, Jim!

Refactoring: Convert C to C++

You have C source code.

Create a C++ source file containing the C source code, modified to adhere to the rules of C++.


The C language provides limited scoping and encapsulation of data and functions. It has no objects, but legacy systems often involve a large body of procedural code that could benefit from object-oriented refactorings. In order to apply object-oriented refactorings the code must first be ported to C++. Then the C++ code can be refactored from procedural code and data into objects. The objects can be further refactored with standard object-oriented refactorings.

C++ is syntactically compatible with C, but introduces new reserved keywords that are not present in the C language, such as template, typename, class and so-on. Because these additional keywords are reserved in C++ but not in C, you may need to apply Rename Function, Rename Field or Rename Variable refactorings in order to eliminate errors arising from compiling the source with a C++ compiler instead of a C compiler.

C++ is link compatible with C when external data and functions are declared with “C” linkage via the extern "C" in the C++ code. Data and functions made available to C compilation unit from a C++ compilation unit must also be declared extern "C" in order to be visible to the C code.

Read the rest of this entry »

FractInt for Windows (beta 5)

Download FractInt for Windows Beta 5

The legacy code I’ve been working on lately is FractInt.  FractInt’s most recent release is a source base that compiles in three ways: DOS (FRACTINT), Win16 (WinFract) and lunix/X11 (xfractint).  The DOS code has gone about as far as any DOS program should go, and then some.  The Win16 and X11 code has lagged behind the DOS code in some areas, mostly because people didn’t want to translate the 16-bit x86 assembly code for other environments.

Read the rest of this entry »