TIL: Hive And C#

I work in a .NET shop, meaning that our developers focus primarily on writing C# code.  I’m introducing Hadoop more and more into this environment, but I know it’s an easier road if I can reduce the number of unfamiliar languages.

To that end, I was happy to learn that Randy Gelhausen has a project which integrates C# code (either Microsoft C# or Mono) with Hive.

My function-writing skills in Hive are weak, but the knowledge that this exists is pretty cool.

Why I’m giving up on Morrowind (again)

I learned a new internet acronym the other day: FOMO, or Fear of Missing Out. It’s the phenomenon that occurs when everybody talks about a new form of entertainment, be it movie, TV show, music, comic book, video game, etc., and you don’t want to be left out of the conversation. As a result, you consume media you would not normally consume just so that you can keep up with the virtual Joneses.

I’ve documented my love/hate relationship with Morrowind in the past. I played it a long time ago, found it arcane and confusing, then never played it again. I got further in this time before tapping out. The main reason I’ve uninstalled this time is to free up hard drive space, but a few things still bother me about the game.

One of the biggest problems is a problem that existed in the original Witcher (which I loved): trying too hard to abstract D&D combat rules. There is little skill in combat. You approach a bad guy and click buttons until they are dead. There is little strategy. Because magic can (and does) fail, it’s an unreliable weapon at best.Archery seems suboptimal because aiming is strange; I can’t always predict what will hit and what won’t, which some might call a feature, but it means that every time you loose an arrow, you could be incurring monster wrath for no benefit.

Stamina is my other major complaint. It’s too limiting. Every action in the game uses stamina to a greater or lesser degree, so if you don’t carry lots of potions, you’re more or less screwed. You don’t heal over time, which also makes potions vitally necessary, especially since if you cast a healing spell and the spell fails, you lose stamina, which makes you more vulnerable, ad nauseam. Later Elder Scrolls games did away with this (entirely appropriately, IMO). Mods can correct this latter problem, and if/when I do reinstall the game, I will certainly consider more mods.

The reason I keep coming back to the game is mostly FOMO at this stage. Some people I know love Morrowind and speak very highly of it. I can see glimpses, here and there, of why they enjoy it. The world is small but dense and surprisingly detailed. Perhaps if Skywind is ever finished I’ll come back to Morrowind, but for now, I’ve got other games to play.

Thoughts on Stellaris and game design

It’s been out now for about two weeks, but this is the first chance I’ve had to write about Stellaris, the space 4X/grand strategy developed by Paradox Development Studios. If you haven’t played a PDS game yet, Stellaris is very accessible, more so than almost any other game PDS has ever done (Crusader Kings II is the possible exception). It’s, overall, an excellent compromise between complex systems and presenting those systems in a logical way. The basic premise is that you control a race of your choosing (which includes species and all manner of personality traits) and explore the galaxy, sometimes fighting, sometimes sciencing, sometimes discussing trade.

It’s extremely polished and relatively bug-free. I had one persistent error that had an easy workaround (play the game in windowed mode) and has since been hotfixed. The next two Stellaris patches, codenamed Clarke and Asimov, are going to address some balancing issues, add meat to the mid-game, and generally improve the UI.

The mid-game is currently Stellaris’s greatest weakness. There’s tons to do in the early game and the end game, but not in the middle. I was glad to hear about end game work, which is persistently a weakness of PDS games (depending on your play style), but the mid game just doesn’t have a lot to do. I’m at a point where I’m waiting to develop new technology so I can keep expanding my interstellar empire, but my management is mostly negligible. I’m thriving and have hit my colonization limit. The only power in the game that could threaten me is my ally (and the Fallen Empires, which are very scary but thankfully very far away). There’s tons of space to expand to (pun definitely intended) but said expansion has slowed to a crawl because I can’t directly colonize and accumulating influence enough to build frontier stations is a matter of watching the clock tick.

