[Home] [Recent] [Site Map] [SharePoint] [XBOX]
Here is a great new website for you "expression-scary developers" :
http://www.nibblestutorials.net/
It provides tutorials on how to build rich web experiences and applications using Silverlight and Blend.
Each tutorial is a very simple step-by-step so don"t be afraid to test your designer skills...
Note that the website itself and tutorials are entirely done with Silverlight by Celso Gomes, one of the top design engineers in Redmond.
[via Canadian User Experience blog]
The title says "unit tests" but they are really integration tests, since we rely on the cpu and the context switching mechanisms of the OS to do the work for us, but still ,this tries to solve a scenario many people have been asking me about.
The ThreadTester library helps create tests that use multiple threads. It’s main use is to synchronize and “block” the running test until all the threads have finished their job, or a timeout has occurred. It is designed to make the test developer"s life easier with a simple API that is readable and quick to use. It"s part of the code I"m developing for my upcoming book.
Download:
Binaries in zip file
Source code in zip file
Here is the basic usage of this class:
1) add a reference to Osherove.threadtester into your test project.
2) Write a test that looks like this:
[Test]
public void TwoThreads()
{
Counter c = new Counter();
ThreadTester tt = new ThreadTester();
tt.AddThreadAction(
delegate
{
for (int i = 0; i < 100; i++)
{
c.Increment();
Thread.Sleep(15);
}
});
tt.AddThreadAction(
delegate
{
for (int i = 0; i < 100; i++)
{
c.Increment();
Thread.Sleep(100);
}
});
tt.StartAllThreads(22500);
}
the test above starts two threads and will block until both of them finish their job. The Counter class is a simple class that we"d like to test that only has a count property and an increment method. We want to make sure it is thread safe.
Here"s a test that starts up 100 threads against counter:
[Test]
public void HundredThreads()
{
Counter c = new Counter();
ThreadTester tt = new ThreadTester();
for (int i = 0; i < 100; i++)
{
tt.AddThreadAction(delegate
{
for (int j = 0; j < 10; j++)
{
c.Increment();
Thread.Sleep(new Random(j+1).Next(100,300));
}
});
}
//this test will run for 22.5 seconds
tt.RunBehavior=ThreadRunBehavior.RunForSpecificTime;
tt.StartAllThreads(22500);
}AddThreadAction:
Takes a delegate with a void return value and no parameters. In the delegate you write code that would do something that a separate thread would do to your object (like call a method.
RunBehavior:
There are two run behaviors:
RunUntilAllThreadsFinish: For each delegate passed in, a thread will be created that will execute that delegate exactly once. When all threads have finished or if a timeout occurs, the ThreadTester will stop blocking it’s “StartAllThreads()” method.
This behavior is good if you"d like to test your object for a known amount of times.
RunForSpecificTime: For each delegate passed in, a thread will be created that will execute that delegate exactly once. When that thread is finished, a new thread will be created which will execute that delegate again. This behavior will continue until the timeout specified in the StartAllThreads() method has been reached. Then ThreadTester will stop blocking.
This behavior is good if you"d like to stress test your object for a known amount of elapsed time. Even if all threads finish, they will re-run until the time has elapsed.
I love Digg for a lot of reasons, but the problem is that stories and comments are not dug or buried for their merit, people do so based on whether or not they agree with it. For the comment system in particular, that makes it broken.
The new comment system demonstrates this very well. While I think the new system is pretty cool, some people hate it. If you read the comments on that story, the people who do like the new system just get dug down anyway, even if they have an opinion with merit.
There are a great many things to think about though in terms of what they"ve done here. Daniel Burka has a blog post explaining many of their design decisions. I think that for the most part he makes a great many compelling arguments. There"s a constant battle in my mind about how to build a forum discussion. In real life, even a large group of people talk in turn, one after another. A linear style thread, like those found on most forum apps, is recorded this way but it"s not real time the way a human conversation is. To compensate, that means you have to quote previous posts, and far too many people never bother to trim those quotes so you end up with a ton of repeat or distractionary data.
On the other hand, you can do the Usenet-style true threading, but the problem is that a conversation can then splinter off into a thousand different directions, which is, frankly even harder to follow. It can lead to many posts spread out by the same user too, often saying the same thing.
So I think that the linear threading is still better in most ways, but you still have that problem with quoting. I"m not sure how you solve that problem.
The thing I do like is the AJAX loading of posts. The theory of it at least is interesting, in that you have less database activity, less initially transmitted HTML and a more manageable page for the browser to render. I"d be very curious to know what the measurable impact of this is.
The online discussion has not really evolved all that much in ten years. I wonder now what imagination will lead us to.
Looks like there"s going to be a great lineup for the MIX UK 07 event happening in September in London.
http://www.microsoft.com/uk/mix07/
Register on the site now to be the first to hear about the event when more details are announced.
If you"ve downloaded Safari for Windows and are a looking for a tool similar to Firebug or Nikhil"s Web Development Helper, then you might be interested in the WebKit Open Source Project. Within the project is a tool call Web Inspector that performs much of the same tasks as the tools mentioned earlier. To run the tool:
1) Download the nightly build from http://nightly.webkit.org/.
2) Extract the contents from the zip file.
<key>WebKitUserStyleSheetLocationPreferenceKey</key> <true/>
4) Execute the run-nightly-webkit.cmd file. This will launch Safari from the command prompt.
After Safari is launched you will have an additional item in the context menu called "Inspect Element", select this to see the tool:

