❯ Guillaume Laforge

Posts

Finding styled paragraphs in a Word document

When working with Word documents, you’d often like to be able to extract relevant content automatically thanks to some scripts. That’s exactly what I wanted to do this afternoon. I have a Word document which contains some scripts written with a specific style, and I wanted to extract those snippets, so that I may be able to check that they compile or that the unit tests they represent be asserted successfully. Read more...

Castor tip: generating Java classes for XSD simple types

At work, I’m using Castor XML to Java binding to marshall/unmarshall messages in my Web Services, inside a custom framework (Struts, OJB, JAXM, etc). I have defined my messages as XSD Schemas, and I’m using Castor’s Maven plugin to auto-generate my Java classes at build time. All is good and well… Hmm, almost! Castor’s SourceGenerator generates Java classes for complex types and elements, but not for simple types, and unfortunately, I badly needed to marshall those simple types as well. Read more...

RIFE rocks the pants off of Rails

Rails is kinda cool. Any framework that ease the development of CRUD-oriented webapps is a real time saver. There’s been a lot of well-deserved hype around Ruby on Rails lately. But I’m not sure that’s really that revolutionary. I’ve always thought that a good Java Web framework can do the same. Perhaps with a few more lines of code, since we all know that Java tends to be more verbose than some scripting languages. Read more...

Re: How Groovy can get her groove back

I think Angsuman diserve an answer. It looks like Groovy is in dire needs of a project manager. We’ve got one already. Of course, he’s been pretty busy with his Active* projects lately, but I think now he’s really back on the project. It’s often hard to cope with both a demanding job, and a demanding Open Source project. It’s tough to find time for both. Fortunately, he’s not alone on the Groovy project. Read more...

Groovy's dead, long live Groovy!

Incredible, I’ve just learnt that Groovy was dead, according to Mike! So I understand that’s why Cédric would like to know the final date for the burial. It’s interesting to see how much pressure the Groovy project has on its little shoulders. So far, to my knowledge, I don’t really see any other OSS project for which the users and the blogosphere had so many expectations. Well, back in time, 6 months ago, yeah, we could’ve said Groovy was somewhat a zombie, but I don’t think that’s true anymore, with the latest months activity. Read more...

Groovy code-completion in IntelliJ

JetBrains improved the custom file type support in IntelliJ, in the Irida EAPs. If you have defined your Groovy syntax file correctly, you can have syntax highlighting, brace highlighting, and even… code-completion! In my Groovy syntax file (which works in Irida #3185), I defined two sets of keywords: one for the keywords of the language, and the other one for the Groovy methods, like each(), findAll(), etc. And guess what? Simply hit CTRL-Space as usual, and presto, you can complete your code. Read more...

Auto-completion in a DOS console

When I’m on an old PC, what frustrates me a lot is when I can’t auto-complete file names or paths when I’m in a DOS Console. If your computer (an old Win2K box like I have at work) is not configured for completion, it’s easy to re-enable it by modifying two keys in the registry: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor\CompletionChar HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor\PathCompletionChar To both keys, assign an hexadecimal value representing the key used for completing statements. Read more...

Converting a Word document to HTML

If you’re under Windows, and that you need to do some shell scripting with ActiveX/COM components, Scriptom will certainly help you. Today, my boss just asked me if we could use Scriptom to convert a Word document into an HTML equivalent. And I decided to see if that was possible. To my delight, my little Scriptom module, backed by Jacob, helped me solve this integration problem with only 6 lines of Groovy code! Read more...

Noeuds de cravate

Qui dit nouveau boulot, dit être bien habillé. Il faut être classe et élégant. Evidemment, il n’y a pas que le premier jour qu’il faut l’être ! Mais c’est l’occasion de réviser ses classiques, et je pense particulièrement au noeud de cravate. J’ai une ribambelle de cravates dont les noeuds sont déjà faits. Je n’ai pas besoin de les refaire. Sauf si vraiment je ne suis pas satisfait du résultat. Mais en l’occurence, pour un nouveau costume, avec une nouvelle chemise, j’ai aussi opté pour une nouvelle cravate. Read more...

A bit of Groovy history...

First of all, I wish a Happy New Year to all my readers! The first days of a new year are often days of recollection, where we look back at the previous year. What happened? Was it a good year? Did we succeed in our endeavours? Any downside or missed target? Etc… Today, I want to give you some insight in the Groovy history, as it was written last year, in 2004. Read more...