Sunday, April 06, 2008

Do you have two phone lines, but you want your modem to use line 2 when it only sees line 1? Or maybe you have a single line phone that you want to use on line 2.

You could go down to Radio Shack and pick up a 2 line phone. Or you could pick up a 2 line phone switch (that lets you switch between line 1 and 2), or even this 2-Line, 3-Way Adapter Jack.

But, that costs money, and if you've got a few minutes and a spare phone extension cord, you can probably rewire one in less time than it'd take to run to the store.

First, some background...

Like many people, I have two phone lines into my house, one specifically for my home office, the other, the family phone number.

If you've never looked before, a single phone line actually consists of a pair of wires, typically colored RED and GREEN.

If you have two phone lines in your house, (and usually even if you only have one active phone line, you'll have wiring for two lines), the second line will consist of two wires colored BLACK and YELLOW.

From the front, the plug will usually look like this (note the 4 wire prongs inside the connector socket, the picture's not great...)

image

But from the back, they'll usually look like this (note: this is a 2 connector plug, so you can actually plug two phones in simultaneously). Here, you can easily see the RED/GREEN, BLACK/YELLOW pairings.

image

A normal phone will have contacts only for the RED/GREEN wire pair, which means you can only use it with line 1.

BUT, if you simply swap the RED/GREEN and the BLACK/YELLOW pairs, that single line phone can then be used on line 2.

This is trivially easy to do if you have a 2 plug wallplate like the above. In fact, on the wallplate above, the bottom plug has its wires cross-connected to the terminals on the top plug. For instance, note that the GREEN wire from the bottom plug is connected to the terminal with the YELLOW wire on the top plug. The same goes with the RED->BLACK connection, etc.

Then, when you're ready to wire this back onto the wall, simply connect the RED/GREEN/BLACK/YELLOW wires from the wall to their original terminals on the top plug. You can now plug a single line phone in the TOP plug to connect to line1 or into the bottom plug to connect to line2.

But what if you don't have this sort of wallplate lying around?

I happened to also have an 2 plug extension cord, the end of which looks like this:

image 

It has all 4 wires on both plugs, so again, the trick is to swap out the wire pairs on one plug, so that one plug is Line2/Line1 and the other is the normal Line1/Line2.

Mine had little tabs that you press in gently to release the two halves of the shell (be careful not to break them off):

image

Open it up, and pull the wire blocks back from the front half of the shell to look something like this:

image

One at a time, gently bend the loose wire prongs forward enough so they can be pushed back through the plastic block, push them through, and swap them with the appropriate other colored wire.

  • BLACK<-->RED
  • YELLOW<-->GREEN

These are thin wires so they bend easily,but they can break off easily too!

Do only one pair at a time to keep from mixing them up.

Also, you only need to swap pairs on ONE of the blocks, just leave the other as is so you can still access line 1 as line 1.

Once you have the wires in their new positions, gently bend the wire prongs back over like they were originally, put the blocks back in the front half of the shell, seat them solidly and then snap the shell halves back together.

Now label the plugs as to which is which:

image

To test, plug a single line phone into the unmodified plug and dial your line 1 number. If it's busy, you'll know it's line 1. If you've got phone company voicemail, well, I'll leave it as an exercise to the reader to determine which line you're listening to\:\-\) .

Then, do the same for the other plug and you should be calling out on line 2.

Personally, I like modifying the extension cord better, because it's easier to remove and take it with you or move it about the house if necessary.

Now, why bother with any of this anyway?

Well, I happen to need to constantly connect to web session conference calls (usually via GOTO Meeting), and dialing the phone number, plus the conference access code, was beginning to be a grind.

So, I wrote a little VB.NET utility that monitors the clipboard for specific regular expressions (i.e. a phone number, GOTO Meeting ID or URL, etc) and can then dial the number through the modem and launch the URL all at one pop.

But I needed it to dial out on Line 2 (my office line) and, of course, the modem only sees Line 1.

I'll be blogging about the utility itself soon, so stay tuned!

posted on Sunday, April 06, 2008 9:59:37 AM (Central Standard Time, UTC-06:00)   •  # •  Comments [0] • 
Kick it •  Add to del.icio.us •  View blog reactions; 
 Tuesday, April 01, 2008

I'm a closet modern art fan, though more often than not, I find myself saying "uuuhhuhhh?" to much of what is deemed "Modern Art."

Occasionally, though I come across something that's (at least to me) pretty interesting and actually worthy of the title.

Here's one of those things, built by a sculptor in Burnley, UK.

Almost completely unrelated but something none-the-less interesting, is the work of Theo Jansen. Here's his Animaris Rhinocerous.

Makes you want to grab a torch and some pipe, eh?

posted on Tuesday, April 01, 2008 9:50:52 PM (Central Standard Time, UTC-06:00)   •  # •  Comments [0] • 
Kick it •  Add to del.icio.us •  View blog reactions; 

image I have an InstallShield 11.5 based installation, and, at some point, it went south, but in a very subtle way that I did not immediately notice.

For those with a short attention span, I'll summarize the issue like so:

DO NOT use the "System Search" ability in InstallShield (or the REGLOCATOR table in MSI, for that matter) to retrieve a registry value of the "REG_MULTI_SZ" format.

Doing so appears to cause Windows Installer to internally skip large portions of  Maintenance mode operations, such as Repair, or Remove.

Essentially, the problem was this…

If you open the ARP (Add Remove Programs list) and select a "normal" install, you should see two buttons, Change and Remove.

Clicking Remove will work perfectly fine, regardless of anything I mention here.

Clicking Change, on the other hand, brings up the "Maintenance Mode" screen of an InstallShield installation.

From there, you have 3 radio button choices:

  • Modify
  • Repair
  • Remove

So far so good.

However, in my installation, none of those options actually DID anything anymore. The progress bar would update and go to 100%. You see things apparently happening, but when it all finished, nothing actually had happened.

Now, they ALL worked at one point, but exactly when things broke, there was no real way to tell. This install is >100MB, so I don't make it a habit of checking in all the various interim builds of the install.

All I did know was that the last released version (which I did have laying around\:\-\) ) worked just fine, but the latest version did not.

