<?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-6895939420740956898</id><updated>2012-02-13T12:54:57.883-08:00</updated><category term='ruby install'/><category term='MVC'/><category term='security'/><category term='70-536'/><category term='System.Drawing'/><category term='methodology'/><category term='70-536 objective'/><category term='c#'/><category term='ado.net'/><category term='WCF'/><category term='sql'/><category term='70-515'/><category term='&quot;XML schema&quot;'/><category term='VS2010'/><category term='asp.net'/><category term='70-562'/><category term='.net'/><category term='70-503'/><category term='asp.net 4.0'/><category term='IIS7'/><category term='pomodoro technique'/><category term='.net certificate'/><category term='error'/><category term='work'/><category term='asp.net 3.5'/><category term='vb.net'/><category term='learning WCF'/><title type='text'>tecneck</title><subtitle type='html'>A place to collect and structure thoughts of the art of computer science.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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>67</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6895939420740956898.post-8481505884183127320</id><published>2010-09-08T03:05:00.000-07:00</published><updated>2010-09-08T03:20:51.572-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='IIS7'/><title type='text'>MVC custom error problem on IIS7</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_rDCwrFqixSI/TIdjVwG6wpI/AAAAAAAAGMg/rGEdXv1bFd4/s1600/IMG_9423.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 214px;" src="http://3.bp.blogspot.com/_rDCwrFqixSI/TIdjVwG6wpI/AAAAAAAAGMg/rGEdXv1bFd4/s320/IMG_9423.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5514485494080782994" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;From bitter experience I have now learned (once again) how important it is to test your applications in a staging environment which is different from your development machine. &lt;br /&gt;&lt;br /&gt;In this case our problem was customErrors, which looks fantastic on your developer machine, but gets thrown away when you install your application in the IIS 7 server.&lt;br /&gt;&lt;br /&gt;Luckily I found this guys post: &lt;br /&gt;&lt;a href="http://www.west-wind.com/weblog/posts/745738.aspx"&gt;IIS 7 Error Pages taking over 500 Errors&lt;/a&gt; which describes the problem. Only when you use MVC and do some error handling in the controllers, it doesnt arrive to the Application_Error method, as he describes, but instead you should add the "TrySkipIisCustomErrors" in the OnException in each controller. &lt;br /&gt;&lt;code&gt;&lt;br /&gt;protected override void OnException(ExceptionContext filterContext)&lt;br /&gt;{&lt;br /&gt;   string viewName = "MyErrorView";&lt;br /&gt;   System.Web.HttpContext.Current.Response.TrySkipIisCustomErrors = true;&lt;br /&gt;   View(viewName, errorData).ExecuteResult(this.ControllerContext);&lt;br /&gt;   &lt;br /&gt;}&lt;/code&gt;&lt;br /&gt;In any case its always good to do something in the Application_Error method, if nothing else, log any errors which is not handled any other places&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-8481505884183127320?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/8481505884183127320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=8481505884183127320' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/8481505884183127320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/8481505884183127320'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2010/09/mvc-custom-error-problem-on-iis7.html' title='MVC custom error problem on IIS7'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_rDCwrFqixSI/TIdjVwG6wpI/AAAAAAAAGMg/rGEdXv1bFd4/s72-c/IMG_9423.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6895939420740956898.post-2334906912342612556</id><published>2010-06-30T07:30:00.001-07:00</published><updated>2010-06-30T07:32:02.691-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='asp.net 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='70-515'/><title type='text'>71-515 .NET 4 web application developer</title><content type='html'>Finaly Microsoft gave me my result of my Beta exam:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_rDCwrFqixSI/TCtVJQbm5sI/AAAAAAAAGIk/mnIt9NjTwR4/s1600/MCTS(rgb)_1370.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 77px;" src="http://1.bp.blogspot.com/_rDCwrFqixSI/TCtVJQbm5sI/AAAAAAAAGIk/mnIt9NjTwR4/s320/MCTS(rgb)_1370.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5488574188399027906" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I PASSED :D&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-2334906912342612556?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/2334906912342612556/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=2334906912342612556' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/2334906912342612556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/2334906912342612556'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2010/06/71-515-net-4-web-application-developer.html' title='71-515 .NET 4 web application developer'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_rDCwrFqixSI/TCtVJQbm5sI/AAAAAAAAGIk/mnIt9NjTwR4/s72-c/MCTS(rgb)_1370.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6895939420740956898.post-4111109668443485434</id><published>2010-06-30T07:13:00.000-07:00</published><updated>2010-06-30T07:25:54.978-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VS2010'/><title type='text'>Visual Studio 2010 cheat sheet</title><content type='html'>I found the cheat sheet for VS2010: &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=92ced922-d505-457a-8c9c-84036160639f&amp;displaylang=en"&gt;link&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-4111109668443485434?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/4111109668443485434/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=4111109668443485434' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/4111109668443485434'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/4111109668443485434'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2010/06/visual-studio-2010-cheat-sheet.html' title='Visual Studio 2010 cheat sheet'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-8996081894024945491</id><published>2010-06-04T07:43:00.000-07:00</published><updated>2010-06-04T07:46:42.889-07:00</updated><title type='text'>adding dates to a filename in a bat script</title><content type='html'>In case others out there need something so prehistoric as making a bat script which adds a date to a filename for ex when creating a back up with 7-zip. &lt;br /&gt;&lt;br /&gt;The following worked for me: &lt;br /&gt;&lt;br /&gt;&lt;quote&gt;call "c:\Program Files\7-Zip\7z.exe" a -tzip %date:~6,4%-%date:~3,2%-%date:~0,2%.%time:~0,2%-%time:~3,2%-zipFile.zip *.dll&lt;br /&gt;&lt;/quote&gt;&lt;br /&gt;&lt;br /&gt;will zip files into an archive called: &lt;br /&gt;&lt;br /&gt;&lt;quote&gt;&lt;br /&gt;2010-06-04.15-37-zipFile.zip&lt;br /&gt;&lt;/quote&gt;&lt;br /&gt;&lt;br /&gt;Hope it will save you some frustration!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-8996081894024945491?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/8996081894024945491/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=8996081894024945491' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/8996081894024945491'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/8996081894024945491'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2010/06/adding-dates-to-filename-in-bat-script.html' title='adding dates to a filename in a bat script'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-5666551397929967191</id><published>2010-03-04T02:31:00.000-08:00</published><updated>2010-03-04T02:43:56.989-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='asp.net 4.0'/><title type='text'>Prealoading Web Applications</title><content type='html'>On the list of what's new in ASP.NET 4.0 you find &lt;a href="http://msdn.microsoft.com/en-us/library/s57a598e(VS.100).aspx#aspnet_core_services"&gt;"Prealoading Web Applications"&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;If you are running ASP.NET 4.0 on IIS 7.5 you can ask sites to be preloaded when the Internet server starts up (or restarts). &lt;br /&gt;&lt;br /&gt;It sounds cool, and a good thing that you are now able to reload heavy services, but I can help thinking that it is also a solution to a problem which should exist. The IIS should handle the Internet communication, while leaving the heavy data processing to services outside of the IIS. These services would should be implemented as services on the server, No?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-5666551397929967191?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/5666551397929967191/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=5666551397929967191' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/5666551397929967191'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/5666551397929967191'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2010/03/prealoading-web-applications.html' title='Prealoading Web Applications'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-6283829477936512036</id><published>2010-03-04T01:45:00.000-08:00</published><updated>2010-03-04T02:44:24.555-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net certificate'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='70-515'/><category scheme='http://www.blogger.com/atom/ns#' term='70-562'/><title type='text'>70-515. TS: Web Applications Development with Microsoft .NET Framework 4</title><content type='html'>With the &lt;a href="http://blogs.msdn.com/gerryo/archive/2010/02/10/free-certification-exams.aspx#comments"&gt;announcement&lt;/a&gt; of the .NET 4.0 exams, it seems a bit like a wrong career move not to aim for taking the web application development certificate for 4.0 instead of 3.5, since I have already been working with VS2010 for some time now. &lt;br /&gt;&lt;br /&gt;Looking at the &lt;a href="http://www.microsoft.com/learning/en/us/exam.aspx?ID=70-515&amp;locale=en-us#tab2"&gt;Skills Being Measured&lt;/a&gt; List it seems like a good idea to continue studying the  &lt;a href="http://www.amazon.co.uk/MCTS-Self-Paced-Training-Exam-70-562/"&gt;MCTS Self-Paced Training Kit (Exam 70-562)&lt;/a&gt; with a sharp eye to the list of topics.&lt;br /&gt;&lt;br /&gt;Hopefully I will be invited to take a beta exam when they come out in April.&lt;br /&gt;&lt;br /&gt;I guess a good place to start looking into the ASP.NET 4.0 would be &lt;a href="http://msdn.microsoft.com/en-us/library/s57a598e(VS.100).aspx"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here are some of my comments to the elements of What's new:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://tecneck.blogspot.com/2010/03/prealoading-web-applications.html"&gt;Prealoading Web Applications&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-6283829477936512036?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/6283829477936512036/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=6283829477936512036' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/6283829477936512036'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/6283829477936512036'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2010/03/70-515-ts-web-applications-development.html' title='70-515. TS: Web Applications Development with Microsoft .NET Framework 4'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6895939420740956898.post-635004807812027037</id><published>2010-02-09T01:53:00.000-08:00</published><updated>2010-02-09T01:57:18.033-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='ado.net'/><category scheme='http://www.blogger.com/atom/ns#' term='70-562'/><title type='text'>ExecuteScalar doesn't return the return value</title><content type='html'>One thing to remember when making a stored procedure or just simple SQL, which should be executed thought a call of the ExecuteScalar method in .NET: that ExecuteScalar doesn't actually return the return value but the first column of the first row in the result set, or a null reference if no result is found!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-635004807812027037?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/635004807812027037/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=635004807812027037' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/635004807812027037'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/635004807812027037'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2010/02/executescalar-doesnt-return-return.html' title='ExecuteScalar doesn&apos;t return the return value'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-6211231554490729397</id><published>2010-01-07T07:54:00.000-08:00</published><updated>2010-01-07T08:50:18.899-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ado.net'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net 3.5'/><category scheme='http://www.blogger.com/atom/ns#' term='70-562'/><title type='text'>The skitzofrenic DataRow Versions.</title><content type='html'>The &lt;i&gt;DataRow&lt;/i&gt; contains several different versions (&lt;i&gt;DataRowVersion&lt;/i&gt;) of the data it contains and several different RowStates, and of top of that it can be in edit mode or not. This can be a bit complicated grasp, in the following I will try to explain to myself (and any other reader) how it works. &lt;br /&gt;&lt;br /&gt;The &lt;i&gt;RowState&lt;/i&gt; is a description of the rows connection to a DataTable and whether the data is changed. &lt;br /&gt;&lt;br /&gt;The different &lt;i&gt;DataRowVersion&lt;/i&gt; contains the different versions of the data, and can either be: &lt;i&gt;Current&lt;/i&gt;, &lt;i&gt;Original&lt;/i&gt;, &lt;i&gt;Proposed&lt;/i&gt; or a pointer to one of the three (it is usually denoted as the &lt;i&gt;Default&lt;/i&gt;).&lt;br /&gt;&lt;br /&gt;And finally a &lt;i&gt;DataRow&lt;/i&gt; can be in Edit Mode or not. A &lt;i&gt;DataRow&lt;/i&gt; enters and exits this mode when &lt;i&gt;BeginEdit&lt;/i&gt; and &lt;i&gt;EndEdit&lt;/i&gt; is invoked respectively.&lt;br /&gt;&lt;br /&gt;The lifetime of a &lt;i&gt;DataRow&lt;/i&gt; can pass through these &lt;i&gt;RowState&lt;/i&gt;s:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;Detatched&lt;/b&gt;: The &lt;i&gt;DataRow&lt;/i&gt; is created but not attached to any &lt;i&gt;DataTable&lt;/i&gt;. &lt;br /&gt;&lt;li&gt;&lt;b&gt;Added&lt;/b&gt;: The &lt;i&gt;RowState&lt;/i&gt; goes to Added when it is added to a &lt;i&gt;DataTable&lt;/i&gt;.&lt;br /&gt;&lt;li&gt;&lt;b&gt;Unchanged&lt;/b&gt;: If the &lt;code&gt;AcceptChanges&lt;/code&gt; method is invoked, the RowState becomes Unchanged.&lt;br /&gt;&lt;li&gt;&lt;b&gt;Modified&lt;/b&gt;: If the data is modified the &lt;i&gt;RowState&lt;/i&gt; becomes Modified, this is however not true if the current &lt;i&gt;RowState&lt;/i&gt; is Added.&lt;br /&gt;&lt;li&gt;&lt;b&gt;Deleted&lt;/b&gt;: When the &lt;code&gt;Delete&lt;/code&gt; method is invoked.&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;Strangely enough the &lt;i&gt;DataRowVersion&lt;/i&gt;s doesnt really have anything to do with the &lt;i&gt;RowState&lt;/i&gt;, but whether the &lt;i&gt;DataRow&lt;/i&gt; is in Edit Mode or not(or well in &lt;i&gt;RowState&lt;/i&gt; Deleted.&lt;br /&gt;&lt;br /&gt;Before an Edit the default data in the row is found in Current version. In edit mode the default data will be in the Proposed version, while the current version contains the unedited version. &lt;br /&gt;After an Edit the Original version contains the data from before the edit, while the Current version contains the hmm... current version (in other words the Proposed version in Edit mode).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-6211231554490729397?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/6211231554490729397/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=6211231554490729397' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/6211231554490729397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/6211231554490729397'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2010/01/skitzofrenic-datarow-versions.html' title='The skitzofrenic DataRow Versions.'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-2588028750475997224</id><published>2009-11-05T01:30:00.001-08:00</published><updated>2009-11-05T01:31:21.564-08:00</updated><title type='text'>SQL update with INNER JOIN</title><content type='html'>Just a reminder to self:&lt;br /&gt;&lt;br /&gt;update ICD&lt;br /&gt;set ICD.if1_deleted = 'Y'&lt;br /&gt;FROM &lt;br /&gt;      IF1_FILE as ICD INNER JOIN ID1_FILEDET ON IF1_ID = ID1_PARENT&lt;br /&gt;  and ID1_NAME = &lt;SPECIFICID&gt;&lt;br /&gt;  and ID1_VALUE = ''&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-2588028750475997224?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/2588028750475997224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=2588028750475997224' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/2588028750475997224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/2588028750475997224'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2009/11/sql-update-with-inner-join.html' title='SQL update with INNER JOIN'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-9109778017396807408</id><published>2009-11-05T01:29:00.000-08:00</published><updated>2009-11-05T01:30:03.621-08:00</updated><title type='text'>70-536 Passed :)</title><content type='html'>&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-9109778017396807408?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/9109778017396807408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=9109778017396807408' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/9109778017396807408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/9109778017396807408'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2009/11/70-536-passed.html' title='70-536 Passed :)'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-8877738325297946096</id><published>2009-10-23T01:25:00.000-07:00</published><updated>2009-10-23T03:45:46.362-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net certificate'/><category scheme='http://www.blogger.com/atom/ns#' term='70-536'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><title type='text'>Reflecting on a Reflection description</title><content type='html'>I was quite surprised when I arrived at the Reflection chapter in my self training book, because on the first page I found the following:&lt;br /&gt;&lt;br /&gt;&lt;center&gt;&lt;quote&gt;Reflection is useful anytime you need to examine or run code that isn't available at runtime.&lt;/quote&gt;&lt;/center&gt;&lt;br /&gt;&lt;div style="text-align:right"&gt;&lt;i&gt;MTS Self-Paced Training Kit (Exam70-536): Microsoft .NET Framework - Application Development Foundation, SECOND EDITION&lt;/i&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;After I read this, I fear I really need to study Reflection, because the reflection I studied at the university, was exactly the opposite. But I guess just because reflection means something in the Java world doesn't mean that its the same on .NET.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-8877738325297946096?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/8877738325297946096/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=8877738325297946096' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/8877738325297946096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/8877738325297946096'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2009/10/reflecting-on-reflection-description.html' title='Reflecting on a Reflection description'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-4748286999439218538</id><published>2009-10-15T02:40:00.000-07:00</published><updated>2009-10-17T13:29:16.413-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net certificate'/><category scheme='http://www.blogger.com/atom/ns#' term='70-536'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><title type='text'>Code Access Security (CAS)</title><content type='html'>In the .NET framework all assemblies (which run managed code) is running in their own security scope. Which doesn't just depend on the user running the assembly(in respect to the Role-Based security (RBS)) but also on the Code Access Security (CAS).&lt;br /&gt;&lt;br /&gt;The CAS system gathers evidence to identify assemblies to determine which code group the assembly belongs.&lt;br /&gt;&lt;h3&gt;Evidence&lt;/h3&gt;Evidence is data which the CAS collects at runtime to determined the assembly's security level, like a user is identified by username and password.&lt;br /&gt;&lt;br /&gt;Examples of Evidence is:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Applications directory&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Hash&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Publisher&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Site&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Strong Name&lt;/li&gt;&lt;br /&gt;&lt;li&gt;URL&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Zone: The zone in which the assembly is running(Internet Zone, Intranet Zone, or Trusted Zone)&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;permissions &lt;/h3&gt;&lt;br /&gt;There is a long list of things an assembly needs to have permission to do, like sending web requests, read or write files ect. for a complete list look here: &lt;a href="http://msdn.microsoft.com/en-us/library/system.security.permissions.aspx"&gt;(System.Security.Permissions Namespace)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A specific example could be the File dialog permission(&lt;a href="http://msdn.microsoft.com/en-us/library/system.security.permissions.filedialogpermission.aspx"&gt;link&lt;/a&gt;), which specifies whether an assembly may present one to the user. Another permission can be File IO which restricts access to files and folders(&lt;a href="http://msdn.microsoft.com/en-us/library/system.security.permissions.fileiopermission.aspx"&gt;link&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Permission set&lt;/h3&gt;&lt;br /&gt;So, this seems pretty straight forward, a permission set is a set of permissions right, it is a so called ACL (Accesss Control List), which means it is a list of permissions, used by the CAS to verify whether it should give permission/access to an assembly.&lt;br /&gt;&lt;br /&gt;A well known permission set is the Internet default permission set, which contains the following permissions:&lt;ol&gt;&lt;br /&gt;&lt;li&gt;File Dialog&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Isolated Storage File&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Security&lt;/li&gt;&lt;br /&gt;&lt;li&gt;User Interface&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Printing&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;Most are self describing, even if it is worth noting that the Security permission gives the permission to execute, but as with all permissions there are many levels of a permission, look further here &lt;a href="http://msdn.microsoft.com/en-us/library/system.security.permissions.securitypermissionflag.aspx"&gt;SecurityPermissionFlag&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;.Net framework contains seven default permission sets.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Code group&lt;/h3&gt;&lt;br /&gt;Based on the evidence, an Assembly is places in a specific code group. A code group is a user groups provided to RBS, its connects the assemblies with permission sets. A group membership condition is determined by one piece evidence which the assembly should have.&lt;br /&gt;&lt;br /&gt;An assembly can be member of several groups, if so the assembly will receive the union of the permissions in the permission sets. &lt;br /&gt;&lt;br /&gt;Code groups can also be nested inside each other, which allows the manager to make arbitrary complex structures. An example of such a hierarchy is: assemblies with Microsoft strong names is placed in a group called Microsoft_Strong_Name code group, which is contained in My_Computer_Zone code group which again is contained inside All_Code. (in short All_Code-&amp;gt;My_Computer_Zone-&amp;gt;Microsoft_Strong_Name)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- &lt;br /&gt;&lt;h3&gt;Security Policy&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;Okay so all these things together, should also have a term, so we can make different sets of all these things, and these sets is called a security policy. &lt;br /&gt;&lt;br /&gt;A security policy is a logical grouping of code groups and permission sets. The security policy is used to group the security into levels. There are four default security policy levels; Enterprise, machine, User and Application Domain.&lt;br /&gt;&lt;br /&gt;Since these overlap an assembly's permission set is the intersection of the policies.&lt;br /&gt;&lt;br /&gt;By default, the Enterprise and User security policies grant all code full trust. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Put It All Together&lt;/h3&gt;&lt;br /&gt;The system administrator can make security policies for the hole network (enterprise security policy), for each computer, for each user, and application domain. &lt;br /&gt;&lt;br /&gt;Inside each policy he might look at the different code groups (fx. My_Computer_Zone, LocalIntranet_Zone, Internet_Zone) and check permission set of the groups. &lt;br /&gt;&lt;br /&gt;When an assembly is loaded, the system will look at the evidence, and figure out which groups the assembly is in. then all the permissions of these groups are joined, but then you have to take the intersection of the policies, meaning that the policy which is most restrictive sets the permissions. when all this is finished the CAS will compare notes with the RBS of the operation system, and again choose the most restrictive set of permissions. This is also called &lt;a href="http://msdn.microsoft.com/en-us/library/c5tk9z76.aspx"&gt;Security stack walk&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-4748286999439218538?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/4748286999439218538/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=4748286999439218538' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/4748286999439218538'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/4748286999439218538'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2009/10/code-access-security-cas.html' title='Code Access Security (CAS)'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-9063230790334282252</id><published>2009-10-07T05:08:00.000-07:00</published><updated>2009-10-07T05:17:11.919-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='70-503'/><category scheme='http://www.blogger.com/atom/ns#' term='System.Drawing'/><category scheme='http://www.blogger.com/atom/ns#' term='.net certificate'/><category scheme='http://www.blogger.com/atom/ns#' term='70-536'/><title type='text'>System.Drawing for backend programmers... hmm</title><content type='html'>On my quest to become certified microsoft programmer I have arrived at chapter 6 in my self paced training kit for exam 70-536. Which is about drawing graphics. So far I have seen the logic in the topics that every Microsoft certified something should know - reading from files, using different encodings, but drawing graphices, is a bit of a strange topic to put in the basic certificate. Especially when you take it to be allowed to take 70-503 exam which will enable you to call yourself Microsoft Certified Technology Specialist (MCTS) in .NET Framework 3.5, Windows Communication Foundation, which is about communication in distributed systems. &lt;br /&gt;&lt;br /&gt;Anyway, now I have just learned to make a jpg file with the following picture: &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_rDCwrFqixSI/SsyF3UnKVKI/AAAAAAAAF2c/LsAihBKpC_k/s1600-h/bm.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 320px;" src="http://2.bp.blogspot.com/_rDCwrFqixSI/SsyF3UnKVKI/AAAAAAAAF2c/LsAihBKpC_k/s320/bm.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5389830039527904418" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Which I am sure will come in handy next time I develop a WCF web service, or create a distributed application. &lt;br /&gt;&lt;br /&gt;Did it with the following code: (more or less taken from the book)&lt;br /&gt;&lt;quote&gt;&lt;br /&gt;            Bitmap bm = new Bitmap(600, 600);&lt;br /&gt;            Graphics g = Graphics.FromImage(bm);&lt;br /&gt;&lt;br /&gt;            Brush brush = new LinearGradientBrush(new Point(1, 1), &lt;br /&gt;                                                  new Point(600, 600), &lt;br /&gt;                                                  Color.White, Color.Red);&lt;br /&gt;            Point[] points = {&lt;br /&gt;                                 new Point(77,500)&lt;br /&gt;                                 , new Point(590, 100)&lt;br /&gt;                                 , new Point(250, 590)&lt;br /&gt;                                 , new Point(300, 410)&lt;br /&gt;                             };&lt;br /&gt;            g.FillPolygon(brush, points);&lt;br /&gt;            bm.Save("bm.jpg", ImageFormat.Jpeg);&lt;br /&gt;&lt;/quote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-9063230790334282252?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/9063230790334282252/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=9063230790334282252' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/9063230790334282252'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/9063230790334282252'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2009/10/systemdrawing-for-backend-programmers.html' title='System.Drawing for backend programmers... hmm'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_rDCwrFqixSI/SsyF3UnKVKI/AAAAAAAAF2c/LsAihBKpC_k/s72-c/bm.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6895939420740956898.post-3881288043191233270</id><published>2009-10-03T03:30:00.000-07:00</published><updated>2009-10-03T03:39:06.895-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='70-536'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='70-536 objective'/><title type='text'>Streams and readers/writers</title><content type='html'>Finished chapter 2 in the 70-536 training kit book about IO (input/output)&lt;br /&gt;&lt;br /&gt;I imagine things like this metaphor: imagine that you have an old tape recorder. You have you tapes and a machine to read it, and record it. &lt;br /&gt;&lt;br /&gt;A tape is basically just a stream, which is ready to be read or written in a specific place. The same is the case with the streams in .NET. In the .NET framework is just nice enough to rewind the tapes every time you take out the tape from the machine. &lt;br /&gt;&lt;br /&gt;A tape is best used with a reader/writer so to use the stream a reader is created, or to record something a writer is created. &lt;br /&gt;&lt;br /&gt;Then there are different kinds of tapes, some are IsolatedFiles which can only be read by your machine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-3881288043191233270?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/3881288043191233270/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=3881288043191233270' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/3881288043191233270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/3881288043191233270'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2009/10/streams-and-readerswriters.html' title='Streams and readers/writers'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-5379223291643134127</id><published>2009-09-30T08:08:00.000-07:00</published><updated>2009-09-30T08:09:31.056-07:00</updated><title type='text'>70-536 exam links</title><content type='html'>A list of links which I found that was interesting for the certificate. (will be updated)&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Nice friendly blogger who has decided to make a link to a page that describes every aspect of the 70-536 exam &lt;a href="http://certsandprogs.blogspot.com/2009/09/70-536-checklist-part-1.html"&gt;link&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-5379223291643134127?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/5379223291643134127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=5379223291643134127' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/5379223291643134127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/5379223291643134127'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2009/09/70-536-exam-links.html' title='70-536 exam links'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-5539569785782244212</id><published>2009-09-27T03:25:00.001-07:00</published><updated>2009-09-27T09:23:49.870-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='70-503'/><category scheme='http://www.blogger.com/atom/ns#' term='.net certificate'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='learning WCF'/><title type='text'>WCF service behavior</title><content type='html'>Unlike the contracts and the addresses a behavior does not always affect both client and server. A behavior can be local and affect only the server sides way of processes the messages.&lt;br /&gt;&lt;br /&gt;A behavior is not exposed as part of metadata.&lt;br /&gt;&lt;br /&gt;A behavior can either be a service behavior or an endpoint behavior:&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Service Behaviors (behaviors which implement IServiceBehavior&lt;/h3&gt;&lt;br /&gt;A typical service behavior is the debug logging behavior, which is enabled by adding a serviceBehavior in the config file.&lt;br /&gt;&lt;br /&gt;Like this:&lt;br /&gt;        &amp;lt;behaviors&amp;gt;&lt;br /&gt;          &amp;lt;serviceBehaviors&amp;gt;&lt;br /&gt;            &amp;lt;behavior name="serviceBehavior"&amp;gt;&lt;br /&gt;              &amp;lt;serviceDebug includeExceptionDetailInFaults="true"/&amp;gt;&lt;br /&gt;            &amp;lt;/behavior&amp;gt;&lt;br /&gt;          &amp;lt;/serviceBehaviors&amp;gt;&lt;br /&gt;        &amp;lt;/behaviors&amp;gt;&lt;br /&gt;&lt;br /&gt;One thing that is important to remember is to associate the service with this behavoir. like this:&lt;br /&gt;&lt;br /&gt;        &amp;lt;services&amp;gt;&lt;br /&gt;            &amp;lt;service &lt;b&gt;behaviorConfiguration="ServiceBehavior"&lt;/b&gt; name="host.HelloIndigoService"&amp;gt;&lt;br /&gt;                [...]&lt;br /&gt;                &amp;lt;/service&amp;gt;&lt;br /&gt;&lt;br /&gt;Behaviors can of cause also be added programmatically. &lt;br /&gt;  &lt;br /&gt;&lt;h3&gt;Endpoint Behaviors(behaviors which implement IEndpointBehavior&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;A endpoint behavior is defined in the same way, but here its not associate with a service but with the actual endpoint.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-5539569785782244212?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/5539569785782244212/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=5539569785782244212' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/5539569785782244212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/5539569785782244212'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2009/09/wcf-service-behavior.html' title='WCF service behavior'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6895939420740956898.post-7663345593412411289</id><published>2009-09-27T02:42:00.000-07:00</published><updated>2009-09-27T03:03:45.242-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net certificate'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='learning WCF'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>WCF Metadata Exchange (mex)</title><content type='html'>To my understanding, metadata exchange (in WCF) means whether the service will offer a WSDL or other types of metadata to a client to enable them to autogenerate a proxy for the web services. &lt;br /&gt;&lt;br /&gt;By default it is not enabled to exchange metadata, so its something that has to be added as an extra endpoint. &lt;br /&gt;&lt;br /&gt;The endpoint works as any other endpoint (see &lt;a href="http://tecneck.blogspot.com/2009/09/wcf-service-endpoint.html"&gt;link&lt;/a&gt;), where the contract type &lt;a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.description.imetadataexchange.aspx"&gt;IMetadataExchange&lt;/a&gt; is mandatory. This contract type is a predefined service contract which is found in System.ServiceModel.Description &lt;a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.description.aspx"&gt;namespace&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The endpoint can have different kinds of bindings like MexHttpBinding (meaning HTTP), MexHttpsBinding (HTTPS)&lt;br /&gt;&lt;br /&gt;From a web service perspective it seems a bit strange that you would have to specifically add an endpoint to allow metadata transfer. But since WCF is a general communication framework I'm sure there is lots of places where its better not to have a service sending out metadata.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-7663345593412411289?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/7663345593412411289/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=7663345593412411289' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/7663345593412411289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/7663345593412411289'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2009/09/wcf-metadata-exchange-mex.html' title='WCF Metadata Exchange (mex)'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-8327154289690308022</id><published>2009-09-27T02:00:00.000-07:00</published><updated>2009-09-27T02:39:10.853-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net certificate'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='learning WCF'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>WCF service endpoint</title><content type='html'>An endpoint is defined by an address, contract and binding.&lt;br /&gt;&lt;br /&gt;A address can be defined in the following ways (in the config file) either as implicit using the base address (which is required to be defined):&lt;br /&gt;&lt;br /&gt;&amp;lt;endpoint binding="basicHttpBinding" name="basicHttp" contract="Host.ItecneckService" /&amp;gt; &lt;br /&gt;&lt;br /&gt;Which would make the service address: "http://localhost:8000/tecneck/"&lt;br /&gt;or as a relative url:&lt;br /&gt;&lt;br /&gt;&amp;lt;endpoint &lt;b&gt;address="TecneckService"&lt;/b&gt; binding="basicHttpBinding" name="basicHttp" contract="Host.ItecneckService" /&amp;gt; &lt;br /&gt;&lt;br /&gt;making the url: "http://localhost:8000/tecneck/TecneckService"&lt;br /&gt;&lt;br /&gt;or full url:&lt;br /&gt;&lt;br /&gt;&amp;lt;endpoint &lt;b&gt;address="http://localhost:8000/tecneck/TecneckService"&lt;/b&gt; binding="basicHttpBinding" name="basicHttp" contract="Host.ItecneckService" /&amp;gt; &lt;br /&gt;&lt;br /&gt;The base address is added like this (under the &amp;lt;service&amp;gt; tag):&lt;br /&gt;&amp;lt;host&amp;gt;&lt;br /&gt;  &amp;lt;baseAddresses&amp;gt;&lt;br /&gt;    &amp;lt;add baseAddress="http://localhost:8000/tecneck"/&amp;gt;&lt;br /&gt;  &amp;lt;/baseAddresses&amp;gt;&lt;br /&gt;&amp;lt;/host&amp;gt;&lt;br /&gt;&lt;br /&gt;A Service can have several endpoints but they have to be unique, and differ in either address, contract or transport protocol. There can be several reasons why a service would have multiple endpoints for example:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;The service implements several contracts, which could each need their own endpoint&lt;/li&gt;&lt;br /&gt;&lt;li&gt;More the one protocol should be supported&lt;/li&gt;&lt;br /&gt;&lt;li&gt;same service must be accessible by clients with different binding requirements, possibly related to security, reliable messaging, or transactions.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-8327154289690308022?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/8327154289690308022/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=8327154289690308022' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/8327154289690308022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/8327154289690308022'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2009/09/wcf-service-endpoint.html' title='WCF service endpoint'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-4970250464910307243</id><published>2009-09-17T03:40:00.000-07:00</published><updated>2009-09-17T03:46:53.498-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pomodoro technique'/><title type='text'>The Pomorodo order</title><content type='html'>One of the things I have realised after I started using the Pomorodo technique, is that I am very bad at working on one thing at the time. Not working and chatting, or checking emails and so on, but continue and finish working on one task without working on other problems also. &lt;br /&gt;&lt;br /&gt;So I set a mark at the task I'm working on, when I start, so I don't get tempted to shift between them :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-4970250464910307243?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/4970250464910307243/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=4970250464910307243' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/4970250464910307243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/4970250464910307243'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2009/09/pomorodo-order.html' title='The Pomorodo order'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-1763184386367251194</id><published>2009-09-08T07:21:00.000-07:00</published><updated>2009-09-08T08:15:57.432-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='methodology'/><category scheme='http://www.blogger.com/atom/ns#' term='pomodoro technique'/><title type='text'>How do you keep the pauses short with the Pomodoro Technique?</title><content type='html'>After half a day of using the Pomodoro technique, it seems that my biggest problem is to keep the breaks between the pomodoro's (or is it pomodori as it would be in Italian) short. Because my purposeful going away from work always enters in a conversation with a colleague which everybody knows takes a lot more than 3-5 minutes in Rome, or reading an article online... &lt;br /&gt;&lt;br /&gt;On the other hand it also seems a bit hash to start putting a clock on the pauses... hmm what to do?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-1763184386367251194?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/1763184386367251194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=1763184386367251194' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/1763184386367251194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/1763184386367251194'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2009/09/how-do-you-keep-pauses-short-with.html' title='How do you keep the pauses short with the Pomodoro Technique?'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-3350027346814623023</id><published>2009-09-08T01:46:00.000-07:00</published><updated>2009-09-08T05:51:47.314-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='methodology'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><category scheme='http://www.blogger.com/atom/ns#' term='pomodoro technique'/><title type='text'>Doing the pomodoro technique.</title><content type='html'>Today on facebook I saw a friend mention a new agile technique called the pomodoro technique. Since Im doing a lot of documentation these days, and not really that motivate, I tought that it would be fun to try. &lt;br /&gt;&lt;br /&gt;I found a &lt;a href="http://blog.staffannoteberg.com/2008/02/22/pomodoro-technique-in-5-minutes/"&gt;pomodoro-technique-in-5-minutes post&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;After skimming the post, I am now ready with my pen, three sheets (Records sheet, Activity Inventory sheet and To Do Today sheet), to start out using this pomodoro technique. &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_rDCwrFqixSI/SqZTTYCNdjI/AAAAAAAAF1k/NA2ETtTMGuw/s1600-h/IMGP9185.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://3.bp.blogspot.com/_rDCwrFqixSI/SqZTTYCNdjI/AAAAAAAAF1k/NA2ETtTMGuw/s320/IMGP9185.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5379078397274977842" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Still feel a bit unsure about the Records sheet, but hopefully Im going to figure that out in my first pomodoro: "Read the pomodoro technique book". Since I have a lot to do I will only allow one pomodoro for this, and read the rest later. &lt;br /&gt;&lt;br /&gt;book is downloadable here: http://www.pomodorotechnique.com/.&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;So first pomodoro is finished, and I read concentrated in his book about how to continue using his technique. First I love the fact that it is an Italian who came up with the idea, living in Rome I don't really feel that Italians have much need for structuring their time too carefully. &lt;br /&gt;&lt;br /&gt;Francesco Cirillo explains that you should add a "'" in your "To Do Today" sheet when ever you get an impulse to do something else, checking email, check facebook ect. and write it down on your list of things to do either on the "To Do Today" list or the Activity Inventory sheet if it doesn't need to be done today. &lt;br /&gt;&lt;br /&gt;Even if I only read the first 20 pages of the book (45 in total) I see I need to priorities my work day a bit, and focus on the things I need to finish, and read the rest of the book tonight ( should I put it on the Activity list :)). &lt;br /&gt;&lt;br /&gt;http://www.pomodorotechnique.com/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-3350027346814623023?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/3350027346814623023/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=3350027346814623023' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/3350027346814623023'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/3350027346814623023'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2009/09/doing-pomodoro-technique.html' title='Doing the pomodoro technique.'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_rDCwrFqixSI/SqZTTYCNdjI/AAAAAAAAF1k/NA2ETtTMGuw/s72-c/IMGP9185.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6895939420740956898.post-4220849415192492914</id><published>2009-06-16T07:09:00.000-07:00</published><updated>2009-07-20T09:02:41.724-07:00</updated><title type='text'>Visual Studio 2005 short cuts</title><content type='html'>Its important to know your tools. So here follows a quick list of short cuts for VS2005. (for a complete list (found it after I wrote everything below &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=c15d210d-a926-46a8-a586-31f8a2e576fe&amp;amp;DisplayLang=en"&gt;link&lt;/a&gt;)&lt;table class="post" summary="Shotcuts" border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt; &lt;tr&gt;&lt;td&gt;Clipboard History&lt;/td&gt;&lt;td&gt;Ctrl+shift+V&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt; &lt;tr&gt;&lt;td&gt;Opens object browser&lt;/td&gt;&lt;td&gt;CTRL+K, CTRL+R&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt; &lt;tr&gt;&lt;td&gt;Delete the selected line.&lt;/td&gt;&lt;td&gt;CTRL+Shift+L&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt; &lt;tr&gt;&lt;td&gt;cuts the selected line into the paste buffer.&lt;/td&gt;&lt;td&gt;CTRL+L&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt; &lt;tr&gt; &lt;td&gt;Transpose Words&lt;/td&gt; &lt;td&gt;CTRL+Shift+T&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt; &lt;tr&gt; &lt;td&gt;Show Solution Explorer&lt;/td&gt;&lt;td&gt;CTRL+ALT+L&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt; &lt;tr&gt; &lt;td&gt;Show Toolbox&lt;/td&gt; &lt;td&gt;CTRL+ALT+X&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt; &lt;tr&gt; &lt;td&gt;CTRL+BREAK &lt;/td&gt; &lt;td&gt;Cancel Build&lt;/td&gt; &lt;/tr&gt;&lt;br /&gt; &lt;tr&gt; &lt;td&gt;Build Solution&lt;/td&gt;&lt;td&gt;CTRL+SHIFT+B&lt;/td&gt; &lt;/tr&gt;&lt;br /&gt; &lt;tr&gt; &lt;td&gt;Start without debugging&lt;/td&gt; &lt;td&gt;CTRL+F5&lt;/td&gt; &lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;h2&gt;Debugging&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;&lt;table class="post" summary="Shotcuts" border="0" cellpadding="0" cellspacing="0"&gt;&lt;br /&gt; &lt;tbody&gt;&lt;br /&gt;  &lt;tr&gt;&lt;td&gt;Step Into&lt;/td&gt; &lt;td&gt;F11&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;  &lt;tr&gt;&lt;td&gt;Step Over&lt;/td&gt; &lt;td&gt; F10&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;  &lt;tr&gt;&lt;td&gt;New Breakpoint&lt;/td&gt; &lt;td&gt;CTRL+B&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;  &lt;tr&gt;&lt;td&gt;Next error or warning location&lt;/td&gt; &lt;td&gt;F8&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;  &lt;tr&gt;&lt;td&gt;CTRL+SPACE&lt;/td&gt; &lt;td&gt;Complete Word, this one's brilliant - no need to type in the full variable name type in few letters and hit this key combination&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;  &lt;tr&gt;&lt;td&gt;Comment selected area&lt;/td&gt; &lt;td&gt;CTRL+K,CTRL+C&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;  &lt;tr&gt;&lt;td&gt;Uncomment selected area&lt;/td&gt; &lt;td&gt;CTRL+K,CTRL+U&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Search&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;&lt;table class="post" summary="Shotcuts" border="0" cellpadding="0" cellspacing="0"&gt;&lt;br /&gt; &lt;tbody&gt;&lt;br /&gt;  &lt;tr&gt;&lt;td&gt;Search and replace in entire solution&lt;/td&gt; &lt;td&gt;Ctrl+Shift+H&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;  &lt;tr&gt;&lt;td&gt;Incremental search&lt;/td&gt; &lt;td&gt;Ctrl+I&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;  &lt;tr&gt;&lt;td&gt;Incremental search backwards&lt;/td&gt; &lt;td&gt;Ctrl+shift+I&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;  &lt;tr&gt;&lt;td&gt;Find Next&lt;/td&gt; &lt;td&gt;F3&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;  &lt;tr&gt;&lt;td&gt;Find Previous&lt;/td&gt; &lt;td&gt;SHIFT+F3&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Plan to expand it, until I find the one that I am looking for.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-4220849415192492914?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/4220849415192492914/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=4220849415192492914' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/4220849415192492914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/4220849415192492914'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2009/06/visual-studio-2005-short-cuts.html' title='Visual Studio 2005 short cuts'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-4310971373929711410</id><published>2009-02-27T01:53:00.000-08:00</published><updated>2009-02-27T02:09:49.125-08:00</updated><title type='text'>Easy way to make UML Sequence Diagrams</title><content type='html'>It is often very useful to make an UML sequence diagram, to explain functionality to a customer or colleagues (or simply to yourself). Here is a simple and easy site to make simple ones:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.websequencediagrams.com/"&gt;http://www.websequencediagrams.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can even embed on in your own site, by following the tutorial here &lt;a href="http://www.websequencediagrams.com/embedding.html"&gt;link&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;an example could be:&lt;br /&gt;&lt;div class=wsd wsd_style="modern-blue" &gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;Alice-&gt;Bob: Authentication Request&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;script type="text/javascript" src="http://www.websequencediagrams.com/service.js"&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-4310971373929711410?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/4310971373929711410/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=4310971373929711410' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/4310971373929711410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/4310971373929711410'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2009/02/easy-way-to-make-uml-sequence-diagrams.html' title='Easy way to make UML Sequence Diagrams'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-3019734053962326588</id><published>2009-01-08T01:46:00.000-08:00</published><updated>2009-01-08T01:51:23.507-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='&quot;XML schema&quot;'/><title type='text'>Default values of minOccurs and maxOccurs</title><content type='html'>The default values of minOccurs and maxOccurs is 1. Meaning that the following XML schema element allows zero or one element:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;xs:element name="realmCode" type="CS" minoccurs="0"&amp;gt;&amp;lt;/xs:element&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;while:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;xs:element name="realmCode" type="CS"&amp;gt;&lt;br /&gt;&amp;lt;/xs:element&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;allows one and only one.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.w3.org/TR/xmlschema-0/#ref6"&gt;W3 specification&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-3019734053962326588?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/3019734053962326588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=3019734053962326588' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/3019734053962326588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/3019734053962326588'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2009/01/default-values-of-minoccurs-and.html' title='Default values of minOccurs and maxOccurs'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-3427194842395109519</id><published>2008-12-18T05:40:00.000-08:00</published><updated>2009-01-08T01:53:01.665-08:00</updated><title type='text'>Guide to understanding flow charts</title><content type='html'>click on picture to get it in full size:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://imgs.xkcd.com/comics/flow_charts.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 740px; height: 534px;" src="http://imgs.xkcd.com/comics/flow_charts.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-3427194842395109519?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/3427194842395109519/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=3427194842395109519' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/3427194842395109519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/3427194842395109519'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2008/12/guide-to-understanding-flow-charts.html' title='Guide to understanding flow charts'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-3549435149773960063</id><published>2008-10-27T04:49:00.000-07:00</published><updated>2009-02-27T01:51:40.718-08:00</updated><title type='text'>Have WSDL or XSD; Need c# Class Interface</title><content type='html'>When you want to access a external web service inside you .NET c# code, you take the WSDL and generate a stub class.&lt;br /&gt;&lt;br /&gt;To do this you can use the WSDL.exe which can be found inside the Visual studio folders (in my case here: &lt;code&gt; "C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\wsdl.exe" &lt;/code&gt;) &lt;br /&gt;&lt;p&gt;&lt;br /&gt;Microsoft link: &lt;a href="http://msdn.microsoft.com/en-us/library/7h3ystb6.aspx"&gt;link&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;If you on the other hand wants to use some classes described in an XML-file, you should instead use xsd.exe&lt;br /&gt;&lt;br /&gt;&lt;code&gt;C:\projects\ebXML&gt;xsd.exe rim.xsd /classes&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;that will autogenerate  .NET c# classes for each element in the xsd.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-3549435149773960063?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/3549435149773960063/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=3549435149773960063' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/3549435149773960063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/3549435149773960063'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2008/10/have-wsdl-or-xsd-need-c-class-interface.html' title='Have WSDL or XSD; Need c# Class Interface'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-3488535941932571711</id><published>2008-07-31T06:15:00.000-07:00</published><updated>2008-07-31T06:18:58.560-07:00</updated><title type='text'>Find dublicates when SQL is your friend</title><content type='html'>Just to remember it another day. If you want to find which elements there is more then one time. &lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;SELECT CODE&lt;br /&gt;FROM table &lt;br /&gt;GROUP BY CODE&lt;br /&gt;HAVING count(CODE) &gt; 1 &lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;It helped me a lot, so I hope you, my reader can utilise it as well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-3488535941932571711?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/3488535941932571711/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=3488535941932571711' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/3488535941932571711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/3488535941932571711'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2008/07/find-dublicates-when-sql-is-your-friend.html' title='Find dublicates when SQL is your friend'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-1366191245741282987</id><published>2008-07-01T01:24:00.000-07:00</published><updated>2008-07-02T06:14:45.971-07:00</updated><title type='text'>Add entry macro in my word document</title><content type='html'>I am using a word document, to document may daily tasks and doings. And as the good geek I am, I wanted to implement a macro in MS word to make a day entry at the punch of a short cut.&lt;br /&gt;&lt;br /&gt;After playing alot with the anything-but-intuitive vb I finally finished the following macro:&lt;br /&gt;&lt;br /&gt;Sub addEntry()&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;'&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;' addEntry Macro&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;' Macro recorded 4/7/2008 by kim&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;'&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(0, 153, 0);"&gt;' write headline ("Diario di bordo &lt;date&gt;")&lt;/date&gt;&lt;/span&gt;&lt;br /&gt;  Selection.Font.Name = &lt;span style="color: rgb(204, 0, 0);"&gt;"Courier New"&lt;/span&gt;&lt;br /&gt;  Selection.Font.Bold = True&lt;br /&gt;  Selection.Font.Underline = True&lt;br /&gt;  Selection.TypeText Text:=&lt;span style="color: rgb(204, 0, 0);"&gt;"Diario di bordo "&lt;/span&gt;&lt;br /&gt;  Selection.InsertDateTime DateTimeFormat:=&lt;span style="color: rgb(204, 0, 0);"&gt;"dd/MM/yyyy HH:mm:ss"&lt;/span&gt;, _&lt;br /&gt;      InsertAsField:=False, DateLanguage:=wdItalian, CalendarType:= _&lt;br /&gt;      wdCalendarWestern, InsertAsFullWidth:=False&lt;br /&gt;  Selection.TypeParagraph&lt;br /&gt;  Selection.Style = ActiveDocument.Styles(&lt;span style="color: rgb(204, 0, 0);"&gt;"Normal"&lt;/span&gt;)&lt;br /&gt;  &lt;br /&gt;  &lt;span style="color: rgb(0, 153, 0);"&gt;' add bold headline ("Should-does:")&lt;/span&gt;&lt;br /&gt;  Selection.Font.Bold = wdToggle&lt;br /&gt;  Selection.TypeText Text:=&lt;span style="color: rgb(204, 0, 0);"&gt;"Should-dos:"&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(0, 153, 0);"&gt;' add point lists.&lt;/span&gt;&lt;br /&gt;  Selection.TypeParagraph&lt;br /&gt;  Selection.MoveUp Unit:=wdLine, Count:=1&lt;br /&gt;  Selection.TypeParagraph&lt;br /&gt;  Selection.MoveDown Unit:=wdLine, Count:=1&lt;br /&gt;  Selection.Style = ActiveDocument.Styles(&lt;span style="color: rgb(204, 0, 0);"&gt;"List Bullet"&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;' if it is friday, add "Write Status report" to bullet list.&lt;/span&gt;&lt;br /&gt;today = Weekday(Date$, vbMonday)&lt;br /&gt;If (today = vbFriday) Then&lt;br /&gt;    Selection.TypeText Text:="Write Status report"&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;  Selection.TypeParagraph&lt;br /&gt;  Selection.TypeParagraph&lt;br /&gt;  Selection.MoveRight Unit:=wdCharacter, Count:=1&lt;br /&gt;  Selection.MoveLeft Unit:=wdCharacter, Count:=1&lt;br /&gt;  &lt;span style="color: rgb(0, 153, 0);"&gt;' remove type type.&lt;/span&gt;&lt;br /&gt;  Selection.Range.ListFormat.RemoveNumbers NumberType:=wdNumberParagraph&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;Which does exactly as I have described in the comments (the stuff in green). And produces the following in my diary.&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;style&gt; &lt;!--  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal  {mso-style-parent:"";  margin:0cm;  margin-bottom:.0001pt;  mso-pagination:widow-orphan;  font-size:12.0pt;  font-family:"Times New Roman";  mso-fareast-font-family:"Times New Roman";} p.MsoListBullet, li.MsoListBullet, div.MsoListBullet  {margin-top:0cm;  margin-right:0cm;  margin-bottom:0cm;  margin-left:18.0pt;  margin-bottom:.0001pt;  text-indent:-18.0pt;  mso-pagination:widow-orphan;  mso-list:l0 level1 lfo1;  tab-stops:list 18.0pt;  font-size:12.0pt;  font-family:"Times New Roman";  mso-fareast-font-family:"Times New Roman";} @page Section1  {size:612.0pt 792.0pt;  margin:72.0pt 90.0pt 72.0pt 90.0pt;  mso-header-margin:36.0pt;  mso-footer-margin:36.0pt;  mso-paper-source:0;} div.Section1  {page:Section1;}  /* List Definitions */  @list l0  {mso-list-id:-119;  mso-list-type:simple;  mso-list-template-ids:-196833094;} @list l0:level1  {mso-level-number-format:bullet;  mso-level-style-link:"List Bullet";  mso-level-text:;  mso-level-tab-stop:18.0pt;  mso-level-number-position:left;  margin-left:18.0pt;  text-indent:-18.0pt;  font-family:Symbol;} ol  {margin-bottom:0cm;} ul  {margin-bottom:0cm;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable  {mso-style-name:"Table Normal";  mso-tstyle-rowband-size:0;  mso-tstyle-colband-size:0;  mso-style-noshow:yes;  mso-style-parent:"";  mso-padding-alt:0cm 5.4pt 0cm 5.4pt;  mso-para-margin:0cm;  mso-para-margin-bottom:.0001pt;  mso-pagination:widow-orphan;  font-size:10.0pt;  font-family:"Times New Roman";  mso-ansi-language:#0400;  mso-fareast-language:#0400;  mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class="MsoListBullet" style=""&gt;&lt;b style=""&gt;&lt;u&gt;&lt;span style=";font-family:&amp;quot;;"  lang="IT"&gt;Diario di bordo 01/07/2008 17:43:57&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="" lang="IT"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="" lang="IT"&gt;Should-dos:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoListBullet"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Symbol;"&gt;&lt;span style=""&gt;·&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoListBullet"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Symbol;"&gt;&lt;span style=""&gt;·&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr /&gt;(sorry the mess of HTML (if you look in "document source" of this HTML, its pretty ugly, but I just did a copy paste from Word).&lt;br /&gt;&lt;br /&gt;If its a friday, it will add the "Write status report" to the list of "Should dos"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-1366191245741282987?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/1366191245741282987/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=1366191245741282987' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/1366191245741282987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/1366191245741282987'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2008/07/add-entry-macro-in-my-word-document.html' title='Add entry macro in my word document'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-5590787232428928819</id><published>2008-06-26T06:21:00.001-07:00</published><updated>2008-06-26T06:40:25.260-07:00</updated><title type='text'>c# with XmlDocument and xpaths</title><content type='html'>Im almost embarrassed to admit it but I have spend almost a day playing around with the XmlDocument .NET class and xpaths. My problem was that I have the XML shown below(only a snipped of it is pasted below)&lt;br /&gt;&lt;br /&gt;And wanted to get hold of the "id" tag inside patient. To do this I found that the fast way was to use the method &lt;span style="font-family:courier new;"&gt;SelectSingleNode&lt;/span&gt; to and a xpath expression like the following:&lt;br /&gt;&lt;br /&gt;"&lt;span style="font-family: courier new;"&gt;/ClinicalDocument/recordTarget/patientRole/id&lt;/span&gt;". &lt;br /&gt;&lt;br /&gt;In the following way:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;XmlDocument xml = new XmlDocument();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;xml.LoadXml(cda.Xmlcda);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;XmlNode node = xml.SelectSingleNode("/ClinicalDocument/recordTarget/patientRole/id");&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;But no element was found. I tried quite a lot of different stuff. But nothing worked.&lt;br /&gt;&lt;br /&gt;Until finally I found this article: (&lt;a href="http://developers.slashdot.org/developers/02/05/30/002252.shtml?tid=156"&gt;link&lt;/a&gt;) (which I only skimmed(to be completely honest))which described the funny thing that even if the elements is not prefixed in the XML the base namespace is used anyway. So to enable me to Xpath my way to the patient Id tag I needed a XmlNameSpaceManager to handle the namespaces.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The working code looks like this:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;XmlDocument xml = new XmlDocument();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; xml.LoadXml(cda.Xmlcda);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;XmlNamespaceManager nsmgr = new XmlNamespaceManager(xml.NameTable);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;nsmgr.AddNamespace("cda", "urn:hl7-org:v3");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; XmlNode node = xml.SelectSingleNode("/ClinicalDocument/recordTarget/patientRole/id", nsmgr);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The XML:&lt;br /&gt;&lt;quote&gt;&lt;br /&gt;&amp;lt;!-- ?xml-stylesheet type="text/xsl" href="CDA.xsl"? --&amp;gt;&lt;br /&gt;&amp;lt;!-- Readers should be aware of the evolving "Using SNOMED CT in HL7 Version 3" implementation guide, currently in a draft state. The guide, co-developed by HL7 and the College of American Pathologists, will be balloted by HL7 as an Informative Document. Recommendations in the final published guide should usurp patterns of SNOMED CT usage found in this sample instance. --&amp;gt;&lt;br /&gt;&amp;lt;clinicaldocument xmlns="urn:hl7-org:v3" voc="urn:hl7-org:v3/voc"&lt;br /&gt;                           xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;                           schemalocation="urn:hl7-org:v3 CDA.xsd"&amp;gt;&lt;br /&gt; &amp;lt;!--  ********************************************************   CDA Header ******************************************************** --&amp;gt;&lt;br /&gt; &amp;lt;typeid root="2.16.840.1.113883.1.3" extension="POCD_HD000040"&amp;gt;&lt;br /&gt; &amp;lt;templateid root="2.16.840.1.113883.3.27.1776"&amp;gt;&lt;br /&gt; &amp;lt;id extension="c266" root="2.16.840.1.113883.19.4"&amp;gt;&lt;br /&gt; &amp;lt;code code="11488-4" codesystem="2.16.840.1.113883.6.1" codesystemname="LOINC" displayname="Consultation note"&amp;gt;&lt;br /&gt; &amp;lt;title&amp;gt;Good Health Clinic Consultation Note&amp;lt;/title&amp;gt;&lt;br /&gt; &amp;lt;effectivetime value="20000407"&amp;gt;&lt;br /&gt; &amp;lt;confidentialitycode code="N" codesystem="2.16.840.1.113883.5.25"&amp;gt;&lt;br /&gt; &amp;lt;languagecode code="en-US"&amp;gt;&lt;br /&gt; &amp;lt;setid extension="BB35" root="2.16.840.1.113883.19.7"&amp;gt;&lt;br /&gt; &amp;lt;versionnumber value="2"&amp;gt;&lt;br /&gt; &amp;lt;recordtarget&amp;gt;&lt;br /&gt;  &amp;lt;patientrole&amp;gt;&lt;br /&gt;   &amp;lt;id extension="12345" root="2.16.840.1.113883.19.5"&amp;gt;&lt;br /&gt;   &amp;lt;patient&amp;gt;&lt;br /&gt;    &amp;lt;name&amp;gt;&lt;br /&gt;&amp;lt;/name&amp;gt;&amp;lt;/patient&amp;gt;&amp;lt;/id&amp;gt;&amp;lt;/patientrole&amp;gt;&amp;lt;/recordtarget&amp;gt;&amp;lt;/versionnumber&amp;gt;&amp;lt;/setid&amp;gt;&amp;lt;/languagecode&amp;gt;&amp;lt;/confidentialitycode&amp;gt;&amp;lt;/effectivetime&amp;gt;&amp;lt;/code&amp;gt;&lt;/quote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-5590787232428928819?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/5590787232428928819/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=5590787232428928819' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/5590787232428928819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/5590787232428928819'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2008/06/c-with-xmldocument-and-xpaths.html' title='c# with XmlDocument and xpaths'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-1049690593575390366</id><published>2008-06-10T05:48:00.001-07:00</published><updated>2008-06-10T06:07:48.384-07:00</updated><title type='text'>"?" - Question mark in c# code (Nullable value types)</title><content type='html'>In a piece of auto generated code, I found the following property&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;public DateTime? EffettiveTime&lt;br /&gt;        {&lt;br /&gt;            get { return m_effettiveTime; }&lt;br /&gt;            set { this.m_effettiveTime = value; }&lt;br /&gt;        }&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This was the first time I seen the question mark in the c# code (at least in this context) The problem arose when I wanted to do the following:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;someInstance.date = EffettiveTime.ToString("yyyy-mm-dd");&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;It returned an error saying that the ToString method does not have any overload methods, which takes a string. I looked up DateTime and found the overloaded method, so why couldn't I use it. &lt;br /&gt;&lt;br /&gt;After some googling I found the wikipedia site for c-sharp (&lt;a href="http://en.wikipedia.org/wiki/C_Sharp_%28programming_language%29"&gt;link&lt;/a&gt;) where I found the following:&lt;br /&gt;&lt;br /&gt;&lt;quote&gt;&lt;i&gt;&lt;br /&gt;Nullable value types (denoted by a question mark, e.g. int? i = null;) which add null to the set of allowed values for any value type. This provides improved interaction with SQL databases, which can have nullable columns of types corresponding to C# primitive types: an SQL INTEGER NULL column type directly translates to the C# int?.&lt;br /&gt;&lt;/i&gt;&lt;/quote&gt;&lt;br /&gt;&lt;br /&gt;But then there is just the problem that this new type (DateTime?) did not implement the method that I needed, so I had to cast it to DateTime before continuing, on. This seemed to work: &lt;br /&gt;&lt;code&gt;&lt;br /&gt;DateTime eTime = (DateTime) EffettiveTime;&lt;br /&gt;someInstance.date = eTime.ToString("yyyy-mm-dd");&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;The "?" question mark is also used for short if statements. The following can be written much shorter: &lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;SomeClasse someInstance = null;&lt;br /&gt;if(&amp;lt;someBoolean&amp;gt;)&lt;br /&gt;{&lt;br /&gt;   someInstance= &amp;lt;doSomething&amp;gt;;&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;   someInstance = &amp;lt;doSomethingElse&amp;gt;;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This could be written like this instead&lt;br /&gt;&lt;code&gt;&lt;br /&gt;SomeClasse someInstance =  &amp;lt;someBoolean&amp;gt; ? &amp;lt;doSomething&amp;gt; : &amp;lt;doSomethingElse&amp;gt;;&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-1049690593575390366?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/1049690593575390366/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=1049690593575390366' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/1049690593575390366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/1049690593575390366'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2008/06/question-mark-in-c-code-nullable-value.html' title='&quot;?&quot; - Question mark in c# code (Nullable value types)'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-1761542120132239191</id><published>2008-05-08T07:43:00.000-07:00</published><updated>2008-05-08T08:43:36.150-07:00</updated><title type='text'>androMDA.net download</title><content type='html'>In a new project, I heard that it would be of great use to auto generate some code. and that AndroMDA is the tool to use. &lt;br /&gt;&lt;br /&gt;Sadly I had only reached about a 100 lines into the how-to androMDA before running into problems. I was not able to download the mavenplugin (which is AndroMDA). &lt;br /&gt;&lt;br /&gt;So when the tutorial (&lt;a href="http://team.andromda.org/contrib/starting-dotnet.html"&gt;link&lt;/a&gt;) wrote the following&lt;br /&gt;&lt;code&gt;&lt;br /&gt; To install the C# Application plugin open a Command Prompt and Execute the following command. Make sure you get a "BUILD SUCCESSFUL" message at the end of the command output.&lt;br /&gt;&lt;br /&gt;maven plugin:download -DgroupId=andromda -DartifactId=maven-andromdacsapp-plugin -Dversion=1.0-SNAPSHOT&lt;br /&gt;&lt;br /&gt;Notice that you will now have maven-andromdacsapp-plugin-1.0-SNAPSHOT.jar installed at MAVEN_HOME\plugins ( C:\Program Files\Apache Software Foundation\Maven 1.0.2\plugins for this example). &lt;br /&gt;&lt;/code&gt;&lt;br /&gt;I just got a lot of errors instead of actually downloading anything. Luckily I wasnt the first one to have this problem, to after a bit of search I found the following solution (&lt;a href="http://galaxy.andromda.org/forum/viewtopic.php?t=3987"&gt;link&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;After a long fight with maven, I found a solution to the problem.&lt;br /&gt;Maven 1.x doesn't support redirection thus we must indicate a non redirected repository. So in build.properties :&lt;br /&gt;&lt;br /&gt;maven.repo.remote=http://www.ibiblio.org/maven,http://team.andromda.org/maven&lt;br /&gt;become&lt;br /&gt;maven.repo.remote=http://repo1.maven.org/maven,http://team.andromda.org/maven&lt;br /&gt;&lt;br /&gt;and a valid command line is :&lt;br /&gt;&lt;br /&gt;maven plugin:download -DartifactId=maven-torque-plugin -DgroupId=torque -Dversion=3.3-RC1&lt;br /&gt;&lt;br /&gt;if you try to use an other apache's server, it seems that jsch isn't created. [neria]&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Joy and happiness, now I can continue, my androMDA tutorial, and actually download androMDA, with the following command: &lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;maven plugin:download -DgroupId=andromda -DartifactId=maven-andromdacsapp-plugin -Dversion=1.0-SNAPSHOT&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-1761542120132239191?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/1761542120132239191/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=1761542120132239191' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/1761542120132239191'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/1761542120132239191'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2008/05/andromdanet-download.html' title='androMDA.net download'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-2480477270498191131</id><published>2008-04-16T05:59:00.000-07:00</published><updated>2008-04-16T06:02:31.286-07:00</updated><title type='text'>Found in System.Uri in the .NET lib</title><content type='html'>&lt;code&gt;&lt;br /&gt;Protected Overridable Sub CheckSecurity()&lt;br /&gt;     Member of: System.Uri&lt;br /&gt;Summary:&lt;br /&gt;Calling this method has no effect.&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Wonder how many no-effect-methods is needed to run windows. and if all their CheckSecurity methods have no effect.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-2480477270498191131?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/2480477270498191131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=2480477270498191131' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/2480477270498191131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/2480477270498191131'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2008/04/found-in-systemuri-in-net-lib.html' title='Found in System.Uri in the .NET lib'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-1303800870661263307</id><published>2008-04-06T08:39:00.000-07:00</published><updated>2008-04-06T10:53:24.163-07:00</updated><title type='text'>Reading rails 1.2 while learning rails 2.0</title><content type='html'>Learning rails 2.0 from a book about rails 1.2.6 keeps you awake, cause there are things that does not do exactly what it is described in the book.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;depot&gt;rails depot&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Generates lots of code. Now to setup the database open the database.yml file in &lt;code&gt;depot\config\&lt;/code&gt; and correct it to match your database:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;# SQLite version 3.x&lt;br /&gt;#   gem install sqlite3-ruby (not necessary on OS X Leopard)&lt;br /&gt;development:&lt;br /&gt;  adapter: mysql&lt;br /&gt;  database: depot_development&lt;br /&gt;  user: userNam&lt;br /&gt;  password: pass&lt;br /&gt;test:&lt;br /&gt;  adapter: mysql&lt;br /&gt;  database: depot_test&lt;br /&gt;  user: userNam&lt;br /&gt;  password: pass&lt;br /&gt;&lt;br /&gt;production:&lt;br /&gt;  adapter: mysql&lt;br /&gt;  database: depot_production&lt;br /&gt;  user: userNam&lt;br /&gt;  password: pass&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;then make use of the rake tool, to create the databases:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;rake db:create:all&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;then to make the product scaffolding do the following:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;depot&gt;ruby script/generate scaffold Product title:string description:text image_url:string&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;And now its possible to start the server (&lt;code&gt;ruby script/server&lt;/code&gt;) and create a product. following this url:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;http://localhost:3000/products&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-1303800870661263307?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/1303800870661263307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=1303800870661263307' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/1303800870661263307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/1303800870661263307'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2008/04/reading-rails-12-while-learning-rails.html' title='Reading rails 1.2 while learning rails 2.0'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-2842150803369124997</id><published>2008-04-01T01:38:00.001-07:00</published><updated>2008-04-01T01:48:52.617-07:00</updated><title type='text'>Greetings from RubyFools in Copenhagen</title><content type='html'>The first RubyFools ever is placed at the IT university of Copenhagen. The buildings have just been build, and everything is nice beautiful, straightlined and very grey and Danish. &lt;br /&gt;&lt;br /&gt;Dave Thomas gave the introduction keynote, where he talked about why he is a ruby fool. As it is custom, the keynote didn't really introduce anything, but was just a nice relaxed talk about the things that Dave likes about the language. &lt;br /&gt;&lt;br /&gt;Listing to the talk, it seems to me ( even if it makes me sound old) like history is repeating it self. Some of the things that Dave points out as the new good things about Ruby is also some of the arguments for leaving C++ and go to Java:&lt;br /&gt;&lt;br /&gt;.- multi paradigm language,&lt;br /&gt;-.- OOP, prototype based, almost functional&lt;br /&gt;.- expressiveness &lt;br /&gt;-.- lots of ways to say the samething&lt;br /&gt;    &lt;br /&gt;After listing these things he went on to say the it was imperfect, and said that was a good things, things "Perfection is the enemy of all creation" (He was very convincing and I agree with him on this point) &lt;br /&gt;&lt;br /&gt;Then followed some notes about how much Ruby and the community had grown. &lt;br /&gt;&lt;br /&gt;always remember&lt;br /&gt;&lt;center&gt;TO HAVE FUN&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;-- pictures will be added when I can --&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-2842150803369124997?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/2842150803369124997/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=2842150803369124997' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/2842150803369124997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/2842150803369124997'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2008/04/greetings-from-rubyfools-in-copenhagen.html' title='Greetings from RubyFools in Copenhagen'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-1750442101797927547</id><published>2008-03-07T05:47:00.000-08:00</published><updated>2008-03-07T05:55:13.112-08:00</updated><title type='text'>My list</title><content type='html'>I have this list of things that I should study, to get up-to-date on the new things in the computer science world. The list changes all the time, but today its: &lt;br /&gt;&lt;br /&gt;1. Ruby programming language&lt;br /&gt;2. Javascript&lt;br /&gt;3. Ruby on Rails. &lt;br /&gt;4. RestFULL webservices.&lt;br /&gt;5. Git (version Control system)&lt;br /&gt;6. Behaviour Driven Development(BDD)&lt;br /&gt;7. erlang (Erlang is a general-purpose concurrent programming language)&lt;br /&gt;&lt;br /&gt;To support the first element on the list, I was encouraged to buy the following books: &lt;br /&gt;- The Ruby Programming Language&lt;br /&gt;- JavaScript the Definitive Guide.&lt;br /&gt;&lt;br /&gt;Anybody ( if anybody reads this) have anything else...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-1750442101797927547?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/1750442101797927547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=1750442101797927547' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/1750442101797927547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/1750442101797927547'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2008/03/my-list.html' title='My list'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6895939420740956898.post-2383767349296300675</id><published>2008-03-05T07:37:00.000-08:00</published><updated>2008-03-05T07:44:54.737-08:00</updated><title type='text'>A dead horse</title><content type='html'>&lt;a href="http://www.tysknews.com/LiteStuff/riding_a_dead_horse.htm"&gt;Dakota tribal wisdom  says that when you discover you are riding a dead horse, the best strategy is to dismount.&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;I found this page that describes this old saying and (if you follow the link) gives a few stupid examples of what businesses today do when they discover that they are in fact riding smelly one.&lt;br /&gt;&lt;br /&gt;Cant help wondering how many people are currently riding a dead horse, and knows it. one can always say that there is fair risk that a software project fail, but thinking back on projects and friends projects, there is a surprisingly large number of riders who have been on dead horses and knew it was dead. &lt;br /&gt;&lt;br /&gt;What about your project, is that a dead horse.....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-2383767349296300675?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/2383767349296300675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=2383767349296300675' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/2383767349296300675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/2383767349296300675'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2008/03/dead-horse.html' title='A dead horse'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-3920720793475440161</id><published>2008-01-30T05:23:00.001-08:00</published><updated>2008-01-30T06:47:56.264-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby install'/><title type='text'>rails 2.0 with sql-server</title><content type='html'>&lt;code&gt;&lt;br /&gt;gem install activerecord-sqlserver-adapter --source=http://gems.rubyonrails.org &lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;get the Ruby-dbi from this site &lt;a href="http://rubyforge.org/projects/ruby-dbi/"&gt;rubyForge&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;After downloading it, use WinAce (or something else )to unpack the files and copy the following file &lt;code&gt;lib/dbd/ADO.rb&lt;/code&gt; to &lt;code&gt;/ruby/lib/ruby/site_ruby/1.8/DBD/ADO/ADO.rb&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now insert the following in the database.yml file (in \config dir of your rails app)&lt;br /&gt;&lt;code&gt;&lt;br /&gt;development:&lt;br /&gt;  adapter: sqlserver&lt;br /&gt;  database: "DATABASENAME"&lt;br /&gt;  host: .&lt;br /&gt;  username: "USERNAME"&lt;br /&gt;  password: "PASSWORD"&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;where databasename, username, and password (remove comeplete tag) should be inserted. and if the sql server is not running on the local host, then the "." should be exchanged to the proper path. fx. if my server was called "ruby" and my username was "user" and password was "user" then it should look like this:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;development:&lt;br /&gt;  adapter: sqlserver&lt;br /&gt;  database: ruby&lt;br /&gt;  host: .&lt;br /&gt;  username: user&lt;br /&gt;  password: pass&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-3920720793475440161?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/3920720793475440161/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=3920720793475440161' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/3920720793475440161'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/3920720793475440161'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2008/01/rails-20-with-sql-server.html' title='rails 2.0 with sql-server'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-2703340680084400974</id><published>2008-01-30T05:10:00.001-08:00</published><updated>2008-01-30T05:14:48.571-08:00</updated><title type='text'>How to get ruby on rails</title><content type='html'>To get rails, one can just download ruby, and then ask it to fetch the gems, that contains rails. &lt;br /&gt;&lt;br /&gt;First download ruby (following link is to the currently most present version): &lt;br /&gt;&lt;a href="https://rubyforge.org/frs/?group_id=167&amp;release_id=17128"&gt;rubyForge&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;when everything is installed correctly, run the following command:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;C:\private\projects\ruby&gt;gem install rails --include-dependencies&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;this will generate the following output:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;C:\private\projects\ruby&gt;gem install rails --include-dependencies&lt;br /&gt;Bulk updating Gem source index for: http://gems.rubyforge.org&lt;br /&gt;Successfully installed rails-2.0.2&lt;br /&gt;Successfully installed activesupport-2.0.2&lt;br /&gt;Successfully installed activerecord-2.0.2&lt;br /&gt;Successfully installed actionpack-2.0.2&lt;br /&gt;Successfully installed actionmailer-2.0.2&lt;br /&gt;Successfully installed activeresource-2.0.2&lt;br /&gt;Installing ri documentation for activesupport-2.0.2...&lt;br /&gt;Installing ri documentation for activerecord-2.0.2...&lt;br /&gt;Installing ri documentation for actionpack-2.0.2...&lt;br /&gt;Installing ri documentation for actionmailer-2.0.2...&lt;br /&gt;Installing ri documentation for activeresource-2.0.2...&lt;br /&gt;Installing RDoc documentation for activesupport-2.0.2...&lt;br /&gt;Installing RDoc documentation for activerecord-2.0.2...&lt;br /&gt;Installing RDoc documentation for actionpack-2.0.2...&lt;br /&gt;Installing RDoc documentation for actionmailer-2.0.2...&lt;br /&gt;Installing RDoc documentation for activeresource-2.0.2...&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now to the coding!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-2703340680084400974?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/2703340680084400974/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=2703340680084400974' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/2703340680084400974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/2703340680084400974'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2008/01/ruby-on-rails.html' title='How to get ruby on rails'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-1048306250167924577</id><published>2008-01-08T04:15:00.000-08:00</published><updated>2008-01-08T04:23:33.686-08:00</updated><title type='text'>MS video and youtube</title><content type='html'>Isnt it wonderful with Microsoft. I just read in a Danish paper that Bill Gates is leaving Ms, and that he have made a video about his last day at work. The article included a link to MSN video, to where the video should be. Instead I get "Sorry the video is unavailable". Going to YouTube (The competition), search "Bill Gates", and the Video starts.... The following, is the YouTube video. which works: &lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="355"&gt;&lt;param name="movie" value="http://www.youtube.com/v/1lE21kpE3M0&amp;rel=1"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/1lE21kpE3M0&amp;rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Bravo Microsoft.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-1048306250167924577?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/1048306250167924577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=1048306250167924577' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/1048306250167924577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/1048306250167924577'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2008/01/ms-video-and-youtube.html' title='MS video and youtube'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-188052481870399480</id><published>2008-01-07T02:52:00.001-08:00</published><updated>2008-01-07T02:57:03.943-08:00</updated><title type='text'>Do we learn from our mistakes</title><content type='html'>Its always very easy to tell when something has gone wrong during a project, and often also easy to see why its has gone wrong. Yet on the next project, the same things often goes wrong. &lt;br /&gt;&lt;br /&gt;Then what ? Get use to the fact that history repeats its self, or try to actuly think and learn about things that were good and bad, in just finished projects, and try to avoid pitfalls and enhance good tricks. This revolutionary thought is being examined in the following Google representation, given by Diana Larsen: &lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="355"&gt;&lt;param name="movie" value="http://www.youtube.com/v/qqtPZYigfNI&amp;rel=1"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/qqtPZYigfNI&amp;rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-188052481870399480?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/188052481870399480/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=188052481870399480' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/188052481870399480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/188052481870399480'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2008/01/do-we-learn-from-our-mistakes.html' title='Do we learn from our mistakes'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-2003578307221979006</id><published>2007-12-04T06:26:00.000-08:00</published><updated>2007-12-04T07:19:29.023-08:00</updated><title type='text'>log4net exception: System.Configuration.ConfigurationRecord.Evaluate</title><content type='html'>A new error has appeared, when making an application, which uses my proxy.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;at System.Configuration.ConfigurationRecord.Evaluate(String configKey)&lt;br /&gt;   at System.Configuration.ConfigurationRecord.ResolveConfig(String configKey)&lt;br /&gt;   at System.Configuration.ConfigurationRecord.GetConfig(String configKey)&lt;br /&gt;   at System.Configuration.DefaultConfigurationSystem.System.Configuration.IConfigurationSystem.GetConfig(String configKey)&lt;br /&gt;   at System.Configuration.ConfigurationSettings.GetConfig(String sectionName)&lt;br /&gt;   at log4net.Config.XmlConfigurator.Configure(ILoggerRepository repository)&lt;br /&gt;   at log4net.Config.XmlConfigurator.Configure()&lt;br /&gt;   at DHE.IdhSession..ctor() in C:\DHE5\dev\client\net_client\DHEproxy\DHE.CommonInfo\IdhSession.vb:line 1027&lt;br /&gt;2007/12/04 15:25:16.572 2912/5068 err 0 | init*start main DHE shared object: dhe&lt;br /&gt;_process 0x0&lt;br /&gt;2007/12/04 15:25:16.572 2912/5068 err 0 | gs_k_init*start main DHE shared object&lt;br /&gt;: dhe_process 0x0&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Which funny enough appeared because of a spelling error inside the App.config. Another reason for reading the exception messages... (evaluation error blink blink)&lt;br /&gt;&lt;br /&gt;The problem is that its not always completely clear, when VS.NET sees it fit the override the config file in the bin dir, with the one you just corrected.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-2003578307221979006?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/2003578307221979006/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=2003578307221979006' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/2003578307221979006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/2003578307221979006'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2007/12/log4net-exception-systemconfigurationco.html' title='log4net exception: System.Configuration.ConfigurationRecord.Evaluate'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-8230419326367684155</id><published>2007-10-30T09:10:00.000-07:00</published><updated>2007-10-30T09:14:29.703-07:00</updated><title type='text'>The type of a vb.net Object</title><content type='html'>If you need to find verify that an object is of a specific type it can be done in the following way:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;  &lt;span style="font-weight: bold;"&gt;If TypeOf &lt;/span&gt;Err.GetException() &lt;span style="font-weight: bold;"&gt;Is &lt;/span&gt;DHEException &lt;span style="font-weight: bold;"&gt;Then&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;This uses the keyword "TypeOf" and "Is" I have used it to make sure that the exceptions, catched though the bad "On Error" statement, is still handled and the correct error code is returned.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;      If Err.Number &lt;&gt; 0 Then&lt;br /&gt;         If TypeOf Err.GetException() Is DHEException Then&lt;br /&gt;            Dim ex As DHEException = Err.GetException&lt;br /&gt;            cerr = ex.dheErr&lt;br /&gt;         Else&lt;br /&gt;            cerr = -(1000000 + Err.Number)&lt;br /&gt;         End If&lt;br /&gt;         errMsg += "|ExecService:" + Err.Description + " " + Err.GetException.StackTrace&lt;br /&gt;         log.Error(errMsg)&lt;br /&gt;      End If&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-8230419326367684155?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/8230419326367684155/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=8230419326367684155' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/8230419326367684155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/8230419326367684155'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2007/10/type-of-vbnet-object.html' title='The type of a vb.net Object'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-4023485648996317787</id><published>2007-10-25T05:57:00.000-07:00</published><updated>2007-10-25T06:13:05.766-07:00</updated><title type='text'>Configuration exception for log4Net</title><content type='html'>I have been battling with the following error, for almost three days now: &lt;br /&gt;&lt;code&gt;&lt;br /&gt;System.Configuration.ConfigurationException: Error loading XML file c:\windows\microsoft.net\framework\v1.0.3705\Config\machine.config Request for the permission of type System.Security.Permissions.StrongNameIdentityPermission, mscorlib, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed. (c:\windows\microsoft.net\framework\v1.0.3705\Config\machine.config)&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I have developed a proxy client which worked perfect when I ran my NUnit tests, but when I tried to make an external application which should use it, there was this error. I finally found the it was a version mismatch between two version of log4net, where I had used 1.0 net version for developing my proxy, I had by mistake added the 1.1 net version of log4net to the application. &lt;br /&gt;&lt;br /&gt;Same problem also gave me the following error:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;System.TypeInitializationException: The type initializer for "log4net.GlobalContext" threw an exception. ---&gt; System.TypeLoadException: Invalid PInvoke metadata format.&lt;br /&gt;   at System.Net.OSSOCK.gethostname(StringBuilder hostName, Int32 bufferLength)&lt;br /&gt;   at System.Net.Dns.GetHostName()&lt;br /&gt;   at log4net.Util.SystemInfo.get_HostName()&lt;br /&gt;   at log4net.GlobalContext..cctor()&lt;br /&gt;   --- End of inner exception stack trace ---&lt;br /&gt;   at log4net.GlobalContext.get_Properties()&lt;br /&gt;   at log4net.Core.LoggingEvent.CreateCompositeProperties()&lt;br /&gt;   at log4net.Core.LoggingEvent.LookupProperty(String key)&lt;br /&gt;   at log4net.Layout.Pattern.NdcPatternConverter.Convert(TextWriter writer, LoggingEvent loggingEvent)&lt;br /&gt;   at log4net.Layout.Pattern.PatternLayoutConverter.Convert(TextWriter writer, Object state)&lt;br /&gt;   at log4net.Util.PatternConverter.Format(TextWriter writer, Object state)&lt;br /&gt;   at log4net.Layout.PatternLayout.Format(TextWriter writer, LoggingEvent loggingEvent)&lt;br /&gt;   at log4net.Appender.AppenderSkeleton.RenderLoggingEvent(TextWriter wriSystem.TypeInitializationException: The type initializer for "log4net.GlobalContext" threw an exception. ---&gt; System.TypeLoadException: Invalid PInvoke metadata format.&lt;br /&gt;   at System.Net.OSSOCK.gethostname(StringBuilder hostName, Int32 bufferLength)&lt;br /&gt;   at System.Net.Dns.GetHostName()&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;So if you are fighting with a similar problem, check the versions of you .NET framework and the version of the log4net. &lt;br /&gt;&lt;br /&gt;The hint was to read this (&lt;a href="http://www.nabble.com/Gentle-1.2.9-DatePatternConverter-Error-t1750802.html"&gt;link&lt;/a&gt;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-4023485648996317787?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/4023485648996317787/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=4023485648996317787' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/4023485648996317787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/4023485648996317787'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2007/10/configuration-exception-for-log4net.html' title='Configuration exception for log4Net'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6895939420740956898.post-9162917937510887855</id><published>2007-10-23T08:50:00.000-07:00</published><updated>2007-10-25T06:08:45.641-07:00</updated><title type='text'>log4net troubles one among several</title><content type='html'>After having successfully used log4net to implement a new proxy client ( used nUnit tests to test) I now find myself in some difficulty. Because to test the proxy even further I want to run another program, which uses my Dll to talk to the server.&lt;br /&gt;&lt;br /&gt;My first problem is of course that programs are never as loosely coupled  as one could wish, and therefore I had to remove some hard coded references from the new test program.&lt;br /&gt;&lt;br /&gt;Now that the tests actually run my code, I have a problem with configuring the log4net framework.&lt;br /&gt;&lt;br /&gt;First thing is to study the application configuration file a bit, Visual Studio allows you to create a file called app.config by right clicking on the solution title in the solution explorer (the thing usually on the right). This file will then be copied to the bin dir, with the proper name, when the solution is compiled (&lt;a href="http://msdn2.microsoft.com/en-us/library/ms184658(vs.80).aspx"&gt;link&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;Solution:&lt;br /&gt;The thing that should be remember is to add the following line somewhere its sure to be called before the log is used: &lt;br /&gt;&lt;br /&gt;&lt;code&gt;log4net.Config.XmlConfigurator.Configure()&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;At least if you are configuring the log4net in the app.config file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-9162917937510887855?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/9162917937510887855/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=9162917937510887855' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/9162917937510887855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/9162917937510887855'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2007/10/log4net-troubles-one-among-several.html' title='log4net troubles one among several'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-694557382338941178</id><published>2007-10-18T07:21:00.000-07:00</published><updated>2007-10-18T07:22:49.271-07:00</updated><title type='text'>Sets created by sql joins</title><content type='html'>Sorry, no explanation only a link to somebody who does explain, with diagrams: &lt;br /&gt;&lt;br /&gt;http://www.codinghorror.com/blog/archives/000976.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-694557382338941178?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/694557382338941178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=694557382338941178' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/694557382338941178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/694557382338941178'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2007/10/sets-created-by-sql-joins.html' title='Sets created by sql joins'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-1562037849016271210</id><published>2007-10-09T07:23:00.000-07:00</published><updated>2007-10-09T07:29:52.026-07:00</updated><title type='text'>There Ain't No Such Thing As Plain Text.</title><content type='html'>Encoding, is always a funny thing when you debug distributed application (also client server architectures). For the simple reason, that you test output from the client, might not look the same from the servers point of view, since there might be differences in the encoding. &lt;br /&gt;&lt;br /&gt;So remember to think about, what happens to you request string. remember the following example:&lt;br /&gt;&lt;br /&gt;Make a string in any given language:&lt;br /&gt;&lt;br /&gt;String testString = "Test string";&lt;br /&gt;&lt;br /&gt;to print this to the console, use: &lt;br /&gt;&lt;br /&gt;System.out.println(testString) &lt;- println uses a default encoding to print it, the bytes in memory.&lt;br /&gt;&lt;br /&gt;When the testString goes through several steps, before it is reached by a server. &lt;br /&gt;First et will be encoded to go on the network (socket), and decoded again by the server. There is therefore 3 different places, that a single debug output, can be different from the what the server actually saves. &lt;br /&gt;&lt;br /&gt;The following article describe the very basics of encoding, do you self a favor and read it, or something similar. &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.joelonsoftware.com/articles/Unicode.html"&gt;The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Its easy and very understandable.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-1562037849016271210?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/1562037849016271210/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=1562037849016271210' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/1562037849016271210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/1562037849016271210'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2007/10/there-aint-no-such-thing-as-plain-text.html' title='There Ain&apos;t No Such Thing As Plain Text.'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-5726416131121689391</id><published>2007-09-26T01:35:00.000-07:00</published><updated>2007-09-26T01:52:42.251-07:00</updated><title type='text'>Drop down list in Excel</title><content type='html'>I always have a hard time remembering how to make dropdown lists in Excel, her is a nice tutorial of how to do it: &lt;br /&gt;&lt;a href="http://www.create.cett.msstate.edu/create/howto/Excel_Dropdown_List.pdf"&gt;Excel dropdown&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And when you make a mistake, as me, this tutorial shows how to edit the list.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.create.cett.msstate.edu/create/howto/Excel_Dropdown_List_Editing.pdf"&gt;edit dropdown&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-5726416131121689391?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/5726416131121689391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=5726416131121689391' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/5726416131121689391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/5726416131121689391'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2007/09/drop-down-list-in-excel.html' title='Drop down list in Excel'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-5166172944201679638</id><published>2007-09-20T06:44:00.000-07:00</published><updated>2007-09-20T06:46:54.609-07:00</updated><title type='text'>Playing with sockets in vb.net</title><content type='html'>I am having trouble with sockets. I send a message and want to retrieve some information. Until now I thought that it was the receive which gave me the problems, but in fact the problem arrives before. Cause the send method throws a SocketException with the text “The attempted operation is not supported for the type of object referenced”.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;nb = s.Send(ByteSend, ByteSend.Length, SocketFlags.Peek)&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Now this doesn’t really help me. So I looked for the Error code, which were 10045. Looking in the error code list (&lt;a href="http://msdn2.microsoft.com/en-us/library/ms740668.aspx"&gt;link&lt;/a&gt;) gave me the following additional knowledge (or whatever you want to call this message) :&lt;br /&gt;Windows Sockets Error Codes:&lt;br /&gt;&lt;quote&gt;&lt;br /&gt;WSAEOPNOTSUPP 10045&lt;br /&gt;Operation not supported.&lt;br /&gt;The attempted operation is not supported for the type of object referenced. Usually this occurs when a socket descriptor to a socket that cannot support this operation is trying to accept a connection on a datagram socket.&lt;br /&gt;&lt;/quote&gt;&lt;br /&gt;&lt;br /&gt;Now did that help. I ended giving up on the code so I cant really tell you what the solution is. But for reference, I choose to publish this post anyway. Sorry&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-5166172944201679638?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/5166172944201679638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=5166172944201679638' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/5166172944201679638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/5166172944201679638'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2007/09/playing-with-sockets-in-vbnet.html' title='Playing with sockets in vb.net'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-7922428459650757312</id><published>2007-07-18T05:35:00.000-07:00</published><updated>2007-07-18T05:39:55.078-07:00</updated><title type='text'>got on the train of rails</title><content type='html'>Now its finally time for me starting to read the "Agile Web Development with Reails 2nd ed" so I can be updated at bit on how this rails works, not that there is any job related interest yet, just a wish to try and learn (and to code my secret project). &lt;br /&gt;&lt;br /&gt;Anyway to start somewhere I just downloaded ruby 1.8.6 from www.ruby-lang.org where there also is an excellent tutorial called "ruby in 20 min" try it, its nice and fast (&lt;a href="http://www.ruby-lang.org/en/documentation/quickstart/"&gt;link&lt;/a&gt;).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-7922428459650757312?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/7922428459650757312/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=7922428459650757312' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/7922428459650757312'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/7922428459650757312'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2007/07/got-on-train-of-rails.html' title='got on the train of rails'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-2136731171922339985</id><published>2007-07-18T02:18:00.000-07:00</published><updated>2007-07-18T02:24:25.176-07:00</updated><title type='text'>Unittesting private methods</title><content type='html'>I found something that throws an exception in a private method, to make sure I correct it, and it keeps corrected, I would like to write a couple of tests for that method. But its private, so how do I go..&lt;br /&gt;&lt;br /&gt;I read the following article, which do describe it for Java, but the same problems apply for vb.net (except I dont know if .net reflection allows one to access private methods like java)&lt;br /&gt;&lt;a href="http://www.artima.com/suiterunner/private.html"&gt;Testing Private Methods with JUnit and SuiteRunner&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As you will see, there is no nice way to do it, so I think I will try to rethink the design, and then see if I really need to test a private method. &lt;br /&gt;&lt;br /&gt;&lt;quote&gt;Finishing with a quote: &lt;br /&gt;    In general, you don't want to break any encapsulation for the sake of testing (or as Mom used to say, "don't expose your privates!")&lt;/quote&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;By Dave Thomas and Andy Hunt, in their book Pragmatic Unit Testing.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-2136731171922339985?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/2136731171922339985/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=2136731171922339985' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/2136731171922339985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/2136731171922339985'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2007/07/unittesting-private-methods.html' title='Unittesting private methods'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-6341404756974815644</id><published>2007-07-16T03:13:00.000-07:00</published><updated>2007-07-16T03:33:58.925-07:00</updated><title type='text'>Configuration of the tests</title><content type='html'>I find myself in the dilemma of having to run my tests in a new database with a new set of data. This should not be an surprising event, but it does require that I "update" my tests to the new reality. Cause I cant use the same keys, as before.&lt;br /&gt;&lt;br /&gt;So how does one solve this problem. I thought up two different solutions, where one is pretty nifty but time consuming, and the other is more slow, but probably the one I am going for. &lt;br /&gt;&lt;br /&gt;The first one, is to circumvent the util being tested, and access the database directly, and auto generate the needed row keys ect. here, one could use the loved (and hated) datasets of .NET&lt;br /&gt;&lt;br /&gt;The second more boring one is simply to make an xml file, containing all the configuration- the key to be used for testing get methods, the search critia for the list search, and the expected size of the result, ect. For this solution one misses the ease of java's properties library. &lt;br /&gt;&lt;br /&gt;After surfing the Net, I found this article on CodeProject "&lt;a href="http://www.codeproject.com/vb/net/ConfigOpt.asp"&gt;Managing configuration settings persistence in .NET applications&lt;/a&gt;", which describes how to read a xml file into a dataset. I will try that solution. &lt;br /&gt;&lt;br /&gt;This post will be updated...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-6341404756974815644?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/6341404756974815644/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=6341404756974815644' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/6341404756974815644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/6341404756974815644'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2007/07/configuration-of-tests.html' title='Configuration of the tests'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-2529269989791953297</id><published>2007-07-09T01:28:00.000-07:00</published><updated>2007-07-09T01:42:14.972-07:00</updated><title type='text'>logging in client proxy</title><content type='html'>I have found myself wondering what is a good logging strategy. There are several levels to consider, when you are implementing a client/proxy for an existing server. So far there are two major scenarios, where its interesting to log, one can be said to be sub case of the other.&lt;br /&gt;&lt;br /&gt;-Regular logging where you are just interested in logging the fact that there is been send a request to the server, when, what and who. &lt;br /&gt;&lt;br /&gt;-Debug logging where its interesting to look at the execution path through the client code. which will pinpoint anything strange. This can of cause also be done just by stepping through the code, but I would be much easier if one were able to insert enough debug writes to support an easy identification of the exceptional behavior. &lt;br /&gt;&lt;br /&gt;Since the regular logging of the 3 w's is included in the debug logging, my plan is to include this info as a normal debug output, and then just filter it, to make the prober log file which is an requirement. &lt;br /&gt;&lt;br /&gt;The overall strategy (using log4net) is the following levels:&lt;br /&gt;&lt;br /&gt;- log fatal if the client losses the connection to the data source&lt;br /&gt;- log error if there is thrown an exception or an err code is returned.&lt;br /&gt;- log info when a workflow is finished. (for example the data written in a dump file)&lt;br /&gt;&lt;br /&gt;More posts will follow of how to set up everything...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-2529269989791953297?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/2529269989791953297/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=2529269989791953297' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/2529269989791953297'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/2529269989791953297'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2007/07/logging-in-client-proxy.html' title='logging in client proxy'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-5833575752547535537</id><published>2007-06-18T02:45:00.000-07:00</published><updated>2007-06-18T02:48:48.452-07:00</updated><title type='text'>removing spyware</title><content type='html'>Once again has the "Coding Horror" blog written a very useful blog. As a computer scientists I am always expected to know how to save virtually any system from virus and stupid users. One of the top problems, I always run into is people which have allowed spy ware onto their computers, making them slow and unpredictable. &lt;br /&gt;&lt;br /&gt;In the linked blog, there is a description of how to remove spyware. (&lt;a href="http://www.codinghorror.com/blog/archives/000888.html"&gt;link&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;Enjoy cleaning...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-5833575752547535537?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/5833575752547535537/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=5833575752547535537' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/5833575752547535537'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/5833575752547535537'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2007/06/removing-spyware.html' title='removing spyware'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-3873634097139489575</id><published>2007-06-12T06:08:00.000-07:00</published><updated>2007-06-12T06:09:14.630-07:00</updated><title type='text'>Reflection</title><content type='html'>Reflection is the mechanism of discovering class information solely at runtime. Reflection has been introduced with the .NET framework, and its usage of metadata. &lt;br /&gt;&lt;br /&gt;Metadata is data about data, and in .NET framework it is contained along the code, to allow, among others reflection. The Metadata consists of class names, method signatures and the like, to enable both for runtime lookup of a class (i.e reflection) but also to enable the cross language execution. When the compiler compiles code, it always create the metadata along with the compiled code, and puts it in the assembly. &lt;br /&gt;&lt;br /&gt;Reflection means being able to get instantiate a class of a type, just by providing the name of the class at run time or invoke methods just by presenting their name. &lt;br /&gt;&lt;br /&gt;The use of reflection is slow and should only be used when absolutely necessary (&lt;a href="http://msdn.microsoft.com/msdnmag/issues/05/07/Reflection/"&gt;link&lt;/a&gt;). &lt;br /&gt;&lt;br /&gt;Maybe more later&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-3873634097139489575?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/3873634097139489575/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=3873634097139489575' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/3873634097139489575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/3873634097139489575'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2007/06/reflection.html' title='Reflection'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-1162349985607178335</id><published>2007-06-08T02:25:00.000-07:00</published><updated>2007-06-08T02:59:37.846-07:00</updated><title type='text'>Software developer you are you owne worst nightmare</title><content type='html'>Stop writing code, its just more lines where bugs and errors can hide. The following is snippet I have copied from one of my own favorite bloggers Coding Horror, which writes about "&lt;a href="http://www.codinghorror.com/blog/archives/000878.html"&gt;the best code, is no code at all&lt;/a&gt;" where he actually references another blog written by Wil Shipley who argues that we should &lt;a href="http://wilshipley.com/blog/2007/05/pimp-my-code-part-14-be-inflexible.html"&gt;rein in our natural tendencies to write lots of code:&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote style= "font-family: sans-serif; background:#F5F5F5"&gt;The fundamental nature of coding is that our task, as programmers, is to recognize that every decision we make is a trade-off. To be a master programmer is to understand the nature of these trade-offs, and be conscious of them in everything we write.&lt;br /&gt;&lt;br /&gt;    In coding, you have many dimensions in which you can rate code:&lt;br /&gt;&lt;br /&gt;        * Brevity of code&lt;br /&gt;        * Featurefulness&lt;br /&gt;        * Speed of execution&lt;br /&gt;        * Time spent coding&lt;br /&gt;        * Robustness&lt;br /&gt;        * Flexibility &lt;br /&gt;&lt;br /&gt;    Now, remember, these dimensions are all in opposition to one another. You can spend three days writing a routine which is really beautiful and fast, so you've gotten two of your dimensions up, but you've spent three days, so the "time spent coding" dimension is way down.&lt;br /&gt;&lt;br /&gt;    So, when is this worth it? How do we make these decisions? The answer turns out to be very sane, very simple, and also the one nobody, ever, listens to: Start with brevity. Increase the other dimensions as required by testing. &lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Which is some very clever words. You cant have everything, and the things you want, always comes at a cost of something else.&lt;br /&gt;&lt;br /&gt;Now go coding and remember to use the KISS principle (Keep It Simple Stupid)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-1162349985607178335?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/1162349985607178335/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=1162349985607178335' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/1162349985607178335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/1162349985607178335'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2007/06/software-developer-you-are-you-owne.html' title='Software developer you are you owne worst nightmare'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-1941770859757515039</id><published>2007-05-31T07:49:00.001-07:00</published><updated>2007-05-31T08:06:50.088-07:00</updated><title type='text'>Properties in C#</title><content type='html'>All good programmers have spend hours made getters and setters. So Microsoft have decided to make it a bit harder (I think now, I might change my mind later). &lt;br /&gt;&lt;br /&gt;Heres an example of old time code &lt;br /&gt;&lt;br /&gt;public class MyClass&lt;br /&gt;{&lt;br /&gt;  private int x;&lt;br /&gt;  public int getX() &lt;br /&gt;  {&lt;br /&gt;     return x&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;ect. &lt;br /&gt;In you application you can get x with the following code:&lt;br /&gt; mc.GetX();&lt;br /&gt;&lt;br /&gt;Now C# provides a built in mechanism called properties to do the above. In C#, properties are defined using the property declaration syntax. The general form of declaring a property is as follows.          &lt;br /&gt;&lt;br /&gt;&amp;lt;acces_modifier&amp;gt; &amp;lt;return_type&amp;gt; &amp;lt;property_name&amp;gt;&lt;br /&gt;{&lt;br /&gt;get {  }&lt;br /&gt;set {  }&lt;br /&gt;} &lt;br /&gt;&lt;br /&gt;This means that I can do the top example the following way:&lt;br /&gt;&lt;br /&gt;Where &amp;lt;access_modifier&amp;gt; can be private, public, protected or internal. The &amp;lt;return_type&amp;gt; can be any valid C# type. Note that the first part of the syntax looks quite similar to a field declaration and second part consists of a get accessor and a set accessor. &lt;br /&gt;&lt;br /&gt;For example the above program can be modifies with a property X as follows.      &lt;br /&gt;&lt;br /&gt;class MyClass&lt;br /&gt;{&lt;br /&gt;  private int x;&lt;br /&gt;  public int X // property&lt;br /&gt;  {&lt;br /&gt;   get&lt;br /&gt;   { return x;}&lt;br /&gt;    set&lt;br /&gt;   { x = value;}&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;The object of the class MyClass can access the property X as follows.&lt;br /&gt;&lt;br /&gt;mc.X(10)  // setter.&lt;br /&gt;y = mc.X  // getter.&lt;br /&gt;&lt;br /&gt;I think its a step in a good direction, but splitting the attribute and the property is in my view, just as bad as not having them.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-1941770859757515039?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/1941770859757515039/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=1941770859757515039' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/1941770859757515039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/1941770859757515039'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2007/05/properties-in-c.html' title='Properties in C#'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-1825562580021735714</id><published>2007-05-30T06:04:00.000-07:00</published><updated>2007-05-31T07:46:00.654-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vb.net'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><title type='text'>equal types in vb.net and c#</title><content type='html'>Even though c# and vb.net uses the same libraries, there is some differences in what name identify the classes, below I will make a list. &lt;br /&gt;&lt;center&gt;&lt;br /&gt;&lt;table border="1" width="50%"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;&lt;th width="50%"&gt;vb.net&lt;/th&gt;&lt;th&gt;c#&lt;/th&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;Boolean&lt;/td&gt;&lt;td&gt;bool&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;Date&lt;/td&gt;&lt;td&gt;System.DateTime&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;String&lt;/td&gt;&lt;td&gt;string&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;int32&lt;/td&gt;&lt;td&gt;int&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;And keywords:&lt;br /&gt;&lt;center&gt;&lt;br /&gt;&lt;table border="1" width="50%"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;&lt;th width="50%"&gt;vb.net&lt;/th&gt;&lt;th&gt;c#&lt;/th&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;Shared&lt;/td&gt;&lt;td&gt;static&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;Friend&lt;/td&gt;&lt;td&gt;internal&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;ReadOnly*&lt;/td&gt;&lt;td&gt;const*&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;*)&lt;br /&gt;const:&lt;br /&gt;&lt;br /&gt;    - Can't be static.&lt;br /&gt;    - Value is evaluated at compile time.&lt;br /&gt;    - Initiailized at declaration only.&lt;br /&gt;&lt;br /&gt;ReadOnly:&lt;br /&gt;&lt;br /&gt;    - Can be either instance-level or static.&lt;br /&gt;    - Value is evaluated at run time.&lt;br /&gt;    - Can be initialized in declaration or by code in the constructor.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-1825562580021735714?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/1825562580021735714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=1825562580021735714' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/1825562580021735714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/1825562580021735714'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2007/05/equal-types-in-vbnet-and-c.html' title='equal types in vb.net and c#'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-5987418951457879177</id><published>2007-05-30T06:02:00.001-07:00</published><updated>2007-05-30T06:03:34.674-07:00</updated><title type='text'>vb.net friend becomes c# internal</title><content type='html'>Porting a friendly structure from vb.net to c# is done by altering the "friend" keyword to "internal" in c#&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-5987418951457879177?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/5987418951457879177/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=5987418951457879177' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/5987418951457879177'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/5987418951457879177'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2007/05/vbnet-friend-becomes-c-internal.html' title='vb.net friend becomes c# internal'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-4660998015888109319</id><published>2007-05-30T03:38:00.000-07:00</published><updated>2007-05-30T03:43:09.845-07:00</updated><title type='text'>Regions in .NET</title><content type='html'>As a fan of agile development, where everything should be structured into small classes, its hard to see regions as anything but a bad solution for a bad problem. But they are here, and people are using them, so no sense in not knowing what they do. Its a simple answer:&lt;br /&gt;&lt;br /&gt;They do nothing, zip, nada. A region is simply a construct to enable Visual Studio.NET to hide pieces of code outside of the normal bounderies of methods, structures and classes.&lt;br /&gt;&lt;br /&gt;In vb.net a region have the following for:&lt;br /&gt;#Region "DataTypes"&lt;br /&gt;        ' types of service:&lt;br /&gt;#End Region&lt;br /&gt;&lt;br /&gt;And in c#:&lt;br /&gt;&lt;br /&gt;#region "DataTypes"&lt;br /&gt;        // types of service:&lt;br /&gt;#endregion&lt;br /&gt;&lt;br /&gt;So no magic here... Sorry&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-4660998015888109319?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/4660998015888109319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=4660998015888109319' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/4660998015888109319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/4660998015888109319'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2007/05/regions-in-net.html' title='Regions in .NET'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-314020207877058207</id><published>2007-05-30T03:19:00.000-07:00</published><updated>2007-05-30T03:22:28.360-07:00</updated><title type='text'>Garbage collecting in .NET</title><content type='html'>The .NET framework have automatic garbage collection, and uses an algorithm called “mark and compact” which is an variant of the “mark and sweep” algorithm, where the heap is compacted after each garbage collection. This makes the allocation very fast, since the heap is always compacted and the next free slot is just the bottom of the heap (the heap grows downwards)&lt;br /&gt;&lt;br /&gt;Research has shown that you can split objects on the heap into two groups, the young ones which will only survive until the first garbage collection and the old ones which will stay in the heap through out the execution. The .NET garbage collector uses this by only garbage collecting the young generation each time, and the old only when its needed. [For more information read the article, or ask me]&lt;br /&gt;Even though the garbage collector is automatic it doesn’t mean that you can make programs which will suffocate the GB. I the following is a list of some of the problems which can cause long GB breaks.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Performance:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;• Too many allocations: Its very easy to create many temporary elements which will make the GB pause long. Don’t use f.x. String.Split, creates a new String object for each split&lt;br /&gt;• Don’t make too large allocations&lt;br /&gt;Its very cheap to make new allocations, and too big allocations will trigger the GB much more often, which is expensive&lt;br /&gt;• Too many pointers&lt;br /&gt;Structures with many pointers takes time to for the GB, because it has to run through all of them. For long lived structures this is not a problem, but if these structures will be made on a transitory basis. Even with a long lived structure can give problems, if the structure is changed over time, this can endup being distributed through out the heap and thereby make it harder for the GB to “compact” the heap&lt;br /&gt;• Too many roots&lt;br /&gt;Too many roots will make the mark process too long. Making deep recursive methods with many object pointers, is also a no no.&lt;br /&gt;• Too many object writes.&lt;br /&gt;Write to an object, and its pointers have to be checked by the GB, because the object will be registered in the card table&lt;br /&gt;• Too many Almost-Long-Life objects&lt;br /&gt;The biggest pitfall of them all. To avoid these kinds of objects, your best lines of defense go like this:&lt;br /&gt;1. Allocate as few objects as possible, with due attention to the amount of temporary space you are using.&lt;br /&gt;2. Keep the longer-lived object sizes to a minimum.&lt;br /&gt;3. Keep as few object pointers on your stack as possible (those are roots).&lt;br /&gt;• Use only Finalization when its necessary.&lt;br /&gt;If an object is dead but has a finalizer it will be kept alive until the GB have time to run the metod body, and also all the referenced objects inside the object. Therefore use only a finalizer when its really needed. Move  resources which need finalizing to a root object, to minimize the size of elements in inferno.&lt;br /&gt;In many cases it is much better to implement the IDisposable interface.&lt;br /&gt;&lt;br /&gt;To get the best out of the allocator you should consider practices such as the following:&lt;br /&gt;• Allocate all of the memory (or as much as possible) to be used with a given data structure at the same time.&lt;br /&gt;• Remove temporary allocations that can be avoided with little penalty in complexity.&lt;br /&gt;• Minimize the number of times object pointers get written, especially those writes made to older objects.&lt;br /&gt;• Reduce the density of pointers in your data structures.&lt;br /&gt;• Make limited use of finalizers, and then only on "leaf" objects, as much as possible. Break objects if necessary to help with this.&lt;br /&gt;Personally I think that these requirements above is a bit to restrict, because you will find other perspectives which will contradict these requirements. But I added them here as a guideline.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;References:&lt;/span&gt;&lt;br /&gt;[GB1] Mariani, Rico: Garbage Collector Basics and Performance Hints, 2003 (&lt;a href="http://msdn2.microsoft.com/en-us/library/ms973837.aspx"&gt;Link&lt;/a&gt;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-314020207877058207?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/314020207877058207/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=314020207877058207' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/314020207877058207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/314020207877058207'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2007/05/garbage-collecting-in-net.html' title='Garbage collecting in .NET'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-2563526847538226307</id><published>2007-05-30T01:57:00.000-07:00</published><updated>2007-05-30T03:14:02.649-07:00</updated><title type='text'>Structures in c#</title><content type='html'>&lt;span style="font-size:100%;"&gt;A structure in c# is at first sight the same as a class, but there are differences, which I will describe in the following, but first the structure of the structure:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;Structure:&lt;br /&gt;A structure in c# has the following form:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span nd="4"  style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&amp;lt;modifiers &amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span nd="5" style="color: rgb(0, 0, 255);font-family:Verdana,Arial,Helvetica,sans-serif;" &gt;struct&lt;/span&gt;&lt;span nd="6"  style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&amp;lt;struct_name&amp;gt;&lt;br /&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span nd="7" style="color: rgb(0, 128, 0);font-family:Verdana,Arial,Helvetica,sans-serif;" &gt;//Structure members&lt;br /&gt;&lt;/span&gt;&lt;span nd="8"  style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;}&lt;br /&gt;&lt;br /&gt;or an actual example&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span nd="10"  style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span nd="11" style="color: rgb(0, 0, 255);"&gt;struct&lt;/span&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span nd="12"&gt; Weight&lt;br /&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span nd="13" style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span nd="14" style="color: rgb(0, 0, 255);"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span nd="15"&gt; value;&lt;br /&gt;&lt;/span&gt;&lt;span nd="16" style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; string&lt;/span&gt;&lt;span nd="18"  style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt; unit;&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span nd="8"  style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;And is instantiated like this:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span nd="10"  style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span nd="12"&gt;Weight &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span nd="20"  style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;ms = &lt;/span&gt;&lt;span nd="21" style="color: rgb(0, 0, 255);font-family:Verdana,Arial,Helvetica,sans-serif;" &gt;new&lt;/span&gt;&lt;span nd="23"  style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span nd="22"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span nd="10"  style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span nd="12"&gt;Weight&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span nd="23"  style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span nd="22"&gt;();&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;p&gt;&lt;span style="font-size:100%;"&gt;&lt;span nd="25"  style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;Unlike classes, the struct object can also be created without using the new operator.    &lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;&lt;span nd="10"  style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span nd="12"&gt;Weight &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span nd="26"  style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;ms; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:100%;"&gt;&lt;span nd="27"  style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size:100%;"&gt;But in this case all fields of the struct will remain unassigned and the object can't be used until all of the fields are initialized. &lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span nd="23"  style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span nd="22"&gt;&lt;span style="font-family:verdana;"&gt;At the bottom I have attached&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; a larger example of a structure.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span nd="23"  style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span nd="22"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Properties of a Structure:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;A structure can contain &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt;&lt;span nd="2"&gt;fields, methods, constants, constructors, properties, indexers, operators and even other structure types.&lt;br /&gt;&lt;br /&gt;It is even possible for a structure to implement a interface or inherit from another structure.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;interface&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt;&lt;span nd="2"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;PhysicalUnit&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt; getValue()&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;} &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt;&lt;span nd="2"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;struct&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt; weight : PhysicalUnit&lt;br /&gt;{&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;private int&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt; value&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt; getValue()&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;{&lt;br /&gt;return value&lt;br /&gt;} &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt;&lt;span nd="2"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The difference&lt;/span&gt;:&lt;br /&gt;The difference between a structure and a class is the place it is put in memory. Because as we all know an object of a class type is put in the heap, with a reference (pointer&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:verdana;"&gt;) on the stack which points to the object. An object of structure type on the other hand is placed on directly on the stack.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Example:&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span nd="23"  style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span nd="22"&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;Below is an example of a structure which shows how a constructor, properties ect.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;using&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt; System;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;struct&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt; Complex&lt;br /&gt;{&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;private&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt; x;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;private&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt; y;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; Complex(&lt;span style="color: rgb(0, 0, 255);"&gt;int&lt;/span&gt; i, &lt;span style="color: rgb(0, 0, 255);"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt; j)&lt;br /&gt;{&lt;br /&gt;x = i;&lt;br /&gt;y = j;&lt;br /&gt;}&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;void&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt; ShowXY()&lt;br /&gt;{&lt;br /&gt;Console.WriteLine("{0} {1}",x,y);&lt;br /&gt;}&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt; Complex &lt;span style="color: rgb(0, 0, 255);"&gt;operator&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt; -(Complex c)&lt;br /&gt;{&lt;br /&gt;Complex temp = &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt; Complex();&lt;br /&gt;temp.x = -c.x;&lt;br /&gt;temp.y = -c.y;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt; temp;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt; MyClient&lt;br /&gt;{&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;void&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt; Main()&lt;br /&gt;{&lt;br /&gt;Complex c1 = &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt; Complex(10,20);&lt;br /&gt;c1.ShowXY(); &lt;/span&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;// displays 10 &amp; 20&lt;br /&gt;&lt;/span&gt;Complex c2 = &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt; Complex();&lt;br /&gt;c2.ShowXY(); &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);font-family:Verdana,Arial,Helvetica,sans-serif;" &gt;// displays 0 &amp; 0&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;c2 = -c1;&lt;br /&gt;c2.ShowXY(); &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);font-family:Verdana,Arial,Helvetica,sans-serif;" &gt;// diapls -10 &amp; -20&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;}&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span nd="23"  style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span nd="22"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span nd="23"  style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span nd="22"&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-weight: bold;"&gt;Operator overload&lt;/span&gt;&lt;br /&gt;It example above also includes an example of an &lt;span style="font-style: italic;"&gt;operator&lt;/span&gt;,&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;br /&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt; Complex &lt;span style="color: rgb(0, 0, 255);"&gt;operator&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt; -(Complex c)&lt;br /&gt;{&lt;br /&gt;Complex temp = &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt; Complex();&lt;br /&gt;temp.x = -c.x;&lt;br /&gt;temp.y = -c.y;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt; temp;&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span nd="23"  style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span nd="22"&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;which is new to me from the Java world. but a nice feature, which should be used &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;carefully, since in this example its quite intuitive what happens if you take one element and subtracts it from another. But in more complex types of structures this can be more misguiding than helpful.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span nd="23"  style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span nd="22"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span nd="8"  style="font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-2563526847538226307?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/2563526847538226307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=2563526847538226307' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/2563526847538226307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/2563526847538226307'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2007/05/structures-in-c.html' title='Structures in c#'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-4020079989453184244</id><published>2007-05-29T09:15:00.000-07:00</published><updated>2007-06-12T06:07:20.073-07:00</updated><title type='text'>Nunit in action</title><content type='html'>On my new project I am implementing a proxy, in the .NET framework. Its currently in Beta (implemented 2 years ago), and is implemented in VB6. So to be more clear I have some old VB code which should be ported, updated and tested. I vote for implementing (porting) it in C#, since I like brackets and ";" and just think its a better language than VB.NET. Anyway this blog is about how I am going to use NUnit it my new C# project (which Im starting while they are making the decision).&lt;br /&gt;&lt;br /&gt;For info on NUnit go here (&lt;a href="http://nunit.com/"&gt;Link&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;I have made a new C# project in Visual Studio 2005. which should be the actual project. In this I will add a new project to be my NUnit test project called test, which should be console application. If my new project is called "Proxy" my folder structure is as follows:&lt;br /&gt;My main project: \projects\Proxy&lt;br /&gt;My test project:   \projects\Proxy\Test&lt;br /&gt;&lt;br /&gt;My test project be in the same namespace as the Proxy namespace otherwise the tests wont run on private methods. You may need to add the Proxy project to the NUnit test project. so it can see the methods it should test.&lt;br /&gt;&lt;br /&gt;Now every time I make a new method, I will make one or more test methods, to test it. And a new test class for each new class.&lt;br /&gt;&lt;br /&gt;When I have implemented a couple of lines, I compile the testcode, and run the tests in NUnit GUI.&lt;br /&gt;&lt;br /&gt;I just found this excellent tutorial about how to use NUnitTest in vb.net (&lt;a href="http://www.byte-vision.com/NUnitAndVBArticle.aspx"&gt;link&lt;/a&gt;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-4020079989453184244?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/4020079989453184244/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=4020079989453184244' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/4020079989453184244'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/4020079989453184244'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2007/05/nunit-in-action.html' title='Nunit in action'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-4417717358685167340</id><published>2007-05-17T07:24:00.000-07:00</published><updated>2007-05-17T08:02:37.505-07:00</updated><title type='text'>Learn your child to program</title><content type='html'>Carnegie Mellon has developed a tool called Alice, for kids and other children to learn how to use object oriented programming. The tool allows you to programming figures in a virtual 3D world. Its not rocket science, and if one need to learn programming one would probably move on quickly, but hey its fun, and introduces the concept.&lt;br /&gt;&lt;br /&gt;Wonder how early a parent can start :) &lt;br /&gt;http://www.alice.org/&lt;br /&gt;&lt;br /&gt;In fact after looking a bit on the net, there is also other alternatives. Here is one from MIT research lab http://scratch.mit.edu/ which is a bit more complicated.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-4417717358685167340?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/4417717358685167340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=4417717358685167340' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/4417717358685167340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/4417717358685167340'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2007/05/learn-your-child-to-program.html' title='Learn your child to program'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-3319140566290213683</id><published>2007-05-08T07:17:00.001-07:00</published><updated>2007-05-30T03:18:28.001-07:00</updated><title type='text'>The funny thing about SQL</title><content type='html'>I recieved a lession SQL logic the hard way, the other day. &lt;br /&gt;Can you find the difference between the following two statements:&lt;br /&gt;1)&lt;br /&gt;select AY__ICODE, AY_UCODE, AY_SHNAM, AY_EXDES &lt;br /&gt;from A_AYBOOK, A_ACTIVITY, A_MAYREQ  &lt;br /&gt;where MQ_IATTY = AY__ICODE &lt;br /&gt;  AND AK_AYCODE = AY__ICODE &lt;br /&gt;  and AK_BKCODE = 'IU010H01RNOL'  &lt;br /&gt;  and MQ_IUNIT = 'SPEDA000001Y'&lt;br /&gt;2)&lt;br /&gt;Select count(A_ACTIVITY.AY__ICODE) &lt;br /&gt;from A_AYBOOK, A_ACTIVITY, A_MAYREQ, A_SERPOIN&lt;br /&gt;WHERE MQ_IATTY = AY__ICODE &lt;br /&gt;  and AK_AYCODE = AY__ICODE&lt;br /&gt;  and AK_BKCODE = 'IU010H01RNOL'&lt;br /&gt;  and MQ_IUNIT = 'SPEDA000001Y'&lt;br /&gt;The from clause in the second statement contain a extra class A_SERPOIN. This makes the SQL return many more elements, because it interprets this as a inner join. Therefore read all your statement, before using.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-3319140566290213683?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/3319140566290213683/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=3319140566290213683' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/3319140566290213683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/3319140566290213683'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2007/05/funny-thing-about-sql.html' title='The funny thing about SQL'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-504836145998212688</id><published>2007-04-27T07:12:00.000-07:00</published><updated>2007-04-27T07:16:04.108-07:00</updated><title type='text'>Middle age support</title><content type='html'>There are some things which can always make me laugh, this small movie is one of them:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.boreme.com/boreme/funny-2007/introducing-the-book-p1.php" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;http://www.boreme.com/boreme&lt;wbr&gt;/funny-2007/introducing-the&lt;wbr&gt;-book-p1.php&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now some friendly sole has added English subtitles, actually supertitles, and danish subtitles. But it doesn't  ruin the fun.&lt;br /&gt;&lt;br /&gt;Enjoy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-504836145998212688?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/504836145998212688/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=504836145998212688' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/504836145998212688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/504836145998212688'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2007/04/there-are-some-things-which-can-always.html' title='Middle age support'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-4735039663265326745</id><published>2007-04-27T01:49:00.000-07:00</published><updated>2007-04-27T01:53:53.304-07:00</updated><title type='text'>Not a blog without a manifesto</title><content type='html'>Hello reader (which is probably only myself),&lt;br /&gt;&lt;br /&gt;This is my technical blog, lets see what kind of tech it will contain...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-4735039663265326745?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/4735039663265326745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=4735039663265326745' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/4735039663265326745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/4735039663265326745'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2007/04/not-blog-without-manifesto.html' title='Not a blog without a manifesto'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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-6895939420740956898.post-9166336465143832177</id><published>2007-04-27T01:42:00.000-07:00</published><updated>2007-05-17T07:31:33.120-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='error'/><title type='text'>BC30560 asp.net</title><content type='html'>&lt;h2&gt;&lt;span style="font-size:100%;"&gt;'xxx' is ambiguous in the namespace 'YYY'...&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;br /&gt;Is an error I had some fun with, because I, of course, thought it was something in the code. But finally (after googling a bit) I looked in my bin directory, where I found a dll-file that contained an old version of 'xxx', which made the 'xxx' visible to the application in two versions.&lt;br /&gt;&lt;br /&gt;Upla... yet another example that it is a very good idea to read and understand the error messages.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6895939420740956898-9166336465143832177?l=tecneck.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecneck.blogspot.com/feeds/9166336465143832177/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6895939420740956898&amp;postID=9166336465143832177' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/9166336465143832177'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6895939420740956898/posts/default/9166336465143832177'/><link rel='alternate' type='text/html' href='http://tecneck.blogspot.com/2007/04/bc30560-aspnet.html' title='BC30560 asp.net'/><author><name>kfj</name><uri>http://www.blogger.com/profile/01244129149009760058</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>
