Monday, June 19, 2006

For various reasons I've had to get back into unmanaged code in C++.  This turned out to be a lot worse than I thought it would be.  My college courses were in C++ and I did a little OpenGL programming using visual C++5 or 6, and my first job was doing a lot of cool C++ stuff.  However, that was most on the Solaris platform using stuff like Vi, the sun workshop compiler, and the RogueWave libraries for things like Time, Strings, and Money.  I never got into MFC or programming C++ on Win32.  Obviously things like LPSTR and "DEF" files and such are completely new to me, if it wasn't for Chad Albrecht I would have lost my mind already.  When I take a look at the things that are coming up on my plate, though, I can see that this isn't necessarily going to just go away, SO...

If anyone can recommend some good literature for getting into MFC and Win32 programming using eVC4 and/or VS2005 I'd appreciate it.

.NET | Rant
Monday, June 19, 2006 12:05:11 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [3]  |  Trackback
 Monday, May 22, 2006

Here is my bug from Friday.  I have code something like the following that works in SQL CE 2.0:

string sql = "select field1, field2 from Table";
string conStr = @"Data Source=\Stuff.sdf";
SqlCeConnection con = new SqlCeConnection(conStr);
con.Open();
SqlCeCommand command = new SqlCeCommand(sql, con);
SqlCeDataReader reader = command.ExecuteReader();
SqlCeCommand updateCommand = null;
StringBuilder message = new StringBuilder();
while (reader.Read())
{
object[] vals = new object[reader.FieldCount];
reader.GetValues(vals);
if (null == updateCommand)
{
//... if first record, build update command
DataTable dt = reader.GetSchemaTable();
foreach (DataRow row in dt.Rows)
{

string colName = (string)row["ColumnName"];
message.Append(colName);
message.Append("=");
message.Append(row["ColumnSize"]);


}
}
}

This code merges data from "temp database" into permanent database.  Due to the # of tables merging the commands are built by reading the schema of the tables in the to-be-merged database.  Some of this code I inherited from someone else, and it works, or I might see about using  SqlCeCommandBuilder, but that is a post for another day.  This code reads all records from a merge table, and if it is the first record, build update and insert commands using the Schema Table.  In SqlCE 2 this works fine.  In SQL Mobile, if you call GetSchemaTable() after you have read the first record from the reader then the ColumnSizes contained in the schema table will be incorrect, reflecting the data in the current record rather than the schema of the table.  This results in things like truncated data errors if the first record has 5 chars in a varchar(20) field, etc.  The code works as expected if the GetSchemaTable() method is called before you begin reading records.

I can't find anything in the doc describing this as expected behavior, so its submitted as a bug.

Monday, May 22, 2006 8:19:04 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Friday, May 19, 2006
I found a great SQL Mobile bug with ColumnSize today which I can reliably reproduce.  I am going to go find out where I submit this bug and scheck to see if its already been submitted, and then post an exaple here of how to reproduce it.
Friday, May 19, 2006 4:17:28 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [2]  |  Trackback
 Tuesday, May 16, 2006
Tomorrow night I will be speaking at the Fox Valley .NET User's group, giving a presentation of the Compact Framework version 2.  If you're in the Appleton area, stop by and say hi.
Tuesday, May 16, 2006 1:53:47 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [3]  |  Trackback
 Wednesday, May 10, 2006

For now I will be using StarUML, untill I find something incredibly annoying with it or I find something better.  This tool has full support for UML 2.0 diagrams and semantics, seems to be a native win32 app (not some mind numbingly slow Java gui) and is generally straightforward.  StarUML also includes the notion of an "approach" to modeling: Basic approach, 4+1 view model, Rational Approach, and UML Components approach.  UML components was a great, precise,  but seemingly little known book written by a couple of modeling old-schoolers, one of whom was the author of Object Constraint Language, annexed to the UML.  I figured any tool that has a UML Components icon has to be on the right path and I spent a lot of time learning this tool.

Here is a partial class diagram I just did:

And a sequence diagram I am starting on with an idea of what the UI looks like

My complaints are small so far.  There are some user gestures (like Ctrl-Tab to switch documents) that I'd like to see impemented.  One nice thing that Visio and other tools do is to route relationships/connectors with only right angles which I think looks very nice.  StarUML has the ability to export models in XMI or Rational specific format as well, mitigating the risk that I'll change my mind and go with another tool later and need to scrap the drawings I have.

Wednesday, May 10, 2006 1:17:41 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Tuesday, May 09, 2006

Today I had my final straw with Visio's UML support, mostly in how it attempts to "validate" my model for me.  The UML support appears to be an afterthought anyway.  I need to create some models for posterity and leave behind the models as well as instructions on obtaining the (hopefully free or cheap) tool to open the models.  My last Real modeling was done in Rational which is not an option for me right now.  I have used ArgoUML in the past and ultimately didn't care for it.  My next attempt today was Together's Design tool plug in for Visual Studio.  I had to register to download the eval , strike one.  I had to install some ridiculous Borland specific download manager Active X plug in, which scored me a completely corrupted download the first time I ran it, strike two.  Upon installation either the very simple License key instructions (save this file to My Documents) or the license key itself were wrong and the add-in wouldn't run due to license validation failure, strike three, uninstall.

I then headed over to http://www.uml.org/#Links to find a list of tools supporting UML 2.0.  I am currently downloading "StarUML" and I'll report back based on what I find.

I'm still disappointed that Microsoft does not have a REAL modeling tool to compete with Rational/IBM.  Visio and the Class Designer in VS2005 don't cut it.  If anyone has suggestions let me know.

Tuesday, May 09, 2006 2:48:13 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  |  Trackback
 Friday, April 21, 2006

The compact framework team has released a beta version of Service Pack 1 for the compact framework version 2.  You can download the packages here: http://www.microsoft.com/downloads/thankyou.aspx?familyId=6548dd53-a418-42d9-a481-19ba3ceca1a6&displayLang=en&oRef=http%3a%2f%2fblogs.msdn.com%2fnetcfteam%2f.  You can read the details here http://blogs.msdn.com/netcfteam/archive/2006/04/21/580901.aspx ; one of the highly anticipated features of this release is the ability to run CF2 applications on CE.net 4.2.  I have one client who has been waiting on this feature for a long time due to a hardware investment that won't allow their converting to CE 5. 

The package contains a Visual Studio patch as well as the standard device updater application.

 

Friday, April 21, 2006 2:43:48 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [2]  |  Trackback
 Sunday, April 16, 2006
Lab
I just ordered a desk ( see here) for the research lab in the new house.  I am very much looking forward to doing some research projects and finishing some toy projects.  It seems that I am very close to being utterly caught up with all of my side business clients, in which case I can move back to doing things for fun.  I feel like I have been sorely neglecting the research and growth side of my career in favor of making $$ and maintaining the status quo.  This is no good.  It is whoring, not geeking, when every time you turn on a computer the billable rate is ticking.
Sunday, April 16, 2006 7:04:56 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback