Apparently, I am a shining example of self-loathing

It appears, at least from my web stats, that I’ve been linked by a fairly popular blog. The intro to SharePoint development talk I gave at ETNUG a couple of years ago, “SharePoint For Developers Who Hate SharePoint” was linked as an example of Micro$oft’s Dirty Secret: SharePoint Sucks on a Lotus Notes blog.

I find this kind of ironic, mainly because I’m not really a polemic as far as software platforms go. (Heck, I’m OK with anything so long as it works and you’re not so high on the corporate Kool-Aid you can’t recognize the inherent weaknesses as well as the strengths.) And the title of the talk is sort of ironic, because so much of the suck is related to misuse. For all it’s quirks I think I can still do a good job with SharePoint.

Managing collections of objects in XNA: Structs vs. Classes

space shooter
Obviously, these aren’t the final graphics.

A couple of weeks ago, I started working on an XNA space shooter game. It’s 2D and completely sprite based–the type of thing that you wouldn’t think was that hard to do. And yet, I put most of the inner workings of the gameplay through two rewrites in that time.

The first draft

At first, I wrote a nice class structure: every gameplay object originated from an abstract class called GameObjectBase, which defined methods to handle Update, Draw, and intersection with other types of game objects (projectiles, the player’s ship, etc.). Then, each additional type of game object had its own abstract base class that, again, defined key pieces of behavior: EnemyBase, ProjectileBase, PowerupBase. The main game loop itself would keep track of all of these game objects, calling Update and Draw on them as necessary.

The plan here was to be able to define a new class for each type of enemy and weapon so that I can define whatever behavior I need for them. That’s what I’m really going for here: I want the option to do interesting things with various weapon powerups. And I think I’d actually hit upon an elegant solution.

When you first fired it up, the game ran fine for a while. But there was a problem: garbage collection. Each new enemy or bullet created a new object and stuffed it into the main game object list; each time one of these enemies was destroyed it was removed. Considering that the player can fire ten bullets per second, that’s a lot of objects. Eventually, the garbage collector had to clean up all of these old objects, essentially freezing up the game for a few seconds.
Continue reading

Personal Kanban board revisted

I’ve had my personal Kanban board up for about four months now.

No, it hasn’t revolutionized my life. And no, I haven’t become a scary productivity junkie, either. But there are a couple of good lessons to take away from the exercise so far.

  • One, it’s actually helpful to arrange the list of stuff you want to accomplish, and sort through it. You may decide not to do half of it, but at least you’ve taken the action of throwing it out.
  • Two, don’t buy the normal Post-Its. Use the Super Sticky kind. It is mildly annoying when notes continually fall off of your wall.
  • Three, there is no magic approach to getting organized. Find one that works for you. Throw it out if it doesn’t. The Kanban board is working for me, so I’m going to keep it for now.
  • Four, you need to review your to-do list regularly to make sure it’s in sync with what you’re actually doing. If there are any conflicts, whatever’s really happening in your life wins.

Anyway, that’s the lessons learned. Now onto what I really want to dig into: the thinking behind personal goals and to-do lists.

When I set up the board, it was a way to organize a lot of different projects I had going (or, at least, wanted to have going). My main problem was that I wasn’t organized and wasn’t really motivated unless I was in a good mood and had a large chunk of downtime to waste. And, what’s worse is, I wasn’t able to force myself to let go of any items entirely–it really takes a certain amount of opportunity cost analysis to do that. That’s where the task list approach comes into play.

So the main benefit of creating this complex organization scheme was to force myself to simplify. And it did. Sort of. Except not quite as much as I needed, apparently.

The first realization came through reading Anxiety, Phobias, and Panic1. The book’s first chapter goes over a number of otherwise beneficial personality traits that, out of moderation, can cause serious problems–among them extremely high expectations of self, perfectionism, and excessive need for approval (which, in turn, makes it hard to say no to other people). All of these should probably sound familiar if you’re even slightly tempted to jump on the latest fad in personal productivity.

The lesson here is, there’s a balance. You can lock yourself down if you only sit around talking wistfully about things you’d like to do someday, when everything settles down (hint: it never will), and never do anything. But you can also lock yourself down if you set the bar too high, and put too much pressure on yourself. There’s a sweet spot, and you usually have to lower your expectations to get there.

The second realization came through reading Searching for God Knows What2 by Donald Miller. One of the recurring themes in the book is what Miller calls “lifeboat mentality”3. It’s the tendency to compare ourselves to others; the high-school-popularity-contest way of thinking about things. And his point is twofold: (1) it permeates our culture more than we’d like to admit, and (2) it’s completely invalid.

It’s not so much that this thinking drives your to-do list, but it does seep into the way you prioritize each item. Maybe you think it’s expected by the people around you. Or that it’s expected of someone in your position. Or you promised someone you’d do it, because you didn’t want to let them down. Or you added it for the marketing or networking opportunities.

Whatever the case, you’re giving it more weight than it really deserves–or, at least, more weight than the effort you’re willing to put into it. And it’s not because it’s something you necessarily love to do or that you’re uniquely qualified to do–if it were, you’d have no problem. You do it because you want to get ahead or (as is more the case for me) not fall behind. (Don’t get me wrong, there is some place for that, but only in moderation.)

So, a couple of weeks ago, I eliminated several tasks that I thought violated one of these issues: either my expectations were excessive, or it was driven by perfectionism, or I was doing it for someone else who really didn’t care about it as much as I did, or I re-evaluated my reasons for leaving it on the list in the first place. (I made sure to finish up anything I had made a hard-and-fast commitment to do.)

And then I noticed my board was really empty–except for the “DONE” column, which had greatly expanded. Which, strangely, made me breathe a little easier, even though every item on that board I put there voluntarily.

So, oddly enough, I started on a new XNA game two weeks ago. I’ve now got a real, playable engine–not just playing around, something useful. This wasn’t even on my to-do list and it wasn’t something I obsessed about, I just did it.

I didn’t get there by using my to-do list, but I also wouldn’t have gotten there without my to-do list.


1 I’ve realized I’ve become a more tense and nervous person over the past several years, and when I saw this book mentioned in a completely unrelated discussion thread I was following, I picked it up. Like I said in a previous post, it’s not a motivational-speaker self-help-panacea book, so it’s the type of approach I was looking for.

2 I picked up this book knowing very little about it, only that I’d read two of Miller’s other books, Blue Like Jazz and A Million Miles in a Thousand Years: What I Learned While Editing My Life. The book is basically an apologetic for Christianity, asserting that our culture has taken a relational narrative and turned it into a set of checklists and rules.

Incidentally, A Million Miles is a great book if you’re one of those types that sits around wistfully talking about doing things someday, but never gets around to it. The idea of living a story seems a bit simplistic, but ultimately helpful–so long as you take it as one alternative perspective on life rather than a panacea and the basis for your worldview.

3 The name comes from the game/exercise referred to as “Lifeboat”–you can read a dry written example here, or you can have it explained by a satirical 80′s Christian rocker dressed in drag.

Crash issues after installing VS2010 Beta 2 / .NET 4.0 Beta 2

This is a random post, but I figure it might help someone, since I couldn’t figure out what was going on for the longest time.

I installed Visual Studio 2010 / .NET 4.0 Beta 2 last night. When I restarted my laptop, I noticed that both the Microsoft Online Services Sign-In app and the Curse-Gaming Client crashed. When I tried to start them manually, the same thing happened.

There were no errors in the Event viewer and no log files, so there was no obvious reasoning. Repairing the .NET 4.0 and .NET 3.5 SP1 installations didn’t fix anything either. The only clue I had was from trying to debug the crash in Visual Studio when prompted by Windows. Even then, the error was still cryptic: The type initializer for 'MS.Win32.Penimc.UnsafeNativeMethods' threw an exception.

Several Google searches later, I found the following fix:

  1. Run Command Prompt as Administrator.
  2. cd \windows\microsoft.net\framework\v3.0\wpf
  3. regsvr32 PenIMC.dll
  4. cd \windows\microsoft.net\framework\v4.0.21006\wpf
  5. regsvr32 PenIMC.dll

