Elon Musk – Observing a modern space man

So, I’m not an Elon Musk acolyte.  I don’t own a Tesla, solar energy where I live isn’t particularly viable, and I don’t have any micro satellites to launch into orbit.  I feel compelled to put down my thoughts on this guy simply because I want to look back in a few years and see how my various observations panned out.

First of all, Elon Musk is human.  He’s fallable, and probably eccentric in his own way.  I’m sure there are people who love working for him, and people who hate it.  One thing is for sure, he is one of the shapers of our future modern world.  I’ll begin at my beginning.

I never heard of Elon Musk until the whole Tesla thing started.  At first he seemed to merely be a deep pocket investor, but later became the driving force of a company that probably would have gone the Fisker rout, cool tech, but not a viable business.

Then this whole economy ‘incident’ occured, and there was quite a cloud over innovation there for a while.  Tesla survived (with some government help), and what’s this?  There’s this whole other SpaceX thing which has also been brewing.  Huh.  I’m not really up on the history of SpaceX, but it appears like something cooked up by Elon Musk directly, rather than something he just so happened to invest in.  And besides that, there’s this solar city thing that was also brewing on the side, just biding it’s time through the recession.  And wait, there’s this giant factory that’s going to produce batteries, and then there’s Hyperloop.  This last one is the one that pushed me over edge in wanting to write down my thoughts on things Musk.

So, these are a bunch of wild things, each of which is giant enough to drive someone’s lifetime ambitions, but Elon Musk is into all of them.  I’m going to tray and channel him for a moment.

Elon Musk is a grown up who as a child had visions of going to Mars and setting up a colony.  He’s smart enough to have realized that going to Mars to live isn’t merely a matter of getting there, which we can probably already do.  If you really want to live there, you have to consider several things.  With any city, there’s certainly the softer sides of governance, and societal management.  Then there’s the more worrisome stuff like transportation, energy, food, shelter, water, etc.  Of you consider these latter pieces, you can begin to see the skeleton of a Mars colony in everything that he’s doing today.

SpaceX is about rocketry.  So yah, you have to work on that.  If you want to transfer people in colony sized amounts, it has to be cheap enough to achieve.  Up until SpaceX, the costs in rocketry were a bit high, largely driven by government sized entities.  SpaceX is still largely government sponsored, but they are bringing costs down through various innovations.  Of course China and India are doing much to reduce costs of space travel as well, but this is where the Boy Musk gets his excitement.

Then there’s Tesla.  It’s marginally about transportation, but it’s hugely about batteries and energy systems.  If you’re on Mars, you’re not likely to be burning fossil fuels (can’t find there, and can’t transport).  Solar energy is going to be your best bet.  Thus, Solar City makes a heck of a lot of sense.  You’ll need to develop solar panels and techniques of all sorts.  I wouldn’t be surprised if wind and some sort of thermic thing doesn’t work its way into the mix over time.  Then there’s the mega battery factory.  Oh yah sure, you can consume all those batteries in cars if you like, but really you’re creating battery systems to power houses, modules, factories, whatever.  Now, batteries aren’t the best storage for all things.  Compressed gas, or even liquids being pumped up hill might be good storage, but as far as mobile, and fairly isolated uses are concerned, traditional batteries are a good place to start.  And now, they’ve recently announced battery packs for houses, mated with solar panels of their own design, and Solar City merges with Tesla.  That’s the whole energy side of things.  I’d expect this ‘car’ company to come out with more dramatic things on the energy front.

Isn’t the car company about transportation?  Yes, marginally I think.  Hyperloop is more about transportation when it comes to Mars.  And this one really was the “aha” moment for me.  The various comments I’ve read about the feasibility of the systems really harp on things like ‘too hard to pull a vacuum to be practical’.  When you think of it from the perspective of Mars though, do the same things apply?  First of all, purchasing right of way.  I don’t know about the land grant rules related to Mars, but I’ve got to imagine that through the UN you can get a fairly large portion of Mars all to yourself.  Lay out track in tubes, either above ground, or under, and you at least don’t have right of way problems.  Creating a good enough vacuum on Mars is probably not as hard as doing it on earth, and with less gravity, moving trains requires that much less energy as well.  Given the usage of mobile battery packs (solar charged) even the energy requirements are fairly minimal.  The whole thing is solar powered.

So, for some runs, the Mars transportation system can rely on Hyperloop style conveyance.  Perhaps it’s only used to ship the various mining materials from the fields to the processing plants?  The humans can drive around in slower golf carts on short runs.

