Scott Hanselman

Setting the Title of the "DOS" Command Prompt from a Batch File

November 22, 2004 Comment on this post [4] Posted in Musings
Sponsored By

Just a small reminder for myself and others that you can set the title of the Command Prompt Window with the "TITLE" Batch Command.

Since I'm building three different branches of our SDK during dev, it's nice to differentiate all these windows on all these monitors.

For example here's "mybuild.bat"

TITLE Building VoyagerFramework 2.0
set BUILDDIR=C:\dev\VoyagerFramework\build
call BUILD.BAT %1 %2 %3 %4 %5

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

A Hanselman Review: Doom 3 vs. FarCry vs. Half-Life 2 vs. Halo 2

November 22, 2004 Comment on this post [14] Posted in Reviews | PowerShell | Nant | Movies | Gaming | Bugs
Sponsored By

Believe it or not, I'm not a big gamer.  By 'not a big gamer' I mean, I didn't take a week off work to play GTA: San Andreas as a co-worker did.  By 'not a big gamer' I mean, I lost interest with Ninja Gaiden because it was too freaking hard. I've got about 2 hours patience with a game, but I stop when I start to hurt, be it hands, back or head.

That said, you'd think I was a gamer as in the last two months I've picked up Doom 3, FarCry, Half-Life 2, and Halo 2. These games, unquestionably, represent the pinnacle - thus far - of FPS-style gaming. The first three are PC while Halo 2 is on XBox. I'm playing the PC games on a P4-4Ghz with a gig of Ram and an ATI Radeon 9600 Pro.

There's been a million reviews of all these games from AnandTech-type reviews that tell you how much internal processor cache you must have to enjoy these games, to TomsHardware-type reviews that are meant to sell $500 video cards with heat sinks and fans of their own, to 12-year old blogger/reviewers who let you know about the latest mods and cheats so they can embarrass my 30-year old ass on multi-player maps. (You'll be happy to hear that I (and my ego) no longer need to defeat these infidels to feel secure. I just cry tiny tears and leave it at that.)

That said, I wanted to write up what I thought was important about these games, and what drives my opinion and buying decisions around gaming. These categories may be slightly different than the typical review. Or not.

Story

Game My Thoughts
Doom 3 While Doom 3 tries harder than it's predecessors, there's little story to speak of. Some crazy stuff happens on Mars and you're a Mars Marine who has to single-handedly kill everyone. There are some interactions with other characters but it's largely as you stumble upon them doing something else, and you can't assist them. They are usually killed as you walk away. The "scripting" feels a little stilted to me. There are a few clever places where the camera backs out of your first-person view into a third person view when you "trigger" an event. Perhaps a monster is making in entrance. Then the camera pushes in to the back of your head and control returns to you to take care of business. It's fairly predictable as you can "feel" when it should happen.
FarCry You'll notice a pattern here as "single-handedly" is pretty common in the FPS space. In FarCry, you're on vacation when your wife is kidnapped and you are unwittingly and unwillingly pulled into a terrorist plot to do some crazy stuff. You have to single-handedly kill everyone.  Every once in a while, a benefactor in the form of a scientist on the project meets up with you to help out.
Half-Life 2 The original Half-Life set a whole new level for story quality and I believe Half-Life 2 is even more extraordinary. There is constant interaction with the NPCs and a real sense of total immersion that I honestly haven't felt since "Bard's Tale." There's many places where you find your self asking "what's the story here? There's something I'm not seeing or being told." That sense of curiosity continues to push you forward through the narrative. It's also worth noting that the realism in the faces and expressions of the characters is truly amazing and really underscores the uniqueness of people. Rather than dozens of carbon copy NPCs, each character is totally unique and could be recognized in a crowd later. "Oh! It's this guy again" happens a lot. Additionally since the "action button" doubles as the pick-stuff-up-and-optionally-throw-it button, there are a number of things you can do to interact with the environment. I'd say that Half-Life 2 has the most interactive world of any game I've played. You can blow up anything, stack objects, throw objects, flip over tables and hide behind them, toss TVs out windows, and break things with your crowbar.  I was impressed with the attention to detail yesterday when I broke a window with the crowbar, expecting the whole window to break out, and instead, as it was safety glass, the window shatter, but stayed together, and I had to clear it out with additionally specifically-placed blows. This level of detail means that things in Half-Life 2 work as they should (as they do in the real world) so rather than learning the physics of the Half-Life world, you can use your knowledge of the real world in this artificial one. This increases the overall enjoyment of the game greatly.
Halo 2 Halo 2's single player story is even more compelling than the others as there are extensive movie-like cut scenes of some length that explain the context of the larger story.  Additionally you will end up playing as more than one character later in the game which deepens your involvement and causes you to wonder who are the good guys and who are the bad guys, and gives the game less of an "us vs. them" narrative and more of a "us vs. them and them vs. three or four other folks."

