Matching Java method signatures with sed

10. november 2011

In the process of removing PMD warnings from our main product at work I was trying to automate some parts of this process by using sed (Stream EDitor), a command line program common on all Unices (such as OS X and Linux). I had already been using a regex in Vim to do remove final modifiers from methods on a file by file basis, but thought it might be quicker to do this using «find» and «sed» in stead. Boy was I wrong 🙂 But mainly just because of the different regex dialect of sed that took me a long time to figure out.

The problem was mainly due to trying to match square brackets, such as in «final public int[] myMethod(int[] args)». Les resten av dette innlegget »


Tips for a Unix like setup on Win boxes

9. april 2011

This little post sums up how I like to set up my Windows 7 installation for basic development, excluding the usual Java setup (SDKs, IDEs, etc). The setup will enable you to develop in pretty much the same fashion whether on Linux, Mac or Windows. (A good thing, IMHO).
Les resten av dette innlegget »