That’s the crux of how I see things unfolding for the Musketeers.  Think of everything in the context of a Mars colony.  That will drive habitation, transportation, energization, and all sorts of other ations.  In the coming years, I would expect One Musk entity or another to get more into food growth, construction, and even create an amusement part somewhere inhospitable, like the ocean floor, or the middle of the desert, in order to explore and develop concepts related to life on Mars.

That’s my view on this modern day rocket man.  At the very least, he’s inspiring a generation of thinkers and tinkers to go after this modern day moon shot.  No doubt a lot will come of it, if we don’t drown or explore ourselves first.


Splunking Windows – Extracting pleasure from legacy apis

If you are a modern programmer of Windows apps, there are numerous frameworks for you, hundreds of SDKs, scripted wrappers, IDEs to hide behind, and just layers upon layers of goodness to keep you safe and sane.  So, when it comes to using some of the core Windows APIs directly, you can be forgiven for not even knowing they exist, let alone how to use them from your favorite environment.

I’ve done a ton of exploration on the intricacies of the various Linux interfaces, Spelunking Linux goes over everything from auxv to procfs, and quite a few in between.  But, what about Windows?  Well, I’ve recently embarked on a new project lj2win32 (not to be confused with earlier LJIT2Win32).  The general purpose of this project is to bring the goodness of TINN to the average LuaJIT developer.  Whereas TINN is a massive project that strives to cover the entirety of the known world of common Windows interfaces, and provides a ready to go multi-tasking programming environment, lj2win32 is almost the opposite.  It does not provide its own shell, rather it just provides the raw bindings necessary for the developer to create whatever they want.  It’s intended to be a simple luarocks install, much in the way the ljsyscall works for creating a standard binding to UNIX kinds of systems without much fuss or intrusion.

In creating this project, I’ve tried to adhere to a couple of design principles to meet some objectives.

First objective is that it must ultimately be installable using luarocks.  This means that I have to be conscious about the organization of the file structure.  To wit, everything of consequence lives in a ‘win32’ directory.  The package name might ultimately be ‘win32’.  Everything is referenced from there.

Second objective, provide the barest minimum bindings.  Don’t change names of things, don’t introduce non-windows semantics, don’t create several layers of class hierarchies to objectify the interfaces.  Now, of course there are some very simple exceptions, but they should be fairly limited.  The idea being, anyone should be able to take this as a bare minimum, and add their own layers atop it.  It’s hard to resist objectifying these interfaces though, and everything from Microsoft’s ancient MFC, ATL, and every framework since, has thrown layers of object wrappers on the core Win32 interfaces.  In this case, wrappers and other suggestions will show up in the ‘tests’ directory.  That is fertile ground for all manner of fantastical object wrapperage.

Third objective, keep the dependencies minimal.  If you do programming in C on Windows, you include a couple of well known headers files at the beginning of your program, and the whole world gets dragged in.  Everything is pretty much in a global namespace, which can lead to some bad conflicts, but they’ve been worked out over time.  In lj2win32, there are only a couple things in the global namespace, everything else is either in some table, or within the ffi.C facility.  Additionally, the wrappings are clustered in a way that follows the Windows API Sets.  API sets are a mechanism Windows has for pulling apart interdependencies in the various libraries that make up the OS.  In short, it’s just a name (so happens to end in ‘.dll’) which is used by the loader to load in various functions.  If you use these special names, instead of the traditional ‘kernel32’, ‘advapi32’, you might pull in a smaller set of stuff.

With all that, I thought I’d explore one particular bit of minutia as an example of how things could go.

The GetSystemMetrics() function call is a sort of dumping ground for a lot of UI system information.  Here’s where you can find things like how big the screen is, how many monitors there are, how many pixels are used for the menu bars, and the like.  Of course this is just a wrapper on items that probably come from the registry, or various devices and tidbits hidden away in other databases throughout the system, but it’s the convenient developer friendly interface.

The signature looks like this

int WINAPI GetSystemMetrics(
_In_ int nIndex
);

A simple enough call. And a simple enough binding:

ffi.cdef[[
int GetSystemMetrics(int nIndex);
]]

Of course, there is the ‘nIndex’, which in the Windows headers is a bunch of manifest constants, which in LuaJIT might be defined thus:

ffi.cdef[[
	// Used for GetSystemMetrics
static const int	SM_CXSCREEN = 0;
static const int	SM_CYSCREEN = 1;
static const int	SM_CXVSCROLL = 2;
static const int	SM_CYHSCROLL = 3;
static const int	SM_CYCAPTION = 4;
static const int	SM_CXBORDER = 5;
static const int	SM_CYBORDER = 6;
]] 

 
Great. Then I can simply do

local value = ffi.C.GetSystemMetrics(ffi.C.SM_CXSCREEN)

 
Fantastic, I’m in business!