Puzzles

Game My Thoughts
Doom 3 Most of the puzzles in Doom 3 are pretty stock and fairly lame. Find this key from that guy's body. Open that door. Find this code from this guys personal log. Open that door. Only once (so far) is there a "move this barrel" puzzle and then it's just to throw them in the trash. Mostly it's just shoot folks. There's not a lot of platform jumping, just moving from door to door, ammo cache to ammo cache. The puzzle aspect of killing is limited. Mostly zombies lunge and beasts run at you. There's no puzzle-strategy on how to kill them - circle-strafe, rinse, repeat. Doom 3 has great object physics, but not nearly enough objects available to show it all. When you go to Hell later in the game, it's just red-red-red and there's even less to interact with.
FarCry FarCry is also not big on puzzles. There are a number of doors to open and forts to blow up. This is a much more tactical game - the "puzzle" factor is more "how do I kill as many of them before they realize there's just one of me." Sound (your footsteps) and light (your shadow) play a big part as you try to take out entire enclaves with limited ammo. The FarCry enemy AI is also top-notch and the best of the four games. The enemies will call for help, run away, panic, berzerk, hide, sneak and more. This makes you feel like you're fighting another intelligence. The physics model is without par, but none of the puzzles use it. There are a number of single-player downloadable maps that are specifically designed to show off the physics by causing things like chain-reaction blowing up of barrels, but I wish that kind of stuff was in the game more. 
Half-Life 2 The puzzles in Half-Life 2 are a freakin' blast. Most are physics-based which is great considering that I dig physics, and the physics engine within the game is fantastic. You'll find creative ways to raise water levels, set up ramps, remember that different objects have decidedly different weight, including your own body. There are gravity puzzles, water puzzles, 'how do I get up there' puzzles. Additionally you are, more often than not, presented with more than one way to solve the puzzle, but often only one solution is possible. Afterwards you'll find yourself saying, "oh, I can totally see where I took a wrong turn on that one."
Halo 2 Halo 2 is a little weak on puzzles. Again, it's more tactical. Some fights you can bow out of by letting the fighting factions beat themselves up. Each enemy has a weakness or weapon they are the most vulnerable to, so there's a lot of rock-paper-scissors choosing of weapons. Most puzzles involve killing something then finding a button to open a door or move an object. Since your own interaction with the world is the "action" button, and that button can only "do stuff," you can only perform actions that an object is scripted to know.

Vehicles

Game My Thoughts
Doom 3 No vehicles in the shipped game. Lame. However, just days ago vehicle support was added to the Mod SDK which means total-conversion mods could utilize vehicles soon.
FarCry

The vehicles in FarCry are wide ranging, from a blow-up boat, to a hang-glider, to buggies and jeeps. There are number of times when you have to make smart use of a vehicle or its weaponry to solve a task. FarCry and Halo 2 are just about equal when it comes to coolness of vehicles, but Halo 2 gets the nod for including "jacking" of vehicles.

Half-Life 2 The "water hazard" sequence in Half-Life 2 is bar-none the most extraordinary experience I've ever had playing a single player FPS. It alone makes the game worth the price. Half-Life's vehicle use is great, and the immense size of the vehicles and beasts that the enemy uses is also awe-inspiring, especially the Striders.
Halo 2 Halo 2 improves on Halo's use of vehicles which was already outstanding. Halo 2 adds the ability to "jack" a vehicle. With good timing you can jump onto an enemy vehicle and yank the driver out, throwing them from the cockpit. You then take over driving and, well, kill them all. There are also some immense non-drivable vehicles that you have to jump on top off from a bridge and destroy from the inside. Also, the vehicle sizes far greatly from tanks to small "ghosts" which dramatically changes the feel of the game during these sequences. The tank sequences are especially powerful and satisfying.

