<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-9582144</id><updated>2024-03-13T03:17:42.303-07:00</updated><title type='text'>Al&#39;s Game Programming Blog</title><subtitle type='html'>This blog is a repository of the brain dumps of an obsessive video games programmer. He only learns by making mistakes. Please help by telling him why he is wrong.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://alpatrick.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default?alt=atom'/><link rel='alternate' type='text/html' href='http://alpatrick.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default?alt=atom&amp;start-index=26&amp;max-results=25'/><author><name>Alastair Patrick</name><uri>http://www.blogger.com/profile/08547818719982201304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>51</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9582144.post-113917523144257921</id><published>2006-02-05T13:18:00.000-08:00</published><updated>2006-02-05T19:22:08.770-08:00</updated><title type='text'>Tim Sweeney gives a presentation at POPL 2006</title><summary type="text">Last month, Tim Sweeney of Epic Games (developers of the Unreal engine) gave a presentation titled, &quot;The Next Mainstream Programming Language: A Game Developer&#39;s Perspective&quot;. Although I did not attend the POPL 2006 conference, I found reading the slides interesting. They can be opened with Open Office if you don&#39;t have Microsoft Powerpoint.On the opening slide, he argues that the programming </summary><link rel='replies' type='application/atom+xml' href='http://alpatrick.blogspot.com/feeds/113917523144257921/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9582144/113917523144257921' title='15 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/113917523144257921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/113917523144257921'/><link rel='alternate' type='text/html' href='http://alpatrick.blogspot.com/2006/02/tim-sweeney-gives-presentation-at-popl.html' title='Tim Sweeney gives a presentation at POPL 2006'/><author><name>Alastair Patrick</name><uri>http://www.blogger.com/profile/08547818719982201304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9582144.post-113193716491067702</id><published>2005-11-13T18:33:00.000-08:00</published><updated>2005-11-13T18:59:24.930-08:00</updated><title type='text'>How const is const?</title><summary type="text">Here is some straightforward C++ code:int a[5];The variable &quot;a&quot; is declared as being an array of 5 integers. This code is equivalent:const int n = 5;int a[n];The variable &quot;n&quot; is a compile-time constant and can be used interchangeably with the constant 5. The address of a global variable is also a compile-time constant. Therefore, this is valid C++ as well:int b;const int n = reinterpret_cast&amp;lt;</summary><link rel='replies' type='application/atom+xml' href='http://alpatrick.blogspot.com/feeds/113193716491067702/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9582144/113193716491067702' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/113193716491067702'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/113193716491067702'/><link rel='alternate' type='text/html' href='http://alpatrick.blogspot.com/2005/11/how-const-is-const.html' title='How const is const?'/><author><name>Alastair Patrick</name><uri>http://www.blogger.com/profile/08547818719982201304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9582144.post-112769069981662676</id><published>2005-09-25T16:12:00.000-07:00</published><updated>2005-09-25T19:06:59.876-07:00</updated><title type='text'>Using Python to drive Google Desktop Search</title><summary type="text">If you haven&#39;t tried Google Desktop Search yet I suggest you install it immediately. It extends the Google search engine to your hard drive so you can use it to search your files, emails, etc. I find it really useful for searching through source code. It&#39;s much faster than Visual Studio or Explorer&#39;s search because it uses some kind of clever keyword index.This weekend I decided to learn Python. </summary><link rel='replies' type='application/atom+xml' href='http://alpatrick.blogspot.com/feeds/112769069981662676/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9582144/112769069981662676' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/112769069981662676'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/112769069981662676'/><link rel='alternate' type='text/html' href='http://alpatrick.blogspot.com/2005/09/using-python-to-drive-google-desktop.html' title='Using Python to drive Google Desktop Search'/><author><name>Alastair Patrick</name><uri>http://www.blogger.com/profile/08547818719982201304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9582144.post-111190936912806902</id><published>2005-03-26T23:33:00.000-08:00</published><updated>2005-03-26T23:42:49.130-08:00</updated><title type='text'>Virtual sizeof</title><summary type="text">Do you ever wish you could do this:class Base{}; class Derived: public Base{  int x;}; Base *p = new Derived; size_t s = sizeof(*p); // s is sizeof(Derived)Of course it doesn&#39;t work because s becomes the size of Base rather than Derived. What you really want is a kind of &quot;virtual sizeof&quot;. This is what I came up with:class Base{public:  virtual size_t Size() const = 0;}; class Derived: public Base</summary><link rel='replies' type='application/atom+xml' href='http://alpatrick.blogspot.com/feeds/111190936912806902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9582144/111190936912806902' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/111190936912806902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/111190936912806902'/><link rel='alternate' type='text/html' href='http://alpatrick.blogspot.com/2005/03/virtual-sizeof.html' title='Virtual sizeof'/><author><name>Alastair Patrick</name><uri>http://www.blogger.com/profile/08547818719982201304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9582144.post-111190801307458297</id><published>2005-03-26T22:50:00.000-08:00</published><updated>2005-03-27T17:15:37.830-08:00</updated><title type='text'>I&#39;m not dead</title><summary type="text">It&#39;s been 3 weeks since my last post. I&#39;m not dead. I&#39;ve been busy working on various projects. None of them are in a state that I can post anything concrete. Last week I learned two scripting languages: Ruby and Lua. The first thing I noticed was how much more productive I was using a scripting language than C# or C++. I think it was mostly the dynamic typing and certain language features like </summary><link rel='replies' type='application/atom+xml' href='http://alpatrick.blogspot.com/feeds/111190801307458297/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9582144/111190801307458297' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/111190801307458297'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/111190801307458297'/><link rel='alternate' type='text/html' href='http://alpatrick.blogspot.com/2005/03/im-not-dead.html' title='I&#39;m not dead'/><author><name>Alastair Patrick</name><uri>http://www.blogger.com/profile/08547818719982201304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9582144.post-111008058128997024</id><published>2005-03-05T19:23:00.000-08:00</published><updated>2005-03-05T23:20:19.640-08:00</updated><title type='text'>CDL prototype working</title><summary type="text">I just got my prototype CDL metacompiler working. It can compile the CDL class definition I posted previously and it outputs all the automatically generated schema and C++ serialization code. It&#39;s not even close to being production ready but I have taken it far enough to satisfy myself that it would be feasible for a game project. It was pretty straightforward to get working: just 18 hours.I </summary><link rel='replies' type='application/atom+xml' href='http://alpatrick.blogspot.com/feeds/111008058128997024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9582144/111008058128997024' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/111008058128997024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/111008058128997024'/><link rel='alternate' type='text/html' href='http://alpatrick.blogspot.com/2005/03/cdl-prototype-working.html' title='CDL prototype working'/><author><name>Alastair Patrick</name><uri>http://www.blogger.com/profile/08547818719982201304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9582144.post-110956093023073981</id><published>2005-02-27T18:52:00.000-08:00</published><updated>2005-02-27T21:01:50.790-08:00</updated><title type='text'>Other applications for CDL</title><summary type="text">My main justification for CDL to this point has been as a tool to automatically generate a schema from an annotated C++ class definition, together with additional automatically generated C++ code to support the binding of objects to binary data cooked with the schema. As I see things, the only viable alternative (using C++ at least) is to automatically generate C++ code from a hand-written schema</summary><link rel='replies' type='application/atom+xml' href='http://alpatrick.blogspot.com/feeds/110956093023073981/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9582144/110956093023073981' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110956093023073981'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110956093023073981'/><link rel='alternate' type='text/html' href='http://alpatrick.blogspot.com/2005/02/other-applications-for-cdl.html' title='Other applications for CDL'/><author><name>Alastair Patrick</name><uri>http://www.blogger.com/profile/08547818719982201304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9582144.post-110953163020083319</id><published>2005-02-27T10:38:00.000-08:00</published><updated>2005-02-27T11:59:47.056-08:00</updated><title type='text'>Another CDL example</title><summary type="text">This is another example of CDL. I am posting it in response to Noel Llopis&#39; comment on another thread. This is intended to demonstrate how CDL could allow the structure of the schema to differ from that of the member variables.// Orientation.cdl// Hand written annotated classCDL class Orientation{public:   Orientation(): x(0), y(0), z(0), w(1) {}   // Public API uses Euler angles  float GetX() </summary><link rel='replies' type='application/atom+xml' href='http://alpatrick.blogspot.com/feeds/110953163020083319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9582144/110953163020083319' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110953163020083319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110953163020083319'/><link rel='alternate' type='text/html' href='http://alpatrick.blogspot.com/2005/02/another-cdl-example.html' title='Another CDL example'/><author><name>Alastair Patrick</name><uri>http://www.blogger.com/profile/08547818719982201304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9582144.post-110895275515841905</id><published>2005-02-20T17:58:00.000-08:00</published><updated>2005-02-20T18:25:55.163-08:00</updated><title type='text'>Puma C++ transformation library</title><summary type="text">Today I looked at Puma. Puma is a library for applying transformations to C++ programs. It can do C++ lexical analysis, parsing and semantic analysis. The library provides an API for examining and modifying C++ abstract syntax trees. To support program transformation, it also allows a modified syntax tree to be &quot;unparsed&quot; back into C++ source code, which can then be compiled using a C++ </summary><link rel='replies' type='application/atom+xml' href='http://alpatrick.blogspot.com/feeds/110895275515841905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9582144/110895275515841905' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110895275515841905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110895275515841905'/><link rel='alternate' type='text/html' href='http://alpatrick.blogspot.com/2005/02/puma-c-transformation-library.html' title='Puma C++ transformation library'/><author><name>Alastair Patrick</name><uri>http://www.blogger.com/profile/08547818719982201304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9582144.post-110853493393184976</id><published>2005-02-15T22:00:00.000-08:00</published><updated>2005-02-16T22:35:57.360-08:00</updated><title type='text'>Schema from program or program from schema?</title><summary type="text">One of the goals of my C++ metaprogramming system is that it should be possible to generate a schema for game data directly from an annotated C++ program. This schema is important because it decouples the game engine from the tools that are used to process the game&#39;s data.There seem to be three options here. The first option is the one I am currently investigating and also the motivation for my C</summary><link rel='replies' type='application/atom+xml' href='http://alpatrick.blogspot.com/feeds/110853493393184976/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9582144/110853493393184976' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110853493393184976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110853493393184976'/><link rel='alternate' type='text/html' href='http://alpatrick.blogspot.com/2005/02/schema-from-program-or-program-from.html' title='Schema from program or program from schema?'/><author><name>Alastair Patrick</name><uri>http://www.blogger.com/profile/08547818719982201304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9582144.post-110850168973395662</id><published>2005-02-15T13:07:00.000-08:00</published><updated>2005-02-15T23:43:31.290-08:00</updated><title type='text'>artefaktur C++ framework</title><summary type="text">I found this existing C++ framework that supports reflection. Like my metaprogramming idea, this uses a C++ preprocessor to parse metadata out of C++ class definitions. I believe it focuses on using reflection to exploit metadata. I want to continue down the metaprogramming route. I think it fits better with C++.I also investigated C++0x. This is an attempt to standardize the next version of C++.</summary><link rel='replies' type='application/atom+xml' href='http://alpatrick.blogspot.com/feeds/110850168973395662/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9582144/110850168973395662' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110850168973395662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110850168973395662'/><link rel='alternate' type='text/html' href='http://alpatrick.blogspot.com/2005/02/artefaktur-c-framework.html' title='artefaktur C++ framework'/><author><name>Alastair Patrick</name><uri>http://www.blogger.com/profile/08547818719982201304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9582144.post-110832863803046648</id><published>2005-02-13T12:55:00.000-08:00</published><updated>2005-02-13T15:10:56.780-08:00</updated><title type='text'>CDL use cases</title><summary type="text">These are some use cases for my C++ metaprogramming framework. First some CDL:// Texture.h#ifndef GUARD_Texture_H#define GUARD_Texture_H #include &quot;Object.h&quot; // physical dependency on base class #include &quot;StringPtr.h&quot; // no physical dependency on referenced classes#include &quot;ArrayPtr.h&quot;#include &quot;MipMapPtr.h&quot; CDL class Texture: public Object{public:   PROPERTY    Ptr&amp;lt;String&amp;gt; GetName() const;</summary><link rel='replies' type='application/atom+xml' href='http://alpatrick.blogspot.com/feeds/110832863803046648/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9582144/110832863803046648' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110832863803046648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110832863803046648'/><link rel='alternate' type='text/html' href='http://alpatrick.blogspot.com/2005/02/cdl-use-cases.html' title='CDL use cases'/><author><name>Alastair Patrick</name><uri>http://www.blogger.com/profile/08547818719982201304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9582144.post-110832386504315194</id><published>2005-02-13T11:14:00.000-08:00</published><updated>2005-02-13T15:17:07.650-08:00</updated><title type='text'>C++ metaprogramming framework</title><summary type="text">In my previous post, I considered some ways of exploiting reflection in a C++ program. Specifically, I proposed the use of a C++ data definition language (DDL) from which metadata could be extracted in order to support reflection. In retrospect, I think the choice of the term DDL was a mistake. C++ classes are not just data after all. From now on I will use the term class definition language (CDL</summary><link rel='replies' type='application/atom+xml' href='http://alpatrick.blogspot.com/feeds/110832386504315194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9582144/110832386504315194' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110832386504315194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110832386504315194'/><link rel='alternate' type='text/html' href='http://alpatrick.blogspot.com/2005/02/c-metaprogramming-framework.html' title='C++ metaprogramming framework'/><author><name>Alastair Patrick</name><uri>http://www.blogger.com/profile/08547818719982201304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9582144.post-110711335810322887</id><published>2005-01-30T10:21:00.000-08:00</published><updated>2005-01-30T13:47:02.376-08:00</updated><title type='text'>C++ data definition language</title><summary type="text">In a previous post, I said I would consider some alternative ways of taking advantage of the benefits of C# (primarily reflection) on game console platforms. Two approaches spring to mind.The first approach is to use an existing interpreted language with reflection support, such as Python. An interpreted language is appealing because, if the interpreter, debugger and other tools can be easily </summary><link rel='replies' type='application/atom+xml' href='http://alpatrick.blogspot.com/feeds/110711335810322887/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9582144/110711335810322887' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110711335810322887'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110711335810322887'/><link rel='alternate' type='text/html' href='http://alpatrick.blogspot.com/2005/01/c-data-definition-language.html' title='C++ data definition language'/><author><name>Alastair Patrick</name><uri>http://www.blogger.com/profile/08547818719982201304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9582144.post-110703432661603923</id><published>2005-01-29T13:27:00.000-08:00</published><updated>2005-01-29T15:29:02.590-08:00</updated><title type='text'>Contact details</title><summary type="text">In light of recent industry events, should anyone want to contact me directly over the next few weeks, I can be emailed at &quot;apatrick at mail dot com&quot;.</summary><link rel='replies' type='application/atom+xml' href='http://alpatrick.blogspot.com/feeds/110703432661603923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9582144/110703432661603923' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110703432661603923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110703432661603923'/><link rel='alternate' type='text/html' href='http://alpatrick.blogspot.com/2005/01/contact-details.html' title='Contact details'/><author><name>Alastair Patrick</name><uri>http://www.blogger.com/profile/08547818719982201304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9582144.post-110644670690864516</id><published>2005-01-22T15:31:00.000-08:00</published><updated>2005-01-22T18:18:26.906-08:00</updated><title type='text'>First experience of test driven development</title><summary type="text">I have been meaning to try Test Driven Development (TDD) for some time now. Until now I had been putting it off, mostly because I thought it would take quite a long time to learn and because I thought it would be a long time before I really &quot;got it&quot; and started seeing any real benefits. Having just written my first program using TDD, I am pleased to report that my learning time was almost nil and</summary><link rel='replies' type='application/atom+xml' href='http://alpatrick.blogspot.com/feeds/110644670690864516/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9582144/110644670690864516' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110644670690864516'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110644670690864516'/><link rel='alternate' type='text/html' href='http://alpatrick.blogspot.com/2005/01/first-experience-of-test-driven.html' title='First experience of test driven development'/><author><name>Alastair Patrick</name><uri>http://www.blogger.com/profile/08547818719982201304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9582144.post-110592679641613663</id><published>2005-01-16T16:41:00.000-08:00</published><updated>2005-01-16T18:09:56.196-08:00</updated><title type='text'>Review of the benefits of C# for games programming</title><summary type="text">I have just about reached the limits of what I can hope to achieve with my C# to C++ translator project. There is so much more I would like to do but it is getting to the stage where I cannot make significant progress in weekend time alone. I&#39;m also extremely busy at work and have little energy left. Maybe I&#39;ll pick up where I left off in a few months.I did pretty well in the time available I </summary><link rel='replies' type='application/atom+xml' href='http://alpatrick.blogspot.com/feeds/110592679641613663/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9582144/110592679641613663' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110592679641613663'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110592679641613663'/><link rel='alternate' type='text/html' href='http://alpatrick.blogspot.com/2005/01/review-of-benefits-of-c-for-games.html' title='Review of the benefits of C# for games programming'/><author><name>Alastair Patrick</name><uri>http://www.blogger.com/profile/08547818719982201304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9582144.post-110592140761218109</id><published>2005-01-16T15:32:00.000-08:00</published><updated>2005-01-16T16:23:27.613-08:00</updated><title type='text'>Code coverage analysis</title><summary type="text">Code coverage analysis is a way of verifying that every code path in a program is exercised at least once by a collection of test cases. Consider this simplified example:public class MathUtils{  public static int Sign(int x)  {    if (x&amp;lt;0)    {      return -1;    }    else if (x&amp;gt;0)    {      return 1;    }    else    {      return 0;    }  }}[TestFixture]class </summary><link rel='replies' type='application/atom+xml' href='http://alpatrick.blogspot.com/feeds/110592140761218109/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9582144/110592140761218109' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110592140761218109'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110592140761218109'/><link rel='alternate' type='text/html' href='http://alpatrick.blogspot.com/2005/01/code-coverage-analysis.html' title='Code coverage analysis'/><author><name>Alastair Patrick</name><uri>http://www.blogger.com/profile/08547818719982201304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9582144.post-110582991255775354</id><published>2005-01-15T14:52:00.000-08:00</published><updated>2005-01-15T15:51:20.806-08:00</updated><title type='text'>Mono class library licensing terms</title><summary type="text">I just checked out the licensing terms of the Mono .NET class library. This is Mono&#39;s implementation of classes like System.String, System.Collections.ArrayList, etc. It is just C# source code so, using my C# to C++ translator, I will be able to translate it to C++ just like any other C# program.It is under the very unrestrictive MIT license. Specifically, it is allowable to use it in </summary><link rel='replies' type='application/atom+xml' href='http://alpatrick.blogspot.com/feeds/110582991255775354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9582144/110582991255775354' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110582991255775354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110582991255775354'/><link rel='alternate' type='text/html' href='http://alpatrick.blogspot.com/2005/01/mono-class-library-licensing-terms.html' title='Mono class library licensing terms'/><author><name>Alastair Patrick</name><uri>http://www.blogger.com/profile/08547818719982201304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9582144.post-110582575659081311</id><published>2005-01-15T13:03:00.000-08:00</published><updated>2005-01-15T18:19:29.880-08:00</updated><title type='text'>C# memory manager for video games console platform</title><summary type="text">In a previous post I described a fully automatic memory manager that was guaranteed not to leak memory. It was based on reference counting, weak references and compile time analysis. I plan to use this in the runtime for my C# to C++ translator. Now in this post I will look into a possible allocation strategy.When designing a memory manager, there is an important trade-off to be made between </summary><link rel='replies' type='application/atom+xml' href='http://alpatrick.blogspot.com/feeds/110582575659081311/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9582144/110582575659081311' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110582575659081311'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110582575659081311'/><link rel='alternate' type='text/html' href='http://alpatrick.blogspot.com/2005/01/c-memory-manager-for-video-games.html' title='C# memory manager for video games console platform'/><author><name>Alastair Patrick</name><uri>http://www.blogger.com/profile/08547818719982201304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9582144.post-110523769684331797</id><published>2005-01-08T17:19:00.000-08:00</published><updated>2005-01-08T18:59:04.930-08:00</updated><title type='text'>Prototype pattern using reflection</title><summary type="text">The prototype pattern is one of the originals described by the &quot;Gang of Four&quot; in their book &quot;Design Patterns&quot;. The idea is that a class contains a virtual method that is overridden in each derived class to create a clone. Given a prototype object, it is then possible to create as many clones as needed by invoking the clone method.An application of this pattern in video games would be to </summary><link rel='replies' type='application/atom+xml' href='http://alpatrick.blogspot.com/feeds/110523769684331797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9582144/110523769684331797' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110523769684331797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110523769684331797'/><link rel='alternate' type='text/html' href='http://alpatrick.blogspot.com/2005/01/prototype-pattern-using-reflection.html' title='Prototype pattern using reflection'/><author><name>Alastair Patrick</name><uri>http://www.blogger.com/profile/08547818719982201304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9582144.post-110522084174266516</id><published>2005-01-08T11:58:00.000-08:00</published><updated>2005-01-10T08:30:06.066-08:00</updated><title type='text'>Automatically detect all memory leaks at compile time?</title><summary type="text">Yesterday at work I spent a couple of hours tracking down a troublesome memory leak. Memory leaks are my third least favorite kind of bug (race conditions and dangling pointers are worse). They are also annoying because it is next to impossible to write unit tests that verify memory does not leak. If I refactor some code, how am I to know if I have introduced a memory leak? This leads me to my </summary><link rel='replies' type='application/atom+xml' href='http://alpatrick.blogspot.com/feeds/110522084174266516/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9582144/110522084174266516' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110522084174266516'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110522084174266516'/><link rel='alternate' type='text/html' href='http://alpatrick.blogspot.com/2005/01/automatically-detect-all-memory-leaks.html' title='Automatically detect all memory leaks at compile time?'/><author><name>Alastair Patrick</name><uri>http://www.blogger.com/profile/08547818719982201304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9582144.post-110490125262735292</id><published>2005-01-04T20:19:00.000-08:00</published><updated>2005-01-05T07:51:33.596-08:00</updated><title type='text'>Improving code turnaround time</title><summary type="text">I have been using refactoring, as described in Martin Fowler&#39;s excellent book, for a couple of years now and found that it has improved my productivity and the quality of my code considerably. One of the basic requirements of refactoring is that you must be do it incrementally. That is, after each individual change, you must build and test your code, ideally using automated tests. I will call the</summary><link rel='replies' type='application/atom+xml' href='http://alpatrick.blogspot.com/feeds/110490125262735292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9582144/110490125262735292' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110490125262735292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110490125262735292'/><link rel='alternate' type='text/html' href='http://alpatrick.blogspot.com/2005/01/improving-code-turnaround-time.html' title='Improving code turnaround time'/><author><name>Alastair Patrick</name><uri>http://www.blogger.com/profile/08547818719982201304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9582144.post-110465347034144539</id><published>2005-01-01T23:42:00.000-08:00</published><updated>2005-01-02T00:13:55.230-08:00</updated><title type='text'>Diagnostics traces</title><summary type="text">Here is a common and useful debugging technique:void foo(int a, double b){  printf(&quot;Enters %s/%d foo(%d, %f)&quot;, __FILE__, __LINE__, a, b);  // do stuff  printf(&quot;Exits %s/%d foo(%d, %f)&quot;, __FILE__, __LINE__, a, b);}Sometimes we need a picture of what the program is doing that cannot be determined by using debugging techniques like breakpoints or stepping through code. For example, we might </summary><link rel='replies' type='application/atom+xml' href='http://alpatrick.blogspot.com/feeds/110465347034144539/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9582144/110465347034144539' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110465347034144539'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110465347034144539'/><link rel='alternate' type='text/html' href='http://alpatrick.blogspot.com/2005/01/diagnostics-traces.html' title='Diagnostics traces'/><author><name>Alastair Patrick</name><uri>http://www.blogger.com/profile/08547818719982201304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9582144.post-110462869443817078</id><published>2005-01-01T16:59:00.000-08:00</published><updated>2005-01-01T19:38:30.493-08:00</updated><title type='text'>Euclid&#39;s algorithm</title><summary type="text">Today I worked on making the code generated by my translator a little less verbose. My strategy was to try and reconstruct the original C# expressions by analyzing the stack operations carried out by the IL assembly. This turned out to be quite straightforward.  The main complication was aliasing. Unlike Java byte-code, MSIL byte-code permits variables to be aliased. I worked around this by only </summary><link rel='replies' type='application/atom+xml' href='http://alpatrick.blogspot.com/feeds/110462869443817078/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9582144/110462869443817078' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110462869443817078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9582144/posts/default/110462869443817078'/><link rel='alternate' type='text/html' href='http://alpatrick.blogspot.com/2005/01/euclids-algorithm.html' title='Euclid&#39;s algorithm'/><author><name>Alastair Patrick</name><uri>http://www.blogger.com/profile/08547818719982201304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>