Coding

Explore articles about coding on Life Beyond Fife

coding

Insurance against LeftPad level events

When it comes to dependencies, there are two extremes in software development. Complete ownership of everything right down to the abstract data types e.g. "Yes I write my own open addressing hash table and hash map"; or on the other hand grabbing strangers' code left, right and centre e.g. "I'd rather have a dependency on some random, 12 line implementation of LeftPad because that's one less thing to bugfix, debug and maintain". As with all computer science trade offs, the majority feel comfortable somewhere in the middle. Done properly, I see the elegance of relying on small, composable dependencies but...

2 min readRead more →
coding

Breaking into the opinionated, disjointed world of web development

Again and again, I find web development one of the most fascinating of all the disciplines I've come across in my career. Fascinating in the way Extreme Ironing is fascinating: you spend as much of the time wondering why as you do how. Getting started The main issue as I see it for a developer with existing skills in programming looking to become a web developer, is how to get started. Take jstherightway.org as an example of one of many introductory guides to modern web development: as comprehensive and helpful as it is, where do you begin? How do you...

4 min readRead more →
coding

Converting XML to JSON

XML and JSON are the two most common generic standards for passing representation state information in web APIs. So when I recently needed to convert XML to JSON, I didn't even think about the structure of XML, I simply looked for a library to do it. "Why isn't there a library to do this?" I thought. Quite simply, because you cannot express XML as JSON and vice versa. There are too many grey areas where a choice needs to be made about how the conversion should be done. A lack of bijective one-to-one mapping means that no-one will create a...

4 min readRead more →
XML Serialisation
coding

XML Serialisation

Recently at work I was confronted by a problem requiring data persistance outside of a database - in this case, a saved parameter project file. Though I'm a convert to the purity and ease of use of JSON, in the land of Enterprise coding, XML is still very much king. Visual Studio provides many tools for not just dealing with XML files but also XSD files: a schema for describing a valid XML source file. Both while at work in creating configuration files, and at home in parsing Amazon's RESTful API results returned in XML data, I've written code to...

6 min readRead more →