home · blog · groups · about us · contact us
DevelopmentNow Blog
 Thursday, December 08, 2005
 
 

The released version of SQL Server 2005 is missing the Import/Export Wizard that was available during beta. Now Microsoft wants you to practice using the Business Intelligence Development Studio to create an Integration Services Project. There's even an Integration Services ETL tutorial on MSDN about it.

However, you can still get to the Import/Export (aka DTS) Wizard by typing dtswizard at the command prompt. :)

December 8, 2005    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Friday, December 02, 2005
 
 
I haven't blogged for a while because I'm in the middle of moving cross country to Portland, and my computer is packed. ;/ But I found a laptop & will write a quick blurb about some basic search engine optimization techniques and web marketing. In my case, I was asked by my dad to soup up countrysidemanor.net, the web site of Countryside Manor, a retirement home our family runs. I haven't started yet (oops) but here's the basic plan...

Make the site useful

If the site isn't useful then your other marketing efforts are wasted. Some basic tips:
  • Keep the page size small. Don't clutter it (especially the home page) with huge graphics, flash movies, etc.
  • Make it easy for people to contact you. A prominent "Contact Us" link that takes the user to a page with address, phone number, business hours, and a link to maps & directions (e.g. mapquest.com) is helpful. To get a maps & directions link, go to your favorite map site, enter in the address, copy the URL from the browser address bar, & link to that from your site in a new window.
  • Have a site menu with easy to understand links. Don't make people scroll over icons or colored boxes or otherwise have to guess how to navigate your site. Clearly labeled links and sections work best.
  • Don't leave "under construction" or "coming soon" lying around. If you don't have time to build a page, don't link to it. Also, get rid of broken links.
  • Spend some time thinking about what information you want to provide and how it should be organized. You can start with a bulleted outline (just like you might have done for high school essays) to organize your ideas. Your web site shouldn't look messy or cluttered.

Optimize for spiders

Next you'll want to ensure that spiders and search engines are able to crawl your site and understand what it's about. Some suggestions:
  • Make sure that you can reach every page on your site just by clicking links. A good test is to turn off javascript on your browser, and just use your mouse to get around your site. If you can't reach a page without filling in a form or using javascript, then spiders can't either.
  • Don't use querystrings if possible. Spiders a less likely to go to pages wuth querystring information. You can read up on mod_rewrite or "url rewriting" if you want to use querystrings but not have them appear in your URLs.
  • Make sure the HTML in your pages accurately reflects what's in the page. Specifically
    • Ensure each page has a descriptive TITLE tag
    • Add a META Keywords and META Description tag to the HEAD section of your page
    • Make proper use of header tags (H1, H2, etc.) to group the information on your page.
    • Your title, headers, and meta tags should contain action verbs, nouns, and other relevant words that people may search on.
    • The more content (aka text, not images) that's on your pages, the more likely spiders are to index it.
    • All images should have ALT tags.
  • Make sure your domain name isn't going to expire. ;) That happened with the Countryside Manor retirement home site ... a squatter grabbed the .com domain name when it expired (the expiration notices got lost in the mail during a registrar transfer snafu). Unfortunately, the squatter wanted $3000 to give it back, so we bought the .net domain name instead, and paid it up for 10 years.

Help spiders find your site

Lastly, you'll want to help spiders find your site, usually by getting other sites to link to it. Some ways to do that are
  • Submt your site to search engines directly. For example, you can submit to Yahoo, or submit your site to MSN.
  • Add your site to web directories. DMOZ (the Open Directory Project) is a large, free directory you can list your site with. Also try Yahoo Directory. Plus, do a web search on relevant sites (e.g. "retirement home directory") to get a list of other sites you can submit your web site to. In my case I found 5-10 different sites that I could get countrysidemanor.net listed on. Some of them cost money, but many were free.
  • Contact other web masters and ask them to link to you. This is called a "link exchange." Look for related web sites and contact the web master, asking if they'd be willing to link to your site and in exchange you'll update your site to link to theirs.
  • Start a blog. You can sign up on Blogger, Typepad, Wordpress, or some other blogging service, and have the blog hosted on your web site. Your blog will usually have a RSS URL, which you can then submit to numerous blog directories such as those listed by Robin Good at the RSS Top 55. If you write something interesting or useful in your blog, you might even get people to link to it for free and say something nice about you. :)
So, the above is a basic strategy you can employ when someone asks you "Hey, can you put my site on Google?" I didn't bother going into paid placement like with Google's AdWords, because you can get a lot of mileage out of good ol' SEO. Remember, there's more to SEO than keywords and META tags ... it's about getting lots links to your site from other sites, and then making your site a place worth visiting in the first place.
December 2, 2005    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [1]



 Wednesday, October 26, 2005
 
 