Graphics

Game My Thoughts
Doom 3 Touted as the graphics to end all graphics, Doom 3 is pretty snazzy. However, it's dark. Frankly I found myself thinking "are the graphics really all that good or are they justing being smart with shadows." The objects are gorgeous, as are the player models, and the use of light (what light there is) is a amazing. Everything casts a realistic shadow and the reflections and use of glass is amazing. It's just so damn dark. Additionally, the graphics are repetitive. When you've see one lonely Mars base level you've seen them all. OK, I get it. Doesn't the Sun come out on Mars? FYI: I play Doom 3 at 1280x1024x32 with 2x Anti-AliASINg. [Example Image]
FarCry I play FarCry at 1600x1200x32 with no Anti-AliASINg and it's amazing. The FarCry environment is largely outside on a tropical island. The organic aspect of the island is well represented with their graphics engine, with the grass and trees standing out particularly well. The use of wind and sound along with swaying grass and foliage is strong in the jungle scenes. However, when you start your way into the caves and start fighting monsters, it gets too dark and too much like Doom 3. Frankly, I played FarCry religiously for days until I got to the dark monster stuff, and just got disinterested. I'd go back and play the game from the start up through, and until, the monster levels. Make sure your resolution is as high as your card will support, it's worth losing a few frames a second to get a glimpse at the incredibly long draw-depth. FarCry boasts a draw-depth (the distances at which objects in the environment aren't rendered anymore) as much as a full kilometer. The levels in FarCry are MASSIVE - as much as 4 kilometers square. The engine really shines when you are at the top of the island with a sniper rifle. The binoculars are a thrill to use to spy on the enemy at long distances. [Example Image]
Half-Life 2

Half-Life 2 blew me away. As much as Doom 3 floored me, Half-Life 2 crushed Doom 3. Argue polygons and detail and lighting and whatever all you want, but when Half-Life 2 renders an entire living city-scape with clotheslines and giant propaganda-filled TV overloading city squares, and waterways filled with floating plastic bottles (that you can interact with) the 10x10 corridors and mazes that Doom 3 has me running around in just can't compete. Additionally the face and character modeling is without par. Half-Life 2 has restored my faith in PC gaming. [Example Image]

Halo 2 The Halo graphics engine has been completely re-written between Halo 1 and Halo 2. It appears to be a progressive rendering image that drops textures and polygon count when frame rate might suffer.  For example, when a level loads, it loads immediately, but you can see far-away textures load last and cover over low-res images and low polygon count buildings. You can still move around during these times, and it rarely lasts more than second, but I thought it was of note. Additionally as you move away from, say a dead body on the ground that is not longer of interest, there is a "popout" (my word) effect as the game dramatically and quickly lowers the polygon count (or swaps the model) for that entity, presumably to open up processing power for more important objects. I personally find this effect distracting and obvious, but no one else I've mentioned it to seems to care.  During a slow moment, look at any object and walk slowly towards it and then away from it as far as you can.  You'll be able to count at least THREE, possibly FOUR separate models or "steps" that the object will go through.  Again, I'm assuming that since the XBox is nearly three-year-old technology running an NVidia nForce derived card that this software technique opened up processing headroom for normal mapping. To be clear, the graphics in Halo 2 are the greatest graphics I've ever seen from a console, and certainly make standard TV shine. (Halo 2 also shines at 480p on a HDTV but 480 horizontal lines is the max, and equivalent to 640x480 or 720x480 resolution) However, it can't compete with a 19" LCD at 1600x1200 running Half-Life 2. [Example Image]

Level Design