So, this meets the second objective of bare minimum binding. But, it’s not a very satisfying programming experience for the LuaJIT developer. How about just a little bit of sugar? Well, I don’t want to violate the same second objective of non-wrapperness, so I’ll create a separate thing in the tests directory. The systemmetrics.lua file contains a bit of an exploration in getting of system metrics.

It starts out like this:

local ffi = require("ffi")
local errorhandling = require("win32.core.errorhandling_l1_1_1");

ffi.cdef[[
int GetSystemMetrics(int nIndex);
]]

local exports = {}

local function SM_toBool(value)
	return value ~= 0
end

Then defines something like this:

exports.names = {
    SM_CXSCREEN = {value = 0};
    SM_CYSCREEN = {value = 1};
    SM_CXVSCROLL = {value = 2};
    SM_CYHSCROLL = {value = 3};
    SM_CYCAPTION = {value = 4};
    SM_CXBORDER = {value = 5};
    SM_CYBORDER = {value = 6};
    SM_CXDLGFRAME = {value = 7};
    SM_CXFIXEDFRAME = {value = 7};
    SM_CYDLGFRAME = {value = 8};
    SM_CYFIXEDFRAME = {value = 8};
    SM_CYVTHUMB = {value = 9};
    SM_CXHTHUMB = {value = 10};
    SM_CXICON = {value = 11};
    SM_CYICON = {value = 12};
    SM_CXCURSOR = {value = 13};
    SM_CYCURSOR = {value = 14};
    SM_CYMENU = {value = 15};
    SM_CXFULLSCREEN = {value = 16};
    SM_CYFULLSCREEN = {value = 17};
    SM_CYKANJIWINDOW = {value = 18, converter = SM_toBool};
    SM_MOUSEPRESENT = {value = 19, converter = SM_toBool};
    SM_CYVSCROLL = {value = 20};
    SM_CXHSCROLL = {value = 21};
    SM_DEBUG = {value = 22, converter = SM_toBool};
    SM_SWAPBUTTON = {value = 23, converter = SM_toBool};
    SM_RESERVED1 = {value = 24, converter = SM_toBool};
    SM_RESERVED2 = {value = 25, converter = SM_toBool};
    SM_RESERVED3 = {value = 26, converter = SM_toBool};
    SM_RESERVED4 = {value = 27, converter = SM_toBool};
}

And finishes with a flourish like this:

local function lookupByNumber(num)
	for key, entry in pairs(exports.names) do
		if entry.value == num then
			return entry;
		end
	end

	return nil;
end

local function getSystemMetrics(what)
	local entry = nil;
	local idx = nil;

	if type(what) == "string" then
		entry = exports.names[what]
		idx = entry.value;
	else
		idx = tonumber(what)
		if not idx then 
			return nil;
		end
		
		entry = lookupByNumber(idx)

        if not entry then return nil end
	end

	local value = ffi.C.GetSystemMetrics(idx)

    if entry.converter then
        value = entry.converter(value);
    end

    return value;
end

-- Create C definitions derived from the names table
function exports.genCdefs()
    for key, entry in pairs(exports.names) do
        ffi.cdef(string.format("static const int %s = %d", key, entry.value))
    end
end

setmetatable(exports, {
	__index = function(self, what)
		return getSystemMetrics(what)
	end,
})

return exports

All of this allows you to do a couple of interesting things. First, what if you wanted to print out all the system metrics. This same technique can be used to put all the metrics into a table to be used within your program.

local sysmetrics = require("systemmetrics");

local function testAll()
    for key, entry in pairs(sysmetrics.names) do
        local value, err = sysmetrics[key]
        if value ~= nil then
            print(string.format("{name = '%s', value = %s};", key, value))
        else
            print(key, err)
        end
    end
end

OK, so what? Well, the systemmetrics.names is a dictionary matching a symbolic name to the value used to get a particular metric. And what’s this magic with the ‘sysmetrics[key]’ thing? Well, let’s take a look back at that hand waving from the systemmetrics.lua file.

setmetatable(exports, {
	__index = function(self, what)
		return getSystemMetrics(what)
	end,
})

Oh, I see now, it’s obvious…

So, what’s happening here with the setmetatable thing is, Lua has a way of setting some functions on a table which will dictate the behavior they will exhibit in certain situations. In this case, the ‘__index’ function, if it exists, will take care of the cases when you try to look something up, and it isn’t directly in the table. So, in our example, doing the ‘sysmetrics[key]’ thing is essentially saying, “Try to find a value with the string associated with ‘key’. If it’s not found, then do whatever is associated with the ‘__index’ value”. In this case, ‘__index’ is a function, so that function is called, and whatever that returns becomes the value associated with that key.

