<?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-8677228911601092823</id><updated>2011-11-08T11:07:15.924+01:00</updated><category term='C#'/><category term='pair programming'/><category term='design'/><category term='Visual Studio'/><category term='XSL-FO'/><category term='F#'/><category term='ActiveReports'/><category term='Oracle'/><category term='Infragistics'/><category term='ASP.NET'/><category term='prolog'/><category term='data binding'/><title type='text'>_St</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>36</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-2772926518778690591</id><published>2011-11-08T10:59:00.000+01:00</published><updated>2011-11-08T11:07:15.963+01:00</updated><title type='text'>Dynamic Positioning of Overlay</title><content type='html'>&lt;p&gt;&lt;a href="http://flowplayer.org/tools/overlay/index.html"&gt;jQuery Tools Overlay&lt;/a&gt; can be positioned statically when used out of the box, by setting &lt;code&gt;top&lt;/code&gt; and &lt;code&gt;left&lt;/code&gt; properties.&lt;/p&gt;&lt;p&gt;The good news is that the configuration can be overwritten in &lt;code&gt;onBeforeLoad&lt;/code&gt; event handler. This is how an overlay can be positioned next to its trigger:&lt;/p&gt;&lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;jQuery('.overlayTrigger').overlay({&lt;br /&gt;   ...&lt;br /&gt;&lt;br /&gt;   onBeforeLoad: function() {&lt;br /&gt;      var overlay = this.getOverlay();&lt;br /&gt;      var trigger = this.getTrigger();&lt;br /&gt;      var overlayConfig = this.getConf();&lt;br /&gt;&lt;br /&gt;      //position overlay&lt;br /&gt;      overlayConfig.top = trigger.offset().top &lt;br /&gt;            - overlay.outerHeight() &lt;br /&gt;            - jQuery(document).scrollTop();&lt;br /&gt;      overlayConfig.left = trigger.offset().left &lt;br /&gt;            - overlay.outerWidth() &lt;br /&gt;            - jQuery(document).scrollLeft();&lt;br /&gt;&lt;br /&gt;      //... flip popup over when appropriate&lt;br /&gt;      if (overlayConfig.top &lt; 0)&lt;br /&gt;          overlayConfig.top = trigger.offset().top &lt;br /&gt;                + trigger.outerHeight() &lt;br /&gt;                - jQuery(document).scrollTop();&lt;br /&gt;      if (overlayConfig.left &lt; 0)&lt;br /&gt;          overlayConfig.left = trigger.offset().left &lt;br /&gt;                + trigger.outerWidth() &lt;br /&gt;                - jQuery(document).scrollLeft();&lt;br /&gt;   }&lt;br /&gt;});&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-2772926518778690591?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/2772926518778690591/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=2772926518778690591' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/2772926518778690591'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/2772926518778690591'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2011/11/dynamic-positioning-of-overlay.html' title='Dynamic Positioning of Overlay'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-8513790775553694783</id><published>2011-11-08T10:19:00.000+01:00</published><updated>2011-11-08T10:19:21.803+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><title type='text'>Rendering of HyperLink</title><content type='html'>&lt;p&gt;I have been using &lt;a href="http://msdn.microsoft.com/en-us/library/seey0yt3.aspx"&gt;&lt;code&gt;HyperLink&lt;/code&gt;&lt;/a&gt; control recently and have found its MSDN documentation incomplete.&lt;/p&gt;&lt;blockquote cite="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.hyperlink.text.aspx"&gt;&lt;p&gt;The HyperLink control can be displayed as text or an image. Use the Text property to specify the text to display for the HyperLink control.&lt;/p&gt;&lt;p&gt;If both the Text and ImageUrl properties are set, the ImageUrl property takes precedence. If the image is unavailable, the text in the Text property is displayed. In browsers that support ToolTip functionality, the Text property also becomes the ToolTip.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;I needed to insert some other controls into the child &lt;code&gt;Controls&lt;/code&gt; of &lt;code&gt;HyperLink&lt;/code&gt; and that is what is not covered in MSDN.&lt;/p&gt;&lt;p&gt;There are actually three mutually exclusive branches in rendering of &lt;code&gt;HyperLink&lt;/code&gt;.&lt;ol&gt;&lt;li&gt;If &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.hyperlink.imageurl.aspx"&gt;&lt;code&gt;ImageUrl&lt;/code&gt;&lt;/a&gt; is set, an &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.image.aspx"&gt;&lt;code&gt;Image&lt;/code&gt;&lt;/a&gt; is rendered (&lt;code&gt;Text&lt;/code&gt; property possibly used for an alternate text),&lt;/li&gt;&lt;li&gt;children &lt;code&gt;Controls&lt;/code&gt; are rendered when available, &lt;em&gt;(there is presumably more to it, but I have not analyzed it further,)&lt;/em&gt;&lt;/li&gt;&lt;li&gt;and finally plain &lt;code&gt;Text&lt;/code&gt; is output otherwise.&lt;/li&gt;&lt;/ol&gt;&lt;/p&gt;&lt;p&gt;By the way, &lt;a href="http://wiki.sharpdevelop.net/ILSpy.ashx"&gt;ILSpy&lt;/a&gt; has proved useful in revealing the &lt;code&gt;HyperLink&lt;/code&gt; internals.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-8513790775553694783?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/8513790775553694783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=8513790775553694783' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/8513790775553694783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/8513790775553694783'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2011/11/rendering-of-hyperlink.html' title='Rendering of HyperLink'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-1287071453414569903</id><published>2011-06-14T13:06:00.005+02:00</published><updated>2011-06-15T10:04:11.371+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><title type='text'>Pex and unit testing</title><content type='html'>&lt;p&gt;Everyone says that &lt;a href="http://research.microsoft.com/en-us/projects/pex/"&gt;Pex&lt;/a&gt; generates unit tests. I am not sure if it holds. Pex knows what does your code do, but it definitely does not know what it &lt;em&gt;should&lt;/em&gt; do.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Still I see three situations Pex can be really useful with.&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;It can report you exceptions caused by inputs you have not thought of.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;When your code coverage is lower than you would expect, you may use Pex to see what paths you have not considered.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;When you want to refactor a component that is not covered with unit tests, you can use unit tests generated by Pex to ensure you do not break the original functionality.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-1287071453414569903?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/1287071453414569903/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=1287071453414569903' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/1287071453414569903'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/1287071453414569903'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2011/06/pex-and-unit-testing.html' title='Pex and unit testing'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-1457374837802960442</id><published>2011-04-06T21:51:00.004+02:00</published><updated>2011-04-06T22:19:14.489+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='F#'/><title type='text'>Learning F# with "Pex for fun"</title><content type='html'>&lt;a href="http://research.microsoft.com/"&gt;Microsoft Research&lt;/a&gt; has published &lt;a href="http://pex4fun.com/"&gt;Pex for fun&lt;/a&gt;. It is a puzzle game. The only thing you are initially given is a signature of a function and you have to work out the implementation. There is an "Ask Pex!" button that will provide you some hints about how close you are. Wonderful!&lt;br /&gt;&lt;br /&gt;There are couple of drawbacks though, such as that sometimes you are not given negative answers (inputs for which your implementation does not provide expected outputs), which is not very helpful. The most ugly thing I have found is how &lt;a href="http://pexforfun.com/default.aspx?language=FSharp&amp;sample=ChallengeFactorial"&gt;ChallengeFactorial&lt;/a&gt; puzzle behaves. Even the most stupid implementation (returning 0) is said to exceed the time-limit, thus effectively preventing you from succeeding.&lt;br /&gt;&lt;br /&gt;Nevertheless, I like &lt;a href="http://pex4fun.com/"&gt;Pex for fun&lt;/a&gt; very much! And I find it especially useful when learning F# as it makes you explore the possibilities of the language.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-1457374837802960442?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/1457374837802960442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=1457374837802960442' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/1457374837802960442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/1457374837802960442'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2011/04/learning-f-with-pex-for-fun.html' title='Learning F# with &quot;Pex for fun&quot;'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-7724527810656293102</id><published>2011-01-15T17:22:00.009+01:00</published><updated>2011-03-04T00:40:52.125+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='prolog'/><title type='text'>Sudoku solver in Prolog</title><content type='html'>&lt;p&gt;Noticing sudoku almost everywhere, I thought it might be a good excercise to develop a sudoku solver. I spend a bit of time thinking and remembered that it could go easily in Prolog. So I started playing.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Sudoku has simple rules, every row, every column and every marked block contains numbers 1 to 9, each exactly once. Hence my first idea:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;sudoku(Plan) :-&lt;br /&gt; get_rows( Plan, Rows),       &lt;i&gt;% Plan = Rows,&lt;/i&gt;&lt;br /&gt; get_columns( Plan, Columns), &lt;i&gt;% transpose( Plan, Columns),&lt;/i&gt;&lt;br /&gt; get_blocks( Plan, Blocks),&lt;br /&gt; &lt;i&gt;% every row, every column, every block is actually permutation of 1..9&lt;/i&gt;&lt;br /&gt; maplist( permutation([1,2,3,4,5,6,7,8,9]), Rows),&lt;br /&gt; maplist( permutation([1,2,3,4,5,6,7,8,9]), Columns),&lt;br /&gt; maplist( permutation([1,2,3,4,5,6,7,8,9]), Blocks).&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I am afraid the first idea, did not give any answer in reasonable time. I remembered that in large backtracking you need to &lt;code&gt;fail&lt;/code&gt; as soon as possible. The second attempt&lt;br /&gt;&lt;pre&gt;&lt;code&gt;sudoku(Plan) :-&lt;br /&gt; rows( Plan, []),&lt;br /&gt; &lt;i&gt;% columns are OK thanks to rows predicate&lt;/i&gt;&lt;br /&gt; get_blocks( Plan, Blocks),&lt;br /&gt; maplist( permutation([1,2,3,4,5,6,7,8,9]), Blocks).&lt;br /&gt;&lt;br /&gt;rows( [], _).&lt;br /&gt;rows( [ActualRow|RowsBelow], RowsAbove) :-&lt;br /&gt; &lt;i&gt;% instantiate free variables in the actual row&lt;/i&gt;&lt;br /&gt; permutation( [1,2,3,4,5,6,7,8,9], ActualRow),&lt;br /&gt; &lt;i&gt;% only allow meaningful rows&lt;/i&gt;&lt;br /&gt; maplist( constrain_difs( ActualRow), RowsAbove),&lt;br /&gt; rows( RowsBelow, [ActualRow|RowsAbove]).&lt;br /&gt;&lt;br /&gt;constrain_difs( [], []).&lt;br /&gt;constrain_difs( [X|Xs], [Y|Ys]) :-&lt;br /&gt; X \= Y,&lt;br /&gt; constrain_difs( Xs, Ys).&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;had a great improvement. Immediately after the free variables were instantiated in the &lt;code&gt;ActualRow&lt;/code&gt;, there was a constraint that the &lt;code&gt;ActualRow&lt;/code&gt; had to be different from any &lt;code&gt;RowsAbove&lt;/code&gt; on every column. As an effect, any row that would obviously break the sudoku was rejected soon and resulting columns were following the sudoku rules.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The second version responded in few seconds already.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Notes:&lt;ul&gt;&lt;li&gt;I have been using &lt;a href="http://www.swi-prolog.org/" target="_blank"&gt;SWI-Prolog&lt;/a&gt;.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;While browsing the documentation I discovered another sudoku solver in clpfd library, that limited variables to &lt;code&gt;1..9&lt;/code&gt; domain and then used &lt;code&gt;clpfd:all_distinct&lt;/code&gt; predicate. Elegant and fast.&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;i&gt;Updated on 4 Mar 2011: Format of examples updated.&lt;/i&gt;&lt;/p&gt;&lt;br /&gt;&lt;div style="clear: both;"&gt;&lt;br /&gt;&lt;table cellspacing="0" style="float: left;"&gt;&lt;br /&gt;&lt;caption&gt;A sudoku example&lt;/caption&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="width: 1em; text-align: center; border-top: solid 1px; border-left: solid 1px;"&gt;5&lt;/td&gt;&lt;td style="width: 1em; text-align: center; border-top: solid 1px;"&gt;2&lt;/td&gt;&lt;td style="width: 1em; text-align: center; border-top: solid 1px;"&gt;1&lt;/td&gt;&lt;td style="width: 1em; text-align: center; border-top: solid 1px; border-left: solid 1px;"&gt;3&lt;/td&gt;&lt;td style="width: 1em; text-align: center; border-top: solid 1px;"&gt;7&lt;/td&gt;&lt;td style="width: 1em; text-align: center; border-top: solid 1px;"&gt;9&lt;/td&gt;&lt;td style="width: 1em; text-align: center; border-top: solid 1px; border-left: solid 1px;"&gt;4&lt;/td&gt;&lt;td style="width: 1em; text-align: center; border-top: solid 1px;"&gt;6&lt;/td&gt;&lt;td style="width: 1em; text-align: center; border-top: solid 1px; border-right: solid 1px;"&gt;8&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center; border-left: solid 1px;"&gt;4&lt;/td&gt;&lt;td style="text-align: center"&gt;6&lt;/td&gt;&lt;td style="text-align: center"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="text-align: center; border-left: solid 1px;"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="text-align: center"&gt;1&lt;/td&gt;&lt;td style="text-align: center"&gt;5&lt;/td&gt;&lt;td style="text-align: center; border-left: solid 1px;"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="text-align: center"&gt;7&lt;/td&gt;&lt;td style="text-align: center; border-right: solid 1px;"&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center; border-left: solid 1px;"&gt;3&lt;/td&gt;&lt;td style="text-align: center"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="text-align: center"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="text-align: center; border-left: solid 1px;"&gt;6&lt;/td&gt;&lt;td style="text-align: center"&gt;8&lt;/td&gt;&lt;td style="text-align: center"&gt;4&lt;/td&gt;&lt;td style="text-align: center; border-left: solid 1px;"&gt;2&lt;/td&gt;&lt;td style="text-align: center"&gt;5&lt;/td&gt;&lt;td style="text-align: center; border-right: solid 1px;"&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center; border-top: solid 1px; border-left: solid 1px;"&gt;8&lt;/td&gt;&lt;td style="text-align: center;border-top: solid 1px;"&gt;9&lt;/td&gt;&lt;td style="text-align: center;border-top: solid 1px;"&gt;3&lt;/td&gt;&lt;td style="text-align: center;border-top: solid 1px; border-left: solid 1px;"&gt;5&lt;/td&gt;&lt;td style="text-align: center;border-top: solid 1px;"&gt;2&lt;/td&gt;&lt;td style="text-align: center;border-top: solid 1px;"&gt;6&lt;/td&gt;&lt;td style="text-align: center;border-top: solid 1px; border-left: solid 1px;"&gt;1&lt;/td&gt;&lt;td style="text-align: center;border-top: solid 1px;"&gt;4&lt;/td&gt;&lt;td style="text-align: center;border-top: solid 1px; border-right: solid 1px;"&gt;7&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center; border-left: solid 1px;"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="text-align: center"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="text-align: center"&gt;6&lt;/td&gt;&lt;td style="text-align: center; border-left: solid 1px;"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="text-align: center"&gt;4&lt;/td&gt;&lt;td style="text-align: center"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="text-align: center; border-left: solid 1px;"&gt;9&lt;/td&gt;&lt;td style="text-align: center"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="text-align: center; border-right: solid 1px;"&gt;3&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center; border-left: solid 1px;"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="text-align: center"&gt;4&lt;/td&gt;&lt;td style="text-align: center"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="text-align: center; border-left: solid 1px;"&gt;9&lt;/td&gt;&lt;td style="text-align: center"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="text-align: center"&gt;1&lt;/td&gt;&lt;td style="text-align: center; border-left: solid 1px;"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="text-align: center"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="text-align: center; border-right: solid 1px;"&gt;6&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center; border-top: solid 1px; border-left: solid 1px;"&gt;2&lt;/td&gt;&lt;td style="text-align: center; border-top: solid 1px;"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="text-align: center; border-top: solid 1px;"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="text-align: center; border-top: solid 1px; border-left: solid 1px;"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="text-align: center; border-top: solid 1px;"&gt;6&lt;/td&gt;&lt;td style="text-align: center; border-top: solid 1px;"&gt;3&lt;/td&gt;&lt;td style="text-align: center; border-top: solid 1px; border-left: solid 1px;"&gt;8&lt;/td&gt;&lt;td style="text-align: center; border-top: solid 1px;"&gt;9&lt;/td&gt;&lt;td style="text-align: center; border-top: solid 1px; border-right: solid 1px;"&gt;5&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center; border-left: solid 1px;"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="text-align: center"&gt;8&lt;/td&gt;&lt;td style="text-align: center"&gt;4&lt;/td&gt;&lt;td style="text-align: center; border-left: solid 1px;"&gt;1&lt;/td&gt;&lt;td style="text-align: center"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="text-align: center"&gt;7&lt;/td&gt;&lt;td style="text-align: center; border-left: solid 1px;"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="text-align: center"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="text-align: center; border-right: solid 1px;"&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center; border-bottom: solid 1px; border-left: solid 1px;"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="text-align: center; border-bottom: solid 1px;"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="text-align: center; border-bottom: solid 1px;"&gt;5&lt;/td&gt;&lt;td style="text-align: center; border-bottom: solid 1px; border-left: solid 1px;"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="text-align: center; border-bottom: solid 1px;"&gt;9&lt;/td&gt;&lt;td style="text-align: center; border-bottom: solid 1px;"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="text-align: center; border-bottom: solid 1px; border-left: solid 1px;"&gt;7&lt;/td&gt;&lt;td style="text-align: center; border-bottom: solid 1px;"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="text-align: center; border-bottom: solid 1px; border-right: solid 1px;"&gt;4&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;table cellspacing="0" style="float: right;"&gt;&lt;br /&gt;&lt;caption&gt;... and solved&lt;/caption&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="width: 1em; text-align: center; border-top: solid 1px; border-left: solid 1px;"&gt;5&lt;/td&gt;&lt;td style="width: 1em; text-align: center; border-top: solid 1px;"&gt;2&lt;/td&gt;&lt;td style="width: 1em; text-align: center; border-top: solid 1px;"&gt;1&lt;/td&gt;&lt;td style="width: 1em; text-align: center; border-top: solid 1px; border-left: solid 1px;"&gt;3&lt;/td&gt;&lt;td style="width: 1em; text-align: center; border-top: solid 1px;"&gt;7&lt;/td&gt;&lt;td style="width: 1em; text-align: center; border-top: solid 1px;"&gt;9&lt;/td&gt;&lt;td style="width: 1em; text-align: center; border-top: solid 1px; border-left: solid 1px;"&gt;4&lt;/td&gt;&lt;td style="width: 1em; text-align: center; border-top: solid 1px;"&gt;6&lt;/td&gt;&lt;td style="width: 1em; text-align: center; border-top: solid 1px; border-right: solid 1px;"&gt;8&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center; border-left: solid 1px;"&gt;4&lt;/td&gt;&lt;td style="text-align: center"&gt;6&lt;/td&gt;&lt;td style="text-align: center"&gt;&lt;strong&gt;8&lt;/strong&gt;&lt;/td&gt;&lt;td style="text-align: center; border-left: solid 1px;"&gt;&lt;strong&gt;2&lt;/strong&gt;&lt;/td&gt;&lt;td style="text-align: center"&gt;1&lt;/td&gt;&lt;td style="text-align: center"&gt;5&lt;/td&gt;&lt;td style="text-align: center; border-left: solid 1px;"&gt;&lt;strong&gt;3&lt;/strong&gt;&lt;/td&gt;&lt;td style="text-align: center"&gt;7&lt;/td&gt;&lt;td style="text-align: center; border-right: solid 1px;"&gt;&lt;strong&gt;9&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center; border-left: solid 1px;"&gt;3&lt;/td&gt;&lt;td style="text-align: center"&gt;&lt;strong&gt;7&lt;/strong&gt;&lt;/td&gt;&lt;td style="text-align: center"&gt;&lt;strong&gt;9&lt;/strong&gt;&lt;/td&gt;&lt;td style="text-align: center; border-left: solid 1px;"&gt;6&lt;/td&gt;&lt;td style="text-align: center"&gt;8&lt;/td&gt;&lt;td style="text-align: center"&gt;4&lt;/td&gt;&lt;td style="text-align: center; border-left: solid 1px;"&gt;2&lt;/td&gt;&lt;td style="text-align: center"&gt;5&lt;/td&gt;&lt;td style="text-align: center; border-right: solid 1px;"&gt;&lt;strong&gt;1&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center; border-top: solid 1px; border-left: solid 1px;"&gt;8&lt;/td&gt;&lt;td style="text-align: center;border-top: solid 1px;"&gt;9&lt;/td&gt;&lt;td style="text-align: center;border-top: solid 1px;"&gt;3&lt;/td&gt;&lt;td style="text-align: center;border-top: solid 1px; border-left: solid 1px;"&gt;5&lt;/td&gt;&lt;td style="text-align: center;border-top: solid 1px;"&gt;2&lt;/td&gt;&lt;td style="text-align: center;border-top: solid 1px;"&gt;6&lt;/td&gt;&lt;td style="text-align: center;border-top: solid 1px; border-left: solid 1px;"&gt;1&lt;/td&gt;&lt;td style="text-align: center;border-top: solid 1px;"&gt;4&lt;/td&gt;&lt;td style="text-align: center;border-top: solid 1px; border-right: solid 1px;"&gt;7&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center; border-left: solid 1px;"&gt;&lt;strong&gt;1&lt;/strong&gt;&lt;/td&gt;&lt;td style="text-align: center"&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;/td&gt;&lt;td style="text-align: center"&gt;6&lt;/td&gt;&lt;td style="text-align: center; border-left: solid 1px;"&gt;&lt;strong&gt;7&lt;/strong&gt;&lt;/td&gt;&lt;td style="text-align: center"&gt;4&lt;/td&gt;&lt;td style="text-align: center"&gt;&lt;strong&gt;8&lt;/strong&gt;&lt;/td&gt;&lt;td style="text-align: center; border-left: solid 1px;"&gt;9&lt;/td&gt;&lt;td style="text-align: center"&gt;&lt;strong&gt;2&lt;/strong&gt;&lt;/td&gt;&lt;td style="text-align: center; border-right: solid 1px;"&gt;3&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center; border-left: solid 1px;"&gt;&lt;strong&gt;7&lt;/strong&gt;&lt;/td&gt;&lt;td style="text-align: center"&gt;4&lt;/td&gt;&lt;td style="text-align: center"&gt;&lt;strong&gt;2&lt;/strong&gt;&lt;/td&gt;&lt;td style="text-align: center; border-left: solid 1px;"&gt;9&lt;/td&gt;&lt;td style="text-align: center"&gt;&lt;strong&gt;3&lt;/strong&gt;&lt;/td&gt;&lt;td style="text-align: center"&gt;1&lt;/td&gt;&lt;td style="text-align: center; border-left: solid 1px;"&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;/td&gt;&lt;td style="text-align: center"&gt;&lt;strong&gt;8&lt;/strong&gt;&lt;/td&gt;&lt;td style="text-align: center; border-right: solid 1px;"&gt;6&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center; border-top: solid 1px; border-left: solid 1px;"&gt;2&lt;/td&gt;&lt;td style="text-align: center; border-top: solid 1px;"&gt;&lt;strong&gt;1&lt;/strong&gt;&lt;/td&gt;&lt;td style="text-align: center; border-top: solid 1px;"&gt;&lt;strong&gt;7&lt;/strong&gt;&lt;/td&gt;&lt;td style="text-align: center; border-top: solid 1px; border-left: solid 1px;"&gt;&lt;strong&gt;4&lt;/strong&gt;&lt;/td&gt;&lt;td style="text-align: center; border-top: solid 1px;"&gt;6&lt;/td&gt;&lt;td style="text-align: center; border-top: solid 1px;"&gt;3&lt;/td&gt;&lt;td style="text-align: center; border-top: solid 1px; border-left: solid 1px;"&gt;8&lt;/td&gt;&lt;td style="text-align: center; border-top: solid 1px;"&gt;9&lt;/td&gt;&lt;td style="text-align: center; border-top: solid 1px; border-right: solid 1px;"&gt;5&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center; border-left: solid 1px;"&gt;&lt;strong&gt;9&lt;/strong&gt;&lt;/td&gt;&lt;td style="text-align: center"&gt;8&lt;/td&gt;&lt;td style="text-align: center"&gt;4&lt;/td&gt;&lt;td style="text-align: center; border-left: solid 1px;"&gt;1&lt;/td&gt;&lt;td style="text-align: center"&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;/td&gt;&lt;td style="text-align: center"&gt;7&lt;/td&gt;&lt;td style="text-align: center; border-left: solid 1px;"&gt;&lt;strong&gt;6&lt;/strong&gt;&lt;/td&gt;&lt;td style="text-align: center"&gt;&lt;strong&gt;3&lt;/strong&gt;&lt;/td&gt;&lt;td style="text-align: center; border-right: solid 1px;"&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center; border-bottom: solid 1px; border-left: solid 1px;"&gt;&lt;strong&gt;6&lt;/strong&gt;&lt;/td&gt;&lt;td style="text-align: center; border-bottom: solid 1px;"&gt;&lt;strong&gt;3&lt;/strong&gt;&lt;/td&gt;&lt;td style="text-align: center; border-bottom: solid 1px;"&gt;5&lt;/td&gt;&lt;td style="text-align: center; border-bottom: solid 1px; border-left: solid 1px;"&gt;&lt;strong&gt;8&lt;/strong&gt;&lt;/td&gt;&lt;td style="text-align: center; border-bottom: solid 1px;"&gt;9&lt;/td&gt;&lt;td style="text-align: center; border-bottom: solid 1px;"&gt;&lt;strong&gt;2&lt;/strong&gt;&lt;/td&gt;&lt;td style="text-align: center; border-bottom: solid 1px; border-left: solid 1px;"&gt;7&lt;/td&gt;&lt;td style="text-align: center; border-bottom: solid 1px;"&gt;&lt;strong&gt;1&lt;/strong&gt;&lt;/td&gt;&lt;td style="text-align: center; border-bottom: solid 1px; border-right: solid 1px;"&gt;4&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-7724527810656293102?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/7724527810656293102/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=7724527810656293102' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/7724527810656293102'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/7724527810656293102'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2011/01/sudoku-solver-in-prolog.html' title='Sudoku solver in Prolog'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-4456590895885199232</id><published>2010-11-11T10:13:00.003+01:00</published><updated>2010-11-11T10:36:17.495+01:00</updated><title type='text'>Disabling Ctrl + Enter in Outlook</title><content type='html'>I appreciate the &lt;span style="font-family: monospace;"&gt;Ctrl + Enter&lt;/span&gt; keystroke in Visual Studio, it inserts a line above the one you are currently at and puts a cursor there. I got used to is so much, that I tend to use it out of Visual Studio even. I am afraid I have managed to send a good deal of unfinished emails like that from Outlook.&lt;br /&gt;&lt;br /&gt;Finally, I have found a cure. There is an option to disable &lt;span style="font-family: monospace;"&gt;Ctrl + Enter&lt;/span&gt; keystroke in Outlook: &lt;span style="font-style:italic;"&gt;Tools&lt;/span&gt; &amp;rarr; &lt;span style="font-style:italic;"&gt;Options...&lt;/span&gt; &amp;rarr; &lt;span style="font-style:italic;"&gt;E-mail Options...&lt;/span&gt; &amp;rarr; &lt;span style="font-style:italic;"&gt;Advanced E-mail Options...&lt;/span&gt; &amp;rarr; clear a tick at &lt;span style="font-style:italic;"&gt;"Press CTRL+ENTER to send messages"&lt;/span&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-4456590895885199232?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/4456590895885199232/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=4456590895885199232' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/4456590895885199232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/4456590895885199232'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2010/11/disabling-ctrl-enter-in-outlook.html' title='Disabling Ctrl + Enter in Outlook'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-1525699640489196421</id><published>2010-07-27T14:25:00.002+02:00</published><updated>2010-07-27T14:43:52.531+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><title type='text'>Duplicated Page Parameters</title><content type='html'>I have just wondered what will happen if you set a page parameter twice. It does not seem to be explicitly documented in MSDN (I have not been particularly thorough in my searching), so I have just tried.&lt;br /&gt;&lt;br /&gt;Having &lt;code&gt;http://server/page.aspx?myparam=&lt;strong&gt;1&lt;/strong&gt;&amp;myparam=&lt;strong&gt;2&lt;/strong&gt;&lt;/code&gt;, it is&lt;br /&gt;&lt;code&gt;"&lt;strong&gt;1,2&lt;/strong&gt;"&lt;/code&gt;&lt;br /&gt;that you receive from &lt;code&gt;HttpContext.Current.Request.QueryString["myparam"]&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;The order seems to be kept, that is you obtain&lt;br /&gt;&lt;code&gt;"&lt;strong&gt;2,1&lt;/strong&gt;"&lt;/code&gt;&lt;br /&gt;having request &lt;code&gt;http://server/page.aspx?myparam=&lt;strong&gt;2&lt;/strong&gt;&amp;myparam=&lt;strong&gt;1&lt;/strong&gt;&lt;/code&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-1525699640489196421?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/1525699640489196421/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=1525699640489196421' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/1525699640489196421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/1525699640489196421'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2010/07/duplicated-page-parameters.html' title='Duplicated Page Parameters'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-2019530294619701607</id><published>2010-05-04T07:30:00.005+02:00</published><updated>2010-05-04T08:17:25.378+02:00</updated><title type='text'>On "newly added" comments</title><content type='html'>I have just seen an enumeration modified. Some new items have been added there. The developer, probably taught to comment his code, added &lt;code&gt;//newly added&lt;/code&gt; comments next to each new item. I guess he is very satisfied about the cleanness of his work.&lt;br /&gt;&lt;br /&gt;I can imagine three possible scenarios.&lt;br /&gt;&lt;br /&gt;First, no one will ever touch those comments. As a result, the items will remain &lt;code&gt;//newly added&lt;/code&gt; for anyone reading the file, no matter the date.&lt;br /&gt;&lt;br /&gt;Second, after some time, these comments will be deleted.&lt;br /&gt;&lt;br /&gt;Third, and perhaps most in line with "comment your code" imperative, the developer will once change his comments to something like &lt;code&gt;//not recently added&lt;/code&gt; and finally to &lt;code&gt;//added ages ago&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;What is the purpose of these comments? They are valid for some limited time. Then they just cause some confusion and/or maintenance burden.&lt;br /&gt;&lt;br /&gt;If your code repository provides versioning, and our does indeed, anyone can reliably see what was changed in files. There is no need to manually list the changes anymore.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-2019530294619701607?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/2019530294619701607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=2019530294619701607' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/2019530294619701607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/2019530294619701607'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2010/05/on-newly-added-comments.html' title='On &lt;em&gt;&quot;newly added&quot;&lt;/em&gt; comments'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-7353957832518024634</id><published>2010-04-19T15:02:00.002+02:00</published><updated>2010-04-19T15:46:55.607+02:00</updated><title type='text'>Why comments are evil</title><content type='html'>Comments usually are not maintained and sooner or later become confusing rather than helpful.&lt;br /&gt;&lt;br /&gt;Recently, I have experienced another proof that comments are evil. I needed to examine usages of an identifier (web control name), that could be used both in C# code and in ASPX markup. Thus I needed to use "Find in files", i.e. text searching. There were found 51 occurrences, of which only 4 were not commented out. 47 occurrences were just slowing me down.&lt;br /&gt;&lt;br /&gt;I wish there was an option "skip comments" in "Find in files" dialog box.&lt;br /&gt;&lt;br /&gt;I wish people preferred deleting stuff to commenting it out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-7353957832518024634?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/7353957832518024634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=7353957832518024634' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/7353957832518024634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/7353957832518024634'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2010/04/why-comments-are-evil.html' title='Why comments are evil'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-8618903137018548784</id><published>2010-04-02T15:02:00.008+02:00</published><updated>2010-04-08T17:10:15.813+02:00</updated><title type='text'>Troubled Agile Adoption</title><content type='html'>Adoption of agile software development fails often. It has been written much on why does it happen. Recently, Cyndi Mitchell from ThoughtWorks Studios published an article named &lt;a href="http://www.sdtimes.com/link/34197"&gt;The half-agile path leads nowhere&lt;/a&gt;. I also liked the reaction of Steve Moyer, saying that &lt;a href="http://blog.stevemoyer.net/2010/03/why-scrum-is-easy-and-xp-is-hard.html"&gt;Scrum is easy and XP is hard&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Scrum is rather easy. That is why companies tend to apply Scrum when they want to be agile. And they all want to be agile nowadays, don't they?&lt;br /&gt;&lt;br /&gt;So what is the problem? James Shore wrote some year ago about &lt;a href="http://jamesshore.com/Blog/The-Decline-and-Fall-of-Agile.html"&gt;The Decline and Fall of Agile&lt;/a&gt;, and he pointed out that it is how Scrum is applied that is bringing the disappointment. He even managed to put a reason -- people tend to say agile when in fact they mean sprints and daily meetings, that is to say processes and tools that Scrum offers. &lt;br /&gt;&lt;br /&gt;And that is unsatisfactory, of course. They do not value &lt;cite&gt;Individuals and interactions over processes and tools&lt;/cite&gt;!&lt;br /&gt;&lt;br /&gt;I believe it is &lt;a href="http://agilemanifesto.org/"&gt;Manifesto for Agile Software Development&lt;/a&gt; that should guide you in becoming agile. Any processes and tools, although valuable, are secondary.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-8618903137018548784?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/8618903137018548784/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=8618903137018548784' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/8618903137018548784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/8618903137018548784'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2010/04/troubled-agile-adoption.html' title='Troubled Agile Adoption'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-5617819603360187876</id><published>2010-03-21T15:24:00.002+01:00</published><updated>2010-03-21T15:43:28.470+01:00</updated><title type='text'>Verbatim</title><content type='html'>Recently, we have discussed verbatim programs with my colleagues. Verbatim program prints itself on the output. I know that we did such a thing at the university in Pascal, but I could remember little of it. Thus I have decided to create one from scratch, although in C#. It took me some time to find a proper quotes escaping, that was the most difficult part of the program I would say. Still it is nice to see that even tough looking problems (initially) may have relatively easy solutions to be reached in a few minutes.&lt;br /&gt;&lt;br /&gt;Here comes the source, perhaps not the best of its kind, but working fine.&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;using System;&lt;br /&gt;&lt;br /&gt;namespace Verbatim&lt;br /&gt;{&lt;br /&gt;    class Program&lt;br /&gt;    {&lt;br /&gt;        static void Main(string[] args)&lt;br /&gt;        {&lt;br /&gt;            const string ap = "\"";&lt;br /&gt;            const string s =&lt;br /&gt;@"using System;&lt;br /&gt;&lt;br /&gt;namespace Verbatim&lt;br /&gt;{{&lt;br /&gt;    class Program&lt;br /&gt;    {{&lt;br /&gt;        static void Main(string[] args)&lt;br /&gt;        {{&lt;br /&gt;            const string ap = {1}\{1}{1};&lt;br /&gt;            const string s = &lt;br /&gt;@{1}{0}{1};&lt;br /&gt;            Console.WriteLine(s, s, ap);&lt;br /&gt;        }}&lt;br /&gt;    }}&lt;br /&gt;}}";&lt;br /&gt;            Console.WriteLine(s, s, ap);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-5617819603360187876?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/5617819603360187876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=5617819603360187876' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/5617819603360187876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/5617819603360187876'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2010/03/verbatim.html' title='Verbatim'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-674016184080531252</id><published>2010-01-28T16:23:00.003+01:00</published><updated>2010-01-28T17:14:36.952+01:00</updated><title type='text'>Long file names and paths</title><content type='html'>It was somewhat difficult for me to realize the file name length restriction in Windows. Finally I got it: The file name can only have the length such that the resulting full path will not exceed 260 characters.&lt;br /&gt;&lt;br /&gt;E.g.: In &lt;code&gt;C:\SomeDir\&lt;/code&gt; you can create a file with 248 characters in name (including the extension), while in &lt;code&gt;C:\SomeDir\SubDir\&lt;/code&gt; you can use only 241 characters for a file name.&lt;br /&gt;&lt;br /&gt;However, file systems used in Windows can handle paths up to &lt;cite&gt;32,760 Unicode characters with each path component no more than 255 characters&lt;/cite&gt;&lt;sup&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ee681827(VS.85).aspx#limits"&gt;[1]&lt;/a&gt;&lt;/sup&gt; It is possible to work with such long paths (i.e. exceeding 260 characters) in Windows, although there are some drawbacks. The best I have found regarding this topic is on &lt;a href="http://blogs.msdn.com/bclteam/archive/2007/02/13/long-paths-in-net-part-1-of-3-kim-hamilton.aspx"&gt;BCL Team Blog&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Note: If you assign a drive letter to some folder, then working on that "drive", the full path will not contain the original folder anymore. Thus you can create a file, that you cannot work with properly in the original folder (the resulting path too lengthy), but still can be fully accessed on the "drive".&lt;br /&gt;&lt;br /&gt;E.g.: Having mapped &lt;code&gt;\\server\some_long_directory_structure\&lt;/code&gt; to a virtual &lt;code&gt;Z:&lt;/code&gt; drive, you can create and fully use a file &lt;code&gt;Z:\some_file_with_long_name&lt;/code&gt;. However, that file may be difficult to work with when accessed as &lt;code&gt;\\server\some_long_directory_structure\some_file_with_long_name&lt;/code&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-674016184080531252?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/674016184080531252/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=674016184080531252' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/674016184080531252'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/674016184080531252'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2010/01/long-file-names-and-paths.html' title='Long file names and paths'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-3952529404767411892</id><published>2010-01-15T15:48:00.002+01:00</published><updated>2010-01-15T16:08:59.938+01:00</updated><title type='text'>TDD Kata</title><content type='html'>I did &lt;a href="http://osherove.com/tdd-kata-1/"&gt;Roy Osherove's TDD Kata&lt;/a&gt;. It was refreshing and fun. When it came to step 8, my learning was stimulated, too. Well done, Roy!&lt;br /&gt;&lt;br /&gt;I even plan to try this when doing pair programming again. I think such an exercise may help the pair to acclimatize.&lt;br /&gt;&lt;br /&gt;I wish there was some &lt;em&gt;"TDD Kata of the Day"&lt;/em&gt; page...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-3952529404767411892?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/3952529404767411892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=3952529404767411892' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/3952529404767411892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/3952529404767411892'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2010/01/tdd-kata.html' title='TDD Kata'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-5603114415535578713</id><published>2009-11-23T16:37:00.006+01:00</published><updated>2010-07-27T14:43:52.532+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Infragistics'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><title type='text'>SelectedIndex if nothing selected</title><content type='html'>&lt;a href="http://help.infragistics.com/Help/NetAdvantage/ASPNET/2009.2/CLR3.5/html/Infragistics35.WebUI.WebCombo.v9.2~Infragistics.WebUI.WebCombo.WebCombo~SelectedIndex.html"&gt;&lt;code&gt;SelectedIndex&lt;/code&gt;&lt;/a&gt; property of Infragistics' &lt;a href="http://help.infragistics.com/Help/NetAdvantage/ASPNET/2009.2/CLR3.5/html/Infragistics35.WebUI.WebCombo.v9.2~Infragistics.WebUI.WebCombo.WebCombo.html"&gt;&lt;code&gt;WebCombo&lt;/code&gt;&lt;/a&gt; class has the following syntax&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;public int SelectedIndex {get; set;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The documentation reads &lt;cite&gt;'If no row is selected, this property returns Nothing or Null.'&lt;/cite&gt;&amp;ensp;That sounds suspiciously since &lt;code&gt;int&lt;/code&gt; cannot be &lt;code&gt;null&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;The property actually returns &lt;strong&gt;&lt;code&gt;-1&lt;/code&gt;&lt;/strong&gt; if there are no selected rows.&lt;br /&gt;&lt;br /&gt;By the way, the index is zero-based, i.e. the first row has the index &lt;code&gt;0&lt;/code&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-5603114415535578713?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/5603114415535578713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=5603114415535578713' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/5603114415535578713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/5603114415535578713'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2009/11/selectedindex-if-nothing-selected.html' title='SelectedIndex if nothing selected'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-851722704932268898</id><published>2009-11-12T12:00:00.003+01:00</published><updated>2010-07-27T14:43:52.533+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Infragistics'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><title type='text'>'+' not supported in datakey</title><content type='html'>Users reported us that sometimes the selection is lost in &lt;code&gt;UltraWebGrid&lt;/code&gt;. We managed to discover that the problem occurs only when the &lt;a href="http://help.infragistics.com/Help/NetAdvantage/ASPNET/2009.1/CLR3.5/html/Infragistics35.WebUI.UltraWebGrid.v9.1~Infragistics.WebUI.UltraWebGrid.UltraGridBand~DataKeyField.html"&gt;key column&lt;/a&gt; contains '+'. The selection is recognized OK on client side, but on server side it behaves as if the selected row was the one without '+', i.e. none if there was no such row.&lt;br /&gt;&lt;br /&gt;Having the data source&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;    [DataObject]&lt;br /&gt;    public class DataProvider&lt;br /&gt;    {&lt;br /&gt;        [DataObjectMethod(DataObjectMethodType.Select)]&lt;br /&gt;        public static IEnumerable SelectData()&lt;br /&gt;        {&lt;br /&gt;            yield return new { Column1 = "a+b" };&lt;br /&gt;            yield return new { Column1 = "a b" };&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;and the grid&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;igtbl:UltraWebGrid ID="UltraWebGrid1" runat="server" DataSourceID="ObjectDataSource1"&amp;gt;&lt;br /&gt;            &amp;lt;Bands&amp;gt;&lt;br /&gt;                &amp;lt;igtbl:UltraGridBand DataKeyField="Column1"&amp;gt;&lt;br /&gt;                    &amp;lt;Columns&amp;gt;&lt;br /&gt;                        &amp;lt;igtbl:UltraGridColumn Key="Column1" BaseColumnName="Column1" IsBound="True"&amp;gt;&amp;lt;/igtbl:UltraGridColumn&amp;gt;&lt;br /&gt;                    &amp;lt;/Columns&amp;gt;&lt;br /&gt;                &amp;lt;/igtbl:UltraGridBand&amp;gt;&lt;br /&gt;            &amp;lt;/Bands&amp;gt;&lt;br /&gt;            &amp;lt;DisplayLayout &amp;hellip;&amp;gt;&amp;hellip;&amp;lt;/DisplayLayout&amp;gt;&lt;br /&gt;&amp;lt;/igtbl:UltraWebGrid&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;you can select the row with &lt;code&gt;"a+b"&lt;/code&gt;, but once you enter server code (e.g. for server event handling), the selection is changed to &lt;code&gt;"a&amp;nbsp;b"&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;We needed to introduce another column to store the key value with '+' escaped somehow (e.g. replaced for another character).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Updated 3 February 2010:&lt;/span&gt;&lt;br /&gt;I have been told by a colleague that even server events are not raised for a row having '+' in its key.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-851722704932268898?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/851722704932268898/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=851722704932268898' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/851722704932268898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/851722704932268898'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2009/11/not-supported-in-datakey.html' title='&apos;+&apos; not supported in datakey'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-8239337177636321843</id><published>2009-09-03T14:46:00.004+02:00</published><updated>2009-09-03T15:23:07.170+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Comma-separated Lists</title><content type='html'>One needs to convert a list of objects to comma-separated list of values sometimes. I often see &lt;a href="http://msdn.microsoft.com/en-us/library/system.text.stringbuilder.aspx"&gt;&lt;code&gt;StringBuilder&lt;/code&gt;&lt;/a&gt; used with some sort of loop. The most intellectual challenge is not to write comma after the last item; either there is some conditional expression in the loop step or some post processing is included to remove the last comma. Usually the result is consisting of several lines of code, perhaps too many for the purpose. &lt;br /&gt;&lt;br /&gt;Users enthusiastic about Linq tend to involve &lt;a href="http://msdn.microsoft.com/en-us/library/system.linq.enumerable.aggregate.aspx"&gt;&lt;code&gt;Enumerable.Aggregate&lt;/code&gt;&lt;/a&gt;. Still &lt;a href="http://msdn.microsoft.com/en-us/library/57a79xd0.aspx"&gt;&lt;code&gt;String.Join&lt;/code&gt;&lt;/a&gt; may be the most straightforward method many times.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-8239337177636321843?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/8239337177636321843/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=8239337177636321843' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/8239337177636321843'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/8239337177636321843'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2009/09/comma-separated-lists.html' title='Comma-separated Lists'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-6425279267279896891</id><published>2009-07-30T10:14:00.003+02:00</published><updated>2009-07-30T10:47:31.583+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XSL-FO'/><title type='text'>The First Contact with FO.NET</title><content type='html'>I had a training recently on XSLT and XSL-FO. We were using java &lt;a href="http://xmlgraphics.apache.org/fop/"&gt;Apache FOP&lt;/a&gt; there. I was quite interested in the technology and was keen to give &lt;a href="http://www.codeplex.com/fonet"&gt;FO.NET&lt;/a&gt; a try.&lt;br /&gt;&lt;br /&gt;Yesterday, I got to it finally. I found two drawbacks so far. Attribute &lt;code&gt;width&lt;/code&gt; on &lt;code&gt;inline&lt;/code&gt; element had no effect and I only found a workaround by using &lt;code&gt;table&lt;/code&gt;. Then I discovered that &lt;code&gt;block-container&lt;/code&gt; is not supported by FO.NET. But since you can have nested &lt;code&gt;block&lt;/code&gt;s, it is not a big issue.&lt;br /&gt;&lt;br /&gt;I only worked with relatively simple document, so I guess there may be much more issues when using FO.NET. Still I was pleased with the output. I think FO.NET (and XSL-FO in general) might be a good option for creating PDF documents, especially when the source data are in XML.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-6425279267279896891?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/6425279267279896891/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=6425279267279896891' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/6425279267279896891'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/6425279267279896891'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2009/07/first-contact-with-fonet.html' title='The First Contact with FO.NET'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-4009357203780144637</id><published>2009-07-21T12:09:00.003+02:00</published><updated>2009-07-21T12:55:08.259+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pair programming'/><title type='text'>Pair programming begins</title><content type='html'>I suggested a colleague to try pair programming and he agreed. After one week, we reviewed our first impressions.&lt;br /&gt;&lt;br /&gt;First of all, I was interested in quality of the code we produce. However, it is difficult to say, what the quality is. We chose maintainability term instead. Zdenek (my pair) consider it significantly better in pair, I think it is somewhat better.&lt;br /&gt;&lt;br /&gt;As for velocity of development, Zdenek finds it really faster, I find it somewhat faster. However, these are only our first impressions. I think we can explain much of velocity gain by ongoing focus. I mean, if you start losing concentration, your pair takes over so there are much less slow downs comparing to working alone.&lt;br /&gt;&lt;br /&gt;I feel a little bit less of personal comfort, while Zdenek did not observe that. &lt;br /&gt;&lt;br /&gt;I was also interested in the level of learning. Zdenek is extremely satisfied, because he is new to project and pairing helps him very much to get to it. I feel like learning less, but that is mostly becuase of different style of work now. Especially, I am the driver most of time, although it got better in last days.&lt;br /&gt;&lt;br /&gt;We both expect the higher probability of success of the project.&lt;br /&gt;&lt;br /&gt;There are some practical issues regarding pair programming. We have no specific keyboard sharing rules yet. Mostly, the one who feels bigger focus is a driver. We already changed a workplace a bit (moved a piece of furniture) to make us feel more comfortable at a single table.&lt;br /&gt;&lt;br /&gt;Basically, our first impressions are mostly positive and we want to go on with pair programming. We extremely appreciate ongoing focus and ongoing code-reviewing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-4009357203780144637?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/4009357203780144637/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=4009357203780144637' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/4009357203780144637'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/4009357203780144637'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2009/07/pair-programming-begins.html' title='Pair programming begins'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-6584471420712753522</id><published>2009-04-21T15:36:00.004+02:00</published><updated>2010-07-27T14:43:52.534+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Infragistics'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><title type='text'>Strange values in chart</title><content type='html'>Infragistics &lt;a href="http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR3.5/html/Chart_Stacked_Column_Chart_2D.html"&gt;stacked column chart&lt;/a&gt; allows to display both negative and not negative values. However, I was adding some post processing based on values and discovered that one has to be careful with &lt;code&gt;&lt;a href="http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR3.5/html/Infragistics35.WebUI.UltraWebChart.v8.2~Infragistics.UltraChart.Core.Primitives.Primitive~Value.html"&gt;Box.Value&lt;/a&gt;&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;Among others I had a stacked column with values 0, -50, 0, 50, 0. This is what I obtained (&lt;code&gt;&lt;a href="http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR3.5/html/Infragistics35.WebUI.UltraWebChart.v8.2~Infragistics.UltraChart.Core.Primitives.Box.html"&gt;Box&lt;/a&gt;[][] rows&lt;/code&gt; were collected from &lt;code&gt;&lt;a href="http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR3.5/html/Infragistics35.WebUI.UltraWebChart.v8.2~Infragistics.UltraChart.Core.SceneGraph.html"&gt;SceneGraph&lt;/a&gt;&lt;/acode&gt; by &lt;code&gt;&lt;a href="http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR3.5/html/Infragistics35.WebUI.UltraWebChart.v8.2~Infragistics.UltraChart.Core.Primitives.Primitive~Row.html"&gt;Row&lt;/a&gt;&lt;/code&gt; and &lt;code&gt;&lt;a href="http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR3.5/html/Infragistics35.WebUI.UltraWebChart.v8.2~Infragistics.UltraChart.Core.Primitives.Primitive~Column.html"&gt;Column&lt;/a&gt;&lt;/code&gt;):&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;((NumericDataPoint)rows[3][0].DataPoint)&lt;br /&gt;    Value: 0.0&lt;br /&gt;((NumericDataPoint)rows[3][1].DataPoint)&lt;br /&gt;    Value: -50.0&lt;br /&gt;((NumericDataPoint)rows[3][2].DataPoint)&lt;br /&gt;    Value: 0.0&lt;br /&gt;((NumericDataPoint)rows[3][3].DataPoint)&lt;br /&gt;    Value: 50.0&lt;br /&gt;((NumericDataPoint)rows[3][4].DataPoint)&lt;br /&gt;    Value: 0.0&lt;br /&gt;&lt;br /&gt;rows[3][0].Value&lt;br /&gt;0.0&lt;br /&gt;rows[3][1].Value&lt;br /&gt;-50.0&lt;br /&gt;rows[3][2].Value&lt;br /&gt;-50.0&lt;br /&gt;rows[3][3].Value&lt;br /&gt;50.0&lt;br /&gt;rows[3][4].Value&lt;br /&gt;-50.0&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;There is a kind of warning in the documentation of &lt;code&gt;&lt;a href="http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR3.5/html/Infragistics35.WebUI.UltraWebChart.v8.2~Infragistics.UltraChart.Core.Primitives.Primitive~Value.html"&gt;Box.Value&lt;/a&gt;&lt;/code&gt;: &lt;blockquote cite="http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR3.5/html/Infragistics35.WebUI.UltraWebChart.v8.2~Infragistics.UltraChart.Core.Primitives.Primitive~Value.html"&gt;The intent behind any data objects referenced by this property are dependent upon the Layer that added this Primitive to the scene graph.&lt;/blockquote&gt; They tend to use it, though, as I saw on &lt;a href="http://news.infragistics.com/forums/64.aspx"&gt;forums&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I spent some time trying to find better way then casting &lt;code&gt;&lt;a href="http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR3.5/html/Infragistics35.WebUI.UltraWebChart.v8.2~Infragistics.UltraChart.Core.Primitives.Primitive~DataPoint.html"&gt;Box.DataPoint&lt;/a&gt;&lt;/code&gt; to &lt;code&gt;&lt;a href="http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR3.5/html/Infragistics35.WebUI.UltraWebChart.v8.2~Infragistics.UltraChart.Resources.Appearance.NumericDataPoint.html"&gt;NumericDataPoint&lt;/a&gt;&lt;/code&gt;, but I failed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-6584471420712753522?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/6584471420712753522/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=6584471420712753522' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/6584471420712753522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/6584471420712753522'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2009/04/blog-post.html' title='Strange values in chart'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-9063340492303972161</id><published>2009-04-06T10:30:00.005+02:00</published><updated>2009-04-06T11:10:20.352+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Selecting not nulls?</title><content type='html'>Having a collection &lt;code&gt;IEnumerable&amp;lt;&lt;a href="http://msdn.microsoft.com/en-us/library/1t3y8s4s.aspx"&gt;Nullable&amp;lt;T&amp;gt;&lt;/a&gt;&amp;gt; myCollection&lt;/code&gt; you can select values that are not &lt;code&gt;null&lt;/code&gt; by calling &lt;code&gt;myCollection.OfType&amp;lt;T&amp;gt;()&lt;/code&gt;. What is not so obvious is that calling &lt;code&gt;myCollection.OfType&amp;lt;Nullable&amp;lt;T&amp;gt;&amp;gt;()&lt;/code&gt; would provide the same result.&lt;br /&gt;&lt;br /&gt;This is because &lt;code&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb360913.aspx"&gt;Enumerable.OfType&amp;lt;TResult&amp;gt;&lt;/a&gt;&lt;/code&gt; uses &lt;code&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/scekt9xw.aspx"&gt;is&lt;/a&gt;&lt;/code&gt; internally to determine the type of item. It means, you can use &lt;code&gt;Enumerable.OfType&amp;lt;T&amp;gt;()&lt;/code&gt; even for reference type &lt;code&gt;T&lt;/code&gt; to get items that are not &lt;code&gt;null&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;Of course, I would prefer calling &lt;code&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb534803.aspx"&gt;Where&amp;lt;T&amp;gt;&lt;/a&gt;(item =&gt; (item != null))&lt;/code&gt; to calling &lt;code&gt;OfType&amp;lt;T&amp;gt;()&lt;/code&gt; because the first call is much better in revealing its intention.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-9063340492303972161?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/9063340492303972161/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=9063340492303972161' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/9063340492303972161'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/9063340492303972161'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2009/04/selecting-not-nulls.html' title='Selecting not nulls?'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-8920161542422482532</id><published>2009-01-06T14:56:00.004+01:00</published><updated>2009-01-06T15:36:14.517+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Collection Initializers</title><content type='html'>Collection initializers are very welcome in C# 3.0. Typing&lt;br /&gt;&lt;br /&gt;&lt;code&gt;new List&amp;lt;int&amp;gt; { 1, 2, 3 }&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;is of course much more convenient then typing&lt;br /&gt;&lt;code&gt;&lt;br /&gt;List&amp;lt;int&amp;gt; l = new List&amp;lt;int&amp;gt;();&lt;br /&gt;l.Add(1);&lt;br /&gt;l.Add(2);&lt;br /&gt;l.Add(3);&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;However, when seeing examples (e.g. &lt;a href="http://msdn.microsoft.com/en-us/library/bb384062.aspx"&gt;MSDN&lt;/a&gt;), one could think that you are limited in a single type in a collection initializer. But that is not true. You can use several &lt;code&gt;Add&lt;/code&gt; overloads arbitrarily. Having the class&lt;br /&gt;&lt;pre&gt;class MyCollection : IEnumerable&lt;br /&gt;{&lt;br /&gt;   public void Add(string s) { ... }&lt;br /&gt;   public void Add(int i) { ... }&lt;br /&gt;   public void Add(SomeClass c) { ... }&lt;br /&gt;&lt;br /&gt;   //...&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;you can initialize it like this&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;new MyCollection&lt;br /&gt;{&lt;br /&gt;   "something",&lt;br /&gt;   1,&lt;br /&gt;   2,&lt;br /&gt;   new SomeClass { ... },&lt;br /&gt;   "yet another string",&lt;br /&gt;   3&lt;br /&gt;}&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-8920161542422482532?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/8920161542422482532/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=8920161542422482532' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/8920161542422482532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/8920161542422482532'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2009/01/collection-initializers.html' title='Collection Initializers'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-6090071138361022016</id><published>2008-11-26T09:47:00.003+01:00</published><updated>2008-11-26T10:07:19.533+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Infragistics'/><category scheme='http://www.blogger.com/atom/ns#' term='ActiveReports'/><title type='text'>Infragistics.Documents versus ActiveReports</title><content type='html'>PDF document had to be rendered from an application. We used to use ActiveReports for PDF reports, but have experienced difficulties when maintaining them. I gave a try to Infragistics.Documents library. It looked nice, but a lot of coding would be required. I think one could prepare some set of classes that would allow fast creation of documents, but it would take some time we did not have. I had to admit, that it is much faster to create the document in ActiveReports, using the visual designer.&lt;br /&gt;Perhaps this is just another prove of the rule "the less code you write the better".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-6090071138361022016?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/6090071138361022016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=6090071138361022016' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/6090071138361022016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/6090071138361022016'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2008/11/infragisticsdocuments-versus.html' title='Infragistics.Documents versus ActiveReports'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-207128511536223750</id><published>2008-11-13T10:53:00.002+01:00</published><updated>2008-11-13T11:22:29.027+01:00</updated><title type='text'>Good bye floppy disks</title><content type='html'>I did a big tidy up at home recently and found a bunch of floppy disks. My wife were interested in two of them. I coppied their content to an USB disk (yes, I still can access the computer having a floppy drive) and I guess I will never use floppy disks again.&lt;br /&gt;&lt;br /&gt;Rest in peace, floppy disks!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-207128511536223750?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/207128511536223750/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=207128511536223750' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/207128511536223750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/207128511536223750'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2008/11/good-bye-floppy-disks.html' title='Good bye floppy disks'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-6261161027789961354</id><published>2008-11-06T09:38:00.004+01:00</published><updated>2008-11-06T10:12:16.816+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ActiveReports'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><title type='text'>VisualStudio 2008 dead and alive</title><content type='html'>My VisualStudio 2008 stopped from runnning. After started, it reported several problems with loading of its parts and then crashed. Well, I wanted to repair the installation, but the installation program did not start, even. Because of that, I could neither uninstall the VisualStudio. Fortunately, I found the &lt;a href="http://stackoverflow.com/questions/114332/visual-studio-setup-problem-a-problem-has-been-encountered-while-loading-the-se"&gt;article on stackoverflow&lt;/a&gt; that helped me uninstall the VisualStudio.&lt;br /&gt;&lt;br /&gt;I guess the problem was caused by uninstall of DataDynamics ActiveReports. Did anyone out there experience similar problem?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-6261161027789961354?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/6261161027789961354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=6261161027789961354' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/6261161027789961354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/6261161027789961354'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2008/11/visualstudio-2008-dead-and-alive.html' title='VisualStudio 2008 dead and alive'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-2014967713922086714</id><published>2008-10-01T16:32:00.003+02:00</published><updated>2008-10-01T17:08:32.614+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Boxing and arrays</title><content type='html'>There is one more catch with boxing (see also my former post &lt;a href="http://st-dev-blog.blogspot.com/2008/10/boxing-and-explicit-conversions.html"&gt;Boxing and explicit conversions&lt;/a&gt;). Consider the code&lt;br /&gt;&lt;code&gt;&lt;br /&gt;public struct X&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public string Value { get; set; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void Fun()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;X x1 = new X { Value="original string 1" };&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;X x2 = new X { Value="original string 2" };&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;X[] array = new X[] { x1, x2 };&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;array[0].Value = "modified string";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//! &lt;i&gt;x1 is not changed&lt;/i&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I am occasionally amazed that &lt;code&gt;x1&lt;/code&gt; has &lt;code&gt;"original string 1"&lt;/code&gt; on the line marked '&lt;code&gt;!&lt;/code&gt;' although &lt;code&gt;array[0]&lt;/code&gt; reads &lt;code&gt;"modified string"&lt;/code&gt;. Hell yes, that is because of boxing again. If &lt;code&gt;X&lt;/code&gt; was &lt;code&gt;class&lt;/code&gt;,&amp;nbsp; &lt;code&gt;x1&lt;/code&gt; would be changed, too.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-2014967713922086714?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/2014967713922086714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=2014967713922086714' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/2014967713922086714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/2014967713922086714'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2008/10/boxing-and-arrays.html' title='Boxing and arrays'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-3344971028208220389</id><published>2008-10-01T15:28:00.006+02:00</published><updated>2008-10-01T16:32:08.229+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Boxing and explicit conversions</title><content type='html'>Imagine you are writing a method that will process a number. You need to accept &lt;code&gt;object&lt;/code&gt; as an argument.&lt;sup&gt;*)&lt;/sup&gt; You know that you will accept integers. You have considered the usage of &lt;code&gt;int&lt;/code&gt; and &lt;code&gt;long&lt;/code&gt;, and you have chosen &lt;code&gt;long&lt;/code&gt; since &lt;code&gt;int&lt;/code&gt; can be safely converted to &lt;code&gt;long&lt;/code&gt;. So you prepare something like&lt;br /&gt;&lt;code&gt;&lt;br /&gt;void ProcessNumber(object o)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;long number = (long)o; //!&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//do something with number&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;You test your method, and &amp;mdash; surprise &amp;mdash; you receive &lt;code&gt;System.InvalidCastException&lt;/code&gt; on the line marked '&lt;code&gt;!&lt;/code&gt;' when calling &lt;code&gt;ProcessNumber(1)&lt;/code&gt;. The problem is that boxing is involved, and the argument is not longer just &lt;code&gt;int&lt;/code&gt;.&lt;br /&gt;&lt;blockquote&gt;&lt;em&gt;You can cast a boxed value only if it is of the very same type!&lt;/em&gt;&lt;/blockquote&gt;&lt;br /&gt;If it is not certain that you will receive single type in all calls, you had better use the appropriate method of the &lt;code&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.convert(VS.90).aspx"&gt;System.Convert&lt;/a&gt;&lt;/code&gt; class.&lt;br /&gt;&lt;br /&gt;&lt;sup&gt;*)&lt;/sup&gt; Consider accessing of properties via &lt;a href="http://msdn.microsoft.com/en-us/library/b05d59ty.aspx"&gt;reflection&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-3344971028208220389?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/3344971028208220389/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=3344971028208220389' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/3344971028208220389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/3344971028208220389'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2008/10/boxing-and-explicit-conversions.html' title='Boxing and explicit conversions'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-3564359902697194349</id><published>2008-04-10T09:08:00.003+02:00</published><updated>2008-04-10T09:11:26.113+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Quotation of the Day</title><content type='html'>&lt;i&gt;"If you do serious Oracle Development, you will be clueless sooner or later." &lt;a href="http://oraclequirks.blogspot.com/"&gt;source&lt;/a&gt;&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-3564359902697194349?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/3564359902697194349/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=3564359902697194349' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/3564359902697194349'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/3564359902697194349'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2008/04/quotation-of-day.html' title='Quotation of the Day'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-8306048018718739855</id><published>2008-04-01T17:45:00.006+02:00</published><updated>2008-04-10T09:14:27.771+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><title type='text'>Edit .csproj file in Visual Studio</title><content type='html'>I bet everyone had the need to view or edit the content of .csproj file. I used to use notepad to do that. Accidentally I've discovered that it is possible to do so directly in Visual Studio. First you have to unload the project. You can use the context menu on the project in Solution Explorer to do so. Then this context menu changes so that it contains the item "Edit .csproj", by clicking which you can access and edit the content of .csproj file. Don't forget to "Reload Project" after you are finished.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-8306048018718739855?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/8306048018718739855/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=8306048018718739855' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/8306048018718739855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/8306048018718739855'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2008/04/edit-csproj-file-in-visual-studio.html' title='Edit .csproj file in Visual Studio'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-4162150261127232295</id><published>2008-04-01T16:44:00.010+02:00</published><updated>2008-04-10T09:15:57.994+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ActiveReports'/><title type='text'>Changing the size of paper in ActiveReports</title><content type='html'>I wanted to change the size of paper to A4. Thus I set the report's property &lt;code&gt;PageSettings.PaperKind&lt;/code&gt; to &lt;code&gt;System.Drawing.Printing.PaperKind.A4&lt;/code&gt;. The report designer reflected the change, but quite surprisingly I received the error when running the report: &lt;blockquote&gt;&lt;i&gt;Printer does not support A4 papersize. Please use PaperKind.Custom in your PageSettings or specify a papersize supported by the current printer&lt;/i&gt;&lt;/blockquote&gt;&lt;br /&gt;So I used &lt;code&gt;PaperKind.Custom&lt;/code&gt; even though my printer supports A4 very well and specified the dimensions of A4 manually. What was my surprise when Adobe Acrobat Reader (viewer) still used the size of Letter! I searched ActiveReports' Support Forums and managed to find the idea of the solution: &lt;code&gt;Document.Printer.PrinterName&lt;/code&gt; must be set to an empty string, after that you may specify both &lt;code&gt;PageSettings.PaperKind&lt;/code&gt; and &lt;code&gt;Document.Printer.PaperKind&lt;/code&gt; arbitrarily; the latter is esential for viewer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-4162150261127232295?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/4162150261127232295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=4162150261127232295' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/4162150261127232295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/4162150261127232295'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2008/04/changing-size-of-paper-in-activereports.html' title='Changing the size of paper in ActiveReports'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-11740521450830329</id><published>2008-03-31T09:38:00.003+02:00</published><updated>2008-04-10T09:18:19.126+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='design'/><title type='text'>Domain-Driven Design, the Book</title><content type='html'>I'm really looking forward to the &lt;a href="http://domaindrivendesign.org/books/#DDD"&gt;Domain-Driven Design book&lt;/a&gt;. I've read the preface and part of chapter 1 so far and this book really seems worth reading.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-11740521450830329?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/11740521450830329/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=11740521450830329' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/11740521450830329'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/11740521450830329'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2008/03/domain-driven-design-book.html' title='Domain-Driven Design, the Book'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-8942736625133475515</id><published>2008-02-12T18:10:00.000+01:00</published><updated>2010-07-27T14:43:11.678+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='data binding'/><title type='text'>Limited Formatting in Bind</title><content type='html'>You can specify not only what property you are binding to, but also the format that should be used. Example:&lt;br /&gt;&lt;code&gt;&amp;lt;asp:TextBox Text='&amp;lt;% Bind("SomeProperty", "{0:N2}") %&amp;gt;' /&amp;gt;&lt;/code&gt;&lt;br /&gt;to get number with two decimal digits.&lt;br /&gt;&lt;br /&gt;The problem is that the format is applied in one-way manner. When the number is loaded, it is formatted perfectly. But the very same number (without editing) can be stored no more. (It depends on culture. I have discovered this when using non-us decimal separators.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-8942736625133475515?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/8942736625133475515/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=8942736625133475515' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/8942736625133475515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/8942736625133475515'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2008/02/limited-formatting-in-bind.html' title='Limited Formatting in Bind'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-2987844161934099557</id><published>2008-02-12T15:30:00.003+01:00</published><updated>2010-07-27T14:43:11.679+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Infragistics'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='data binding'/><title type='text'>WebNumericEdit and Nullable&lt;decimal&gt;</title><content type='html'>I was binding &lt;code&gt;Infragistics WebNumericEdit&lt;/code&gt; to a &lt;code&gt;Nullable&amp;lt;decimal&amp;gt;&lt;/code&gt;. I had to set &lt;code&gt;DataMode&lt;/code&gt; of control to &lt;code&gt;NumericDataMode.Decimal&lt;/code&gt;. I set &lt;code&gt;Nullable&lt;/code&gt; property to &lt;code&gt;true&lt;/code&gt; since the value may be missing. (That is also the reason why we store the value as &lt;code&gt;Nullable&amp;lt;decimal&amp;gt;&lt;/code&gt;.) It seemed working, but then I noticed that &lt;code&gt;0&lt;/code&gt; is propagated to data instead of &lt;code&gt;null&lt;/code&gt;. So it seems that &lt;code&gt;Nullable&amp;lt;decimal&amp;gt;&lt;/code&gt; is not directly supported by &lt;code&gt;WebNumericEdit&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;After the short brainstorming, the decision was made to try to override the way how data are provided. Finally, this was sufficient to do:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;public class WebNullableNumericEdit&lt;br /&gt;   : WebNumericEdit&lt;br /&gt;{&lt;br /&gt;   public override object Value&lt;br /&gt;   {&lt;br /&gt;      get&lt;br /&gt;      {&lt;br /&gt;         return (this.Nullable &amp;&amp; &lt;br /&gt;            this.Text.Equals(this.NullText)) ?&lt;br /&gt;            null : base.Value; &lt;br /&gt;      }&lt;br /&gt;      set { base.Value = value; }&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-2987844161934099557?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/2987844161934099557/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=2987844161934099557' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/2987844161934099557'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/2987844161934099557'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2008/02/webnumericedit-and-nullable.html' title='WebNumericEdit and Nullable&amp;lt;decimal&amp;gt;'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-802247725710187816</id><published>2008-01-30T15:21:00.001+01:00</published><updated>2010-07-27T14:43:11.680+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><title type='text'>Overlapping Validation Groups and Duplication of Validators</title><content type='html'>I was solving the following problem: There are two buttons (B1 and B2) on a form and two fields (F1 and F2). B1 should trigger the validation of F1, while B2 makes both F1 and F2 validated.&lt;br /&gt;&lt;br /&gt;The concept of validation groups as introduced in .NET 2.0 is well prepared for two logically independent forms of one page, but is quite not ready for above described situations (that are not so rare I think).&lt;br /&gt;&lt;br /&gt;I rejected the idea of triggering the validation manually on button click. I wanted to follow the common pattern of validation as much as possible. I'm afraid you cannot share validators among several validation groups nor you can attach several validation groups to a single button. (The latter would be much preferred.) I introduced two validation groups, and there is a duplication of validators for F1 in order to make them included in both validation groups. This duplication is pretty systematic (only &lt;code&gt;ValidationGroup&lt;/code&gt; property varies) and recognisable at first sight, but still it is a pitty to have it there.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-802247725710187816?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/802247725710187816/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=802247725710187816' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/802247725710187816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/802247725710187816'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2008/01/overlapping-validation-groups-and.html' title='Overlapping Validation Groups and Duplication of Validators'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-1386448253080778738</id><published>2008-01-29T18:15:00.001+01:00</published><updated>2009-07-31T15:11:16.416+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='design'/><title type='text'>The Effectiveness of Test-first Approach to Programming</title><content type='html'>National Research Council of Canada published a paper titled &lt;a href="http://iit-iti.nrc-cnrc.gc.ca/iit-publications-iti/docs/NRC-47445.pdf" target="blank"&gt;"The Effectiveness of Test-first Approach to Programming"&lt;/a&gt;, in which the test-first approach leads to higher productivity. Read more comments on the paper on &lt;a href="http://www.infoq.com/news/2008/01/does-tdd-mean-quality" target="blank"&gt;InfoQ&lt;/a&gt;. The &lt;a href="http://www.ibm.com/developerworks/podcast/dwi/cm-int120507.html" target="blank"&gt;co-author&lt;/a&gt; offers that quality is also better when using test-first approach, although his research showed more &lt;i&gt;consistent quality&lt;/i&gt; results only.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-1386448253080778738?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/1386448253080778738/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=1386448253080778738' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/1386448253080778738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/1386448253080778738'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2008/01/effectiveness-of-test-first-approach-to.html' title='The Effectiveness of Test-first Approach to Programming'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-113870178875763391</id><published>2008-01-04T13:46:00.000+01:00</published><updated>2008-01-04T14:23:25.946+01:00</updated><title type='text'>Unexpected exceptions in .NET</title><content type='html'>&lt;p&gt;You can throw any exception you like from any place of your code in C#. That is quite OK. The problem is that the caller may receive any type of exception. One cannot be sure with .NET framework either. Although there is MSDN documentation on what exceptions can be thrown from what methods, you may receive unexpected expections. For example &lt;code&gt;XmlDocument.Load&lt;/code&gt; promises to throw &lt;code&gt;XmlException&lt;/code&gt; on parsing error, but if you use validating &lt;code&gt;XmlReader&lt;/code&gt;, the &lt;code&gt;XmlSchemaValidationException&lt;/code&gt; can be thrown.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I like Java &lt;code&gt;throws&lt;/code&gt; clause. You just discover all possible types of exceptions by compiling. With that knowledge, you may handle them or &lt;i&gt;explicitly&lt;/i&gt; mark them to be passed to your callers. Thus you won't be surprised in run time (possibly on production system).&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-113870178875763391?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/113870178875763391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=113870178875763391' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/113870178875763391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/113870178875763391'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2008/01/unexpected-exceptions-in-net.html' title='Unexpected exceptions in .NET'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8677228911601092823.post-334271682655063799</id><published>2007-12-07T10:01:00.001+01:00</published><updated>2008-04-10T09:23:03.542+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='data binding'/><title type='text'>Limited formatting in DataBinder.Eval</title><content type='html'>I've been requested to display special text ("n.a.") in the case that evaluated expression is not there (is &lt;code&gt;null&lt;/code&gt;). I've intended to provide my custom format provider that would work like requested. Unfortunately, &lt;code&gt;DataBinder.Eval&lt;/code&gt; does not allow you to provide your custom format provider even though &lt;code&gt;string.Format&lt;/code&gt; is called internally that can handle it.&lt;br /&gt;&lt;br /&gt;I've solved it by creating my custom control inherited from &lt;code&gt;Label&lt;/code&gt; that provides special text when the &lt;code&gt;Text&lt;/code&gt; property is null or empty on rendering. I would consider the ability to provide my custom formatter more convenient and somewhat smarter, however.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8677228911601092823-334271682655063799?l=st-dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://st-dev-blog.blogspot.com/feeds/334271682655063799/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8677228911601092823&amp;postID=334271682655063799' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/334271682655063799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8677228911601092823/posts/default/334271682655063799'/><link rel='alternate' type='text/html' href='http://st-dev-blog.blogspot.com/2007/12/limited-formatting-in-databindereval.html' title='Limited formatting in DataBinder.Eval'/><author><name>_St</name><uri>http://www.blogger.com/profile/13175259648709424988</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