Yes, free. Microsoft is doing a 200-city US tour over the next two months to promote Visual Studio 2005, SQL Server 2005, and BizTalk Server 2006. Not only is it an all-day event with speakers, classes, Q&A sessions, and more, but they're giving away a free copy of VS 2005 & SQL Server 2005 to all attendees (while supplies last). Best of all, it costs nothing to register.

So check out the Visual Studio 2005 Launch Tour site and register. And get free stuff. And then start developing -- believe me, the new tools are sweet.

October 26, 2005    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Wednesday, October 19, 2005
 
 

It's often handy to have your web site or application send emails. "Thanks for registering." "Thanks for your order." "Hey tech support, the web site is down."

.NET 2.0 provides a few handy classes for outbound emails. Below is some code you can use in your ASP.NET application to send an email. Notice there is some authentication code you can use if your SMTP server requires a username and password in order to send emails. If you aren't sure, try sending an email without a username or password. If you get an SmtpException with a 550 or 553 Relay denied error (SmtpException.StatusCode == SmtpStatusCode.ClientNotPermitted), then you'll need to authenticate. :)

// create the message object
System.Net.Mail.MailMessage myMessage = new System.Net.Mail.MailMessage();

myMessage.To[0] = "some.guy@hotmail.com";
myMessage.From = "some.girl@hotmail.com";
myMessage.Subject = "this is a test message";
myMessage.Body = "hello there!\ntest message!";

// create the SmtpClient object. Specify the SMTP server in the Host property
System.Net.Mail.SmtpClient mySMTPClient = new System.Net.Mail.SmtpClient();
mySMTPClient.Host = "smtpserver.emailfarm.com";

if (SMTP_SERVER_REQUIRES_AUTHENTICATION)
{
	// create the NetworkCredential object with the username & password 
	// to authenticate against the SMTP server
	System.Net.NetworkCredential myCredentials = 
		new System.Net.NetworkCredential("username", "password");
	mySMTPClient.UseDefaultCredentials = false;
	mySMTPClient.Credentials = myCredentials;
}

// send the message
try
{
	mySMTPClient.Send(myMessage);
}
catch (SmtpException e)
{
	Response.Write(e.StatusCode);
}

If you feel the need to email a file to someone, use code like the below

// Attach a file to the email message. 
// The second parameter is the content type (text, binary file, etc.)
System.Net.Mail.Attachment myAttachment = new Attachment(strFilename, MediaTypeNames.Text.Plain);
myMessage.Attachments.Add(myAttachment);

Lastly, you can send an email asynchronously via the SmtpClient.SendAsync(MailMessage, CallbackToken) method. You can attach an event handler to the SmtpClient.SendCompleted event to receive notification when your email has been sent. One big downer is you can only send one asynchronous email at a time -- if you're currently waiting for a previous SendAsync call to finish, other Send or SendAsync calls will fail. Which sortof sucks.

// Send an email without waiting for completion
mySMTPClient.SendCompleted += new SendCompletedEventHandler(MyHandler);
mySMTPClient.SendAsync(myMessage, null);

void MyHandler(System.Object sender, AsyncCompletedEventArgs e)
{
	// code goes here to say "sending complete!" or something
}

Related links:
SmtpClient: http://msdn2.microsoft.com/en-us/library/4971yhhc(en-US,VS.80).aspx
SendAsync: http://msdn2.microsoft.com/en-us/library/x5x13z6h(en-US,VS.80).aspx
Attachment: http://msdn2.microsoft.com/en-us/library/e02kz1ak(en-US,VS.80).aspx

 

October 19, 2005    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Tuesday, October 11, 2005
 
 

The upcoming MSDN offerings will provide copies of Microsoft's latest and greatest, including Visual Studio 2005, Windows Vista, Team System, et al. Unfortunately, the highest-level MSDN package is $10,000 (pricing chart). Which is huge. Huge enough to make development shops look at Subversion (instead of VSS) and other alternatives. Especially when you consider that if you have a QA department, all your testers need an MSDN license in order to test software built using MSDN-licensed tools (oh yes, it's true).

One big way to get that software but save on licenses is to enroll in the Empower ISV program. For $375/year, you get 5 MSDN Universal licenses, plus a bunch of other stuff. The downside (?) is you have to actually build something using Microsoft tools, and the license is only good for a year. And you also have to take a stab at getting some people MS-certified.

October 11, 2005    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 
 

If you have a 32 bit application uses custom registry values (e.g. HKLM/Software/MyApp/MySetting), it might have problems accessing those keys when run on 64-bit Windows. That's because 64-bit Windows (via WOW64, the 32-bit emulator that runs on 64-bit Windows) has separate sections in the registry for 32-bit apps and 64-bit apps. So when run on 64-bit windows, if a 32-bit app is looking for

HKLM/Software/MyApp/MySetting

it actually needs to look in

