Silverlight 3: Web App Development That Doesn’t Suck?

I’ve had some ideas for a more, let’s say, “animated” web site, but frankly large-scale Javascript development is tiresome and the thought of delving into Adobe Flash or Flex or AIR or whatever they call it now is too depressing to contemplate.  With the release of Silverlight 3, I figured it was a good time to take a hard look at the Silverlight platform to see what it can do.

The more time that goes by, the more I find the platform of HTML + CSS + Flash + Javascript + whatever else to be a horribly kludgy way of delivering an application to a user.  It’s not surprising, though, when you consider that it’s the product of 20 years of stacking stuff on top of other stuff without any overall goal or direction.  I’ve often wished that we could start over with a brand new paradigm for delivering “rich” applications over the Internet.

Of course, they say HTML 5 will solve everything, but I’m rather skeptical considering it will still have CSS and Flash and Javascript and whatever server-side platform serves up the markup.  Plus it’s created by committee.

Adobe AIR is also very fashionable right now, but I have not been impressed by Adobe’s technical expertise in recent years, and cursory examinations of the platform reveal it’s just a layer of abstraction over the same old crappy HTML and Javascript and Flash.

silverlightLogo Enter Silverlight.  I’ve only spent a couple of days looking over the tutorials and documentation, but Silverlight 3 seems to have all the elements I’ve been looking for.  Well, really just one element:  Consistency.  It’s all .NET from end-to-end, with a consistent style and vision, from the server-side all the way down to the client-side.  None of this mish-mash of technologies from 100 different minds.

I’m looking forward to seeing what I can do with Silverlight.

Windows Live Writer, Remember Password and Atom Authentication

I was working on an Atom publishing API for my blog, since I want to use more secure authentication than is possible with the MetaWeblog API.  But I had no luck getting Windows Live Writer to authenticate against my API even though it tested out correctly in every other way.  I finally discovered it was a quirk of Windows Live Writer.

The secret is to make sure you check the box to remember your password!  Even if you don’t actually need or want to do that.  Otherwise Windows Live Writer sends a blank password across no matter what you type in.  This occurs with Basic, Digest and WSSE authentication.

Here are the steps that created the problem.  First add a blog account.  (Or edit an existing one.)

image

Enter a name and password, but do not check the “Remember my password” box.  In this case it doesn’t auto-detect the Atom API (I’m still working on that), so I have to put in the Atom service document manually.

image

Everything seems okay.

image

When you click Finish and get back to the Blog Settings window everything still looks okay.

image

I go to publish a test post.  It asks for a login and password, which is what I expect.

image

I still don’t click on the “Remember my password” box, because I want to be super-secure and type it in every time.  But:

image

It turns out that Windows Live Writer didn’t send the password – it sent the username “Tom” with an empty string as the password.  (I figured this out by computing the digest for an empty password, which matches what Windows Live Writer sends.)

[2009-09-01 17:48:04] : incoming digest: UkLGsjIPGPHslCyJAcI70GddLno= (127.0.0.1)
[2009-09-01 17:48:04] : expected digest: mUl53CjnIWkxxeuRG4frOSP0L1o= (127.0.0.1)
[2009-09-01 17:48:04] : blank password digest: UkLGsjIPGPHslCyJAcI70GddLno= (127.0.0.1)

When you go back to the Blog Settings you find that the password has disappeared.

image

Furthermore Windows Live Writer no longer asks for a username and password when attempting to re-publish the same post, so you are stuck.  The only way I found to reset it is to edit the Blog Settings and go through the Update Account Configuration again.  And the only way I found to get Windows Live Writer to send the password correctly to check the “Remember my password” box.

This is the version I used for these tests.

image

So there you go.  If you’re trying to test your Atom publishing code with Windows Live Writer, make sure you check the “Remember my password” box.

All Good Things

We had to put Tristan down tonight.  It was a hard decision but we think it was the right one.  The combination of old age, arthritic hips, giardia and pneumonia was just too much.  We’ll miss him a lot.

Tristan loved cheese

F.E.A.R. 2 on the PS3

I finished my first game on the new PS3 Slim last night:  F.E.A.R. 2.

I decided to buy a PS3 Slim since they dropped the price to $299.  It was considerably cheaper than the $700+ Core i7 PC upgrade I was spec’ing out, and Best Buy had been spamming me with “18 months no interest” offers lately, so I figured why not?  The only game I bought with it was F.E.A.R. 2.

