<?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>Mark Nelson &#187; Uncategorized</title>
	<atom:link href="http://marknelson.us/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://marknelson.us</link>
	<description>Programming, mostly.</description>
	<lastBuildDate>Fri, 13 Apr 2012 19:25:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Mark&#8217;s Travel Guide to New Zealand</title>
		<link>http://marknelson.us/2012/01/28/marks-travel-guide-to-new-zealand/</link>
		<comments>http://marknelson.us/2012/01/28/marks-travel-guide-to-new-zealand/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 22:37:16 +0000</pubDate>
		<dc:creator>Mark Nelson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://marknelson.us/?p=1428</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style" addthis:url='http://marknelson.us/2012/01/28/marks-travel-guide-to-new-zealand/' addthis:title='Mark&#8217;s Travel Guide to New Zealand' ><a class="addthis_button_twitter"></a><a class="addthis_button_favorites"></a><a class="addthis_button_print"></a><a class="addthis_button_facebook_like"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_compact"></a></div>I recently spent a little over two weeks touring New Zealand. It was a self-driving trip, which meant we got to cover a lot of ground, although certainly the coverage was very shallow. Before this trip, I had not set foot on foreign soil more than one mile from the US border, so the experience [...]]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style" addthis:url='http://marknelson.us/2012/01/28/marks-travel-guide-to-new-zealand/' addthis:title='Mark&#8217;s Travel Guide to New Zealand' ><a class="addthis_button_twitter"></a><a class="addthis_button_favorites"></a><a class="addthis_button_print"></a><a class="addthis_button_facebook_like"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_compact"></a></div><p>I recently spent a little over two weeks touring New Zealand. It was a self-driving trip, which meant we got to cover a lot of ground, although certainly the coverage was very shallow.</p>
<p>Before this trip, I had not set foot on foreign soil more than one mile from the US border, so the experience of going to a foreign country was in itself new. This means I am compelled to share it with you.</p>
<p>Overall New Zealand made me feel very welcome. I would like to move to New Zealand. Barring that, visiting New Zealand as a tourist was a great experience.</p>
<p>I could write a detailed photoblog of our eighteen day journey, but this would be a lot like going to your Uncle&#8217;s house and watching his 90-minute DVD compilation of his trip to Norway &#8211; a bit tedious.</p>
<p>One thing I noticed as a tourist is that it is kind of hard to notice things that are there, but very easy to notice the things that are missing. So my detailed summary of the trip will give you the list of things that I noticed were <i>not</i> in New Zealand &#8211; at least not on my self-driven tour. (I&#8217;d give a link to the fine touring company if they would work out some sort of affiliate program, then you could do it yourself.)</p>
<p><b>Things that don&#8217;t appear to exist in New Zealand:</b></p>
<ul>
<li/>Stop signs
<li/>Iced tea
<li/>Pennies
<li/>Nickels
<li/>Dollar bills
<li/>Insane airport security (domestic only)
<li/>Pickup trucks
<li/>The purported monoculture of sheep
<li/>Moas
<li/>Cosmopolitans, or more generally, grown-up cocktails
<li/>Hot weather
<li/>Air-Conditioned hotel rooms
<li/>Free Wireless
<li/>Reasonably priced Wireless
<li/>Horrifying public restrooms
<li/>4 lane highways
<li/>Any sense of realism about building a country in a volcano/earthquake/tsunami free-fire zone
</ul>
<h4>Pictures and Movies</h4>
<p>A bunch of photos <a href="http://www.flickr.com/photos/snorkel58/sets/72157628844439217/" class="newpage">here</a>.<br/><br />
Some very short videos <a href="http://www.flickr.com/photos/snorkel58/sets/72157628843998801/" class="newpage">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://marknelson.us/2012/01/28/marks-travel-guide-to-new-zealand/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cruelty Redefined: Undergraduates vs. C++ on Linux</title>
		<link>http://marknelson.us/2011/04/25/cruelty_redefined_c_plus_plus_on_linux/</link>
		<comments>http://marknelson.us/2011/04/25/cruelty_redefined_c_plus_plus_on_linux/#comments</comments>
		<pubDate>Tue, 26 Apr 2011 01:23:14 +0000</pubDate>
		<dc:creator>Mark Nelson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://marknelson.us/?p=425</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style" addthis:url='http://marknelson.us/2011/04/25/cruelty_redefined_c_plus_plus_on_linux/' addthis:title='Cruelty Redefined: Undergraduates vs. C++ on Linux' ><a class="addthis_button_twitter"></a><a class="addthis_button_favorites"></a><a class="addthis_button_print"></a><a class="addthis_button_facebook_like"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_compact"></a></div>Edsger W. Dijkstra wrote an influential paper back in 1988 called On the cruelty of really teaching computing science, which advocated an approach strongly grounded in the study of formal systems. While I would be the first to admit that I am not fit to carry the late Dr.&#8217;s punch cards, I would say that [...]]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style" addthis:url='http://marknelson.us/2011/04/25/cruelty_redefined_c_plus_plus_on_linux/' addthis:title='Cruelty Redefined: Undergraduates vs. C++ on Linux' ><a class="addthis_button_twitter"></a><a class="addthis_button_favorites"></a><a class="addthis_button_print"></a><a class="addthis_button_facebook_like"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_compact"></a></div><p>Edsger W. Dijkstra wrote an influential paper back in 1988 called <a href="http://www.cs.utexas.edu/users/EWD/transcriptions/EWD10xx/EWD1036.html" class="newpage">On the cruelty of really teaching computing science</a>, which advocated an approach strongly grounded in the study of formal systems.</p>
