Sunday, February 28, 2010

Neat Data Visualization Libraries for Flex

Here are some really nice data viz libraries for Adobe Flex that sport line, bar, waterfall, cluster, bubble charts and a lot more without requiring that you have a Flex Builder 3 Professional license:

(1) Axiis

(2) BirdEye

There are open source projects so you should be able to get the code for Axiis here and for BirdEye here (SVN checkout).

Monday, February 8, 2010

Multiple undo keystrokes and bam all your day's coding is gone!!!

Working on a fresh project all day that hasn't been setup in a Subversion repository and while testing out stuff in Flex Builder (which is essentially Eclipse under the hood) I made some Ctrl+Z key strokes to undo some commented lines and I noticed the build started to fail whenever I saved the reverted changes. (Flex Builder 3 is set to build on each save by default).

I ignored the initial build errors thinking heck, Eclipse had gone gaga from prolonged use and it started to freeze after brief shots of inactivity so the error would definitely go away once I perform a Clean then a Build. How wrong I was indeed.

By the time, I got over my drunkenness three source files in newly created sub-folders had vanished from my file system. My God. No. This can't be happening to me... all of todays's work gone foreever????

I figured OK maybe Eclipse was playing pranks by somehow hiding the files so I hit Terminal to do an:
ls -lpA
to view all the hidden files in the parent directory containing the missing files/sub-folders. No dice.

Next thing I'm doing
apropos undelete
and surprisingly enough I get an entry for the undelete C library function on BSD systems. How convenient. I have to dust off my C skills to write an undelete utility to avoid loosing my mind from lost work? No way.

Enter: Google
I fire up my EVDO connection and hit the search box "eclipse deletes source files" trying to point fingers squarely at Eclipse for my misery. The first result, a mailing list post from way back, precisely in 2001, where the author wrote that it was dirt easy to lose changes while working in Eclipse with someone chiming in that it is a known issue that is planned to be addressed in version 2.0.

How refreshing. This post is from 2001?? and this is like 2010 and Google somehow thinks this will solve my issue? Rather than jump off to the next result or crafting another search query, I decided to continue reading the thread a bit more as to why this ancient post should be ranked higher than the rest, I might actually learn something. Interestingly, I hit this little nugget of information regarding Eclipse:

A couple of workarounds until the issues are resolved...

As a side note, the same thing happened to me today. I was working on a
class and deleted it by mistake. What I did was load an old version from the
repository and then choose the class in the Navigator and selected "Replace
with edition from Local History". That seemed to work fine.


Then I quickly recollected how I used to ignore that menu item "Restore From Local History..." when you right-click items in the project navigator.

I highlight the parent folder, right-click to 'Restore From Local History...' and bam my files re-appear. They all contained all my most recent edit. Hurray!!!

Google's search technology is still unarguably their most valuable piece of IP on top of which everything else powered by Google resonates which is why they won't risk it being stolen if their continued stay in China still poses such risks.

I can't say for sure if I accidentally hit some keystrokes other than Ctrl+Z while working on this project causing Eclipse to think I wanted those newly created source files deleted or that multiple undo key strokes in quick succession can cause source files that were creating within a coding session (i.e. Eclipse hasn't been restarted) to vanish. Either way, I'm too scared to try to find out until I've backed up all my changes safely.

Enough pontificating, it's time to get back to work.

Friday, February 5, 2010

Installing Oracle 10g (10.2.0.1.0)

While installing Oracle 10g on a Windows 2003 (32-bit) server instance on Amazon EC2 I got a warning from the installer after it ran some diagnostics:

Checking Network Configuration requirements ...

Check complete. The overall result of this check is: Failed <<<< Problem: The install has detected that the primary IP address of the system is DHCP-assigned. Recommendation: Oracle supports installations on systems with DHCP-assigned IP addresses; However, before you can do this, you must configure the Microsoft LoopBack Adapter to be the primary network adapter on the system. See the Installation Guide for more details on installing the software on systems configured with DHCP.


If I had chosen to ignore the warning the installation would have still succeeded anyways but here's how to fix the warning message.

Oracle Database Preinstallation Requirements: 2.6.5.3 Installing a Loopback Adapter on Windows 2003, Windows Server 2003 R2, or Windows XP offers 21 steps to help resolve the warning on Windows 2003, Windows Server 2003 R2, or Windows XP. It also contains directions for other Windows variants (Vista etc).

I decided to shave off a few steps by going the command line route since I might have to perform a number of installations.

Step 1
Download the DevCon package, a self-extracting zip archive containing an utility provided by Microsoft to allow you perform tasks that you would otherwise do from the Device Manager (and a little extra). You can read more about the tool DevCon command-line utility.

Step 2
After extracting DevCon to a location on your machine, open a command prompt window and change to the directory containing the actual devcon.exe file.

Step 3
Steps 1 to 12 from 2.6.5.3 Installing a Loopback Adapter on Windows 2003, Windows Server 2003 R2, or Windows XP can thus be condensed to these two simple steps using DevCon:

devcon -r install %WINDIR%\Inf\Netloop.inf *MSLOOP

devcon restart =net @'ROOT\NET\0000

In case you loopback adapter device address isn't "ROOT\NET\0000" you can check what value it is via:

devcon find *MSLOOP

Step 4
You can now go ahead to complete the rest of steps 13 to 21.