CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Ranjan Sakalley

March 2005 - Posts

  • Books?

    Am looking for a set of good books, and one of our guys is in the US rite
    now, so I can buy them from Amazon (dont get me into details as to why we
    dont get good books in india :(, just have to import, or wait for a year)

    Any ideas about some books tech / management? Would really appreciate
    recommendations.

    I already have Code Complete, XP Explained,Scrum, Ingo Rammer, Fritz
    Onion, Don Box, TDD. Looking for some good metaprogramming/new Management
    titles, and new technical books on Enterprise Integration Patterns.

    TIA.
    Posted Mar 17 2005, 10:45 AM by rsakalley with 3 comment(s)
    Filed under:
  • The importance of being Extreme with Development Testing

    When developing a product, one of the most important problems that a development team has to tackle is the fear of the unknown. While both services and products concentrate on an act of automation for the end user, in contrast with a service that serves a single company, a product focuses on enhancing productivity of a totally unknown set of customers.
    A product development team has to understand that each of their small actions will have a tremendous effect, with (hopefully) thousands of users reacting. If going in the positive direction, the team can really help out the users to high productivity and quality through automation of an activity.  On the other hand, a simple flaw in the product can make a lot many customers feel miserable about the whole idea of automating a process.  

    Importance of Developer Testing and TDD


    The foremost feature of any software product is its quality. The development team must ensure perfection of their code. They must never be complacent about the quality of their product. Traditionally, it has been the responsibility of qualified and experienced Quality Engineers to ensure the perfection levels of a software product. There are basic flaws in this being the only quality ensuring process which is followed, and these are because

    •    A Quality Analyst directs his/her attention to only the functional aspects of the end-result.

    •    A Quality Analyst cannot make sure of extensibility in design. Though quality and extensibility sound unrelated, they have a very deep cause-effect relationship. An inextensible product can be totally flawless, and pass all quality measures, failing some later on enhancement requests, demanding a change in design. Thus a design perspective is wanted.

    •    A Quality Analyst has no idea what the code looks like. With the highly dynamic nature of personnel developing a software product, it has become very important for a developer to ensure universal understanding of the code they write. What can be achieved with proper comments and refactoring never (and should not) bothers a Quality Analyst.

    •    A Quality Analyst can only test the product through its GUI. When the team wants to expose the central API of the product to 3rd parties to develop enhancements, or decides to customize the GUI for an important customer, a completely new set of use cases come into picture. A Quality Analyst can only test all these if provided a GUI, which not only is time consuming, but unneeded in the wake of new development tools provided for White Box Testing.

    •    An automated Regression Testing marathon, does not dig any deeper, as a QA totally depends on the UI of a product.

     The most productive option to tackle these flaws is to encourage developers to test their code, feature by feature, following TDD. It is of utmost importance that all features are broken down to the lowest possible granule and then each granule tested. This is roughly equivalent to checking each brick while building a house, which is what the owner, would love the builder to do.

    Breaking complex features into small units enables a developer to understand the expectations perfectly. When a test passes on a unit, it gives confidence to the developer that he/she can build over this brick.  And it is imperative that the development team will identify design flaws that might result into redesign much earlier, or at the least encourage an extensible design. Automated regression of persisted unit tests ensures much higher quality than the regular GUI testing tools, and what better if both of them are used together!


    Originally posted here and therefore Copyright of my employer, Proteans , and me.

     

  • Questionnaire for my trainees

    Set of questions that I asked my trainees today, please drop in comments if you think I need to add something more, so as to force them understand how things work.

    1. What is the difference between a function call and invoking an event?

    2. Explain the coordination between an event, a delegate and the function.

    3. What is the difference between a pointer and a reference ?

    4. Why do you need a "ref" keyword for a reference type ? For a value type ?

    5. What is the difference between a class library and an executable?

    6. How can you execute a function written in a class library?

    7. What is the output of an ASP.Net application. EXE or a DLL. If exe, who invokes it, if DLL, who hosts it?

    8. Write a program to register a function to a delegate, and then using the delegate, invoke the function.

    9. Explain how you would programmatically implement a Boiler. Logic - a. Normal operation is that the temperature should rise until it is stopped. b. As soon as the temperature goes above a limit, the temperature monitor should ask the boiler to stop. c. As soon as the temperature goes below a temperature limit when the boiler is stopped, it should be started by the temp. monitor.
    Posted Mar 08 2005, 12:03 AM by rsakalley with 15 comment(s)
    Filed under:
  • Casting and Overriding III

    The piece of code in the previous post would naturally give a warning, as Class B's member Foo() hides Class A's Foo. You either need to override it, or write a "new" Foo.

    What about the following two -

    using System;

    class A
    {
        
    public virtual void Foo()
        {
          Console.WriteLine("Call on A.Foo()"); 
        }

    }

    class B : A
    {
        
    public override void Foo()
        {
          Console.WriteLine("Call on B.Foo() " ); 
        }

    }

    class C : B
    {
       
    public new void Foo() 
       {
          Console.WriteLine("Call on C.Foo()"); 
       }

    }

    class D
    {
       
    static void Main()
       {
         
          A c1 = 
    new C(); 
          c1.Foo();
          Console.ReadLine();
       
       }
      
    }


    and

    using System;

    class A
    {
        
    public virtual void Foo()
        {
          Console.WriteLine("Call on A.Foo()"); 
        }

    }

    class B : A
    {
        
    public virtual new void Foo()
        {
          Console.WriteLine("Call on B.Foo() " ); 
        }

    }

    class C : B
    {
       
    public override void Foo() 
       {
          Console.WriteLine("Call on C.Foo()"); 
       }

    }

    class D
    {
       
    static void Main()
       {
         
          A c1 = 
    new C(); 
          c1.Foo();
          Console.ReadLine();
       
       }
      
    }

    and why?
    Posted Mar 03 2005, 09:06 AM by rsakalley with 11 comment(s)
    Filed under:
  • Casting and Overriding II

    On the lines of Geoff's post (sorry Geoff for doing this without permissions), what will be the output of the following program ? (and why?)

    using System;

    class A
    {
        
    public virtual void Foo()
        {
          Console.WriteLine("Call on A.Foo()"); 
        }

    }

    class B : A
    {
        
    public virtual void Foo()
        {
          Console.WriteLine("Call on B.Foo()"); 
        }

    }

    class C : B
    {
       
    public override void Foo()
       {
          Console.WriteLine("Call on C.Foo()"); 
       }

    }

    class D
    {
       
    static void Main()
       {
         
          A c1 = 
    new C(); 
          c1.Foo();
          Console.ReadLine();
       
       }
      
    }

    Posted Mar 03 2005, 04:57 AM by rsakalley with 14 comment(s)
    Filed under:
More Posts