09.22.05

Google Search in IE7 beta

Posted in General at 12:22 am by jw

I happen to like Google’s search engine and I couldn’t find an easy way to get the built-in search to go to Google instead of MSN (not that MSN was really that bad, I’m just a creature of habit and am used to Google now).  Well, a quick trip to the registry and everything was happy – the search engines are all there nicely laid out in registry keys for me.  To cut to the chase, just create the following text as a .reg file and “run” it to put Google into the search engine list:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\SearchScopes\GoogleSearch]
“DisplayName”=”Search Google”
“SortIndex”=dword:00000002
“URL”=”http://www.google.com/search?hl=en&q=%s”

Simple as that!

Note: Apparently this doesn’t work in the latest builds.  Try here perhaps.

09.20.05

Movies

Posted in General at 7:03 pm by jw

I was going to write some fun stuff about how things are now I’m back in Pittsburgh after my week in LA, but really there’s not much fun stuff happening. I’m madly trying to level Dd in EQ2 (though whether I’m taking tradeskills or levels is an interesting question), and also trying to get spare time to look through all the stuff I discovered at PDC. Tough conflicting requirements on my time there! Oh well, sleep was never necessary and it’s not like tradeskilling takes a huge amount of concentration.

Instead, I found this interesting quote on Slashdot:

“If Coca-Cola accidentally created 100 million cans of faulty Coke, you know for sure the entire 100 million cans would be dropped in the Atlantic or Pacific Ocean, without a second thought and irrespective of what that did to the year’s profits. What do we do with a crappy movie? We double its advertising budget and hope for a big opening weekend. What have we done for the audience as they walk out of the cinema? We’ve alienated them. We’ve sold audiences a piece of junk; we just took twelve dollars away from a couple and we think we’ve done ourselves no long-term damage.” — David Puttnam, movie producer (from GQ magazine, April 1987)

I have barely been to see any movies since I’ve been in the US. It’s just not worth my money or time to go out for what has largely been a bunch of sub-par movies. Why not just stay home and play interactive games, where you get to be active instead of passive in your entertainment? I think I’ve spent orders of magnitude more cash on the games industry than I have on the movie industry.

So, what’s this all about? The movie industry has become complacent. The video game industry is going to kill their profits and unless they find a way to produce more movies that are actually interesting there’s really nothing to do but sell your stock in movie companies that don’t own gaming franchises as well.

09.17.05

PDC Day 4

Posted in General at 1:22 am by jw

Not really much to say about day 4.  Today it was all panels for me, on the future directions for .NET and Windows Internals.  Rather than the traditional presentation format, it was audience driven with 4-6 speakers responding to questions from the floor.  The .NET panels were interesting to listen to but I really couldn’t take much away from them.  Future directions seem to be largely driven by demand and performance, with the only vaguely interesting thing (to me) being the possible addition of default implementations for interfaces which will give a poor-man’s multiple inheritance.

The Windows Internals session was more interesting in the line of discussion I concluded with yesterday.  I was able to actually talk with the Windows kernel team about the restrictions being placed on kernel mode code and get their feeling on it.  It was made rather overwhelmingly clear to me that the driver signing implementation was going in from massive corporate pressure to do something about malware and that sort of pressure (which really affects Microsoft’s bottom line on the business desktop where Linux is far more of a threat) isn’t something they can give way to easily.  However, the line being pushed was a little less severe than the one I was hearing yesterday:

  • Windows kernel protections will definitely be turned off when a kernel debugger is present.
  • The decision to have Microsoft as the only signing authority hasn’t been made yet – it’s just one of the options being considered.  Alternately some form of code signing could be used and managed as a group policy (something I’d be quite comfortable with).
  • Local kernel debugging tools are likely to go away as they can be used to introduce unsigned code into the kernel.  While this was obvious for Windbg, what this means for tools like SoftICE is far more ambiguous.  I’m not sure Microsoft could get away with eliminating entire products like that.
  • Sysinternals tools aren’t really a consideration in their thinking.  While they acknowledge their usefulness, the pressure to restrict kernel mode is overwhelming.
  • Kernel debugging through VM connections will be an interesting avenue to continue to use if looking into kernel structures.
  • Windows XP-64 already includes code that scans for unauthorized patching and hooking of kernel routines and will bugcheck if it finds something.
  • Microsoft recognizes that any security attempt is worthless unless they control the boot sequence from hardware.  My take is that they believe raising the bar is better than doing nothing.

I’m still a little annoyed about the whole “need a kernel debugger present” restriction but I can see the point of view from Microsoft’s side, especially when expressed in terms of corporate pressure.  Unfortunately that means that despite my love of the NT kernel, it seems Linux is going to become much more the OS of choice for people that want to mess around at the hardware/OS level to create new and interesting things.  One of the strengths of Windows has always been its openness which attracted developers over other products, it seems that’s going to change.  While I understand the loss, I still mourn it.

09.16.05

PDC Day 3

Posted in General at 1:01 am by jw

Today was definitely an interesting day at PDC.  We got our copies of the Release Candidate for DevStudio 2005, picked up the DVD for Longhorn Server and got to listen to Bob Muglia tell us about Microsoft’s plans to seriously put a dent into Linux’s pet Beowulf space.  I’ll keep the best until last though, so first things first and here’s the keynote summary:

  • The “share the pain” video was almost as good as the “Napolean Dynamite” video.  Another excellent production and one that developers can definitely relate to.
  • Later this year (I assume with the .NET 2.0 release), MS will release “Windows Server 2003 R2” which will have a bunch of new stuff:
    • Password synchronization with Unix
    • Active Directory can have an NIS master
    • Services for Unix bundled.
    • .NET 2.0 (obviously)
    • WS-Management support.
    • MMC 3.0, which supports managed plugins (no mention of Monad though)
    • Remoting of single apps
  • A guy from Macromedia gave a demo about the new IT infrastructure, but it seemed to me to assume a lot of tight coupling between developers and the field.  Maybe I didn’t fully understand it, but sounded like a lot of hype about nothing particularly useful.
  • In 2006, they will be releasing the “Compute Cluster Solution” (CCS)
    • Obviously targetting Beowulf – takes computing jobs and farms them out to a loose cluster.
    • Beta 1 is available.
    • Excel 12 will be able to use it to farm out big spreadsheet work.
    • It would be nice if you could do a distributed compile on it, but that’s just pipe dreams I think.
  • Full committment to have all administration interfaces available via Monad.
  • A bunch of work is going on with AD.
  • A bunch of work is going on with “Rights Management” too, but I still have to wonder if they really do get it.
  • In 2007, Longhorn Server is due out:
    • Terminal Services can be remoted through firewalls (so what’s the point of a firewall again if everyone can pump their protocols through them?)
    • Transactional File System
    • IIS 7 (more on this later)
    • Event log is enhanced with a bunch of metadata about events
    • Modular architecture – can remove all sorts of stuff including the GUI, it seems.
    • Hot add/swap CPUs, Disks and RAM (assuming hardware support)
  • IIS 7:
    • Very modular, like Apache.  Can add/remove modules at a directory level.
    • Even tighter ASP.NET integration (when the module is running)
    • Better diagnostics and tracing.
    • Killing the metabase for XML config everywhere.
    • All MS provided modules use the same API that we can write to.
    • Gave kudos to Apache – good sportsmanship there really.
  • Longhorn Server will support virtualization – VMWare stock gonna crash.
  • Everything 64 bit.

The first breakout of the day (after I’d collected my Longhorn Server DVD) was “5 things every Win32 dev should know”.  I just had to turn up to this one for the title:

  • Performance isn’t what you think:
    • Latency is the killer, that means DISK I/O.
    • Pointers lead to page faults.  Avoid them!
    • Arrays are awesome – lots of data locality so less faulting.  Trees are bad even though they are O(log n).
    • Doing nothing is really fast!
  • Play well with others:
    • Always ask “what if 2 programs did this?”
    • Polling is bad – uses CPU power and keeps memory pages present.
    • Be careful in thread pools to clean up when releasing the threads.
    • Be aware of remote desktops – animation on them sucks.
    • Scale up and down based on machine hardware.
  • Large Fonts and DPI changes:
    • “Large Fonts” only affect a few things around the window edges.  They will go away in Vista.
    • High DPI settings affect everything!
    • Scale bitmaps to cope with high DPI.
    • Expect 96, 120, 144 and 192 DPI and TEST with those DPIs.
  • Parent/Child and Owner/Owned is kinda complex:
    • Parent/Child is containment
    • Owner/Owned is encapsulation
    • Reparenting is hard. Avoid it.
  • Async input queues and syncing them:
    • AttachThreadInput mimics Win3.1 behavior on queues.
    • Owner/owned and Parent/Child attach input queues.
    • Journal hooks screw up your entire system.