What's worse, the last released version was dated some 8 months back, and there had been literally hundreds of changes to the install in the interim, including removed and added files, new scripting, new components, etc.

After working with Macrovision for almost a month and a half, I'd still made absolutely no headway on the problem.

The prospect of reverting back to an 8 month old version and redoing every individual change, along with testing the install to make sure that the maintenance mode would work after each change, was, to the say the least, utterly horrifying.

Macrovision had no thoughts as to even how to debug the issue, much less what might be causing it.

Very early on, I'd already hit on the obvious things.

  1. Generating a full verbose log of both the old, successful install and subsequent uninstall and comparing that to the same log from the new version yielded no clues.
  2. Saving the ISM files (the InstallShield source of an installation project) as XML files and the comparing the old and new also yielded nothing that stood out as a problem.

Long story short, after several days of applying the various changes to the early, working version, I got extremely lucky and stumbled on the cause of the problem.

I'd added several "System Search" items to detect already installed prerequisites and the retrieve specific system information I needed during the installation.

One of these was to retrieve the "InstalledInstances" value from the registry key

HKLM\Software\Microsoft\Microsoft SQL Server

image

This functionality isn't really InstallShield based, it's a part of MSI from what I can tell. The definition of the system search element is actually stored in the REGLOCATOR table in the MSI file:

image

So, at least for now, I can't blame this one on InstallShield.

As it happens, that registry key is a REG_MULTI-SZ value, meaning it can have a single string value, or multiple values, separated by null chars.

And it just so happens that on my test machine, I had two different instances of SQL Server installed, so there just happened to actually be a REG_MULTI_SZ value in that key.

And THAT was the cause of all this headache.

What's truly ironic about all this is that the installation wasn't actually using the property that resulted from this System Search anymore. At one time, it checked the listed installed instances of SQL Server for their applicability to our install, but I'm not actually doing that anymore.

Moral of the story? Don't use the SystemSearch capabilities of an MSI install to retrieve a REG_MULTI-SZ registry value. It'll work, but then the maintenance mode of your install could very likely fail inexplicably, not to mention what other consequences I haven't stumbled upon.

Lastly, I did some googling once I'd narrowed things down and found, well, nothing, on the web or MacroVision's site about it. Maybe what I'm seeing is something specific to my particular machine, maybe not. Given InstallShield's resistance to being installed twice on different machines with the same license, I'm not willing to jump through those hoops just to test that suspicion.

But maybe this will help someone else caught in those same throes.

posted on Tuesday, April 01, 2008 9:50:03 PM (Central Standard Time, UTC-06:00)   •  # •  Comments [0] • 
Kick it •  Add to del.icio.us •  View blog reactions; 
 Wednesday, March 26, 2008

Ok. Yet one more reason to dislike Vista.

Granted, I don't regularly use HyperTerminal, but when you need to hack at some AT commands, well, it sure was handy to have around.

And it's been there ever since, what, Windows -1?

But alas, no more.

So, off on the hunt I go. Now, I've known about puTTY for quite some time, but I always thought it was a telnet/TTY client. But much to my surprise, it just relatively recently got an upgrade with direct serial access under Windows.

image

I gotta say, for dinking around with your typical modem setup, this new puTTY honestly seems to work far smoother than HyperTerminal ever did.

