Skip navigation

The Foundation Icon Fonts 3 pack is pretty cool. Not the best selection, and way too many stupid “social & brand icons” (MySpace? Really?), but I figure if I’m going to use Foundation anyway, why not. And since I’m living in ASP.NET MVC land these days, the official way to go about adding them to my web application is to chuck them into a bundle. That’s a nice, clean way to keep things organized and optimized. So, I did it, but it didn’t work very well once pushed to Azure. The icons wouldn’t load and I got weird 404s and 500s… What gives?

Well, I spent more time than I’d care to admit trying to figure out why something I figured was going to be simple and easy… wasn’t. Here’s what I discovered it took to get those icons working in this particular environment, and I hope it saves someone a little time.


First things first, the files need to be in there, so you’ll want something like the structure I’ve got.

Then comes bundling. You could just throw it into your primary Foundation bundle, but here it is in its own. Line 10 is the real magic because of the CssRewriteUrlTransform added to Include(). It’s kind of a big deal because it forces any URLs in your CSS file to cooperate with the MVC routing. And for being so crucial, it shouldn’t have been so hard to find.

Then make sure you actually call that bundle in your BundleConfig.cs:

Same deal in your _Layout.cshtml or wherever else you may want to do it:

And finally, one more “guess the password” type of requirement (that’s my way of saying you’d probably never, ever figure it out unless someone shared it with you). In your Web.config, you need to add these MIME mappings so everything will load correctly across all browsers. Why you have to explicitly set this instead of it being default behavior is stupid and beyond my comprehension:

Happy Happy Joy Joy

There you have it. After I did those magical things and published to Azure, the icons showed up. Ridiculous.

JSON Visualizer

Kind of needed that forever ago. But hey, no more external JSON viewers for me! Woo!

AMD CPUs run really, really hot.

AMD CPUs run really, really hot.

I recently upgraded the CPU on the media center PC in our living room so we could do a little gaming when we’re tired of watching shows and stuff. The upgrade went well except for the stock cooler that came with the CPU. For the amount of sound it made, we may as well have surrounded the case with box fans and taken a leaf blower to it as well for good measure. That thing was LOUD.

I’ve never really done the aftermarket cooler thing because it’s a pain in the ass. Ripping the machine open and performing brain surgery is enough without also having to screw around with thermal paste and most likely take the whole motherboard out just for a fancy cooler. Stock’s fine, thanks. Except now it wasn’t, and I had to do something.

I ordered a Cooler Master Hyper 212 EVO because it has lots of really good reviews and seems like a safe bet. When it got here… man, I knew it was going to be tall, but it was really tall. As in I wasn’t sure I’d be able to close the case with it in there. I soldiered on though, hoping that once it was secured onto the chip, everything would be tight but alright. So out came the motherboard, off came the old thermal paste, and so forth… and yeah, no, I couldn’t close the case.



What now? Well, if you look at the heatsink, you can see 8 little copper nubs sticking out the top of it. These nubs were the only thing preventing me from closing the case — if they weren’t there, everything would be great. And so, convinced I was awesome enough to do this kind of thing after four years of generally successful home improvement projects, I took a hacksaw to the little bastards and extracted them.

A half hour or so later, I gave myself a pat myself on the back as I slid the side cover back onto the case. Score! I’m so good. After a few minutes of uptime, however, the machine shut itself off without warning. It had overheated. Hmm, that’s odd. Wonder what I did wrong?

I spent until 5:00 AM that night (morning?) trying to fix the problem. I probably cleaned and reapplied the thermal paste like six times, thinking each time I must have done a bad job that last time and that this time would be it. Nope. How about the BIOS? Maybe the fan speed is too low? Nope. I eventually concluded that I was doing everything quite correctly and that it had to be something else.

Could it be those copper tubes? Naw! They’re just pieces of copper bent in such a way that they help conduct the heat! Right? …right?

GeniusIt was, of course, the copper tubes. Butchering them eliminated a key component of the cooler according to this article I finally found. So that kind of sucked.

In the end, that cooler went in the trash and I ended up using a Logisys MC2002GX instead. It was just short enough to fit, it works, and it’s nice and quiet. But yeah, don’t mess with those damn copper tubes.

