1. Say goodbye to dying

    Larry Page posted this today on Google plus. So we can now say good bye to death.


  2. Parsing XML to JSON in Python

    When traversing the internet you’ll find a lot of useful webservices that output XML. I have nothing against XML, but I find it much easier to work with data programmatically if it is in JSON. There didn’t seem to be much out there already, so I wrote up a small python script to do it. The problem is that there is no one-to-one translation from XML to JSON. I came across Google’s rules for XML to JSON conversion. The convention is as follows:


    • The feed is represented as a JSON object; each nested element or attribute is represented as a name/value property of the object.
    • Attributes are converted to String properties.
    • Child elements are converted to Object properties.
    • Elements that may appear more than once are converted to Array properties.
    • Text values of tags are converted to $t properties.


    • If an element has a namespace alias, the alias and element are concatenated using “$”. For example, ns:element becomes ns$element.


    • XML version and encoding attributes are converted to version and encoding attributes of the root element, respectively.


    The only part of this convention that I ignored was the versioning part, since I didn’t care about translating it back.

    from lxml import objectify
    try: import simplejson as json
    except ImportError: import json
    # This follows google's rules for conversion of XML to JSON
    def iterNodes(node, parentDict):
        nodeDict = {}
    	except AttributeError:
    	if node.text != None:
    		nodeDict['$t'] = node.text
    	for i in node.iterchildren():
    		childDict = {}
    		newDict = {}
    		newDict = iterNodes(i, childDict)
    		newList = []
    		if i.tag in nodeDict:
    				nodeDict[i.tag] = newList
    	tagList = node.tag.split(':')
    	namespace = '$'.join(tagList)
    	parentDict[namespace] = nodeDict
    	return parentDict
    def parseXML(xmlFile):
    	with open(xmlFile) as f:
    		xml = f.read()
    	root = objectify.fromstring(xml)
    	emptyDict = {}
    	parsedDict = iterNodes(root, emptyDict)
    	return json.dumps(parsedDict)

    You can edit or clone on GitHub


  3. We’re getting a little closer to the knowledge of who big brother is watching.


  4. And so it begins…


  5. thenextweb:

    Bomberman was always better against other people though. Now, a massively multiple online (MMO) version – albeit an unofficial one – has been released, allowing you to play right in the browser against up to 1,000 other people. Bombermine is everything you know and love about the original, but hyped up on a much grander scale. The levels are bigger and the ability to instantly respawn, similar to modern first person shooters (FPS) and MMORPGs, means that the action is relentless. (via Remember Bomberman? Try playing it in the browser against up to 1,000 other people - The Next Web)


  6. I am Picasso. I am Michelangelo. I am Basquiat. I am Walt Disney. I am Steve Jobs.
    — Kanye West (via cnet)

    (via cnet)


  7. amalucky:

    Tomorrow, Thursday 28th of February, the first documentary will be available for viewing online and it’s dedicated to open source programming language and environment Processing. The documentary explores the role that ideas such as process, experimentation and algorithm play in this creative field featuring artists, designers and code enthusiasts.

    (via Hello World! A documentary series on open creative programming languages - we make money not art)

    (via thenextweb)


  8. tarensk:

    The DOJ has told Congressional investigators that Aaron’s prosecution was motivated by his political views on copyright.

    I was going to start that last paragraph with “In a stunning turn of events,” but I realized that would be inaccurate — because it’s really not that surprising. Many people…



  10. ibmmobilefirst:

    IBM leads the market in mobile development technology. Explore @ ibm.co/Xx0trH #ibmmobile

    So stoked that I will be a part of this in May! #IBMMobile