Saturday, December 19, 2009

Possible fix: Dell Inspiron 1525 won’t power on

Update 12/20/2009: My stepmom is continuing to have the same problem with her laptop, so apparently the possible solution outlined below is not a "real" solution. (She ended up calling Dell tech support and they're going to replace her machine's motherboard.) Still, leaving this post here on the off chance that it might prove helpful to someone.

My Dad and Stepmom came to visit my house for the weekend this weekend.  My stepmom tried to power on her laptop, a Dell Inspiron 1525, to finish up some work; however, the machine wouldn’t power on.  All of the power LED lights on the bottom-left corner of the machine were completely dark; pressing the laptop’s power button had no visible effect at all.

We tried, without success:

  • Reseating the battery (removing and replacing it)
  • Plugging in the AC power
  • Removing the battery, but leaving the AC power plugged in

None of these steps helped; after trying each step, pressing the laptop’s power button had no visible effect, and all of the LED lights on the machine stayed dark.

At this point, I was just about ready to give up and punt the problem to Dell repair (as the machine was still under warranty), but I tried one more thing: I (1) disconnected the AC power (for safety); (2) removed the battery; (3) cleaned/polished the metal contacts both on the battery, and on the laptop itself where the battery connects to the laptop; (4) and then replaced the battery.

After doing this, upon pressing the power button once again, the machine powered on!  The LED lights at the bottom-left came on as normal, and the machine proceeded to boot into Windows.

The machine did power off without warning once during the evening while my stepmom was using it, so the problem apparently isn’t completely resolved.  I did just use my sweater to clean the power contacts on the battery and the laptop; if the connection between the battery and the laptop wasn’t actually the problem -- and I’m not convinced that it was the problem, but the symptoms do seem to be consistent with an issue related to the power supply – then maybe using a better method of cleaning the contacts would yield better results.

In the meantime, though, I thought I would post this, as I didn’t come across this solution in the course of my Googling for inspiron won’t power on – although I did come across many forum posts from users looking for a solution to a problem with this same set of symptoms.

If anyone does give this solution a try, and is successful, please leave a comment to let me and others know!

Thursday, December 17, 2009

Fix: Excel VBA “User-defined type not defined”: DataObject


An Excel VBA subroutine that involves interaction with the Windows Clipboard fails to run with the error: “Compile error: User-defined type not defined.”  The line of code highlighted by Excel as being the cause of the error includes a reference to the “DataObject” object type.


(Tested on my machine with Excel 2003 SP3)

In the Microsoft Visual Basic editor:

  • Stop debugging by clicking the “Stop” button on the toolbar (if debugging isn’t already stopped).
  • Tools menu | References
  • In the list of available references, find “Microsoft Forms 2.0 Object Library”, check it, and click OK.  (For me, this was the 2nd unchecked item from the top of the list; it wasn’t sorted alphabetically in the list like most of the rest of the listed items.)
  • Run the macro again.

That’s it!  Hope this helps!

Wednesday, December 09, 2009

Going cheap on services… and liking it!

My family and I moved into a new home south of Grand Rapids in western Michigan over the summer.  Since living here, we’ve made a conscious effort to limit the monthly cost of our “big four” services: Cell phones, “land line” phone line, broadband Internet, and TV.  This is how we’re doing currently:

Service Monthly Cost
Cell phones (2) $16.67
Phone (land line) $0.00
Broadband Internet $19.95
HDTV $0.00
Monthly Total (all services) $36.62
Annual Total (all services) $439.40

So: A land line phone, 2 cell phones, Internet service, and HDTV for less than $40/month; not bad!  Read on for the details.

Cell Phones

My wife Melissa and I both carry cell phones.  Typical month-to-month voice plans run $70 and up for a 2-line “family plan,” but for over a year now, we’ve avoid that cost by using pre-paid plans.  At the time that we dropped our prior month-to-month plan, Melissa did some research on where we could get the most bang for our buck with a pre-paid plan.

We landed on a plan from Alltel offering $0.15/minute calls with no other fees, and prepaid minutes good for a full 365 days when the minutes are purchased in increments of at least $100 (per phone).  So, once per year, we drop $100 on minutes for each of our phones (so $200 total), and we’re good for another year!  It works out to a monthly cost of $100/12 = $8.33/month per phone, or a combined $16.67/month for both.

With Alltel recently having been acquired by Verizon, though, the $0.15/minute prepaid plan is unfortunately apparently no longer available for new customers.  The cheapest flat-rate prepaid plan Verizon is advertising on their site currently is a $0.25/minute plan; there’s probably another wireless provider out there with a better deal.  Fortunately for Melissa and I, though, Verizon has so far continued to honor Alltel’s $0.15/min rate for us, at least for the time being!

The only real downside to this approach has been that our $100/year per phone, with calls running $0.15/minute, buys us just 100/0.15 = 667 minutes of talking per phone – that’s only 56 minutes per month.  Limiting our cell phone use to “emergency” or other quick-duration calls, we haven’t had a problem staying under this modest limit yet, though.  (And even if we do have to buy extra minutes before an entire year has elapsed, we’re still coming out way ahead compared to a month-to-month plan.  Verizon, for one, apparently realizes this, because on their “Plans” page, virtually the entire page is dedicated to marketing their month-to-month plans, with “Prepaid Plans” showing up as just one small link in the corner.  Nice!)

Home Phone (land line)

Since we don’t use our cell phones for any “real” conversations, Melissa needs another way to call her Mom and her friends and chat!  Even though the new normal for many households is to have no land line at all and use cell phones exclusively, we’ve found that it’s working very well for us to use a VoIP solution that comes with no monthly fee at all: A device called Ooma

The first I’d heard of Ooma was when my Dad told me about it just a few months ago, shortly after my family’s move into the new house.  It’s similar to MagicJack in that it’s a “voice over IP” service that you can use “traditional” home phones with and has no ongoing monthly fee; but Ooma differs from MagicJack in that Ooma doesn’t require that the device be connected to a PC (and requires that it’s own software be running on that PC at all times for the phone to work).  Ooma instead plugs directly into a cable modem/DSL modem or router.

