Category Archives: Uncategorized

Office Desk

0
Filed under Uncategorized

I finally finished out my dream desk. Actually, I finished it out a while back, but just thought about posting here. Maybe it’ll inspire other cabinetry-hackers like myself.

I started with an electrically height-adjustable corner lab bench. Used office supply place, about 100$. This allows the entire desk to lift up to standing height, for those long conference calls where I have to walk around some.

Removed the top. It’s now a workbench in a corner of my dad’s shop.

Welded up a support frame from an old bed rail. You can see that in a pic of the underside of the finished desk here:

image

Built up the table top from 3/4″ MDF, oak baseboards, oak 1x4s and green/gold slate tiles. Here’s a pic of the MDF base, plus the border and edging. The tiles are set in the center area, about 1/4″ below the surface of the border boards. The notch is for the adjustable keyboard/mouse tray.

image

Biscuit joined oak 1x4s with pecan trim to make an adjustable keyboard tray. This was the mockup:

image

Filled the tile area with about 3 gallons of epoxy (to give it that super wet, super thick, bar countertop look, and to fill it up to the same level as the border). Stained everything a custom red mahogany.

And bolted it all together to get this (I left the keyboard in place to give a sense of scale, ignore the office, it’s in its normal state of disarray). The most nerve wracking part of the whole build was having the entire piece completely built, stained, with the tiles glued and mortared in place, and then mixing 3 gallons of epoxy to pour over it. Screw that up and the whole thing would have had to go on the trash.

image

This shot gives a little better look at the keyboard tray and overall desk, and it shows off the gloss of the epoxy top:

image

and this one shows off the tiles:

image

Now, granted, it’s not quite as cool as David Barry’s Tie Fighter Desk, but it works a little better for video conferences<g>

image

However, I don’t have drawers. Maybe I could do a Jawa Sandcrawler filing cabinet…

Any other cool/practical desk hacking out there?

I fixed that, Dammit!

3
Filed under Uncategorized

If you’re trying to validate an installation in InstallShield (version 11.5, in case that matters), here’s a little something to be aware of.

First, some background.

InstallShield sucks.

Ok, now that that’s out of the way, if you have to use it, you may find yourself needing to perform a validation on your install. I did when a customer called up telling me that they couldn’t deploy my install using Active Directory Group Policy because when they tried, AD GPO gave them an error that the install wasn’t valid.

Which it most certainly was, because tons of people have used it to install over that past 2 years.

Anyway, the customer happened to have WISE, so they ran a validation on it and got quite a few errors flagged.

So, I run InstallShield validation on it and I see quite a few errors too. Oops.

Well, to be honest, installs aren’t job one, and if the damn thing installs and uninstalls properly under all the test scenarios that we’ve cooked up, why would I even think to validate it?

None-the-less, it had issues. So I start investigating. Come to find out, the errors are things like “Foreign key not found in table blah” and such forth.

Whah?! You mean, InstallShield will actually build an install that contains patently incorrect or missing foreign keys between tables. Hey, if I was using ORCA to build installs, I could see this, but isn’t that what spending all that dough on InstallShield is supposed to buy you?

Fine, so I fix the foreign keys and revalidate. Same damn errors! Not one thing is gone from the validation errors list. WTF!

I puzzle over it for 15 minutes or so and then give ’em a call.

Ah. You have to rebuild your entire installation before rerunning the validation! Oh. That makes sense. And, um, exactly why doesn’t IS simply pop up a msgbox telling me I need to rebuild, or better yet offering to rebuild. It knows I just ran a validation. It knows I just made a few changes. Shouldn’t it know I’m not going to get valid results if I just run the validation without rebuilding?

This just seems like UI 101 to me, not Advanced AI 5.

Living Code

0
Filed under Uncategorized

I’m sure someone, somewhere, has already done a dissertation on this, but I’ve often thought it would be interesting to look at the code of a project as if it was a living, growing thing.

You’d analyze the changes made over time to a piece of code to visualize how it becomes better, breaks, corrects, expands and ultimately dies or gets recycled refactored, as well as the people making those changes, how long it took to make the changes, the number of changes on any given day, or possibly daily trends. Does more get fixed on a monday? Do more fixes made on friday end up getting reverted and fixed again later (for obvious reasons <g>). How many changes are made on wednesdays after that big fajita lunch?

I have this mental picture of my project visually changing over time, allowing you to see things that you couldn’t see just by looking at tables and metrics. Imagine being able to look at a time-lapse video of the creation of the Grand Canyon, from, oh say 30million years back to the present, in a video of a few minutes. Or a bit like this guy’s video (taking pictures of himself everyday for 6 years or so).

But in my head the picture is a little prettier, may something like this: 

And many, probably too many, projects would be more like this:

 

Deploying VSTO

2
Filed under Uncategorized

Just follow these easy steps:

http://msdn2.microsoft.com/en-us/library/2ac08ee2(vs.80).aspx

Whatever happened to all that buzz about how great xcopy deployment was with .NET.? I seem to hear it out there…..somewhere….sinking slowly into that morass of the Windows API, calling out for help, meekly, gurgling, and then….

