Sunday, January 26, 2003

Cross-Disciplinary Observation

So, at lunch I was reading 3D Computer Graphics, a textbook written in 1993, and I came across the following:



An unfortunate aspect of the standards viewing systems is that because they afford such generality  they are hopelessly cumbersome and difficult to interface with. Even if a subset of parameters is used, the default values for the unused parameters have to be appreciated and understood. Perhpas this is inevitable. The function of a standard, in one sense, is not to reflect common usage but to define a complete set of facilities that a user may require in a general viewing sytem. That some of these facilities will hardly ever be used is unfortunate.


Substitute "web services" for "viewing systems" and this is a very relevant statement, IMO.

Managed Direct3D - InitializeGraphics

As part of my continuing coverage of the basics of Direct3D, this time I cover the initialization code needed to set up a Device object. The Device object is central to everything we do in Direct3D.

Thursday, January 23, 2003

Master Key Copying Revealed

Holy cow. When I read this in Clemens Vasters' blog, I thought, "Hey, given that all computer is based on physical security, this means we're pretty screwed."



A security researcher has revealed a little-known vulnerability in many locks that lets a person create a copy of the master key for an entire building by starting with any key from that building. [...] After testing the technique repeatedly against the hardware from major lock companies, Mr. Blaze wrote, "it required only a few minutes to carry out, even when using a file to cut the keys." [nytimes.com -- free sign-up required]

Wednesday, January 22, 2003

I Feel Dirty

I tried. I really did. I made every effort to reuse something existing rather than write my own. But yesterday I caved in when I was told that I was going to have to run my load tests after hours, because the evaluation copy of ANTS Load I was working with doesn't have scheduling capability. It was either start working nights, find something that does have scheduling capability that I can get an eval copy of, or write my own.


The problem with .NET is that it only took me a day to write the basics of a reasonably feature-rich load-testing harness. And I knew it wouldn't take that long, which is what made it so tempting. But of course that same day would probably have gotten me up to speed on some existing tool that a) doesn't have the bugs that mine certainly does, b) I don't have to support, and c) probably has lots more features. It was just tooooooo tempting to write code, rather than download and review some boring tool.


I find it interesting that the CLR made me less productive because it makes me more productive.

Monday, January 20, 2003

Managed Direct3D - The Game Loop

As part of my continuing series on the basics of DirectX, in this post I talk about the basic high-level structure of a typical Managed Direct3D application. Most Direct3D applications will have code that looks something like what I show here.

Welcome Stu Halloway

Stu Halloway has joined the ranks of bloggers. I'm pretty new myself, Stu, but I'm sure you'll have some interesting stuff to say.

Sunday, January 19, 2003

Visual Studio .NET Help Integration Kit

Kirk Fertitta just turned me on to the Microsoft Visual Studio .NET Help Integration Kit. He says it will let you integrate your help right in with the rest of the Visual Studio help stuff, so your API will show up right next to System.Foo.Bar. I haven't checked it out yet, but it sounds cool.

Managed DirectX - New Territory

Like just about everyone else, I have more things I'd like to do than time in which to do it. But for some reason, this seems to have been getting worse lately. I'm not sure where it came from, but long about November I actually started working weekends, writing an article for Chris Sells. Now, if you know me, you know that I'm not generally a guy to like working over six hours a day, let alone weekends. But I enjoyed it!

A lot of that is probably because I was working with Managed DirectX. Working with 3D graphics is so different from writing scalable systems (my usual speciality) that I had to more or less start over. It's good to be in unfamiliar territory - everything is new, and therefore cool. I mean, even the main application loop is different! I thought maybe I'd share some of my findings here.

You've probably heard of DirectX, Microsoft's COM-based game API. It's got a bunch of pieces to it: Direct3D for doing 3D graphics, DirectDraw for doing 2D graphics, DirectPlay for hooking players together in network games, DirectSound for doing cool sound effects, etc. etc. Well, Managed DirectX brings most of those things to the CLR programmer. What they've done is provided a set of Managed C++ classes that wrap up the API so those of us that like writing managed code can make use of all the nifty hardware-accelerated goodness that DirectX gives us.

I can't say that I'm sure what I think of MDX at this point. I've only just started, and while I have a pretty good grasp on the basics of Direct3D, the other areas are still a mystery to me. I'll be poking at DirectDraw next, to see if I can make sense of it, in pursuit of writing my presentation for WinDev East 2003. DirectSound is probably after that.

What's interesting about Managed DirectX - and Ted Neward heard me say this at a recent DevelopMentor retreat - is that Managed DirectX is sort of an oxymoron. I mean, think about it: DirectX, because it's letting you get at the graphics and sound hardware directly, for performance. But managed execution is all about isolating you from the details of what lies beneath.

So it's not entirely clear to me whether Managed DirectX will see widespread adoption or not. Will the added overhead of the CLR mean that people won't be able to write games in C#? Probably. But there are lots of other potential applications that don't necessarily require massive amounts of real-time performance, but which could benefit from the productivity enhancements. Things like architectural walkthoughs come to mind, since you might be able to prerender everything.

All I know is, it's fun territory to explore, since you can create some cool 3D stuff without all the mind-numbing bookkeeping required in COM and C++.

Next time: Direct3D: the basic game loop.

Wednesday, January 15, 2003

Default Passwords for Just About Everything

Keith Brown (the DevelopMentor Dark Prince of Security) turned me on to this link, which seems to have default passwords listed for just about any piece of hardware or software you can think of. The lesson? Change passwords on install.

Monday, January 13, 2003

Cool App Spotted


I saw this on Chris Sells' off-topic mailing list.


Win2VNC


http://www.hubbe.net/~hubbe/win2vnc.html


What it does:


This program will let you use two screens on two different computers as if they were connected to the same computer. It even works between different operating systems.


If you have two or more computers on your desk and you are tired of having several keyboards and mice around to control them, this is the program for you. While running this program, you can move the mouse pointer beyond the right or left edge of your primary display and the pointer will appear on the other computer screen. If you have ever used x2x or a computer with two graphics cards, you know what I am talking about.

Sunday, January 12, 2003

Cryptographic Basics Explained

I recently had just an excellent conversation with my friend Rich Blewett, also a DevelopMentor instructor. He asked me to explain the basics of cryptography, and the conversation went from there.  I've put it here in its entirety with his permission.