<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><description>Morten Christiansen's programming projects.</description><link>http://www.without-precedence.dk/projects/</link><title>Without Precedence Projects RSS Feed</title><item><title>Booky the Bookmark Manager</title><link>http://www.without-precedence.dk/projects/booky-the-bookmark-manager</link><guid>http://www.without-precedence.dk/projects/booky-the-bookmark-manager</guid><description><![CDATA[

<p>As an active user of the web, at some point I ran into problems managing all the interesting sites which I wanted to save. The problem is that all browsers have more or less the same way to deal with bookmarks, a simple folder hierarchy. This is all fine and good if you have a moderate amount of bookmarks but with a web-surfing pattern like me, this does not suffice.</p>
<p>I tend to browse a large number of websites, scavenging all the useful bits of information and saving them to my favorites. If a site has some information which I might find remotely useful in some distant future situation, I want to hold on to it. At some point, this approach let to the limits of the browsers' usefulness; it was simply too hard to determine where in the huge file structure to place the bookmarks.</p>
<p>This was the point where I began using perpetually open browser tabs as a sort of bookmark limbo, they were too useful to abandon but not useful enough that I would endure the overhead of finding a spot for them in the dreadful hierarchy. Obviously, this was an unstable situation at best so this predicament led to my quest for a better bookmark management system.</p>
<p>A quick survey with Google image search indicated that there were no alternatives which did not use the same horrible abstraction for managing bookmarks. This suited me well as an idea for a better solution had begun to take root at the back of my mind.</p>
<p>The premise was simple, a small, easily accessible app which would allow you to enter and search for bookmarks based on tags.</p>
<h3>"Booky"</h3>
<p>As always, naming is tricky. I have really tried to come up with a cooler name, but so far the name has stuck. It does allow for some nifty letter rhymes, though ;) The program is written in C#, using WPF and .NET 3.5 and is currently nearing the completion of the second beta release.</p>
<p>The design principles have remained simple: the program must be browser agnostic, the user interface must do everything in its power to facilitate an efficient user experience (the less time spent in the program, the better), when not in use it must make as little noise as possible and, finally, it must be pretty looking :) For that last part, you can judge my humble design skills for yourself:</p>
<p><img class="center" style="vertical-align: baseline;" title="Booky UI" src="/images/booky.png" alt="Booky UI" width="450" height="231" /></p>
<p>For my part, I can say that the program is immensely helpful and I find myself using it more or less daily. It starts with Windows and then patiently sits waiting in the systray until you need its services. Once activated, the UI shown above appears (without the search results, obviously). All the common commands of the program are avaiable through shortcuts which makes the user experience very fluent and painless.</p>
<p>For instance, if you want to create a bookmark, simply paste an url into the search field and press F1. This brings forth the relevant dialog, which politely suggest a title for the bookmark (from the page title - if available). Just fill out the list of associated tags and press Enter (or Escape to cancel). This illustrates the main goal of the program which is to reduce the amount of time spent managing bookmarks and to encourage more aggressive bookmarking.</p>
<h3>Get the Program</h3>
<p>Booky requires the .NET framework 3.5 to run (on the client profile version is needed). If you're unsure what version you have, you can go <a title="Determine your .NET version" href="http://www.smallestdotnet.com">here</a> to find out.</p>
<p>The program is free to use and I have no plans for that to change once the program goes out of beta (I'm not planning for this to be one of those perpetual beta apps which seem to flood the web these days).</p>
<ul>
<li class="downloadlink"> <a title="Booky Beta 2 Installer" href="/files/BookyBeta2-04-02-09.msi">
<div>
<div>Booky Beta 2 Installer</div>
<div>.msi | 336.38KB</div>
</div>
</a> </li>
</ul>
<h3>Feedback&nbsp;</h3>
<p>If you have any comments or feedback on the program I would love to hear about it, especially if you found any bugs or have difficulties using the program. Just throw me a mail at <em>withoutprecedence@gmail.com</em>.</p>
<h3>Changelog</h3>
<p><em>Beta 2</em></p>
<ul class="highlighted">
<li>&nbsp;The program now comes packaged in an installer rather than a collection of files.</li>
<li>Autocomplete for tag searches has been replaced by a dropdown menu with all the matching tags.</li>
<li>Searching for tags now matches substrings, i.e. searching for <em>patterns</em> will also match <em>design patterns</em>.</li>
<li>Better parsing of page titles for bookmark title and better handling of special characters.</li>
<li>The systray icon now has a context menu showing the 5 most recently visited links for quick launching as well as an exit button.</li>
<li>Set the program to always start in lower right corner.</li>
<li>Fixed several bugs and inconsistencies with GUI behavior.</li>
<li>Fixed issues which caused the program to crash when writing tags.</li>
<li>Fixed a number of miscellaneous bugs and issues.&nbsp;</li>
</ul> ]]></description></item><item><title>The Card Game Language</title><link>http://www.without-precedence.dk/projects/the-card-game-language</link><guid>http://www.without-precedence.dk/projects/the-card-game-language</guid><description><![CDATA[