Fun With Word, or When is a Field not a Field

2
Filed under Uncategorized

I was investigating some strange behavior with respect to fields in Word and when, exactly, do they get “automagically” updated.

In this particular case, I had a document with a table of contents. The TOC looked completely correct, until the doc was “saved” as a PDF file using the Word 2007 PDF/XPS format plugin. In reality, it doesn’t matter whether the doc is saved as a PDF or printed, Word functions in the same way.

During the save to PDF, the TOC entries were all converted to “Error! Bookmark not defined”. In this case, that was correct. The bookmarks used to create the TOC entries had been removed, but, with the “Update fields” options set to false, I was expecting the fields in the TOC to NOT get updated.

image

As far as I can tell, they really shouldn’t  get updated, but they do anyway. This appears to apply to Word 2000 as well as 2007 (didn’t check all the interim versions).

So, TOC Entry fields appear to not behave by the same rules as other fields. For instance, I embedded an AUTHOR field, save the doc, then changed the Author Document property to something else, then saved as PDF. Lo and behold, the Author Field DID NOT change from it’s original value, meaning that that field type was not “auto updated” before the print/save as PDF.

Then I tried just a plain bookmark. Insert a named bookmark somewhere in the doc, then somewhere else, insert a PAGEREF field (type 37 for those Word VBA masochists) pointing to that bookmark.

The field should take on the value of the page the bookmark is defined on.

Now, delete the bookmark (not the pageref) and print.

Aha! Another “Error! Bookmark not defined”.

It’s not TOC Entries, per se, that have the problem. It’s bookmarks. It appears that even if you tell Word to NOT UPDATE fields at print, any field that references a bookmark, does get updated. And it’s not just that Word checks that the bookmark is defined or not. Word definitely updates the field referring to the bookmark. You can see this if you do the following:

  1. Create 3 HEADING1 lines
  2. Create a TOC, you should see 3 entries in the TOC, one for each heading 1 line, all pointing to page 1.
  3. Put page breaks between each heading 1 line, to force them to separate pages.
  4. Save the doc. The TOC page numbers don’t change.
  5. Now save as PDF. The TOC page number DO change at this point.

Looks like a Word bug, albeit a long standing one.

And the workaround?

You have to decide between:

  • Leaving the field that refer to the bookmark in the document, but deleting the bookmarks themselves, which will result in an Error.
  • Deleting the bookmark AND the field that references it (which would wipe out your TOC)
  • Converting all fields that reference bookmarks to text and then deleting the bookmarks (probably the best of the choices) 

There’s no easy answer to this one, unfortunately. That last option involves quite a bit of scanning through fields and bookmarks. Interestingly, Bookmarks must have a unique name, so they are pretty easy to get back to and track.

Fields, on the other hand, have no unique ID in Words object model. 

They have a “code”, but that can be the same across multiple fields.

They have an “index”, but that can change as you delete fields.

From my vantage, the lack of unique ID’s for many of the elements in the Word Object model is a significant, if not partially understandable, problem.

Strings in a File

0
Filed under Uncategorized

Working in metadata removal from Office documents, one thing I do almost constantly is dig through files with a hex editor looking for any text that’s readable.

I’d been contemplated writing a string filter utility for some time when I happened to see an offhand mention of something like that from SysInternals.

Now, if you’ve ever played with anything from the guys at Sysinternals (now a part of Microsoft), you know their stuff is gold, so I had to check it out.

The utility is called Strings. It does exactly that, pulls strings (both ANSI and UNICODE) from any file you throw at it and spits em out STDOUT. Pipe it to a file and it’s MONEY, BABY!

Even better, put STRINGS.EXE and this little BAT file somewhere on your path, then setup a shortcut to the BAT file in your SEND TO folder, and you can Right click-Send To on any file and immediately have all the strings loaded up into whatever Text Editor is currently associated with TXT files. And that, as an old boss of mine would say, is “bells, whistles, hell, it’s the whole damn midway!” 

ECHO OFF
REM Run the strings.exe program to extract all strings from a given file
REM Then load the file into an editor
REM 
REM Create a Shortcut to this BAT file in your SENDTO folder to make it even
REM better! Then, you can right click, select SEND TO and immediately get a full
REM list of strings embedded within the file loaded into your editor.


REM Extract the strings to a temp file
strings -q %1 >"%temp%\%~n1-Raw.txt"


REM Sort strings to make it a bit easier to find things
REM This may or may not be something you want to do consistently
REM Either do the sort or the copy
REM sort "%temp%\%~n1-raw.txt" /o "%temp%\%~n1.txt"
copy "%temp%\%~n1-Raw.txt" "%temp%\%~n1.txt"
del "%temp%\%~n1-Raw.txt"


REM -----------
REM Use this to load the file into whatever editor is associated with a TXT file
REM -----------
start "Strings" /I /B "%temp%\%~n1.txt"

REM OR

REM -----------
REM Use this to load the file into a specific named editor
REM -----------
REM o:\dev\protools\textpad\textpad "%temp%\%~n1.txt"

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.

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?