I know, it’s a mouth full, and metatables are one of the more challenging aspects of Lua to get your head around, but once you do, it’s a powerful concept.

How about another example which will be a more realistic and typical case.

local function testSome()
    print(sysmetrics.SM_MAXIMUMTOUCHES)
end

In this case, the exact same mechanism is at play. In Lua, there are two ways to get a value out of a table. The first one we’ve already seen, where the ‘[]’ notation is used, as if the thing were an array. In the ‘testSome()’ case, the ‘.’ notation is being utilized. This is accessing the table as if it were a data structure, but it’s exactly the same as trying to access as an array, at least as far as the invocation of the ‘__index’ function is concerned. The ‘SM_MAXIMUMTOUCHES’ is taken as a string value, so it’s the same as doing: sysmetrics[‘SM_MAXIMUMTOUCHES’], and from the previous example, we know how that works out.

Now, there’s one more thing to note from this little escapade. The implementation of the helper function:

local function getSystemMetrics(what)
	local entry = nil;
	local idx = nil;

	if type(what) == "string" then
		entry = exports.names[what]
		idx = entry.value;
	else
		idx = tonumber(what)
		if not idx then 
			return nil;
		end
		
		entry = lookupByNumber(idx)

        if not entry then return nil end
	end

	local value = ffi.C.GetSystemMetrics(idx)

    if entry.converter then
        value = entry.converter(value);
    end

    return value;
end

There’s all manner of nonsense in here. The ‘what’ can be either a string or something that can be converted to a number. This is useful because it allows you to pass in symbolic names like “SM_CXBLAHBLAHBLAH” or a number 123. That’s great depending on what you’re interacting with and how the values are held. You might have some UI for example where you just want to use the symbolic names and not deal with numbers.

The other thing of note is that ‘entry.converter’ bit at the end. If you look back at the names table, you’ll notice that some of the entries have a ‘converter’ field associated with them. this is an optional function that can be associated with the entries. If it exists, it is called, with the value from the system called passed to it. In most cases, what the system returns is a number (number of mouse buttons, size of screen, etc). In some cases, the value returned is ‘0’ for false, and ‘non-zero’ for true. Well, as a Lua developer, I’d rather just get a bool in those cases where it’s appropriate, and this helper function is in a position to provide that for me. This is great because it allows me to not have to check the documentation to figure it out.

There’s one more tiny gem hidden in all this madness.

function exports.genCdefs()
    for key, entry in pairs(exports.names) do
        ffi.cdef(string.format("static const int %s = %d", key, entry.value))
    end
end

What does this do exactly? Simply, it generates those constants in the ffi.C space, so that you can still do this:

ffi.C.GetSystemMetrics(ffi.C.SM_MAXIMUMTOUCHES)

So, there you have it. You can go with the raw traditional sort of ffi binding, or you can spice things up a bit and make things a bit more useful with a little bit of effort. I like doing the latter, because I can generate the more traditional binding from the table of names that I’ve created. That’s a useful thing for documentation purposes, and in general.

I have stuck to my objectives, and this little example just goes to prove how esoteric minute details can be turned into approachable things of beauty with a little bit of Lua code.


Is there life yet in Windows Client?

Full Disclosure, as usual:  I am currently employed by Microsoft, and have been for the past 18 years.

I came across the announcement for the Surface Studio today.  This reminded me of a talk Steve Ballmer gave to several groups across the company back in the day.  The question from the audience was “what do you see coming in the future…”.  At that time, he said a lot more voice, eye tracking, bigger screens, just more and different forms of input and interaction.  Say what you will about Steve Ballmer, but we did have a vision of how the client side consumer devices might unfold.  Of course, we did kind of miff the early phases of the mobile computing thing, and had a few missteps on the tablet band wagon, but here we are.

I have never used the Surface Studio, but it looks very interesting to me.  My toddler children ( 1 and 3) are growing up in a world of touch screens, tablets, and content delivery and interaction devices from 2.5″ to 45″.  This is their world.  I’d love to buy one of those Surface Studio devices if for no other reason than to put it in their play room so they could pull up various games and video content.  I could cobble together the same using a Dell all in one, but this one looks really cool.

There’s something else going on here though.  Often times I’m a consumer like anyone else.  I have several products from the fruit company (not their phone) and I like them.  I don’t allow my house to go fully into their walled garden though, because I’m just contrarian, so, we have plenty of MS, Linux, Android as well.  Different devices for different functions.  What’s going on though is a revival in my way of thinking.

