Raj's Notepad

Random Thought's
All you need to know about Windows Task Manager

Have you wondered what does  'Commit Charge' ,'Kernel Memory' tabs on the Task Manager means.

Check out this blog by jeff for information.

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

Tracking down *managed* memory

There is a great post on tracking managed memory by Rico Mariani

http://blogs.msdn.com/ricom/archive/2004/12/10/279612.aspx

Thanks Rico, I was able to fix the memory leak after struggling for more then a week.

Step 7: rightly pointed out the main culprit.

Guess what, I ended up reading all your post. All his entries are great resource for any developer.

Posted: Feb 02 2006, 12:53 AM by rmahato | with no comments
Filed under:
Debug.Assert

Do I need all those asserts in my code? Well it seems like a good practice during the development /integration phase.

 It turn out that in-correct asserts may kill the time required for debugging. Most of the time goes in fixing the assertions itself.

Do I need assert to check the parameter passed to a function is not null?  Or the result from method call is not null.

I think these are cases of error handling or mere logical checks rather then assert.

What’s your take on this?

PS:  I am new to TDD *

Posted: Dec 29 2005, 01:36 AM by rmahato | with no comments
Filed under:
INfo : In NET 2.0 you'll be getting an *exception* for UI Updates from Timer Callbacks

Just got my  hand  dirty on .NET 2.0 , Started with fixing  threading issue while update control properties from a timer callback.

Well In my earlier version of code,  I dont check for "InvokeRequired " property and it would worked fine...  now I  ended up updating all my UI code for this check.

This is a nice way of developing winform apps  !  I wonder how many App's a gona break ;)

I know this is well documented feature ...many developer like me at time igonore's it  . as the app works fine....

 

Posted: Nov 19 2005, 07:57 AM by rmahato | with no comments
Filed under:
Photo search ? Face recognitions -- riya.com

Just came across this *new* concept behind photo search ....

http://www.riya.com/corp/history-face-recongnition.jsp

Well heard of this earlier, but good to see someone taking a step forward to make it a reality for day to day users.

Riya folk  --if you happen to see this .. do leave me a note to invite me in ur beta testing...

Wondering if it's actual Recognition or EXIF ???

interesting stuff --Speech SDK

Its been a while since i have updated my blog .  I will try to blog more often.

Offlate , I have been playing with SAPI sdk ..its  been fun so far.. I am expecting a huge improvement in the coming

relasease of Windows.  Well there are many appliation which uses TTS  ....the interesting aspect is to build around

SR capabilites....  which not many have tried (is it????)

Though the sdk is old , hasn't gone much change ... it has very strong SR feature which can change your application in

multiple dimension...

Well if you have use this in your application do share your experience.

http://www.microsoft.com/speech/download/sdk51/

Posted: Oct 19 2005, 01:14 AM by rmahato | with no comments
Filed under:
INFO Requested : UI workflow for transcription system

I know that there are lot transcription tools available in the market for managing Transcription . so for i didnt get a chance to have my hands on any of those..

I am currently looking out for information  on the UI workflow ,  Sound Engine used in those applications.

I will be happy to hear from anyone who has first hand experience on designing a transcription system. 

 

Posted: Jun 27 2005, 08:07 AM by rmahato | with no comments
Filed under:
INFO Req- Distributed Database Design with SQL Server 2000

I am in a  Process of designing database deployment for a system.

There are 4 major subsystem involved  in the application each uses its own database  and  follows a workflow paradigm

Database :

1) Primary DB
2) Processing A DB
3) Reporting DB
4) Processing B DB


The Purpose of Primary is to hold  all the  Input data in unmodified(raw) state.  Processing A DB is a Exact copy of  Primary DB.

In Processing A DB the the computation & Validation happens .The results ( More than one Table )of  Processing A is updated in Primary DB.

This updates needs to be transfered to  Reporting DB , Processing B DB.

In Processing  B DB  some status column is updated and  this updates needs to be propogated back to the Primary

I am  Looking at transactional  Replication as a Option for this .

Plan so far : ( Transactional Publication )

Setup a publication  on Primary  including all tables . Subscribe this publication on Processing A DB and Other DB. 

Setup another Publication on the Processing A DB and  let Primary DB subscribe to the publication on Processing A DB to recieve the updates . It  seem cyclic at this stages lets

have some fillter criteria to prevent the Cyclic propogation.

Anyone has any views on this approach .....

 

Posted: May 09 2005, 07:29 PM by rmahato | with 1 comment(s)
Filed under:
Info Required : BizTalk Vs WebMethods

I am currenlty looking for information on  Biztalk and WebMethods .