Influence is the game mechanic that I find most frustrating. It’s almost always in short supply, yet there’s little a player can do to increase the amount (and a lot you can do to decrease it). You just get your drip of four or five points a month (a frontier station is 200 points, so that’s over four years to get a new one, roughly 20 minutes to a half hour real time). Other PDS games have mechanics like this, such as EUIV, but there’s still tons to do in those games. There are three such “buckets” (if you will) in EUIV, but they’re staggered, and there’s more you can do to increase the drip. Not so in Stellaris.

I understand the desire to reduce blobbing (where one empire or another gets too big), and hopefully future patches will flesh out the mid game, but for now, while I do like Stellaris, it’s currently partially shelved. For those curious, I’m on an adventure game kick, currently playing through Broken Age on PS4, after getting a platinum trophy in GTA 3 and dabbling in Vice City.

TIL: Installing Jupyter On Windows

Installing Jupyter on Windows isn’t too difficult.  Here is a product-by-product guide.  Each program is just simple next-next-next clicking so I’m not going to include screenshots or step-by-step installation instructions.

Install R

There are two versions of R available, CRAN R and Microsoft R Open.  You can grab either of them at the provided links.  If you do install Microsoft R Open, you should probably also install the mathematical libraries.

Install R Studio

R Studio isn’t technically required, but it’s extremely useful to have a good IDE installed. Jupyter is fantastic for giving people a repeatable method of running your code, but you want to have something you can do quick tests against.  Grab R Studio.  You can also try R Tools for Visual Studio.

Install Anaconda

The easiest way to install Jupyter is to install Anaconda.  If you don’t have Python installed on your machine already, you can grab and install this full-featured suite.

Install Jupyter

Once you have Anaconda installed, you can install Jupyter by running the following command at your console:

conda install jupyter

Install R Support

The last step is to include R support in Jupyter.  This is pretty simple:

conda install -c r ipython-notebook r-irkernel

Once you’ve done all of these, you have Jupyter installed!  To kick off Jupyter, run the following:

jupyter notebook

If you want to test your Jupyter installation, I have a couple of notebooks available that I’m going to use in my Polyglot .NET Meetup tonight:

  1. Basic R Test
  2. Wake County Restaurant Inspections

TIL: PNGGauntlet

I had no idea how much space I was wasting on uncompressed PNGs.  Then I tried PNGGauntlet, a free program which losslessly shrinks PNGs.  I ran it through a screen shot I took and cropped in Paint, and the file shrunk from 85K to 60K.

That doesn’t sound like a huge improvement, but it’s a free 30% drop in size.  On a website with a lot of images, 30% less bandwidth can certainly add up to real savings.  Even if it doesn’t, making your page load faster leads to a better experience for users, especially on mobile phones.

My plan is to start running images through this and reaping the compression benefits.

TIL: Power BI

Last night, I had my first hands-on experience with Power BI.  I’ve read quite a bit about it (especially given all of the Curated SQL articles on the topic), but tonight was my first hands-on experience thanks to the newly-formed Power BI user group.

Using data from the first lab (an Access database with US sales, a set of CSVs with international sales, and an Excel spreadsheet with population data), I was able to put together a couple of simple dashboard components:


In this simplistic dashboard, I have a stacked bar chart with populations from five countries over time.  Of interest is that the German population has dropped slightly between 1999 and 2014.  I also have a couple of text widgets with total revenue and total number of units sold in the US, followed by a pie chart (shaddup) showing revenue across the five foreign countries in this data set.

I have a long way to go before I can pretend to be proficient in Power BI, but considering that I did this in about 20 minutes while hacking away at a user group, I’m pretty happy with the low introductory learning curve.

TIL: Docker

Last night, I went to a local .NET User Group meetup and got my first taste of Docker.

In my case, I ended up running on Elementary OS rather than Windows, but the experience was a good one, going through the tutorials. In the end, I installed Solr and was able to load a document for indexing.  Installing nginx was also easy.

If you are interested in installing Docker in a Windows environment, start with Mano Marks’s article on the topic. You can also look at the Docker Tools for Visual Studio.