I don’t claim to be a good coder. Even less so when it comes to web development, which I consider to be icky poo-poo even with modern toys like Foundation and Knockout. My point: you’re about to see some stuff I’ve cobbled together. I don’t know if it’s any good, but I hope it helps someone.

So I’m really still a complete n00b when it comes to both Foundation and Knockout, but I’ve seen enough to know I like them both. I’ve also seen enough to have run into problems as I try to use them together. Here’s a fun one… suppose you want to use Tabs. At first glance, that’s no problem!

Nothing new or special there, and it works. Now, what if the array of Tabs might change mid-stream due to something the user’s done? You’d figure Knockout would take care of that for you like it takes care of everything else. But you’d be wrong. Well, half wrong. I think Knockout really does try. Foundation, however, is being stubborn.

Foundation and KnockoutIt’s not documented very well anywhere that I could find, but it looks like Foundation gets kind of drowsy after rendering the page, and you gotta poke it when something like this changes. I don’t know what’s special about Tabs and Accordions (yeah, it happens with them both, and possibly other stuff as well) when compared to all the other things Foundation does correctly in partnership with Knockout, but in any case, there is a solution:

Add that custom binding, and use it like so:

It took some digging to find it, but that reflow call is the poke of which I spoke. And don’t worry, it doesn’t look like it’ll really impact performance. In fact, it was written for this kind of thing. …and then never advertised.

Certainly by now we have all noticed that the global PC market is a little constipated. Or dying. Whatever. Cool kids like Dell and Sony are doing things to address this, like firing people and selling business units, respectively. Hey man, whatever you’ve got to do to stay alive, right?

Tablet Hell

The Seventh Circle of Developer Hell, no doubt.

It’s horribly short-sighted, though. While things may look bleak right now, I have a hard time believing the PC is in as much trouble as some people may suggest. While it is quite true that smartphones and tablets have arrived on the scene and are eating a lot of the market that used to be dominated by PCs, they just aren’t the best platforms for accomplishing a lot of stuff — and they never will be, which is the important part. As much fun as my wife’s Google Nexus 7 is for goofing around when I don’t feel like getting out my crusty ol’ laptop, I can’t fathom trying to do anything serious on it. To this day I still can’t type on a touchscreen… attempting to do so for any substantial amount of time makes me want to buy firearms.

That brings me to Microsoft. Microsoft does some things really well and truly deserves its success. I’m a fan. But this is one place where they completely missed the mark and need to take a step back to adjust their strategy. The numbers may or may not agree with me (I don’t know what they are), but I believe Microsoft’s great strength lies in its ability to deliver a great environment for getting things done. When I think Microsoft, I think productivity: Windows, Office, Visual Studio, the .NET Framework, Azure… they have a pretty good track record for this stuff. Then there’s Windows 8. I get what they were trying to do, and there is something to be said for trying to unify interfaces across all the new form factors out there now, but wow, oops! So I say to Microsoft: your core market is the business world, and they don’t want to get gorilla arm from your crappy OS and its obsession with touchscreens. Continue to make your Windows be for businesses first and regular consumers second since smartphones and tablets are going to eat the consumer market anyway, and you can’t prevent it. With time, you’ll see that even though PC sales won’t reach pre-tablet levels ever again, there will still be a strong market for you in the business sector. That’s not to say you have to completely give up on the new way of doing things… just don’t put it before your foundation and real strengths.

All I’m saying is that most businesses aren’t going to suddenly buy tablets for all their workers and expect everything to be done on mobile devices… because it won’t work. It’s crazy. There are still a lot of things you just don’t do on this latest generation of hardware, not if you want to keep your sanity. Tech companies closing or divesting their PC business units strike me as a little weak in the long-term planning area. Then again, it is also possible that I am simply already an old fart at age 29 because technology is moving in directions that confound and annoy me and I am refusing to see the writing on the wall. That would be a little sad.

I have done some terrible, terrible things over the past few months in my dealings with RavenDB. This one isn’t so bad.

Optimash Prime

I noticed early on that I was probably going to have to write a few Transformers. I’m lazy and didn’t want to have to actually do anything to maintain them or make sure they’re up-to-date if I change the underlying codebase, so I came up with a way to have it take care of itself for me.

This chunk of code is intended to be run just after you’ve initialized your static IDocumentStore, preferably in a web service or something that isn’t going to be starting and stopping a whole lot. The point is that this ought to happen infrequently, hopefully only once.

