Wednesday, April 12, 2006

Microsoft Certifications

At Software Architects, when I’m not on a project, I am encouraged to seek certifications.  These certifications help their partnership with Microsoft and they help us build our résumés.  Since my hire date of Febuary 1st, I have completed:

  • Microsoft Certified Professional
  • Microsoft Certified Application Developer
  • Microsoft Certified Solution Developer
  • Microsoft Certified Technology Specialist (new 2.0 exams)

I probably would not have sought getting certified if my employer hadn’t paid for it, but I’m glad I did. 

Note:  the following is my personal view of the Microsoft Certification process.  I have not taken any Sun/Cisco/A+/or PMP exams, so I’m not sure how they stack up.

Certifications alone will not take you very far.  They do not show that you know how to utilize a particular technology.  They do not show that you have ANY experience in a particular technology.  I’d also dare to say that they can be obtained only by studying tests, not actual concepts. 

But, combine them with significant experience building software, and you have solid evidence that a particular person not only knows the technology, but also knows how to apply it on real software. 

If I were reviewing résumés, I wouldn’t put very much weight in the fact that someone has certifications.  If that was ALL that they had, I’d consider it negatively.  The only certification I would really put stock into is the Microsoft Certified Architect, where you are presented a problem, and you have to submit your architecture to a panel of well-known, high-echelon developers for review.  The only downside is that it costs $10,000.  I don’t think my employer will be paying for that any time soon…

Joel gets it right

I read Joel Spolsky religiously.  His posts are few-and-far-between, but the SNR (signal to noise ratio) is seriously high.  His posts are worth waiting for because there is so much meat.

Anyway, since he frequently posts interesting articles, why am I blogging about this one?  This one really hits the nail on the head with me, that’s why.

http://www.joelonsoftware.com/items/2006/04/11.html

Programmers are good at programming.  The time they spend learning tasks extraneous to their day-to-day skills is time not improving the developmental skills.  I believe in being multi-faceted, but your developers shouldn’t also be your system administrators.  Your developers shouldn’t spend time assembling desks or ordering/building computers.  Taking your developers off of their high priority tasks to do phone tech support is a waste of his/her time.  High morale and few distractions will lead to better software in the end.

I don’t normally like to blog about a blog, but this post is worth reading.  Go.  Now.  Read it.

Now playing: Breaking Benjamin - Natural Life

Sunday, April 02, 2006

Iteration Zero - Part 1 - Source Control with Subversion

A lot of times when starting a new project you get fairly far into coding before realizing that you might need tools like source control or a flexible build system.

This article will outline what is sometimes called “Iteration Zero,” which is the step in which you setup your development environment. 

Keep in mind that these are just suggestions (by me) for a healthy project environment, not a cure-all for development.  Each team will (should) have a unified process that everyone agrees on.  Hap-hazard development with little support for teams can put a burden on your developers and put the project in jeopardy.

Step 1:  Choose a source control provider

Even when doing pet-project and single-man projects, you need source control.  Let me repeat this.  You need source control.  There are many to choose from, and they are generally easy to use.  I personally use Subversion.  It is free, comes with a ton of features, and is easily used through the right-click explorer icons.  I would warn against Visual SourceSafe for large projects, but for smaller projects it’s not that bad and is tightly integrated with Visual Studio.  I’d recommend Subversion (or SVN for short), CVS, or Perforce (which is not free).  This article will focus on SVN, since it is what I use most.

I typically create a sandbox folder, where all projects under source control reside.  Here’s a look at my current sandbox:

CropperCapture[4]

As you can see here, I have about 5 projects, with various icons on the folders indicating their status.  This is provided through TortoiseSVN, an explorer shell add-in.  TortoiseSVN adds these context menu items you can see here where I right-clicked on the screen.  From here I can checkout projects that reside in the subversion repository.

On projects with distributed teams, you can install Apache and use a WebDAV module to allow HTTP access to the repository.  As long as you use SSL and a password file, you’ll be secure.  There is a free online book available here that has some good information on how to set this up.

