Navigation

Search

Categories

On this page

Velocity
Measuring code readability ?
The biggest win of pair programming is...
Vista SP1
Martin Fowler Talk
COM Exception while loading a Web Application Project
Seen on a CC Tray near you
Scaffolding with ASP.Net

Archive

Blogroll

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

RSS 2.0 | Atom 1.0 | CDF

Send mail to the author(s) E-mail

Total Posts: 149
This Year: 2
This Month: 0
This Week: 0
Comments: 43

Sign In
Pick a theme:

# Saturday, June 07, 2008
Saturday, June 07, 2008 3:27:42 AM (GMT Daylight Time, UTC+01:00) ( .Net Web | High Availability )

 a distributed cache solution for ASP .Net, and its from MS at last. About time there was a solution to the age old problem of session state and scalability. Its in CTP right now, and looking forward to having this in a standard .net distribution.

Comments [0] | | # 
# Wednesday, May 28, 2008
Wednesday, May 28, 2008 7:51:38 PM (GMT Daylight Time, UTC+01:00) ( .Net General | Software Design )

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..

 

Comments [0] | | # 
# Sunday, April 06, 2008
Sunday, April 06, 2008 5:22:45 PM (GMT Daylight Time, UTC+01:00) ( Agile )

the concentration and focus achieved. While pair programming, I tend to shut out e-mail, IM , ringing phones and all the other distractions.  What I have noticed is that it is much easier to get into the "zone" where code just flows. it is very easy to get more productive, and I see myself focusing on my code for about 4 to 5 hours of my day.

Comments [0] | | # 
# Saturday, March 22, 2008
Saturday, March 22, 2008 2:16:58 PM (GMT Standard Time, UTC+00:00) ( Vista | Windows )

The long awaited , update to Vista was released on Tuesday. After my experienced with it, I have to say it is the most painful service pack ever from Microsoft. Remember the times when all you had to do is install the service pack, do one reboot and all is done ? well not anymore. Prepare to leave things overnight , expect it not to install, and take another hour reverting changes, and expect to have no indication of what went wrong. This was my experience while installing Vista SP1.

I downloaded the standalone install, let in install. It goes up to stage 3, and when it is 100% complete, the screen shows "Install was not successful, Reverting changes". This process goes on for about an hour and 2 reboots. The reversal is actually good, it brings back my  system to the pre- SP1 install state. After trying this since Tuesday and getting no where, I took the step of re-installing Vista.

I used the Upgrade option, as not to loose any of my settings or files. I then applied SP1 to this "fresh" installation and it worked !!.  SP1, includes all updates since the Vista release, and I think the setup process gets confused on a Vista system, that is fully patched.

Therefore, the "works-for-me-anecdotal" method to get SP1 to install, is to re-install Vista, and then apply SP1. Do not use windows update after the Vista re-install. Disable any anti-virus  and anti-spyware.

Haven't noticed any major performance improvements yet though. Though it seems a bit faster. Resume from hibernation is noticeably faster. I had issues where the system would hang when resuming. Will wait and see.

Fingers crossed....

Comments [0] | | # 
# Thursday, March 20, 2008
Thursday, March 20, 2008 2:37:05 AM (GMT Standard Time, UTC+00:00) ( .Net General | Software Design )

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.

Comments [0] | | # 
# Saturday, March 01, 2008
Saturday, March 01, 2008 1:17:44 PM (GMT Standard Time, UTC+00:00) ( .Net General | .Net Web )

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.

Comments [0] | | # 
# Wednesday, February 13, 2008
Wednesday, February 13, 2008 10:05:13 PM (GMT Standard Time, UTC+00:00) ( Odds & Sods )

Click image to view large version

cctray

Comments [0] | | # 
# Thursday, January 24, 2008
Thursday, January 24, 2008 9:53:00 PM (GMT Standard Time, UTC+00:00) ( .Net Data | .Net Web )

Many web applications have a back end "admin" pages to manage tables in the database.  These pages exist solely to perform CRUD operations against a single table. Sometimes with a bit of validation.

It is tedious work if you have to create and write the same code  for each table and to maintain them. To make this task somewhat easier, there are solutions that look at the database structure, and generate the data access code and the asp.net pages.

The latest and greatest of them is ASP .Net Dynamic data. This uses LINQ to SQL for data access. Its quite easy to get a site up and running using this.

Mono Rail has an ActiveRecord scaffold.  This uses Castle ActiveRecord and Nhibernate to generate the scaffold. However, this doesn't generate the database to object model mapping automatically.  Classes that inherent from an ActiveRecord base have to be created first. Fields and relationships have to be defined in code. When this is done its all a breeze. Its a good way to get to grips with MonoRail.

 

Subsonic which I'm using on a project now, has two methods of operation. It has a set of scaffold controls which you can use on any asp.net pages to get CRUD functionality, and it also has the option to generate the asp.net pages and the data classes. The data classes generated by subsonic use the active record pattern too. The code generated by subsonic can be modified if you need to do so. After the code is generated these are normal asp.net pages to which you can add validation, combine with master pages etc..

Subsonic and Asp.Net dynamic data offer the quickest way to get up and running.  Subsonic and MonoRail offer the possibility to extend the application when things get more complex. The data classes generated can be reused when the application grows beyond a simple prototype or admin section.

Comments [0] | | #