Posts

Showing posts from January, 2018

C++ boost::replace_all Slowed Me

I've just had myself into a complete frazzle, code yesterday was fast, rendering 120fps, the same code today was struggling to pass 11fps.  And it had me pulling my hair out, of which I have little left to spare. The problem? I had been processing strings for specific patterns and only replacing them, so a variable in my engine might have the value "SCORE" and it'd replace the players score value directly into the std::string instance for display. I however decided I wanted to compound all these reserved words to allow any value to contain any replaced value and also contain formatting, so I could so something like "You have scored %SCORE% today" and it'd just place the number in place. I turned to boost for this, boost::replace_all, to be specific, and I had about 45 pattern matches which would try to replace any instance of the string in place. However, this function does not look a head if the predicate is present in the source string, it's in fac

When Software Tries to be Cute

Image
Developers of the world, unite, and stop listening to sales-folks who say that variety is the spice of life, that you need to make your programs do cute things, like vary the replies it gives.  You are only causing yourself more trouble testing, debugging and annoying your users. Users of the world, unite, and stop wanting stupid cute differentiation replies from programs to make you feel special.  You are not special, you are one of very many using the same program, be like normal people and expect the action of something to have the general same reaction so you can see when things go wrong. I bring this up, as I recently had the Ultimate Ears Blast App, and it was too busy being cute with "just a moment", "hang on in there", "be right with you" bullshit replies to actually work!  Yes, it looked to me they were trying too hard to be hip that actually hit the mark! And YouTube has just done the same thing, check this out.... Same machine, same time, same b

C++ Simple Limits & Server Recase

Image
Health & Myself What a whirlwind few weeks I've had, first of all, I've had some minor medical work done so not really been in the mood to do anything very interesting except recuperate in my spare time.  I've also got on-going dental treatment going on, so I'm doubly aggravated. Next I have been so busy with work, I've had a change of job title, I've been effectively promoted into the lead developer role for the platform/product range I work on; this is sort of a defacto position, as I'm the ONLY developer working in this area at present, however I'm now officially the man on point and am about to reform a new development team around it.  I will be working in Scrum methodology with this new team, we'll be pushing product to both Windows and Linux, Git will be our source control system (no matter what anyone else says) and I'm going to leverage C++ as the core product with tools all being produced in Python, very exciting stuff. Server Issues

Water Cooled PC's... The last harbour of the Elite System Builder?

Image
Simply put... No, no I don't... And this isn't just some trifling aversion, I mean I have a real deep rooted problem with going and putting a water reservoir inside a machine, this is even before we consider the logistical challenges to installing a water loop.  Lets delve deeper.... Traditionally PC's, and indeed most computers, have been air cooled, initially machines were pretty slow meaning the surface area of the chip alone was sufficient for heat dissipation (my 68000 equipped ST's for example). However, as machines got faster so the electronic head began to build, essentially the more power the machine uses literally the more heat is put off, in the broadest sense thermodynamics demands that electrical energy moving the electrons inside the components not be 100% efficient and therefore some of that energy be lost, and it's only escape is as heat energy. This was dealt with by the addition of extra surface area to chips, in the form is heat-sinks, many finned

World Cup 2018 Group First Leg Predictions

Before all the Octopi, Squirrels, Cow-Pat Bingo and whatever else gets rolled out for the Football (yes, not Soccer folks) World Cup in Russia I thought I'd give you my game by game predictions... It might be worth an accumulator?  But you may just find lots of my own personal bias. Group stage - First 16 Games Predicted... Game 1:  Russia v Saudi Arabia - Russia 2 to nil, as hosts I think they stand a real chance to put a stamp on the game. Game 2: Egypt v Uruguay - Egypt 1, Uruguay 1 - I feel that Egypt have some talent for them and this will over arch Uruguay's historic tenacity. Game 3: Morocco v Iran - Morocco 1, Iran 0 - This is a pretty even match in my opinion, however, I believe Morocco will pip it. Game 4: Portugal v Span - Portugal 1, Spain 2 - Very hard to pull this one, it's going to either see lots of goals or not very many, but I'm going to edge Spain over the Portuguese as they'll want to put a mark on the score card against their regional adversarie

Bad Code...

You know when you open someones code and you find this inside a class function... unsigned short currentMessageOffset = this->CurrentMessageOffset; That you're in for a rough ride. First of all, WHY assign the member value on the right to a local?  No-where else in the class is this value edited or read, so there's no need to assign it to anything. And then the naming, this naming of something local with the same name, and it is the same name, despite the capitol leading letter, it's the same name, just makes this utterly useless. All this before even mentioning that the code is an assignment not an allocation, so annoying.

Ultra Cheap ZFS Array

Make your own ZFS array (mirrored) with USB Flash drives, for cheap! http://megalomaniacbore.blogspot.co.uk/2017/12/using-flash-drives-in-zfs-mirror.html Since this... interesting post of mine... has only about 10 views, and my tech items usually get a few hundred, I figure somewhere along the lines it got trampled by my silly New Years post....