Monthly Archives: February 2014

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?

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 the Google Nexus 10 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.

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.

AbstractTransformerCreationTask updater

C#

1

2

3

4

5

6

7

// this uses reflection to find all the transformers and register them on the database; saves us from maintaining a manual list

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.