Thursday, December 11, 2008

here is a random thought I had today.

From what I've seen, in the past 2 years, agile practices have spread among the .Net community.  The .Net framework  gives us the power to do TDD and follow other agile principles.  the community is now empowered with a rich API , so that we don't have to worry about how to build things.  We now have to worry about what we can build and how to build it better.

We have been freed from the shackles of VB and classic asp, with a good OO framework, that is getting better. You name the problem and there is a very good .Net based tool to help you solve it. You want mocking , you have Rhino Mocks, you want persistence you have NHibernate, you want testing APIs, you have Nunit, Mbunit and what not. 

The technology and tools to build better software is here, are you using it ? if not what's stopping you ?

Thursday, December 11, 2008 8:03:25 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Monday, August 18, 2008

 

If you get an error with the message in the install log like;

dotnetfx35.exe failed with 0x80070643 - Fatal error during installation

It helps to run a manual cleanup of any .Net 3.5 framework installations before trying again. Use the automated cleanup tool here. Remove the .Net 3.5 version already installed. You may need to do it twice to do a complete cleanup. Then start the SP 1 setup again.

Monday, August 18, 2008 9:58:32 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Wednesday, May 28, 2008

Thinking of ways to measure code readability. How easy is it to read and understand a  method, or class ?

Number of branches in a method ? more branches -> more complex  hence a more complex method  that is hard to read

Split the camel casing of a method/class into words and run some sort of word analysis to check if the words make sense ?

The analysis has to be automated, and run as part of CI ideally..

 

Wednesday, May 28, 2008 6:51:38 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Thursday, March 20, 2008

Today, at work I was treated to a rare opportunity to attend a talk by Martin Fowler. I may or may not get the chance to hear someone who can profoundly inspire developers. with simple( sometimes obvious) nuggets of wisdom, that will make us build better software.

The talk didn't have a specific title, but centred around the theme of software design and how we go about it. His talk mostly focused on how keeping things simple can help build better software. This concept is obvious, but many of us loose sight of it.

look at what has already been done.

Similar problems have already been solved, someone out there knows how to solve it.  This is the basis of all the design patterns that have been collated by Eric Gamma et al and Martin Fowler himself.  Patterns are nothing new, they are not the future. They are practices that have been used in successful software in the past, and we can draw on the lessons learnt during the past 30 (or more)  years of software development.

spread knowledge backward

it's important that older, experienced developers pass on their knowledge to new or less experienced developers. He made an interesting point on how software architects at Thoughtworks pair up with less experienced developers. A good software architect is one who does not have to make any decisions. On a related subject Martin said "burn your architecture document". If the developers have to refer back to a document, it means that they haven't fully absorbed the architecture of the system being built, and there are gaps in their knowledge.

keep things simple, expect and prepare for change

This is what inspired me the most. Software is soft( malleable). It always changes, expect and be ready to change. Importantly be prepared to undo change. Work with what you know, and do not worry about changes that can happen. Postpone decisions till you absolutely need to make them. Organise work into incremental chunks of changes.

There is a lot more I took away from the talk. Might take a while to digest it all :). However these are concepts that are stressed in the books listed below, specially in The Pragmatic Programmer.

If you haven't read any of Martin Fowler's books, I strongly suggest you do so immediately, along with a few other books that will inspire ( and shock you) into being a better developer.

Patterns of Enterprise Application Architecture

Refactoring: Improving the Design of Existing Code

Domain-driven Design: Tackling Complexity in the Heart of Software

The Pragmatic Programmer

Kudos to Jason for organising the talk.

Thursday, March 20, 2008 2:37:05 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Saturday, March 01, 2008

VS 2008 throws a COM Exception when loading a web application project. This happens when the project was made in VS 2005 and upgraded using the Upgrade Wizard. It loads web application projects made natively without a problem. There is a work around if this happens to you.

Via http://www.codeattest.com/blogs/martin/2008/01/comexception-loading-solution.html

"In order to load the Web Application Project you must make sure that the URL that the project is using, is valid and can be resolved. This can happen pretty often since when you download a project from source control for the first time, it is highly unlikely that you will have the web site already set up."

 