So I’m going to navigate to my subversion folder (NOT my sandbox) and create a new repository for our sample project.  Let’s call it FinanceAssistant.  First, we have to create the directory that will hold the repository.  Next, I right-click on our new folder and select “Create Repository Here.” 

 

 Here you have a choice between a Native File System and a Berkeley database.  I have heard that there are no real advantages to using a BDB, though there are some constraints.  Just about everyone suggests using a Native File System repository.CropperCapture[7]  Once this is complete, your repository is ready for checkouts.

The next thing I suggest is to create three folders:

/trunk/
/tags/
/branches/

This is a crucial step in effectively utilizing the power of a source control provider. Basically all of your development goes underneath the trunk folder. When you think you are ready for a first-release to your customers, you can Tag the release, which will basically take a snapshot of the current state of the project and stick it into a folder underneath the tags directory. If any bugs are found in the tag release, then they are fixed and merged back into the trunk so future versions get the fix. If any experimental development goes on (like upgrading to a new 3rd party dll version, or some major re-work or refactoring) then you can branch the project. This avoids the problem of having one developers experimentation negatively affect the entire team. Here's how our project might look:

 

 

/branches
/ExperimentalBranch1

/tags
/0.4
/0.64
/0.85
/1.0
/1.4

/trunk
/src

What's great about this approach is that you can, at any time, checkout a specific version of your project that may have been in the past. Everything that was included in source control will return to the state it was in at the revision you specify. This can really help at times, especially if you have customers using old or different versions of your software and are reporting bugs.  The first step is to create the three base directories.  Let’s do this via the Repository Browser in TortoiseSVN.  Right-click anywhere in explorer and go to TortoiseSVN->Repo-Browser.  Enter in the path to your repository, which in my case will be this:  file:///e:/svn/FinanceAssistant/ (notice the unix/web style path)

. From here I can create the folders that I talked about. Once I have them created, I am ready to check out the trunk to start developing. You definitely don't want to have this entire structure checked out at once. You might inadvertently modify a file that isn't under active development.

I’ll now go to my sandbox folder and checkout the project by right-clicking explorer.  Notice how I’m checkout out the trunk subdirectory, not the root of the repository.

CropperCapture[9]

There are many options to choose from while checking out a project.  Here I can choose a specific revision # to checkout from.  This is good if a developer checks in some breaking changes and you need to roll-back to a revision that was working.

This will create the working folder in our sandbox.  You’ll notice that any directory under source control will have a hidden folder called “.svn”.  The period in front of the svn wreaks havoc with FrontPage Server Extensions with Visual Studio 2003.  ASP.NET 1.1 projects will need to look for a specific version of TortoiseSVN that uses a “_svn” directory instead.  For Visual Studio 2005 we don’t have this problem.

So now we have our working folder, ready for development.  After we make changes to the contents of this folder, we must Commit the changes.  When we want to get the latest changes from the server, we Update our working copy.

So at the beginning of every day, we should Update our working copy to get the latest changes.  We then will make changes until they are stable and pass tests.  After this we Commit the changes so that other developers receive them.  It’s important not to let your project get too out-of-sync with the repository.  It is worse, however, to commit changes that break the build and prevent other developers from being productive.  If any two files are modified and checked in at the same time, subversion will do a simple merge and ask the developer to verify the changes using a Diff Viewer.

Using a source control system is a critical step that many small shops just don’t do.  The risks are enormous if a disk fails or if developers overwrite each other’s changes. 

Here are some more resources on using Subversion:

  • The free ebook.  This was my first resource for using Subversion.  It is pretty concise and will answer many beginner questions.
  • Pragmatic Version Control with Subversion by Mike Mason.  This book is a good complement to the free ebook.  It is short and has good examples in the book.
  • TortoiseSVN.  My favorite SVN client.  It’s very easy to use and is updated pretty regularly.  It’s just like TortoiseCVS.
  • AnkhSVN.  Visual Studio 2003 integration with SVN.  It works pretty well, but I still fall back on Tortoise for some tasks.  No support for Visual Studio 2005 yet.