Once that was done, I was able to run both applications without error.

Personal Kanban board

This relates a bit to my previous post, I suppose, but I ended up setting a personal task board up last week. Mike, Cicelie, and I had a lot of success doing this with IncaBlocks (although we also used Zen).

I’ve put my task board within view of my computer workstation. Literally, I can’t miss it. The purpose is for me to organize all of this nebulous “stuff I need to do” (around the house, on projects like IncaBlocks, for other people, etc.) into an easy-to-maintain, prioritized list.

Kanban board

I’m hoping it also motivates me a bit more–most of the stuff I need to do could be knocked out in anywhere from 30 minutes to a few hours. However, I’m usually reluctant (especially after working all day) to tackle it unless I’m completely relaxed and have a large block of free time. These things just seem bigger if you don’t define them.

To that end, I’ve set up five categories: “NOW” (the stuff I can do right now), “LATER” (the stuff that’s lower priority), “PROBABLY NEVER” (the stuff I say I’m going to do but probably won’t), “NOT MY PROBLEM” (the stuff that I’m waiting on other people for) and “DONE.”

“Not My Problem” is a bit harsh, but you have to understand my personality. I’ve found that lately I have approximately zero capacity for cognitive dissonance; I tend to throw myself in (at least mentally) pretty deep when people start tossing valid, doable ideas around. And then I get run down and impatient when I realize they’re not serious. So I need “Not My Problem” as a reality check. (If you heard some of the project management and organization discussion on early episodes of Feel The Func, this shouldn’t surprise you.)

Also, the currently-empty “Probably Never” column has prompted my roommates to put up their own interesting and amusing items on my task list. (Let’s not discuss just how interesting and amusing they were.)

Success? Well, I’ve only finished one task so far.

Feel The Func

Feel The Func

A little side project I’ve been involved in, Feel The Func, releases today.

What is Feel The Func? It’s the official podcast of FuncWorks.

FuncWorks is a project organized by Mike Neel, Cicelie Caulton, and myself. It is, to put it simply, a banner under which we’re going to work on various side projects–the first one being a website for Cicelie’s t-shirt designs (Cicelie, by the way, created the FuncWorks mascot to the right, the CodeStock logo, and the CodeStock t-shirts for both 2008 and 2009.)

The podcast is a chronicle of our weekly planning sessions–think Stack Overflow, but with a mix of marketing, design, and art talk as well as code. The first two episodes, which are up today, revolve around trying to define user personas for the site; later episodes will delve into the code a bit more–which should prove to be interesting, because Mike and I often approach both marketing and design from very different angles.

SharePoint Knights and the MVP Program

I don’t know how many of you saw this (because it seemed to be mainly a SharePoint thing), but I thought it was interesting. I say that as someone not familiar with the MVP program, nor particularly outgoing or focused enough to be deep into the community, so it’d be interesting to get other people’s reactions. I also say that as someone who didn’t pay a great deal of attention to it, other than skimming the blog posts.

Joel Oleson posted a suggestion for a community-based group called SharePoint Knights, where membership was based solely on contribution to the community, tracked liked points). Nothing more than brainstorming had been done, but obviously it drew some pretty clear lines within the community.

It was followed by Luther’s 10 Points to the MVP program, a critique of some of the problems with the program and the reason for creating a separate, community-focused organization alongside the MVP program. And finally, the response to both of these posts was so heated that the SharePoint Knights project has been put on hold.

I think he has a point about the politics often involved in community, especially when the public face is to pretend there aren’t any politics and everyone’s one big happy family. Perhaps Luther’s theses were a bad choice for his critiques–here was a man who meant to reform an institution, and instead unintentionally created an enormous rift within it.

SharePoint Authentication Fun

While I have a backlog of blog posts I need to write, this one just hit me, and seems interesting (also, maybe I can get some additional insight).

The fact that SharePoint uses ASP.NET’s forms-based authentication system is very nice. It means you can tap into almost any sort of authentication scheme you want, rather than being bound to Windows logins or Active Directory.

