Another MSDN TV episode!

Boy these are going
up fast…

A new episode featuring Omar Khan
from the Visual Studio .NET team has been posted. This is the second part to the
episode posted on Tuesday.

http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20030306VSNETOK/manifest.xml

Visual Studio
.NET Web Project Tips – Part 2

Get an explanation of different
ways to deploy your Visual Studio .NET Web applications to other machines. Omar
Khan discusses the easy way to use the “Copy Project” command, and also more
advanced methods such as creating a Web project setup.

Coding and Going to the Grocery Store

Greg Robinson’s comments today
were quite timely, I had been thinking much the same thing myself… Often, and
I find it happens more and more these days, I will go to find something on the
Internet, or buy something at the grocery store, and I end up doing everything
but the task I intended to accomplish. This appears to be normal human
behaviour, but it can be quite disturbing if you are short on time and have a
lot of things that need to get done. As Darren comments on Greg’s post, a
to-do list appears to be the only way to keep yourself focused. In coding this
is extremely important, so I use bug-tracking software to track new features and
bug fixes together with some priority info… otherwise I would code for a few
days and never get any closer to shipping out my application.

I suspect that we could all use more
focus to the work part of our day, the more productive we are at work, the more
we can goof-off at home! I’ve always wondered if there was a software solution
to this problem, but I think it much more of an issue with me than with any
particular means for tracking to-do’s. A piece of paper would likely be enough
of a “system” for tracking all of the things to do in a day, but like most
developers I feel compelled to at least use a computer solution (Outlook tasks
at the moment, at least they sync to my pda), although I have a strong desire to
write my own. I guess that would be the ultimate procrastination, writing your
own to-do list tool instead of actually working on the items on your
list.

Code Samples and VS.NET


Jimski



blogged about the IDE

the other day… since I am a writer for MSDN and
other places, this a topic that I’ve thought about quite a bit… sadly,
the only real solution seems to be posting code that works with both
situations (VS.NET and non-VS.NET) because posting code that doesn’t work well
in the Windows Forms designer is a bad-experience for people using VS.NET and
designer-generated code produces a bad experience for those who are not using
VS.NET.

Web Matrix makes this even more
interesting as now there are multiple IDEs from Microsoft that might require
different code samples/downloads to illustrate the same topic…

To me this is very similar to the idea
of posting code in both C# and VB.NET for every article… it is a good idea,
but I don’t always have the time to produce two versions, so I pick one. Same
with the IDE vs. no-IDE, I pick one… and actually I don’t always pick the same
one. It generally depends on what I am building and who it is for. VB.NET
programmers, in general, use the IDE, especially for Windows Forms, so I will
provide them with a project file and all that generated code.

On the other hand, the code I wrote for
the Dr.
GUI .NET columns
(I’m not Dr. GUI, I just write code for him sometimes) was
aimed at people trying to understand the framework, so it was written targetting
someone with a text editor and csc/vbc. I wish there were more times when it was
easy to do both, but that generally only happens when I do console or library
apps; I wrote some
MSMQ articles
for MSDN that had the vbc and csc command lines as a comment
in the first line of each code file, but also included a project file… and I
think that would have worked well for both “types” of people. I wrote lots of
code in my book
that was aimed at the command line compiler, in an attempt to keep it simple and
avoid confusing the beginning programmer with the IDE, but I think it was a
mistake; command line compiling just isn’t a good experience for a new developer
who isn’t used to it already.

What do you think I should do about
these issues (IDE and language, go ahead and fire away) for my
writing? And, while we are on a IDE-related topic, what about the visual
tools for building database code? I never use them, I never drag and drop a
connection, a data-adapter, or anything like it onto my Forms. So I never use
them in my articles. They seem cool enough though, and lots of people like
them… I’ve just had something against wizard-generated code ever since my Fox
Pro 2.6 days, and I think my internal “control-freak” is appeased by writing all
my data access code by hand… am I crazy? Should I use the tools, do you use
them?

DateTimePicker and DBNull



You can’t bind a Windows Forms DateTimePicker to a field
that might contain DBNull… so I did this;


 

      public class
DBDateTimePicker:DateTimePicker

     
{

 

           
public
DBDateTimePicker()

           
{

                 
//

                 
// TODO: Add constructor logic
here

                 
//

           
}

 

       
public object DBValue

       
{

           
get

           
{

               
if (this.Checked)

                   
return base.Value;

               
else

                   
return
System.DBNull.Value;

           
}

           
set

           
{

               
if (System.Convert.IsDBNull(value))

                    this.Checked=false;

               
else

                   
this.Value = Convert.ToDateTime(value);

           
}

       
}

     
}

 

Then I bind to “DBValue”  (instead of Value) and it appears to
work fine… if it is null, it is unchecked and disabled, otherwise it is enabled
and can be set to any normal date value… if you uncheck the box yourself, then
the data field is set to DBNull…

 

Not sure if it the best idea, but I can’t override Value so this
seems like a reasonable alternative… of course, I never looked around for the
“official” solution or any other possible answers, so let me know if you have a
better idea!

Grinding the Gears

Whenever I shut
down my laptop, it is a very painful experience… one by one I watch a
series of programs die a painful death, as they refuse to shut down gracefully.
The error messages about “Windows Stations” that are closing are very useful,
but somehow the entire process (which sometimes involves clicking a few “End
Task” buttons, and maybe even selecting Shut Down all over again because half of
my system is still breathing) reminds me a lot of watching someone you love
learning to drive with your stick-shift sportscar. You try to smile and focus on
the end result, but each event, each horrible noise or lurching movement, forces
a wince out of you.

I really like both of the “people”
involved (my laptop and Windows XP), but watching the horrible process that
occurs when I turn my machine off is almost enough to make me stick with standby
only from this point on.

New Coding4Fun column is up…



Background
Copying

Summary:
Duncan Mackenzie describes how to build a tool that uses the
Background Intelligent Transfer Service features of Microsoft Windows XP to download large files
over slow or intermittent links.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun02282003.asp

Googlism

This isn’t all that new, but I hadn’t


tried it on myself

before;

duncan
mackenzie is all man
duncan mackenzie is one text that would work
nicely
duncan mackenzie is not exactly a new character in the realm of
romance
duncan mackenzie is the mackenzie of kintail
duncan mackenzie is a
masters of fine arts candidate in the printmedia department of the school of the
art institute of chicago
duncan mackenzie is indebted to the alberta
foundation for the arts
duncan mackenzie is a worthy re
duncan mackenzie
is the devil his
duncan mackenzie is currently exhibiting in
chicago
duncan mackenzie is magic’ well it fits around kinkladze’s name and i
think it sums up the way a lot of city fans feel about the way he plays the
game
duncan mackenzie is a microsoft certified solution developer for online
business systems
duncan mackenzie is an mcsd
duncan mackenzie is a
mcsd

I’ve always had this suspicion I was
“all man” but it is nice to have a computer system confirm it for
me.