In step 2, we’ll take a look at a slightly different project directory structure than you’re probably used to.  We’ll also talk about NAnt as a build tool to support this structure.  Until next time….

Tuesday, March 28, 2006

Feedburner Rss Feed

I added a Feedburner feed to my blog.  Hopefully I’ll be able to automatically redirect any of the other feed links to the feedburner one, so I can track my readers.

If you subscribe to my blog, please change the feed url to http://feeds.feedburner.com/flux88

Monday, March 27, 2006

My current music solution

People who know me can tell you that I have about zero patience for software.  Especially software that is so integral to my day-to-day use of the computer.

One such program is my media player.  I have tried pretty much every single one out there, and I haven’t been too impressed with any of them.  I constantly evaluate these programs and usually just end up settling. 

(I should also note that I’m probably the only person on the planet that doesn’t have an iPod.  Heck, even the Pope has one!)

  • Windows Media Player – The library integration is weak and not very usable for me.  The built-in cd burner is piss-poor, and I generally don’t like the interface.  I usually just use this for viewing temporary media (like my phone’s voicemail or little video clips).  The built-in taskbar toolbar is KICKASS and more media players should do this.
  • WinAMP – Fantastic for a file-based collection, but I have grown to need more.  My library was out of control and I was tired of manually tagging/renaming.  The media library didn’t suit me.  The visualizations are top-notch and the skin community is HUGE.  I like the interface, but again, I needed more control over my library.
  • MusicMatch – As much as I’d like this one to work for me, it still didn’t feel right.  I didn’t get a good view of my music, and I was sick of it trying to get me to subscribe to it’s mp3 download service.  I uninstalled it.
  • iTunes – I have chosen to stick with this one for now.  The interface is pretty well thought-out and I really like the smart playlists.  The ability to share music on the local network is very nice, though I’d like this to be able to stream over the internet as well (authenticated, of course).  It has decent support for podcast subscriptions, though a bit-torrent-aware plugin would be nice for this.  I also like the ability to rate songs easily.

I gathered some tips on generating some good smart playlists from Andy Budd.  Basically this keeps my playlists alive and I can rate songs to help shape the playlists.  I can un-check songs that I don’t want to be included in ANY playlist (like stand-up comedy, podcasts, or 0:20 long tracks that are skits or preludes to other songs on the same cd).

So now that the media situation was settled, I needed a nice way to keep my music in sync from my desktop and laptop (at work).  I’d still like streaming ability over the internet, but these are the machines I use most, so they’ll have to do.  At the advice of Scott Hanselman I decided to give FolderShare another go.  This time around I noticed that 2 things changed:

  • Microsoft bought them out
  • Now it’s FREE!

This definitely got me interested.  I decided to setup my mp3 folder as my share folder and installed FolderShare on both PCs.  When I get new music in, I import it using iTunes (which copies and renames the files) and will automatically be synchronized with the other PC.  That means I can import music on either my laptop or my desktop and everything will stay organized.  This is a big plus for me.

So far this is working out fairly well.  If I rename or change the tag of a file, then the whole file has to be transferred back to the other PC, so this can use up quite a bit of bandwidth.  I haven’t run into any issues with this so far.

Some other cool music links are:

  • MusicBrainz Tagger – This open-source free service is a GREAT idea.  Basically it will scan your mp3’s, make a digital footprint of each one, then try to match it with the online database.  It will give you a percentage of confidence so you can setup to automatically tag those files that are 90% or greater and sift through the ones it wasn’t sure about.  If it cannot find a match, it will ask you to help the community out and supply some tag info.  This can run in the background to automatically organize your mp3s.  Very cool.
  • iTunes Registry – Upload your iTunes playlists and get suggestions based on data from the other uploaded playlists.  See what other people are listening to.
  • music mobs – Mark songs that you like and see what other people suggest.

