Thursday, December 30, 2004

Settling in

Ah, to end from that wearisome nomadic feeling. What a trip. I'm here in my new office, coffee brewing in the kitchen, cable running up the hall from my bedroom to said office so that my cable modem can connect. Why?
Well, after 4 visits, a signed letter from my landlord, and me finally taking a hammer drill to the wall, I still don't have a jack in the wall of my office. I can't go into the cable company's lock box, and they can't do it without a work order. Oh the red tape.
How about the move itself? Well, Friday was an adventure of stairs and stacking... won't go any more into that. Saturday, got started 45 minutes later than we wanted, but ended up down here 4 hours later. Multiple stops to tie down the tarp on my fathers truck in a fruitless effort. Plus one 2 1/2 hour diversion in Lords Valley PA, to replace the tire on the moving truck.
A nice big spike, screw with a hex head, got lodged in the front right tire. Happily, there was a guy 1/2 mile down the road, who was in doing paperwork on Christmas day. He owns a scrapyard (with 38 cats) and happened to have a Ryder truck the same size as our Budget truck. Tires and rims were a match so after digging around for a hand jack, hiking into the far reaches of his property, and jacking the truck up, we had our wheel. Oh, $160 dollors were thrown in there too.
Was it all worth it? Well, this place is twice (literally) as big as our last place, it's first floor, I have a good sized office with a door, we have plenty of room, and it's quiet. I like it here. We both do, so we think we're gonna stay. And best of all, I've got Twizzlers!

Friday, December 24, 2004

One more thing

I guess I forgot to post it, in all the hustle and the bustle. I finished the project, or at least the portion I needed to. I was able to handle events from the Kodak 14n and copy the file to the hard drive. Now adays, everything is WIA, TWAIN, or mass storage device. Kodak makes it hard. Oh well, it works. I have to wrap up some stuff, and then incorporate it into Data.Match, but I'm glad it's done. Check out this long Channel9 post.

The trucks loaded!!!

Today, Friday the 24th we loaded the truck. Other than having my bro almost drop a couch on me, we're doing ok. We cleaned the apartment, went out to eat with my folks, and tomorrow we'll all head down to PA.
I'm blogging from my parents where my wife and I will be staying. Boy I'm tired. Got a 6 hour drive, and unloading. At least it's 1st floor, not 2nd like the one we emptied today. Guess I should check my e-mail.

Wednesday, December 22, 2004

It's almost done

I'm sure many people can't wait for me to pack up and move to PA, specifically those on the forums I've been harassing. But my project is almost done. My code recieves events from the unmanaged code, once. After that, the unmanaged code seems to hang. However, when my code closes and get's GC'd, I get errors from the unmanaged code that it can't "Read" from memory. One error message for every event that should have fired.

On the lighter side, I thought I'd post something for all those who think it's wise to teach your kids to lie from an early age. 'It's only a little lie.'

Christmas Trivia
1. The average American takes six months to pay off holiday credit-card bills.

2. What is Pogonophobia: The fear of beards.

3. There are currently 78 people named S. Claus living in the U.S. -- and one Kriss Kringle. (But many Krispe Kremes)

4. December is the most popular month for nose jobs.

5. Weight of Santa's sleigh loaded with one Beanie Baby for every kid on earth: 333,333 tons.

6. Number of reindeer required to pull a 333,333-ton sleigh: 214,206 -- plus Rudolph.

7. Average wage of a mall Santa: $11 an hour. With real beard: $20.

8. To deliver his gifts in one night, Santa would have to make 822.6 visits per second, sleighing at 3,000 times the speed of sound. At that speed, Santa and his reindeer would burst into flame instantaneously.

Tuesday, December 21, 2004

I am panicing!!! I need to resolve this.

This is the last step I need to complete before I leave. I just need to catch the events. Now I don't get an exception, but I know the events have to be firing. Why doesn't the unmanaged code fire my code!!! Am I passing the wrong thing?!?! Help please!

Check out the details here.

I need help!!!

I'm posting everything I've got for this project. Here's the link. Please, please, please, I have one last part, and 2 days to do it.

You can look at the last post on this blog to see what I'm having problems with.

Monday, December 20, 2004

I can read pictures through the proprietary software!

I finally got images off this stupid Kodak camera. Only 1 task left, but I'll let you see what I've done so far.

'Get a handle to the directory
myStatus = Me.KAllocDirItemByPath(myCameraRef, myFolder, myDir)

'Allocate a direcotry iterator for that folder
If myStatus = 0 Then myStatus = Me.KAllocDirectoryIter(myDir, myDirIter)

'Iterate to the next directory item
myStatus = Me.KIteratorNext(myDirIter, myDirItem)

Do Until myStatus <> 0

