<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Steven Houben</title>
	<atom:link href="http://anxma.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://anxma.com</link>
	<description>Steven Houben - PhD Student Human-Computer Interaction</description>
	<lastBuildDate>Sat, 19 May 2012 10:05:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>HCI in practice!</title>
		<link>http://anxma.com/index.php/hci-in-practice/</link>
		<comments>http://anxma.com/index.php/hci-in-practice/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 09:26:33 +0000</pubDate>
		<dc:creator>Steven Houben</dc:creator>
				<category><![CDATA[HCI]]></category>
		<category><![CDATA[Copenhagen]]></category>
		<category><![CDATA[Hard rock cafe Hollywood]]></category>
		<category><![CDATA[HCI practice]]></category>
		<category><![CDATA[HCI real world]]></category>

		<guid isPermaLink="false">http://anxma.com/?p=1218</guid>
		<description><![CDATA[So, I have had the opportunity to travel a lot lately and during my travels to Los Angeles and Copenhagen I saw some cool HCI-related stuff in practice. Copenhagen The museum of Copenhagen [1] placed a 12 meter long interactive multitouch screen on Kongens Nytorv &#8230; <a href="http://anxma.com/index.php/hci-in-practice/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So, I have had the opportunity to travel a lot lately and during my travels to Los Angeles and Copenhagen I saw some cool HCI-related stuff in practice.</p>
<h2>Copenhagen</h2>
<p>The museum of Copenhagen [<a href=" http://www.copenhagen.dk/en/">1</a>] placed a 12 meter long interactive multitouch screen on Kongens Nytorv (King&#8217;s New Square) that allows passers to quickly browse the history of the square. This interactive wall is connected to the database of the museum, allowing users to interact with their information repository. The interaction is a strange 3D/ isometric system that you can use to zoom in on specific parts of the square or to move to another time. You can focus on specific images of information and even send it to your email address. A very cool and interactive way to get more people interested in the history of the square and Copenhagen in general.</p>
<p><a href="http://blog.anxma.com/wp-content/uploads/IMG_0019.jpg"><img class="alignright size-full wp-image-1219" title="IMG_0019" src="http://blog.anxma.com/wp-content/uploads/IMG_0019.jpg" alt="" width="960" height="720" /></a></p>
<p>To get a better idea of the full functionality of the setup, visit their website are [<a href="http://www.copenhagen.dk/en/whats_on/the_wall/">2</a>] or check out this youtube video:</p>
<p><a href="http://anxma.com/index.php/hci-in-practice/"><em>Click here to view the embedded video.</em></a></p>
<h2>Los Angeles</h2>
<p>While we visited the crazy city of Los Angeles, we (as typical tourists) visited the Hard Rock Café in both Hollywood [<a href="http://www.hardrock.com/locations/cafes3/cafe.aspx?LocationID=559&amp;MIBenumID=3">3</a>] and Universal City [<a href="http://www.hardrock.com/locations/cafes3/cafe.aspx?locationid=559&amp;mibenumid=3">4</a>]. To my surprise they had some really cool HCI stuff in their cafes. First of all, when entering the cafe, there is a very large multi-touch and user display that allows several users to interact with memorabilia. Each user is dynamically given a workspace that he can use to interact with the information that is pulled straight of the memorabilia website of Hard Rock [<a href="http://memorabilia.hardrock.com/">5</a>].</p>
<p><a href="http://blog.anxma.com/wp-content/uploads/IMAG0177.jpg"><img class="alignright size-full wp-image-1221" title="IMAG0177" src="http://blog.anxma.com/wp-content/uploads/IMAG0177.jpg" alt="" width="1280" height="960" /></a></p>
<p>For more information check the youtube video:</p>
<p><a href="http://anxma.com/index.php/hci-in-practice/"><em>Click here to view the embedded video.</em></a></p>
<p>Next, they also installed a small touch screen next to each table. This screen could be used to check out local memorabilia, other cafes and hotels and to vote on the video/music that you want to hear (as they constantly play music videos on tv screens). Although at the moment, it cannot be used to order drinks and foods, the bartender actually hoped (an thought) that this would be possible very soon.</p>
<p><img class="aligncenter size-full wp-image-1222" title="IMAG0242" src="http://blog.anxma.com/wp-content/uploads/IMAG0242.jpg" alt="" width="1280" height="960" /></p>
<p>Finally, I noticed that they had several Microsoft Surfaces that could also be used to check out memorabilia or play games with your table mates.</p>
<p><img class="aligncenter size-full wp-image-1223" title="IMAG0134" src="http://blog.anxma.com/wp-content/uploads/IMAG0134.jpg" alt="" width="2592" height="1952" />Check out this youtube video for more information of the functionality:</p>
<p><a href="http://anxma.com/index.php/hci-in-practice/"><em>Click here to view the embedded video.</em></a></p>
<p>&nbsp;</p>
<p>out.</p>
]]></content:encoded>
			<wfw:commentRss>http://anxma.com/index.php/hci-in-practice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Activity-centered vs User-centered design</title>
		<link>http://anxma.com/index.php/activity-centered-vs-user-centered-design/</link>
		<comments>http://anxma.com/index.php/activity-centered-vs-user-centered-design/#comments</comments>
		<pubDate>Thu, 24 Feb 2011 17:28:54 +0000</pubDate>
		<dc:creator>Steven Houben</dc:creator>
				<category><![CDATA[HCI]]></category>
		<category><![CDATA[Activity Theory]]></category>
		<category><![CDATA[Activity-Based Computing]]></category>
		<category><![CDATA[Activity-centered vs User-centered design]]></category>
		<category><![CDATA[Norman]]></category>

		<guid isPermaLink="false">http://anxma.com/?p=1155</guid>
		<description><![CDATA[In 2005 Donald Norman [1], an icon in the world of Interaction Design and usability, wrote a controversial column called Human-Centered Design Considered Harmful [2] for the juli/august edition of Interactions Magazine [3]. In this column, he describes how an overly focused &#8230; <a href="http://anxma.com/index.php/activity-centered-vs-user-centered-design/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In 2005 Donald Norman [1], an icon in the world of Interaction Design and usability, wrote a controversial column called<em> Human-Centered Design Considered Harmful</em> [2] for the juli/august edition of Interactions Magazine [3]. In this column, he describes how an overly focused user-centered approach may eventually provide problems and become harmful.</p>
<h2>Activity-Centered vs User-Centered</h2>
<p>A first problem of the application of user-centered design (UCD) mentioned by Norman, is the potential of a duality between very usable versus not usable within the same goal audience. The more something is designed around the specific needs of certain users, the more it will be unusable to others. An second problem is the danger of an ad hoc focus instead of an anticipating approach. Norman claims that the usage proficiency that evolves from the successfulness of a product might force users to move beyond the product. Finally, the focus on users downplays the activities that the users are going to perform by using the product. This may result in an overly complex product that tries to comply to a users objectification of work, which is in fact by definition a collection of overlapping activities.</p>
<p>An alternative to user-centered design (UCD) is activity-centered design (ACD). This is an approach that does not focus on the user or his tasks but on the activities of a user. This approach can, according to Norman, be theorized in the form of activity theory [4]. Although this approach might seem novel, most products and designs of the last 1000 years were designed around the activity of users. This is why products such as a car, musical instruments and many other artificial devices are that successful. They were designed to excel in one specific activity. The main goal of activity-centric design is to achieve that users understand the activity they can perform with the design rather than the intension of the designer.</p>
<p>The fundamental difference between these two approaches is that, although they are similar in many ways, UCD defines the activity by the design of the tool rather than allowing the user to engage in an activity by using the tool. From this differentiation the following question is distilled: should the user or the technology adapt? Norman concludes by saying: &#8220;<em>To the Human-Centered Design community, the tool should be invisible, it should not get in the way. With Activity-Centered Design, the tool is the way.</em>&#8221;</p>
<p><span style="color: #000000; font-size: 23px; line-height: 35px;">Discussion</span></p>
<p>Although Norman makes as excellent point on the potential danger of an effusive application of user-centered design, I feel that the differentiation between UCD and ACD is a bit enlarged: it is perhaps not be as big as Norman tries to convey.</p>
<p>First of all, I believe there is a natural transgression between UCD and ACD when designing an Interaction Design system, especially when it is informed by activity theory. Although the term &#8216;<em>activity</em>&#8216; might seem to refer to an atomic task or action, this is definitely not the case. Activities as defined by activity theory are very rich, broad and comprehensive descriptions of the users intent. The complexity and natural interrelation between human activities that are engaged when using a product or design forces designers to take into account both the user as well as the activities the user is doing.</p>
<p>Another important consideration of the focus on an activity-centered design that is informed by activity theory, is that a computer or other interactive media cannot be compared to other more traditional tools such as cars or musical instruments. Because they are information processing tools that are used to attain a myriad of goals rather than one primary goal, they are not necessarily part of the activity but can also be used to drive or engage in activities. Kaptelinin [5] referred to the latter relation between (activity theory informed) human activity and computers as Computer-Mediated Activity. This reasoning refutes some of the apparent differentiations between UCD and ACD that are implied by Norman.</p>
<p>In conclusion, I feel the differentiation between both approaches is not as big as appears from Norman&#8217;s column, that frames in a recent trend to promote activity-based computing. Rather than replacing one approach with another, I think that extending the currently widely adopted user-centered design with an activity theory informed notion of the activities of users will vastly improve the quality of future Interaction Design systems.</p>
<p><span style="color: #000000; font-size: 23px; line-height: 35px;">References</span></p>
<p>[1] Donald Norman, <a href="http://www.jnd.org/jnd.html">http://www.jnd.org/jnd.html<br />
</a>[2] Human-Centered Design Considered Harmful, <a href="http://www.jnd.org/dn.mss/human-centered.html"></a><a href="http://srl.csdl.tamu.edu/courses/CHI2009/assignments/data/Harmful-norman.pdf">http://srl.csdl.tamu.edu/courses/CHI2009/assignments/data/Harmful-norman.pdf</a><br />
[3] Interactions Magazine, <a href="http://interactions.acm.org/">http://interactions.acm.org/<br />
</a>[4] Activity Theory Overview, <a href="http://carbon.ucdenver.edu/~mryder/itc/activity.html">http://carbon.ucdenver.edu/~mryder/itc/activity.html</a><br />
[5] Kaptelinin, Computer-Mediated Activity: Functional Organs in Social and Developmental Contexts  <a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.87.9044&amp;rep=rep1&amp;type=pdf">http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.87.9044&amp;rep=rep1&amp;type=pdf</a></p>
]]></content:encoded>
			<wfw:commentRss>http://anxma.com/index.php/activity-centered-vs-user-centered-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Applying Fitts&#8217; Law to an Interaction Design System</title>
		<link>http://anxma.com/index.php/applying-fitts-law-to-an-interaction-design-system/</link>
		<comments>http://anxma.com/index.php/applying-fitts-law-to-an-interaction-design-system/#comments</comments>
		<pubDate>Mon, 21 Feb 2011 23:58:08 +0000</pubDate>
		<dc:creator>Steven Houben</dc:creator>
				<category><![CDATA[HCI]]></category>
		<category><![CDATA[co-Activity Manager]]></category>
		<category><![CDATA[Fitts' law]]></category>
		<category><![CDATA[Start Menu]]></category>

		<guid isPermaLink="false">http://anxma.com/?p=1135</guid>
		<description><![CDATA[The interaction design system I developed for my master&#8217;s thesis [1] required me to duplicate the standard Windows taskbar. When (informally) testing the prototype application of this thesis, one of my fellow students mentioned that I should consider creating a &#8216;Fitts&#8217; law informed&#8217; start button. &#8230; <a href="http://anxma.com/index.php/applying-fitts-law-to-an-interaction-design-system/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The interaction design system I developed for my master&#8217;s thesis [1] required me to duplicate the standard Windows taskbar. When (informally) testing the <a href="http://am.anxma.com">prototype application</a> of this thesis, one of my fellow students mentioned that I should consider creating a &#8216;Fitts&#8217; law informed&#8217; start button. I myself had never noticed that you do not need to actually press the start button (of Windows 7) inside the circular area to launch the start menu. If you miss it with a few pixels in all directions, it launches anyway. Since this is easy to implement I decided to add this support.</p>
<h2>Fitts&#8217; Law</h2>
<p>For those who have never heard of Fitts&#8217; law [2], it basically describes the relation between distance, size and speed of movement. Mathematically, the movement time (T) can be modeled as the sum of device independent but through observation defined constants a &amp; b times the amplitude or distance to the target divided by the width of the target along the movement axis. a is defined as the start and stop time while b is the slope (log scale) that defines the speed of the device.</p>
<p><img class="alignnone" src="http://upload.wikimedia.org/math/e/7/e/e7e6cee6e7664d150f8db606c7f6fc02.png" alt="" width="204" height="51" /></p>
<p>In a nutshell, it means that nearby large objects are easier to hit than small objects that are far away. In context of the start button, this means that we can expand the hit space to enlarge the target area resulting in an increased hit rate and in general better usability of the system. Because the start button is located in a corner of the screen, you can &#8220;throw&#8221; your mouse in the corner and &#8220;click&#8221; to launch the start menu. In my implementation this area was extended to the red rectangle you can see in the image, and the start button was located in the upper left corner of the screen.</p>
<p><img class="alignnone size-full wp-image-1140" title="hit" src="http://blog.anxma.com/wp-content/uploads/hit.png" alt="" width="230" height="38" /></p>
<p>For the initial validation of this system, we performed a first use field study with two participants. In the semi-structural interviews that were done afterwards, none of the participants referred to this specific implementation. They simply argued that they liked using the system.</p>
<p>Since I was curious about the hit rate I added some logging code to the application to check the hit rate on the circular button as well as the rectangle extension area. Unfortunately, both test users preferred not to be logged (as we also log many other things and they were using the system on their main machine). In the next study on this application, which will probably be  lab study, we can hopefully use the logger to get some significant data on this issue.</p>
<p>As an alternative I have used the application myself on 6 separate occasions and logged (or measured) the hits on the actual circular button and rectangular extension area. I myself was very surprised with the results:<br />
<img class="aligncenter size-full wp-image-1142" title="graph" src="http://blog.anxma.com/wp-content/uploads/graph.png" alt="" width="464" height="275" /></p>
<p>It is amazing that I only hit the actual circular button lesser than 30% of the times. This means that if I did not implement the extended area I would have missed the button about 70% of the times I attempted to launch the start menu (I&#8217;m ignoring learning curves etc. here).</p>
<p>Although this data is not very significant or valuable, it does however demonstrate the potential value of considering things such as Fitts&#8217; law or other psychological analysis of information processing or motor skills.</p>
<h2>References</h2>
<p>[1] Steven Houben, Activity Theory Applied to the Desktop Metaphor <span style="line-height: 1.5; border-style: initial; border-color: initial;"><a href="http://steven.anxma.com/stevenHoubenthesis.pdf"><img class="alignnone size-full wp-image-1139" style="font-family: Georgia, 'Bitstream Charter', serif; color: #444444; line-height: 1.5; max-width: 640px; margin: 0px; border: 0px initial initial;" title="link" src="http://blog.anxma.com/wp-content/uploads/link1.png" alt="" width="16" height="16" /></a></span><br />
[2] P. M. Fitts. The information capacity of the human motor system in controlling the amplitude of movement. J Exp Psychol, 47(6):381391, June 1954 <a href="http://citeseerx.ist.psu.edu/viewdoc/download;jsessionid=2B48F88007A9F244F07733721F344E33?doi=10.1.1.114.6753&amp;rep=rep1&amp;type=pdf"><img class="alignnone size-full wp-image-1139" title="link" src="http://blog.anxma.com/wp-content/uploads/link1.png" alt="" width="16" height="16" /></a></p>
<p><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; line-height: 19px;"> </span></p>
]]></content:encoded>
			<wfw:commentRss>http://anxma.com/index.php/applying-fitts-law-to-an-interaction-design-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C# Event</title>
		<link>http://anxma.com/index.php/c-event-2/</link>
		<comments>http://anxma.com/index.php/c-event-2/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 09:40:46 +0000</pubDate>
		<dc:creator>Steven Houben</dc:creator>
				<category><![CDATA[Software & Programming]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[custom event]]></category>
		<category><![CDATA[delegate]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[events]]></category>

		<guid isPermaLink="false">http://blog.anxma.com/?p=838</guid>
		<description><![CDATA[Most people can use the standard events that are build-in most objects in the .Net framework. Visual Studio and MonoDevelop provide  both a very simple interface to create, edit, delete or change events. These interfaces hide the logic behind the &#8230; <a href="http://anxma.com/index.php/c-event-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Most people can use the standard events that are build-in most objects in the .Net framework. Visual Studio and MonoDevelop provide  both a very simple interface to create, edit, delete or change events. These interfaces hide the logic behind the event  for the programmer. This is fine for most situations but when confronted with custom events, the problems start. In this blogpost I am demonstrating and explaining how you can create a custom event.</p>
<h2>Event?</h2>
<p>An event is a notification message that is send from one object to another object. It is used to notify an other object about the changed state of the object. Lets use an example to explain the context of events. Image we have a class called <em>Main</em>, that holds the application logic. In this  Main class we want to use a parser, a xml analyzer for example. We declare a new instance of the object Parser by using a piece of code that could look like this:</p>
<pre class="c#" name="code">Parser parser = new Parser();</pre>
<p>We can now access the parser class from the main class by using its methods and properties. We could for example call the method parse and set the property TimeOutTime:</p>
<pre name="code" class="c#" name="code">
parser.parse(data);
parser.TimeOutTime = 2;</pre>
<p>In figure 1 you can see a conceptual representation of this process. The down arrow demonstrates this instantiation and use of methods and properties. If we would send some raw data to the parser in order to change something in our main class, it would be nice that the parser can send back the result of the parse method. One way could be to add a return type to the parse method. This can be efficient in some situations but when timing, or threading are an issue this may not work well. We could perhaps let the Parser class create an instance of the main class, so we can use the methods and properties of the main class to update it. The latter wont work because the new instance is not the same as the existing instance that created the parser class in the first place. Although both instances are of the same object, they are not the same. Another issue that may be of concern is the fact that the parse class doesn&#8217;t really need to know anything about the main class. It simply wants to process data and output the result. With the usage of an event the parse class can simply send a Parsed message when the parsing is done. In figure 1 you can see this process. The Parser class simply sends a Parsed event when it is done parsing. This  instantiation of Class B by Class A and the usage of an event to notify class A should make clear that Class A uses Class B but Class B has in fact no knowledge about Class A, it is simply used by Class A. This is called Loose Coupling [1].</p>
<div class="wp-caption aligncenter" style="width: 559px"><img title="Conceptual Event Model" src="http://blog.anxma.com/img/event.png" alt="" width="549" height="190" /><p class="wp-caption-text">Fig 1: Conceptual event model</p></div>
<p style="text-align: center;">
<h2>Event in C# (.Net)</h2>
<p>To create a custom event in .net we need three components: a delegate [2], an event arguments class and the event. We will use the example of the Main class and the Parse class to demonstrate how to implement an event in c#. You can find the complete class files at the bottom of the page.</p>
<p>It is not necessary to have a deep understanding of a delegate. Simply remember that a delegate is basically a type-safe pointer that points to a specific memory address. A delegate is used as a point where you can hook your event on ( a callback function). An event is actually an instance of a delegate. The delegate is a static point that links your event message from one class to an other class.</p>
<p>So, first of all we need to create a delegate outside (!) all classes. You typically do this at the top of your code file inside the namespace but outside(!!) the class. In our example we are creating an event for the Parser class so we will put the delegate in this file but outside(!!!) the class.</p>
<pre class="c#" name="code">public delegate void ParserHandler(Object obj, ParserEventArgs e);</pre>
<p>We named our delegate ParserHandler, as it is going to handle parser events. The arguments for our delegate are an object and a ParserEventArgs class. We will use the object so we can check what instance has send the event. The ParserEventArgs doesn&#8217;t exist so we need to make it.</p>
<p>Any event arguments class holds information about the state of the object. This class is the actual message or notification we are sending to another class. In this case we want to send a result back to another class. There are two ways we can do this:</p>
<ol>
<li>First of all we could create an empty EventArgs  class. When an event is send the Main class will receive an empty event message. This may seem not seem very useful but we could use this event as a trigger to retrieve information. The parse could have a property Result. When we receive this empty message we know that the Result property is updated with the new result and we can retrieve it by using the property.</li>
<li>Secondly we can put the result into the EventArgs and send it over. When the main class receives the message we can find the result inside the message</li>
</ol>
<p>Iin this example we are using the second method. We need to create a new class ParserEventArgs that hold a Object field and a Result field:</p>
<pre class="c#" name="code">  public class ParserEventArgs
    {
        public string Result { get; set; }
        public Object Object { get; set; }
        public ParserEventArgs() { }
        public ParserEventArgs(Object obj, string result)
        {
            this.Result = result;
            this.Object = obj;
        }
    }</pre>
<p>Now that we&#8217;ve got our delegate and our ParseEventArgs class, it is time to implement our event. First of all we need to create our event:</p>
<pre class="c#" name="code"> public event ParserHandler parserEventHandler = null;</pre>
<p>Place this event inside the Parser class. Next we are going to wrap this event for simplicity and to make sure the event is never null.</p>
<pre class="c#" name="code"> protected void OnParseEvent(ParserEventArgs e)
        {
            if (parserEventHandler != null)
            {
                parserEventHandler(this, e);
            }
        }</pre>
<p>If we now want to send the event, in this case when the parsing is done, we simply need to call the OnParseEvent method:</p>
<pre class="c#" name="code"> public void Parse(Object rawdata)
        {
            //parse code here
            string result = "ParsedData";

            OnParseEvent(new ParserEventArgs(this, result));
        }</pre>
<p>The Parser class is now modified to send an event when the parse function is done. We can now use this in our main class:</p>
<pre class="c#" name="code">>class Main
    {
        Parser parser = new Parser();
        public Main()
        {
            parser.parserEventHandler += new ParserHandler(parser_Parsed);
            parser.Parse("RAWDATA");
        }
        private void parser_Parsed(object sender, ParserEventArgs e)
        {
            string result = e.Result;
        }
    }</pre>
<p>This may seem familiar as this code is basically what the IDE generate when you use a standard event. In the main class we create a parser object. In the constructor we hook an event listener to this and call the parse method. When the raw data is parsed the parsed object sends a Parsed event that we are catching with our handler.</p>
<p>The complete Parser class:</p>
<pre class="c#" name="code">namespace Parser
    {
        public delegate void ParserHandler(Object obj, ParserEventArgs e);
        public class Parser
        {
            public event ParserHandler parserEventHandler = null;

            public void Parse(Object rawdata)
            {
                //parse code here
                string result = "ParsedData";

                OnParseEvent(new ParserEventArgs(this, result));
            }
            protected void OnParseEvent(ParserEventArgs e)
            {
                if (parserEventHandler != null)
                {
                    parserEventHandler(this, e);
                }
            }
        }
        public class ParserEventArgs
        {
            public string Result { get; set; }
            public Object Object { get; set; }
            public ParserEventArgs() { }
            public ParserEventArgs(Object obj, string result)
            {
                this.Result = result;
                this.Object = obj;
            }
        }
    }</pre>
<p><strong>References</strong></p>
<p>[1] Loose Coupling, <a href="http://en.wikipedia.org/wiki/Loose_coupling">http://en.wikipedia.org/wiki/Loose_coupling</a></p>
<p>[2] Delegate, <a href="http://en.wikipedia.org/wiki/Delegate_(.NET)">http://en.wikipedia.org/wiki/Delegate_(.NET)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://anxma.com/index.php/c-event-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pilers, filers and tossers vs desktop</title>
		<link>http://am.anxma.com/?page_id=15</link>
		<comments>http://am.anxma.com/?page_id=15#comments</comments>
		<pubDate>Thu, 21 Jan 2010 08:45:03 +0000</pubDate>
		<dc:creator>Steven Houben</dc:creator>
				<category><![CDATA[HCI]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[Desktop metaphor]]></category>
		<category><![CDATA[filer]]></category>
		<category><![CDATA[Piler]]></category>
		<category><![CDATA[tosse]]></category>

		<guid isPermaLink="false">http://anxma.com/blog/?p=777</guid>
		<description><![CDATA[Moved to http://am.anxma.com/?page_id=15]]></description>
			<content:encoded><![CDATA[<p>Moved to <a href="http://am.anxma.com/?page_id=15">http://am.anxma.com/?page_id=15</a></p>
]]></content:encoded>
			<wfw:commentRss>http://am.anxma.com/?page_id=15/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>10/GUI</title>
		<link>http://anxma.com/index.php/10gui/</link>
		<comments>http://anxma.com/index.php/10gui/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 19:56:05 +0000</pubDate>
		<dc:creator>Steven Houben</dc:creator>
				<category><![CDATA[HCI]]></category>
		<category><![CDATA[Desktop Interaction]]></category>
		<category><![CDATA[Desktop metaphor]]></category>
		<category><![CDATA[dfdf]]></category>

		<guid isPermaLink="false">http://anxma.com/blog/?p=650</guid>
		<description><![CDATA[10/GUI [1] is a (summer) project started by R. Clayton Miller. In this video he examines the benefits and limitations inherent in current mouse-based and window-oriented interfaces, the problems facing other potential solutions, and visualizes his proposal for a completely new way &#8230; <a href="http://anxma.com/index.php/10gui/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>10/GUI [1] is a (summer) project started by R. Clayton Miller. In this video he examines the benefits and limitations inherent in current mouse-based and window-oriented interfaces, the problems facing other potential solutions, and visualizes his proposal for a completely new way of interacting with desktop computers. His proposal isn&#8217;t based on scientific data or relevant research but is the vision of the author himself, who is a graphical designer.</p>
<p>It is however nice to see that even beyond the Computer Science /  Human-Computer Interaction community people are realizing that the current implementation of the desktop interaction is to limited for many modern tasks or activities .</p>
<h2><span style="font-weight: normal;"><strong>The Video</strong></span></h2>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="525" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/zWz1KbknIZk" /><embed type="application/x-shockwave-flash" width="525" height="350" src="http://www.youtube.com/v/zWz1KbknIZk"></embed></object></p>
<h2><span style="font-weight: normal;"><strong>References</strong></span></h2>
<p>[1] <a href="http://10gui.com/">http://10gui.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://anxma.com/index.php/10gui/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>c# Drag and Drop &#8211; Shape manipulation Part 3: A Reusable Visual Designer / Code Editor</title>
		<link>http://anxma.com/index.php/c-drag-and-drop-shape-manipulation-part-3-a-reusable-visual-designer-code-editor/</link>
		<comments>http://anxma.com/index.php/c-drag-and-drop-shape-manipulation-part-3-a-reusable-visual-designer-code-editor/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 21:41:01 +0000</pubDate>
		<dc:creator>Steven Houben</dc:creator>
				<category><![CDATA[Software & Programming]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[drag and drop]]></category>
		<category><![CDATA[Orbis]]></category>
		<category><![CDATA[syntax editor]]></category>
		<category><![CDATA[visual designer]]></category>
		<category><![CDATA[visual editor]]></category>

		<guid isPermaLink="false">http://anxma.com/blog/?p=488</guid>
		<description><![CDATA[I have been working for a while on 2 big projects. First of all we have my pet project Orbis [1] which is a open source  multi  purpose IDE .  Among it&#8217;s features it supports docking (based upon the legendary library of &#8230; <a href="http://anxma.com/index.php/c-drag-and-drop-shape-manipulation-part-3-a-reusable-visual-designer-code-editor/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have been working for a while on 2 big projects. First of all we have my pet project <strong>Orbis </strong> [<a href="http://anxma.com/blog/?s=orbis">1</a>] which is a open source  multi  purpose IDE .  Among it&#8217;s features it supports docking (based upon the legendary library of Weifen Luo),  an advanced Syntax Editor (based on the library of Roger Alsing), file management and a custom build plug in structure.</p>
<p>The second project I am working on is based around <strong>visual object manipulation</strong>[<a href="http://anxma.com/blog/?s=drag+and+drop">2</a>]. The idea was to write an article for Codeproject about visual manipulation of polygons and other shapes in 2D space. This project  includes: a custom build drawing canvas (rectangles, polygons, ellipses,&#8230;), direct manipulation for drawn objects, selection and deselection of drawn objects, basically :visual representation of context or data.</p>
<p>I recently decided to combine both projects and build a reusable .net component that provides a generic syntax editor + visual designer. There is still a lot of work to do before I can even release a alpha test version but I am putting most of my free time in this project. The idea is to supply a workspace containing :</p>
<ul>
<li>An advanced syntax editor (based on the editor of Roger Alsing). (90% done)
<ul>
<li>Custom properties/events</li>
<li>Syntax Highlighting</li>
<li>Marks (EOL/white spaces/&#8230;)</li>
<li>File management (IO/ FTP/&#8230;)</li>
<li>State management</li>
<li>&#8230;.</li>
</ul>
</li>
<li>Visual Designer (build from scratch) (75% done)
<ul>
<li>custom events/properties</li>
<li>fully customizable design space
<ul>
<li>drawing canvas</li>
<li>grid</li>
<li>rulers</li>
<li>shape renderer</li>
</ul>
</li>
<li>toolbars (standard manipulation)</li>
<li>advanced graphics object for custom drawing</li>
<li>object manager</li>
<li>custom file types</li>
</ul>
</li>
<li>Visual Code Framework (10%)
<ul>
<li>customizable code &lt;=&gt; design parser based on XML templates</li>
<li>&#8230;</li>
</ul>
</li>
</ul>
<p>Here&#8217;s a new quick preview of the Orbis Visual Designer Component:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/DgAqyYO20nY&amp;feature" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/DgAqyYO20nY&amp;feature"></embed></object></p>
<p style="text-align: left;">
]]></content:encoded>
			<wfw:commentRss>http://anxma.com/index.php/c-drag-and-drop-shape-manipulation-part-3-a-reusable-visual-designer-code-editor/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>c# Drag and Drop &#8211;  Shape manipulation Part 2</title>
		<link>http://anxma.com/index.php/c-drag-and-drop-shape-manipulation-part-2/</link>
		<comments>http://anxma.com/index.php/c-drag-and-drop-shape-manipulation-part-2/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 19:45:45 +0000</pubDate>
		<dc:creator>Steven Houben</dc:creator>
				<category><![CDATA[Software & Programming]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[drag and drop]]></category>
		<category><![CDATA[shape manipulation]]></category>

		<guid isPermaLink="false">http://anxma.com/blog/?p=457</guid>
		<description><![CDATA[Development (and article writing) isn&#8217;t going as fast as I would like as I am reading a lot of papers from university courses most of my free time. As I already stated in my previous post [1], I am currently &#8230; <a href="http://anxma.com/index.php/c-drag-and-drop-shape-manipulation-part-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Development (and article writing) isn&#8217;t going as fast as I would like as I am reading a lot of papers from university courses most of my free time.</p>
<p>As I already stated in my previous post [<a href="http://anxma.com/blog/index.php/2009/09/15/c-drag-and-drop-shape-manipulation/">1</a>], I am currently working on an article about object manipulation which I want to submit on codeproject.com in the near future. It is still work in progress as I am adding features and exploring new possibilities. I would like to show you a second preview with extended functionalities as:</p>
<ul>
<li>Object selection/deselection</li>
<li>Dynamically addition and removal of points  (as a polygon = collection of points)</li>
<li>Z-index</li>
<li>Object transformation by direct manipulation</li>
</ul>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/KrbvPZSwD2Y" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/KrbvPZSwD2Y"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://anxma.com/index.php/c-drag-and-drop-shape-manipulation-part-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>c# Drag and Drop &#8211;  Shape manipulation Part 1</title>
		<link>http://anxma.com/index.php/c-drag-and-drop-shape-manipulation/</link>
		<comments>http://anxma.com/index.php/c-drag-and-drop-shape-manipulation/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 12:56:20 +0000</pubDate>
		<dc:creator>Steven Houben</dc:creator>
				<category><![CDATA[Software & Programming]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[drag and drop]]></category>
		<category><![CDATA[shape manipulation]]></category>

		<guid isPermaLink="false">http://anxma.com/blog/?p=450</guid>
		<description><![CDATA[I haven&#8217;t posted anything in a while as I am working on an article which I want to submit on codeproject.com in the near future. The basic idea behind the article is to demonstrate how to modify any shape in &#8230; <a href="http://anxma.com/index.php/c-drag-and-drop-shape-manipulation/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t posted anything in a while as I am working on an article which I want to submit on codeproject.com in the near future.</p>
<p>The basic idea behind the article is to demonstrate how to modify any shape in order to support drag and drop and direct manipulation. These functions can be usefull in any application that supports visual editing. (FE: Flash designer /Visual studio toolbox drag- drop/ Paint application) I am still figuring out some difficult issues but here&#8217;s a quick preview that demonstrates &#8216;drag and drop&#8217; and &#8216;direct manipulation&#8217;.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/x1IYlH6iLAQ" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/x1IYlH6iLAQ"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://anxma.com/index.php/c-drag-and-drop-shape-manipulation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mono Console</title>
		<link>http://anxma.com/index.php/mono-console/</link>
		<comments>http://anxma.com/index.php/mono-console/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 14:05:43 +0000</pubDate>
		<dc:creator>Steven Houben</dc:creator>
				<category><![CDATA[Software & Programming]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[Console.ReadLine();]]></category>
		<category><![CDATA[dotnet]]></category>
		<category><![CDATA[Mono]]></category>
		<category><![CDATA[Mono Console.ReadLine()]]></category>

		<guid isPermaLink="false">http://anxma.com/blog/?p=379</guid>
		<description><![CDATA[When running a console application on Mono the following piece of code doesn&#8217;t work: String str = Console.ReadLine(); The application skips this line which can lead to errors as the string is  empty. Reason This error is no bug in Mono &#8230; <a href="http://anxma.com/index.php/mono-console/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When running a console application on Mono the following piece of code doesn&#8217;t work:</p>
<pre class="c#" name="code">String str = Console.ReadLine();</pre>
<p>The application skips this line which can lead to errors as the string is  empty. <strong></strong></p>
<h2>Reason</h2>
<ul></ul>
<p>This error is no bug in Mono but when you run a console application in MonoDevelop the application outputs all the console related actions[1] to a build in pseudo-console. This console is no &#8216;real&#8217; console and I cannot handle any advanced action like input etc.</p>
<p>[1]</p>
<pre class="c#" name="code">Console.ReadLine();
Console.Read();
Console.WriteLine();
Console.Write();
Console.Clear();
...</pre>
<h2>Solution</h2>
<ul></ul>
<p>The only solution to fix this problem is to execute the console application in the (real) Linux console. You can do this by changing a property in the Project properties &gt; Run &gt; General &gt; Run on External Console [true|false]</p>
<p><a href="http://anxma.com/blog/img/mono_scr.png"><img class="aligncenter" title="Mono projec properties" src="http://anxma.com/blog/img/mono_scr.png" alt="" width="451" height="263" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://anxma.com/index.php/mono-console/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Process Synchronization II: Posix Semaphores (Pthread)</title>
		<link>http://anxma.com/index.php/process-synchronization-ii-posix-semaphores-pthread/</link>
		<comments>http://anxma.com/index.php/process-synchronization-ii-posix-semaphores-pthread/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 13:44:02 +0000</pubDate>
		<dc:creator>Steven Houben</dc:creator>
				<category><![CDATA[Software & Programming]]></category>
		<category><![CDATA[C++/C]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Process Synchronization]]></category>
		<category><![CDATA[pthread]]></category>
		<category><![CDATA[Semaphores]]></category>

		<guid isPermaLink="false">http://anxma.com/anti/?p=120</guid>
		<description><![CDATA[A solution in C/C++ to the producer consumer problem using Posix threads (pthread) and semaphores. I assumed that there is only one producer and one consumer: #include pthread.h #include stdio.h #include /usr/include/semaphore.h #include iostream //!!!All of the above includes need &#8230; <a href="http://anxma.com/index.php/process-synchronization-ii-posix-semaphores-pthread/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A solution in  C/C++ to the producer  consumer problem using <a href="http://www.csc.villanova.edu/~mdamian/threads/posixsem.html" target="_blank">Posix threads</a> (pthread) and <a href="http://anxma.com/anti/?p=112" target="_blank">semaphores</a>. I assumed  that there is only one producer and one consumer:</p>
<pre name="code" class="c">#include  pthread.h
#include stdio.h
#include /usr/include/semaphore.h
#include iostream

//!!!All of the above includes need &lt;..&gt;

using namespace std;

#define BUFF_SIZE 4

//Shared buffer
char buffer[BUFF_SIZE];

//Index values
int nextIn = 0;
int nextOut = 0;

//Semaphores
sem_t empty_slots;
sem_t full_slots;

//produce an item from the buffer
void Produce(char item){
  sem_wait(&amp;empty_slots);
    buffer[nextIn] = item;
    cout&lt;&lt;"Producer:"&lt;&lt;&lt;"n";
    nextIn = (nextIn + 1) % BUFF_SIZE;
  sem_post(&amp;full_slots);
}

//Consume an item from the buffer
void Consume(){
    sem_wait(&amp;full_slots);
        cout&lt;&lt;"t----&gt;Consumer:"&lt;&lt;&lt;"n";
        nextOut = (nextOut+1)%BUFF_SIZE;
    sem_post(&amp;empty_slots);
}

//Producer
void * Producer(void *param){
    for(int i = 0; i &lt; 10; i++)Produce((char)('A'+ i % 26));
    pthread_exit;
}

//Consumer
void * Consumer(void *param){
    for(int i = 0; i &lt; 10; i++)Consume();
    pthread_exit;
}

int main(void){

    //Create a threadpool
    pthread_t pool[2];

    //Create thread attributes
    pthread_attr_t attr;

    //Initialize attributes
    pthread_attr_init(&amp;attr);

    //Initialize semaphore CREATE(&amp;semaphore,shared[NOT supported],initial value)
    sem_init(&amp;empty_slots, 0, BUFF_SIZE);
    sem_init(&amp;full_slots,0,0);

    //Create threads
    pthread_create(&amp;pool[0],&amp;attr,Producer,NULL);
    pthread_create(&amp;pool[1],&amp;attr,Consumer,NULL);

    pthread_join(pool[0],NULL);
    pthread_join(pool[1],NULL);
    return 0;
}</pre>
<p><em>Note: ignore the last rule.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://anxma.com/index.php/process-synchronization-ii-posix-semaphores-pthread/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Process Synchronization: Java Semaphores</title>
		<link>http://anxma.com/index.php/process-synchronization-java-semaphores/</link>
		<comments>http://anxma.com/index.php/process-synchronization-java-semaphores/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 11:43:17 +0000</pubDate>
		<dc:creator>Steven Houben</dc:creator>
				<category><![CDATA[Software & Programming]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Process Synchronization]]></category>
		<category><![CDATA[Semaphores]]></category>
		<category><![CDATA[threads]]></category>

		<guid isPermaLink="false">http://anxma.com/anti/?p=112</guid>
		<description><![CDATA[While studying the basics of process synchronization I came across the concept of Semaphores. Our textbook provides a definition, a short blurry explanation and a generic pseudo example: A semaphore is an integer variable that, apart from initializiation, is accessed &#8230; <a href="http://anxma.com/index.php/process-synchronization-java-semaphores/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>While studying the basics of process synchronization I came across the concept of Semaphores. Our textbook provides a definition, a short blurry explanation and a generic pseudo example:</p>
<blockquote><p>A semaphore is an integer variable that, apart from initializiation, is accessed only through 2 standard atomic operations: wait() and signal()</p></blockquote>
<pre name="code" class="c#">wait(S){
    while s&lt;=0
    ;// no-op
    s--;
}

Signal(S){
    s++;
}</pre>
<p>A semaphore is used when multiple threads or processes are using a limited amount of shared resources. A pretty easy to understand example of this is a printerpool. Imagine 10 printjobs that are send to a  printerpool with 5 printers:</p>
<pre name="code" class="java">package semtest;

import java.util.concurrent.Semaphore;

public class PrintJob extends Thread{
	private int id;
	private Semaphore sem;

	//constructor
	public PrintJob(int id, Semaphore sem){
		this.id = id;
		this.sem = sem;
	}

	//Print
	void Print(){
		System.out.println("Printjob "+id+" :Start Printing");
		try{sleep(1000);}catch (InterruptedException e){}
		System.out.println("Stop Printing");
	}

	//run methode executed when thread.start() is called
	public void run(){
		try{
			//Accuire the semaphore
			sem.acquire();
			Print();
		}catch(InterruptedException e){
			//ignore
			}
		//Release the semaphore
		sem.release();
	}

	public static void main(String[] args){

		//Amount of printers in the printerpool
	    final int PRINTERS = 2;

	    //Java semaphore object : Semaphore(permits,fair)
	    Semaphore sem = new Semaphore(PRINTERS,true);

	    //Amount of printjobs
	    PrintJob jobs[] = new PrintJob[100];

	    //Create printjob threads
	    for (int i = 0; i &lt; 100; i++){
	    	jobs[i] = new PrintJob(i, sem);
	    	jobs[i].start();
	    }
	}
}</pre>
<p>Output for PRINTERS = 5:</p>
<blockquote><p>Printjob 0 :Start Printing<br />
Printjob 1 :Start Printing<br />
Printjob 2 :Start Printing<br />
Printjob 3 :Start Printing<br />
Printjob 5 :Start Printing<br />
Stop Printing<br />
Printjob 7 :Start Printing<br />
Stop Printing<br />
Stop Printing<br />
Stop Printing<br />
Stop Printing<br />
Printjob 4 :Start Printing<br />
Printjob 6 :Start Printing<br />
Printjob 8 :Start Printing<br />
Printjob 9 :Start Printing<br />
Stop Printing<br />
Stop Printing<br />
Stop Printing<br />
Stop Printing<br />
Stop Printing<br />
&#8230;</p></blockquote>
<p>Output for PRINTERS = 2:</p>
<blockquote><p>Printjob 1 :Start Printing<br />
Printjob 0 :Start Printing<br />
Stop Printing<br />
Stop Printing<br />
Printjob 2 :Start Printing<br />
Printjob 3 :Start Printing<br />
Stop Printing<br />
Stop Printing<br />
Printjob 4 :Start Printing<br />
Printjob 6 :Start Printing<br />
Stop Printing<br />
Stop Printing<br />
Printjob 8 :Start Printing<br />
Printjob 10 :Start Printing<br />
Stop Printing<br />
Stop Printing<br />
Printjob 12 :Start Printing<br />
Printjob 14 :Start Printing<br />
Stop Printing<br />
Stop Printing<br />
Printjob 7 :Start Printing<br />
Printjob 9 :Start Printing<br />
Stop Printing<br />
Stop Printing<br />
&#8230;</p></blockquote>
<p>Anti</p>
]]></content:encoded>
			<wfw:commentRss>http://anxma.com/index.php/process-synchronization-java-semaphores/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Algorithm: the root sudoku solution.</title>
		<link>http://anxma.com/index.php/algorithm-the-root-sudoku-solution/</link>
		<comments>http://anxma.com/index.php/algorithm-the-root-sudoku-solution/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 22:31:25 +0000</pubDate>
		<dc:creator>Steven Houben</dc:creator>
				<category><![CDATA[Software & Programming]]></category>
		<category><![CDATA[Algorithm]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Sudoku root solution]]></category>

		<guid isPermaLink="false">http://anxma.com/anti/?p=42</guid>
		<description><![CDATA[The easiest way to produce a sudoku is the root solution, which can be achieved using the following very simple, polynomial time algorithm. <a href="http://anxma.com/index.php/algorithm-the-root-sudoku-solution/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The easiest way to produce a sudoku is the root solution, which can be achieved using the following very simple, polynomial time algorithm:</p>
<pre name="code" class="c++">//C++
int** generateSudoku(void)
{

    int ** sudoku;
	sudoku = new int*[9];
	for(int i=0;i&lt;9;i++) *(sudoku+i) = new int[9];
	for (int i = 0; i &lt; 81; i++)
	{
		if (i % 9 + 1 * ((i / 9 * 3 + 1) % 9 + (i / 27)) &gt; 9)
			sudoku[i / 9][i % 9] = i % 9 + 1 *
			((i / 9 * 3 + 1) % 9 + (i / 27)) - 9;
		else
			sudoku[i / 9][ i % 9] = i % 9 + 1 *
			((i / 9 * 3 + 1) % 9 + (i / 27));
	}
	return sudoku;
}</pre>
<pre name="code" class="c-sharp">//C#
static int[,] generateSudoku()
{
    int[,] sudoku = new int[9, 9];
    for (int i = 0; i &lt; 81; i++)
    {
        if (i % 9 + 1 * ((i / 9 * 3 + 1) % 9 + (i / 27)) &gt; 9)
            sudoku[i / 9, i % 9] = i % 9 + 1 *
			((i / 9 * 3 + 1) % 9 + (i / 27)) - 9;
        else
            sudoku[i / 9, i % 9] = i % 9 + 1 *
			((i / 9 * 3 + 1) % 9 + (i / 27));
    }
    return sudoku;
}</pre>
<p>Anti</p>
]]></content:encoded>
			<wfw:commentRss>http://anxma.com/index.php/algorithm-the-root-sudoku-solution/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

