Tuesday, February 23, 2010

Visual Studio VS plugin for Apache Maven

http://www.npanday.org/docs/1.2-SNAPSHOT/

I found after a long search on maven plugin for .net
please share your experience also because, its very new so,if anyone has any problem or got any appropriate solution share it.

Tuesday, February 16, 2010

No template information found. See the application log in Event Viewer for more details.

No template information found.
See the application log in Event Viewer for more details.

I got this problem I found solution of this problem is very easy fix is
use visual studio command prompt type devenv/installvstemplates

hope this help you out!

Monday, February 8, 2010

How to Enable AdHoc Quaries


I want to save my records in excel file for this I have to use openrowset in my query . It throws my error of AdHoc Quaries is disable on you server contact your administrator.
If you are using sqlserver 2005 or 2008 then follow this pictorial represenstation this is one way

and easy way :)





click on surface area configuraiton for feature and then you see screen below.

enable this adhoc query option and enjoy.
there is another way which is manual way for this follow this link

Sunday, February 7, 2010

Becoming a Great Developer



Becoming a Great Developer



You are very good programmer, problem solver and algorithms writer.


If your code is not good enough to deliver your knowledge,however,your team and your company will suffer in logn run.It is crucial that as a great developer you are not passionate about code.


We talk consistantly about design patterns,refacotring and code readablity, but when it gets right down to it, we often ignore infromation due to constraints of time.


The fact remains that we must consider some important points begin to always right code in this manner.
Here are some techniques that I have learned,which we can include in our daily programming practice.


1. Use common template in whole code ,it shows your code consisitancy in whole proj/prod.


2. Repitative code should be in single method.
3. Try to use factory method where ever object creation is concern.
4. Variable name should be self descriptive.
if (HasInstantiationAwareBeanPostProcessors)
{
foreach (IObjectPostProcessor processor in ObjectPostProcessors)
{
IInstantiationAwareObjectPostProcessor inProc = processor as IInstantiationAwareObjectPostProcessor;
if (inProc != null)
{
if (!inProc.PostProcessAfterInstantiationwrapper.WrappedInstance,name))
{
continueWithPropertyPopulation = false;
break;
}
} }
5. Use singleton on your Service and Dao layer, it creates a hell on each call of new object creation.
6. These objects are useless to create at every call.

7. Use at least one line summary of method in your comments area.
8. KIS principle.(Keep it Simple)Your method should contain single respoinsiblity don’t make your method monolithic.
/// Checks if a string has length.
/// if the string has length and is not
///
///
///
/// StringUtils.HasLength(null) = false
/// StringUtils.HasLength("") = false
/// StringUtils.HasLength(" ") = true
/// StringUtils.HasLength("Hello") = true
///

public static bool HasLength(string target)
{
return (target != null && target.Length > 0);
}
9. Your calss should be single responsible of your logic means userservice should have method of only related with user related.

10. Declare interface for your each layer’s object.Mean to say userservice should have IUserservice same with other service layer object either it is infrastructure,Dao,persistnance.

Writing software is not just one time activity as codes have to dealt with 90% of the time.It's a life time activity and I think that code maintanance should be a part of everyday.Code maintanance is understanding that the easier code is to write the easier it is to maintain.