Ooma has a somewhat steep up-front cost; currently, it’s going for $215 on However, with a $0 ongoing monthly cost for the life of the device, the break-even point comes up very quickly relative to a $35+/month traditional phone bill (about 6 months, or less) – it’s pure profit after that!

Ooma has been working really great for Melissa and I so far.  Even over our somewhat piddly 768k/384k DSL connection (more on that below), call quality on both ends is crystal clear – I’d characterize it as being as good as a traditional land line, and better than a typical cell phone – and it has yet to drop a call. 

With the Ooma device plugged directly into the DSL modem, phone calls work fine even when someone is using the Internet on the PC, since Ooma does it’s own QoS (quality-of-service) management on any devices plugged in to the network downstream of it.  I have my Ooma hub plugged directly into my DSL modem, and my router plugged into the Ooma hub (so Ooma sits between the modem and the router), and I’ve found this setup to work just fine, both for phone calls and for my PC and other Internet-connected devices.

Broadband Internet

As I mentioned earlier, I have AT&T 768k down / 384k up DSL Internet connection, for which I’m paying $19.95/month – even though I don’t have phone service through AT&T!  In many regions now, apparently, AT&T (and other DSL providers) offer what is called “dry loop” service, where you can get DSL even if you don’t have land line phone service through the same company (or any land line phone number at all). 

Somewhat like Verizon and their “Prepaid Plans,” AT&T hides their $20/month plan in the fine print at the bottom of a page on which they much more prominently offer other plans at $35/month and up.  Even the $35/month figure, though, isn’t bad compared to the price offered by the local cable monopoly, Comcast, whose most inexpensive Internet-only plan, at the time I researched Internet options for my new home, a few months ago – without also purchasing cable TV service – was $60/month!

Obviously 768k isn’t exactly blazing speed; large downloads take a while to complete, and the bandwidth isn’t sufficient for streaming high-def video (e.g. some YouTube movies).  The service has been reliable, though, and I’ve found it to work perfectly well for email, browsing the web, gaming (even with both Melissa and I playing simultaneously on separate PCs), VoIP via Ooma (as described above), and even videoconferencing via the free Google Video Chat with my Dad in Florida.  It also works for me, for large downloads, to just kick off the download before bed and pick up the file in the morning.  (Or, at least, it works well enough for me not to feel too bad about pocketing the difference of $480 that I saved at the end of the year by not going with the faster Comcast service!)


My family just last week, finally, joined the ranks of the HD-enabled: We picked up a 32-inch 720p HDTV.  Previously, the only TV we had in the house was an old “analog” TV that couldn’t receive TV signals, and unfortunately I didn’t jump on the deal to pick up one of the U.S. government digital converter box coupons – now unavailable – that were being passed out for free before the U.S. digital TV transition back in June.  So, we’ve had no TV at all since moving into our the new house earlier this year.  (Admittedly, this was more a burden on the rest of the family than on me, since I tend to spend my free time on the PC, playing games, or reading, rather than in front of the TV.)

Now that we have a TV capable of receiving digital over-the-air signals, I ordered an HDTV antenna from Amazon – an inexpensive RCA ANT1400M Flat HDTV Antenna (currently going for $25) – and it’s been working great!  After some brief fiddling with the antenna – I ended up getting the best results by propping up the flat antenna at about a 30-degree angle, rather than either leaving it flat on the tabletop, or standing it up vertically – we get NBC, CBS, FOX, and ABC, all in great-looking HD.  (We get about a dozen other digital stations, too, including some that I’d never even heard of, such as the kids’ station qubo.)  It was nice to sit and watch some football at home (in HD!) this past Sunday after getting the antenna hooked up for the first time – having the $0/month ongoing cost in the back of my mind certainly didn’t detract from the enjoyment.  :-)

So basically, I’m cheap – but I like it that way

I’ve got the four major “bundle” services running now for a combined cost of less than $40/month – but obviously with some caveats:

  • We have two cell phones – but they’re for limited/emergency use only
  • We have broadband Internet – but only 768k downstream
  • We have HDTV – but only the major networks, plus a dozen or so other random stations
  • We have home phone service - (actually, no real caveat here, it works just fine!)

I can live with those caveats, though, in light of this chart – repeated from the top of this post, but updated to include a comparison to some of the other service options I mentioned:

Service Provider Monthly Cost Provider Monthly Cost
Cell phones (2) Alltel Prepaid (grandfathered) $16.67 Verizon Family "basic" plan (cheapest advertised 2-phone plan on the Verizon site) $69.99
Phone (land line) Ooma $0.00 None ("Who needs a land line anymore?") $0.00
Broadband Internet AT&T dry loop, 768k down $19.95 Comcast Economy Internet, 1M down (cheapest advertised Internet plan; bundle with Comcast cable TV required to get rate) $24.95
HDTV Digital TV + RCA ANT1400M Antenna $0.00 Digital TV + Comcast Digital Preferred (cheapest advertised rate; non-"introductory" ongoing rate) $74.94
Monthly Total (all services)   $36.62   $169.88
Annual Total (all services)   $439.40   $2038.56
Annual Savings   $1599.16   --

So, yeah: I’m cheap, and the services I’ve got do include a few “caveats”… but that extra $1600 in my pocket at the end of every year works out to the equivalent of quite a few dinner dates out at a restaurant for Melissa and I.  :-)

Monday, November 23, 2009

My Windows 7 Install Experience

I recently installed Windows 7 Home Premium edition on my primary desktop machine at home.  Since I built the machine fairly recently (November 2008), I was confident that my hardware could handle the OS; also, I had been running 64-bit Vista, which has similar hardware requirements.  I was also curious to get a firsthand look at the Windows 7 given all of the positive buzz (particularly relative to Vista, which had comparatively negative buzz at launch).  Finally, being a PC technology enthusiast, it’s always fun to be running the “latest and greatest.”

