<?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>Fine Tooth Floam</title>
	<atom:link href="http://www.swegler.com/becky/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.swegler.com/becky/blog</link>
	<description></description>
	<lastBuildDate>Fri, 18 Dec 2009 02:49:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Regular Expression for dollar amount validation</title>
		<link>http://www.swegler.com/becky/blog/2009/12/16/regular-expression-for-dollar-amount-validation/</link>
		<comments>http://www.swegler.com/becky/blog/2009/12/16/regular-expression-for-dollar-amount-validation/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 17:54:47 +0000</pubDate>
		<dc:creator>bsweger</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[jquery regex]]></category>

		<guid isPermaLink="false">http://www.swegler.com/becky/blog/?p=258</guid>
		<description><![CDATA[A regular expression to validate dollar amounts.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m finishing up a small project that required validating dollar amounts on web-based form fields, and luckily I was using the wonderful <a href="http://docs.jquery.com/Plugins/Validation" title="jQuery validation plugin">Validation jQuery plugin</a>. </p>
<p>Although this plugin doesn&#8217;t come with an out-of-the-box dollar validator method, it&#8217;s very easy to add your own.  The trick was to find an appropriate regular expression.  Although Google turned up several regex examples for validating dollar inputs, none met my exact criteria (the ultimate goal being to provide users with the greatest amount of data-entry leeway):</p>
<ul>
<li>Allow the user to type in the <em>$</em> (or not)</li>
<li>Allow amounts less than one dollar (<em>i.e.</em>, 0 &#8211; .99)</li>
<li>Allow an optional one or two decimal places</li>
<li>No negative dollar amounts</li>
</ul>
<p>So this is what I came up with, and it seems to be working.  Two notes: (a) this expression allows inappropriate commas, but I&#8217;m stripping those out during the server-side validations, and (b) it is used in conjunction with the <em>max()</em> validator function to ensure the user doesn&#8217;t enter anything that could blow up a SQL Server money column:<br />
<code><br />
^\$?[0-9][0-9\,]*(\.\d{1,2})?$|^\$?[\.]([\d][\d]?)$<br />
</code></p>
<p>The final jQUery validator method:<br />
<code></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">//custom validator for money fields</span>
jQuery.<span style="color: #660066;">validator</span>.<span style="color: #660066;">addMethod</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;money&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>value<span style="color: #339933;">,</span> element<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">optional</span><span style="color: #009900;">&#40;</span>element<span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #009966; font-style: italic;">/^\$?[0-9][0-9\,]*(\.\d{1,2})?$|^\$?[\.]([\d][\d]?)$/</span>.<span style="color: #660066;">test</span><span style="color: #009900;">&#40;</span>value<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;Please provide a valid dollar amount (up to 2 decimal places)&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.swegler.com/becky/blog/2009/12/16/regular-expression-for-dollar-amount-validation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Beware the change scripts created by SQL Server Management Studio</title>
		<link>http://www.swegler.com/becky/blog/2009/10/27/beware-the-change-scripts-created-by-sql-server-management-studio/</link>
		<comments>http://www.swegler.com/becky/blog/2009/10/27/beware-the-change-scripts-created-by-sql-server-management-studio/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 02:20:55 +0000</pubDate>
		<dc:creator>bsweger</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[tsql]]></category>

		<guid isPermaLink="false">http://www.swegler.com/becky/blog/?p=178</guid>
		<description><![CDATA[Don’t rely on these SQL Server Management Studio-generated change scripts for any serious work, and definitely don't use them as a model for how to write robust T-SQL.]]></description>
			<content:encoded><![CDATA[<p>Part of my job is moonlighting as a SQL Server database admin, so a co-worker recently asked me to run a script against a production table.  The task was simple: add a few new columns and create some indexes.  He had generated the script by using SQL Server 2008 Management Studio&#8217;s (SSMS) Generate Change Script function.</p>
<p>Although the general sequence of steps in the generated script made sense, I have some complaints about the SSMS output.  Here’s a very simple recreation of the scenario.</p>
<p>Consider a table with two columns.  One is a primary key, and one has a default constraint:<br />
<code></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> phillies <span style="color: #66cc66;">&#40;</span>
   phils_id INT IDENTITY<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">,</span>  phils_year CHAR<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span>
   CONSTRAINT df_phillies_year <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2008</span><span style="color: #66cc66;">&#41;</span> 
<span style="color: #66cc66;">,</span>  CONSTRAINT pk_phils_id 
      <span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span> CLUSTERED <span style="color: #66cc66;">&#40;</span>phils_id<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span></pre></td></tr></table></div>

<p></code></p>
<p>Using the SSMS table design view to add two columns to the phillies table and saving the change script results in the following code:<br />
<code></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;">BEGIN TRANSACTION
GO
<span style="color: #993333; font-weight: bold;">ALTER</span> <span style="color: #993333; font-weight: bold;">TABLE</span> dbo<span style="color: #66cc66;">.</span>phillies
   <span style="color: #993333; font-weight: bold;">DROP</span> CONSTRAINT df_phillies_year
GO
<span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> dbo<span style="color: #66cc66;">.</span>Tmp_phillies <span style="color: #66cc66;">&#40;</span>
   phils_id int <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> IDENTITY <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span>
   phils_year char<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
   division_champ_flag bit <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
   national_champ_flag bit <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span>
<span style="color: #66cc66;">&#41;</span>  <span style="color: #993333; font-weight: bold;">ON</span> <span style="color: #66cc66;">&#91;</span><span style="color: #993333; font-weight: bold;">PRIMARY</span><span style="color: #66cc66;">&#93;</span>
GO
<span style="color: #993333; font-weight: bold;">ALTER</span> <span style="color: #993333; font-weight: bold;">TABLE</span> dbo<span style="color: #66cc66;">.</span>Tmp_phillies 
   <span style="color: #993333; font-weight: bold;">ADD</span> CONSTRAINT
   df_phillies_year <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2008</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">FOR</span> phils_year
GO
<span style="color: #993333; font-weight: bold;">SET</span> IDENTITY_INSERT dbo<span style="color: #66cc66;">.</span>Tmp_phillies <span style="color: #993333; font-weight: bold;">ON</span>
GO
<span style="color: #993333; font-weight: bold;">IF</span> <span style="color: #993333; font-weight: bold;">EXISTS</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> dbo<span style="color: #66cc66;">.</span>phillies<span style="color: #66cc66;">&#41;</span>
   EXEC<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'INSERT INTO dbo.Tmp_phillies 
      (phils_id, phils_year)
   SELECT phils_id, phils_year 
   FROM dbo.phillies 
   WITH (HOLDLOCK TABLOCKX)'</span><span style="color: #66cc66;">&#41;</span>
GO
<span style="color: #993333; font-weight: bold;">SET</span> IDENTITY_INSERT dbo<span style="color: #66cc66;">.</span>Tmp_phillies OFF
GO
<span style="color: #993333; font-weight: bold;">DROP</span> <span style="color: #993333; font-weight: bold;">TABLE</span> dbo<span style="color: #66cc66;">.</span>phillies
GO
EXECUTE sp_rename 
   N<span style="color: #ff0000;">'dbo.Tmp_phillies'</span><span style="color: #66cc66;">,</span> N<span style="color: #ff0000;">'phillies'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'OBJECT'</span> 
GO
<span style="color: #993333; font-weight: bold;">ALTER</span> <span style="color: #993333; font-weight: bold;">TABLE</span> dbo<span style="color: #66cc66;">.</span>phillies 
   <span style="color: #993333; font-weight: bold;">ADD</span> CONSTRAINT
   pk_phils_id <span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span> CLUSTERED 
   <span style="color: #66cc66;">&#40;</span>phils_id<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ON</span> <span style="color: #66cc66;">&#91;</span><span style="color: #993333; font-weight: bold;">PRIMARY</span><span style="color: #66cc66;">&#93;</span>
GO
COMMIT</pre></td></tr></table></div>

<p></code></p>
<p>This script contains BEGIN TRANSACTION and COMMIT TRANSACTION statements but doesn’t accompany them with any kind of error handling.  So if you run it as-is and encounter an error, nothing gets rolled back.  </p>
<p>Any error handling that you might add, however, is thwarted by the fact that the script&#8217;s statements are contained in individual batches (<em>i.e.</em>, separated by <a href="http://msdn.microsoft.com/en-us/library/ms188037.aspx" title="GO statement">GO statements</a>).</p>
<p>Say you individually check each statement for errors and issue a rollback/return if something goes awry.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;">BEGIN TRANSACTION
GO
<span style="color: #66cc66;">&#91;</span>snip<span style="color: #66cc66;">&#93;</span>
<span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> dbo<span style="color: #66cc66;">.</span>Tmp_phillies <span style="color: #66cc66;">&#40;</span>
   phils_id int <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> IDENTITY <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span>
   phils_year char<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
   division_champ_flag bit <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
   national_champ_flag bit <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span>
<span style="color: #66cc66;">&#41;</span>  <span style="color: #993333; font-weight: bold;">ON</span> <span style="color: #66cc66;">&#91;</span><span style="color: #993333; font-weight: bold;">PRIMARY</span><span style="color: #66cc66;">&#93;</span>
GO
<span style="color: #66cc66;">&#91;</span>snip<span style="color: #66cc66;">&#93;</span>
<span style="color: #808080; font-style: italic;">-- throw an error</span>
<span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #cc66cc;">23</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">0</span>
<span style="color: #993333; font-weight: bold;">IF</span> @@ERROR <span style="color: #66cc66;">&lt;&gt;</span> <span style="color: #cc66cc;">0</span>
BEGIN
   PRINT <span style="color: #ff0000;">'error!'</span>
   ROLLBACK TRANSACTION
   <span style="color: #993333; font-weight: bold;">RETURN</span>
END
<span style="color: #66cc66;">&#91;</span>snip<span style="color: #66cc66;">&#93;</span>
GO
<span style="color: #993333; font-weight: bold;">DROP</span> <span style="color: #993333; font-weight: bold;">TABLE</span> dbo<span style="color: #66cc66;">.</span>phillies</pre></td></tr></table></div>

<p>In this scenario, changes that occurred prior to the error will be rolled back.  However, although the RETURN statement exits the current batch, subsequent batches (for example, the one that deletes your table) will execute.</p>
<p>A TRY/CATCH block is another potential error-handling method, but <a href="http://msdn.microsoft.com/en-us/library/ms175976(SQL.90).aspx" title="TSQL TRY/CATCH blocks">TRY/CATCH blocks can’t span multiple batches</a>.</p>
<p>So what&#8217;s with the batch-happy SSMS? In older versions of SQL it might have been necessary to separate a CREATE TABLE and subsequent ALTER TABLE statements into separate batches (I haven&#8217;t tested this).  But SQL 2005 and 2008 provide <a href="http://msdn.microsoft.com/en-us/library/ms175502(SQL.90).aspx" title="statement level recompilation">statement-level recompilation</a>, so the multitude of batches is not necessary.</p>
<p>When I tested a &#8220;GO-less&#8221; version of the script, it worked swimmingly.  It&#8217;s understandable that SSMS can&#8217;t generate the error-handling, but if it would reduce the scripts&#8217; number of batches to the minimum required, it would be easier to add the error handling yourself.</p>
<p>Conclusion: don’t rely on these SQL Server Management Studio-generated change scripts for any serious work, and definitely don&#8217;t use them as a model for how to write robust T-SQL.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.swegler.com/becky/blog/2009/10/27/beware-the-change-scripts-created-by-sql-server-management-studio/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Database Design Presentation</title>
		<link>http://www.swegler.com/becky/blog/2009/10/02/database-design-presentation/</link>
		<comments>http://www.swegler.com/becky/blog/2009/10/02/database-design-presentation/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 03:17:49 +0000</pubDate>
		<dc:creator>bsweger</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.swegler.com/becky/blog/?p=147</guid>
		<description><![CDATA[The slides from a database design presentation given by myself and Tim Allen.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.swegler.com/becky/blog/wp-content/uploads/2009/10/normalization.jpg"><img src="http://www.swegler.com/becky/blog/wp-content/uploads/2009/10/normalization-300x224.jpg" alt="database normalization" title="normalization" width="300" height="224" class="aligncenter size-medium wp-image-164" /></a></p>
<p>I&#8217;m extremely happy to work in an organization with an uber-smart and supportive group of developers.  Once a month we meet for a lunchtime &#8220;tech talk&#8221; presentation on a topic chosen via <a href="http://moderator.appspot.com/" title="Google Moderator">Google Moderator</a>. </p>
<p>This month, <a href="http://www.peregrinesalon.com/" title="Tim Allen">Tim Allen</a> and I collaborated and spoke about database design.  Working with Tim to research and organize the material was a blast, and even though we put silly pictures of ourselves on the slides, I&#8217;m posting them.</p>
<p>We focused most closely on normalization and indexing, with a few of our other best practices thrown in the mix.  The concepts should be applicable to any RDBMS, but the details are specific to MS SQL Server, the database used in most of the organization&#8217;s applications.</p>
<p><a href='http://www.swegler.com/becky/blog/wp-content/uploads/2009/10/wcit-techtalk-database-design.pdf' title="database design presentation">wcit-techtalk-database-design</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.swegler.com/becky/blog/2009/10/02/database-design-presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hypnotic B-Tree Video</title>
		<link>http://www.swegler.com/becky/blog/2009/09/30/hypnotic-b-tree-video/</link>
		<comments>http://www.swegler.com/becky/blog/2009/09/30/hypnotic-b-tree-video/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 16:32:16 +0000</pubDate>
		<dc:creator>bsweger</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.swegler.com/becky/blog/?p=136</guid>
		<description><![CDATA[A hypnotic YouTube video that demonstrates inserts into a b-tree data structure.]]></description>
			<content:encoded><![CDATA[<p>While preparing a database design presentation with my co-worker <a href="http://www.peregrinesalon.com/">Tim</a>, I discovered this <a href="http://www.youtube.com/watch?v=coRJrcIYbF4" title="hypnotic b-tree video">hypnotic video</a> demonstrating inserts into a b-tree data structure.  For some reason, the music compels me to leave the cubicle and pay a visit to <a href="http://www.yelp.com/biz/ramis-philadelphia">Rami&#8217;s falafel truck</a>.</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/coRJrcIYbF4&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/coRJrcIYbF4&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.swegler.com/becky/blog/2009/09/30/hypnotic-b-tree-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Daniel Pink and the Evolution of Learning</title>
		<link>http://www.swegler.com/becky/blog/2009/06/01/daniel-pink-and-the-evolution-of-learning/</link>
		<comments>http://www.swegler.com/becky/blog/2009/06/01/daniel-pink-and-the-evolution-of-learning/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 19:22:31 +0000</pubDate>
		<dc:creator>bsweger</dc:creator>
				<category><![CDATA[Learning & Tech]]></category>
		<category><![CDATA["daniel pink"]]></category>
		<category><![CDATA[a whole new mind]]></category>

		<guid isPermaLink="false">http://www.swegler.com/becky/blog/?p=129</guid>
		<description><![CDATA[Re-cap of the 2009 Wharton Evolution of Learning Symposium.  Video of Daniel Pink's keynote address and the subsequent panel discussion with Chris Lehmann, Doug Lynch, and Karl Ulrich.]]></description>
			<content:encoded><![CDATA[<p>On May 13th, 2009, Wharton Computing sponsored the inaugural <a title="Wharton Evolution of Learning Symposium" href="http://www.wharton.upenn.edu/evolvelearning/">Evolution of Learning Symposium</a>.  I&#8217;m proud to have served on the planning committee for this successful event that featured a keynote by <a title="Daniel Pink" href="http://www.wharton.upenn.edu/evolvelearning/speakers.cfm#pink">Daniel Pink</a> and a panel discussion by some great educators:</p>
<ul>
<li><a title="Chris Lehmann" href="http://www.wharton.upenn.edu/evolvelearning/speakers.cfm#lehmann">Chris Lehmann</a>, founding principal of Philadelphia&#8217;s Science Leadership Academy</li>
<li><a title="Doug Lynch" href="http://www.wharton.upenn.edu/evolvelearning/speakers.cfm#lynch">Doug Lynch</a>, Vice Dean of Penn&#8217;s Graduate School of Education</li>
<li><a title="Karl Ulrich" href="http://www.wharton.upenn.edu/evolvelearning/speakers.cfm#ulrich">Karl T. Ulrich</a>, professor of Entrepreneurship and e-Commerce at the Wharton School</li>
</ul>
<p>It was pretty amazing to sit in a room and listen to these brains hash out some of the issues facing higher ed (and by extension, K-12) right now.  A complete recap, including speaker videos, photos, and a copy of the obligatory live Tweets* are available <a title="Wharton 2009 Evolution of Learning recap" href="http://www.wharton.upenn.edu/evolvelearning/recap.cfm">here</a>.</p>
<p>*For the record,<a title="Pay Attention!" href="http://www.swegler.com/becky/blog/?p=91"> still not a fan of the live Tweeting</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.swegler.com/becky/blog/2009/06/01/daniel-pink-and-the-evolution-of-learning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jury Lesson #1: Pay Attention</title>
		<link>http://www.swegler.com/becky/blog/2009/03/13/jury-duty-deep-thought-1-pay-attention/</link>
		<comments>http://www.swegler.com/becky/blog/2009/03/13/jury-duty-deep-thought-1-pay-attention/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 16:40:00 +0000</pubDate>
		<dc:creator>bsweger</dc:creator>
				<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[attention]]></category>
		<category><![CDATA[culture]]></category>
		<category><![CDATA[social media]]></category>

		<guid isPermaLink="false">http://www.swegler.com/becky/blog/?p=91</guid>
		<description><![CDATA[Put down the phone, the netbook, the notebook and pay attention.]]></description>
			<content:encoded><![CDATA[<p><img class="size-thumbnail wp-image-95 alignleft" style="padding-right: 10px;" title="Pens not allowed!" src="http://www.swegler.com/becky/blog/wp-content/uploads/2009/03/pen-150x150.jpg" alt="Pens not allowed!" width="150" height="150" /></p>
<p>Serving as an alternate juror is one of life’s more frustrating exercises.  It’s all the inconvenience of attending the trial and none of the decision making.  In terms of actual hours worked, however, it&#8217;s an easy job:  arrive at 9:30, start working at 10 or 10:30, take a two hour lunch, and leave by 4:30. This schedule leaves plenty of room for deep thoughts. I even broke a longstanding policy and bought a pretentious Moleskin notebook because I wanted my deep thoughts to be important and stylish.</p>
<p>Deep thought number 1:  what do we miss by not paying attention?<br />
Our judge instructed us not to take notes—we had to sit in the jury box without the aid of external mnemonic devices, which seemed like an impediment that could well lead to a travesty of justice.</p>
<p>I found the opposite to be true, though. When was the last time you sat in a room without phones, newspapers, iPods, or conversations and just actively listened? It’s the freedom to find the truth by not only listening but by studying clues like body language, demeanor, and facial expressions, which you can’t do when your head is buried in a notebook. There’s a place for conversations, questions, and notes, but it’s during deliberations, when twelve people bring their individual observations to the jury room and render a verdict.</p>
<p>Outside of the courtroom, we spend a lot of time and money to go places and do things, only to cheat ourselves by not paying attention.  It’s become more important to broadcast and perfectly capture our trips, conferences, and nights out than to live them. What contextual information do we miss when live-tweeting a keynote address?  How can we form mature, thoughtful, and independent judgments in a world of chatter and soundbytes? Information might be free, but knowledge and wisdom require a price, part of which is knowing when to listen.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.swegler.com/becky/blog/2009/03/13/jury-duty-deep-thought-1-pay-attention/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server operand type clash!</title>
		<link>http://www.swegler.com/becky/blog/2009/02/06/sql-server-operand-type-clash/</link>
		<comments>http://www.swegler.com/becky/blog/2009/02/06/sql-server-operand-type-clash/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 22:00:03 +0000</pubDate>
		<dc:creator>bsweger</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[tsql]]></category>

		<guid isPermaLink="false">http://www.swegler.com/becky/blog/?p=31</guid>
		<description><![CDATA[What can happen when components of a T-SQL CASE statement return different data types.]]></description>
			<content:encoded><![CDATA[<p><strong>Note:  This article was originally published to the <a title="Wharton Computing Developer Center" href="http://seven-dev.wharton.upenn.edu/devcenter/index.cfm?method=read&amp;entry_id=380">Wharton Computing Developer Center</a>.</strong></p>
<p>Yesterday a fellow developer hit a strange SQL error and determined that the culprit was a T-SQL CASE statement used in his ORDER BY clause.<br />
<code></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span>
CASE
WHEN UPPER<span style="color: #66cc66;">&#40;</span>@orderBy<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'GROUPMESSAGEID'</span> THEN groupMessageID
WHEN UPPER<span style="color: #66cc66;">&#40;</span>@orderBy<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'GAMEID'</span> THEN gameID
WHEN UPPER<span style="color: #66cc66;">&#40;</span>@orderBy<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'GROUPID'</span> THEN groupID
WHEN UPPER<span style="color: #66cc66;">&#40;</span>@orderBy<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'MESSAGEID'</span> THEN messageID
WHEN UPPER<span style="color: #66cc66;">&#40;</span>@orderBy<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'ROUNDSENT'</span> THEN roundSent
WHEN UPPER<span style="color: #66cc66;">&#40;</span>@orderBy<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'SENTON'</span> THEN sentOn
ELSE groupMessageID
END</pre></td></tr></table></div>

<p></code></p>
<p>This code results in the following message:<br />
Operand type clash: uniqueidentifier is incompatible with datetime</p>
<p>After some digging around, we found the underlying cause of the error:  the case statement return values have different data types.  In some cases, returning different data types will behave as expected.  However, mixing numeric and character data causes problems.</p>
<p>In the statement above, gameId, groupID, roundSent, and groupMessageID are integers, sentOn is a datetime, and messageID is a uniqueidentifier.  Because the data type precedence pecking order in this case is datetime, int, and then uniqueidentifier, SQL choose datetime as the return type. Uniqueidentifiers cannot be converted to datetimes, hence the error message.</p>
<p>It all became clear after reading <a href="http://blogs.lessthandot.com/index.php/DataMgmt/DBProgramming/MSSQLServer/sql-server-case-when-data-type-problems">this article by George Mastros</a>.  Thank you to George.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.swegler.com/becky/blog/2009/02/06/sql-server-operand-type-clash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Schools We Need: Chris Lehman @ Ignite Philly</title>
		<link>http://www.swegler.com/becky/blog/2008/10/09/the-schools-we-need-chris-lehman-ignite-philly/</link>
		<comments>http://www.swegler.com/becky/blog/2008/10/09/the-schools-we-need-chris-lehman-ignite-philly/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 21:39:53 +0000</pubDate>
		<dc:creator>bsweger</dc:creator>
				<category><![CDATA[Learning & Tech]]></category>
		<category><![CDATA[education]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.swegler.com/becky/blog/?p=52</guid>
		<description><![CDATA[Chris Lehmann, principal of Philadelphia's Science Leadership Academy, talks about the Schools We Need at Ignite Philly.]]></description>
			<content:encoded><![CDATA[<p>About a year ago, my husband came home from work, started gushing about a school he had visited that day, and continued to talk for hours about how inspired he was by its students and faculty.  That was my introduction to <a href="http://www.scienceleadership.org/drupaled/">Philadelphia&#8217;s Science Leadership Academy</a>, a Philadelphia public high school that opened in 2006.</p>
<p>Here are high school students inventing an efficient flow process for creating biodiesel fuel&#8211;how cool is that?  And it&#8217;s happening in a Philadelphia public school!</p>
<p>Fast forward to the second <a href="http://ignitephilly.org/">Ignite Philly</a>, when <a href="http://www.practicaltheory.org/serendipity/">Chris Lehmann</a>, principal of SLA, gave his  presentation on the schools we need.   Take five minutes to see a compelling speaker and learn about something wonderful in our city.</p>
<p><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="437" height="348" id="viddler_37f27c4"><param name="movie" value="http://www.viddler.com/simple/37f27c4/" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><embed src="http://www.viddler.com/simple/37f27c4/" width="437" height="348" type="application/x-shockwave-flash" allowScriptAccess="always" allowFullScreen="true" name="viddler_37f27c4" ></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.swegler.com/becky/blog/2008/10/09/the-schools-we-need-chris-lehman-ignite-philly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Presentation: How to Engage Today&#8217;s Students</title>
		<link>http://www.swegler.com/becky/blog/2008/10/08/presentation-how-to-engage-todays-students/</link>
		<comments>http://www.swegler.com/becky/blog/2008/10/08/presentation-how-to-engage-todays-students/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 21:25:49 +0000</pubDate>
		<dc:creator>bsweger</dc:creator>
				<category><![CDATA[Learning & Tech]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[students]]></category>

		<guid isPermaLink="false">http://www.swegler.com/becky/blog/?p=50</guid>
		<description><![CDATA[Recap of the How To Engage Today's Students presentation we gave at the 2008 Higher Education Web Symposium.]]></description>
			<content:encoded><![CDATA[<p>Over the summer, a few colleagues and I had the opportunity to present at the 2008 <a href="http://www.med.upenn.edu/uiconf/">Higher Education Web Symposium</a>, held at the University of Pennsylvania. Our topic was How to Engage Today’s Students: Portals, Instructional Technology &amp; Learning Simulations.</p>
<p>My portion of the presentation was an overview of what we called the New Learner (not the best term, but we liked it better than Digital Native, Millennial, and especially Learner 2.0). Lou Metzger, Jason Lehman, and Erin Wyher followed up with specific examples of how we’re trying to engage this demographic throughout their activities at the school.</p>
<p>Overall, the presentation went well, though we ran long and didn’t have a lot of time to hear ideas from other schools. We also got some feedback that the examples were too Wharton-centric. It’s true that much of the content was Wharton and/or Penn-related, but I hope that didn’t obscure our underlying points:</p>
<ul>
<li>Making small changes or adding modules can promote engagement—you don’t have to AJAX-ify or re-write your existing web applications.</li>
<li>Integrate existing information and present it in the context of a task at hand.</li>
<li>Animations, avatars, bells, and whistles don’t always translate into a better student experience.</li>
<li>Buzzwords can distract from what’s important.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.swegler.com/becky/blog/2008/10/08/presentation-how-to-engage-todays-students/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stories in Learning: The Firm</title>
		<link>http://www.swegler.com/becky/blog/2008/10/01/stories-in-learning-the-firm/</link>
		<comments>http://www.swegler.com/becky/blog/2008/10/01/stories-in-learning-the-firm/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 17:44:35 +0000</pubDate>
		<dc:creator>bsweger</dc:creator>
				<category><![CDATA[Learning & Tech]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.swegler.com/becky/blog/?p=45</guid>
		<description><![CDATA[PriceWaterhouseCoopers fictional reality TV show used for corporate training.]]></description>
			<content:encoded><![CDATA[<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/85rhSq25dpI&amp;hl=en&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/85rhSq25dpI&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>Last week, <a href="https://blogs.wharton.upenn.edu/staff/remurphy/">Erin Murphy</a> and I attended Brandon Hall’s <a href="http://www.brandonhallconference.com/">Innovations in Learning conference</a>, which also included the Excellence in Learning Awards. One of the award winners, PriceWaterhouseCoopers, had a great spin on corporate training.</p>
<p>PWC created a video series called “The Firm,” which follows several characters—the Sr. Associate who parties too much, the New Hire, the Partner, the Baby Boomer executive assistant, the Generation Y fashionista Associate—through their everyday lives as PWC employees and illustrates the finer points of employee coaching.</p>
<p>They released a new episode of The Firm every two weeks, got thousands of internal views, and made the episodes available on YouTube and pwc.tv to as part of their recruiting strategy.</p>
<p>I love this approach because it’s a story.<span> </span>The people are real employees with real quirks—they shave in the bathroom after partying all night and complain about the way their co-workers dress.<span> </span>The second season of the show was even accompanied by a fictitious blog*.</p>
<p>The cases used in business education already incorporate the element of story, so why not take those stories to the next level (someone out there already is, no doubt)? For starters, what about the <a href="http://www.wharton.upenn.edu/learning/raise-allocation-interactive-salary-exercise.cfm">Learning Lab’s Raise game</a>, in which students allocate salary increases by reading employee profiles?  It be so fun to give those characters a voice.</p>
<p>*Writing a fake blog as part of your job? Sign me up!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.swegler.com/becky/blog/2008/10/01/stories-in-learning-the-firm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->