Thursday, March 30, 2006

More software posted, and more to come

I've recieved a lot of requests for the actually programs for my Theocratic software. It's not finished yet, so I haven't posted, but I will soon.

However, I have added something to my Current Projects page. A SQL to HTML converter. This allows SQL code to get formatted so that it's more readable on a web page. It takes certain words, and colors them, and any comments it colors green. It also cleans up the positioning by change spaces and tabs to & nbsp; tags. It's pretty cool, and the link I give has some sample code.

Wednesday, March 29, 2006

Coolest game ever!!!

In a continuing effort to bring you coolness, I present Stinkoman!

Why we need a new system!

'How'd the programming coming?'
'Pretty good Al.'
'How were the wings, did you like 'em?'
'That's not so good Al!'

Yes... the wings I had Monday night, caused me pain all day Tuesday. In fact, as I write this Wednesday morning... I still feel a little wierd. But at least I can eat today. Which brings up one of the not so bright spots to working from home... you can still work when you're sick. Anyway, pain like this is why we need a new system.

Edgar Rice Burroughs. He wrote Tarzan, but what I didn't realize, is he wrote the John Carter on Mars series. (A Princess of Mars, The Gods of Mars) Very interesting Science fiction. So, I read a few of the series, and was pretty intrigued. It's basically entertainment writing, but he forsaw some things that were pretty right on... like transmitting images wirelessly. And he was writing around 1911.
Then I thought, they should make a movie. And low-and-behold, I found this on IMDB.

Oh boy! Special Assembly day this Saturday. I'll try to get pics.

Thursday, March 23, 2006

Updates to my current projects page, at last!

Yes... I have finally made some changes to my Current Project page. I have updated the pages to php to have my style applied. Actually, I created the php files, because previously the page had dead links.

I also added some Personal Projects on the site. Support for Personal Projects is on a completely donation arrangement. You can click the link to the right to make a donation. :)

Wednesday, March 22, 2006

Digging in to DataMatch; Using the SQL NULLIF function

I've gotten through InstallShield to the point where I can go back to DataMatch itself. At some point I'd like to update the projects page on my site, but for now I'll post here.

DataMatch is basically a Data Entry application so that photographers who shoot large volumes of pictures can rapidly enter data as to what packages or print sizes they would like for each image.

We had 3 different job types, and fields unique to those job types that could be viewed/edited while entering data. So I created tables to store which fields were going to be visible on the form.

However, 1 set of selections for each job type wouldn't work when you had multiple users at different stations and different jobs requiring different sets of fields available.

So I am working to make it so that each job will have the required fields associated with it.

To speed up data entry, we included an option to import data from text files for use in the program. Another feature I am trying to add is the ability for the program to see which fields have data and auto select them for that job, unselecting others, so that unnecessary fields don't clutter the screen. (Users can of course reselect them if need be.)

This is where I have been digging into SQL code. I figured I could do a stored procedure that would look at a table like this:
Field1   Field2   Field3
0001     (null)   PieceOfData
0002     (null)   PieceOfData
0003     (null)
0004     Something PieceOfData
0005     (null)
0006     (null) PieceOfData

And return something like this:
Field1   Field2   Field3
6        1        4

I thought at first I could do this:
SELECT
 Field1 = COUNT(Field1),
 Field2 = COUNT(Field2),
 Field3 = COUNT(Field3)
FROM
 Table

But that would also count zero length strings so, Field3 would return 6 instead of 4.

Then I tried SQL code like this:
SELECT
 Field1 = (SELECT count(Field1) FROM Table WHERE Field1 <> '' AND RecID IS NOT Null),
 Field2 = (SELECT count(Field2) FROM Table WHERE Field2 <> '' AND Field2 IS NOT Null),
 Field3 = (SELECT count(Field3) FROM Table WHERE Field3 <> '' AND Field3 IS NOT Null)
FROM Table

While this gave me the results I wanted, it also cause 4 passes over the table. (Or more if you had more fields.) Well... Maurits on Channel 9 offered this more elegant solution:
SELECT
 Field1 = COUNT(NULLIF(Field1, '')), -- string field
 Field2 = COUNT(Field2), -- integer field
 Field3 = COUNT(NULLIF(Field3, 0)) -- bit field... only count 1s
FROM
 Table

The NULLIF function checks the field (in parameter 1) for the value you specify in parameter 2. Changing the Field3 statement to check for '' I was able to get the results I wanted. ('' is for zero length strings. I have no bit fields in this table.)

This saves typing and time because it only makes one pass over the table.

Monday, March 20, 2006

Homestar in the house!!!

Or should I say Strong Bad. He's the one I watch the most. I've been looking through the Strong Bad e-mails to find the best to introduce people to why he's so funny. Here it is. You can click the Homestar Runner link on the menu.

Also, I'm writing this log from a New-To-Me laptop. A screaming 400 MHz! Hey, it works.

Thursday, March 09, 2006

See! This is what I've been on about!

I know that somewhere on this great big internet, I described just this, an Ultra-Mobile PC. They stole my idea!!! Now I want one, figures, just when I get a mobile device, they up the ante!

Oh well... I'm good with mine for now. I can stream music from my home server wherever I have a wi-fi connection, I can search through all the data I need. I can pull up maps, and GPS. It's all good. And I'll have my PPC app up soon. It's pretty good.

Tuesday, March 07, 2006

Code, updates, and fun stuff

So... I'm working with InstallShield (FlexNet) 11.5 Pro right now. We've decided to let somebody else handle our install instead of maintaining code to try to handle all the quirks of install. You would think that install should be the easiest thing to handle. Go figure. I've learned a bit, and if you have questions, I'm willing to try to answer.

We were going to have 1 install with to setup types, Server (which would include MSDE InstallShield Object), and Client. Other than the MSDE they would be the same. I couldn't figure out how to get MSDE installed with just Server selected, so our boss said, 'just do 2 installs'. I think I figured it out now, but we have the 2 installs.

Now I have to figure out updates. I tried calling, but their phone support is down right now.

My Pocket PC app is coming along. I couldn't remember how to get my listbox to display values from a parent table when I filtered a child table, so I just walk the child table, and do a listbox.items.add() using the child row's parentrow property. More code, but accurate. Now I want to figure out how to save settings for the program. I may just add it to the data xml I'm using to save coding time.

On the fun side, here is a fun e-mail somebody just sent me. Remember to check out my funny stuff page. You never know what I might add there. And check out my For Sale stuff too... every bit helps.

Monday, March 06, 2006

Some online tutorials for .Net 2.0

If you're new to .Net programming, or just haven't heard much about the newest version of .Net (like me), you may find this interesting. It was gleaned from an MSDN Flash e-mail I received.
For instance, I see (via Brian Goldfarb's blog) that not only is the ASP.NET 2.0 webcast series free, but you can actually get some great swag for watching: Visual Studio 2005, a book, hosting and more.

And that's not the only place you can go to upgrade your developers skills. Go to http://www.thedifferenceisobviousvb05.com and attend the Microsoft ASP.NET 2.0 Webcast Series or register for a Microsoft Visual Basic 2005 E-Learning course. It's good training, and you'll have the chance to win a complimentary Visual Studio 2005 Discovery Pack.

Scott Guthrie has also put together a great list of ASP.NET 2.0 tutorial videos in his blog. These are code-focused (no slides or marketing at all, just lots of code) walkthroughs, and are a great way to get to know some of the new features in ASP.NET 2.0.

I don't want to leave SQL off the video training list. Microsoft Learning has several free, in-depth E-Learning courses for database administrators and developers, as well as business intelligence developers.