I set it up this way. You have to get a handle to directory, passing in a string for the path name. (ie. "Camera\Card1\DCIM\FolderName\")

Then you get an iterator, and walk the iterator for the different files.

In my loop I have this code:
'Create a handle to the source file
myStatus = Me.KAllocIORef(myDirItem, mySrcIO)

'Create the handle to the file. The handle is a fileStream(fStream).handle
fStream = New IO.FileStream(memPath.ToString, IO.FileMode.Create)

'Create a handle to the destination
myStatus = Me.KAllocIORefFromFileHandleRef(Me.myLibMgr, fStream.Handle, Me.myTrgIO)

You follow all that? When I get the file as 'myDirItem' (an IntPtr Kodak's software uses to point to the file) I pass it to Kodak to create an IO Reference to the file. I create a file stream (much simplified thanks to .Net) and then pass that to Kodak to get an IO Reference to the stream.

Then I use one more Kodak functions to read from the IO Ref to the file, filling a buffer, then another to write to the IO Ref to the stream. They sure have a lot of functions.

The problem I had had was what to do for a buffer. Mostly when I've written a file, I've read right into the stream, or something similar. I had to create a buffer like so:
Dim theBuffer(524288) As Byte

Now some of you sharp guys will say, 'Hey, files aren't always going to be 500k!' You're right. I did this:
numBlocks = CType(Math.Floor(fileSize / theBuffer.Length), Integer)
finalBlock = fileSize - (numBlocks * 524288)

For blockIndex = 0 To numBlocks - 1
'// Read from the camera's memory
myStatus = Me.KRead(mySrcIO, theBuffer.Length, theBuffer)

'// Write to the host file
myStatus = Me.KWrite(myTrgIO, theBuffer.Length, theBuffer)

'// Read the final block
ReDim theBuffer(finalBlock)
myStatus = Me.KRead(mySrcIO, finalBlock, theBuffer)

I broke the file into 500k chunks, then when I was done with the nice clean chunks, wrote the leftovers.

Now, for any of you who are saying, 'This guy knows his stuff!' or 'This guys an idiot!', I'm simply porting Kodak's demo code for reading/writing files.

One more thing. The unmanaged read/write wraps:
Declare Auto Function KRead Lib "DCSPro4SLR.dll" Alias "KPDCRead" (ByVal inIORef As IntPtr, ByVal inCount As Integer, ByVal outBuffer As Byte()) As Integer

Declare Auto Function KWrite Lib "DCSPro4SLR.dll" Alias "KPDCWrite" (ByVal inIORef As IntPtr, ByVal inCount As Integer, ByVal inBuffer As Byte()) As Integer

You've got to Marshal the Buffer (Byte() or Byte array) to an unmanaged LPArray.
So that's it. Hope this helps somebody.

My next issue? The unmanaged code firing an event in my code!!! Look here! I know the unmanaged code is recognizing events, because it makes my code throw an exception. Not sure why, or how to troubleshoot.

Friday, December 17, 2004

Another C++ to VB conversion, a Buffer?

// Pointer to tranfser buffer
unsigned char* theBuffer = NULL;

In .Net (Visual Basic) how do I do that?

Thursday, December 16, 2004

So, I posted my question...

To MSDN. You can reply here, there, or e-mail. I'm also going to go through old posts, and clean up the code so it's a little more readable.

Wednesday, December 15, 2004

For my next trick

Okay, so I'm able to pass strings out now. ByRef/ByVal... stupid fat fingers.

My next step is to convert this function into VB: (I will be working on it tomorrow. GENERICREAD?!?!)
KPDCStatus CreateDestinationFile( KPDCProcsPtr pProcs,
KPDCLibMgrRef libMgr,
char* fileName,
KPDCFileRefHandle* fileRef)
KPDCStatus theStatus = KPDC_OK;
char theFilePath[MAX_STRING_LENGTH];
KPDCUInt32 theAttributeSize = 0;

// Set up the file path
strcpy(theFilePath, "C:\\");
strcat(theFilePath, fileName);

// Create the file
theFileHandle = CreateFile( theFilePath,
if(theFileHandle == INVALID_HANDLE_VALUE)
theStatus = (KPDCStatus) GetLastError();
*fileRef = (KPDCFileRefHandle) theFileHandle;


More on this project

Okay, the big issue I was having was that my functions would end an an unhandled exceptrion would occure. I figured out that the IntPtrs I was passing to the unmanaged code were getting GC'd when my function ended. But the unmanaged code was still trying to use it. So I made the IntPtrs global, an it worked.

Here's the new one. I posted on MSDN. I need to deal with events. I don't know what events the DLL raises, but it has a method where you can pass your function to the unmanaged code.

The function definition looks like this:
KPDCStatus KPDCSetCameraEventNotification ( KPDCCameraRef inCameraRef, KPDCCameraEventNotificationFunc inNotificationFunc, void *inUserData);

In the demo code, they provide a typedef that looks like this:
typedef void (KPDCCALLBACK *KPDCCameraEventNotificationFunc)(
KPDCUInt32 inEvent, // The event code, see KPDCCameraEvents
KPDCUInt32 inParam1, // Events may have an integer parameter
const char *inParam2, // Events may have a string parameter
KPDCUInt32 inParam2Length,
void *userData);

Tuesday, December 14, 2004

I got it to take a picture

I've gotten my software to snap the camera, taking a picture. Now I have to refactor the code, cleaning it up, and putting necessary funcionality into the wrapper as opposed to my test code.

I also need to handle events given out by the unmanaged DLL.

I also have pics of my apartment.

Marshaling Samples, 'Let's play nice now Pardna'

Woa, this is a breakthrough for me. Check out this article on MSDN. Some Marshaling examples. I'm gonna print these out I think.

Monday, December 13, 2004

HandleRef examples in VB .Net

Anybody? In my last post I posted native function declarations, and what I did to wrap them. I used a bunch of IntPtrs. I'm thinking, after some reading and followups on newsgroups, that I should be using HandeRefs, at least some of the time.

Do you have any examples? (ie. Iterators, Strings, Ints, etc.)

When should you use HandleRefs, as opposed to IntPtrs?

Some of my C++ to VB conversions

So, I have C++ function declarations, and their VB wrappers. Anybody see anything wrong with them?

TypeDefs in demo C++ code:
typedef void* KPDCOpaqueRef;
typedef KPDCOpaqueRef KPDCLibMgrRef;
typedef KPDCOpaqueRef KPDCIteratorRef;
typedef KPDCIteratorRef KPDCCameraIterRef;
typedef KPDCOpaqueRef KPDCCameraRef;
typedef KPDCIteratorRef KPDCPropertyIterRef;
typedef KPDCOpaqueRef KPDCPropertyRef;
typedef KPDCIteratorRef KPDCDirectoryIterRef;
typedef KPDCOpaqueRef KPDCDirItemRef;
typedef KPDCOpaqueRef KPDCIORef;
typedef KPDCOpaqueRef KPDCImageRef;

Native Def:
//Get the size and type for the specified attribute ID.//
KPDCStatus KPDCGetAttributeInfo(KPDCOpaqueRef inRef, KPDCAttributeID inAttrID, KPDCDataTypes *outAttrType, KPDCUInt32 *outAttrSize);

My wrap:
Declare Auto Function KGetAttributeInfo Lib "DCSPro4SLR.dll" Alias "KPDCGetAttributeInfo" (ByVal inRef As IntPtr, ByVal inAttrID As Integer, ByRef outAttrType As KPDCDataTypes, ByRef outAttrSize As Integer) As Integer

Native Def:
//Get the value of the specified attribute ID. If the attribute is the KPDCPropValueID of a property, then the value of the property will be retrieved from the camera.//
KPDCStatus KPDCGetAttributeValue(KPDCOpaqueRef inRef, KPDCAttributeID inAttrID, KPDCUInt32 *inOutAttrSize,

My wrap:
Declare Auto Function KGetAttributeValue Lib "DCSPro4SLR.dll" Alias "KPDCGetAttributeValue" (ByVal inRef As IntPtr, ByVal inAttrID As Integer, ByRef inOutAttrSize As Integer, ByVal outAttrValue As IntPtr) As Integer

Native Def:
//Allocate a property iterator for camera properties.//
KPDCStatus KPDCAllocPropertyIterator ( KPDCCameraRef inCameraRef, KPDCPropertyIterRef *outRef);

My Wrap:
Declare Auto Function KAllocPropertyIterator Lib "DCSPro4SLR.dll" Alias "KPDCAllocPropertyIterator" (ByVal inCameraRef As IntPtr, ByRef outRef As IntPtr) As Integer

Native Code:
//Return a reference to the first item that has the string specified by inName and the value of its name attribute. The iterator points to the found item. A subsequent call to KPDCIteratorNext returns the item following the found item in the list.//
KPDCStatus KPDCIteratorFind(KPDCIteratorRef inIteratorRef, const char *inName, KPDCOpaqueRef *outFoundItemRef);

My Wrap:
Declare Auto Function KIteratorFind Lib "DCSPro4SLR.dll" Alias "KPDCIteratorFind" (ByVal inIteratorRef As IntPtr, ByVal inName As System.Text.StringBuilder, ByRef outFoundItemRef As IntPtr) As Integer

Native Code:
//Return a reference to the next enumerated item. After creating a new iterator or calling KPDCIteratorReset, this function returns the first item. If there are no more items, outNextItemRef will not be valid.//
KPDCStatus KPDCIteratorNext(KPDCIteratorRef inIteratorRef, KPDCOpaqueRef *outNextItemRef);

My Wrap:
Declare Auto Function KIteratorNext Lib "DCSPro4SLR.dll" Alias "KPDCIteratorNext" (ByVal inIteratorRef As IntPtr, ByRef outNextItemRef As IntPtr) As Integer

Native Code:
//Reset the iterator to point to the beginning of the list.//
KPDCStatus KPDCIteratorReset(KPDCIteratorRef inIteratorRef);

My Wrap:
Declare Auto Function KIteratorReset Lib "DCSPro4SLR.dll" Alias "KPDCIteratorReset" (ByVal inIteratorRef As IntPtr) As Integer

Okay, latest and greatest on this project.

I have a button that calls an unmanaged function looking at the properties in the camera. I'm getting a NullReferenceException AFTER the function runs in

I declare a bunch of IntPtrs at the begining of my class that are all Private. (The .Dispose method calls a function called FlushIt, that calls an unmanaged function to clear those IntPtrs.)

Here's the function. Remember, it's after this that I get my errors. But something here probably isn't getting cleared correctly. The function calls unmanaged code to walk an iterator which was created by unmanaged code. I've also included the Private Declarations of the IntPtrs. 'myPro4' is the managed wrapper to the unmanaged DLL.
'References, IntPtrs, for each one of these you must
'Add a FreeRef command in FlushIt
Private myLibMgr As IntPtr = Marshal.AllocHGlobal(1)
Private myCamIter As IntPtr = Marshal.AllocHGlobal(1)
Private myDirItemRef As IntPtr = Marshal.AllocHGlobal(1)
Private myIORef As IntPtr = Marshal.AllocHGlobal(1)
Private myCameraRef As IntPtr = Marshal.AllocHGlobal(1)
Private myPropIter As IntPtr = Marshal.AllocHGlobal(1)
Private myPropRef As IntPtr = Marshal.AllocHGlobal(1)
'End References, IntPtrs

Private Sub FireCamera()
Dim thisCamera As String 'How we know what camera we're on as we iterate.
Dim theSize As Integer = 0
Dim theDataType As Integer = 0
Dim ptrToAttrib As IntPtr = Marshal.AllocHGlobal(1)
Dim ptrToLabel As IntPtr = Marshal.AllocHGlobal(1)

'Look for the camera
'Get the camera reference
myStatus = myPro4.KIteratorNext(myCamIter, myCameraRef)

'Get the serial
myStatus = myPro4.KGetAttributeInfo(myCameraRef, 501, theDataType, theSize)
If myStatus = 0 Then myStatus = myPro4.KGetAttributeValue(myCameraRef, 501, theSize, ptrToAttrib)
thisCamera = Marshal.PtrToStringAnsi(ptrToAttrib)

Loop Until thisCamera = useCamera

'Get the Iterator of properties for the camera
myStatus = myPro4.KAllocPropertyIterator(myCameraRef, Me.myPropIter)

'Get the reference to the 'saveEnable' property
If myStatus = 0 Then
Dim theProperty, theLabel As String
myStatus = myPro4.KIteratorNext(myPropIter, myPropRef)

'Get the serial
myStatus = myPro4.KGetAttributeInfo(myPropRef, 1004, theDataType, theSize)
If myStatus = 0 Then
myStatus = myPro4.KGetAttributeValue(myPropRef, 1004, theSize, ptrToAttrib)

If myStatus = 0 Then
theProperty = Marshal.ReadInt32(ptrToAttrib)
End If

myStatus = myPro4.KGetAttributeValue(myPropRef, myPro4.KPDCPropEnumValueLabelID(Marshal.ReadInt32(ptrToAttrib)), 256, ptrToLabel)
If myStatus = 0 Then
theLabel = Marshal.PtrToStringAnsi(ptrToLabel)
End If

End If

Call Me.WriteOutput(theLabel & " - " & theProperty)

myStatus = myPro4.KIteratorNext(myPropIter, myPropRef)

Loop Until myStatus <> 0

WriteOutput("Could not load camera properties")
End If

'Clean up a bit
myStatus = myPro4.KIteratorReset(myCamIter)

Catch ex As Exception
Call Me.WriteOutput(ex.ToString)


End Try
End Sub

Friday, December 10, 2004

Kodak's DCS SDK

Kodak's Digital Camera System SDK can be found here.

Out standing issues on my current project

I am developing a .Net wrapper for Kodak's Digital Camera System SDKs. These are basically the DLLs for handling Kodak's Pro cameras, like the 14n.

The documentation is good, but in C++. So the stuff I want to do I need to convert to VB .Net, cause that's what I know. (Tho I'm getting a crash course in C++.)

Issue #1
This occurs when the following code runs:
Private Sub btnTest1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTest1.Click
Call FillCameras() <---
End Sub

Now, the first thing you'll say is, 'FillCameras is your problem. Something in there.' And you may be right, but the weird thing is, if I put a breakpoint at that line (with <---) and let the program/code run after it pauses, no problem. Once it runs once, I can remove the breakpoint and fire this button at will.

Issue #2
I get StackOverflowExceptions at other times. Is there a way to know why? The code seems to go fine. I go through a number of things, firing functions I've wrapped, and getting somewhat expected results. But when my function ends, I get the overflow. Is Garbage Collector trying to clean up and puking? How can I troubleshoot this? I don't get much debugging info in the way of code to read, it's something behind the scenes.

Thursday, December 09, 2004

More to sell...

I'm posting more items to my e-bay auctions. Please take a look. I have some electronics, as well as some Dolls that will be going up.

An atheist believes in god...

Famous Atheist, Antony Flew, at age 81 has announced he now believes in a god... of some sort.
At age 81, after decades of insisting belief is a mistake, Antony Flew has concluded that some sort of intelligence or first cause must have created the universe. A super-intelligence is the only good explanation for the origin of life and the complexity of nature, Flew said in a telephone interview from England.
The derivatives that Catholicism/Protestantism have portrayed of god have lost so much of the god of the bible, it's no wonder people can't put their faith in it. But also, people are finding it harder to swallow evolution as the supreme source of life. If people dig a little deeper, they'll find the answers.

Wednesday, December 08, 2004

Okay, so I’m a novice programmer.

What may seem glaringly obvious, or extremely exciting, probably won’t do much for me. Learning how to write a text file? Now that was exciting.

But as I learn and grow in this competitive and fast moving environment I look over things that are now old news and WOW! It all comes clear.

.Net was where I started. So it was hard for me to see how wonderful it made life. As I try to wrap an unmanaged library the beauty of .Net screams out. Metadata!!!

If I need to consume a .Net based Web Service, Metadata tells me all about the functions, properties and other goodies I need to consume it. If I need to use functionality in a managed library, Metadata makes Intellisense possible.

If I want to access an unmanaged library, it’s locked up tighter than Fort Knox. There is nothing to tell me the names of the functions, let alone their signatures. I don’t know what it does or what I can use it for unless I troll through documentation or find source code that uses it.

I guess I’ve had the easy life as far as becoming a programmer is concerned. With such a beefy framework and so much experience as far as programming is concerned, it’s like nuclear science. My grandparents had no idea what went into nuclear power, I learned it in grammar school.

I know, I'm posting too much...

But this is a real interesting article. I specifically noted this paragraph:
Since the time of Adam Smith, we've used the wealth of nations as a proxy for the well-being of nations. We measure whether life is getting better by checking whether the good numbers (GDP, personal incomes, and so on) are going up and the bad numbers (unemployment, inflation, and so on) are going down. However, over the past half century, something strange has happened. The US's per capita GDP - the value of all the goods and services a nation produces divided by its population - has nearly tripled, but American well-being hasn't budged. We've grown almost three times richer but not one jot happier. There's ample evidence that in all postindustrial societies, material wealth and broader happiness are no longer closely in sync.

So more money isn't more happiness? But that seems to be the only focus of the world, to make more money.

1500 visits! And new tech links!

Yes, we did it. Yesterday, my simple little site had it's 1,500th visit. Maybe that's not much, but it's good to remember those milestones.

As for tech, I should be getting a fire-wire card today at work, so I can test out tethered operation.

Also, I was offered this site as a reference for NUnit with VB. I've read it over briefly, and it's worthy of posting about. I'm going to work through the practice exercise ASAP.

My buddies, Dan and Jerry got back from Germany. Their pics are up if you know them and care to look. Dan's weblog is listed under my 'Friend Links' section.

Tuesday, December 07, 2004

One more thing...

I've looked up the local INETA associated .Net users group, Central Penn .Net. Figured it's be good to have local coders in my network of contacts.

New additions

I've made some additions to my Clive Cussler book page. You can now order any of the books listed there. Please do, they're very good.

So, what's the news?!?!

Update: I changed a question to a statement. I will be moving!
I guess I can tell you now, everybody else that needs to know first knows.

My wife and I will be moving to the Lebanon, PA area at the end of December!

What does this mean for my weblog? Not much, there might be a gap in posting, but hopefully not much.

What does this mean about the current project, Wrapping an unmanaged DLL? I would like to finish that. I don't think it will take too much more. They've written the hard code, I'm just wrapping it.

Anybody know anyone down that area looking for somebody to work for them? Let me know. I've tried to line up a job, but I've only gotten some nibbles.

Monday, December 06, 2004

An ambitious project

The software I developed for my company, has performed well for our customers, causing them to choose it over offerings by Kodak (Groups) and PhotoLynx (SPS). The one shortcoming, photographers want the software tethered to the camera. That is, when the camera takes a picture, it is imediatly in the software, ready to be flagged with the student's information.

Well, Kodak does offer an SDK. It consists of 3 libraries (DLLs) and some sample code. The code is in C++ and was written using Visual Studio 6.0. My mission, that I've seemed to have accepted, is to write a managed code wrapper, using Visual Basic .Net, so that my software can consume and tether to the Kodak cameras.

Right now, I am at a standstill. I believe I have written code that will initialize and talk to the camera, but I don't have the cable to connect the camera to the PC for testing. So right now I get error codes from the .DLLs saying they can't initialize, which makes sense. But I also get this:
System.Runtime.InteropServices.MarshalDirectiveException: PInvoke restriction: can not return variants.

Here's the code that does it:
Dim myLibMgr As IntPtr = Marshal.AllocHGlobal(1)
Dim myCamIter As IntPtr = Marshal.AllocHGlobal(1)

myStatus = myPro4.KInitialize(KodakDCSIntf.Pro4.KPDCInitalizationOptions.KPDCInitOptionEnableIEEE1394, myLibMgr)

myStatus = myPro4.KAllocCamera(myLibMgr, myCamIter) <-----

I've wrapped the DLL like so:
Declare Auto Function KAllocCamera Lib "DCSPro4SLR.dll" Alias "KPDCAllocCameraIterator" (ByVal inManagerRef As IntPtr, ByRef outRef As IntPtr)

I think that it's not sure what to do, or the myLibMgr object is not valid. In the demo code, it doesn't get to AllocCamera if Initialize doesn't return a valid response (myStatus = 0).

Another link and a teaser

I put another link on my sidebar here, but it's a link to a page of links. I am going to start saving useful programming links to this page so that others can benefit from them. As I get more I will sort them out, but this is a start. I have many to put there, but these are some good ones.

Also, I will be putting some REALLY BIG NEWS here soon, so keep watching. (No, we're not having a kid.)

Friday, December 03, 2004

Continuing to try to understand

It seems there is much in life and in programming I do not understand.

I have this code:
typedef KPDCUInt8* KPDCPointer;

typedef enum
KPDCRed = 0, // Currently, RGB is all we got.
KPDCGreen = 1,
KPDCBlue = 2,

KPDCMaxNumComponents = 8 // The maximum number of components conceivable.
} KPDCColorComponents;

typedef struct

KPDCPointer componentPtr[KPDCMaxNumComponents];
// Array of pointers to the components,
// indexed by KPDCColorComponents.
} KPDCPixelLayout;

typedef enum
KPDC_CameraModelUnknown = 0,
KPDC_ProBackCamera = 0x4000,
KPDC_ProBack645 = 0x4001,

} KPDCModelCodes;

I want to do the same thing in VB .Net. I know how to do structures and enumerators. What I don't know is what to do about the pointer, and then what to do about the last enum mentioned (KPDCModelCodes). How do I get those values into VB.Net?


There's something I'm learning. There's water, and there's beer. You might have soda, or maybe fruit juice. But when it comes to most consumed, it's water or beer. Programmers, geeks, and techies are big fans of beers.

Take a look at my friend's site. This is a page on his site talking about some of his beer tours. The first one on the page is the New England area. I must say, however, if he comes through again, he may want to take a look at Long Trail. I am wondering at his opinion. He does mention a good Black and Tan recipe.

I hope to some day soon have the room and time to invest in brewing at home. Knowing several 'home brewers' has given me a desire to try it myself. That, and the fact that on a Sunday night, with nothing to do, and no 'cold ones' in my fridge, I cannot run to the store to purchase beer. Thanks Connecticut.

I've got the power!!!

I set up an FTP site at home last night. Tried to button it up tight. It's nice, I was able to send files from work right to my home PC. Maybe I'll get it set up so I can edit my home site when I'm away. I'll see. It's just nice to have the flexibility.

Thursday, December 02, 2004

New things I'm learning

I'm trying to write a managed code wrapper for some libraries written in VC++ 6. I have sample code, also written in C++. I'm a bit rusty on C++, so I dusted off a few of my books, to try to learn a bit more about this language. What I put here is for anybody's benefit, but mostly for my own memory.

I started seeing function declarations like this:
void myFunction(int varA, void *varB)

What's this *varB? Well, in VB.Net, it's passing the variable 'by reference'. You'ld do it like so:
myFunction(ByVal varA As Integer, ByRef varB As Object)

In C++ this is called indirection, and varB would be called a pointer. C++ can use this to access stuff off the heap, as opposed to the stack.

Whoa!!! What are you talking about now!?!?

More fun stuff I learned. The term stack refers to the area of memory allocated to your program. The term heap refers to the computer's virtual memory. Stack is like inside your sandbox, all alone, safe and sound. Heap is the rest of the playground with all the other children, where you might get your toes stepped on.

Hope that clears things up for us all.

Ah... so that's what P/Invoke is...

Found this, thanks to David Browne on MSDN newsgroups. (Aren't VB guys nicer already?)

The article on MSDN is here.

Basically I have this .dll that provides certain functionality I want. How do I use it? Well... this article tells me how. I will now continue to read and learn? Hope this post helps you find what you need.

Wednesday, December 01, 2004

Now I know why I've done mostly Visual Basic

The people. The C++ people seem mean. Maybe I'm biased, I've only received replies from 1 guy. But hey, if the others are so nice, why don't they help.

I downloaded some C++ stuff (Visual C++ 6.0) and converted it to 2003. I go in and try to compile... Files are all over the place, nowhere to be found. So I have to go through all the includes, specify the paths... Then I compile again.

LINK : fatal error LNK1181: cannot open input file '.\debug\KPDCLoader_Win.obj'

Hmm... Okay, it can't find that file. I can't find it either. Well, it's a Linker error, maybe there's a problem linking some files, the paths were all messed up.
So, I hit F1, and get this:

cannot open input file 'filename'

The linker could not find filename because it does not exist or the path was
not found.

A lot of help that was. So I go on to MSDN's newsgroups. I don't know any sites, or tutorials, all my C++ books are at home, maybe I'd find a friendly ally to help me out. Here is my first reply:
Put the blinking cursor in the 'Build' window on the error code and press
F1. The help should be quite informative.

Yeesh... Come to find out, one of the .c files the project had listed, wasn't in the correct folder, the path was invalid. But I didn't get a message for that, the linker skipped that, and tried to run the file it hadn't created. Fun, fun.

Tuesday, November 30, 2004

Some interesting Science news

This brain will someday offer a mean game of F29 retaliator.
And this helmet is pretty cool. Now if only I had a bike to try it out on...

And on a sad note, never try to get a lava lamp going using your stove.

Monday, November 29, 2004

How easy to set up an online store

My friend Lyn just set up herself to e-bay. She has some nifty antiques. I just thought it was great that people can sell online, all over the US, or world, so easily. Her father's site has more technical stuff.

Friday, November 26, 2004

Just got offered a job at Microsoft...

In India, Hyderabad. Guess their pretty desperate to get folks over there if they want me.

Deep Six rocked

Finished Deep Six. Now I have to find The Mediterranean Caper. I'm going to head to the library right now, if it's open.

Thursday, November 25, 2004

Wow... Wikipedia is a pretty nice site

I saw another article mentioning Wikipedia. The first thing I did, to see how accurate it was, and if it was just loads of geek info, was to look up 'Jehovah'. Now they did not have a direct page for just the name Jehovah, they did point to associated topics, Gods of Judaism, God, and Jehovah's Witnesses, a very well rounded description of the organization.

So, I think from now on, I have an online encyclopedia to use, if ever I have need of it.

Wednesday, November 24, 2004

1 year of posts!

Wow! I've been blogging for a year!!! Just noticed as I was going through some referrals. Yea to me... I guess.

So, what was I talking about a year ago? Well, I was excited about this weblog. I was working on thumbnails appearing on our site dynamically. An issue that is now the norm here. I was excited about re-writing The Image Connection in ASP .Net. Boy, I didn't know what I had in store for me.

My cousing had just gotten married, and my wife and I took our first plane trip to see him. Congrats Nick we hear you're doing good.

Well, that's it for now. TTYL.

I want one...

I've been looking into getting another computer at home. Something with a little more umph, something mobile, something I can work from. It looks like the Toshiba Portege 3505 is the one for me.

It has Wi-Fi. It does have a DVD which is nice, but it's external. It's got 1.3GHz, 40GB of storage, and 512 MB of Ram for under $1.1k. (Depending on when/where you get it.)

But of course, money is the key... so it looks like I'll be waiting a while. (Donations can be made by clicking the button to the right.)

I'm missing the sea, that cold mistress...

I like to read Wired, cause they have some interesting articles. Since I've been reading shipwreck novels, these two articles interested me greatly:
Dive! Dive! Dive! talks about the different environments you'll find at different depths.

The Drive to Discover is director James Cameron talking about why he wanted to do Titanic.

Tuesday, November 23, 2004

Dirk Pitt, you've got a new fan

So I'm about half way through Deep Six, by Clive Cussler. It's gripping, interesting, logical, puzzling... I think I have a new author for my favorite authors list. I have a list of his books to the right. Thanks Joel for pointing me in his direction.

Monday, November 22, 2004

Buy my book

Looking for a book on Visual Interdev? Try this

A cheap effort at attention

In an effort to boost traffic I thought I'd mention some popular topics on search engines. The top 6 from Yahoo are:
Apprentice Jeans
Gerald Ford
Chelsea Clinton
Steve Spurrier
Life As We Know It
Presidential Libraries

Now, I'm not political, so 3 of the 6 I don't care so much about. 2 I don't know about. The top one though, Apprentice Jeans, is in reference to the Jeans that the applicants on The Apprentice had to do a marketing campaign for.

I haven't watched the apprentice as much this season. Trump is firing the better players, and I haven't liked his calls. Plus, I have a study on Thursday nights, the night it airs, and so haven't had the time to watch it. I did catch the end of this episode though. Not as impressive.

On the programming side of things, we're looking at projects for next year. Basically, we have our foundation on the various fronts. We just need to round them out. Improve or fix the features that are there, and then see what features we can add in. Going to do some with FTP transfers from our client software, maybe revisit image cropping.

I'd really like to re-attack the new user set-up. Our users need an FTP account created, but I was never able to get that to work. So I have to go back to the drawing board.

Interesting to me on the Yahoo Buzz...
10 Nuclear Weapons
11 The Wonder Years

Sorry Kevin... you'll have to be a little more threatening to move up the ladder.

Saturday, November 20, 2004

Don't ask where I'm blogging from...

Let's just say my father's house has Wi-Fi and I find laptops in the strangest places. But, it allows me to make good use of some otherwise unused time... unused, that is, by half of my body.

PHP, Chapter 2

So I just finished reading Chapter 2 and coding all the examples of PHP and MySQL for Dynamic Web Sites by Larry Ullman. I like the format of the book. For a coder, this gets me moving pretty quickly. And for all you PHP fans, I must say, I liked the explode/implode methods and the fact that I could address an array of check boxes right from the code. Perhaps VB has something like this. I know I am very under experienced when it comes to the string.format function.

I do hate having to use $_PAGE[''] to get to my variables, and have yet to figure out how to get PHP Designer to auto-complete that.

I'm going to have to post this book on my books page. I'll also have to link to that page on my side-bar. For now, if you want to see some books that have helped me, check out my books page on my geocities site. Follow the link on the right that says My Page.

Friday, November 19, 2004

Posting from home

Okay, for those of you looking for something a little more rich than a text editor to do PHP. (If you really have to do PHP.) Try PHP designer. It's nice to have an app that highlights the {} for you when that's what you have to use. I'm still getting use to it's autocomplete, but that's a nice feature too.

Now, since I've been working from home doing some stuff, I obviously need to have a web server to try it on. Being the cheap geek I am, I didn't want to pay for hosting. So I'm running Apache. (See previous posts that I am too lazy to link to.)

'Well... what is it?' you say. It's not much.

But now at least it's something.

Thursday, November 18, 2004


Down with Spammers!

Actually, hmm... on a bad month, he made $400k. So you work 1 month, buy a decent house for $400k, then work another 8 months, you'll have enough for $40k a year for 80 years.

Just to be safe, you could do that for 1 year, and never have to work again...

Check out my auctions

I put a link to the right, trying to subsidise my educational budget. Click on 'Currently on Ebay' to see my current auctions. Thanks.

Current views...

I received a letter yesterday, from a company offering me a credit card. How nice. Nothing new really, happens all the time. But this one was different. This one had a dummy card, with it's raised numbers pressed against the envelope. What is more, somebody discovered this, and had rubbed the envelope in such a way that the numbers were visible to the outside world.

Now, this is not a real credit card mind you. And most real credit cards (or at least the 2 I've seen) come wrapped in paper so that it would not be possible to rub the numbers visible. But it just goes to show what people will try.

On programming... I'm waiting for my next .Net Developer's Journal. Haven't done too much PHP. And at work I'm trying to juice up some of the dynamic portion of the interface. Turning out a little tricky, since I can't devote consecutive time slots to it. I did install a PHP IDE at home... I'll blog on that when I get home.

Sunday, November 14, 2004

Another link and corrections

I put a link to the right called Cussler books. This way I can track which books I've read by Clive Cussler, my current interesting author.

Also, I had hoped to have a link on my page for a poll, to see what people use for PHP editors. I couldn't get the link to appear on the sidebar or the main part of the page. So for now, please give me hints in the comments. I am getting tired of notepad.

Friday, November 12, 2004

Ouch, my head

Here's a brain teaser for you. It's easy to play, but don't waste too much time on it.
Petals around the Rose

Umm... I'm not this desparate

Wow, that's all I can say about this resume.

Found it here, thanks Bruce.

Wednesday, November 10, 2004

Wireless Lan

I'm chatting with my brother, who is currently in Florida. He is down there to help with the reconstruction going on. He brought his laptop, as he often does. With his wireless lan, he doesn't need dialup... just a friendly neighborhood unprotected wi-fi router. Of course he never does anything malicious. It's nice to see that people are so generous with their bandwidth.

They must be close to him, he can get the signal from inside a trailer.

Monday, November 08, 2004

More PHP

UPDATE: I added a poll.

I'm doing some VB.Net at work today. (Whew!!!) But last night at home I did some more PHP. I am getting tired of Notepad very quickly.

So, I pose 2 questions to PHPers... What do you use to develop/write PHP in?
Why is it so great? What's it got in it worth coding with?

Tell me in the poll to the right.

On a personal note, my wife and I got back from the Berkshires last night. Already looking to go away again, one weekend does not restore you completely, but then again, what will in this system.

Friday, November 05, 2004

New directions and reflections

Last night I jumped ship... I left the Microsoft world, and entered Indian territory. Yes, I installed Apache! Why? Well, I wanted to explore the worlds of PHP and MySQL. What better way to wrap the 3 amigos together. I also picked up a book on PHP and MySQL development.

First reflections? Apache has a learning curve... This is probably obvious. No GUI interface, just getting right down to the httpd.conf file. That's fine. There's documentation. I'm a geek, it only took me 20 minutes to get it running my very first PHP page.

As for PHP? I don't think it's going to be fun. It looks a lot like ASP/JavaScript stuff... But then again, when I was doing ASP classic, I had very poor documentation skills. Also, I don't have an IDE or WYSIWYG editor, so it's all notepad.

I was hoping that I could get the mono.mod for Apache and do some .Net stuff, but according to the documentation I read, the mono.mod (sorry if I hacked that up) only works on Linux so far. Hmmm... I only looked for about 5 minutes.

A different subject all together, blogs. I am wondering why all the excitement over the weblog 'technology'. The technology is not all that difficult. Check out this page. It's an aspx page that reads entries in a database into a repeater with some simple formatting. Basically, it's a weblog for our website.

I guess the excitement isn't the technology, but really the culture or possibilities. It simplifies the aggregation of information. And you no longer have to roll your own, you can simply sign up with a free services and off you go.

So those are my thoughts. I'm taking my wife away this weekend... Don't try to look for us, we don't want to be found. We're going to leave our cell phones off, plug our ears, and read some books.

And no, I'll be reading Clive Cussler, not PHP/MySQL.

Wednesday, November 03, 2004

Pocket PC app ideas

I'm wondering what information, tools, apps, people would want in a hand held device. Post your comments here, what do you want to carry with you for tools? This could be anything from car maintenance information, to grocery lists...

Monday, November 01, 2004

Here it is, your religion and politics cocktail

Another story from the US, Preachers Urge Worshippers to Vote. Despite Jesus command to 'remain no part of the world' and many other bible principles to remain politically neutral, religions can't seem to stay out of bed with politicians. They pray for 'god's Kingdom' to come, while promoting human kingdoms. Oh well... not for much longer.

Good stand by a young man

This young man from South Africa took a good stand against witchcraft. Take a look.

An interesting read on the columbian under world

Saw this article, and tho it's long, it was interesting. Like a short novel. It talks about the battle against the drug lords, and one of the recent twists.

Saturday, October 30, 2004

Just catching up

So, it's been a few days at least. Thought I'd feed you guys with a bit of info.

Of course, by now most know the Red Sox won the World Series. 86 years of waiting for Red Sox fans.

Casini has made it's closest fly by yet of Titan, Saturns most intriguing moon.

My wife and I celebrated our 2nd aniversary on Tuesday, the 26th. Next weekend we will go away.

In-laws were up last weekend, and we all had a good time hanging out and catching up.

Nill programming. An occasionaly tweek of the code or database, but it's running. There are improvements that could be made, but for another time. Now I am simply a data entry guy... It's nice to get back to basics once in a while.

So that's about it. First Saturday I've worked is today... don't want to, but really don't want to next weekend. So... here I am.

Anyway, TTYL

Monday, October 25, 2004

He's waited long enough.

Here's a gentleman who's waited long enough to see the Red Sox win a series. You go dude!

Go Sox!!!

Anybody who cares already knows the Sox are up 2 games to none in the Series. And now, for those that don't care, you know.

Currently I am doing a lot of customer support, production work, and documentation. Not a lot of coding...

As I said in earlier posts, I am trying to clean up my act. But, I am also trying to broaden my horizons. At home I downloaded mySql and SharpDevelop. I played with SD before, but never mySql. I'm hoping I can learn C# using SharpDevelop.

To learn it, I am going to try to develope an entire app using nothing but C# and mySql. However, I am leaning toward an encrypted xml based system for the app, to allow for catalogs of products to easily be updated from a central provider.

So, customers would install the software, sign up with the company (or be signed up), and then download the current catalog. The reason for software as opposed to a web based syste is the ammount of user interface. It's going to work with images, and I figured it would be better to offload the cycles from the server.

So, I'll work up the specs and maybe post them... of course I'll try to keep you informed. And as always, if you have a question about a project I am working on, let me know and I'll post the answer here.

Tuesday, October 19, 2004

Dropped another weblog...

I try to keep my list of blogs to programming, or, in the case of friends, to those who remain such.

That is why I have dropped a particular blog from my list. This individual was not a friend, or even an acquaintance, and their blog had drifted on one to many occasions away from programming to the obscene.

Sorry for any offenses that site has given to any of my readers.

Red Sox 5, Yankees 4, and 14 innings!!!

Wow, what a nail biter... this is as close as it comes. It was my wife who called me in to say, 'Guess what! They're still playing.' Wow...

Tuesday, October 12, 2004

What are they trying to teach kids...

Saw an interesting article about a program called HIPSchools being used in some schools in New York. It allows for teachers to post information about students and homework on the internet for parents to be able to check. Here's a quote from the article, underlines mine:
"As a parent and a teacher it makes my life easy," she said. "With this program a parent can log in to see what homework (their student) has for the day." Mayers also said the flexibility of an online and a phone-based service means she can post homework assignments while driving and correspond with parents even while serving on jury duty.

I just thought it was funny that teachers may be posting homework while navigating rush hour traffic.

A new link

In my continuing, tho somewhat disjointed, efforts to continue to provide help to those browsing to my site, I have posted another link under technical blogs, Ben the Developer. This fella has a nice web log with some good information and seems to be right up our alley.

Thursday, October 07, 2004

Wednesday, October 06, 2004

Okay Joel, I'll read 'em.

I'm gonna read Cussler too. I'm starting with Sea Hunters, cause it's the first one I found at the library. I'll look for the others now that I have the list.

Mediterranean Caper (1973)
Iceberg (1975)
Raise the Titanic (1976)
Mayday (1977)
Vixen 03 (1978)
Night Probe (1981)
Pacific Vortex (1983)
Deep Six (1984)
Cyclops (1986)
Treasure (1988)
Dragon (1990)
Sahara (1992)
Inca Gold (1994)
Shockwave (1996)
Currently Reading --> Sea Hunters (1996)
Flood Tide (1997)
Clive Cussler and Dirk Pitt Revealed (1998)
Serpent - Numa Files (1999)
Atlantis Found (1999)
Blue Gold - Numa Files (2000)
Valhalla Rising (2001)
Fire Ice - Numa Files (2002)
The Sea Hunters II (2002)
White Death - Numa Files (2003)
Golden Buddha - Oregon Files (2003)
Trojan Odyssey (2003)
Lost City - Numa Files (2004)

--- Not Released Yet ---
Sacred Stone - Oregon Files (10/2004)
Black Wind (12/2004)

Friday, October 01, 2004

Hey, hey, 16k

For you PC nostalgics check out this flash.

Wednesday, September 29, 2004

Evolution or Creation or Intelligent Design...

Hmm... Things seem to be flaring up on this issue with the entrance of a new idea/view/theory, Intelligent Design. Take a look at Wired's article. Pretty interesting. It mentions several times 'materialist thought' or what could be termed 'fleshly thinking'. The last page is a statement by one of the proponents of Intelligent Design.

Also, PBS is airing a series called Origins. Again, gleaned from an article on Wired was this statement:
Astrophysicist Neil deGrasse Tyson, director of the Hayden Planetarium in New York and host of Origins, describes the creation of the series as a kind of jigsaw puzzle.

"We now have the edge pieces and the corner pieces; we know what the color codings are, we know what the pattern looks like," he said. "There are still huge holes -- we don't know yet how you go from inanimate matter to a bacterium with a metabolism. But we do know what ingredients it requires, we do know the conditions that led to those ingredients and what happened to the planet after life emerged."

Huge holes do not an answer make.

Well, governments will someday turn on religions all-together... Some would consider it ironic that it's the bible itself that foretells this.

Friday, September 24, 2004

My Mad scientist comes out

Okay, maybe this is a bit nuts, but I think it'll kill 2 birds with one stone. I read this article on glaciers slipping into the ocean. Now, I'm sure it's the global warming issue speeding them up. But I got to thinking about how governments are planning to try to colonize mars.

The secret, they say, is having water there. Well, why not chop up these glaciers, load them into thermal containers and launch them into space. They can sit there, out in the giant freezer of space, and when you need 'em, bring 'em down to the Mars surface. Nasa has certainly shown that they can drop things out of the sky.

That way, you won't raise the ocean level, and you can get a nice cool drink of water on your next Martian holidy.

My two cents.

In programming news, I created a Windows service and it's working perfectly. It triggers a stored procedure which returns 2 tables and tags the data as being read, all in one transaction. These get packaged into a dataset, which is then written into a tab delimited file. This file is e-mailed to our customer so that they can see what orders were placed on their images.

I also realized that my error tracking web service has been performing quite well. It's simply a web service that takes an error message and some specifics and dumps it into my error tracking database. I have my web sites, windows service, and windows forms applications all dumping to it.

This has allowed me to better resolve issues, sometimes before the customer even knows what has happened.

Our windows form application that we provide to all our customers is in full swing now. Haven't had to do an update to it lately, but if so, I simply put the new version on our webserver. The application polls a web service at startup (if it has a net connection) and the webservice compares the running application version to the version stored on the server. If needed it passes back the files and the app is restarted. This is allowing me to update the app, the update utility itself, and the database (very rarely).

Another web service this app calls to checks for services we offer, allowing us to offer new services through the program without having to do an application update.

And of course it then sends jobs that are ready for processing to a 3rd web service which interacts with a web form for final order options, loading everything into our nice Order Processing database.

That's the 'so far' for me. It's been a haggard, yet productive, summer here. This fall I will INTENTLY be reshaping our project workflow, and hopefully learning nUnit and other testing procedures.

Keep the comments coming. I can post more information about how I accomplished these tasks for anyone who needs help.

Wednesday, September 22, 2004

1000 views and growing!!!

Okay, so I've gotten over 1000 views. That means people are reading me, but I'm not getting comments. Either I've said it all... or I'm boring. So I'm looking for content. What do you want to know, what can I put here. What would make my site a 'have to read'.

In the mean time, I'm going to continue to put up interesting articles I see that help people program.

I get the CodeProject newsletters. Often I'm not to interested... I just breeze through them. But I wanted to read these articles. Especially this one. I'm trying to do better with my patterns and practices.

I know my process is poor, and I'm hoping that through this fall and early winter, when we are supposed to have no new projects, I can revamp the way we do projects, from planning to tracking on up. I want to explore unit testing, and any other testing procedures that would fit our business.

Hopefully I'll gather some more terminology, so that when I go onto a newsgroup (which I also hope will be less) people will know what I'm trying to say.

PS. On the note of content, maybe I'll do some cartoons. Rory's are pretty good attention getters.

Tuesday, September 21, 2004


I made 1000 views! I guess some people are reading my blog! I have a question. What do you folks use to view my weblog?

Friday, September 17, 2004

I hate IIS sometimes

I have IIS5 on Win 2k. I want to access a page via HTTPS, but get a 404 error ('Resource not found' through ASP.Net)


Monday, September 13, 2004

Questions, comments, criticisms...

K, so I haven't gotten a lot of action on my blog lately. What do you, the readers want? What do you look for in a weblog? I want to put code related stuff up, as well as what's going on in my life. Let me know, post comments to this post and tell me what I need to do to improve.

Even if I've offended you, the reader, let me know.

Tuesday, September 07, 2004

Clean Energy?

Could it be that the Nuclear reactors we now use were simply the quickest alternative? Sounds like the rule of 'Not just getting it done' could apply here. Check out this article on China's energy plans.

Thursday, September 02, 2004

Where have all the bloggers gone?

I've noticed lately that many of the bloggers I look at, including those I link to, have slowed down in there posting. I myself haven't been posting that often. I guess it could be a sign that we're all busy. Or maybe our lives are so boring that we have nothing interesting to right.

But I can gripe. What's with STUPID ADVERTISING!!! Take the Sealy commercials we have now. Guy wakes up, 'Where am I', yadda yadda, he thinks he's in heaven... It was dumb enough when it wasted time on TV! (I only have 8 channels with my antennae.) But now they have it on the radio. And how many New Englanders actually like hearing Bob's voice!!! If you don't know Bob, be glad.

Why do advertisers think they will get my hard earned dollar by insulting my intelligence. You know, some channels have tried wide screen programming. That leaves blank space at the top and bottom of the picture. Doesn't bother me too much, even though I have a regular set. Why not put ads there? With NO SOUND!!! That way I can ignore them in peace.

Tuesday, August 24, 2004

Boy, now this is my kind of job!

Wired! offers us this article about playing games for money. Now, it's not a lot of money, but it's playing games for a living...

Monday, August 23, 2004

This sound like fun?

The task:
1) Update your company's winform application to resolve data entry issues and to implement image thumbnails so that images can be linked with data. Migrate from a jet based database system to and msde based system. Create a new install application that will create an MSDE instance and allow for networked communications at your customer's locations. Create auto-update feature that will allow for database updates as well as application modifications.

2) Add features to the web site your company hosts for it's 3rd party customers so that said 3rd parties can place more complex orders with multiple pricing models. Create an OrderProcessing database to accept these more complex orders. Allow the site to have the apperance of your customer's website so that their customers do notice a great difference in look and feel.

3) Enhance the web site your customers use for there various functions to also use the new OrderProcessing database (instead of Access/Jet), so that orders can be better integrated.