<p>While I would be the first to admit that I am not fit to carry the late Dr.&#8217;s punch cards, I would say that if he really wanted to see cruelty, he might have tried his hand at the undergraduate course I taught this semester: <b>C/C++ Programming in a UNIX Environment</b>. This class was cruelty personified.<br />
<span id="more-425"></span><br />
How long did it take you to learn C++? Do you think you could squeeze that into a single undergraduate semester, giving it only the 20% of your attention span that is due? </p>
<p>Now throw into the mix the requirement that you have to learn C as well. </p>
<p>And to keep things interesting, all your work has to be done on a UNIX or Linux machine. You&#8217;ve used Windows since you were 8, and think that <em>cat</em> is a four-legged pet and <i>grep</i> is some sort of gastrointestinal complaint.</p>
<p>Yep, you are in trouble.</p>
<h4>Tricky Assignments</h4>
<p>The good news in all this was the I didn&#8217;t make any of <a href="http://drdobbs.com/blogs/cpp/229401490" class="newpage">Andrew Koenig&#8217;s</a> egregious errors when teaching the <a href="http://www.adultlearn.com/computer-programming.htm" class="newpage">computer programming class</a>. The bad news is that every homework assignment I created looked to my students like two impassable mountain ranges instead of one: an incomprehensible C++ problem to be implemented on an inscrutable O/S, using an IDE that was decidedly <i>not</i> Visual Studio.</p>
<p>Just as an example, for a recent assignment, I had the class warm up with a pure C++ implementation of mergesort, reading a string of words from standard input and writing the sorted list to standard output. Using all the facilities at hand in the C++ standard library meant that the mergesort implementation was a breeze &#8211; about the only piece of the algorithm that required much thought was merging the two subcontainers after dividing and conquering.</p>
<p>After the warmup part of the assignment came the meatier portion: I asked the students to implement the mergesort algorithm by passing the subproblems to child processes. This meant they needed to solve a few very common problems encountered when programming on *IX:</p>
<ul>
<li/>Using fork() to create child processes
<li/>Managing the lifetime of parent and child processes
<li/>Managing unnamed pipes for communication between a parent and child process
<li/>Serializing and deserializing C++ containers so they can be transmitted through a de-objectifying pipe
</ul>
<p>Admittedly, this is not a perfect demonstration of a way to parcel a problem out multiple processes. In fact, if done using a straightforward implementation of the problem you can create a beautiful example of a <a href="http://en.wikipedia.org/wiki/Fork_bomb" class="newpage">fork bomb</a>, bringing your system to its knees. But I thought it would be a good way to get the hang of working with child processes in a somewhat realistic way. (And this <i>could</i> actually be a good way to distribute a sorting process &#8211; if you only forked a limited number times at the top of the merge.)</p>
<p>By fooling around a bit with process names I was even able to do a poor man&#8217;s animation of the process using pstree.</p>
<table border="0" width="100%">
<tr>
<td><center><img src="/attachments/2011/cruelty/screen.png"></center></td>
</tr>
<tr>
<td><center>Figure 1 &#8211; A pstree animation</center></td>
</tr>
</table>
<p>When I worked up the assignment, it seemed like a reasonable assignment to tackle over the course of a week. Alas, at the one week deadline, my inbox was empty. </p>
<h4>Lessons Learned</h4>
<p>This wasn&#8217;t the first assignment that turned out to be a semi-disaster. My Scrabble game board manager saw a similar fate, as did my Scrabble word generator assignment. </p>
<p>As part-time non-tenure track faculty, I don&#8217;t have a lot of say in curriculum development. But after going through this course, I will definitely be passing along a strong recommendation: if we are going to ask students to learn a new language using new tools with a new O/S, we need to modify the class structure so that at least half of the hours are spent in the lab. </p>
<p>When I worked through these problems in a lab environment, it was easy to provide the gentle nudge to help someone who was stuck trying to get Eclipse or NetBeans to do the expected, instead of whatever perverse path they were on. I could help with the C++ compiler errors, which over a decade after standardization are still a travesty. And I could help coax the debugger into providing usable information when looking at standard C++ objects &#8211; which the IDEs will do only grudgingly. In other words, help with the undocumented tips and tricks that experienced C++ programmers take for granted.</p>
<p>At the end of the semester, I do feel pretty good about the class&#8217;s mastery of C++ &#8211; they soaked up as much of this huge language as was humanly possible. UNIX/Linux expertise didn&#8217;t seem to get the same level of commitment &#8211; which is unfortunate but understandable. And I have to admit that C programming took a back seat to C++. There are lot of C++ haters out there, and I don&#8217;t really need to get them riled up, but once you master C++, there aren&#8217;t many times when it makes sense to back down to the much-less capable C language. Unless you&#8217;re getting paid by the hour. Or working for <a href="http://lwn.net/Articles/249460/" class="newpage">Linus</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://marknelson.us/2011/04/25/cruelty_redefined_c_plus_plus_on_linux/feed/</wfw:commentRss>
		<slash:comments>36</slash:comments>
		</item>
	</channel>
</rss>

