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

<channel>
	<title>midnight muse &#187; Programming</title>
	<atom:link href="http://midnightmuse.com.au/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://midnightmuse.com.au</link>
	<description>Richard Wright's musings about software and other things that take his fancy</description>
	<lastBuildDate>Thu, 15 Sep 2011 14:01:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>MySql Connection Problem</title>
		<link>http://midnightmuse.com.au/2010/05/06/mysql-connection-problem/</link>
		<comments>http://midnightmuse.com.au/2010/05/06/mysql-connection-problem/#comments</comments>
		<pubDate>Thu, 06 May 2010 05:43:18 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://midnightmuse.com.au/?p=198</guid>
		<description><![CDATA[I really don't like MySql with .NET <a href="http://midnightmuse.com.au/2010/05/06/mysql-connection-problem/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Everyone loves MySql. It is everywhere. This website runs on it.</p>
<p>But I keep having problems when I use it as the database for .NET applications.</p>
<p>I delivered an application last week. A fairly standard windows desktop application. Except that the database it was connecting to was MySql. As usual, I did my data access using my favourite OR/M tool, LLBLGen. The application crashed at the client&#8217;s site as soon as they tried to access the database.</p>
<p>I checked the connection string, and that was OK. In any event, the exception didn&#8217;t look like that was the problem. It seems that the ado.net provider was missing. But that made no sense to me.</p>
<p>So I loaded it up onÂ  a clean install of XP, that is what the client is running, on a virtual machine that only had the .Net framework and MySql installed. Everything else came straight from source control. And it worked fine.</p>
<p>I hate bugs that I cannot reproduce, and it is driving me crazy!</p>
<p>I am now in the process of cleaning out everything on my laptop, copying those things that I think I need to an external drive, and reloading Windows from scratch. I will try to reproduce the bug on it.</p>
<p>It sounds crazy that I am spending all this time trying to produce a bug. I usually spend my time trying to get rid of them.</p>
]]></content:encoded>
			<wfw:commentRss>http://midnightmuse.com.au/2010/05/06/mysql-connection-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Arms Race</title>
		<link>http://midnightmuse.com.au/2010/04/29/the-arms-race/</link>
		<comments>http://midnightmuse.com.au/2010/04/29/the-arms-race/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 15:03:05 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://midnightmuse.com.au/?p=194</guid>
		<description><![CDATA[There is a battle going on and we will all be winners. <a href="http://midnightmuse.com.au/2010/04/29/the-arms-race/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Visual Studio 2010 is out, more or less. It will be officially launched in May and be available through retail outlets in June. But it is available now via MSDN for subscribers.</p>
<p>I&#8217;ve played around with the beta and the RC versions for a while, and I downloaded the RTM version last week. My only gripe is that it is slow to start, but once it is open it is a joy to use.</p>
<p>I first started using .Net when version 1.1 was released in 2003. Version 2 of the CLR which was released with Visual Studio 2005 was a big improvement, as you would expect. When I moved to VS 2005 I also discovered Resharper and I have been a fan ever since.</p>
<p>One thing that I have noticed over the years is that each new Visual Studio release has incorporated some of the functionality that was provided by Resharper. For Resharper you could substitute CodeRush + Refractor and the statement would also be true. I think if I had tried CodeRush before I got used to Resharper then I would probably use CodeRush instead. They are both great products and both have substantial numbers of loyal followers.</p>
<p>However, to get back to my point. Resharper and CodeRush &#8211; and I think there may be one or two others, there certainly used to be, but these are the main contenders &#8211; provide some functionality that is missing from Visual Studio. As each subsequent version of Visual Studio incorporate some or most of this functionality, Jet Brains and Developer Express need to add more functionality to Resharper and CodeRush otherwise no one would buy or upgrade their products.</p>
<p>Resharper 5 has just been released. It too has been in beta and then RC versions for some time. I was very disappointed that the RC versions that I tried did not have highlighting of the current line. A very small issue, but one that made coding, for me at least, so much easier. Maybe its usefulness was more perception than reality, I don&#8217;t know. Except that when it wasn&#8217;t available in VS 2010 I was bitterly disappointed. But the final version has it restored and so all is well with the world.</p>
<p>And Resharper has a whole bunch of new stuff as well. It has to if it wants to stay in the market.</p>
<p>So the result is that with each version of Visual Studio we developers get a better environment in which to code, and our add-ons keep improving at the same time.</p>
<p>I recommend that you try out VS 2010 and also give Resharper or CodeRush a try as well. You won&#8217;t be disappointed.</p>
]]></content:encoded>
			<wfw:commentRss>http://midnightmuse.com.au/2010/04/29/the-arms-race/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Own Stupidity Amazes Me!</title>
		<link>http://midnightmuse.com.au/2010/04/14/my-own-stupidity-amazes-me/</link>
		<comments>http://midnightmuse.com.au/2010/04/14/my-own-stupidity-amazes-me/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 14:28:01 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://midnightmuse.com.au/?p=192</guid>
		<description><![CDATA[You'd think at my age I might have learned. But I haven't. <a href="http://midnightmuse.com.au/2010/04/14/my-own-stupidity-amazes-me/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It doesn&#8217;t seem to matter how often we hear or read about what we should do. We still don&#8217;t do it. I even tell my clients what they should do, but I don&#8217;t do it. And today it bit me on the bum.</p>
<p>12th April was a significant day for Microsoft developers. Visual Studio 2010 was launched. It was 13th April here in Australia, because we are so far ahead of most of the rest of the world, except for New Zealand, and that is a real worry. But I digress.</p>
<p>Yesterday morning I downloaded Visual Studio. Actually I started the download and then went to see a client and didn&#8217;t get back until late afternoon. And then I had to install it.</p>
<p>I couldn&#8217;t install it straight away because I had the RC version already installed. And I had enormous trouble getting it uninstalled. Eventually, after many hours, it was gone. Or so I thought. I then tried to install VS 2010 and it told me that it couldn&#8217;t install because I still had a component left on. I uninstalled it and tried again. It started out fine but got to installing the .Net Framework V4 and there it hanged, hung, I&#8217;m not sure which.</p>
<p>I rebooted and tried again. Same thing. I got a cup of coffee and tried again. Still no go.</p>
<p>I downloaded the framework separately and tried that. It wouldn&#8217;t budge. I got another cup of coffee and played a few games of Sudoku, and that didn&#8217;t help.</p>
<p>At this stage I thought that it might be time for a clean install on the pc, and even though that thought fills me with dread, it probably is time, soon. I thought that I had better check my backup files and make sure that I have everything that I need. My client apps aren&#8217;t a problem, they are all under version control on a separate machine. But I have other backups sitting on two 1 tb external disks. Only one was connected to the pc at the time and the other one has some useful stuff on it. It hasn&#8217;t been connected since I re-arranged my office some time ago. So it was now time to dig it out and crawl around the floor under the desk and plug it in.</p>
<p>I tried one more time to install Visual Studio, and what do you know, it is working. It is chugging along quite nicely as I write. But it is now 12:20 am and I have been at this for hours.</p>
<p>The moral is, if I hadn&#8217;t installed the RC version I probably wouldn&#8217;t have had these problems. I wanted to try it out and so I installed it. I didn&#8217;t use it for any production work, I&#8217;m not that stupid. But I do have VMWare installed on this machine. And I have a couple of virtual machines set up for this purpose. Why didn&#8217;t I install the RC version on a vm? Cause I am dumb. Lazy and dumb.</p>
<p>But I have another confession to make. Before I got the RC version, I had a copy of a beta version. I didn&#8217;t install that on a vm either.</p>
<p>I said that I am not only dumb, I am lazy. If I was smart and lazy I would have stuck both these versions on a vm. It is a lot quicker to delete a virtual machine and then make a new clone of a clean vm and install the beta and release candidate versions on the new vm.</p>
<p>I have learnt my lesson, this has been a nightmare.</p>
<p>At least it is going well now and tomorrow I can play with it.</p>
]]></content:encoded>
			<wfw:commentRss>http://midnightmuse.com.au/2010/04/14/my-own-stupidity-amazes-me/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Source Control needs its own machine</title>
		<link>http://midnightmuse.com.au/2009/11/27/source-control-needs-its-own-machine/</link>
		<comments>http://midnightmuse.com.au/2009/11/27/source-control-needs-its-own-machine/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 12:24:27 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://midnightmuse.com.au/?p=188</guid>
		<description><![CDATA[It was brought home to me today why source control should really sit on a separate computer. <a href="http://midnightmuse.com.au/2009/11/27/source-control-needs-its-own-machine/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I use Subversion. Not because I think it is any better than any other source control system. It&#8217;s just that I have come to know it and get used to it. But I was reminded today that regardless of the source control, or version control, program you are using, it should be on a separate PC.</p>
<p>Yesterday morning I was doing some work and everthing was fine. I had to go out for a few hours and when I returned in the afternoon my development computer had died. I rang up my friendly PC repair guy who said it is probably the power supply, but it could be the motherboard. I left it with him and came home.</p>
<p>The only problem was that I had to deliver an application to a client this morning. There were some minor changes that I hadn&#8217;t finished. I was planning on finishing them yesterday afternoon, but that was now impossible. But all was not lost. I was able to grab the latest build from myh buildserver pc which holds the Subversion repository and does continuous integration using TeamCity. The latest changes that I was working on were not in Subversion. I hadn&#8217;t checked them in yet because they weren&#8217;t complete and they would have broken the build if I had.</p>
<p>And if I had kept the source control repository on my development machine it would have been quite safe, and I do nightly backups, things would have been different. I could have got the lastest stuff from the nightly backup, but not as easily. Stuff is the operative word. I would have had to stuff around getting it onto my laptop and then recompiling and checking that everything was OK. Probably a couple of hours work.</p>
<p>But this time it was easy. I had to go out first thing this morning. I got home around 9:30, had a cup of coffee, copied the latest build onto CD and had it delivered to the client by 10:15.</p>
<p>A separate pc hosing source control and continuous integration can save a lot of time, a lot of hassle, and probably a lot of hair.</p>
]]></content:encoded>
			<wfw:commentRss>http://midnightmuse.com.au/2009/11/27/source-control-needs-its-own-machine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Databinding</title>
		<link>http://midnightmuse.com.au/2009/10/29/databinding/</link>
		<comments>http://midnightmuse.com.au/2009/10/29/databinding/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 14:31:23 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://midnightmuse.com.au/?p=186</guid>
		<description><![CDATA[I have had a long held hatred of databinding. I am starting to change <a href="http://midnightmuse.com.au/2009/10/29/databinding/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Back in the good old days (were they really that good?) when I started programming in Windows I used Visual Basic version 3. The C++ guys down the hall would sneer at us, but we got stuff built pretty quickly compared to them, and, mostly, it worked.</p>
<p>Then along came VB4, and VB5 and VB6, each an improvement, although VB4 had some wrinkles that caused me problems. But that is all so long ago.</p>
<p>The one lingering problem, though, was databinding. Microsoft said that it was the greatest thing since sliced bread, and all the sample apps they provided worked just fine. But when you tried it in a real application it was problematic, at best. At worst, it just didn&#8217;t work.</p>
<p>I gave up using it in VB3. When each subsequent version came out I would try it again and again I would abandon it.</p>
<p>The problem is that some controls require it. The winforms datagrid, for example, could only be filled by using databinding, so I didn&#8217;t use the datagrid.</p>
<p>Then along .Net. Since I was a VB programmer I started out in VB .Net, and I tried databinding. It was supposed to be better, and maybe it was, but it was still pretty crook. So I still didn&#8217;t use the newfangled datagrid.</p>
<p>But things have changed. When Visual Studio 2005 came out I made the change to C#, and I once again tried databinding. And, at last it works. I still rarely use the datagrid, but I am binding to a lot of other controls, listboxes and combo boxes being the two most obvious.</p>
<p>I now use a lot of <a title="Developer Express" href="http://www.devexpress.com/" target="_self">Developer Express</a> controls and they make databinding a breeze.</p>
<p>I have read a lot of stuff from the Agile guys, and they generally don&#8217;t seem to like databinding. But if you don&#8217;t use it then you are fighting the tools that the IDE provides, rather than working with them. And now that WPF is getting better and better it is likely to become more mainstream, especially after Visual Studio 2010 comes out next year, databinding will take off in a big way. There are just so many ways that you can bind data in WPF, it makes no sense at all not to take advantage of it.</p>
<p>I have become a convert. Databinding has made my life so much simpler, and now it really does work.</p>
]]></content:encoded>
			<wfw:commentRss>http://midnightmuse.com.au/2009/10/29/databinding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Back to a WPF UI</title>
		<link>http://midnightmuse.com.au/2009/10/29/back-to-a-wpf-ui/</link>
		<comments>http://midnightmuse.com.au/2009/10/29/back-to-a-wpf-ui/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 14:11:13 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[Presenter]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://midnightmuse.com.au/?p=141</guid>
		<description><![CDATA[I have found a better solution to the dual screen problem <a href="http://midnightmuse.com.au/2009/10/29/back-to-a-wpf-ui/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In the previous post I wrote about the problem I had showing a WPF window on a second screen. And this is a major requirement of the application. After much searching I came to the conclusion that it could not be done easily. The only reasonable solution seemed to be building a winforms app and hosting a WPF control for the second screen. I tried that and it worked fine. The way to do it is pretty simple. I created a new project called WPFControls, it would get a better name in the real version â€“ this is just to try it out â€“ and created a WPF control which contained a Rich Textbox. It won&#8217;t stay that way; it will ultimately be a FlowDocumentReader or a FlowDocumentPageReader, but at this stage I don&#8217;t know which one. And in the previous code in WPF I had built a RichTextBox for editing songs and so, to test this line, I will just use the same code to load a song, hence the RTB.</p>
<p>The Rich TextBox loads the song from the database by reading in the flowdocument stored in the lyrics field for the song. All this is described in the previous articles.</p>
<p>On the windows form, which can  be shown on any screen, we place a control of type System.Windows.Forms.Integration.ElementHost. In my case this was given the name EditSongHost.<br />
When the EditSongForm is loaded it loads the WPF control and sets the Song property to the currently selected song.<br />
<code><br />
private void EditSongForm_Load(object sender, EventArgs e)<br />
{<br />
WpfControls.SongEditCtrl ctrl = new SongEditCtrl();<br />
ctrl.Song= song;<br />
EditSongHost.Child = ctrl;<br />
}<br />
</code></p>
<p>This worked just fine, but I now had a winforms application with some WPF controls, and this was a second best solution, as far as I was concerned. I really wanted a WPF application. I could have approximated that by building all the user controls in WPF and hosting all of them in windows forms, but that seemed to me to be madness. WPF is a relatively new technology, and maybe that was the only way possible at the moment. If so then, so be it.</p>
<p>But today I came across another solution on the <a href="http://forums.msdn.microsoft.com/en-US/wpf/thread/5d181304-8952-4663-8c3c-dc4d986aa8dd">Microsoft Forums</a>, in a reply given by Larry Olsen, WPF Program Manager. This is his solution</p>
<blockquote><p>1.<br />
Started a new WPF Application project in Visual Studio<br />
2.<br />
Added the needed references to System.Windows.Forms (needed for Screen) and System.Drawing (needed for Rectangle)<br />
3.<br />
Removed the StartupUri in the App.xaml file and overrode the OnStartup() method in code-behind. I did this because StartupUri points to just one Window, Window1.xaml, in the WPF Application template and OnStartup will let me control what happens when the application starts.<br />
4.<br />
Added Window2.xaml to the project so that I would have a second Window to display on a second monitor.<br />
5.<br />
Added code similar to the article you linked to the override of OnStartup  which was:</p>
<p>Code Block</p>
<p>protected override void OnStartup(StartupEventArgs e)<br />
{<br />
base.OnStartup(e);</p>
<p>Window1 w1 = new Window1();<br />
Window2 w2 = new Window2();</p>
<p>Screen s1 = Screen.AllScreens[0];<br />
Screen s2 = Screen.AllScreens[1];</p>
<p>Rectangle r1 = s1.WorkingArea;<br />
Rectangle r2 = s2.WorkingArea;</p>
<p>w1.Top = r1.Top;<br />
w1.Left = r1.Left;</p>
<p>w2.Top = r2.Top;<br />
w2.Left = r2.Left;</p>
<p>w1.Show();<br />
w2.Show();</p>
<p>w2.Owner = w1;</p>
<p>}</p></blockquote>
<p>I adapted that code so that the second window was displayed after clicking a button. It worked perfectly! I just need to make a few changes. First I needed to set the window style to none so that I had a full screen window with no title bar or maximise, minimise and close buttons. This is why it is important to set the window&#8217;s Owner property. If you don&#8217;t set that and close the main window the second screen is still active and the program is still running. In any event, the second screen needs to be entirely controlled by the primary screen.</p>
<p>When I ran the program the second screen duly opened, but it wasn&#8217;t maximised. So I set its WindowState to Maximized and then tried it. It was maximised but it was showing on the primary monitor, not the second monitor. Why was this happening? I have no idea. But after trying a few things I decided to call the Show method and then set the WindowState property to Maximized in code, after the Show() method. I don&#8217;t know why this makes a difference, but it does. Well, actually I can see why my solution works, but I don&#8217;t understand why setting the property before the Show() method makes a difference. I don&#8217;t know what is going on in the bowels of windows, and just to be sure I moved the WindowState property setting line of code to just before the Show() method, so that it was being set in code, not by the designer. I didn&#8217;t expect it to help, and it didn&#8217;t. No matter, it all seems to work fine.</p>
<p>Here is the code I used, hooked up to a temporary button<br />
<code><br />
private void btnShow_Click(object sender, RoutedEventArgs e)<br />
{<br />
DisplayWindow displayWindow = new DisplayWindow();<br />
Screen s2 = Screen.AllScreens[1];<br />
Rectangle rectangle = s2.WorkingArea;<br />
displayWindow.Top = rectangle.Top;<br />
displayWindow.Left = rectangle.Left;<br />
displayWindow.Show();<br />
displayWindow.WindowState = System.Windows.WindowState.Maximized;<br />
displayWindow.Owner = this;<br />
}<br />
</code></p>
<p>The only niggling doubt I have is that winforms and WPF use different units for screen and control measurement. Winforms uses pixels, and WPF doesn&#8217;t. Rather they have Device Independent Pixels which are equal to 1/96 of an inch. There are benefits to the way that WPF does its screen rendering, but even though it looks fine on my two monitor set up, I will have to test it on a projector which is likely to have a drifferent resolution to my monitor. I don&#8217;t think that WPF will have a problem with that, but the Screen properties, specifically the WorkingArea is a winforms property. I don&#8217;t expect a problem, but it will need to be checked.</p>
]]></content:encoded>
			<wfw:commentRss>http://midnightmuse.com.au/2009/10/29/back-to-a-wpf-ui/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beginning ASP.NET</title>
		<link>http://midnightmuse.com.au/2009/09/15/beginning-asp-net/</link>
		<comments>http://midnightmuse.com.au/2009/09/15/beginning-asp-net/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 14:24:53 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://midnightmuse.com.au/?p=177</guid>
		<description><![CDATA[ASP.Net is a brand new experience for me. <a href="http://midnightmuse.com.au/2009/09/15/beginning-asp-net/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>All of my .Net experience, until relatively recently, has been Winforms.Â  Over the past 12 to 18 months I have done a bit of WPF, but Winforms is still my bread and butter.</p>
<p>Early this year I picked up a new client. That itself was surprising. I thought in these troubled economic times that I might be struggling to find new work. But I happened to be recommended by the right person at the right time and I was asked to do a winforms project. Every developer knows that some projects go well, and some go badly. This one went well at every step. The client was pleased with the result and the application was deployed ahead of time.</p>
<p>It could have gone the other way. I could have run into unforseen problems and had an application that didn&#8217;t meet expectations delivered late. And then I wouldn&#8217;t have been asked to do any more work for them. Fortunately, that wasn&#8217;t the case, and I have now done half a dozen winforms applications for this client.</p>
<p>Last week they asked me if I could do a simple ASP.Net application. I haven&#8217;t looked at ASP.Net in the last 6 or so years. When I first moved to .NET after a number of years programming windows in Visual Basic from version 3 to version 6, and dabbling in C++ along the way, I went through qutie a few tutorials and so I got a taste of ASP.Net. I haven&#8217;t looked at it since.</p>
<p>So I said I would brush up on it and see it went. Today I received the initial specs for the application.</p>
<p>I have spent the last three of four days brushing up on ASP.Net, and I have had a close look at ASP.Net MVC. I like the idea of MVC. I have read qutie a few blog posts which have described the good, the bad and the ugly of Microsoft&#8217;s implementation of MVC. But until now I haven&#8217;t used it in anger.</p>
<p>When I do Winforms applications I often use Model View Presenter. In WPF I have been looking at MVVM, and I am currently working on a project that will use it for the first time.</p>
<p>Whether ASP.Net MVC is the right way to go, I can&#8217;t say. I don&#8217;t have enough experience. But it does look, on the face of it, a better approach than standard ASP.Net. So I think I will try that and see what happens.</p>
]]></content:encoded>
			<wfw:commentRss>http://midnightmuse.com.au/2009/09/15/beginning-asp-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up a Build Server Part 4 &#8211; Subversion</title>
		<link>http://midnightmuse.com.au/2009/06/05/setting-up-a-build-server-part-4-subversion/</link>
		<comments>http://midnightmuse.com.au/2009/06/05/setting-up-a-build-server-part-4-subversion/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 23:30:04 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[Build Server]]></category>

		<guid isPermaLink="false">http://midnightmuse.com.au/?p=169</guid>
		<description><![CDATA[The easiest way to setup Subversion is to use VisualSVN <a href="http://midnightmuse.com.au/2009/06/05/setting-up-a-build-server-part-4-subversion/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The next thing to do was to setup Subversion, my version control of choice. There are many other version control or source control products out there. Some are very good. But I am used to Subversion. As a one man IT shop I don&#8217;t use all the features but what I do use is very useful.</p>
<p>The easiest way to set it up is to get <a href="http://www.visualsvn.com/">VisualSVN</a>.  I have <a href="http://midnightmuse.com.au/2007/12/05/visualsvn/">written about it before</a>, and it is a snap to use. You install it and follow the prompts, it really is that easy.</p>
<p>Next time- setting up continuous integration</p>
]]></content:encoded>
			<wfw:commentRss>http://midnightmuse.com.au/2009/06/05/setting-up-a-build-server-part-4-subversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up a Build Server Part 3 &#8211; Interlude</title>
		<link>http://midnightmuse.com.au/2009/06/05/setting-up-a-build-server-part-3-interlude/</link>
		<comments>http://midnightmuse.com.au/2009/06/05/setting-up-a-build-server-part-3-interlude/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 23:11:04 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[Build Server]]></category>

		<guid isPermaLink="false">http://midnightmuse.com.au/?p=165</guid>
		<description><![CDATA[More on the problems of an out-of-his-depth geek <a href="http://midnightmuse.com.au/2009/06/05/setting-up-a-build-server-part-3-interlude/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I am a bit late in posting this article, I had to finish some work for a client.</p>
<p>The strange thing is that it is the same client who caused me the problems which started this. The history of deployment to this client is briefly this: First time we had to make sure that we were going to the right place, check connection strings etc etc. So it was a case of check and double check and that made it go a little slowly. In addition I had a missing dll on my laptop so I went back to work, fortunately close by, did a fresh checkin from Subversion onto the laptop, recompiled, and went back to the client. All up, deploying and running a few acceptance tests took a couple of hours. Far too long in my view.</p>
<p>The second time was a nightmare. There were a few changes requested by the users and one additional feature. There was also one feature (user story for the agilists) that I had misunderstood slightly. That meant a couple of hours work. But it emphasised the value in short iterations. The first iteration was four weeks. So, very quickly, a wrong understanding by me of the requirements is rectified. If I had been given the requirements for the full product and disappeared for three months that would have been a lot more time, and a lot more money, developing the wrong feature. Back to the deployment. The client asked for a zipped file which I sent to them. I had forgotten to change the database connection string, so it didn&#8217;t work. Fortunately it didn&#8217;t crash but brought up a nice message box with a re-assuring message that all was right in the world. But it wasn&#8217;t going to connect.</p>
<p>I changed the connection string and recompiled, rezipped, and re-emailed. I forget the next problem, or the next or the next. However, I sent the first zipped file on a Friday. They got the working version on Tuesday and I felt, and probably looked like a fool.</p>
<p>The third iteration was again on a Friday, perhaps a bad omen. I wasn&#8217;t risking sending a zipped file so I loaded everything onto the laptop and went to see the client. I was there for about half an hour &#8211; 25 mintues talking about the next project they want done, and 5 minutes deploying. The guy who did the deploying did his black magic about which I know nothing. Two screens, each with half a dozen open windows filled up with line after line of voodoo incantations, and suddenly it was deployed. He checked the new features and the changes. He checked a few old things and it all looked fine. I left feeling relieved, knowing that this was more good luck than good management.</p>
<p>I said in the<a href="http://midnightmuse.com.au/2009/05/08/setting-up-a-build-server-part-2/">last article</a> that I used Windows Server 2008 because I wanted to try it out. I nothing of servers and I had trouble getting the network working properly. After a few days of frustration I removed it and installed Vista because I have set up a Vista network previously. In any event it is really a peer to peer network that I am after, not a client-server network. So getting to know Server 2008 is for another day.</p>
<p>Getting a few PCs to talk to each other is a piece of cake for a network person. Not for me In the old days when I worked for an employer and had a network problem I would ring up a network guy (it was always a guy) who would come up from the bowels of the building, or whereever they lived. He would ask a few questions that I couldn&#8217;t understand. I would shrug my shoulders so he would ring up another network guy. They would talk in acronyms for a while and suddenly I was back on the network. I don&#8217;t know how it works.</p>
<p>Eventually I got the network setup. The computers could talk to each other and I could login to SqlServer remotely. It was time to continue.</p>
]]></content:encoded>
			<wfw:commentRss>http://midnightmuse.com.au/2009/06/05/setting-up-a-build-server-part-3-interlude/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up a Build Server &#8211; Part 2</title>
		<link>http://midnightmuse.com.au/2009/05/08/setting-up-a-build-server-part-2/</link>
		<comments>http://midnightmuse.com.au/2009/05/08/setting-up-a-build-server-part-2/#comments</comments>
		<pubDate>Thu, 07 May 2009 14:09:03 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[Build Server]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Add new tag]]></category>

		<guid isPermaLink="false">http://midnightmuse.com.au/?p=158</guid>
		<description><![CDATA[The first step towards looking smarter. Get the right tools <a href="http://midnightmuse.com.au/2009/05/08/setting-up-a-build-server-part-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The <a href="index.php/2009/05/07/setting-up-a-build-server-part-1/" target="_self">previous article</a> was an introduction by way of setting out the problem. There are a few tools that will help you get the job done. But first I should explain what I want the end result to be.</p>
<p>What I want is to be able, at the press of a button, to produce a release version of my program ready to be deployed onto the client machine. That sounds reasonable, doesn&#8217;t it?</p>
<p>So what tools do we need? first is <a href="http://www.visualsvn.com/" target="_self">VisualSVN</a>. I have <a href="index.php/2007/12/05/visualsvn/">written about this before</a>. It isn&#8217;t free, it costs $US49.00 but it is worth every penny. It installs Subversion and works a treat.</p>
<p>I also managed to get an old, not too old, PC set up. It needed a hard drive, but I had a spare one of those lying around. If you have been developing for any length of time you tend to accumulate bits and pieces that can sometimes come in handy. The PC needs a memory upgrade, but that is not an issue &#8211; memory is pretty cheap.</p>
<p>You don&#8217;t need a separate PC, but I thought it worthwhile, performance and all that.</p>
<p>First you have to set up the PC. I installed Windows Server 2008. You don&#8217;t need server software, XP or Vista will do. You can even install Linux and Mono. So long as you can compile your C#, or VB.Net code you are OK. But I used Windows Server 2008 because I had it and I wanted to try it out.</p>
<p>There are a couple of things that need to be installed. First you need the CLR of the version you are developing on. These days there is no point in not installing 3.5, even if you aren&#8217;t using its features yet. By the end of the year you will probably want to install 4.0. But you will certainly want at least version 3.0. However, that doesn&#8217;t mean that you want to install Visual Studio, just the framework, because all you really need is the compiler.</p>
<p>You will also need to install VisualSVN Server. This will setup the Subversion Repository on your server. You client, or development PC will connect to the Build Server and hence the Subversion Repository. More on setting up the Subversion Repository next time.</p>
<p>The next piece of software that you want is Continuous Integration software. There are a few of these around. I suppose the most common has been<a href="http://cruisecontrol.sourceforge.net/">CruiseControl</a>. I looked at this a year or so ago and it seemed fairly complex to set up. At that time I didn&#8217;t think that it was going to be of any great benefit to me so I didn&#8217;t pursue it. But a few months ago I came across <a href="http://www.jetbrains.com/teamcity/index.html">TeamCity</a>. It was love at first site. It is incredibly easy to set up and we will look at that after we have examined Subversion more closely.</p>
<p>Finally, I installed<a href="http://www.vmware.com/">VMware Workstation</a> to help me create virtual machines. You can use something like VirtualPC but I think VMware is a better product, but you have to pay for it. We will look at VMware and what it brings to the build process in a later post.</p>
<p>Really finally, there are some other things I installed which aren&#8217;t necessary for the build proces but are useful to have. I will describe these later on.</p>
<p>That&#8217;s it for. Next time &#8211; VisualSVN and Subversion.</p>
]]></content:encoded>
			<wfw:commentRss>http://midnightmuse.com.au/2009/05/08/setting-up-a-build-server-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