4) Update the webservice your winform application uses to interface to your systems so that it works with the new OrderProcessing database (which needs to also talk to 3rd party production software as well as 3rd party business software)

Time Frame: 4 months
Programmers: 1 (plus 1 consultant)
Budget: What's that?

Tuesday, August 17, 2004

Games, games, and more games...

Yea, I know, games aren't everything. But sometimes you just wanna have a little challenge to the cerebral cortex that involves non stressful, un-important stuff.

In an effort to provide this for you, I have provided a couple of links to some online multiplayer games.

Kigns of Chaos is a pretty good, text based, knights and swords kind of RPG.
Ferion Is a little different. It's a space based, some graphical interfaces, and a lot of thought. I like it, cause you can take it at your own pace, if you have to leave it for a while, you'll be okay, or you can be in there more often if you'ld like.

Take a look. If you use the links on my page I'll get points, so please do.

Thursday, August 12, 2004

Another look at exceptions and lazy coding

Why is this such a popular topic? Cause everybody makes exceptions. It's a polite way of saying you made a mistake, you didn't plan for something. It could be as basic as not validating data entry. It could be you never figured somebody would score 50million on your game... Whatever the case, here is another clear breakdown of exceptions and what they mean. I like it cause it mentions System.SystemException, which I hadn't looked into too much.

