Ugo Landini random thoughts on technology and life
Ulog, the Ugol's Weblog
Archives
« luglio 2005 »
lunmarmergiovensabdom
    
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
21
22
23
24
25
26
27
28
29
30
31
       
Today
XML
Search

Links
 

Today's Page Hits: 11

All | General | Java
« Previous month (May 2005) | Main | Next month (Jul 2005) »
20050720 mercoledì luglio 20, 2005
About Object Orientation
Ok, let's start seriously with my blog... after 1 year of thinking, it's really time to write something here, possibly a completely uninteresting thing!

Recently in Italy we organized our poor man Java One, the Java Conference. It's literally "Poor man J1", because of money, but we are all very smart and we managed to have a great event with very good people :)

We had a lot of interesting guys and speechs: Simon Phipps and Jonh Gage, Craig McLanahan - ie the struts man - Craig Larman for agile methods, Dirk-Willem van Gulik president of Apache Software Foundation, Francesco Cirillo for eXtreme Programming and my friend Gianugo Rabellino for Cocoon, who incidentally had the best score and surpassed our until-now-best-of-the-breed-every-year speechs on OO design.

(BTW, Gianugo: you had the best single speech, we had the best track!)

We (myself, Bruno Bossola and Francesco Cirillo ) organized, as we do every year since 2002,an OO design track, speaking of Object Oriented Principles, refactoring, how to inject objects in a design and so on. I started with OCP (Open Closed Principle), LSP (Liskov Substitution Principle), DIP (Dependency Inversion Principle), SRP (Single Responsibility Principle), FBC (Fragile Base Class) and so on. Then Bruno showed how to - applying principles - refactor a really awful servlet in a more object oriented design, and finally Francesco injected objects and transformed it in a much better piece of software.

Now, straight to the point, what sounds really strange is that people seems, every and each year, soooo interested in those things, though this stuff is not exactly new or fresh or cool. Bertrand Meyer wrote about OCP in late 80s, Parnas wrote about information hiding in 1972, Barbara Liskov wrote about LSP in 1988. Refactoring is an old Smalltalk practice which recently become trendy after Fowler hit the shelves with his book (if I remember well, in 2001), DIP recently became mainstream with Spring, Hivemind and PicoContainer but Robert C.Martin wrote about it in early 90s, and we are not speaking exactly of academic papers! It's mostly free and accessible stuff written for the average designer (ok, LSP original paper needs at least some math background, but that's all)

So, how is that in 2005 we continue to see code horrors like:

- fat methods (fat for me is >10, but I have found methods in the thousand LOC range) and god classes
- conditionals and switches in lieu of polymorphism
- instanceof
- singletons
- getters and setters
- ...

and we can find these code also in books and in open source, not only in usually-low-quality closed source software. It's hard to find an object oriented piece of code, even in so called Object Oriented books, sometimes even in object oriented language libraries!

So what I'd like to know is:

- is OO too difficult that people can't use it effectively?
- has the imperative paradigm so deep roots in our education that is impossible to eradicate?
- does people only follow trends?
- does OO exist? :)


"ai posteri l'ardua sentenza" how someone said lot of time ago.

Next time, I want to continue and write about software quality indexes: Halstead and McCabe will be our hosts.


lug 20 2005, 10:22:53 PM CEST Permalink Comments [0]