Monday, January 17, 2005

Oracle's .NET Developer Center

Thanks to Richard for the pointer to Oracle's .NET Developer Center on OTN.

From Richard's post:

Also, Oracle will soon introduce new developer tools integrated directly into Visual Studio .NET that will improve developer productivity. These tools allow you to browse your Oracle schema, launch designers and wizards to create and alter schema objects, and drag and drop schema objects onto your form to automatically generate code. Additionally, the tools contain a PL/SQL editor and integrated context sensitive online help, including the Oracle SQL and PL/SQL Users Guides. And with the Oracle Data Window you won't have to leave the Visual Studio environment for routine database tasks like inserting and updating Oracle data or testing stored procedures!

Empty Dataset?

Nick hodges has a post on when is a dataset truly empty in .Net. The code he has in Delphi for .Net goes as follows:

function DatasetIsEmpty(const aDataset: Dataset): Boolean;
var
 TempTable: DataTable;
begin
 Result := (aDataset = nil) or (aDataset.Tables.Count = 0);
  if Result then
  begin
   for TempTable in aDataset.Tables do
   begin
    Result := Result and (TempTable.Rows.Count = 0);
   end;
  end;
end;

Unfortunately it looks to me the if statement has the logic incorrect (thus my placing it in red). Result will be true if aDataset is nil (or null for you non-Delphi types). Running this with a nil dataset will result in:

Encountered unhandled exception class System.NullReferenceException with message 'Object reference not set to an instance of an object.'.

Change it to if not Result then and I you will be good. If you want it to be more efficient on datasets with a lot of tables then you might change it like this:

function DatasetIsEmpty(const aDataset: Dataset): Boolean;
var
TempTable: DataTable;
begin
Result := (aDataset = nil) or (aDataset.Tables.Count = 0);
  if not Result then
  begin
  for TempTable in aDataset.Tables do
  begin
    Result := (TempTable.Rows.Count = 0);
    if not Result then
    begin
      break;
    end;
  end;
  end;
end;

This way if ever find a populated table it stops immediately.

Don't do Delphi? Here is a version of the code for C#

public bool DatasetIsEmpty ( System.Data.DataSet aDataset )
{
 bool Result = ( aDataset == null ) || ( aDataset.Tables.Count == 0 );

 if ( !Result )
 {
   foreach ( DataTable TempTable in aDataset.Tables )
   {
     Result = ( TempTable.Rows.Count == 0 );
     if ( !Result )
     {
       break;
     }
   }
 }

 return ( Result );
}

Wednesday, January 12, 2005

Free Software Magazine

Free Software Magazine is free magazine for the free software, its culture and world. It is available in both electronic and good old fassion paper formats.

Head over and pick up a copy of the first issue and learn more about free software.

Tuesday, January 11, 2005

Free as in Speech and Beer

This is just too funny, I had to share. Now you have your "free speech" and your "free beer" at the same time. Vores Øl version 1.0 would appear to be the first open source beer! It is available under the Creative Commons Attribution-ShareAlike 2.0. So check out their recipe and have your freedom, but please enjoy it responsibly.

CodeCon 2005

The program for CodeCon 2005 has been announced. CodeCon is the premier showcase of cutting edge software development. All presentations include working demonstrations, ideally accompanied by source code. Presentations are done by one of the active developers of the code in question and are of working code.

A very wide variety of topics are covered: Encryption (privacy), RSS, chat, Blogs, web development, etc. Check out the list and maybe I will see you there. It is being held in San Francisco CA from February 11th to the 13th, 2005 with the price being $80 at the door.

The program chair is Bram Cohen, the creator of BitTorrent.

Monday, January 10, 2005

Comment SPAM

Well, it finally happened. I guess it was inevitable. There were 3 postings of comment spam. I deleted them and turned off anonymous posting. Sorry for any inconvenience. If you want to leave a comment then I guess you will need to sign up for a Blogger account to leave comments, or use the contact link to send me a message directly.

Requiring a login isn't as bad as disabling them completely as I understand that Typepad recently had to because comment spam was getting out of hand. I guess the spammers have migrated to Blogger blogs now.

Friday, January 07, 2005

Longhorn Wins Wired News' Vaporware Award

Longhorn Wins Wired News' Vaporware Award. Longhorn is the next OS from Microsoft. Originally scheduled for release in 2004 the ship date and features continue to slip. It is suggested that they might bundle it with Duke Nukem Forever, one of the other recurring winners.

Thursday, January 06, 2005

The Gang Of Four Design Patterns in Delphi

Felix Colibri has converted the code examples from the Gang Of Four Design Patterns to the Delphi programming language. It sounds like he has done all the code samples, but specifically focused on the design patterns. Since it is just the code samples they don't do much good unless you have the book too. The examples were originally written in SmallTalk and C++.

Wednesday, January 05, 2005

4 hours of Yukon love. . .

Turns out you can get a double helping of developer group goodness on Thursday, January 6th (Tomorrow).

As you all know we have our usual first Thursday meeting at 7 PM. We will discuss our reading from Design Patterns Explained, have a couple Delphi component demos and maybe a demo of CodeSmith by Randy. In addition I just found out about an opportunity to take an in-depth look at SQL Server 2005 - Yukon from 1:00pm to 5:00pm. So that will give you enough time to eat and still make it to our meeting (you might think we planned it that way).

The staff at ExecuTrain is hosting local Microsoft SQL Server expert and Microsoft Regional Director Richard Hundhausen to present this 1/2 day technology seminar on SQL Server 2005. The Idaho DBA Association welcomes all members and associates to this excellent learning opportunity. Event registration and details to follow. The event will be held at the ExecuTrain facility on Maple Grove by Emerald.

I spoke with Richard briefly about the event. The way he describes it is "4 hours of Yukon love ... from a developer's point of view."

Admission is free. For more information visit www.idahodba.org, or just show up.

Tuesday, January 04, 2005

The one-minute risk assessment tool

ACM Queue have an article on The one-minute risk assessment tool where they discuss an analysis of risks in software development, using data from senior IT managers, and the surprising results it produced.

Interestingly the number one reason for software project to fail was the use of an inappropriate methodology. The second reason was no surprise to me and that is lack of customer involvement - if your customers don't tell you what they want, then it is hard to deliver it.