F.E.A.R. 2 is essentially similar to F.E.A.R. in that you are fighting basically the same enemies with the same weapons in the same spooky Japanese-horror environments.  You have the same slow-motion (“reflexes”) gimmick as before, which for me was considerably more useful on the PS3 since I’m a total newbie with a controller.  And since some of the enemies move so fast in real time that it’s almost impossible to track them, it worked out perfectly.

Happily they addressed a lot of the cons I listed from the first game:  F.E.A.R. 2 was not as easy (possibly because I was using a controller – sometimes I had to try a section 5 or 6 times to get through it), and you can carry 4 weapons instead of 3.  Most of the time I used the assault rifle, auto shotgun and hammerhead, occasionally switching to the sniper rifle.  I rarely used the missile launcher or laser gun (the laser gun was hard to aim).  In fact, whenever I tried to use the missile launcher I tended to blow myself up.  Throwing grenades wasn’t a problem, and I also didn’t have a problem with the ladders this time around.

The bad guys didn’t swear as much, but the good guys made up for it.  Also, I didn’t see any severed heads rolling around like soccer balls. 🙂

As usual for modern games, it seemed short.  I finished it in two weeks of playing maybe an hour a day.  That’s especially irritating when new games are $60 a pop on the PS3.

I haven’t tried multiplayer yet.  I’ll be interested to see how that goes on the PS3.

Overall I give the single player campaign a 4… out of 5.

Exploring New Programming Fonts

I’ve been a Consolas user since it came with Visual Studio 2005, but now I’m exploring some new programming fonts.  Unfortunately, there are surprisingly few choices out there if you want a nice anti-aliased font that scales well.

I found a post on Hivelogic that runs down the Top 10 Programming Fonts.  For me, there’s really only 6 possible choices:  Courier New, Consolas, Inconsolata, Droid Sans, Bitstream Vera and DejaVu.

Droid Sans Mono has wider characters, which I like.  But I don’t like what it does to the lower case “g,” and I don’t like how the zero looks like an upper case “O.”

Droid Sans Mono

Bitstream Vera and DejaVu are almost identical.  The only difference I can see is in the lower case “m.”  Bitstream shifts it over to the right a little bit, which looks a bit odd.

Bitstream Vera Sans Mono

DejaVu Sans Mono

I’m not fond of Inconsolata.  It’s too “fuzzy” at the edges for my tastes, so it makes me feel like I have to squint more.  Also, you have to crank up the point size from 12 to 14 to match other fonts.

Inconsolata

In addition to changing fonts, I’m also exploring larger point sizes as well – moving from 9 or 10 point up to 12 point.  Not only is it easier to see with my aging eyes, but I read somewhere that it encourages you to write smaller functions and shorter lines, which might ultimately result in more readable code.

So my new choice for now is a 12 point DejaVu Sans Mono.  It’s working pretty well so far.

World in Conflict – PC Killer

I picked up World in Conflict (with Soviet Assault expansion) for half price from Steam a couple weeks ago (yeah, I’m pretty fond of waiting for half-price weekend specials, if you hadn’t noticed).

I picked this particular RTS game because I see it referenced a lot (along with Crysis) in PC video card benchmarks.

Now I understand why.

When I first ran it, I got a whopping 11 FPS average on the built-in benchmark.  With judicious tweaking of the settings, I’ve gotten it up to around 25 FPS, but I had to turn off all the cool settings.  So it’s official:  My gaming PC is hopelessly out of date and will probably need to be put down soon.  Or worse:  Relegated to “casual” games (shudder).

(I’ve spec’ed out a new gaming PC — a Core i7 with Nvidia GTX 275 — but the parts are coming in at over $800 from NewEgg right now so I’ll be holding off on that for a while.  Which was a large contributing factor in my decision to buy one of the new $299 PS3 Slims — more on that some other time.)

Back to World in Conflict.  The game itself is okay, but it’s not knocking my socks off (in single player).  I find it a little difficult to control all the units, but then I’m not a hardcore RTS player and I’m too lazy to learn all of the hundreds of shortcut keys.

The cut scenes in particular are kind of random and pointless… they are trying for an emotional “war is hell” sort of vibe but it comes across pretty cheesy.

I can’t see myself playing this for too long, especially without all the eye candy settings.  It’s just a series of mildly entertaining capture-and-hold scenarios that really aren’t that entertaining.  I have no idea why it won Best Strategy Game in 2007, unless the multiplayer is radically better.  I’ll give the single player campaign a 2… out of 5.