Mike McClurg

Archive for the ‘Projects’ Category

Java Concurrency Annotations

leave a comment »

I’ve been reading a series of papers by Chandrasekhar Boyapati on extensions to the Java type system. I found his papers on ensuring race-free programs by specifying that objects are either immutable thread local, or referenced by a unique pointer. There’s also the paper A Type and Effect System for Deterministic Parallel Java, from OOPSLA 2009. I’m fascinated by the idea of creating a type system that could ease the burden of writing threaded program, and this seems like a really promising idea to me.

I’d like to combine this approach to concurrency with Hybrid Type Checking. While I’d prefer to do as much at compile time as possible, I have a suspicion that we’ll always need to do some locking and unlocking at compile time, and that a system using both static types and runtime contracts might be our best bet.

I’m taking a stab at implementing these ideas in Java — but instead of modifying the compiler itself, I’ll be writing an annotation processor that will run before the compiler. The idea is that we could extend the Java type system using annotations. We could even go so far as to generate code at compile time that could do either runtime contract checking, or even lock and thread management. This is similar to the project Java Defensive Programming. If I can get this project off the ground, I’ll have to see if Federico would like to incorporate some of my code in his project.


Written by mcclurmc

February 12, 2010 at 3:21 pm

Posted in Projects, Thoughts

Tagged with , , ,

XML for Resumes

leave a comment »

I hate writing resumes because there are no good tools for the job. I would prefer to use an open source word processor, such as Open Office, but companies often ask for MS Word format, which OO doesn’t do particularly well. I’ve thought about LaTeX, but unless you’re doing a lot of math that’s kind of overkill. Besides, I want to be able to keep the content of my resume separate from the formatting of the resume. I also want good revision control, and I want to be able to select content for my resume based on the particular job I’m applying for (such as leaving off my DoD clearance from non-DoD job applications).

All of this sounds like a job for XML – though I’m sure some would find this more overkill than LaTeX. But with a simple XML language, or perhaps even XHTML with class and span tags, I think I can make this happen. There are already two open “standards” for the job, XML Resume and hResume microformats, but I use the word “standards” very loosely. The XML Resume project on SourceForge hasn’t been updated since 2005, and I’m not convinced that the microformats solution completely solves the problem of keeping content and formatting orthogonal – though it gives us the great benefit of having a fully indexable online resume.

My idea is to use either XML Resume or hResume (or some bastard of the two) to write the content of the resume, but then use an OO plugin to import the resume language into OO, where we can use it’s great formatting tools. If I can get this rolling, we could also write a corresponding plugin for MS Word, so that I can send off resumes to Microsoft shops.

Now that I think about it, this is basically the model-view-controller pattern. The model is the XML representation of the resume, and all the different data points that you may want to include at some point in a real resume. The word processor is the view, where you can make your resume look as pretty as you want. The controller is the plugin that allows you to have your pretty resume template backed by data in the XML file – and, if the plugin does what I want it to do, display certain bullet points while hiding others, change the order of items, etc.

I’d really like to get this project started, but every time I think about it it’s because I need to work on my resume. And so I find myself in the programmer’s endless dilemma: do I build a tool to solve the problem for me, or do I just solve the problem? My resume is looking pretty good, so I hope I’ll find some time to work on this plugin.

Written by mcclurmc

February 9, 2010 at 7:01 pm

Posted in Projects, Thoughts

Tagged with ,