Sadek Drobi’s Blog

February 17, 2007

Obsev:: Satisfaction Confusion

Filed under: Agile Programming, C#, Domain Driven Design, Functional Programming — Sadache @ 2:01 pm

Going back into my memories, it happens to me quite often that i have good memories for a place because something good happened once for me there, or good memories for someone because he delivered me a good news … i guess feelings can be quite distracting sometimes. when i used to be a child, i used to hate fish, i didnt like fish, anykind! i used to quit the table when fish is present.

Lately i relized that what i had problem with is fish’s smell, and specifically well cooked fish meet’s smell. Now i eat fish, one of my favourite plates is Sushi and Sashimi :p

I guess it is quite human thing to hate things as a whole, tagging as bad any set of objects that have one bad property, forgetting about all the universe arround, that might have contributed to that bad, and that can change with time.

In the programming languages paradigm we had - and we are still having - a lot of such a satisfaction confusion. Imperative (procedural) programming had gained a lot of market and as it often happens this was due to a massive marketing of a good property of the product. Imperative programming consists of sets of machine instruction for manipulating memory and references to it, so that you end up talking to the machine with its language trying to explain to it how to exactly do what you want to do.

Imperative compilers of that time didnt curry  a lot of intelligence, and developer’s task turned out to be translating between the domain logic, and the machine’s logic, which wasn’t often an obivious task. We accepted these drawbacks for the sake of performance which was on the top of our constrains.

By time softwares started growing in complexity, domain’s logic started being out of logic, objects orientation came to the stage to solve some of our concerns about code reuse and logic simplification by encapsulation and inheritance, sacrificing a little bit of performance (when machines started to be more powerfull).

Still we kept, inhereted from imperative language, manipulating memory (c++ pointers) , responsible for memory leaks. Then more intelligent runtimes and compilers, not enough intelligent yet, started handeling the task of memory, relieving developers from this overhead. That relief left the developer more space in his own mind to think about his real task, but leaving again and always the constrains inherited from the machine friendly - human’s unfriendly - instructions.

Satisfaction Confusion was in favoring Imperative programming languages (c++ , Java, etc) over functional and logical ones (Haskel, OCaml, Lisp, Scheme, Prolog) for several reasons, I will list some among others:

  • Performance, we needed to manage memory ourseleves, optimizing our code .
  • Syntax satisfaction confusion, C driven language syntax became quite obvious for developers (even if it is not the most human friendly!)
  • Objects where introduced to imperative languages, which made them the ultimate solution (even objects made their own satisfaction confusion that i ll mention later in the lines to come) 
  • Statically (compile time) typed languages safety and facilities that it offers (such like intellisense and debugging), where functional programming languages needed to be less static for type inference and functional libraries reuse
  • Low level features of the programming languages (such like hardware manipulation ) that really needs some level of instructional style of commands.

All of that shows that there is some good in these imperative procedural object oriented statically typed C-like syntax programming languages, but where does that goodness come from? and are we really fully satisfied with these features? 

To Be Continued>>

part 2 : http://sadekdrobi.com/?p=26

 

1 Comment »

  1. [...] in my previous post http://sadekdrobi.com/?p=25 i listed some  Satisfaction Confusions that we are having in [...]

    Pingback by Sadek Drobi’s Blog » Obsev :: Free Your Mind (Satisfaction Confusion part2) — February 18, 2007 @ 12:49 am

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress