Thursday 30 January 2014

glfw v3 on Debian/Mint/Ubuntu

Please Subscribe now to help me reach 1000 subs :)
This is a post just for me really, but if it helps others, so be it...

Installing glfw on Linux (Mint/Ubuntu/Debian)... My steps...

sudo apt-get install libx11-dev libgl1-mesa-dev libglu1-mesa-dev -libxrandr-dev libxext-dev
sudo apt-get install cmake xorg-dev

Download glfw code, and extract... Move to that folder...

sudo cmake -G "Unix Makefiles" -DBUILD_SHARED_LIBS=on -DCMAKE_INSTALL_PREFIX=/usr
sudo make
sudo make install

Then lets say we want to build the "boing" example, move to the examples folder with the boing.c file...

gcc -Wall -g -c ./boing.c -o obj/boing.o
g++ -o bin/Boing obj/boing.o -lGLU -lGL -lm -lX11 -lpthread -lXxf86vm -lglfw

So in Code::Blocks, your linker settings look like this for a glfw project:


Tuesday 28 January 2014

String Replace in C# & Java

I hate the way an object orientated language like C# can completely ignore object orientation...

My example for the day... The Replace function in the String object....

string l_name = "Job";
l_name.Replace ("b", "g");

I don't know if it's just my Pascal lathered mind, or today in general, but this got really on my manboobs, that it did nothing... Because instead of the Replace function acting on the "l_name" object, it acted like a static function outside the string... Meaning I had to do this:

l_name = l_name.Replace("b", "g");

So I may as well have used C notation...

Replace (&l_name, "b", "g");

It's Functional rather than object orientated, I wanted "Replace" just to act on the object it was pointing at, to do "this->Replace" and not need to assign back to anything... That's how I'd have designed this function.  And yes, if people wanted to assign a Replace leaving the original alone I'd have let them, like this:

class string
{
  public:
    void Replace (string& p_What, string& p_With);
    static string Replace (string& p_Source, string& p_What, string& p_With);
};

Gah, object orientation is the point of C# existing... I note Java handles its string class the same way, and I find it so very very annoying...

And worse than finding it annoying me, I don't know quite why its annoying me so much, I think today I feel on the whole to be totally out of control of my own life... Not least because I note the company has docked £372 off of my pay for the xmas break, new rules in my new position... So already earning a pittence and running around after everyone else, I'm getting docked cash for time off at Christmas... Thanks Scrooge... Thanks.

Monday 27 January 2014

Mr Xelous Mailing....

I've just done something which even I think is strange, I've just sent an e-mail to a person, at their place of work, directly asking for a job.

I have never done this before, I've had jobs applied for from adverts, I've gone into trade shows and been approached and head-hunted by others... But I've never just sent a message or cold called someone.

I'm pretty sure if I were receiving such messages - as I'm sure this person is - they'd just have them spam filtered, my mail is just spam, but I have a small warm spot deep inside hoping the recipient reads the mail and I hear something back.

It is a very small hope in this yammering, chattering, gnashing world, but hey you never know...

The reason for my sending this missive is three fold, first I think I need a new job... second I'd like to work for them... and third my personal research/coding time is very much pointed in the direction they appear to me moving, least from their current published information, they're looking at C++, I'm looking at C++... They have a history with volume rendering, I want a history with volume rendering... They have a company, I'd like to work for a company....

I'd just like to earn a little more than I do now, to live comfortably and work from home doing something I love.  With a house with two man-lab rooms all to myself, I think it maybe time I try to make the most of it, the most of myself.

And hey if the recipient of that mail is here.. "Hi"... or should that be "Hej"?

Saturday 25 January 2014

Miscellaneous January 2014

First off, I've been a right moody bastard tonight... I've had two goes at the wife, and though I'm sorry for both, I'm still an interminable bastard.

Second, I've finished the plastering... My skill since the first walls have increased extraordinarily, and the last wall I did is actually quite good!

Third, I've played some "Endless Space"... enjoying it, learning the tech tree...

And finally... Volume rendering... This is like Voxel rendering, as one see's in Minecraft, I'm a big fan of minecraft, I'm amazed Java manages to perform so well, so... I may just start a C++ project to learn a bit about this, the real reason being to use my OpenGL skills, and perhaps update them, the last real 3D programming I did was around 2000-2002 when I used it to render shop floor plans for a project at work, since then I've done a shit load (and I mean a shit load) of 2D programming, but I've not managed to get back into 3D.

So, 3D may be my private time research item.

Friday 24 January 2014

No Rolf.... Sexual Court Case Equality

Its interesting they don't mention Rolf Harris....


Now, he's in court on some abhorrent charges, but in this country you are innocent until proven guilty, and guilty or not Rolf Harris was part of UK culture linking us to Australia for decades, one can't simply change the list of Aussies in the UK because one is in court...

This is a little like mentioning iconic German leaders and leaving Hitler out cus he was... well Hitler.

And I know mentioning Nazi's derails my point, it always will, but the case against Rolf Harris is still on going, his name is mud either until the end of time, if he goes down, or he's exonerated by being acquitted, either way we simply don't know at this moment... But the media stance, and the naming & shaming is interesting.

I don't believe that these court cases about kiddy fiddling and sexual charges against the likes of Harris, or DLT, or Bill Roache come up for no reason.  I think some are genuine, some are money grubbing and some are delusions seeking attention, but I think some of the cases where the accused are named & shamed before their day in court, like Michael LeVell, Jim Davidson & Fredie Star only for them to be found not guilty don't result in their names being restored.