Check out Eli Robillard's site here.

Also from Eli's site, I saw this interesting post. It talks about the nefarious SQL Injection fear, mentioning 'Use Parameters' as well as Regex (Regular Expression) techniques to clense your code.

I haven't used Regex yet, but after this article, I think I will. I also liked how he made a simple class to parse illegal characters from strings that may be entered manually. A link on his site also mentioned Request Validation, a feature in ASP.Net 1.1 that has been safeguarding my site and I didn't even realize it.

And my new favorite quote: "If you have a difficult task, give it to a lazy person - they will find an easier way to do it." -Hlade's Law

Wednesday, August 11, 2004

Monday, August 09, 2004

There are by some estimates more than a million weblogs. But most of them get no visibility in search engines. Only a few "A-List" blogs get into the top search engine results for a given topic, while the majority of blogs just don't get noticed. The reason is that the smaller blogs don't have enough links pointing to them. But this posting could solve that. Let's help the smaller blogs get more visibility!

This posting is GoMeme 4.0. It is part of an experiment to see if we can create a blog posting that helps 1000's of blogs get higher rankings in Google. So far we have tried 3 earlier variations. Our first test, GoMeme 1.0, spread to nearly 740 blogs in 2.5 days. This new version 4.0 is shorter, simpler, and fits more easily into your blog.

