Posts

Showing posts from 2010

Introducing Object Oriented Concept

     In this section we will learn about 'How to think in Object Oriented way'.        Objectives       After completing this unit we should be able to:   * Think the real world in object oriented way * Understand what really object and class means * Describe what are attributes and responsibilities of an object.     Topics   In this unit, we will learn about the following topics: * What's wrong with starting of Object Oriented Programming * Philosophy of OOP * Mapping Object Oriented Thoughts to Object Oriented Programming   What's wrong with starting of Object Oriented Programming Unfortunately most of us start Object Oriented Programming (OOP) jumping into a language book like C++, Java or C# etc. But it's not a good start at all. Starting with OOP language book, we may learn writing package/namespace, class, object, interface, etc. But writing class, interface, object etc. does not guarantee good software design. OOP is totally useless if we can't use this c

Code Smells : The Manual [Part 1]

       Code Smells By the definition i found in    Wikipedia , code smell is: " In  computer programming ,  code smell  is any  symptom  in the  source code  of a  program  that possibly indicates a deeper problem. " We do mistakes while we code. Its very certain. Some of us know about the smell while we code, others don't. But if someone just avoid the common smells in coding, his/her code will be increased a lot in quality. So, to write a quality code, we must know what are the code smells and we MUST avoid it.  My personal opinion is, don't be a procrastinator in coding. Remove the smells after a single method or at least after completing a feature.  In below these are the code smells that a beginner in coding should know. I will add more explanation to each of the smells in future.  [Black circled point is the name of the smell and while circled point is the solution to remove the smell from your code.] Inappropriate naming rename it Comments extract method