Here are a few screenshots of it in action:


I was informed by informed sources (and this is probably old news) that they"ll be no iPhones for Canadians, unless you"re willing to pay Cingular roaming charges. I was planning on getting an iPhone but found out that a) the plan is locked to Cingular b) Cingular only services the U.S. c) you cannot simply drop in a SIM card from any other provider as iPhones are locked to the Cingular provider.
My personal opinion is that Apple should have unlocked the phone and let you use any carrier. Okay, so they wouldn"t have got the big bucks they"re obviously getting from Cingular but if you crunch the numbers (and I"m sure they did) I would think you would have more hardware sales than payola in the long run. Guess not, so until Steve Jobs calls me up and puts me in that position it"s no iPhone for us Canucks.
Update: I was doing a little blog sleuthing and came across various rumours about Rogers being a carrier for the iPhone. However a) it"s about 6 months out at best b) there"s no official word that I can find and c) more informed (non-official) sources tell me this is false. Gizmodo says it"s "confirmed" but I have doubts. Every report though says "a customer service email" or "customer service representative". To me, that"s not official in any capacity.
Someone will obviously hack this and probably within 6 months (or sooner) you could use one up here, but otherwise the only way would be to get a Cingular plan then pay roaming fees all the time. I may have good consultating rates, but not that good.
Anyways, now I"m looking at the HTCs as people are saying they"re good. Looking for any suggestions from anyone on model. There was an article a few days ago Forbes on iPhone alternatives so they look pretty good. Let me know what you recommend?
Site List:
>>Xbox Live_s Major Nelson
>>Xbox 360 & SharePoint 2007 Weblog
>>Carsten Keutmann_s Blog
>>Mohamed Zaki_s Blog [Sharepoint MVP]
>>The Mit_s Blog
>>Mart Muller_s Sharepoint Weblog
>>Microsoft SharePoint Products and Technologies Team Blog
>>SharePoint Solutions Blog
>>4GuysFromRolla.com Headlines
>>ASP.NET Blogs
>>SharePoint Blogs
>>SharePoint Blogs
>>Joel on Software
>>ADO Guy_s Rants and Raves
>>Microsoft Live Labs
>>GadgetNews
>>Windows Vista Team Blog
>>VoIP & Gadgets Blog
>>schrankmonster blog
>>Via Virtual Earth Blog
>>Feed
>>MSDN Blogs
>>Mashable!
Links:
Jack's Readings
Month Archives:
Oct 2007
Sep 2007
Top Tags:
social software social networking .NET mashable Sharepoint ASP.NET Web 2.0 Web2.0 Startups Community News Search Marketplace General Software Development AJAX Windows Vista Visual Studio Microsoft myspace Silverlight People Powered! YouTube Vista MOSS Featured News C# Events MOSS 2007 Google WPF Office 2007 Web Community Security General Personal Xbox 360 facebook Tools development SharePoint 2007 Fun Atlas Architecture ASP.NET AJAX myspace codes TheLongTail IIS SQL Server Developers Revenue Sharing Video Pictures WCF Mobile 2.0 Announcements Orcas MIX07 Arcade Team System JavaScript News
@2007 All rights Reserved |