My install experience was largely very positive.  I did run into two significant snags, however.

Snag #1 – Windows wouldn’t recognize my wireless card

I run a wireless network at home, and have my PC connected to the network over the wireless (due primarily to the fact there happens to be no phone jack to plug my DSL modem into anywhere near the PC).  The wireless card I’ve always used with this machine, and had no problems with, is a Netgear WG311v3 (an internal PCI-slot network card). 

Unfortunately, after getting Windows 7 installed, Windows wouldn’t recognize the WG311v3 card.  The problem was that Windows 7 64-bit allows the use of only signed drivers, and Netgear has not released a signed driver for this card (despite the fact that this card is still actively sold in stores, as of the time of this writing).  I was surprised by this problem, since apparently the restriction of using signed drivers only has been around in previous versions of Windows as well, and I had been using this card with no problems under Vista 64-bit – I’m still not sure at this point why this card worked for me under Vista 64-bit, but not Windows 7 64-bit. 

After fighting with this problem for 3 hours or so (trying alternative drivers, and other workarounds), I gave up: I temporarily ran a long ethernet cable across my living room to the router to allow me to get online, and I ordered an inexpensive MediaLink MWN-USB54G USB Wireless-G adapter ($30 on at the time of this writing) which had great reviews and was reported by multiple reviewers in their comments to work fine with Windows 7 64-bit.  When the MWN-USB54G arrived a few days later, I plugged it in, and Windows 7 recognized it immediately and I was able to get online wirelessly with no problems – no need to use the enclosed CD.

So, boo to Netgear for not releasing a signed driver for their WG311v3 wireless card, and a bummer that I had to spend a little money on new hardware, but at this point I’m happy and have had no problems with the MWN-USB54G over the past couple of weeks of use.

Snag #2 – Problems initially getting Windows “activated” (registered)

Prior to installing Windows 7, my machine had a single 1.0 TB hard drive; for the purposes of this post, I’ll call this “drive 1.”  I had been running Vista Ultimate edition, for which a direct overinstall-type upgrade to Windows 7 Home Premium is not supported.  A “default” path to getting Window 7 installed in this case might have been to do the following:

  • Move my 100+ GB of documents (mostly photos and home videos of the family) to external storage
  • Format the hard drive
  • Install Windows 7
  • Recopy the 100+ GB of documents back onto the drive

However, I didn’t have a convenient way to copy the documents off the drive and then back on.  I decided instead to do the following:

  • Remove the hard drive, “drive 1,” from the machine
  • Add a new 500 GB hard drive to the machine, “drive 2,” to become the new C: drive
  • Install Windows 7
  • Add “drive 1” back to the machine – “drive 1” now becomes D:

This procedure successfully got me up and running with Windows 7, with Windows on my C: drive, and all of my documents on my D: drive.

This plan did hit one significant snag: During the initial install, when I was prompted for my CD-key, Windows wouldn’t accept it.  I double-checked the key I’d entered and verified it was correct, but entry of the key still failed with a generic error message.  Being a power user, I figured I could just clear the CD-key field and hit “Continue,” and Windows would let me go through with the install – and this did indeed turn out to be the case – but I might have been stuck if I didn’t know to do that.

Upon getting Windows up and running, I used the built-in “Activate Windows” utility (which I found easily simply by typing “Activate” into the Run/Search field on the Start menu – very cool!) to try and activate Windows using my CD-key once again.  This time I got a better error message instead of the generic one I was getting during initial setup: “The Software Licensing Service determined that this specified product key can only be used for upgrading, not clean installations.”

This made sense – Since I didn’t do an overinstall of Vista, and in fact had completely removed the drive with the Vista install on it from the machine completely while the initial Windows 7 install was running, of course Windows had no way of knowing that I legitimately was eligible for an “upgrade.”  Still, it would have been nice to have gotten a better error message during the initial setup.  Having realized the problem, I would have expected to have been offered some option to insert my old Vista DVD and/or enter my old Vista CD-key in order to prove to Windows 7 that I was, in fact, eligible for the upgrade, but there wasn’t any option like that.

Ultimately, I ended up using a workaround that I found on Paul Thurrott’s article Clean Install Windows 7 with Upgrade Media to successfully activate Windows.  I used “Method #2” from that page, and it worked fine for me!  (Thanks, Paul!)

Friday, October 09, 2009

Tip: Navigate “Back” like in a browser in Microsoft Word

Quick tip: In Microsoft Word, in a document with in-document hyperlinks, after navigating to another location in the document by clicking on a hyperlink (typically by holding Ctrl and clicking the link, as Word will prompt when the mouse cursor is hovered over a link), you can go back to where you were before in the document by using Alt+LeftArrow (hold down the Alt key and press the Left Arrow key) – similar to clicking on the Back button in a web browser.

Alt+RightArrow also works to go forward once again after using the Alt+LeftArrow shortcut to go back.

These are a good shortcuts to be aware of, since Word doesn’t by default show Back/Forward buttons in the toolbar like a browser does.  (This is the case in Word 2003 – I don’t have a copy of Word 2007 in front of me at the moment to check.)

In Word 2003, you can get Word to show Back/Forward buttons in the toolbar by making Word’s Web toolbar visible.  (Right-click a blank area of the toolbar at the top of the Word window, and select Web from the context menu that appears.)

The Alt+LeftArrow and Alt+RightArrow keyboard shortcuts to navigate Back or Forward respectively also work in most web browsers on Windows.

Thursday, October 01, 2009

Creating Mirrored Content in MS Word

It is possible to set up sections of “mirrored content” in Microsoft Word, such that the same content appears in two or more places in the document, and changes to the content in the “master” location are automatically mirrored to the other instances of the content.

The following instructions apply to Word 2003; I’ve done this in Word 2007 as well, but the specific procedure will differ slightly due to 2007’s use of the Ribbon interface rather than the traditional menu.

1. Designate the master content