C'est la vie, HyperTerminal. May you rest in peace.

posted on Wednesday, March 26, 2008 7:25:39 AM (Central Standard Time, UTC-06:00)   •  # •  Comments [0] • 
Kick it •  Add to del.icio.us •  View blog reactions; 
 Thursday, March 13, 2008

If you use FireFox (and if not, what's up with that), you need to check out Chuck Baker's FireFox Environment Backup Utility (FEBE).

Slick little tool for saving all your FireFox goodness for that day when, suddenly, you realize you'll be paving your machine and having to dig through your subconscious to come up with all those bookmarks, RSS feeds and FireFox extensions that you use everyday but couldn't name to save your ass.

posted on Thursday, March 13, 2008 8:36:33 PM (Central Standard Time, UTC-06:00)   •  # •  Comments [0] • 
Kick it •  Add to del.icio.us •  View blog reactions; 

Some time ago, (or here in the wonderfully virtual web world), I questioned the whole aspect of all this pile of controls in ASP.NET. Of course, you've got the grids and listviews, and you also have all the radio buttons, checkboxes. But then you've got a separate validator for each kind of validation you want to use, and even validators to let you combine other validators in "AND" and "OR" logical relations.

My thoughts were "Jeez. this is madness."

Wouldn't a single control that you could adapt to different display behaviors, validation rules etc be much easier to work with and create a more maintainable solution?

Well, apparently someone at Microsoft had the same bright idea, at least with the new ListView control in ASP.NET 3.5.

Take a read of Fritz Onion's article in the latest MSDN magazine.

He describes the new ListView as a control that can "literally replace all other databinding controls in ASP.NET. That's right. Every last one."

Now, if they'd do the same for that validation nonsense, we might be getting somewhere!

posted on Thursday, March 13, 2008 8:25:11 PM (Central Standard Time, UTC-06:00)   •  # •  Comments [0] • 
Kick it •  Add to del.icio.us •  View blog reactions; 
 Friday, February 29, 2008

It looks like I'm not the only person experiencing absolutely terrible performance in VS 2008 when performing what is ostensibly known as a "Quick Find"

image

This is the dialog you normally get when you do a Quick Find (Ctrl-F).

Note that I typically have it set for Entire Solution, Hidden Text and Use Wildcards.

With things set up this way, on a Core 2 Dual Core machine, I typically see a 2-4 second delay when I click the Find Next button. Pressing F3 to continue the find yields similar times.

And this is when the next occurrence is on the same line of code as the current occurrence!

Not much of a "Quick Find" in my book.

I tried all the various options, and nothing has any effect EXCEPT for the "Look In" option. If I change it from Entire Solution, to, well, anything else, the finds are then instantaneous.

If anyone knows of the cause or solution, I'd love to hear about it. So far, I've turned up bupcus on this one.

Till then, the Find In Files (Ctrl-Shift-F) option seems to be the best alternative.

posted on Friday, February 29, 2008 9:40:07 PM (Central Standard Time, UTC-06:00)   •  # •  Comments [0] • 
Kick it •  Add to del.icio.us •  View blog reactions; 
 Wednesday, February 20, 2008

Microsoft has just recently (as of Feb 15) released the full specs on the various Office file formats (including Word DOC files, Excel XLS files and Powerpoint PPT files, in particular).

The specs are available here.

If you're a file format geek, or your job actually revolves around manipulating these types of files, this is surely a welcome addition to your arsenal.

Some of this information has been available, more or less, for quite some time. Most everyone who's interested knows, for instance, that these files are actually OLE structured storage files, essentially entire "mini file systems" unto themselves.

But much of the detail has been sketchy at best, till now.

One word of warning though. Don't expect these to be simple, cookbook recipes on rolling your own version of Word or Excel. The specs are huge and the formats unbelievably complex, having evolved over the course of 10 or more years. Further, these are not Web 2.0, nice, friendly XML/HTML/Text/human readable files by any stretch. They're tangled, binary, pointer-ridden globs of structures that take a good deal of code just to render somewhat intelligible.

That said, official documentation is far better than none, and surely beats reverse-engineering the formats, as has been done up to this point.

I know I'll be digging into this more in the coming weeks.

Happy hacking!

posted on Wednesday, February 20, 2008 9:34:07 PM (Central Standard Time, UTC-06:00)   •  # •  Comments [0] • 
Kick it •  Add to del.icio.us •  View blog reactions; 
 Tuesday, February 05, 2008

I won't go over the details of doing this here. There is a excellent run through online at O'Reilly. Check here. Specifically, it's chapter 4 of J.P. Hamilton's book "Visual Basic Shell Programming".

I suppose it's so dated now that they're making it available online free. Not sure whether that's a good thing, or a bad indicator of the age of tools I'm using\:\-\) .

