web comments edit

Fought with this one for quite some time today. We use a lot of client-side validation for input fields in the products I work on. While we repeat that validation on the server (as is the way with ASP.NET validation), the client-side validation is important to give the customer earlier feedback about invalid input.

Our products are written to work in a multilingual capacity so the validation expressions need to support characters above and beyond ASCII. That’s great, but it also means we have some work to do to get the regular expressions to work the same on the client as they do on the server. I’ve blogged about this issue before.

ECMAScript standards indicate you use Unicode escape sequences to put these extended characters into regular expressions. So rather than literally putting é right in the expression, you put the equivalent Unicode escape sequence: \u00e9.

Safari 2.0.4 doesn’t seem to handle Unicode escape sequences in its regular expression engine. It understands that code \u00e9 is equivalent to the literal character é, but if you ask in a regular expression if they match, they don’t.

From what I can tell, there is no workaround. It just doesn’t get Unicode escape sequences in JavaScript regular expressions.

I’ve put together some tests to illustrate the point. Browsers that handle the issue correctly will read “true” for all cases; Safari 2.0.4 fails on the Regex tests.

\u00e9 == é: Test Not Run

\u0041 == A: Test Not Run

Regex "\u00e9" matches "é": Test Not Run

Regex "\u0041" matches "A": Test Not Run

home comments edit

Yesterday my trim got repainted because it was looking sort of nasty and flaking off a bit. Taking a little pride in ownership, I decided it was about time to spruce the place up.

I had to stay home all day because part of the repaint included the front door, which hung open almost all day so the painters had access to it and so it would dry nicely around the edges. At the end, I did a walkthrough and looked at the job. Looked nice and clean. Awesome.

Jenn was out with some friends last night so she didn’t get to see the paint. She went out this morning to check it out.

Oh boy.

Under the soffits where they painted, all the paint looked like it was bubbling or dripping. You can see near the garage where it actually did drip and got on my vinyl trim. That definitely wasn’t there during the walkthrough.

I called the painters up and let them know what I’m seeing. They’re coming back out today to see about fixing it up. Why does this stuff always have to be a pain? I guess I should be happy; at least they’re not leaving me in the lurch. We’ll have to see how this goes.

Other minor news - I think the house has settled in the last couple of years and the door to the cats’ room (which remains open all the time, and which I had to close yesterday so the beasts didn’t escape through the open front door) really won’t close anymore. The top of the door rubs on the door frame. It was a little snug before, but now it’s just crazy. Looks like I’ve got something else to fix.

General Ramblings comments edit

This weekend was a nice relaxing one, which is a good thing, since we’ve got our weekends pretty much booked solid between now and the wedding. It’s amazing the number of things that you really can’t do in the evening when you get home from work.

Saturday Jenn and I picked up a fairly difficult puzzle from the store and spent some time together watching movies and doing the puzzle. It was nice to not have to run around and do things, and we enjoyed spending some time together working on the puzzle. It’s been a while since we just sat and worked on something like that.

Sunday Jenn got bored, which is pretty normal for Jenn. Jenn, bless her heart, is a very binary sort of person. She’s either hungry or full, but never in between. She’s either entertained or bored, but never in between. Sunday was a “bored” day, so we started talking about different things to do. We ended up going to Bike N’ Hike and Bike Gallery to look at different bikes (since we don’t actually own any).

Bikes are damn expensive.

Granted, I haven’t had a bike since I was a kid, so I really had no concept of how much bikes cost, but I was thinking maybe a couple hundred bucks, tops. Turns out you can get a super low-end bike for that, but if you want to ride it in any reasonable capacity, you’re probably looking at the $300 mark. Plus helmets. Plus a bike rack for the car so you can take the bikes out to a place to ride. I don’t see us starting this one up for less than $750, which is far more than I anticipated. Needless to say, while the trip was educational, it ended in disappointment for Jenn as we did not get bikes. Perhaps later in the year, or early next year. The wedding and the sprinkler system and the house repainting and all that… too much drain on the budget for bikes right now.

After we got home from the bike hunt, I finally sat down to play some Ghost Recon: Advanced Warfighter, which I got for my birthday but hadn’t cracked it out of the plastic wrap yet because of the whole broken Xbox 360 debacle.

GRAW rocks. It really does. It’s just hard. Super hard. See, I’m used to the first-person shooter like Halo where you just bust in with your machine gun and start blasting away. GRAW requires you to peek around the corner and scout stuff out. If you just run in, you’re going to get killed. That’s not a bad thing, it’s just a different way to play and it takes a little getting used to. On the other hand, it forces you to get more into the game and pay more attention to what’s going on. You can’t barrel around the corner, you actually have to stop and plan your route to the destination because you don’t want to walk through ambush points or anything. Totally sweet.

Anyway, I played that for a couple of hours while Jenn entertained herself putting together the flower girl basket for the wedding. Fine and dandy.

Had some dinner, watched V for Vendetta (decent, but somehow… lacking… maybe I just wasn’t into it at the time), and went to bed a half hour early.

The house painters are here this morning, doing their thing. Technically they’re just painting the trim since I have vinyl siding. Of course, I have to be here, since the front door needs to be painted and I’m not just going to leave the house unlocked all day. Sooooo… working from home.

gaming, xbox comments edit

I love the Xbox Live Arcade. Being able to get five-to-ten-dollar games that are fun to play is a great idea. I dig it, Jenn digs it, everyone has fun.

The way it works is you sign in to Xbox Live on your Xbox 360. Once you’ve done that, you can navigate over to the Xbox Live Arcade section and you can buy cheap, fun games using “Microsoft Credits.” The game downloads to your console, and you play. Simple enough. I buy games, Jenn buys games, we play, it’s great.

That’s the key, though - we both buy games, and we both play. There’s no point in me buying a copy of Frogger, storing it on our Xbox 360 hard drive, and her not being able to turn the thing on and play. When I buy the game, I’m buying it so we can play. And that’s how it works by default - if I buy the game, anyone who signs onto my system can play the full version of that game. Sweet.

My Xbox DVD drive stopped recognizing discs recently and I had to send it in. I got it back yesterday, and the first thing I did was pop in a disc to something, just to make sure it all worked. It did, and that was cool. Then I switched over to the Arcade. That’s when the problems started.

Somehow all the games I bought were no longer available for Jenn to play. All the games she bought were no longer available for me to play. I mean, they physically showed up in the menu, but they all appeared as “trial versions” even though we had paid for them.

After much screwing around, I figured out that if her profile was signed in at the same time I was trying to play using my profile, everything was unlocked; sign her back out and the games she bought instantly become trial versions for me again. That’s patently unacceptable - I can’t keep signing her on just so I can play. It’s not just inconvenient, it’s dumb.

I looked at the “Usage Restrictions” you see when you download any game from the Arcade. It kind of explains what I was seeing, but until you experience it, it doesn’t fully make sense.

I called Xbox Live support to find out what to do. After spending literally an hour on the phone (about 45 minutes of that on hold while they were sorting things out trying to figure out how to address the situation), it turns out that the DRM they use on Xbox Live Arcade is all sorts of messed up.

When you buy a game, it’s associated with your user profile. It also automatically authorizes the console you purchased the game from such that anyone who plays that game on that console is unrestricted. (Don’t buy games at your friend’s house and stick them on a memory card to bring home, you’ll get nailed by this.) If you transfer the game from one storage unit (the hard drive) to another (a memory card), the DRM is changed so only the person whose profile purchased the game is authorized to play - they need to be signed in to Xbox Live for the game to be unlocked.

I’m not sure if this happens if you do something like originally download the game to your Xbox hard drive, take the hard drive to your friend’s house, then bring it back home. Does it recognize that you removed the media? Do you lose the machine-wide authorization? I don’t know, but I’d be interested in finding out.

Anyway, what the Xbox repair people did is send me a new console, not just replace the broken DVD drive. So the console itself was “new” according to the DRM, so it was like I bought a game somewhere else and brought it home.

How is this getting resolved? You’re going to love this.

First, you have to create a new gamer profile and make it an Xbox Live “Silver” membership. It’s free to create that new profile since the “Silver” membership is free, but there is a heck of a lot of data entry for contact information, not to mention the fact you need to give it an email address and password so it can sign on - just like a real profile. The representatives on the phone will tell you it doesn’t matter what email address you give it, but from experience I know they send account notices and such to that email address, so it should probably be legitimate. Of course, that means if you don’t have your own domain and/or can’t figure out how to set up email address forwarding then you’ll need to create a new, dummy Hotmail account or something. Super convenient.

Once you have the dummy gamer profile set up, Microsoft will credit that account with enough credits to go in and re-purchase all of the games you previously had unlocked. Getting that credit to come through takes eight-to-ten business days.

I asked why you can’t just credit one of the existing gamer profiles so you can re-purchase without going through that hassle. Apparently there’s something in the system that knows if you’ve played the game or not before and the account you re-purchase the games through can’t have played the games you’re re-purchasing. I’m not sure if that’s a technical misunderstanding on the part of the technicians or if that’s actually a legitimate issue. Regardless, the dummy profile thing was the set of instructions given to me by more than one technician during the call, so that’s how it’s going.

I’m not a big fan of Apple’s iTunes DRM, but the notion of authorizing/de-authorizing a machine might have come in handy here. Like I said, I dig the Arcade, but now I’m reluctant to buy anything. What happens if I want to get a second Xbox 360 for a different room? I can’t take the game up there because it won’t be authorized. Even if I wanted to accept that as a limitation, Jenn couldn’t take the game to the other room because I’d need my profile signed in so she could play.

Argh! You’d think that not having to fuss with a game disc would be easier, not harder, but it’s exactly the opposite. I can take the game disc to my friend’s house without having to fight DRM. I can get a second console and play the game disc on either one without having to screw around signing in profiles or setting up dummy accounts.

The only exception I’ve found to this odd DRM rule is the Hexic HD game that comes standard on Xbox 360 hard drives. It was unlocked for both of us from the get-go, even after we hooked up the new console, so I’m guessing there’s just no DRM attached to it.

Come on, Microsoft, I thought you were smarter than this. We just want to play the games we bought. Let us play.

*UPDATE * (Minor clarification) - The Xbox that the repair facility sent me back was a different one than I sent in; they didn’t actually replace the drive in my broken Xbox, they just sent me a new/refurbished one. Had they sent me my original Xbox, I may not have run into these issues.