November 2005 - Posts
During the initial setup of CruiseControl.NET itself and even for each new Project added there is a huge need to turn on the logging for the windows service. You need to know what exactly is happening while it does its magic. The log file gets pretty big quick, and it is recommended that you do turn off logging once you're stable. In the meantime it is somewhat a pain in the ass to keep the log file (in notepad, or whatever) refreshed when trying to determine what is going on.
I wrote a tool which monitors that file for changes and refreshes a Grid with a rolling view of the log entries. Give it a try and use the comments section of this post to let me know what you think.
Basic behaviour (build 0.1.5):
- automatically reload when the log file has been changed
- minimize to tray
- show a balloon tip when things are changed
- Filter by date, ProjectName and Message Type
- Works over a network (via UNC path)
Here is a screenshot:

Note: It does rely on v2 of the .NET Framework.
Just implemented this on our web.config for an application which is currently under development here.
"Subversion has the ability to substitute keywords-pieces of useful, dynamic information about a versioned file-into the contents of the file itself. Keywords generally describe information about the last time the file was known to be modified. Because this information changes each time the file changes, and more importantly, just after the file changes, it is a hassle for any process except the version control system to keep the data completely up-to-date. Left to human authors, the information would inevitably grow stale."
In our web.config I added:
<add key="LastChangedDate" value="$LastChangedDate$"/>
<add key="LastChangedRevision" value="$LastChangedRevision$"/>
Now whenever I checkout the file, like in our CI server we don't have to worry about the build version, its all automagically done, here is what it looks like now:
<add key="LastChangedDate" value="$LastChangedDate: 2005-11-24 11:43:13 -0800 (Thu, 24 Nov 2005) $"/>
<add key="LastChangedRevision" value="$LastChangedRevision: 79 $"/>
Only when you specifically commit (your copy is newer) or update (the server is newer) that file it gets updated. If you commit a change that does not affect that file and obviously increments the HEAD revision the file is not automatically updated.
Now, when working with the svn source code provider with CruiseControl.net you first do a checkout to get a local working copy and then each time you trigger the build events CC automatically will do a simple update on that local working copy. Since our web.config is not changed on every single revision it will not be updated automatically, thus our handy keywords will not be updated either. All I did was shove an executable task to run a batch file prior to running msbuild on the solution which simply does:
cd workingDirectory
if exists web.config del web.config
svn update
Works like a charm.
During the Cabana at the Launch event yesterday one fellow came and had a dire problem when using the System.Net.WebClient asynchronously. He indicated to me that all of his attempts were failing. When there was a 404 he said that an exception was thrown and he could not catch that exception at the local scope of the calling action but only at the assembly level (Yikes!). Another issue was that posting data was a big problem. He indicated that he could never get it to work with any of the methods on the WebClient class to actually send data over the wire to the host. I put together a quick code snippet of this actually working. I realize this may not be the cleanest code or even close to being best practice but it is a working example of what the guy wanted to see.
using System;
namespace WebClientThreading {
class Program {
static bool finished = false;
static string filepath = @"c:\testdata.html";
//change the url to something like list.asp.404 or whatever to get a 404 or 405 error.
static string url = "http://localhost/list.asp";
static void Main(string[] args) {
System.Net.WebClient wc = new System.Net.WebClient();
//uncomment if you want to try to download asynch instead of doing a form post.
//wc.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(wc_DownloadFileCompleted);
//wc.DownloadFileAsync(new Uri(url), filepath);
//wc.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(wc_DownloadProgressChanged);
//add items to POST up. These will show in the Request.Form collection
System.Collections.Specialized.NameValueCollection items = new System.Collections.Specialized.NameValueCollection();
items.Add("text", "this is a test");
wc.UploadValuesCompleted+=new System.Net.UploadValuesCompletedEventHandler(wc_UploadValuesCompleted);
wc.UploadValuesAsync(new Uri(url), items);
//sleep until the asynch operations have completed
while (!finished) {
System.Threading.Thread.Sleep(1000);
}
}
static void wc_UploadValuesCompleted(object sender, System.Net.UploadValuesCompletedEventArgs e) {
if (e.Cancelled != null) Console.WriteLine(e.Cancelled.ToString());
if (e.Error != null) Console.WriteLine(e.Error.ToString());
if (e.UserState != null) Console.WriteLine(e.UserState.ToString());
try {
if (e.Result != null) {
if (System.IO.File.Exists(filepath)) System.IO.File.Delete(filepath);
if (e.Result is System.Byte[]) {
System.IO.FileStream fs = new System.IO.FileStream(filepath, System.IO.FileMode.CreateNew);
fs.Write(e.Result, 0, e.Result.Length);
fs.Close();
Console.WriteLine(System.Text.ASCIIEncoding.Default.GetString(e.Result));
} else {
Console.WriteLine(e.Result.ToString());
System.IO.StreamWriter sw = new System.IO.StreamWriter(filepath);
sw.Write(e.Result);
sw.Close();
Console.WriteLine(e.Result);
}
}
} catch (Exception exc) {
//calling e.Result will throw an exception at the local scope when it encouters something like a 404 or a 405, so I catch it here. You will need to handle this appropriately.
string f = exc.ToString();
}
finished = true;
}
static void wc_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) {
if (e.Cancelled != null) Console.WriteLine(e.Cancelled.ToString());
if (e.Error != null) Console.WriteLine(e.Error.ToString());
if (e.UserState != null) Console.WriteLine(e.UserState.ToString());
finished = true;
}
static void wc_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) {
Console.WriteLine(e.ProgressPercentage);
}
}
}
Here is the contents of list.asp (its old school classic asp only because I had the script sitting there since the old days, just easier and quicker to pull it up).
<%
Response.Write now
%>
<table border="1"><tr><td><b>Form Items</b></td></tr><tr><td>Name</td><td>Value</td></tr>
<%
for each item in request.form
response.write "<tr><td>" & item & "</td><td>" & request.form(item) & "</td></tr>"
next
%>
<table>
What an amazing day it was. As a local MVP I was asked to participate in the Experts Cabana. Which is simply an area in which a bunch of us so-called experts stand around and help people with questions. Imagine regional directors, product managers, presenters, and even members of the actual product teams combined with MVP's and local experts all in one designated area. A pretty amazing resource to have at your disposal and I do highly recommend taking advantage of the opportunity if you are in a city that has yet to have the launch event.
The biggest question I was asked, probably about a dozen times, is if VS.NET 2k3 and VS.NET 2k5 can co-exist on the same machine for development. The answer is YES. Now I heard so many war stories yesterday about installing and uninstalling beta and RC versions of 2005 and how many issues people found with that. All we could do is recommend people to use the uninstall tool (here is a nice page on it) and if your still having some major issues quite simple do a complete rebuild of your machine. It's one of the expected issues with installing any sort of beta software. Next time consider using Virtual PC or something. A huge "nice to have" about having both versions on the same box is that when you install 2k5 it actually installs this "Microsoft Visual Studio Version Selector" and associates that with the .SLN extension. What it does, is when you launch a solution file that stub will determine the solution type (either the old school format or the new msbuild format) and then launch the correct version of VS.NET for you. I know with the beta's and such it was a pain when you wanted to launch 2k3 for a given solution and it would force you into 2k5 and jump right into the Upgrade Wizard.
Feedback from the attendees was all very positive. The event was not your typical marketing fluff that we are all so used to with this sort of event. People found that the content was just scratching the surface but did an awesome job.
To all those that live and play in the Vancouver/Lower Mainland sign up for the first every Vancouver Code Camp. Registration is now open!
I have almost secured all the presenters and only have a few slots left to fill so if you want to give a presentation please give us a shout!
What is a Code Camp?
- By and For the Developer Community
Code Camps are about the developer community at large. They are meant to be a place for developers to come and learn from their peers. Topics are always based on community interest and never determined by anyone other than the community. - Always Free
Code Camps are always free for attendees. - Community Developed Material
The success of the Code Camps is that they are based on community content. All content that is delivered is original. All presentation content must be provided completely (including code) without any restriction. If you have content you don’t want to share or provide to attendees then the Code Camp is not the place for you. - No Fluff – only Code
Code Camps are about showing the code. Refer to rule #1 if you have any questions on this. - Community Ownership
The most important element of the Code Camp is always the developer community. All are welcome to attend and speak and do so without expectation of payment or any other compensation other than their participation in the community. - Never occur during work hours
We need to understand that many times people can’t leave work for a day or two to attend training or even seminars. The beauty of the Code Camp is that they always occur on weekends.
I just recently setup a project using the RC2 release and found that the autoGetSource for subversion (svn) didnt appear to be working; so I upgraded the project to the 1.0 final release and all is fixed. Awesome.
http://confluence.public.thoughtworks.org/display/CCNET/2005/11/14/CCNet+1.0+Final+is+now+released
Download
Release Notes
I've used DNN for a number of years so I want to help spread the word (like they need any help; this project kicks ass). This was stolen from Vol 1, Number 1 of their newsletter:
"Nov 7, 2005 — Perpetual Motion Interactive Systems Inc., a premier Microsoft technology solutions provider, is pleased to announce the immediate availability of two new major release versions of DotNetNuke®, the premier open source Web Application Framework for the Microsoft ASP.NET platform. These releases bridge the compatibility gap between ASP.NET 1.1 and ASP.NET 2.0 and offer a number of powerful new application features."
DotNetNuke version 4.0
Game and Movie spoiler, read on if your fine with that…
For the most part the movie really kicked some ass. The gore was almost at the level as the recent game (DOOM III For Xbox) and the storyline was fairly accurate as well. About ¾ of the way through the movie they even switched to a HUD (Heads Up Display) view, just like in the game. So you really get a feeling of how it is during game play. You get just a view of the gun as the character runs around slaying everything. Pretty cool. It was very obvious that it was all computer generated but a job well done.
The last fight is what pissed me off. From what I can remember, the end of every DOOM game ended with the main character fighting some oversized beast with a very little chance of survival. It was virtually impossible to beat that end guy. In the XBOX title the end character was probably about 200 feet high and you needed to shoot it with this one special weapon, a Soul Cube, about 10 times, and after you shoot the Cube it took about 5 to 10 minutes for you to get it back to shoot it again. Pretty damn impossible. If this big guy gets close enough he will hit you once. Your health literally goes from 100 to -100 with that single hit.
Interesting enough the way to do it, is to kill the few smaller guys running around first with your normal weapons and then just to the right of the entrance way there is a small cave with you can hide where the big guy cant get to you. Just hide out in that cave waiting for the Soul Cube to return and blast him again.
So the end sequence in the movie was the two main characters going toe to toe. Imagine a WWF style wrestling match where the two participants are on even more steroids than they are now, and the ability to fly short distances. It lasted probably about 15 to 20 minutes of this crap. It really ruined the whole show for me. I get enough of the stupid/fake wrasselen when my brother forces me to watch that crap on TV.
My recommendation is to rent it. Not worth the high cost of seeing it in the theatre.
Do you remember when yahoo.com was just in its infancy? Well so was much changed since then. They used to be a very basic search interface with damn good results. All of a sudden they started offer a whole collection of free services, or services which generate cash flow based on advertising. This polluted their home page with crap and made the interface just a pain in the ass to deal with.
Sound familiar? I wonder how long it will take Google to start pumping out ads on their home page? Or even littering it with a whole bunch of localized crap like yahoo eventually did. Oh wait, they already are.
Like Yahoo, Google used to be very minimal with their home page, nice and fast to load and easy on the. Wake up Google. People like you because your site is very minimal. You start to litter it with crap people will go elsewhere. I guess that is what you get when the majority of your revenue is ad based.
More Posts
Next page »