Monday, December 20, 2010

I'm not a Guitar Hero VIP

A month or so ago, I picked up Guitar Hero: Warriors of Rock because it was a Gold Box special on Amazon. Naturally, it didn't get much play when Rock Band 3 came out, but I've played it a bit and it's all right. Of course, they've lost the battle ... anyway, as part of a long story you don't want to hear, I was going to connect my console to because.

The way it works is you get an in-game code, you go to the website, you enter the code, and that plus your gamertag verifies that it's you. So I go to the site, enter the code that's on my screen ... and there's no match.

Right. Thanks for nothing, Activision.

Wednesday, December 15, 2010

Access 2007: how to use WeekdayName

So I'm working on this little project that calls for a column containing the day of the week. Odd, I know, but I thought it would be nice for Access to pass that along. There are a number of ways it can be done, but I thought it would be interesting to use WeekdayName because, well, it returns a name.

Of course, given that it's an Access function, Microsoft has little documentation and no examples for it. (Some time ago, Microsoft gave up providing useful examples for most of their functions ... of course they're not the only ones to do that. Adobe's examples for ColdFusion help are just as bad as Macromedia's were: they just show you what the syntax is without showing you results.) A quick Google didn't show me anything definite, and in fact showed me one suggestion that was flat-out wrong (that you can't control how it returns the day).

Now, that suggestion did have a good point – use a different function because of how this one works – but I'll show you anyway.

Here's the call: WeekdayName(weekdayvalue,abbreviate,firstdayofweek). See the problem? You're not passing a date, you're passing a Weekday, which means that it's simply telling you that the "first" day of the week is Monday (or whatever).

Anyway, the first value is a weekday value, not a date. The second value (optional), is a Boolean that specifies whether you want a three-letter abbreviation returned instead of the full weekday. (No apparent option to modify that.) The third value (optional) is the day of the week that you will designate as the first, with 1 being Sunday, 2 being Monday, etc. If you don't specify it, then you get whatever the system setting is, which may or may not be what you want.

Why did Microsoft make WeekdayName use an ordinal value instead of a date value? Because they're dumb. Anyway, if you want to use it, it looks like this:

WeekdayName(Weekday(#12/15/2010#),True,1) returns Wed. (Yes it does. I just tested it.) WeekdayName(Weekday(#12/15/2010#),False,1) returns Wednesday.

There you go ... but use this instead: Format(#12/15/2010#, "ddd").

Monday, December 13, 2010

Marketing idiocy

No offense to marketing people, because hey, that's what they pay you to do, right?

The Big Ten named its divisions. Legends and Leaders.


Dumbest change ever. MGoBlog suggests that we call them East and West. I'm with Brian.

Ohio StateMichigan State
Penn StateMinnesota

Thursday, December 09, 2010

Sometimes the virtual world is better

It's 2014, my sixth season at Louisiana-Lafayette. Unlike last year, where an early-season loss kept us out of the BCS title game, we finish the regular season 12-0, including a couple of close calls (a close win over North Texas on the road in the rain, I think we turned it over four times in that one).

We're playing Notre Dame. They're #1, of course. We kick to start the game, force a punt ... interception. They drive for a TD. We throw an interception, returned for a TD. 14-0 Irish.

Second quarter. We kick a FG. They score a TD. 21-3. We lose a fumble. I mute the game. This isn't going well ... three early turnovers, we're getting blown out.

But they throw an interception, we return it deep in ND territory, and the QB scrambles for a TD. 21-10. They throw another interception and we return it for a TD. 21-17. We force a punt and score another TD. 24-21 at halftime.

The second half is more of the same; although we do make mistakes, the first-string defense doesn't allow another score. Our defense runs another interception back for a TD, it's 45-21, and I sit the starters. We nearly made it 52-21 on the ensuing kickoff, but replay confirmed their kick returner was down before he fumbled. (They did drive for a TD on my backups, but we stopped the two-point conversion and recovered the onside kick. Final score: ULL 45, ND 27.)

42 consecutive points. A national championship for ULL. Notre Dame gets crushed. I like it.