<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-10946087</id><updated>2012-01-16T18:46:17.473-08:00</updated><category term='management'/><title type='text'>MetaDeveloper</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default?start-index=101&amp;max-results=100'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>354</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-10946087.post-4353483973979789144</id><published>2011-06-20T05:25:00.001-07:00</published><updated>2011-06-20T05:36:10.362-07:00</updated><title type='text'>NDC 2011</title><content type='html'>&lt;h2&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h2&gt;  &lt;p&gt;It may be easy to miss amidst all the hoopla around Windows 8 but the Norwegian Developers Conference just released all their session vidoes on the site. &lt;/p&gt;  &lt;p&gt;It’s been a while since I’ve gotten to go to a conference but the last few I have attended were put on by Microsoft. Although this has advantages in the sense that it coalesces the “experts” of specific Microsoft technologies, many of the presenters work at Microsoft and therefore don’t have a similar problem set that you or I might slogging our way through building products, often with older (read: more “boring”) software. There are also some talks on development techniques like &lt;a href="http://behaviour-driven.org/"&gt;BDD&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Domain-driven_design"&gt;DDD&lt;/a&gt; that are not product specific.&lt;/p&gt;  &lt;p&gt;The good thing about NDC is that it seems a lot of the presenters come from an outside perspective so it’s a good balance for a lot of the MIX / PDC type stuff I’ve been watching of late. Without further ado:&lt;/p&gt;  &lt;p&gt;Direct Download from NDC website: &lt;a href="http://ndc2011.no/agenda.aspx?cat=1071&amp;amp;id=-1&amp;amp;day=3726"&gt;Day 1&lt;/a&gt; | &lt;a href="http://ndc2011.no/agenda.aspx?cat=1071&amp;amp;id=-1&amp;amp;day=3727"&gt;Day 2&lt;/a&gt; | &lt;a href="http://ndc2011.no/agenda.aspx?cat=1071&amp;amp;id=-1&amp;amp;day=3728"&gt;Day 3&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://goo.gl/IKrBh"&gt;Roy Osherove’s “unofficial” torrent&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h2&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-4353483973979789144?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/4353483973979789144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=4353483973979789144' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4353483973979789144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4353483973979789144'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2011/06/ndc-2011.html' title='NDC 2011'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-2536461574799642796</id><published>2011-06-15T21:56:00.001-07:00</published><updated>2011-06-15T22:05:15.610-07:00</updated><title type='text'>Search, Match, Replace, Generate</title><content type='html'>&lt;h2&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h2&gt;  &lt;p&gt;Many moons ago I got about &lt;a href="http://www.hanselman.com/blog/ScottHanselmans2007UltimateDeveloperAndPowerUsersToolListForWindows.aspx"&gt;0.25 seconds of fame&lt;/a&gt; when &lt;a href="http://www.nregex.com"&gt;nRegex&lt;/a&gt;, a tool I wrote for evaluating regular expressions of the .NET flavor,&amp;#160; got a bit of acclaim. It was one of the better days of my life, an encouragement that sometimes struggling alone in a South Dakota basement can lead to a little bit of notice. &lt;/p&gt;  &lt;p&gt;One of the tricks that keeps me going back to nRegex is being able to generate code by using a regular expressions. Regular Expressions, though often reviled, turn out to be quite handy in a lot of situations. &lt;/p&gt;  &lt;p&gt;Let’s say you have a table that looks like this:&lt;/p&gt;  &lt;pre class="brush:sql"&gt;	CREATE TABLE PackingList(&lt;br /&gt;		PackingListId	INT IDENTITY PRIMARY KEY, &lt;br /&gt;		PackingItem		VARCHAR(50), &lt;br /&gt;		Destination		VARCHAR(50)&lt;br /&gt;	)&lt;br /&gt;	GO&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Let’s say you have a list of values:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush:sql"&gt;Shoes&lt;br /&gt;Camera&lt;br /&gt;Laptop&lt;br /&gt;Wallet&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The list is short for brevity but let's say you want to insert them all into your table for a destination called //Build/. You know the syntax for an INSERT but it's a bit of a nuisance to type over and over again. One thing you can do is to use a regular expression to match and then reference the results of your match in a replace. Over on nRegex, we'd paste in our list of items into the main text area and then use the regular expression (.+) to match each item, line by line. Because the items are matched into a group with your parenthesis, you can now write something like the following for your replace: &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush:sql"&gt;INSERT INTO PackingList VALUES('$1', '//Build/')&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;And voila! You now just have to copy the results: &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush:sql"&gt;INSERT INTO PackingList VALUES('Shoes', '//Build/')&lt;br /&gt;INSERT INTO PackingList VALUES('Camera', '//Build/')&lt;br /&gt;INSERT INTO PackingList VALUES('Laptop', '//Build/')&lt;br /&gt;INSERT INTO PackingList VALUES('Wallet', '//Build/')&lt;/pre&gt;&lt;br /&gt;&lt;img style="border-bottom: gray 1px solid; border-left: gray 1px solid; border-top: gray 1px solid; border-right: gray 1px solid" src="http://www.t3rse.com/meta_images/GeneratingCode1.jpg" /&gt; &lt;br /&gt;&lt;br /&gt;&lt;p&gt;But that's just a tip of the iceberg. There's a lot more nifty regular expressions tricks for working with code. Here's another one I run into quite often. Let's say I have some code that looks like this:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush:csharp"&gt;  rs[&amp;quot;foo&amp;quot;] = myFoo;&lt;br /&gt;  rs[&amp;quot;bar&amp;quot;] = myBar;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I want to swap what's on either side of the equals sign to do the opposite type of assignment. Here's my regular expression: &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush:pl"&gt;(.+)\s=\s(.+);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;And my replacement expression&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush:pl"&gt;$2 = $1;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Et voila aussi! You can now copy the swapped values to wherever they need to go. &lt;/p&gt;&lt;br /&gt;&lt;img style="border-bottom: gray 1px solid; border-left: gray 1px solid; border-top: gray 1px solid; border-right: gray 1px solid" src="http://www.t3rse.com/meta_images/GeneratingCode2.jpg" /&gt; &lt;br /&gt;&lt;br /&gt;&lt;p&gt;One final thing: any place that offers you regular expressions you can use these techniques. There are some subtle differences but as long as you have a conceptual understanding of what your goal is it's quite easy to bend to the flavor of regular expressions presented. For example, if you are using Notepad++ and want to accomplish the same thing, you reference your groups with a leading backslash rather than the &amp;quot;$&amp;quot; character - in our first example you would use the following:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush:sql"&gt;INSERT INTO PackingList VALUES('\1', '//Build/')&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;This is, of course, just scratching the surface. It’s not that hard though! Once you learn the meaning of things like ^ or $ then you can manipulate strings in all sorts of ways that may have once not seemed possible. The best way to learn regular expressions hasn’t changed for many years. The two canonical books I always refer to are &lt;a href="http://oreilly.com/catalog/9780596528126/index.html"&gt;Mastering Regular Expressions&lt;/a&gt; by &lt;a href="http://regex.info/blog/"&gt;Jeffrey Friedl&lt;/a&gt; and the &lt;a href="http://oreilly.com/catalog/9780596520694"&gt;Regular Expressions Cookbook&lt;/a&gt; by Goyvaerts and Levithan. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://oreilly.com/catalog/9780596528126/index.html"&gt;&lt;img src="http://www.t3rse.com/meta_images/Mastering Regular Expressions.gif" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;      &lt;td&gt;&lt;a href="http://oreilly.com/catalog/9780596520694"&gt;&lt;img src="http://www.t3rse.com/meta_images/Regular Expressions Cookbook.gif" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Although nRegex will allow you to hobble by I also recommend &lt;a href="http://www.regexbuddy.com/"&gt;RegexBuddy&lt;/a&gt;. &lt;a href="http://www.rexv.org"&gt;Rexv&lt;/a&gt; (which inspired nRegex) is a good tool though the Regular Expression engine is not .NET.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Last thing: do you have any nifty regex to code generation tricks you use on a regular basis? The audience of one you have in this space would love to learn them. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h2&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-2536461574799642796?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/2536461574799642796/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=2536461574799642796' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/2536461574799642796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/2536461574799642796'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2011/06/search-match-replace-generate.html' title='Search, Match, Replace, Generate'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-5489876317118276866</id><published>2011-06-14T22:05:00.001-07:00</published><updated>2011-06-14T22:05:43.764-07:00</updated><title type='text'>On Features</title><content type='html'>&lt;h2&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h2&gt;  &lt;blockquote&gt;   &lt;p style="line-height: 160%; font-size: 3em"&gt;“More features isn’t [sic] better. More features is unfocused. More features means you’ll do them worse. More features means you probably don’t have any differentiation. If you’re doing a startup, you should have &lt;em&gt;less &lt;/em&gt;[sic] features than your competitors. If you have more features, you’re probably doing it wrong.”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Nugget from &lt;a href="http://poorbuthappy.com/ease/archives/2011/06/12/4875/more-features-competitive-advantage-for-a-startup"&gt;Peter Van Dijck&lt;/a&gt;. So the question is: when do you add a new feature? Joel Spolsky (who has written about most interesting things already, way back in the day (although it would be interesting to hear if things are still done the same in the present day FogCreek) ) &lt;a href="http://www.joelonsoftware.com/articles/SetYourPriorities.html"&gt;wrote&lt;/a&gt; about how they decided on new features by prioritizing and voting as a group. &lt;/p&gt;  &lt;p&gt;As &lt;a href="http://www.t3rse.com"&gt;a developer of one&lt;/a&gt; I’m interested in techniques on deciding what to put on a roadmap and how to prioritize features. Any insight? &lt;/p&gt;  &lt;h2&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h2&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-5489876317118276866?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/5489876317118276866/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=5489876317118276866' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/5489876317118276866'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/5489876317118276866'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2011/06/on-features.html' title='On Features'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-8796452571697375059</id><published>2011-06-13T06:12:00.001-07:00</published><updated>2011-06-13T06:12:57.800-07:00</updated><title type='text'>Closures, Anonymous: JavaScript influenced C#</title><content type='html'>&lt;h2&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h2&gt;  &lt;p&gt;I’ve taken knocks in the past because of my penchant for closures and lambdas. Syntactically they never looked that strange to me and most of the time when I used them it was because it made more sense to get a sense of the flow of how things were assigned. I thought: this feels so natural, what makes it so different from some of the people I’m around using C#? Here’s an example of how I’d approach something: in the constructor, assign a loading handler, in that handler, assign a click handler, and rather than putting it in some separate method where I’d have to scroll or look elsewhere, just place it here: &lt;/p&gt;  &lt;pre class="brush:csharp"&gt;        public MainPage()&lt;br /&gt;        {&lt;br /&gt;            InitializeComponent();&lt;br /&gt;&lt;br /&gt;            this.Loaded += (o, e) =&amp;gt; &lt;br /&gt;            {&lt;br /&gt;                myButton.Click += (_, e2) =&amp;gt;&lt;br /&gt;                {&lt;br /&gt;                    myText.Text = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;                };&lt;br /&gt;            };&lt;br /&gt;        }&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;But then the other day I was tinkering with KnockoutJS, writing some Javascript with jquery and it dawned on my why I approach things the way I do. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush:js"&gt;        $(document).ready(function () {&lt;br /&gt;            $('#myButton').click(function () {&lt;br /&gt;                $('#myLabel').text('Hello World');&lt;br /&gt;            });&lt;br /&gt;        });&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;It's always interesting to make that connection more formally than trying to explain why my approach would be “better.” The advantage of being able to use a closure with the above approach has always been the main rational I’ve given when forced to come up with an answer. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h2&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-8796452571697375059?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/8796452571697375059/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=8796452571697375059' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/8796452571697375059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/8796452571697375059'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2011/06/closures-anonymous-javascript.html' title='Closures, Anonymous: JavaScript influenced C#'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-2680048287539171270</id><published>2011-06-10T06:05:00.001-07:00</published><updated>2011-06-10T06:05:43.468-07:00</updated><title type='text'>Getting Random Rows, Random Numbers with Sql Server</title><content type='html'>&lt;h2&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h2&gt;  &lt;p&gt;The 5 second version of this, should you arrive via search, is that to get random rows, simply use an TOP query with&amp;#160; &lt;strong&gt;&lt;em&gt;ORDER BY NewId()&lt;/em&gt;&lt;/strong&gt; expression. It’s really that simple! Take a look: &lt;/p&gt;  &lt;pre class="brush:sql"&gt;-- SAMPLE TABLE&lt;br /&gt;CREATE TABLE Keywords(&lt;br /&gt;	KeywordId INT IDENTITY(1,1) PRIMARY KEY, &lt;br /&gt;	KeywordValue VARCHAR(50)&lt;br /&gt;)&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;-- SAMPLE DATA&lt;br /&gt;DECLARE @N INT&lt;br /&gt;SET @N = 1&lt;br /&gt;WHILE @N &amp;lt; 101 BEGIN&lt;br /&gt;	INSERT INTO Keywords(KeywordValue)&lt;br /&gt;		VALUES('key word ' + CONVERT(VARCHAR(5), @N))&lt;br /&gt;	SET @N = @N + 1&lt;br /&gt;END&lt;br /&gt;&lt;br /&gt;-- A TOP QUERY WITH ORDER BY NEWID()&lt;br /&gt;SELECT TOP 5 * FROM Keywords ORDER BY NEWID()&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The longer version of this is that I recently was asked to generate random keywords for a website I was working on with a lookup table. Getting random numbers in TSQL is easy, the RAND() function does all the magic but getting rows is a lot more tricky, especially if you want to make sure you exclude anything you’ve previously retrieved. The above technique worked quite well and made it easy to allow for them to add and remove keywords on demand. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;One interesting application of this is that you can combine it with RAND() to get random numbers via multiplier and random rows (RAND gets a random between 0 and 1 leaving you the responsibility to multiply it to control the range you want). &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Here is where I thought this could be taken as a flexible way to get random numbers within a bounded range: &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush:sql"&gt;-- get a series of random numbers&lt;br /&gt;SELECT TOP 5 Rand() * KeywordId FROM Keywords ORDER BY NEWID()&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;There’s a lot of flexibility but SQL Server makes it trivial.&amp;#160; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h2&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-2680048287539171270?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/2680048287539171270/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=2680048287539171270' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/2680048287539171270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/2680048287539171270'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2011/06/getting-random-rows-random-numbers-with.html' title='Getting Random Rows, Random Numbers with Sql Server'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-4391405155761385076</id><published>2011-06-08T21:59:00.001-07:00</published><updated>2011-06-14T15:00:51.595-07:00</updated><title type='text'>Silverlight Is Dead…</title><content type='html'>&lt;h2&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h2&gt;  &lt;p&gt;… a title which I hope brings massive attention to this blog and to this rant against those that are rabid in their attacks on Microsoft and the Silverlight platform. &lt;/p&gt;  &lt;p&gt;First and foremost: Silverlight 5 has yet to be released. How can the platform be “dead” if we’re on the verge of a new version? &lt;/p&gt;  &lt;p&gt;Secondly: Spend some time listening to &lt;a href="http://wildermuth.com/2010/12/12/The_Next_Application_Platform_All_of_them"&gt;MVPs&lt;/a&gt; and &lt;a href="http://www.hanselman.com/blog/ShouldIUseHTML5OrSilverlightOneMansOpinion.aspx"&gt;Microsoft&lt;/a&gt; &lt;a href="http://jesseliberty.com/2011/05/16/yet-another-podcast-35silverlight-html5-and-developers/"&gt;people&lt;/a&gt;. Even though there is this awkward gag order until &lt;a href="http://www.buildwindows.com/"&gt;//Build/&lt;/a&gt; it seems quite obvious that the platform will continue to be a viable option for developers.&lt;/p&gt;  &lt;p&gt;Third: HTML5 is no panacea. Spend a few days looking into the different specifications and the &lt;a href="http://findmebyip.com/#target-selector"&gt;varied support&lt;/a&gt; by browsers and platforms. It will become obvious that the W3C is being true to their word when they say &lt;a href="http://www.w3.org/2011/02/htmlwg-pr.html"&gt;it won’t be “finished” for a while&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Fourth: Grow Up. Yes you’ve made this enormous investment in Silverlight or WPF. I have too; the last 3 years of my life have been in the trenches and my employer took a calculated risk to do a significant amount of work in Silverlight. Does that mean that every rumor should shake you to the very foundation and cause emotional outbursts at being abandoned? Stay the course. When you have real information from Microsoft directly &lt;strong&gt;then&lt;/strong&gt; you can have your break down if it’s not what you expected. I don’t consider my time wasted no matter what the case. I can take my knowledge of MVVM &lt;a href="http://knockoutjs.com/"&gt;elsewhere&lt;/a&gt;. I know a lot more than I used to about asynchronous programming. &lt;/p&gt;  &lt;p&gt;Fifth: Let’s just say it’s true. Does it still warrant all that drama? You’ll be fine. People are dying in wars, unrest, and natural disasters all over the place but guess what? If you’re a Silverlight Dev and They all of a sudden remove the Silverlight Project Template from your Visual Studio and run a secret binary on your local machine to destroy the plugin removing all evidence of its existence globally you’ll still be alive. You’ll still dust off your trousers and either port your work or begin new and fanciful things in a platform that you find available. &lt;/p&gt;  &lt;p&gt;Sixth: Try to make a distinction between people who are vocal versus people who are actually building software. I’m aware of a project right now where I work that makes heavy use of COM. Yeah that “not dead but done” COM. People who build things usually have their heads down creating value. I know there are a lot of talking heads online, especially talkers unsympathetic to the “evil” b0rg in Redmond, but there’s a lot of noise for very little signal. It’s cool that people get passionate (I’m being passionate myself now too) but sometimes it’s a good thing to take a step back and survey the landscape of what is real and what is bluster.&lt;/p&gt;  &lt;p&gt;I’ve already admitted I could be wrong. But as significant a decision Microsoft has potential to make, my approach is to take it in stride, try to learn as much as I can and be flexible since in the tech world, no matter who you are, change is inevitable. For some of us change, with all the concomitant turbulence, is fun.&lt;/p&gt;  &lt;h2&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h2&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-4391405155761385076?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/4391405155761385076/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=4391405155761385076' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4391405155761385076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4391405155761385076'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2011/06/silverlight-is-dead.html' title='Silverlight Is Dead…'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-1417605348096641878</id><published>2011-03-14T21:29:00.001-07:00</published><updated>2011-03-14T21:29:26.743-07:00</updated><title type='text'>Happy pi day!</title><content type='html'>&lt;h2&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h2&gt;  &lt;pre style="padding-bottom: 10px; line-height: 120%; margin: 1em 0px; padding-left: 10px; padding-right: 10px; font-family: courier; background: #000; color: #eee; font-size: 10pt; overflow: auto; padding-top: 10px"&gt;class Program&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;       static double PI(int i, int limit)&lt;br /&gt;       {&lt;br /&gt;               return (i &amp;gt; limit)? 1 : (1 + i / (2.0 * i + 1) * PI(i + 1, limit));&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       static void Main(string[] args)&lt;br /&gt;       {&lt;br /&gt;               double pi = 2 * PI(1, 2011);&lt;br /&gt;               Console.WriteLine(pi);&lt;br /&gt;               Console.WriteLine(&amp;quot;Happy pi day!&amp;quot;);&lt;br /&gt;               Console.ReadLine();&lt;br /&gt;       }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h2&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-1417605348096641878?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/1417605348096641878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=1417605348096641878' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/1417605348096641878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/1417605348096641878'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2011/03/happy-pi-day.html' title='Happy pi day!'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-5231450759206566680</id><published>2011-01-29T19:07:00.001-08:00</published><updated>2011-01-29T19:12:19.879-08:00</updated><title type='text'>Primes, Sums of Primes, 2011 in C#</title><content type='html'>&lt;h3&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h3&gt;  &lt;p&gt;I had no idea: &lt;/p&gt;  &lt;p&gt;&lt;font size="5"&gt;2011 = 157 + 163 + 167 + 173 + 179 + 181 + 191 + 193 + 197 + 199 + 211&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;After learning that not only was 2011 was prime, but that it was the sum of consecutive primes, I sought to write some C# code that would demonstrate this. I wrote it in a functional style, meaning at some point to port it to F# – you'll recognize my in a forthcoming post on computing primes with F# which is actually an implementation of the algorithm I first worked through in the below C#. &lt;/p&gt;  &lt;pre style="padding-bottom: 10px; line-height: 120%; margin: 1em 0px; padding-left: 10px; padding-right: 10px; font-family: courier; background: #000; color: #eee; font-size: 8pt; overflow: auto; padding-top: 10px"&gt;Func&amp;lt;long[], IEnumerable&amp;lt;KeyValuePair&amp;lt;long, string&amp;gt;&amp;gt;&amp;gt; GenerateConsecutivePrimeSums = (primes) =&amp;gt;&lt;br /&gt;{&lt;br /&gt;	List&amp;lt;KeyValuePair&amp;lt;long, string&amp;gt;&amp;gt; primeSums = new List&amp;lt;KeyValuePair&amp;lt;long, string&amp;gt;&amp;gt;();&lt;br /&gt;	for (int i = 0; i &amp;lt; primes.Count(); i++) &lt;br /&gt;	{&lt;br /&gt;		List&amp;lt;string&amp;gt; operands = new List&amp;lt;string&amp;gt;();&lt;br /&gt;		long primeSum = primes[i];&lt;br /&gt;		operands.Add(primeSum.ToString());&lt;br /&gt;		for (int j = i + 1; j &amp;lt; primes.Count(); j++) &lt;br /&gt;		{&lt;br /&gt;			primeSum += primes[j];&lt;br /&gt;			operands.Add(primes[j].ToString());&lt;br /&gt;			if (!primeSums.Any(ps =&amp;gt; ps.Key == primeSum) &amp;amp;&amp;amp; primes.Contains(primeSum))&lt;br /&gt;			{&lt;br /&gt;				primeSums.Add(new KeyValuePair&amp;lt;long, string&amp;gt;(primeSum, String.Join(&amp;quot; + &amp;quot;, operands.ToArray())));&lt;br /&gt;			}&lt;br /&gt;		}                &lt;br /&gt;	}&lt;br /&gt;&lt;br /&gt;	return primeSums;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;Action primesAndSums = () =&amp;gt; { &lt;br /&gt;	// generate primes up to 2020&lt;br /&gt;	var primes = GeneratePrimes(2020);&lt;br /&gt;	// generate arrays of consecutive primes that add up to prime&lt;br /&gt;	var primesSummed = GenerateConsecutivePrimeSums(primes.OrderBy(a =&amp;gt; a).ToArray());&lt;br /&gt;	// go through the summed primes (dictionary of prime as key, added numbers as value)&lt;br /&gt;	// Console.WriteLine formatted results&lt;br /&gt;	primesSummed&lt;br /&gt;		.OrderBy(ps =&amp;gt; ps.Key)&lt;br /&gt;		.ToList()&lt;br /&gt;		.ForEach(ps =&amp;gt; Console.WriteLine(ps.Key + &amp;quot; = &amp;quot; + ps.Value));&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;primesAndSums();&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The code actually calculates sums of the primes it generates, &lt;a href="http://www.t3rse.com/metadeveloper/primesAndSums.txt"&gt;click here&lt;/a&gt; for all the other primes which are sums of consecutive primes up to 2020: &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h3&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-5231450759206566680?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/5231450759206566680/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=5231450759206566680' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/5231450759206566680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/5231450759206566680'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2011/01/primes-sums-of-primes-2011-in-c.html' title='Primes, Sums of Primes, 2011 in C#'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-6886779835114623235</id><published>2011-01-24T21:57:00.001-08:00</published><updated>2011-01-24T21:57:21.395-08:00</updated><title type='text'>Interesting Data Points From How Facebook Ships Code</title><content type='html'>&lt;h3&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h3&gt;  &lt;p&gt;I ran across &lt;a href="http://framethink.wordpress.com/2011/01/17/how-facebook-ships-code/"&gt;this blog entry&lt;/a&gt; which is an unofficial attempt by somoene to glean the internal workings of Facebook’s product and software development processes. There are some very interesting things to be noted, most of which I’ll just quote from the article directly: &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“resourcing for projects is purely voluntary”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;It’s interesting from this unofficial post that project dynamics are organic and based on what engineers want to work on. It begs the question of how the more difficult and less pleasing problems are solved but I would hedge that by having people who are talented and motivated, difficult and more grimy problems might be what attract people that are always seeking challenges. Indeed, from later in the article: “&lt;em&gt;engineers generally want to work on infrastructure, scalability and “hard problems” — that’s where all the prestige is.&lt;/em&gt;”.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“Engineers handle entire feature themselves — front end javascript, backend database code, and everything in between.&amp;#160; If they want help from a Designer (there are a limited staff of dedicated designers available), they need to get a Designer interested enough in their project to take it on.&amp;#160; Same for Architect help.&amp;#160; But in general, expectation is that engineers will handle everything they need themselves.”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This is one of the more fascinating points because it reflects one side of an approach to programming that I’ve encountered: that delivering some functionality is a process of ownership where a person generalizes across disciplines and technologies. The opposing viewpoint sees programming more in terms of division of labor with staff assigned to “tiers” of the technological back end: database developers, “business layer” or component programmers, user interface and so on. I always think of sports with this dichotomy where the former thinks of software development like basketball – a game that involves some specialization but really rewards the generalist who can play any role on a team, and football – a game of specialists where it’s a liability to do too many things since even the physique is developed on a per position basis. &lt;/p&gt;  &lt;p&gt;Many people acknowledge generalists for small organization but it appears that Facebook, a company as large as they come, prefers them. &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“engineers responsible for testing, bug fixes, and post-launch maintenance of their own work.&amp;#160; there are some unit-testing and integration-testing frameworks available, but only sporadically used.”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;There are a few edits and comments to this point but the reason I find it interesting is that they are a corollary to the views that Joel Spolsky expressed on the StackOverflow podcast. Many developers, myself included, berate ourselves on a lack of unit testing with the assumption that “everyone is doing it, why can’t I?” As time passes, however, I realize that TDD and Unit Testing are very important but not essential. It’s a very unpopular opinion and while I admit that I strive to make my code testable and, especially on personal projects where I have enough control, architect my software so that it’s testable from the get-go. &lt;/p&gt;  &lt;h3&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h3&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-6886779835114623235?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/6886779835114623235/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=6886779835114623235' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/6886779835114623235'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/6886779835114623235'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2011/01/interesting-data-points-from-how.html' title='Interesting Data Points From How Facebook Ships Code'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-5588191549736661846</id><published>2011-01-22T21:40:00.001-08:00</published><updated>2011-01-22T21:40:19.302-08:00</updated><title type='text'>Learning F# with FizzBuzz: Match</title><content type='html'>&lt;h3&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h3&gt;  &lt;p&gt;I had previously done &lt;a href="http://metadeveloper.blogspot.com/2011/01/learning-f-with-fizzbuzz.html"&gt;a solution&lt;/a&gt; for FizzBuzz in F# (from a long time ago) but now that I’m more familiar with the idioms of F# I tend more towards pattern matching instead of if/else logic for quite a few scenarios. Here is an example of my rewriting what could otherwise been a conditional if/else checking for factors of 3 and 5, but using a pattern match instead. &lt;/p&gt;    &lt;pre style="padding-bottom: 10px; line-height: 120%; margin: 1em 0px; padding-left: 10px; padding-right: 10px; font-family: courier; background: #000; color: #eee; font-size: 10pt; overflow: auto; padding-top: 10px"&gt;#light &lt;br /&gt;let fizz num = &lt;br /&gt;    match (num % 3 = 0) with &lt;br /&gt;    | true -&amp;gt; &amp;quot;fizz&amp;quot;&lt;br /&gt;    | false -&amp;gt; &amp;quot;&amp;quot;&lt;br /&gt;&lt;br /&gt;let buzz num = &lt;br /&gt;    match (num % 5 = 0) with &lt;br /&gt;    | true -&amp;gt; &amp;quot;buzz&amp;quot;&lt;br /&gt;    | false -&amp;gt; &amp;quot;&amp;quot;&lt;br /&gt;&lt;br /&gt;let outform num fizCalc = &lt;br /&gt;    match fizCalc.ToString().Length = 0 with&lt;br /&gt;    | true -&amp;gt; num.ToString()&lt;br /&gt;    | false -&amp;gt; fizCalc&lt;br /&gt;&lt;br /&gt;let rec printer nums =&lt;br /&gt;    match nums with&lt;br /&gt;    | [] -&amp;gt; printfn &amp;quot;-&amp;quot;&lt;br /&gt;    | h::t -&amp;gt;         &lt;br /&gt;        printfn &amp;quot;%s&amp;quot; (outform h ((fizz h) + (buzz h)))&lt;br /&gt;        printer t&lt;br /&gt;&lt;br /&gt;let numbers = [1..100]&lt;br /&gt;printer numbers&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Although I read claims that if/else conditional operations are more readable, I think the pattern match used consistently across scenarios above makes for something I find quite readable.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h3&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-5588191549736661846?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/5588191549736661846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=5588191549736661846' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/5588191549736661846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/5588191549736661846'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2011/01/learning-f-with-fizzbuzz-match.html' title='Learning F# with FizzBuzz: Match'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-1459105761875731788</id><published>2011-01-20T22:08:00.001-08:00</published><updated>2011-01-20T22:08:56.093-08:00</updated><title type='text'>On Leadership</title><content type='html'>&lt;h3&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p style="line-height: 140%; font-size: 2em"&gt;“If you want to build a ship, don’t drum up people to gather wood, divide the work, and give them orders. Instead, teach them to yearn for the vast and endless sea”&lt;/p&gt;    &lt;p&gt;- Antoine De Saint-Exupery, author of &amp;quot;The Little Prince&amp;quot;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Originally &lt;a href="http://www.sellsbrothers.com/Posts/Details/12688"&gt;posted&lt;/a&gt; on Chris Sells’s blog but worth some thought. &lt;/p&gt;  &lt;h3&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h3&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-1459105761875731788?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/1459105761875731788/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=1459105761875731788' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/1459105761875731788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/1459105761875731788'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2011/01/on-leadership.html' title='On Leadership'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-8044091617845836290</id><published>2011-01-19T20:53:00.001-08:00</published><updated>2011-01-19T20:53:01.436-08:00</updated><title type='text'>Download .NET Source Code</title><content type='html'>&lt;h3&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h3&gt;  &lt;p&gt;I’ve been having &lt;a href="http://stackoverflow.com/questions/4742143/calculating-text-wrapping-in-the-net-drawingcontext-drawtext-method"&gt;a problem&lt;/a&gt; that warrants looking at the source which can be downloaded right &lt;a href="http://referencesource.microsoft.com/netframework.aspx"&gt;here&lt;/a&gt;. &lt;/p&gt;  &lt;h3&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h3&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-8044091617845836290?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/8044091617845836290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=8044091617845836290' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/8044091617845836290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/8044091617845836290'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2011/01/download-net-source-code.html' title='Download .NET Source Code'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-4455011806256770122</id><published>2011-01-19T05:53:00.001-08:00</published><updated>2011-01-19T05:53:36.604-08:00</updated><title type='text'>Learning F# with FizzBuzz</title><content type='html'>&lt;h3&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h3&gt;  &lt;p&gt;Eons ago &lt;a href="http://metadeveloper.blogspot.com/2009/09/fizzbuzz-functional.html"&gt;I'd posted&lt;/a&gt; on how I’d rewritten how I would solve FizzBuzz to have a more functional style (&lt;a href="http://metadeveloper.blogspot.com/2007/03/fizbuzz-conundrum-ramanujan.html"&gt;here&lt;/a&gt; is an imperative version), inspired by Tomas Petricek and John Skeet’s &lt;a href="http://www.manning.com/petricek/"&gt;Functional Programming for the Real World&lt;/a&gt;. Shortly thereafter I had written a version in F#, I’m not sure what prevented me from posting it but here it is: &lt;/p&gt;  &lt;pre style="padding-bottom: 10px; line-height: 120%; margin: 1em 0px; padding-left: 10px; padding-right: 10px; font-family: courier; background: #000; color: #eee; font-size: 12pt; overflow: auto; padding-top: 10px"&gt;let numbers = [1..100]&lt;br /&gt;let fizz num = &lt;br /&gt;    let res = if (num % 3 = 0) then &amp;quot;fizz&amp;quot; else &amp;quot;&amp;quot;&lt;br /&gt;    res&lt;br /&gt;&lt;br /&gt;let buzz num = &lt;br /&gt;    let res = if (num % 5 = 0) then &amp;quot;buzz&amp;quot; else &amp;quot;&amp;quot;&lt;br /&gt;    res&lt;br /&gt;&lt;br /&gt;let outform num fizCalc = &lt;br /&gt;    let res = if(fizCalc.ToString().Length &amp;gt; 0) then fizCalc.ToString() else num.ToString()&lt;br /&gt;    res&lt;br /&gt;&lt;br /&gt;let rec printer nums =&lt;br /&gt;    match nums with&lt;br /&gt;    | [] -&amp;gt; printfn &amp;quot;-&amp;quot;&lt;br /&gt;    | h::t -&amp;gt;         &lt;br /&gt;        printfn &amp;quot;%s&amp;quot; (outform h ((fizz h) + (buzz h)))&lt;br /&gt;        printer t&lt;br /&gt;&lt;br /&gt;printer numbers&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I can already see now areas that are still influenced by the C# - most notably the use of &lt;strong&gt;if&lt;/strong&gt; rather than using match for everything. I will clean it up, hopefully demonstrating an increased facility with F#. If you are looking at the above and know F#, what are some idioms or language constructs that I am neglecting in the above code? Type annotations for one... what else? &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h3&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-4455011806256770122?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/4455011806256770122/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=4455011806256770122' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4455011806256770122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4455011806256770122'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2011/01/learning-f-with-fizzbuzz.html' title='Learning F# with FizzBuzz'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-6187797545604942088</id><published>2011-01-02T11:55:00.001-08:00</published><updated>2011-01-02T11:55:19.189-08:00</updated><title type='text'>Information Diet Planning – Newsletters</title><content type='html'>&lt;h3&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h3&gt;  &lt;p&gt;Given the amount of information that is out there it’s difficult to throttle back and actually digest it. A quick look at any web page will set that context; hit StackOverflow and you’ve got several dozens of links to follow, each a rabbit hole on its own. The same can be said for Hacker News, Channel 9, and just about every other popular developer site that is out there. &lt;/p&gt;  &lt;p&gt;What tools exist to process this more efficiently? Perhaps, I hope, one of the oldest tools out there: &lt;strong&gt;email&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;I came across this solution reading the Washington Post’s email newsletter I subscribe to one morning. I realized I’d get more out of the news by scheduling a more deliberate reading of the newsletter than by going to the site and being bombarded by stories and links that, while no doubt interesting, would result in an overflow of words that would invariably lose their depth. &lt;/p&gt;  &lt;p&gt;I decided for the next week not to visit any news site directly but rather to subscribe to several newsletters and schedule the reading from directly from my email inbox. I also turned off the radio so that rather than hearing multiple versions of syndicated stories from the Associated Press, I would be able to dive more deeply and think more at length about what I read. The goal was to buck &lt;a href="http://www.guardian.co.uk/media/2008/jan/27/internet.pressandpublishing"&gt;the trends&lt;/a&gt; of the modern day information seeker: &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="4"&gt;“characterised as being 'horizontal, bouncing, checking and viewing in nature. Users are promiscuous, diverse and volatile.' 'Horizontal' information-seeking means 'a form of skimming activity, where people view just one or two pages from an academic site then &amp;quot;bounce&amp;quot; out, perhaps never to return.' The average times users spend on e-book and e-journal sites are very short: typically four and eight minutes respectively.”&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I wanted to get more vertical with my reading rather than surfing through multiple versions of the same piece of news.&lt;/p&gt;  &lt;p&gt;I was so pleased with the results that I decided to use the same strategy with technical news and articles. I have long been a member of &lt;a href="http://www.codeproject.com/"&gt;The Code Project&lt;/a&gt; and of the software development newsletters I receive (surprisingly few) theirs is probably the best. Each day, and then in a weekly digest, there is an email in my inbox with a decent roundup of technical articles. Although not all of them pertain to my skills set or interests, there are usually one or two good links to follow up with; in &lt;a href="http://www.codeproject.com/script/Mailouts/View.aspx?mlid=8588"&gt;this newsletter&lt;/a&gt; received on the last day of the year I could easily spend an hour on &lt;a href="http://www.switched.com/2010/12/30/best-technology-writing-of-2010/"&gt;The Best Technology Writing of 2010&lt;/a&gt; or catch up with Rob Connery giving &lt;a href="http://blog.wekeroad.com/microsoft/hey-kid-come-over-here"&gt;his sentiments&lt;/a&gt; on &lt;a href="http://www.microsoft.com/bizspark/"&gt;BizSpark&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;The experiment will continue and although I do admit to “skimming” from time to time, even the tepid commitment that I’ve made seems to make my time online much more efficient. The next steps regarding newsletters is to find some more development related ones that come in a digest form, preferably weekly so that I can spend a full week on the contents. &lt;/p&gt;  &lt;h3&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h3&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-6187797545604942088?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/6187797545604942088/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=6187797545604942088' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/6187797545604942088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/6187797545604942088'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2011/01/information-diet-planning-newsletters.html' title='Information Diet Planning – Newsletters'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-6477047965771963718</id><published>2010-12-23T05:23:00.001-08:00</published><updated>2010-12-23T05:28:11.527-08:00</updated><title type='text'>Information Diet Planning - Part 1</title><content type='html'>&lt;h3&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h3&gt;  &lt;p&gt;&lt;strong&gt;Goal Setting&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I’ve let it slip that one personal goal for 2011 is a more regimented information diet. I’m becoming increasingly convinced that the concepts we apply to diets on the body can be applied with some parallel applications in the world of information. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Calorie Counting&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The first thing that applies to physical diets is the concept of tracking intake. Our bodies can utilize up to a certain amount of food after which, no matter how good it is, the food is going to be stored up as fat. Is tracking intake something that can be applied to information? The number of sites visited in a day, the number of browser tabs open, the amount of time getting pumped with information via some form of media: podcast, radio, screencast, television or otherwise? Is there a point where that additional reading does no good and takes away from what might have been retained?&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Exercise&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The second basic thing in the world of physical diets is some concomitant form of exercise. Some of this might be for burning away calories (cardio) but sometimes it’s about gaining mass or turning “fat” into “muscle.” I wonder what exercise looks like in the world of information. Steve Yegge had &lt;a href="http://sites.google.com/site/steveyegge2/practicing-programming"&gt;an old article&lt;/a&gt; about practice for programmers and I suspect that exercise involves designating time specifically for the mental effort related to processing information efficiently. &lt;/p&gt;  &lt;blockquote&gt;   &lt;p style="font-size: 1.5em"&gt;“The great engineers I know are as good as they are &lt;em&gt;because&lt;/em&gt; they practice all the time. People in great physical shape only get that way by working out regularly, and they need to keep it up, or they get out of shape. The same goes for programming and engineering.”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;Media and Delivery&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;There are different “food groups” associated with a healthy diet. Some types of food, like “fatty carbs” are very difficult to incorporate into any meaningful diet but others, like fruit, are a staple of most sensible dieting efforts drawn up for a healthier lifestyle. I wrote down my main sources of intake and looking at the list I would consider some blog entries analogous to fatty carbs or sugar whereas other forms of intake such as technical books to be a more substantive form of media for input and processing. &lt;/p&gt;  &lt;p&gt;Confession: I’m an architecture geek&lt;sup&gt;1&lt;/sup&gt;. It started in earnest when I moved to South Dakota – it was the first time I’d lived in a rural area. I missed the built environment I was used to in cities. Along the way I’ve managed to have 14 different architecture blogs in my RSS Reader. Especially since I’m not an architect, this is excessive. I usually enjoy a story here and there but I leave a lot unread. This is a case where it’s not my curiosity that needs to go away, it’s the delivery format. I’d be better served rereading Steen Eiler Rasmussen’s &lt;a href="http://www.amazon.com/Experiencing-Architecture-Steen-Eiler-Rasmussen/dp/0262680025"&gt;Experiencing Architecture&lt;/a&gt; or Bjarke Ingalls’s &lt;a href="http://www.amazon.com/Yes-More-Archicomic-Architectural-Evolution/dp/3836520109/ref=sr_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1293108284&amp;amp;sr=1-1"&gt;Yes Is More&lt;/a&gt; than getting distracted by blog entries from the web. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Processing&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I’m not sure there is any equivalent in the world of dieting but the last thing I’ve been thinking about related to my information diet is designating time for processing. Earlier this year I finally made some headway in understanding &lt;a href="http://en.wikipedia.org/wiki/Getting_Things_Done"&gt;Getting Things Done&lt;/a&gt; and though I can’t say I’ve implemented everything David Allen recommends two things have stuck: his recommendation of using a calendar and the idea that you process information rather than letting it idle in an indeterminate state. &lt;/p&gt;  &lt;p&gt;It’s occurred to me that in recent years information access for personal and professional development is trivial. Wikipedia is a great resource for documenting general knowledge. For professional work there are websites, link aggregators, and vendors eagerly providing a glut of information to learn from. &lt;/p&gt;  &lt;p&gt;In this environment, what does it mean to “process” an information resource? For example, at work this week we watched &lt;a href="http://community.bartdesmet.net/blogs/bart/Default.aspx"&gt;Bart De Smet&lt;/a&gt; give &lt;a href="http://bit.ly/bfzKCk"&gt;a talk&lt;/a&gt; on a language feature of C# called LINQ. I’ve used LINQ quite a bit but his talk covered some direction in the technology that is new (&lt;a href="http://msdn.microsoft.com/en-us/devlabs/ee794896.aspx"&gt;Rx&lt;/a&gt;). In a more general sense, he referenced the Wikipedia entry on &lt;a href="http://en.wikipedia.org/wiki/Monad_(functional_programming)"&gt;Monads&lt;/a&gt; – another resource which I would like to process. &lt;/p&gt;  &lt;p&gt;I’m not sure what processing should look like but it seems like what it means to process an information resource is less of an issue than the discipline it takes to designate time for it. Perhaps that ties this notion back to exercise. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I’ll be using the next couple of weeks to think more about what an Information Diet should look like and a practical structure to use. I’m posting in part because I would love any input on tactics and also because committing this to the permanence of my blog means the commitment is formalized. Four areas of focus will be: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Calorie Counting – tracking input&lt;/li&gt;    &lt;li&gt;Exercise – deliberate practice &lt;/li&gt;    &lt;li&gt;Media and Delivery – determining which formats and timing work best for information&lt;/li&gt;    &lt;li&gt;Processing – what steps are involved in making meaning out of information&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h3&gt;  &lt;p&gt;&lt;sup&gt;1&lt;/sup&gt;A running joke with my wife is that I will quit my job, enroll in an architecture program just so I can be a &lt;a href="http://en.wikipedia.org/wiki/Paul_Goldberger"&gt;critic&lt;/a&gt;. She takes great joy in laughing about this.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-6477047965771963718?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/6477047965771963718/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=6477047965771963718' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/6477047965771963718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/6477047965771963718'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2010/12/information-diet-planning-part-1.html' title='Information Diet Planning - Part 1'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-4768629190505383463</id><published>2010-12-20T05:42:00.001-08:00</published><updated>2010-12-20T05:42:46.821-08:00</updated><title type='text'>Language, Programming, Quirks, Conviction; Derek Sivers at RailsConf</title><content type='html'>&lt;h3&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="6"&gt;“&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;Imagine that you are standing on a street, and you are in America, and a Japanese guy comes up to you and says “Excuse me… what is the name of this block?” &lt;/p&gt;    &lt;p&gt;And you say “well, I don’t understand… there’s Oak street and there’s Elm street, this is 27&lt;sup&gt;th&lt;/sup&gt; street and that’s 26&lt;sup&gt;th&lt;/sup&gt;…”&lt;/p&gt;    &lt;p&gt;And he says: “Yes but what is the name of this block?”&lt;/p&gt;    &lt;p&gt;You say: “I don’t understand what you mean; blocks don’t have names, streets have names. Blocks are just the unnamed spaces in between the streets.”&lt;/p&gt;    &lt;p&gt;He looks a little disappointed and leaves.&lt;/p&gt;    &lt;p&gt;… &lt;/p&gt;    &lt;p&gt;So now imagine that you are standing in Tokyo one day and you’re a little lost and you turn to somebody next to you and you say “Excuse me, what is the name of this street?”&lt;/p&gt;    &lt;p&gt;And they say, “That is block 17 and that is block 16.”&lt;/p&gt;    &lt;p&gt;And you say “Yeah, but what is the name of this street?”&lt;/p&gt;    &lt;p&gt;And they say, “Streets don’t have names; that’s just the space between blocks 16 and 17.”&lt;/p&gt;    &lt;p&gt;&lt;font size="6"&gt;”&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;A great talk from &lt;a href="http://sivers.org/blog"&gt;Derek Sivers&lt;/a&gt; given at RailsConf earlier this year &lt;a href="http://itc.conversationsnetwork.org/shows/detail4565.html"&gt;available on IT Conversations&lt;/a&gt;.&lt;/p&gt;  &lt;h3&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h3&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-4768629190505383463?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/4768629190505383463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=4768629190505383463' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4768629190505383463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4768629190505383463'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2010/12/language-programming-quirks-conviction.html' title='Language, Programming, Quirks, Conviction; Derek Sivers at RailsConf'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-1360815999583830371</id><published>2010-12-19T10:51:00.001-08:00</published><updated>2010-12-19T10:51:49.887-08:00</updated><title type='text'>The Future Is Balkanized</title><content type='html'>&lt;h3&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="5"&gt;“I like HTML5, but I think you're duct taping a horn on a horse and hoping it will become a unicorn.”&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Shawn Wildermuth hit the nail on the head with a recent analysis entitled “&lt;a href="http://wildermuth.com/2010/12/12/The_Next_Application_Platform_All_of_them"&gt;The Next Application Platform? All of them...&lt;/a&gt; ” It would be interesting to see how many more hits the article would have gotten with a title like “XYZ is dead” or “The Death of XYZ,” perhaps something along the lines of “The Death of the One Stop platform.” &lt;/p&gt;  &lt;p&gt;A basic summary is that he points to a future in which developers tangle themselves with the following development targets:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;An HTML5 solution for the web&lt;/li&gt;    &lt;li&gt;Plugins to extend HTML5 as necessary&lt;/li&gt;    &lt;li&gt;Desktop/Browser apps for in house/well known customers&lt;/li&gt;    &lt;li&gt;Apps for mobile/tablets in Objective-C, Java, and Silverlight&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The sentiments are corroborated by my own experience, most recently even with a potential customer who wanted to have an iPad friendly application (native) but also wanted to support web based users who had no such device. If I could translate the request, it could simply be that they want things in the best possible experience for each of the disparate platforms for which they had users. Of course the smart phone was no exception. &lt;/p&gt;  &lt;p&gt;In a world like this, what could the future portend but that we will have multiple platforms, no singular delivery, and a constantly increasing need to build things quickly, portably? &lt;/p&gt;  &lt;p&gt;I’ve cited the article quite a bit but over the years I’ve always gone back to Jonathan Edwards &lt;a href="http://alarmingdevelopment.org/?p=79"&gt;article&lt;/a&gt; on Beautiful Code: &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“I wish someone had instead warned me that programming is a desperate losing battle against the unconquerable complexity of code, and the treachery of requirements.”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Although Edwards was talking more specifically about code, all of my experience points towards this truth in the realms of the disparate platforms, specifically that getting something to work in a “real world” where people use different operating systems, browsers, displays, and connectivity paradigms. Over the years there have been different tactics in trying to solve the problem: &lt;a href="http://www.webstandards.org/"&gt;web standards&lt;/a&gt;, ActiveX controls, Java, plugins, and of course the latest new craze, HTML5. It’s not that these tactics (and the technologies related to them) are bad: I still advocate web standards to a point, I still have my day job programming Silverlight. It’s just that the pragmatist in me thinks this is the Arab-Israeli conflict in software: no perfect solution no matter how badly its desired by those in each of the platform camps. &lt;/p&gt;  &lt;p&gt;The big insight for me as a developer is this line:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“&lt;strong&gt;This means as a developer you'll need to expand what you know and learn more platforms. Is that bad or good?&amp;#160; Both. It means more work for all of us, but it does mean you'll need to less focus on silo's of platforms and use your knowledge across these platforms.&lt;/strong&gt;”&lt;/p&gt; &lt;/blockquote&gt;  &lt;h3&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h3&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-1360815999583830371?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/1360815999583830371/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=1360815999583830371' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/1360815999583830371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/1360815999583830371'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2010/12/future-is-balkanized.html' title='The Future Is Balkanized'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-8495360239923586438</id><published>2010-12-13T20:56:00.001-08:00</published><updated>2010-12-13T20:56:31.185-08:00</updated><title type='text'>Advent Calendars for Developers</title><content type='html'>&lt;h2&gt;{&lt;/h2&gt;  &lt;p&gt;Since my days &lt;strong&gt;&lt;em&gt;&lt;a href="http://metadeveloper.blogspot.com/2007/02/language-and-thinking.html"&gt;trying to hack up some Perl&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;sup&gt;1&lt;/sup&gt; I was charmed by the idea of a developer’s advent calendar: a day by day lead up to Christmas with articles pertaining to a specific topic. I’m otherwise a scrooge during the holiday time; not given to commercialism, Christmas music, and other seasonal rituals. &lt;/p&gt;  &lt;p&gt;But I am up for the both the &lt;a href="http://perladvent.pm.org/2010/"&gt;Perl Advent Calendar&lt;/a&gt; and the &lt;a href="http://advent.rjbs.manxome.org/2010/"&gt;RJBS (Perl) Advent Calendar&lt;/a&gt;. On a similar vein, &lt;a href="http://sysadvent.blogspot.com/"&gt;Sys Advent&lt;/a&gt;, a sys admin advent calendar should be interesting tracking too.&lt;/p&gt;  &lt;p&gt;Others have riffed on the idea, most notably web developers. &lt;a href="http://24ways.org/2010"&gt;24ways&lt;/a&gt; is a seasonal advent project that I’ve tuned into each year – I usually have at least one or two of the posts stick. &lt;/p&gt;  &lt;p&gt;Finally, there is an entrepreneurial advent calendar, &lt;a href="http://24waystostart.com/2010/"&gt;24waystostart&lt;/a&gt;. A lot of good things in there, I feel the onset of holiday good cheer. &lt;/p&gt;  &lt;p&gt;I’m disappointed not to find a .NET Advent calendar (or even a Python one!). If you know of a good advent calendar, developer or otherwise, feel free to share. A few good articles can make the season pleasurable, even for a grinch like me. &lt;/p&gt;  &lt;h2&gt;}&lt;/h2&gt;  &lt;p&gt;&lt;sup&gt;1&lt;/sup&gt;Could it have been that long ago? Funny to see those old posts, but that's part of why I blog&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-8495360239923586438?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/8495360239923586438/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=8495360239923586438' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/8495360239923586438'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/8495360239923586438'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2010/12/advent-calendars-for-developers.html' title='Advent Calendars for Developers'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-3086180733999794534</id><published>2010-12-02T05:36:00.001-08:00</published><updated>2010-12-02T05:36:25.042-08:00</updated><title type='text'>Serialization’s “Pit of Success” with C# and JSON</title><content type='html'>&lt;h3&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h3&gt;  &lt;p&gt;Although it’s been mentioned before here, it bears repeating that before you find yourself making a reference to the &lt;a href="http://msdn.microsoft.com/en-us/library/bb410770.aspx"&gt;DataContractJsonSerializer&lt;/a&gt;, you ought to consider and indeed are more likely better off with the NewtonSoft library &lt;a href="http://json.codeplex.com/"&gt;Json.NET&lt;/a&gt;. Whereas the DataContractJsonSerializer relies on giving you the flexibility of creating types and using the DataContract and DataMember attributes on them for a lot of granular control, this is burdensome with types that should naturally find themselves serializable and JSON friendly. For example, let’s say I have a Dictionary&amp;lt;int, string&amp;gt;; the intent of the user shouldn’t be too complicated in the serialization process. Or, if I have a class Foo with a couple of properties, and I want to serialize an IEnumerable of said class, again, the intent doesn’t require the extra use of attributes and a complexity overhead. &lt;/p&gt;  &lt;p&gt;This is not to say that the DataContractJsonSerializer does not have its place; if you are leveraging WCF and choosing JSON as your serialization format, it is probably the best route to go. That said, however, I have fallen more than once into a “pit of success” with Json.NET after getting burdened with trying to use the DataContractJsonSerializer.&lt;/p&gt;  &lt;p&gt;Json.NET is still quite active, the last release during the latter half of this year. &lt;a href="http://json.codeplex.com/releases/view/50552#ReviewsAnchor"&gt;Check it out&lt;/a&gt;.&lt;/p&gt;  &lt;h3&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h3&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-3086180733999794534?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/3086180733999794534/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=3086180733999794534' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/3086180733999794534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/3086180733999794534'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2010/12/serializations-pit-of-success-with-c.html' title='Serialization’s “Pit of Success” with C# and JSON'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-1615059536015441042</id><published>2010-08-27T05:53:00.001-07:00</published><updated>2010-08-27T05:53:59.253-07:00</updated><title type='text'>Design Related: Branding with Debbie Millman</title><content type='html'>&lt;p&gt;&lt;font color="#0000ff" size="4"&gt;{&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;I always struggled with a singular identity. Maybe that had something to do with going back and forth from East Africa and the United States, maybe it is because my father had a lot of books and it gave me a curious nature. Whatever it is, I am the kind of person who, when I find myself in a bookstore, picks up a magazine on a topic I know nothing about and enjoys trying to discover the nuances of a not yet explored world of information. I’ve done it with things like pens, model trains, and antiques. &lt;/p&gt;  &lt;p&gt;When it comes to design, as much as it may seem by some to be orthogonal to software development, I’ve had the growing understanding that the two go hand in hand. Design, to me, is not picking nice colors for gradients or making icons. Design is planning, it’s understanding a problem and solving it. Although as a software developer my &lt;em&gt;visual design&lt;/em&gt; has often been an afterthought (something I’ve fought with increasing intensity over time) and yet when I write a piece of software, put together a user interface, or model data structures, I am planning and problem solving. I am designing, even if I’m making a poor effort of things.&lt;/p&gt;  &lt;p&gt;The more aware I’ve become of this, the more I’ve sought to have a baseline understanding of design which is why I found myself at the &lt;a href="http://www.southdakota.aiga.org/"&gt;South Dakota AIGA&lt;/a&gt; hearing &lt;a href="http://debbiemillman.blogspot.com/"&gt;Debbie Millman&lt;/a&gt; give a talk on the history of branding, which was originally prompted by her thinking about the phenomenon of MySpace. I’d long been aware of Debbie; I listened to her &lt;em&gt;Design Matters&lt;/em&gt; show when it originally became available online and look forward to a &lt;a href="http://observermedia.designobserver.com/show_designmattersarchive.html"&gt;new podcast via Design Observer&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;In speeding us to the present, the question of why there may be 300 national brands of cereal or 100 different types of bottled water in a store, Millman began 50,000 years ago with the “big brain bang” where scientists believe we developed our &lt;a href="http://en.wikipedia.org/wiki/Triune_brain"&gt;Triune brain&lt;/a&gt;. The 3 parts of the brain Millman talked about, Reptilllian, Limbic, and Neocortex are a basis for how she believes that branding works today – if I could shortcut to the conclusion, the reason why we put ourselves in groups and find affiliation important is because this need is hardwired. In one humorous aside, Millman said of the part of the brain that fears the unknown: &lt;/p&gt;  &lt;p&gt;“You can’t meditate it away. It’s just there.”&lt;/p&gt;  &lt;p&gt;The talk bolstered this point along many fronts, some anthropology, some historical/statistics and other scientific studies and anecdotes. She then divided the history of branding, starting from the US Trademark Registration (landmark legislation that is the legal foundation for branding) in 1876, into 5 different “waves:”&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Wave 1: 1875 – 1920&lt;/strong&gt; &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Brands as a guarantor of consistency (Think Campbells soup, Quaker Oats).&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;Wave 2: 1920 – 1965&lt;/strong&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Brands as a guarantor of quality. (Think Mortin’s Salt, Pepsi).&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;Wave 3: 1965 – 1985&lt;/strong&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Brands as self expressive statements, telegraphing what others should think of us. (Think Nike, Levis, Volskwagen).&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;Wave 4: 1985 – 2000&lt;/strong&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Brands as an experience. (Think Starbucks.)&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;Wave 5: 2000 – present&lt;/strong&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Limbic brands. (Think Social Networking). In reference to the earlier portion of the talk on brain development, this is the part of our brains which serves us emotion and sense of group. In our present, fractured world, where traditional models of group like family are being uprooted by modernity, we turn to brands to fill that portion of our lives, which is hardwired.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I found the talk riveting, in large part because it aimed at a higher level thinking of how branding works. Afterward I had a chance to talk to Debbie and it sounds like there are new &lt;em&gt;Design Matters&lt;/em&gt; shows in the making. I’ll look forward to hearing them and learning more.&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff" size="4"&gt;}&lt;/font&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-1615059536015441042?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/1615059536015441042/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=1615059536015441042' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/1615059536015441042'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/1615059536015441042'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2010/08/design-related-branding-with-debbie.html' title='Design Related: Branding with Debbie Millman'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-8684874204313679913</id><published>2010-08-11T21:45:00.001-07:00</published><updated>2010-08-12T05:07:05.737-07:00</updated><title type='text'>Failure in two parts, IronRuby</title><content type='html'>&lt;p&gt;&lt;font color="#0080ff" size="4"&gt;{&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;I recently ran across a &lt;a href="http://scripting.com/stories/2010/08/05/whyDidntGoogleWaveBootUp.html"&gt;two&lt;/a&gt; &lt;a href="http://scripting.com/stories/2010/08/06/embracingFailureIsAGoodWay.html"&gt;part&lt;/a&gt; series from Dave Winer related to failure. Essentially Winer asserts the following: &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“The only way to succeed in my opinion is if you cannot visualize failure.”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;In the first post he describes a personal experience where failure was imminent and he pushed on despite it because he realized his back was to the wall.&amp;#160; In the second he keeps the theme by emphasizing the special level of determination necessary for success. Many of the blog posts I find my way to via Hacker News and other outlets have similar exhortations but Winer holds more gravitas for me because of his success as a founder and longevity as one of the alpha dog programmer/internet personalities. &lt;/p&gt;  &lt;p&gt;Both pieces were inspired by the recent news that Google was &lt;a href="http://googleblog.blogspot.com/2010/08/update-on-google-wave.html"&gt;no longer pursuing Wave&lt;/a&gt; – the kind of capitulation that may have inspired Winer’s title: &lt;em&gt;“Embracing failure is a good way to fail.”&lt;/em&gt; As an aside, Dare Obasanjo has &lt;a href="http://www.25hoursaday.com/weblog/2010/08/05/GoogleWaveAndNetworkEffects.aspx"&gt;some thoughtful points&lt;/a&gt; on why Wave couldn’t grow. &lt;/p&gt;  &lt;p&gt;Not long after I &lt;a href="http://blog.jimmy.schementi.com/2010/08/start-spreading-news-future-of-jimmy.html"&gt;discovered&lt;/a&gt; that IronRuby’s future as a Microsoft project was in flux. It seemed to me similar to Wave in the sense that I remember the fanfare when all the Iron* (IronRuby, IronPython, etc… ) projects were beginning and the excitement of people in the programming community only to perk my head up now and find that the project seems no longer to have the good graces of its company. What a contrast. &lt;/p&gt;  &lt;p&gt;I speak as an outsider but I suspected that as time passed the level of interest in these projects began to erode: everything from key people leaving teams to diminishing excitement from people on the outside. Most of my interest was directed toward IronPython since it was the most mature dynamic language implementation in the beginning (the whole concept of the Dynamic Language Runtime (DLR) came from Jim Hugunin’s &lt;a href="http://blogs.msdn.com/b/hugunin/archive/2006/09/05/741605.aspx"&gt;early port of Python&lt;/a&gt;). This was both fortunate and unfortunate; I was eager to learn Ruby but since I can’t learn languages very fast I decided to maintain my focus on Python in exclusion of other DLR language implementations. All I can do is suspect but perhaps there were others like me who decided rather than trying to learn different languages simultaneously it would be better to focus on one. &lt;/p&gt;  &lt;p&gt;Now as I think upon my encounters with the DLR, I realize that I’m a part of the “failure,” if one can call it that, of Microsoft in valuing this and other dynamic language implementations. Although I was excited early on, even spending some time &lt;a href="http://www.t3rse.com/twining/"&gt;creating projects&lt;/a&gt; and &lt;a href="http://metadeveloper.blogspot.com/2009/04/using-ironpython-for-coverters-in.html"&gt;coming up with ideas&lt;/a&gt; that leveraged the dynamic languages on the DLR, I got bogged down by how hard it was without a lot of documentation and the difficulty of trying to convince people around me that what I was doing was worth it. (Insert the glazed eyes and “why not just use C#? It has intellisense…” conversation). In the interests of a more full disclosure, a personal tragedy from last year took a lot of wind out of my sails and I didn’t do any programming my spare time for a long stretch of time. &lt;/p&gt;  &lt;p&gt;But of course I neither think that IronRuby is a “failure” nor do I think my lack of initiative over the last few years is the way things need to remain. Now seems an even better time to become more active in what community IronRuby has since the absence of Microsoft will create space for people like me, on the outside. I will probably return to the drawing board with a few projects and ideas in IronPython but Bruce Tate’s &lt;a href="http://pragprog.com/titles/btlang/seven-languages-in-seven-weeks"&gt;latest book&lt;/a&gt; has inspired me to think that perhaps trying to tackle multiple languages at the same time isn’t so outlandish a goal after all. The important thing I’m going to try to bring with me is the frame of mind I quoted above from Winer: being unable to imagine that IronRuby can go away or lose value as an idea or a platform.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;font color="#0080ff" size="4"&gt;}&lt;/font&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-8684874204313679913?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/8684874204313679913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=8684874204313679913' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/8684874204313679913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/8684874204313679913'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2010/08/failure-in-two-parts-ironruby.html' title='Failure in two parts, IronRuby'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-2902849159545245923</id><published>2010-07-29T05:40:00.001-07:00</published><updated>2010-07-29T05:40:55.618-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='management'/><title type='text'>Management Perspectives from a Groundling and Dan Pink</title><content type='html'>&lt;p&gt;&lt;font color="#0080ff" size="4"&gt;{&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Over the weekend I took the time to watch &lt;a href="http://www.imdb.com/title/tt0314724/"&gt;Stan Lee’s Mutants, Monsters and Marvels&lt;/a&gt;, a film that consists entirely of an interview between film maker Kevin Smith and Stan Lee. As a kid who grew up loving comics, I loved the unveiling of the world behind the worlds I spent as much time as I could with my imagination: Spiderman, Fantastic Four, Hulk, Iron Man, and the list goes on though I’ll stop before daunting anyone without appreciation for such comic book geekdome. &lt;/p&gt;  &lt;p&gt;One of the interesting segments dealt with Stan Lee’s approach as the top editor at Marvel. Although the characters we are familiar with are his creations and he would collaborate with artists on the first few releases of books, subsequently other teams of artists and writers would work on their own releases of the characters he created. When Kevin asked how he managed this he waved his hand and said that he found the best way to manage creatives was to leave them alone: that’s how you would get their &lt;u&gt;best work&lt;/u&gt;.&lt;/p&gt;  &lt;p&gt;Stan Lee seems to be a man of intuition (in the interview he’s matter of fact and terse, less a man of “Big Ideas” and more of “Common Sense” when it comes to managing) but I think he was getting at the management theory that is being articulating these days by Dan Pink. Pink’s ideas have to do with the connection of motivation and better outcomes that are concomitant with employee autonomy. A summary of his ideas as well as their rational basis is in this entertaining animated video from RSA: &lt;/p&gt; &lt;object width="640" height="385"&gt;&lt;param name="movie" value="http://www.youtube.com/v/u6XAPnuFjJc&amp;amp;hl=en_US&amp;amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/u6XAPnuFjJc&amp;amp;hl=en_US&amp;amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;  &lt;p&gt;Although I do not have any formal disagreements with Pink’s ideas (they are spot on in my book) I think what is telling is his background and where he worked. Some top notch schools and the upper echelons of government imbue a sense of personal worth and require the freedom and tactics he recommends. The same is true with Stan Lee: his management style worked precisely because of the environment he was in and the nature of his work; in comics being creative and motivated as well as finding ways to help your employees in that regard are the name of the game.&lt;/p&gt;  &lt;p&gt;What I would add, from the groundling floor, is that in many places it’s not that these theories don’t make sense or aren’t highly empirical (Pink glosses over some behavioral economics although if you really want to dive into the field &lt;a href="http://web.mit.edu/ariely/www/MIT/papers.shtml"&gt;Dan Ariely is a better start&lt;/a&gt;); it’s that different organizations have different goals. As much of a thought bludgeon as it is, the haunting truth is that some places are perfectly happy trading out creativity, autonomy, and the requisite unpredictability associated with them. &lt;/p&gt;  &lt;p&gt;&lt;font color="#0080ff" size="4"&gt;}&lt;/font&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-2902849159545245923?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/2902849159545245923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=2902849159545245923' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/2902849159545245923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/2902849159545245923'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2010/07/management-perspectives-from-groundling.html' title='Management Perspectives from a Groundling and Dan Pink'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-5257627377903088436</id><published>2010-07-27T16:51:00.001-07:00</published><updated>2010-07-27T16:51:26.036-07:00</updated><title type='text'>XAML Iconography</title><content type='html'>&lt;p&gt;&lt;font color="#0080ff" size="4"&gt;{&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;I have been having a lot of fun lately using Adobe Illustrator and symbol icons to build icons in XAML. Although the typical icon libraries provide very compact image files, the advantage of XAML comes not just in space, but in the ability to manipulate the graphic that you are leveraging. &lt;/p&gt;  &lt;p&gt;Here is a brief example of what I mean: &lt;/p&gt;  &lt;p&gt;1. There is no shortage of good symbol fonts (or fonts in general, for that matter). I have bought fonts at both MyFonts.com and Fonts.com and had great experiences. The symbol font I will use in this case is Energetics. &lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Energetics_Font" border="0" alt="Energetics_Font" src="http://www.t3rse.com/metadeveloper/blend_iconography/Energetics_Font.gif" width="615" height="261" /&gt;&lt;/p&gt;  &lt;p&gt;2. In Illustrator, I create a document and insert the character of choice making it large enough that it will be easily visible when I import it to Blend.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Illustrator1" border="0" alt="Illustrator1" src="http://www.t3rse.com/metadeveloper/blend_iconography/Illustrator1.png" width="329" height="256" /&gt; &lt;/p&gt;  &lt;p&gt;3. Using the File –&amp;gt; Import option from Blend, I have two Adobe related options; in this case we obviously leverage the Import Adobe Illustrator option&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Blend1" border="0" alt="Blend1" src="http://www.t3rse.com/metadeveloper/blend_iconography/Blend1.png" width="333" height="340" /&gt; &lt;/p&gt;  &lt;p&gt;4. Voila! We now have our same symbol in Blend but digging in it’s a XAML Path rather than an image. Although it has been imported, however, you will notice a few extra pieces of XAML that you don’t need holding the Path as its container. I usually copy the Path, delete the extras and then paste it back in.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Blend3" border="0" alt="Blend3" src="http://www.t3rse.com/metadeveloper/blend_iconography/Blend3.png" width="337" height="230" /&gt;&lt;/p&gt;  &lt;p&gt;Now that the symbol is in XAML, not only is it not taking up the kind of space that the original image would have, it is also easier to work with if you need to manipulate it programmatically.&amp;#160; Here’s my weight lifter in XAML: &lt;/p&gt;  &lt;pre style="padding-bottom: 10px; line-height: 120%; margin: 1em 0px; padding-left: 10px; padding-right: 10px; font-family: courier; background: #000; color: #eee; font-size: 12pt; overflow: auto; padding-top: 10px" class="brush: csharp;"&gt;&amp;lt;Path Data=&amp;quot;F1M562.59375,264.9375C562.59375,283.96875,560.390625,301.390625,556.015625,317.234375C551.625,&lt;br /&gt;333.078125,546.125,345.03125,539.53125,353.125L510.140625,353.125C503.296875,344.578125,497.703125,332.296875,&lt;br /&gt;493.375,316.296875C489.046875,300.296875,486.890625,281.96875,486.890625,261.34375L480.5625,261.34375C475.65625,&lt;br /&gt;264.09375,468.9375,269.5,460.40625,277.578125C460.515625,285.671875,459.921875,299.328125,458.609375,&lt;br /&gt;318.515625C457.296875,337.71875,456.359375,350.90625,455.796875,358.078125C455.671875,359.796875,454.359375,&lt;br /&gt;360.640625,451.859375,360.640625C449.34375,360.640625,448.09375,359.796875,448.09375,358.078125C443.765625,&lt;br /&gt;358.984375,439.578125,359.703125,435.53125,360.21875C431.484375,360.734375,425.78125,360.9375,418.4375,360.8125C411.09375,&lt;br /&gt;360.703125,404.0625,359.9375,397.34375,358.5C390.625,357.078125,383.71875,354.59375,376.65625,351.0625C374.609375,357.5625,&lt;br /&gt;372.46875,362.953125,370.25,367.21875C368.03125,371.5,364.578125,377.734375,359.921875,385.9375C367.328125,390.953125,&lt;br /&gt;372.671875,395.703125,375.984375,400.203125C379.28125,404.703125,380.9375,410.03125,380.9375,416.1875C380.9375,424.15625,&lt;br /&gt;378.453125,431.109375,373.5,437.03125C368.53125,442.96875,362.46875,447.296875,355.296875,450.015625C357.109375,456.84375,&lt;br /&gt;358.96875,465.703125,360.84375,476.59375C362.71875,487.46875,364.171875,497.328125,365.203125,506.15625C366.234375,514.984375,&lt;br /&gt;366.796875,521.109375,366.921875,524.53125L335.140625,524.53125C330.234375,524.53125,329.140625,522.078125,331.890625,&lt;br /&gt;517.1875C332.796875,515.6875,332.21875,513.015625,330.171875,509.15625C323.453125,496.390625,312.109375,481.46875,296.171875,&lt;br /&gt;464.375C295.25,463.34375,293.90625,461.84375,292.140625,459.84375C290.375,457.84375,289.09375,456.375,288.296875,455.40625C287.5,&lt;br /&gt;454.4375,286.875,453.734375,286.421875,453.265625L274.8125,455.3125L289.84375,511.375C290.640625,514.09375,289.15625,517.578125,&lt;br /&gt;285.40625,521.796875L250.375,521.796875L250.71875,517.53125L264.390625,504.015625L211.578125,456.34375C210.09375,454.984375,&lt;br /&gt;207.390625,452.5625,203.453125,449.078125C199.515625,445.609375,196.671875,442.8125,194.90625,440.703125C193.140625,438.609375,&lt;br /&gt;191.859375,436.5,191.0625,434.390625C190.265625,432.28125,189.875,429.796875,189.875,426.953125C189.875,421.375,192.28125,&lt;br /&gt;415.828125,197.125,410.296875C201.96875,404.765625,209.828125,400.015625,220.71875,396.015625C231.59375,392.03125,245.578125,&lt;br /&gt;389.984375,262.671875,389.859375L239.78125,350.390625C231.90625,355.984375,222.671875,359.875,212.078125,362.09375C201.484375,&lt;br /&gt;364.3125,191,364.234375,180.640625,361.828125C178.015625,351.578125,176.109375,342.59375,174.921875,334.84375C173.71875,327.09375,&lt;br /&gt;172.859375,319.609375,172.34375,312.359375C171.828125,305.125,171.34375,295.578125,170.90625,283.734375L151.25,272.28125L140.140625,&lt;br /&gt;272.625C140.140625,313.75,132.78125,343.71875,118.09375,362.515625L90.0625,362.515625C85.84375,357.28125,82.09375,350.5625,78.78125,&lt;br /&gt;342.359375C75.46875,334.15625,72.859375,324.578125,70.921875,313.640625C68.984375,302.703125,68.015625,291.03125,68.015625,&lt;br /&gt;278.609375C68.015625,259.921875,70.125,242.890625,74.34375,227.515625C78.5625,212.140625,83.796875,201.140625,90.0625,&lt;br /&gt;194.53125L118.09375,194.53125C121.84375,198.75,125.234375,204.359375,128.265625,211.359375C131.28125,218.375,133.78125,226.5,&lt;br /&gt;135.78125,235.71875C137.765625,244.9375,139.109375,255.25,139.796875,266.640625L148.171875,266.640625C148.625,264.703125,149.5,&lt;br /&gt;263.234375,150.8125,262.203125C152.125,261.171875,153.6875,260.859375,155.515625,261.265625C157.328125,261.671875,158.984375,&lt;br /&gt;262.890625,160.484375,264.9375C163.890625,259.59375,167.828125,259.359375,172.265625,264.25C172.953125,262.3125,174.375,261.0625,&lt;br /&gt;176.53125,260.5C178.6875,259.9375,180.578125,260.4375,182.1875,262.03125C183.65625,260.4375,185.34375,259.84375,187.21875,&lt;br /&gt;260.234375C189.09375,260.640625,189.984375,262.3125,189.875,265.28125L271.390625,262.375C271.046875,252.921875,271.6875,244.75,&lt;br /&gt;273.34375,237.859375C275,230.96875,277.9375,224.734375,282.15625,219.140625L314.796875,217.9375L322.484375,260.65625L448.4375,&lt;br /&gt;256.5625C449.6875,253.9375,451.625,252.34375,454.25,251.78125C456.875,251.21875,458.921875,252.40625,460.40625,255.359375C462,&lt;br /&gt;253.3125,463.875,251.96875,466.046875,251.34375C468.203125,250.71875,470.375,251.5,472.53125,253.65625C475.265625,249.5625,&lt;br /&gt;478.578125,248.875,482.453125,251.609375C484.5,250.359375,486.09375,249.890625,487.234375,250.234375C488.03125,235.09375,&lt;br /&gt;490.5625,220.578125,494.84375,206.671875C499.109375,192.765625,504.203125,182.796875,510.140625,176.75L539.53125,&lt;br /&gt;176.75C542.828125,180.28125,545.90625,185.046875,548.75,191.03125C551.59375,197.015625,554.078125,203.90625,556.1875,&lt;br /&gt;211.703125C558.296875,219.515625,559.890625,227.90625,560.96875,236.90625C562.046875,245.90625,562.59375,255.25,562.59375,&lt;br /&gt;264.9375L562.59375,264.9375 M535.9375,182.734375L512.875,182.734375C508.765625,187.75,505.140625,194.59375,502.015625,&lt;br /&gt;203.25C498.875,211.90625,496.515625,221.9375,494.921875,233.3125L518.171875,233.3125C519.640625,222.15625,521.953125,&lt;br /&gt;212.203125,525.078125,203.421875C528.203125,194.640625,531.828125,187.75,535.9375,182.734375L535.9375,182.734375 M447.75,&lt;br /&gt;262.375L364.015625,265.28125C371.875,268.25,378.484375,271.78125,383.84375,275.875C389.1875,279.984375,393.8125,286.25,&lt;br /&gt;397.6875,294.671875C404.859375,292.859375,411.515625,292.375,417.671875,293.21875C423.828125,294.078125,429.40625,297.234375,&lt;br /&gt;434.421875,302.703125L447.75,262.375 M312.234375,237.59375L309.84375,223.921875L285.40625,224.9375C280.84375,231.671875,&lt;br /&gt;278.28125,239.765625,277.71875,249.21875C279.65625,253.09375,284.03125,255.015625,290.875,255.015625C295.421875,255.015625,&lt;br /&gt;300,253.578125,304.625,250.671875C309.234375,247.765625,311.765625,243.40625,312.234375,237.59375L312.234375,237.59375 M375.296875,&lt;br /&gt;299.625C375.296875,292.109375,371.421875,286.296875,363.671875,282.203125C355.921875,278.109375,344.75,276.046875,330.171875,&lt;br /&gt;276.046875C317.1875,276.046875,307.5,277.359375,301.125,279.96875C292.8125,277.8125,286.03125,276.734375,280.796875,&lt;br /&gt;276.734375C271.453125,276.734375,262.59375,278.390625,254.21875,281.6875C245.84375,285,239.203125,289.1875,234.296875,&lt;br /&gt;294.25C229.390625,299.3125,226.953125,304.125,226.953125,308.6875C226.953125,313.46875,229.453125,317.296875,234.46875,&lt;br /&gt;320.140625C239.484375,322.984375,244.671875,324.40625,250.03125,324.40625C257.203125,324.40625,264.953125,322.984375,&lt;br /&gt;273.265625,320.140625C281.578125,317.296875,288.1875,313.921875,293.09375,310.046875C298.671875,313.359375,305.671875,&lt;br /&gt;316.125,314.109375,318.34375C322.546875,320.5625,330.921875,321.671875,339.234375,321.671875C348.921875,321.671875,357.34375,&lt;br /&gt;319.578125,364.53125,315.359375C371.703125,311.140625,375.296875,305.90625,375.296875,299.625L375.296875,299.625 M328.125,&lt;br /&gt;340.125C328.125,337.40625,325.125,334.921875,319.15625,332.703125C313.171875,330.484375,305.625,329.359375,296.515625,&lt;br /&gt;329.359375C287.859375,329.359375,280.328125,330.625,273.953125,333.125C267.578125,335.640625,264.390625,338.203125,264.390625,&lt;br /&gt;340.8125C264.390625,344.921875,271.390625,347.140625,285.40625,347.484375C273.21875,351.921875,267.125,356.59375,267.125,&lt;br /&gt;361.5C267.125,363.09375,268.25,364.328125,270.53125,365.171875C272.8125,366.03125,276.03125,366.65625,280.1875,367.046875C284.34375,&lt;br /&gt;367.453125,287.78125,367.703125,290.53125,367.8125C284.03125,371.234375,280.796875,374.375,280.796875,377.21875C280.796875,379.15625,&lt;br /&gt;282.8125,380.875,286.859375,382.34375C290.890625,383.828125,294.96875,384.5625,299.078125,384.5625C303.390625,384.5625,&lt;br /&gt;307.71875,383.765625,312.0625,382.171875C316.390625,380.578125,318.5625,378.59375,318.5625,376.1875C318.5625,373.90625,317.671875,&lt;br /&gt;372.265625,315.90625,371.234375C314.140625,370.21875,311.09375,369.1875,306.765625,368.15625C320.203125,364.96875,326.9375,361.5,&lt;br /&gt;326.9375,357.734375C326.9375,355.578125,325.671875,353.71875,323.171875,352.1875C320.65625,350.65625,317.40625,349.3125,313.4375,&lt;br /&gt;348.15625C323.21875,346.453125,328.125,343.78125,328.125,340.125L328.125,340.125 M259.078125,268.6875L189.015625,271.265625L187.65625,&lt;br /&gt;275.359375L192.609375,312.109375C198.296875,306.640625,205.3125,303.625,213.625,303.046875C216.921875,297.8125,220.703125,&lt;br /&gt;293.140625,224.984375,289.03125C229.265625,284.9375,234.359375,281.09375,240.28125,277.5C246.203125,273.90625,252.46875,270.96875,&lt;br /&gt;259.078125,268.6875L259.078125,268.6875 M112.453125,200.5L92.796875,200.5C84.703125,210.53125,79.125,226.03125,76.046875,&lt;br /&gt;246.984375L95.703125,246.984375C98.78125,226.03125,104.359375,210.53125,112.453125,200.5L112.453125,200.5 M360.59375,518.71875C360.25,&lt;br /&gt;512.109375,358.546875,499.4375,355.46875,480.6875C352.390625,461.9375,348.296875,444.921875,343.171875,429.59375C338.046875,&lt;br /&gt;414.28125,332.28125,406.609375,325.90625,406.609375C315.765625,406.609375,306.53125,410.09375,298.21875,417.03125C289.90625,&lt;br /&gt;423.984375,285.75,430.9375,285.75,437.890625C285.75,440.734375,286.765625,443.5,288.8125,446.171875C290.859375,448.859375,295.53125,&lt;br /&gt;454.203125,302.828125,462.234375C310.109375,470.265625,316.328125,477.546875,321.453125,484.109375C326.578125,490.65625,331.265625,&lt;br /&gt;498.09375,335.484375,506.421875C337.1875,509.484375,338.1875,511.796875,338.46875,513.328125C338.75,514.859375,338.4375,516.65625,&lt;br /&gt;337.53125,518.71875L360.59375,518.71875&amp;quot; Stretch=&amp;quot;Fill&amp;quot; Margin=&amp;quot;57,81,0,0&amp;quot; UseLayoutRounding=&amp;quot;False&amp;quot; HorizontalAlignment=&amp;quot;Left&amp;quot; &lt;br /&gt;Height=&amp;quot;131.781&amp;quot; VerticalAlignment=&amp;quot;Top&amp;quot; Width=&amp;quot;187.405&amp;quot;&amp;gt;&lt;br /&gt;	&amp;lt;Path.Fill&amp;gt;&lt;br /&gt;		&amp;lt;LinearGradientBrush EndPoint=&amp;quot;0.5,1&amp;quot; StartPoint=&amp;quot;0.5,0&amp;quot;&amp;gt;&lt;br /&gt;			&amp;lt;GradientStop Color=&amp;quot;#FF2D2D2D&amp;quot; Offset=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;			&amp;lt;GradientStop Color=&amp;quot;#FF3D3C3C&amp;quot; Offset=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;		&amp;lt;/LinearGradientBrush&amp;gt;&lt;br /&gt;	&amp;lt;/Path.Fill&amp;gt;&lt;br /&gt;&amp;lt;/Path&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font color="#0080ff" size="4"&gt;}&lt;/font&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-5257627377903088436?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/5257627377903088436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=5257627377903088436' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/5257627377903088436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/5257627377903088436'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2010/07/xaml-iconography.html' title='XAML Iconography'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-5504333846340610154</id><published>2010-07-24T21:16:00.001-07:00</published><updated>2010-07-24T21:16:15.033-07:00</updated><title type='text'>Excel Interop in C# .NET without COM</title><content type='html'>&lt;p&gt;&lt;font color="#0080ff" size="4"&gt;{&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Tonight I ran across the excellent albeit unimaginatively called &lt;a href="http://code.google.com/p/excellibrary/"&gt;excellibrary project&lt;/a&gt; on Google Code and leveraged it in one of my personal projects. It’s nice to be able to get the Excel file format without having to do it in either CSV or with COM Interop. &lt;/p&gt;  &lt;p&gt;Reference: &lt;a href="http://stackoverflow.com/questions/151005/create-excel-xls-and-xlsx-file-from-c"&gt;Stackoverflow Question / Answer&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0080ff" size="4"&gt;}&lt;/font&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-5504333846340610154?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/5504333846340610154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=5504333846340610154' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/5504333846340610154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/5504333846340610154'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2010/07/excel-interop-in-c-net-without-com.html' title='Excel Interop in C# .NET without COM'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-1326837001656767011</id><published>2010-07-22T21:32:00.001-07:00</published><updated>2010-07-22T21:32:17.020-07:00</updated><title type='text'>TortoiseSVN Extensions Missing on Windows 7</title><content type='html'>&lt;p&gt;&lt;font color="#0080ff" size="4"&gt;{&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Ran into this issue recently after upgrading my TortoiseSVN shell extensions. To fix, simply run the installer again using the &lt;em&gt;Repair&lt;/em&gt; option.&lt;/p&gt;  &lt;p&gt;Reference: &lt;a href="http://stackoverflow.com/questions/1057734/tortoisesvn-icons-not-showing-up-under-windows-7"&gt;StackOverflow Question / Answer&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;font color="#0080ff" size="4"&gt;}&lt;/font&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-1326837001656767011?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/1326837001656767011/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=1326837001656767011' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/1326837001656767011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/1326837001656767011'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2010/07/tortoisesvn-extensions-missing-on.html' title='TortoiseSVN Extensions Missing on Windows 7'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-2283417587977364024</id><published>2009-12-15T05:16:00.001-08:00</published><updated>2009-12-15T05:16:10.360-08:00</updated><title type='text'>Keep Your Head Up</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;From an old Raganwald &lt;a href="http://www.infoq.com/interviews/Rewrite-Reginald-Braithwaite"&gt;interview&lt;/a&gt;, I derived some inspiration this morning: &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“Quite often we see something and we're very tempted to say &amp;quot;oh! this is a special case of a more general thing.&amp;quot; and then we solve the general thing. However that is an infinite recursion: it's always a special case of a something more general and if you're always climbing up the tree on to the more general thing you'll eventually wind up with a PhD in computer science... and no code. &lt;/p&gt;    &lt;p&gt;However, on the other hand, if we just scrabble along the earth and we never, sort of, poke our head up and look around to see the more general thing we are constantly re-solving the same problems, you're not even recognizing that two different things we solve are both aspects of same thing. So what I try to do is I always try to recognize what that general case is, and then discipline myself not to solve the general case until it's really an imperative but not to be ignorant of the general case.”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;On the continuum of thinking in general, more theoretical terms and the more practical nuts and bolts, I’ll admit I err too often on being practical.&lt;/p&gt;  &lt;p&gt;I’ve been in the trenches a lot of late so this is a good quote to meditate upon. Especially in a week like this: at the end of an iteration, being asked to “work overtime” to try to get things done and out to customers, it’s very easy to stay in scrabble mode rather than having the disciplines of study and analysis that keep the general case in mind. &lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-2283417587977364024?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/2283417587977364024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=2283417587977364024' title='32 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/2283417587977364024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/2283417587977364024'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2009/12/keep-your-head-up.html' title='Keep Your Head Up'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>32</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-3483818603876271444</id><published>2009-12-05T20:48:00.001-08:00</published><updated>2009-12-05T20:48:02.187-08:00</updated><title type='text'>Library of the Week: SharpZipLib with Silverlight</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;SharpZipLib has &lt;a href="http://www.icsharpcode.net/OpenSource/SharpZipLib/"&gt;been around&lt;/a&gt; in various forms for some time but via &lt;a href="http://www.codeplex.com/slsharpziplib"&gt;this port to Silverlight&lt;/a&gt; we have the benefit of leveraging it for compression and decompression in our Silverlight based web applications. Doing a search on sample code gives back a lot of examples (the best of which, IMHO, is from &lt;a href="http://codecruncher.blogsome.com/2007/01/04/37/"&gt;The Codecruncher&lt;/a&gt;) of how to use the library but there’s an important difference when it’s used in the Silverlight space: many members of the FileStream are marked as SECURITY CRITICAL and are therefore out of reach in your application. A very simple technique to get around this is to convert the target stream object to a MemoryStream and proceed from there. A series of examples are below, written in simpe form for brevity (reading a file in a single step to a large byte array is a taste thing; of course I’m aware you can read chunks of the file) Here’s a little sample of getting that done:     &lt;br /&gt;&lt;/p&gt;  &lt;pre style="padding-bottom: 10px; line-height: 120%; margin: 1em 0px; padding-left: 10px; padding-right: 10px; font-family: courier; background: #000; color: #eee; font-size: 12pt; overflow: auto; padding-top: 10px" class="brush: csharp;"&gt;public MemoryStream GetFileData(FileStream fs) &lt;br /&gt;{&lt;br /&gt;    fs.Seek(0, SeekOrigin.Begin);&lt;br /&gt;    byte[] data = new byte[fs.Length];&lt;br /&gt;    fs.Read(data, 0, (int)fs.Length);&lt;br /&gt;    MemoryStream ms = new MemoryStream(data);&lt;br /&gt;    return ms;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Here are examples of listing, extracting, and compressing files, respectively: &lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="padding-bottom: 10px; line-height: 120%; margin: 1em 0px; padding-left: 10px; padding-right: 10px; font-family: courier; background: #000; color: #eee; font-size: 12pt; overflow: auto; padding-top: 10px" class="brush: csharp;"&gt;&lt;span style="color: #66ff33"&gt;//open a file dialog, pick a zip and list contents&lt;/span&gt;&lt;br /&gt;List&lt;string&gt; entries = new List&lt;string&gt;();&lt;br /&gt;OpenFileDialog ofd = new OpenFileDialog();&lt;br /&gt;if (true == ofd.ShowDialog())&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;    using(FileStream fs = ofd.File.OpenRead())&lt;br /&gt;    {&lt;br /&gt;	    ZipFile zip = new ZipFile(GetFileData(fs));&lt;br /&gt;	    foreach (ZipEntry entry in zip)&lt;br /&gt;	    {&lt;br /&gt;	        entries.Add(entry.Name);&lt;br /&gt;    }&lt;br /&gt;    zipFileListBox.ItemsSource = entries.ToArray();&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="padding-bottom: 10px; line-height: 120%; margin: 1em 0px; padding-left: 10px; padding-right: 10px; font-family: courier; background: #000; color: #eee; font-size: 12pt; overflow: auto; padding-top: 10px" class="brush: csharp;"&gt;&lt;span style="color: #66ff33"&gt;//open a file dialog, pick a *.zip and extract to isolated storage&lt;/span&gt;&lt;br /&gt;OpenFileDialog ofd = new OpenFileDialog();&lt;br /&gt;if (true == ofd.ShowDialog())&lt;br /&gt;{&lt;br /&gt;    string fiName = ofd.File.Name;&lt;br /&gt;    ZipEntry entry;&lt;br /&gt;    using(ZipInputStream zis = new ZipInputStream(GetFileData(ofd.File.OpenRead())))&lt;br /&gt;    using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication())&lt;br /&gt;    {&lt;br /&gt;        string folderForOutput = System.IO.Path.GetFileNameWithoutExtension(ofd.File.Name);&lt;br /&gt;        if (!isf.DirectoryExists(folderForOutput)) {&lt;br /&gt;            isf.CreateDirectory(folderForOutput);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        while ((entry = zis.GetNextEntry()) != null)&lt;br /&gt;        {&lt;br /&gt;            if (isf.FileExists(entry.Name))&lt;br /&gt;            {&lt;br /&gt;                isf.DeleteFile(entry.Name);&lt;br /&gt;            }&lt;br /&gt;            long sizeToWrite = entry.Size;&lt;br /&gt;            using (FileStream fs = isf.CreateFile(folderForOutput + &amp;quot;/&amp;quot; + entry.Name))&lt;br /&gt;            using(StreamWriter sw = new StreamWriter(fs))&lt;br /&gt;            {&lt;br /&gt;                byte[] data = new byte[sizeToWrite];&lt;br /&gt;                int bytesRead = zis.Read(data, 0, data.Length);&lt;br /&gt;                if (bytesRead &amp;gt; 0)&lt;br /&gt;                {&lt;br /&gt;                    sw.Write(data);&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="padding-bottom: 10px; line-height: 120%; margin: 1em 0px; padding-left: 10px; padding-right: 10px; font-family: courier; background: #000; color: #eee; font-size: 12pt; overflow: auto; padding-top: 10px" class="brush: csharp;"&gt;&lt;span style="color: #66ff33"&gt;//open a file dialog, pick some files and create a *.zip&lt;/span&gt;&lt;br /&gt;OpenFileDialog ofd = new OpenFileDialog();&lt;br /&gt;ofd.Multiselect = true;&lt;br /&gt;if (true == ofd.ShowDialog())&lt;br /&gt;{&lt;br /&gt;    using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication())&lt;br /&gt;    {&lt;br /&gt;        using (FileStream fs = isf.CreateFile(&amp;quot;TheZip.zip&amp;quot;))&lt;br /&gt;        using (ZipOutputStream zipOut = new ZipOutputStream(fs))&lt;br /&gt;        {                        &lt;br /&gt;            foreach (FileInfo selectedFile in ofd.Files) {&lt;br /&gt;                byte[] fileData = new byte[selectedFile.Length];&lt;br /&gt;                using (FileStream selectedFileStream = selectedFile.OpenRead()) {&lt;br /&gt;                    selectedFileStream.Read(fileData, 0, fileData.Length);&lt;br /&gt;                    ZipEntry entry = new ZipEntry(selectedFile.Name);&lt;br /&gt;                    entry.DateTime = DateTime.Now;&lt;br /&gt;                    entry.Size = selectedFile.Length;&lt;br /&gt;                    zipOut.PutNextEntry(entry);&lt;br /&gt;                    zipOut.Write(fileData, 0, fileData.Length);&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            zipOut.Finish();&lt;br /&gt;        }&lt;br /&gt;    }        &lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;It must be noted that SharpZipLib is GPL but because of a special clause in the license, you can use it in a “closed source” application as Jon Galloway explains &lt;a href="http://weblogs.asp.net/jgalloway/archive/2007/10/25/creating-zip-archives-in-net-without-an-external-library-like-sharpziplib.aspx"&gt;here&lt;/a&gt;. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-3483818603876271444?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/3483818603876271444/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=3483818603876271444' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/3483818603876271444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/3483818603876271444'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2009/12/library-of-week-sharpziplib-with.html' title='Library of the Week: SharpZipLib with Silverlight'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-5322612105703102242</id><published>2009-11-18T20:08:00.001-08:00</published><updated>2009-11-18T20:08:36.638-08:00</updated><title type='text'>Windows 7 In the House</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;Just&amp;#160; a quick test from Windows 7. &lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-5322612105703102242?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/5322612105703102242/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=5322612105703102242' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/5322612105703102242'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/5322612105703102242'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2009/11/windows-7-in-house.html' title='Windows 7 In the House'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-1848250624047226577</id><published>2009-10-27T21:07:00.001-07:00</published><updated>2009-10-27T21:07:18.107-07:00</updated><title type='text'>Library of the Week: Silverlight’s MD5 implementation</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;While there are a slew of cryptographic hashing algorithms a programmer finds at their disposal, and despite the &lt;a href="http://en.wikipedia.org/wiki/MD5"&gt;documented vulnerabilities&lt;/a&gt; accompanying it, MD5 remains a popular approach to generating hashes. Hashes, as you know, are useful for a variety of things – verifying file integrity and password storage being just a few.&lt;/p&gt;  &lt;p&gt;I discovered the &lt;a href="http://code.msdn.microsoft.com/SilverlightMD5/Release/ProjectReleases.aspx?ReleaseId=2206"&gt;Silverlight MD5 implementation&lt;/a&gt; because a project I work on leveraged MD5 for file integrity. I was a bit curious about this since it’s long been a recommendation to skip MD5 and use hashing algorithms like SHA-1 and SHA-2 which are proven to be more robust. It’s not just the predecessor of my project, many places still use MD5 despite the bad rap it takes. I &lt;a href="http://superuser.com/questions/61461/why-is-md5-still-used-heavily"&gt;posted on SuperUser&lt;/a&gt; and got some interesting answers, the most notable of which (I marked as the answer) detailed how MD5 is faster than SHA-1. Other comments can be summarized with this excerpt of an answer that wwas most highly upvoted: &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“A MD5 hash is &amp;quot;good enough&amp;quot; for most menial tasks. Recall that it's still incredibly difficult to produce meaningful collisions in the same number of bytes.”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Silverlight’s core assemblies do not support MD5 but a person named Reid Borsuk at Microsoft created an implementation that is robust and easy to use. Because the code is hosted on MSDN Code Gallery you will need to put it into a project on your own but it’s not that hard. Here are some simple steps: &lt;/p&gt;  &lt;p&gt;1. Create a Silverlight Library project&lt;/p&gt;  &lt;p&gt;2. Download the MD5.cs and MD5Managed.cs (you can also download the MD5Test.cs if you’re interested in unit testing it)&lt;/p&gt;  &lt;p&gt;3. Add both files to your Silverlight Library project.&lt;/p&gt;  &lt;p&gt;4. Compile and you’re done!&lt;/p&gt;  &lt;p&gt;If' that’s not straightforward enough, I’ve created &lt;a href="http://t3rse.com/metadeveloper/MD5.zip"&gt;a downloadable Visual Studio 2008 solution with the library, a Silverlight Application and a Web application&lt;/a&gt; to show it in action. Here is the code behind generating a hash from a file stream in a button’s click event: &lt;/p&gt;  &lt;pre style="padding-bottom: 10px; line-height: 120%; margin: 1em 0px; padding-left: 10px; padding-right: 10px; font-family: courier; background: #000; color: #eee; font-size: 12pt; overflow: auto; padding-top: 10px" class="brush: csharp;"&gt; &lt;br /&gt;private void cryptoButton_Click(object sender, RoutedEventArgs e)&lt;br /&gt;{&lt;br /&gt;    OpenFileDialog ofd = new OpenFileDialog();&lt;br /&gt;    if (true == ofd.ShowDialog()) {&lt;br /&gt;        using (FileStream fs = ofd.File.OpenRead())&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: orange"&gt;MD5Managed md5 = new MD5Managed();&lt;br /&gt;            byte[] hash = md5.ComputeHash(fs);&lt;/span&gt;&lt;br /&gt;            fs.Close();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt; Thanks a lot Reid!&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-1848250624047226577?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/1848250624047226577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=1848250624047226577' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/1848250624047226577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/1848250624047226577'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2009/10/library-of-week-silverlights-md5.html' title='Library of the Week: Silverlight’s MD5 implementation'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-2383282579982308447</id><published>2009-10-20T19:32:00.001-07:00</published><updated>2009-10-20T19:32:14.978-07:00</updated><title type='text'>Library Of The Week: Simple Styles for Silverlight</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;I’ll admit I have a &lt;a href="http://www.urbandictionary.com/define.php?term=Man%20Crush"&gt;Man Crush&lt;/a&gt; on Robbie Ingebretsen that began when I discovered his work at MIX earlier this year. To expound a bit: Microsoft has worked hard to try to draw a line in the sand between “developer” and “designer” – a line I always had a visceral dislike for because it’s always been people like Robbie Ingebretsen who I’ve always tried to pattern myself after: people who can write code AND produce beautiful designs. &lt;/p&gt;  &lt;p&gt;One of the more difficult things I’ve encountered in Silverlight is dealing with control templates. Even something as simple as a button, when opened in Blend, involves quite a few different moving parts so that changing behavior doesn’t always produce a desired effect. For example: changing the background of the button at some given visual state will not affect the button unless you take into account a predefined background gradient that is a part of it. &lt;/p&gt;  &lt;p&gt;The &lt;a href="http://blog.nerdplusart.com/archives/silverlightsimplestyles"&gt;Simple Styles samples&lt;/a&gt; are stripped down, intuitive versions of the control templates with a concise starting point for anyone working to customize their behavior. To go back to the previous example, changing the background of a button involves changing the BackgroundElement. Rather than changing individual gradient stops in a Visual State, simple modify the entire element related to that Visual State. &lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="200"&gt;Default Button Template&lt;/td&gt;        &lt;td valign="top" width="200"&gt;Simple Button&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;&lt;img src="http://www.t3rse.com/metadeveloper/SilverlightButtonStyle.jpg" /&gt; &lt;/td&gt;        &lt;td valign="top" width="200"&gt;&lt;img src="http://www.t3rse.com/metadeveloper/SimpleButtonStyle.jpg" /&gt; &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;102 lines of XAML&lt;/td&gt;        &lt;td valign="top" width="200"&gt;38 lines of XAML&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;The button is a starting point for simple conversations but there are controls like the listbox which can be deceptively unwieldy in how they are managed1.&lt;/p&gt;  &lt;p&gt;The structure of the Simple Styles is also beautiful – not simply a resource dictionary with everything crammed together but a separate file for each control, a gesture one would think was straightforward until you see the many &lt;a href="http://blogs.msdn.com/corrinab/archive/2008/10/01/8971166.aspx"&gt;examples&lt;/a&gt; of Silverlight styles coming from Blend generated files.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;I &lt;a href="http://metadeveloper.blogspot.com/2009/09/ui-inspiration-for-silverlights-blank.html"&gt;mentioned previously&lt;/a&gt; that I think that the antidote to the “blank slate” of RIA is good precedent and patterns developers and designers turn to when they build things. I think Simple Styles are a step in that direction; what I wouldn’t give to look through Robbie’s resource dictionaries. How about it Robbie?&lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-2383282579982308447?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/2383282579982308447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=2383282579982308447' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/2383282579982308447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/2383282579982308447'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2009/10/library-of-week-simple-styles-for.html' title='Library Of The Week: Simple Styles for Silverlight'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-3638512232221069398</id><published>2009-10-08T20:01:00.001-07:00</published><updated>2009-10-08T20:01:35.271-07:00</updated><title type='text'>Library Of The Week: ImageTools</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;I’m not exactly sure of the reasoning, but Silverlight &lt;strong&gt;does not&lt;/strong&gt; have support for either GIF or BMP file formats. This is to say that if you use the Image control, you will be unsuccessful setting the source property to a GIF/BMP file. It’s heresay from nearly a year ago but a member of the Silverlight team, Ashish Thapliyal, &lt;a href="http://blogs.msdn.com/ashish/archive/2008/04/03/silverlight-roadmap-questions.aspx"&gt;posted on (his|her) blog&lt;/a&gt; the following: &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“We don’t want to take the hit for another codec. It may only be a little bit of download time—but our mandate is small and fast and every little bit counts. We are also hesitant to support .gif because it implies support for animated .gif, which we decided would have to be integrated into our animation scheme somehow—and that will be a lot of work. &lt;/p&gt;    &lt;p&gt;Looking from Flash perspective, Flash does not support .gif either. However, as of present, this is something being evaluated, but no date has been announced.”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Initially it was this roadblock that led me down the path to &lt;a href="http://imagetools.codeplex.com/"&gt;ImageTools&lt;/a&gt;. ImageTools is a project that provides Silverlight with good support for GIF and BMP amongst other formats, complete with its own Image control that allows a user to preview either format. It’s been a lifesaver for me on my current project since we have a requirement for preview capability with both. &lt;/p&gt;  &lt;p&gt;ImageTools is more than just support for those antiquated formats. Once you’ve downloaded the latest release you’ll see there are a series of demos to look at: &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Animation      &lt;br /&gt;&lt;/strong&gt;This project shows how easy it is to load an image using the AnimatedImage type. All the sample files are GIF format.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Colors&lt;/strong&gt;     &lt;br /&gt;This project shows the ability to apply brightness and contrast to images on the fly using the ImageTools.Image type.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Dialog&lt;/strong&gt;     &lt;br /&gt;Asynchronously loading an image file using ImageTools.Image with IsLoadingSynchronously flag.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Editor&lt;/strong&gt;     &lt;br /&gt;Shows the ImageEditorContainer control and some editing features&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Flip&lt;/strong&gt;     &lt;br /&gt;Shows the ImageTools.Image.Transform method which supplies not just the ability to rotate, but also to “flip” the pixels within an image either on the X or Y axis (horizontally or vertically)&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Loading&lt;/strong&gt;     &lt;br /&gt;I’m not completely sure why this is called “loading” because there’s a lot more going on here: the AnimatedImage control is on display with the ability to apply filters to images that are loaded. The examples given are&amp;#160; Sepia, Inverter, and GrayscaleBT709.&amp;#160; The IImageFilter interface allows an extensible way to define filters, look into the ImageTools.Filtering library to see the interface and other filters available.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Resizing&lt;/strong&gt;     &lt;br /&gt;Shows dynamic resizing of an existing image (returns an Image object with resized Image type)&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;SaveCanvas&lt;/strong&gt;     &lt;br /&gt;Pretty sick; this handy extension method can return an Image object representing any canvas. &lt;/p&gt;  &lt;p&gt;As you can see, my simple problem of needing support for more image formats resulted in finding a library that went the distance in giving a developer flexibility with image manipulation. One more thing, I love the dependency injected goodness of how the library works. Here’s a little snippet of code to give you an idea of how well designed (extensible!) the library is: &lt;/p&gt;  &lt;p&gt;1. Add a reference to ImageTools, ImageTools.IO.Bmp, ImageTools.IO.Gif&lt;/p&gt;  &lt;p&gt;2. Here is code to load the files – notice the Decoders.AddDecoder takes the generic type parameter to dynamically support the desired file format which means you need only reference the format specific libraries that you need: &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;pre style="padding-bottom: 10px; line-height: 120%; margin: 1em 0px; padding-left: 10px; padding-right: 10px; font-family: courier; background: #000; color: #eee; font-size: 12pt; overflow: auto; padding-top: 10px" class="brush: csharp;"&gt;    public partial class MainPage : UserControl&lt;br /&gt;    {&lt;br /&gt;        public MainPage()&lt;br /&gt;        {&lt;br /&gt;            InitializeComponent();&lt;br /&gt;            &lt;span style="color: #00ff00"&gt;// add decoders&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: orange"&gt;Decoders.AddDecoder&amp;lt;BmpDecoder&amp;gt;();&lt;br /&gt;            Decoders.AddDecoder&amp;lt;GifDecoder&amp;gt;();&lt;/span&gt;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private void Button_Click(object sender, RoutedEventArgs e)&lt;br /&gt;        {&lt;br /&gt;            OpenFileDialog ofd = new OpenFileDialog();&lt;br /&gt;            if (ofd.ShowDialog() == true)&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: #00ff00"&gt;// because decoders are taken care of, &lt;br /&gt;                // load images as needed!&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: orange"&gt;ImageTools.Image i = new ImageTools.Image();&lt;/span&gt;&lt;br /&gt;                using(FileStream fs = ofd.File.OpenRead()){&lt;br /&gt;			&lt;span style="color: #00ff00"&gt;// note: myImage is ImageTools.Controls.AnimatedImage&lt;/span&gt;&lt;br /&gt;			&lt;span style="color: orange"&gt;i.SetSource(fs);&lt;br /&gt;	                myImage.Source = i;&lt;/span&gt;&lt;br /&gt;		}&lt;br /&gt;            }&lt;br /&gt;            &lt;br /&gt;        }&lt;br /&gt;    }&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;It's a bummer when support for things, like well known file formats like GIF are not supported via a more arbitrary decision making process but the consolation is that it’s an opportunity for people make up for it in the community. &lt;a href="http://imagetools.codeplex.com/"&gt;ImageTools&lt;/a&gt; is a great library, every Silverlight developer should check it out.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-3638512232221069398?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/3638512232221069398/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=3638512232221069398' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/3638512232221069398'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/3638512232221069398'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2009/10/library-of-week-imagetools.html' title='Library Of The Week: ImageTools'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-6057057131893970495</id><published>2009-09-27T21:35:00.001-07:00</published><updated>2009-09-27T21:35:56.787-07:00</updated><title type='text'>Library Of The Week: Json.NET</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;In the Christian Bible there’s &lt;a href="http://www.biblegateway.com/passage/index.php?search=luke+17:11-19"&gt;a story&lt;/a&gt; of 10 lepers miraculously healed by Jesus. Even if you don’t believe in Christianity, imagine a leper living in the dregs of society, totally dejected until one day a man shows up and heals him and nine other fellow outcasts. Imagine how happy they should be. &lt;/p&gt;  &lt;p&gt;They’d say thank you, right? &lt;/p&gt;  &lt;p&gt;In the Bible story, only one of the men returns to say thank you and the other nine are so busy getting back to the lives they wished they had that they forget about the reason they were healed in the first place.&lt;/p&gt;  &lt;p&gt;There’s evidence of this kind of lack of gratitude in the ecosystem of free libraries and projects available for .NET developers on the web. I’m a part of that club and not proud of it. I use open source .NET libraries on a regular basis and don’t say thank you. But more than just me, I look at the community participation on CodePlex projects and find it amazing how few people say a simple “thank you.”&lt;/p&gt;  &lt;p&gt;With that in mind, I’m going to start profiling libraries that I’ve used with success to build up awareness of their existence and hopefully inspire the people who write them to do more good work since what they do is so tremendously helpful. &lt;/p&gt;  &lt;p&gt;The first library I want to profile is the &lt;a href="http://json.codeplex.com/"&gt;Json.NET&lt;/a&gt; library available from CodePlex. It contains a great, intuitive Json serialization/deserialization library. You can point to most serializable objects and convert them to a JSON format with such simple sleight of hand as: &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;pre style="padding-bottom: 10px; line-height: 120%; margin: 1em 0px; padding-left: 10px; padding-right: 10px; font-family: courier; background: #000; color: #eee; font-size: 12pt; overflow: auto; padding-top: 10px" class="brush: csharp;"&gt;	List&amp;lt;Foo&amp;gt; data = new List&amp;lt;Foo&amp;gt;();&lt;br /&gt;	// adds to data&lt;br /&gt;	string json = &lt;span style="color: orange"&gt;JsonConvert.Serialize(data)&lt;/span&gt;;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;As if that wasn’t simple, retrieving values from their serialized format is also made trivial: &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="padding-bottom: 10px; line-height: 120%; margin: 1em 0px; padding-left: 10px; padding-right: 10px; font-family: courier; background: #000; color: #eee; font-size: 12pt; overflow: auto; padding-top: 10px" class="brush: csharp;"&gt;	string jsonItems = GetYourJSON();&lt;br /&gt;	List&amp;lt;Foo&amp;gt; data = &lt;span style="color: orange"&gt;JsonConvert.DeserializeObject&amp;lt;List&amp;lt;Foo&amp;gt;&amp;gt;(jsonItems)&lt;/span&gt;;	&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;One great differentiator of Silverlight versus existing web technologies is the ability to have a virtual file system on a client computer. While HTML 5 seems to include facilities for this it is not yet built into existing browsers and even when it is, previous track records on “standards” are a precedent for how balkanized the implementation of them can be. In many areas of web development, you can push the envelope of existing technologies to get what you do out of Silverlight, but the existence of Isolated Storage is a killer feature.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Give Json.NET a try whether you’re doing Silverlight or using a different .NET related paradigm. It’s a great library.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-6057057131893970495?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/6057057131893970495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=6057057131893970495' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/6057057131893970495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/6057057131893970495'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2009/09/library-of-week-jsonnet.html' title='Library Of The Week: Json.NET'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-4745167977582704700</id><published>2009-09-20T22:18:00.001-07:00</published><updated>2009-09-20T22:21:11.101-07:00</updated><title type='text'>Exception HOF Pattern in C#</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;There’s probably a name for this specific approach but in a personal project of late I’ve found a useful pattern for generalizing my exception handling. I write a ExceptionHelper class that takes a variety of high order function style methods to handle my exceptions in a single spot. Here is a somewhat simple form of what I've been doing:&lt;/p&gt;  &lt;pre style="padding-bottom: 10px; line-height: 120%; margin: 1em 0px; padding-left: 10px; padding-right: 10px; font-family: courier; background: #000; color: #eee; font-size: 12pt; overflow: auto; padding-top: 10px" class="brush: csharp;"&gt;    public class ExceptionHelper&lt;br /&gt;    {&lt;br /&gt;&lt;br /&gt;        public static void ExecuteWithSuppress(Action code)&lt;br /&gt;        {&lt;br /&gt;            try&lt;br /&gt;            {&lt;br /&gt;                code();&lt;br /&gt;            }&lt;br /&gt;            catch (Exception ex)&lt;br /&gt;            {&lt;br /&gt;                // pass and ignore the exception&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public static void ExecuteWithHandler(Action code)&lt;br /&gt;        {&lt;br /&gt;            try&lt;br /&gt;            {&lt;br /&gt;                code();&lt;br /&gt;            }&lt;br /&gt;            catch (Exception ex)&lt;br /&gt;            {&lt;br /&gt;                Console.WriteLine(&amp;quot;An exception occured! Details: \n&amp;quot; + ex.ToString());&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public static void ExecuteWithHandler(Action code, string errorMessage)&lt;br /&gt;        {&lt;br /&gt;            try&lt;br /&gt;            {&lt;br /&gt;                code();&lt;br /&gt;            }&lt;br /&gt;            catch (Exception ex)&lt;br /&gt;            {&lt;br /&gt;                Console.WriteLine((errorMessage.Length &amp;gt; 0) ? errorMessage : ex.ToString());&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public static void ExecuteWithHandler(Action code, Action onError)&lt;br /&gt;        {&lt;br /&gt;            try&lt;br /&gt;            {&lt;br /&gt;                code();&lt;br /&gt;            }&lt;br /&gt;            catch (Exception ex)&lt;br /&gt;            {&lt;br /&gt;                if (onError != null)&lt;br /&gt;                {&lt;br /&gt;                    onError();&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public static void ExecuteWithHandler(Action code, Action onError, string errorMessage)&lt;br /&gt;        {&lt;br /&gt;            try&lt;br /&gt;            {&lt;br /&gt;                code();&lt;br /&gt;            }&lt;br /&gt;            catch (Exception ex)&lt;br /&gt;            {&lt;br /&gt;                Console.WriteLine((errorMessage.Length &amp;gt; 0) ? errorMessage : ex.ToString());&lt;br /&gt;                if (onError != null)&lt;br /&gt;                {&lt;br /&gt;                    onError();&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public static bool ExecuteWithNotificationButIgnore(Action code)&lt;br /&gt;        {&lt;br /&gt;            bool ret = true;&lt;br /&gt;            try&lt;br /&gt;            {&lt;br /&gt;                code();&lt;br /&gt;            }&lt;br /&gt;            catch (Exception ex)&lt;br /&gt;            {&lt;br /&gt;                ret = false;&lt;br /&gt;            }&lt;br /&gt;            return ret;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public static void ExecuteWithLogging&amp;lt;T&amp;gt;(Action code) {&lt;br /&gt;            try&lt;br /&gt;            {&lt;br /&gt;                code();&lt;br /&gt;            }&lt;br /&gt;            catch (Exception ex)&lt;br /&gt;            {&lt;br /&gt;                if (ex is T) {&lt;br /&gt;                    Console.WriteLine(&amp;quot;Logging exception &amp;quot; + ex.ToString());&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public static void ExecuteWithLogging(Action code, Action&amp;lt;Exception&amp;gt; handles) {&lt;br /&gt;            try&lt;br /&gt;            {&lt;br /&gt;                code();&lt;br /&gt;            }&lt;br /&gt;            catch (Exception ex)&lt;br /&gt;            {&lt;br /&gt;                handles(ex);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;    }&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;At this point I use it in a lot of places, here are a few scenarios: &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;ExecuteWithSuppress(Action code)&lt;/strong&gt; – code that has a low impact of failure or an expected failure under some conditions. For example, a client of mine once had a legacy database they wanted to me parse a “name” field from. We set up basic heuristics to separate out first and last and so on, but on failure we just returned a blank string. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;ExecuteWithHandler(Action code)&lt;/strong&gt; – you have some generalized exception handling to do something: prompt the user, do logging, etc. ExecuteWithHandler(Action code, Action handler) – you get to pass in the exception handling you want&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;strong&gt;ExecuteWithHandler(Action code, string errorMessage)&lt;/strong&gt; – pass a custom error message&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;strong&gt;ExecuteWithNotificationButIngore(Action code)&lt;/strong&gt; – try to execute some code but return a boolean to indicate success&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;strong&gt;ExecuteWithLogging&amp;lt;T&amp;gt;(Action code)&lt;/strong&gt; – run some code, indicate the types of exceptions to differentiate&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;strong&gt;ExecuteWithLogging(Action code, Action&amp;lt;Exception&amp;gt; handles)&lt;/strong&gt; – pass a method to catch be passed the exception that occurs.&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The resulting code I write with this pattern, I find pleasant. Here are some examples:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="padding-bottom: 10px; line-height: 120%; margin: 1em 0px; padding-left: 10px; padding-right: 10px; font-family: courier; background: #000; color: #eee; font-size: 12pt; overflow: auto; padding-top: 10px" class="brush: csharp;"&gt;    string userName = String.Empty;&lt;br /&gt;    ErrorHelper.ExecuteWithSuppress(() =&amp;gt; userName = doc.Descendants(&amp;quot;Name&amp;quot;).First().Value);&lt;br /&gt;    return userName;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="padding-bottom: 10px; line-height: 120%; margin: 1em 0px; padding-left: 10px; padding-right: 10px; font-family: courier; background: #000; color: #eee; font-size: 12pt; overflow: auto; padding-top: 10px" class="brush: csharp;"&gt;if (ErrorHelper.ExecuteWithNotificationButIgnore(() =&amp;gt;&lt;br /&gt;{&lt;br /&gt;	SendEmail();&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;	// message not delivered, etc, etc.&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I want it to be absolutely clear that this is not a replacement for try/catch/finally logic where it is warranted. It is simply an alternative that can help to keep code clear and readable. As with many things in software, there is taste involved in when and where something like this is leveraged. But it works well enough for me that I thought I’d share. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-4745167977582704700?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/4745167977582704700/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=4745167977582704700' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4745167977582704700'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4745167977582704700'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2009/09/exception-hof-pattern-in-c.html' title='Exception HOF Pattern in C#'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-4052823718511638418</id><published>2009-09-19T17:57:00.001-07:00</published><updated>2009-09-19T18:02:56.538-07:00</updated><title type='text'>FizzBuzz Functional</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;I’ve been reading Tomas Petricek and John Skeet’s &lt;a href="http://www.manning.com/petricek/"&gt;Functional Programming for the Real World&lt;/a&gt;. I’m hoping I can, as Steve McConnel says, &lt;em&gt;program into&lt;/em&gt;&lt;sup&gt;1&lt;/sup&gt; my C# projects some elements of functional problem solving. As I was working to grok the beginning portions of the book I thought I’d rewrite FizzBuzz since I’ve aleady posted a &lt;a href="http://metadeveloper.blogspot.com/2007/03/fizbuzz-conundrum-ramanujan.html"&gt;few&lt;/a&gt; &lt;a href="http://metadeveloper.blogspot.com/2007/09/pivot-udf-fizzbuzz.html"&gt;versions&lt;/a&gt; of a solution. Here is my solution: &lt;/p&gt;  &lt;pre style="padding-bottom: 10px; line-height: 120%; margin: 1em 0px; padding-left: 10px; padding-right: 10px; font-family: courier; background: #000; color: #eee; font-size: 12pt; overflow: auto; padding-top: 10px" class="brush: csharp;"&gt;Func&amp;lt;int, int[], bool&amp;gt; isMultiple = (n, n2) =&amp;gt; n2.Any(m =&amp;gt; n % m == 0);&lt;br /&gt;Func&amp;lt;int, int, string, string&amp;gt; fb = (n, n2, s) =&amp;gt; (n % n2 == 0) ? s : String.Empty;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;foreach(var i in Enumerable&lt;br /&gt;                    .Range(1, 100)&lt;br /&gt;                    .Select(n =&amp;gt;(isMultiple(n, new int[]{3,5}))&lt;br /&gt;                                    ?fb(n, 3, &amp;quot;Fizz&amp;quot;) + fb(n, 5, &amp;quot;Buzz&amp;quot;)&lt;br /&gt;                                    :fb(n, n, n.ToString())&lt;br /&gt;    )Console.WriteLine(i);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Another version, using ForEach on a List&amp;lt;T&amp;gt;: &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="padding-bottom: 10px; line-height: 120%; margin: 1em 0px; padding-left: 10px; padding-right: 10px; font-family: courier; background: #000; color: #eee; font-size: 12pt; overflow: auto; padding-top: 10px" class="brush: csharp;"&gt;Func&amp;lt;int, int[], bool&amp;gt; isMultiple = (n, n2) =&amp;gt; n2.Any(m =&amp;gt; n % m == 0);&lt;br /&gt;Func&amp;lt;int, int, string, string&amp;gt; fb = (n, n2, s) =&amp;gt; (n % n2 == 0) ? s : String.Empty;&lt;br /&gt;&lt;br /&gt;Enumerable&lt;br /&gt;        .Range(1, 100)&lt;br /&gt;        .Select(n =&amp;gt; (isMultiple(n, new int[] { 3, 5 }))&lt;br /&gt;                        ? fb(n, 3, &amp;quot;Fizz&amp;quot;) + fb(n, 5, &amp;quot;Buzz&amp;quot;)&lt;br /&gt;                        : fb(n, n, n.ToString()))&lt;br /&gt;        .ToList()&lt;br /&gt;        .ForEach(num =&amp;gt; Console.WriteLine(num));&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I'm just starting to wade into using F# but I'm hoping to start building my proficiency the further I get into the book&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt;&amp;quot;&lt;em&gt;Don't limit your programming thinking only to the concepts that are supported automatically by your language. The best programmers think of what they want to do, and then they assess how to accomplish their objectives with the programming tools at their disposal.&lt;/em&gt;&amp;quot; – Steve McConnell, &lt;a href="http://cc2e.com/"&gt;Code Complete 2nd Edition&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-4052823718511638418?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/4052823718511638418/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=4052823718511638418' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4052823718511638418'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4052823718511638418'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2009/09/fizzbuzz-functional.html' title='FizzBuzz Functional'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-8418290967477719834</id><published>2009-09-19T08:07:00.001-07:00</published><updated>2009-09-19T08:07:25.425-07:00</updated><title type='text'>UI Inspiration for Silverlight’s Blank Slate</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;I’ll admit that I spent an inordinate amount of time last week thinking about dialog boxes. Silvelright’s canned prompt comes courtesy of a call to MessageBox.Show which displays the browser’s native modal dialog. I think you get the same thing from HtmlPage.Window.Alert too. Needless to say, these &lt;em&gt;should&lt;/em&gt; leave you wanting.&lt;/p&gt;  &lt;p&gt;A good place to start, rather than wasting the better part of a day playing around like me, is to begin with a really good convention rather than making something “original.” &lt;/p&gt;  &lt;p&gt;So without further ado, I’m linking to &lt;a href="http://www.teehanlax.com/blog/?p=1628"&gt;a nice PSD&lt;/a&gt; courtesy of &lt;a href="http://www.teehanlax.com"&gt;teehan+lax&lt;/a&gt; that contains visual styles for many of the iPhone’s UI Elements. I’ll have to build a nice workflow to get things like this into XAML.     &lt;br /&gt;&lt;/p&gt;  &lt;div style="width: 100%; border-top: black 1px dotted"&gt;&amp;#160;&lt;/div&gt;  &lt;p&gt;One more philosophical note (noted below so that if you just needed the link you won’t be daunted by my long windedness) – almost 100 episodes ago the &lt;a href="http://www.hanselminutes.com/"&gt;Hanselminutes podcast&lt;/a&gt; featured Scott interviewing &lt;a href="http://www.loudthinking.com"&gt;David Heinemeier Hansson&lt;/a&gt; and &lt;a href="http://www.martinfowler.com/bliki/"&gt;Martin Fowler&lt;/a&gt; at RailsConf 2007. When talking about UI design and originality here is what DHH had to say: &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“I think the low level of      &lt;br /&gt;expressiveness that we have in HTML and CSS       &lt;br /&gt;and JavaScript is actually a huge boon to most       &lt;br /&gt;applications that constraints are a good thing,       &lt;br /&gt;that&lt;strong&gt; constraints leads to better applications when        &lt;br /&gt;we don’t need to reinvent everything&lt;/strong&gt;. When you       &lt;br /&gt;just have blank canvas where you can paint       &lt;br /&gt;whatever you want on it, you pretty much end up       &lt;br /&gt;with something “original” every time; and I don’t       &lt;br /&gt;think originality in UI design is necessarily a good       &lt;br /&gt;thing; I just think actually most of the time it's a       &lt;br /&gt;bad thing.”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I agree with DHH on this point. It’s worth listening to the entire podcast to put some context to his comments. Where my opinion veers from his or at least my hope for Silverlight is that conventions more powerful than those of HTML/CSS/JavaScript begin to come together for developers and they spend less time thinking about a blank slate and more about how their application works with the benefit of a better experience. &lt;a href="http://silverlight.codeplex.com/Wiki/View.aspx?title=Silverlight%20Toolkit%20Overview%20Part%203"&gt;Themes&lt;/a&gt; are a good step in this direction but things like dialogs go beyond to interactions as opposed to just colors and gradients.&lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-8418290967477719834?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/8418290967477719834/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=8418290967477719834' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/8418290967477719834'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/8418290967477719834'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2009/09/ui-inspiration-for-silverlights-blank.html' title='UI Inspiration for Silverlight’s Blank Slate'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-7326298194307392380</id><published>2009-07-16T21:08:00.001-07:00</published><updated>2009-07-16T21:08:25.423-07:00</updated><title type='text'>Why IE6 Continues To Ruin My Life</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;Via a good friend, &lt;a href="http://blog.digg.com/?p=878"&gt;this post&lt;/a&gt; confirms that many of us are in the same situation: corporate IT people force users to stay in IE6 which forces, in turn, all of us developers to suffer by having to support it. The post, written from an inside Digg perspective doesn't tell the whole story so I’d like to add one dimension. Many corporate environments are in this unfortunate cycle based on the inability to project abstract costs, that is to say that often (always?) software is rushed through and “finished” in an agile, &lt;a href="http://en.wikipedia.org/wiki/You_Ain%27t_Gonna_Need_It"&gt;YAGNI&lt;/a&gt; kind of way, and after the fact managers&lt;sup&gt;1&lt;/sup&gt; have a hard time capturing the costs it takes to support legacy browsers because of “finished” software. The two development efforts are seen as separate, so the extra time in new development doesn’t factor into the decision to keep what is old.&lt;/p&gt;  &lt;p&gt;Cheers for Virtual PC and the ability to test things out without having it installed locally but nevertheless I’d like to force everyone to upgrade and forget that browser ever existed.&lt;/p&gt;  &lt;p&gt;Side note, if you are fortunate enough to force an upgrade, &lt;a href="http://code.google.com/p/ie6-upgrade-warning/"&gt;here is some help&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;sup&gt;1&lt;/sup&gt;I’m sure special kinds of managers are able to guess this in and make good decisions but they are a rare breed and the elixir they drink is hard to find.&lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-7326298194307392380?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/7326298194307392380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=7326298194307392380' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/7326298194307392380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/7326298194307392380'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2009/07/why-ie6-continues-to-ruin-my-life.html' title='Why IE6 Continues To Ruin My Life'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-8781181662084855997</id><published>2009-05-06T05:59:00.001-07:00</published><updated>2009-05-06T05:59:36.364-07:00</updated><title type='text'>Proper 0.2: INotify, DependencyProperty Support</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;Several years ago, in a land of Visual Studio 2005 and no CodeRush, I made a tool called &lt;a href="http://t3rse.com/proper"&gt;Proper&lt;/a&gt; to automate the monotony of creating properties. You just type something like “int Foo;string Bar;” and you’d get basic property generation. You can use shortcuts to types by typing an undercore “_” character. For example, “i_” will pop up int, “dt_” would pop up DateTime (&lt;a href="http://metadeveloper.blogspot.com/2007_04_01_archive.html"&gt;You can also create your own&lt;/a&gt;). It’s funny how the stuff that you’re half serious about can last so long – at the time I wanted to write something useful entirely in JavaScript and to experiment a little with JQuery. &lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: gray 1px solid; border-left: gray 1px solid; border-top: gray 1px solid; border-right: gray 1px solid" src="http://seruyange.com/metadeveloper/Proper4179-simple.png" /&gt; &lt;/p&gt;  &lt;p&gt;The tool suffered neglect for the next few years until recently when I began working with Silverlight and was amazed at how a similar monotony (and more code!) accompanies using INotifyPropertyChanged and implementing dependency properties. I remembered my old tool and added support for generating them there. Here are some screenshots that should illustrate how it works (you select “advanced options” and then select a few checkboxes, in a nutshell). I’ll update the feature to report bugs – I’m sure there are a few. I also neglected to update it for VB.NET – I’ll do that over the next few weeks.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: gray 1px solid; border-left: gray 1px solid; border-top: gray 1px solid; border-right: gray 1px solid" src="http://seruyange.com/metadeveloper/Proper4179-INotify.png" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: gray 1px solid; border-left: gray 1px solid; border-top: gray 1px solid; border-right: gray 1px solid" src="http://seruyange.com/metadeveloper/Proper4179-Dependency.png" /&gt; &lt;/p&gt;  &lt;p&gt;If you do spot a bug, let me know. There are a few new goals I have with the tool, the first of which is refactoring some of the embarrassing JavaScript I crufted together to make this work. I remember &lt;a href="http://www.blueskyonmars.com/"&gt;Kevin Dangoor&lt;/a&gt; talking about Embarrassment Driven Development (when your code is so embarrassing that you’re motivated to update it); that’s the one thing about JavaScript – you can’t hide the way things are constructed. :)&lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-8781181662084855997?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/8781181662084855997/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=8781181662084855997' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/8781181662084855997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/8781181662084855997'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2009/05/proper-02-inotify-dependencyproperty.html' title='Proper 0.2: INotify, DependencyProperty Support'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-1345073467402341460</id><published>2009-04-24T04:22:00.001-07:00</published><updated>2009-04-24T05:12:17.994-07:00</updated><title type='text'>Using IronPython For Converters in Silverlight</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Tim Heuer has a &lt;a href="http://timheuer.com/blog/archive/2008/07/30/format-data-in-silverlight-databinding-valueconverter.aspx"&gt;great intro post&lt;/a&gt; on Silverlight data binding and value converters. The concept is a really nice one but I’m not wild about having to write a class that implements the IValueConverter interface every time I need some ad-hoc tweaking of the values I get from being data bound and how I’d like to use them within XAML. What set me off this track was a case where I simply needed to invert a boolean – what should just be “not myvalue” ended up requiring a class, an interface, and so on.&lt;/p&gt;  &lt;p&gt;Dynamic languages excel at this sort of thing and since they support the ability to evaluate code on the fly I thought it would make sense to write a single implementation of IValueConverter and host Python inside of it to evaluate binding expressions that are passed in. Here is what that might look like: &lt;/p&gt;  &lt;pre style="padding-bottom: 10px; line-height: 120%; margin: 1em 0px; padding-left: 10px; padding-right: 10px; font-family: courier; background: #000; color: #eee; font-size: 12pt; overflow: auto; padding-top: 10px" class="brush: csharp;"&gt;public class PythonExpConverter : IValueConverter&lt;br /&gt;    {&lt;br /&gt;        private ScriptEngine _engine;&lt;br /&gt;&lt;br /&gt;        public PythonExpConverter()&lt;br /&gt;        {&lt;br /&gt;	   &lt;span style="color: orange"&gt;&lt;br /&gt;            ScriptRuntimeSetup setup = Python.CreateRuntimeSetup(null);&lt;br /&gt;            setup.DebugMode = true;&lt;br /&gt;            var runtime = new ScriptRuntime(setup);&lt;br /&gt;            _engine = Python.GetEngine(runtime);&lt;br /&gt; 	    &lt;/span&gt;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)&lt;br /&gt;        {&lt;br /&gt;            object result;&lt;br /&gt;            string python = parameter.ToString()&lt;br /&gt;                                .Replace(&amp;quot;value&amp;quot;, value.ToString());&lt;br /&gt;            try&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: orange"&gt;result = _engine.Execute(python);&lt;/span&gt;&lt;br /&gt;            }&lt;br /&gt;            catch (Exception ex)&lt;br /&gt;            {&lt;br /&gt;                // pass, just use original value&lt;br /&gt;                result = value;&lt;br /&gt;            }&lt;br /&gt;            return result;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)&lt;br /&gt;        {&lt;br /&gt;            // same concept as above&lt;br /&gt;            return value;&lt;br /&gt;        }&lt;br /&gt;    }&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;No magic, just instantiate the Python runtime and then proceed to leverage it in the Convert phase by taking a string as the parameter for the conversion method. Use value as a keyword in your Python expression to get at the value of the underlying data.&amp;#160; Once this is added as a static resource, you can leverage it in many ways. For example, if I had a class “Person”:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="padding-bottom: 10px; line-height: 120%; margin: 1em 0px; padding-left: 10px; padding-right: 10px; font-family: courier; background: #000; color: #eee; font-size: 12pt; overflow: auto; padding-top: 10px" class="brush: csharp;"&gt;public class Person&lt;br /&gt;    {&lt;br /&gt;        public string FirstName { get; set; }&lt;br /&gt;        public string LastName { get; set; }&lt;br /&gt;        public bool OnVacation { get; set; }&lt;br /&gt;        public double Balance { get; set; }&lt;br /&gt;    }&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Let’s say I’m binding to an instance of Person (yeah, very contrived) with the following template conversions: &lt;br /&gt;  &lt;br /&gt;1. Uppercase last name. &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;2. If OnVacation is true, disable a link to their schedule. &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;3. Format balance using some currency specific format. &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;Here is the XAML that leverages my single converter for all of the above:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="padding-bottom: 10px; line-height: 120%; margin: 1em 0px; padding-left: 10px; padding-right: 10px; font-family: courier; background: #000; color: #eee; font-size: 12pt; overflow: auto; padding-top: 10px" class="brush: xml;"&gt;&amp;lt;StackPanel Orientation=&amp;quot;Vertical&amp;quot;&amp;gt;&lt;br /&gt;            &amp;lt;StackPanel Orientation=&amp;quot;Horizontal&amp;quot;&amp;gt;&lt;br /&gt;                &amp;lt;TextBlock Text=&amp;quot;First Name&amp;quot; Width=&amp;quot;100&amp;quot; /&amp;gt;&lt;br /&gt;                &amp;lt;TextBlock Text=&amp;quot;Last Name&amp;quot; Width=&amp;quot;100&amp;quot; /&amp;gt;&lt;br /&gt;                &amp;lt;TextBlock Text=&amp;quot;Is Active&amp;quot; Width=&amp;quot;100&amp;quot; /&amp;gt;&lt;br /&gt;                &amp;lt;TextBlock Text=&amp;quot;Rating&amp;quot; Width=&amp;quot;100&amp;quot; /&amp;gt;&lt;br /&gt;            &amp;lt;/StackPanel&amp;gt;&lt;br /&gt;            &amp;lt;StackPanel Orientation=&amp;quot;Horizontal&amp;quot;&amp;gt;&lt;br /&gt;                &amp;lt;TextBlock Text=&amp;quot;{Binding FirstName}&amp;quot; Width=&amp;quot;100&amp;quot; /&amp;gt;&lt;br /&gt;                &amp;lt;TextBlock &lt;span style="color: orange"&gt;Text=&amp;quot;{Binding LastName, Converter={StaticResource PythonExpConverter}, ConverterParameter=\'value\'.upper()}&amp;quot;&lt;/span&gt; Width=&amp;quot;100&amp;quot; /&amp;gt;&lt;br /&gt;                &amp;lt;HyperlinkButton Width=&amp;quot;100&amp;quot; NavigateUri=&amp;quot;http://foo&amp;quot; Content=&amp;quot;View&amp;quot; &lt;br /&gt;                        &lt;span style="color: orange"&gt;IsEnabled=&amp;quot;{Binding OnVacation, Converter={StaticResource PythonExpConverter}, ConverterParameter=not value}&amp;quot;&lt;/span&gt; /&amp;gt;&lt;br /&gt;                &amp;lt;TextBlock &lt;span style="color: orange"&gt;Text=&amp;quot;{Binding Balance, Converter={StaticResource PythonExpConverter}, ConverterParameter=\'%2.2f\' % value}&amp;quot;&lt;/span&gt; Width=&amp;quot;100&amp;quot; /&amp;gt;&lt;br /&gt;            &amp;lt;/StackPanel&amp;gt;&lt;br /&gt;        &amp;lt;/StackPanel&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;This is a very powerful approach since the limitations you hit will probably be born by a limitation in skill with Python or your dynamic language of choice rather than the approach.&amp;#160; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-1345073467402341460?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/1345073467402341460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=1345073467402341460' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/1345073467402341460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/1345073467402341460'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2009/04/using-ironpython-for-coverters-in.html' title='Using IronPython For Converters in Silverlight'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-8755165287791110489</id><published>2009-03-23T20:38:00.001-07:00</published><updated>2009-03-23T20:38:22.281-07:00</updated><title type='text'>Almost Famous</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;Yours truly, looking embarrassed in the middle.&lt;/p&gt;  &lt;p&gt;&lt;img src="http://seruyange.com/metadeveloper/Almost Famous.jpg" /&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Here is &lt;a href="http://haacked.com/archive/2008/04/10/upcoming-changes-in-routing.aspx"&gt;the link&lt;/a&gt; to Phil's write up. &lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-8755165287791110489?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/8755165287791110489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=8755165287791110489' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/8755165287791110489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/8755165287791110489'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2009/03/almost-famous.html' title='Almost Famous'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-5458362376858746433</id><published>2009-03-20T08:44:00.001-07:00</published><updated>2009-03-20T08:44:16.231-07:00</updated><title type='text'>Voidspace on Dot Net Rocks</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;Michael Foord, aka Voidspace, is on a &lt;a href="http://www.dotnetrocks.com/default.aspx?showNum=429"&gt;Dot Net Rocks episode&lt;/a&gt; talking about IronPython. &lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-5458362376858746433?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/5458362376858746433/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=5458362376858746433' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/5458362376858746433'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/5458362376858746433'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2009/03/voidspace-on-dot-net-rocks.html' title='Voidspace on Dot Net Rocks'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-5589463122520817346</id><published>2009-03-04T08:10:00.001-08:00</published><updated>2009-03-04T08:10:20.599-08:00</updated><title type='text'>Currying with C# and Algotron</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;Friend and coworker &lt;a href="http://algotron.blogspot.com/2009/03/function-curry.html"&gt;Algotron&lt;/a&gt; just posted an intro and sample of currying with C#. I decided to try out currying with the idea of successive regular expressions on a string array - I found it easy to approach first with anonymous delegate syntax and then use lambda expressions. Once this was in place it was easy to understand the use of an extension method to curry any binary function.&amp;#160; &lt;/p&gt;  &lt;pre style="padding-right: 10px; padding-left: 10px; font-size: 12pt; background: #000; padding-bottom: 10px; margin: 1em 0px; overflow: auto; color: #eee; line-height: 120%; padding-top: 10px; font-family: courier"&gt;Func&amp;lt;string, string[], Func&amp;lt;string, string[]&amp;gt;&amp;gt; fil = &lt;br /&gt;delegate(string pattern, string[] lines){&lt;br /&gt;    return delegate(string pattern2)&lt;br /&gt;    {&lt;br /&gt;	return lines&lt;br /&gt;		    .Where(p=&amp;gt; Regex.IsMatch(p, pattern))&lt;br /&gt;		    .Where(p =&amp;gt; Regex.IsMatch(p, pattern2))&lt;br /&gt;		    .ToArray();&lt;br /&gt;    };&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Func&amp;lt;string, string[], Func&amp;lt;string, string[]&amp;gt;&amp;gt; regFil = &lt;br /&gt;				(pattern, input) =&amp;gt; &lt;br /&gt;				    (pattern2) =&amp;gt; &lt;br /&gt;					input&lt;br /&gt;					    .Where(p =&amp;gt; Regex.IsMatch(p, pattern))&lt;br /&gt;					    .Where(p =&amp;gt; Regex.IsMatch(p, pattern2))&lt;br /&gt;					    .ToArray();&lt;br /&gt;					    &lt;br /&gt;// assume some address data&lt;br /&gt;string[] data = new string[]{&amp;quot;1234 Somewhere&amp;quot;, &amp;quot;this&amp;quot;, &amp;quot;777 dakota&amp;quot;};&lt;br /&gt;&lt;br /&gt;var filterNumeric = regFil(@&amp;quot;\d&amp;quot;, data); // make sure it has a number&lt;br /&gt;var filterUCase = filterNumeric(&amp;quot;[A-Z]&amp;quot;); // make sure it has an uppercase character&lt;br /&gt;&lt;br /&gt;Console.Write(String.Join(&amp;quot;,&amp;quot;, filterUCase));					    &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;That's cool stuff, worth looking at for a while to try to understand.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-5589463122520817346?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/5589463122520817346/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=5589463122520817346' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/5589463122520817346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/5589463122520817346'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2009/03/currying-with-c-and-algotron.html' title='Currying with C# and Algotron'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-2449108004033043389</id><published>2009-03-03T05:36:00.001-08:00</published><updated>2009-03-03T05:36:56.505-08:00</updated><title type='text'>IronPython + SilverlightFX</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;&lt;a href="http://projects.nikhilk.net/SilverlightFX/"&gt;SilverlightFX&lt;/a&gt; is an interesting library for declaratively attaching behaviors to objects in XAML. People new to the Silverlight world will like how they can use it to get simple animations out of simple code. Here's a step by step: &lt;/p&gt;  &lt;p&gt;1. If you don't have it done already, &lt;a href="http://metadeveloper.blogspot.com/2009/02/dlr-ironpython-silverlight-in-5-steps.html"&gt;set up an IronPython / Silverlight project&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;2. &lt;a href="http://projects.nikhilk.net/SilverlightFX"&gt;Download SilverlightFX&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;3. Copy SilverlightFX binaries into your /app directory.&lt;/p&gt;  &lt;p&gt;3. Edit the AppManifest.xaml to include the SilverlightFX binaries. Here is an example: &lt;/p&gt;  &lt;pre style="padding-right: 10px; padding-left: 10px; font-size: 12pt; background: #000; padding-bottom: 10px; margin: 1em 0px; overflow: auto; color: #eee; line-height: 120%; padding-top: 10px; font-family: courier"&gt;&amp;lt;Deployment xmlns=&amp;quot;http://schemas.microsoft.com/client/2007/deployment&amp;quot; &lt;br /&gt;	xmlns:x=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot; &lt;br /&gt;	RuntimeVersion=&amp;quot;2.0.31005.00&amp;quot; &lt;br /&gt;	EntryPointAssembly=&amp;quot;Microsoft.Scripting.Silverlight&amp;quot; &lt;br /&gt;	EntryPointType=&amp;quot;Microsoft.Scripting.Silverlight.DynamicApplication&amp;quot;&amp;gt;&lt;br /&gt;  &amp;lt;Deployment.Parts&amp;gt;&lt;br /&gt;    &amp;lt;!-- Add additional assemblies here --&amp;gt;&lt;br /&gt;    &amp;lt;AssemblyPart Source=&amp;quot;Microsoft.Scripting.ExtensionAttribute.dll&amp;quot; /&amp;gt;&lt;br /&gt;    &amp;lt;AssemblyPart Source=&amp;quot;Microsoft.Scripting.Silverlight.dll&amp;quot; /&amp;gt;&lt;br /&gt;    &amp;lt;AssemblyPart Source=&amp;quot;Microsoft.Scripting.Core.dll&amp;quot; /&amp;gt;&lt;br /&gt;    &amp;lt;AssemblyPart Source=&amp;quot;Microsoft.Scripting.dll&amp;quot; /&amp;gt;&lt;br /&gt;    &amp;lt;AssemblyPart Source=&amp;quot;IronPython.dll&amp;quot; /&amp;gt;&lt;br /&gt;    &amp;lt;AssemblyPart Source=&amp;quot;IronPython.Modules.dll&amp;quot; /&amp;gt;&lt;br /&gt;    &amp;lt;AssemblyPart Source=&amp;quot;System.Windows.Controls.dll&amp;quot; /&amp;gt;&lt;br /&gt;    &amp;lt;AssemblyPart Source=&amp;quot;System.Windows.Controls.Data.dll&amp;quot; /&amp;gt;&lt;br /&gt;    &amp;lt;AssemblyPart Source=&amp;quot;Silverlight.FX.dll&amp;quot; /&amp;gt;&lt;br /&gt;  &amp;lt;/Deployment.Parts&amp;gt;&lt;br /&gt;&amp;lt;/Deployment&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;4. Edit your app.xaml file to include references to the SilverlightFX namespaces. Here is an example:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="padding-right: 10px; padding-left: 10px; font-size: 12pt; background: #000; padding-bottom: 10px; margin: 1em 0px; overflow: auto; color: #eee; line-height: 120%; padding-top: 10px; font-family: courier"&gt;&amp;lt;UserControl&lt;br /&gt;	xmlns=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&lt;br /&gt;	xmlns:x=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;br /&gt;	x:Class=&amp;quot;System.Windows.Controls.UserControl&amp;quot;&lt;br /&gt;	xmlns:fxui=&amp;quot;clr-namespace:Silverlight.FX.UserInterface;assembly=Silverlight.FX&amp;quot;&lt;br /&gt;   	xmlns:fxeffects=&amp;quot;clr-namespace:Silverlight.FX.UserInterface.Effects;assembly=Silverlight.FX&amp;quot;	&lt;br /&gt;	&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;5. Party on with some declarative effects. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="padding-right: 10px; padding-left: 10px; font-size: 12pt; background: #000; padding-bottom: 10px; margin: 1em 0px; overflow: auto; color: #eee; line-height: 120%; padding-top: 10px; font-family: courier"&gt;&amp;lt;Border Grid.Row=&amp;quot;1&amp;quot; x:Name=&amp;quot;redRect&amp;quot; Opacity=&amp;quot;0.2&amp;quot;&amp;gt;&lt;br /&gt;	&amp;lt;TextBlock x:Name=&amp;quot;outPut&amp;quot; TextWrapping=&amp;quot;Wrap&amp;quot; &lt;br /&gt;		Text=&amp;quot;Lorem ipsum dolor sit amet,...&amp;quot;  /&amp;gt;&lt;br /&gt;    &amp;lt;fxui:Interaction.Behaviors&amp;gt;&lt;br /&gt;    &amp;lt;fxui:HoverEffect&amp;gt;&lt;br /&gt;      &amp;lt;fxeffects:Fade FadeOpacity=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;    &amp;lt;/fxui:HoverEffect&amp;gt;&lt;br /&gt;    &amp;lt;/fxui:Interaction.Behaviors&amp;gt;&lt;br /&gt;&amp;lt;/Border&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;6. Read Nikhil's related &lt;a href="http://www.nikhilk.net/entry.aspx?id=212"&gt;blog entries&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-2449108004033043389?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/2449108004033043389/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=2449108004033043389' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/2449108004033043389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/2449108004033043389'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2009/03/ironpython-silverlightfx.html' title='IronPython + SilverlightFX'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-5700428086055751176</id><published>2009-02-26T23:35:00.001-08:00</published><updated>2009-02-26T23:35:08.025-08:00</updated><title type='text'>DLR + IronPython + Silverlight in 5 Steps (with pictures)</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;A simple step by step&lt;sup&gt;1&lt;/sup&gt;.&lt;/p&gt;  &lt;p&gt;1. Download the &lt;a href="http://www.codeplex.com/sdlsdk/Release/ProjectReleases.aspx?ReleaseId=11955"&gt;Silverlight DLR SDK&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;2. Map the binaries (the folder with Chiron&lt;sup&gt;2&lt;/sup&gt; et. al.)&amp;#160; in your PATH Environment variable.     &lt;br /&gt;    &lt;br /&gt;&lt;img src="http://seruyange.com/metadeveloper/ChironPath.jpg" /&gt; &lt;/p&gt;  &lt;p&gt;3. Download &lt;a href="http://seruyange.com/metadeveloper/Starter.zip"&gt;this starter template&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;4. Run &lt;font face="Courier New"&gt;&lt;strong&gt;chiron /w&lt;/strong&gt;&lt;/font&gt; from the command line in the directory of the starter.     &lt;br /&gt;    &lt;br /&gt;&lt;img src="http://seruyange.com/metadeveloper/ChironInit.jpg" /&gt;     &lt;br /&gt;    &lt;br /&gt;&lt;em&gt;a) Make sure you're in the correct folder      &lt;br /&gt;b) The command is&lt;/em&gt;&lt;font face="Courier New"&gt;&lt;em&gt; &lt;/em&gt;&lt;strong&gt;&lt;em&gt;chiron /w          &lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/font&gt;&lt;em&gt;c) You'll get a message that Chiron is serving at &lt;/em&gt;&lt;a href="http://localhost:2060"&gt;&lt;em&gt;&lt;/em&gt;&lt;a href="http://localhost:2060a"&gt;http://localhost:2060&lt;/a&gt;&lt;/a&gt;a&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;5. Navigate to &lt;a href="http://localhost:2060"&gt;http://localhost:2060&lt;/a&gt; and hit index.html to see what's up.&lt;/p&gt;  &lt;p&gt;&lt;img src="http://seruyange.com/metadeveloper/ChironRunning.jpg" /&gt;     &lt;br /&gt;    &lt;br /&gt;&lt;img src="http://seruyange.com/metadeveloper/StarterPyLight.jpg" /&gt;&amp;#160; &lt;br /&gt;The starter&lt;sup&gt;3&lt;/sup&gt; should make it easy to get up and running. Open the &lt;em&gt;app.py&lt;/em&gt; and &lt;em&gt;app.xaml&lt;/em&gt; files and you will be able to modify the xaml and write code to customize it into your own creation.&lt;/p&gt;  &lt;p&gt;1. Michael Foord aka Voidspace is &lt;strong&gt;the guy&lt;/strong&gt; when it comes to IronPython. He wrote a book on it. He has &lt;a href="http://www.voidspace.org.uk/ironpython/silverlight/introduction.shtml"&gt;a &amp;quot;getting started&amp;quot; tutorial that is much more extensive&lt;/a&gt; if you want more details. His tutorial isn't as terse so I thought I'd write this one for people who just want a step by step before poking around. There are other people like &lt;a href="http://blog.jimmy.schementi.com/"&gt;JimmyThinking&lt;/a&gt; who offer a lot of help to beginners but lean towards IronRuby.&lt;/p&gt;  &lt;p&gt;2. The name &lt;a href="http://en.wikipedia.org/wiki/Chiron"&gt;Chiron&lt;/a&gt; for a tool makes me think about a few things: first, being born out of time since most BigCo shops today name computers and tools in a hollow, mechanistic fashion. In the salad days of computing on Unix, tools had cool names like ed or yacc. The second thing I think is that &lt;a href="http://blogs.msdn.com/dmitryr/default.aspx"&gt;Dmitri&lt;/a&gt; (and I'm sure there's an &amp;quot;et. al.&amp;quot;) must be a cool, interdisciplinary fellow to come up with a name like that.&lt;/p&gt;  &lt;p&gt;3. The exchange in the sample is from Swahili classes at &lt;a href="http://www.rusinga.ac.ke/"&gt;Rusinga Primary School&lt;/a&gt; in Nairobi.&lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-5700428086055751176?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/5700428086055751176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=5700428086055751176' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/5700428086055751176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/5700428086055751176'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2009/02/dlr-ironpython-silverlight-in-5-steps.html' title='DLR + IronPython + Silverlight in 5 Steps (with pictures)'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-73406280707161255</id><published>2009-02-25T22:34:00.001-08:00</published><updated>2009-02-25T22:42:14.887-08:00</updated><title type='text'>nRegex 9</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;I've been getting up to speed with Silverlight and decided to &lt;a href="http://nregex.com/nregex9/"&gt;rewrite nRegex&lt;/a&gt; to leverage it as a client side processor for what the &lt;a href="http://www.nregex.com"&gt;original nRegex&lt;/a&gt; shipped to the server with AJAX calls.&amp;#160; In the original nRegex this worked fine until you had to deal with large documents but once you were in the large document space things began to go awry. My solution was to allow for a &amp;quot;manual&amp;quot; evalution of the regular expression (rather than a time interval based evaluation) but I'm hoping that Silverlight will prove an elegant solution since not only can it harness the power of the client but it also has features to run code asynchronously. &lt;/p&gt;  &lt;p&gt;In my first iteration I leveraged a lot of the JavaScript interop for the Silverlight control and avoided XAML for display. I think in the next iteration I'm going to spend more time on displaying results via XAML.&lt;/p&gt;  &lt;p&gt;Feel free to present any comment or suggestion on nRegex and its direction.&lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-73406280707161255?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/73406280707161255/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=73406280707161255' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/73406280707161255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/73406280707161255'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2009/02/nregex-9.html' title='nRegex 9'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-4228205557361415759</id><published>2009-02-19T21:44:00.001-08:00</published><updated>2009-02-19T21:44:49.200-08:00</updated><title type='text'>DDD</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;Not to be confused with D&amp;amp;D... Domain Driven Design for those of us who don't keep up with all the acronyms.&lt;/p&gt;  &lt;p&gt;I'm seeing this more and more in places I lurk. DDD is the next buzz like Agile?&lt;/p&gt;  &lt;p&gt;Next steps: relisten to &lt;a href="http://www.hanselminutes.com/default.aspx?showID=158"&gt;Hanselminutes&lt;/a&gt;, &lt;a href="http://altnetpodcast.com/episodes/15-domain-driven-design"&gt;ALT.NET Podcast&lt;/a&gt;, lurk on &lt;a href="http://domaindrivendesign.org/index.htm"&gt;DDD site&lt;/a&gt;, and pay more attention on the &lt;a href="http://tech.groups.yahoo.com/group/altdotnet/"&gt;ALT.NET mailing list&lt;/a&gt;.&lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-4228205557361415759?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/4228205557361415759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=4228205557361415759' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4228205557361415759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4228205557361415759'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2009/02/ddd.html' title='DDD'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-5649889498058682253</id><published>2009-02-09T20:42:00.001-08:00</published><updated>2009-02-09T20:42:13.519-08:00</updated><title type='text'>Which is better, IronPython or F#?</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;&lt;a href="http://langexplr.blogspot.com/2009/01/some-notes-on-using-f-code-from.html"&gt;Both&lt;/a&gt;.&lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-5649889498058682253?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/5649889498058682253/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=5649889498058682253' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/5649889498058682253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/5649889498058682253'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2009/02/which-is-better-ironpython-or-f.html' title='Which is better, IronPython or F#?'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-3632969519425119799</id><published>2009-01-11T11:23:00.001-08:00</published><updated>2009-01-11T11:23:47.999-08:00</updated><title type='text'>Lazy Coder On Point</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;&lt;a href="http://spellcoder.com/blogs/dodyg/archive/2009/01/07/18138.aspx"&gt;SOA is Dead?&lt;/a&gt;&lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-3632969519425119799?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/3632969519425119799/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=3632969519425119799' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/3632969519425119799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/3632969519425119799'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2009/01/lazy-coder-on-point.html' title='Lazy Coder On Point'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-4894629815038658746</id><published>2009-01-02T06:05:00.001-08:00</published><updated>2009-01-02T06:05:20.070-08:00</updated><title type='text'>Another "Dead Java" Proclamation</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;I was browsing to Elliote Rusty Harold's blog to see if he had any predictions for XML in 2009 and to my surprise I found his post: &amp;quot;&lt;a href="http://cafe.elharo.com/programming/java-is-dead-long-live-python/"&gt;Java is Dead. Long Live Python!&lt;/a&gt;&amp;quot;&lt;/p&gt;  &lt;p&gt;My familiarity with Harold comes from a time in my life where I worked heavily with XML and later Java and it was &lt;a href="http://www.elharo.com/"&gt;his books&lt;/a&gt; on both subjects that proved invaluable when I hit my rather frequent roadblocks.&amp;#160; As invested as he is in Java, what would make him say as much? In a nutshell, it's the way the language has been implemented over the last few years - claims which, even if you don't agree with the premise that Java is &amp;quot;dead like COBOL&amp;quot;, are worth some attention.&lt;/p&gt;  &lt;p&gt;What is interesting to me about Java right now is not the language itself but dynamic languages and their platforms built on top of the JVM. &lt;a href="http://en.wikipedia.org/wiki/JRuby"&gt;JRuby&lt;/a&gt; is what comes to mind first and I'm recently interested in what a &lt;a href="http://wiki.glassfish.java.net/Wiki.jsp?page=JRuby"&gt;JRuby/Glassfish&lt;/a&gt; world looks and feels like. &lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-4894629815038658746?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/4894629815038658746/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=4894629815038658746' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4894629815038658746'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4894629815038658746'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2009/01/another-java-proclamation.html' title='Another &amp;quot;Dead Java&amp;quot; Proclamation'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-479428500991129643</id><published>2008-12-31T05:27:00.001-08:00</published><updated>2008-12-31T05:27:13.273-08:00</updated><title type='text'>Using SGMLParser With IronPython</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;Mark Pilgrim's excellent Dive Into Python has &lt;a href="http://diveintopython.org/html_processing/index.html"&gt;a section&lt;/a&gt; on using SGMLParser and having seen nothing similar (and imagining its many uses!) I thought I'd give it a whirl in IronPython. I thought a good proof of concept would be creating a database out of link heavy sites.&amp;#160; Since I visit &lt;a href="http://www.aldaily.com/"&gt;Arts &amp;amp; Letters Daily&lt;/a&gt; every so often and the closet intellectual in me likes to hang onto what I find there, I thought I'd target it: &lt;/p&gt;  &lt;pre style="padding-right: 10px; padding-left: 10px; font-size: 12pt; background: #000; padding-bottom: 10px; margin: 1em 0px; overflow: auto; color: #eee; line-height: 120%; padding-top: 10px; font-family: courier"&gt;import urllib2&lt;br /&gt;import sgmllib&lt;br /&gt;from sgmllib import SGMLParser&lt;br /&gt;&lt;br /&gt;import clr&lt;br /&gt;clr.AddReference(&amp;quot;System.Data&amp;quot;)&lt;br /&gt;clr.AddReference(&amp;quot;System.Net&amp;quot;)&lt;br /&gt;from System import *&lt;br /&gt;from System.Data import *&lt;br /&gt;from System.Net import *&lt;br /&gt;&lt;br /&gt;class AlReader(SGMLParser):&lt;br /&gt;    def reset(self):&lt;br /&gt;        SGMLParser.reset(self)&lt;br /&gt;        self.urls = []&lt;br /&gt;        self.pieces = []&lt;br /&gt;        self.track = 0&lt;br /&gt;        self.prePend = &amp;quot;No Category&amp;quot;&lt;br /&gt;        self.counter = 0&lt;br /&gt;        &lt;br /&gt;    def start_a(self, attrs):&lt;br /&gt;        href = [v for k,v in attrs if k == &amp;quot;href&amp;quot;]&lt;br /&gt;        key = [v for k,v in attrs if k == &amp;quot;name&amp;quot;]&lt;br /&gt;        if href:&lt;br /&gt;            self.urls.extend(href)&lt;br /&gt;            self.track = 1&lt;br /&gt;        elif key:&lt;br /&gt;            self.prePend = attrs[0][1]&lt;br /&gt;    &lt;br /&gt;    def handle_data(self, text):&lt;br /&gt;        if self.track:&lt;br /&gt;            self.pieces.append(&amp;quot;|&amp;quot;.join([self.prePend, text]))&lt;br /&gt;            self.counter = self.counter + 1&lt;br /&gt;    &lt;br /&gt;    def end_a(self):&lt;br /&gt;        self.track = 0&lt;br /&gt;    &lt;br /&gt;    def get_links(self):&lt;br /&gt;        links = []&lt;br /&gt;        for i in range(0, len(self.urls)):&lt;br /&gt;            links.append(&amp;quot;|&amp;quot;.join([self.pieces[i], self.urls[i]]))&lt;br /&gt;        return links&lt;br /&gt;        #print &amp;quot;%s %s&amp;quot; % (self.counter, &amp;quot;Total links&amp;quot;) &lt;br /&gt;    &lt;br /&gt;    def get_link_datatable(self):&lt;br /&gt;        d = DataTable()&lt;br /&gt;        d.Columns.Add(DataColumn(&amp;quot;Category&amp;quot;, Type.GetType(&amp;quot;System.String&amp;quot;)))&lt;br /&gt;        d.Columns.Add(DataColumn(&amp;quot;Site&amp;quot;, Type.GetType(&amp;quot;System.String&amp;quot;)))&lt;br /&gt;        d.Columns.Add(DataColumn(&amp;quot;Url&amp;quot;, Type.GetType(&amp;quot;System.String&amp;quot;)))&lt;br /&gt;        &lt;br /&gt;        for text in self.get_links():&lt;br /&gt;            newRow = d.NewRow()&lt;br /&gt;            newRow[&amp;quot;Category&amp;quot;], newRow[&amp;quot;Site&amp;quot;], newRow[&amp;quot;Url&amp;quot;] = text.split(&amp;quot;|&amp;quot;)&lt;br /&gt;            d.Rows.Add(newRow)&lt;br /&gt;&lt;br /&gt;        return d&lt;br /&gt;        &lt;br /&gt;response = urllib2.urlopen(&amp;quot;http://www.aldaily.com&amp;quot;)&lt;br /&gt;a = AlReader()&lt;br /&gt;a.feed(response.read())&lt;br /&gt;linkdata = a.get_link_datatable()&lt;br /&gt;# write it out to prove we got it.&lt;br /&gt;ds = DataSet()&lt;br /&gt;ds.Tables.Add(linkdata)&lt;br /&gt;ds.WriteXml(&amp;quot;c:\\temp\\arts and letters links.xml&amp;quot;)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;If you find tihs interesting do make sure you look at Pilgrim's &lt;a href="http://diveintopython.org/html_processing/index.html"&gt;chapter on HTML Processing&lt;/a&gt;.&amp;#160; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-479428500991129643?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/479428500991129643/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=479428500991129643' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/479428500991129643'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/479428500991129643'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/12/using-sgmlparser-with-ironpython.html' title='Using SGMLParser With IronPython'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-2115732526098270287</id><published>2008-12-20T05:50:00.001-08:00</published><updated>2008-12-20T05:50:11.915-08:00</updated><title type='text'>Parameterized IN Queries</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;I haven't listened to the podcast yet but saw a cool trick from Joel Spolsky on approaching parameterized IN queries. Purists will bemoan its lack of premature optimization but I think it's novel enough to study because of the approach: using the SQL LIKE operator on your parameter rather than a field, which is what people like me are used to. There's code on &lt;a href="http://stackoverflow.com/questions/337704/parameterizing-a-sql-in-clause"&gt;the StackOverflow post&lt;/a&gt; but I thought I'd paste some of the poking around I did in Sql Management Studio: &lt;/p&gt;  &lt;pre style="padding-right: 10px; padding-left: 10px; font-size: 12pt; background: #000; padding-bottom: 10px; margin: 1em 0px; overflow: auto; color: #eee; line-height: 120%; padding-top: 10px; font-family: courier"&gt;-- setup&lt;br /&gt;CREATE TABLE Person&lt;br /&gt;(&lt;br /&gt;      PersonID INT IDENTITY(1,1) PRIMARY KEY, &lt;br /&gt;      FirstName VARCHAR(50) NULL&lt;br /&gt;)&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;-- some data &lt;br /&gt;INSERT INTO Person VALUES('David')&lt;br /&gt;INSERT INTO Person VALUES('Jonathan')&lt;br /&gt;INSERT INTO Person VALUES('Zlatan')&lt;br /&gt;INSERT INTO Person VALUES('Trilby')&lt;br /&gt;&lt;br /&gt;-- here's the magic&lt;br /&gt;DECLARE @FirstName VARCHAR(50)&lt;br /&gt;SET @FirstName = '|David|Trilby|'&lt;br /&gt;SELECT * FROM Person WHERE @FirstName like '%|' + FirstName + '|%'&lt;br /&gt;&lt;br /&gt;-- ported to a proc&lt;br /&gt;CREATE PROC uspPersonSelector&lt;br /&gt;      @FirstNames VARCHAR(500)&lt;br /&gt;AS&lt;br /&gt;      SELECT * FROM Person WHERE @FirstNames like '%|' + FirstName + '|%'&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;-- showing it works&lt;br /&gt;uspPersonSelector '|David|Trilby|'&lt;br /&gt;&lt;br /&gt;-- somewhere in the netherworld of C#: &lt;br /&gt;/* &lt;br /&gt;string[] names = {&amp;quot;David&amp;quot;, &amp;quot;Trilby&amp;quot;};&lt;br /&gt;SqlCommand cmd = GetACommandFromSomewhere();&lt;br /&gt;cmd.Parameters.AddWithValue(&amp;quot;@FirstNames&amp;quot;, &amp;quot;|&amp;quot;.Join(names));&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;--teardown&lt;br /&gt;Drop Table Person &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-2115732526098270287?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/2115732526098270287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=2115732526098270287' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/2115732526098270287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/2115732526098270287'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/12/parameterized-in-queries.html' title='Parameterized IN Queries'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-1031778292176281601</id><published>2008-12-19T05:20:00.001-08:00</published><updated>2008-12-19T05:20:51.078-08:00</updated><title type='text'>Programmers as Goalkeepers</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;The 8th annual New York Times magazine Year in Ideas featured &lt;a href="http://www.nytimes.com/interactive/2008/12/14/magazine/2008_IDEAS.html#g-ideas"&gt;a section on Goalkeeper Science&lt;/a&gt; profiling this paper by some Israeli scientists called &lt;a href="http://mpra.ub.uni-muenchen.de/4477/"&gt;Action bias among elite soccer goalkeepers: The case of penalty kicks&lt;/a&gt;. In looking at the approach of keepers in some 286 penalty kicks they found that though 94 percent of the time they dived to the right or left, the chances of stopping the kick were highest when the goalie stayed in the center. The researchers theorized that the reason keepers behaved in this way was that they were afraid of appearing that they were doing nothing. &lt;/p&gt;  &lt;p&gt;Immediately I remembered a blurb from an Paul Graham's &lt;a href="http://www.paulgraham.com/opensource.html"&gt;What Business Can Learn from Open Source&lt;/a&gt;&amp;#160; essay where he expressed a similar dynamic for programmers: &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;quot;The other problem with pretend work is that it often looks better than real work. When I'm writing or hacking I spend as much time just thinking as I do actually typing. Half the time I'm sitting drinking a cup of tea, or walking around the neighborhood. This is a critical phase-- this is where ideas come from-- and yet I'd feel guilty doing this in most offices, with everyone else looking busy.&amp;quot; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I wonder what Paul would say about the &lt;a href="http://www.youtube.com/watch?v=ziOG_GHNVq0"&gt;IBM commercial on ideating&lt;/a&gt; in which concludes that people should &amp;quot;start doing&amp;quot; after showing an image of people laying inert on an office floor, a stark portrayal of how a manager at IBM might see someone like Paul Graham. &lt;/p&gt;  &lt;p&gt;As programmers much of what we should do may not appear to be work for the nonprogrammer and as a result many of us end up doing it at home. I spend a lot of time at home exploring different technologies in a kind of tangential approach that wouldn't look like &amp;quot;working&amp;quot; at work but often my best ideas and solutions come from here.&amp;#160; I also spend a lot of time reading technical books and blogs. &lt;/p&gt;  &lt;p&gt;I'm wondering what it would look like if we could step back and look in a quantitative way at the performance deficits resulting from the desire to look busy at work. What would the workday look like? I'm wondering what an hour for reading, a few hours for exploratory/research programming, and the rest as project time would do for my own productivity.&lt;/p&gt;  &lt;p&gt;If programming was goalkeeping was programming, &lt;a href="http://en.wikipedia.org/wiki/Van_der_sar"&gt;Edwin Van der Sar&lt;/a&gt; would be quite the Python hacker.&amp;#160; &lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-1031778292176281601?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/1031778292176281601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=1031778292176281601' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/1031778292176281601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/1031778292176281601'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/12/programmers-as-goalkeepers.html' title='Programmers as Goalkeepers'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-8768176820640057846</id><published>2008-12-18T04:38:00.001-08:00</published><updated>2008-12-18T04:38:58.328-08:00</updated><title type='text'>Windows Forms + Web, WIB part II</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;A while back I &lt;a href="http://metadeveloper.blogspot.com/2008/10/mashing-up-jquery-and-windows-forms.html"&gt;made the case&lt;/a&gt; for applications that put together the strengths of Windows Forms and Web technologies (I thought of the catchy &amp;quot;WIB&amp;quot; as a name for this approach). The example I&amp;#8217;d given then was a Windows Forms hosted Web Browser for local images that one could use for annotation that leveraged Windows for local file storage and a Web technology like jQuery for doing transitions in the user interface. &lt;/p&gt;  &lt;p&gt;Today I thought of another use for this approach that wrapped itself nicely into a tool I've been using for some time to download mp3s from a given website&lt;sup&gt;1,2&lt;/sup&gt;. I call the tool &amp;quot;Fortinbras&amp;quot; and if you find it useful I'd be delighted. &lt;/p&gt;  &lt;p&gt;&lt;img src="http://www.seruyange.com/metadeveloper/Fortinbras.jpg" /&gt; &lt;/p&gt;  &lt;p&gt;So how was Fortinbras changed? &lt;/p&gt;  &lt;p&gt;Parsing the HTML for mp3 files was a little tricky. My initial approach was to use a regular expression against the text of the document which, truth be told, is a brittle approach. Part of why I never trumpted the tool was because I never completely perfected this tactic (while it worked well enough for me personally). My code looked as follows: &lt;/p&gt;  &lt;pre style="padding-right: 10px; padding-left: 10px; font-size: 12pt; background: #000; padding-bottom: 10px; margin: 1em 0px; overflow: auto; color: #eee; line-height: 120%; padding-top: 10px; font-family: courier"&gt;	WebClient wc = new WebClient();&lt;br /&gt;	string pageText = wc.DownloadString(browser.Url.ToString());&lt;br /&gt;	Regex re = new Regex(&amp;quot;href=\&amp;quot;(?&amp;lt;url&amp;gt;.+?mp3)\&amp;quot;&amp;quot;, RegexOptions.IgnoreCase);&lt;br /&gt;	Match mp3Matches = re.Match(text);&lt;br /&gt;	while (mp3Matches.Success)&lt;br /&gt;	{&lt;br /&gt;		string matchUrl = mp3Matches.Groups[&amp;quot;url&amp;quot;].Value.ToString();&lt;br /&gt;		AddMp3(browser.Url.ToString(), data, matchUrl);&lt;br /&gt;		mp3Matches = mp3Matches.NextMatch();&lt;br /&gt;	}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Today my epiphany was that I didn't need to use a regular expression when I could use the DOM from Windows Forms to pull out the anchors that have mp3 destinations. Here's what that looks like: &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="padding-right: 10px; padding-left: 10px; font-size: 12pt; background: #000; padding-bottom: 10px; margin: 1em 0px; overflow: auto; color: #eee; line-height: 120%; padding-top: 10px; font-family: courier"&gt;	while (browser.Document.Body == null)Application.DoEvents();&lt;br /&gt;	HtmlElementCollection anchors = browser.Document.Body.GetElementsByTagName(&amp;quot;a&amp;quot;);&lt;br /&gt;	foreach (HtmlElement anch in anchors)&lt;br /&gt;	{&lt;br /&gt;		string linkUrl = anch.GetAttribute(&amp;quot;href&amp;quot;);&lt;br /&gt;		if (linkUrl.ToLower().EndsWith(&amp;quot;mp3&amp;quot;))&lt;br /&gt;		{&lt;br /&gt;		    AddMp3(browser.Url.ToString(), data, linkUrl);&lt;br /&gt;		}&lt;br /&gt;	}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;As usual feedback is welcome - you can download a copy of the Fortinbras project &lt;a href="http://www.seruyange.com/metadeveloper/Fortinbras.zip"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt;I am aware of the &lt;a href="http://www.downthemall.net/"&gt;Firefox extensions&lt;/a&gt; that do this but someday (imagine a pie in the sky look on my face) I was hoping to incorporate a &amp;quot;favorites&amp;quot; list with URLs / locations so that this would be a one stop shop for my downloading and organizing of podcasts. My goal here is embarrasment driven development so I'll probably be bummed enough about the code I've just posted to put in some enhancements as time permits. &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;sup&gt;2&lt;/sup&gt;My friend's music blog is a great stop, try a couple of tracks at &lt;a href="http://www.thelookback.com/"&gt;The Look Back&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-8768176820640057846?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/8768176820640057846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=8768176820640057846' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/8768176820640057846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/8768176820640057846'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/12/windows-forms-web-wib-part-ii.html' title='Windows Forms + Web, WIB part II'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-6248941832369814101</id><published>2008-12-17T05:40:00.001-08:00</published><updated>2008-12-17T05:40:39.402-08:00</updated><title type='text'>Growing Open Source Community</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;Kevin Dangoor recorded an interesting screencast on some of the essentials of getting an open source project more widely circulated. Essentially Dangoor explains that having a successful open source project is not just about code, it's about good product management. I wanted to title this post with Dangoor's most quotable quote: &amp;quot;Rails is not where it is because of great code.&amp;quot; But there are a lot of people who would take that as an opener for a religious war without seeing his real intent of highlighting marketing and management of a project.&lt;/p&gt;  &lt;p&gt;I won't rehash it, it's worth &lt;a href="http://dangoor.blip.tv/file/1530233/"&gt;watching it&lt;/a&gt; for yourself.&lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-6248941832369814101?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/6248941832369814101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=6248941832369814101' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/6248941832369814101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/6248941832369814101'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/12/growing-open-source-community.html' title='Growing Open Source Community'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-7754597891005837822</id><published>2008-11-25T22:07:00.001-08:00</published><updated>2008-11-25T22:07:23.594-08:00</updated><title type='text'>Bruce Eckel's Python Book</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;It escaped my notice but Eckel's been writing a &lt;a href="http://www.bitbucket.org/BruceEckel/python-3-patterns-idioms/"&gt;new Python book&lt;/a&gt;. Should be worth digging into sometime in the future.&lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-7754597891005837822?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/7754597891005837822/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=7754597891005837822' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/7754597891005837822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/7754597891005837822'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/11/bruce-eckel-python-book.html' title='Bruce Eckel&amp;#39;s Python Book'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-7748750759832060123</id><published>2008-11-23T20:16:00.001-08:00</published><updated>2008-11-23T20:16:14.189-08:00</updated><title type='text'>How to steal time: On Programming and being a Father</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;It's been alluded to but here it is neither shaken nor stirred: I became a father exactly on month ago.&amp;#160; While it hasn't been without challenges the joy of being a father is something I understand now firsthand after being told or observing it in others. Even though I first was quite seduced by a &amp;quot;mystique&amp;quot; in programming - a nocturnal person drinking jolt with binary being reflected from mirror shades - I now realize not only that nearly every programmer and professional person I admire is a parent, but that they find their core of happiness in that well beyond the realm of work.&lt;/p&gt;  &lt;p&gt;Nevertheless, I have been trying to keep up my personal work and interests so with that goal in mind I've adjusted my schedule to wake up as early as I can (usually 5am) and get a few hours of solid time while leaving the evenings as a time when I can help out and be a &amp;quot;family man.&amp;quot;&amp;#160; It still doesn't feel natural but the payoff is that I can still advance my work with IronPython and other interests. It's already been pointed out to me that my productivity here and other places has dropped since my daughter was born.&lt;/p&gt;  &lt;p&gt;So question for other programmer/dad people: how do you work the family schedule? Any tips and tricks for a one month father who is still daydreaming about what it was like to sleep all night? &lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-7748750759832060123?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/7748750759832060123/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=7748750759832060123' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/7748750759832060123'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/7748750759832060123'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/11/how-to-steal-time-on-programming-and.html' title='How to steal time: On Programming and being a Father'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-2853039628542864099</id><published>2008-11-10T21:28:00.001-08:00</published><updated>2008-11-10T21:28:07.591-08:00</updated><title type='text'>Loop Reordering, Optimizing Face Recognition</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;Got &lt;a href="http://lbrandy.com/blog/2008/10/how-we-made-our-face-recognizer-25-times-faster/"&gt;this&lt;/a&gt; a few weeks ago from a friend but didn't have a chance to sit down and digest the entry until tonight. Pretty cool and although premature optimization gets a bad rap, it's a reminder that sometimes what seems intuitive and quick could actually be costing a lot - &lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-2853039628542864099?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/2853039628542864099/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=2853039628542864099' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/2853039628542864099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/2853039628542864099'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/11/loop-reordering-optimizing-face.html' title='Loop Reordering, Optimizing Face Recognition'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-4645611689905433348</id><published>2008-11-05T21:23:00.001-08:00</published><updated>2008-11-05T21:23:54.185-08:00</updated><title type='text'>Lake Wobegon Distribution</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;Not sure where I saw this one first but it's &lt;a href="http://blog.plover.com/math/right-skewed.html"&gt;a great article&lt;/a&gt;. I wonder if the Lake Wobegon distribution applies as well to programmers... &lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-4645611689905433348?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/4645611689905433348/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=4645611689905433348' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4645611689905433348'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4645611689905433348'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/11/lake-wobegon-distribution.html' title='Lake Wobegon Distribution'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-4020318114727172785</id><published>2008-10-31T22:39:00.001-07:00</published><updated>2008-10-31T22:39:17.706-07:00</updated><title type='text'>LINQ to SQL death rumors</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;I think it all started with &lt;a href="http://blogs.msdn.com/adonet/archive/2008/10/29/update-on-linq-to-sql-and-linq-to-entities-roadmap.aspx"&gt;this post&lt;/a&gt; from Tim Mallalieu reporting some directions for LINQ to SQL and the ADO.NET Entity Framework. &lt;a href="http://ayende.com/Blog/archive/2008/10/31/microsoft-kills-linq-to-sql.aspx"&gt;Ayende&lt;/a&gt; and &lt;a href="http://codebetter.com/blogs/david.hayden/archive/2008/10/31/linq-to-sql-is-dead-read-between-the-lines.aspx"&gt;others&lt;/a&gt; have had some strong reactions (LINQ to SQL is dead) and there's now a &lt;a href="http://stackoverflow.com/questions/252683/is-linq-to-sql-doa"&gt;StackOverflow thread&lt;/a&gt; you can use to follow the discussion. &lt;/p&gt;  &lt;p&gt;It will be interesting to track over the next few days what other responses pop up. A few things that come to my mind: &lt;/p&gt;  &lt;p&gt;1. This is an opening for people using Linq to SQL to migrate to SubSonic or NHibernate. I've been using SubSonic lately and enjoying myself quite a bit.&lt;/p&gt;  &lt;p&gt;2. A big disappointment for people like &lt;a href="http://blog.benday.com/"&gt;Benjamin Day&lt;/a&gt; who I saw speak at VSLive and who have incoprorated LINQ to SQL into their development projects. Next time wait for Microsoft to 2.0 something before spending too much time working it into your dev cycle. &lt;/p&gt;  &lt;p&gt;3. I wonder if Microsoft hasn't thought of spinning off some of the tool makers as different companies. Perhaps there is an MBA out there who could draw some charts and convince management to have ADO.NET Entity Framework and the LINQ to SQL folks compete/copy in the same space. If the team isn't fully formed, why not make one? And then how cool would that be: profit centers that encourage developers to use Microsoft tools and competition to get the best ideas out the door. The trade off of Balkanization versus One True Product is that the former will mean that cool new ideas belong to you - the company won't have to get the ideas from outside sources.&amp;#160; &lt;/p&gt;  &lt;p&gt;4. I wonder if we aren't moving towards a tipping point of Microsoft developers &amp;quot;getting&amp;quot; open source and shifting their tool/framework usage outside of Microsoft. I know lots of people who won't use __anything__ unless it has a Microsoft logo because it feels safer and more commoditized. Moves like this seem to go against that since open source projects tend to live a longer time and technologies / frameworks from companies become &amp;quot;obsolete&amp;quot; (how many versions of ADO can you count?) because of a product cycle that requires new purchases every 2 years or so. I would argue with my boss on a new project that it's safer to use NHibernate than ADO.NET Entity Framework if this indicates a chance that the Entity Framework could be the next LINQ to SQL project.&lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-4020318114727172785?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/4020318114727172785/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=4020318114727172785' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4020318114727172785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4020318114727172785'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/10/linq-to-sql-death-rumors.html' title='LINQ to SQL death rumors'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-4412677796813702417</id><published>2008-10-23T22:35:00.001-07:00</published><updated>2008-10-23T22:35:23.471-07:00</updated><title type='text'>.NET Survey</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;Scott Hanselman did a survey of .NET usage and &lt;a href="http://www.hanselman.com/blog/SurveyRESULTSWhatNETFrameworkFeaturesDoYouUse.aspx"&gt;posted results&lt;/a&gt; on his blog. A few interesting notes:&lt;/p&gt;  &lt;p&gt;1. Heavy use of older stuff: ASMX, DataSet, WebForms, Windows Forms   &lt;br /&gt;You'd be hard pressed to find new blog entries on it but it shows that older (tried) technologies don't sync up with what's popular. The last few projects I've worked on have had development cycles that far exceed the excitement of their underpinning technology. One needs to remember that excitement and hype aren't what make something useful, it's use. So the people who talk down DataSets do so in the face of what obviously works for a silent majority who are busy getting stuff done.&lt;/p&gt;  &lt;p&gt;2. Some new stuff won't take, some new stuff takes off   &lt;br /&gt;The respondents using CardSpace and WorkFlow are dismal. I can match the &amp;quot;unscientific&amp;quot; survey with a lot of my own experience in the last few years and conclude it's within a broader trend. On the other hand, LINQ To SQL has very heavy use for something relatively new, almost on par with ADO DataSets which one could argue are in the same competitive space. That says to me that in some cases adoption is just slow when there's a &amp;quot;legacy&amp;quot; counterpart for a technology but in others, when the new technology is compelling, people take to it very quickly.&lt;/p&gt;  &lt;p&gt;3. WinForms &amp;gt; WPF   &lt;br /&gt;More than twice the respondents but here's my conclusion: it's all about the toolset, not the technology. WPFs tools are not on par with their WinForms equivalents. The dual Blend + VS strategy doesn't make sense for a large majority of us who don't have full time designers we work with and the lack of built in controls (such as a DataGridView) mean as cool as rounded edges are, function trumps form when programming.&lt;/p&gt;  &lt;p&gt;4. MVC?   &lt;br /&gt;Last I checked this was *just* released as a beta. More people claim to use that than WPF which seems to indicate a Hanselman type majority in respondents. Even if I wanted to jump into MVC, until it's at a &amp;quot;1.0&amp;quot; release I couldn't (and I'm wondering how others seem to be doing so) justify starting or migrating a major product to a product/framework that isn't yet complete.&lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-4412677796813702417?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/4412677796813702417/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=4412677796813702417' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4412677796813702417'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4412677796813702417'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/10/net-survey.html' title='.NET Survey'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-7336045958506043776</id><published>2008-10-22T22:30:00.001-07:00</published><updated>2008-10-22T22:30:09.684-07:00</updated><title type='text'>Recursive Copy ala LINQ</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;Tonight I needed to copy a bunch of images, no matter their level in the hierarchy to a single folder. Cake walk with C# and LINQ, I'll post the Python equivalent tomorrow.&lt;/p&gt;  &lt;pre style="padding-right: 10px; padding-left: 10px; font-size: 12pt; background: #000; padding-bottom: 10px; margin: 1em 0px; overflow: auto; color: #eee; line-height: 120%; padding-top: 10px; font-family: courier"&gt;string sourceDir = @&amp;quot;C:\thesource&amp;quot;;&lt;br /&gt;string targDir = @&amp;quot;c:\thetarget&amp;quot;;&lt;br /&gt;var files = new DirectoryInfo(sourceDir).GetFiles(&amp;quot;*&amp;quot;, SearchOption.AllDirectories)&lt;br /&gt;                .Where(p=&amp;gt; !p.Extension.Contains(&amp;quot;db&amp;quot;)) // exclude the pesky windows db file&lt;br /&gt;                .Select(p =&amp;gt; p.FullName);&lt;br /&gt;foreach (string path in files) {&lt;br /&gt;    File.Copy(path, Path.Combine(targDir, Path.GetFileName(path)));&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-7336045958506043776?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/7336045958506043776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=7336045958506043776' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/7336045958506043776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/7336045958506043776'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/10/recursive-copy-ala-linq.html' title='Recursive Copy ala LINQ'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-1698138462540625065</id><published>2008-10-20T21:59:00.001-07:00</published><updated>2008-10-20T21:59:57.656-07:00</updated><title type='text'>Better Know a Framework: Zip / Package Multiple Files in C#</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;Making a single archive out of multiple files in .NET is easy once you know where to look but I spent far too long realizing there is a System.IO.Packaging namespace (not in the mscorlib, but you need to reference WindowsBase assembly).&lt;/p&gt;  &lt;pre style="padding-right: 10px; padding-left: 10px; font-size: 12pt; background: #000; padding-bottom: 10px; margin: 1em 0px; overflow: auto; color: #eee; line-height: 120%; padding-top: 10px; font-family: courier"&gt;// target file&lt;br /&gt;string fileName = @&amp;quot;C:\temp\myZip.zip&amp;quot;;&lt;br /&gt;&lt;br /&gt;// point to some files, say JPEG - did I say I love LINQ?&lt;br /&gt;var filesToZip = new DirectoryInfo(@&amp;quot;c:\temp\&amp;quot;).GetFiles(&amp;quot;*.jpg&amp;quot;).Select(p =&amp;gt; p.FullName);&lt;br /&gt;&lt;br /&gt;using (Package exportPackage = Package.Open(fileName))&lt;br /&gt;{&lt;br /&gt;    foreach (var file in filesToZip)&lt;br /&gt;    {&lt;br /&gt;        using (FileStream fileStream = File.OpenRead(file))&lt;br /&gt;        {&lt;br /&gt;            Uri partUriDocument = PackUriHelper.CreatePartUri(new Uri(Path.GetFileName(file), UriKind.Relative));&lt;br /&gt;            PackagePart packagePart = exportPackage.CreatePart(partUriDocument, System.Net.Mime.MediaTypeNames.Image.Jpeg);&lt;br /&gt;            CopyStream(fileStream, packagePart.GetStream());&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// somewhere else, the CopyStream&lt;br /&gt;private static void CopyStream(Stream source, Stream target)&lt;br /&gt;{&lt;br /&gt;    const int bufSize = 0x1000;&lt;br /&gt;    byte[] buf = new byte[bufSize];&lt;br /&gt;    int bytesRead = 0;&lt;br /&gt;    while ((bytesRead = source.Read(buf, 0, bufSize)) &amp;gt; 0)&lt;br /&gt;        target.Write(buf, 0, bytesRead);&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The trap in looking for this was that searches for this all point towards the GZipStream which is nice for a single file but not applicable for packaging multiple files. In my case I wasn't even interested in compression, just a single archive. You'll find additional documentation for the library &lt;a href="http://msdn.microsoft.com/en-us/library/system.io.packaging.package.aspx"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I'm half tempted to write a nifty tool in IronPython for command line packaging but in a world with &lt;a href="http://www.7-zip.org/"&gt;7-zip&lt;/a&gt;, that's simply foolish.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-1698138462540625065?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/1698138462540625065/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=1698138462540625065' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/1698138462540625065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/1698138462540625065'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/10/better-know-framework-zip-package.html' title='Better Know a Framework: Zip / Package Multiple Files in C#'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-6649011203021923210</id><published>2008-10-18T22:52:00.001-07:00</published><updated>2008-10-18T22:57:09.237-07:00</updated><title type='text'>Mashing Up: JQuery and Windows Forms, a first WIB</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;A lot of people are down on Windows Forms as something passe. I have a feeling there are a lot of people like me who not only must use it for practical reasons but also think there are advantages to fat clients that sit on the Windows platform. I'm getting to a point where I will start doing more than poking around with WPF but at present two factors hold me at bay: the control library is not robust enough (another tutorial of how to make a custom button in blend isn't incentive enough) and XAML is still a bit daunting for what usually end up being rather involved UIs. Here, for example, is a UI from an application I've been working on for a while (small intentionally to impart an idea of complexity without revealing any details):&lt;/p&gt;  &lt;p&gt;&lt;img src="http://seruyange.com/metadeveloper/Torment.jpg" /&gt; &lt;/p&gt;  &lt;p&gt;I think a lot of &amp;quot;do it in XAML&amp;quot; problems can be solved with a more web development style paradigm in Windows. A simple example is template driven databinding with styles. That's easy to do in web applications but a little less flexible in a control based world (think a GridView with CSS versus the Windows Forms DataGridView). &lt;/p&gt;  &lt;p&gt;As a proof of concept I decided to use the System.Windows.Forms.WebBrowser in a Windows Forms application to get cool features from JQuery while maintaining the strengths of a windows app. Here's the scenario: a photo manager application. It builds and manages a database of photos from a digital camera. Rather than uploading the 300+ pictures taken in a single session to Flickr (or in conjunction with that act) one can open it up, start annotating their files and saving the comments to a portable &amp;quot;database&amp;quot; that they can back up along with the files on their home machine.&amp;#160; On any machine with the application they point to the directory and can view their original comments along with the pictures. Here is a screen shot:&lt;/p&gt;  &lt;p&gt;&lt;img src="http://seruyange.com/metadeveloper/Photobase.jpg" /&gt; &lt;/p&gt;  &lt;p&gt;The strength in this scenario of Windows Forms is the ease with which one can build the editing interface: textboxes, buttons and other &amp;quot;drag / drop&amp;quot; pieces of the control library. The strength of JQuery is in the display - I've chosen to use an animation and the accordion to spruce up the interface where the user looks at their photos.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://seruyange.com/metadeveloper/WibPhoto.zip"&gt;You can download the whole thing here&lt;/a&gt;. (Very 0.1 but posted as an example/idea - just use the next / previous buttons to view some photos, get a feel of things).&lt;/p&gt;  &lt;p&gt;I wonder if this paradigm can be a kind of Ajax &amp;quot;aha&amp;quot; moment; Ajax was centered on the use of a single, relatively simple MSXML component. Though System.Web.Forms.WebBrowser is not simple, it's a single component that has a lot of room for leverage.&amp;#160; Ajax set up some pretty standard protocols / approaches to using asynchronous HTTP requests from a client - I think an interesting parallel could exist in wrapping jQuery and Html controls into a kind of framework that is easy for any developer to use with the WebBrowser control. Imagine a grid you drop with some properties and a CSS.&amp;#160; The last thing that made Ajax pop was the catchy name. I love naming things myself so I've been calling this kind of application a WIB (Windows + Web) but perhaps there's something more catchy one could use.&lt;/p&gt;  &lt;p&gt;Just some ideas, I'd be curious in the following: &lt;/p&gt;  &lt;p&gt;1. Any existing applications written with this approach.    &lt;br /&gt;2. Any potential applications that could benefit with the pros of both Windows and Web     &lt;br /&gt;3. Any glaring shortfalls &lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;ps. Thanks to Corey for encouragement on the blogging tip.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-6649011203021923210?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/6649011203021923210/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=6649011203021923210' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/6649011203021923210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/6649011203021923210'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/10/mashing-up-jquery-and-windows-forms.html' title='Mashing Up: JQuery and Windows Forms, a first WIB'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-8098318610957496523</id><published>2008-10-01T17:27:00.001-07:00</published><updated>2008-10-01T21:15:45.793-07:00</updated><title type='text'>YUI File Disjoin Complexity HELP</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;I got a little help yesterday from &lt;a href="http://blog.davglass.com/"&gt;Dav Glass&lt;/a&gt; and &lt;a href="http://360.yahoo.com/profile-JG9noGk0aa9kLMDBru_y9a2uxmo-"&gt;Eric Miraglia&lt;/a&gt; for my issue on selection of YUI javascript files. What I'd had distributed over a bunch of files is now: &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;pre style="padding-right: 10px; padding-left: 10px; font-size: 12pt; background: #000; padding-bottom: 10px; margin: 1em 0px; overflow: auto; width: 699px; color: #eee; padding-top: 10px; font-family: courier; height: 263px"&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;http://yui.yahooapis.com/combo?2.5.2/build/yahoo-dom-event/yahoo-dom-event.js&amp;amp;2.5.2/build/animation/animation-min.js&amp;amp;2.5.2/build/element/element-beta-min.js&amp;amp;2.5.2/build/container/container_core-min.js&amp;amp;2.5.2/build/menu/menu-min.js&amp;amp;2.5.2/build/button/button-min.js&amp;amp;2.5.2/build/connection/connection-min.js&amp;amp;2.5.2/build/datasource/datasource-beta-min.js&amp;amp;2.5.2/build/datatable/datatable-beta-min.js&amp;amp;2.5.2/build/tabview/tabview-min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt; &lt;p&gt;&lt;/p&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Hm... a bit better. Both Dav and Eric confirm that the canonical solution to this problem is to spend some quality time at the &lt;a href="http://developer.yahoo.com/yui/articles/hosting/"&gt;YUI Configuration Site&lt;/a&gt; which will allow you to pick the widgets and utilities you've leveraged in order to combine it into a more simplified call. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;A someday project: the following style of implementation to make the reference a bit more crisp (I didn't add everything from above, but the pattern should be easy to observe):&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="padding-right: 10px; padding-left: 10px; font-size: 12pt; background: #000; padding-bottom: 10px; margin: 1em 0px; overflow: auto; width: 679px; color: #eee; padding-top: 10px; font-family: courier; height: 97px"&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;http://yui.yahooapis.com/combo/2.5.2/dom-event&amp;amp;animation-min&amp;amp;element-beta-min&amp;amp;container_core-min&amp;quot;&amp;gt;&amp;lt;/script&amp;gt; &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Anyhow, thanks for the help. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-8098318610957496523?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/8098318610957496523/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=8098318610957496523' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/8098318610957496523'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/8098318610957496523'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/10/yui-file-disjoin-complexity-help.html' title='YUI File Disjoin Complexity HELP'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-2891165464576044815</id><published>2008-09-30T15:39:00.001-07:00</published><updated>2008-09-30T15:39:48.033-07:00</updated><title type='text'>YUI File Disjoint Complexity FAIL</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;So here's what has been getting my goat for a while with YUI and a very smple application I've been using it to build.&lt;/p&gt;  &lt;p&gt;&lt;img src="http://www.t3rse.com/t3rse/images/yahooCSS.jpg" /&gt;     &lt;br /&gt;&lt;img src="http://www.t3rse.com/t3rse/images/yahoojslib.jpg" /&gt; &lt;/p&gt;  &lt;p&gt;So for said application, I have to reference 12 separate Javascript files along with 5 separate CSS files.&amp;#160; All for this simple interface (datatable, tabs, button, ajax (connection), events and maybe a few more things I am not remembering):   &lt;br /&gt;     &lt;br /&gt;&lt;img height="272" src="http://www.t3rse.com/t3rse/images/keep.jpg" width="514" /&gt; &lt;/p&gt;  &lt;p&gt;This type of complexity is what makes YUI daunting for many developers and difficult to maintain; over at &lt;a href="http://www.nregex.com"&gt;nRegex&lt;/a&gt; I'm referencing a bunch of older versions of YUI and if/when I do decide to update there will be quite a few places in which compatibility and errors have the potential in manifesting themselves.&lt;/p&gt;  &lt;p&gt;YUI controls are nice once working but I'm at the point of wondering if this kind of disjointedness should lead me towards &lt;a href="http://jquery.com/"&gt;jQuery&lt;/a&gt; or &lt;a href="http://dojotoolkit.org/"&gt;Dojo&lt;/a&gt;. Especially with Microsoft's &lt;a href="http://weblogs.asp.net/scottgu/archive/2008/09/28/jquery-and-microsoft.aspx"&gt;recent adoption&lt;/a&gt; of jQuery, I'm leaning in that direction. But I don't want to be rash so I'll ask:     &lt;br /&gt;1. What is the canonical solution e.g. blessed by Yahoo! (I see a YUI loader of some kind)?    &lt;br /&gt;2. What does that look like with the 5 CSS and 12 *.JS files I've got above?&lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-2891165464576044815?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/2891165464576044815/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=2891165464576044815' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/2891165464576044815'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/2891165464576044815'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/09/yui-file-disjoint-complexity-fail.html' title='YUI File Disjoint Complexity FAIL'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-6907577628029686376</id><published>2008-07-28T22:05:00.001-07:00</published><updated>2008-07-28T22:05:44.496-07:00</updated><title type='text'>Reading Source, Minima III</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;As my reading of &lt;a href="http://www.codeplex.com/Minima"&gt;Minima source code&lt;/a&gt; continues I wanted next to comment upon the database interaction which is novel (to me at least) in that it is exclusively a LINQ implementation with no stored procedure or ADO.NET implementation.&amp;#160; I've seen LINQ quite a bit, but many using it seem to stick to using the query syntax rather than using raw lambda expressions.&amp;#160; All the LINQ in Minima that I've seen uses lambda expressions and I've&amp;#160; come to appreciate it as a clean, sparse syntax.&amp;#160; To illustrate a more trivial example, assuming I have a table Users with Username / Password columns I wanted to verify for access. The first step with all things LINQ is to make your data model, which amounts to a DBML file that you map database objects to with drag and drop. Next you can write query expressions to pull data out of the database - notice that the db variable here points to the data model as embodied in a &amp;quot;data context&amp;quot; object: &lt;/p&gt;  &lt;pre style="padding-right: 10px; padding-left: 10px; font-size: 12pt; background: #000; padding-bottom: 10px; margin: 1em 0px; overflow: auto; color: #eee; line-height: 120%; padding-top: 10px; font-family: courier"&gt;            var authUserQuery = from u in db.Users &lt;br /&gt;                    where u.Email == Login1.UserName &amp;amp;&amp;amp; u.Passphrase == Login1.Password&lt;br /&gt;                        select u;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Unfortunately the query expressions return an IEnumerable&amp;lt;T&amp;gt; that doesn't support a Count or Length property. It's a somewhat inflexible thing that in my *very* limited experience is useful mainly for iterating with a ForEach - and I suspect it's reasons like this that led Betz to using a lambda syntax that is much cleaner and gets more bang with less code: &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="padding-right: 10px; padding-left: 10px; font-size: 12pt; background: #000; padding-bottom: 10px; margin: 1em 0px; overflow: auto; color: #eee; line-height: 120%; padding-top: 10px; font-family: courier"&gt;            Func&amp;lt;Data.User, Boolean&amp;gt; checkUser = x =&amp;gt; x.Email == Login1.UserName &amp;amp;&amp;amp; x.Passphrase = Login1.Password;&lt;br /&gt;            Data.User u = db.Users.SingleOrDefault(checkUser);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;You can use nullability to test for the presence of a record based on the LINQ query. Some source from Minima that demonstrates this is verification of the existence of a blog author: &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="padding-right: 10px; padding-left: 10px; font-size: 12pt; background: #000; padding-bottom: 10px; margin: 1em 0px; overflow: auto; color: #eee; line-height: 120%; padding-top: 10px; font-family: courier"&gt;            Func&amp;lt;AuthorLINQ, Boolean&amp;gt; authorExists = x =&amp;gt; x.AuthorEmail == authorEmail;&lt;br /&gt;            authorLinq = db.Authors.SingleOrDefault(authorExists);&lt;br /&gt;            if (authorLinq == null)&lt;br /&gt;            {&lt;br /&gt;                throw new ArgumentException(message);&lt;br /&gt;            }&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;It's truly novel and I don't mean to make that sound like a trivial or ornamental type &amp;quot;novel&amp;quot; I write; after spending so much time building a data access layer with stored procedures and ADO.NET (Connection, Command, Reader, DataSet, ad nauseum) it seems like our collective destiny is to walk away from that and let something like a DBML data context do black magic for us.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Even though the ADO.NET Entity Framework is getting a &lt;a href="http://efvote.wufoo.com/forms/ado-net-entity-framework-vote-of-no-confidence/"&gt;FAIL&lt;/a&gt; vote from some people, I'm interested to see how this overlaps with LINQ. Even after listening to Hanselman's &lt;a href="http://www.hanselminutes.com/default.aspx?showID=120"&gt;interview&lt;/a&gt; of Mike Pizzo I'm still a little unclear. My plan of action is to get serious about NHibernate to try to understand, as Scott would say, &amp;quot;the gestalt&amp;quot; of an ORM and then make the call on ADO.NET Entity Framework when it's released.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-6907577628029686376?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/6907577628029686376/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=6907577628029686376' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/6907577628029686376'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/6907577628029686376'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/07/reading-source-minima-iii.html' title='Reading Source, Minima III'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-4903542563930258722</id><published>2008-07-24T21:35:00.001-07:00</published><updated>2008-07-24T21:35:11.022-07:00</updated><title type='text'>Twining, TwyDL</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;A quick note that &lt;a href="http://www.t3rse.com/twining"&gt;Twining&lt;/a&gt; isn't dead and that I actually have been working on it. Some work I've done in the past few months has involved a lot of databases I don't have more than an ISPs user/password level of access to so it's been quite handy to copy data in and out with brief pieces of code. Here's one feature I've used, exporting a table definition and all of its contents to a scripted insert statement in a file: &lt;/p&gt;  &lt;pre style="padding-right: 10px; padding-left: 10px; font-size: 12pt; background: #000; padding-bottom: 10px; margin: 1em 0px; overflow: auto; color: #eee; line-height: 120%; padding-top: 10px; font-family: courier"&gt;database(cn).table(&amp;quot;MY_TABLE&amp;quot;).copyto.script(&amp;quot;c:\\temp\\MY_SCRIPT.sql&amp;quot;)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Another piece that I've been working on is the ability to generate schema objects in a more fluid, compact way. I like SQL just fine but after seeing how easy it is to make data structures with the Google App Engine I sought to shoot for something similar. Also within the flow of writing a Twining script it's easy to keep this type of syntax Pythonic for certain scenarios (you want to create a temp table and dump data into it from somewhere; you want to create a table and generate sample data, etc, etc). I call it TwyDL as a play on &lt;a href="http://en.wikipedia.org/wiki/Drop_(SQL)"&gt;DDL&lt;/a&gt;: &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="padding-right: 10px; padding-left: 10px; font-size: 12pt; background: #000; padding-bottom: 10px; margin: 1em 0px; overflow: auto; color: #eee; line-height: 120%; padding-top: 10px; font-family: courier"&gt;database(cn).create.table(&amp;quot;Employees&amp;quot;, &lt;br /&gt;                               [&lt;br /&gt;                                   col.ident(&amp;quot;EmployeeID&amp;quot;), &lt;br /&gt;                                   col.string(&amp;quot;FirstName&amp;quot;), &lt;br /&gt;                                   col.string(&amp;quot;LastName&amp;quot;), &lt;br /&gt;                                   col.numeric(&amp;quot;Salary&amp;quot;)&lt;br /&gt;                               ]&lt;br /&gt;                          )&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The methods you see for defining column types take optional parameters so you can pass additional specifications when you feel the need. For example, the string columns default to varchar(50) but if you wanted to have a specific length all you'd need to do is: &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="padding-right: 10px; padding-left: 10px; font-size: 12pt; background: #000; padding-bottom: 10px; margin: 1em 0px; overflow: auto; color: #eee; line-height: 120%; padding-top: 10px; font-family: courier"&gt;col.string(&amp;quot;FirstName&amp;quot;, 25)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The same is true for numeric types: &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="padding-right: 10px; padding-left: 10px; font-size: 12pt; background: #000; padding-bottom: 10px; margin: 1em 0px; overflow: auto; color: #eee; line-height: 120%; padding-top: 10px; font-family: courier"&gt;col.numeric(&amp;quot;Salary&amp;quot;, 18, 4)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I've got one more thing I'm interested in implementing (time! time!) which is generating sample data given some table definition. I'm hoping to get up a rough cut of it all in the next day or two, after I've updated unit tests and organized things.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-4903542563930258722?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/4903542563930258722/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=4903542563930258722' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4903542563930258722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4903542563930258722'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/07/twining-twydl.html' title='Twining, TwyDL'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-3882999669735925750</id><published>2008-07-21T22:19:00.001-07:00</published><updated>2008-07-21T22:19:00.055-07:00</updated><title type='text'>Reading Source, Minima II</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;Yesterday I wrote that my next stop was the use of Generics with WCF. Sometimes, it seems, a lot of experience is a handicap to learning new things - such was definitely the case when it comes to the full use of Generics with C#.&amp;#160; Most of my usage, I admit, has been limited to Generic Collections such as List&amp;lt;T&amp;gt; or Dictionary&amp;lt;T, K&amp;gt;.&amp;#160; But there is a beautiful leveraging of Generics I see with WCF that can be applied all over the place.&amp;#160; As a trivial example, consider the code that is used to safely read values from a database field.&amp;#160; I will admit to writing a lot of code like: &lt;/p&gt;  &lt;pre style="padding-right: 10px; padding-left: 10px; font-size: 12pt; background: #000; padding-bottom: 10px; margin: 1em 0px; overflow: auto; color: #eee; line-height: 120%; padding-top: 10px; font-family: courier"&gt;class ReaderHelper{&lt;br /&gt;	public static void GetSafeString(object field);&lt;br /&gt;	public static void GetSafeDecimal(object fiel);&lt;br /&gt;	// and so on.&lt;br /&gt;	&lt;br /&gt;}&lt;br /&gt;// somewhere else in code:&lt;br /&gt;string firstname = ReaderHelper.GetSafeString(rs[&amp;quot;FirstName&amp;quot;]);&lt;br /&gt;decimal salary = ReaderHelper.GetSafeDecimal(rs[&amp;quot;Salary&amp;quot;]);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;A lot of redundancy and little extensibility. Here's how a WCF infected mind might write that: &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="padding-right: 10px; padding-left: 10px; font-size: 12pt; background: #000; padding-bottom: 10px; margin: 1em 0px; overflow: auto; color: #eee; line-height: 120%; padding-top: 10px; font-family: courier"&gt;class ReaderHelper{&lt;br /&gt;        static T SafeField&amp;lt;T&amp;gt;(object field, T defaultValue){&lt;br /&gt;            return (field == DBNull.Value) ? defaultValue : (T)field;&lt;br /&gt;        }&lt;br /&gt;}&lt;br /&gt;// somewhere else in code:&lt;br /&gt;string firstname = ReaderHelper.SafeField&amp;lt;string&amp;gt;(rs[&amp;quot;FirstName&amp;quot;]);&lt;br /&gt;decimal salary = ReaderHelper.SafeField&amp;lt;decimal&amp;gt;(rs[&amp;quot;Salary&amp;quot;]);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;If you coupled the above with some &lt;em&gt;inversion of control&lt;/em&gt; you'd have a pretty powerful and extensible code for dealing with any potentially null field type coming from your database.&amp;#160; It's not that such use is an innovation exclusive to WCF, I see it used a lot more there.&amp;#160; Back to Minima, one can see a good example of this in the project responsible for exposing configuration values:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="padding-right: 10px; padding-left: 10px; font-size: 12pt; background: #000; padding-bottom: 10px; margin: 1em 0px; overflow: auto; color: #eee; line-height: 120%; padding-top: 10px; font-family: courier"&gt;namespace Themelia.Configuration&lt;br /&gt;{&lt;br /&gt;    public static class ConfigAccessor&lt;br /&gt;    {&lt;br /&gt;        public static T ApplicationSettings&amp;lt;T&amp;gt;(string key);&lt;br /&gt;        public static string ApplicationSettings(string key);&lt;br /&gt;        public static T ApplicationSettings&amp;lt;T&amp;gt;(string key, bool isRequired);&lt;br /&gt;        public static string ApplicationSettings(string key, bool isRequired);&lt;br /&gt;        public static string ConnectionString(string key);&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;More on Minima later (hopefully tomorrow), taking a look at database access.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-3882999669735925750?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/3882999669735925750/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=3882999669735925750' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/3882999669735925750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/3882999669735925750'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/07/reading-source-minima-ii.html' title='Reading Source, Minima II'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-2574696293971486172</id><published>2008-07-20T21:05:00.001-07:00</published><updated>2008-07-20T21:05:46.632-07:00</updated><title type='text'>Reading Source, Minima I</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;I'm interested in the notion of deliberate practice as it relates to software developers.&amp;#160; How do we &amp;quot;practice&amp;quot; effectively?&amp;#160; One of the things I've been wanting to be more serious and deliberate about was reading source code.&amp;#160; Hanselman has inspired me with his &amp;quot;weekly source code&amp;quot; posts and since good ideas are worth copying I'll start to document some of the projects I download and look into for examples of good code.&lt;/p&gt;  &lt;p&gt;The project I'm currently working on involves a lot of WCF. I've got mixed feelings (as well as a lot to learn) about it so I thought I'd start off by running &lt;a href="http://www.netfxharmonics.com/2008/05/Minima-30-Released"&gt;Minima&lt;/a&gt;, Dave Betz's WCF/.NET 3.5 blog engine as a sample of an end-to-end application I can model my own WCF architectures after.&amp;#160; &lt;/p&gt;  &lt;p&gt;Minima was not easy to get going. While I'm perhaps not the brightest kid on the block, the biggest item I struggled with would probably be a challenge to anyone: the certificates used in the WCF security model. While Betz has &lt;a href="http://notgartner.wordpress.com/2007/09/06/using-certificate-based-authentication-and-protection-with-windows-communication-foundation-wcf/"&gt;a blog entry&lt;/a&gt; documenting the basic usage of certificates with WCF, it is predicated on the WCF host not being IIS. For the blog I assumed everything should be deployed to IIS and ran into the a lesser known fact that one must use the &lt;a href="http://www.microsoft.com/downloads/thankyou.aspx?familyId=c42e27ac-3409-40e9-8667-c748e422833f&amp;amp;displayLang=en#"&gt;Windows HTTP Services Certification Configuration Tool&lt;/a&gt; to enable the ASPNET account access to the certificates for their usage. There were also a couple of post build events in the project that I removed after getting my references set up.&lt;/p&gt;  &lt;p&gt;But before I get into particulars, I wanted to go over the broader structure of the project.&amp;#160; The Minima solution has the following projects:   &lt;br /&gt;* Minima.Service    &lt;br /&gt;This has the service and data contracts with no implementation    &lt;br /&gt;* Minima.ServiceImpl    &lt;br /&gt;This has the implementation of the service    &lt;br /&gt;* Minima.Configuration    &lt;br /&gt;A configuration helper which makes use of a library called Themelia (Betz is, apparently, a Biblical Greek scholar on the side)    &lt;br /&gt;* Minima.Web    &lt;br /&gt;Library for the blog website's features    &lt;br /&gt;* Website    &lt;br /&gt;A website project    &lt;br /&gt;* Website Service project (exposes services for posting content to the database via WCF)&lt;/p&gt;  &lt;p&gt;I'll write about more particulars in my next post but for this overview my biggest takeaway in the project structure is decoupling.&amp;#160; Separating the service from the service implementation, separating the website from it's functionality by a project with the only purpose of implementing that backend logic, and separating general purpose frameworks like Themelia (for reading the config file etc).&lt;/p&gt;  &lt;p&gt;When I start my own projects I usually think too much about doing a proof of concept and less about decoupling the overall structure. As a result most projects start off as a &amp;quot;sketch&amp;quot; in a single Visual Studio project and by the first release end up staying that way on a permanent basis. But perhaps what we should focus on as programmers is less the cleverest algorithms and more the most elegant structure for building solid applications.&lt;/p&gt;  &lt;p&gt;Next stop: WCF and Generics.&lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-2574696293971486172?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/2574696293971486172/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=2574696293971486172' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/2574696293971486172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/2574696293971486172'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/07/reading-source-minima-i.html' title='Reading Source, Minima I'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-6068485005843674203</id><published>2008-07-16T21:01:00.001-07:00</published><updated>2008-07-16T21:01:13.165-07:00</updated><title type='text'>Tragically Well Known</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;Of late there seem to be a lot of the well knowns of blogging bowing out (at least in volume) because of how much work it takes to qualify and disclaim the topics they take upon themselves. I find it sad because even the essays I find myself disagreeing with usually provide the same thought provoking effect as the ones I enjoy in agreement. It's strange to think that people like Paul Graham and Joel Spolsky would be exasperated by the barbs people toss their way and yet, it seems, they are.&amp;#160; Paul's &lt;a href="http://www.paulgraham.com/disagree.html"&gt;essay on disagreement&lt;/a&gt; seems evidence of this and the &lt;a href="http://itc.conversationsnetwork.org/shows/detail3741.html"&gt;most recent Stackoverflow podcast&lt;/a&gt; dwells considerably on the topic from Joel's perspective.&lt;/p&gt;  &lt;p&gt;I would like to make the following proposal both in encouragement of people like this writing and for people like myself enjoying it: rather than quick barbs and/or &amp;quot;jumped the shark&amp;quot; posts, return to the previous material of the author and enjoy an old post. It's not that disagreement is bad or unwelcome; I think a lot of the well knowns enjoy a spirited discourse.&amp;#160; It has more to do with people either misunderstanding or disagreeing in the wrong way - DH0 to DH4 as Paul would have it.&lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-6068485005843674203?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/6068485005843674203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=6068485005843674203' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/6068485005843674203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/6068485005843674203'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/07/tragically-well-known.html' title='Tragically Well Known'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-1785734843007842943</id><published>2008-07-13T18:05:00.001-07:00</published><updated>2008-07-13T18:08:27.349-07:00</updated><title type='text'>Predictably Irrational: Startups and Open Source</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;The Herding Code podcast took up the topic: &lt;a href="http://herdingcode.com/?p=20"&gt;&amp;quot;Why don't startups run on Microsoft?&amp;quot;&lt;/a&gt; which I thought was interesting - it crossed paths with comments in a spat I've followed between Atwood (who chose .NET as a platform for Stackoverflow) and Marco Arment (of tumblr fame (side note: I actually &lt;a href="http://da5id.tumblr.com/"&gt;have a tumblr&lt;/a&gt;)).&amp;#160; Had you asked me before Friday for an opinion I would have probably attributed it to the Byzantine licensing schemes for Microsoft products as well as marketing oriented decisions like making IIS 7 unavailable on XP.&amp;#160; &lt;/p&gt;  &lt;p&gt;On Friday, however, I heard a &lt;a href="http://marketplace.publicradio.org/display/web/2008/07/11/ariely_shared_meals/"&gt;commentary on Marketplace from Dan Ariely&lt;/a&gt; that is a basis for a hypothesis that hadn't occurred to me but seems to make perfect sense for software.&amp;#160; &lt;a href="http://web.mit.edu/ariely/www/MIT/"&gt;Ariely&lt;/a&gt;, a behavioral economist at MIT, starts with suggesting that the next time you eat out with friends, it might be better to have one person pick up the &amp;quot;pain of paying&amp;quot; for dinner rather than distributing it across all the people who were out. According to the commentary (emphasis mine): &lt;/p&gt;  &lt;blockquote style="padding-right: 3px; padding-left: 10px; padding-bottom: 3px; border-left: red 1px solid; width: 500px; line-height: 140%; padding-top: 3px"&gt;   &lt;p&gt;Findings from behavioral economics tell us that one person should pay the entire bill and that the person paying should alternate over time. &lt;strong&gt;When we pay any amount of money, we feel some psychological pain.&lt;/strong&gt; &lt;strong&gt;We call this the pain of paying. This is the unpleasantness that is associated with forking over our hard earned cash. But it also turns out that this pain does not increase linearly with the cost of the meal. This means that when we double the payment, the pain doesn't double; it increases just by a bit.&lt;/strong&gt; In fact, the biggest increase in the pain of paying comes when we switch from paying nothing to paying something. Now, it's easy to see why one person should pay the entire bill. How so? Well, if every person paid their share, they would all experience some pain of paying.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;If you're curious about how Ariely is able to make that assertion, he elaborates on this and other ideas in his book &lt;a href="http://www.nytimes.com/2008/03/16/books/review/Berreby-t.html?_r=1&amp;amp;oref=slogin"&gt;Predictably Irrational&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;It makes perfect sense that this could be a credible idea behind why startups don't work with Microsoft technology - that the cost is less of a factor than &amp;quot;costing&amp;quot; some dollar amount.&amp;#160; If you attach to that complex licensing and &lt;a href="http://msdn.microsoft.com/en-us/vs2008/products/cc149003.aspx"&gt;many flavors of the same product&lt;/a&gt; and you get pain that goes beyond the &amp;quot;pain of paying.&amp;quot; &lt;/p&gt;  &lt;p&gt;It makes some sense on the Microsoft side of things too; rather than trying to determine which products developers should get matched to, most companies just buy a high end MSDN subscription for developers even though chances are high that not all the products are actually used.&amp;#160; They can count on &amp;quot;enterprise&amp;quot; companies conservatively overpaying and hence getting the most out of them.&lt;/p&gt;  &lt;p&gt;A couple of thoughts that come to mind:    &lt;br /&gt;1. How could one go about trying to measure the &amp;quot;pain of paying&amp;quot; with software?     &lt;br /&gt;2. Does &amp;quot;free&amp;quot; open source translate to more time in managability/expertise?&lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-1785734843007842943?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/1785734843007842943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=1785734843007842943' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/1785734843007842943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/1785734843007842943'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/07/predictably-irrational-startups-and.html' title='Predictably Irrational: Startups and Open Source'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-3896284483570026180</id><published>2008-06-27T10:51:00.001-07:00</published><updated>2008-06-27T10:53:13.773-07:00</updated><title type='text'>Change Dispensed</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;Steve &lt;a href="http://blog.stevenlevithan.com/archives/change-dispenser"&gt;posted&lt;/a&gt; a coding challenge a few days ago - a change dispenser. I thought it would be a nice exercise for my fledgling Python skills and implemented it with just a small variation on pluralizing coin denominations.     &lt;br /&gt;    &lt;br /&gt;&lt;/p&gt;  &lt;pre style="line-height:120%;padding-right: 10px; padding-left: 10px; font-size: 12pt; background: #000; padding-bottom: 10px; margin: 1em 0px; overflow: auto; color: #eee; padding-top: 10px; font-family: courier"&gt;def make_change(amt):&lt;br /&gt;    output = &amp;quot;Change is &amp;quot;&lt;br /&gt;    coins = (['quarte|r|rs', 25], ['dim|e|es', 10], ['nicke|l|ls', 5], ['penn|y|ies',1])&lt;br /&gt;    for i in coins:   &lt;br /&gt;        r = amt // i[1]&lt;br /&gt;        if(r &amp;gt; 0):&lt;br /&gt;            coinout = re.split('\|', i[0])&lt;br /&gt;            output += &amp;quot;%d %s%s &amp;quot; % (r, coinout[0], coinout[1:][r &amp;gt; 1])&lt;br /&gt;            amt = amt - (r * i[1])&lt;br /&gt;    print output&lt;br /&gt;    &lt;br /&gt;make_change(48)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;  &lt;br /&gt;A few things I learned along the way: &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;* I was reminded that dictionary objects do not guarantee order. &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;* I was using Python regular expressions to do a match on the string &amp;quot;this |and|or that&amp;quot; and discovered if you use match with simply \|(\w+) it returns nothing since the match must start from the beginning of the string! &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;* I was going to use a lambda expression for the pluralization but that's such a large hammer for what in the end would become a split&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Python's behavior with booleans is another point of interest - when I test the following: coinout[1:][r &amp;gt; 1] I'm taking advantage of anything true being a 1. I wonder if this is &amp;quot;bad&amp;quot; but it's a seductive thing to take advantage of... &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-3896284483570026180?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/3896284483570026180/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=3896284483570026180' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/3896284483570026180'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/3896284483570026180'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/06/change-dispensed.html' title='Change Dispensed'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-4044174368560773743</id><published>2008-06-23T21:50:00.001-07:00</published><updated>2008-06-23T21:50:07.041-07:00</updated><title type='text'>Deep Fried Bytes, Yegge, Interviewing</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;Found a good podcast today, &amp;quot;&lt;a href="http://deepfriedbytes.com/podcast"&gt;Deep Fried Bytes&lt;/a&gt;.&amp;quot; Skip the first episode but the second on interviewing is a gem. Although it was posted on May 29, it ties in quite well with thoughts delivered (not simply written, but delivered) by Steve Yegge in his recent post on finding good people, &lt;a href="http://steve-yegge.blogspot.com/2008/06/done-and-gets-things-smart.html"&gt;Done and Gets Things Smart&lt;/a&gt;. Not only is it entertaining to hear &lt;a href="http://www.ayende.com/Blog/"&gt;Ayende Rahein&lt;/a&gt; take nonusers of using blocks to task, but later Scott Belware seems to be on the same page as Yegge on how you can know if people are &amp;quot;good.&amp;quot;&amp;#160; Here is his approach (listen to the podcast if you want total accuracy): &lt;/p&gt;  &lt;p&gt;- I don't ask questions I do pair programming for interviews...   &lt;br /&gt;- Interview questions are irrelevent... most of the people asking interview questions are showing the people who are interviewing what they know    &lt;br /&gt;- Ask for a code sample with unit tests that run inside Visual Studio    &lt;br /&gt;- If that's okay ask them to come in for 4 hours of pair programming    &lt;br /&gt;- Most interview related items would come up during the pair programming session&lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-4044174368560773743?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/4044174368560773743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=4044174368560773743' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4044174368560773743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4044174368560773743'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/06/deep-fried-bytes-yegge-interviewing.html' title='Deep Fried Bytes, Yegge, Interviewing'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-2623278451234136999</id><published>2008-06-12T22:04:00.001-07:00</published><updated>2008-06-12T22:09:26.104-07:00</updated><title type='text'>C# Multiple Replace Extension Methods, Levithan Style</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;A couple of nights ago I &lt;a href="http://metadeveloper.blogspot.com/2008/06/regex-replace-multiple-strings-in.html"&gt;blogged&lt;/a&gt; about an implementation of a technique to replace multiple patterns in a string on a single pass. Steve Levithan had &lt;a href="http://blog.stevenlevithan.com/archives/multi-replace"&gt;an entry&lt;/a&gt; on the approach (not mine in specific, just the approach and commenting on a few weaknesses). It inspired a few things out of me: first, making the multiple replace an extension method of the string class, and second to duplicate Steve's approach which enables a more robust model because you can use metasequences etc... &lt;/p&gt;  &lt;p&gt;Here is the code (included the using statement since the use of ToArray() from the Dictionary key collection isn't available without System.Linq): &lt;/p&gt;  &lt;pre&gt;using System;&lt;br /&gt;using System.Linq;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Text.RegularExpressions;&lt;br /&gt;&lt;br /&gt;static class RegexExtender {&lt;br /&gt;    public static string MultiReplace(this string target, Dictionary&lt;string , string&gt; replacementDictionary) {&lt;br /&gt;        return Regex.Replace(target,&lt;br /&gt;                                &amp;quot;(&amp;quot; + String.Join(&amp;quot;|&amp;quot;, replacementDictionary.Keys.ToArray()) + &amp;quot;)&amp;quot;,&lt;br /&gt;                                delegate(Match m) { return replacementDictionary[m.Value]; }&lt;br /&gt;                                );&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public static string LevithansMultiReplace(this string target, Dictionary&lt;string , string&gt; replacementDictionary)&lt;br /&gt;    {&lt;br /&gt;        foreach (string key in replacementDictionary.Keys) {&lt;br /&gt;            Regex r = new Regex(key, RegexOptions.None);&lt;br /&gt;            target = r.Replace(target, replacementDictionary[key]);&lt;br /&gt;        }&lt;br /&gt;        return target;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Here is some usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;// the original approach, as an extension method&lt;br /&gt;string x = "Holly was a hunter";&lt;br /&gt;Dictionary&lt;string, string&gt; rdict = new Dictionary&lt;string, string&gt;();&lt;br /&gt;rdict.Add("Holly", "Hannah");&lt;br /&gt;rdict.Add("hunter", "hatter");&lt;br /&gt;Console.WriteLine(x.MultiReplace(rdict));&lt;br /&gt;&lt;br /&gt;// Steve's technique&lt;br /&gt;rdict = new Dictionary&lt;string, string&gt;();&lt;br /&gt;rdict.Add(@"[A-z]", "x");&lt;br /&gt;rdict.Add(@"\d", "y");&lt;br /&gt;string test = "David is 33";&lt;br /&gt;Console.WriteLine(test.LevithansMultiReplace(rdict));&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-2623278451234136999?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/2623278451234136999/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=2623278451234136999' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/2623278451234136999'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/2623278451234136999'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/06/c-multiple-replace-extension-methods.html' title='C# Multiple Replace Extension Methods, Levithan Style'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-3138747091868263445</id><published>2008-06-10T22:13:00.001-07:00</published><updated>2008-06-10T22:13:25.903-07:00</updated><title type='text'>Regex: replace multiple strings in a single pass with C#</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;I wish I could say I was the clever one to think of this but I ran into it in my copy of the Python Cookbook (the original author is &lt;a href="http://defrang.com/"&gt;Xavier Defrang&lt;/a&gt;, the Python implementation &lt;a href="http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/81330"&gt;here&lt;/a&gt;). It's cool enough that I ported it today - I'll know I'll use the C# implementation of it quite often: &lt;/p&gt;  &lt;pre&gt;        static string MultipleReplace(string text, Dictionary&lt;string , string&gt; replacements) {&lt;br /&gt;            return Regex.Replace(text, &lt;br /&gt;                                    &amp;quot;(&amp;quot; + String.Join(&amp;quot;|&amp;quot;, adict.Keys.ToArray()) + &amp;quot;)&amp;quot;,&lt;br /&gt;                                    delegate(Match m) { return replacements[m.Value]; }&lt;br /&gt;                                    );&lt;br /&gt;        }&lt;br /&gt;	// somewhere else in code&lt;br /&gt;            string temp = "Jonathan Smith is a developer";&lt;br /&gt;            adict.Add("Jonathan", "David");&lt;br /&gt;            adict.Add("Smith", "Seruyange");&lt;br /&gt;            string rep = MultipleReplace(temp, adict);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-3138747091868263445?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/3138747091868263445/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=3138747091868263445' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/3138747091868263445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/3138747091868263445'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/06/regex-replace-multiple-strings-in.html' title='Regex: replace multiple strings in a single pass with C#'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-4039621155831373646</id><published>2008-06-08T21:08:00.001-07:00</published><updated>2008-06-08T21:08:52.852-07:00</updated><title type='text'>Languages And Thinking</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;I'm approaching the end to a rough week and should be coding but the virus scanner on my office machine is slowing development to a point where it's not bearable for me.&amp;#160; I'll pass the time with a quick thought about how programming languages affect thinking and why it makes me both picky about languages I use and also curious to see how the different languages solve problems.&lt;/p&gt;  &lt;p&gt;I will confess that the project I've been working on is written in VB.NET.&amp;#160; The reason for that was very practical since our client was adept at VBA and needed to, on occasion, get to the code level of things.&amp;#160; I'd spent a lot of time in Visual Basic (the &amp;quot;classical&amp;quot; VB) so I thought nothing of it - perhaps somewhat of a refreshment after so many years away.&amp;#160; As we wrote more and more code, I started noticing a lot of nested &amp;quot;If&amp;quot; statements in the style of: &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;pre&gt;If Some Condition Then&lt;br /&gt;	If SomeOtherCondition Then&lt;br /&gt;		If YetAnotherCondition Then&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;You get the picture.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I remember working with a different VB programmer and she was also given to writing a lot of nested conditions in the same manner even though we were using C#:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;if(cond){&lt;br /&gt;	if(cond2){&lt;br /&gt;		if(cond3){	&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;At the time it really bothered me in a &amp;quot;code smell&amp;quot; sort of way; nesting conditions, I would have argued, invites clutter and entropy. Since I've been attending Hanselman University for a while now I can say with more technical gravitas that they increase cyclomatic complexity and this was why they smelled bad. The alternative I would have wished for would have been:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;if(cond &amp;amp;&amp;amp; cond2 &amp;amp;&amp;amp; cond3){&lt;br /&gt;...&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Pretty natural, right?&amp;#160; Actually no, especially if you're coming from Visual Basic because the Visual Basic And and Or operators don't do short circuit evaluation.&amp;#160; If you combine boolean expressions you have to make a mental note to verify that they both will work at runtime - that there is no dependency between them.&amp;#160; That's something a C# progammer completely takes for granted often writing code like this which is a ticking bomb in VB.NET (it won't go off until you're demonstrating the app to your client, trust me):&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;If Not MyCollection Is Nothing And MyCollection(0) = &amp;quot;Something&amp;quot; Then&lt;br /&gt;	...&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;One expects the second expression will be passed if the first fails in a &amp;quot;short circuit&amp;quot; approach. Unfortunately, Visual Basic .NET will attempt to evaluate the second even if the first is not true!&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;To clean this all up the VB.NET folks provided the AndAlso and OrElse operators which do traditional short circuit evaluation. I read somewhere that the reason And and Or were left as is was for backward compatibility and people who were &amp;quot;upgrading&amp;quot; their code from Visual Basic to Visual Basic.NET. Using these operators you're back to thinking &amp;quot;normally&amp;quot; as a C#, C, Javascript, etc... developer.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;So back to my original thought - nested If blocks are a simple way around an operator that doesn't short circuit and it's a way of thinking if you've spent a lot of time writing Visual Basic code. The language is what drives that even though there may be alternatives. Even though it may produce cyclomatic complexity. Some people tell me picking a language is just a simple process of picking a tool, but I think it's more than that; it's picking a way of thinking. That's why it's not only important to me, it's interesting to see how different languages lead us in different directions. Even if an idiom is available elsewhere, it's getting to think that way that is most often&amp;#160; the trick to being better in both languages.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;One more side note, I can chart a few different ways in which new languages have affected me. Take a look at the type of thing I did before a lot: &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;foreach(string s in stuff){	&lt;br /&gt;	master += s + &amp;quot;,&amp;quot;;&lt;br /&gt;}&lt;br /&gt;master = master.Substring(0, master.Length -1);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Nowadays:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;// like a map, I first started thinking this way from perl&lt;br /&gt;stuff.ForEach(delegate(string s) { master += s + &amp;quot;,&amp;quot;; });&lt;br /&gt;// like a join, very Pythonic&lt;br /&gt;String.Join(&amp;quot;,&amp;quot;, stuff.ToArray())&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-4039621155831373646?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/4039621155831373646/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=4039621155831373646' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4039621155831373646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4039621155831373646'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/06/languages-and-thinking.html' title='Languages And Thinking'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-7472314099221927637</id><published>2008-06-01T17:45:00.001-07:00</published><updated>2008-06-01T17:45:13.391-07:00</updated><title type='text'>Galloway et. al. Roundtable Podcast</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;If you haven't and you do Microsoft development, give an ear to &lt;a href="http://weblogs.asp.net/jgalloway/default.aspx"&gt;John Galloway&lt;/a&gt;, &lt;a href="http://www.odetocode.com/"&gt;K. Scott Allen&lt;/a&gt;, &lt;a href="http://www.lazycoder.com/weblog/"&gt;Scott Koon&lt;/a&gt;, and &lt;a href="http://weblogs.asp.net/kdente/"&gt;Keven Dente&lt;/a&gt; in their &amp;quot;Technology Roundtable&amp;quot; &lt;a href="http://weblogs.asp.net/jgalloway/archive/tags/Podcast/default.aspx"&gt;podcast&lt;/a&gt;.&amp;#160; There are a lot of podcasts I find entertaining, (like Joel and Jeff's &lt;a href="http://blog.stackoverflow.com/"&gt;discussions&lt;/a&gt;) but these guys seem to do what I do - and to contextualize that since it may sound presumptuous, they deal with Microsoft development tools building &amp;quot;real world&amp;quot; software.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;I try to have &amp;quot;take aways&amp;quot; from podcasts so from the first more impetus to investigate Ninject and dependency injection as well as more investigation of LINQ to SQL and the ADO.NET Entity framework (opinions flew on these, I'd like to develop some of my own).&amp;#160; Finally, even though I'll probably skip the beta, I will look forward to .NET 3.5 SP1 since ASP.NET Dynamic Data will be packaged therein.&lt;/p&gt;  &lt;p&gt;The second podcast had a great discussion on javascript libraries. I've used &lt;a href="http://www.t3rse.com/proper"&gt;jQuery&lt;/a&gt; and &lt;a href="http://www.nregex.com"&gt;YUI&lt;/a&gt; and Prototype on different projects and while my fondness for Prototype/Scriptaculous is probably greatest of all I am always eager to hear other people's experiences. The framework I have yet to do anything serious with is Dojo - I did some quick prototyping of their flyout menu with ASP.NET server code and I hate to say it but the ASP.NET Menu control was a lot more effective and fast. While it wasn't explicitly stated, this podcast has dampened my interest for the ASP.NET Ajax stuff - I looked at it again a few weeks ago and it seemed so... heavy.&amp;#160; I'm not sure who mentioned it in the podcast but they said it seemed more oriented for writing controls versus Ajaxy type applications.&amp;#160; I would have to concur with my limited knowledge.&lt;/p&gt;  &lt;p&gt;I'll stay tuned, it will be interesting to see what they talk about next time.&lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-7472314099221927637?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/7472314099221927637/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=7472314099221927637' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/7472314099221927637'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/7472314099221927637'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/06/galloway-et-al-roundtable-podcast.html' title='Galloway et. al. Roundtable Podcast'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-1498415232060894544</id><published>2008-05-31T16:10:00.001-07:00</published><updated>2008-05-31T16:10:34.857-07:00</updated><title type='text'>Knowing C</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;I've been having a good time listening to the &lt;a href="http://blog.stackoverflow.com/"&gt;StackOverflow podcasts&lt;/a&gt;. Joel's a great curmudgeon and Atwood is as opinionated as ever.&amp;#160; An ongoing disagreement between the two has been the usefulness of knowing C.&amp;#160; Joel's adamant about its importance and Atwood thinks there is much else a developer can spend their time in understanding.&amp;#160; &lt;/p&gt;  &lt;p&gt;Eric Sink has since chimed in with a post called &lt;a href="http://www.ericsink.com/entries/c_morse_code.html"&gt;C and Morse Code&lt;/a&gt; wherein he reveals his cards: like Joel, he thinks it's of vital importance if you want to reach past mediocrity:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;I'm not going to take a black-and-white stance on this.&amp;#160; I won't go so far as to say that every developer must learn C.&amp;#160; I've met lots of developers without C experience who are successful and making positive contributions to important software projects.&lt;/p&gt;    &lt;p&gt;Furthermore, I'll admit that knowing C is not a magic solution to poor skills.&amp;#160; A lousy developer who happens to know C is simply better equipped to hurt himself or somebody nearby.&lt;/p&gt;    &lt;p&gt;However, I can say these two things:&lt;/p&gt;    &lt;ol&gt;     &lt;li&gt;All of the truly extraordinary developers I know are people who really understand the kind of low-level details that C forces you to know. &lt;/li&gt;      &lt;li&gt;Every programmer without C experience has a clear path of personal development:&amp;#160; Learn C.&amp;#160; Get some real experience using C to write a serious piece of software.&amp;#160; Even if you never use it again, you'll be a better programmer when you're done. &lt;/li&gt;   &lt;/ol&gt; &lt;/blockquote&gt;  &lt;p&gt;My relationship with C is tenuous at best. I spent a few months some years ago delving into it (and C++) seriously - I'm curious to go back and find some of that code but it was a few machines ago*.&amp;#160; I remember during that time I'd work on little toy programs (mostly an implementation of some algorithm) in C and then have the need for a utility and write it in something else.&amp;#160; It would be interesting to take Eric up on his second point of writing a &amp;quot;serious piece of software&amp;quot; using the language.&amp;#160; One interesting angle on this is how one would keep said &amp;quot;serious piece of software&amp;quot; strictly in the realm of C, without venturing too much into the world of C++ and object orientation done poorly.&lt;/p&gt;  &lt;p&gt;So brainstorm question: what's something nice and useful that could be implemented strictly within C? (That one might not yawn and think *gosh* that would take 1 minute to do in Python).&lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;   &lt;br /&gt;*Great memories of Me, Markus, and &lt;a href="http://www.codegear.com/downloads/free/cppbuilder"&gt;bcc32&lt;/a&gt; in a coffee house somewhere in southern California.&amp;#160; Too far gone are those days... &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-1498415232060894544?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/1498415232060894544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=1498415232060894544' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/1498415232060894544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/1498415232060894544'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/05/knowing-c.html' title='Knowing C'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-6112899908965993602</id><published>2008-05-29T21:09:00.001-07:00</published><updated>2008-05-29T21:09:21.413-07:00</updated><title type='text'>Splitting Files with Python</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;I've been recently needing to generate sql scripts from large Excel spreadsheets. But once the script is finished I've had issues getting SQL Management Studio to execute as large a script in a single run. The solution? Split up the file with a little Python that takes it's arguments like this:&lt;/p&gt;  &lt;p&gt;ipy Splitter.py&amp;#160; LargeFile.sql 3&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;pre&gt;#import clr&lt;br /&gt;#pass arguments like so:&lt;br /&gt;# THISSCRIPT.PY FILE NUM_PARTS&lt;br /&gt;# ipy Ringil.py LargeFile.sql 4&lt;br /&gt;&lt;br /&gt;import sys&lt;br /&gt;&lt;br /&gt;if(len(sys.argv) == 3):&lt;br /&gt;    splits = int(sys.argv[2])&lt;br /&gt;    f = open(sys.argv[1])&lt;br /&gt;    data = f.readlines()&lt;br /&gt;    lc = len(data)/splits&lt;br /&gt;    print &amp;quot;number of lines&amp;quot;, len(data)&lt;br /&gt;    for c in range(0,splits):&lt;br /&gt;        outstream = open(&amp;quot;data&amp;quot; + str(c + 1) + &amp;quot;.sql&amp;quot;, 'w')&lt;br /&gt;        for line in data[:lc]: &lt;br /&gt;            outstream.write(line)&lt;br /&gt;        outstream.close()&lt;br /&gt;        del data[:lc]&lt;br /&gt;    f.close()&lt;br /&gt;else:&lt;br /&gt;    print &amp;quot;Expected arguments: file and number of splits\n example: ipy Splitter.py LargeFile.sql 4&amp;quot;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-6112899908965993602?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/6112899908965993602/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=6112899908965993602' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/6112899908965993602'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/6112899908965993602'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/05/splitting-files-with-python.html' title='Splitting Files with Python'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-7503036376934644603</id><published>2008-05-20T19:31:00.001-07:00</published><updated>2008-05-20T19:31:43.544-07:00</updated><title type='text'>It's speed that counts</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt; &lt;p&gt;I usually don't talk about hardware because I don't pay too much attention to it unless something is bothering me.&amp;nbsp; However I've discovered something interesting about myself in the last week.&amp;nbsp; I've done a lot of my development over the last few years on an enormous &lt;a href="http://www.notebookreview.com/default.asp?newsID=2248&amp;amp;review=ZD8000"&gt;HP zd8000&lt;/a&gt;.&amp;nbsp; I jokingly called it "the 747" because of its size and girth - 10 lbs and a 17" screen.&amp;nbsp; For a guy like me who's usually also carrying a few books in his bag it's quite a load as evidenced by my going through at least one laptop bag (my current one is also in poor shape).&amp;nbsp; &lt;/p&gt; &lt;p&gt;So because of some changes at work I got to try out a machine I'd liked the thought of - another HP but this one with a small 13" screen and weighing perhaps 4 lbs.&amp;nbsp; It's a great little machine and has a cool look but after about a week I'm back to the 747. &lt;/p&gt; &lt;p&gt;Why go back to the back pains and encumbrance of this massive machine?&amp;nbsp; One simple reason: speed.&amp;nbsp; It's got twice the RAM (2GB) and a much faster processor.&amp;nbsp; I didn't think about this much but for a person like me who is usually running an instance of SQL Server, an IDE of some sort, a text editor, web browsing with 10 tabs open, listening to music, chatting up friends (Messenger is no joke when it comes to resources), etc, etc - you get the picture - it's frustrating to be on a beautiful, compact machine that you have to wait around for. I'd rather exchange power with encumbrance for convenience with time penalties.&lt;/p&gt; &lt;p&gt;Or, as I like to joke with my South Dakota friends, I'm like a guy who exchanged his &lt;a href="http://www.chevrolet.com/silverado/"&gt;Chevy Silverado&lt;/a&gt; for a &lt;a href="http://www.vw.com/touareg/en/us/#"&gt;crossover vehicle&lt;/a&gt;... until he realized that he made his living hauling lumber.&lt;/p&gt; &lt;p&gt;Footnote: I ordered a Thinkpad T61 which should be a foot in both worlds. I guess my bit of the economic stimulus went to China. &lt;/p&gt; &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-7503036376934644603?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/7503036376934644603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=7503036376934644603' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/7503036376934644603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/7503036376934644603'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/05/it-speed-that-counts.html' title='It&amp;#39;s speed that counts'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-199171515594215090</id><published>2008-05-19T21:54:00.001-07:00</published><updated>2008-05-19T21:54:35.882-07:00</updated><title type='text'>Nregex mention</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;Steven mentions &lt;a href="http://www.nregex.com/nregex/default.aspx"&gt;Nregex&lt;/a&gt; in a &lt;a href="http://blog.stevenlevithan.com/archives/jrx-xregexp"&gt;list of regular expression testers&lt;/a&gt; online. Nregex is still up and still useful especially if you need to work with .NET's implementation of regular expressions. A coworker of mine just used it to build a parser for Sql Reporting Services RDL files.&amp;#160; Steven's own &lt;a href="http://www.regexpal.com"&gt;RegexPal&lt;/a&gt; is a fairly intense implementation of regular expressions in javascript, complete with syntax highlighting.&lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-199171515594215090?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/199171515594215090/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=199171515594215090' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/199171515594215090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/199171515594215090'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/05/nregex-mention.html' title='Nregex mention'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-983459701511790441</id><published>2008-05-12T21:54:00.001-07:00</published><updated>2008-05-12T21:54:00.188-07:00</updated><title type='text'>Workaholism</title><content type='html'>&lt;p&gt;&lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;Matt from 37Signals &lt;a href="http://www.37signals.com/svn/posts/1017-workaholics-fixate-on-inconsequential-details"&gt;blogs&lt;/a&gt; about workaholics with the following assertions: they don't get as much done (most of the time) and they focus on inconsequential details.&lt;/p&gt;  &lt;p&gt;Many leapt to the defense of workaholics - people who, it seems, are workaholics themselves. Because I'm often labeled a workaholic I'm trying to see past my emotions and yet it still doesn't smell like the truth to me.&lt;/p&gt;  &lt;p&gt;And even more so because this weekend I watched &lt;a href="http://www.pbs.org/nerds/"&gt;Triumph of the Nerds&lt;/a&gt;, Cringley's chronicling of the personal computer industry from it's humble roots in what would become Silicon Valley.&amp;#160; As he interviewed people, I couldn't help but think that software development is experiencing a culture change.&amp;#160; The people who got the boat off the ground were almost entirely obsessed with their work, even down to the details.&amp;#160; I have a hard time imagining an Andy Hertzfeld, Woz, or young Bill Gates as a 501 developer.&lt;/p&gt;  &lt;p&gt;Even if you go forward a few years, guys like John Carmack don't fit the mould of &amp;quot;balanced life/time to go pick up my kids and watch TV!&amp;quot;&lt;/p&gt;  &lt;p&gt;These days though, I think what used to be hobbyism is now simply work and fair game for any person who wants a way to earn their keep and &amp;quot;clock out&amp;quot; for life afterwards.&amp;#160; This is not to say that it wasn't that way before, it just seems like much more commitment was involved.&amp;#160; Or maybe the moral is that no one with a 501 development attitude did anything noteworthy. &lt;/p&gt;  &lt;p&gt;But even as I write that and play my hand as a kid who grew up on the folklore of the early computer industry I have to do a gut check because me staying at work late building yet another website for someone is not the same as writing the first GUI.&amp;#160; Not even close... &lt;/p&gt;  &lt;p&gt;I take away the notion that there isn't necessarily a direct relationship between time spent at work and productivity but I also know that if I had the 9-5 attitude with no tendency to &amp;quot;get into&amp;quot; my profession, I might as well be an accountant. And as grandiose as it may seem, I'd love to have one idea that really matters versus a lifetime of mediocrity so I could rush home to have a &amp;quot;life.&amp;quot;&lt;/p&gt;  &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-983459701511790441?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/983459701511790441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=983459701511790441' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/983459701511790441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/983459701511790441'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/05/workaholism.html' title='Workaholism'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-7699486140961950074</id><published>2008-05-10T20:26:00.001-07:00</published><updated>2008-05-10T20:30:16.328-07:00</updated><title type='text'>Old Computer Books</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;img style="margin: 0px 5px 0px 0px" src="http://www.seruyange.com/metadeveloper/ComputerBooks.jpg" align="right"&gt;&lt;/p&gt; &lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt; &lt;p&gt;I was recently feeling ashamed of myself after reading Atwood's &lt;a href="http://www.codinghorror.com/blog/archives/001108.html"&gt;Programmers Don't Read Books...&lt;/a&gt;&amp;nbsp; post for what he called Programming book pornography: "The idea that having a pile of thick, important-looking programming books sitting on your shelf, largely unread, will somehow make you a better programmer."&amp;nbsp; To clarify, &lt;strong&gt;I actually do read the books&lt;/strong&gt; I have bought but I'm guilty of keeping a full shelf for the sake of showing off my long and continuing struggle to be a good programmer.&amp;nbsp; &lt;/p&gt; &lt;p&gt;One way I can soften this sort of conceit is by thinking of how I'm really proud and boastful of my friends in real life who do &lt;a href="http://www.gunplaythecomic.com/"&gt;things&lt;/a&gt; that amaze me. I'm not shy to boast on their behalf.&amp;nbsp; In the same way a lot of these old books are like old friends that have seen me through some pretty turbulent times.&amp;nbsp; I carried Francesco Balena's &lt;em&gt;Programming Visual Basic 6.0&lt;/em&gt; around for years when I was training people on VB6, COM, and ASP.&amp;nbsp; Another set of heavy books I spent many a quality night in a hotel room with were Gary Cornell's &lt;em&gt;Core Java&lt;/em&gt; and &lt;em&gt;Core Java Advanced Features&lt;/em&gt;. I don't have a formal computer science education but I consider a large part of my education the 7 or so years I spent on the road, in various hotel rooms, reading and practicing what I needed to know.&lt;/p&gt; &lt;p&gt;If truth be told there are a few there that I didn't get much out of.&amp;nbsp; I never did run &lt;a href="http://www.slashcode.com/"&gt;Slashcode&lt;/a&gt; and I never did more than tinker with Bryce.&amp;nbsp; But I'm not ashamed to say that I had hopes of doing so that time supplanted with other things.&lt;/p&gt; &lt;p&gt;I packed them away and made room for some of the books I have piled on top of the shelves.&amp;nbsp; Since I don't travel much and remain in project mode I'm not as efficient about reading what I have but a smaller shelf is more tidy and palatable.&amp;nbsp; I won't wait so long before my next big cleanup.&lt;/p&gt; &lt;p&gt;So the big question: what to do with these books?&lt;/p&gt; &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-7699486140961950074?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/7699486140961950074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=7699486140961950074' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/7699486140961950074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/7699486140961950074'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/05/old-computer-books.html' title='Old Computer Books'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-6049521943716200908</id><published>2008-05-08T21:04:00.001-07:00</published><updated>2008-05-08T21:04:29.148-07:00</updated><title type='text'>Processing.js</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt; &lt;p&gt;John Resig of jQuery fame has released &lt;a href="http://ejohn.org/blog/processingjs/"&gt;a library&lt;/a&gt; called Processing.js for javascript graphics. Yes, you read that right: Javascript graphics.&lt;/p&gt; &lt;p&gt;Earlier this week I was in some training and the instructor asked what future we saw for Silverlight.&amp;nbsp; My response was that I can't drink the koolaid just yet; while there are certainly applications in streaming media in which Silverlight will compete to the death with Flash, for web applications I see people taking Javascript to the level where its maturity with the browser makes most applications feasible. I also like the competitive environment around the Javascript libraries - the Dojo, jQuery, YUI, Scriptaculous, and other people trying to outdo one another just means better ideas, faster turn arounds, and a better experience.&amp;nbsp; &lt;/p&gt; &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-6049521943716200908?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/6049521943716200908/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=6049521943716200908' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/6049521943716200908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/6049521943716200908'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/05/processingjs.html' title='Processing.js'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-8207415434182274698</id><published>2008-05-05T19:59:00.001-07:00</published><updated>2008-05-05T20:02:02.707-07:00</updated><title type='text'>C# Extension Method for Generic Collections</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt; &lt;p&gt;Tinkering a bit with extension methods tonight, &lt;a href="http://www.hanselman.com/blog/ASmarterOrPureEvilToStringWithExtensionMethods.aspx"&gt;inspired&lt;/a&gt; in part by Scott Hanselman to write something I've frequently needed with generic collections: to spit them out in some delimited format.&amp;nbsp; Here are the extension class and method:&lt;/p&gt;&lt;pre class="csharpcode"&gt;    &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; EnumerableExtensions&lt;br /&gt;    {&lt;br /&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; AsDelimited&amp;lt;T&amp;gt;(&lt;span class="kwrd"&gt;this&lt;/span&gt; List&amp;lt;T&amp;gt; obj, &lt;span class="kwrd"&gt;string&lt;/span&gt; delimiter)&lt;br /&gt;        {&lt;br /&gt;            List&amp;lt;&lt;span class="kwrd"&gt;string&lt;/span&gt;&amp;gt; items = &lt;span class="kwrd"&gt;new&lt;/span&gt; List&amp;lt;&lt;span class="kwrd"&gt;string&lt;/span&gt;&amp;gt;();&lt;br /&gt;            &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (T data &lt;span class="kwrd"&gt;in&lt;/span&gt; obj) {&lt;br /&gt;                items.Add(data.ToString());&lt;br /&gt;            }&lt;br /&gt;            &lt;span class="kwrd"&gt;return&lt;/span&gt; String.Join(delimiter, items.ToArray());&lt;br /&gt;        }&lt;br /&gt;    }&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;You can spit out your delimited instances of any List&amp;lt;T&amp;gt; now:&lt;/p&gt;&lt;pre class="csharpcode"&gt;            List&amp;lt;&lt;span class="kwrd"&gt;string&lt;/span&gt;&amp;gt; test = &lt;span class="kwrd"&gt;new&lt;/span&gt; List&amp;lt;&lt;span class="kwrd"&gt;string&lt;/span&gt;&amp;gt;(&lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt;[] { &lt;span class="str"&gt;"David"&lt;/span&gt;, &lt;span class="str"&gt;"Morgan"&lt;/span&gt;, &lt;span class="str"&gt;"Philip"&lt;/span&gt; });&lt;br /&gt;            Console.WriteLine(test.AsDelimited(&lt;span class="str"&gt;" =&amp;gt; "&lt;/span&gt;));&lt;br /&gt;&lt;br /&gt;            List&amp;lt;&lt;span class="kwrd"&gt;int&lt;/span&gt;&amp;gt; primes = &lt;span class="kwrd"&gt;new&lt;/span&gt; List&amp;lt;&lt;span class="kwrd"&gt;int&lt;/span&gt;&amp;gt;(&lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt;[] { 2, 3, 5, 7, 11, 13, 17 });&lt;br /&gt;            Console.WriteLine(primes.AsDelimited(&lt;span class="str"&gt;" , "&lt;/span&gt;));&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-8207415434182274698?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/8207415434182274698/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=8207415434182274698' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/8207415434182274698'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/8207415434182274698'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/05/c-extension-method-for-generic.html' title='C# Extension Method for Generic Collections'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-2548297086688288316</id><published>2008-04-24T22:06:00.001-07:00</published><updated>2008-04-24T22:06:37.139-07:00</updated><title type='text'>Twy</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt; &lt;p&gt;I'm still trying different things with &lt;a href="http://www.t3rse.com/twining"&gt;Twining&lt;/a&gt;.&amp;nbsp; I'd thought about writing some "front end" type experience for usage but it really crystallized as a need when I showed it to a person I know and there seemed to be a disconnect in how it could be used.&amp;nbsp; For me it's natural to set my path environment variable, launch favorite text editor X and then run things from the command line or a script, but it's a nuisance if you're used to a one stop shop for being able to use some tool.&amp;nbsp; And as much as I want language as the focal point in the word "tool" there is something practical in the notion of something you download and click a button to execute with.&lt;/p&gt; &lt;p&gt;Enter Twy, which I pieced together after looking at a few samples of a hosted DLR engine in a Windows Forms app.&amp;nbsp; Now one need not figure out how to install or configure anything, or worry about creating and disposing of script files.&lt;/p&gt; &lt;p&gt;&lt;img src="http://www.seruyange.com/metadeveloper/Twy.jpg"&gt; &lt;/p&gt; &lt;p&gt;If you want to write something that hosts the DLR engine, take a look first at &lt;a href="http://www.voidspace.org.uk/ironpython/dlr_hosting.shtml"&gt;these samples&lt;/a&gt; on Voidspace.&amp;nbsp; There are other samples online if you hunt and peck but be aware that things have changed between the various releases of IronPython.&amp;nbsp; A few gotchas for me: &lt;/p&gt; &lt;p&gt;1. Redirecting standard output: &lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;// where engine references the ScriptEngine type&lt;br&gt;&lt;/span&gt;&lt;span class="rem"&gt;// and ms references a Stream of some sort&lt;/span&gt;&lt;br /&gt;engine.Runtime.IO.SetErrorOutput(ms, Encoding.UTF8);&lt;br /&gt;engine.Runtime.IO.SetOutput(ms, Encoding.UTF8);&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Many examples of this are deprecated for the IronPython 2.x beta&lt;br /&gt;&lt;p&gt;2. Referencing classes in mscorlib:&lt;br /&gt;&lt;p&gt;Be aware that doing the following:&lt;pre class="csharpcode"&gt;import clr&lt;br /&gt;clr.AddReference(&lt;span class="str"&gt;"System"&lt;/span&gt;)&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;is not going to be enough to get types out of mscorlib.&amp;nbsp; Although types will load from System, you'll need to get a reference to the assembly directly if you plan to use it in your hosted engine.&amp;nbsp; I had a little trouble with the StringBuilder but easily resolved it with the following after a tip on the IronPython mailing list.&lt;pre class="csharpcode"&gt;Assembly assem = Assembly.GetAssembly(Type.GetType(&lt;span class="str"&gt;"System.Text.StringBuilder"&lt;/span&gt;));&lt;br /&gt;scope = engine.CreateScope();&lt;br /&gt;engine.Runtime.LoadAssembly(assem);&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;3. The only novel thing I did that I didn't see a lot of was loading a module so that you could utilize it with your hosted engine.&amp;nbsp; I added Twining.py to the project and set Visual Studio to copy it to the compile destination.&amp;nbsp; I then have the following code which keeps the module available for later use: &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;string&lt;/span&gt; p = Path.Combine(Environment.CurrentDirectory, &lt;span class="str"&gt;"Twining.py"&lt;/span&gt;);&lt;br /&gt;scope = engine.Runtime.ExecuteFile(p); &lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;// later on:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;ScriptSource source =&lt;br /&gt;    engine.CreateScriptSourceFromString(input,&lt;br /&gt;        SourceCodeKind.Statements);&lt;br /&gt;&lt;span class="kwrd"&gt;object&lt;/span&gt; res = source.Execute(scope);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;All in all not rocket science, it's amazing how much power one has at their fingertips in such a small application.&amp;nbsp; I would love to see other modules, especially ones that define some interesting type of DSL, have utilities like this that let you play around without much effort.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Oh yeah, the project and source.&amp;nbsp; &lt;a href="http://www.t3rse.com/twining/Twy.zip"&gt;Download it here&lt;/a&gt;, I'll clean up a bit more later.&lt;/p&gt;&lt;br /&gt;&lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-2548297086688288316?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/2548297086688288316/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=2548297086688288316' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/2548297086688288316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/2548297086688288316'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/04/twy.html' title='Twy'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-33527180579805674</id><published>2008-04-20T21:06:00.001-07:00</published><updated>2008-04-20T21:06:14.579-07:00</updated><title type='text'>Getting better with meta-thinking</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt; &lt;p&gt;Some excerpts from &lt;a href="http://ola-bini.blogspot.com/2008/03/meta-level-thinking.html"&gt;a great post&lt;/a&gt; from Ola Bini, one of the JRuby core developers: &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;In short, I believe that being able to abstract and understand what goes on in a programming language is one way to become more proficient in that language, but not only that - by changing your thinking to see this part of your environment you generally end up programming differently in all languages...&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;A little further on, emphasis is mine: &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;... I call this meta-level thinking. I think it's &lt;strong&gt;mostly a learned ability&lt;/strong&gt;, but also that there is an aptitude component.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Cheers for this as a "learned ability" which would give one pretentious enough to call his blog "Metadeveloper" some hope.&lt;/p&gt; &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-33527180579805674?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/33527180579805674/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=33527180579805674' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/33527180579805674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/33527180579805674'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/04/getting-better-with-meta-thinking.html' title='Getting better with meta-thinking'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-641424943511973519</id><published>2008-04-19T08:37:00.001-07:00</published><updated>2008-04-19T08:37:17.370-07:00</updated><title type='text'>Generic Enum Parsing in C#</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt; &lt;p&gt;Generics, as it were, are passe to talk about these days. However, I found myself dealing with enumerations on Friday and was a little surprised there wasn't an approach to parsing these out in a more generic fashion. I scribbled the following, perhaps it will be of value to someone:&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;enum&lt;/span&gt; Test { &lt;br /&gt;    v1, &lt;br /&gt;    v2,&lt;br /&gt;    v3   &lt;br /&gt;}&lt;/pre&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; T EnumParser&amp;lt;T&amp;gt;(&lt;span class="kwrd"&gt;string&lt;/span&gt; givenValue)&lt;br /&gt;{&lt;br /&gt;    &lt;span class="kwrd"&gt;return&lt;/span&gt; (T)Enum.Parse(&lt;span class="kwrd"&gt;typeof&lt;/span&gt;(T), givenValue, &lt;span class="kwrd"&gt;true&lt;/span&gt;);&lt;br /&gt;}&lt;/pre&gt;&lt;pre class="csharpcode"&gt;//usage:&lt;br&gt;Test val = EnumParser&amp;lt;Test&amp;gt;("v1");&lt;/pre&gt;&lt;br /&gt;&lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-641424943511973519?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/641424943511973519/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=641424943511973519' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/641424943511973519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/641424943511973519'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/04/generic-enum-parsing-in-c.html' title='Generic Enum Parsing in C#'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-7303035408751336267</id><published>2008-04-15T22:15:00.001-07:00</published><updated>2008-04-15T22:15:54.023-07:00</updated><title type='text'>Sense of urgency</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt; &lt;blockquote&gt; &lt;p&gt;One thing I’ve come to realize is that urgency is overrated. In fact, I’ve come to believe urgency is poisonous. Urgency may get things done a few days sooner, but what does it cost in morale? Few things burn morale like urgency. Urgency is acidic.&lt;br&gt;- read &lt;a href="http://www.37signals.com/svn/posts/966-urgency-is-poisonous"&gt;the whole post&lt;/a&gt; &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Jason Fried of 37Signals neglects to mention one aspect that seems to come back over and over to haunt those of us who live with "urgency"; that it costs dearly to rework things that were done in a hurry.&lt;/p&gt; &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-7303035408751336267?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/7303035408751336267/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=7303035408751336267' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/7303035408751336267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/7303035408751336267'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/04/sense-of-urgency.html' title='Sense of urgency'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-6264910295580922403</id><published>2008-04-15T22:10:00.001-07:00</published><updated>2008-04-15T22:10:18.229-07:00</updated><title type='text'>From TFS to SVN</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt; &lt;p&gt;My project at work added some remote developers and it was decided that rather than try to figure out TFS, which we use for everything internally, we'd use SVN. I'm not used to SVN since we used Team Foundation Server for source control and Visual SourceSafe before that - I've used &lt;a href="http://tortoisesvn.tigris.org/"&gt;TortoiseSVN&lt;/a&gt; quite a bit to get source code from projects online, but never as a primary source control environment for a big project.&lt;/p&gt; &lt;p&gt;So far it's a breeze. I installed &lt;a href="http://www.visualsvn.com/"&gt;VisualSVN Server&lt;/a&gt; and configured repositories and users - this took about 10 minutes.&amp;nbsp; After that I was up and running with TortoiseSVN in about 3 or 4 minutes.&lt;/p&gt; &lt;p&gt;Hm... &lt;/p&gt; &lt;p&gt;Because in a parallel universe a completely different project I'm working on required me to install the TFS client for Visual Studio 2008.&amp;nbsp; On my super duper 4GB Ram, 3 Ghz, desktop machine at work it took about 45 minutes.&lt;/p&gt; &lt;p&gt;Just the client.&lt;/p&gt; &lt;p&gt;So yeah, I've been thinking about that contrast quite a bit all day.&amp;nbsp; One thing I think is interesting is the contrast between small teams as I heard discussed at CodeMash earlier this year and the features of TFS: all the note taking, task assignment, iteration,&amp;nbsp; etc, etc... On a "one to two pizza" team (e.g. a Google, Amazon), how many people go in depth with those features versus some massive team of developers (e.g. a government agency)?&lt;/p&gt; &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-6264910295580922403?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/6264910295580922403/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=6264910295580922403' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/6264910295580922403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/6264910295580922403'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/04/from-tfs-to-svn.html' title='From TFS to SVN'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-260169777404293490</id><published>2008-04-14T21:00:00.001-07:00</published><updated>2008-04-14T21:00:07.317-07:00</updated><title type='text'>Twining</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt; &lt;p&gt;Now has a &lt;a href="http://www.t3rse.com/twining"&gt;its own location&lt;/a&gt;. I'll still post of goings on, but will keep the external site as a source of updates and documentation. There's a form there for feedback as well.&lt;/p&gt; &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-260169777404293490?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/260169777404293490/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=260169777404293490' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/260169777404293490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/260169777404293490'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/04/twining_14.html' title='Twining'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-8507944671739030457</id><published>2008-04-08T22:35:00.001-07:00</published><updated>2008-04-08T22:35:44.514-07:00</updated><title type='text'>From Komodo to Wings</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt; &lt;p&gt;I started my IronPython musings with &lt;a href="http://notepad-plus.sourceforge.net/uk/site.htm"&gt;Notepad++&lt;/a&gt; since it's my usual text editor (after being enamored with &lt;a href="http://textpad.com/"&gt;Textpad&lt;/a&gt; for many years, I moved on - lots of reasons, perhaps I'll blog them later).&amp;nbsp; As time passed and my scripts grew in size I started using an old version of &lt;a href="http://www.activestate.com/Products/komodo_ide/index.mhtml"&gt;Komodo&lt;/a&gt; I've got which has decent support for Python. I used Komodo (3.5) when I was writing a lot of Perl and it worked pretty well for that, especially since it had a good enough debugger and CGI emulator for me to dig myself out of holes.&amp;nbsp; Komodo does &lt;em&gt;okay&lt;/em&gt; with Python but I've been using &lt;a href="http://www.wingware.com/wingide-personal/index"&gt;Wings IDE&lt;/a&gt; on recommendation from &lt;a href="http://www.voidspace.org.uk/python/weblog/index.shtml"&gt;fuzzyman&lt;/a&gt; and it's much more responsive and fluid as a development environment.&amp;nbsp; Additionally, I got Komodo when there was still a cheapo version but now it's quite expensive - exceeding the Wife Acceptance Factor for experiments (WAFe).&amp;nbsp; Wings is quite reasonable, I'll start with the Personal edition and if I can get my company onboard I'll ask that they upgrade my license.&lt;/p&gt; &lt;p&gt;Unfortunately I still need to run my scripts outside the IDE environs since Wings isn't built with IronPython support (correct me if I'm wrong), but I'm quite used to this now.&amp;nbsp; &lt;/p&gt; &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-8507944671739030457?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/8507944671739030457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=8507944671739030457' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/8507944671739030457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/8507944671739030457'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/04/from-komodo-to-wings.html' title='From Komodo to Wings'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-5125889115978479968</id><published>2008-04-07T21:54:00.001-07:00</published><updated>2008-04-07T21:54:40.583-07:00</updated><title type='text'>Programming Languages, Trends</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt; &lt;p&gt;&lt;a href="http://www.ddj.com/"&gt;DDJ&lt;/a&gt; (the print edition at least) has an interesting interview with Paul Jansen, managing director of &lt;a href="http://www.tiobe.com/index.php/content/company/Home.html"&gt;TIOBE&lt;/a&gt; on languages. Some interesting points:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Direct quote: "I expect in five years time there will be two main languages: Java and C#, followed closely by good old Visual Basic."&lt;/li&gt; &lt;li&gt;While not much has changed over the last 10 years, COBOL is now out of the top 10 list and Python is moving in. &lt;/li&gt; &lt;li&gt;Direct quote: "Another langauge that has had its day is Perl. It was once the standard language for every system administrator and build manager, but now everyone has been waiting on a new major release for more than seven years. That is considered too long."&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Interestingly enough, TIOBE has picked &lt;a href="http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html"&gt;the language of the year&lt;/a&gt; to be Python. &lt;/p&gt; &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-5125889115978479968?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/5125889115978479968/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=5125889115978479968' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/5125889115978479968'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/5125889115978479968'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/04/programming-languages-trends.html' title='Programming Languages, Trends'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-2290660207606175482</id><published>2008-04-06T19:35:00.001-07:00</published><updated>2008-04-06T19:35:48.950-07:00</updated><title type='text'>Reddit for Javascript</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt; &lt;p&gt;Via &lt;a href="http://weblog.raganwald.com/2008/04/javascript-at-redditcom.html"&gt;Raganwald&lt;/a&gt;, there's now a &lt;a href="http://reddit.com/r/javascript/"&gt;Reddit for JavaScript&lt;/a&gt;.&lt;/p&gt; &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-2290660207606175482?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/2290660207606175482/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=2290660207606175482' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/2290660207606175482'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/2290660207606175482'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/04/reddit-for-javascript.html' title='Reddit for Javascript'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-4810792330266469867</id><published>2008-04-02T22:15:00.001-07:00</published><updated>2008-04-02T22:19:21.330-07:00</updated><title type='text'>Generate Catalog Images in IronPython</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt; &lt;p&gt;What if you had a client who has a big product catalog you're integrating with the web.&amp;nbsp; You work out a convention for how data is displayed and want to generate some test images for yourself... &lt;/p&gt; &lt;p&gt;First, just some basics on generating a single image:&lt;/p&gt;&lt;pre class="csharpcode"&gt;import clr&lt;br /&gt;clr.AddReference(&lt;span class="str"&gt;"System.Drawing"&lt;/span&gt;)&lt;br /&gt;from System import *&lt;br /&gt;from System.Drawing import *&lt;br /&gt;&lt;br /&gt;def GenerateImage(text):&lt;br /&gt;    starter = Bitmap(1,1)&lt;br /&gt;    g = Graphics.FromImage(starter)&lt;br /&gt;    f = Font(&lt;span class="str"&gt;"Arial"&lt;/span&gt;, 14) &lt;br /&gt;    theImage = Bitmap(starter, Size(200,200))&lt;br /&gt;    g = Graphics.FromImage(theImage)&lt;br /&gt;    g.Clear(Color.Orange)&lt;br /&gt;    g.DrawString(text, f, SolidBrush(Color.DarkBlue), 0, 0)&lt;br /&gt;    g.Flush()&lt;br /&gt;    theImage.Save(&lt;span class="str"&gt;"c:\\temp\\pyImage.gif"&lt;/span&gt;)    &lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;if&lt;/span&gt; __name__ == &lt;span class="str"&gt;"__main__"&lt;/span&gt;:&lt;br /&gt;    GenerateImage(&lt;span class="str"&gt;"Holly was a hunter"&lt;/span&gt;)&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Here's some TSQL for the sample data I'll use: &lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;create&lt;/span&gt; &lt;span class="kwrd"&gt;table&lt;/span&gt; testdata(&lt;br /&gt;    testid &lt;span class="kwrd"&gt;int&lt;/span&gt; &lt;span class="kwrd"&gt;identity&lt;/span&gt;(1,1), &lt;br /&gt;    testvalue &lt;span class="kwrd"&gt;varchar&lt;/span&gt;(50)&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;declare&lt;/span&gt; @i &lt;span class="kwrd"&gt;int&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;set&lt;/span&gt; @i = 0&lt;br /&gt;&lt;span class="kwrd"&gt;while&lt;/span&gt; @i &amp;lt; 25 &lt;span class="kwrd"&gt;begin&lt;/span&gt;&lt;br /&gt;    insert &lt;span class="kwrd"&gt;into&lt;/span&gt; testdata(testvalue)&lt;br /&gt;        &lt;span class="kwrd"&gt;values&lt;/span&gt;(&lt;span class="str"&gt;'PRODUCT '&lt;/span&gt; + &lt;span class="kwrd"&gt;convert&lt;/span&gt;(&lt;span class="kwrd"&gt;varchar&lt;/span&gt;(2), @i))&lt;br /&gt;    &lt;span class="kwrd"&gt;set&lt;/span&gt; @i = @i + 1&lt;br /&gt;end&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Now for a finalized version that hits the database and generates images:&lt;/p&gt;&lt;pre class="csharpcode"&gt;import clr&lt;br /&gt;clr.AddReference(&lt;span class="str"&gt;"System.Drawing"&lt;/span&gt;)&lt;br /&gt;clr.AddReference(&lt;span class="str"&gt;"System.Data"&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;from System import *&lt;br /&gt;from System.Drawing import *&lt;br /&gt;from System.Data import *&lt;br /&gt;from System.Data.SqlClient import *&lt;br /&gt;&lt;br /&gt;def GenerateImage(text, path):&lt;br /&gt;    starter = Bitmap(1,1)&lt;br /&gt;    g = Graphics.FromImage(starter)&lt;br /&gt;    f = Font(&lt;span class="str"&gt;"Arial"&lt;/span&gt;, 14) &lt;br /&gt;    theImage = Bitmap(starter, Size(200,200))&lt;br /&gt;    g = Graphics.FromImage(theImage)&lt;br /&gt;    g.Clear(Color.Orange)&lt;br /&gt;    g.DrawString(text, f, SolidBrush(Color.DarkBlue), 0, 0)&lt;br /&gt;    g.Flush()&lt;br /&gt;    theImage.Save(path)&lt;br /&gt;    &lt;br /&gt;def GenerateImagesFromDatabase(connectString, query, sourceColumn, outPath):&lt;br /&gt;    cn = SqlConnection(connectString)&lt;br /&gt;    cn.Open()&lt;br /&gt;    cmd = SqlCommand(query, cn)&lt;br /&gt;    r = cmd.ExecuteReader(CommandBehavior.CloseConnection)&lt;br /&gt;    &lt;span class="kwrd"&gt;while&lt;/span&gt; r.Read():&lt;br /&gt;        baseText = r[sourceColumn].ToString()&lt;br /&gt;        GenerateImage(baseText, outPath + &lt;span class="str"&gt;"\\" + baseText + "&lt;/span&gt;.gif&lt;span class="str"&gt;")&lt;br /&gt;    r.Close()&lt;br /&gt;&lt;br /&gt;if __name__ == "&lt;/span&gt;__main__&lt;span class="str"&gt;":&lt;br /&gt;    connect = "&lt;/span&gt;Data Source=.\\sqlexpress;Initial Catalog=MVCBaby;Integrated Security=SSPI;&lt;span class="str"&gt;"&lt;br /&gt;    sql = "&lt;/span&gt;select * from testdata&lt;span class="str"&gt;"&lt;br /&gt;    col = "&lt;/span&gt;testvalue&lt;span class="str"&gt;"&lt;br /&gt;    GenerateImagesFromDatabase(connect, sql, col, "&lt;/span&gt;c:\\temp\\fobot")&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://www.seruyange.com/metadeveloper/generatedimages.jpg"&gt; &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Pretty cool stuff, I hope it's useful to more people than just myself.&amp;nbsp; Download the first script &lt;a href="http://www.seruyange.com/metadeveloper/GenerateCatalog.py.txt"&gt;here&lt;/a&gt;, the second more elaborate one &lt;a href="http://www.seruyange.com/metadeveloper/GenerateCatalogv2.py.txt"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-4810792330266469867?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/4810792330266469867/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=4810792330266469867' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4810792330266469867'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4810792330266469867'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/04/generate-catalog-images-in-ironpython.html' title='Generate Catalog Images in IronPython'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-1798861405499885495</id><published>2008-04-01T22:02:00.001-07:00</published><updated>2008-04-01T22:23:37.377-07:00</updated><title type='text'>Twining</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt; &lt;p&gt;I've been quiet but still working on &lt;a href="http://www.t3rse.com/twining"&gt;Twining&lt;/a&gt;.&amp;nbsp; Unfortunately lots of distractions at work have slowed me down. Most of what I've done of late is adding unit tests for the functionality that already exists.&amp;nbsp; I twittered that adding unit tests &lt;em&gt;a posteriori&lt;/em&gt; is not fun and tends to have the effect of one simply verifying what they've done with pasted code.&amp;nbsp;&amp;nbsp; Now that most of that is done I'd like to add a few things: &lt;/p&gt; &lt;p&gt;1. Operating on queries like tables for export and copy.&amp;nbsp; Everywhere that you see "table" below, I'd like to have "query":&lt;br&gt;&lt;/p&gt;&lt;pre class="csharpcode"&gt;database(cn).table(&lt;span class="str"&gt;"MyTable"&lt;/span&gt;).transform(mytrans).copyto.database(cn2)&lt;br /&gt;database(cn).table(&lt;span class="str"&gt;"MyTable"&lt;/span&gt;).transform(mytrans).copyto.xmlFieldsAsAttributes(&lt;span class="str"&gt;"c:\\here.xml"&lt;/span&gt;)&lt;br /&gt;database(cn).table(&lt;span class="str"&gt;"MyTable"&lt;/span&gt;).transform(mytrans).copyto.xmlFieldsAsElements(&lt;span class="str"&gt;"c:\\there.xml"&lt;/span&gt;)&lt;br /&gt;database(cn).table(&lt;span class="str"&gt;"MyTable"&lt;/span&gt;).transform(mytrans).copyto.delimited(&lt;span class="str"&gt;"\t"&lt;/span&gt;, &lt;span class="str"&gt;"c:\\foaf.tsv"&lt;/span&gt;)&lt;br /&gt;database(cn).table(&lt;span class="str"&gt;"MyTable"&lt;/span&gt;).copyto.delimited(&lt;span class="str"&gt;"\t"&lt;/span&gt;, &lt;span class="str"&gt;"c:\\foaf_no_trans.tsv"&lt;/span&gt;)&lt;br /&gt;database(cn).table(&lt;span class="str"&gt;"MyTable"&lt;/span&gt;).transform(mytrans).copyto.csv(&lt;span class="str"&gt;"c:\\foo.csv"&lt;/span&gt;)&lt;br /&gt;database(cn).table(&lt;span class="str"&gt;"MyTable"&lt;/span&gt;).copyto.xmlFieldsAsAttributes(&lt;span class="str"&gt;"c:\\here.xml"&lt;/span&gt;)&lt;br /&gt;database(cn).table(&lt;span class="str"&gt;"MyTable"&lt;/span&gt;).copyto.xmlFieldsAsElements(&lt;span class="str"&gt;"c:\\there.xml"&lt;/span&gt;)&lt;/pre&gt;&lt;pre class="csharpcode"&gt;how about: &lt;/pre&gt;&lt;pre class="csharpcode"&gt;database(cn).query(&lt;span class="str"&gt;"select this, that, [the other] from foo"&lt;/span&gt;).copyto.csv(&lt;span class="str"&gt;"c:\\querydata.csv"&lt;/span&gt;)&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font color="#0000ff"&gt;&lt;font color="#000000"&gt;2. Support for SqlBulkCopy - as far as I know this is only available between Sql Servers (or, more specifically SqlConnection instances).&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;3. Cloning of tables - if you use sql server, this is quite simple with the following TSQL:&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; * &lt;span class="kwrd"&gt;INTO&lt;/span&gt; MYCOPYTABLE &lt;span class="kwrd"&gt;FROM&lt;/span&gt; MYORIGINALTABLE &lt;span class="kwrd"&gt;WHERE&lt;/span&gt; 1 = 2&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;4. Database "ping" - just a simple way to test connection strings.&lt;/p&gt;&lt;pre class="csharpcode"&gt;cn = &lt;span class="str"&gt;"my connection string"&lt;/span&gt;&lt;br /&gt;database(cn).ping() &lt;/pre&gt;&lt;br /&gt;&lt;p&gt;5. Inspired by ConfigObj I'm wondering what a JSON like table definition would look like. In ConfigObj, you can define things like: &lt;/p&gt;&lt;pre class="csharpcode"&gt;section2 = {&lt;br /&gt;    &lt;span class="str"&gt;'keyword5'&lt;/span&gt;: &lt;span class="str"&gt;'value5'&lt;/span&gt;,&lt;br /&gt;    &lt;span class="str"&gt;'keyword6'&lt;/span&gt;: &lt;span class="str"&gt;'value6'&lt;/span&gt;,&lt;br /&gt;    &lt;span class="str"&gt;'sub-section'&lt;/span&gt;: {&lt;br /&gt;        &lt;span class="str"&gt;'keyword7'&lt;/span&gt;: &lt;span class="str"&gt;'value7'&lt;/span&gt;&lt;br /&gt;        }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;I wonder if one could have the following for a table: &lt;/p&gt;&lt;pre class="csharpcode"&gt;tableDef = {&lt;br /&gt;    &lt;span class="str"&gt;'personid'&lt;/span&gt;: {&lt;br /&gt;        &lt;span class="str"&gt;'datatype'&lt;/span&gt;:&lt;span class="str"&gt;'int'&lt;/span&gt;,&lt;br /&gt;        &lt;span class="str"&gt;'identity'&lt;/span&gt;:&lt;span class="str"&gt;'true'&lt;/span&gt;,&lt;br /&gt;        &lt;span class="str"&gt;'seed'&lt;/span&gt;:1        &lt;br /&gt;    },&lt;br /&gt;    &lt;span class="str"&gt;'firstname'&lt;/span&gt;:[&lt;span class="str"&gt;'varchar'&lt;/span&gt;,50, &lt;span class="str"&gt;'null'&lt;/span&gt;]&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;Just something to gnaw on... &lt;br /&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I'll hopefully get a chance to work on this stuff soon. &lt;/p&gt;&lt;br /&gt;&lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-1798861405499885495?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/1798861405499885495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=1798861405499885495' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/1798861405499885495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/1798861405499885495'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/04/twining.html' title='Twining'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-4096073857516581974</id><published>2008-03-29T22:13:00.001-07:00</published><updated>2008-03-29T22:13:40.260-07:00</updated><title type='text'>Data Access Strategy</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt; &lt;p&gt;What data access strategy do you use in your .NET work? The question has been on the mind of Scott Hanselman it seems because the &lt;a href="http://hanselminutes.com/default.aspx?showID=120"&gt;last&lt;/a&gt; &lt;a href="http://hanselminutes.com/default.aspx?showID=123"&gt;few&lt;/a&gt; podcasts have covered two different strategies - LINQ and CLSA.&amp;nbsp; Tonight I noticed that &lt;a href="http://adoguy.com/2008/03/21/Data_Access_Strategies.aspx"&gt;the ADO guy has a poll&lt;/a&gt; of his own with some interesting results: &lt;/p&gt; &lt;p&gt;&lt;embed src="http://www.micropoll.com/images/fusionchart/Bar2D.swf" width="450" height="300" type="application/x-shockwave-flash" allowscriptaccess="always" flashvars="debugMode=0&amp;amp;dataURL=http://www.micropoll.com/akira/MicroPollChartData?id=78031" wmode="transparent"&gt;&lt;/embed&gt;&lt;/p&gt; &lt;div style="width: 450px" align="right"&gt;&lt;a href="http://www.micropoll.com"&gt;Web Poll&lt;/a&gt; Powered By &lt;a href="http://www.micropoll.com"&gt;MicroPoll&lt;/a&gt;&lt;/div&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;I will admit that I'm pretty consistently using ADO.NET + Datasets but more so because the project I'm working on was well under way before the release of VS 2008. I wonder of those responding how many are working on new versus older, longer projects? &lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-4096073857516581974?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/4096073857516581974/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=4096073857516581974' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4096073857516581974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/4096073857516581974'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/03/data-access-strategy.html' title='Data Access Strategy'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-7158374089172761195</id><published>2008-03-26T22:32:00.001-07:00</published><updated>2008-03-26T22:32:14.726-07:00</updated><title type='text'>In Defense Of Lurkers</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt; &lt;p&gt;Hanselman's &lt;a href="http://www.hanselman.com/blog/7BloggingStatisticsRulesThereIsLifeAfterPageViews.aspx"&gt;7 Blogging Statistics Rules...&lt;/a&gt; post was good medicine for a haphazard blogger like me. There was one portion to which I had &lt;em&gt;comment&lt;/em&gt;: &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;I feel like we've (that means me and you, Dear Reader) have a little community here. When you comment, I am happy because I feel more connected to the conversation as this blog is my 3rd place. I blog to be social, not to have a soapbox. I'm even happier when the comments are better and more substantive than the post itself. I would take half the traffic and twice the comments any day. If you're a "lurker," why not join the conversation?&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;I've spent most of my time on the web lurking.&amp;nbsp; It started with &lt;a href="http://music.hyperreal.org/lists/idm/"&gt;a mailing list&lt;/a&gt; for people who like electronic music ("IDM") I joined while in college - in the 10 years it's been I've probably posted less than 20 messages.&amp;nbsp; But I have spent a lot of time as a curator for posts I've enjoyed as well as making notes of what music I would investigate the next time I was in a record store.&amp;nbsp; &lt;/p&gt; &lt;p&gt;In a similar fashion I tend to hang onto posts I enjoy and go back to them.&amp;nbsp; To out myself further as a geek I even print out the ones I'd like to focus on so that I can read them offline at a coffee house or bookstore. I file them away and when I do my occasional cleaning it's hard not to smile and pause to re-read something that was good on the first effort. It's hard to measure us lurkers because we don't vocalize our responses right away and when we do finally get them the post may have tens or hundreds of comments at which point all seems moot.&amp;nbsp; But I think as a lurker I can be a better blog consumer in the sense that I hang onto what's said a little more - it's not just a random post I skimmed in the aggregator.&amp;nbsp; &lt;/p&gt; &lt;p&gt;Forgive the lurker as they make sputtering or failed attempts at immediate conversation, but maybe that conversation will be like the one you have with a great dead tree publication being read and reread. &lt;/p&gt; &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-7158374089172761195?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/7158374089172761195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=7158374089172761195' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/7158374089172761195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/7158374089172761195'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/03/in-defense-of-lurkers.html' title='In Defense Of Lurkers'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-6769901910170592024</id><published>2008-03-26T22:05:00.001-07:00</published><updated>2008-03-26T22:05:32.705-07:00</updated><title type='text'>simplejson</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt; &lt;p&gt;&lt;a href="http://undefined.org/python/#simplejson"&gt;simplejson&lt;/a&gt; is a JSON library for Python 2.3+, courtesy of &lt;a href="http://bob.pythonmac.org/archives/2008/03/24/simplejson-181/"&gt;here&lt;/a&gt;.&amp;nbsp; A while back &lt;a href="http://metadeveloper.blogspot.com/2007/11/web-shell-prototype-ironpython.html"&gt;I goofed off&lt;/a&gt; with IronPython and &lt;a href="http://www.prototypejs.org/"&gt;Prototype&lt;/a&gt; writing a web based "shell" inerface.&amp;nbsp; I may have to return to that project although my problem wasn't really with encoding, it was with keeping context while using multiple commands (like cd .. and then dir with the new directory as your location) in a session with cmd.exe. I've been meaning to write &lt;a href="http://huddledmasses.org/tag/poshconsole"&gt;the PoshConsole guy&lt;/a&gt; to ask specifically about this...&lt;/p&gt; &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-6769901910170592024?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/6769901910170592024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=6769901910170592024' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/6769901910170592024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/6769901910170592024'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/03/simplejson.html' title='simplejson'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-379364589381110342</id><published>2008-03-26T21:58:00.001-07:00</published><updated>2008-03-26T21:58:06.883-07:00</updated><title type='text'>Chris Wilson interviewed on Pixel8</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt; &lt;p&gt;The interview is &lt;a href="http://pixel8.infragistics.com/Default.aspx#Episode:8773"&gt;here&lt;/a&gt;, it's good stuff. Imagine a half billion users. That's a humbling thought... &lt;/p&gt; &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-379364589381110342?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/379364589381110342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=379364589381110342' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/379364589381110342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/379364589381110342'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/03/chris-wilson-interviewed-on-pixel8.html' title='Chris Wilson interviewed on Pixel8'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10946087.post-8695864976320991174</id><published>2008-03-25T22:39:00.001-07:00</published><updated>2008-03-25T22:39:33.450-07:00</updated><title type='text'>Jeff Zeldman, Pixel8 Interview</title><content type='html'>&lt;h1&gt;&lt;font color="#0000ff"&gt;{&lt;/font&gt;&lt;/h1&gt; &lt;p&gt;Joel's got a big enough voice that I'm sure most people didn't miss his Martian Headphones essay which explained the futility of standards.&amp;nbsp; Jeff Zeldman, who I've always been aware of in my time lurking on the web &lt;a href="http://pixel8.infragistics.com/Default.aspx#Episode:8691"&gt;chimes in&lt;/a&gt; on web standards on Craig Shoemaker's new gig, "&lt;a href="http://pixel8.infragistics.com/Default.aspx"&gt;Pixel 8&lt;/a&gt;."&amp;nbsp; The podcast sound is very rough but it's a good context builder for the notion of standards and what they mean.&amp;nbsp; If you've ever had to wrangle with a different look in different browsers, you appreciate standards even if they are complicated and never achieve perfection.&lt;/p&gt; &lt;p&gt;Just noticed that Pixel8 has a podcast with Chris Wilson. That will have to wait until tomorrow - &lt;/p&gt; &lt;h1&gt;&lt;font color="#0000ff"&gt;}&lt;/font&gt;&lt;/h1&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10946087-8695864976320991174?l=metadeveloper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://metadeveloper.blogspot.com/feeds/8695864976320991174/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10946087&amp;postID=8695864976320991174' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/8695864976320991174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10946087/posts/default/8695864976320991174'/><link rel='alternate' type='text/html' href='http://metadeveloper.blogspot.com/2008/03/jeff-zeldman-pixel8-interview.html' title='Jeff Zeldman, Pixel8 Interview'/><author><name>David Seruyange</name><uri>http://www.blogger.com/profile/02586023781945095350</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-XsAqmfW5lNA/TfiahSiF0sI/AAAAAAAABIw/MP8PpyGQexY/s220/Afronaut.jpg'/></author><thr:total>0</thr:total></entry></feed>
