Sunday, November 04, 2012

Grid computing and high availability

One of the things I found out when working on a grid system is that Murphy's Law works overtime there. In fact I would go as far as to say that on a grid "even if nothing can go wrong then it will". So, for the next time, if ever, that I find myself working on a grid system, I will probably want to refer to this article about HA-OSCAR that I found in The Linux Journal.

Capturing a wiki

Trawling through my notes and ancient reminders to myself on this wet Sunday morning, I am reminded to publish a link I found in the Linux Journal. It is a very useful article on how to capture a wiki using wget.

Saturday, November 03, 2012

Prettyprinting C++ code

After all these decades, there is still I need for prettyprinters. I am in shock. I was spoilt in java-land, where eclipse takes care of this for you. In C++ it's a different story.

I have to say that these days most C++ is formatted OK. Enough years have gone by that most people recognise that making the source readable to humans is important enough for it to be worth that little bit of extra effort. Sadly, not everyone is enlightened so poorly formatted C++ code is still being written today. C++ IDEs that take care of this issue are not universally used. IDEs themselves are still a bit of an issue since there is no multi-platform IDE that most C++ people can agree on. Eclipse CDT isn't there yet and in my opinion is several years away. So the question is, what to do?

I have given up on GNU indent. It was meant for C anyway rather than C++ so it can easily get confused and do the wrong thing when presented with C++. The GNU project had an appeal a few years ago for a new maintainer, but no-one stepped up to the plate. The project languishes in obscurity now. However, there is a new program called astyle, which stands for Artistic Style. I have been using this recently and find it to be OK; not brilliant but OK. So this is what I will use for now. I think it could do with some of the options/features that GNU indent has but beggars can't be choosers.

A while ago, when I was still in java-land, I thought that the eclipse formatter plugin might be used. It certainly works very well for java. There is a blog entry about this that discusses running the eclipse plugin from the command line for C++ code.

Java: separating unit tests from integration tests

I have been going through some old notes of mine and came across a link to a very informative blog about how to keep unit tests and integration tests separate when using maven. The link is Enjoy...