OK, I know I haven't had many posts lately, but things at Telligent are a boomin!
For the NHL fans that are going nuts like me, ESPN just put up an article that states that if there is no resolution by Jan 14th, Gary Bettman will ask the NHL board of governors to cancel the entire 2004-2005 season.
http://sports.espn.go.com/nhl/news/story?id=1951882
This was inevitable, and part of the negotation process, I'm sure. But, if it works to get talks back up and running, that's a good thing IMO.
This was an interesting item from the article:
"No North American sports league has lost an entire season to a labor dispute, and the Stanley Cup has been awarded every year since 1919 when a flu epidemic wiped out the final series between Montreal and Seattle."
Personally, I think that the owners and players won't budge from their stances, and all play will be lost for the season. Makes you wonder if the NHL will ever come back in it's current state.
I was optimistic until now... I'm now convinced that we're not going to see any NHL for a long time, even into next season.
Check out Scott Burnside's great article on the situation:
http://sports.espn.go.com/nhl/columns/story?id=1946499
From the article:
"Bettman followed the predictable path of rejecting the players' association's proposal of last week and followed it with an equally predictable counterproposal that included a salary cap, which was predictably rejected by the players' association. "
IMO - the Owners made a senseless offer that did nothing to help the situation. They basically took the NHLPA's offer, and added a 34.6 to 38.6 salary cap!!!!!!
I LOVE Scott's last sentence...
"What remains between them, a seemingly immovable object, is this notion of who is responsible for the future of the game. Perhaps the next step toward putting aside children's games is the public acknowledgement that this is the owners' mess and that it is up to the players to clean it up."
Way to go Scott! Keep up the great writing...
http://sports.espn.go.com/nhl/news/story?id=1945492
Well, it looks like the NHL season is done! The league is set to reject the NHLPA's offer, but should provide a counteroffer sometime today.
Both sides are vehemently sticking to their beliefs regarding a salary cap. The NHL will only accept one, the NHLPA has no interest in putting one in place.
I'm curious if the NHL's proposal includes any concessions on their part, or if it will simply echo it's hardline stance since the lockout began, over 89 days ago! At least the NHLPA seem interested in barganing (probably because they've felt the pain of missed paychecks). Personally, at least the NHLPA is trying to make something happen. I'll reserve judgement until we see what the owners have to respond with.
Personally, I just want them to work together to come to a solution. There are things that need to be changed on both side, and I don't really favor one or the other. I'm just sick of the constant bickering, personal attacks, and non-movement (last week's proposal was the 1st since September). I know it's "utopian view", and isn't realistic - but lock yourselves in a room and don't leave until a deal is done!!!!!! In the immortal words of Charlie Brown - AARGH!!!!!!!!!
GAME ON! PLEASE?!?!?!?!
I don't know about you, but the NHL lockout is KILLING me!!!!! It's such a shame that this has to happen to such great game, because the longer this thing drags on, the more fans they will have to try and win back. It's not even like Hockey is nearly as popular as Football, Basketball or Baseball either - this lockout has made people realize that they can live without hockey, and that STINKS!
Well, after months of silence (why can't they lock themseleves in a room and work out a deal), the NHLPA met with the NHL yesterday to discuss the NHLPA's recent proposal. It appears that the players have finally made a full fledged attempt at saving the season, by providing many concessions,including a 24% paycut.
Even better yet - you can read the NHLPA's proposal here - highlights (HTM) or full (PDF)
Here's Commissioner Gary Bettman's response.
As long as they are doing this in good faith and are willing to work out a deal, I'm happy. To me, it's been nothing but chest pounding, muscle flexing up to this point.
I want to thank everyone for taking the time out to attend 12/1/2005’s PDNUG meeting, where I presented a talk about “Test Driven Development & .NET”. I was psyched to see everyone who attended, and hoped that the session helped those who are interested in TDD in any fashion. I truly believe in this approach, and I hope that was evident during the talk.
Downloads & References:
Follow-Up from Q&A:
Here are some Follow-Up Items as a result of questions & comments raised during and after the talk:
#1 - Nunit & Testing Multithreaded Objects (I did not find out this person’s name)
Q: How does NUnit play/work with multithreaded objects?
A #1: NUnit - In Nunit 2.1, the Nunit.Framework.Assert method does not respond well while in a threaded environment. .NET Rock Star – Peter Provost found a way around this problem by catching an exception from on the worker thread, and pass it back to the main thread (which will report successfully to NUnit). Check out his blog post @ http://www.peterprovost.org/archive/2004/11/03/2051.aspx .
A #2: Check out MBUnit, http://mbunit.tigris.org/ , which has built-in support for multi-threaded objects.
#2 - Re: Xml Configuration Settings for TestSuites (From Rich Denis)
Q: I use the .NET System.Configuration.AppSettings class to retrieve settings in an XML file. Where do I put this logic in a Nunit suite.
A: During the session, I documented that you can place these entries in NunitGui’s app.config file, since NUNITGUI.EXE is a .NET assembly.
However – Rich Denis told me about an easier method:
“If you have a MyTestAssebmly.dll then you create a MyTestAssembly.dll config file and place it in the same folder as the test assembly. This is a bit different than I told you last night since I said to make a config file for the tested assembly not the testing assembly. I hope this helps.”
It does work – like a champ! Here is a sample C# NUnit Test with a config file. Follow these steps to verify:
- Create a C# Class Assembly
- Set a reference to Nunit.Framework.dll
- Add an app.config file, and change the file to reflect the following:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="MySetting" value="MyValue"/>
</appSettings>
</configuration>
- Add the following code to the Class1.cs file
using System;
using NUnit.Framework;
namespace HelloConfig
{
public sealed class ConfigReader
{
public ConfigReader() {
}
public static string GetConfigSetting(string key) {
return System.Configuration.ConfigurationSettings.AppSettings.Get(key);
}
}
[TestFixture]
public class ConfigReaderTestFixture
{
public ConfigReaderTestFixture() {
}
[Test]
public void GetConfigSettingPostiveTest() {
string key = "MySetting";
string expectedValue = "MyValue";
string actualValue = "";
actualValue = ConfigReader.GetConfigSetting(key);
Assert.IsTrue(expectedValue == actualValue,
String.Format("Values were NOT equal, expected '{0}' actual '{1}'", expectedValue, actualValue)
);
}
[Test]
public void GetConfigSettingNegativeTest() {
string key = "SettingNotThere";
string expectedValue = "MyValue";
string actualValue = "";
actualValue = ConfigReader.GetConfigSetting(key);
Assert.IsFalse(expectedValue == actualValue,
String.Format("Values were equal the keys exist. It should have NOT been present., expected '{0}' actual '{1}'", expectedValue, actualValue)
);
}
}
}
- Build the project.
- Now manually move the app.config into the bin\debug folder with the name “HelloConfig.dll.config”
- Now test with NUnit. You should find that both tests pass successfully (i.e. the values were and were not read from the config file as expected)
Thanks Rich!
#3 - MBUnit Rocks! If you want Assertions – you got ‘em! (from Rich Denis)
MBUnit is another TDD xUnit Framework, which is now part of the TestDriven.net VS.NET add-in. It provides an extremely rich Assertion model, including Arrays, collection, compiler, serialization, Security, Reflection, Text, Performance, Data, XML, web
Check out these links
Thanks Rich!
#4 – Various TDD/Process-Related Questions (From Vince Blasberg)
Here are my takes on Vince’s questions – please add comments to this post, if you have answers
Q: Will the code be optimized at all in release mode?
A: Your test suite (class library) will be optimized (between Debug & Release builds) as normal, but nothing outside of that. As we discussed, keep in mind that your unit test code should execute in your environments, only as a test. This code should not be executed on a regular basis. Because of this, you shouldn’t have to worry about optimized code (boy that statement really sounds funny!)
This kinda leads me to a recommendation mentioned during the talk - storing all Test & Test Suites in a completely separate assembly, instead of mixing TestSuites with production code, in the same assembly. In the example of deploying to production, you could deploy all your code, execute your test (potentially in NAnt NUnit2Report task), and interrogate on the test results. If all tests pass, then you could remove your test suite assembly from production. If you encounter problems in production, you could request a change control to place the test harness back in production, and re-run your tests – to try and determine what might have caused the problem. Just a way to keep your production environment “cleansed” of obsolete or non-production code.
Q: Won’t some of the in-function tests prevent the optimizing compiler to inline some functions since they will add code and push the IL code past the 32 byte auto-inline mark?
A: Yes, it would. Good observation.
Q: Are the NUnit tests limited to just two, a one-to-one comparison and an exception expected?
A: Not at all. My demos showed just a single one-to-one comparison, and I’ll change that for the next talk. J The test structure is completely up to you, and should be driven by your functional & technical requirements, as well as security intrusion attempts. You really have no limits here.
Q: Developers must be good at adding verifications where needed. Can these unit test products perform tests in the same call to make current non-unit testing verifications part of the test? In other words, we can check for null parameters and IsLoggedIn type functions but the logical tests that must be done must be duplicated to perform unit testing. Unit tests must be reproduced every time a function is overloaded, making the test coding process work every time. Making an attribute on a function to insert and perform certain tests may help somehow and avoid repetitive test coding. Without something simpler, changed function signatures and new overloads cause more work that may not get tested unless the developer looks at a prior function and add everything as they should.
A: Good observations. Yes, if a developer adds a new overloaded method, it is their responsibility to write the associated tests for this new method.
Q: After a long night, if a developer wanted to make all green lights instead of red ones on the next morning’s build, all they have to do is comment out tests for QA to see a shippable product. ( Bad )
A: Yes, this would be very bad. I can’t deny that there still is a little human element to TDD, but isn’t’ there in many development projects. J In Extreme Programming, this should be caught due to the framework’s pair-programming model.
There are software solutions to help solve this problem (I believe). Basically, the way to solve this automatically is to place a threshold level for the code coverage results calculated during the tests. If your tests did not meet the code coverage threshold amounts, then the developer couldn’t check in the code. There are problems with that idea, because the threshold values are a moving target depending on where the developer is in the process. I know there is logic like this in VSTS, and there might be in SourceGear’s Vault (not sure at this time). I don’t know if PVCS or other popular source control applications have similar capabilities.