Wednesday, January 12, 2011
So I've been happily using Windows 7 for a couple years (since the beta), but just finally moved my family into it, and discovered a new issue in the process:
Like XP, the "Win+L" key combination locks your profile so the next person won't "be you." But instead of the main Welcome screen with the list of accounts, you get the Switch User screen, with a button to take you to the real Welcome screen. This a confusing extra step when you're the next guy just looking to login.
I did some research, and it looks like a
LOT of folks
have wondered
how to skip the Switch User screen,
but without luck.
Not sure, but I may be the first with a decent solution. The ingredients are tsdiscon.exe (which does the "Switch User"), and Task Scheduler (which hooks it up to the Win+L combination), both of which are built into Windows. Here's how:
- Click Start, type taskschd.msc, enter. Confirm any UAC prompts you get, and Task Scheduler will open.
- In the Action menu, click Create Task.
- In the Create Task dialog > General tab, type a meaningful Name like "Lock » Switch User"
- In the Security options section, click the "Change User or Group" button, type _Users_ in the dialog and click OK.
- On the Triggers tab, click the "New..." button. In the New Trigger dialog > "Begin the task" list, choose "On workstation lock" and click OK. This takes you back to the Create Task dialog.
- In the Actions tab, click the "New..." button. In the New Action dialog > "Program/script" field, type tsdiscon.exe and click OK. This takes you back to the Create Task dialog.
- Click OK again and enter the password for the administrative account it offers.
- Test it! Press Win+L and you should see the Switch User screen for a moment, then the main Welcome screen.
2011-02-17 UPDATE: As I was setting up this tweak on a new system, I noticed Windows 7 HOME doesn't include tsdiscon.exe. It's easy enough to copy from a Win7 Pro machine (from/to %windir%\System32), and then works as I described.
Thursday, December 30, 2010
If you do anything on the web, you should read this great article on URL Design by Kyle Neath.
(hat-tip to Trevor Davis for sharing)
Sunday, October 10, 2010
A few years ago, I noticed an orange chromatic theme in application icons. Seems things really have “gone green” since then:

Left to right that’s uTorrent, Update Checker, Windows Home Server, Hamachi, a network (oddball), and MS Security Essentials.
Why doesn’t anyone like purple?
Wednesday, August 04, 2010
I've been making this web stuff long enough that some is well past its expiration date.
Memoriam for ScriptConverter
Thursday, June 10, 2010
I finally took some of that new web tech I was talking about here and used it here. I couldn’t stand the “brick” look anymore, so it’s mostly border-radius and box-shadow, but there’s also an RGBA background color and a webkit transition. None of this gives joy for IE, though – perhaps I should Chrome Frame it? …I did also tighten up the Reader feed and search box.
I realize how long it’s been here, and that Facebook’s walled garden has been catching the vast amount of my sharing. I’d like to “get out” here more, but til I do, don’t miss me there.
~r
Tuesday, October 13, 2009
I recently stumbled on FindMeByIP.com, and thought “yet another IP lookup / geolocation site”. Then I noticed the “Modernizr Support” section, detailing my browser’s support for new standards.
I was impressed both by the graph and my browser’s support. Here’s how it looked with Google Chrome:
It reminded me that last week I was experimenting with HTML5, CSS3, and Chrome Frame, and had whipped together an ugly(!) demo. I figured I’d line up the current browsers here and run them through both exercises. To be clear, my demo is NOT fair because it uses several Webkit-specific extensions, but I thought it worth seeing.
The Downward Spiral
Chrome 3.0 (and Safari 4.0)
Yes, it’s tilted on purpose. Interesting bit: the black background is the abyss behind the rounded <HTML>. Who knows what lurks there? (Bizarre video artifacts when I resize the browser, actually).
Firefox 3.5
@font-face worked on my header, but no gradients, and I don’t know why border-radius failed. (It’s worked on other sites).
Opera 10
Why is the standards-nazis’ browser so sucky here?
Internet Explorer 8
The bottom of the suck, and what we’ve all come to know and loathe. (To be fair though, IE has supported much of this since v4, but in a non-standard way. Pragmatically, I’d grant it Box-shadow, Opacity, Gradients, 2D Transforms, and Transitions thanks to its CSS Visual Filters and Transitions.)
A Testing Crisis
Currently I test my sites with SIX web browsers: Safari/Chrome, Firefox, Chrome, IE6, IE7, and IE8. This is a testing crisis for me, and IE6 has no give (with a stubborn 33% market share), so I’ve been forcing IE8 into downgraded IE7 mode for a slight reprieve. Yes, I downgrade an already-behind browser!
Sure, I could try to encourage users to upgrade their browsers, but apparently most people have no idea what that means!
(If you’re an internet professional, you should watch this)
Aagh, there’s no way out! With apologies to Mr. Folds:
IE is a brick and I’m drowning slowly.
It’s really more like three bricks drowning the web. If we could drop one or two versions, IE8 could be survivable, but how?
Hope We Can Hope For?
This is where Chrome Frame wants to come to the rescue. With it, I can use Chrome as an IE plugin, just like Flash, Java, AIR, or Silverlight. Sure it’s cheating, but in a good way – it still uses the original native web code (so it is NOT the Un-web like those other plugins).
IE8 with Chrome Frame:
Perfect! And the same results in IE6 and IE7!
If a plugin story is acceptable (widespread use of the Chrome Frame plugin would help), this means only 3 browser engines to test. I haven’t used it in production yet, but I’ll be carefully considering it for new projects.
~
Tuesday, April 21, 2009
Wednesday, April 15, 2009
My friend Dave Spiess asked me to clarify the term “web developer”. I could go on and on about my experiences and opinions, but a picture is more digestible, so I drew one:

BTW, here’s an quick/easy way to make graphs: http://graphjam.com/ (my graph there)
Thursday, March 19, 2009
Microsoft has:
- IE8 final being released at noon today. Hoorah!
Now if MS would just force-upgrade the IE6 holdouts!
- SuperPreview for side-by-side (or overlaid!) browser layout testing
I grabbed SuperPreview the moment it was announced yesterday. Looks great for IE6 & 7, but it didn't find any of my other installed browsers, or show Safari/Mac like the demo, and I see no way to add those. Hm, maybe they're still working out kinks...
- Silverlight 3 beta - big wow for high-performance cross-platform video
That said, Silverlight is still the "Un-web".
- Expression Blend 3 preview - Sketchflow especially looks awesome for bigger projects
I'm still not sure I personally can trust a WYSIWYG editor. Frontpage still haunts me.
Wednesday, July 09, 2008
Business has been good. Unfortunately, it has been so busy that the smelly old Slingshot Solutions website stuck around way too long.
When I say smelly, think:
- IE-only (in 2002, IE was 95%+, and Firefox was still a glimmer)
- IE6-only -- IE7 often crashes (why can browsers still be crashed by web code these days?)
- Outdated in various ways (6.5yrs)
- Kinda ugly
- Over-complicated
- Wordy -- can there be too little horn-tooting?
- Did I mention IE-only?
So my goals for a new site were focused on simplicity and compatibility. I started designing building it when I started back to Slingshot Solutions full-time, and have been alternating between false starts, second-guessing, and neglect ever since.
It's finally done now, though. Please meet the slim and trim new "slingfive.com 2.0":