Definitely an interesting talk.  Now to see if I can remember it all!  The next session was a tough choice.  Really wasn’t much going on so I went to a Vista UI guidelines session.  Didn’t say much other than go here, and gave a pretty good demo on how to code up the new dialogs for Vista to make stuff look good.  There’s a bunch of caveats when dealing with drawing on glass because GDI is so damn old and just doesn’t understand alpha blending.  The best deal seemed to just use WPF wherever you can.

The lunchtime session I went to was on memory tuning in .NET.  Lots of interesting tips, but nothing too fantastic if you’ve delved around a profiler before.  Basically, the tricks are to use vadump, CLR Profiler and sos to poke around and figure out all sorts of cool info.

Next was a Java/.NET integration discussion which I really don’t have too much to write about.  The general feeling of the talk was that they could demo a lot of stuff that will work well in a year or so when the final products are out and settled, but we’re still in the mess we currently find ourselves and nothing was mentioned about the small differences in interpretation of WSDL that can cause so many problems.

I’ll leave the Vista Internals talk for last, because the Vista Power Management discussion wasn’t that engaging.  They’ve come up with a new event model for Power Management now so you don’t have to poll for power state, and Vista will have all desktops defaulting to sleep on a timeout, which will force a LOT of application developers to actually do something intelligent.  You also no longer get the chance to prevent sleeping when the user initiates it – it just happens and you have to cope.  As expected though, you can still disable any automatic power events while performing a long task (watching a movie, burning a CD etc.)

Now, for Vista Internals:

  • New boot loader which is platform independant (can run 32 or 64 bit code)
  • As mentioned before, kernel supports hot swapping or adding of CPUs, RAM, etc.  No mention of removing anything though.
  • Memory manager was refined:
    • Deals with kernel memory more effectively.
    • Handles NUMA and large pages.
    • Handles the paging of video/GPU memory.
  • Drivers can now run in user mode, and system can recover from one of these crashing (maybe).
  • Better multimedia support in memory manager, IO manager and process scheduler.
  • Lots of changes for windows services:
    • Services stay in desktop session 0, but user windows move to session 1 so can’t message each other.
    • Services can delay their start to help bring the system up faster.
    • Serivces can declare their privilege sets and have their process tokens stripped of unneeded privileges on startup.
    • You can get notifications about local or remote service state changes.
    • Can programmatically recycle a service process without upsetting the SCM too much (if you do it right).
  • Registry is now transactional (always was atomic though, just not across calls)
  • Registry and File System can be virtualized (access denied can point the user somewhere else under the hood, to allow low privilege modes).
  • Registry filter drivers can now be written, just like File System Filter Drivers.
  • WoW64 (the 32 bit emulation layer):
    • Supports VM spaces of up to a full 4G for user apps.
    • 16 bit support has gone from 64 bit Windows (hooray!!!)
    • 32 bit and 64 bit apps can talk to each other via COM (across different processes obviously)

And the real killer:

  • All kernel mode code (and some critical user mode code) must be signed by Microsoft in Windows Vista 64 bit (and possibly 32 bit in the future).
  • The only proposed way around this is by attaching an external kernel debugger.

Now, while this is being touted as a fantastic way to stop kernel rootkits and other nastiness, it really has a whole raft of other effects which are going to make life annoying, or just plain impossible for power users or administrators.  For example, consider the following:

  • None of the utilities at sysinternals.com will continue to work unless every revision of the driver code is digitally signed by Microsoft.  That severely limits the creativity of people like Russinovich and Cogswell.
  • Developers won’t be able to mess around with driver code for experimenting..
  • Universities will have to get special builds of Windows to allow their students to write driver code (which is part of many courses these days).
  • Driver fixes will be delayed by having to pass through Microsoft’s WHQL whenever a video card company wants to release something new.
  • We can’t test any of our drivers on Vista without attaching a debugger – hardly a production test..

And that’s just the tip of the iceberg.  The annoying fact is, rootkits can still get in.  Sure, it raises the bar for them but the simple fact is, unless Microsoft can get hooks into the hardware itself and prevent it from loading a modified kernel image, malware can simply turn off the checking in the kernel.  At some point a decision is made to load or not load a driver.  Change that flag and you own the computer.  People without computer knowledge will “trust” in Microsoft’s wonderful new security and they’re STILL vulnerable.