If I read too much of the stuff on Hacker News and the like, I begin to believe the Windows client is irrelevant.  To some extent that is true.  The apps that I use are far more important than the OS that’s running them.  These days, it’s Plex, or Kodi, or whatever is running Netflix.  Typically just a web browser on a decent media machine is required.  Same goes for email, and web browsing, and even dev code editing.  The underlying OS simply doesn’t matter.  But, now there are new devices with new capabilities.

It’s not that MS Windows is what I desire, it’s that I desire to run that Surface Studio “App” if you will, and it so happens to be run using Windows.  Same goes for HoloLens.  I don’t really care if HoloLens is running atop Linux or FreeRTOS, but it so happens to be running on Windows.  Windows running on a Raspberry Pi isn’t quite as exciting, but these other ones are.  If I want to do VR, I’m sure to get my hands into Windows, because that’s the OS that has the most VR stuff going on.  If I want to get into the creatives, and I’m not locked into Apple, then Windows again, driven by things like this Surface Studio.

It’s a strange feeling.  I like bashing Windows as much as the next guy, largely because as a share holder, I want it to get better.  The company seems to be showing some nice innovations in form factors, and pushing the envelope in terms of new forms of interaction and consumption.  This is enough for me to hold on to my nokia windows phone just a little bit longer in anticipation of the exciting next new thing from Microsoft.

I know, strange, isn’t it?


The Plot for American Politics

I’ve been scratching my head quite a bit (perhaps due to hair loss) trying to figure out what’s going on with American politics.  Then, last night, it finally occurred to me.

Whomever is scripting the thing is a fan of Jim Carrey movies!

I mean, here are the titles of some of the movies which I think apply the most to what I’ve seen over the past few months.

  • Dumb and Dumber
  • Liar Liar
  • Yes Man
  • The Mask
  • Kick Ass
  • The Truman Show

Dumb and Dumber (1994) is exceptional because it even has a sequel “Dumb and Dumber To”.  That one really gets me because the first movie was such an amazingly unbelievable premise, that I just kind of stared at the screen dumb founded at what I was watching, but unable to pull myself away.  Then, it was followed up 20 years later by the same shenanigans.  So far I’ve managed to resist and not watch the sequel.  It was amazing to see that it was made, and every time I saw the trailer I thought, ‘What?  Did these guys have children who are reprising the roles of their parents?”, but no, it was the same guys again.

Liar Liar… Well, they are aspiring politicians.  Only, in the Jim Carrey movie, the protagonist always has a heart of gold, love wins out, and everything is alright.  But really, doesn’t it even bother people how much absolute falsehoods are thrown about during these elections.  I don’t mean the typical bending of the truth, I mean absolute fabrications and denials of ‘facts’.  In this age of Twitter, WikiLeaks, and cells phones on every corner, it’s becoming harder and harder to hide from the manufactured truth.

Yes Man. There’s nothing extraordinary about Yes Man in terms of the movie, other than the title.  I mean isn’t it obvious.  The candidates are surrounded by apologists, supporters, and frankly “Yes Men”.  That’s how they’re goaded on and enabled in whatever actions they take.  There’s always someone standing by ready to support their actions with a hearty heart felt “Yes sir/mam!  You’re absolutely right!”.  Although, the opposite also seems true in the current election cycle as one candidate has had a stream of supporters abandon his missteps while his most fervent supporters are still saying “Yes!”.  It’s kind of like when the Sith lord is telling Luke Skywalker (in a slow slithery voice) “yeesssss…..  Feel the power of the dark side coursing through you…”

The Mask – Well, this one is too obvious, just like Yes Man.  Who are we really?  We all are trying to hide something.  The power of the mask is to amplify who we really are.  In most recent weeks, due to the amplification power of modern media, and digital archives, we’ve been able to see who our candidates really are.  One of them turns out to be this horn dog monster of a character who thinks “there’s always time for one last kiss!”.  The other’s true self is almost overwhelmed by access to power, but really means well.

Kick Ass 2 – I’ve never seen this one, but the synopsis seems to be in keeping with our troubled politicians.  Basically someone is trying to do good, but the nasty villain keeps rearing their ugly head at inopportune times.  In this case, the villain might be in the form of foreign powers.  Just as we are trying to reap the rewards of the end of the cold war, they just keep showing up to ruin our basking in the flow of our own importance.

The Truman Show – This one, more than any of the others, really does put things in perspective.  In 1998, this movie was about a guy who grows up in a false reality.   This movie predates survivor by 2 years, and “The Apprentice” by 10, so I’ll call it the first true reality show.  It’s the ultimate in voyeurism.  A guy who grows up, owned by a corporation, and knows no truths other than those that are within his little bubble of existence.  The whole world is in on the joke, except Truman himself.  This has so many  parallels to where we are and where we’re headed.  I have no doubt there will be a reality show about getting to the presidency.  All emails, all contacts, all meetings, will be recorded and broadcast as we follow our “candidates” as they race towards their date with destiny, and the chance to serve the American people.  The ultimate politician will simply be an entertainer.  The governing part of politics will be executed by various “producers”, and a “staff”, which rotates through the show.

