All eyes are on Argus Codewatch

Text: Gerben Bloemendal

Every programmer’s dream is to deliver errorless code. Developers at TOPdesk longed for an application which was able to examine produced code. The development of Argus Codewatch has since brought this ideal a step closer. Argus Codewatch is a panoptic and vigilant resource, which can be compared to the ‘real’ Argus, the giant with one hundred eyes in Greek mythology. The application scans for incorrect code and makes suggestions for improvements.

Last summer during a unique internship program at TOPdesk, a number of student programmers developed Argus Codewatch. The Application is a plugin for Eclipse, the Java developing environment in which the TOPdesk ApplicationServer (among others) is programmed. We spoke to a number of students who were involved in this unique project.

Senior software developer Roel Spilker led the ‘Argus Codewatch’ project. He explains why the plugin was developed. “Every programmer comes across bugs; and every programmer questions how these bugs could have been prevented. Correcting these errors at a later stage is often a complex and time-consuming process. Programmers don’t want to discover that certain source code is incorrect during the testing phase, but during the writing of it. This was the reason for developing Argus Codewatch and a ‘Summer Internship’ seemed to be the perfect way of doing this.”
Arno Schuring and Bart Buil were two of the students who participated in the project. What does this plugin actually contain? Arno, together with student Joppe Kroon, developed the infrastructure for Argus Codewatch. He describes how this ‘static analyzer’ goes further than the error control already in place. “Usually only type and syntax errors are detected in Eclipse. Argus Codewatch takes this a step further; by analysing the source code at a deeper level and providing suggestions for improvements.” Bart adds “Argus Codewatch detects incorrect programming styles and dangerous constructions; certain patterns are recognised by Argus.” According to Arno this concerns the difference between good code and correct code. For example good is: 5432l, but correct is: 5432L “as the letter ‘l’ can be confused with the number ‘1’.”

Bart explains that using Argus Codewatch you can extract these agreements concerning correct codes. The plugin can also be extended and you can even add new ‘errors’ yourself. “The more checks and fixes you add, the better an instrument Argus Codewatch becomes”. Arno agrees, “from the beginning of the development it was the aim that new checks could be added. As a test we first entered two basic checks.” Argus Codewatch was then let loose on the TOPdesk ApplicationServer source code. “We did indeed discover a number of potentially incorrect constructions” acknowledges Bart.

Bart was kept occupied with the integration of the plugin in the Eclipse developing environment. He claims that no difference can be seen between the standard error messages of Eclipse and those of Argus Codewatch. The plugin has been seamlessly integrated with the existing way of working in Eclipse. The programmer receives direct feedback when programming, and so not at a later stage via a logfile or nightly ‘build’. The settings of Argus Codewatch also work in the same way as those of Eclipse.

Is the plugin a success? Bart: “The plugin is currently being used for the development of TOPdesk. It stimulates the generation of good source code. Striving for correct code has become much more insightful.” Arno: “During the development of Argus Codewatch we were in touch with the people from Eclipse.

A number of Argus Codewatch-related elements will be included in the new Eclipse version. In the meantime there are enough things to add to the plugin. The discussion as to which checks will and will not be included is also set to continue.”

As project leader, Roel released the plugin outside of the organisation. “From the beginning it was always our intention for others to make use of Argus Codewatch. The plugin is capable of being extended and is therefore accessible to everyone. In December we presented it at a trade show and received much enthusiastic feedback. We now hope that by publishing the plugin others will then continue developing it further. We also use open source means here at TOPdesk and thus it was a logical step to donate Argus Codewatch to the open source community. This should eventually lead to a better programming instrument for every software developer.” A team of people at TOPdesk get together once a month and are working to improve the plugin even further.

The Argus Codewatch project was a unique holiday job for Arno, whilst the summer internship project led to a permanent job at TOPdesk for Bart - “It’s not always that you find such a fun holiday job. What’s even better is that I can now actually work with it in practice.” Arno concludes “at TOPdesk they’re crazy about fun!”

More information about Argus Codewatch can be found at  arguscodewatch.sourceforge.net.

Leave a comment