Are there any other helpful media links that I might add here?

UPDATE:  I recently saw some issues when synchronizing the folders that iTunes manages on both ends.  If one iTunes collection modifies a filename or adds a file to the list, the 2nd iTunes will not pick it up, since I am not sync’ing the iTunes .xml files.  To fix this, I found a script that will scan your folder and re-import all of the songs.  Best of all, this will *not* reset your playcounts, ratings, or tag info.  This includes songs that were not already in your library, so it’s perfect for me.  If you use it, make sure and edit it to include your music directory.

Click here for the iTunes Folder Sync script.  Thanks to Garreth Farrington for this.  (Anybody want to wrap this script in an easier-to-use app?)

 

Wednesday, March 22, 2006

Hard Drived Burned Up

Oy.

My hard drive that stored my subversion repository burned up.  No, really.  It burned up.  I saw smoke coming from one of the ICs on the PCB.

The drive is still under warranty, but I don’t care about the drive.  Hard drives are cheap.  This contained three large personal projects, a boatload of mp3s, tax documents from the last 3 years, and unfortunately something non-replaceable:  A recording of my mom singing a lullaby that she wrote.

I spoke to some data recovery people, and I got prices ranging from $1000 – $2500, and they are pretty confident in getting the data back.  The problem is that I am trying to save money for my wedding, and shelling out a grand for data recovery is out of the question at this time.

My other option is to buy an identical drive and just replace the PCB.  It looks easy enough, but I need to make sure that the PCB is the exact same one.  From what it looks like, there’s only 4 solder points, going directly into the drive controlling the heads. 

What should I do?  Should I attempt this ghetto-recovery?  Should I pay the $1k?

 

Wednesday, March 08, 2006

I'm an uncle (again)

My sister had her second child today (a boy)!  His name is Preston.  I’m very proud and I can’t wait to meet him!

Photo 17

Podcast - Ben Day on NHibernate

Benjamin Day spoke at Visual Studio live this year and was interviewed by Channel 9.  He talks about NHibernate.  If you don’t know what NHibernate is, it’s an object-relational mapper aiming to reduce/eliminate common data access code.  It’s based on the mature Hibernate for Java, and has growing community support.

Anyway, Ben Day and I used to shoot ideas back and forth and talk about NHibernate patterns and limitations.  He mentions me in the podcast (!), which you can download here.

Thanks Ben!

Developing for a Domain Environment

Internal applications commonly utilize Active Directory to manage their user-base.  With this approach organizations can define the users and roles in one central location, and have that information available to many applications.

For intranet websites, this is accomplished by using Integrated Windows Authentication.  But what happens when you are developing on a machine that does not have the same accounts as the target environment?  Case in point:  say you have some Active Directory domain groups that define who the “readers” of an appliciation are and who the “editors” are.  The simple solution is to make these groups configurable through the web.config, and you can have something like this for development:

<add key=”adminRole” value=”Administrators” />
and something like this for production:
<add key=”adminRole” value=”DOMAIN\ApplicationAdmins” />

This gives us the benefit of using a local machine account for debugging the different roles, and allows for Integrated Windows Authentication to work properly.

Here’s another concern.  What if your code accesses a secure resource like a database or web service that requires valid Windows credentials and authorization?  A test database can easily be configured to accept SQL Authentication provided via connection string, but a Web Service that requires integrated Windows authentication?  Would you really want to mock a complex external dependency like this (Especially if it is a read-only dependency) ??  If you do you end up spending a large portion of your time just setting up the environment to develop in. 

I was dealing with a scenario just like this and I wanted to do use the web.config’s impersonate=”true” feature where I can supply a username & password to run as (You can even configure it to encrypt this data and store it in the registry using aspnet_setreg.exe… see here).  The problem here is that if I give it a valid domain account to impersonate, my local machine cannot authenticate me unless I join the computer to a domain.  For a lot of scenarios this is way too much to ask, and may not even be an option.

