Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,150,429 members, 7,808,531 topics. Date: Thursday, 25 April 2024 at 01:07 PM |
Nairaland Forum / Science/Technology / Programming / O-O Design Code Smells (1123 Views)
(1) (Reply)
O-O Design Code Smells by harryobas: 4:06pm On Jul 03, 2012 |
Hello fellow nairalanders just want to share a few O-O design “Code Smells“(code that can make software design harder to change) with you all. These are just a few of the common smells i have come across from my experience of performing O-O design and code refactoring so please feel free to add to the list below if u think i have omitted any. The list is as follows: Duplicate code Long methods Big classes Big switch statements Long navigations (eg, a.b().c().d()) Too much checking for null objects Data clumps (eg, a Contact class that has fields for address, phone, email etc) – similar to non-normalized tables in relational database design Data classes (classes that have mainly fields/properties and little or no methods) Un-encapsulated fields (public member variables) Note that the above code smells have been listed from the c# programming language standpoint but i believe they are equally applicable to any O-O compliant language(java ,c++ etc). |
Re: O-O Design Code Smells by ektbear: 7:56am On Jul 19, 2012 |
"Eww, what is that smell. Your code stank!" |
(1) (Reply)
Who Build A Cash Daily Buying And Selling Programm In Excel / PHP: Five Common Causes Of White Screen Of Death / Get Programming And Web Development Tutorial Videos At A Very Cheap Price
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 7 |