Category Software Development

Models in XQuery

At MarkLogic, I work on a team that is charged with building Proof-of-Concept systems quickly and building them well enough that the developers who take over later will have a good starting point. I’d like to talk more about the…






Queries and Updates

You may already know that MarkLogic sometimes runs modules as queries (read-only) and updates (read-write). The advantage of queries is that, because they run at a particular timestamp, they don’t need to deal with locks — nothing will change at…






Meaningful XML

Another day, another code review. Today I came across a function that generates non-meaningful XML. This is something that at first glance feels like it has a nice structure to it, but there’s a better way. First, let take a…






Exceptional code

Today I was looking into some code that was running slower than it should, and I happened across this little tidbit: let $normal :=   try {     xs:int($value)   }   catch($e) {     $value   }…






TDD with XQuery

Today I had a complicated function to write. The framework we’re using for this project has unit testing built into it, so for the first time in a long time, I did the Test Driven Development approach: I wrote a…