<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments for Coding Friends</title>
	<atom:link href="http://www.codingfriends.com/index.php/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codingfriends.com</link>
	<description>Coding Friends, place for developers.</description>
	<lastBuildDate>Wed, 01 Feb 2012 21:41:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>Comment on Problem 4 by genux</title>
		<link>http://www.codingfriends.com/index.php/2010/05/10/problem-4-2/comment-page-1/#comment-539</link>
		<dc:creator>genux</dc:creator>
		<pubDate>Wed, 01 Feb 2012 21:41:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.codingfriends.com/?p=951#comment-539</guid>
		<description>No problems cool that you see enjoying the coding :)</description>
		<content:encoded><![CDATA[<p>No problems cool that you see enjoying the coding <img src='http://www.codingfriends.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Problem 4 by Dre</title>
		<link>http://www.codingfriends.com/index.php/2010/05/10/problem-4-2/comment-page-1/#comment-537</link>
		<dc:creator>Dre</dc:creator>
		<pubDate>Mon, 30 Jan 2012 02:31:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.codingfriends.com/?p=951#comment-537</guid>
		<description>Thanks for all the ideas on this page, I&#039;ve been working through the stanford course on itunesU which is amazing.  This is the first code I&#039;ve written since 10 Print &quot;Hello&quot; 20 Goto 10 when I was 6 years old :-)  I copied your examples for problems 2 and 3 and was then able to work this one out on my own.  Cheers :-)


&lt;pre lang=&quot;”java”&quot;&gt;

public class MidpointFindingKarel extends SuperKarel {

	public void run(){
				if (frontIsClear()){
				layBeepers();
				removeAllButCentreBeeper();
				}
	}

			private void layBeepers(){
						while (frontIsClear()){
								putBeeper();
								move();
						}
								putBeeper();
						if (frontIsBlocked()){
								turnAround();
						}
			}
	
			private void removeAllButCentreBeeper(){
						while (beepersPresent()){
								pickBeeper();
								move();
								if (beepersPresent()){
									moveToWall();
									turnAround();
									while (noBeepersPresent()){
											move();
									}
								}
						}
						turnAround();
						move();
						putBeeper();
			}
			
			private void moveToWall(){
						while (frontIsClear()){
								move();
						}
			}

}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Thanks for all the ideas on this page, I&#8217;ve been working through the stanford course on itunesU which is amazing.  This is the first code I&#8217;ve written since 10 Print &#8220;Hello&#8221; 20 Goto 10 when I was 6 years old <img src='http://www.codingfriends.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />   I copied your examples for problems 2 and 3 and was then able to work this one out on my own.  Cheers <img src='http://www.codingfriends.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<pre lang="”java”">

public class MidpointFindingKarel extends SuperKarel {

	public void run(){
				if (frontIsClear()){
				layBeepers();
				removeAllButCentreBeeper();
				}
	}

			private void layBeepers(){
						while (frontIsClear()){
								putBeeper();
								move();
						}
								putBeeper();
						if (frontIsBlocked()){
								turnAround();
						}
			}

			private void removeAllButCentreBeeper(){
						while (beepersPresent()){
								pickBeeper();
								move();
								if (beepersPresent()){
									moveToWall();
									turnAround();
									while (noBeepersPresent()){
											move();
									}
								}
						}
						turnAround();
						move();
						putBeeper();
			}

			private void moveToWall(){
						while (frontIsClear()){
								move();
						}
			}

}
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Problem 3 by Mark</title>
		<link>http://www.codingfriends.com/index.php/2010/05/10/problem-3-2/comment-page-2/#comment-531</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Sat, 28 Jan 2012 03:16:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.codingfriends.com/?p=948#comment-531</guid>
		<description>&lt;pre lang=&quot;”java”&quot;&gt;
/*
 * File: CheckerboardKarel.java
 * ----------------------------
 * CheckerboardKarel class draws a checkerboard using beepers,
 * as described in Assignment 1.  Karel starts in the southwest
 * corner of the world, facing east. Program works for various worlds.
 */

import stanford.karel.*;

public class CheckerboardKarel extends SuperKarel {
	public void run() {

		putBeeper();

		if (frontIsBlocked()) {
			turnLeft();
		}
	
		while (frontIsClear()) {
			move();
			if (frontIsClear()) {
				move();
				putBeeper();

				if (frontIsBlocked()) {
					moveToNextStreet();
					if (frontIsClear()) {
						move();
						putBeeper();
					}
					
				}

			} else {
				moveToNextStreet();
				if (frontIsClear()) {
					putBeeper();
				}
			}
				
		}
	}
	
/**	
 * Moves to the next street facing opposite direction
 */
	private void moveToNextStreet() {
			if (facingEast()) {
				turnLeft();
				if (frontIsClear()) {
					move();
					turnLeft();
				}
			} else {
				turnRight();
				if (frontIsClear()) {
					move();
					turnRight();
				}
			}
	}
}		
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<pre lang="”java”">
/*
 * File: CheckerboardKarel.java
 * ----------------------------
 * CheckerboardKarel class draws a checkerboard using beepers,
 * as described in Assignment 1.  Karel starts in the southwest
 * corner of the world, facing east. Program works for various worlds.
 */

import stanford.karel.*;

public class CheckerboardKarel extends SuperKarel {
	public void run() {

		putBeeper();

		if (frontIsBlocked()) {
			turnLeft();
		}

		while (frontIsClear()) {
			move();
			if (frontIsClear()) {
				move();
				putBeeper();

				if (frontIsBlocked()) {
					moveToNextStreet();
					if (frontIsClear()) {
						move();
						putBeeper();
					}

				}

			} else {
				moveToNextStreet();
				if (frontIsClear()) {
					putBeeper();
				}
			}

		}
	}

/**
 * Moves to the next street facing opposite direction
 */
	private void moveToNextStreet() {
			if (facingEast()) {
				turnLeft();
				if (frontIsClear()) {
					move();
					turnLeft();
				}
			} else {
				turnRight();
				if (frontIsClear()) {
					move();
					turnRight();
				}
			}
	}
}
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Problem 3 by Mark</title>
		<link>http://www.codingfriends.com/index.php/2010/05/10/problem-3-2/comment-page-1/#comment-530</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Sat, 28 Jan 2012 03:13:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.codingfriends.com/?p=948#comment-530</guid>
		<description>Here&#039;s what I did, haven&#039;t written a program for 25 years (FORTRAN!)

/*
 * File: CheckerboardKarel.java
 * ----------------------------
 * CheckerboardKarel class draws a checkerboard using beepers,
 * as described in Assignment 1.  Karel starts in the southwest
 * corner of the world, facing east. Program works for various worlds.
 */

import stanford.karel.*;

public class CheckerboardKarel extends SuperKarel {
	public void run() {

		putBeeper();

		if (frontIsBlocked()) {
			turnLeft();
		}
	
		while (frontIsClear()) {
			move();
			if (frontIsClear()) {
				move();
				putBeeper();

				if (frontIsBlocked()) {
					moveToNextStreet();
					if (frontIsClear()) {
						move();
						putBeeper();
					}
					
				}

			} else {
				moveToNextStreet();
				if (frontIsClear()) {
					putBeeper();
				}
			}
				
		}
	}
	
/**	
 * Moves to the next street facing opposite direction
 */
	private void moveToNextStreet() {
			if (facingEast()) {
				turnLeft();
				if (frontIsClear()) {
					move();
					turnLeft();
				}
			} else {
				turnRight();
				if (frontIsClear()) {
					move();
					turnRight();
				}
			}
	}
}</description>
		<content:encoded><![CDATA[<p>Here&#8217;s what I did, haven&#8217;t written a program for 25 years (FORTRAN!)</p>
<p>/*<br />
 * File: CheckerboardKarel.java<br />
 * &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
 * CheckerboardKarel class draws a checkerboard using beepers,<br />
 * as described in Assignment 1.  Karel starts in the southwest<br />
 * corner of the world, facing east. Program works for various worlds.<br />
 */</p>
<p>import stanford.karel.*;</p>
<p>public class CheckerboardKarel extends SuperKarel {<br />
	public void run() {</p>
<p>		putBeeper();</p>
<p>		if (frontIsBlocked()) {<br />
			turnLeft();<br />
		}</p>
<p>		while (frontIsClear()) {<br />
			move();<br />
			if (frontIsClear()) {<br />
				move();<br />
				putBeeper();</p>
<p>				if (frontIsBlocked()) {<br />
					moveToNextStreet();<br />
					if (frontIsClear()) {<br />
						move();<br />
						putBeeper();<br />
					}</p>
<p>				}</p>
<p>			} else {<br />
				moveToNextStreet();<br />
				if (frontIsClear()) {<br />
					putBeeper();<br />
				}<br />
			}</p>
<p>		}<br />
	}</p>
<p>/**<br />
 * Moves to the next street facing opposite direction<br />
 */<br />
	private void moveToNextStreet() {<br />
			if (facingEast()) {<br />
				turnLeft();<br />
				if (frontIsClear()) {<br />
					move();<br />
					turnLeft();<br />
				}<br />
			} else {<br />
				turnRight();<br />
				if (frontIsClear()) {<br />
					move();<br />
					turnRight();<br />
				}<br />
			}<br />
	}<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on CKEditor &#8211; auto save by John</title>
		<link>http://www.codingfriends.com/index.php/2010/12/10/ckeditor-auto-save/comment-page-1/#comment-526</link>
		<dc:creator>John</dc:creator>
		<pubDate>Mon, 23 Jan 2012 13:21:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.codingfriends.com/?p=1191#comment-526</guid>
		<description>Please have a look at - http://cksource.com/forums/viewtopic.php?f=18&amp;t=24128.
IMO this plugin is much more advanced to what you are offering.
Also it does not require user to use jQuery.

Please do not delete this post - unless you can&#039;t stand criticism.</description>
		<content:encoded><![CDATA[<p>Please have a look at &#8211; <a href="http://cksource.com/forums/viewtopic.php?f=18&#038;t=24128" rel="nofollow">http://cksource.com/forums/viewtopic.php?f=18&#038;t=24128</a>.<br />
IMO this plugin is much more advanced to what you are offering.<br />
Also it does not require user to use jQuery.</p>
<p>Please do not delete this post &#8211; unless you can&#8217;t stand criticism.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on CKEditor &#8211; auto save by John</title>
		<link>http://www.codingfriends.com/index.php/2010/12/10/ckeditor-auto-save/comment-page-1/#comment-525</link>
		<dc:creator>John</dc:creator>
		<pubDate>Mon, 23 Jan 2012 13:18:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.codingfriends.com/?p=1191#comment-525</guid>
		<description>Please have a look at - http://cksource.com/forums/viewtopic.php?f=18&amp;t=24128</description>
		<content:encoded><![CDATA[<p>Please have a look at &#8211; <a href="http://cksource.com/forums/viewtopic.php?f=18&#038;t=24128" rel="nofollow">http://cksource.com/forums/viewtopic.php?f=18&#038;t=24128</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on CKEditor &#8211; auto save by James</title>
		<link>http://www.codingfriends.com/index.php/2010/12/10/ckeditor-auto-save/comment-page-1/#comment-523</link>
		<dc:creator>James</dc:creator>
		<pubDate>Fri, 20 Jan 2012 14:25:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.codingfriends.com/?p=1191#comment-523</guid>
		<description>There is also Autosave plugin for CKEDitor -  http://cksource.com/forums/viewtopic.php?f=18&amp;t=24128</description>
		<content:encoded><![CDATA[<p>There is also Autosave plugin for CKEDitor &#8211;  <a href="http://cksource.com/forums/viewtopic.php?f=18&#038;t=24128" rel="nofollow">http://cksource.com/forums/viewtopic.php?f=18&#038;t=24128</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