I could end up just constructing a NetworkCredentials object with the credentials I need to access the secure web service, but I don’t like that approach either.  It requires me to specify an account in plain text (either in code or in web.config… both of which are bad ideas.

Any thoughts on this?

Thursday, March 02, 2006

Webhost Hiatus

Well my webhost crashed and I lost a month of posts.  I’m trying to see if I can find a more recent backup, but for now this will have to do.

I moved over to webhost4life.  They have pretty good hosting for $10/month for:

  • asp.net 2.0
  • sql server 2000
  • sql server 2005
  • mail

The only downside is that you have to pay $15/year for each domain that points to a folder other than your root.  So if you have 2 sites, you’ll have to put them in their own subdirectory, and pay a little extra to get the domain to point there.

Still not a bad deal for 2 sites, $150 for a year, including mail.

Sharepoint Portal Server Installation

I was installing Sharepoint Portal Server 2003 at a client site this week.  During and after the install we were getting very strange errors, eventually leaving the site useless until we could figure them out.  Installing WSS Service Pack 2 and SPS Service Pack 2 helped get through the installation, but even after the site was completely installed, we still received lots of errors.

It turns out that IIS didn't have script maps for ASP.NET 1.1, so only 2.0 showed up in the list.  Though the updates are supposed to work with 2.0, my experience tells me otherwise.  Sharepoint Portal Server 2003 *definitely* has issues if you run it in 2.0.  To add the option for 1.1 in IIS, you can run:
c:\windows\Microsoft .NET\Framework\v1.1433\aspnet_regiis -i
This will reinstall the script maps for that version into IIS.  I changed the SPS site to use 1.1,  but I still received errors. 

A reinstall put the site back on 2.0, which was quite odd...  I got the same errors as before.  Finally, to fix it I disabled 2.0 in IIS 6.0's Web Service Extensions section.  Then I reinstalled SPS, which was then forced to use 1.1.  All was well with the world after that...
Sunday, January 08, 2006

SqlExpress connection under Remote Desktop

While developing a small website this week I ran across an unusual error. 

When on my lapop, I generally remote into my desktop PC because it has Visual Studio and all the tools I need.

I decided to use a SqlExpress file as the database, since there won’t be much data for the application.  This worked for about 2 weeks until I got this error upon opening a connection:

Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.

This error has to do with the fact that I am using remote desktop to develop.  When I access a file-based sql express database, the data is actually copied locally, which is why it takes so long to start up. 

Kevin Jones says:

SQLExpress creates a directory per user in "c:\Documents and Settings\[user]\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS" that it uses to store information. Deleting this directory has fixed both of my problems.

I’ll update this with my results.

Update:  It worked!  How weird.  This fix definitely looks temporary but it’s working for me so far.

Thursday, December 08, 2005

I'm all banged up!

On Thursday, I was involved in a serious car accident.  I hit a dump truck head on.

My car was mangled beyond belief, both airbags deployed, and I was in bad shape.  My right leg was obviously broken; it looked like a pillow doubled-over on itself. (Ouch!)  My left arm was also obviously broken.

Paramedics arrived quickly, they pulled me out of my car (quite painfully) and I was laid on a stretcher.  I heard someone say “be still, this might hurt,” and then followed the most painful thing I have ever encountered.  He pulled my leg to re-set my femur.  My leg popped loudly 3 times while I begged him to stop.

I was put on a helicopter and flown to the hospital.

Later that evening I had surgery on my arm and leg.  On my right femur, they inserted a titanium rod to fuse the bones back together.  For my left radius, they inserted a few pins to fasten a loose piece of bone.

I stayed in the hospital until Tuesday evening.  I am home now, basically immobile for I assume quite a while.

I guess I should consider myself lucky.  I am thankful for all my friends and family who showed support and came to visit or called during this tragedy.

Share Dealing - Hotel Las Vegas - Debt Consolidation - Best Credit Cards