If this happens to you, the project will not load and will be grayed out in the solution explorer. Right click and edit the project, (or edit the .csproj file in notepad) look for the WebProjectProperties element. Check if the IISUrl child element points to a valid location. The server should exists, and the virtual directory should point to the same location as the web application project.

Saturday, March 01, 2008 1:17:44 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Tuesday, November 13, 2007

In the midst of fiddling with the Xbox, I took the second part of the MCSD to MCPD uprade exams. I got a  voucher to do the first part (70-553) at the Visual Studio 2005 launch event. I got around to doing the second part (70-554) yesterday. I passed with a comfortable 820. This is the last of the certifications till the .net 3.5 series comes out.

Tuesday, November 13, 2007 11:52:16 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Sunday, July 15, 2007

http://www.codinghorror.com/blog/archives/000771.html

"The certification alphabet is no substitute for a solid portfolio; you should be spending your time building stuff, not studying for multiple choice tests. But that doesn't mean they're worthless, either. I don't think certifications get in the way, as long as you can demonstrate an impressive body of work along with them."

I couldn't agree more. I find that there is a misconception MS certifications are software development qualifications. Many budding developers think of this as a must have and expect to get programming skills through the certification program. They fail to realize that the MCP/MCSD/MCPD certifications are product certifications rather than programming certifications.

Sunday, July 15, 2007 12:12:58 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Friday, March 30, 2007

Quick and dirty function to return the size of a file in a properly formatted string in KB, MB or GB. There has to be an easier way than this .....

 

    private const double KByte = 1024;
    private const double MByte = KByte * 1024;
    private const double GByte = MByte * 1024;

public static string GetFileSizeString(int bytes) {
        if ((bytes / GByte) < 1) {
            if ((bytes / MByte) < 1) {
                if ((bytes / KByte) < 1) {
                    return String.Format("{0} B", bytes);
                }
                else {
                    return String.Format("{0} KB", Math.Round((bytes / KByte), 2));
                }
            }
            else {
                return String.Format("{0} MB", Math.Round((bytes / MByte), 2));
            }
        }
        else {
            return String.Format("{0} GB", Math.Round((bytes / GByte), 2));
        }
        
    }
Friday, March 30, 2007 1:54:54 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Sunday, January 28, 2007

A nice step by step tutorial, on how to submit a patch/bug fix to a OSS .net project on Sourceforge.

How to contribute a patch

Sunday, January 28, 2007 8:21:32 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Monday, November 27, 2006

 

Handy online tool. http://www.hitsw.com/xml_utilites/

Monday, November 27, 2006 10:53:51 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Sunday, November 26, 2006

Make your code posts pretty.

http://puzzleware.net/blogs/archive/2006/10/29/CodeHTMLer-plugin-for-Windows-Live-Writer.aspx

  1 /// <summary>
  2 /// Summary description for Main.
  3 /// </summary>
  4 static void Main(string[] args)
  5 {
  6   // string variable
  7   string myString = "myString";
  8 
  9   /* integer 
 10      variable */
 11   int myInt = 2;
 12 }
Sunday, November 26, 2006 5:52:27 PM (GMT Standard Time, UTC+00:00)  #    Comments [1]  | 
 Monday, August 21, 2006
Monday, August 21, 2006 9:13:06 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 

Found this nice article.

Creating MMC Snapin using C# (Part I)

Requires a the MMC .Net library over at sourceforge.

http://sourceforge.net/projects/mmclibrary/

Monday, August 21, 2006 8:46:32 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Tuesday, May 09, 2006

Download here

Makes code more readable, works only if ClearType is enabled. Looks good on my laptop

via http://blogs.msdn.com/vseditor/archive/2006/05/08/593399.aspx

Update: Works with VS 2003 as well, just go to Tools ->Environment and set Consolas font for the text editor

Tuesday, May 09, 2006 4:59:54 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Wednesday, May 03, 2006

http://www.developerday.co.uk

Registrations are now open for DDD, on the 3rd of June.

 

Wednesday, May 03, 2006 9:30:17 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Friday, April 28, 2006

Added these blogs to my feed list.

http://blogs.msdn.com/tess

http://dotnetdebug.blogspot.com/

Tess's blog is full of  debugging and trouble-shooting tips.

http://blogs.msdn.com/tess/archive/2006/02/23/537681.aspx

Friday, April 28, 2006 10:25:38 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]  |