I was just writing some OCL expressions and suddenly I realized that the if-then-else command is sooooooo dated. HereĀ“s a suggestion of a much hip, fresh and zeitgeistlich if-then-else:

if <<condition>> then cool else sucks.

So cool replaces boring true, and sucks replaces ancient false.

I am hoping the Java team implements this soon šŸ™‚

Advertisements

from Seth Godin new book:

“A bootstrapper is determined to build a business that pays for itself every day. (…) itĀ“s easiest to define her by what she is not: a money-raising bureaucrat who specializes in using other peopleĀ“s money to take big risks in growing a business.”

Ā Yeah! rock it!

http://www.changethis.com/8.BootstrappersBible

A MUST read for anybody that wants to leave the dull public job or the yellow-grey corporate cublicle and go start-up.

I have read a lot of talks recently about APIs. Google APIs, Facebook APIs, OpenSocial APIs, APIs for making coffee and strawberry jam and so on. As a computer scientist I resent the fact that all those efforts are still made on a very primitive level. None of the new or old software industry bulldozers are trying to making it easy for developers. Not true. They are trying, but with the wrong ideas.

For the past years I have been involved in building an inference engine for putting together a set of reusable components for automated reasoning services (commonly known as artificial intelligence). This is part of my PhD thesis that I am hoping to finish next semester. Many inference engines already exist, however the idea of our research group (itĀ“s very much a collective effort that I am part of) was to try a radically model-driven approach. This means, instead of diving from the very beginning into Java or C++ complexity, we took our time to think the architecture of our inference engine as a set of well-defined components that any engineer could look at and within a few minutes understand the services that such component provides.

Yeah, I know. Software engineering bla bla bla. Well, that was exactly what I thought in the beginning. But let me tell you what really happened: after 3 years reading lots of math and logical stuff I finally was ready to project a few components that realize the set of services we were interested in. Although I was dying to implement them right away in Java I took the time to do two things: I figured out the basic functionality I wanted to together with the data structures, then using only UML class/component diagrams I model each basic functionality. And then I used an old software engineering idea, design by contract, to link together the components services (actually methods) through pre- and post-conditions.

I used a new standard from the Object Modeling Group (OMG) called the Object Constraint Language (OCL) to specify the stuff. Mind you, you could use Java as well or any of these new Java flavors to write these constraints. What happened next was that I found out that by using only OCL I could fully express not only the structure of my data but also the behaviour of each component. So as it turned out I did not have a dead model, that would be forgotten as soon as I started my Java implementation. I had a complete system that lacked only the tools to be executed (e.g. a transformation from OCL to Java or to C++).

Then back to my point in this posting: why Google, Microsoft, Yahoo, Salesforce (ok maybe their new platform has some of the things I am talking about here) do not try this leap? I was browsing the other day the OpenSocial API from Google and it really sucks all those hundreds of lines of code. Why is it so hard to present a graphical model of the stuff with nice well-defined interfaces that we just could browse, drag and drop and build the applications much easier? After all, itĀ“s almost a bunch of SQL queries and read/write operations.

ItĀ“s a kingdom of coders out there. ThatĀ“s why. And for some strange, unconscious or conscious reason, those guys are not letting go off their kingdom. Once we have Component-based systems on the web, not only techies will build software. I bet almost everybody that has an engineering background or even is good at logics and math will do. So is this the real motivation of everybody in the software industry to postpone model-driven development or am I just being paranoid?