Indeed I feel in the latter case where the accuser maybe found to be guilty of lying there should be a case against them and they should be named and shamed, its perhaps not as cut and dry as this, I personally have experience of a situation where two sisters were sexually assaulted from the ages of 3-5 to their early teens by their step-father and when it came to court the step-father was found not guilty, but you can see in those girls (well women now, they're both in their 30's and early 40's) the psychological shadow of the past and also the shadow that he got away with it.


I'm no legal expert, I do think I'm a bit of a common-sense expert, and so I think maybe total anonymity should be imposed, on the case, the persons and the press.  And breaking this before the conclusion of a case in court should be contempt of court.

Otherwise lives maybe ruined, both of real victims, to falsely accused defendants to real abusers and rapists.  (Of course the last case is fine, ruin them all, but the former two categories I think out weigh the latter in the current atmosphere of the press).

Thursday 23 January 2014

Network Guru Fails at Monitoring his own Bandwidth

Do I come on here to bemoan the seeming incompetence of others a lot?... Because I have  just had an annoying 20 minutes talking to one of our "Network Experts", there's a server box running Ubuntu, its actually a virtual machine, and it was being blamed for crippling the network on the host machine - which has to run several other Windows Server 2008 Virtual Machines.

For some reason, this came across my desk, because someone has decided that though I can't advise the company on Linux server usage or adoption, I can be called into sort out the problems other fools create.

So, this server was running, the administrator chap is sat there with PuTTY connected to it and he's saying there's too much network traffic coming from the box.

Looking at the process list the machine is doing nothing, when I ask for one of its users to be made to use it, the CPU usage is a time flitter and then the usage is over, it appears to me the Virtual machine host is waking the VM, using it, and closing it.

The processes being used are simple webservices, so there should be no network traffic unless someone is using the server.

So, I ask.. "What's your idea that this machine is causing the issue?"  Very smugly the admin presented me with an A4 sheet with two graphs, one shows all his servers running with the Ubuntu machine present, and there's a whole load of traffic going on... The next is the same graph, with the Ubuntu box removed, and there's nearly no network traffic.

Then within PuTTY connected to the box he opens iptraf...


And he points to the statistics and declares, "See, this is running multiple kilobytes a second"...

Lets recap... "This machine is crippling our network usage on this box".... "using up kilobytes a second"... If any of you don't grasp how absurd this is please stop reading now, because the guy was clearly serious.  He's not that old, he's younger than me, surely he realises kilobytes a second on a modern gigbit backbone is nothing?  No, he seriously wants the ubuntu box silent.

So, what's causing this tiny trickle of bandwidth... Of course, he's connected to this machine with PuTTY...

"Close this window and take me to the machine in the server room"

In we go, and from the console plugged into the machine I run iptraf... look what we see now...


Yes, its zero...

When he is running his measures and checks he's connected over the network to the machine, he's been measuring his own bandwidth administrating the machine, and apparently the kilobytes per second that took were too much for him, I feel like this guy should be thrown from the building, not be earning far more than me in the "superior" position of "network guru god" which hs holds...

So knowing the machine is idle, I wonder what causes the bandwidth, so with the iptraf still running, I call up the user and ask him to get working again... and sure enough there's little trickles of bandwidth from the Ubuntu box, no spikes, no major blocks of transmission.  Hence after a few minutes I conclude the Ubuntu box though active, is only taking a tiny amount of the total bandwidth available to the machine, and so I start to look at the other machines...

And with just perfmon on the two Windows Server 2008 boxes with the user operating his end, I can see that the Windows boxes are spiking their network traffic, just with task manager you can see one box taking 20% the total available to it, and the other over 45%... This is a gigbit connection, and 20% of it is taken for maybe 30-50 seconds each minute and then goes quiet, then the 45% hog is there for maybe every 10 seconds of each minute.

They're scheduled tasks, as the users input items into their programs, the programs process and send out instructions, e-mails and update other databses.  The trickle of data I/O to the ubuntu machine is just such a feed, the Ubuntu box sucks/queries data from MS SQL Server on one of the machines and squirts it into MySQL where a very old (like 8 year old) unmaintained program written in C with MySQLConnector picks it up and uses sendmail to e-mail a load of people.  Such notifications take maybe 0.25 seconds and run every 5 minutes, the amount of data is small, and looking at the physical name of the Ubuntu box "e-mailer relay" I think it's safe to say its not using a lot of bandwidth and the other machines are to blame.

How I educate the "network expert"... This is my next task.

Monday 20 January 2014

C++ Integer to std::string conversion speed

There is often a lot of discussion about the most efficient way to convert things in C++, personally I like the boost::lexical_cast, I find it gives clear and readable code; very important in the systems I write, especially for maintenance and up keep.

However, many assume it to be slow, indeed most authors on the topic turn almost immediately to C for the fastest way to convert integers to strings, and unfortunately I find the same is true, even with std::string and std::ostringstream features the old sprintf tends to be faster.

But, crippling many users of std::string is their lack of understanding of that standard library staple class, so here is my little investigation into the speed of conversion, using a mix of C and standard C++, to give you a good idea of how fast things can be, and how to use your standard class and its memory to best effect.

The first trick you will see in this is the use of the std::string as a memory buffer, you can do this by declaring your standard string, then resizing it...

std::string MyName;
MyName.resize(12);

The memory location now at &MyName[0] points to 12 empty characters for you to use just as you would a char* or &char[], useful to stop using uncontrolled char* buffers left right and center, and perhaps the least used "tip" I can give when using std::string.

So, what conversions do we have?...

class Conversions
{
    public:

        static const std::string IntToString(const int& p_Input);

        static const std::string IntToString2(const int& p_Input);

        static const std::string IntToString3(const int& p_Input);

        static const char* IntToString4(const int& p_Input);

        static const void TestConversions (const int& p_Cycles);

};

The first three are going to be using whatever code to always give a pre-allocated std::string, the fourth conversion is going to return a raw char*, so the programmer has to delete the result etc, or rick a memory leak.

I still want that fourth result to be a std::string however, and I'm not going to worry about the leaking memory, so though the function performs a new[] I will not perform a delete[], but simply will assign the char* to a new std::string upon return.  Making the timings taken fairer.

So, lets look at the program code for each of the functions, and the timing in the test function.  I'm going to use boost::posix_time for the timings here:

const std::string Conversions::IntToString(const int& p_Input)
{
    std::string l_buffer;
    l_buffer.resize(33);
    sprintf(&l_buffer[0], "%d", p_Input);
    return l_buffer;
}

Above we can see the first function, using our string resizing tip, we resize the string as a buffer to take up to 33 characters (the maximum size for a 32bit integer is 33 characters) and then we use the old fashioned sprintf from the cstdlib header.  Many claim this to be the fastest, the defacto conversion, even more so than using itoa.

const std::string Conversions::IntToString2(const int& p_Input)
{
    std::ostringstream l_oss;
    l_oss << p_Input;
    return l_oss.str();
}

Next is the standard library way of working, we create a new ostringstream and stream the integer into it, then return the std::string from the stream.  I believe this to be pretty slow, my mind tells me that the creation of the stream and then the extraction of the result is going to be slow; but we shall see in a moment.

const std::string Conversions::IntToString3(const int& p_Input)
{
    char l_buffer[33];
    sprintf(l_buffer, "%d", p_Input);
    return std::string (l_buffer);
}

Next we have another use of sprintf, however, this time we're not resizing a string natively, we're creating a character string and then casting it back as a result.  I think this may be the fastest, but again we shall see.

const char* Conversions::IntToString4(const int& p_Input)
{
    char* l_buffer = new char[33];
    sprintf(l_buffer, "%d", p_Input);
    return l_buffer;
}

Finally, very similar to the third test, this conversion creates a new character array pointer as the buffer, and then uses sprintf.  This is going to leak memory if we don't delete[], but I'm ignoring that for now and just testing the speed.

Now onto the conversion test function, the basic layout is, take the start time before the conversion, call the conversion a lot of times assigning the result to a std::string locally, and then take the time after and output the difference in milliseconds...

Now, the speed of this code in C++ is going to be fast in all cases, so we need enough sample calls to get a reading... I'm settling on 30 million calls, 30000000.

const void Conversions::TestConversions (const int& p_Cycles)
{
    // Test 1
    std::cout << "Test 1...";
    boost::posix_time::ptime l_end;
    boost::posix_time::ptime l_start (boost::posix_time::second_clock::local_time());
    std::string l_result;
    for (int i = 0; i < p_Cycles; ++i)
    {
        l_result = IntToString(i);
    }
    l_end = boost::posix_time::second_clock::local_time();
    boost::posix_time::time_duration l_diff = l_end - l_start;
    std::cout << l_diff.total_milliseconds() << std::endl;

    // Test 2
    std::cout << "Test 2...";
    l_start = boost::posix_time::second_clock::local_time();
    for (int i = 0; i < p_Cycles; ++i)
    {
        l_result = IntToString2(i);
    }
    l_end = boost::posix_time::second_clock::local_time();
    l_diff = l_end - l_start;
    std::cout << l_diff.total_milliseconds() << std::endl;

    // Test 3
    std::cout << "Test 3...";
    l_start = boost::posix_time::second_clock::local_time();
    for (int i = 0; i < p_Cycles; ++i)
    {
        l_result = IntToString3(i);
    }
    l_end = boost::posix_time::second_clock::local_time();
    l_diff = l_end - l_start;
    std::cout << l_diff.total_milliseconds() << std::endl;

    // Test 4
    std::cout << "Test 4...";
    l_start = boost::posix_time::second_clock::local_time();
    for (int i = 0; i < p_Cycles; ++i)
    {
        l_result = IntToString4(i);
    }
    l_end = boost::posix_time::second_clock::local_time();
    l_diff = l_end - l_start;
    std::cout << l_diff.total_milliseconds() << std::endl;
}

Lets see what our output is:

Test1...6000
Test2...17000
Test3...5000
Test4...6000

Immediately we can see my hunch about using the string stream is correct, its very much slower, more than twice as slow.

Surprisingly, at least to most readers - one hopes - we can see that the string::resize and use of sprintf is very close to the other uses of sprintf.

Since sprintf should be taking a constant amount of time what we've timed in tests 1, 3 and 4 is the speed of our memory management, how quickly has the function made the result available.

Some readers maybe screaming at me to use itoa, and one could do that with a char buffer, or even a resized string, thus:

std::string buffer;
buffer.resize(33);
itoa (&buffer[0], p_Input, 10);

However, itoa is not a standard function and some compilers don't supply it, therefore you must generally always use the lowest common denominator and sprintf is just that.

There is also one last avenue, the lexical cast...

// Test 5
std::cout << "Test 5...";
l_start = boost::posix_time::second_clock::local_time();
for (int i = 0; i < p_Cycles; ++i)
{
    l_result = boost::lexical_cast<int>(i);
}
l_end = boost::posix_time::second_clock::local_time();
l_diff = l_end - l_start;
std::cout << l_diff.total_milliseconds() << std::endl;

Now, this approach should take into account the "bad_lexical_cast" exception, but exception handling is slow so we're ignoring that at this juncture.  And assuming we have a known data source (int i) which we have in a valid range.

Our test results how are similar for the original calls...

Test 1...6000
Test 2...17000
Test 3...5000
Test 4...5850

The new fifth test...

Test 5...1000

This is very much quicker than any of the other solutions proposed...

So, there you go...

#include <boost/lexical_cast.hpp>
#include <boost/date_time/local_time/local_time.hpp>
#include <string>
#include <iostream>

int main ()
{
// Test 5
std::cout << "Test 5...";
boost::posix_time::ptime l_start =
boost::posix_time::second_clock::local_time();
for (int i = 0; i < p_Cycles; ++i)
{
l_result = boost::lexical_cast<int>(i);
}
boost::posix_time::ptime l_end = 
boost::posix_time::second_clock::local_time();
boost::posix_time::time_duration l_diff = l_end - l_start;
std::cout << l_diff.total_milliseconds() << std::endl;

return 0;
}

Use lexical cast...

And about the exception handling, be smart the speed of this code is not affected by making the function throw the exception up, or by making the whole loop handle the exception once, be smart... and stop mucking about with conversions in C, you're only fooling yourself they're faster than other options.

Good Plastering Progress

I come to you live, it really is half past midnight, the reason being I can't sleep... I'm extremely tired, bodily tired, but my brain is very very active.

So, lets round things up, first of all the plastering YES I got what I wanted doing and a little bit more done, I got in Friday and steamed four walls, chipped shitty old plaster off, I dug 1970's cavity clamps out of the wall, I fixed the chimney breast and applied PVA to the old plaster to control suction.

Saturday, I did the front wall, blending it in, and then both chimney cheeks, and spent ages blending the front wall.  Finally a second mix I did the facing side of the chimney breast and tidied up... Now I tore the plaster on the thin top here, the walls are strange, I need to apply less than 1mm of plaster above the old picture frame position and nearly 3.5mm below... This however means I need to polish and can polish the lower half quicker and better, but the upper area I pretty much have to leave alone as once it starts to dry I just tear it...


And I tore a good 6 inch gash in the chimney breast front... gah.


But anyway, Sunday two mixes and I got both of the side walls done... And the walls are good... The plastering is acceptably smooth....

However, my corners, especially the in ward directed ones are awful... I don't know why, I use a brush, I smooth them, I try my best, but they're just shit and with the handicap of not being able to work the very thin tops a lot they tops are worse.  And adding insult to injury there's the curved front roof...

Anyway, lots done... Gaming... Well the wife and I did finish GTV5 through one set of senarios, we've started again however, to play through a whole other way.

I really had wished I'd got something else played however.  So, there's another post with no nice pictures, no information, just me moaning about plastering... But, I really have to get this room done now.

Thursday 16 January 2014

Manlab & Minecraft

It has been a long time since I got any gaming in, least on the PC, been playing a lot of GTAV on the PS3... But I want to play some more PC stuff, however the room still needs work...

The front wall now has the built in wardrobes removed, so I've got to just re-finish the plaster along the front, I can see the chimney breast now, so I need to steam all the old wall paper off of that and prepare the surface for plastering.

But, I do hope with these little walls to do some plastering this weekend, indeed I hope to finish the front wall, and plaster both cheeks of the chimney breast from the same mix... and then do a second mix to do the front of the chimney breast and/or the ceilings.

I think tonight I'll get in and get on with the prep work - streaming & bonding the holes.

Once done I've got wire and I may go and wire some things in the loft.  The first thing I may sort out when I've wired the loft room is actually setting up a Minecraft server, I want a persistent world which I can work in and access from anywhere, I've until now been copying the world downloads around, however, that's now proving problematic as I've turned off and packed the main PC, which was the last place I used my world from.

However, I may re-start my last world from the seed and record my activity...



Also I've been looking at a new mob farm, Koala's seems cool and easy to build.

Wednesday 15 January 2014

Most Junior

I've mentioned some of the problems at work recently, and the changes, well how about this one... From feeling as though I was quite a senior position in one department, having moved to another I'm now considered the most junior...

Now, this maybe because of two things, either because I just moved - but I don't think so - people know I've been here years and am the most senior on the projects I work on - or I'm being considered the most junior because I'm the youngest.

Everyone else is over 40, I'm still in my mid-thirties.

I've dealt with this before, when I was 20-21 I was leading a team working for Courtaulds Textiles, instructing far older, technically more senior members of staff around Britan and abroad as to how to carry out projects under my remit.  This was a challenge, not least as I was so baby faced.  This role is in fact why I still to this day sport a beard, because I had to grow a beard to get some of the Morrocco based chaps to actually listen to me.

And now, 20 years into my programming career, I'm doing it again.

I'd not mind so much if one of the people considering themselves above me was not already spouting off about having a PhD, going on and on about learning programming as they've muddled along, and their going on about how "kids today rush programming with their tablets and scripts"... I don't own a tablet, I don't script, I'm thirty five I don't consider myself a kid... and unlike him I did a degree in pure programming, pure software engineering, he's so old computers were still mainframes when he went to Uni, he used punch card to code not a GUI.

Gah, frustrated.

Monday 13 January 2014

LXF - Flushed with Challenges

I was just browsing to the LXF site and I notice I've been flushed....


"You can't request more than 20 challenges..."  What the heck is that all about?

Friday 10 January 2014

Exceptions, Excepting their Exception... An Adventure into Stack Overflow Hell

If you're going to throw exceptions, and display those exceptions, don't let the code showing exceptions throw exceptions...

This may seem very obvious to those of you out there with a modicum of common sense, it may seem simple and you might be saying... "Xel, why the fuck are you pointing out the obvious to us?"

Because you know this... And you know I know this... Its common sense right... Right?... RIGHT!??!?!!?

No it's not, cus I've just spent half an hour banging my head against the screen, with half a collection of machines working fine, but the other half not operating and throwing spurious errors out of mscorelib...

The error being "File Not Found"... Well, the reason that we got this error was that the system was trying to tell us something, but as it was trying to tell us, the formatting for the fancy exception screen was missing, and so the exception caused an exception... And to add insult to injury the exception from the exception, caused an exception, and eventually this shitty code ended in a Stack Over Flow exception... Which... yes you guessed it, caused an exception... it all just collapsed horribly.

So, people, keep it simple, and keep it stupid!  Because this saves me time, energy & worry!

Thursday 9 January 2014

Cicada and Ready Player One

I was having a read, I've never heard of Cicada before, now 3301... However, reading the BBC coverage I was immediately put in mind of the plot to "Ready Player One" which I've previously covered in this blog...



Tuesday 7 January 2014

Work Stress Survival

Now then, the big reveal about what has been stressing me, I've survived my third round of redundancy threats... I've been at the place I work just over 10 years now, which is not to be sniffed at, however, I've survived one company folding into another, then that holding company selling its interests to a third firm, and then that third firm closing the products I work on.

Luckily for me a new position was created to take up the development tension in another department, but right now I've just moved my desk, sadly, from the old location I'd worked in with so many varied people... Dozens of people...

Drunken Irish men, work shy Cambridge tramps, Programmers from Macao who could not Program, a middle eastern gentleman whom spent all day on the company phone screaming in some unknown language and got fired soon after for embezzlement and this is not to mention the more normal mental cases one accrues in the technology field, the standard LARPers, MMO junkies, hackers, dweebs, geeks and nerds...

All those people, all those pointless, never finished, undelivered projects... And I sit here now, the ONLY one of them to have delivered any product in the last 2 years and I think myself lucky to have the new position.

So, the new location, the physicial one, has a new view, I can see most of the car park and a sliver of sky through my window view, this is only the second time I've had a window seat whilst I've been working since even before my graduation, so in nearly 16 years professional development I've spent far more of my time in the dark...

I've got the same desk and kit, just moved around, and I might move it around again by 90 degree's when a load of junk from the previous occupier is shifted.

So there you go, stressful, not least because the day I found out about the potential redundancy was the day after we'd signed for the new house.

Monday 6 January 2014

boost libraries and -Weffc++

I've got a peeve for the day, I've come to use the boost libraries, specifically signals2, in a little project and I wanted to knock up some code to demonstrate what I was up to quickly... However, I've just sat with Code::Blocks spewing beeeellllions of errors and warnings at me.... All from code which looks fine.

The warnings and problems are all coming from Boost... Don't include boost and all is well... but I know boost is fine, I know thousands of people use it, I know its tested... why... oh why is my project cocking it up?

Well, it seems I use -Weffc++ in my compiler scripts, by automatic and default, I like the effective warnings... The problem is, this switch breaks using boost... Boost clearly does not listen to Scott Meyer.. grrr.

So folks, if you want to use boost, don't use the g++ switch -Weffc++

Sunday 5 January 2014

Games, Floors & Development

I've recovered a little, and managed to please the wife by laying a new floor in the front room.  As a reward I got two things, first I've ordered the C++ Tour book by Bjarne Stroustrop, so you'l be hearing what I have to say about that when it arrives.  From reading I've done a head of its arrival it appears to be a good introduction to the information in the C++11 language, and as I've already got that book I hope this new smaller volume acts as a gateway to knowledge from that the main tome.

The floor laying itself was a bit of a pain, the property is a 1920's built semi, 1928 to be precise, and taking up the 1990's carpet I found 1950's underlay - which had turned to powder - so that all got cleared, revealing what initially looked like really nice cherry wood floor boards, but which on closer inspection showed a bit of rot.  The rot came in the form of water permeating under the front door and along a seam by capillary action into the board ends, rotting them.  So they for chopped off and new board spliced into place, and a small area shaved to level it... Hang on, I hear you cry, why not replace the timer joists?... Well... There are none...

In the strangest turn of events the cherry boards are laid directly onto a flat(ish) bed of concrete... I know, crazy as that sounds, the father-in-law, a builder and trades man of 47 years was a little stunned when I said boards laid straight onto bitch-amen and then on concrete; so much so he came to look.  So there you go, no rotten joists to deal with, sealed the cracks and done...

I then laid a damp proof membrane in plastic, the 3mm thermal levelling board on that and then a half decent laminate on that.  Quite proud of the job I did, its not perfect, only the second laminate floor I've laid, but there's no major bodges and I even cut it in and around two door frames really nicely, so the floor is contiguous through into the hallway down to the front door.

The other reward I got for this was Endless Space... in the Steam winter sale...


I've had my eye on this 4X game for a long time, and my initial thoughts were... this is SPACE!  Not a difficult leap as it is a 4x galactic expansion game.  Now I've not played GalCiv, so I can't compare there, but this was so much like Space! that I got a little bored of it...

Until, that is that I pushed past the caring level and kept on going.

Now, its not perfect, the interfaces are not informative enough, the tutorial sucks really badly, and really the game is very very very like Space!... The cut scenes are okay, but repetitive, the AI fight back on the old rock-paper-scissors... or should I say.... Missile, beam, projectile ordering is very annoying, just as you've created your class if vessels defending against their one attack, they switch, that's cool... you switch back, or balance your fleets... only for them to... wham... change almost instantly... and come back with a huge number of ships.... Making me wonder whether the AI cheats.

But 4X space has been on my mind, for a while, I really want to make a very detailed economic model, and research model, and military model and make it pretty, and cross platform, and an MMO.... 4X MMO... in space... persistent world for people to fight games like this in... Now, if I can make it as pretty as this I'd already be a millionaire, which is to say, I can try but would fail without artists to help... But I could make my idea more informative, having seen this game I know I can fix some of the bugs in it.

I might have to start just such a project...