Links: old but interesting

I just found this list I sent to some friends, over a year ago now.  Still quite interesting…


IQ/Personality:

The Classic IQ Test – Apparently I’m an “Insightful Linguist …natural fluency of a writer and the visual talents of an artist. …a creative and expressive mind” (there’s flattery for ya).

What Different IQ Scores Mean (down, cached copy here)  – Checking my above IQ here calls me “highly gifted” (aka “sub-genius”?).

What kind of thinker are you? – Says I’m a “Musical Thinker” (like Jimi Hendrix, except sooo white).

 

Oh, he’s talking about me!

Real coders, real code – scary & sad but true

 

Interesting:




 

Fun:



Two Solutions: ASP.net Framework 2.0 deployment woes

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.

Braindump: CDO/MAPI AppointmentItems and Exchange Public Folders

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)

10 More Songs

Been a long time since I did my song roll.  So here are the first 10 random picks:


King’s X – Far, Far Away
U2 – Who’s Gonna Ride Your Wild Horses
Newsboys – Shine
The Commodores – Old-fashion Love
Us3 – Knowledge of Self
Porcupine Tree – Phase III
Stuart Hamm – Snoopy’s Theme Song – Peanuts
Sting – Why Should I Cry for You?
Relient K – Chap Stick, Chapped Lips, and Things Like Chemistry
Ohio Players – Only A Child Can Love


Good mixture, I think.

How about a Conversion mode?

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.

This is Broken

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!

CSS includes + HTTP headers = big mess

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: &lt;index.css&gt;; REL=&quot;stylesheet&quot;; MEDIA=&quot;screen&quot;</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.