Friday, April 3, 2009

Sushi

I met my friend and former co-worker, and we did indeed have sushi this evening. And a good conversation about the economy, technology, and life in general.

Earlier today, I worked with Subversion. I successfully moved a repository from one computer to another. It was a small repository, which made the job easier. The process is the same for small and large repositories: disable access, dump the repository to a single file, move the file to the new server, load the repository from the file, and enable access. Then, on all client PCs, do either a "switch" command or a new "checkout". It took a little while to get the exact right "checkout" command, but things are working again. I can now take the repository off the first PC and free that space.

No contact from Dynasplint today, which is a little disappointing. I would have expected a thank you from them, to at least acknowledge my time and effort for the interview. Hmph.

Looking forward, I think I can start some efforts with Ruby and the measurement and analysis of source code. I am going to start with the rudimentary items: lines of source code and then non-comment lines of source code. The non-comment lines of code will be interesting. It is easy to remove comments for older languages such as FORTRAN, C, and C++. Java and C# aren't too bad, but C# has some interesting aspects such as attributes that can make line counting difficult. (Should an attribute line be counted as a source line? And how does it count towards complexity?)

Languages such as Perl and Ruby offer more challenges to identify comments. Lines that begin with the hash character ('#') are comments, and lines that have a hash in them are partially comments, but some lines can contain hash characters in string literals and those hashes do not demark comments.  And hashes in regular expressions do not demark comments. And regular expressions are hard to identify: they can begin with any character, not just the slash character.

I would like to use a modular approach, one in which I use separate programs to perform distinct functions. That may be difficult; I may have to parse (not just text-hack) Perl programs. Well, let me start and see how things turn out. I'm not going to design everything up front and then find that the design fails.

1 comment:

  1. Perl is the best scripting language for Text processing and handle regex. I have posted few articles related to those at my blog

    http://icfun.blogspot.com/search/label/perl

    Also Perl's Cpan has lots of support that I don't even need to think extra while developing project. I didn't find such help on other programming language except Java and .NET

    ReplyDelete