Game My Thoughts
Doom 3 I found the level design in Doom 3 to be fairly pedestrian. I mean pedestrian in both meanings. It's combines the excitement (not) of overly-symmetrical design with the thrill (not) of constantly being on-foot, not to mention having to back-track to retrieve keys and widgets you may have missed. The levels tend to be named Alpha Lab 1, which isn't a bad name until you've been playing for hours and the next level is Alpha Lab 7. OK, I get it. Can I get to the freakin' Beta lab? Ah, steel walls with no lights. We've made it to Mars, but didn't bring backup batteries? Flares? A friggin' glowstick? But, I digress. Every once in a while you get to leave the lab for the Martian landscape, but you consistently don't bring an air pack or helmet so you only get to enjoy the scenery for 20 seconds before your brain explodes. You have to run as fast as you can to the other airlock. Again, we knew we were coming to Mars. Perhaps a breezeway would have been a nice architectural touch? Just a though.
FarCry Levels in FarCry are many and varied. The game is huge, and while most of it happens on a remote tropical island, the design makes good use of caves, mountain trails, forts, underwater and boat approaches, as well as the best level that includes a giant abandoned tanker (I thought this level was reminiscent of The Goonies. Go figure.) culminating in a huge fire-fight on the top that includes helicopters and guys on turrets. And me with a single Uzi. That was a tough one.  As you move deeper there are levels in underground caves, high in the trees (ala Ewok village) and reinforced concrete forts. If it wasn't for those darn monsters, I would have loved it all the way through. I just don't feel the need to put genetically-modified mutant creatures in every single game.
Half-Life 2 That said, Half-Life 2 is all about mutant creatures (from another dimension?) but the Level Design is perfect. You have to think though, when moving around these levels. While the gameplay is pretty linear, there are many back roads and alleys that should be explored, not only get to useful plot points, but to avoid running out of health. There's little backtracking, but when there is, you'll often find different things and people when you return to a previous location. I got nailed a couple of times assuming that I'd cleared an area, when of course, in a realistic simulation, the cops would come to check out the commotion and might be waiting for my return. There is an uncomfortable break in the action as you move from level to level. It presents itself as a mandatory pause with a -loading- sign. After 20 seconds the game continues. I wish they'd have been loading these levels in a background thread as Halo 2 does. Otherwise, Half-Life 2 is the closest thing I've experienced to total immersion in a game. You are truly "playing a movie." I feel that the total lack of cut-scenes increases this sense of immersion. Instead the scripted encounters take the place of cut-scenes and you always have control over your character's movement.
Halo 2 Halo 2 level design is, as usual, stunning. It's a little two symmetrical and repetitive, IMHO, when you encounter the Covenant and enter their domain. However, the early city levels are massive. Another important note about levels - in Halo 2 there isn't the sense of a distinct "level," as there are "scenes." There is no loading pause to speak of as you move from location to location. You'd think at this level of the development of games as a media, the publishers would realize that we don't like waiting for levels to load. If you know the game is linear, then you know what the next level is. For Pete's sake, preload it as I'm moving towards it! It's not like I'm moving towards another level. Halo 2 takes this Common Sense to heart and gives you a completely seamless experience.

Multiplayer

Game My Thoughts
Doom 3 Doom 3 only supports up to 4 players at a time to play multiplayer. In my mind, this is hardly multiplayer. If I want to play an FPS with strangers, I'd rather it be a free-for-all 16 player war than just 3 other schleps. There are hacks and mods to allow for more players, but this was a surprising message for ID to be sending the public about their flagship product. Doom 3 is clearly meant to be a single player game. 
FarCry FarCry has a very active multiplayer map community and there are literally scores of maps available. The interface is slightly less friendly than Counter-Strike, and certainly not as flexible as Halo 2, but still a strong multi-player contender, and the winner for massively-sized maps.
Half-Life 2 Half-Life 2 is officially a single player game. It does ship with multiplayer maps, but as has been the tradition since Counter-Strike (a total conversion Half-Life 1 mod), the engine is meant to be reused for multiplayer. That said, when you buy Half-Life 2 via Steam, you get the full version of Counter-Strike: Source, which is newer port of the anti-terrorist classic Counter-Strike using the new "Source" Graphics Engine used in Half-Life 2. This game is a blast and includes lots of maps, weapons and VoIP trash talking.
Halo 2 Halo 2 along with XBox Live redefines ease-of-use with its multiplayer. There are Parties, Clans, Rumbles, Giant Fights, Little Fights and in-between. You can use any of their dozen included game variants with complete control over allowed weapons, rules, etc. You can also create named-variants of your own games. Every single game played is stored and can be accessed via Bungie.Net or RSS Feeds. Additionally, everyone who has XBox Live has an XBox Communicator Microphone and broadband (required) so the sense of multi-player community is heightened by both proximity-based communication (whoever is nearby can hear you) and push-to-talk walkie-talkie communication (press a button and talk through your helmet to your team). The XBox has really improved multiplayer gaming with the inclusion of microphones in a way that is possible, but still a hassle, on the PC.

