A blog about my rantings, including Games, Game Development, Gaming, Consoles, PC Gaming, Role Playing Games, People, Gaming tips & cheats, Game Programming and a plethora of other stuff.
You're all aware (I hope) of my stack of servers under the desk, however, the main server I use is actually a re-purposed desktop - it's the G33 chipset Socket 775 to Socket 771 running a Xeon E5420...
And I have my plan forming to re-case my main workstation, however, I wondered... As I'm currently very exposed with data not replicated across drives on my little server and the machine being quite high power, whether I might not do better in the short term of recasing both... AND changing the server to an always on box.
This way, I could build a machine around a dedicated new board and chip... I started out with the AMD APU's the 2580 and some others, up to a quad core, and as fabulous as they look on cost they didn't float my boat.
I don't need a lot of number crunching power on the server, so what was my concern? Well, I'm an Intel guy... Always have been, and think I always will be. Obviously I started with MOS processors, then moved into the world of Motorolla, but since 1994 I've steadfastly bought and used Intel.
Why? Well, I remember the original AMD offerings, they were copies, and hard to find in the UK market without knocking the quality of other items in your build, so I stuck with off the shelf Intels.
I then build my own Pentium II and III computers, I also found use for Celerons - I've never had anything against them - I had a Pentium IV Prescott when they were literally brand new, then I've had the Core i7 950, plus all the Xeon servers and modding fun.
At work I've always been supplied Intel too...
What options does the market offer in the Intel world?.... Well I spotted the dual core, dual thread Celeron G9300.... Which looks just the ticket for me, it's pretty low power (53W compared to the Xeon E5420 at 80W), it can address more RAM, so giving me expansion options and it had decent reviews. The trick is to not expect a lot from it, and to actually put it to a good use. If that use is as an SSH point into my network, a git server, NFS host and squid box, then that might work quite well.
I've therefore drafted a build, you can see it here....
If nothing else that case, might be a perfect buy, to get the ball rolling, and guess what!... Tomorrow is pay day.
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 fact very slow. So code: const std::string l_Pattern("%SCORE%"); std::string l_Source("You have scored %SCORE% today"); . . . boost::replace_all( l_Source, l_Pattern, Player::Instance()::ScoreAsString()); Would result in very slow performance, my solution is not perform the replace... search for the pattern predicate first: if ( l_Scource.find(l_Pattern) != std::string::npos ) { boost::replace_all( l_Source, l_Pattern, Player::Instance()::ScoreAsString()); } This latter code runs so much more quickly, I'm far in a way back a head of the speed curve, but I have this lovely dynamic placing of the variables into my rendering controls, and any control can receive any value just by my tweaking the loaded display script, so neat.... Anyway, I hope that helps. If you want to help me, pop over to my YouTube channel and hit that subscribe button.
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 browser, same YouTube account target... Two different replies... Just to be cute, and one is broken!... GG YouTube, GG Google...
Oh, and has anyone actually ever worked in the YouTube website?... It's a nightmare to navigate, with things hidden and changed, as a content creator, you go to try and get your own home channel, it's a nightmare, you have to view the whole site, select "Library" and then "Home"... You used to be able to press one thing "My Channel/My YouTube", so simple? Why change it?.... To be evil of course.
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
At home however, you may have seen this late night problem....
I have not, as yet, tackled this problem in any satisfactory manner; there's just been too much going on.
However.... I have a plan, a plan so cunning you could put a tail on it and call it a fox.
I had a look around in the case, and removed the bad drive, here it is....
This is an old drive first of all, and it was only 3.0gb/s SATA, but it was useful as part of my mirror, and without it I'm now naked. In my room/workspace tidy rambling video you will see I have a stack of WD blue drives on my desk, however I'm at pains to put them into this server, as the more space I give myself then the more data I have to move later, and the less places I have to stash that data.
What do I mean?... Well, that machine already has about 4TB of data in the two ZFS Pools and the one scratch drive, I do not have ANYWHERE else to put 4TB of data, and I can't afford a new drive, hence why I've carefully and strategically informed the wife I'm buying the off 1TB drive once in a while over the last year... Dropping a 4TB drive in the mix, she'll flip.
Recasing my Server & Workstation
So, my plan?
Well, first of all I have my main work station in a trusty, but now rather old, Coolmaster Cosmos 1000 case (you can see this case in some of the very early pages of this very blog)... Now, this is a very nice case, and has 10 internal 3.5" drive bays... So would be pretty nice for my server to move into, add all the new WD drives to it and voila a working server with expansion capabilities.... A recasing, that's a plan... Plus I get to perhaps look at that Xeon mod a year on and evaluate how it got along.... And of course more ZFS fun... Maybe a video about Git & setting up my own ticket handling system.
Right, that's the server... What about the now case-less workstation?
Well, I'm considering a new case, of course. Front runners are the Corsair Obsidian 750D as it has modular upgrade ability, and if I like it, I can get another and expand the server into it next year.
Infiniband
A long-term project is to consider an Infiniband link between my server and my workstation, we'll see how this goes along, not only would I need to purchase some adapters and cables, but I would need to switch my workstation into a new dual-boot as only Linux would be on Infiniband (and as you may have noticed Windows was on the list of platforms for my new role specification).
C++
Simple limits in C++?.. What am I talking about, hmmm, well I just ran into some code:
auto value (0);
if ( requisitValue < defaultValue )
{
value = requisitValue;
}
else
{
value = defaultValue;
}
Nothing wrong with this you may argue, however the developer hadn't looked at the values they were working with, the defaultValue for this system locale was ALWAYS the highest value on a sliding scale, the configuration insisted the default be the cap and so any requisite value would be smaller.
I asked the chap to have a think about this code, having explained the requisit would always be lower than the default, and asked him to come up with any improvements. He did....
I asked him to rationalise this change, why had he done it?
To meet the coding standard define of not assigning, but to initialise with a value
To make the code less lines of code
I have no disagreement with the first point, the second... Not so much....
I do not subscribe to needing code to be smaller (less lines of code) so long as it's readable, as for my work maintainability far out reaches using less lines of code. Especially when the change made is exactly the the same resulting code, just the change is far harder to read.
(Don't miss-read this, I agree you should try to make functional code take less lines of code, but the above is white-space more than functional change, white-space on a modern compiler is NOT a problem, make your code readable before you start trying obfuscating functionality for fancy frills).
I stopped the developer in his tracks however, and asked him to pull up the document for the specification and describe "defaultValue"... "The maximum amount allowed in the value" he read.
So, changing the name of this value was the first step it became "MaximumValue". Use a meaningful name.
And finally, if you really want this decision to be a single line of code, how about:
auto value(
std::min<valueType>(
requisiteValue,
maximumValue));
Using the minimum function here, we make it clear we're doing a mathematical operation, it's a single line instruction (even if I do stagger it for readability over four), and we're not going to confusing the order of our parameters, so avoid introducing comparator ordering bugs later.
This is the simplest way to find a limit between two variables of the same type in C++, using std::min and std::max. Learn about them and love them.
The reply the young man gave me... "But changing the name'll mean I have to change hundreds of different places in the code!".... "Yes, so use find & replace in files?".... "Oh but what about all the other "defaultValues?".... "Why are they not in namespaces, or classes, or using other names?"... Silence.
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 metal constructs stuck on, simply to provide the added folders of more surface area, indeed some components - or whole systems - can be cooled this way quite well.
Things never stay still, so as Moores Law gained traction into the 1990's fans were added to many systems to draw cool air in and over the components, specifically the processor or CPU, which is where I found my first system fan, on my Intel 480 DX4-100 chip in the mid 90's (prior to this my 486 SX-25 was still passively cooled, with just a heat sink!).
Since then the fans in my system have evolved over and over, and as a bachelor I had no issues with massively loud fans blowing or whirring systems... This is just what you had, usually tiny fans spinning incredibly fast, plus hard drives etc, PC's made a hell of a clatter in the late 90's and early naughties.
Enter the wife to be, and things had to change, so I looked at quietening the systems I use down:
And it became a bit of a tradition with each iteration of my work area to improve the sound aspects, even on systems not kept directly in my working area:
So now I have a happy-and-successful train of experience with both Knix, Sharkoon and Noctua fans, all excellent in their ways, I have experience with drive ordering, switching SSD's, orientating my power supplies, smoothing dust filters... The systems I run close to me are whisper quite, yet extremely powerful, and never get too loud, my typing is always the loudest thing around!
Water cooling however is "silent".... Erm, reality police, no it's not.... You still have the sound of a power supply unit in your machine, and unless you're absolutely crazy you don't really open them up and try to passively cool them, so it will have a fan in there. I can switch the fan out for a silent brand, voiding any warranty, but really is it going to be silent? No, of course its not.
So, what do I gain with water cooling? Really, what do I personally gain?
Worry about the joint fittings
Pump seal
Block corrosion & blockages
Coolant contamination/algae growth
Tube decay
All leading me to think about catastrophic failure, which is coolant, be it electronic safe or not (most likely not) spilling out everywhere, literally hosing my machine.
What do I get with a fan? A high temp warning, or an indicative sound, and the chance to clean things up with a blow of air!... Air, not water, air, not worry.
And I'm going to sit like this forever I think, I see JaysTwoCents, I see ScienceStudio, I see Linus Media Group and a plethora of other skilled and knowledgeable folks on YouTube and at large vaunting water cooling all the time, but truth be told... I can't ever help but wonder if this is just folks looking for someway to express just how superior they are to others.
Lets face it, the PC master race exists, we're here... And some of us have been on the band wagon a long long time*, and it's the need in us to express this that I think is this very trait driving this die-hard gamble on water-cooling.
What therefore do those of us, whom endured being the nerds and the geeks and the outcasts so long, turn to in order to almost prove our superiority, how to we edge the masses back out of the picture? Well, I think that's water cooling**.
Water cooling is nothing but a risk, you can't scale it, you can't use it in production, you can't easily maintain it, and the ultimate common denominator is spillage, that liquid does not want to stay in that loop... Where as air is ubiquitous, your kit can cope with being submerged in air all the time!
The final incarnation of this is perhaps the most perverse in "ultimate", to exclude the masses and that is the niche phenomena of submerging a PC in mineral oil... As seen here...
The ultimate irony of this entertaining video being the CoolMaster*** sponsorship at the beginning, being for a CPU water cooling kit... CPU only, not scaling to the GPU as well... and vaunting "silent" fans... Just put the damn silent fans in your case, on your CPU, let the air do the job...
You can argue with me about the thermal properties of water being so much more than air, meaning you can "push your hardware further, faster than before", that maybe so, but it's again an edge case, you can over-clock on air, and if you're buying a new system to overclock you're falling straight back into my master-race theory, you're striving for more than the public can reach, you're pushing the envelope, you're ultimately trying to be more interesting than you actually are...
Good luck, really, truly, good luck, I can't wait to see your video posts about it, and I will watch with baited breath. However, my breath will ultimately be passing through and cooling an air cooled machine, as it's simply safer, easier and more maintainable, and I'm not worried about being boring or proving anything.
* Anecdote of the day, one kid at school found out I had an Atari ST, and he offered to "Swap you a Neogeo with Contra for it right now"... I laughed in his face, I in fact looked at him like a cockroach; as he was being nasty; "do you think all I do is play games?" He had no concept of using a piece of electronics beyond plugging it in, I was creating. I went home each night and I tinkered with STOS, later I tinkered with Pascal, and I'm paid to now tinker with code all day... I don't think that lad is paid to play his Neogeo, or any other console, and no it's not a twitch streamer - I've looked.
** I have a very similar theory as to why very boring people get a piercing or a tattoo, they've no idea what it means, nor any idea why, but they can't help but point it out... Imagine a 1990's computer geek getting a skull tattoo on his face... Same thing with water cooling.