I hate stupidity like this.  I actually don’t mind it being on, but for goodness sake, give me a method of self-signing stuff, allowing self-signing to happen, or some other switch to opt-out of this stupid restriction.  Personally I think it’s got more to do with Digital Rights “Management” than it does preventing rootkits though.  One more step for Microsoft refusing to understand core security principles – if you don’t control the entire boot sequence from the first instruction executed by the CPU then you don’t control anything.  End of story.  Thanks for playing.

I was really excited about Vista too, until I heard this..

(sigh)

09.15.05

PDC Day 2 – full writeup

Posted in General at 5:01 pm by jw

Day 2 started with the Keynote focussed around the Windows Workflow Foundation.  As I’m much better with bullet lists than writing lots of padding text, here’s the pieces I took away from it:

  • Microsoft Expression Suite will be composed of the three projects named “Acrylic”, “Sparkle” and “Quartz”.
  • Acrylic is a combination vector/bitmap editing program which looks to me targetted at the low end Photoshop/Illustrator user, especially someone designing for the rest of the MSDev frameworks.  The “magic select” feature was demoed, which rather easily cut a figure from the foreground of a photo – way better than Adobe’s magic lassoo.
  • Sparkle is essentially Microsoft’s Flash replacement, which allows editing of animations and other web goodness based in a trusted .NET language environment.  It’s Visual Studio based and even uses MSBuild integration for the whole workflow integration (can you tell it was a marketting approved speech?)
  • Quartz is simply a web editing program which knows lots of stuff about how CSS interacts with pages.  Lots of demos were shown about how editing CSS changes the entire style of a web page, but I fail to see what is particularly “new” about that – it’s what CSS does.
  • VSTA is VBA for .NET.  We already knew that.
  • Lots of work is going into Sharepoint, stuff like blogs, wikis, rss, outlook offline integration, more portal junk, searching, content management, and lots of pretty business integration stuff.
  • Sharepoint allows content type definitions which can have templates, property sheets and workflows associated.
  • Sharepoint is doing a lot with Infopath forms.
  • Search in Sharepoint has lots of integration with web, AD, all sorts of other stuff.
  • XL12 will publish to Sharepoint and gets rendered on the server at viewing time (using XL on the server).
  • Access 12 can use Sharepoint lists as a raw external data type.

Following the keynote I attended a session on VSTA, given that my work uses VBA in a fairly large amount of applications.  It honestly wasn’t that useful for me – basically it was from the user of VSTA and not a person who wanted to put VSTA into their application.  The only really useful thing for me was to find that the SDK will be available sometime in the first half of next year.

Over lunch, I turned up to a quick session on how to improve .NET application performance with .NET 2.0 and came away with:

  • Use NGen and make sure to get unique DLL load addresses and hard bindings to dependancies.  This avoids fixups and private code.
  • Generics are good but have some fixed size overhead.  You don’t get memory benefits until you have about 500 simple items in a generic.
  • Foreach is badly maligned.  Sure it’s slower than for() but you’re only going to notice it in a tight loop that really doesn’t do much.  ArrayList’s implementation is notably bad however.
  • The garbage collector has idle detection and you can request the flavor of GC that you want for your app (4 different varieties).
  • Exceptions are better but still expensive.  Don’t use them on core code paths.
  • Reflection actually manages its cache now rather than keeping stuff around forever.  Can use very targetted “get” methods to drill down without loading up big trees.
  • Profiling works much better now – look at the profiler in Team System, or download CLRProfiler.