To designate the “master” (primary) version of the content to be mirrored, select the content (e.g. by left-clicking and dragging the mouse cursor over it), and then create a “Bookmark” on the content by selecting Insert | Bookmark from the menu.  In the Bookmark dialog, add a new bookmark and name it whatever you like.

Tip: You may also want to enable “Show Bookmarks” at Tools menu | Options | View tab, so that you can see the bounds of the bookmark you created.

2. Place the mirrored content

Now, go to the place in the document where you want the mirrored copy of the content to appear.  At that location, add a “Cross-Reference” via Insert menu | Reference | Cross-reference.  In the Cross-reference dialog, set Reference Type to “Bookmark” and Insert Reference To to “Bookmark Text”; in the For Which Bookmark field, select the bookmark you created. 

Optionally, you can leave the “Insert as hyperlink” dialog checked.  If this is checked, the mirrored content will still appear normally (it won’t be underlined like a typical World Wide Web hyperlink), but readers of the document will be able to Ctrl+click the mirrored content to jump to the location of the master copy of the content.

Finally, click the dialog’s Insert button, and then the Close button.  The mirrored copy of the content should now appear in the document!

3. Updating the mirrored content

The mirrored content will not immediately automatically update when the master content is updated.  You can update the mirrored copy manually by right-clicking the mirrored text, and selecting “Update Field” from the context menu that appears.

You can update all of the mirrored content in the document at once by selecting the entire document (Edit menu | Select All; or press Ctrl+A), right-clicking anywhere in the document, and selecting “Update Field.”  All mirrored content fields (and any other fields that may be present in the document) will be updated.

Alternatively, you can set Word to automatically update all fields in documents each time the document is printed.  To do this, in Tools menu | Options | Print tab, select the Update Fields check box.

Bonus Tip: Capitalizing the mirrored content

Optionally, you can make the mirrored content appear in ALL CAPS even if the master content is mixed-case.  To do this:

  1. Right-click the mirrored content; from the context menu, select Edit Field.
  2. In the Field dialog, click the Field Codes button. 
  3. In the Field Codes text box that appears, type the following text at the end of the existing content of the text box:
    \* UPPER
  4. Click OK. The mirrored content should now appear in all uppercase!

(Thanks to Graham Mayor for the tip on the capitalization field switch. See Graham's site for lots of other advanced tips regarding what can be done with Word fields.)

Tuesday, September 01, 2009

Fix: FTP on Vista: "Replace Existing File with Temp File:I/O Error"

I ran into a problem trying to use Vista's command-line FTP utility (ftp.exe) to download a file directly into the \inetpub\wwwroot directory (the root IIS directory) on my local machine.

The ftp get command produced the following output:

150 Opening ASCII mode data connection for file(4538 bytes).
> Replace Existing File with Temp File:I/O Error
226 Transfer complete.
ftp: 4538 bytes received in 0.17Seconds 26.69Kbytes/sec.

When I checked the local destination directory, the file was not present.

The cause of the problem was that the local directory I was trying to download the file into (in this case, \inetpub\wwwroot) is a protected directory in Vista, requiring administrator access to copy into.

So, there are a couple of possible workarounds:

  1. Run ftp.exe as Administrator. (One way to do this is to open Windows Explorer, navigate to the directory where ftp.exe is located -- typically C:\Windows\System32 -- and right-click ftp.exe and select Run As Administrator.)
  2. Download the file into a non-protected directory, and then use another tool (such as Windows Explorer) to copy the file to the protected final destination directory.

Thursday, July 09, 2009

Tip: How to easily reorder bullet points in MS Word

A quick tip on a discovery I just made: You can quickly reorder bullet points in Microsoft Word putting the caret in the bulleted item to be reordered (i.e. click on the item), and then use Alt+Shift+UpArrow or Alt+Shift+DownArrow to reorder the selected item within the list of bullet points.  Apparently this works in other MS Office programs as well (such as PowerPoint).

I’ve found that this works a lot more nicely than cutting the item to be moved, and then pasting the item in the new location in the list (since often, line breaks need to be fixed up after the new item is pasted in.)

Bonus tip: Alt+Shift+LeftArrow and Alt+Shift+RightArrow will indent/unindent the selected bulleted item.

Thursday, July 02, 2009

Installing m2eclipse in Eclipse 3.5

After newly installing Eclipse 3.5 (replacing my old Eclipse 3.3 install), when I tried to view a document with a Maven pom.xml file that I’d previously had open in my workspace, I got an error:

Could not open the editor: No editor descriptor for id org.maven.ide.eclipse.editor.MavenPomEditor

The fix was to install m2eclipse (the Maven plugin for Eclipse). I did this in Eclipse 3.5 as follows:

  • Help | Install New Software
  • In the "Install" dialog: click the Add button
  • In the "Add Site" dialog:
    • Name: m2eclipse
    • Location:
  • Click OK
  • Back in the "Install" dialog, in the "Add Site" dropdown, select: m2eclipse
  • Under "Maven Integration", I checked:
    • "Maven Integration for Eclipse (Required)"
    • "Maven POM Editor (Optional)"
    • "Maven POM XML Editor (Optional)"
  • Click Next, go through and complete the Install wizard.
  • When prompted, I restarted Eclipse.

That got my Maven POM editor up and running in Eclipse 3.5.

Monday, June 22, 2009

Multiple Displays: The future of TV & gaming?

I’ve been running three monitors on my PC at work for a while now, and it’s been working great for me.  Multiple monitors works great for running business applications and/or doing software development; for example, I typically run my programming environment maximized on my primary monitor, run most the programming environment’s secondary windows (e.g. project file list, search results, list of compiler warnings/errors, etc.) on the second monitor, and the application’s UI or other reference material on the third monitor.  I’m able to see everything I need to see at once without shuffling windows around.

PC Games

As multiple monitors on PCs continue to gain more market penetration, it would be nice to see more PC games join business applications and take advantage of the potential availability of multiple displays.  A game’s main view of the game world could go on the primary monitor, and secondary information could go on a second monitor, freeing the entire screen area of the primary monitor to show the game world.  For example:

  • In MMORPGs such as World of Warcraft, the display can become pretty “cluttered” with ability toolbars, party status display, mini-map/radar, active buffs/debuffs, and more.  All of that could (optionally) be moved onto a secondary monitor, freeing the entire area of the primary monitor to show the game world.
  • In RTS games such as the classic Starcraft, the selected unit(s) and their information, “order” buttons (move, attack, stop, etc.), and mini-map could be moved onto the second monitor.
  • In traditional RPGs, secondary data such as inventory screens, skill/spell lists, character statistics display, and so forth could be shown on the second monitor, again freeing the entire area of the primary monitor to show the game world at all times.

Console Games

It would also be nice if future console systems (i.e. successors of the current generation’s Wii, Xbox 360, and Playstation 3) would (optionally) support hook-up to multiple television sets in the future.  In addition to the getting the same benefits that would be realized by PC games, this might also help with situations where there are multiple players playing simultaneously on the same local console system. 

Today, local multiplayer is typically accomplished via split screen; in the future, one or more players’ view could be moved onto the second screen.  If a future Rock Band or Guitar Hero game supported the addition of a keyboard (piano) part or otherwise supported more players playing together beyond the 4 supported today, multiple TVs could help with the problem that would otherwise be encountered in trying to squeeze 5+ players’ parts onto the same screen!

Handheld Games

Obviously, the one gaming system that is way out ahead of the curve as far as multiple monitor support goes is the Nintendo DS.  With two screens built into the hardware, all games on the platform can be designed to fully take advantage of the availability of two screens. 

Although I don’t own a DS, I’ve had a chance to briefly borrow one owned by my nephews on a couple of occasions.  It is really cool in a game like Zelda to be able to see both the primary game world and the overhead map view (while in a dungeon) at all times.

TV - Sports

Multiple screen support would also be really cool in the future for TV – particularly for sports broadcasts.  In my case, I’m a big fan of Michigan Football.  Instead of watching games on just a single screen (where the display tends to focus in on the quarterback or whomever has the ball, to the exclusion of the rest of the field), it would be amazing to have a second screen showing what the downfield receivers are doing (or other action away from the ball appropriate to the play), and a third screen dedicated to showing real-time stats at all times.  The score and “ticker” could also be shown on the third screen, freeing the entire area of the main screen to show the game action.

Obviously, support for people watching the game on just a single TV (I’d likely be among them, at least for now!) would have to be maintained as well.  Perhaps an “all in one” game broadcast (essentially what we have today) could be carried on a particular channel; the “multiple screens” version of the game could be carried on a separate set of channels.

This kind of multiple screen support for sports broadcasts, particularly combined with support for single-TV viewers, would work out to quite a few channels being dedicated to sports broadcasts!  Still, with the proliferation of channels available even today via digital cable or satellite broadcasts, this kind of thing might be possible in the not-too-far future.

Put those old displays to use!

This would also give people something to do with “old” PC monitors and TVs as they gradually get replaced over time with HD versions: Put the old displays to good use as secondary information displays for games and TV!  One of the 3 monitors that I have at work is an old monitor that would be sitting on a shelf at home (or worse, in a landfill somewhere) if I didn’t have a use for it as the third monitor on my work machine.

So, PC game developers, console hardware companies, and sports broadcasters: Go forth and make it so.  :-)

