Sunday, December 6, 2009

Oracle documentation

Found out why one of my other weekend projects failed. Oracle Lite doesn't like having the mobile server and the database workbench on the same machine. Something gets twisted around and prevents clean publishing.

I'm sure I'll find this somewhere in the documentation, but there's just so much of it.

It's sort of like when we looked into R.U.P. at work. So many choices and not enough guidance. Here's some rope. You could catch a cow or hang yourself. Instructions for both are included, but very little information about which one would be better.

Gonna throw a Blackberry...

I'm going to throw a Blackberry against the wall. The stupid thing generates interference, so when I started a coding session I turned off my speakers. I then put it on my desk in silent mode. It was supposed to be a good programming session. You know, silence, a few drinks, everyone else asleep.

It didn't turn out so well. I was getting random system lockups at random points. At first I thought my code was at fault, so I started working on writing documentation. Hey, if I'm on a roll and the code is breaking, I might as well do SOMETHING. Anyway Word started dieing at random points. After about an hour of that I figured I'd hit the sack.

I spent the entire next day trying to figure out what was wrong with my system. My code may be buggy, but Word (2003)? Something else had to be wrong!

I ran full diagnostics, defragmented the drive etc. Then I started going through e-mails I'd been ignoring the night before. One had a Youtube link that looked good. Half way through it, I got the familiar bzzz bzzz bzzz of interference from my Blackberry then my system hung. I reached down and grabbed the offending piece of electronic !@##$! and noticed that I'd placed it on top of the mouse cord Friday night.

Since moving the offender to the other side of my desk, I have had No, Zero, Zip, Zilch, Nada problems. After writing this, I'm a little calmer and it won't be hitting the wall. It won't be going in my pocket either

Thursday, November 19, 2009

It's Here!!!!

The Psion iKon has arrived. I've been playing with it for a few hours.

Installing via Visual Studio CAB files is as easy as could be. Nothing too troubling, but the excitement of deploying an app on a new platform is amazing.

Setting the background though was a pain. You can set the background from Settings --> Today --> Use this picture as background. When you do it that way your image will be 50% transparent. Probably not what you were looking for. The easiest way to set the background AND set the transparency to:
Open File Explorer
Open the image you want to use as the background
Menu - Set as Today Background
Set transparency level to 0
Press OK.

Sunday, November 15, 2009

Resolution Support System

What ever happened to Decision Support Systems? When I was in college, I had a professor who made it seem like the world would be running on DSSs by 2000.

Anyway, the reason I ask. I'm putting together a web site to support users of an in house piece of software and I wanted something more than a FAQ.