I get it.  Good joke!

All that remains for election 2016 is to see if the finishing plot is more in lines with “Bruce Almighty” or “The Grinch”.

 


Building a Tower PC – 2016, part 1

Last time around, I outlined what would go into my build.  This time, I’ve actually placed the order for the parts.  I was originally going to place with newegg, but the motherboard was out of stock.  This forced me to consider amazon instead.  Amazon had everything, and at fairly decent prices.  That plus prime shipping, and good return policy, made it a relative no brainer (sorry newegg).

I did a hand wave on some of the parts in the last post, so I’ll round out the inventory in detail here.

RAM 

this item used to require a ton of thought in the past, but today, you can spit in generally the right direction and things will likely work out.  I wanted to outfit my rig with 64GB total ram.  I wanted RAM that was reliable and looked good.  I probably should have gone for some red colored stuff, but I went with the black G.SKILL Ripjaws V Series DDR4 PC4-25600 3200MHz parts (model F4-3200C16D-32GVK).

Image result for g.skill 32gb (2 x 16gb) ripjaws v series ddr4 pc4-25600

They come in sets of two (32GB per set), so I ordered two sets.  Who knows, maybe I’ll get lucky and they’ll be red.

SSD Storage

I know from my laptop, and my current Shuttle PC that having a SSD as your primary OS drive is an absolute must these days.  Please, no 5400 RPM spinning rust!  On this item, I chose the Samsung V-NAND SSD 950 Pro M.2 NVM Express 256 GB.

Image result for samsung 950 pro series - 256gb pcie nvme
What’s this NVMe thing anyway?  Well, turns out that flash disks are way faster than spinning rust (go figure), and yet we’ve been constrained to the spinning rust interfaces and data transfers of old for quite some time.  NVME represents a different interface to the flash memory, going way beyond what Sata can provide.  Luckily, the chosen motherboard supports this interface, so I should be able to boot up from this super fast thing.  I probably should have gone for the 512GB version, but things being the way they are, I can probably install a much larger 1TB version in 3 year’s time for the same price.  This will be more than good enough for now, and for the forseeable future.
Mass Storage
I did get some spinning rust to go in the box as well.  Western Digital Black 2TB – WD2003FZEX (7200 RPM SATA 6 Gb/s).
Image result for wd2003fzex
I have a pair of these spinning away in my Synology NAS, and they haven’t failed in the past 4 years, so I think I’m good with this.  I could have gone with a bigger size, like 6TB, but I’m thinking why put so much storage on a single disk.  Better to spread the load across several disks.  As long as I’m spreading the load across several disks, why not just use a giant NAS with an optical link, or 10Gbit ethernet or something.  As this machine is going to find multiple uses with multiple OSes, I didn’t feel the need to make it a storage monster.  Rather, it is a show piece, workstation with decent performance.  More specialization can come through additional equipment outside the box.
I have yet to consider my cooling options.  When the boxes arrive, I’ll assemble once just to make sure all the parts work.  I’ve been eyeing some cool looking Thermaltake liquid cooling gear.  I’m considering the whole reservoir/pump/tubing thing.  It looks cool, and there are ready made kits that look fairly easy to assemble.  The open case I’ve chosen just begs to be mod’d with the liquid cooling stuff.
At any rate, boxes should arrive in a week.  I took advantage of the Amazon offer to get $5.99 gift certificates towards using their pantry service instead of getting next day delivery.  How crazy is that!  I figure I won’t be able to assemble until next week anyway, so why not get some free stuff from Amazon in payment for my patience.
Having this kit arrive will be an incentive to further clean up my office (man cave) so that I’ll have enough desk and floor space to spread things out, take pictures, and assemble without losing any of the pieces.

Building a tower PC – 2016

Well, since I’m no longer interested in building the ultimate  streaming PC, I’ve turned my attention to building a more traditional tower PC.  What?  Those are so 1980!  It’s like this.  What I’m really after is using the now not so new Vulkan API for graphics programming. My current challenge is, my nice tighty Shuttle PC doesn’t have the ability to run a substantial enough graphics card to try the thing out! I do in fact have a tower PC downstairs, but it’s circa 2009 or something like that, and I find this a rather convenient excuse to ‘upgrade’.

I used to build a new PC every two years, back in the day, but tech has moved along so fast, that it hardly makes sense to build so often, you’d be building every couple of months to keep pace. The machines you build today will last longer than an old hardware hacker cares to admit, but sometimes you’ve just go to bite the bullet.

