Sunday, July 18, 2010

Assignment Day 1:Sniffing

  1. The code has a lot of similar ifs at many places
  2. To fix a bug you have to apply the same fix at many places
  3. Your code has a lot ifs doing enum/type/string comparison to decide the function to be called for a particular object
  4. It is difficult to find out which function is called when
  5. Many classes in the code has more than 20 functions
  6. The number of classes with similar names is endless in your project
  7. Get/Set functions are virtual
  8. You can’t understand the purpose of the class by looking at its header file
  9. This is derived from that and that is derived from that and that is derived from that, so this and that have a ‘is a relationship’…didn’t get it…let us start again…
  10. Derived class doesn’t override even one virtual function defined in the base class
  11. Almost every new feature needs changes in at least 10% of the files in the project
  12. You can copy and paste the code Reviewer of the code always says, I am looking at this code for the first time…
  13. The number of Abstract classes…are you not able to find any?

6 comments:

  1. 1: If the code is having a lot of global variables.

    ReplyDelete
  2. Having too many public and protected data members.

    ReplyDelete
  3. class UIBase_X : public wxPanel
    class JPUIBase : public UIBase_X
    class JPUIBaseControl: public JPUIBase
    class JPUIComboBox : public JPUIBaseControl
    class JPUIPageSize : public JPUIComboBox
    class JPUIDocumentSize : public JPUIPageSize

    ReplyDelete
  4. Above shows the indeterminate level of growing hierarchies in JP

    ReplyDelete
  5. Having uninitialized variables and pointers.

    ReplyDelete
  6. Class exposes only set and get functions

    ReplyDelete