<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.2" -->
<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/"
	>

<channel>
	<title>New Syllabus</title>
	<link>http://newsyllabus.com</link>
	<description>Computing, Education, and Computing Education</description>
	<pubDate>Fri, 22 Jan 2010 18:54:26 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
	<language>en</language>
			<item>
		<title>Calendar problem revisited</title>
		<link>http://newsyllabus.com/2008/01/03/calendar-problem-revisited/</link>
		<comments>http://newsyllabus.com/2008/01/03/calendar-problem-revisited/#comments</comments>
		<pubDate>Thu, 03 Jan 2008 17:34:36 +0000</pubDate>
		<dc:creator>John</dc:creator>
		
		<category><![CDATA[assignments]]></category>

		<category><![CDATA[cs1]]></category>

		<guid isPermaLink="false">http://newsyllabus.com/2008/01/03/calendar-problem-revisited/</guid>
		<description><![CDATA[Here&#8217;s a twist on the classic &#8220;What day of the week does a particular date fall on?&#8221; problem. A programming solution using the following approach would use several simple lookup tables, probably implemented as arrays, lists, or hash maps. I&#8217;ve translated the basic idea that I found here (via reddit) into something more appropriate for [...]]]></description>
			<content:encoded><![CDATA[<a href="/2008/01/03/calendar-problem-revisited/"><img src="/images/posts/calendar.jpg" title="calendar" alt="calendar" height="141" width="200" /></a>Here&#8217;s a twist on the classic &#8220;What day of the week does a particular date fall on?&#8221; problem. A programming solution using the following approach would use several simple lookup tables, probably implemented as arrays, lists, or hash maps. I&#8217;ve translated the basic idea that I found <a href="http://www.h2limousine.com/calendar2.php" onclick="javascript:pageTracker._trackVisit('/outbound/article/www.h2limousine.com');">here</a> (via <a href="http://reddit.com" onclick="javascript:pageTracker._trackVisit('/outbound/article/reddit.com');">reddit</a>) into something more appropriate for programming instructors and students.The result can be calculated using the following formula:<strong><code>dayOfWeek = (yearCode + monthCode + day) % 7</code></strong>The result is an integer in the range 0 to 6, interpreted as follows:<table><tr><th>Result</th><th>Day</th></tr><tr><td>0</td><td>Saturday</td></tr><tr><td>1</td><td>Sunday</td></tr><tr><td>2</td><td>Monday</td></tr><tr><td>3</td><td>Tuesday</td></tr><tr><td>4</td><td>Wednesday</td></tr><tr><td>5</td><td>Thursday</td></tr><tr><td>6</td><td>Friday</td></tr></table>As usual, <strong>leap year</strong> needs to be accounted for. If the date in question is in a leap year, the result should be decremented by one for the months of January and February.The <em>month code</em> is a non-intuitive integer as follows:<table><tr><th>Month</th><th>Code</th></tr><tr><td>January</td><td>1</td></tr><tr><td>February</td><td>4</td></tr><tr><td>March</td><td>4</td></tr><tr><td>April</td><td>0</td></tr><tr><td>May</td><td>2</td></tr><tr><td>June</td><td>5</td></tr><tr><td>July</td><td>0</td></tr><tr><td>August</td><td>3</td></tr><tr><td>September</td><td>6</td></tr><tr><td>October</td><td>1</td></tr><tr><td>November</td><td>4</td></tr><tr><td>December</td><td>6</td></tr></table>The <em>year code</em> can also be determined using a lookup table, such as:<table><tr><th>Year</th><th>Code</th></tr><tr><td>2005</td><td>5</td></tr><tr><td>2006</td><td>6</td></tr><tr><td>2007</td><td>0</td></tr><tr><td>2008</td><td>2</td></tr><tr><td>2009</td><td>3</td></tr><tr><td>2010</td><td>4</td></tr></table>Or the year code can be computed using the following formula:<strong><code>yearCode = (centuryCode + twoDigitYear + (twoDigitYear / 4)) % 7</code></strong>The <em>two digit year</em> value is the last two digits of the year (84 for 1984). The <em>century code</em> follows the 6-4-2-0 pattern below and applies only to dates in the<a href="http://en.wikipedia.org/wiki/Gregorian_calendar" onclick="javascript:pageTracker._trackVisit('/outbound/article/en.wikipedia.org');">Gregorian calendar</a>.<table><tr><th>Century</th><th>Code</th></tr><tr><td>1600s</td><td>6</td></tr><tr><td>1700s</td><td>4</td></tr><tr><td>1800s</td><td>2</td></tr><tr><td>1900s</td><td>0</td></tr><tr><td>2000s</td><td>6</td></tr><tr><td>2100s</td><td>4</td></tr><tr><td>2200s</td><td>2</td></tr><tr><td>2300s</td><td>0</td></tr></table>Happy programming.]]></content:encoded>
			<wfw:commentRss>http://newsyllabus.com/2008/01/03/calendar-problem-revisited/feed/</wfw:commentRss>
		</item>
		<item>
		<title>What&#8217;s in a name?</title>
		<link>http://newsyllabus.com/2008/01/02/whats-in-a-name/</link>
		<comments>http://newsyllabus.com/2008/01/02/whats-in-a-name/#comments</comments>
		<pubDate>Wed, 02 Jan 2008 13:49:01 +0000</pubDate>
		<dc:creator>John</dc:creator>
		
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://newsyllabus.com/2008/01/02/whats-in-a-name/</guid>
		<description><![CDATA[One of the best things about a life in academia is that it begins fresh every few months.Each semester there are new courses, new students, and new pedagogical challenges. And whenyour focus is computing, your topic is a moving target. So while we are guided by certain coreprinciples, we must also continually evolve our knowledge [...]]]></description>
			<content:encoded><![CDATA[<a href="/2008/01/02/whats-in-a-name/"><img src="http://newsyllabus.com/images/posts/whiteRose.jpg" title="white rose" alt="white rose" width="200" height="134" / ></a>One of the best things about a life in academia is that it begins fresh every few months.Each semester there are new courses, new students, and new pedagogical challenges. And whenyour focus is computing, your topic is a moving target. So while we are guided by certain coreprinciples, we must also continually evolve our knowledge and the strategies for communicatingthat knowledge to students. I suspect that all computing educators worthy of the name make changesto their courses almost every time they are offered. Thus the name<a href="http://newsyllabus.com" >New Syllabus</a>.That, and I was trying to find a decent URL and something that would pass a corporate namesearch.I think I&#8217;ll add a version of this post to the new <a href="/about">About</a> page (stickingwith the pedagogical slant).]]></content:encoded>
			<wfw:commentRss>http://newsyllabus.com/2008/01/02/whats-in-a-name/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Welcome</title>
		<link>http://newsyllabus.com/2008/01/01/welcome/</link>
		<comments>http://newsyllabus.com/2008/01/01/welcome/#comments</comments>
		<pubDate>Tue, 01 Jan 2008 17:09:29 +0000</pubDate>
		<dc:creator>John</dc:creator>
		
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://newsyllabus.com/2008/01/01/welcome/</guid>
		<description><![CDATA[I&#8217;m finally getting around to creating a permanent web presence after moving to Virginia.I had glorious plans to get it set up right away, of course, which quickly fell apart as I gotswamped with a new house, new schools (I teach at two now!), and getting the family settled.More on the transition, and the reasons [...]]]></description>
			<content:encoded><![CDATA[<a href="/2008/01/01/welcome/"><img src="http://newsyllabus.com/images/posts/sunBurst.jpg" title="sun burst" alt="sun burst" width="200" height="150" / ></a>I&#8217;m finally getting around to creating a permanent web presence after moving to Virginia.I had glorious plans to get it set up right away, of course, which quickly fell apart as I gotswamped with a new house, new schools (I teach at two now!), and getting the family settled.More on the transition, and the reasons for it, later. Plus there have been some big projectsin the works. Somehow after giving up my &#8220;real job&#8221; I&#8217;m busier than I&#8217;ve ever been.I&#8217;ll use this site to post information about textbook revisions and supplements, and as avehicle for fleshing out ideas for new projects. I&#8217;ll also use it to manage course materials,though I&#8217;ll probably rely more on the web resources at the appropriate school for detailed courseinformation.Questions and comments are always welcome.]]></content:encoded>
			<wfw:commentRss>http://newsyllabus.com/2008/01/01/welcome/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