Monday, June 01, 2009

PC Frequently Rebooting due to Power Supply Unit Issue

This past Saturday, I was having lunch with the family in the kitchen when I heard from the office the sound effect that my new PC plays after booting.  I thought that was odd (since no one was in there using the PC), but shrugged and figured that maybe the PC had rebooted itself due to some automatic update?  When I heard the same sound again a few minutes later, though – indicating a second reboot in the span of a few minutes, with no one sitting at the machine – I investigated.

As I worked on the PC, I found that it was rebooting itself every few minutes, at irregular intervals.  The PC had never done this before; aside from some heat-related bluescreen issues after I first put the PC together, the PC had been quite stable for the 6 months or so since it was built.  I had the reboot problem reproduce once while I was in the boot-time BIOS configuration utility, which proved the problem wasn’t a Windows issue.

Due to the intermittent nature of the problem, I initially suspected it might be caused by another overheating issue.  However, the BIOS configuration utility showed that the CPU was operating at a nice and cool (relatively speaking!) 40 degrees C or so. 

I also suspected a possible RAM issue – perhaps one of the four RAM modules had gone bad and was causing the reboots.  However, I tried removing two of the RAM modules at a time (with the machine powered off, of course); the spontaneous reboot reproduced with only modules #1 and 2 in the machine, and also with only modules 3 and 4 in the machine, which appeared to rule out a memory module issue.

Finally, though, I got “lucky” in my investigation.  After the machine rebooted itself twice in rapid succession, I manually toggled off the power switch at the back of the PC’s power supply unit (PSU) to keep the machine off while I (once again) manually inspected the machine’s hardware.  When I toggled the power supply unit switch back on, I got a surprise – a bright spark and a loud “POP” sound from within the power supply unit!  I immediately pulled the power cord out of the PC to prevent anything further from occurring with the PSU.

This seemed unlikely to be a coincidence.  If the PSU had indeed gone bad somehow, I could see that the behavior of the system rebooting (with no error message, except Windows complaining that it hadn’t been shut down properly at restart time) would be consistent with the system losing power momentarily, and then getting it back immediately afterwards.  I was fairly confident that the incoming power supply to the machine was OK, as I had the machine hooked up to power via a UPS (an uninterruptable power supply -- designed to ensure a consistent flow of power, even in the event of a power failure).

I replaced the apparently faulty power supply unit with a spare that my father-in-law Doug had on hand (thanks Dad K.!) – and that resolved the issue!  The machine has been running since Saturday afternoon with no problems.  So the intermittent spontaneous reboot problem had been caused by a faulty power supply unit. 

I wrote “BAD” on the faulty PSU and threw it away.  I also ordered a modern 500W PSU with integrated PCI-Express and 8-pin CPU connectors to replace the one I’m borrowing from my father-in-law.

