<?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>Gaslight &#38; Steam</title>
	<atom:link href="http://www.gaslightandsteam.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.gaslightandsteam.com</link>
	<description>The portfolio and blog of David Bennett</description>
	<lastBuildDate>Sat, 31 Dec 2011 04:39:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>JSP Date Snippet</title>
		<link>http://www.gaslightandsteam.com/java/jsp-date-snippet</link>
		<comments>http://www.gaslightandsteam.com/java/jsp-date-snippet#comments</comments>
		<pubDate>Fri, 14 Oct 2011 23:14:21 +0000</pubDate>
		<dc:creator>David Bennett</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[JSP]]></category>
		<category><![CDATA[JSTL]]></category>

		<guid isPermaLink="false">http://www.gaslightandsteam.com/?p=283</guid>
		<description><![CDATA[Being a traditionalist, I tend to forget some of the things you can do with tag libraries like JSTL above and beyond simple things like outputting information. A colleague asked me about putting the current year on a page and my first response was something like this: &#60;%@ page import=&#34;java.util.*&#34;%&#62; &#60;%@ taglib uri=&#34;http://java.sun.com/jstl/core&#34; prefix=&#34;c&#34;%&#62; &#60;%@ [...]]]></description>
			<content:encoded><![CDATA[<p>Being a traditionalist, I tend to forget some of the things you can do with tag libraries like JSTL above and beyond simple things like outputting information.  A colleague asked me about putting the current year on a page and my first response was something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #339933;">&lt;%</span>@ page <span style="color: #000000; font-weight: bold;">import</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;java.util.*&quot;</span><span style="color: #339933;">%&gt;</span>
<span style="color: #339933;">&lt;%</span>@ taglib uri<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://java.sun.com/jstl/core&quot;</span> prefix<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;c&quot;</span><span style="color: #339933;">%&gt;</span>
<span style="color: #339933;">&lt;%</span>@ taglib uri<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://java.sun.com/jstl/fmt&quot;</span> prefix<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;fmt&quot;</span><span style="color: #339933;">%&gt;</span>
&nbsp;
<span style="color: #339933;">&lt;%</span>
	<span style="color: #003399;">Date</span> date <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> java.<span style="color: #006633;">util</span>.<span style="color: #003399;">Date</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	pageContext.<span style="color: #006633;">setAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;date&quot;</span>, date<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">%&gt;</span>
<span style="color: #339933;">&lt;</span>c<span style="color: #339933;">:</span>set var<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;date&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;${date}&quot;</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;</span>fmt<span style="color: #339933;">:</span>formatDate pattern<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;yyyy&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;${date}&quot;</span> <span style="color: #339933;">/&gt;</span></pre></div></div>

<p>It&#8217;s quite obvious looking at it that there&#8217;s a bit of redundancy in setting the date with a scriptlet and then making it available to JSTL to output with the Format tag library.  That&#8217;s when I came across the solution to use the JSP useBean tag with JSTL resulting in the much simpler solution as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #339933;">&lt;%</span>@ taglib uri<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://java.sun.com/jsp/jstl/core&quot;</span> prefix<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;c&quot;</span> <span style="color: #339933;">%&gt;</span>
<span style="color: #339933;">&lt;%</span>@ taglib uri<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://java.sun.com/jsp/jstl/fmt&quot;</span> prefix<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;fmt&quot;</span><span style="color: #339933;">%&gt;</span>
&nbsp;
<span style="color: #339933;">&lt;</span>jsp<span style="color: #339933;">:</span>useBean id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;now&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;java.util.Date&quot;</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;</span>fmt<span style="color: #339933;">:</span>formatDate var<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;year&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;${now}&quot;</span> pattern<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;yyyy&quot;</span> <span style="color: #339933;">/&gt;</span>
&nbsp;
<span style="color: #339933;">&lt;</span>c<span style="color: #339933;">:</span>out value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;${year}&quot;</span> <span style="color: #339933;">/&gt;</span></pre></div></div>

<p>I don&#8217;t believe it has any version dependencies (as I&#8217;ve encountered with some of the JSTL libraries that only work with the JSP 2.0 spec and the like) and certainly feels cleaner.  Most importantly, it gets rid of the scriptlet and, in the JSP world, that&#8217;s a win.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gaslightandsteam.com/java/jsp-date-snippet/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Maria Mitchell, astronomer</title>
		<link>http://www.gaslightandsteam.com/personal/maria-mitchell-astronomer</link>
		<comments>http://www.gaslightandsteam.com/personal/maria-mitchell-astronomer#comments</comments>
		<pubDate>Fri, 07 Oct 2011 22:05:03 +0000</pubDate>
		<dc:creator>David Bennett</dc:creator>
				<category><![CDATA[AdaLovelaceDay]]></category>
		<category><![CDATA[AdaLovelaceDay11]]></category>
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.gaslightandsteam.com/?p=280</guid>
		<description><![CDATA[This post is in honor of Ada Lovelace Day, an annual day of recognition for women in the STEM disciplines (science, technology, engineering and math) who inspire others by their example and enrich our world through their contributions. After rediscovering my interest in astronomy and getting a membership in the , I&#8217;ve been able to [...]]]></description>
			<content:encoded><![CDATA[<p><em>This post is in honor of Ada Lovelace Day, an annual day of recognition for women in the STEM disciplines (science, technology, engineering and math) who inspire others by their example and enrich our world through their contributions.</em></p>
<p> <img src="http://www.gaslightandsteam.com/wp-content/uploads/2011/10/220px-Mitchell_Maria_telescope.jpg" alt="Maria Mitchell, astronomer, with Telescope" title="220px-Mitchell_Maria_telescope" width="220" height="359" align="right" style="padding-left: 15px;" class="size-full wp-image-281" /></p>
<p>After rediscovering my interest in astronomy and getting a membership in the <a href="http://www.seattleastro.org/" title="Seattle Astronomical Society"></a>, I&#8217;ve been able to start looking at the stars and sharing my hobby with my family.  We even got a look at what I think was the recent <a href="http://www.king5.com/news/local/Distant-supernova-visible-from-Earth-129454643.html" title"supernova near the big dipper'>supernova near the big dipper</a> that was visible from Earth and a really good look at Venus as it&#8217;s been making its presence known last month.</p>
<p>I wish I had been aware of Maria Mitchell when I was young and first becoming interested in astronomy.  Not only do I think a variety of role models are critical to anyone studying sciences, her words resonate today:<em><br />
If for four hours a day you studied, year after year, the science of language, for instance, do you suppose you would not be a linguist? Do you put the mere pleasing of some social party, and the reception of a few compliments, against the mental development of four hours a day of study of something for which you were born?</em></p>
<p>She&#8217;s the topic of a book detailing her life and how science became to be a masculine domain from which women were excluded, <a href="http://www.amazon.com/Maria-Mitchell-Sexing-Science-Astronomer/dp/0807021423" title="Maria Mitchell and the Sexing of Science book"><em>Maria Mitchell and the Sexing of Science: An Astronomer Among the American Romantics</em></a>.  Throughout her life, she was a proponent for more women studying science, and well aware of what is lost when the ideas and inspirations of women are absent.  She also pointed out the necessity of woman, as with all scientists, to ask questions and to not simply accept those in authority.  <em>&#8220;The great gain would be freedom of thought. Women, more than men, are bound by tradition and authority. What the father, the brother, the doctor, and the minister have said has been received undoubtingly. Until women throw off this reverence for authority they will not develop. When they do this, when they come to truth through their investigations, when doubt leads them to discovery, the truth which they get will be theirs, and their minds will work on and on unfettered.&#8221;</em></p>
<p>There&#8217;s plenty of information about Maria Mitchell and it&#8217;s worth reading about her life and her thoughts in her own words.</p>
<ul>
<li><a href="http://vcencyclopedia.vassar.edu/faculty/original-faculty/maria-mitchell/maria-mitchell.html" title="Maria Mitchell at Vassar University">Maria Mitchell at Vassar University</a>
</li>
<li><a href="http://www25.uua.org/uuhs/duub/articles/mariamitchell.html" title="Unitarian Universalist Biography">Brief biography at the Dictionary of Unitarian Universalist Biography</a></li>
<li><a href="http://en.wikipedia.org/wiki/Maria_Mitchell" title="Maria Mitchell on Wikipedia">Wikipedia entry</a></li>
<li><a href="http://www.gutenberg.org/ebooks/10202"><em>Maria Mitchell: Life, Letters, and Journals by Maria Mitchell</em> at Project Gutenberg</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.gaslightandsteam.com/personal/maria-mitchell-astronomer/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Site Revisions</title>
		<link>http://www.gaslightandsteam.com/info/site-revisions</link>
		<comments>http://www.gaslightandsteam.com/info/site-revisions#comments</comments>
		<pubDate>Wed, 16 Feb 2011 17:34:55 +0000</pubDate>
		<dc:creator>David Bennett</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.gaslightandsteam.com/?p=265</guid>
		<description><![CDATA[After some time running this site under Joomla! with the blog being handled by WordPress, I&#8217;ve finally switched over to only use WordPress. Although I like the features of a full-fledged content management system and Joomla! has some great features, it was both a little more heavy-weight than I needed and the maintenance tasks to [...]]]></description>
			<content:encoded><![CDATA[<p>After some time running this site under Joomla! with the blog being handled by WordPress, I&#8217;ve finally switched over to only use WordPress.  Although I like the features of a full-fledged content management system and Joomla! has some great features, it was both a little more heavy-weight than I needed and the maintenance tasks to keep it up-to-date were taking away from other work that I wanted to do.  In particular, even though I&#8217;m using the excellent <a href="http://heliologue.com/projects/now-reading-reloaded/">Now Reading Reloaded</a> plugin to manage my library (after switching from the original Now Reading plugin), it&#8217;s no longer being updated and there are some features that I&#8217;d really like it to have.  Unfortunately, the way the plugin is architected, I&#8217;ve come to conclusion that I&#8217;d be better off writing a new plugin, particularly if I wanted a less hacked-together way to store authors as separate entities in their own database table.  My library has also grown to a size that I&#8217;d like to better be able to paginate results and other things like that.</p>
<p>Meanwhile, I&#8217;ve temporarily removed some pages, so if you&#8217;ve come looking for them, my apologies.  I&#8217;ll be adding things back along with more things besides in the coming weeks.  If you notice something missing and care to offer constructive feedback, I&#8217;d be happy to hear from you!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gaslightandsteam.com/info/site-revisions/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Libraries Matter</title>
		<link>http://www.gaslightandsteam.com/uncategorized/libraries-matter</link>
		<comments>http://www.gaslightandsteam.com/uncategorized/libraries-matter#comments</comments>
		<pubDate>Thu, 03 Feb 2011 06:27:06 +0000</pubDate>
		<dc:creator>David Bennett</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.gaslightandsteam.com/blog/?p=260</guid>
		<description><![CDATA[The flailing world economy has affected everything, nothing more than the things we take for granted like public parks and libraries. The King County Library System, of which my local library is part, faces chronic budget shortfalls, though they never seem as severe as the woes experienced by Seattle Public Libraries. The rhetoric and reasoning [...]]]></description>
			<content:encoded><![CDATA[<p>The flailing world economy has affected everything, nothing more than the things we take for granted like public parks and libraries.  The King County Library System, of which my local library is part, faces chronic budget shortfalls, though they never seem as severe as the <a href="http://www.seattlepi.com/local/427591_library30.html">woes experienced by Seattle Public Libraries</a>.  The rhetoric and reasoning behind cutting back at libraries always seems to focus on the idea that libraries are a luxury or that needs to be run as a business.  When we talk about the efficiency of libraries, we miss the point, since libraries are more than the sum of their parts.</p>
<p>Facing even more severe budgetary problems, many libraries in Britain are on the block for closure.  For that reason, people like author Philip Pullman are speaking out about the short-sighted nature of the closures.  In a <a href="http://falseeconomy.org.uk/blog/save-oxfordshire-libraries-speech-philip-pullman">recent speech by Mr. Pullman</a>, he said, in part:</p>
<blockquote><p>&#8220;It’s imported the worst excesses of market fundamentalism into the one arena that used to be safe from them, the one part of our public and social life that used to be free of the commercial pressure to win or to lose, to survive or to die, which is the very essence of the religion of the market. Like all fundamentalists who get their clammy hands on the levers of political power, the market fanatics are going to kill off every humane, life-enhancing, generous, imaginative and decent corner of our public life. I think that little by little we’re waking up to the truth about the market fanatics and their creed.&#8221;
</p></blockquote>
<blockquote><p>&#8220;And you could go a little further back to the end of the nineteenth century and look at the ideas of “scientific management”, as it was called, the idea of Frederick Taylor that you could get more work out of an employee by splitting up his job into tiny parts and timing how long it took to do each one, and so on – the transformation of human craftsmanship into mechanical mass production.&#8221;
</p></blockquote>
<p>He also speaks about the wonders of libraries, their place in society and much more.  If you spend time at your local library, you know these things and the importance of libraries and the skilled staff who work in those places.  But articulating that defense to someone who sees things only in terms of dollars, who doesn&#8217;t think they should be taxed for services they don&#8217;t use (a notion that ignores the interconnected nature of society and how funding for schools has an impact on crime rates or how parks affect overall quality of life &#8211; intangibles that don&#8217;t lend themselves to line items in a budget), is a difficult proposition.  The way Mr. Pullman expresses his opposition to the idea that government needs to be run like a business resonates perfectly with my thoughts on the subject.</p>
<p>It was at my local library when I was young that I chanced upon a copy of the script to <a href="http://www.imdb.com/title/tt0071853/"><em>Monty Python and the Holy Grail</em></a>, complete with scenes cut for reasons of length.  Perhaps not life-changing at that age, but definitely one of the more memorable finds among the cornucopia of offerings that could be found at the Vashon Public Library.  And though I use computers all the time and make my living building websites, I still visit the library with my daughter almost every week.  Because the internet isn&#8217;t a place and a website isn&#8217;t a book and a library isn&#8217;t a business.  A library is something unique and wonderful that can&#8217;t be replaced.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gaslightandsteam.com/uncategorized/libraries-matter/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Data Visualization and LinkedIn</title>
		<link>http://www.gaslightandsteam.com/info/data-visualization-and-linkedin</link>
		<comments>http://www.gaslightandsteam.com/info/data-visualization-and-linkedin#comments</comments>
		<pubDate>Thu, 27 Jan 2011 04:58:08 +0000</pubDate>
		<dc:creator>David Bennett</dc:creator>
				<category><![CDATA[Data Visualization]]></category>
		<category><![CDATA[Information]]></category>
		<category><![CDATA[Professional]]></category>

		<guid isPermaLink="false">http://www.gaslightandsteam.com/blog/?p=255</guid>
		<description><![CDATA[As a tool for professional networking, LinkedIn does many things very well, but I&#8217;ve never found lists of contacts or friends (a la Facebook) to be particularly compelling. Over at LinkedIn Labs can be found some tools and experiments that look to expand what LinkedIn is capable of. I finally had a chance to play [...]]]></description>
			<content:encoded><![CDATA[<p>As a tool for professional networking, <a href="http://www.linkedin.com">LinkedIn</a> does many things very well, but I&#8217;ve never found lists of contacts or friends (a la Facebook) to be particularly compelling.  Over at <a href="http://www.linkedinlabs.com/">LinkedIn Labs</a> can be found some tools and experiments that look to expand what LinkedIn is capable of.  I finally had a chance to play with <a href="http://inmaps.linkedinlabs.com/network">LinkedIn Maps</a> (requires a LinkedIn account) and the results are striking, as an at-a-glance look at who you know and how those people relate to each other.  There&#8217;s some odd outliers, but it&#8217;s pretty obvious in my circle who worked together with me at each company.</p>
<p><a href="http://inmaps.linkedinlabs.com/share/David_%28Mcmasters%29_Bennett/321925693440484726465386119275024881464"><img src="http://www.gaslightandsteam.com/wp-content/uploads/2011/01/LinkedIn-map-visualized1.jpg" alt="LinkedInMap for David Bennett" title="LinkedInMap for David Bennett" width="650" height="381" class="alignnone size-full wp-image-259" /></a></p>
<p>And while you&#8217;re at it, if you need a resume, you can easily <a href="http://resume.linkedinlabs.com/">generate a nicely formatted resume from your LinkedIn profile</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gaslightandsteam.com/info/data-visualization-and-linkedin/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Anita Borg&#8217;s Legacy on Ada Lovelace Day</title>
		<link>http://www.gaslightandsteam.com/personal/anita-borgs-legacy-on-ada-lovelace-day</link>
		<comments>http://www.gaslightandsteam.com/personal/anita-borgs-legacy-on-ada-lovelace-day#comments</comments>
		<pubDate>Wed, 24 Mar 2010 13:40:30 +0000</pubDate>
		<dc:creator>David Bennett</dc:creator>
				<category><![CDATA[AdaLovelaceDay]]></category>
		<category><![CDATA[AdaLovelaceDay10]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.gaslightandsteam.com/blog/?p=236</guid>
		<description><![CDATA[Today is Ada Lovelace Day, an international day of blogging to draw attention to women excelling in technology. Ada Lovelace was notable for the legacy she left and the inspiration she provided. New generations of women have, in turn, inspired others to enter fields of science and technology, each having an effect that increases over [...]]]></description>
			<content:encoded><![CDATA[<p>Today is Ada Lovelace Day, an international day of blogging to draw attention to women excelling in technology.  Ada Lovelace was notable for the legacy she left and the inspiration she provided.  New generations of women have, in turn, inspired others to enter fields of science and technology, each having an effect that increases over time.  Of these, computer scientist <a href="http://anitaborg.org/about/history/anita-borg/">Anita Borg</a> stands out as an amazing person who worked tirelessly to provide inspiration and opportunities for other women in computers and technology.</p>
<p>Among her many accomplishments, Dr. Borg founded the <a href="http://gracehopper.org/2010/">Grace Hopper Celebration of Women in Computing</a>, an annual conference that embodies the ideals of Ada Lovelace Day, as well as those of its founder.  Be sure to check out the work they do, not to mention the outstanding women recognized by the <a href="http://anitaborg.org/">Anita Borg Institute</a>, the organization that bears her name because of the work she did.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gaslightandsteam.com/personal/anita-borgs-legacy-on-ada-lovelace-day/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Populares Et Optimates, A Game Of Rome Part 2</title>
		<link>http://www.gaslightandsteam.com/web-development/javascript/populares-et-optimates-a-game-of-rome-part-2</link>
		<comments>http://www.gaslightandsteam.com/web-development/javascript/populares-et-optimates-a-game-of-rome-part-2#comments</comments>
		<pubDate>Sun, 07 Feb 2010 06:22:44 +0000</pubDate>
		<dc:creator>David Bennett</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.gaslightandsteam.com/blog/?p=231</guid>
		<description><![CDATA[Watching card manipulation by Dan and Dave Buck including those on their site like the demo video of the Akira flourish got me thinking quite a bit about card shuffling. After seeing some of the false shuffles and other manipulations and having read about games where the shuffling algorithm was only pseudo-random, I wanted to [...]]]></description>
			<content:encoded><![CDATA[<p>Watching card manipulation by Dan and Dave Buck including those on their site like the demo video of the <a href="http://shop.dananddave.com/akira.html">Akira flourish</a> got me thinking quite a bit about card shuffling.  After seeing some of the false shuffles and other manipulations and having read about games where the shuffling algorithm was only pseudo-random, I wanted to make sure that the card shuffling for my game was at least adequate enough to make the game work.</p>
<p>If you&#8217;re not familiar with Dave and Dan, check out this video advertisement for their set of DVDs over at Theory 11:</p>
<p><embed src="http://cdn.theory11.com/embed-player.swf" type="application/x-shockwave-flash" width="480" height="395" allowfullscreen="true" allowscriptaccess="always" flashvars="vn=/previews/Trilogy_Preview_Final.flv&#038;vt=http://www.theory11.com/tricks/img/trilogy_videothumb.jpg&#038;rp=/tricks/trilogy.php"></embed></p>
<p>Wikipedia has a good article discussing <A href="http://en.wikipedia.org/wiki/Shuffling">shuffling cards and computer algorithms for shuffling</a>.</p>
<p>An example shuffle algorithm in Javascript would be this <a href="http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle">implementation of Durstenfeld&#8217;s algorithm, a modern version of Fisher-Yates</a> that looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> array_shuffle <span style="color: #009900;">&#40;</span>aArray<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> i<span style="color: #339933;">,</span> j<span style="color: #339933;">,</span> mTemp<span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>i <span style="color: #339933;">=</span> aArray.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #006600; font-style: italic;">// mTemp, j initialized here for shorter code.</span>
        j <span style="color: #339933;">=</span> parseInt <span style="color: #009900;">&#40;</span>Math.<span style="color: #660066;">random</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> i<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        mTemp <span style="color: #339933;">=</span> aArray <span style="color: #009900;">&#91;</span><span style="color: #339933;">--</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        aArray <span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> aArray <span style="color: #009900;">&#91;</span>j<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        aArray <span style="color: #009900;">&#91;</span>j<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> mTemp<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>For the random number generation, I prefer this, but I haven&#8217;t exercised it in order to see if it makes a difference, though seeing parseInt in the above makes me wonder about its presence.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">j <span style="color: #339933;">=</span> <span style="color: #CC0000;">1</span> <span style="color: #339933;">+</span> Math.<span style="color: #660066;">floor</span><span style="color: #009900;">&#40;</span>Math.<span style="color: #660066;">random</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> i<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>As for the cards in the game, they are represented in the Javascript as objects and can be either people or actions.  People cards are members of one or the other faction or a third group of loosely-aligned Romans who may be swayed to one side or the other.  They have attributes including the side they belong to, whether their side may be changed, their name and current rank.  Action cards represent the cards that are used during play.  Actions include ranks and positions that may be assigned to People and events like riots, assassinations, and plagues.  Action cards often have negative or side-effects, sometimes costing the player who uses it as much as his opponent.  Other cards require votes from the Senate such as Exile or the appointment of Generals.</p>
<p>There are a variety of collections that I&#8217;ll refer to as decks.  There are two decks of people, one for each player.  Event decks include one hand for each player, the drawing deck and the discard deck.  Additionally, there may be individual cards in play that belong to no particular deck.</p>
<p>I considered a number of names for the game including <em>Optimates et Populares</em>, but that doesn&#8217;t roll off the tongue.  The working title that I came up with is <en>Marius and Sulla</em> after the two men who fought together in the Social War and then became bitter enemies.  The game centers around the time where partisans identified themselves less with the espoused philosophies each represented and more with the personalities themselves.  The short version of the game covers the six years following the Social War (88 BC &#8211; 82 BC).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gaslightandsteam.com/web-development/javascript/populares-et-optimates-a-game-of-rome-part-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SPQR Or Pontifex Maximus, A Game Of Rome Part 1</title>
		<link>http://www.gaslightandsteam.com/web-development/spqr-or-pontifex-maximus-a-game-of-rome-part-1</link>
		<comments>http://www.gaslightandsteam.com/web-development/spqr-or-pontifex-maximus-a-game-of-rome-part-1#comments</comments>
		<pubDate>Fri, 29 Jan 2010 18:59:05 +0000</pubDate>
		<dc:creator>David Bennett</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[History]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.gaslightandsteam.com/blog/?p=228</guid>
		<description><![CDATA[I&#8217;ve decided to create a web-based game set in early Rome. It&#8217;s intended to be about the leaders of the time with an emphasis on politics rather than military strategy. I want the latter to happen &#8220;off-screen&#8221; as it were, but with the option for legions to show up at the gates of Rome when [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve decided to create a web-based game set in early Rome.  It&#8217;s intended to be about the leaders of the time with an emphasis on politics rather than military strategy.  I want the latter to happen &#8220;off-screen&#8221; as it were, but with the option for legions to show up at the gates of Rome when needed to influence political events.</p>
<p>The biggest difficulty was selecting a time period that provided the right amount of variety, particularly political in-fighting and manuevering without too much military action (such as the wars with Carthage).  In that regard, the early and late periods of the Republic offered some interesting options, as did the time of the First Triumvirate and the period following the death of Caligula, to name but a few points in the turbulent history of the Romans.</p>
<p>I&#8217;m particularly fond of the political manueverings described in <em>Imperium</em> by Robert Harris and in the BBC production of <em>I, Claudius</em> (for which I must confess that I haven&#8217;t read the book by Robert Graves).  There&#8217;s an immediacy to the politics combined with a certain degree of brutality that keeps one from longing overmuch for the good old days.  So the more I thought about it, the less Imperial Rome appealed to me and the more I wanted to go back a little further in time.  At the same time, <em>Lavinia</em> by Ursula Leguin brings the events of Virgil&#8217;s Aeneid to life brilliantly with the interplay between the tribes of the area and the followers of Aeneas.</p>
<p>Out of all the time periods that I think would make for an worthwhile game, the period immediately following the <a href="http://en.wikipedia.org/wiki/Social_War_%2891%E2%80%9388_BC%29">Social War</a>, a crisis point in Roman history, sounded extremely interesting.  <a href="http://en.wikipedia.org/wiki/Sulla%27s_first_civil_war">Sulla&#8217;s First Civil War</a> with the struggle between the optimates and populares (and I&#8217;m simplifying matters greatly since it wasn&#8217;t that black and white) made for some turbulent times with lots of political and military manuevering.  Throw in assassinations, exiles, plagues, riots and external threats like Mithridates of Pontus, and you have a good deal of elements to work with.</p>
<p>As they say, <em>plus ça change, plus c&#8217;est la même chose</em>.  The politics of the Roman Republic and the Roman Empire have much in common with the infighting during the War of the Roses and the gangland warfare of the Roaring Twenties.  For that reason, I wanted to capture some of the feel of the Avalon Hill game <em>Kingmaker</em>, minus the board and tediousnous of moving armies around, with the fast-paced play of <em>Family Business</em>, but with a more historical feel and slightly more elaborate mechanics.</p>
<p>Before starting work, I did some research on already existing games that covered both the time period I was interested in with the politics in a card game or simple board game version.  I was positive there&#8217;d be a plethora of games of all stripes, some very similar to what I had in mind.  Surprisingly, the list wasn&#8217;t nearly as long as I expected, though I&#8217;m sure I missed  more than a couple.  My short list of games that aren&#8217;t strategy games and that otherwise capture some of the elements I was looking for are as follows:</p>
<ul>
<li><a href="http://boardgamegeek.com/boardgame/50862/caligula">Caligula</a> from Post Scriptum/Elfinwerks</li>
<li><a href="http://valleygames.ca/our-games/classic-line/republic-of-rome/">Republic of Rome</a> from Valley Games Boardgame</li>
<li><a href="http://www.queen-games.de/index.php?id=4427----2>Roma</a> from Queen Games</li>
<li><a href="http://www.riograndegames.com/games.html?id=44">Caesar &#038; Cleopatra</a> from Rio Grande Games</li>
<li><a href="http://www.cambridgegames.com/">Glory to Rome</a> from Cambridge Games Factory</li>
<li><a href="http://www.gmtgames.com/p-20-sword-of-rome.aspx">Sword of Rome</a> from GMT Games</li>
<li><a href="http://www.mayfairgames.com/shop/product/0480-0499/pages/0490.htm">Quo Vadis</a> from Mayfair Games</li>
<li><a href="http://www.angelfire.com/games2/warpspawn/RIB.html">Rome is Burning</a> from Warp Spawn Games</li>
<li><a href="http://www.ystari.com/wpe/?cat=10">Sylla</a> from Ystari Games</li>
<li><a href="http://www.fantasyflightgames.com/edge_minisite.asp?eidm=17">Tribune: Primus Inter Pares</a> from Fantasy Flight Games</li>
<li><a href="http://www.indieboardsandcards.com/triumvirate.php">Triumvirate</a> from Indie Boards and Cards</li>
</ul>
<p>Certainly, some of these games are ones that I&#8217;d really like to play, particularly <em>Triumvirate</em>.  But before I do that, I&#8217;d like to get my game up and running.  First up, a paper prototype.  Much like website usability testing with paper mockups and wireframes, I plan to make some cards and to try some mechanics so I can see how they play out.  I&#8217;ll discuss that in my next on this subject.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gaslightandsteam.com/web-development/spqr-or-pontifex-maximus-a-game-of-rome-part-1/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>You&#8217;re More Skilled Than You Think</title>
		<link>http://www.gaslightandsteam.com/professional/youre-more-skilled-than-you-think</link>
		<comments>http://www.gaslightandsteam.com/professional/youre-more-skilled-than-you-think#comments</comments>
		<pubDate>Thu, 14 Jan 2010 21:40:11 +0000</pubDate>
		<dc:creator>David Bennett</dc:creator>
				<category><![CDATA[Professional]]></category>

		<guid isPermaLink="false">http://www.gaslightandsteam.com/blog/?p=224</guid>
		<description><![CDATA[When you&#8217;re in the trenches slinging code, it&#8217;s very easy to become disillusioned about your skills. Without a frame of reference, tasks you think should be easy become mind-bendingly difficult and there&#8217;s no light at the end of the tunnel. That&#8217;s certainly been my experience developing for the web and also in designing games. In [...]]]></description>
			<content:encoded><![CDATA[<p>When you&#8217;re in the trenches slinging code, it&#8217;s very easy to become disillusioned about your skills.  Without a frame of reference, tasks you think should be easy become mind-bendingly difficult and there&#8217;s no light at the end of the tunnel.  That&#8217;s certainly been my experience developing for the web and also in designing games.  In the latter case, it&#8217;s even harder because you can easily convince yourself that no one in their right mind will ever enjoy the gameplay you&#8217;ve devoted yourself to for months.  I read a post today John Nunemaker that he succinctly titled, &#8220;<a href="http://railstips.org/blog/archives/2010/01/12/i-have-no-talent/">I Have No Talent</a>&#8220;.  He says:</p>
<blockquote><p>
I am sick of hearing people say, “Oh, I love your code, I wish I could do that.” You can. The only reason you can’t is because you don’t practice enough. I used to think that I wasn’t smart enough. I was jealous of those that did crazy code stuff that I couldn’t even comprehend. Then, one day, I ran into something I did not understand and instead of giving up, I pushed through.
</p></blockquote>
<p>His blog post reminds me of a discussion I had with one of the programmers on Forza Motorsport.  At one point, I made an off-hand coment about the complexity and difficulty of what he did in working with the Cambridge Research Center.  His response was much the same as Mr. Nunemaker&#8217;s, albeit a bit more curmudgeonly.  In short, where I perceived this baffling artifice of dazzlingly complex code, he saw it as something that anyone could learn to do with enough time and effort.  His insight helped me to keep slugging away at writing my first C# application and not becoming discourage at the intricacies of serializing and deserializing XML.</p>
<p>Working with senior developers has given me insight into how to do some pretty amazing things with computers.  Seeing the frustrations of junior developers has taught me how aptitude is different from knowledge.  In some cases, things never click, but in the vast majority of instances, it&#8217;s just a matter of experience and learning.  When I taught basic computer classes through the King County Library System (for those in the Puget Sound region, the <a href="http://www.kcls.org/usingthelibrary/computers_internet/computerlabs.cfm">KCLS computer classes</a> are a great introduction for novices and they&#8217;re free), I got see many people who had never used a computer before gradually come to the realization that surfing the web or using Microsft Word wasn&#8217;t nearly as difficult as they feared it would be.</p>
<p>So if you want a more objective appraisal of your development skills, try teaching someone else what you know.  And if you want to know whether your game is actually any fun, let someone else play it.  But that&#8217;s a post for another time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gaslightandsteam.com/professional/youre-more-skilled-than-you-think/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Process Buzzwords and Gemba Walks</title>
		<link>http://www.gaslightandsteam.com/professional/process-buzzwords-and-gemba-walks</link>
		<comments>http://www.gaslightandsteam.com/professional/process-buzzwords-and-gemba-walks#comments</comments>
		<pubDate>Mon, 11 Jan 2010 19:50:07 +0000</pubDate>
		<dc:creator>David Bennett</dc:creator>
				<category><![CDATA[Lean]]></category>
		<category><![CDATA[Processes]]></category>
		<category><![CDATA[Professional]]></category>

		<guid isPermaLink="false">http://www.gaslightandsteam.com/blog/?p=218</guid>
		<description><![CDATA[Looking out the window where I work, my co-workers and I can see the steady progress on the construction of Amazon.com&#8217;s new buildings in the South Lake Union neighborhood. Today, safety-vested and hard-hatted troop of people came parading through in the rain, presumably on a tour to see the progress being made. Since we use [...]]]></description>
			<content:encoded><![CDATA[<p>Looking out the window where I work, my co-workers and I can see the steady progress on the construction of Amazon.com&#8217;s new buildings in the South Lake Union neighborhood.  Today, safety-vested and hard-hatted troop of people came parading through in the rain, presumably on a tour to see the progress being made.  Since we use Lean processes, it seemed analogous to a &#8220;<a href="http://theleanthinker.com/2009/01/28/walking-the-gemba/">gemba walk</a>&#8221; that our managers are supposed to conduct regularly.</p>
<p>But why use a term like gemba walk when the Japanese word <em>gemba</em> has a literal meaning of &#8220;factory floor&#8221; and applies to an industrial process rather than the development of software?  Further, for non-Japanese speakers, why use the specific Japanese word when there are plenty of English words that are more immediately understandable to outsiders (those not engaged in applying Lean methodology in the workplace)?  It&#8217;s not even so much that using this word jars the ear of an English speaker, but that other words to refer to other parts of the process are not used or are, in fact, translated.  In a workplace that also embraces <em>kaizen</em> (lit. &#8220;improvement&#8221;), why are terms like <em>muda</em> (waste) and <em>seiketsu</em> (standardization) not used?  When Lean practitioners do recognize waste, they often fail to recognize the differentiation that would be captured by proper use of the Japanese terms (specifically, <em>muda</em>, <em>muri</em>, and <em>mura</em>, the latter two being distinct from more general <a href="http://en.wikipedia.org/wiki/Muda_%28Japanese_term%29">waste</a> that comes from an inexact translation of <em>muda</em>).  To me, as an occasional speaker of Japanese, the reason to use the foreign word is so that the specific nuance of that word isn&#8217;t lost or because the translation is too inexact.</p>
<p>To my mind, using the term <em>gemba</em> smacks of putting a new coat of paint on the idea of <a href="http://www.brianbabcock.com/management-by-walking-around.shtml">management by walking around</a>, albeit with a formally defined set of goals and methods.  However, I think the formality of the process, typified by the use of ill-defined buzz words, becomes a waste all its own.  The danger is that <a href="http://joeelylean.blogspot.com/2007/08/shallow-gemba-deep-gemba.html">the process becomes a meaningless exercise</a>: &#8220;It’s a &#8216;drive-by&#8217; gemba. No matter how sincere, it is shallow.&#8221;</p>
<p>On a related note, the term <em>kaizen</em> rolls off the tongue easier than <em>Kontinuierlicher Verbesserungspozess</em> (such as that employed by Volkswagen), the latter being more in the nature of <a href="http://www.focusedmanagement.com/knowledge_base/articles/fmi_articles/middle/volsaga.htm">focussed improvement on a specific process</a> and being more punctuated than the Japanese process.</p>
<p><strong>Addendum:</strong> Regarding the use of Japanese terms, <a href="http://gotboondoggle.blogspot.com/2010/01/english-speaking-lean.html">Mike Wroblewski</a> has some excellent points and links to arguments both pro and con.  In case it&#8217;s not clear, I agree with him and don&#8217;t think that the Japanese terms should be abolished, but rather that practitioners shouldn&#8217;t let the term obscure the intent.  By all means use the appropriate terminology to effect the changes the organization wishes to see.  If the changes aren&#8217;t occurring, then perhaps the managers performing their gemba walk has gotten bogged down in the terminology or process and need to spend more time listening to what is actually being said.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gaslightandsteam.com/professional/process-buzzwords-and-gemba-walks/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