Patch-ability/Maintain-ability

Game My Thoughts
Doom 3 There's an Update button within Doom 3, but it didn't tell me I needed to update even though an update was clearly available not sure what's up with that.  Additionally, when I did update, the new update wouldn't allow me to use my own save games from where they were saved. Instead I had to start that level over from the beginning. I'm sure there was a technical reason why this had to happen, but it was LAME.
FarCry FarCry has had some patching troubles with an abortive attempt at a Patch version 1.2 that was yanked the following day (not after I and many others installed it.) Version 1.3 took months to be released.  There's no patch notification service so I have to poll for patches, and they are installed via InstallShield. Fairly typical, certainly not revolutionary, and one of the lame things about PC gaming. I also had to start a level over due to file version incompatibilities.
Half-Life 2 Half-Life 2 uses a unique game-delivery system called Steam. I payed $70 and received not only Half-Life 2, but also the original Half-Life, Counter Strike:Source, and 10 additional games like Day Of Defeat and Team Fortress. All delivered over Steam. I can even play them on my laptop just by installing Steam and logging in. All the patches are automatically installed on startup.  Some folks complain that you have to be online to get your purchase authenticated, but that hasn't been a problem for me, and I was totally impressed as the multi-gigabyte Half-Life 2 purchase was slowly pre-loaded onto my machine weeks before the game was released. The entire purchase and experience was online. No box, no problems. I was throughly impressed with the process. Steam also checks the version of your Video Card Driver and points you to the correct download page to get the latest version. Why doesn't Windows Update open their API to do that for the OEMs?
Halo 2 Surprisingly patching XBox Live is not a seamless as Half-Life 2/Steam. With Steam, you don't have to do a single thing. With the XBox you are informed there is a required updated and have to press one button. Considering that I don't have a choice, why not just install it silently? That said, every update experience (what few there are) I've had with the Xbox has been butter. You just hit "A" and get on with it. One of the nice things about Console Gaming, but as has been proven with Steam, a good experience is equally possible with the PC.

Conclusion

Hanselman
Rank
Game My Thoughts
1 Half-Life 2 Great graphics, great puzzles, great story, great feel, great experience. Steam rocks with auto-updates and patching. My favorite and the ultimate FPS PC game so far.
2 Halo 2 Unparalleled totally seamless multiplayer with up to 16 folks trash talking simultaneously, a dozen variations, best graphics on a console, no patching, no worries, downloadable levels and unbelievable statistical database.
3 FarCry If you want to fight on a tropical island with hundreds of terrorists, this is a winner. Also has easy multiplayer with massive maps and dozens more to download. Also the total-conversion mod community is large and we will likely see the next big mod come from this group for this game.
4 Doom 3 Only 4 players in multiplayer? Oy. Too dark, too scary, a real disappointment. Amazing sound, truly, but otherwise I just don't have the patience or stomach for the repetition.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

The Daily Brain Fart - LastIndexOf broken? Oh, no, 'tis me.

November 20, 2004 Comment on this post [2] Posted in Learning .NET
Sponsored By

Often, in the scope of writing massively scalable enterprise systems that manage your finances, I parse strings. Mostly in my spare time.

What's happening here? I was reminded today that the start index passed to LastIndexOf() was from the ass-end of the string. I then lamented the obviousness of this and was then humbled by the silent-but-deadly odor my own brain fart.

I'm glad you're that much more confident in my abilities after reading this post.  Up with TDD! Down with ADD!