Pretty simple stuff. Get all the classes you’ve created which inherit from AbstractTransformerCreationTask, initialize one of each, convert all those instances to a list, and then dump each one into the IDocumentStore. Now the Transformers in the database are guaranteed to match their counterparts from your codebase.


DistressI’ll just leave this here…

Ready to download and install Visual Studio 2013? If you’re like me, you’ll want to clean things up first so you don’t have side-by-side installations… that’s right, it’s time to uninstall Visual Studio 2012 and as many of its buddies as possible. Of course this does mean you’ll lose a lot of your preferences, but hey, you knew what you were signing up for.

Frustratingly, Microsoft’s developer tools always leave a damn mess behind. I guess we’ll have to settle for mounting the VS 2012 iso and running this command:

…though I suppose the executable may have a different name depending on your edition of VS. Anyway, that’s as close to a one-stop-shop we’re going to get for clearing out VS 2012. You’ll still have to uninstall a few things manually, potentially delete the directory from Program Files (x86), and so on.

Chuck Norris ApprovesI’ve only used VS 2013 for a few minutes but I’m already very intrigued by this CodeLens thing. It’s a little distracting because it bumps the actual lines of code around to make room for its helpful little bits, but I’m thinking the trade-off may be worth it. I’m also enjoying the tiny bit of extra color Microsoft’s thrown back into the icons here and there. Thanks, dudes.

Another thing that is relevant to my interests regarding this upgrade is the move from MVC 4 & Web API to MVC 5 & Web API 2, since I have several projects using the former architecture. Luckily, there’s a nice walkthrough to help make that happen.

Don’t forget to cruise through all your *.sln files and change this bit at the top:

…to this:

…so they get the nifty new 12 icon (as opposed to the old 11 icon! so last year!).

Unfortunately, two of my favorite things didn’t get the memo and aren’t compatible with VS 2013 yet: the Productivity Power Tools extension, and StyleCop. Hurry it up, you are sorely missed!

As a worker — specifically, a software developer — I’ve found that telecommuting provides the best results. The distractions of the home pale in comparison to the distractions of the office. Also, it makes me happy. Always has. That’s what’s really important, anyway.

As a manager — specifically, a manager of software developers — I’ve found that telecommuting provides the best results. Software developers are savvy and they’ll deliver the goods if you show them respect and give them the freedom to work the way they know is best for them.

That’s my anecdotal support for telecommuting, which is great and all, but hardly necessary given the real evidence showing how awesome working from home can be. Hell, if you take it from this study, apparently you can actually squeeze more hours out of your telecommuters if you’re that kind of boss. You jerk.

Jackie Chan - WTFIt’s been roughly 20 years since the internet became widely available, but the business landscape is still largely run by fools who think the old ass-in-chair paradigm of the Industrial Era applies to 100% of the workforce. It doesn’t, and anyone can see that. But just when it seemed we were beginning to make some progress in the right direction, the most bizarre thing happened: Yahoo! dropped a bombshell on its employees and the world by telling all its remote workers they were no longer remote workers.

You might think a company that does the vast majority of its business online would be hip to telecommuting, but apparently you’d be wrong. Very shortly after, Best Buy did the same thing to its office workers. Both companies said it was to improve “collaboration” and all that, but folks didn’t buy it. Claiming that workers have to share a close physical proximity with one another in order to accomplish stuff is plain ridiculous. There was immediate speculation that telecommuters were being made into scapegoats for the failing companies.

moar like Smeghead Whitman, am i rite?

moar like Smeghead Whitman, am i rite?

Fast forward to today, when HP became the latest troubled enterprise to screw its remote workers. See, now I’m concerned. If you get enough of these well-known corporations doing this, even though it’s just a tactic to shush angry investors, other companies will follow suit because it’s the current trend in personnel management. Never mind that it’s just a way to distract from the real problems the organization faces… think how much better we’ll be when we drag all these happy, productive people into the office where they will most likely be neither happy nor productive! Better yet, if they can’t or won’t comply with the new directive, who can blame us if we have to perform a — gasp — reduction in force!

You know what’s really ironic about the HP thing? This. (Update: Nice try, HP. I saved a copy in case you took yours down!)