Author Archives: admin

Vista Reliability Update

2
Filed under Uncategorized

If you’re running Vista, you might want to check into KB938979.

It’s call the “Performance and Reliability Update for Vista”. There’s actually 2 different packs, one for 32bit and one for 64bit.

In my case, Vista Explorer was just crashing, almost constantly, when I was copying files around (I got into a house cleaning mode this morning and started shuffling files into a little better folder structures).

It’s a 10mb download, so it’s not utterly trivial, but it’s not 300mb service pack either.

I just have to wonder what actually got changed when MS rolls out patches like this. Just once, wouldn’t be interesting for MS to roll out a patch that included a DIFF report. You know, not ALL the code, per se, just what the old line was and what it was changed to, what was deleted and what was added.

Wouldn’t THAT make for some interesting reading?

New Apophysis Piece, “Above and Below”

0
Filed under Uncategorized

image

I just kind of stumbled on this while playing with Joel Faber’s Flipped Disc technique. He and his brother do some amazing stuff in Apophysis.

I had no idea you can get two almost completely different fractal styles in a single image.  Definitely warrants more play.

They Killed the Web! The Bastards!

1
Filed under Software Architecture, VB Feng Shui

The web as we know it is in its death throws.

Um, right.

I just read the Guest Opinion in the latest Visual Studio Magazine. It’s by Rockford Lhotka, who I have a lot of respect for. But this piece was a little off.

He basically claims that “the web as we know it is finally coming to an end”. Why, you may ask?

  • Is it the impending rollout of IPV6?
  • Maybe some new 3d “navigator” (as in the-chess-set-on-the-millenium-falcon 3d, not yet-another-2d-window-into-a-virtual-3d-space 3d)?
  • Or maybe there’s a new “brain driven” interface I hadn’t heard of?

No.

It’s Silverlight. and Atlas.

Sigh.

According to Rockford, AJAX is the “last gasp of a dying technology”. He argues that at some point, “either the browser transforms into a full blown programming platform or we find another answer”, and that answer, apparently is SilverLight.

Now, don’t get me wrong. SilverLight is pretty slick, as long as you don’t try to find any examples of actual web apps written in it. You know, the kind that people would use as opposed to just play with for 5 seconds. There’s tons of nice animated displays synched to music and pretty graphics of pages flipping, but where’s the data driven samples, or the reporting grids, or the company dashboards, etc?

Not only that, but hasn’t the web already got a “launch point to load something that is a programming platform”. I thought it was called Flash? And flash has certainly not brought the end of the Web nigh. Hell, it’s harder and harder to find sites that even bother with it anymore.

And SilverLight is from Microsoft, so you can bet that, even if they initially support a plethora of browsers and systems, eventually, it’ll get whittled down to Windows Voyeur (or whatever they’ll be calling the new version in 5 years).

Rockford makes a good point about technologies lasting upwards of around 10 years before being replaced by newer, better concepts. Things like COM, Win32, and CORBA. Things like ISA, the serial and parallel port, and ATA IDE. Things like hard drives, mice, qwerty keyboards, text files and relational DBMSs…. Oh wait.

I’d lay money that the next “big thing,” the thing that “kills the web as we know it” and ushers in a new era similar to the internet age of the 90’s, will not come from a big house like Microsoft, or IBM, or even Xerox. It’ll come from some dedicated hacker like Marc Andreeson or Bram Cohen. It’ll start off small. Hardly anyone will use it, kinda like Google back in, oh, 1999. And it’ll probably have a goofy name, nothing as cleanly futuristic as “SilverLight”.

Until then, I’d say the odds are long on HTML, Javascript, Ajax, etc, going poof.

Nullable Types in VS2008

3
Filed under .NET, VB Feng Shui

The VS 2008 VB will support nullable types.

Simply put, a nullable type is a standard type, like, say, integer or string that can ALSO contain a null.

This can become very important in database work, because a null value in a field means that no value has been assigned to that field vs a common case where you might use 0 in a numeric field to indicate no value, or you might use a null string (ie a string with no length) in a string field.

Obviously, using 0 to indicate no value works much of the time, but, there often comes a point when you actually do need to use a 0 value for that field.  There’s a number of other, more arcane reasons that using one of the values from the range of possible values of a type to indicate null is usually not a good idea.

Hence, nullable types. With a nullable type, I can have an integer variable that can be a 31bit positive or negative number, or 0, and STILL have yet another “state” of that variable that indicates it’s null.

This will likely be incredibly handy for many many uses when working with database data.

But the syntax?

Dim a As Integer?

or

Dim a? As Integer

No, I’m not making that up.

What the hell? A question mark?

Why not just:

Dim a As Nullable Integer

I find this to be an unbelievably hypocritical decision given the almost overwhelming philosophical rants delivered by Microsoft about not using the traditional VB type specifier characters in .NET anymore (you know, $ for strings, % for integers, those bad boys). Heck, check page 42 of “Framework Design Guidelines” by Krzysztof Cwalina and Brad Abrams of Microsoft:

DO NOT use Hungarian notation (their bold, not mine)