HKLM/Software/WOW6432Node/MyApp/MySetting

when running on 64-bit Windows.

If you want to use the same key location regardless of which OS you're running, you need to enable registry reflection (or registry mirroring) for the keys you're interested in. WOW64 uses registry reflection to store certain keys in both the 32-bit and 64-bit registry sections. This allows 32-bit and 64-bit applications to share the same set of registry keys, and allows your application to use the same key on 32-bit and 64-bit Windows. A number of keys are reflected by default (e.g. HKLM/Software/Classes, a bunch of stuff under HKLM/Software/Microsoft), but you can use the RegEnableReflectionKey function to ask the OS to provide reflection for any key you need shared between 32-bit & 64-bit code (for example, our friend HKLM/Software/MyApp/MySetting).

More info:

http://support.microsoft.com/?kbid=305097

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/win64/win64/registry_reflection.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/win64/win64/running_32_bit_applications.asp

 

 

OS
October 11, 2005    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Tuesday, August 30, 2005
 
 
If you use Remote Desktop (aka Terminal Services) to connect to Windows servers, you probably know that by default ony two people can be connected via RDC at a time. So it sucks when you need to get onto a machine but you get the dreaded messages:

The terminal server has exceeded the maximum number of connections

or

The system can not log you on. The system has reached its licensed logon limit.

Especially when it's late at night and no one else is in the office. :) So, there are two solutions to get you past the blockade:
  1. Log onto a different server (one with free RDC connections) on the same network and domain as the blocked server. Open up Terminal Services Manager, navigate to the blocked server, open up the list of connected users, right-click a victim (preferably a long-idle one) and Log Out and Disconnect them. Wait up to 30 seconds, and they should drop off. Now you can connect to that server and fix that bug you accidentally migrated. :)
  2. If the above solution doesn't work, you can actually RDC to the console session (i.e. as if you were sitting at the PC's keyboard), which can act as a third RDC connection independent of the two main RDC connections. To do this:
    • Open on a command prompt (Start->Run->"cmd").
    • Enter "mstsc /v:<servername> /console" and hit Enter. <servername> should be replaced by the machine name of the server you're connecting to.
    • You should see a familiar RDC console window come up & be able to log in. Note that if someone else is logged in at the console, either
      • If you're an Administrator, you'll have the opportunity to kick them off.
      • If you're not an Administrator, you're out of luck on the console session. But at least you tried.
Hopefully the above will help provide a workaround for the 2-connection RDC limit on busy boxes.


OS
August 30, 2005    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Monday, August 08, 2005
 
 
SADeveloper has an interesting article on programmer productivity, basically along the lines that a good programmer can be 5-20 times as productive as a poor one. My first boss drilled into me that "software development was one of the few professions where a one person can be ten times as productive as another." And I believe it -- poor programmers can screw up code, get stuck constantly, miss requirements and have to re-work things, deliver bug-ridden code, etc. Other "creative" professions (science, music, etc.) are similar in that the productivity gap can be surprising.

Ray from CodeBetter had some interesting counterpoints to the article, but I've seen firsthand how much poor developers can stink. If you remove all thinking from the task, then the only measurement you'd need was typing speed & mouse-hand speed. But that's not what defines the productivity of a developer -- it's what their brain does that makes the difference.

Now, the funny part is I think with proper training, a good architect, smart division of labor, & in-place processes, you can narrow the productivity gap. Someone who sucks should be moved or fired. And in a gunslinger code culture, your rock stars will always smoke the average Joes. But what if you instead have
  • training so that everyone knows the project process
  • an actual project process that minimizes problems of scope creep, requirements confusion, and implementation/architecture snafus. RUP comes to mind, but there are others (MSF, XP, etc.).
  • dedicated people for the tasks that "poor/average" programmers often mess up on (architecture, project planning, requirements, etc.)
  • a software architect who can divide tasks among developers according to their skill level
  • a culture that encourages learning and asking questions
  • a good screening system to get rid of or avoid hiring people who don't work well in teams
  • a mentoring system to pass along tips and information
With the above, I think you can reduce the productivity gap. You eliminate or reduce many of the issues that cause weaker developers to fall so far behind their counterparts. You'll still have faster and slower programmers, people who can devise algorithms or who know their APIs and patterns backwards and forwards instead of having to Google them all the time. But time and again, some of the biggest sandtraps I've seen programmers fall into are ones related to architecture, project management, and failure to follow a methodology and process that guides people towards better applications.
August 8, 2005    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Thursday, August 04, 2005
 
 
Bah, got some blog comment spam the other day. Or at least I think it was spam. Even though dasBlog has a CAPTCHA control on the comment field (to prevent most comment-spam-bots), people can still manually add comments that have no relevance & link to their sites filled with affiliate links. Bujarf.
August 4, 2005    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]