Why are we doing this? We want to help thousands of blogs get more visibility in Google and other search engines. How does it work? Just follow the instructions below to re-post this meme in your blog and add your URL to the end of the Path List below. As the meme spreads onwards from your blog, so will your URL. Later, when your blog is indexed by search engines, they will see the links pointing to your blog from all the downstream blogs that got this via you, which will cause them to rank your blog higher in search results. Everyone in the Path List below benefits in a similar way as this meme spreads. Try it!

Instructions: Just copy this entire post and paste it into your blog. Then add your URL to the end of the path list below, and pass it on! (Make sure you add your URLs as live links or HTML code to the Path List below.)

Path List
1. Minding the Planet
2. Luke Hutteman's public virtual MemoryStream
3. Mark Kenyon's 'To Whom it May Concern'
4. (your URL goes here! But first, please copy this line and move it down to the next line for the next person).

(NOTE: Be sure you paste live links for the Path List or use HTML code.)

Wednesday, August 04, 2004

I want to save this fix

If you can't see Rotate Clockwise or Rotate Counter Clockwise when you right click on a thumbnail in Windows Explorer, try this: regsvr32 shimgvw

I'm posting it here so that it will be out in the world for me and others to find.

Tuesday, August 03, 2004

Beware these people

Beware of I accepted an offer of a 'free' $50 dollar gift card for ordering and Entertainment book. The entertainment book cost $15 and has already saved us about $50. So, although I don't usually try these offers, I knew this was something I wanted to order, so why not try to get a free gift card.

