<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>

<channel>
	<title>Mats codemix</title>
	<atom:link href="http://mats.gardstad.se/matscodemix/feed/" rel="self" type="application/rss+xml" />
	<link>http://mats.gardstad.se/matscodemix</link>
	<description>A little c#, a litte .NET and throw in some c++ and you get a nice Spaghetti</description>
	<pubDate>Tue, 03 Jan 2012 11:16:10 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Good tips on VB6 string handling</title>
		<link>http://mats.gardstad.se/matscodemix/2011/08/23/good-tips-on-vb6-string-handling/</link>
		<comments>http://mats.gardstad.se/matscodemix/2011/08/23/good-tips-on-vb6-string-handling/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 08:34:48 +0000</pubDate>
		<dc:creator>matsgf</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mats.gardstad.se/matscodemix/?p=198</guid>
		<description><![CDATA[Doing (temporary) development in VB6 i found these tips on string handling in VB6
http://www.aivosto.com/vbtips/stringopt.html
Find additional tips on http://www.aivosto.com/vbtips/
]]></description>
			<content:encoded><![CDATA[<p>Doing (temporary) development in VB6 i found these tips on string handling in VB6</p>
<p><a href="http://www.aivosto.com/vbtips/stringopt.html" target="_blank">http://www.aivosto.com/vbtips/stringopt.html</a></p>
<p>Find additional tips on <a href="http://www.aivosto.com/vbtips/" target="_blank">http://www.aivosto.com/vbtips/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mats.gardstad.se/matscodemix/2011/08/23/good-tips-on-vb6-string-handling/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Why is it called BDUF [Humor]</title>
		<link>http://mats.gardstad.se/matscodemix/2011/06/27/why-is-it-called-bduf-humor/</link>
		<comments>http://mats.gardstad.se/matscodemix/2011/06/27/why-is-it-called-bduf-humor/#comments</comments>
		<pubDate>Mon, 27 Jun 2011 09:24:10 +0000</pubDate>
		<dc:creator>matsgf</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[bduf]]></category>

		<category><![CDATA[humor]]></category>

		<guid isPermaLink="false">http://mats.gardstad.se/matscodemix/?p=195</guid>
		<description><![CDATA[It dawned on me why it is called BDUF.
It is the sound you hear when the pile of design specs lands on your table.
BDUF!!!

]]></description>
			<content:encoded><![CDATA[<p>It dawned on me why it is called BDUF.<br />
It is the sound you hear when the pile of design specs lands on your table.</p>
<p><strong>BDUF!</strong>!!<br />
<img src="http://farm1.static.flickr.com/141/326761635_7736e92d44.jpg" alt="BDUF!!! (image borrowed from Flickr)" /></p>
]]></content:encoded>
			<wfw:commentRss>http://mats.gardstad.se/matscodemix/2011/06/27/why-is-it-called-bduf-humor/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Disadvantage with having code in Database</title>
		<link>http://mats.gardstad.se/matscodemix/2010/06/11/disadvantage-with-having-code-in-database/</link>
		<comments>http://mats.gardstad.se/matscodemix/2010/06/11/disadvantage-with-having-code-in-database/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 13:38:27 +0000</pubDate>
		<dc:creator>matsgf</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Rants]]></category>

		<category><![CDATA[SQL]]></category>

		<category><![CDATA[sprocs]]></category>

		<category><![CDATA[stored procedures]]></category>

		<category><![CDATA[sybase]]></category>

		<guid isPermaLink="false">http://mats.gardstad.se/matscodemix/?p=193</guid>
		<description><![CDATA[I suddenly realized one big disadvantage about having code in the database (stored procedures etc) - Restoring
Restoring a database disrupts the versioning. Code and data are not versioned together. Database structure and code are usually tied together.
Say i have a procedure i want to modify.

I edit the SP,
update it in the database
run it.

I find an [...]]]></description>
			<content:encoded><![CDATA[<p>I suddenly realized one big disadvantage about having code in the database (stored procedures etc) - Restoring</p>
<p>Restoring a database disrupts the versioning. Code and data are not versioned together. Database structure and code are usually tied together.</p>
<p>Say i have a procedure i want to modify.</p>
<ol>
<li>I edit the SP,</li>
<li>update it in the database</li>
<li>run it.</li>
</ol>
<p>I find an error, correct it and want to run it against the original data. What do i do?</p>
<p>Restore is usually the best option if my test-data has a alot of relations. Maybe i even want to run the sproc against a copy of the production database when fixing a bug.</p>
<p>After each restore i need to update the sprocs to the new version. It can get quite tedious after a while and one risk is that you miss to update something if there are many procedures. One solution to this is to always have the code on disk and version controlled and script the updates into the database.</p>
<p>My opinion is rather clear in this case. Don&#8217;t have too much program-logic  in the database.</p>
]]></content:encoded>
			<wfw:commentRss>http://mats.gardstad.se/matscodemix/2010/06/11/disadvantage-with-having-code-in-database/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Powershell tips - Filter files modified the last n days</title>
		<link>http://mats.gardstad.se/matscodemix/2009/12/03/powershell-tips-filter-files-modified-the-last-n-days/</link>
		<comments>http://mats.gardstad.se/matscodemix/2009/12/03/powershell-tips-filter-files-modified-the-last-n-days/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 09:36:32 +0000</pubDate>
		<dc:creator>matsgf</dc:creator>
		
		<category><![CDATA[Powershell]]></category>

		<category><![CDATA[powersehll]]></category>

		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://mats.gardstad.se/matscodemix/?p=191</guid>
		<description><![CDATA[I wanted to list files modified the last n days. Here is a filter function i wrote to help me.
 1 function FilterLast([int] $nDays)
 2 {
 3     begin {
 4         $DateToCompare = (Get-date).AddDays(-1 * $nDays)
 5     }
 6 
 [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to list files modified the last n days. Here is a filter function i wrote to help me.</p>
<pre><span style="color: #008080;"> 1</span> <span style="color: #0000ff;">function</span><span style="color: #000000;"> FilterLast([int] </span><span style="color: #800080;">$nDays</span><span style="color: #000000;">)
</span><span style="color: #008080;"> 2</span> <span style="color: #000000;">{
</span><span style="color: #008080;"> 3</span> <span style="color: #000000;">    </span><span style="color: #0000ff;">begin</span><span style="color: #000000;"> {
</span><span style="color: #008080;"> 4</span> <span style="color: #000000;">        </span><span style="color: #800080;">$DateToCompare</span><span style="color: #000000;"> </span><span style="color: #000000;">=</span><span style="color: #000000;"> (Get</span><span style="color: #000000;">-</span><span style="color: #000000;">date).AddDays(</span><span style="color: #000000;">-</span><span style="color: #000000;">1</span><span style="color: #000000;"> </span><span style="color: #000000;">*</span><span style="color: #000000;"> </span><span style="color: #800080;">$nDays</span><span style="color: #000000;">)
</span><span style="color: #008080;"> 5</span> <span style="color: #000000;">    }
</span><span style="color: #008080;"> 6</span> <span style="color: #000000;">
</span><span style="color: #008080;"> 7</span> <span style="color: #000000;">    </span><span style="color: #0000ff;">process</span><span style="color: #000000;">
</span><span style="color: #008080;"> 8</span> <span style="color: #000000;">    {
</span><span style="color: #008080;"> 9</span> <span style="color: #000000;">        </span><span style="color: #000000;">%</span><span style="color: #000000;">{ </span><span style="color: #0000ff;">if</span><span style="color: #000000;"> (</span><span style="color: #800080;">$_</span><span style="color: #000000;">.lastwritetime –gt </span><span style="color: #800080;">$DateToCompare</span><span style="color: #000000;">) { </span><span style="color: #800080;">$_</span><span style="color: #000000;"> } }
</span><span style="color: #008080;">10</span> <span style="color: #000000;">    }
</span><span style="color: #008080;">11</span> <span style="color: #000000;">} 

</span></pre>
<p><span style="color: #000000;">So now i can write </span></p>
<pre><span style="color: #000000;">ls | filterlast -nDays 4</span></pre>
<p><span style="color: #000000;"><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://mats.gardstad.se/matscodemix/2009/12/03/powershell-tips-filter-files-modified-the-last-n-days/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Some good links on SCM - software configuration management</title>
		<link>http://mats.gardstad.se/matscodemix/2009/11/19/some-good-links-on-scm-software-configuration-management/</link>
		<comments>http://mats.gardstad.se/matscodemix/2009/11/19/some-good-links-on-scm-software-configuration-management/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 09:30:23 +0000</pubDate>
		<dc:creator>matsgf</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[scm]]></category>

		<category><![CDATA[software]]></category>

		<category><![CDATA[source code management]]></category>

		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://mats.gardstad.se/matscodemix/?p=187</guid>
		<description><![CDATA[Henrik Kniberg has written some very interesting things on agile version control. He has some links to other interesting sources as well. Go there, read it!
From Perforce I found this writing about High level best practices in SCM.
Is SCM the acronym for:

Software Configuration Management
Source Code Management

Both searches on Google seems to to point in the [...]]]></description>
			<content:encoded><![CDATA[<p>Henrik Kniberg has written some very interesting things on<a href="http://www.infoq.com/articles/agile-version-control" target="_blank"> agile version control</a>. He has some links to other interesting sources as well. Go there, read it!</p>
<p>From Perforce I found this writing about <a href="http://www.perforce.com/perforce/papers/bestpractices.html" target="_blank">High level best practices in SCM</a>.</p>
<p>Is SCM the acronym for:</p>
<ul>
<li><a href="http://www.google.se/search?hl=sv&amp;q=%22Software+Configuration+Management%22&amp;btnG=S%C3%B6k&amp;meta=&amp;aq=f&amp;oq=" target="_blank">Software Configuration Management</a></li>
<li><a href="http://www.google.se/search?hl=sv&amp;source=hp&amp;q=%22Source+Code+Management%22&amp;btnG=Google-s%C3%B6kning&amp;meta=&amp;aq=f&amp;oq=" target="_blank">Source Code Management</a></li>
</ul>
<p>Both searches on Google seems to to point in the direction that they roughly are equivalent with the &#8220;<a href="http://www.google.se/search?hl=sv&amp;q=%22Software+Configuration+Management%22&amp;btnG=S%C3%B6k&amp;meta=&amp;aq=f&amp;oq=" target="_blank">Software Configuration Management&#8221; </a>being a little more high level.<a href="http://www.google.se/search?hl=sv&amp;q=%22Software+Configuration+Management%22&amp;btnG=S%C3%B6k&amp;meta=&amp;aq=f&amp;oq=" target="_blank"><br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mats.gardstad.se/matscodemix/2009/11/19/some-good-links-on-scm-software-configuration-management/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Windows Special folders in powershell&#8230;</title>
		<link>http://mats.gardstad.se/matscodemix/2009/11/09/windows-special-folders-in-powershell/</link>
		<comments>http://mats.gardstad.se/matscodemix/2009/11/09/windows-special-folders-in-powershell/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 08:05:04 +0000</pubDate>
		<dc:creator>matsgf</dc:creator>
		
		<category><![CDATA[Powershell]]></category>

		<guid isPermaLink="false">http://mats.gardstad.se/matscodemix/?p=181</guid>
		<description><![CDATA[&#8230; or where is my wallpaper?
I wanted to edit the imagefile i had as windows desktop background so i wanted to find out the location of it. Excellent material for a powershell lession i thought.
So where are the special folders? Could it be here:
ls ([Environment]::GetFolderPath('MyPictures')
Found help about how to get windows special folders  here and [...]]]></description>
			<content:encoded><![CDATA[<p><strong>&#8230; or where is my wallpaper?</strong></p>
<p>I wanted to edit the imagefile i had as windows desktop background so i wanted to find out the location of it. Excellent material for a powershell lession i thought.</p>
<p>So where are the special folders? Could it be here:</p>
<pre><span style="color: #000000;">ls ([Environment]</span><span style="color: #000000;">::</span><span style="color: #000000;">GetFolderPath('MyPictures')</span></pre>
<p>Found help about how to get windows special folders  <a href="http://powershell.com/cs/blogs/tips/archive/2008/11/26/finding-system-folders.aspx" target="_blank">here </a>and <a href="http://www.tek-tips.com/faqs.cfm?fid=6623" target="_blank">here</a>.</p>
<p>What is [environment+Specialfolder]? Looks like it&#8217;s an enum.</p>
<pre>IsPublic IsSerial Name                                     BaseType
-------- -------- ----                                     --------
False    True     SpecialFolder                            System.Enum

So you can list all enum names like this.</pre>
<p>A nice way to list all options for special folders is:</p>
<p><span style="color: #000000;">[environment</span><span style="color: #000000;">+</span><span style="color: #000000;">specialfolder]</span><span style="color: #000000;">::</span><span style="color: #000000;">GetNames([environment</span><span style="color: #000000;">+</span><span style="color: #000000;">specialfolder])<br />
Desktop<br />
Programs<br />
Personal<br />
MyDocuments<br />
Favorites<br />
Startup<br />
&#8230;etc<br />
</span></p>
<p>Eventually i had to use the windows dialog and found out that the wallpaper was in:</p>
<pre><span style="color: #000000;"> ([Environment]</span><span style="color: #000000;">::</span><span style="color: #000000;">GetFolderPath('ApplicationData') </span><span style="color: #000000;">+</span><span style="color: #000000;"> </span><span style="color: #800000;">"</span><span style="color: #800000;">\mozilla\firefox\</span><span style="color: #800000;">"</span><span style="color: #000000;">)</span></pre>
<p>But i learned some new powershell.</p>
]]></content:encoded>
			<wfw:commentRss>http://mats.gardstad.se/matscodemix/2009/11/09/windows-special-folders-in-powershell/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Powershelll tips - Filter on container</title>
		<link>http://mats.gardstad.se/matscodemix/2009/11/02/powershelll-tips-filter-on-container/</link>
		<comments>http://mats.gardstad.se/matscodemix/2009/11/02/powershelll-tips-filter-on-container/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 13:51:57 +0000</pubDate>
		<dc:creator>matsgf</dc:creator>
		
		<category><![CDATA[Powershell]]></category>

		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://mats.gardstad.se/matscodemix/?p=177</guid>
		<description><![CDATA[Say you want to recurse a diretory tree and show just the directories.
Yo can write
ls C:\ -rec &#124; %{if ($_.PSIsContainer) { $_ }} &#124; %{$_.Fullname}
Add a little filter function
1 function FilterContainer()
2 {
3     process
4     {
5         %{if ($_.PSIsContainer) { $_ }}
6 [...]]]></description>
			<content:encoded><![CDATA[<p>Say you want to recurse a diretory tree and show just the directories.</p>
<p>Yo can write</p>
<pre><span style="color: #000000;">ls C:\ </span><span style="color: #000000;">-</span><span style="color: #000000;">rec </span><span style="color: #000000;">|</span><span style="color: #000000;"> </span><span style="color: #000000;">%</span><span style="color: #000000;">{</span><span style="color: #0000ff;">if</span><span style="color: #000000;"> (</span><span style="color: #800080;">$_</span><span style="color: #000000;">.PSIsContainer) { </span><span style="color: #800080;">$_</span><span style="color: #000000;"> }} </span><span style="color: #000000;">|</span><span style="color: #000000;"> </span><span style="color: #000000;">%</span><span style="color: #000000;">{</span><span style="color: #800080;">$_</span><span style="color: #000000;">.Fullname}</span></pre>
<p>Add a little filter function</p>
<pre><span style="color: #008080;">1</span> <span style="color: #0000ff;">function</span><span style="color: #000000;"> FilterContainer()
</span><span style="color: #008080;">2</span> <span style="color: #000000;">{
</span><span style="color: #008080;">3</span> <span style="color: #000000;">    </span><span style="color: #0000ff;">process</span><span style="color: #000000;">
</span><span style="color: #008080;">4</span> <span style="color: #000000;">    {
</span><span style="color: #008080;">5</span> <span style="color: #000000;">        </span><span style="color: #000000;">%</span><span style="color: #000000;">{</span><span style="color: #0000ff;">if</span><span style="color: #000000;"> (</span><span style="color: #800080;">$_</span><span style="color: #000000;">.PSIsContainer) { </span><span style="color: #800080;">$_</span><span style="color: #000000;"> }}
</span><span style="color: #008080;">6</span> <span style="color: #000000;">    }
</span><span style="color: #008080;">7</span> <span style="color: #000000;">}
</span></pre>
<p>Which reduces the first line to</p>
<pre><span style="color: #000000;">ls C:\ </span><span style="color: #000000;">-</span><span style="color: #000000;">rec </span><span style="color: #000000;">|</span><span style="color: #000000;"> FilterContainer </span><span style="color: #000000;">|</span><span style="color: #000000;"> </span><span style="color: #000000;">%</span><span style="color: #000000;">{</span><span style="color: #800080;">$_</span><span style="color: #000000;">.Fullname}</span></pre>
]]></content:encoded>
			<wfw:commentRss>http://mats.gardstad.se/matscodemix/2009/11/02/powershelll-tips-filter-on-container/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Clever SQL</title>
		<link>http://mats.gardstad.se/matscodemix/2009/08/18/clever-sql/</link>
		<comments>http://mats.gardstad.se/matscodemix/2009/08/18/clever-sql/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 15:24:34 +0000</pubDate>
		<dc:creator>matsgf</dc:creator>
		
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://mats.gardstad.se/matscodemix/?p=175</guid>
		<description><![CDATA[Here are some clever SQL for searching strings via soundex or like, as well as finding gaps in sequences etc.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://download.sybase.com/presentation/2003_presentations/ASE127.ppt" target="_blank">Here are some clever</a> SQL for searching strings via soundex or like, as well as finding gaps in sequences etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://mats.gardstad.se/matscodemix/2009/08/18/clever-sql/feed/</wfw:commentRss>
		</item>
		<item>
		<title>VB6 and .NET (Visual studio 2008)</title>
		<link>http://mats.gardstad.se/matscodemix/2009/07/30/vb6-and-net-visual-studio-2008/</link>
		<comments>http://mats.gardstad.se/matscodemix/2009/07/30/vb6-and-net-visual-studio-2008/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 11:58:32 +0000</pubDate>
		<dc:creator>matsgf</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<category><![CDATA[VB6]]></category>

		<guid isPermaLink="false">http://mats.gardstad.se/matscodemix/?p=172</guid>
		<description><![CDATA[Im working on a legacy app written in VB6 and want to write .NET-stuff that integrates with it. I feared that i couldnt have both IDEs installed side by side but it seems to work ok (so far&#8230;).  The ideal is to put the VB6 environment in a virtual machine and keep it there.
The installation [...]]]></description>
			<content:encoded><![CDATA[<p>Im working on a legacy app written in VB6 and want to write .NET-stuff that integrates with it. I feared that i couldnt have both IDEs installed side by side but it seems to work ok (so far&#8230;).  The ideal is to put the VB6 environment in a virtual machine and keep it there.</p>
<p>The installation order was VB6 and then VS2008.</p>
<p>Luckilly our app communicates via the server through a DLL and it will be a (relatively) simple task to replace that with a COM-class written in C#.</p>
]]></content:encoded>
			<wfw:commentRss>http://mats.gardstad.se/matscodemix/2009/07/30/vb6-and-net-visual-studio-2008/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SQL-formatter (updated)</title>
		<link>http://mats.gardstad.se/matscodemix/2009/07/28/sql-formatter/</link>
		<comments>http://mats.gardstad.se/matscodemix/2009/07/28/sql-formatter/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 13:37:43 +0000</pubDate>
		<dc:creator>matsgf</dc:creator>
		
		<category><![CDATA[SQL]]></category>

		<category><![CDATA[sqlcode]]></category>

		<category><![CDATA[sqltools]]></category>

		<category><![CDATA[sqlutilities]]></category>

		<guid isPermaLink="false">http://mats.gardstad.se/matscodemix/?p=112</guid>
		<description><![CDATA[Working a lot with SQL at the moment i found a handy tool for formatting SQL-code.
SqlInform automatic SQL code  		formatter (http://www.sqlinform.com/)

There is an online version but also a free although time-limited JAVA-program to download. The online version handles just 100 lines of code mind you.
Another online formatter without the 100-line limit.  http://www.dpriver.com/pp/sqlformat.htm
Some that i [...]]]></description>
			<content:encoded><![CDATA[<p>Working a lot with SQL at the moment i found a handy tool for formatting SQL-code.</p>
<p><a title="SQL Formatter" href="http://www.sqlinform.com/" target="_blank">SqlInform <span lang="en-gb">automatic SQL code  		formatter (</span>http://www.sqlinform.com/</a><span lang="en-gb"><a title="SQL Formatter" href="http://www.sqlinform.com/" target="_blank">)<br />
</a></span></p>
<p>There is an online version but also a free although time-limited JAVA-program to download. The online version handles just 100 lines of code mind you.</p>
<p>Another online formatter without the 100-line limit.  http://www.dpriver.com/pp/sqlformat.htm</p>
<p>Some that i havent tried (yet&#8230;)</p>
<p>http://www.orafaq.com/utilities/sqlformatter.htm</p>
<p>http://www.dbainfopower.com/dbaip_free_download_execute.php (free registration )</p>
<p>http://www.wangz.net/cgi-bin/pp/gsqlparser/sqlpp/sqlformat.tpl (Pay)</p>
<p>http://www.ubitsoft.com/products/sqlenlight/sqlenlight.php (pay)</p>
]]></content:encoded>
			<wfw:commentRss>http://mats.gardstad.se/matscodemix/2009/07/28/sql-formatter/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