public static void Main()
{
    int newlineIndex = -1;
    string x = "bob\neric\nfred\nted";
    string z = "bob\r\neric\r\nfred\r\nted";

    newlineIndex = x.LastIndexOf('\n',0);
    Console.WriteLine(newlineIndex); //Expect 13, always get -1
    
    newlineIndex = z.LastIndexOf('\n',0);
    Console.WriteLine(newlineIndex); //Expect 16, always get -1

    newlineIndex = x.LastIndexOf('\n');
    Console.WriteLine(newlineIndex); //Expect 13, get 13
    
    newlineIndex = z.LastIndexOf('\n');
    Console.WriteLine(newlineIndex); //Expect 16, get 16

    //Fart realized...
    
    newlineIndex = x.LastIndexOf('\n',x.Length-1);
    Console.WriteLine(newlineIndex); //Expect 13, always get 13

    newlineIndex = z.LastIndexOf('\n',z.Length-1);
    Console.WriteLine(newlineIndex); //Expect 13, always get 13
}

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

CSI: ASP.NET - The one where a double HTTP GET from Internet Explorer (IE) causes problems with FormsAuthentication and my sanity

November 19, 2004 Comment on this post [8] Posted in ASP.NET | Movies | Javascript | Bugs | Tools
Sponsored By

Here's a weird one from the CSI: ASP.NET files...this is the weirdest DOUBLE HTTP GET bug, since, well, the last one.

Scenario:

  • On Brian's local machine as a user moves through an enrollment process in an ASP.NET Application, everything works fine. 
  • The user receives a valid ASP.NET SessionID, moves from page to page, logs in to Forms Authentication and receives a Forms Auth Cookie.
  • All is right with the world.