I ordered my book in April, and received it in less than 2 weeks. Now in August, 3 months later, I still don't have my gift card. In an e-mail I received 1 week ago today, they claim to have received all the necessary correspondence from me, yet still have not shipped my Gift Card. I have had to go through mumbled requirements, even mailing THEM a printed out form.

Some offers out their are legit. But there are too many out there like this company.

Remember BBS doors?


A post by Rory Blyth reminded me of the days of doors. He mentioned, and even posted a screen shot of, LoRD (Legend of the Red Dragon), an old BBS door. (Basically an online role playing game before the internet.)

I found an interview with Seth A. Robinson (aka. Seth Able). He created LoRD and a couple of other BBS doors. I then found his site. Looks like he's been a busy fella for only 28 years old.

I am wondering if he's gotten into .Net (I know he's done some Pocket PC and DirectX stuff) and if so, could Rory and Carl talk with him and maybe do a show about game development?

>> Here is the reply I got from Seth. Wow, he wrote me back! >>
I’ve never used C#. I’ve only used VB on a view projects, I’m not great with it. C++ is my fave!

Seth A. Robinson

Thursday, July 29, 2004

Back to new programmers

This post will have a little for everybody, so I hope you all stay tuned.

First of all, it looks like there is a column for new to .Net programmers that is also trying to focus on new programmers in general. This is great, and since I want to focus on that too, I'll be keeping a close tab on it. Here's the first article, Introducing The First Hit!. Here the author, F. Scott Barker takes a look at the all important choice of which language.

I use VB, and there is some controversy about it, but don't worry. You may find yourself switching back and forth for a while, depending on your project and what tutorials are available for what you want. The nice thing is, with .Net, language is simply a difference in syntax. What will you feel comfortable with.

Now, for those who've been in .Net for a while, I'm looking for your thoughts... ADO.Net.

Do you use Typed DataSets, or non-typed?

Do you bind a DataAdapter to a table and let fly with a CommandBuilder? Or do you build your DataAccess Components to work with Stored procedures?

If you use Stored Procedures, do you sometimes dump multiple tables into a dataset or always a separate Stored Proc for each table you will return?

And with Stored Procedures, do you have one stored procedure that will INSERT, UPDATE, and DELETE from a table? Or do you keep those in separate procedures?

I'm just curious, and I hope I get some feedback. Pass this to your programming buddies. I broke 800 views, let's see if we can get 900 or 1k!!!

Monday, July 19, 2004

Current Problem

This is my current Shopping Cart table:

Notice, it's a master/detail kind of list. One image, with multiple Print products. I would like to have a way to remove individual line items, instead of all items for the image. SQL wise it's easy. ASP.Net, not so. I have no idea how to get events from the detail grid. Any ideas?

I would break out the line items into their own grid, but then I'd have no way to line the photo up. It would end up something like this:
75 - 4x8 Greeting Cards
2 - 3x5
I don't want/need the photo being listed over and over again.

Excuse Me?!?! What is this world coming to....

What is wrong with people?! Hanging from hooks?

Also, I found this story. Below is quoted from a forum:
My flamethrower has two main parts, a gun/hose assembly, and the tank. I made the gun first:
It’s made entirely of parts you can get at your average hardware store. The hose connects to a stop valve, which connects to a short pipe nipple that's tapped directly into the tank.
The tank took a while to make, because I let each set of chemical welds dry before doing the next ones. The ends of the tank are two 90 deg. elbows and two 90 deg. street elbows, welded to make two full 180 deg. "U"s. One side of the tank is a 2' length of 4" sch.40 PVC, the other is a 4"x4"x1.5" T with standard pipe attached to each 4” socket.
And two animations I made from video clips:

Another week, another batch of projects

I am switching between projects faster than I care to mention. PHB has overextended his programming staff (me) with more promises than he can fulfill. Who would think that one project moved up by 2 months would cause such chaos! (Umm... yes I do need to build those components to get it to talk to the database... No they weren't built, that was the next project you wanted.)
Anyway, just got a copy of the August MSDN magazine. Lotsa neat stuff, Dino and Carl Carl have some articles in there. There's a deeper article on Genetic Programming... we'll see about that one. And then I saw this.  A cruise for geeks. I'd heard of 'em, but never seen such a spread. Course, it starts at $1770 per person.
Another little tidbit, I just noticed some slick improvements here on for creating posts. Nice, rich, interface for us too cheap to host our own blog.
Anyway, my day is planned, and it's already late. TTYL and keep checking back.

Thursday, July 15, 2004

Tuesday, July 13, 2004

More banners, and another link

I added a link to my BookCrossing book shelf. This is a neat site that let's you put books in the 'wild' and watch where they go.

Also, I added a banner for Distributed.Net. I am running the client here and have done almost 40 thousand Blocks (collections of keys) averaging about 130 blocks a day. (Lately it's been lower.) If you want to work with me as a team, let me know. We can split the $2000 dollar prize.

Monday, July 12, 2004

Have you been to the DC?

If you have, check in in my comments section. I wanna chat with you.

We just went. We had ours at the Mullins center, Amherst, MA. Great time, good friends, and of course, fine material.

Thursday, July 08, 2004

Okay, so maybe that one was a bit much

I read a bit about the Windows Forms Coding Hero award. Those guys did some pretty cool things to get their award, so I think I'll take the flair off my site for that one.
As for the Software Legends... I couldn't find anything on that, so I figured I'd leave it up.

Wednesday, July 07, 2004

K, so I stole some flair

I think those that work with me and use my tools would feel free to dispose these honors on me. I was still humble, I didn't declare myself to be in the high IQ society... Although...

Some updates and thoughts

So I updated some of my links over there to the right. I also had a thought.

A point I've understood for quite a while but others have had trouble grasping is if god is all knowing, can we really have free will?

Here's how I've come to understand it. I'm by no means a expert chess player, but I've played with some, and they've wiped the floor with me. Because a good chess player knows every move that CAN be played. He know's your not going to take your knight and just jump from A1 to G7. There are specific limitations in which you must work, and the better a chess player, the more he can see what you could do, and therefore play against that.

“Jehovah” is translated from the Hebrew Tetragrammaton, which means “He Causes to Become.” These four Hebrew letters are represented in many languages by the letters JHVH or YHWH.

That 'He Causes to Become' means he has a purpose, and that purpose can be accomplished because the almighty god can foresee every possible outcome of our actions.

So, we do have freedom of choice and free will. Whatever we CHOOSE to do is okay to god, he will not be held back. He will 'cause to become', causing his purpose to be fulfilled.

Friday, July 02, 2004

Noticing some adds?

You may notice some ads on my blog and my site. Every little bit helps they say. I don't know who they are, but I know who these help, ME. Okay, so it's lame to beg, but if you are interested in purchasing books or electronics, please pass through my site. It helps me out, and you get what you want! Thanks.

Tuesday, June 29, 2004

File under, 'What's this!'

Looks like their using the classics to describe their wares. Click here

To the less coorporate programmer!

Wow!!! This is cool. Any of you newer programmers, have you ever desired visual studio products but have been daunted by the price tag? Has The basic edition not been enough? Well, let's see what Microsoft is going to do with the express line: Click Here.

Then again, it could be just a revamp of the Basic line of Visual Studio products. But it looks good. The only thing I don't like, is the broke the Web portion out of Visual Basic. BUT, If you're a web person, you may love the fact that the Web Portion has 3 languages to choose from. (VB, C#, and J#)

What are your thoughts? I've always had to rely on work for coding tools, which meant I couldn't code at home. Then I got Sharp Develop, but it still has some bugs.

Monday, June 28, 2004

Reflections on days gone by

Saturday I found myself watching cartoons, eating sugared cereal, and feeling quite nostalgic. I happened upon a cartoon that I used to watch with my cousins when I was growing up. I drifted back to the time when we would all be spending the summer at my grandparents house, swimming, playing, and watching cartoons. There's something about cartoons that is timeless. They may not be the most intelligent thing to watch, but you don't seem to care. I think that's what's so great about them.

I miss getting together with my family. A few of us have gotten married, one moved away, one is traveling the world, one is no longer with us. And there has been distance imposed in other ways as well. It's not so much the cartoons, but I miss the times when our values were the same and we lived each day toward the same goals. Perhaps we will again.

Monday, June 21, 2004

Gone away for a while, the posting will resume.

No, I didn't drop off the face of the planet, not that many people would miss my blog... I'm back now, and will fill you in on the details later. But for now... this cracks me up.

IN PRISON ......... you spend the majority of your time in an 8X10 cell.
AT WORK ........... you spend the majority of your time in a 6X8 cubicle.

IN PRISON.......... you get three meals a day
AT WORK ........... you only get a break for one meal and you have to pay for it.

IN PRISON.......... you get time off for good behavior.
AT WORK ........... you get more work for good behavior.

IN PRISON.......... the guard locks and unlocks all the doors for you.
AT WORK............ you must carry around a security card and open all the doors for yourself.

IN PRISON ......... you can watch TV and play games.
AT WORK ........... you get fired for watching TV and playing games.

IN PRISON.......... you get your own toilet.
AT WORK ........... you have to share with some idiot who pees on the seat.

IN PRISON.......... they allow your family and friends to visit.
AT WORK............ you can't even speak to your family.

IN PRISON.......... all expenses are paid by the taxpayer with no work required.
AT WORK............ you get to pay all the expenses to go to work and then they deduct taxes from your salary to pay for prisoners.

IN PRISON.......... you spend most of your life inside bars wanting to get out.
AT WORK ........... you spend most of your time wanting to get out and go inside bars.

IN PRISON ......... you must deal with sadistic wardens.
AT WORK............ they are called managers.

Monday, June 14, 2004

Ordering Pizza thru e-bay

It's been done now: Fresh Hot Pizza. Tell your friends, I think this is a first.

Saturday, June 05, 2004

Friday, June 04, 2004

Not enough coffee in the world this morning

So, I have this problem working on We're adding in some new features, making the database more robust, and moving the data Access layer out of the code for the page and into an actual Data Access component. We've separated it into a project for the photographer's administration portion of the site, and a project for what the End User works with. Each project has it's own data access layer/component and they also share one data access component between them. (3 data access components)

I'm trying to put together the shopping cart. We have a cart details table with a line item for each product. Problem is, some photos have more than one product, and some products have more than one photo. I posted about it on Microsoft's newsgroups.

In other news, ever feel like you've been run over in a conversation. Somebody is so frustrated and distraught that they jump from issue to issue before you can comprehend the first one and in the end everything is a squashed, mangled, tangled, mess? 'Nuff said.

Friday, May 28, 2004

For those with questions or doubts

Following up a recent discussion at I post these articles:

A few scientists discuss the question: 'Does God Exist?'

And the next article in that series: 'What Is God's Purpose?'

This is an extremely good article, Why God Has Permitted Suffering taken from the brochure 'Does God Really Care About Us?'.

Friday, May 21, 2004

Handling Exceptions

Just read an article by Daniel Appleman in .Net Developer's Journal on Handling exceptions. For new programmers or those new to .Net Try... Catch may seem like a simple way to avoid UnHandled exceptions, and pretty them up. That's all I used them for. But I had heard of more you could do with them.

Dan's article was extremely well written. Simple and to the point it helped me to understand this great facet of .Net better. I knew that you could handle different types of exceptions by having different Catch statements, almost like a Select statement. I also knew, however, that this should not be used as logic flow.

Example: If you have code that should accept a numeric, and somebody enters text, you shouldn't use exception handling for this, you should do something like IsNumeric.

What Dan really helped me to understand is what the difference between a SystemException and ApplicationException is. Also, why you would want to roll your own exceptions for let's say a namespace or class.

This .Net Dev Journal has some nice articles on SQL Server Reporting that I'll have to spend more time with. For now, it's back to projects.

Monday, May 17, 2004

A weekend away, and the work waited for me

I spent the weekend in Bar Harbor with my wife. What an awesome experience. From seeing all of god's creation from Peregrine falcons and their chicks to Bald Eagles. Went out on a four mast Schooner, and got to hoist sail with the crew. Got sun burn, but who doesn't from time to time.

My system was wiped over the weekend (as per request) so I am re-installing Visual Studio. This should be better since I'm letting it go default. I had installed and un-installed so much... SQL 7 was listed in add and remove programs, but if I tried to un-install it SQL 2k came out.

Sometime this week I'd like to see if I can get into a discussion with Rory. I want to ask him why he's atheist.

I have more, but busy as always. I'll try to get some pics of the trip up.

Thursday, May 06, 2004

Just need to let off some steam!

Try this for a little stress relief!

Also... I've been looking through some articles on Visual Studio 2005, ASP.NET 2.0, and the improvements to Visual Basic and C#. WOW!!! A lot of cool features. If you get a chance pick up the April edition of .Net Developer's Journal. It has a good interview with Chris Sells and a nice overview of some of the new features coming out.

This site is supposed to be dedicated to newbie coders, which I still consider myself one of. Lately tho I have been buried with work, and may be lacking in my posts. Forgive me... drop me a line with questions... and let me know what info you would want as a Newbie.

One piece of advice, learn proper Patterns and Practices quick! You can do something, or you can do it right. And doing it right the first time will save you headaches. Instead of scratching your head and starting over, you can just jump right in and make changes if you need to. You may think commenting and normalizing and learning how to do a stored procedure properly take too much time, but you really save time in the end.

Monday, May 03, 2004

Free software is crap?

Interesting point in the April '04 DotNet Developers Journal feedback section. Sam commented that 'Open source and freeware just make it harder for the developers that are trying to scratch a living out of this industry.'

Interesting thought, and probably somewhat true. I can see the arguments for Open Source and freeware, money's tight. But could the software money be tight because the companies trying to get paid for software can't fight a price war with free? I can see that too.

These folks that are working on Linux... are they sinking their competitors? Well, not really.

But other things, like the smaller customer base apps... this is where it gets delicate.

I can't prescribe anything, but we'll see how it pans out. What are your thoughts?

Friday, April 30, 2004

Some weird thoughts

Okay, I was thinking about computers. Computers and printers that is. Let's say you have 1 printer on the network, printerA. You have two computers. PC1 and PC2. PC1 sees the printer and calls it 'Joe's printers'. PC2 sees the printer as 'LaserJet 45000'. But they are both talking about the same printer.

K. Now let's think about us, and how we see color. I look at something and say 'that's blue'. You look at that and say 'that's blue'. Fine, we're talking about the same color. Once upon a time somebody else told us it was blue and that's what we know.

But how does our brain interpret that color. If I was to look from inside your brain through your eyes, does your brain interpret that color the same mine does. Let's say I look through your brain but the blue item appears as my red.

Follow? It doesn't matter how our brain interprets the color, as long as it interprets the colors differently. We associate a name with that interpretation. As long as we all call blue blue, it doesn't matter how our brain interprets the color. Our brain takes the signals from our eyes and stores that. Does everybodies blue get stored the same? I don't think so. Maybe the same general way, but not exactly.

Then there are sounds...

Monday, April 26, 2004

I'm sorry, this is what's next

They already have the next big thing. SMS this, you too can have your own light special effects over Dublin!

Chandelier w/ style

What's next, SMSing your homes lighting, stove, fridge?
Check this out!

Friday, April 23, 2004

New eBook reader, really looks like paper!

This looks cool! I've been wanting a 4x5 or so sized screen for a PDA for a while, since I've had my first PDA. The screen is just a little small on most of them. This one only does e-books and documents, but it's a step.

Thursday, April 22, 2004

Who wouldn't want this car?!

Yea, I got the post from Slashdot, but who wouldn't want this car!

In other news, we installed Data.Match. I am trying to refine the installation tho. Also fixing bugs as we find them, but most of it is visual changes. Very few bugs thanks to Dino!

Monday, April 19, 2004

Is it Monday already?

Let's just sum up... today hasn't been going all that well. A day that includes being late for work, a funeral, my car breaking down, my project not working for no explainable reason (Explained here) and two other projects that were needed last week.

All this after a weekend that left me saying, WHAT WAS THAT?!?!

All this typing is making me dizyy........jkdafj;of bn

Wednesday, April 07, 2004

Time for more posts

Once again, I feel the Web site is ready. I now move back to DataMatch. I am documenting more. Trying to keep things neat and tidy so that when I need to get help I can show people what I am talking about. Anybody know a good way to put Powerpoint slides on a web site?