Intentional and DSLs
In what now seems to be a biweekly installment, I’ve read and listen around quite a bit lately. Since the beginning of my information diet, I have way less processing to do and my sources are only a couple of conference videos online and a few other things. The item that generated the biggest train of thoughts was the release of the Intentional software workbench that I heard of while reading Martin’sMF Bliki. DSL workbenches are a fascinating topic these days and there is sure potential in our industry. The typical use case for DSLs is medium to high complexity business logic that usually is described by business analysts in a non-executable formats. The workbench can be used to maintain the sync between the generated DSL and the business view of rules. Why not using user stories like the rest of the application? Because the business logic is so complicated that it requires a detailed description and verbal communication is not enough. With a DSL workbench duplication between the Word documents and the actual code is eliminated by using an abstract language that describes the domain. Just be careful: the presentation talks generically about “creating software” without specifying that we are talking about the DSL portion of it. Don’t use these products to generate the whole application!Other notables include in no specific order:
Compass: A Real Stylesheet Framework… Here’s a very nicely done screencast on how to jump start quickly on a web page design based on sass, blueprint and compass. Chris is kind enough to explain basic concepts, when to use id or classes, sass basics, how to organize your project and so on. The power of mix-ins in sass is great and makes thing quick and easy. As Chris says at some point, you can write your self most of these stuff, but why? Sass generation is unobtrusive and sass template are very readable. The grid system is a breeze once you understand how to attach the column width information to divs. All pretty easy stuff. Thanks for the great screencast.
RailsConf 09 DHH Rails 3… I think it’s the second time I heard about custom attributes in HTML 5. Rails 3 is going to use custom attributes to signaling the framework how to build the javascript actions connected to events, like onclick(). Remains to understand when the transition will actually happen for legacy browsers. Another interesting thing is the rewriting of generators so that scaffolding can be tailored for the particular choice of javascript library, ORM mapping strategy and so on. Rails is still opinionated with defaults but it should be easier to coexist with different opinions.
Industry Misinterpretations 138: Who Killed What… Interesting response here to Uncle Bob “who killed SmallTalk” keynote. If you skip the discussion about the definition of “dead” which is useless in my opinion, I like the “renaissance” model in which a powerful language which is no more fashionable at some point, becomes mainstream again for some unexpected conjunction of facts. At least this is the hope of the SmallTalk community. I don’t know if that could happen though, considering that SmallTalk evokes old technologies that didn’t work (being that true or not). What maybe is possible is the re-incarnation of SmallTalk with a different name, exactly like old good marketing rules tell us all the time.
Scotland on Rails 2009 - The Ruby Object Model - Dave Thomas… This is basically the screencast no.1 from the pragcasts made up as a presentation. I viewed that again with pleasure because Dave is a great speaker and the topic is always hot. Ruby is strictly object based as it should be for an OO language. The strange thing is that passing the time the pure OO heritage has been lost starting from C++, Java and the rest that came after. In those languages a Class is not an object but only something that the compiler knows what to do about it. In Ruby class are just “simulated” as interaction between objects that contain methods and a pointer to the “parent”. This is the reason of the great flexibility of Ruby, everything is an object model and can be accessed anytime.
Episode 136: Past Present and Future of MDA with David Frankel | Software Engineering Radio… MDA is presented in this podcast as the evolution of UML which with after the introduction of OCL was trying to be more specific and semantic. Sorry, I just don’t get it and what I hear is pure fluff. As far as I can understand, MDA is trying to be a visual language for languages. Components can be specified using MDA and the code generated accordingly. In the opinion of David Frankel abstractions are emerging from different industries and similar tools are created to model the application. From what I can remember, this was going on for decades, but we never had the power of building the big unifying abstraction to describe all business components. And by the way, what is wrong in choosing a language and evolve reusable components and stick with it for, say, 5 years? Then I throw everything away and switch to the next language, so what? I understand using DSLs to describe portions of an application, but I don’t understand why I should create the whole application as a DSL or MDA.
Hanselminutes Podcast 163 - Software Metrics with Patrick Smacchia… Interesting talk on metrics here. It’s always good to remember the there are good and simple metrics that cover most of the cases without the need of an exotic mathematic formula. For example lines of code by feature can reveal unwanted complexity for comparable features. Another interesting one is loc covered by test ratio. Loc is not enough to guarantee quality of code. Cyclomatic complexity can be used to spot difficult-to-maintain code. While too high afferent (incoming) coupling (Ac) means probable SRP violation and it’s time to extract one/many interfaces to create dependency on abstractions. There are also composed metrics: CRAP is one or the maintainability index. But these are numbers without dimensions and it’s is easy to expose false positives because of their complexity. A new one I learned here is the MethodRank, the rank algorithm applied to the method dependencies tree. At the top there are methods which should be tested more carefully because of their high dependency.
6 months ago