Codemod: PEG.JS – part 1

One of the goal of the OpenTextSummarizer project was to add tests and make the code a bit more customizable, while learning a bit more about the library. I decided that those tests would be written as recommended by some people whose advice struck me as very smart:

After some test code written, I started to realize that – while the tests were often simple – setting them up was taking a bit of time. So I started to look for ways to automate the test class.

Now there is no lack of unit test templating solutions; you could use Resharper, the Visual Studio item templates, T4… But I wanted to use something a bit different; a while ago I encoutered PEG.js, a parser generator javascript library that lets you handle a custom language and process it in your browser. Mhhhh, browser integrated parser, with all the rich possibilities of the javascript ecosystem at our fingertips? Let’s go!

Continue reading

CodeRun: OpenTextSummarizer

When starting this blog, I decided to try and go for the “minimal viable product” approach (there is a great talk about this approach in this podcast episode from .Net Rocks). Instead of agonizing over every single visual theme and every color scheme for hours I would just write some content before anything else.

But when I started looking into the plugins for the blog platform1 it was very difficult to keep my word. Functionnalities galore, which was very hard to resist. I prevailed in the end but I found an auto-tagging plugin that pointed me to our first reviewed library and the basis for this post.
Continue reading


  1. a mistake in  hindsight