It works on any modern browser, plus IE6 (kicking and screaming). Some other geeky goodness:
- It's Javascript-heavy, but it's all non-obtrusive and progressively-enhanced, so it still works with Javascript disabled.
- JQuery greatly helped simplify the visuals by hiding less important stuff until it's needed. Rather than a second page just for a contact form, Contact Us is just a popup. Similarly, I built a hide/show toggle for less-important content details.
- FONTS! Every web designer hates the fact that you have to choose fonts based on lowest-common denominators (not everyone has your font on their system). Alternatively, you can use images or Flash to get around this (carefully!). I certainly wanted automatic as possible, so I tried SIFR (implementation stinks), then settled on DotIR. Unfortunately v3 only outputs non-transparent GIFs, but with the wonders of open source, I've improved it to output anti-aliased transparent PNGs (including IE6 compatibility), and made it medium-trust compatible (for web hosts). Hopefully my changes will reach the next version.
Weaknesses / to-do:
- Still way too wordy, this time with TLAs ("acronymy"?).
- I pulled over my old code section for developers. I've tested none of it though, and will surely need to fix several server-side settings.
- The layout wrecks at less than 1024x768. Stats say that covers 90% of the world, but that's hollow comfort.
For now I'm just happy it's out and not killing anyone. Hurrah!
Thursday, March 06, 2008
I won't say it's "finally" coming, because it might be one of Internet Explorer's fastest major upgrades. But IE8 is coming, and better yet, I think it is "finally" catching up with the competition.
The news is all over the place, and this time I won't dig into the tech like I did with the IE7 beta. I have installed the developer beta for a little testing, and it looks pretty similar to IE7. Since the UI isn't changing much, I think it's a comparatively developer-heavy release (yum!).
Here are some good official links:
And the interesting progress & commentary:
My own/other thoughts:
New Direction: A lot of the most interesting new stuff is neither UI/security improvements nor core web technology improvements, but Web 2.0-type stuff like Activities and WebSlices which seem to be targeting easier mashups and 3rd-party browser extensions.
Bad Chrome: A later IE7 release added back the Classic file menu. Now they've added the crap links bar back in, sacrificing that much more viewport to the biggest waste of browser chrome. Those plus the infobar warning I got right away doubles the 3 rows it should be, meaning if it goes live this way, my various inattentive relatives are gonna be scrolling way too much:
Developer's Browser Ecosystem: IE7 usage is still roughly even with IE6, and seems to have leveled off. It's frustrating that IE6 is still hanging on so much. Let's get IE8 in and IE6 gone!
Tuesday, February 26, 2008
Microsoft just published an interesting Windows Vista One Year Vulnerability Report
I especially like this graph:
I mentioned a few days ago that Vista seems to have picked up at XP's current level of stability. From this it looks like it's done the same with security.
I think what's remarkable is that they've accomplished this while increasing the amount of Windows code (because of new features). Normally more code creates more ways for it to fail and to get hacked, but the Vista team has done the opposite. That's impressive.
For bonus points, read through the report's comments (pretty fun on its own) and then read this response on the MS Software Development Lifecycle team blog.
Friday, February 22, 2008
I've been using Vista Business for about a year. I've had it on a secondary work machine since around May, and as my primary work machine since November. Overall, it's quite nice.
But it's definitely had its quirks, mostly with waking from standby or hibernation. I put a couple hotfixes on, and they definitely helped, but it still did have an occasional strangeness. That said, in almost a year's time, I only remember needing to hard-reset it perhaps 3 times, and needing to reboot it maybe 5.
Now, I think that's great, considering these machines belong to a tweaker like me (read: not a grandma or Mac-type user who doesn't try new things). I'd say it's comparable reliability to a current stable XP system. This is an important comparison -- XP has been maturing since 2001, but Vista started out at the same level of reliability.
As an aside, I've had several non-technical folks ask me "is Vista as bad as they say?" and I've only been able to respond "as who says?" The only negative reviews I've seen were some journalists who must have put Vista on old hardware without current drivers. But IT professionals I've talked to who've used Vista for a while seem to like it.
So anyway, I still didn't want that occasional quirk, so I tracked down hot-off-the-presses Service Pack 1, and applied it last night. It took about 45 minutes, and went flawlessly. Hooray for that, and hopefully it sails even smoother now...
Friday, March 02, 2007
I've bugged the
Microsoft Scripting Guys to make a feed for their great
daily Q&A. "Coming soon" was the most I ever heard (and over a year ago)...
I don't know what the holdup is, but it doesn't matter to me now. Thanks to
etc., I just found
Yoktu.com Feedmaker. A moment later, I had the
feed I want. Sweet!
One note: Feedmaker has a Word Filter option. Unfortunately it doesn't do positive filters, so
"?" hides all the links I
want, instead of the generic ones I don't. No big deal (I'll choke doen the extras), but hey Yoktu, how about a googlish syntax like
"+?" for specifying what to include?
Saturday, February 03, 2007
A comment I just posted at http://datamining.typepad.com/data_mining/attensa/ :
I've been using intraVnews for several years, liking Outlook's sorting power to manage info, but I'm not at one machine long enough lately to keep current. So I went shopping for an online reader, and found your post and the RSS Reader Survey.
Based on those, I tried (or at least looked at) Bloglines, Rojo, NetNewsWire and Great News. I mostly didn't like the UIs (too weak or clunky compared to Outlook), and most just didn't work on my Windows Mobile phone' Pocket IE.
I ended up using Google Reader instead -- sure it's not as powerful as intraVnews/Outlook (no search folders, no deactivating feeds), but I don't think I need that power since the "reading flow" is so smooth (aka "UX", or User Experience in Microsoft's new lingo). I don't Need to filter out the "junk" since it's easy to just ignore it.
Granted, it's only been 2 weeks, but I've been successfully keeping up on 296 feeds pretty easily.
I should mention I was actually looking for an Outlook/online combo. Apparently Newsgator and Attensa both do this, but Newsgator ain't free (and I'm a tightwad), and I couldn't find Attensa's supposed free service... I've tried the Outlook addins for both in the past, tho, and they're fine (since it's Outlook).
Hm, should I post my 296 feed OPML? ..or I guess Google Reader has a sharing feature -- maybe that's something to try out.
Thursday, January 04, 2007
Friday, November 17, 2006
IE7 was supposed to have supported min-width in CSS. It doesn't work right.
Their spec says it applies to "floating block-level elements", but they don't mention that it also requires an explicit width -- "auto" won't work. While that's fine for "stretchy" layouts, it's useless for what I want: a flexible, tableless form layout (with elements which can expand to their contents' sizes).
In fact, my previous IE6 hacks to force it with CSS expressions now don't work, because while the min-width attribute is valid in IE7, the feature is not actually implemented. SO, while I previously could pick it up in IE6 with something like this:
SELECT {
min-width:11em;
_width:expression(this.currentStyle.getAttribute('min-width'));
}
IE7 now requires the same trick to be like so:
SELECT {
min-width:11em;
_width:expression(this.currentStyle.getAttribute('minWidth'));
}
Unfortunately, forking logic inside CSS expressions is a bit of a pain. That, combined with the limitations of this technique (IE6 treats width as min-width only when the contained elements can't be wrapped), prompted me to write a solution script. Here it is:
/*
author: Rob Eberhardt
desc: fix MinWidth for IE6 & IE7
params: none
returns: nothing
notes: cannot yet fix childless elements like INPUT or SELECT
history:
2006-11-20 revised for standards-mode compatibility
2006-11-17 first version
*/
function fixMinWidthForIE(){
try{
if(!document.body.currentStyle){return} //IE only
}catch(e){return}
var elems=document.getElementsByTagName("*");
for(e=0; e<elems.length; e++){
var eCurStyle = elems[e].currentStyle;
var l_minWidth = (eCurStyle.minWidth) ? eCurStyle.minWidth : eCurStyle.getAttribute("min-width"); //IE7 : IE6
if(l_minWidth && l_minWidth != 'auto'){
var shim = document.createElement("DIV");
shim.style.cssText = 'margin:0 !important; padding:0 !important; border:0 !important; line-height:0 !important; height:0 !important; BACKGROUND:RED;';
shim.style.width = l_minWidth;
shim.appendChild(document.createElement(" "));
if(elems[e].canHaveChildren){
elems[e].appendChild(shim);
}else{
//??
}
}
}
}
It uses a shim technique to fix it only for IE (other browsers don't support currentStyle). The remaining limitation here is that it only works on elements which canHaveChildren, so it does not work on childless elements, like form INPUTs or SELECTs. Any suggestions for this case are welcome!
To use it, just call fixMinWidthForIE() in the window.onload, or better yet when the DOM has loaded, and you're set.
2006-11-20: I updated the script for better standards-mode compatibility (it was causing extra blank lines). I had missed the doctype switch in my current project. The good news is that IE7 in standards mode does do min-width. (I wish I'd noticed that sooner!) However, I still have a lot of IE6 miles to go before I can put it to sleep...
Sunday, October 01, 2006

Windows XP Professional? Check.
But what about 64-bit? Apparently it's actually not supported on 64-bit Windows XP Professional.
Sunday, May 21, 2006
Guess I'm not the only one who was baffled by the new W3C XMLHTTPRequest spec credits.
From Dare Obasanjo:
Interesting. A W3C specification that documents a proprietary Microsoft API which not only does not include a Microsoft employee as a spec author but doesn't even reference any of the IXMLHttpRequest documentation on MSDN.
I'm sure there's a lesson in there somewhere. ;)
And then finally from Anne van Kesteren (one of the spec's authors):
Hereby my apologies to everyone who had to waste his time by writing a rant... The current draft reads: "Special thanks also to the Microsoft employees who first implemented the XMLHttpRequest interface, which was first widely deployed by the Windows Internet Explorer browser."
Friday, April 07, 2006
It's great that XMLHttpRequest is finally becoming an official standard. It's better though, that the "other" browsers didn't wait for this before implementing it. Real progress has happened as a result, in particular the recent popularity (& naming) of the AJAX technique, and the somewhat-related "Web 2.0" phenomenon.
The news also makes me smile at the anti-Microsoft folks who have thrown stones at Internet Explorer's standards support -- once again the IE team innovated (*overused word through gritted teeth*) a proprietary extension, and it was such a good thing that the competition swiped the idea, thus making it a de-facto standard.
I'd rather have a good de-facto standard now, than an official one too-late. End result: Developers and Users win (and they already are winning).
Footnote: Anyone else think it's strange that the standard's authors list seems to represent every browser except for XMLHttpRequest's inventor?
Tuesday, April 04, 2006
Thanks to Clagnut, I'm observing CSS Naked Day on April 5th.
To know more about why styles are disabled on this website visit the
Annual CSS Naked Day website for more information.
For the remaining dotText-ers out there who want this to automatically kick-in every April 5th, I just added this condition to DTP.aspx:
<%
// suspend styles on April 5 to observe CSS Naked Day - http://naked.dustindiaz.com/
DateTime dtNaked = DateTime.Today;
if(!(dtNaked.Month==4 && dtNaked.Day==5)){
%>
<link rel="stylesheet" type="text/css" href="/mystyles.css" />
<%
}
%>
Friday, March 31, 2006
Via Dean Edwards' Links, meet
HedgerWow's <SELECT>-Free Layer, a CSS-only workaround for Internet Explorer's SELECT bug with z-index.
It's not quite clear from the demo, but I think the magic is an absolutely-positioned + transparent + huge IFRAME inside the layer to show. C'est trés hacky, but it still seems better (in a way) than the usual dynamic hide/show javascript approach.
Here's hoping that Microsoft will quickly windows-update us all with IE7 (which fixes this bug, hoorah), and free us of these sHACKles.
Tuesday, February 14, 2006
Looks like I'm:
- Participating in Scoble's experiment.
- Syndicating Digg's Programming news here now (in the sidebar).
- Considering participating in Technet ScriptCenter's Scripting Games event, despite my busy-ness. (Hey, I could be a contender!)
- Baffled why UC would require its own Alumni (aka "prospective donors" to UC's board) to jump through Stone Age hoops to get a transcript (this is 2006, and phone isn't even an option), and they'll still take "5-10 days" to process it.
- Downloading various free VMwares at the moment. Oh, and eating cookie dough.
- Wondering why the machine I've reinstalled at least 12 times in 12 months -- due to strange disk problems, but with different disks -- now appears problem free after switching its filesystem from NTFS to FAT32 (which is supposedly more fragile).
- Also wondering why the Virtual NT4 Server I spent the last week fighting with just refuses to run IIS4.
- Avidly tracking shipment of my new little Athlon 64-based machine, due here Tuesday.
- Chuckling at the recent surplus of general serendipity.
- Remembering that Tuesday is Valentine's day....
Friday, February 10, 2006
and so I was sad to see it go away again today:
Y'know, I remember seeing the early web on Lynx, and thinking "oh, like gopher, except harder to use -- what's the point?" Then I saw it on Netscape 1 and everything changed.
(Yes, I actually have a need for NT 4 Server right now. I never thought I'd be installing Option Pack this many years later. At least I've got Virtual PC & Server these days).
Thursday, February 09, 2006
I'm really not in love with IE or anything, but I do fight with it a lot...
I need to cover what I am in love with: my family, music, ice cream... -- the good stuff.
Wednesday, February 01, 2006
Observations as a user:
- Address bar: I'm not sure I like it being locked to the title bar. Any other toolbars go below -- that's weird. Interestingly, I can drag the whole window from the chrome near it, so I think it may actually be part of the titlebar under the hood.
- "Star"/start menu: Opens the sidebar containing Faves, History, and Feeds. I think I like this, an idea borrowed from live.com. It'll still take some getting used to, tho.
- bug?: Backspacing/deleting characters in this MSHTML-enabled (contenteditable) area of .Text doesn't work right. Possibly machine-specific, but I haven't noticed it before.
- Tabs: I reeeally want to move the tabs to the bottom of the screen, as I do with Firefox (and like Excel worksheets). I also want to be able to double-click to close tabs, but I'm happy that middle-clicks are “Open in a New Tab”.
- New tab thing: The small “blank tab” for creating new tabs is Mystery Meat, and especially confusing since there's a “plus” icon nearby. I know MS is going for “uncluttered UI”, but this breaks usability in favor of pretty. Just show a #8220;new document” icon the whole time, and it'll be much clearer.
- Stop loading icon: The “X” icon also very confusing. “X” means Delete, a “Stop Sign” icon means stop.
- Reload icon: OTOH, I like the color reversal here, the green in the background makes it stand out more.
- Faster: address bar responsiveness.
- Slow, like rendering of the new Quick Tabs, Classic toolbar and Google's toolbar.
Observations as a developer:
- CSS Visual Transitions: are these gone?!? Strange, b/c CSS Visual Filters still work.
- Modal/Modeless dialogs: IE6sp2 forced the status bar onto these. IE7 now forces an address bar too, creating problems for web apps with sized dialogs. Slowly but surely those dialogs are becoming just windows, EXCEPT that...
- Modal/Modeless dialogs are still very buggy in IE7b2!
- SELECT elements: As expected, much better now!
Tuesday, January 31, 2006
Yeehaw it's out! I'm downloading now and am actually excited to testdrive it. Already noteworthy to me is the functionality changes section in the release notes:
Scriptlets—Internet Explorer 7 disables Dynamic HTML (DHTML) scriptlets, by default. (Scriptlets were deprecated in Internet Explorer 5). They can be reenabled by system administrators, changing URLActions with the Internet Control Panel (INetCPl.) The INetCPL text should read "Allow Scriptlets." If your programs rely on scriptlets, we recommend that you use DHTML behaviors which are more efficient. Disabling scriptlets is part of our continued work to ensure that unsupported technology is deemphasized in Internet Explorer.
I'm very happy about this. It sounds like Microsoft listened (!) to my request to not remove Scriptlets after all, but to instead just disable them by default (which is certainly a good thing for security). I have several good old IE components written as DHTML Scriptlets, and I need some option to keep using them in existing web apps.
- ActiveX controls--ActiveX controls are disabled by default in Internet Explorer Version 7. The ActiveX Input TYPE=FILE control no longer submits a fully-qualified path; it now submits only a filename. The ActiveX control for XEnroll certificate enrollment was removed from Windows Vista and replaced with a new control.
This is a big big deal, and again a good one. But does this include disabling the built-in ActiveX Controls too, like DSOs and XMLHTTPRequest?? (if so, then ouch!) Good idea on the file input, but it sounds like it'll cause some rewrites.
- Channel Definition Format (CDF)--All CDF support was removed from Internet Explorer 7 Beta 2 Preview.
This surprises me. It may be old tech, but it was big (remember all the "push" hulabaloo? man, those were the [something-] old days), and I do still see sites using it. Not sure from that statement whether it'll come back in a later beta or RC, tho...
- DirectAnimation--All DLLs to support the Internet Explorer DirectAnimation component were removed in Internet Explorer 7 Beta 2 Update.
Another big change. So what's the replacement it, native SVG finally??
- XBM--Support for XBM, an imaging format designed for X-based systems, was deleted.
- SSL--Support for weak SSL ciphers was removed from Windows Vista and support for SSLv2 was disabled for all Internet Explorer 7 platforms
Good and better.
- Windowed Select--The Windowed Select Element was removed from Internet Explorer 7 because IE7 is not using the Windows API. This results in some cosmetic changes in padding. The animation associated with the popup is gone as well, and the popup simply pops up.
Simply marvelous!
- BASE Element--Internet Explorer 7 strictly enforces the BASE element rule, as documented in the HTML 4.01 standard. We no longer allow BASE tags outside of the HEAD of the document. The standard specifies that the base element must appear within the head of the document, before any elements that refer to an external source.
- window.opener and window.close--Internet Explorer 7 no longer allows the window.opener trick to bypass the window.close prompt. Browser windows can't close themselves unless the windows were created in script. This security enhancement no longer allows browsing to a random site when the main browser window closes unexpectedly.
Ah, lovely bug fixes. More please!
(actually, I wish I had known about that window.opener trick a long time ago. Darn!)
- WWW-Auth--Internet Explorer 7 changes the precedence rules for WWW-Auth. Previous releases of Internet Explorer used the first header encountered. Internet Explorer 7 uses the first header except when the header is Basic. We use Basic auth if no other authentication mechanism is present.
- HTTPOnly Cookies--HTTPOnly cookies can no longer be overwritten from scripts.
- _SEARCH--The _SEARCH sidebar is no longer supported in Internet Explorer 7. It can be reenabled using a URLAction.
All sounds good to me. I'll be a little sad about _search, tho, but only a little.
- View Source--The view-source protocol no longer works in Internet Explorer 7 Beta 2 Update.
It actually stopped working back in IE6sp2, which was a pain for me. It was a Netscape standard, albeit de facto, but it was still quite handy for sharing code (and non-abusable, that I know).
- Gopher Protocol--Support for the Gopher protocol was removed at the WinINET level. (Gopher support was turned off by default in Internet Explorer 6.)
- windowexternalImportExportFavorites--windowexternalImportExportFavorites has been removed in Internet Explorer 7 Beta 2 Preview.
- Telnet--The telnet protocol handler is no longer supported in Internet Explorer.
Gopher, sure -- I haven't touched that in 10yrs.
The Favorites method -- eh, not a big fan, but I've seen some very cool specific uses (uploading to bookmark sites, in particular).
But why no telnet://? All that ever did was open the default telnet client. This'll definitely be a pain for some sites.
- SysImage URL Scheme--The SysImage URL Scheme has been removed from Internet Explorer.
I actually have no idea what this is, which is unusual with IE. Anyone wanna enlighten my ignorance?
- Status Bar Scripting--Script will no longer be able to set the status bar text through the window.status and window.defaultStatus methods by default in the Internet and Restricted Zones. This small step helps prevent attackers from leveraging those methods to spoof the status bar. To revert to previous behavior (allowing script to set the status bar through window.status and window.defaultStatus) select the “Security” tab from “Internet Options” in the Control Panel. Select “Custom level…” for the Internet (or Restricted sites) zone. Find “Allow status bar updates via script” and change the setting to “Enable”.
I wont miss this one much. When I've used it, it's been more a toy or bandaid for ugly URLs. Much more often I've seen it abused, so all good here.
I'll post more if I find my test-drive interesting.
There's more good discussion about it over on the IEBlog.
Thursday, January 19, 2006
Or SELECTed wisely... (ok, so the quote doesn't quite work).
Considering my frustrations with IE's buggy SELECT element (dropdown list), or my workarounds for those problems, it should be no surprise that I'm quite excited about IEblog's news about SELECT element fixes in IE7:
For the SELECT few....
z-index fixed, styles fixed, title fixed. Finally! (But no mention of scripting bugs... hopefully they get those too!)
Friday, January 06, 2006
Hard to explain (I'm a geek, nuff said), but I just noticed my One-Billionth birthsecond is coming up soon. Furthermore, my (almost 3yr old) son's One-Hundred-Millionth birthsecond will be about a month earlier!
Want to know when you/a loved one reached/will celebrate a major birthsecond? In that case, I proudly (?) introduce my Birthsecond Calculator™ (;>) :
- Date/Time of birth:
- + a birthsecond:
-
=
?
Note: This surely won't work in a feed reader, so come visit for the fun.
(web geek colophon: This works thanks to jsDate, my port of VBScript Date functions to Javascript.)
Update 2007-04-15: My 7yo son wants to know when his 250 millionth birthsecond is, so here's a customizable version.
Friday, December 30, 2005
This is just awesome:
...Okay, so it's a slightly ugly picture, why is it awesome? Read about it here:
http://me.eae.net/archive/2005/12/29/canvas-in-ie/. Basically,
Emil Eklund of
WebFX extended
IE to support Canvas elements, the currently most-buzzed new technology in web browsers.
Awesome-er (to me) is that he accomplished in a couple days with IE's DHTML Behaviors, just like my xDOM Suite, or Dean Edwards' Star-Light do. Just like them, it uses DHTML Behaviors to basically improve (fix, enhance, or extend) IE's rendering engine. Developers can apply this extension by copying two files and adding a single line of code to pages which use Canvas.
Easy development, 3rd-party browser extensions, easy deployment ....All good examples of why DHTML Behaviors are totally awesome, and great reasons why other browsers should adopt them...
(via Ajaxian, screenshot borrowed from same.)
Wednesday, December 21, 2005
I recently deployed the ASP.net 2.0 Framework to my server, and since have been fighting with problems it's caused. For instance, when I switched one app to use it, it broke all the other v1.1 web apps I was running (including this blog). Fortunately for me, someone else has been having the same problem and found a solution: move the 2.0 apps into their own application pool. Hooray I don't have to uninstall (which I was close to doing).
Hey Microsoft, how about mentioning this anywhere? ...say during the install, on the IIS site's ASP.net tab, or in the error?
I have another related woe, though: If I set a 1.1 app to run under the 2.0 Framework (which should work, and imparts better performance and security), I get the ASP.net Yellow Screen of Death:
Apparently "global" now a reserved keyword under 2.0 (despite its 1.1 compatibility). Fortunately, I found my own easy fix: just rename the class. So line 11 in my global.asax.vb is now
Public Class Global2. Of course I made the same change in its global.asax too:
<%@ Application src="Global.asax.vb" Inherits="Global2" %>
Happy to find a solution, and I hope mine helps someone.
Friday, November 18, 2005
So there's a bug/limitation/pile-o-crap in CDO (the programmatic interface to use MAPI (the programmatic interface to get at & use Outlook or Exchange stuff)). A key bit from the MSDN CDO reference:
Calendar folders are not supported in the public folders store provided with Microsoft® Exchange, and AppointmentItem objects are stored as Message objects. An attempt to read IsRecurring in this case returns CdoE_NO_SUPPORT.
This has majorly stunk for me, since I'm doing a project which needs to dump out some Exchange Public Calendars' AppointmentItems, and to use their StartDate and EndDate properties. Common refrains to this song and dance:
Public member 'StartDate' on type 'Message' not found.
and Public member 'EndDate' on type 'Message' not found.
- Ok, I'll follow the guru's advice, and explicitly force it to an AppointmentItem:
ctype(oMsg, MAPI.AppointmentItem)... Nope, I still hear: Specified cast is not valid.
- But wait, what's the
oMsg.Type?? IPM.Appointment
is my answer. Well... (dead end).
Fortunately there's this: MAPI Property Tags. I can get at those two properties via CdoPR_START_DATE and CdoPR_End_DATE.
Solution:
DIM dtStartDate as Date = oMsg.Fields(MAPI.CdoPropTags.CdoPR_START_DATE).Value
DIM dtEndDate as Date = oMsg.Fields(MAPI.CdoPropTags.CdoPR_End_DATE).Value
Not really properties, but something to work with at least.
UPDATE:
I hit the same problem with getting the users who originally posted and last modified an item, except worse -- they seem to be documented nowhere. I reverse-engineered the fields collection (dumped the data, looked for what I wanted, found the matching ID, converted to a hexadecimal property tag), and found them:
CONST CDoPR_RE_PostedBy = &H3FF8001F
CONST CDoPR_RE_ModifiedBy = &H3FFA001F
DIM strPostedBy as String = oMsg.Fields(CDoPR_RE_PostedBy).Value
DIM strModifiedBy as String = oMsg.Fields(CDoPR_RE_ModifiedBy).Value
I don't see these tags in the CDO Property Tag list, and google searches for them come back empty. (That said, consider my discovery subject to change with future versions.)
Too bad there also seems to be no way to use these property tags with a MessageFilter, or to get RecurrencePattern.
Unfortunately, this is part of a bigger problem. I'm not sure, but I suspect CDO was simply never finished. Get this: If you want to open a user-created folder, there's no way to do so directly by name. The normal method, getFolder(), only accepts a 76-digit FolderID! There is a solution, but ain't pretty.
Here's another bonus from that same link:
If your application is running as a Microsoft® Windows NT® service, you cannot access the Microsoft Exchange Public Folders through the normal hierarchy because of a notification conflict. You must use the InfoStore objects Fields property to obtain the Microsoft Exchange property PR_IPM_PUBLIC_FOLDERS_ENTRYID, property tag &H66310102. This represents the top-level public folder and allows you to access all other public folders through its Folders property.
...And yes, that seems to apply to ASP.net applications.
Another gem (this seems so ludicrous that I want to doubt it): CDO MAPI in ASP.net needs to run with impersonation, even if the authenticated user has a matching Exchange account. It did fix my problem, though, so there's some more anecdotal evidence. (Perhaps it's actually the old Windows domain double-hop bug?)
In general, I've noticed CDO seems to require a whole lot of Hex flags to do simples operation like open a message object. ...Well, a whole lot for what should is supposed to be object-oriented code. I've been wrapping up most of these basic operations with a class, but the vast amount of CDO hacks contained are too ugly to be seen here anytime soon.
SO, Lemsons and the rest of the Exchange Team, have you touched CDO in the last 5 years??? It sure seems to be a stunted and abandoned technology.
good resource:
CDO Live (almost as outdated as CDO itself, though)
Friday, November 04, 2005
The Windows calculator has Standard and Scientific modes...
Suddenly conspicuous today in its absence was a Conversion mode. (Heck, I've got a little app on my phone which does this.) Cmon Vista, it just makes sense!
Especially while we dumb Americans keep resisting metric. Liquid volume is where it's hairiest, figuring out:
- 3 teaspoons to 1 tablespoon
- 2 tablespoons to 1 fl. oz
- 4 fl. oz to 1 gill
- 2 gills to 1 cup
- 2 cups to 1 pt
- 2 pts to 1 qt
- 4 qts to 1 gal
...We should really just
drop most of those units. (What's the point of ×2 units, anyway??) It should be much simpler, like:
- 16 tablespoons to 1 cup
- 16 cups to 1 gal
If elected, I promise to simplify liquid volumes immediately.
Thursday, October 20, 2005
That's not only the name of a great website on the subject, but also my reaction to this bank website's web browser choices:
I let em know how silly this is:
Your choices of web browsers are VERY outdated, by about 10 years!
The main CURRENT web browsers are:
* Internet Explorer
* Mozilla Firefox
* Opera
* Apple Safari
* Konqueror
Take a look at http://www.upsdell.com/BrowserNews/stat.htm for current browser stats sometime.
Just a heads-up from a web developer. Hope it helps you get it together.
They also offer Unix as a choice of Computer Type, but not Linux. Even worse: it's a screen for requesting technical support. (I sure hope their techs know Mosaic well!!)
Along those lines, I just noticed that this month is the 4th anniversary of IE6. Happy Birthday, IE!
Anne van Kesteren just posted about the Opera 9 Preview. More notable to me is the testcase for Linking to style sheets with HTTP headers.
Here's the code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>CSS: Linking to style sheets with HTTP headers</title>
<meta name="Author" content="Krijn Hoetmer ~ http://ktk.xs4all.nl/">
</head>
<body>
<h1>Linking to style sheets with <abbr title="HyperText Transfer Protocol">HTTP</abbr> headers</h1>
<p>This line should (or could) be red.</p>
<hr>
<h2>Code</h2>
<pre><code>Link: <index.css>; REL="stylesheet"; MEDIA="screen"</code></pre>
</body>
</html>
The testcase already works (P element in red) in the current Firefox 1.07 (but not IE, natch). Style code is utterly missing from the document -- there are no style attributes, and no <style> or <link> elements.
That's because they're not in the document. It's in the headers of the HTTP response which delivered the document. I had to find the style insertion with the Fiddler tool (a great IE addin), and this is what I found in the HTTP headers:
Link: <index.css>; REL="stylesheet"; MEDIA="screen"
I must've missed the memo where this became a standard (since multiple browsers now support it). I miss how it's a good idea too...
Yes, there's a gee whiz factor to it. I could even think of possible uses for HTTP style includes (like configuring includes at the website level via the web server, something which IIS already can do with normal include files).
But it just seems like a bad idea.
Granted, the line between protocol and document was crossed long ago with HTTP-EQUIV META tags. This, however, crosses it in the opposite direction, by putting not meta-data, not layout or behavior data, but style data into a transport protocol!
Now I'm no code purist -- I feel most like a "SAVD" on Molly's scale (What's bizarre is that I'd consider Anne much closer to a purist, a "SASS" to Molly.)
We have CSS to get the font tags out of HTML. Why not cram it into something even more poorly suited like HTTP?!
VERY bad idea.
Tuesday, October 18, 2005
Jon Watson, Linux-fan and almost my neighbor in Kentucky, writes an interesting complaint about the state of web browsing on Linux.
What grabbed my eye was that he blames it on Microsoft:
"Microsoft introduced a whole bunch of ‘IE only’ html tags a couple of years ago. I say predictable because Microsoft is absolutely famous for not following set standards. Take a look at their proposal for their XML ’standard’ or their javascript document model or their…hell…anything you can think of. Open standards are not a friend to Microsoft - they want you locked in to their technology with no way out."
"…the point of this is to state that these non-standard IE only tags became the norm because of the popularity of IE. Now that arrogance has been extended even further and Google has bought into it. A non-standard Java(-script) call is at the heart of GMail. Now other browsers have to make the choice between being standards compliant, or being MS compliant. A hard decision. To pick the former is responsible, but to pick the latter will deter end users from using the browser."
About the specific XML/XSL and DOM examples, those simply weren't yet standardized when they were implemented in IE. The W3C is notorious for being slow to adopt new standards. So rather than "follow the standard", Microsoft tries to "set the standard". In practice, this means Microsoft often implements their new ideas at the same time they propose them as standards. As a developer, I think that's how technological progress is made. Formal committees suck at innovation.
Among IE's particular contributions are the XMLHTTPRequest object (which GMail uses), wysiwyg editing in the browser, and IFRAMEs. All 3 features are now either officially standardized or just de facto standards supported by most browsers. This mass adoption isn't "lock in", it's open, and it's good for both developers and users.
(As an aside, I have no idea how choosing "MS Compliance" could "deter end users from using a browser". ...That makes no sense to me. If a website doesn't work in a certain web browser, isn't that the biggest deterrent from using that web browser? Isn't that in fact the very problem Jon and other Linux folks have with Konqueror??)
What matters to me as a web developer is that I have the best tools available for the job. Otherwise, we'd still be coding "lowest common denominator" -- meaning circa 1999. Remember Netscape 4? I do, with chills.
There are also many great IE technologies which have not become standards, nor made it to other browsers: CSS Visual Filters, CSS Expressions, and DHTML Behaviors. As a developer, I wish they would!
By the way, it's not just Microsoft who takes the "build it and they will come" approach. For instance, Apple's Safari (Konqueror's sister browser, which sprung from the same codebase) has been pushing the envelope lately with its (currently non-standard) canvas extensions. Developers and other browsers are taking note, simply because it's a Good idea. So this may too become standard some day.
No, I don't credit IE for all the web browser tech progress in the last 5 years. If anything, Mozilla/Gecko/Firefox has appropriated Microsoft's "embrace and extend" strategy, and done it better. Firefox has embraced both standards and also IE's best ideas, and extended with their own extensions (google on CSS "-moz-" sometime). Following that strategy has made Firefox top dog in the developer world right now They're the ones setting the standard, and IE7 is now the one playing catch up.
If some browsers choose not to catch up, it seems to me like that's their own fault.
Monday, October 17, 2005
I've been wrangling a Java Struts web app lately. While googling one of its myriad problems, I found this translated gem:
when the sea urchin it corrects, you can evade.
If only I could evade those sea urchins!
Wednesday, October 12, 2005
Got a question today from my friend George about the best way to make rounded corners. I listed some choices, with pros/cons of each:
I ended up recommending static images as the best combination of performance and compatibility, at the expense of developer time. Then it occurred to me: surely I'm not the only lazy one -- someone must've already made a web-based wizard to quickly create sets of corner images for download and installation. Could it be??
Google says Voila! Jalenack's Complete Rounded Corners Creator
I say Sweet! I tell ya, kids these days got it easy!
Monday, October 10, 2005
This is totally bizarre, but for well over a year now, I've found myself with a certain song in my head when I'm really troubleshooting code. I only get that song in my head when I'm working hard, and I always realize it after the fact.
Even more intriguing is Which song: "Axel F" by Howard Faltermeyer
Yes, as in Eddie-Murphy-the-wisecracking-80s-cop movie.
No, I'm no big fan of his (Howard's or Eddie's), nor of that song (except as it defined part of the 80s, me being a music buff thereof). So could there some quality to that song which is uniquely similar to the coding process as they both involve to the brain? In other words, do they tickle the same gray stuff?
Dunno, but I'd love to know if this happens to anyone else.
Anyone?
Anyone?
Anyone?
Crazy.
Sunday, October 09, 2005
Cool trick here -- Collylogic: Scroll Fade
Notable quote:
Using IE or some antiquated crap? You see a big nasty block where the PNG is. If I cared about you, I'd hide the fade class from you by giving you your own stylesheet.
What really grabbed my attention is that when I did this same special effect several years ago for just IE, I didn't need a PNG (so no separate download slowing it down & further loading the server). I just used IE's CSS Visual Filters, which I wish other browsers would support.
It could be fairly trivial to combine the two techniques for a cross-browser method. Or heck, just fix IE's PNG rendering with another CSS Visual Filter.
Thursday, October 06, 2005
So I've had this chain of dev ideas. Hopefully I'll get back to showing off the ancestor here eventually, but this one's fun & ready enough to share now.
Basically, I like Windows XP Explorer's "slideshow" view for images. It's a great interface. By various (non-intentional) routes, I ended up making a web-based equivalent to that interface -- except not for images, it's for entire websites.
It's probably better demonstrated than explained. Take a look here (in IE!): http://throbs.net/web/utils/siteGallery/?http://google.com/,http://yahoo.com/,http://msn.com/,http://netscape.com/,http://aol.com/.
Yes, it's IE-only. Fortunately this is not production code, just an experiment. If the other browsers had an equivalent to CSS Visual Filters (in this case the zoom filter, used to create the live thumbnails), I'd've been there in a heartbeat (heartthrob?), but alas, no such luck...
The fun part is the querystring: just put your own site URLs at the end (separated by commas) and you've got your own gallery, fully bookmarkable.
The magic is all done in browser javascript, so my server is quite unaware of what sites are being loaded (go ahead & view source). If there's interest, I'll zip it up for easy download.
I'm sure there are limitations to the total number of sites it could handle. The first is probably how much your machine's RAM (since it loads each site in its own IFRAME). The next would be IE's querystring length (1024 characters?). Regardless, my original intent was only to keep easy tabs on a few internal "dashboard" sites, and while it technically is some sort of aggregator, I certainly would not use it to read 1000 blogs!
Toy around with it. I'd love to hear what you think.
Saturday, September 24, 2005
Dean got me thinking about this --
IE has many interesting development features which are well, a bit non-standard. Well okay, they're utterly made up with nary a W3C spec in sight. Among them:
Here's what caught my attention about these tools: sure they're not standards-based, but they're frickin' great!
I've often said Microsoft overuses the word "innovate," especially in regards to their own products. However, compared to other browsers, these technologies genuinely seem innovative, and are the reason I (and many others) have written so many IE-only web apps. Microsoft didn't wait on someone else (e.g. the W3C), they just said "devs could use this", and wrote it.
(My IE-only days are not a confession I'm proud of these days, but it's true, and those developer-persuasion props are well-deserved.)
Other non-standard features have since been adopted by other browsers, creating de facto standards. A notable example is Microsoft's XMLHTTPRequest object which is now so popular thanks to the AJAX fad).
Fan clubs aside, I love this phenomenon -- a great tool is now widely available. Since I can now count on it, I have more reason to write cross-browser apps.
So hear this Apple, Konqueror, Mozilla and Opera: please forget your egos, and swipe more dev technology ideas from Microsoft. Really.
Do it for the children?
Thursday, September 15, 2005
Tuesday, September 06, 2005
I upgraded another client's SBS 2003 machine to SP1 this past weekend. It went remarkably smoothly, but we forgot to check their smartphones' access to Exchange til today. No connection, we checked the /OMA virtual directory, and got this error:
"A System error has occurred while processing your request. Please try again. If the problem persists, contact your administrator."
Much "jiggling" (yknow, rerunning wizards, regenerating the web certificate, etc), and googling got me no answer. I did see this error in the Application Log, though:
An unknown error occurred while processing the current request:
Message: The remote server returned an error: (403) Forbidden.
Source: Microsoft.Exchange.OMA.ExchangeDataProvider
Stack trace:
at Microsoft.Exchange.OMA.ExchangeDataProvider.OmaWebRequest.GetRequestStream()
at Microsoft.Exchange.OMA.ExchangeDataProvider.ExchangeServices.GetSpecialFolders()
at Microsoft.Exchange.OMA.ExchangeDataProvider.ExchangeServices..ctor(UserInfo user)
Message: Exception has been thrown by the target of an invocation.
Source: mscorlib
Stack trace:
at System.Reflection.RuntimeConstructorInfo.InternalInvoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean isBinderDefault)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at Microsoft.Exchange.OMA.UserInterface.Global.Session_Start(Object sender, EventArgs e)
Message: Exception of type Microsoft.Exchange.OMA.DataProviderInterface.ProviderException was thrown.
EventMessage:
UserMessage: A System error has occurred while processing your request. Please try again. If the problem persists, contact your administrator.
Source: Microsoft.Exchange.OMA.UserInterface
Stack trace:
at Microsoft.Exchange.OMA.UserInterface.Global.Session_Start(Object sender, EventArgs e)
at System.Web.SessionState.SessionStateModule.RaiseOnStart(EventArgs e)
at System.Web.SessionState.SessionStateModule.CompleteAcquireState()
at System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData)
at System.Web.AsyncEventExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
What a mess. But I recognized that "(403) Forbidden" as a web server error (although not on the actual OMA directory). Combining that with info from similar OMA issues, I checked the /exchange-oma virtual directory's settings, and aha! it was denying access to all IP addresses except 127.0.0.1 and one we don't use. It was not making an exception for the primary local address. So I added that and all's now good.
So when you're having OMA problems, try the usual stuff (including checking the OMA virtual directory), then also check settings on the exchange-oma virtual directory.
Lesson learned.
Update 2008-11-07:
Ha! I was troubleshooting for a customer, and found my own post (top of the google to ya, 3 years later!) It wasn't the same issue, but it was similar enough to set me on
the right track.
Tuesday, August 30, 2005
I've been fighting with Outlook development again lately, custom form development in particular. OL development is quirky, but there's one circumstance where it's downright bug-ridden:
Custom Outlook forms using Windows' standard Common Dialog control.
The issues are numerous, but I'll list them as I've found them:
That link is to a thread in which Sue Mosher herself participates regarding her book's suggestion to use the Common Dialog on Outlook forms. A reader discovered licensing issues with this, and Sue confesses "I think we didn't get it right, alas".
Kudos to her for that. But there is a workaround: when I ran into the same issue several months ago, I found (can't remember where right now, but I'll update if I do) that, due to the Common Dialog's (annoyingly dumb!) licensing, there's a right way to use it and a wrong way. Basically, if you programmatically create the control object, licensing restrictions kick in, and it will only work on machines with MS developer tools installed. However, if you drag/drop the control onto the form, you can programmatically use it without a hitch.
So, drag/drop the control and code to it, instead of using code like CreateObject("MSComDlg.CommonDialog"), and you should be good.
VBScript's Native Error Handling is Broken
(Some?) Runtime VBScript Errors on Custom Outlook forms are suppressed. Even with On Error Goto 0 explicitly set (which is the default in VBScript anyway), certain object-related errors are simply never raised.
In particular, I was never actually getting the "The control could not be created because it is not properly licensed" error when I ran into it on users' machines (who didn't have MS dev tools installed). Instead, that code was simply never running (as if I had On Error Resume Next set). The only way I could track it down was by moving the code into a Windows Script, where native VBScript error handling does work:
...Not a great error message, but enough to google the answer.
Drag/Dropped Common Dialog Controls Become Invisible When Reopening a Custom Form
If you drag/drop a Common Dialog onto the form, it shows as a placeholder icon. Save and the form template, reopen the template, and that placeholder icon is gone.
I did determine that the Common Dialog is actually still there though. I simply wrote some code which uses the control -- when I reopen, that code still finds and uses the invisible control without issue. Pretty confusing to anyone who doesn't know/remember it's there, though!
Custom Field Data + Common Dialogs Cause Security Warnings
Outlook 2002 SP3 and Outlook 2003 have a security feature which restricts ActiveX controls on one-off forms. Basically, if you open a form template or one-off form which contains an ActiveX control, OL blocks the control and gives this error:
The solution to this problem is to not use one-off forms, and to instead publish them.
Unfortunately, this is not that issue, but it's a somehow related OL bug. What I found is that:
With items created from published custom form, which possess both custom fields and a Common Dialog control, if you save data in one of the custom fields, then you will get that error dialog on future openings of the item.
So another way of putting it:
- I publish my custom form (with custom fields & Common Dialog).
- I can create a new item with it. No problem.
- I can even save standard field data in it. No problem (reopening is flawless).
- But as soon as I save data in a custom field and close, I get that dialog, and most of the form data is missing.
...I've found no documentation of this issue with this set of circumstances. (Maybe it's that rare, but I strongly suspect others have had it, which is why I'm airing it here).
It's also a showstopper for me -- I painstakingly worked around the myriad other Common Dialog issues, but I gotta open a file and have custom data on my form. So now I'm looking into other controls. Hopefully Sue was right in suggesting Word's file dialog. I don't like the external dependency, but I've checked and it appears I can do that (this time). OR, there's also Windows' native Shell.Application object's BrowseForFolder method (which apparently has its own quirks).
For those considering embarking on the Common Dialog route, I'd recommend against it. There are lots of alternatives. I'll post my results with those later.
Update:
- The Word route didn't pan out -- 10 seconds to load the Word exe is way too slow for a file dialog.
- I also tried Shell.Application's BrowseForFolder method. It's a bit clunky, though, and way too quirky.
- I think I've settled on a different common dialog: UserAccounts.CommonDialog, which is nearly identical to MSComDlg.CommonDialog. Differences:
- No licensing headaches
- No OL security warnings
- It requires Windows XP
- "InitDir" property is renamed "InitialDir"
...Not bad at all. Still nice & snappy, with WinXP as the only requirement (certainly palatable for me).
Admittedly, I haven't seen the beta yet, but I figured I'd get this out there in the hopes that someone who matters sees it...
Great idea for Windows: User Profile Templates and Machine Templates. Essentially, they are just collections of registry settings, editable through a Tweak UI-like interface, and (most importantly) saveable as files.
User Profile Templates
These templates can be applied to existing profiles or the default user profile. They would be editable and easily transferrable as files (Why? Because even though I'm a power user, I still like the Welcome screen).
Windows would include these Profile Templates out of the box (with example setting changes):
- Beginner -- pretty much what the default is now.
- Intermediate -- Windows Explorer switches over to details view, visible status bar.
- Power User -- All of Intermediate, plus: Quick Launch bar enabled. Windows Explorer gets simple folder view disabled, filetype extensions visible, full path in address bar, encrypted/compressed files in color. Windows Explorer & IE toolbars get compacted like so:
Simple Folder View is disabled.
I don't care if the default templates are editable, but if not, they should be copyable as the basis for other custom templates. (If so, they'd need a "restore default settings" option).
Machine Templates
Same idea here, but for machine-wide (HKLM) settings. Default templates would be something like:
- Standalone Workstation -- current defaults
- Networked Workstation -- RDP enabled, NetBIOS enabled
Here's my reasoning behind this:
For Users: short of a new "GPOs for Workgroups" feature (which I'd love), power users need a way to manage workgrouped machines. Even plain ol' Power Users with Standalone Machines need an easy way to setup a machine which doesn't require two hours of fixing stupid defaults. Profile and Machine templates would greatly mitigate these issues for users.
For the Windows team, these templates would lessen the dev struggle between Features and Beginner simplicity. Got a great but possibly-confusing feature? No problem, just disable it for Beginners, and enable it for Power Users.
Also, miscellaneous Windows Explorer fixes/improvements I want:
- Bring back the file filter which Windows 3.1's File Manager had. (Sure, disable it for the Beginner template).
- Context Menus: speed them up by any means necessary. (Click/wait is my biggest annoyance with a busy Windows box [like while copying files])
- Context Menus: make them easier to edit (like IE, or ideally Office). (I really want to move the "new folder" action from the "New" submenu to the main context menu!)
- Make it possible to enable the Size column for Folders (without the current crashy 3rd-party addons)
- Absorb BAxBEx's FolderBox addon's functionality.
- Make the search windows honor the "Launch folder windows in a separate process" setting. (Currently a hung/crashed search does the same to the shell Explorer despite that setting).
- more as I think of it...
I realize some of these are advanced features
Monday, August 08, 2005
That's the actual title of a scribble note I made a long time ago.
See, while I mostly love Outlook 2003, and it's greatly improved since v2000, it still has a bunch of annoyances and artificial limitations that really get my goat. To finish dumping the note:
- Only 1 Exchange account setup is allowed per Windows (!) profile
- POP accounts can only go to default delivery location's inbox (unlike IMAP or Exchange accounts)
- "After Sending" rules are missing several action options (which "When Arriving" rules do have). In particular:
- No "Move To Folder" option (Copy only)
- No "Mark as Read" option
- Tasks & Appointments which are outside the default delivery location are ignored (no reminders)
- Can't copy items from one PST to another (Move Items or Copy Folders only)
- Folder views spontaneously and regularly get messed up
- Subfolders can't inherit parent folder's view (an automatic option would be ideal, but manual would still be nice).
I noticed most of these while trying to maintain multiple accounts in Outlook, and keep their contents separate. I used to use Outlook profiles, but switching is way too slow for that to be convenient.
Googling just now, I found a couple similar ruminations on the same subject: Limitations of Outlook (without Exchange) at inluminent.com, and
Outlook Limitations at outlookwise.com
More as it bugs me.
Friday, August 05, 2005
Apparently MSN Spaces is now much more customizable, thanks to their new "Tweak UI PowerToy".
Hey wait, though, Doesn't Microsoft already already have a "Tweak UI Powertoy"?! Ah, so they do! (An indispensible Windows customization program, BTW).
Well, that's ok, because MSN says to load it by typing "&powertoy=tweakomatic” on the end of the URL. So perhaps we can just call it "Tweakomatic"...
Whoops, Microsoft already has a program called "Tweakomatic" too! It writes scripts to programmatically accomplish what Tweak UI does.
...I can understand if the Spaces team really wants to be like the Scripting Guys (heck, I do!), but the name confusion has got to go!
Tuesday, July 26, 2005
Ah, if only the CSS Zealots would admit it's really "Anti-Table" design. Use the right tool for the job, I say.
Tuesday, July 19, 2005
via the Scobleizer...
Rough week for Firefox team.
That's a lotta badness for what is hardly a "new" browser anymore.
Sunday, July 17, 2005
I have a new client who recently guessed their way through a SBS 2003 setup. THEN they called us to fix it. This has been quite the cleanup. I gotta get me a Haz-mat suit. Imagine and enjoy at my expense, some highlights:
- Exchange mailboxes not configured for the POP3 Connector (so email was removed from the ISP's mailbox, and dropped into Oblivion).
- No backups, no (or patchy) virus/spyware protection (and plenty of spyware).
- Moving from a XP Pro "server", which fell apart when we tried to join it to the domain (due to loads of spyware).
- XP Home machines trying to use the new server.
- No extra CALs for the 12 user accounts. Yes, that's 12 users competing for the 5 licenses that come with SBS. "Denied!"
And now (drumroll please)...
Amid extensive VPN, OWA, and OMA use, a vendor who supplied us with Device CALs instead of User CALs (and didn't mention it until we'd already activated them!)
Crap.
Tuesday, July 12, 2005
So I just saw this on Ajaxian Blog: "Ajax is rocket science". "Ajax isn't simple". Enough already!
It makes good points, but what puzzles me is: who is saying this? I never found Ajax difficult (even when I first discovered it 5 years ago).
Are the complainers just web designers, who just build pretty-but-static HTML pages and don't know coding (-vs- web developers, who build web apps)?
Well, as Scott would say:
And then I got back to work.
Sunday, July 03, 2005
I ran into the following the hard way recently. Since I don't trust anybody's tech support to actually test new service packs or publish known issues, I figured I'd mention it here: SP1 for SBS 2003 breaks Aladdin NetHASP, and programs which use it.
NetHASP is 3rd-party software which programs use to tie software licenses to a physical dongle (known as a "hasp" or "sim"). In my case, our client was using SigmaTek's SigmaNest and Develop programs (line-of-business stuff), we had the Network sim plugged into the SBS box and the NetHASP License Manager program running on it. After the upgrade to SP1, SigmaNest on all workstations could no longer find the Network Sim, and would not run.
Anyway, judging by known issues I'd read about, I pursued a firewall angle. I found out what port the NetHASP connection uses (475), and made sure workstations could see that on the server (they could). I reinstalled the NetHASP License Manager. I reinstalled SigmaNest. Nothing worked.
Finally, dreading a bad support like I've had all too often, I caved and called SigmaTek support. After an hour on the phone with a well-intentioned, but lower-level support employee, he finally contacted Aladdin support (at my suggestion). Eventually he got hold of them and the three of us worked together on it for a good while. Eventually we tried a new (command-line) version of the NetHASP License Manager driver, and voila! it worked again.
For the record, we had purposely waited a month after SP1's release to let any kinks get worked out (or at least known). I'd also immediately mentioned the SP1 install to both SigmaTek and Aladdin's support reps, since it was a likely culprit. Seemingly neither had run into the issue.
Now, I'm not sure, but this suggests to me that neither company is proactively testing new Windows patches and service packs. If true, this is a very bad thing (if not, I'd love hear otherwise!). It's also possible that they did know, but simply hadn't communicated that info with their support reps (and certainly had not via their support websites).
I asked them to document what we'd found, but I don't have high hopes. So... hopefully this anecdote will help out some other poor NetHASP clod like me: get the new/other NetHASP driver, and push the vendors to publish the problem and solution.
Tuesday, June 28, 2005
I've installed SBS SP1 several times now. It's an absurdly long and complicated process (yes, definitely "a process" more than "a patch"), and I just noticed this time the progress bar antics of step 4 ("XP SP2 for Client Deployment"):
It did this dance for several minutes.
...Gotta love those wacky patch devs!
There's been a massive amount of cool software and web development lately involving maps. I just want to nail down what I've seen in one place. I'll try it as a timeline...
- For ages there were the "classic web" map websites, which reloaded the entire page for every zoom, pan or other change.
MapQuest was one of the first (what, 10 years ago?), and has changed little since then. In a word, "slooow".
- Eventually some sites like Yahoo Maps and MSN Maps evolved some, using DHTML to dynamically swap the map image, without reloading the entire page. This was definitely faster.
- More recently, there was Google Maps, which actually slices the map into separate map "tiles", so that only the changed parts of the map are downloaded for each zoom/pan/etc (which is even faster). Definingly-cool features include satellite maps, and the ability to "grab/drop" to move the map with your mouse just like you'd grab and move a real one. This also put AJAX (aka "Remote Scripting") on the buzz map as a web development technique.
- Then NASA released World Wind, a desktop application which does this same trick, but leverages DirectX to provide seamless zooming/panning -- a true 3D app, and very cool. It's mouse-enabled much like Google Maps, but adds UI features like Tilting (which gives panning the sensation of a fly-over!) The focus is more educational/scientific reference than convenience (sorry, no driving directions to Wal-mart.)
- Google Earth is the most recent, which is basically a combination of Google Maps with World Wind. Its UI features are very similar to World Wind's, but it has more practical user features like Google Maps (how about Flying directions to Wal-Mart!). (It also has some business features like demographic information overlays and the like, which puts it in the arena of Microsoft's commercial MapPoint software).
- Update: A9 Maps is a new one. It's a different interface, and sports "curb-view" photos of addresses. ...Or says it does anyway, I can't find any around me, so I'm not sure what use that is.
All of these are free, by the way.
If you dig this kind of map stuff and/or astronomy, I recommend Celestia, a free 3D desktop app (like World Wind and Google Earth) for extra-terrestrial (as in "off Earth") virtual exploration. It's a great reference and learning/teaching tool, and my 5yr old and I love it.
Okay, I'm not really sure Microsoft invented AJAX, but I do know Internet Explorer had several asynchronous scriptable technologies and techniques long before any other browser.
To enumerate:
- DSOs (ADC, TDC, RDS). The TDC was pretty good, ADC was too heavy, and RDS was too much of a security issue, but they were all early ways to asynchronously data-bind elements at the browser. They were also fully scriptable.
- IFRAMEs - IE4/1997 or newer had IFRAMEs (Netscape 4 did have ILAYER, but Netscape 4 generally sucked). I actually thought I invented this technique, and used it on many projects to much success.
- Java - Meh, too bad about the JVM. Same basic technique, though.
- XMLHTTPRequest - Slightly more recent (circa IE5/1999 I think). This object IS what modern AJAX code runs on. Firefox, et al have only added similar objects in the last couple years.
"Remote Scripting" was Microsoft's term for this technique. (Heck, here's an April 1999 MSDN article on the topic).
SO, I'm rather annoyed when well-known journalists say Microsoft is working "Not to be left out of any development trends...", or better yet,
"Microsoft has decided [Ajax] is something it can't ignore... the Redmondians have jumped on the Ajax bandwagon.".
...Microsoft built that bandwagon.
Update: Perhaps I'm not the only one annoyed they're not getting their due.
Scoble's got a good laugh over AJAX, and Scott Isaacs has
thoughts on an AJAX (DHTML) framework.
Friday, June 24, 2005
*sigh*, more comment Spam today -- 150 in a few minutes, despite my nice new .Text spam filters (they were all identical).
Unfortunately, I can't just go into blog_content and delete the range (since the comment count wouldn't be updated), and I didn't want to click [Delete], [Yes], [Continue] 150 times, SO: I just fired-up SQL Profiler, reverse-engineered a standard delete call, and slapped together a utility Stored Procedure to loop that call, for big cleanup jobs.
It takes IDs for the first and last comment spam which make it through, and wipes them all out with .Text's native blog_DeletePost stored proc. Just paste this into Query Analyzer and run to install:
CREATE PROCEDURE re_wipe_commentrange
@p_ID int,
@p_lastID int
AS
DECLARE @v_sql varchar(8000)
WHILE @p_ID <= @p_lastID
BEGIN
SET @v_sql = 'exec blog_DeletePost @ID = ' + cast(@p_ID as varchar(5)) + ', @BlogID = 0'
EXECUTE(@v_sql)
SET @p_ID = @p_ID + 1
END
GO
(Note: this is for single user .Text blogs. Multiple-user blogs will need fiddling with the embedded BlogID parameter.)
Then to use it, call like so in QA: EXEC re_wipe_commentrange 900, 1000.
Might save someone a few minutes (even with writing and posting it here, I think I'd still be clicking delete right now).
Time to consider a way to implement MT-Blacklist...
Monday, June 13, 2005
Yes, this sounds like an all-too-familiar "Intro to Web Scripting" class or article, but I haven't actually seen these more advanced scripting topics compared before, so I wanted to nail it down in print.
| feature |
Javascript |
VBScript |
| Object-Oriented: |
Very powerul and easy to create custom object classes |
Now supported with version 5+ CLASS construct, but is comparatively less powerful and syntax is much more verbose |
| Object-Based: |
More object-based, wraps core functionality in intrinsic objects like Date, Math, Number, String, and Array |
Less object-based, dumps functionality into global functions |
| Optional procedure arguments: |
Supported |
Not supported! (hence kludgy workarounds) |
| Getter/Setter properties: |
Not supported! (yet?) |
Supported |
| Dialog/User-input support: |
None built-in, depends on the current object model (e.g. window.alert/prompt/confirm, or WScript.Echo/popup). |
Has powerful native Msgbox and Inputbox functions. |
| Convenience tools (aka synactical sugar): |
Few (escape/unescape?) |
Plenty (Explicit Conversions, Formatting, Dates, Strings) |
| Date Manipulation: |
Difficult (hence the need for a Javascript Date library |
Easy (see convenience tools) |
| Leftovers/Quirks: |
|
|
| General strength |
Powerful, more "nuts&bolts" |
Easy-to-learn, more common functionality built-in |
| General weakness |
Some common tasks are much too inconvenient |
Verbose, disorganized, weak OO capabilities |
key:
good
bad
eh..
Yes, of course it's my opinion, based on experience (and frustration!) Feel free to proselytize me otherwise, but back it up!
My perspective is this: scripting languages are about convenience -- quickly whipping out something that works, is readable, and is maintainable. If you want perfect academic code, or fastest performance, get another tool! For scripting languages, the less code and reference to accomplish a task, the better.
Interestingly, different scripting languages reach convenience by different routes. For example, where VBScript chooses a "simple" route of a bunch of unorganized global functions, Javascript groups them as methods of intrinsic objects. Normally I prefer simple, but Javascript's better organization makes me more efficient: I don't have to remember 90 or so distinct global functions -- if I can simply remember the object (Date/Array/whatever), then I'm set, because VS.net's Intellisense will help me quickly find the method I need without cracking a reference.
(Aside about Intellisense: it reminds me of the tabs -vs- spaces debate: I say tabs all the way. Any decent code editor should be able to display tabs how you like. Fewer characters to store/send, and less arrowing around pays for itself. And yes, a coder should be using a decent code editor!)
To be clear, I favor neither VBScript or Javascript as a rule -- each has its time and place (goal of this chart). Ideally, I'd like to marry them for the best of both. Both Classic ASP and WSCs can use both in the same context, which rocks. Too bad ASP.net lost this feature, but it matters less since it now runs full-fledged programming languages.
Finally, for entertainment, here's a hilarious thread on the "JS-vs-VBS" subject. My favorite quote: "IF JScript was a movie, it'd be Citizen Kane, or The Shining. VBScript would be the Mariah Carey movie, or possibly 'Sgt Pepper's Lonely Hearts Club Band' starring Peter Frampton and the Bee Gees."
Update: added ternary/IIF note to chart 'leftovers'.
Now that I'm color-coded, I may start a regular feature here where I publish smallish code bits I've written...
For WSH scripters out there, here's a handy one I wrote...
To explain, for GUI-type WSH scripts (usually run under the WScript engine), VBScript has a native Inputbox function, which prompts for user input via a dialog box. Command-line-type scripts (running under CScript) have no command-line equivalent, though -- yes Inputbox works, but a GUI dialog doesn't really fit a command-line script.
So to fill that gap, I wrote this:
' Name: InputLine
' Desc: like Inputbox, but for use with cscript
' Author: Rob Eberhardt, www.slingfive.com
' Params: prompt as string, default value as string
' Returns: user's answer
' History:
' 2005-06-13 added default param
' 2005-02-28 created original InputLine function
FUNCTION InputLine(p_strPrompt, p_strDefault)
call Wscript.Echo(p_strPrompt & ":")
IF p_strDefault<>"" THEN CreateObject("WScript.Shell").SendKeys(p_strDefault)
DIM strInput
Do While Not WScript.StdIn.AtEndOfLine
strInput = strInput & WScript.StdIn.Read(1)
Loop
WScript.StdIn.skip(2)
InputLine = strInput
END FUNCTION
Example usage:
DIM strChoice
strChoice = InputLine("Enter favorite color", "Red")
call WScript.Echo("You entered: " & strChoice)
...which would look like this from a command-line:
Enter favorite color:
Red
You entered: Red
For bonus points, you can detect if the current engine is CScript or WScript, and use InputLine or InputBox appropriately (like if you're note sure what engine will run your code):
DIM strChoice
'detect CSCRIPT context & use InputLine
IF Instr(lcase(wscript.FullName), "cscript")>0 THEN
strChoice = InputLine("Enter favorite color", "Red")
ELSE 'detect WSCRIPT context & use native InputBox
strChoice = InputBox("Enter favorite color", "Color?", "Red")
END IF
call WScript.Echo("You entered: " & strChoice)
Hope someone can use it.
Note: I would have absorbed this engine detection logic into a single smart InputLine-like function, if only Javascript supported Inputbox, or VBScript supported optional arguments. But, InputBox's optional 2nd "Caption" param makes no sense with InputLine, and unfortunately the languages leave no room to gracefully work around that.
Thursday, June 09, 2005
Trying out the new Windows Update v6 (now called "Microsoft Update"). Cool that they've finally integrated Office Update and other products (SQL Server for instance).
A few observations, though:
- It took several ActiveX installs, plus closing and restarting IE for it to actually load fully.
- Windows Update has been slooow for me lately (before this version even). Dunno why, but it still is.
Update: same slowness on sparkling fresh XPSP2 and SBS 2003 installs. It ain't me.
- Still a ton of French Spell Checker updates?? (2 for Office, 1 for Visio, 1 for Project) I saw this a lot with Office Update too. I have no French anything on any machines, so what's the deal?.
About time to reboot...
Friday, June 03, 2005
HTTP Compression is a wonderful idea. Unfortunately, its implementation in IIS 5 was deeply flawed.
Besides the usual issues, I've also found that HTTP Compression breaks Data Source Objects (DSOs) and Tabular Data Controls (TDCs) in IE (wonderful features for client-side data-binding in web apps). IE loads the data (showing "XX items remaining" counting down in the status bar, and eventually "Done"), but it never data-binds to the table template or gives any error messages, leaving an empty table. My guess is that IE uses a different mechanism for requesting DSO data resources from a webserver than it does for normal resources (pages and their referenced files like scripts, stylesheets and images). I've never seen this issue documented by anyone else, which I attribute to the relative obscurity of DSOs and TDCs (they were never marketed to devs enough).
So you can imagine it was a big pain figuring this out the first time...
When IIS 6 came out, I heard a lot of excitement that it fixed HTTP Compression, so I was excited too. Well I've recently/finally moved into IIS 6, enabled HTML compression, and then just got confused all over again today because my TDCs were broken. Grrr...
Sure enough, turning off "Compress Application Files" (and restarting IIS) fixed it. At least IIS 6 gives separate compression settings for dynamic and static files, so now I'm just compressing static files (e.g. HTML, CSS, JS, VBS, HTC), which should still help a bit (of course those files are cached by the browser anyway...).
Apparently Jeff Atwood has also found other big issues with IIS 6's HTTP compression. He's got a lot of good info, plus a handy metabase snippet to help fix those problems. Check it out.
Thursday, June 02, 2005
I've implemented Dean Edwards' Star-Light for code-formatting here. It's an awesome (and useful!) demonstration of the power of DHTML Behaviors.
Oh, and it's free (just a Creative Commons license).
And it works in both IE and Firefox*.
All it takes is a linked stylesheet and a CSS class on the target code section (specifying the language of the code), and Star-Light dynamically formats and colors it in the browser.
For example, this code:
<pre class="vbscript">
' this is a "comment"
'' so is 'this'
DIM string
string = "' string '"
call msgbox("Hello ""Dean""!")
FUNCTION getText(a, b, c)
getText = a + b & cstr(c)
END FUNCTION
</pre>
displays thusly:
' this is a "comment"
'' so is 'this'
DIM string
string = "' string '"
call msgbox("Hello ""Dean""!")
FUNCTION getText(a, b, c)
getText = a + b & cstr(c)
END FUNCTION
The supported languages are CSS, HTML, Javascript, PHP, and XML. (For fun, it can also enhance plaintext conversation text: emoticons into images, *bold* into bold, /italic/ to italic, _underline_ to underline, plus enhancing ">" quoted sections.)
Coolest of all, though, it's highly extensible via language modules. I glanced through the code to see if I could make it support VBScript. The engine is pretty complicated, but each module is a simple HTC file.
From there, it was easy to create a new module for VBScript and plugin the appropriate keywords straight from Microsoft's Windows Script 5.6 Documentation. I sent my VBScript module (working above) to Dean -- he made a couple improvements, and said he'll include it with the rest soon. (I may also create modules for VB6 or VB.Net, but there's a lot stuff to those languages...)
I don't mean to gush, but: Very Cool.
Unfortunately, Dean hasn't yet documented how to do write your own module (I figured it out on my own), but it's pretty easy for someone who knows HTCs and has a language reference to copy/paste.
* Another gee-whiz bit: despite the coolness of DHTML Behaviors, they are normally only supported by Internet Explorer. But Dean's done a wonder, and written a Mozilla XBL wrapper which makes Mozilla/Firefox support DHTML Behaviors too! (which is of course wrapped into Star-Light). This situation should be the poster child for the de-facto standards camp -vs- the slow academic W3C types, but more on that another day. Meanwhile, I'll sit back and regret my rationale "DHTML Behaviors are IE-only anyway, so I'll go ahead and use all this other IE-specific code." Like, uh, VBScript..... (dough!)
Tuesday, May 24, 2005
Traditional email spam like the unsolicited Door Store ads they drop on my step (in plastic covers to maximize slipping).
Comment spam is a "We're voting for Mr. Shmiggle" sign put in my yard without my consent.
Now that I've worked it out, I understand why comment spam irks me so much more, because it (ab)uses my reputation for its own (search engine) advancement. But I don't want to put up a fence by closing comments tho, because I do want my friendly neighbors to visit and talk to me.
So anyway, if anyone using .Text 0.95 is interested, here's my code to negate the search engine benefit to the comment spammers:
Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
Dim reqURL As String = Request.CurrentExecutionFilePath
IF reqURL.toLower().indexOf("/archive/")<0 OR Request.Form.ToString()<>"" THEN EXIT SUB
'-- get content
Dim oWriter As New StringWriter()
Server.Execute(reqURL, oWriter)
Dim strResponse As String = oWriter.ToString()
oWriter = Nothing
'-- find comment section
Dim iStart As Integer, iStop As Integer
iStart = strResponse.IndexOf("<div id=""comments"">")
IF iStart>0 THEN iStop = strResponse.IndexOf("</div>", iStart)
If iStart <> -1 And iStop <> -1 Then
'-- nofollow comment section's links
DIM strTarget as string = strResponse.Substring(iStart, iStop - iStart)
DIM strTargetFixed as string = _
strTarget.replace("<a target=""_new"" href=""http", _
"<a target=""_new"" rel=""nofollow"" href=""http")
strResponse = strResponse.replace(strTarget, strTargetFixed)
End If
'-- send content
Response.Write(strResponse)
Response.End() 'prevent conventional response
End Sub
Just replace the standard Application_BeginRequest procedure with this one in the global.asax.vb file (or absorb mine into it.) It intercepts outgoing comments and dynamically inserts rel="nofollow" into any contained links.
It won't prevent comment spam, but it will negate the search engine benefit to the comment spammer, turning the "Vote-For-Me" signs into mere litter in your yard.
One catch: this breaks .Text's inline "Remove Comment" links. You can still delete them in the the admin area's Feedback section, tho. Since the comment spam seems to come in waves, that's an easier way to delete them all at once anyway.
(I guess my next goal is actually preventing comment spam via a captcha or challenge-reponse mechanism, but til then I feel more luxury of time to explore possibilities.)
Thursday, May 19, 2005

I found this exploring in VS.Net's Object Browser. That's what, 6 layers of inheritance? I'm frightened!
Friday, April 29, 2005
It's possible after all. XP Pro's Remote Desktop can be hacked to give concurrent sessions.
To explain: Windows XP's Remote Desktop rocks, as does its ability to give me my console session later (with my work uninterrupted) from another machine. Glaring in its absence, though, is the ability to remotely-rock while someone is locally-rocking the machine. This can stink in a big way.
For example, too often I've remotely logged in for something quick, only to see this nuisance:

Rather inconvenient. Even worse, though, I've often been logged in and working remotely, when someone locally logs in. No warnings or explanations, just *bam* disconnected! (At least the first situation confirms the handover with both people.)
For history: Remote Desktop's daddy was Windows 2000 Server's Terminal Services in Remote Administration Mode, which did allow (limited) concurrent sessions. Microsoft added the console-session flexibility to XP's Remote Desktop, but dropped the concurrent sessions. Then 2003 Server's (renamed) Remote Administration wrapped in XP's console flexibility. Later, XP's SP1 promised concurrent access, then SP2 did. Two strikes. It did make an SP2 beta though, before being yanked later...
The silver lining: Thanks to the termsrv.dll from that SP2 beta, it's possible to hack XP for concurrent Remote Desktop sessions in a few minutes. Just change a registry setting, reboot to Safe Mode, replace the DLL, and boot back into homebrewed XP Remote Administration goodness.
For the do-it-yourselfers: Don't wait for Longhorn (or whenever-they-may-get-to-it): here's the how-to article, and here's the needed termsrv.dll file.
Update:
I just stumbled on sala source's Terminal Server Patch, which wraps up the whole process in a single convenient patch. Very cool.
Tuesday, April 19, 2005
Wednesday, April 06, 2005
I thought I'd share some Small Business Server 2003 security silliness. Following is a series of Internet Explorer dialogs when you setup VPN via the Remote Web Workplace:




Notice the Big Red Flag?? Microsoft's SBS team never signed the VPN installer (sbspackage.exe), so IE on XPSP2 (and presumably 2003SP1 now) does its scary "don't take candy from strangers" warning. (How long has Microsoft been touting executable signing now?!?)
*sigh*
Friday, April 01, 2005
I just asked a guru of advanced Object-Oriented Javascript, Douglas Crockford the following question. For posterity, and for other possible takers, I'm posting it here too.
Also, for the record, this has nothing to do with IE's proprietary -- but wonderful -- setExpression method or CSS expression capabilities. Those dynamic properties only apply to DOM objects, not custom Javascript objects.
Do you know of a way to define dynamic object properties in Javascript?
For example, VBScript lets us define classes such as this:
CLASS myClass
PUBLIC phrase
PUBLIC PROPERTY GET firstword 'get first word from phrase
firstword = left(phrase, instr(phrase, " "))
END PROPERTY
PUBLIC PROPERTY LET firstword(v) 'set phrase's new first word
phrase = v & " " & phrase
END PROPERTY
END CLASS
This demonstrates two important features:
1. the firstword property can return dynamic results (depending on the current value of the phrase property).
2. setting the firstword property can run other code (which dynamically prepends to the phrase property).
We can fully accomplish #1 (Property Get) in Javascript, by reassigning the toString method/property to a function like so:
function myConstructor(){
var self = this; //preserve object's context
this.phrase = '';
this.firstword = function(v){
if(v){self.phrase = v + ' ' + self.phrase}; //LET
return self.phrase.substring(0, self.phrase.indexOf(' ')); //GET
}
this.firstword.toString = this.firstword;
}
...But I've found no way to achieve #2 (Property Let or Set) in Javascript. I can set firstword as a method, but setting the property value overwrites the method definition (and all subsequent GETs return that static value).
I've extensively searched, but found no answer (at least not before Javascript 2.0, which doesn't yet exist). Any ideas from the experts?
Update: Douglas Crockford responded that he doesn't care for getter/setter properties, since "it allows simple assignment to have side effects, which I think works against reliability." (I take that as a "No, it's not possible.")
My current need is that I'm patterning my custom object after part of the DOM, whose objects certainly do have getter/setters. I agree with Douglas that getter/setter side effects can be dangerous (esp. in the hands of a poor coder, as with any powerful code construct), but I think the use of methods -vs- getter/setter properties should be in the realm of "best practice" rather than a language limitation.
Wednesday, March 30, 2005
I've run into this often: the need to have a VBScript constant containing a line-break character. Today I finally got a definitive answer on whether it's possible (for the impatient, the answer is NO).
If you're interested in history...
Of course this is right out:
CONST blah = "hello
there"
...It's just bad syntax. The closing string quote has to be on the same line as the opening one.
The normal approach I've tried was this:
CONST blah = "hello " & vbCRLF & " there"
..But the ampersand (concatenation operator) automatically makes it an expression to the VBScript compiler, and therefore it assumes "not constant." This is of course despite the fact that both parts
are known at the time of compilation (which is the main criterion for a constant -- value is known at compile time). Anyway, the ampersand is right out.
Now in JScript/Javascript/ECMAScript, you can do this:
var blah = "hello \r\n there"
...The \r\n switches define the line-break character, they go
inside the string, and they are only interpreted when it's read.
Unfortunately, there's no similar switch in VBScript. While HTML does honor ASCII codes like or , and web browsers honor hexadecimal codes in URLs, VBScript does neither. So these also don't work:
CONST blah ="hello there"
CONST blah = "hello %0A%0D there"
CONST blah = "hello 0x0A0x0D there"
So I was reading a blog entry by Eric Lippert (who I believe wrote most of VBScript) today, and he mentioned Constant Folding, and proceeded to outline the mechanics behind this VBScript constant problem. It rung a bell, I asked about line-breaks in VBScript constants in his comments, and Eric responded:
"Sorry, you are correct -- there's no way to do that. Sub-optimal, I know. "
...Straight from the dev's mouth.
SO, if you need a line-break in a VBScript constant, just use a variable instead:
DIM blah
blah = "hello " & vbCRLF & " there"
...Yes, there may be some slight performance penalty compared to a constant, but it
is script after all -- racing performance ain't the point.
Wednesday, February 23, 2005
Mapping/Connecting a Drive Letter to a WebDAV or Front Page website
Update:
Apparently Windows XP makes this possible through an integrated WebDAV client and updated Net Use command. For icing: if you have a Passport, you can map your online Documents folder to a drive letter with this command:
net use * "http://www.msnusers.com/My Web Documents/Documents" /persistent:yes /user:UserName@passport.com
Tons of cool possibilities with this... (Now if we could just do the same with FTP!)
I just setup a webDAV-enabled website in IIS, enabled HTTPS, setup a couple virtual directories with pass-through authentication to my file server, and voila! thanks to the above trick, I can have secure, full-control remote access to it from anywhere.
Actually, there was a lot of toil to the process, since there are a lot of bugs and tricky bits with DAV, HTTPS, and UNC Virtual Directories. Here's useful info I found when wrestling my share of them...
WebDAV:
HTTPS/SSL:
Passthrough Authentication:
Web Folders:
Lemme see if I've got this process straight now. Create the Virtual Machine, then...
- Host: Compress the Virtual Disk file.
- VM: Start the VM and Install the Guest OS.
- Guest: Disable pagefile entirely, and restart OS.
- Guest: Stop all services.
- Guest: Compress entire hard drive(s).
- Guest: Defrag til the cows come home (at least 20x).
- Guest: Restart needed network services, so I can...
- Guest: Install Eraser, create a new "zeroes" method of unused space overwriting, setup unused space task.
- Guest: Run Eraser (possibly 2x).
- Guest: Shut down OS & VM.
- Host: Run Virtual Disk Wizard to compress Virtual Disk to new file.
- Host: Defrag Virtual Disk file til the cows come home.
Dang... that's involved! VMWare definitely beats Virtual PC here.
It's several hours worth of drive grinding, in fact, but it'll get that image file as small as possible, and should make it run faster.
Alright, so I've doc'd the process for future reference. Some further explanation and tips:
- I compressed twice, both in the guest and host OS. This does several things:
- Sacrifices CPU for better hard disk performance, which is Virtual PC's speed bottleneck.
- Frees more space in the Guest OS, which can then be zeroed-out and shrunk more effectively by the Host OS's file compression.
- Achieves an overall smaller image file. When combined with “trimming the Windows fat” *, it can make VMs of most basic Windows installs fit on a single CD.
- I stopped all services for the compression and defrag. This unlocks more files which can then be compressed and defragged.
- I defragged til the cows come home, because...
- A spanking fresh Windows install is already quite fragmented, and file compression fragments it much more.
- Windows' built-in defragger is by no means thorough. Running it several dozen times is as close as it gets. Fortunately this can (now) easily be scripted for easy walking-away.
- Theoretically, free-space defragmentation should also help the external compression scheme too, but this is the worst . Most 3rd-party defrag tools would be more effective at this.
- Step 8 may need to be repeated. I'm not sure why, but sometimes Eraser doesn't do the trick the 1st try. The indication of this is the Virtual Disk file not actually shrinking.
- I suggest disabling Undo disks for this process. It only adds one more looong step of merging the undo disk with the original.
- Step 3: If you've got the RAM (say 1GB), give it to the VM and disable its pagefile. That'll further bypass the slow disk issue.
- Step 12: I use Defragmentor Lite for single-file defragging. I also sometimes find it effective to switch between that and Windows' defrag utility.
- * “Trimming the Windows Fat”
- Uninstalling via Windows Add/Remote Components: MSN Explorer and most of Windows' Accessories (I just keep Paint around for screenshots).
- Uninstalling via various obscure commands:
- Agent: %windir%\system32\RunDll32.exe advpack.dll,LaunchINFSection %windir%\INF\agtinst.inf, RemoveAgent
- Messenger: %windir%\System32\RunDll32.exe advpack.dll,LaunchINFSection %windir%\INF\msmsgs.inf,BLC.Remove
- Deleting various nonessential files:
- All temp files
- Search for files matching “*.bmp; *.wma; *.wmv; *.wav”. Of these, most of the biggest ones can be deleted without being noticed.
- Possibly %windir%/DriveCache/ ? Hardware won't change in a VM. I've successfully done it before without problem. The worst that should happen is prompting for the install CD. Not sure what other repercussions this could have.
As way of disclaimer: I'm no expert/guru/pro with VPC. These are just my learnings and observations so far after a few years' use and fiddling. I'll gladly defer to the pros on this, but I haven't seen much on this subject either.
2005-03-12 update: I just found out that SP1 for VPC makes the disk prep steps slightly simpler (the "zeroing" part). It does this via a new Virtual Disk Pre-compactor CD image which it makes available for mounting, which saves the extra hassle of installing and configuring Eraser. (via Robert Moir's excellent VPC site)
Sunday, February 20, 2005
I'd just like to volunteer something: "Show friendly HTTP error messages" was one of the worst thought-out features ever added to IE.
The few times I've missed it on a new development workstation have been absurdly baffling (“give me some useful error information!!!”). The many times a user has said “it doesn't work” but had no more details and no error message have been all the more painful to track down.
Argh!
(at least the fix is scriptable, so I've just added it to my standard “prefs” scripts..)
Thursday, February 10, 2005
No not that kind of Brain Dump -- I just figured I'd mention this stuff, in case it comes up again/for someone else...
I've been fighting with ASP.net and Visual Studio.net (2003). VS.net pushes code-behind files (aspx.vb or aspx.cs) hard, since they help separate logic and presentation (a good thing). One particular way is by disabling Intellisense (the #A1 best main reason I use VS.net and InterDev before it) in the aspx file itself.
Next problem: Ok, I bought into using code-behind file for UI/logic separation. Unfortunately every little change to the code-behind requires a rebuild, and therefore a restart of the app (logging me out, since I'm using tracking auth in session). So I then have to re-login and find where I was all over again... for each and every change to the code-behind!
(BTW, contrary to popular misconception,
code-behinds don't improve performance. Well, they're pre-compiled, so they may be faster on the very first page load than inline code [which is compiled on that first load], but afterwards they're identical in speed.)
Alright, screw the code-behind, I think. back to my own code separation -- one big logic block before the presentation block, with minimal connections between. Big errors! (something about method body, I recall) -- I can't put functions/subs there.
My first discovery: you can use functions/procs in the aspx. You just can't have them inside <% shorthand ASP tags %>-- they only work inside explicit script tags (e.g. <SCRIPT runat="server"></SCRIPT>). Apparently <%%> and <SCRIPT runat="server"></SCRIPT> are no longer equivalent to each other, as they were in Classic ASP.
SO, my gears turned and came up with a solution to the mess: a homebrew code-behind. I ripped out the contents of the code-behind, put them in a separate aspx file (inside a <SCRIPT runat="server"></SCRIPT> block), and just include it. This solves the rebuild/restart problem, and still maintains code separation.
Downside: no Intellisense! (since VS.net now only enables it for what it recognizes as code-behind files)
Next discovery: The @Page directive can have an src attribute/property to reference the code-behind file (it normally uses Inherits and Codebehind attributes/properties to enable the code-behind). src does NOT require rebuilding to take effect. It also works with a normal code-behind files, so you get blessed Intellisense. (more info here: Inherits vs. Src vs. Codebehind)
So I now have a solution, just with something like <%@ Page Language="vb" src="report.aspx.vb" inherits="report" %>. (The inherits is still needed for object/class references).
One catch: VS.net complains loudly when it loads a page with this src attribute:
It loads fine on the second try, but color-coding on any inline code is then disabled. (Workaround for
that: remove the
src and
inherits attributes, save, reopen the page and re-add those attributes. All works fine as long as VS.net stays open after that.) For me, it's a small-enough price to pay for code-separation, easy deployment
and Intellisense. (
Microsoft's src info here, but no explanation
why VS.net doesn't fully support ASP.net, certainly none why it actively hinder its use).
Some further, unrelated discoveries:
Response.IsClientConnected is extremely expensive. If you need it in a long loop, only check it once every 100 or more records. Going from every 10 rows to every 100 gave me a 7x speed increase.
Option Strict -- enforces good coding, since it makes you explicity declare all types and early-bind your objects. Unfortunately (I think) it also adds a lot more coding for explicit type conversions too (for instance from recordset field values). It seems the parser checks the type conversions in a second pass, so it may be easy enough to turn it on for the first pass and off again when it starts throwing type conversion complaints.
Wednesday, January 19, 2005
Yeehaw. Having fun with my first migration to Small Business Server 2003. I've used and experimented with it a bit, but not actually done a migration.
It wasn't until today that I noticed something about it (and this probably applies to Windows 2003 in general). There are a lot of annoying old GUI defaults that they've fixed. Off the top of my head: Windows Explorer's "Hide extensions for known file types" is now off by default, and the default item view is now "Details" instead of "Icons". ("Simple folder view" IS still on, but hey, every little bit helps.)
SBS's Internet Explorer could still use some default GUI improvements. I'm particularly annoyed by the huge-by-default "Media" toolbar button. This should always go away, and "Font Size" and "Full Screen" should take its place. (Interestingly, the Media button disappeared from IE with XPSP2. Hopefully the same will happen w/SP1 for SBS2003).
Something strange is going on. Twice now I've rebooted only to have video disappear. I even switched monitors. It seemed like jiggling the vid card fixed it, but it hasn't worked this second time.
Grr. I'll save it for tomorrow...
Update:
Well, I opened the case (a joyously easy Dell case) and found the video card loose. Reseating it fixed the video. But it's happened again now, and reseating isn't working. In fact, I think it isn't booting. This is very bad!
Update 2:
It was bad memory. I basically amputated one component at a time, and it started booting again when I got to the RAM (last thing of course). One DIMM good, the other bad -- just like that. Dell's making it all good tho: two replacements by Friday 9am. Support contracts are a nice thing...