Can someone provide  me a first hand account on using this servers.  what are the problems involved.

 wrt webmethods what are the integration issues with .NET .  If i take interope as mechanism , is there a performance hit.?

 

 

 

 

 

Posted: Oct 29 2004, 11:28 AM by rmahato | with 3 comment(s)
Filed under: ,
Validation Framework for Business Objects : Alpha Version Released

Validation Framework for Business Objects

 

Introduction

 

Tried of writing same validation code in every method of your business component? Ever wondered about having a validation framework for your business objects which will automatically take care of common validations? Well here is the validation framework which will ease your work and reduce redundant codes and help you to focus more on your business process.

 

BO Validation Framework:

 

 The BO Validation Framework builds an automatic validation framework by leveraging the attribute support in conjunction with the Message chaining framework in .NET. It provide a simple validation process for your business methods

Download  Build :

http://www.gotdotnet.com/Workspaces/Workspace.aspx?id=4a616467-3321-403d-bda1-108986266551

 

Architecture:

 

The Business object interacts with the to the Validation runtime through Attributes.

Its support Automatic Validations for the object derived from ContextBoundObject

 

Currently the following Validations are supported:

 

  • RequiredFieldValidator :    This check for the  null input
  • RangeValidator  : This check if the input is within the set range
  • RegularExpressionValidator : Its check if the input follows the pattern
  • CompareValidator : check if the  input satisfy the give logical condition

 

Minimum requirement for using the package:

 

The Business objects must derive from the ContextBoundObject

 

Current Release Specification:

 

The current package supports:

  • Method Parameter validation
  • Property validation

 

Package Limitations:

  • Currently it does not support static method and static properties.
  • The performance penalty is not  benchmarked

 

 

Next Release:

The current validation framework may be extended for building:

  • Automatic logging
  • Exception Handling
  • Profiling/Tracing

 

Further Study Resource

 

http://www.gotdotnet.com/Workspaces/Workspace.aspx?id=4a616467-3321-403d-bda1-108986266551

 

Appendix 1

 

Code Sample

 

using System;

using System.Diagnostics;

using Framework.Validation;

using Framework.Validation.Validators ;

using Framework.Validation.Runtime ;

using System.Threading;

 

namespace Test.Framework.Validation

{

      /// <summary>

      /// Summary description for TestValidationFramework.

      /// This is sample class which uses Validation Controls

      /// This class Applies MethodValidator Attributes to the class

      /// The Exception Option is set to Disabled

      /// </summary>

     

      [MethodValidator( ValidatorExceptionOption.Disabled)]

      public class TestValidationFramework : ContextBoundObject

      {

            /// <summary>

            /// Summary description for myRangeValidatorMethod.

            /// This method calls the  RangeValidator

            /// </summary>

     

            [ValidatorException(ValidatorExceptionOption.Enabled)]  

            public void myRangeValidatorMethod([RangeValidator(0, 99,ErrorMessage="Must Provide this input")][RequiredFieldValidator()]int  b)

            {

                  Console.WriteLine(" myRangeValidatorMethod  Validate : "+ b);

            }

            /// <summary>

            /// Summary description for myRegularExpressionValidatorMethod.

            /// This method calls the  RegularExpressionValidator

            /// </summary>

     

            public void myRegularExpressionValidatorMethod([RegularExpressionValidator(@"^\(\d{3}\)\s\d{3}-\d{4}$" )]string b)

            {

                  Console.WriteLine("  myRegularExpressionValidatorMethod Validate : "+ b);

            }

            /// <summary>

            /// Summary description for myRequiredFieldValidatorMethod.

            /// This method calls the  RequiredFieldValidator

            /// </summary>

            public void myRequiredFieldValidatorMethod ( [RequiredFieldValidator(ErrorMessage="Must Provide this input")] string inp)

            {

                        Console.WriteLine("  myRequiredFieldValidatorMethod Validate : "+ inp);

            }

            /// <summary>

            /// Summary description for myCompareValidatorMethod.

            /// This method calls the CompareValidator

            /// </summary>

     

            [ValidatorException(ValidatorExceptionOption.Enabled)]  

            public void myCompareValidatorMethod( [CompareValidator(100 ,CompareValidatorOption.LessThan )] int inp)

            {

                  Console.WriteLine("  myCompareValidatorMethod Validate : "+ inp);

            }

      }    

      /// <summary>

      /// Summary description for TestValidationFramework.

      /// This is sample class which uses Validation Controls

      /// This Class Applies MethodValidator Attributes to the class

      /// The Exception  Option is set to Disabled

