Myself throwing NullReferenceException... needs help

Posted by Amit Ranjan on Stack Overflow See other posts from Stack Overflow or by Amit Ranjan
Published on 2010-05-26T08:26:51Z Indexed on 2010/05/26 8:31 UTC
Read the original article Hit count: 240

Filed under:

I know it might be a weird question and its Title too, but i need your help. I am a .net dev , working on platform for the last 1.5 years. I am bit confused on the term usually we say " A Good Programmer ". I dont know ,what are the qualities of a good programmer ? Is the guy who writes a bug free code? or Can develop applications solely? or blah blah blah...lots of points. I dont know... But as far i am concerned , I know I am not a good programmer, still in learning phase an needs a lot to learn in coming days. So you guys are requested to please help me with this two problems of mine

  1. My first problem is regarding the proper Error Handling, which is a most debatable aspect of programming. We all know we use

`

try
{
}
catch
{
} 
finally
{
}

`

in our code to manage exception. But even if I use

try
{
}
catch(exception ex)
{
throw ex
} 
finally
{
}

, different guys have different views. I still dont know the good way to handle errors. I can write code, use try-catch but still i feel I lacks something. When I saw the codes generated by .net fx tools even they uses throw ex or `throw new

Exception("this is my exception")`..

I am just wondering what will be the best way to achieve the above. All means the same thing but why we avoid something. If it has some demerits then it must be made obselete.Anyways I still dont have one [how to handle errors efficiently?]. I generally follow the try-catch(execoption ex){throw ex}, and usually got stucked in debates with leads why you follow this why not that...

2.Converting your entire code blocks in modules using Design patterns of some OOPs concepts. How do you guys decide what architeture or pattern will be the best for my upcoming application based on its working, flow etc. I need to know what you guys can see that I can't. Since I know , I dont have that much experience but I can say, with my experience that experience doesnot comes either from degree/certificates or success you made instead it cames from failures you faced or got stucking situations.

Pleas help me out.

© Stack Overflow or respective owner

Related posts about .NET