On the other hand, forms-based authentication doesn’t play well with applications that aren’t web browsers. (This is, incidentally, why SharePoint gives you the option to turn off client integration.) Pretty much any application that can download data from the web recognizes a 401 status code–but it can’t tell the difference between a login page and the content you were expecting.

You might have encountered this if you’ve tried to open a Word document from a FBA-secured SharePoint site. If you’re lucky, Word will use IE’s authentication cookie and work seamlessly. If you’re not lucky (and you usually aren’t), you end up with the login page as a Word document. Which is, to say the least, not particularly helpful. (I think I read that this is being addressed in Office 2010, but I can’t remember where, so it’s possible I’m just making this up.)

Anyway, membership providers. They provide a great deal of flexibility. But they can also box you into a corner in terms of expectations, since most SharePoint-enabled applications assume you’re using Windows/Active Directory logins.

As an example, we have the following situation on a SharePoint project I’m currently working on:

  • Most users will access the site using forms-based authentication (because of other authentication requirements). However, they also have an Active Directory account that they can use to access the site through an alternate access mapping.
  • Other users do not have an Active Directory account at all. They will have to access sites via FBA backed by a plain old ASP.NET SQL membership provider (or something similar).
  • A key requirement of the project is that data be downloadable for offline use (via products like Geo-Replicator or Colligo Reader–it’s not been decided which) for all users. Both of which require an AD login to sync data.

I’m not complaining, of course, because these aren’t really pie-in-the-sky requirements that are conflicting. They are all necessary to the product being both useful and secure. But the balancing act is somewhat mind-boggling, because every choice requires some difficulty on the users’ part.

So it’s sort of a stalemate. We could in theory keep our options open on the offline use requirement, but it would require setting up a separate AD domain for external users (which is both a maintenance nightmare, and potentially impossible because of security requirements). Or, we can stick with FBA for our external users, which cuts out some of our options for offline-SharePoint products. (Although, interestingly enough, it doesn’t negate all of them.)

I’m going with the latter, which feels like a hack in certain ways, but it meets all the requirements, satisfies them all as much as possible, and doesn’t overly complicate things as part of the compromise.

Working From Home

In IT, and specifically software development, the fact that we can do much of our job from literally anywhere is one of our great luxuries.

I’ve been working from home for 8 months. In fact, one of the reasons I took this job is that I’m working from home. I should point out that I am actually a full-time, salaried employee–this isn’t contract work. Working from home is, I have to admit, really amazing. But every time I hear someone say, “wow, you get to work from home?” with a shocked or jealous tone, I cringe…
Continue reading

Flickr, Caching, and Overcomplication

I mentioned offhand in a previous post that I’d modified my photo section to use Flickr. A few days later, I realize this may have been a bad idea.

I’ve gotten a few tracebacks from this site where a search engine bot has hit the photos section and absolute broke this functionality. It’s a big block of “Connection reset” messages sitting in my Inbox. And they do always seem to come in large numbers, so I don’t think it’s just randomly crapping out.

So tonight I coded up (what I think is) a fairly elegant caching solution. It will hold on to some number of Python objects (default is 1000) by key, and delete the least-recently used data as new items come in. And the main Photos page is caching each individual photoset, so that no additional calls need to be be made when you drill down to the Photoset level. The same thing happens on the Photoset page with individual Photos.

In testing, it hits me that Apache spawns a lot of different child processes (or maybe threads, I can’t remember), and each process will necessarily have its own cache. (I count 9 child processes running right now.) So the odds of a search engine bot actually making heavy use of the caching is relatively small–unless they’re just lucky and get the same child process each time, or stupid enough to request the same URL more than once. So for the amount of effort I spent, I surely could have just written a daily sync script to pull down all of my Flickr data to a database.

Of course, that would be too obvious a solution. (And, I gotta admit, writing a data sync script just doesn’t feel as 1337 as doing caching.) Oh well. At least I have a caching module that I can use for this site or Chainsaw Buffet gets popular, or at least Slashdotted. (Do kids still use that term, “Slashdotted?”)

… like that’s ever going to happen. :)