<?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>Being Mark Cohen &#187; Programming</title>
	<atom:link href="http://beingmarkcohen.com/?feed=rss2&#038;cat=11" rel="self" type="application/rss+xml" />
	<link>http://beingmarkcohen.com</link>
	<description>Mark Cohen is a CIO at a leading Australian online retailer and is a hands-on, sleeves-rolled-up, code-cutting geek. He lives in Sydney, Australia with his wife and boys and can sometimes be spotted puffing and panting as he runs at Maroubra Beach</description>
	<lastBuildDate>Tue, 17 Aug 2010 11:13:15 +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>Exploit-Me</title>
		<link>http://beingmarkcohen.com/?p=335</link>
		<comments>http://beingmarkcohen.com/?p=335#comments</comments>
		<pubDate>Thu, 05 Jun 2008 00:43:37 +0000</pubDate>
		<dc:creator>Mark Cohen</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://beingmarkcohen.com/?p=335</guid>
		<description><![CDATA[That title would get attention It also happens to be the name of a set of tools by Security Compass. Security Compass Exploit-Me tools are (currently) free Firefox Add-ons that you can use to test your sites for XSS and SQL injection vulnerabilities, as well as unauthorized resource access testing. I&#8217;ve started running them on [...]]]></description>
			<content:encoded><![CDATA[<p>That title would get attention <img src='http://beingmarkcohen.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   It also happens to be the name of a set of tools by Security Compass.  <a href="http://www.securitycompass.com/exploitme.shtml">Security Compass Exploit-Me</a> tools are (currently) free Firefox Add-ons that you can use to test your sites for <a href="http://en.wikipedia.org/wiki/Cross-site_scripting">XSS</a> and <a href="http://en.wikipedia.org/wiki/SQL_injection">SQL injection</a> vulnerabilities, as well as unauthorized resource access testing.  I&#8217;ve started running them on some of our major traffic pages and thankfully they haven&#8217;t come up with anything.  Well worth a look though, if you&#8217;re involved in web development – especially the SQL injection one if you use SQL Server, as there&#8217;s some <a href="http://www.darkreading.com/document.asp?doc_id=153921&amp;WT.svl=news1_1">serious</a><br />
		<a href="http://www.networkworld.com/community/node/27843">SQL</a><br />
		<a href="http://www.eweek.com/c/a/Security/Botnet-Installs-SQL-Injection-Tool/">Injection</a> going around now.</p>
]]></content:encoded>
			<wfw:commentRss>http://beingmarkcohen.com/?feed=rss2&amp;p=335</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>flogr &#8211; Instant Flickr-powered Photoblog</title>
		<link>http://beingmarkcohen.com/?p=306</link>
		<comments>http://beingmarkcohen.com/?p=306#comments</comments>
		<pubDate>Sun, 13 Apr 2008 13:08:20 +0000</pubDate>
		<dc:creator>Mark Cohen</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[photography]]></category>

		<guid isPermaLink="false">http://beingmarkcohen.com/?p=306</guid>
		<description><![CDATA[I&#8217;ve been on the lookout for a good photoblog package for a while. Tonight I found flogr. Flogr is a very clean implementation of a photoblog &#8220;web layer&#8221; using the Flickr API. The site is highly configurable, and there are a few canned themes available. This product is awesome. You can see my implementation using [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been on the lookout for a good photoblog package for a while.  Tonight I found <a href="http://code.google.com/p/flogr/" target="_blank">flogr</a>.  Flogr is a very clean implementation of a photoblog &#8220;web layer&#8221; using the Flickr API.  The site is highly configurable, and there are a few canned themes available.  This product is awesome.  You can <a href="http://beingmarkcohen.com/photo" target="_blank">see my implementation</a> using it out-the-box; I haven&#8217;t changed anything other than configuration options.</p>
<p>One thing to watch out for: The application accesses your photos as an anonymous user &#8211; so if you have restricted access to the originals then it can only see the next size up.  You&#8217;ll know what I&#8217;m talking about if your photos look pixellated.  To fix this you need to change the photos&#8217; license option to &#8220;creative commons&#8221; &#8211; or probably uploading a bigger original and keeping all rights reserved would also work (didn&#8217;t try that yet).  Now I&#8217;ll have to follow in @<a href="http://www.nickhodge.com/blog/archives/2508" target="_blank">NickHodge</a>&#8216;s footsteps and go WordPress theme hunting to find something that matches my swish new photoblog <img src='http://beingmarkcohen.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://beingmarkcohen.com/?feed=rss2&amp;p=306</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>30 spare minutes this xmas? Learn Cocoa</title>
		<link>http://beingmarkcohen.com/?p=276</link>
		<comments>http://beingmarkcohen.com/?p=276#comments</comments>
		<pubDate>Tue, 25 Dec 2007 11:36:57 +0000</pubDate>
		<dc:creator>Mark Cohen</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://beingmarkcohen.com/?p=276</guid>
		<description><![CDATA[via TUAW &#8211; there&#8217;s a tutorial on cocoa dev central that walks you through building a Cocoa app. If you have a half an hour to spare and you&#8217;re a non-mac-developer like me, and you own a mac, have a look at Cocoa Dev Central: Learn Cocoa. It&#8217;s a simple tutorial assuming no previous experience.]]></description>
			<content:encoded><![CDATA[<p>via TUAW &#8211; there&#8217;s a tutorial on cocoa dev central that walks you through building a Cocoa app.  If you have a half an hour to spare and you&#8217;re a non-mac-developer like me, and you own a mac, have a look at
<p><a href="http://cocoadevcentral.com/d/learn_cocoa/">Cocoa Dev Central: Learn Cocoa</a>. It&#8217;s a simple tutorial assuming no previous experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://beingmarkcohen.com/?feed=rss2&amp;p=276</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yahoo UI Session</title>
		<link>http://beingmarkcohen.com/?p=226</link>
		<comments>http://beingmarkcohen.com/?p=226#comments</comments>
		<pubDate>Tue, 01 May 2007 17:38:15 +0000</pubDate>
		<dc:creator>Mark Cohen</dc:creator>
				<category><![CDATA[MIX07]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://beingmarkcohen.com/?p=226</guid>
		<description><![CDATA[Notes from Yahoo UI session&#8230; References at the end Some points raised around the proliferation of &#8220;because I can&#8221; programming &#8211; overuse of drag &#8216;n drop where a one-click could star, shortlist, etc Principle: Keep a light footprint. Posterchild is http://digg.com. One-click voting for items. Kevin Rose (founder) thinks that the one-click Ajax vote was [...]]]></description>
			<content:encoded><![CDATA[<p>Notes from Yahoo UI session&#8230;  References at the end</p>
<p>Some points raised around the proliferation of &#8220;because I can&#8221; programming &#8211; overuse of drag &#8216;n drop where a one-click could star, shortlist, etc</p>
<h3>Principle: Keep a light footprint.</h3>
<p>Posterchild is <a href="http://digg.com">http://digg.com</a>.  One-click voting for items.  Kevin Rose (founder) thinks that the one-click Ajax vote was key to Digg&#8217;s success.  It removed usability pain points.</p>
<p><strong>&#8220;Paradox of choice&#8221;</strong>: &#8211; The more choice you offer users withing a specific action, the less they like it.</p>
<p><strong>&#8220;Design for Engagement&#8221;</strong>: Use invitations and feedback, treat it like impulse buying in the supermarket.</p>
<p><strong>&#8220;Cross borders reluctantly&#8221;</strong>:</p>
<ul>
<li>&#8220;endless scrolling&#8221; &#8211; avoid paging.</li>
<li>Hover details / &#8220;sneak peek&#8221; &#8211; users can preview in thumbnails on hovering so they dont have to click and leave the page.</li>
<li>Inline assistance.</li>
<li>Lightweight popups vs full window popups.</li>
<li>Every page boundary you make the user cross is a &#8220;speedbump&#8221;.</li>
<li>Rethink process flows.</li>
</ul>
<p>Search results are a bad place for &#8220;endless scrolling&#8221; because you&#8217;ll kill your scalability.</p>
<p><strong>Scrolling:</strong></p>
<ul>
<li>Shortlist scrolling, image scrolling, scrolling within page &#8220;boxes&#8221; like divs works.</li>
<li>Data the user &#8220;owns&#8221; like thier shortlists is better scrolled than paged.</li>
<li>Direct selection like highlighting the selected rows works beter with non-paged (endless scrolling) and checkboxes work better with paged results.  the user expects the system to remember wht they checked on previous paged (obviously <img src='http://beingmarkcohen.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  )</li>
</ul>
<p>Popups: Use in-context expands over popups (popups hide information)</p>
<p><strong>&#8220;Prefer direct, lightweight, in-page interaction&#8221;</strong></p>
<p><strong>Principle: Give live feedback</strong></p>
<ul>
<li>live suggustions</li>
<li>autocomplete (ajax style)</li>
<li>periodic refresh (ajax style, not meta refresh <img src='http://beingmarkcohen.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ).</li>
<li>Busy Indicators &#8211; visual cue to inform user that something is happening</li>
<li>&#8220;An ounce of preventive design is worth a pound of error-handling code&#8221; &#8211; I like that quote best <img src='http://beingmarkcohen.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
<li>Use live previews &#8211; only really relevant for highly interactive sites</li>
<li>Use laws of proximity in providing feedback</li>
</ul>
<h3>Principle: Offer an invitation</h3>
<ul>
<li>Patterns &#8211; hover invitation (tooltips / hover actions),</li>
<li>tour invitation</li>
<li>drop invitation (visually indicate drop zones etc)</li>
<li>Keep actions out of it: The user must feel free to explore.  Anything they do must be undoable easily.  If a popup is shown, the close action must be as easy as the open was.  Also don&#8217;t make actions happen that make the user feel out of control.  Example &#8220;show big map&#8221; link that hides a lot of page content automatically if you hover on the link.  Upsets the user.</li>
<li>Speak to the brain: refers to the book &#8220;Mind Hacks&#8221; by Tom Stafford &#038; Matt Webb, published by O&#8217;Reilly.</li>
<li>Show transitions:</li>
<li>Motion is useful for getting attention.  Example &#8211; Flickr Zeitgeist.  Movement makes people look at the widget, but they feel like they missed the action.  makes them want to click to see what they missed.</li>
<li>Motions are good for state changes &#8211; eg delete an item from a shortlist, it fades away</li>
<li><span style="text-decoration: underline"><strong>Keep it sane</strong></span> &#8211; ie don&#8217;t overuse.</li>
</ul>
<h3>Principle: Think in objects</h3>
<ul>
<li>Flickr &#8211; geotagging of photos.  Basic OO principles carried through to UI design</li>
<li>Think deeper interaction &#8211; Multivariate data, focus + context</li>
<li>Embedded contextual infrmation and mashups</li>
</ul>
<p><strong>Key Principles for richness:</strong></p>
<ul>
<li>Prefer direct</li>
<li>Provide invitations beforehand,</li>
<li>Think in objects and tie information to interactivity</li>
</ul>
<p><strong>References:</strong></p>
<ul>
<li>Pattern Library: <a href="http://developer.yahoo.com/ypatterns">http://developer.yahoo.com/ypatterns</a></li>
<li>Yahoo UI Library: <a href="http://developer.yahoo.com/yui/">http://developer.yahoo.com/yui/</a></li>
<li>Yahoo Blog &#8211; <a href="http://yuiblog.com">http://yuiblog.com</a></li>
<li>Bill Scott&#8217;s Blog: <a href="http://looksgoodworkswell.com">http://looksgoodworkswell.com</a></li>
<li>This presentation: <a href="http://billwscott.com/share/presentations/2007/mix07/">http://billwscott.com/share/presentations/2007/mix07/</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://beingmarkcohen.com/?feed=rss2&amp;p=226</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Windows Live Services</title>
		<link>http://beingmarkcohen.com/?p=225</link>
		<comments>http://beingmarkcohen.com/?p=225#comments</comments>
		<pubDate>Tue, 01 May 2007 17:18:13 +0000</pubDate>
		<dc:creator>Mark Cohen</dc:creator>
				<category><![CDATA[MIX07]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://beingmarkcohen.com/?p=225</guid>
		<description><![CDATA[I went to an interesting session on Windows Live today.  The most powerful thing they are going to be offering looks like the contacts component.  It will be possible to build integration into your website to leverage the Windows Live Messenger contacts that your users have.  This is basically the ability to add a social [...]]]></description>
			<content:encoded><![CDATA[<p>I went to an interesting session on Windows Live today.  The most powerful thing they are going to be offering looks like the contacts component.  It will be possible to build integration into your website to leverage the Windows Live Messenger contacts that your users have.  This is basically the ability to add a social networking component to your application, using a pre-existing social network of many million of people as the foundation.  The service will be free for use on smaller sites, with fees kicking in at the million user mark.  Read about the new <a target="_blank" href="http://dev.live.com/contactscontrol/">contact control</a> here and the new <a href="http://msdn2.microsoft.com/en-us/library/bb463989.aspx">contacts api</a> here.  At 25 cents per UB per year, charges for a million user plus site will probably start at around $250,000 per million per year.</p>
<p>Match.com demonstrated the use of integrated live messaging, and the potential looks huge.  suddenly they bring the ability to IM people who are logged in to Windows Live Messenger from the website.  This means that people do not have to actually be on match.com to be messaged through the website.  I would gues that the effective online audience at any point would be grown by a factor of ten.  That&#8217;s a compelling business case in itself.</p>
]]></content:encoded>
			<wfw:commentRss>http://beingmarkcohen.com/?feed=rss2&amp;p=225</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Aqua Data Studio</title>
		<link>http://beingmarkcohen.com/?p=180</link>
		<comments>http://beingmarkcohen.com/?p=180#comments</comments>
		<pubDate>Sat, 18 Nov 2006 09:13:18 +0000</pubDate>
		<dc:creator>Mark Cohen</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://beingmarkcohen.com/?p=180</guid>
		<description><![CDATA[I haven&#8217;t found many sql tools for os/x, but I did find this one tool that is really useful. It&#8217;s a lot like the new sql server management studio, which totally rocks if you&#8217;re running xp or above. There is a free version, the SQL Express Management Studio that I use on my laptop. When [...]]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t found many sql tools for os/x, but I did find this one tool that is really useful.  It&#8217;s a lot like the new sql server management studio, which totally rocks if you&#8217;re running xp or above.  There is a free version, the <a target="_blank" href="http://msdn.microsoft.com/vstudio/express/sql/download/">SQL Express Management Studio</a> that I use on my laptop.</p>
<p>When I&#8217;m in os/x though, I have been enjoying using <a target="_blank" href="http://www.aquafold.com/">Aqua Data Studio</a>, which is also a free download and is available for windows as well.  My favourite feature is that it has intellisense in the query window, something I&#8217;ve been waiting for Microsoft to do for years and years.  It also allows me to manage all my databases from one tool, including mysql, ms sql, and a whole lot of other formats.</p>
]]></content:encoded>
			<wfw:commentRss>http://beingmarkcohen.com/?feed=rss2&amp;p=180</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ImageMagick on windows</title>
		<link>http://beingmarkcohen.com/?p=178</link>
		<comments>http://beingmarkcohen.com/?p=178#comments</comments>
		<pubDate>Tue, 24 Oct 2006 12:59:56 +0000</pubDate>
		<dc:creator>Mark Cohen</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://beingmarkcohen.com/?p=178</guid>
		<description><![CDATA[Note to self: Next time you need to do a bulk manipulation of many many gigabytes of images, before you launch off on a project to write a console app that uses GDI+ and does all cool but essentially unnecessary stuff, have a chat with the Unix boys first.  In fact any time you need [...]]]></description>
			<content:encoded><![CDATA[<p>Note to self: Next time you need to do a bulk manipulation of many many gigabytes of images, before you launch off on a project to write a console app that uses GDI+ and does all cool but essentially unnecessary stuff, have a chat with the Unix boys first.  In fact any time you need to do something in a bulk / batch / scripted manner it&#8217;s worth talking to them first.</p>
<p>If I had followed my own advice I would have seen <a title="ImageMagick" href="http://www.imagemagick.org" target="_blank">ImageMagick</a> has a build for Windows and ships with a good tool for compressing JPEG and other formats, from the command line.  there&#8217;s a convert command and a mogrify command.  Mogrify overwrites the source file (ie changes it), compress will output to another file.  Brilliant.  Also released under the GPL.  If you have a website with a wealth of uploaded images and you want to save some space, consider running this over your old images.  Quality at 75% looks good, and the space savings are huge. </p>
]]></content:encoded>
			<wfw:commentRss>http://beingmarkcohen.com/?feed=rss2&amp;p=178</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The year in review</title>
		<link>http://beingmarkcohen.com/?p=174</link>
		<comments>http://beingmarkcohen.com/?p=174#comments</comments>
		<pubDate>Sat, 07 Oct 2006 07:22:29 +0000</pubDate>
		<dc:creator>Mark Cohen</dc:creator>
				<category><![CDATA[Management]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://beingmarkcohen.com/?p=174</guid>
		<description><![CDATA[I sat down and thought about what I&#8217;d done with my team over the last year, and it really did stack up. Some of the key things we did were:  Established a more scalable architecture Introduced more effective use of css and table-less layouts  Introduced nUnit  Threw out SourceSafe and moved everything over to Subversion, [...]]]></description>
			<content:encoded><![CDATA[<p>I sat down and thought about what I&#8217;d done with my team over the last year, and it really did stack up.</p>
<p>Some of the key things we did were: </p>
<ul>
<li>Established a more <a href="http://msdn.microsoft.com/msdnmag/issues/05/01/ASPNETPerformance/" target="_blank">scalable architecture</a></li>
<li>Introduced more effective use of <a href="http://www.csszengarden.com/" target="_blank">css</a> and table-less layouts </li>
<li>Introduced <a href="http://www.nunit.org/" target="_blank">nUnit</a> </li>
<li>Threw out SourceSafe and moved everything over to <a href="http://subversion.tigris.org/" target="_blank">Subversion</a>, eliminating checkouts blocking work and allowing a more structured branching release process. </li>
<li>Introduced some key <a href="http://www.agilemanifesto.org/" target="_blank">Agile development</a> ideas like <a href="http://ccnet.thoughtworks.com/" target="_blank">continuous integration</a>, user stories, code reviews and more </li>
<li>Moved towards <a href="http://www.controlchaos.com/" target="_blank">Scrum</a> as a management technique </li>
<li>Eliminated the old 1.0 and 1.1 framework bits and pieces and rolled out our first <a href="http://asp.net" target="_blank">asp.net</a> 2.0 systems. </li>
<li>Eliminated Crystal Reports (hurray!) </li>
<li>Brought in the use of more .net goodies like caching, master pages, section handlers and more </li>
<li>Introduced and rolled out the concepts of <a href="http://en.wikipedia.org/wiki/RSS_%28protocol%29" target="_blank">syndication</a> and extensibility </li>
<li>Extended the dev team with some really good new people and grew with some really good old people <img src='http://beingmarkcohen.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </li>
<li>Shifted our culture towards being more inquisitive, more technically aware, and learning more of <a href="http://www.gapingvoid.com/Moveable_Type/archives/000932.html" target="_blank">how to be creative</a> (my personal favourites are no 9 and 29) </li>
<li>Extended the concept of offline processing for asynchronous tasks based on a simplification of a design I&#8217;ll admit to having pilfered from <a href="http://sethyates.com" target="_blank">Seth</a> <img src='http://beingmarkcohen.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ul>
<p>We didn&#8217;t acheive all that I would liked to have acheived, but all in all I would say that the team is operating a league above where we started out this time last year and I would call our efforts very successful.  And worth it <img src='http://beingmarkcohen.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://beingmarkcohen.com/?feed=rss2&amp;p=174</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Labs rolls out public code search</title>
		<link>http://beingmarkcohen.com/?p=173</link>
		<comments>http://beingmarkcohen.com/?p=173#comments</comments>
		<pubDate>Thu, 05 Oct 2006 23:38:26 +0000</pubDate>
		<dc:creator>Mark Cohen</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://beingmarkcohen.com/?p=173</guid>
		<description><![CDATA[Google Labs showed coders that they do like us still, yesterday.  They rolled out Google Code Search, which is an impressive vertical search tool focused on publically accessible source code.  The search uses regular expressions (POSIX Extended) and the advanced search allows you to filter by license, by language. and more. This search engine also [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Google Code Search" href="http://www.google.com/codesearch"><img id="image172" style="float: right; margin: 5px; border: 0px" alt="Google Code Search" src="http://beingmarkcohen.com/wp-content/uploads/2006/10/googlecode.Png" /></a>Google Labs showed coders that they do like us still, yesterday.  They rolled out <a title="Google Code Search" href="http://www.google.com/codesearch">Google Code Search</a>, which is an impressive vertical search tool focused on publically accessible source code.  The search uses regular expressions (POSIX Extended) and the advanced search allows you to filter by license, by language. and more.</p>
<p>This search engine also indexes cvs and subversion repositories so if you have a web-accessible commercial svn repository you may want to review your security and <a href="http://www.google.com/help/faq_codesearch.html#robots">block the crawler</a> :P</p>
<p>Google have made the search results available via <a href="http://code.google.com/apis/gdata/codesearch.html">GData/XML</a> feeds and are hoping for the developer communities to build tools to leverage it, such as IDE add-ins.</p>
]]></content:encoded>
			<wfw:commentRss>http://beingmarkcohen.com/?feed=rss2&amp;p=173</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lookups powered by Enums</title>
		<link>http://beingmarkcohen.com/?p=170</link>
		<comments>http://beingmarkcohen.com/?p=170#comments</comments>
		<pubDate>Fri, 29 Sep 2006 04:32:02 +0000</pubDate>
		<dc:creator>Mark Cohen</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://beingmarkcohen.com/?p=170</guid>
		<description><![CDATA[I want to be able to maintain lookup tables in databases purely for reporting and similar applications.  I like enums in code instead of retrieving lookup data as they&#8217;re integer comparisons, they eliminate the database hit, and they are far more legible.  Here&#8217;s how to get the data you need to populate lists, dropdowns etc [...]]]></description>
			<content:encoded><![CDATA[<p><img id="image169" style="float: right; margin: 5px" alt="Output of Titles Enumeration" src="http://beingmarkcohen.com/wp-content/uploads/2006/09/titleEnum.Png" />I want to be able to maintain lookup tables in databases purely for reporting and similar applications.  I like enums in code instead of retrieving lookup data as they&#8217;re integer comparisons, they eliminate the database hit, and they are far more legible.  Here&#8217;s how to get the data you need to populate lists, dropdowns etc based on enums.</p>
<p>I declared a sample Titles enum just to test with:</p>
<blockquote><p>    public enum Titles<br />
    {<br />
        Mr = 1,<br />
        Mrs = 2,<br />
        Dr = 3,<br />
        Hon = 4,<br />
        Miss = 5,<br />
        Master = 6<br />
    }</p></blockquote>
<p>I then get the type of the enum, and then do a foreach loop to get all the values available.  Enum.GetValues retrieves all the values in the enum.  The behaviour of ToString and ToInt mean that it is possible to populate combos straight off of enums. </p>
<blockquote><p>     class Program<br />
    {<br />
       static void Main(string[] args)<br />
        {<br />
            Enumerate();<br />
        }�br />         private static void Enumerate()<br />
        {<br />
            Type title = typeof(Titles);<br />
            foreach (Titles item in Enum.GetValues(title))<br />
            {<br />
                Console.WriteLine(String.Format (&#8220;Title number {0} is \&#8221;{1}\&#8221;",<br />
                    Convert.ToInt16(item), item.ToString()));<br />
            }<br />
            Console.ReadKey();<br />
        }<br />
    }</p>
<p> </p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://beingmarkcohen.com/?feed=rss2&amp;p=170</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