Now, to be fair, the authors in this particular instance are discussing publicly available interfaces, but I’ve seen the same directive applied to internal coding as well. So, we’re not suppose to use hungarian, and we’re not supposed to use type characters, so we’re left to simply scan the code to information about how a variable is used or what it likely contains. Jeez. How convenient.

dasBlog 2.0 is Up!

3
Filed under Uncategorized

Not sure if it’s working entirely yet, but it appears to at least be serving pages.

Let me know if you notice anything amiss.

Authentication Error running Web Site in VS2005 in debug mode under Vista

0
Filed under Uncategorized

I haven’t been coding too much in ASP.NET, and it seems like every time I sit down to do something in it, things have gone fubar in some random, unexplained way.

The latest example. I went to start a web app that I’d debugged plenty of times before and ended up with

Unable to start debugging on the web server. An authentication error occurred while communicating with the Server

Ok, start googling. 

I tried everything I could find to no avail.

Then I happened on Mike Volodarsky’s Server Side and this article.

I’d run smack into a full-on bug in VS2005, and not a small one. Mike’s post details why all of the alternatives have their drawbacks and then he presents his “Debug Assistant” that works around the bug and allows you to start in F5 debug mode anyway.

And even better, he updated the post with details about KB article 937523 that describes a hotfix to resolve this problem.

Unfortunately, the hotfix is one of those that MS insists you call them to obtain, but Mike makes the link available. It’s here.

Anyway, downloaded the hotfix, applied it, and I didn’t even have to reboot. Debugging works great (ie like it should have in the first place) now.

A big thanks to Mike, for posting about this bit of VS nastiness.

Now, it’s ~3hours later. What was it I sat down to take a look at in my ASP app again?

VB6 and Typelibs

5
Filed under Uncategorized

Ages ago, I happened onto Bruce McKinney’s HardCore VB and the Win.TLB file that he created and I was hooked.

Ever since, I’ve been a big fan of using typelibs with VB6. They’re relatively compact, support help, work nicely with Intellisense, and, most importantly, any elements of a typelib that your project doesn’t use, don’t get compiled into you project, unlike standard VB DECLARE statements.

Furthermore, typelibs provide just about the ONLY way to access certain COM interfaces that are normally declared with attributes that make them unusable by VB.

For examples of that, check out Edanmo’s page, or the VBAccelerator stuff.

I’ve been using Matt Curland’s Excellent PowerVB Typelib editor to edit, extend, and generally hack and bash the original win.tlb (I generally don’t use unicode much explicitly, so I haven’t kept the WINU.TLB unicode variant up to date, unfortunately). Note, though that you have to buy the book to get the editor. If you do this much, the editor alone is worth it, but the book is truly the best books on low level VB6 out there.

Doing things the Right Way

However, I really wanted to get this thing back into shape, and I felt like the best way to do that was to get it BACK into IDL format, and then use the MIDL compiler on it.

You’d think that doing so would be, basically:

  1. Load the TLB into OLEVIEW
  2. Export the whole thing as an IDL file.
  3. Edit the IDL with a text editor
  4. Run MIDL on it to recompile the WIN.TLB and presto! Nice new, clean tlb file.

Sigh. Is anything ever that simple?

Problems, Problems

First, OLEVIEW exports things in completely the wrong order (I’m not exactly sure what it uses to order things other than just the defined order in the TLB). As a result, I got tons of “symbol not defined” errors when I compiled, because a call referenced a structure that was defined later in the IDL, and didn’t have forward declaration.

Shuffling LOTS of typedefs around, I resolved all that, only to end up with tons of MIDL2022 “illegal or missing value for entry attribute”, as well as MIDL2270 “duplicate UUID” errors.

The duplicate UUID errors I fully understand, even though I really don’t like it. Basically, the TLB “redefines” a number of internal COM interfaces to make them usable by VB, for instance IEnumString.

However, MIDL doesn’t allow you to redefine an interface that already exists, and that particular interface does already exist.

In that case, commonly, you just rename your new definition to, say, IVBEnumString.

And with mktyplib and Matt’s TLB editor, that’s no problem. But MIDL see’s the old IEnumString (defined in the automatically INCLUDEd OBJIDL.IDL) and the new IVBEnumString, notices that they have the same UUID (which they must) and throws that MIDL2270 Duplicate UUID error.

Bruce resolved this by actually copying the OAIDL.IDL, OBJIDL.IDL, UNKNWN.IDL and WTYPES.IDL from the Visual Studio 6 Include dir right into his TLB project, and modified them as necessary. It works because of the MIDL search rules, but I REALLY didn’t want to continue mucking with the MS IDL files. I’d much rather just redefine those that I need to redefine and be done with it. Just seems like a safer alternative.

Ok, fine, so I go back to mktyplib and move on.

Not so fast, young Skywalker!

mktyplib is an older tool (read, unsupported, not maintained, and generally considered just that much bit junk now). And sure enough, a very common element in my type lib, it doesn’t support, namely non-variant optional parameters.