<p>The Card Game Language, or CGL for short, is a language which was developed during my fourth semester as a software engineering student. It was created by me and six of my fellow students in a project dedicated to the subject of language and compiler theory.</p>
<h3>The Language</h3>
<p>CGL is an interpreted language which is used to describe card games (currently only solitaire type games). The point of the language is to combine it with an interpreter which transforms a code file into a playable game. The language aims to describe a card game as a non-programmer might think about it which means that it closely follows the metaphors of card games. This should make it a comparatively easy language to approach, and not only for programmers.</p>
<p>To make it easier for people to develop card games in CGL I provide a couple of tools for <a title="Notepad++ Website" href="http://notepad-plus.sourceforge.net/uk/site.htm">Notepad++</a>. The package contains files to configure the editor with syntax highlighting and auto completion as well as a game template file so you don't have to figure out the overall structure of a game. For instructions on how to install the files, the package includes a readme file. For those who are into language theory, the language grammar is included as well, so you can get the complete picture of the language syntax.</p>
<ul>
<li class="downloadlink"> <a title="CGL Tools" href="/files/cgl-tools.zip"> </a> <a title="CGL Tools" href="/files/cgl-tools.zip">
<div>
<div>Notepad++ tools</div>
<div>.zip | 3.65KB</div>
</div>
</a> </li>
</ul>
<h3>A Silverlight Interpreter<br /></h3>
<p>The reason I write about our old language here is that I've ported the old winforms-based interpreter to one which is hosted in Silverlight. The interpreter allows you to upload your own CGL code to try out your games as well as a number of existing games.</p>
<p>The interpreter is in ongoing development and I have recently released a third version, which you can try out <a title="Card Game Simulator 3.0" href="http://without-precedence.dk/apps/card-game-simulator-3-0">here</a>. The second version, also implemented in Silverlight, can be found <a title="Card Game Simulator 2" href="http://without-precedence.dk/apps/card-game-simulator">here</a> for reference. The second version is currently the only one supporting uploaded games to be played.</p>
<h3>Evolving the Language<br /></h3>
<p>Working with the CGL has made it apparent that the language is far from perfect and lacks certain capabilities for expressing game concepts and keeping the code concise. The language was designed around the case of the classical Solitaire game which accompanies Windows installations. This means that a lot of game styles can be hard or impossible to represent in a reasonable amount of code. In addition, there are simply a number of quirks and oversights in the language which have yet to be ironed out.</p>
<p>To improve the language and generally make the experience of writing card games better, I'm currently working on a new implementation of the language using a custom compiler rather than the interpreter from the first port. To document the process I'm putting together a series of articles as I go along, which will be linked to below. See the first article for details on the goals and motivations for the project.</p>
<ul class="highlighted">
<li> <a title="Compiler Series: Introduction" href="/blog/03-12-09/compiler-series-introduction">Compiler Series: Introduction</a> </li>
<li> <a title="Compiler Series Part I: An Overview of CGL" href="/blog/07-12-09/compiler-series-part-i-an-overview-of-cgl">Compiler Series Part I: An Overview of CGL</a> </li>
<li> <a title="Compiler Series Part II: Compiler Basics" href="/blog/25-12-09/compiler-series-part-ii-compiler-basics">Compiler Series Part II: Compiler Basics</a> </li>
</ul> ]]></description></item><item><title>PHP Framework</title><link>http://www.without-precedence.dk/projects/php-framework</link><guid>http://www.without-precedence.dk/projects/php-framework</guid><description><![CDATA[

<p>In an effort to learn how to properly design PHP applications I made this page without help from any frameworks, templating engines or other third party tools. I have always found the language to be a messy language that didn't really encourage well designed applications and this has led to a couple of websites which were far from pretty but which got the work done. I get the impression that I'm not alone in feeling this way about PHP, though.</p>
<p>To make order of the chaos I have made something of a framework myself, which makes it quite easy for me to extend the website. I figured that if anyone else would find the code useful they might as well benefit from my work. This calls for a bit of extra work as the framework code has not been my main focus but just sort of appeared over time. Currently, I'm in the process of cleaning up the code, redesigning it and then making it publicly available. As the different parts of the code gets cleaned up I'll be presenting the main design points and usage patterns in a number of blog posts.</p>
<h3>Framework Bits and Bobs</h3>
<p>This list contains the parts of the framework which have been cleaned up published, each item pointing to a blog post giving an overview of how it works.</p>
<ul>
<li>A model for a composable API to interact with the <a title="The Database" href="/blog/11-02-09/php-framework-i-the-database">database</a> </li>
<li>The main <a title="Page Request Dispatcher" href="/blog/18-02-09/php-framework-ii-page-request-dispatcher">dispatcher</a> for page requests</li>
<li>Page <a title="Page Construction" href="/blog/24-03-09/php-framework-iii-page-construction">construction</a></li>
</ul>
<h3>Framework Design</h3>
<p>The framework is designed around the MVC pattern, such that the user defines a controller for each url, along with its associated model and view representation(s). I have attempted to automate as much of the process as possible such that you only have to create the proper controllers, models and views, and the framework will handle the dispatching of page requests and instantiations of controllers.</p>
<p>I must admit that my experiences with application design is limited on the area of the stateless web model and are mostly based on experimentation and inspiration from other application types. Thus, I make no claim that this is the best way to develop a web application but it has served me well enough.</p>
<h3>Download</h3>
<p>As I cover more and more aspects of the code, the cleaned up parts are included in a downloadable package. The content might vary from the versions described in the blog posts as I continually improve the design and refactor the code.</p>
<ul>
<li class="downloadlink"> <a title="PHP Framework" href="/files/phpframework.zip">
<div>
<div>PHP Framework Source</div>
<div>.zip | 69.45KB</div>
</div>
</a> </li>
</ul> ]]></description></item><item><title>Rend - A Managed Ray Tracing Engine</title><link>http://www.without-precedence.dk/projects/rend-a-managed-ray-tracing-engine</link><guid>http://www.without-precedence.dk/projects/rend-a-managed-ray-tracing-engine</guid><description><![CDATA[

<p>Rend is something as rare as a managed ray tracer, something you don't see every day, discounting the more simple implementations available on various programming sites (or the more exotic, such as a ray tracer implemented in <a title="Taking LINQ to Objects to Extremes: A fully LINQified RayTracer" href="http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx">a single LINQ query!</a>). It is not due to the whimsicality of chance that there are so few ray tracers in C# or other .NET languages - it is the same reason that computer games are written almost solely in C++ - performance.</p>
<p>Programs written in .NET languages are not slow by any means, but they do come up a bit short for the massive task of ray tracing which can bring any computer to its knees. C++ relies on lots of micro optimizations to achieve optimal performance and many of them are simply not available in .NET such as the use of SIMD instructions. For the same reasons, I decided to stay away from real-time ray tracing and focus on creating the most realistic and beautiful images.</p>
<p>Given the performance of Rend and the abundance of faster and more powerful alternatives, I'm not sure if I will find any useful application for the engine, but as long as it remains as rewarding to work on as it has been so far I'll keep expending on it's features (though it seems the work backlog grows quite a bit faster than what I can keep up with). My current goals are to have an engine with which you can create small animated video clips in a reasonably approachable way. It is already capable of loading an IronPython script to produce still images and video, but available effects are lacking and the usability of the engine needs a bit of polishing as well. Once these issues have been ironed out I will upload Rend and I hope you will return and check it out.</p>
<h3>Main Features</h3>
<p>To give you an idea of the capabilities of Rend, here is a list of the primary features and effects it supports:</p>
<ul>
<li>Ambient, diffuse and specular coloring of objects.</li>
<li>Reflection and refraction of light to create glass-like objects.</li>
<li>Hard shadows (also soft shadows but with sub-optimal quality).</li>
<li>Dynamic anti aliasing using edge detection.</li>
<li>Texture mapping with bilinear filtering.</li>
<li>Supports spheres, boxes, planes and triangle primitives.</li>
<li>Kd-tree for spatial division of objects.</li>
<li>A plugin model with many extension points.</li>
<li>Imports 3D models from .x and .obj files (currently not very robust implementations).</li>
<li>Camera animation and video generation.</li>
<li>An IronPython scripting interface.</li>
<li>Post-processing effects such as color inversion, grayscaling, gaussian blur, sharpening, edge detection etc.</li>
</ul>
<h3>Showcase</h3>
<p>Here is a little preview of what the engine can do so far:</p>
<p>&nbsp;</p>
<p><img class="center" title="A mixed collection of objects" src="/images/raytracing/raytracing%20-%20mixed%20scene.jpg" alt="A mixed collection of objects" width="450" height="250" /> <em>A mixed collection of objects including a textured moon.</em></p>
<p><img class="center" title="Glass sphere" src="/images/raytracing/raytracing%20-%20spheres.jpg" alt="Glass sphere" width="450" height="250" /> <em>A glass sphere demonstrates the refraction of light.</em></p>
<p><img class="center" title="The classic 3D teapot" src="/images/raytracing/raytracing%20-%20teapot.jpg" alt="The classic 3D teapot" width="450" height="250" /> <em>The classic <a title="Utah Teapot" href="http://en.wikipedia.org/wiki/Utah_teapot">Utah Teapot</a>.</em></p>
<p><img class="center" title="The classic 3D teapot in glass" src="/images/raytracing/raytracing%20-%20glass%20teapot.jpg" alt="The classic 3D teapot in glass" width="450" height="250" /> <em>The Utah Teapot made from glass.</em></p>
<p><img class="center" title="Space Flight" src="http://without-precedence.dk/images/raytracing/raytracing%20-%20space%20flight.jpg" alt="Space Flight" width="450" height="250" /> <em>A flight of space ships leaving Earth - model courtesy of <a title="XNAfusion" href="http://www.xnafusion.com/?p=97">XNAfusion.com</a>.</em></p>
<p><img class="center" title="Rendering errors" src="/images/raytracing/raytracing%20-%20error.jpg" alt="Rendering errors" width="450" height="250" /></p>
<p><em>Sometimes things go wrong, such as when I first tried to implement spatial division with Kd-Trees (This is supposed to be the same scene as the first image with some additional spheres).</em></p>
<h3>Resources</h3>
<p>Rend started out as a port of the principles and code described in a series of C++ <a title="Ray Tracing Tutorials in C++" href="http://www.devmaster.net/articles/raytracing_series/part1.php">tutorials</a> over at DevMaster.net.</p>
<p>I have found additional inspiration in another excellent <a title="Codermind Ray Tracing Tutorials" href="http://www.codermind.com/articles/Raytracer-in-C++-Introduction-What-is-ray-tracing.html">tutorial series</a> by the Codermind team.</p> ]]></description></item></channel></rss>