The lesson learned here for me is not to cheap out on buying a PSU when building a new PC!  When selecting a case and power supply for this machine, I’d mostly paid attention to cases, and had just accepted the included power supply that came with the case – for the PSU, I had only really looked at the raw wattage on the PSU (450W).  The PSU had turned out to be an older/cheaper model with no PCIe connection, and only one SCSI drive connection.  For this PC, with reasonably demanding power requirements (including a GeForce 9800 PCIe video card), the lower-end power supply that came with the case apparently just wasn’t sufficient over the long term.

In the future when building PCs, I’ll most likely opt for purchasing the case and power supply unit separately, and will certainly pay more attention to the detailed specs of the PSU to ensure that it is likely to be sufficient for the needs of the system I’m building!

Tuesday, May 19, 2009

Fix: Spring-based JNDI lookup can't see .properties file

After refactoring one of our internal applications at work to use Spring XML configuration file based JNDI lookup today, several of the application's unit tests which involve testing of JNDI lookups started failing. The following error appeared for each failed test in the jUnit XML log file:

<error message="Error creating bean with name '[dsName]':
Invocation of init method failed; nested exception is
  javax.naming.NoInitialContextException: Need to specify class name in
  environment or system property, or as an applet parameter, or in an
  application resource file:  java.naming.factory.initial"
