Grunt uglify file specs

Sam Carr wrote “I struggled a bit finding relevant examples of Gruntfile configuration for Uglify, so having solved a few specific problems myself, here’s what I came up with. This is just a snippet from the whole Gruntfile of course, and contains half-decent comments already, though I’ll provide some extra explanations below to point out the most interesting…”

By Shamsuddin Muhammad from Fort Hood, TX, USA (Jack Swagger) [CC-BY-2.0 (http://creativecommons.org/licenses/by/2.0)], via Wikimedia Commons

Documenting an HTTP API with Swagger

Sam Carr wrote “I recently tried out Swagger, for documenting an HTTP API. The big win with Swagger is that it provides a sweet HTML UI to browse your API docs and experiment with sending requests and viewing responses, which is a great experience for other developers that are trying to get to grips with your API. Try…”

Embedded video and progressive download: A Quiz

Tim Clark wrote “I will provide you with two video files, video1.flv and video2.wmv, you need to embed them on the page and ensure that they use progressive download. Both video files are greater in size than 1GB so it will be obvious whether they are playing before they have completely downloaded. You will need to use the…”

A Custom ASP.Net Navigation Component for EpiServer CMS

Tim Clark wrote “LShift have used the EpiServer CMS on several customer projects and it generally does most things you would want to do with a CMS in a simple way. EpiServer is a .Net based CMS and if you understand ASP.NET templated pages and templated controls it is very straightforward with a minimal learning curve. One challenge…”

Untangling the BBC’s data feeds

Michael Bridgen wrote “Recently, Alan Ogilvie from A&Mi at the BBC announced that they were developing a “Feeds Hub”, and outlined their ambitions for it. He also mentioned LShift, RabbitMQ and open source, and I would like to explain, from our point of view, what this project is and how we’re working with the BBC. What is a…”

Reverse HTTP == Remote CGI

Tony Garnock-Jones wrote “I’ve been working recently on Reverse HTTP, an approach to making HTTP easier to use as the distributed object system that it is. My work is similar to the work of Lentczner and Preston, but is independently invented and technically a bit different: one, I’m using plain vanilla HTTP as a transport, and two, I’m…”

Streamlining HTTP

Tony Garnock-Jones wrote “HTTP/1.1 is a lovely protocol. Text-based, sophisticated, flexible. It does tend toward the verbose though. What if we wanted to use HTTP's semantics in a very high-speed messaging situation? How could we mitigate the overhead of all those headers? In this post, we invent a simple alternative syntax for HTTP that drastically reduces the wasted bandwidth. For the specific example of the OPRA feed, the computed bandwidth requirement of the experimental syntax is only 11% higher than the raw data itself — nearly 300% better than ordinary HTTP.”

Jeff Lindsay on Web Hooks

Tony Garnock-Jones wrote “From Jason Salas‘s interview with Jeff Lindsay, the guy who invented the term web hooks: “For example, the Facebook Platform, although pretty complicated and full of their own technology, is still at the core based on web hooks. They call out to a user-defined external web application and integrate that with their application. That’s quite…”

EvServer, Introduction: The tale of a forgotten feature

Marek Majkowski wrote “Long long time ago there was a WSGI spec. This document described a lot of interesting stuff. Between other very important paragraphs you could find a hidden gem: [...] applications will usually return an iterator (often a generator-iterator) that produces the output in a block-by-block fashion. These blocks may be broken to coincide with mulitpart boundaries (for "server push"), or just before time-consuming tasks (such as reading another block of an on-disk file). [...] It means that all WSGI conforming servers should be able to send multipart http responses. WSGI clock application theoretically could be written like that: def clock_demo(environ, start_response): start_response("200 OK", [('Content-type','text/plain')]) for i in range(100): yield "%sn" % (datetime.datetime.now(),) time.sleep(1) The problem is that way of programming just doesn't work well. It's not scalable, requires a lot of threads and can eat a lot of resources. That's why the feature has been forgotten. Until May 2008, when Christopher Stawarz reminded us this feature and proposed an enhancement to it. He suggested, that instead of blocking, like time.sleep(1), inside the code WSGI application should return a file descriptor to server. When an event happens on this descriptor, the WSGI app will be continued. Here's equivalent of the previous code, but using the extension. With appropriate server this could be scalable and work as expected: def clock_demo(environ, start_response): start_response("200 OK", [('Content-type','text/plain')]) sd = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) try: for i in range(100): yield environ['x-wsgiorg.fdevent.readable'](sd, 1.0) yield "%sn" % (datetime.datetime.now(),) except GeneratorExit: pass sd.close() So I created a server that supports it: EvServer the Asynchronous Python WSGI Server ”

Firefox tabs are finally usable

Michael Bridgen wrote “If you use Firefox, go and install the Ctrl-Tab add-on. Tabs are great for reducing clutter, but they fail to make life much easier because the tab navigation doesn’t support the common patterns of use. For example, I end up opening the same page in multiple tabs because it is quicker to do that than…”

Adding distributed version control to TiddlyWiki

Tony Garnock-Jones wrote “After my talk on Javascript DVCS at the Osmosoft Open Source Show’n’tell, I went to visit Osmosoft, the developers of TiddlyWiki, to talk about giving TiddlyWiki some DVCS-like abilities. Martin Budden and I sat down and built a couple of prototypes: one where each tiddler is versioned every time it is edited, and one where…”

diff3, merging, and distributed version control

Tony Garnock-Jones wrote “Yesterday I presented my work on Javascript diff, diff3, merging and version control at the Osmosoft Open Source Show ‘n Tell. (Previous posts about this stuff: here and here.) The slides for the talk are here. They’re a work-in-progress – as I think of things, I’ll continue to update them. To summarise: I’ve used the…”

Diff for Javascript, revisited

Tony Garnock-Jones wrote “Last weekend I finally revisited the diff-in-javascript code I'd written a couple of years back, adding (very simple) patch-like and diff3-like functionality. On the way, not only did I discover Khanna, Kunal and Pierce's excellent paper "A Formal Investigation of Diff3", but I found revctrl.org, the revision-control wiki, which I'm just starting to get my teeth into. I'm looking forward to learning more about merge algorithms. The code I wrote last weekend is available: just download diff.js. The tools included: * [cci no_cc="true"]Diff.diff_comm[/cci] - works like a simple Unix comm(1) * [cci no_cc="true"]Diff.diff_patch[/cci] - works like a simple Unix diff(1) * [cci no_cc="true"]Diff.patch[/cci] - works like a (very) simple Unix patch(1) (it's not a patch on Wall's patch) * [cci no_cc="true"]Diff.diff3_merge[/cci] - works like a couple of the variations on GNU's diff3(1) Read on for some examples showing the library in action.”

XML CDATA and escaping

Tony Garnock-Jones wrote “XML’s syntax for CDATA looks like this: <![CDATA[some text]]> Tag syntax within a CDATA section is suspended, so this is well-formed XML: <![CDATA[some <more> text]]> even though it looks like the “<more>” tag is unclosed. There’s only one thing you can’t say in a CDATA section: “]]>”. But there’s a trick to save us, even…”

Why does everything on the web require registration?

Michael Bridgen wrote “Some sites or services, quite reasonably, need to know who I am (and that I really am that person, to some acceptable level of verifiability). It’s usually because they hold data on my behalf, and neither me nor they want anyone else getting at that data. But why does InfoQ require me to register to…”

Only two things are infinite

Tom Berger wrote “YAHOO has announced that it will soon be offering unlimited storage to users of its free web-mail product. What does it really mean, and what can we learn from this about the marriage between engineering and marketing.”