I have a script that is used by the help desk when they get a phone call and wanted to create it as a web page. Just a quick weekend project huh? Well I ended up searching for an existing template or even an example for 12 hours. (I'll bet someone replies with one within the hour).

Finally I sat down and tried to pick my brain about the basics of a DSS. In case you're wondering, it's really just one question leading to another until a reasonable answer is arrived at. I DID say basics didn't I?

The design ended up working out to be pretty easy. Questions are stored in XML files and served up in an HTML page. Possible answers are also shown. Each answer leads to another question. Answers are really just questions, because at the bottom I ask the user if they were able to solve their problem.

If a user cannot solve their problem, I end up sending an email to the help desk containing the questions the system already asked the user and their response.

6 hours of work and I've got a good foundation.

Saturday, November 14, 2009

Special Hardware

Wow! Jumping from consumer grade hardware to commercial isn't easy.

No, the programming isn't any different, but ordering... That's a different story.

I just spent two weeks going from manufacturer to distributor and finally hunting for a reseller who would sell Psion Ikons to my company.

Many of the resellers I called were not interested in selling just the hardware. (They sell the hardware for a loss and want the development money). I finally found one who would sell the bare unit. As I was talking to them, I found out that they also do development work. I was 10 minutes into the call before I was even asked if I wanted them to do the work.

Anyway, along the way I learned a few things.
1. Manufacturers don't want to do any type of one-time sales. They want a steady income stream.
2. Distributors (see #1)
3. Many Value Added Resellers want you to pay for their "added value" and make poor "resellers"
4. Finding the right person is worth the hunt.
5. Don't get frustrated when you end up on a wild goose chase.
and finally
Ask as many questions as you can at every step. You never know what you'll learn.

I have 4 pages of notes that I've collected at each step. Having these notes has made each successive step that much easier. By the time I got to the reseller, I knew most of my options. I also knew that they might know more about the product than I could. They were able to put together a good combination at a good price.

The real fun begins next week when I get my hands on the real thing. (Emulators only go so far)

More to follow

Sunday, November 8, 2009

Going Mobile

NEW CHALLENGES COMING!!!

Yes, I'm excited! I'm entering the world of handheld devices. I'm not talking wimpy I-Phones or temperamental Blackberries. I'm talking full blown drop it on the ground, stomp on it, pick it up and keep working Psion Ikons. http://www.psion.com/us/products/handheld/ikon.htm

I'm entering the world of Windows Mobile!

Add to that Oracle Lite. No, it isn't a lightweight Oracle database. It's a full-blown synchronization platform for hand held devices.

My head is spinning with all the pieces. Just like it did when I started .Net. And MFC before that and...

Saturday, August 29, 2009

About time...

I just came across this great web-site. They have a book "The Way of the Unplugged" that describes methods one can use to design software. WITHOUT USING A COMPUTER!

I cannot wait to get my hands on their book. I read the first chapter (a free download). It describes the usual "late mistakes are expensive mistakes". The overall idea is to get as many design issues resolved as early and inexpensively as possible.

One of the big hurdles in prototyping is the technology. Many of us want something better than chicken-scratch on a whiteboard, so we use something like Visio. The problem with something like that is "it looks too good" and "takes too long". If it looks too good, people are less likely to suggest that you change it. If it takes too long, you won't do it in a meeting, meaning you'll go back to your desk, put together the diagram, send it around, THEN have another meeting (repeat until exhausted) With their product GuiMags, you can put together a Visio quality prototype at whiteboard speed.

Their book "The Unplugged" describes the effective use of their product and other ways to resolve issues early in the development cycle. Ideas like this are perfect for locking everyone in a "war room" ordering pizza and getting a good design quickly. WITHOUT USING COMPUTERS!!!!

Saturday, June 6, 2009

Beware of fsck

One of the database administrators at work was about to migrate a large database onto a new Linux server when he noticed a huge difference between the amount of disk space allocated and the size of the files. Wanting to ensure his success, I decided to let the system reclaim any lost space by using the fsck command.

Before running the command I verified all of the command line options to make sure that I wasn't going to break anything. I ran fsck /y and let the fix run. I rebooted the system when prompted and the OS found more errors and ran fsck automatically like it's supposed to. I thought things were going pretty well. After another reboot, fsck wouldn't even run. Nothing else would either.

I did say I checked the command line options didn't I? Well there's one little thing I forgot. You shouldn't run fsck on an active Read/Write partition..... Yep! Toasted file system. We'll be reinstalling on Monday.

Saturday, May 30, 2009

I haven't disappeared!

I've been working on several interesting items. Unfortunately, they don't all have neat little fixes...

I've been working on migrating an Oracle database from Windows with direct attached storage to Linux with network attached storage.

On a more interesting note, I've gotten Mercurial ( a distributed version control system ) working under IIS!!!

With this, I won't need to fire up a Linux virtual machine to handle version control. (Yes, I know Apache runs under Windows. I was never able to get Mercurial properly configured under Apache.)

Wednesday, May 13, 2009

ODP.Net 10 - Data Change Notification

AAARRRGGGHHH!!!!

It was a perfect storm.

Version 10.... of Oracle's ODP.Net seems to misbehave... IF

You use data change notification
-- and --
hook up a delegate
-- and --
You have a CLOB in the table being watched

The latest (beta) release of 11.... works fine. Guess what? Too many other things are using 10 and would need to be retested. No time now.

What to do? Today I'll be trying a few things. (In order of nastiness)
  1. Create a timer to check for changes. I'll still hook up the DCN to the database, but instead of responding to the change immediately, I'll use the timer to check for changes (ON MY TERMS)
  2. If that doesn't work, I'll split the CLOB off to another table
  3. If THAT doesn't work, I'll have to poll the database and compare the results to what I already have in memory.
I'll let you know how it works out in the end...

-- Edit 5/30/2009 --
The problem turned out to be the connection. My connection to the database kept closing. Since I was trying to optimize my system, I opened the connection at the beginning and expected it to remain open. (It didn't) Any way; when you try to use a database connection that is no longer valid, you do not always get an error message or an exception. You get !@#$% ( I mean "a hung process")

Saturday, May 9, 2009

Installing VMware on Windows

Registration and Download
  1. Go to VMware.com and register for download. http://www.vmware.com/download/server/
  2. When your e-mail arrives Write down the serial number then click on the link provided
  3. When the download finishes, double-click on the executable and W A I T ....

Installation
When the installation wizard FINALLY comes up
  1. press next
  2. Accept the license, then press next
  3. Select where you want to install the SOFTWARE. This does NOT have to be where you will create the virtual machines
  4. Press Next
  5. Select where you want to create the virtual machines. If you have a second hard drive, I would put the images on a different drive than the software
  6. Change the FQDN to localhost
  7. If you are on Windows XP and use "Fast User Switching" (and you want to continue to use it), uncheck "Allow virtual machines to start and stop automatically with the system". More on this later.
  8. Press Next
  9. Select which shortcuts you want. If you aren't going to be using a virtual machine all the time, I'd uncheck Desktop and Quick Launch toolbar
  10. Press Next
  11. Press Install... And W A I T some more.
  12. When the installation is almost over, you will be presented with a registration screen. It says it's optional and you can do it later. Don't believe it. I spent a full day trying to make an installation work, after I did this. I couldn't get the registration number to work for anything. Oh, by the way, you cannot use the system without entering a registration number. Enter your registration information NOW.
  13. Press the Enter button
  14. Press finsh
  15. If prompted, reboot your computer.
If you did not check "Allow virtual machines to start and stop automatically with the system"
1. Create a batch file named "Start VMware" containing the following:
net start "VMware Host Agent"
Save the file and create shortcuts on the desktop and/or the start menu pointing to this file. Clicking the link will start the required services. If you don't start the services, you will not be able to start any virtual machines.

2. Create a batch file named "Stop VMware" containing the following:
net stop "VMware Host Agent"
Save the file and create shortcuts on the desktop and/or the start menu pointing to this file. Clicking the link will shut down the services previously started. If you don't stop the services, you may corrupt one or more virtual machines.


Using VMware
  1. If necessary start the services (see above)
  2. From the start menu select VMware --> VMware Server --> VMware Server Home Page
  3. Your browser will open. If you are presented with a warning about a questionable certificate, you should accept it.
  4. You will eventually see a screen prompting you for your ID and password. Enter the ID and password you used to log in to Windows.
  5. When finished remember to stop the services (if you started them manually)
You can start creating virtual machine images now. (And I'll describe that in a future post)

Friday, May 8, 2009

Oracle XE on Ubuntu

Oracle XE on Ubuntu

Almost ANY left over machine can run Oracle XE on the popular Linux distro Ubuntu. Even if you've never used Linux, you can have a working database in just a few hours

This post will assume that you've already install Unbuntu Server 9.04. It goes by the cutesy name "Jaunty Jackelope".
During the install you should have created a user for Oracle - ID = oracle, password = oracle. All of the commands in this post will follow this assumption.

If you have less than 1GB of memory, you will need to create a swap file, before starting the real install:
sudo sh
dd if=/dev/zero of=/swpfs1 bs=1M count=1000
mkswap /swpfs1
swapon /swpfs1
exit

Switch to the root account:
sudo sh

Add the download to the list of update sources:
echo "deb http://oss.oracle.com/debian/ unstable main non-free" >> /etc/apt/sources.list
If you are comfortable with vi you can use it to perform the above action manually
vi /etc/apt/sources.list
scroll to the bottom of the file and press I (for insert) and type the line below
deb http://oss.oracle.com/debian/ unstable main non-free
Press Escape, then
:wq and press Enter

Import the security key from Oracle:
wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle -O- | sudo apt-key add -

Update the packages:
apt-get update

Install Oracle
apt-get install oracle-xe
That's it! This is completely unexpected, but simple

Configure Oracle
/etc/init.d/oracle-xe configure
When prompted for the Oracle Application Express port, accept the default 8080 by pressing enter
When prompted for the database listener port, accept the default 1521 by pressing enter
When prompted for the SYS and SYSTEM password, enter a password of your choice and press enter
When prompted to verify the password, enter the same password as above and press enter
When asked if you want the database to start with the system, accept the default y by pressing enter

Make sure you can still access the system:
Installing oracle actually removed your permission to become root. It's time to put it back, BEFORE you reboot.
echo "# let oracle sudo as root" >> /etc/sudoers
echo "oracle ALL=(ALL) ALL" >> /etc/sudoers

Become yourself again (not root)
exit

Set up your environment:
echo "export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server" >> .bash_profile
echo "export PATH=$ORACLE_HOME/bin:$PATH" >> .bash_profile
echo "export TNS_ADMIN=$ORACLE_HOME/network/admin" >> .bash_profile
echo "export ORACLE_SID=XE" >> .bash_profile
echo "export LD_LIBRARY_PATH=$ORACLE_HOME/lib" >> .bash_profile

Apply your changes
source .bash_profile

You now have a working Oracle installation!!!!

BUT... you're not through yet.
Because you're running server, you don't have all of the GUI goodness. You have to access it remotely, but
first you have to tell the system to allow remote connections
Start SQL*Plus and log in as SYSTEM:
sqlplus system
Enter the password you defined earlier
At the SQL prompt enter
EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);
EXIT

Reboot:
sudo shutdown -r now

NOW you're finished.

Future posts will cover installing the client, and configuring for use under VmWare