Wednesday, 29 June 2011

Favorite library in C++

This is a great GUI for software on most platforms (i.e. Windows, Linux, Max, Unix etc)

WxWidgets

This software will build on a very minimal workstation with only the basic libraries installed. It also looks great and has tons of examples to work from.

Example of the Classic problem with programming

The classic problem with compilers and programming is in my opinion the fact that compilers sometimes compile code that looks mathematically incorrect or illogical. This can cause the following problems, a) programmers start to believe that their math is incorrect and lose faith in mathematics, b) programs will not port to other systems.

Here is an example (the quick example ... the long example was a so-called generic parser that worked a couple of years ago and should never have compiled since certain variables were uninitialized at startup, the problem was that when the code actually worked I didn't bother to check for bugs).

finding substrings:-


if( text.find(".") > 0)
{
// process text that contains a "." character
}


This works fine in one part of the program, however later I have to use this :-


int full_stop = -1;
full_stop = text2.find(".");


if( full_stop > 0)
{
// process if string called vlocal contains a full stop
}

otherwise the program does not work. So I have to actually create an integer if I call the function within a loop, or is it breaking for some other reason? Only the guru's who write the compilers really know for sure.

Irritating thing about C++ development

Every couple of years, and sometimes every year microsoft releases an update to their Express development studio, MS VC++ Express. When this happens various functions become obsolete or unusable, for instance the old c-style file loading functions are now marked as deprecated because they are not thread safe. This makes keeping old software compatible with the current compilers quite laborious.

Starting a Blog

This is a blog dedicated to software development.