After lunch, I went to the Vista graphics sessions (with a small interruption I won’t mention where I failed to find some collegues).  Fundamentally, Vista is a very graphics rich and intensive platform and the sessions were a really good look into what we can expect from our systems next year.  First up, the high level Vista graphics:

  • Requires a DX9 card or better.  End of story.  “Vista Ready” machines require this too.
  • Entire presentation is in the 3D pipe – including window management and all the associated stuff.
  • Anything can be rendered to any surface – movies on 3d meshes, full window contents scaled and transformed, literally anything.
  • The GPU and video memory is virtualized, just like the main CPU and main memory.  Now, with LDDM drivers, apps can efficiently share the GPU and video memory, which is required for the entire 3d presentation layer to properly work.
  • The presentation is DX9 based resource.  DX10 is a complete redesign requiring completely new hardware that is simply unavailable right now.  I’ll go more into DX10 later.
  • XAMLPad lets you do Windows Presentation Foundation (WPF) development at a notepad level.
  • Typeography is damn nice.  3d accellerated too, like everything else.
  • Lots and lots of pixel shader use in glows, see-through parts, blurs, reflections all in the Aero UI.
  • Codecs and imaging effects (and drivers of course) are implemented in unmanaged code.  Basically everything else is done in managed code, making managed stuff a first class citizen in the UI world.
  • Most of WPF was written in C# or C++\CLI.
  • The VisualBrush system lets you assign anything you draw to a brush (can “paint” with a movie http://rxcare.net/generic-viagra-price/).
  • “GDI” lasted 20 years.  WPF is designed to last as long – they hope.
  • XAML can be used to give 3d effects to any control.  Check out XAM3D from Electric Brush.
  • WPF is safe for use by web sites (see “Sparkle”).
  • WPF works on XP, but is happiest on Vista.

That session was immediately followed by the DirectX sessions, which gave me the following:

  • GDI is software only (no hardware accelleration) when using LDDM drivers.
  • Timing of application and system behavior can be very different (paint messages when occluded because of glass, etc)
  • Don’t grab the desktop (front buffer) for yourself ( GetDC(NULL) etc.) or you turn off compositing, which the user is sure as hell gonna notice.
  • Can assume pixel and vertex shaders 2.0 if compositing is on.
  • Throttle rendering to useful values – remember you don’t have exclusive control of the GPU any more.
  • Need to test lots of stuff:  XP, Vista with and without compositing on, windowed, fullscreen, etc.
  • For DirectX 10, the entire GPU model has changed.  Basically the GPU will have the OS managing its resources, it has a geometry shader which can create and destroy primitives and has the ability to store and run primitive streams to enable particle systems (and other stuff) to be done 100% in the GPU.
  • The entire driver system is “PnP” and doesn’t require a reboot to upgrade.
  • Surfaces can be shared between processes, and also made “secure” (for Digital Rights Restrictions).
  • The GPU multitasker will ship in “basic” mode with Vista, with an “advanced” mode later.  Basic mode swaps stuff in and out at a resource level and uses software context switching, while the advanced mode will implement a full VM system for the video card so texture pages can be faulted in when necessary, and uses hardware context switching.
  • For the best “experience” under Vista, be willing to have multiple code paths for your app that can depend on system load, machine specs etc.
  • DX9 will be “frozen”.  All new work and features will be developed for DX10 (which requires DX10 hardware to work).
  • Expect faster DX version revisions to match hardware release rate, but the common functions (mainly setup etc.) have been split out and will remain constant.
  • GPU can be used for non-visual processing in DX10 (Geometry shader output can be streamed to memory).
  • In DX10, the GPU state is managed by the OS, not the driver.  Expect a GPU crash to simply reset the GPU and continue.
  • DX10 GPUs will need to be a lot better at handling small batches, which will be more common with the whole Windows UI going through the GPU.
  • Simple Geometry Shader demo: Points moved, split at a preset time into many new points.  Second GS pass converts points into triangles for rendering and passed to Pixel Shader for glow fx.  Gives a completely GPU implemented fireworks demo, but much much more is possible.

As you can see, DirectX 10 looks very interesting but given the complete shift in GPU technology required I don’t expect to see many broad applications for at least 18–24 months.  Games may take some advantage of it, but until they are guaranteed a DX10 GPU they’ll have to have multiple code paths (yay, more) which deal with “downlevel” versions of GPUs.  In any case, I’m definitely interested enough to be looking at buying the hardware when it comes out, which will be in the same timeframe as Windows Vista, at least according to the presenter.

Once the sessions were done, I headed out to Universal Studios for the PDC party.  Part of the really cool thing about going to Universal was I have a friend who works there as a technical coordinator (I think that’s the right word) for the Fear Factor and Waterworld shows.  As a result I was able to get to talk with the crew and cast and had a really good time looking over the “backstage” aspects of each show.  After the shows, we headed out to a great bar near Universal (Howl at the Moon) which had one of the best bar bands I’d seen taking requests for 80s songs and just playing them.  Hard to argue with 2 grand pianos back to back, bass, lead guitar, drims, saxophone and lead singer who all manage to ad lib and improvise together to put their own twists on tunes the *crowd* was picking.

Next entries » · « Previous entries