... (snipped for brevity) ...
at [internal namespace].util.TestUtil.getSpringContext(


We discovered that the cause of the problem in our case was that, as the error message indicated, Spring wasn't seeing a .properties file present in the project which set a value for the java.naming.factory.initial property.

The line in our Spring context .xml file looked like:

<jee:jndi-lookup id="[dsName]" jndi-name="jdbc/[dsPath]/[dsName]"
  expected-type="javax.sql.DataSource" />

The line in our .properties file (which Spring wasn't finding properly), which set the naming factory class to a class provided by our J2EE application server (WebLogic), was:


The .properties file was located in the same folder as the Spring context .xml file.


In the Spring context .xml file, just prior to the jee:jndi-lookup tag, we added a bean of type PropertiesFactoryBean to act as a pointer to the .properties file:

<bean id="jdbcConfiguration"
  <property name="location" value=""/>

Then, we added a reference to that new bean to the existing jee:jndi-lookup tag (the added part is bolded):

<jee:jndi-lookup id="ot1ds" jndi-name="jdbc/[dspath]/[dsname]"
  expected-type="javax.sql.DataSource" environment-ref="jdbcConfiguration"/>

This change fixed the problem, and got our tests to run successfully.

I hope this is helpful to someone!

Wednesday, February 25, 2009

Getting JAX-WS to work with WebLogic 9.2

I spent several hours at work today troubleshooting problems related to getting JAX-WS (as included with Apache CXF) working in a Java web application running under BEA (Oracle) WebLogic 9.2.  This post contains a summary of the errors I encountered, and their resolutions -- hopefully this will save someone some of the troubleshooting time that I spent today.


Some brief background: I was building some new SOAP web service integrations into one of our internal Java applications, which runs on WebLogic server.  This application was the client side of the integration.  I used Spring, Apache CXF, and JAX-WS to build the integrations.

I first coded the SOAP integrations into a simple stand-alone Java application, and that worked fine.  However, when I plugged my code and the CXF .jar files into the "real" application running on my local WebLogic server, I ran into a couple of errors.

Error #1: "java.lang.NoSuchMethodError: javax.jws.WebMethod.exclude"

Upon running my application under WebLogic 9.2, I got this error in the WebLogic server log file:

org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'internalBeanName': Instantiation of bean failed;
nested exception is org.springframework.beans.factory.BeanDefinitionStoreException:
Factory method [public java.lang.Object org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create()]
threw exception; nested exception is java.lang.NoSuchMethodError: javax.jws.WebMethod.exclude()Z

This error turned out to be caused by the fact that in addition to the javax.jws.WebMethod class included in the geronimo-ws-metadata_2.0_spec-1.1.2.jar file included in the distribution of CXF that I downloaded, another (apparently older) implementation of that class is also included in the weblogic.jar file included with WebLogic 9.2.  WebLogic by default assigned priority to classes from its own weblogic.jar file over classes included with my application; as a result, WebLogic tried to use the older implementation of the javax.jws.WebMethod class, which does not include the exclude() method, and the NoSuchMethodError occurred when the other JAX-WS code tried to access that method.

To fix this, I modified my weblogic.xml and weblogic-application.xml files, to instruct WebLogic to give priority to the JAX-WS implementation in my own supplied .jar files rather than its own JAX-WS implementation. 

In my weblogic.xml, I added:


For more on this weblogic.xml change, see documentation on a similar issue affecting Apache Axis.

In my weblogic-application.xml, I added:


For more on this weblogic-application.xml change, see the WebLogic configuration documentation in the CXF documentation.

Error #2: "Your JAXP provider [...] does not support XML Schema"

Having resolved the NoSuchMethodError, I re-deployed my application, and got this error upon running the app:

org.springframework.beans.factory.BeanDefinitionStoreException: Parser configuration exception parsing XML from class path resource [mySpringContext.xml]; nested exception is javax.xml.parsers.ParserConfigurationException: Unable to validate using XSD: Your JAXP provider [org.apache.xerces.jaxp.DocumentBuilderFactoryImpl@nnnnnnn] does not support XML Schema. Are you running on Java 1.4 with Apache Crimson? Upgrade to Apache Xerces (or Java 1.5) for full XSD support.

The problem here was that there was an an old (2003) xerces.jar file present in my Java project, which contained an old JAXP provider class which did not support XSD. 

To fix this, I deleted the old xerces.jar file, and redeployed the project.  (I also needed to delete WebLogic's cache, located on my machine at \bea\user_projects\domains\mydomain\servers\myserver\tmp, to completely get rid of the old cached xerces.jar file.)

Wednesday, February 11, 2009

Still Key Jammin', 19 years later!

I was just re-reading a piece of code that I'd written earlier today which attempts to detect duplicate customer records in a particular database table, when I came across a misspelling in a comment: I'd misspelled the word "duplicate" as "dupliate."  I corrected the typo, and continued reading, when I came across another instance of the same misspelling: "dupliate" instead of "duplicate." 

Curious now, I did a search of the source file for other instances of the misspelled word "dupliate"; to my surprise, I found a LOT of instances of that misspelling (all in my own hand-entered comments, so not due to intellisense or copy-paste)!  At this point, I suspected that the problem was due to some factor beyond simple human error, so as an experiment, I tried just typing the word "duplicate" several times in a row (and paying attention to be sure that I actually was hitting the C key).  This was the output:

dupliate dupliate dupliate dupliate dupliate duplicate dupliate

The problem was reproducible almost every time.  I briefly experimented further:

  • The problem WAS reproducible in text editors other than my IDE (Eclipse). 
  • The problem was NOT reproducible when I typed slowly and deliberately, being sure to hit each individual key one at a time.
  • The problem was NOT reproducible using my machine's built-in keyboard (an IBM/Lenovo Thinkpad T60 laptop); only when using the external keyboard (a "standard" qwerty / U.S. layout black Dell-branded PS/2 keyboard, part number 04N454).

I discovered that the specific problem was that while the L and I keys on the keyboard were being pressed, presses of the C key would be dropped/ignored.  I found that every other letter key on the keyboard worked with L and I held down; just not C!

So what was happening here was that in typing "duplicate," I apparently was typing the C (with my left hand) before I'd let go of the L and I keys (with my right hand) -- or at least before the L and I keys had "popped back up" -- and consequently, the C key press was getting dropped.

Now that I'd realized what was going on, I remembered that this is a typical hardware limitation of keyboards: certain keys cannot be pressed in combination with one another.  I hadn't thought about this in years and years -- since back when I used to play 2-player games on the PC that would have both players using the keyboard on the same PC simultaneously.  The old (1990) PC game Star Control actually came with a utility called "Key Jamming" for working around this very issue: The utility would allow you to experimentally hold down various key combinations, and tell you which ones the PC could "see," to allow you to customize the game's keyboard controls on your machine's keyboard such that players in a two-player game wouldn't end up "locking out" one another.

It's unfortunate that the Dell 04N454 keyboard has this particular limitation.  I'm not sure what I can do to work around it, though, short of just needing to have extra awareness of my spelling (particularly in non-spell-checked environments such as IDEs) -- or else looking into using a different keyboard which isn't affected by this particular limitation!

Sunday, February 08, 2009

Wii Overheating and Powering Off due to Stuck Fan

The past few weeks, my family has been having a problem with our Nintendo Wii game system at home: After being on and used to play games for an hour or two, the Wii would just shut itself off without warning.  The outer case of the Wii would be hot to the touch after the shut-off.  The obvious diagnosis was that the Wii was overheating, and powering itself off as a safety measure to avoid damaging the processor or other internal components due to the very high temperature.  A Nintendo customer service article on the Wii provides support for this: "The system will shut down if it cannot vent properly to prevent overheating."

After the self-shutoff, the power light of the Wii on the front of its case would be off (not red or yellow, as is normally the case when the Wii is plugged in but powered off).  After the Wii had a few minutes to cool down while powered off, we could get it to power on again by removing and then re-plugging the power cord, but this was obviously only a temporary workaround, since it did nothing to address the root cause of the overheating.

The vents on the back and bottom of the Wii appeared to be clear -- not clogged with dust or otherwise blocked.  However, I couldn't feel any air movement at all when putting my fingers near the vent at the back of the Wii while it was running.  My suspicion was that Wii's internal fan might be jammed with built-up dust, or not running properly for some other reason.  I couldn't determine whether or not this was the case by trying to peer through the vents in the back of the Wii, though.

Reading further on the support site, Nintendo does offer an official repair service, but my Wii (according to the site, after entering my Wii's serial number) is out of warranty; Nintendo wanted US $75 to cover shipping and repair of the out-of-warranty Wii.  I wasn't terribly excited about the prospect of paying such a steep fee to have my not-yet-2-year-old Wii repaired.

I searched around some more, and came across a great article, including pictures, on how to disassemble a Wii, by Ken Hanscom.  Armed with this (thanks Ken!), and with the knowledge that my Wii was out of warranty anyway and therefore there was no warranty to be voided, I decided to set about disassembling my own Wii to be able to get at the fan, and try to diagnose and fix the problem myself.

Tri-wing screwI did need to pick up one additional tool before starting the disassembly -- a "tri-wing" screwdriver, which previously I'd never heard of before.  The Wii and some other consumer electronics devices use tri-wing screws (shown at right) apparently as an attempted security measure to prevent customers from removing the screws and taking apart the devices, as most people don't own one of these screwdrivers, and most hardware stores don't carry them.  However, I was able to pick up a tri-wing screwdriver easily on eBay (searching on tri wing wii) for a grand total of $1.88 including shipping -- almost certainly my most inexpensive online purchase ever that involved something being shipped to me!

Following Ken's instructions, I was able to get the Wii disassembled without too much trouble.  I did run into a couple of problems along the way, though.  First, my micro-size Philips-head screwdriver was having problems getting a grip on the very first set of screws, on the outer Gamecube controller panel of the Wii; however, I ended up being able to use the flathead end of my micro-screwdriver to get those out.

I also ran into a problem with the very last screw to be removed, one of the two tri-wing screws on the bottom of the Wii, in the front panel.  The screw was pretty well stuck in its socket, and I unfortunately managed to strip the screw head using the tri-wing screwdriver, such that I wasn't able to get a grip on the screw with any of my screwdrivers (or with my needle-nose pliers).  Finally, though, as I took a break to put my son Eli to bed, my wife Missy took a turn with the project, and discovered that the casing of the Wii would come apart without actually having to remove that particular screw.  So we were able to complete the disassembly without ever actually getting that screw out.

Wii_parts_bagAs I went along, I ended up putting the screws from each step of the process with their own small plastic bag, to avoid any possibility of getting them confused with one another when I went to reassemble the Wii later.  I also labeled each bag with instructions on where each screw in the bag came from.  This did turn out to make it easy to get the Wii back together at the end of the project.

Finally, the Wii was opened up!  A front/side view:


A rear view:


The Wii's internal fan is visible at the bottom of the latter image.  The fan actually turned out to be very clean -- no visible built-up dust or grime at all.  However, when I tried turning the fan blade with my finger, the fan was "stuck"; it wouldn't move at all.  When I applied a bit more pressure, though, I could feel the fan suddenly become unstuck, and from that point on, it turned very freely -- even just blowing on the fan would get it spinning easily.

I'm not sure how the fan had gotten stuck in the first place, but apparently, the stuck fan had been the problem!  I tested the Wii by putting the cover back on (although not putting all the screws back in just yet), powering it back up, and playing Rock Band 2 with Missy for about an hour; at the end of our session, the Wii outer cover was still cool to the touch.  (Previously, when the Wii was experiencing the overheating issue, playing for any length of time over a few minutes would cause the Wii's cover to become at least warm to the touch, if not hot.)  We were also to feel some slight air movement at the vent at the back of the Wii while it was on, and we could, listening closely, hear the fan spinning.

I'll certainly keep an eye on the Wii's behavior over the coming days and weeks, but for now, the problem appears to be solved -- and without needing to send the Wii off for repairs for several days/weeks, or pay $75 to Nintendo!  I even managed to learn a few things, and pick up a cool new tool (the tri-wing screwdriver), in the process.

If you have an out-of-warranty Wii that you suspect of having a fan problem similar to the one I've described in this post, I would suggest, as a first step before you consider disassembling it, that you power off the Wii, unplug it, and then use a very narrow screwdriver or similarly-shaped tool to reach through the vent at the back of the Wii and check, by gentle touch using your tool, whether the fan appears to be "stuck" as mine was; and if so, if you are able dislodge it by means of applying gentle pressure.  It would be an easy troubleshooting measure to try, before going to the time and effort of disassembling the Wii.

Tuesday, February 03, 2009

How to prevent a web site from stealing the focus in Firefox

At work, for a while now, I've had my Firefox 3 browser homepage set to a particular page in our internal Confluence wiki.  This page is specially designed to be a "start page," consisting solely of a series of links to commonly-used internal applications and documentation, plus a few search fields allowing common searches to be performed (of the wiki; of the employees database; of the Internet via Google).  I also have the New Tab Homepage Firefox add-on installed, so this homepage appears when I open a new tab in Firefox.

This setup works great, with one glaring exception: The page takes a couple of seconds to load, and Confluence automatically sets the focus to the first search field on the page when it completes loading.  The result of this is whenever I opened a new browser window or browser tab and started typing a URL in the address bar to manually navigate to a page (which I actually do fairly frequently), typically halfway through my typing in the address bar, the web page would steal the focus, and the second half of the URL I was typing would appear in the search field on the page instead of in the address bar.

This problem isn't necessarily limited to a Confluence page set as a browser homepage; it could potentially occur with any web page that is coded to set the focus to a particular UI element on the page, such as the Google homepage.  Here's what might happen if I opened up a new browser window with the homepage set to Google, and started trying to type "http://localhost/" in the address bar as the page loaded:


Note that half of the "http://localhost" text appears in the address bar, but (in this example) after the "a" was typed the script web page made a call to the Javascript focus() method to set the focus to the search field, and Firefox honored this; as a result, the remainder of the typing appears in the search field -- the Google page managed to steal the focus.

I went about searching for a solution to this problem, and ended up finding one in a post on Kam-Hung Soh's blog.  Kam-Hung's post has instructions on how to disable a particular Javascript method for a particular web site. 

I followed the instructions, and added the following to my Firefox user.js file:

user_pref("capability.policy.policynames", "noinputfocus");
user_pref("capability.policy.noinputfocus.sites", "");
user_pref("capability.policy.noinputfocus.HTMLInputElement.focus", "noAccess");

(In my case, I used the URL of my team's internal Confluence wiki site instead of "").

After doing this, I was all set!  I no longer had my focus stolen after opening a new browser window or a new tab. (Thanks, Kam-Hung!)

Obviously, these instructions are Firefox-specific, and therefore aren't helpful for addressing this issue in other browsers.  However, when I tried to reproduce the issue in Internet Explorer 7, I was unable to do so -- in cases where I had started typing in the address bar as IE7 loaded the page, the web page never gained the focus.  Perhaps IE has some intelligent logic where it will ignore focus() calls made by the web page in the case where the user has already started typing something in the address bar?  It would be really nice to see all browsers implement such a feature, to avoid the need for workarounds such as the one described in this post.

Update 2/4/2009: I took a look, and there is in fact a bug in the Firefox Bugzilla database for this issue. It was initially reported back in 2002, though, so I'm not super optimistic about the bug being fixed in the near future. :-)

Friday, January 02, 2009

Rock Band 2 for Wii: Guitar Hero 3 Guitar is Compatible!

I got a copy of Rock Band 2 Special Edition for the Wii for Christmas this year (thanks to my beautiful wife, Missy!).  The Special Edition bundle includes the game disc, the drum set, the microphone, and one guitar.

The one other guitar that I already own, an "official" Guitar Hero 3 guitar that was packaged with my copy of Guitar Hero 3 for Wii, does work successfully with Rock Band 2 for Wii!  It "just works" -- no special configuration or setup was necessary.  So with the Rock Band 2 Special Edition set plus the Guitar Hero 3 guitar, my family has been able to play Rock Band 2 with the full four-person band (singer, lead guitar, bass guitar, drums). 

Really excellent job by the folks at Harmonix for taking the time and effort to make the Guitar Hero 3 guitar compatibility work, and also for making the Wii version of Rock Band 2 feature-equivalent to the XBox 360 and PS3 versions!  Thanks, guys!