Tales from the Evil Empire

Bertrand Le Roy's blog

  • Automatic deployment of multiple repositories to Azure

    The scenario is the following: a first repository contains the application code, and a second repository contains data files for the application contents. Azure, like some of the other best hosters, has the capability to automatically deploy new versions of your site when a new changeset is pushed onto a repository. When you have only one repository to deploy, the process is deliciously easy: when creating your web site, you can give it the URL of the repository on Github, and Azure will take care of everything, including of creating a web hook on Github so that new pushes can trigger the deployment scripts on Azure. If, like in the scenario above, your site is composed of multiple repositories, things are not that simple.


  • Snippable: a human-writable multipart document format

    More and more projects are managing their documentation as a bunch of Markdown files in a repository. Sites such as Github make that really easy and convenient, by providing an easy web interface around viewing and editing Markdown files, creating and integrating pull requests, viewing changesets, etc. It seems to provide all the advantages of a wiki, and more, while using a standard and easy set of tools.


  • Je suis Charlie

    Je suis CharliePlease allow me to make an exception to my rule of only publishing technical articles on this blog. I’m French, I grew up watching those guys on TV, they were close friends in many ways. Every time I’m in France, Charlie is one of the first things I buy. They were the recipients and defenders of a rich tradition of irreverence, political caricature, anti-clericalism, and provocation that goes all the way back to the French Revolution. In the words of Jon Stewart, going into comedy “shouldn’t be an act of courage, it should be taken as established law”. As a student, I was writing in a satirical web site, in that spirit, trying clumsily to follow the lead from Charlie, Hara-Kiri and others. We would write and laugh about anything and everything, without fearing for our lives or even for any consequences beyond flame mail (and that we did get). That is the way it should be, but it’s not. The people who were killed at Charlie are martyrs and heroes of free speech. I’m mourning. I just can’t get it off my mind.


  • Indexing PDF: once again with a big red nose

    A commenter pointed me to an oddly-named library that I didn’t know about: PdfClown. This is a library that is built by the same author both for Java and .NET, and the .NET version actually looks pretty nice, with not too many Java-isms beyond the namespaces. The license is a nice LGPL 3, the author Stefano Chizzolini seems to be available for advice and consulting, and there’s quite a lot of blog posts and quality documentation and samples. Sounds like a dream, doesn’t it?


  • MVP Award 2015

    Happy new year to you all! For me, it’s starting quite nicely, as I received my first MVP award this morning, in recognition for my open source work, in particular on Orchard. It’s a great honor, and I want to thank Microsoft and all the people who made this happen. Thanks to all of you for reading me, as well, and for encouraging me over the years with your great feedback, and for some of you, with paid work ;)


  • The sideways stack trace

    Stack trace from a series of asynchronous callsA common pattern in asynchronous programming is the callback pattern. Libraries such as async make use of that pattern to build asynchronous versions of common control flow structures. One unfortunate possible consequence of this is strange stack traces. For instance, here is code that executes five functions serially:

    var functions = [
    function one(done) {done();},
    function two(done) {done();},
    function three(done) {done();},
    function four(done) {done();},
    function five(done) {done();}

    async.series(functions, function final() {


  • The curse of the never-ending async method call

    Whether you use promises, callbacks, or other abstractions (except maybe the async/await pattern) to deal with asynchrony, control flow is going to get harder to follow. Stack traces are typically meaningless, and finding what went wrong can take substantially more time. One thing that very often goes wrong, especially during development, is when an asynchronous method never calls back. It may be because a service never answers, or because there’s a bug in the code that causes the callback to never be reached. No matter what the cause is, when that happens, you’re typically out of luck because by the time you notice the unusual delay, the execution engine has already left your code without leaving a trace. Breaking into the debugger will just lead you nowhere. You’ll have to tediously re-run and trace the execution of the code with lots of breakpoint into lots of callback functions. No fun.