Monthly Archives: October 2012

Two reasons your MarkLogic code is failing silently, part 1

If you’re new to MarkLogic application programming, it’s easy to get frustrated when your code fails without any obvious reason why.  There’s no run-time error, no exception to catch, and when you surround the code block in question with log writing expressions, the “before” log expression and the “after” log expression both work perfectly.

Even now, excellent application developers are still making these same mistakes because they’re so easy to do if you aren’t paying perfect attention.

Coworker: Hey, can you look at this code and see if you know what's wrong with it?
Me: (before he pastes the code into the IM window) 
    It's namespaces or function mapping.
Coworker: ...
Coworker: Damnit.

Read more »

Minor site changes and software sharing info

I’m making a couple of minor changes to the site.  In particular, I’m scrapping the WordPress idea of categories.  It had a hard time finding a categorization method that I liked, and even once I defined the categories, I usually wanted to file my posts into several categories even with the tagging mechanism.  So, instead of using categories at all, I’ll just tag articles with whatever topics are touched upon.  I think maintaining a list of tags is easier and makes more sense than maintaining a list of categories and tags when they’re going to be used basically the same way.  For the articles that have already been categorized, they’ll stay categorized.  I just won’t be adding any more categories and I won’t show the categories on the right-hand navigation either.

I’m also going to try to make it easier to use the code I post on here.  Sure, with libraries with a specific purpose, it is usually easy to grab them off GitHub or BitBucket and integrate them into your project.  Sometimes, though, I’ll post random snippets of code that can’t easily be integrated or tested without going through a lot of trouble.  From now on, when I will try to be more proactive about writing the code in a way that you can download and execute it without having to do much additional setup.  My goal is to put any code I write on the blog also on GitHub.

In addition to putting practically everything on GitHub, I am also going to make it easier to find posts that have code on GitHub.  Any article that has code on GitHub will be filed with a GitHub tag.  You can easily filter for posts that have code on GitHub by clicking the tag.

The last thing I want to say about SCM and social sharing sites is that I will not be sharing on BitBucket as part of this blog.  I used BitBucket a couple of years ago when it was only offering Mercurial support and I was a Mercurial user.  Nowadays, I am using Git more and more, and GitHub simply has more momentum as far as social coding that BitBucket does.  It’s not that I don’t like BitBucket, it’s just not worth keeping track of code on both sites.

Links to my GitHub and BitBucket pages are in my links section in the right hand navigation bar, but here they are just in case:

Nelson Well’s GitHub
Nelson Well’s BitBucket