Things in Jars

Simon Madine (thingsinjars)

@thingsinjarsFollow me on Twitter

Hi, I’m Simon Madine and I make digital toys and write guides on web development.

I'm a senior web dev on Nokia Maps in Berlin.

  • Twitter
  • Flickr
  • GitHub
  • Forrst
  • Shelvist
  • Last.FM
  • RSS
  • Open Source Ideas

    Written 30 Oct 2009

    Ideas

    All too often, I have ideas which might make a cool website or iPhone app or whatever and I know I just don't have the time to build them. I'm going to post them here in the hope that someone else might find a use for them. These ideas might already be in existence, of course. I'm not claiming they are unique in any way (although some might be).

    You are free to take these ideas and do whatever you like with them. Of course, if they become amazingly successful, I could do with a bigger TV...

    Comments

  • SpreadShop

    Written 9 Apr 2008

    Cartoons

    SpreadShop

    If you wake up every morning and think, "My t-shirts are so dull, I wish I had interesting clothes...", you need to have a look at my online shop.


    Comments

  • licences.xml

    Written 20 Aug 2010

    Ideas,Geek,Opinion

    JavaScript libraries and CSS frameworks are very popular these days. With each library, plugin, extension and template, comes another licencing statement. For most of these licences (MIT, for instance), you must include the licence statement in order to be able to use the code. In many cases, you also have to provide the original source and your own modifications. While, for uncompiled technologies such as these, this is a trivial matter, both this requirement and that of including the licence are awkward to implement if you like to minify your code. The licence is usually kept in an uncompressed comment at the top of the library (the YUI compressor specifically takes this into account with comments marked /*! */ ) and, although anyone can read your modifications to whatever you've used, post-minification code is much harder to follow (cf. three of my last four blog posts) and is really not 'in the spirit' of sharing your code.

    I'd like to be able to bundle all the licences and sources together outside the production files. Somewhere the interested user would be able to look them up if they liked but not somewhere that would automatically be downloaded on a standard visit. To that end, I have looked around for an established standard for this and not found anything. If you know of one, please let me know. Until I do find a good standard, here's my suggestion – a simple XML file located at /licences.xml in the format outlined below. It contains details of the file the licence pertains to, the uncompressed source (optional), the title of the licence and a URL where the full licence text can be found (on opensource.org or creativecommons.org, for instance). It also includes a (probably superfluous) shortname for the licence. I might remove that bit. You can optionally include this meta in your HTML if you want an explicit link between your source and the licence file:

    <meta name="licences" value="/licences.xml" />

    I'm currently undecided as to whether to go with XML or JSON. They're fairly interchangeable (barring XML attributes) but JSON takes less space. Then again, there's not as much need to save space in this file. Anyone have any recommendations? The entire format is, of course, up for discussion. Have I forgotten anything? Have I included anything unnecessary? I'm going to start using this in my projects until someone points out some major legal problem with it, I think.

    XML

     
    <licences>
     <licence>
      <source>
       <url>
        /includes/script/jquery/1.4/jquery.min.js
       </url>
       <uncompressed>
        /includes/script/jquery/1.4/jquery.js
       </uncompressed>
      </source>
      <deed>
       <title>
       MIT License
       </title>
       <url>
        http://www.opensource.org/licenses/mit-license.php
       </url>
       <shortform>
       MIT
       </shortform>
      </deed>
     </licence>
     <licence>
      <source>
       <url>
        /includes/script/custom/0.1/custom.js
       </url>
       <uncompressed>
        /includes/script/custom/0.1/custom.min.js
       </uncompressed>
      </source>
      <deed>
       <title>
       Attribution Share Alike
       </title>
       <url>
        http://creativecommons.org/licenses/by-sa/3.0
       </url>
       <shortform>
       cc by-sa
       </shortform>
      </deed>
     </licence>
    </licences>
    

    JSON

     
    {
     licences:{
      {
       source:{
        url:'/includes/script/jquery/1.4/jquery.min.js',
        uncompressed:'/includes/script/jquery/1.4/jquery.js'
       },
       deed:{
        title:'MIT License',
        url:'http://www.opensource.org/licenses/mit-license.php',
        shortform:'MIT'
       }
      },
      {
       source:{
        url:'/includes/script/custom/0.1/custom.min.js',
        uncompressed:'/includes/script/custom/0.1/custom.js'
       },
       deed:{
        title:'Attribution Share Alike',
        url:'http://creativecommons.org/licenses/by-sa/3.0',
        shortform:'cc by-sa'
       }
      }
     }
    }
    

    Comments

Browse articles by category:

Toys, Guides, Opinion, Geek, Non-geek, Development, Design, CSS, JS, Open-source Ideas, Cartoons, Photos

Recent side-projects

  • Insta-Art
  • 8-Bit Alpha
  • Shelvi.st
  • The Elementals
  • Harmonious

Toys

Find my digital toys at thelab.thingsinjars.com.

Contact

Send me a message via Twitter.

Adopt-a-Museum

@thingsinjars:

    © 2012 Simon Madine