Archive for the ‘ programming ’ Category
Petri Nets are extremely powerful and expressive, but they are not as widely used as state machines. That's a pity, they allow us to solve problems beyond the reach of state machines. This post is the first in a mini-series on software development with Petri Nets. All of the code for a full feature-complete Petri Net library is available online at on GitHub. You're welcome to take a copy, play with it and use it in your own projects[ READ MORE ]
Forgive the recent silence – I’ve been in my shed. Frequently, I need some variation on the Visitor or HierarchicalVisitor patterns to analyse or transform an object graph. Recent work on a query builder for an old-skool query API sent my thoughts once again to the Visitor pattern. I normally hand roll these frameworks based [ READ MORE ]
This little script uses the JQuery getScript command, enforcing sequential loading order to ensure script dependencies are honoured: function LoadScriptsSequentially(scriptUrls, callback) { if (typeof scriptUrls == 'undefined') throw "Argument Error: URL array is unusable"; if (scriptUrls.length == 0 && typeof callback == 'function') callback(); $.getScript(scriptUrls.shift(), function() { LoadScriptsSequentially(scriptUrls, callback); }); } Here’s how you use [ READ MORE ]
I recently posted a question on Stack Overflow on the feasibility of using IL rewriting frameworks to rectify bad design after the fact. The confines of the answer comment area were too small to give the subject proper treatment so I though a new blog post was in order. Here’s the original question: I’ve recently [ READ MORE ]
Martin Fowler’s bliki has a very good post on what he calls the ‘technical debt quadrant‘. This post succinctly sums up the difference between those who produce poor designs in ways that are contrary to their best interests, and those who do so knowingly and reluctantly. In the past I’ve noted that many of those [ READ MORE ]
I’ve recently been using PostSharp 1.5 (Laos) to implement various features such as logging, tracing, API performance counter recording, and repeatability on the softphone app I’ve been developing. Previously, we’d been either using hand-rolled code generation systems to augment the APIs with IDisposable-style wrappers, or hand coded the wrappers within the implementation code. The problem [ READ MORE ]
After years of recoiling at the sight of code like this, am I supposed now to embrace it in a spirit of reconciliation? namespace ConsoleApplication1 { class Program { static void Main(string[] args) { dynamic blah = GetTheBlah(); Console.WriteLine(blah); } private static dynamic GetTheBlah() { if (DateTime.Now.Millisecond % 3 == 0) return 0; else return [ READ MORE ]
... there's plenty of ways that RDF specifically addresses the problems it seeks to address - data interchange, standards definition, KR, mashups - in a distributed web-wide way. RDBMSs address the problems that were faced by programmers at the coal face in the 60s and 70s - Efficient, Standardized, platform-independent data storage and retrieval. The imperative that created a need for RDBMSs in the 60s is not going away, so I doubt databases will be going away any time soon either. In fact they can be exposed to the world as triples without too much trouble. The problem is that developers need more than just data storage and retrieval. They need intelligent data storage and retrieval[ READ MORE ]
John Mueller recently sent through a link to a series of articles on working with RDF. As well as being a useful introduction to working with RDF, they use LinqToRdf for code examples. Modeling your Data with RDF (Part 1) Understanding and Using Resource Description Framework Files (Part 2) They provide information on hosting RDF [ READ MORE ]
Kingsley Idehen has again graciously given LinqToRdf some much needed link-love. He mentioned it in a post that was primarily concerned with the issues of mapping between the ontology, relational and object domains. His assertion is that LinqtoRdf, being an offshoot of an ORM related initiative, is reversing the natural order of mappings. He believes [ READ MORE ]
Get every new post delivered to your Inbox.