I have a line of ODL (mktyplib’s prefered input file type) like:

      HRESULT _stdcall Commit([in, optional, defaultvalue(0)] STGC grfCommitFlags);

And it has no idea how to handle that OPTIONAL and I have too many of these to bother counting them all (ok, not really, there’s 64).

I really don’t want to have to make all those method parms suddenly “required” when they’re not.

The Cycle of Irritation

So, here I am, hours later, and back where I started.

I’m going to continue using the PowerVB editor to update the WIN.TLB file.

And just to recap, my version started from Bruce McKinney’s ANSI version, generally targeted at VB5, then pulls in LOTS of additional COM interfaces, ala Edanmo, VBAccelerator, and others, corrects some issues with certain calls that VB5 had no issues with but VB6 didn’t like, throws in lots of new ENUMS for parameters of functions instead of just blind LONGs where you get no Intellisense, and rounds things out with a little bit more help text for some methods (though that’s still pretty spotty).

One nasty habit of TypeLibs

One thing to be very careful of if you do start working with typelibs, is to make sure that any API function you decide to pull in and actually use will exist on the target machine.

These days, that’s not particularly hard. Win2k through Vista have changed very little as far as typical low level API’s are concerned.

At one point, my apps were running on everything from Win95 through XP, and there were definitely issues with commonly used functions existing under Win2k or XP that had no equivalent under 95 or 98. In those few cases, I just resorted to a standard VB declare and then error trapped the call. If the function wasn’t available, you’d get an error, trap it and deal with it.

However, if that same function was defined in a typelib, the app loaded will validate all implicitly linked libs and try to resolve them all at load time. If it failed for ANY function, the app won’t load at all, and all this happens before any of you VB code has a chance to do anything about it.

AIM Wimzi

0
Filed under Uncategorized

I recently blogged about showing your ICQ status on a webpage and I get this in the mail….

AIM now has a service called WIMZI that allows you to embed a little script on a page and lets visitors to a site chat you up without getting your AIM ID, etc.

image

Very interesting. Even better than the status indicator because a visitor can start a chat right there on the site. A bit like those “Chat with a support rep” services, but it’s effectively free.

I wonder if that will end up having an impact of any sort on the paid offerings. I’m guessing they support a bit more accountability, plus some amount reporting (number of chat requests answered per rep, that sort of thing).

I’ll have to try it out here soon.

One Big Control or Lots of Little Ones

3
Filed under ASP, Software Architecture

I’ve been delving into ASP.NET programming lately and one thing that immediately struck me as odd is just how many controls end up on an ASP page.

A typical data entry page consists of, generally, lots of labels and textboxes, a few option buttons or check boxes, even fewer combo boxes and list boxes, a grid maybe, and few buttons (buttons, links, whatever they happen to look like).

Granted, depending on the application, you may have a few particular screens that are more complicated (say, a scheduling screen), but by and large, for general data input, that about sums it up.

But when I look at what’s involved in ASP.NET to make that happen, it’s almost mind boggling.

Of course, you have a label control for a particular field, you have the field itself, but then you have separate validator controls for each kind of validation you might want to perform. Add in tables to get things to line up nicely

To me, it seems much more logical to have one “data input” control, that can handle all (or rather the most common) data entry tasks via properties.

Want a caption above the input box, rather than to the left of it; set a property. Want the text to be validated a alpha numeric, but only including A-F, and it must be > 4 chars, less than 10, blah blah; set a property (or two). What this field to be a choice between True/False; set a property to make it a radio button group, a list, or a drop down combo box.

Ages ago, there was a UI package called SmartUI. Looks like it’s now sold by Xceed. No idea whether it’s any good now. It was ok back then, although it had it’s share of issues. But I always thought the idea was right. One control that could do all sorts of the most common data input type tasks, just by dropping it on a form and setting a few properties.

I completely understand the idea of “modularizing” functionality and the ASP control model definitely does that.

So my question is, is that the best way?

All those controls eventually just render HTML anyway, so is there a penalty for one big control vs lots of little ones rendering that html?

Does it make the page easier for the user to work with?

Do separate little controls make it easier for the developer?

Microsoft used to say that INI files were the absolute best way to store your application settings. Then it became the registry, and INI files were passe. Now, it’s back to INI files…albeit with a lot more tag stuff, funny angle brackets and often terrible formatting…oh, right, I mean XML files.

My point is, I’m not one to just accept Microsoft’s take on a topic, no matter how much framework they’ve thrown at it. 

And I’m wondering if their control model might be another one of those reasons to break with the pack.

Flying Saucer for Sale

2
Filed under Hardware, Helicopters, Misc

Paul Moller (the aircar guy) has finally made at least one of his designs available for sale, the Volantor.

image

Ok, it’s a tad goofy looking, and at 125k$ plus, it’s bit out of, oh, damn near everyone’s, price range, but still, it is for sale.

Personally, I’m waiting to see the first M400 flying around.

image

The amazing thing to me is that this guy has been working on this idea since the 60’s, developing all sorts of technology in the interim to fund it (and contribute to it).

Dr. Moller, keep it up!