Tuesday, December 05, 2006

A use for Internet Explorer (XML viewer)

Normally I have little use for Internet Explorer, except at annoying sites that only work with IE. I switched to Firefox years ago and have never regretted it. Hello tabs!

However a smart guy at work showed me a handy thing that IE is actually useful for. IE does a pretty good job of rendering raw XML. It shows it in a nicely formatted, color coded way where you can open and close the branches to narrow focus to a specific area.

This is useful for me because I deal with SOAP a lot at work on the server side. Clients visiting the internal web service tend to be shaky and get themselves into a bad state, and do strange things that cause problems. We necessarily log all of the SOAP/XML that we send and receive. When a problem occurs it is very useful to see the exact SOAP content that was sent or received on the wire.

Now viewing SOAP content can be a pain. On our side we use Tomcat and Xerces. While this is robust and reliable, it also generates the XML all on one line. This is fine for a computer to process but hard for a human to read. Previously I had to copy and paste from the log file into a text editor and insert line breaks manually to see the actual valid XML/SOAP we sent that the client was having problems with.

Using IE, there's a much faster, easier and better way.

Create a document on your desktop called t.xml.
Make sure your settings have IE as the default application for .xml files.
Right click on t.xml and open using a text editor.
Replace the existing t.xml content with the XML copied from the log file.
Save t.xml and close.

Then just double click t.xml on your desktop and it comes up nicely formatted in IE with all the attributes and namespaces and everything right there. This is very handy and a real time saver.

Wednesday, November 08, 2006

HP

So HP has had some negative publicity lately. What an idiot that board member was to make those leaks and cause all that trouble. That was good of Patricia to take one for the team.

I still think well of Hewlett Packard. I've always thought well of HP. Back when I was in high school, they were considered a very prestigious company. They made the engineers calculators and the ultrasound machines and the testing equipment. I once read this article that HP had resorts around the world for their employees and that it was great to work there. Back then I hoped I could work at HP some day.

The PC I'm writing this from is an HP pavilion. If I ever get a digital camera I'll be looking for an HP one. Back at PRIOR Data Sciences, they had HP laser printers. I got talking to a sysadmin one time about laser printers and problems I'd seen with printers at other sites. What he said was this: the thing about printers is, go with HP. Don't fool around with anything else, you'll regret it.

Alas, times changed. They got out of calculators. They spun off the medical and test equipment into Agilent so that HP, a decades old company, could try to present itself to the late 90s stock market as some kind of dot com startup. D'oh, so much for that plan. Then Carly Fiorina dismantled the "HP Way." Nice one Carly.

A friend of mine who's an engineer had an interview with Agilent a couple of years ago. I was excited when he told me. We both recalled the old HP reputation, and agreed that Agilent was the good HP, the original HP. I recall he ended up landing another job before things progressed very far, so it goes.

Sunday, October 29, 2006

Reference update

Here's another update on my former colleague who has been looking for work in high tech. I heard from him this week. He gave me a heads up that I might be hearing from a company he has interviewed with. That was considerate and smart of him to tell me in advance who I might be hearing from.

The company is a large, well known IT firm. I haven't heard from them yet. I kind of thought I would have heard from them by now. Maybe he's dropped out of the running.

Fortunately for him, it turns out that he does currently have a job. He caught on with the startup company he'd interviewed with. He said he's still looking because the pay isn't quite what he wants and the work is a bit light on the skills he's most interested in. I'd say go for it if something better appears. There is little loyalty in high tech, it's every man and every company for himself in this industry.

But its good for him. Having a job gives him credibility with other companies that he's desirable and employable. Plus if you don't land something better then he still has something which is good enough and many times better than being out of work on the outside and worrying about how long his severance and unemployment will hold out.

Sunday, October 22, 2006

Sneaky Network Magic

I was getting some weird printing errors on the Dell laptop last week. Visual C++ runtime error, followed by program termination. That's weird, it was all working OK and nothing had been changed.

I went to the printers console in the laptop, and it said stuff like spooler service not running on the main HP PC where the printer was shared from. Hmmm. I opened the printer in the HP. Indeed the share had been turned off. That's strange, I didn't turn it off.