Problem Arises:

  • When the ASP.NET Application is deployed to a Dev machine (not Brian's machine) the whole process doesn't work. It seems that the user is getting a new, fresh Session each page view. The Forms Authentication Cookie never shows up, and the ASP.NET Session ID is always new.
    • Note: ASP.NET Session IS enabled on both machines, no cookie blocking or domain specific security exists.

Forensics:

  • I hear about this and Brian and I load up Jonas Blunck's ieHttpHeaders (I donated US$10 to him after this experience) to see what's really happening.
    • Opinion: I'm not a fan of Programming by Coincidence where you move code around at the highest level of abstraction, basically creating all sorts of invalid states so the system "mostly works" without ever finding out what the Root Cause is. A lot of the stuff I do at Corillian is Root Cause Analysis in the most informal sense. I can troubleshoot a problem for you and also use QEMM386 to load your device drivers into the UMB giving you up to 610k of main memory! These are the skills we pick up. :)
  • We load up the HTTP Headers on Brian's (working) local machine and see something like:
    • GET /myapp/login.aspx HTTP/1.1
    • 200 OK
    • Set-Cookie: ASPSessionID=1234...
    • GET /
    • 403 Forbidden
    • GET /myapp/nextstep.aspx
    • 200 OK
    • Set-Cookie: ASPSessionID=1234...
    • Set-Cookie: FormsAuth=mzxa...
    • GET /
    • 403 Forbidden
  • What the heck are those 403 Forbiddens? We are only requesting two pages. Why are we seeing two extra GETs?
  • So, we think:
    • Spyware - nope, we ran SpyBot. Clean.
    • GoogleToolbar - nope, it doesn't do that.
    • JavaScript - none on these pages that would change location.href
  • We then run HTTP Headers on the Dev (NON-working) machine and see this:
    • GET /login.aspx HTTP/1.1
    • 200 OK
    • Set-Cookie: ASPSessionID=1234...
    • GET /
    • 200 OK
    • Set-Cookie: ASPSessionID=4567...
    • GET /nextstep.aspx
    • 200 OK
    • Set-Cookie: ASPSessionID=1234...
    • Set-Cookie: FormsAuth=mzxa...
    • GET /
    • 200 OK
    • Set-Cookie: ASPSessionID=7890...
    • Set-Cookie: FormsAuth=""
  • Oy! The Session and Cookie are getting blown away by this mystery HTTP GET.
  • What's different on the Dev machine?
    • The ASP.NET Application is in the root directory, rather than in /myapp as on Brian's machine.
    • The ASP.NET Application allows anonymous users to access the root "/", while Brian's machine doesn't. It allows anonymous users to access /myapp.
    • The Default Document is set to /login.aspx on the Dev machine, while Brian's machine has no default document. When / is asked for on the Dev machine, /login.aspx will be retrieved.
  • What does an HTTP GET to /login.aspx do?
    • if (!IsPostBack)
      {
         Session.Abandon(); //Clean up personal info from the session
         FormsAuthentication.SignOut(); //Fresh cookies for a fresh login
      }
  • So, yes, requesting / from the Dev machine will execute /login.aspx which will blow away their session and FormsAuth cookie, but why is the HTTP GET / happening on every page?
  • What is the only thing that is shared between pages? The Footer.ascx page.
  • What's on that page? A bunch of tables, and some spacer images.
  • Spacer images you say? Oy, you mean 1-pixel gifs.
  • Ah! You WISH I meant 1-pixel gifs. I mean <img src="" width="1" height="1">

Coda:

  • IE will automatically issue one HTTP GET for "/" (the root of the domain) for every page that has an IMG tag with a empty src="".
  • Know what happens if when that request is served.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Presentation Tips for People running Virtual PC or VMWare

November 19, 2004 Comment on this post [1] Posted in ASP.NET
Sponsored By

I chatted with G. Andrew Duthie yesterday, and we both agreed it was exceptionally egregious of folks who give Microsoft presentations running Virtual PC to force us to watch their silly presentations with 6pt MS Sans Serif Fonts.

People: If, during your presentation, you say "Uh, ya, you probably can't see this" - you're not only not-prepared, but you're wasting my time. You've got 786,432 pixels up there that are NOT working for you, and you've just let me know verbally, and visually. <sarcasm>Kudos!</sarcasm>

So, a reminder for you to spread the word about how to give a Successful Microsoft Presentation and a few extra updated tips for 2004:

  • ZoomTheHeckIn: Seriously, familiarize yourself with ZoomIn. It's a movable screen magnifier, and you wouldn't believe the appreciation you'll get from the crowd when they can actually see what you're doing.  Remember those 786,432 pixels? How many do you think are working for you when you're demonstrating Calc.exe? Let's just say < 786,432, eh? Put ZoomIn in your QuickLaunch or setup WINDOWS-Z with WinKey to launch it.
  • DOS is Good Green: Set a Command Prompt (VS.NET Command Prompt) to a black background with Kermit-green lettering that is Lucida Console 18pt.  This is scientifically (sez me) THE most visible size and color combo for prompts when presenting. Feel free to use yellow on blue in the privacy of your own bedroom, but throw me and your audience a bone and have one prepared that's, *ahem*, presentable.
  • BigFonty To the Rescue: Have a user already setup (Andrew says don't present as Admin!) that has all their fonts set large. I call mine "BigFonty" - It was either that or "The Full Fonty." That way there's no prep time, you just log in as your Presentation Guy and you're good.
  • Maintain the Illusion: I'm sure it's lovely that you're using VMWare or VirtualPC or even Wine, but please know that your audience doesn't care. Unless you're demonstrating SQL Server clustering fail over by running two VMs, I don't care.  So, don't run your Host PC in 1024x768 and your VPC at 800x600!  Your VirtualPC should follow the SAME rules as your Host. That means, see the rules above! Big fonts, ZoomIn, etc. Most importantly, switch your VPC to FullScreen at the same resolution as your host. Maintain the Illusion. Your audience will thank you.
  • Know Where Stuff Is: For Pete's sake, know your own machine.  Don't go hunting for that file, you should have had that file (or a link) in your presentation folder.  I've got a lot of Shortcuts and or "Junction Points" set up so everything can be found for each talk.
    • Tangent: Down with Subst! A LOT of people don't know you can have Junction Points/Reparse Points/Hard Links on NTFS! It's always been there.  Start thinking about using them to make your builds respect relative paths. Don't make all your developers uses Subst.exe! It's 2004! Down with Subst! I don't want your freakin' S: drive!

These are just a few thoughts I've had after a years of making mistakes. I've taken a number of Presentation Skills classes, but they don't teach you how not to bore or insult your audience. Remember, if you give a crappy small font presentation with tiny dialogs - you LOSE the right to complain about other people's talks.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.