Posts Categorized: Programming

  • ORCiD & Datacite, Programming

    Getting started with the public ORCID API using swagger – quickstart guide

    Posted on by

    ORCID recently implemented a swagger definition file for it’s v2.0 API, which means it’s now even easier to access the public ORCID API from your website.  Just use swagger.js.  It’s Super.  And Easy. Let’s give it a go. First, clone swagger onto your machine.  Either use the git desktop client, click the button on the repository or fetch it… Read more »

  • Programming, Ramblings

    C# FluentValidation – why we’re using it

    Posted on by

    A bit of background I’ve been working in the C# world for a few months now. While the code is very similar to Java,the culture around open source could not be more different.  Where open source as business as usual in the Java & Javascript worlds, it’s very much exceptional circumstances only in the .Net one…. Read more »

  • Programming, Ramblings

    Delphi isn’t quite dead yet.

    Posted on by

    Back when I was a lowly junior programmer, life was great. We had a humongous 64k of memory to play with, two whole (user defined!) colours and an 80 character width screen.  We managed gigantic millions of member pension schemes using the equivalent of a commodore 64.  Recursive functions meant stack overflow.  Not one of these… Read more »

  • Programming

    Making acceptance testing easy, useful and fun with BDD – enter cucumber

    Posted on by

    User stories, requirements analysis and all that Jazz. I’ve been mulling over my approach to gathering requirements recently and it’s become clear that although I’m Doing It Right a lot of the time, I’m also Doing It Wrong. Ron Jefferies wrote about the Three Cs 13 years ago.  He did it in the context of Extreme… Read more »

  • Programming

    Writing CSV using Jackson CSVMapper & Mixin annotations

    Posted on by

    A while back I wrote a post on how not to parse CSV using Java.  It included a few pointers on how to pull CSV data into an application but not how to spit it back out.  I thought I’d write a quick post on writing CSV and a few best practice pointers that will help… Read more »

  • Programming

    How to set up method level caching with annotations using javax.cache / JCache / JSR-107 & Guice

    Posted on by

    I’ve just spent a day looking at Java caching standards and utilising them in front of a data repository.  It turns out that information, and by this I mean practical information that helps with implementation, is a little thin on the ground.  If you’re not using Spring, you’re stuffed. Hence this post. JSR-107 is the original… Read more »

  • Programming

    Generating POJOs from XML schemas using JAXB XJC

    Posted on by

    A little bit of history XML processing in Java has come a long way in the last ten years.  Back in the old days mapping XML to Java was a bit of a nightmare, deserialising usually meant pulling the DOM apart bit by bit to get at the interesting parts. Serialisation was worse – the… Read more »

  • ORCiD & Datacite, Programming

    ORCiD tools – who’s claiming what?

    Posted on by

    As part of my work with data-centres and ORCiD I’ve put together a tool that lets you see where works claimed within ORCiD have been published.   Start typing a publisher into the search box and it’ll look up the DOI prefix (or other identifier prefix) for that publisher from a list nearly 4000 long.  Current… Read more »

  • ORCiD & Datacite, Programming

    ORCID Open Source Java Client – I made this!

    Posted on by

    Update: ORCiD client now available as a Maven dependency! I’ve just open sourced a Java application I’ve been working on at the British Library.  It’s a RESTlet server and JQuery/bootstrap client that enables people to claim a work from a remote service, log into ORCID using OAuth and add the work to their profile. It… Read more »

  • Programming

    Controlling the cache headers for a RESTlet directory

    Posted on by

    My previous post described how to serve webjars with RESTlet.  This post will describe how to add caching so that users don’t swamp your servers with requests. Put simply, you put a filter in the chain before the directory and modify the HTTP headers of successful requests.  Like so: