Thursday, June 9, 2011

Opening Super Comrade Oriam's casket

He is badly decomposed, but we can rebuild him!

A Redditor recently announced that he developed a C# to JavaScript compiler, and the demo was the tutorial XNA game! This is perfect as JavaScript is cross-platform and easily portable.

In the end, though, if the JavaScript can't work, at least I'll have updated SCO to XNA 4.0, Visual Studio 2010, and Farseer Physics 3.2. There is a great tutorial for converting from Farseer 2.x to 3.2 here.

Monday, April 25, 2011

Regular Expression Search/Replace with IntelliJ

I recently got tasked with reviewing some HTML documentation for my company's product. In the documentation, many instances of the abbreviation "ID" were used. Except, they were being used inconsistently. Sometimes it was "ID", sometimes it was "Id", and sometimes it was "id". Luckily, IntelliJ supports find/replace with regular expressions.

find: id([ .,;!])
replace with: ID$1

The capture group (in the parenthesis) preserves the punctuation if there is any with the "$1" part of the replace.