processi

about processes and engines

Archive for the ‘source’ Category

WordPress Syntax Highlighting

It simply works.

def hello
  puts "hello"
end

The explanation, from the FAQ.

No more pastie for this blog (but I keep using it in other contexts).

WordPress.com is a great platform.

Via Emmanuel Oga.

Update : Barry Hess had an issue with Markdown and Syntax Highlighting. I guess it doesn’t concern people like me who simply have a wordpress.com account.

Update : Firefox is no friend with this trick. Whenever I have a post that uses it, I edit it with Safari, works like a charm.

Written by John Mettraux

October 17, 2007 at 9:09 am

Posted in coding, source, wordpress

Cyclo Saikuro

Yesterday evening was the revival of Ninjava, a gathering of programming enthusiasts (not only Java) in the Tokyo area.

Zev Blut presented one of his open source projects : Saikuro.

“Saikuro” is a japanese transliteration of “Cyclo”. This tool analyses a set of ruby code and outputs a report about its “cyclomatic complexity”.

saikuro.pngIn short, this metric looks at how many branches there are in a piece of code and returns a complexity score.

In this example, the complexity is “3” : the easy way to compute the metric is by counting how many areas are “encircled” by the graph representing the code (plus the area surrounding the graph).

Pointers to articles about that metric are available from Saikuro’s home page.

I ran Saikuro over my OpenWFEru project. Saikuro generated two reports, one about Cyclomatic Complexity and one about the count of tokens per line.
For OpenWFEru the very first written methods (the one dealing with interfacing with the Java engine over REST) were flagged in red. As Zev pointed out, such ‘parsing’ code sports loads of ‘ifs’ and thus yields a high CC score.
To the reports.

At the end of the talk, the discussions centered on the usefulness of the metric for a developer and especially a project manager, and on how to integrate it in a development process. (check in, code review, …)

It’s a simple and effective metric, nice addition to a Ruby toolboox. This utility deserves to be gemified.
It would be nice if the reports actually displayed the methods (at least the ones in the red), maybe with a bit of Erb and a ruby.css…

Emerson Mills will talk about “agile software development process” (“scrum à la Mills” as he said) in the next (April) meeting of Ninjava.

Thanks to the Cerego guys for hosting this meeting !

Written by John Mettraux

March 16, 2007 at 12:11 am

a Fisheye on OpenWFE

Source Perspective by FishEyeCenqua is hosting instances of its fine Fisheye product freely for open source projects.

You can now browse OpenWFE subversion repository through fisheyes.

That’s really kind of Cenqua to host such a great service.

A final note : our beancoder got some coverage at InfoQ.

Written by John Mettraux

October 13, 2006 at 8:23 am

Posted in opensource, openwfe, source