Some Software You Should Know When You Work on DSLs

8. August, 2011

DSLs is all the rage but it seems the technology is actually useful 🙂 So here is some stuff that you’d probably want to know about:

Intentsoft created a workbench which can capture business information in the way the business wants.

JetBrains did something similar called Meta Programming System or MPS.

Want to know more about your own code base? Try MoDisco or Moose.

Lastly, using LL parsers is usually a big pain. Syntax Definition Formalism or SDF is another approach to define a syntax which avoids many of the problems of context-free grammars.


TNBT – Avoiding Common Errors

7. July, 2011

Writing secure code is ever more important. There are lots of examples: HBGary, Sony, Google.

Even if you’re not one of the biggest companies out there, security starts to become important as soon as your code can be accessed from the Internet. And frankly, which code today can’t?

What’s worse, the problems are always the same: SQL injections, not validating input, using code from somewhere else which is vulnerable. These problems are neither hard to find nor hard to fix. It’s only too much effort to add the necessary checking and warning code to the existing compilers.

So here is my assumption for my “The Next Best Thing” series of articles: The programming language will allow to define patterns like FindBugs and PMD that the compiler will check at compile time and which the VM checks at runtime to fix or at least warn about such security problems.

With tools like MoDisco and Moose, it’s possible to go one step further: It could analyze and display the code in ways that you haven’t seen before (think Code City) to find patterns in the code automatically and warn you about something that you might not have realized, yet.

For example, if you use a certain call sequence everywhere in your code but one place, it’s probably worth a look.

Of course, this begs for a way to add lots of additional information to source code. As I said before, we probably want better editors than the plain text editors we have today. It should be possible to include images and formulas in code. Wiki documentation. And things like “yeah, I know, this is different from the 365 other places!”

Sounds a bit like annotations but frankly, Java source code can just get you so far. DSLs come to mind but they don’t allow to extend them with arbitrary extra bits of information. It should be possible to overlay a DSL with another DSL so you can mix various information in one place.

Related Articles:

  • The Next Best Thing – Series in my blog where I dream about the future of software development

Jazoon 2011, Day 1 – Flexible software analysis with Moose – Tudor Girba

26. June, 2011

Flexible software analysis with Moose – Tudor Girba

Moose is one of those gems that are hidden in the huge pile of good open source software. It’s a software to extract data from some source (for example a Java project) and then display the results of queries ran on that data. Moreover, it allows to quickly build applications to wade through that data and display it, say, the complexity of the code.

Very interesting stuff. I guess I’ll have to learn Smalltalk.

I’ll also come back to this with my next installment of TNBT – The Next Best Thing.

Links:

  • Moose – data analysis software
  • Humane assessment – “a software engineering method that makes the activity of assessment explicit and manageable.”

%d bloggers like this: