<?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>Millad Dagdoni&#039;s Personal Blog &#38; Portfolio</title>
	<atom:link href="http://millad.net/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://millad.net</link>
	<description>{ Programming, Web, Technology &#38; me }</description>
	<lastBuildDate>Tue, 20 Jul 2010 19:24:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Final Product</title>
		<link>http://millad.net/?p=1081</link>
		<comments>http://millad.net/?p=1081#comments</comments>
		<pubDate>Sat, 17 Jul 2010 00:10:16 +0000</pubDate>
		<dc:creator>Millad Dagdoni</dc:creator>
				<category><![CDATA[Games And Fun]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://millad.net/?p=1081</guid>
		<description><![CDATA[Source Files]]></description>
			<content:encoded><![CDATA[<p>
<object width="560" height="445"><param name="movie" value="http://www.youtube.com/v/0JHDJfBD7So&amp;hl=en_US&amp;fs=1?rel=0&amp;hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/0JHDJfBD7So&amp;hl=en_US&amp;fs=1?rel=0&amp;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="445"></embed></object>
</p>
<p><a href="./downloads/BunkerWarCode.zip">Source Files</a></p>
]]></content:encoded>
			<wfw:commentRss>http://millad.net/?feed=rss2&amp;p=1081</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iOS Development This Summer</title>
		<link>http://millad.net/?p=1062</link>
		<comments>http://millad.net/?p=1062#comments</comments>
		<pubDate>Wed, 30 Jun 2010 15:01:25 +0000</pubDate>
		<dc:creator>Millad Dagdoni</dc:creator>
				<category><![CDATA[Games And Fun]]></category>
		<category><![CDATA[General News]]></category>

		<guid isPermaLink="false">http://millad.net/?p=1062</guid>
		<description><![CDATA[Every summer I like to do a personal project which lets me explore new challenging tasks. Last summer I wrote a Java 2D game from ground up. This time I have decided to try something similar with iPhone. I´m starting out with Quartz 2D then maybe move over to OpenGL ES or a popular framework. [...]]]></description>
			<content:encoded><![CDATA[<p>Every summer I like to do a personal project which lets me explore new challenging tasks. Last summer I wrote a Java 2D game from ground up. This time I have decided to try something similar with iPhone. I´m starting out with Quartz 2D then maybe move over to OpenGL ES or a popular framework. I&#8217;m going to post my game concept with some drawings soon. </p>
<p><img alt="Basic Strategy Model" src="/img/GameRenderMVC.gif" title="Basic Strategy" class="aligncenter" width="663" height="356" /><br />
This is a picture of the same basic strategy that I have used previously in my last project with good free <a target="_blank" href="http://opengameart.org/">game art resources</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://millad.net/?feed=rss2&amp;p=1062</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working For Accenture</title>
		<link>http://millad.net/?p=1059</link>
		<comments>http://millad.net/?p=1059#comments</comments>
		<pubDate>Sat, 15 May 2010 20:47:59 +0000</pubDate>
		<dc:creator>Millad Dagdoni</dc:creator>
				<category><![CDATA[General News]]></category>

		<guid isPermaLink="false">http://millad.net/?p=1059</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><img alt="" src="/img/accenture.png" title="Accenture Logo" class="aligncenter" width="576" height="282" /></p>
]]></content:encoded>
			<wfw:commentRss>http://millad.net/?feed=rss2&amp;p=1059</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Datalex Web Work In Progress</title>
		<link>http://millad.net/?p=1056</link>
		<comments>http://millad.net/?p=1056#comments</comments>
		<pubDate>Sat, 15 May 2010 20:40:21 +0000</pubDate>
		<dc:creator>Millad Dagdoni</dc:creator>
				<category><![CDATA[General News]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://millad.net/?p=1056</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/eheQfG7QDjs&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/eheQfG7QDjs&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://millad.net/?feed=rss2&amp;p=1056</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone App For Smalls Food And Drinks</title>
		<link>http://millad.net/?p=1044</link>
		<comments>http://millad.net/?p=1044#comments</comments>
		<pubDate>Thu, 22 Apr 2010 15:01:50 +0000</pubDate>
		<dc:creator>Millad Dagdoni</dc:creator>
				<category><![CDATA[General News]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://millad.net/?p=1044</guid>
		<description><![CDATA[I&#8217;m currently working hard to deliver a fully advanced Ajax application for a Norwegian company, which I will post a video about. This is a new project that I´m working on for a friend of mine. He wanted a simple iPhone app for his new opened sandwich store. The purpose of this application is to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently working hard to deliver a fully advanced Ajax application for a Norwegian company, which I will post a video about. This is a new project that I´m working on for a friend of mine. He wanted a simple iPhone app for his new opened sandwich store. The purpose of this application is to let users view his menu and store information.</p>
<p>The user interface is very simple, which I will eventually change in the future but for now you get the point. No database used here I&#8217;m currently learning to use Core Data with SQL lite but the application is pulling data from a simple array in the application code for testing purposes only.</p>
<p><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/zpGDNZINltc&#038;hl=en_US&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/zpGDNZINltc&#038;hl=en_US&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
<p>I&#8217;m going to use <a href="http://www.mobileorchard.com/iphone-sqlite-tutorials-and-libraries/" target="_blank">SQLite tutorials</a> to build a simple DB and get saved product information.</p>
]]></content:encoded>
			<wfw:commentRss>http://millad.net/?feed=rss2&amp;p=1044</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unit Testing Is Cool</title>
		<link>http://millad.net/?p=1037</link>
		<comments>http://millad.net/?p=1037#comments</comments>
		<pubDate>Thu, 25 Feb 2010 20:36:01 +0000</pubDate>
		<dc:creator>Millad Dagdoni</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://millad.net/?p=1037</guid>
		<description><![CDATA[The Agile and TDD ( Test Driven Development ) have come upon us, and have encouraged many programmers to write automated unit tests. More are joining their ranks every day. I`m one of them, and these are my notes from my own experience and other sources like the Internet and books. Basically, everyone knows that [...]]]></description>
			<content:encoded><![CDATA[<p>The Agile and TDD ( Test Driven Development ) have come upon us, and have encouraged many programmers to write automated unit tests. More are joining their ranks every day. I`m one of them, and these are my notes from my own experience and other sources like the Internet and books.</p>
<p><span id="more-1037"></span> </p>
<p>Basically, everyone knows that TDD asks us to write unit tests first, before we write production code. But we should follow these three laws:  </p>
<p><strong>First Law</strong>: You cannot write production code until you have written a failing unit test.</p>
<p><strong>Second Law</strong>: You cannot write more of a unit test than is needed or required but without being abundant to fail.</p>
<p><strong>Third Law</strong>: You cannot write more production code than is needed to pass the currently failing test. </p>
<p>You have to keep your tests clean. It is unit testing that keeps your code flexible, maintainable, and reusable. </p>
<p><strong>F.I.R.S.T</strong></p>
<p><strong>Fast</strong>: Test should be fast. They should run quickly.</p>
<p><strong>Independent</strong>: Tests should not depend on each other. </p>
<p><strong>Repeatable</strong>: Tests should be repeatable in any environment. You should be able to run the tests in the production environment, in our laptop when you do not have an Internet connection.</p>
<p><strong>Self-Validating</strong>: The tests should have a boolean output. Either they pass or fail.</p>
<p><strong>Timely</strong>: The tests need to be written in a timely fashion. Unit tests should be written just before the production code that makes them pass.</p>
]]></content:encoded>
			<wfw:commentRss>http://millad.net/?feed=rss2&amp;p=1037</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE7 Ajax Bug</title>
		<link>http://millad.net/?p=1031</link>
		<comments>http://millad.net/?p=1031#comments</comments>
		<pubDate>Wed, 13 Jan 2010 20:38:25 +0000</pubDate>
		<dc:creator>Millad Dagdoni</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://millad.net/?p=1031</guid>
		<description><![CDATA[I had problems with IE7, when you do a Ajax call after a data update, IE7 will not make that call, he just throws old data. To fix the &#8220;problem&#8221; you need to change the url you are sending to force it to send every time! url: "/Bring/AjaxServlet?getQuestionsJSON&#038;r=" + Math.floor(Math.random()*1000),]]></description>
			<content:encoded><![CDATA[<p>I had problems with IE7, when you do a Ajax call after a data update, IE7 will not make that call, he just throws old data. To fix the &#8220;problem&#8221; you need to change the url you are sending to force it to send every time!</p>
<p><span id="more-1031"></span></p>
<pre name="code" class="JavaScript">

url: "/Bring/AjaxServlet?getQuestionsJSON&#038;r=" + Math.floor(Math.random()*1000),
</pre>
]]></content:encoded>
			<wfw:commentRss>http://millad.net/?feed=rss2&amp;p=1031</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I Highly Recommend World War Z</title>
		<link>http://millad.net/?p=1022</link>
		<comments>http://millad.net/?p=1022#comments</comments>
		<pubDate>Sun, 10 Jan 2010 16:01:51 +0000</pubDate>
		<dc:creator>Millad Dagdoni</dc:creator>
				<category><![CDATA[General News]]></category>

		<guid isPermaLink="false">http://millad.net/?p=1022</guid>
		<description><![CDATA[This book is highly recommend for those who love Zombie Movies]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.amazon.com/World-War-Oral-History-Zombie/dp/0307346617/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1263139032&amp;sr=8-1" target="_blank"><img class="aligncenter" style="border: 1px solid silver;" title="World War Z Book Image" src="/img/world_war_z_b.jpg" alt="" width="390" height="600" align="center" /></a></p>
<p>This book is highly recommend for those who love Zombie Movies <img src='http://millad.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://millad.net/?feed=rss2&amp;p=1022</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.NET MVC JsonResult</title>
		<link>http://millad.net/?p=1016</link>
		<comments>http://millad.net/?p=1016#comments</comments>
		<pubDate>Thu, 07 Jan 2010 16:57:33 +0000</pubDate>
		<dc:creator>Millad Dagdoni</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://millad.net/?p=1016</guid>
		<description><![CDATA[Quick note on creating and returning JSON via a controler, without using JayRock, which allows clients, typically JavaScript in web pages, to be able to call into server-side methods using JSON as the wire format and JSON-RPC as the procedure invocation protocol. The methods can be called synchronously or asynchronously ! public JsonResult Person() { [...]]]></description>
			<content:encoded><![CDATA[<p>Quick note on creating and returning JSON via a controler, without using JayRock, which allows clients, typically JavaScript in web pages, to be able to call into server-side methods using JSON as the wire format and JSON-RPC as the procedure invocation protocol. The methods can be called synchronously or asynchronously !</p>
<p><span id="more-1016"></span></p>
<pre name="code" class="C#">
public JsonResult Person()
        {
            Person millad = new Person();
            millad.age = 22;
            millad.name = "Millad";
            // Sometimes it does not allow you to use a GET request, which you have to allow by
           // typing the second parameter as shown below.
            return Json(millad, JsonRequestBehavior.AllowGet);
        }
</pre>
<p>You can now simply call this data by using JQuery </p>
<pre name="code" class="Javascript">
 $(function () {
            $.getJSON("Home/Person/", "JSON", function (data) {
                console.log( data );
            });

        });
</pre>
]]></content:encoded>
			<wfw:commentRss>http://millad.net/?feed=rss2&amp;p=1016</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Regular-Expression Notes From Everywhere</title>
		<link>http://millad.net/?p=985</link>
		<comments>http://millad.net/?p=985#comments</comments>
		<pubDate>Tue, 05 Jan 2010 17:31:01 +0000</pubDate>
		<dc:creator>Millad Dagdoni</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://millad.net/?p=985</guid>
		<description><![CDATA[Knowing how to use regular expressions is important. Regular expressions help me solve problems both large and small. There nothing magic about Regular expression. Just like a magician, there is nothing magic about magic. The magician understands something simple which does not appear to be simple or natural to the untrained audience. The special characters [...]]]></description>
			<content:encoded><![CDATA[<p>Knowing how to use regular expressions is important. Regular expressions help me solve problems both large and small.</p>
<p>There nothing magic about Regular expression. Just like a magician, there is nothing magic about magic. The magician understands something simple which does not appear to be simple or natural to the untrained audience.</p>
<p><span id="more-985"></span></p>
<p>The special characters (like the * from the filename analogy) are called metacharacters, while the rest are called literal, or normal text characters.</p>
<p><strong>Start and End of the line</strong><br />
Metacharacters are</p>
<pre>^ (caret)</pre>
<p>and</p>
<pre>$(dollar)</pre>
<p>which represent the start and end of the line of text as it is being checked. ^Millad matches if you have the beginning of a line, followed immediately by M, followed immediately by i, followed immediately by l&#8230;etc</p>
<p><strong>Matching any one of many characters</strong><br />
Let&#8217;s say you want to search for &#8220;grey,&#8221; but also want to find it if it were spelled &#8220;gray.&#8221; Using  gr[ea]y: this means to find &#8220;g, followed by r, followed by <em>either</em> an e or an a, all followed by y.&#8221;</p>
<p>The contents of a class [] is a list of characters that can match at that point, so the implication is &#8220;or&#8221;.</p>
<p>Another example, you want to allow capitalization of a word&#8217;s first letter, such as with [Ss]mith. Remember that this still matches lines that contain smith (or Smith) embedded within another word, such as with blacksmith.</p>
<p>You can list in the class as many characters as you like. For example, [123456] matches any of the listed digits. This particular class might be useful as part of &lt; H[123456] &gt;, which matches &lt; H1 &gt;, &lt; H2 &gt;, &lt; H3 &gt;, etc. This can be useful when searching for HTML headers.</p>
<p>Within a character class, the character-class metacharacter &#8216;-&#8217; (dash) indicates a range of characters: &lt; H[1-6] &gt; is identical to the previous example. [0-9] and [a-z] are common shorthands for classes to match digits and English lowercase letters, respectively.</p>
<p>Multiple ranges are fine, so [0123456789abcdefABCDEF] can be written as [0-9a-fA-F] (or, perhaps, [A-Fa-f0-9], since the order in which ranges are given doesn&#8217;t matter).</p>
<p>These last three examples can be useful when processing hexadecimal numbers. You can freely combine ranges with literal characters: [0-9A-Z_!.?] matches a digit, uppercase letter, underscore, exclamation point, period, or a question mark.</p>
<p><strong>Ignoring Characters In Classes</strong></p>
<pre>[^1-6]</pre>
<p>Matches a character that&#8217;s not 1 through 6. The leading ^ in the class &#8220;negates&#8221; the list, so rather than listing the characters you want to include in the class, you list the characters you don&#8217;t want to be included.</p>
<p>You might have noticed that the ^ used here is the same as the start-of-line caret, but it&#8217;s not.</p>
<p>Here&#8217;s what happened. (What I typed is in bold.)</p>
<p><strong> &#8216;q[^u]&#8216;</strong><br />
Iraqi<br />
Iraqian<br />
miqra<br />
qasida<br />
qintar<br />
qoph</p>
<p>Two notable words not listed are &#8220;Qantas&#8221;, the Australian airline, and &#8220;Iraq&#8221;. Although both words are in the word list file.</p>
<p>Qantas didn&#8217;t match because the regular expression called for a lowercase q, whereas the Q in Qantas is uppercase. Had we used Q[^u] instead, we would have found it.</p>
<p>The Iraq example is somewhat of a trick question. The regular expression calls for q followed by a character that&#8217;s not u, which precludes matching q at the end of the line. Lines generally have newline characters at the very end, but a little fact I neglected to mention (sorry!) is that egrep strips those before checking with the regular expression, so after a line-ending q, there&#8217;s no non-u to be matched.</p>
<p><strong>Matching Any Character with Dot</strong><br />
The metacharacter . (usually called dot or point) is a shorthand for a character class that matches any character. It can be convenient when you want to have an &#8220;any character here&#8221; placeholder in your expression. For example, if you want to search for a date such as 03/19/76, 03-19-76, or even 03.19.76, you could go to the trouble to construct a regular expression that uses character classes to explicitly allow &#8216;/&#8217;, &#8216;-&#8217;, or &#8216;.&#8217; between each number, such as 03[-./]19[-./]76. However, you might also try simply using 03.19.76. In 03[-./]19[-./]76, the dots are not metacharacters because they are within a character class [].</p>
<p><strong>Matching any one of several subexpressions</strong><br />
A very convenient metacharacter is |, which means &#8220;or.&#8221; It allows you to combine multiple expressions into a single expression that matches any of the individual ones. For example, Bob and Robert are separate expressions, but Bob|Robert is one expression that matches either. When combined this way, the subexpressions are called alternatives.</p>
<p>Looking back to our gr[ea]y example, it can be written as grey|gray, and even gr(a|e)y. The latter case uses parentheses to constrain the alternation. (For the record, parentheses are metacharacters too.) Note that something like gr[a|e]y is not what we want within a class, the &#8216;|&#8217; character is just a normal character, like a and e.</p>
<p>With gr(a|e)y, the parentheses are required because without them, gra|ey means &#8220;gra or ey,&#8221; which is not what we want here. Alternation reaches far, but not beyond parentheses. Another example is (First|1st)•[Ss]treet.[] Actually, since both First and 1st end with st, the combination can be shortened to (Fir|1)st • [Ss]treet. That&#8217;s not necessarily quite as easy to read, but be sure to understand that (first|1st) and (fir|1)st effectively mean the same thing.</p>
<p>Here&#8217;s an example involving an alternate spelling of my name. Compare and contrast the following three expressions, which are all effectively the same:</p>
<p>Jeffrey|Jeffery</p>
<p>Jeff(rey|ery)</p>
<p>Jeff(re|er)y</p>
<p>To have them match the British spellings as well, they could be:</p>
<p>(Geoff|Jeff)(rey|ery)</p>
<p>(Geo|Je)ff(rey|ery)</p>
<p>(Geo|Je)ff(re|er)y</p>
<p><strong>Optional Items</strong><br />
Matching color or colour. Since they are the same except that one has a u and the other doesn&#8217;t, we can use colou?r to match either. The metacharacter ? (question mark) means optional. It is placed after the character that is allowed to appear at that point in the expression, but whose existence isn&#8217;t actually required to still be considered a successful match.</p>
<p>Unlike other metacharacters we have seen so far, the question mark attaches only to the immediately-preceding item. Thus, colou?r is interpreted as &#8221; c then o then l then o then u? then r.&#8221;</p>
<p>The u? part is always successful: sometimes it matches a u in the text, while other times it doesn&#8217;t. The whole point of the ?-optional part is that it&#8217;s successful either way. This isn&#8217;t to say that any regular expression that contains ? is always successful. For example, against &#8216;semicolon&#8217;, both colo and u? are successful (matching colo and nothing, respectively). However, the final r fails, and that&#8217;s what disallows semicolon, in the end, from being matched by colou?r.</p>
<p>As another example, consider matching a date that represents July fourth, with the &#8220;July&#8221; part being either July or Jul, and the &#8220;fourth&#8221; part being fourth, 4th, or simply 4. Of course, we could just use (July;Jul) • (fourth|4th|4), but let&#8217;s explore other ways to express the same thing.</p>
<p>First, we can shorten the (July;Jul) to (July?). Do you see how they are effectively the same? The removal of the | means that the parentheses are no longer really needed. Leaving the parentheses doesn&#8217;t hurt, but with them removed, July? is a bit less cluttered. This leaves us with July? • (fourth|4th|4).</p>
<p>Moving now to the second half, we can simplify the 4th|4 to 4(th)?. As you can see, ? can attach to a parenthesized expression. Inside the parentheses can be as complex a subexpression as you like, but &#8220;from the outside&#8221; it is considered a single unit. Grouping for ? (and other similar metacharacters which I&#8217;ll introduce momentarily) is one of the main uses of parentheses.</p>
<p><strong>Other Quantifiers: Repetition</strong><br />
Similar to the question mark are + (plus) and * (an asterisk, but as a regular-expression metacharacter, I prefer the term star). The metacharacter + means &#8220;one or more of the immediately-preceding item,&#8221; and * means &#8220;any number, including none, of the item.&#8221; Phrased differently, ⋯* means &#8220;try to match it as many times as possible, but it&#8217;s OK to settle for nothing if need be.&#8221; The construct with plus, ⋯+, is similar in that it also tries to match as many times as possible, but different in that it fails if it can&#8217;t match at least once. These three metacharacters, question mark, plus, and star, are called quantifiers because they influence the quantity of what they govern.</p>
]]></content:encoded>
			<wfw:commentRss>http://millad.net/?feed=rss2&amp;p=985</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