So I clicked the Network Magic console. It showed a message indicating that the free trial had expired and I had to upgrade to enable printer sharing. Their GUI implied that there was no way around this to turn printer sharing back on. Luckily I knew better and just turned on the share manually. After that I went back to the Dell and did the printer discovery wizard again and it all worked.

That was pretty dirty and deceptive of Network Magic. First they "helpfully" set up a shared printer, then they go and turn it off without my consent. Then their GUI is extremely deceptive, acting like they were holding my shared printer hostage until I gave them some ransom money to release the shared printer lock they had put on.

I'm glad I don't work for them. This to me is very unethical, basically Network Magic is acting like a trojan. That must have sucked for the programmer who had to write that feature to turn off printer sharing and then try to dupe unsophisticated users into thinking they had to pay off the Network Magic shakedown to get their printer share back up.

Make no mistake: the printer share is not created or owned by Network Magic. It is part of Windows itself. It is owned by the PC user. The user is free to manually turn on printer sharing with no assistance at all required from Network Magic. That's true for all of the other Network Magic features too, file sharing, wireless security and access lists, all of it is part of Windows and the user can easily set up all that stuff himself using the GUI in Windows.

If you want to pay for their nice, intuitive GUI for the above features, then fine, that's your choice. But their guerilla bait and switch marketing is very bad.

Tuesday, October 10, 2006

Documentation

We're nearing the end of the testing cycle for a product release. There aren't any high priority bugs around so I was told to just grab some lower priority issues. Given a choice I decided to tackle some documentation that had become a little bit out of date.

I find I've enjoyed doing the documentation. There's a certain Zen to documentation that makes it satisfying. Maybe it's because, like code, it can be verified to be correct. Plus I'd been involved in this documentation in earlier releases so it was something that I'd been involved with in the past that I wanted to see maintained at a high level of quality.

Documentation, especially API documentation, unlike code, can generate feedback from external users. Nobody ever sees the code you write, especially outside the programming group. But with documentation you are presenting yourself and your department for external valuation. Do a good job and you'll look good and be praised. Do a shoddy job and probably nobody will say anything directly, but the bad vibe will come back around in some way.

Around 10 years ago my younger sister was finishing up high school and considering her options heading into university. I encouraged her then to get into technical writing. She can write, and could learn the technical jargon easily enough. There were about a million tech jobs open at that time. It's much easier to teach natural writers the technical stuff than to try to teach people how to write well. You either can or you can't write.

She ended up going to law school and has had a good career. If I wasn't programming, then maybe I would have got into technical writing. I probably would have enjoyed it enough as a vocation.

Thursday, September 28, 2006

How to share HP deskjet 3650 printer with a Dell laptop

We now have a Dell laptop computer in addition to the HP Pavilion we already had. My wife will be using the laptop. She wanted to be able to print from the laptop to the hp deskjet 3650 using the wireless router.

The laptop is connected to the Internet through a D-Link wireless router which works great. The D-Link included Network Magic which set up the home network. It also set up the printer as a shared device.

So it would seem straightforward to add the HP printer to the Dell and get printing remotely. Well it almost worked. The wizard came up and was able to find the shared printer off the HP PC. However after the dialog about downloading drivers off the HP, there was an error message that it didn't have the right driver version.

Uh Oh. I brought up the printer properties. It had an additional drivers section. That looked promising. But when I clicked to add new drivers it prompted me for a drive letter. There's no CD as all the software on the HP was pre-installed.

I thought to get the drivers from HP. So from hp.com I was able to easily click through a couple of screens to find the download for deskjet 3650 drivers. First I thought to put it on the HP. Then I decided to leave the HP unchanged as it has always worked fine so I didn't want to risk changing it. So I downloaded the drivers to the Dell instead.

When I installed them on the Dell the dialogs came up and then one said to plug in the printer. I just clicked Cancel, hoping it would work. But clicking Cancel aborts the driver install. So I ran the wizard again. This time when it said to plug the printer into the USB port I moved the laptop next to the PC. Then I unplugged the printer from the PC USB port and into the Dell USB port. Then happily the driver install completed and I was able to print a test page from the Dell onto the HP printer.

The last step was to plug the printer back into the PC USB port. Then I went back to the add printer wizard on the Dell. It found the shared printer as usual. This time it was able to add it successfully as it now had all the drivers from my earlier trickery. Then I set the shared printer as the default and deleted the physical printer definition that the driver installed. And that was that.