Sadek Drobi’s Blog

December 7, 2009

My Computation Abstraction Talk Slides for Functional Exchange

Computation Abstraction: Going beyond programming language control syntax, or what we’ve missed from FP for so long in mainstream

For a long time, and due to the lack of main FP concepts in most mainstream languages, we missed opportunities to abstraction and code expressiveness and conciseness. With today’s democratization of FP, Computational Abstraction is what will enable us to be less dependent on specific programming language syntax offering; creating libraries of control structures and composition forms that help find concise and expresive solutions to enterprise programming challenges (null, lists treatment, error handling), capturing elegantly important business concepts in code, and programming at the right level of abstraction.For a long time, and due to the lack of main FP concepts in most mainstream languages, we missed opportunities to abstraction and code expressiveness and conciseness. With today’s democratization of FP, Computational Abstraction is what will enable us to be less dependent on specific programming language syntax offering; creating libraries of control structures and composition forms that help find concise and expresive solutions to enterprise programming challenges (null, lists treatment, error handling), capturing elegantly important business concepts in code, and programming at the right level of abstraction.

Slides:  http://sadekdrobi.com/wp-content/uploads/2009/12/Computation-Abstraction666iiioii6jjjjjjhjj-5.pdf

Google wave:  https://wave.google.com/wave/#restored:wave:googlewave.com!w%252BPgcakhgiA

June 26, 2009

A monad in C# for simplifying WPF multi-threading for a more responsive GUI

Code included here is over simplified for clarity, I hosted a better implementation code on CodePlex. These modifications change strictly nothing for the client code and are only an implementation detail. I use a continuation rather than a delay, and I chose to design a custom continuation class rather than using a delegate because of a type system limitations.

DSC_2468Most GUI frameworks, including Silverlight and WPF, are shipped with a fundamental problem: long use of the main thread causes the Window to blackout, and using different threads requires you to get your hands dirty with the Dispatcher stuff and freezable objects. Worse, you wont learn the necessity to do so until you get a surprise of “The calling thread cannot access this object because a different thread owns it.” exception when all what you were doing is to use available methods on an object that seemed you have access to, at lease it seemed until runtime! This post illustrates a solution based on Monads abstraction and LinQ syntax.
(more…)

June 25, 2009

Ian Robinson and Jim Webber on Web-based Integration

Filed under: Architecture, Rest — Tags: — Sadache @ 12:06 am

Jim Webber from http://www.infoq.com/interviews/robinson-webber-rest 00:37:08:

We did put abstraction after abstraction onto our distributed system infrastructure and you know what: it hasn’t worked out that well for us. Some of the largest and most sophisticated distributed systems on the planet haven’t been all that large or sophisticated and then this kind of crappy protocol comes along that insists on being synchronous, and insists on being text-driven and it scales globally. That’s shocking and does not make sense to us as engineers. That’s the web paradox – it’s the rubbishest thing on the planet, but it scaled and for me that is what’s hit the reset button because I was totally up for XML-based protocols that do all sorts of funky stuff.

June 10, 2009

DCI in Real World: Domain Context and Interaction with Scala in a Real World Project

Those that follow my twitter @sadache , me @infoQ or my blog have certainly already noticed that I am quite interested in Scala on languages’ axis and in Domain Context Interaction DCI pattern on architecture axis. I always search new ways for delivering quality code which is modular and concise. Modularity offers the opportunity to think about the problem in parts, which is typical of the way brains work, whereas conciseness makes use of imaginary system (reading code blocks like images).

Recently, I’ve been working on a Web Api system where, thanks to support of @jeanlaurent http://morlhon.net/blog/, I used Scala applying DCI architecture in a real world project. This post is about reporting benefits of using this approach. Other posts will follow that will be more focused on the use of Scala and Functional Programming in that project. Code included is a bit simplified and parts of the system that are not of interest are omitted.

(more…)

May 8, 2009

Data, Context and Interaction : a new architectural approach by James O. Coplien and Trygve Reenskaug

James O. Coplien and Trygve Reenskaug have recently introduced a new architectural approach to OOP based on Data, Context and Interaction pattern. It should allow capturing user mental model in terms of behavioral requirements, something that classic OOP fails to do. The article, that triggered many reactions and critics, provides insights into DCI using concrete examples to show its advantages.

(more…)

May 4, 2009

Yet another million dollar mistake?

Filed under: Architecture, C#, Functional Programming, JVM, Java, Scala — Sadache @ 11:53 pm

Martin Odersky:

In the generics design, there were a lot of very, very hard constraints. The strongest constraint, the most difficult to cope with, was that it had to be fully backwards compatible with ungenerified Java. The story was the collections library had just shipped with 1.2, and Sun was not prepared to ship a completely new collections library just because generics came about. So instead it had to just work completely transparently.

That’s why there were a number of fairly ugly things. You always had to have ungenerified types with generified types, the so called raw types. Also you couldn’t change what arrays were doing so you had unchecked warnings. Most importantly you couldn’t do a lot of the things you wanted to do with arrays, like generate an array with a type parameter T, an array of something where you didn’t know the type. [..]

When Java first shipped, Bill Joy and James Gosling and the other members of the Java team thought that Java should have generics, only they didn’t have the time to do a good job designing it in. So because there would be no generics in Java, at least initially, they felt that arrays had to be covariant. That means an array of String is a subtype of array of Object, for example. The reason for that was they wanted to be able to write, say, a “generic” sort method that took an array of Object and a comparator and that would sort this array of Object. And then let you pass an array of String to it. It turns out that this thing is type unsound in general. That’s why you can get an array store exception in Java. And it actually also turns out that this very same thing blocks a decent implementation of generics for arrays. That’s why arrays in Java generics don’t work at all. You can’t have an array of list of string, it’s impossible. You’re forced to do the ugly raw type, just an array of list, forever. So it was sort of like an original sin. They did something very quickly and thought it was a quick hack. But it actually ruined every design decision later on.

February 18, 2009

I am speaking at QCon

download (1)

 

(more…)

February 3, 2009

Quiz:: SharpLight |> What does this do?

combination

December 30, 2008

I just do not get it! Why use Spring Beans?

Filed under: Architecture, Spring Framework — Sadache @ 3:14 pm

photo

In short, I do believe that Spring framework forced you for a long time to use a subset of Java, a subset of frameworks you use, and has been implicitly very intrusive on all the frameworks that support it. It constrains innovation and limit choices. And more!

(more…)

December 15, 2008

RefX :: Innovation is often not at your expectations or knowledge level !

Filed under: Architecture, Conferences, D90, LinQ, QCon, Security, Volta, ajax, gwt, microsoft, web 2.0 — Sadache @ 12:08 am

DSC_2064

 DSC_2073 DSC_2065  DSC_2071 DSC_2068

@QCon SF, I attended a presentation of Erik Meijer in which he talked about research projects he is involved in, including the Volta project. He talked about an interesting problem that is ignored when we talk about Ajax application and especially when we talk about solutions like GWT that make you feel home while programming for the web. In such an experience, and before splitting your application and deploying it on the web, you feel quite secured. Anyway, often, it is not so important to look for securing inner computer guts communication when there is no network involved. Evil shows up when it is time to go live, to the clouds. There you are not communicating through inner channels but rather through public Internet network.

(more…)

Older Posts »

Powered by WordPress