At any rate, this is an excellent reference if you happen to be doing this.

Specifically, the part about modifying the VTable on the fly to handle some of the IContextMenu methods is very good.

But the part that really had me smacking my head was the "Restore the VTable during object termination" section.

Duh! No wonder I was having some weird, after my context menu handler had popped up and done it's thing, Explorer would crash kind of moments.

This is one of those times when telecommuting can be a drag. Having a co-worker glance over my shoulder probably could have caught that kind of mistake much earlier than when I caught it.

Moral of the story: If you're gonna manually jack up COM VTable pointers, always put 'em back they way you found 'em.

posted on Tuesday, February 05, 2008 6:07:46 PM (Central Standard Time, UTC-06:00)   •  # •  Comments [0] • 
Kick it •  Add to del.icio.us •  View blog reactions; 
 Sunday, February 03, 2008

image At one point, a few months back, it struck me that it might be nice to watch DVDs via my Tivo.

Why on earth do that, you might ask?

  • You won't have to jockey with discs (my 4 year old loves watching things a second time, or in the case of Mr Roger's Neighborhood, Sesame Street and any movie with a princess in it, a third, forth, or x^nth time).
  • The Tivo has a pause even my 4 year old can use (which is very important when there's the need for a potty break mid-Cinderella!)
  • Pause, rewind, etc just seem to work so much smoother on the Tivo. Plus, if you do have to pause your movie, the Tivo will preserve where you are, even if you bail out completely. My DVD player can't do that.

What you need

  1. A DVD (that you want to convert to a Tivo-friendly movie)
  2. A DVD drive in a PC (preferably, a reasonably fast PC)
  3. A networked Tivo (not much point if it's not networked)
  4. DVDFab HD Decryptor Freeware version - used to extract the main movie from a DVD
  5. VOB2MPG - used to convert the extracted VOB fileset into a single MP4 file
  6. Tivo Desktop installed on your PC - This is how you get the final MP4 movie transferred to the Tivo

A Word of Caution

A few of my DVD's just couldn't be converted this way. I'm guessing they're of the sort that have the "mangled disc" copy protection, but I can't swear to it. Maybe there's a utility out there that could work around this, but, hell, if I want to watch those discs, I just use the disc itself and be done with it.

At any rate, your mileage may vary.

Extract the Main Movie VOB (Video Object)

Install DVDFab, and start it.

Insert your DVD and let it load in into DVDFab.

image

Select the Main Movie option, enter a Target Path (a scratch folder on a harddrive with at least 5-7gig free), and make sure the main movie chapter is highlighted (it'll usually be the one with the longest Play Time).

Then click Start.

On my machine, it takes about 7 minutes to extract a typical DVD movie.

Convert the Main Movie VOB to an MPG file

Now install and run VOB2MPG

You should see this:

image

Click the folder button beside the "Folder Containing VOB sets" box, and select the Video_TS folder created by DVDFab during the conversion above.

The click the folder button beside the "Folder to write MPGs to" and just select some other scratch folder somewhere. This is where it'll save the converted MPG file.

Make sure the target drive has plenty of free diskspace (another 5-7 gig should be fine).

And click Start.

This also takes about 5 minutes or so on my machine.

When it finishes, you'll have a nice and tidy MPG movie file that you can transfer to your Tivo. At this point, you can get rid of the VOB files and folder created by DVDFab above; they are no longer necessary.

To figure out where to put the MPG file, just open the Tivo Desktop and click View - Published Video.

image

You should see the above screen. Click the highlighted "Where is this Folder" link to open an Explorer window right to the proper place.

Copy your MPG file here (be sure to name it something nice and readable).

Then go to your Tivo and follow the instructions on the above screen.

Downloading the MPG file from your PC to your Tivo may take a while, depending on how you've got your Tivo networked, but eventually it should get there and be ready for your viewing pleasure!

And a final note

Before people start whacking me, yes, I'm sure there are plenty of low cost apps out there that'll do this entire process more-or-less automatically (heck, some might even handle the few discs I ran into that didn't work because of bad sectors).

For that matter the paid version of DVDFab looks like it'd do it.

If you know of a good app for this, by all means let me know!

It's just that I only have a 320GB Tivo\:\-\) and even if I could, I'm just not interested in filling it with ALL my DVD's. Just the ones that might get watched repeatedly.

I guess I'm just pragmatic that way.

Now, where'd I put those 120$ industrial arcade trackballs?

posted on Sunday, February 03, 2008 8:57:22 PM (Central Standard Time, UTC-06:00)   •  # •  Comments [0] • 
Kick it •  Add to del.icio.us •  View blog reactions;