Tuesday, December 20, 2011

Visual Complexity, by Manuel Lima

Coming to you from the "this is not a book review" department.




 Visual Complexity is probably one of the more surprisingly enjoyable books I've received recently.  And yet, it's rather quite unlike what I was expecting: and I say this as someone who had the book arrive in the mail with a large dose of "what the hell was this one?"  Perhaps a symptom of getting carried away with book ordering and having to wait for them to arrive from overseas, but nevertheless.



The book is something of an overview of different ways of trying to extract meaning from vast amounts of data through visual presentation.  The book shows how over time the forms employed have changed to suit the scale of the data being worked with.




One criticism I have seen is that given the amount of data on some of the graphs and the accompanying text, it is difficult to make out details of how the data is mapped.  I'm not overly bothered by it myself, as it's not the specifics of any particular graph that I'm interested in, more the style used for presentation. 

 

It's not going to teach you how to go about organising or analysing your data, but if you do have to deal with such things this book will show you the results of the myriad ways others have tackled similar problems.
All in all, recommended if you're looking for inspiration or pretty graphics.

Friday, December 2, 2011

Visual C++ 11 and Boost, Pt 2.

The modifications of the build.bat file described in the previous post give us better VC 11 compatibility, but there are still a few shortcomings that we need to deal with, particularly if we want to get auto-linking working.  With the changes described so far, Visual Studio will attempt to link to libraries from the previous version of visual studio (2010), resulting in complaints about missing libraries.

The remaining VC 11 issues are spread over two files.
The changes, as before, are mostly trivial and it's mostly a case of keeping track of those few places that need VC 11 cases.  No doubt a later boost version will have more significant changes to these files to more accurately track the changed capabilities of the compiler and standard library.

Compiler Capabilities (visualc.hpp)

First config/compiler/visualc.hpp

There are a number of issues with the file, but none serious and none dealing with auto-linking issues.
The purpose of the file is to specify for boost which C++ features are available or not available, given the current version of VC.  Of course, the version checking tops out at 2010.

We probably want to remove the warning that we're using an unknown compiler, a check performed at the very end.  We just need to bump the version up to 1700, as below:

// last known and checked version is now 1700 (VC 11):
#if (_MSC_VER > 1700)
#  if defined(BOOST_ASSERT_CONFIG)
#     error "Unknown compiler version - please run the configure tests and report the results"
#  else
#     pragma message("Unknown compiler version - please run the configure tests and report the results")
#  endif
#endif


Shortly above that the compiler version is defined, again topping out at VC2010.  We just need to modify that section to include a VC 11 case:

#   elif _MSC_VER == 1600
#     define BOOST_COMPILER_VERSION 10.0
#   elif _MSC_VER == 1700
#     define BOOST_COMPILER_VERSION 11.0


Finally, above this we have a set of defines for all versions of the compiler, specifying those features that are not supported in any VC release.  Doesn't look like this really changes for VC 11, but they're under the following banner in case you're curious:

// C++0x features not supported by any versions

Autolinking (auto_link.hpp)

We need boost to define the library toolset for us, and config/auto_link.hpp tops out at VC2010.  Once again a simple extra case for VC 11 (and modification of the previous case to stop it matching) is all we need.  Check that BOOST_MSVC is 1700 or greater for VC 11 before moving on to CBuilder 6 and auto link will once again try searching for the correct libs when required.  Trivial, as below:

#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1600)
   // vc10:
#  define BOOST_LIB_TOOLSET "vc100"
#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1700)
   // vc11:
#  define BOOST_LIB_TOOLSET "vc110"
#elif defined(__BORLANDC__)

Conclusion

That pretty much concludes all the changes you should need to make to the boost build system to get it playing nice with VC 11.

Latest version of Boost (1.48)
http://www.boost.org/