      /// </summary>   

      [MethodValidator( ValidatorExceptionOption.Disabled)]

      public class TestValidationFrameworkContext  : ContextBoundObject

      {

           

            /// <summary>

            /// Summary description for myRangeValidatorMethod.

            /// This method calls the  RangeValidator

            /// This method also pick up the validation  details for the

            /// current context

            /// </summary>

            public void myRangeValidatorMethod([RangeValidator(0, 99)]int  b)

            {

                  Console.WriteLine(ValidatorContext.CurrentContext.IsValid());  

                  Console.WriteLine(ValidatorContext.CurrentContext.GetErrorMessage() );  

                  Console.WriteLine(ValidatorContext.CurrentContext[0].IsValid);  

                  Console.WriteLine(ValidatorContext.CurrentContext[0].ErrorMessage  );  

                  Console.WriteLine(" myRangeValidatorMethod Validate : "+ b);

                 

            }

            /// <summary>

            /// Summary description for myStringExp.

            /// This method calls the  RegularExpressionValidator

            /// This method also pick up the validation  details for the

            /// current context

            /// </summary>

     

            public void myStringExp([RegularExpressionValidator(@"^\(\d{3}\)\s\d{3}-\d{4}$" )]string b)

            {

                  Console.WriteLine(ValidatorContext.CurrentContext.IsValid());  

                  Console.WriteLine(ValidatorContext.CurrentContext.GetErrorMessage() );                    

 

                  Console.WriteLine(ValidatorContext.CurrentContext[0].IsValid);  

                  Console.WriteLine(ValidatorContext.CurrentContext[0].ErrorMessage  );  

           

                  Console.WriteLine("  myStringExp Validate : "+ b);

            }

 

            /// <summary>

            /// Summary description for myInputRequired.

            /// This method calls the  RequiredFieldValidator

            /// This method also pick up the validation  details for the

            /// current context

            /// </summary>

            public void myInputRequired ( [RequiredFieldValidator()] string inp)

            {

                  Console.WriteLine(ValidatorContext.CurrentContext.IsValid());  

                  Console.WriteLine(ValidatorContext.CurrentContext.GetErrorMessage() );   

           

                  Console.WriteLine(ValidatorContext.CurrentContext[0].IsValid);  

                  Console.WriteLine(ValidatorContext.CurrentContext[0].ErrorMessage  );  

           

                  Console.WriteLine("  myInputRequired Validate : "+ inp);

            }

            /// <summary>

            /// Summary description for myCompareMethod.

            /// This method calls the CompareValidator

            /// This method also pick up the validation  details for the

            /// current context

            /// </summary>   

            public void myCompareMethod( [CompareValidator(100 ,CompareValidatorOption.LessThan )] int inp)

            {

                  Console.WriteLine(ValidatorContext.CurrentContext.IsValid());  

                  Console.WriteLine(ValidatorContext.CurrentContext.GetErrorMessage() );  

                  Console.WriteLine(ValidatorContext.CurrentContext[0].IsValid);  

                  Console.WriteLine(ValidatorContext.CurrentContext[0].ErrorMessage  );  

                  Console.WriteLine("  myCompareMethod Validate : "+ inp);

            }

      }    

      /// <summary>

      /// Summary description for TestFamework Application.

      /// </summary>

      /// <remarks>

      /// This is a test application  to show the Validator framework summary

      /// </remarks>

      public class TestMethodValidatorAPP

      {

            public static void Main(string[] args)

            {

 

                  Console.WriteLine("Running the Code....");

                  TestValidationFramework  app  = new TestValidationFramework();

                  try

                  {

                        app.myRangeValidatorMethod(95);

                        app.myRegularExpressionValidatorMethod ("999 999-9999");

                        app.myRangeValidatorMethod(100);

                        app.myRequiredFieldValidatorMethod (null);

                        app.myCompareValidatorMethod (100);

                  }

                  catch(Exception ex)

                  {

                        Console.WriteLine(ex.Message); 

                  }

           TestValidationFrameworkContext   ap  = new TestValidationFrameworkContext ();

                  try

                  {

                        ap.myRangeValidatorMethod(95);

                        ap.myStringExp("999 999-9999");

                        ap.myRangeValidatorMethod(100);

                        ap.myInputRequired(null);

                        ap.myCompareMethod(100);

                  }

                  catch(Exception ex)

                  {

                        Console.WriteLine(ex.Message); 

                  }

                  Console.ReadLine();

            }

      }

}

 

 

Posted: Sep 20 2004, 07:43 PM by rmahato | with 2 comment(s)
Filed under:
More Posts Next page »