Trying to figure out what components to use in a current build can be quite a challenge. It used to be that I’d just go to AnandTech and look at this years different builds, pick a mid-range system, and build something like that. Well, AnandTech is no longer what it used to be, and TomsHardware seems to be the better place for the occasional consumer such as myself.

The first thing to figure out is the excuse for building the machine, then the budget, then the aesthetics.

Excuse:  I want to play with the Vulkan graphics API

Budget: Less than $2,000n (to start ;-))

Aesthetics: I want it to be interesting to look at, probably wall or furniture mounted.

Since the excuse is being able to run the Vulkan API, I started contemplating the build based on the graphics card.  I’m not the type of person to go out and buy any of the most current, most expensive graphics cards, because they come out so fast that if you simply wait 9 months, that $600 card will be $300.  The top choice in this category would be a NVidia GTX 1080.  Although a veritable beast of a consumer graphics card, at $650+, that’s quite a budget buster.  Since I’m not a big gamer, I don’t need super duper frame rates, but I do want the latest features, like support of Direct X12, Vulkan, OpenGL 4.5, etc.

A nice AMD alternative is the AMD Radeon Rx 480.  That seems to be the cat’s meow at the more reasonable $250 price range.  This will do the trick as far as being able to run Vulkan, but since it’s AMD and not NVidia, I would not be able to run Cuda.  Why limit myself, since NVidia will also run OpenCL.  So, I’ve opted for an NVidia based MSI GeForce GTX 1060.

The specialness of this particular card is the 6GB of GDDR5 RAM that comes on it.  From my past history with OpenGL, I learned that the more RAM on the board the better.  I also chose this particular one because it has some red plastic on it, which will be relevant when I get to the aesthetics.  Comparisons of graphics cards abound.  You can get stuck in a morass trying to find that “perfect” board.  This board is good enough for my excuse, and at a price that won’t break the build.

Next most important after the graphics card is the motherboard you’re going to stick it in.  The motherboard is important because it’s the skeleton upon which future additions will be placed, so a fairly decent board that will support your intended expansions for the next 5 years or so would be good.

I settled on the GIGABYTE G1 Gaming GA-Z170X-Gaming GT (rev. 1.0) board.

It’s relatively expensive at $199, but it’s not outrageous like the $500+ boards.   This board supports up to three graphics cards of the variety I’m looking at, which gives me expansion on that front if I every choose to use it.  Other than that, at least 64GB of DDR4 RAM.  It has a ton of peripherals, including USB 3.1 with a type-c connector.  That’s good since it’s emerging.  Other than all that, it has good aesthetics with white molding and red highlights (sensing a theme).

To round out the essentials, you need a power supply.  For this, I want ‘enough’, not overkill, and relatively silent.

The Seasonic Snow Silent 750 is my choice.  Besides getting relatively good reviews, it’s all white on the outside, which just makes it look more interesting.

And last, but not least, the CPU to match.  Since the GPU is what I’m actually interested in, the CPU doesn’t matter as much.  But, since I’m not likely to build another one of these for a few years, I might as well get something reasonable.

I chose the intel i7-6700K for the CPU.

Image result for core i7-6700k

At $339, it’s not cheap, but again, it’s not $600.  I chose the ‘K’ version, to support overclocking.  I’ll probably never actually do that, but it’s a useful option nonetheless.  I could have gone with a less expensive i5 solution, but I think you lose out on hyper-threading or something, so might as well spend a $100 more and be slightly future proof.

Now, to hold all these guts together, you need a nice case.  I already have a very nice case housing the circa 2009 machine.  I can’t bring myself to take it apart, and besides, I tell myself, it doesn’t have the io access on the front panels required of a modern machine.  Since part of my aesthetic is to be able to show the guts of the machine (nicely themed colors), I went with something a bit more open.

The Thermaltake core P5 ATX Open Frame case is what I have chosen.

Image result for thermaltake core p5 atxNow, I’m more of a throw it together and start using it kind of builder, but putting a little bit of flash into the build could make it a tad more interesting.  Less heat dissipation problems, and if I ever do that cool liquid cooling piping stuff, I’ll be able to show it off.  This case also has options to mount it against the wall/furniture, and I’ll probably take advantage of that.  I can imagine having a home office desk with a couple of these mounted on the front just for kicks.  Thrown in a few monitors for surround, and… Oh, but I’m not a gamer.

The rest of the kit involves various memory, storage, etc.  The motherboard has M.2 as well as mSata.  So, I’ll probably put an SSD on one of those interfaces as the primary OS drive.  Throw in a few terabytes of spinning rust, and 64GB of RAM, and it’s all set.

The other nice thing about the motherboard is dual NICs.  One is for gaming, the other (intel) is for more pedestrian networking.  This can be nothing but goodness, and I’m sure I can do some nice experimenting with that.

Well, that’s what I’m after.  I added it all up on newegg.com, and it came out to about $1,500, which is nicely under budget, and will give me a machine I can be happy with for a few years to come.

 

 


Home Theatre PC Redux

A number of years ago I purchased my first barebones Shuttle PC.  At the time, it was about the size of two stacked shoe boxes, which was quite compact compared to the behemoth desktops circa 2005.  I had ideas of streaming media from it, using it as a home media center.  Microsoft even had a home centric OS, and attendant software.

It never really took off in that regard, and I ended up just using the machine as a standard browsing desktop for a few years.  Now, it finds itself in the garage, holding up various bits and pieces, not getting any action.

There has been a whole thing in the industry about creating quiet PCs.  From power supplies to fans, to specialized cases, motherboards, and the like.  All in search of that perfect PC that can sit in the living room, unobtrusively, serving up media to the giant glass TV monitor above it.

Then along came XBMC.  Oddly enough, first introduced on the Xbox to stream media content.  Soon enough XBMC found its way to the standard PC, and subsequently to Operating Systems other than Windows.  XBMC became Kodi, and here we sit today.

A couple of years back, I purchased a minix X8-H.  Again, for the day, it was quite a nifty little device, that could stream media.  But, ‘streaming media’, and servicing home media content needs has boiled down to a couple of things.  First of all, netflix, and thus a Roku or other standard media devices, are the norm these days.  For roughly $50 you can get a device that will stream all the standard network based streams that exist, from hulu, to netflix, TED Talks, NFL, or whatever.  Of course, these media devices are essentially the new “set top box” for the age where cable bundles are dwindling, and you get to pay $5-$10 per month per channel you really want.

Well, there you go, problem solved, we can all go home now…

In summary, media consumption has turned into an internet based thing, where the differentiators are things like 4K streams vs HD, amount of memory (to minimize stalls), and the quality of the sound output.  It’s no longer a question of CPUs (ARM is dominant), nor the OS (Android is dominant).  It’s not even a matter of the software (proprietary or Kodi, and that’s it).

There is a tributary off this main stream though.  That is, once you get into Kodi as your player, you’ve opened up a world of possibilities.  I can stream all of my DVDs that I backed up to my NAS.  I can get all the media content from the internet, I can stream live events, watch local television, etc.  This is even greater as I can watch whatever content I want, pay whatever price I want, and not have a single concern for the quality of the content, nor the cost of the device.  That’s all great.

So, I recently went back to the minix site just to see how they were getting along.  Lo and behold, the media players are no longer front and center, but instead, there are ‘miniature’ PCs, like the ngc-1.  This is a Windows 10 PC in the same form factor as those tiny media player boxes.  I found it on Amazon for $299.  Given the price of tablets and laptops these days, this is right in there with a typical low end machine.  It is loaded with features though, like dual-AC wireless, 4K video, 128Gb SSD, and the like.  It’s no slouch, even if it’s not the best bitcoin mining device.  This paired with a reasonable couple of monitors makes for a great interactive PC for toddlers (who destroy laptops in a second).

This is  a new breed.  I’m thinking of getting one to act as my desktop “command” computer.  You know, stick it on the top of my desk, or the back of one of my monitors, and just use it to remote desktop into other machines as I need to.

As a long time PC builder, my first reaction is, “I’m sure I could throw this together cheaper”, but the truth is I can’t.  I can even purchase the components any cheaper, and they put it in a nice solid metal case, which I could not manufacture.  I think we’ve reached the state where the PCs are almost commodity, and you can pretty much purchase one every year, and just attach them to whatever display you so happen to have.  Those 17″ displays that you find in your work room, put a media stick (roku stick or chrome cast or whatever).  For the bigger glass, like your Costco special 60″ tv, put one of the large media PCs that are capable of 4K display and have a bit more media handling capability.  For your main desktop machine, the one you use in your cave for viewing lots of different kinds of content other than movies, put one of these new nano scale PCs.  Stick a console gaming rig, or heavy duty PC on your midrange display for gaming.

My journey with media center PCs began roughly 12 years ago, and I can say, that journey has pretty much ended today.  I’ll still fiddle about with the likes of an Odroid C2 for media streaming, but really, when it comes time to watch football, or the latest netflix bing season watching thing, it’s going to be a standard media device (likely rook) on the 50″ in the living room.

Media PC pursuit, rest in peace, long live the media PC!