Thursday, August 30, 2007
Behave# and NSpec - Behaviour Driven Development
Behave# is a framework for defining and executing application requirement goals. These characterizations are modeled after the Behavioral Driven Design (BDD) terms Story, Scenario, Given, When, Then.
Behaviour Driven Development, or BDD, represents the evolution of current coding practices with respect to Test Driven Development (TDD).
One of the good points of behave# is that that if you want to specify Exceptions as part of your story, this forces you to move away from [ExpectedException]. Which is a Good Thing anyway.
It is quite verbose, although the verbose-ness is one of the qualities that could make it attractive to product owners or PMs. The code is really to express acceptance tests rather than developer-focused 'unit' tests. (Have a look of Behave# code example on casper's blog)
I think i am going to try a real world example and see how it goes or to put it more appropriately to see if it grows on me and how comfortable i feel.
Wednesday, August 29, 2007
Debugging Microsoft .NET 2.0 Applications Book
On the first of page of first chapter i came across a few lines which really made me think how appropriate and improtant this book is for a progammer.
Quoting form the book Debugging Microsoft .NET 2.0 Applications:
"Debugging is also a part of software development that's famous for causing you to pull all-nighters. I'hv yet to run into an engineer who has called his or her partner to say, Honey, I can't come home because we're having so much fun doing our UML daigrams that we want to pull an all-nighter! However, I'hv run into plenty of engineers who have called their partner with the lament, Honey, I can't come home because we've run inot a whopper of a bug"
Well, I am sure any programmer (I mean a real programmer) would agree with this. Let me know what you all think
Google's gPhone
However, the on again, off again offering to the mobile world by the search giant is reaching fanatical levels of hype and thanks to a recent news story by Rediff News in India, the hype is only getting worse. The story published by Rediff said that the gPhone is two weeks away from launch!!!! Now that is some serious speculation. Sources close to the development said a simultaneous launch across the US and Europe and India is expected, and announcements would be sent to media firms in India and other parts of the world in a week.
Well but all this is still simply a rumor, but a good one nevertheless. Lets wait and watch if google makes an official announcement. If they come out with a gPhone by any chance i am definitely going to get my hands on it asap, as i just love the way they make software.
Opps...aren't we talknig about hardware too over here!!!
Monday, August 27, 2007
.NET Stock Trader Application
I am working as a Technology Consultant in capital markets domain and have noticed that microsoft technologies are still not popular and not the first choice as development tools for trading applications. However i think this sample application might open a few doors and show people the power and flexibilty of microsoft technologies.
The .NET stock trader application uses:
- Service-oriented, n-tier design with ASP.NET and WCF.
- NET 3.0 with Windows Communication Foundation.
- .NET Enterprise Application Server Technologies.
Check it out here: .NET Stock Trader App
Monday, July 23, 2007
YouTube role grows as U.S. election nears
Democratic U.S. presidential candidates (L-R) Hillary Clinton, John Edwards, Dennis Kucinich, Maurice Gravel, William Richardson, Barack Obama, Christopher Dodd and Joseph Biden take part in a candidates forum at the NAACP annual convention in Detroit, Michigan July 12, 2007. YouTube members are uploading video questions for upcoming CNN/YouTube debates.By yesterday evening, more than 1,700 videos had been put on YouTube's site for tnights debate among Democratic candidates. Now thats what i call Technology influencing Mankind.......or lets say influencing politics
Monday, July 02, 2007
IObjectReference interface.
Here's an example showing how it can be used:
[Serializable]
class S : IObjectReference
{
int i;
static S S5 = new S(5);
S(int i) { this.i = i; }
public static S Get(int i) { return (i == 5) ? S5 : new S(i); }
#region IObjectReference Members
public object GetRealObject(StreamingContext context)
{
return Get(i);
}
#endregion
}
Thursday, June 21, 2007
Indexing by integer: Array vs List vs Dictionary
So i just wrote something to check it. (See the results below:)
using System;
using System.Collections.Generic;
namespace ConsoleApplication1
{
class LookupPerformanceTest
{
static void Main(string[] args)
{
// ten million
int iterations = 10000000;
string[] array = new string[iterations];
List
Dictionary
int now = Environment.TickCount;
for (int i = 0; i < now =" Environment.TickCount;" i =" 0;" now =" Environment.TickCount;" i =" 0;" now =" Environment.TickCount;" i =" 0;" s =" array[i];" now =" Environment.TickCount;" i =" 0;" s =" list[i];" now =" Environment.TickCount;" i =" 0;" s =" dictionary[i];">
Results (running in Release mode)
Array population took: 94ms
List population took: 141ms
Dictionary population took: 719ms
Array lookup took: 15ms
List lookup took: 32ms
Dictionary lookup took: 593ms
Tuesday, May 29, 2007
Team System Unit Tests and Deployment Items
The files to be deployed with the tests have to be setup so that the tests can run successully on local machine and also on the build machine. Data files such as .cvs, .xml files etc. usually sits in the project directory along with everything all of the rest of my code files.
However the tests when run on the build machine fail because the files cannot be deployed to the "out" directory of the test results. I get a file IO exception – my .Xml file could not be located.
To make it work i had to do 2 things:
- I select my data files in the solution explorer, and look at the properties window. I can then find the "Copy to Output Directory" setting and change it to "Copy always".
- Secondly "DeploymentItem" attribute has to be applied to the items to be deployed other than the test assemblies.
You can use either absolute path or relative path to specify the location of the deployment files.
If you are using MSBuild and TeamCity for build, then you have to use a realtive path rather than the absolute path to make it work, because msbuild on the server uses relative paths as configured usually in the .build file.
To add a path for a deployment item please follow the following steps (as it is the easiet way to do so):
Select a test in the Test View window or in the Test Manager window.
Press F4.The Properties window for that test is displayed.
Click the Deployment Items property. An ellipsis (...) appears in the value column.
Click the ellipsis.The String Collection Editor dialog box is displayed.
Before the test is run, type a path to a folder or a file that you want to have copied to the test deployment folder. Press Enter and type additional paths to specify additional folders and files to be deployed.
Click OK.
Friday, May 18, 2007
Engadget's blunder
Thursday, May 10, 2007
Evaluating .NET/J2EE for your Enterprise Applications
I found a very good site which contains extensive materials designed to help you evaluate Microsoft .NET vs. J2EE application server technologies. It contains downloadable whitepapers, benchmark comparisons, and sample source code.
Evaluating .NET vs. J2EE
Well I am sold on .NET for a long time now. I hope the link above helps to make your decision easier.
Thursday, May 03, 2007
Microsoft Silverlight launched
If you’ve got the time, I’d recommend (though i havent done it myself yet, but i wil be doing it today evening) watching the Mix keynote video (warning it’s 2.5 hours). In this you’ll get an overview of Silverlight, the cross platform CLR, ruby in the browser, and some very, very cool demos.
You can download silverlight from Microsoft site.
Wednesday, April 25, 2007
Asynchronous Programming Model - 2.0
I have been reading about the Asynchronous Programming Model in Jeffrey Rithcer's book CLR via C#. I have really enjoyed reading it and i thought of writing something about it.
The Asynchronous Programming Model (APM), as implemented by Delegates, consists of three parts:
- BeginInvoke,
- EndInvoke and
- Rendezvous techniques.
BeginInvoke starts an algorithm, impelmented via a method, on a new thread. EndInvoke retrieves the result of that method. The Rendezvous techniques allow you to determine when the asynchronous operation has completed.
There are three different types of Rendezvous techniques you can use to retrieve the results of an asynchronous delegate invocation
1. Wait Till Completion
2. Polling
3. Method Callback
// a delegate for a method that takes no params and returns a string.
Scientists break internet speed record
Tuesday, April 24, 2007
Google vs. Microsoft: reality check
Why Google IS Afraid of Microsoft, Big Time
HIGHLIGHTS FROM THE ARTICLE:
Microsoft pummels Google in the “In-Game Advertsing” space. How? Google buys a small San-Fran company to meet the challenge. Microsoft buys the world-leader in the industry for In-game advertising.
Microsoft delivers a solid uppercut in Voice-activated local directory assistance. How? Google announces an experimental service that may not be available at all times and may not work for all users. (Cute) Microsoft acquires TellMe Networks. Heard of them? Most likely, you’ve been using them for the longest time. Almost half of all directory assistance calls are processed on TellMe’s voice platform, and roughly one in three Americans use Tellme every year to get things done.
Assertion that Microsoft's 'Dead' Doesn't Compute
QUOTES FROM THE ARTICLE:
“When a software runs more than 90% of the desktops on the planet — and will for the foreseeable future — it's simply not dead.”“Windows runs on the vast majority of desktops in the world; Linux and OSX make up less than 10% combined”(Microsoft) “…earned $12.6 billion after taxes in its last fiscal year.
Well this article was written by a guy who currently works for Microsoft (you might have guessed that) and is an ex-googler
Thursday, March 08, 2007
private void SetupBindings()
{
BindingList
new BindingList
orderBindingSource.DataSource = orderList;
BindingList
new BindingList
customerBindingSource.DataSource = customerList;
BindingList
new BindingList
employeeBindingSource.DataSource = empList;
}
Thus i reckon .NET winforms provide great support for databindings and it is one of the best options to use.
Wednesday, February 07, 2007
My new PC with Vista Ultimate
Windows Vista Ultimate is surely ultimate. It is mind blowing. my favourite key is the windows key and tab, to show multiple windows. The gadgets are obviously cool.
I arranged a short "Windows Vista Launch Event in Croydon". It was nothing official, i just named it as such. My collegaues came over to my palce after work and played around with vista. Even non technical guys are coming today evenning to have a look. Everyone's welcome to come and have a look.....
Saturday, February 03, 2007
Creating custom cultures in .NET
With CultureAndRegionInfoBuilder class you can define a custom culture that is new or based on an existing culture and region. You can specify the culture and region information for example the associated language, sublanguage, country/region, calendar, and cultural conventions to great detail by using specific CultureInfo and RegionInfo classes. The custom culture can also be installed on a computer and subsequently used by any application running on that computer.
I highly recommend using this feature in .NET to create custom cultures for the application.
Wolfgang Loder's Blog
His recent entries are:
Video about Rails and Django
Rails - worth the trouble?
Multiple Inheritance with C#
Online Conference AJAX
Check out his blog at:
http://wolfgangloder.wordpress.com/
Do have a read guys and let him know how do you find his posts.
Friday, January 12, 2007
Windows Vista and Office Developer launch - Jan 19-20, 2007
Tuesday, December 05, 2006
RegistrySecurity class
I was really impressed by the RegistrySecurity class. it represents the Represents the Windows access control security for a registry key.A RegistrySecurity object specifies access rights for a registry key, and also specifies how access attempts are audited. Access rights to the registry key are expressed as rules, with each access rule represented by a RegistryAccessRule object. Each auditing rule is represented by a RegistryAuditRule object.
This mirrors the underlying Windows security system, in which each securable object has at most one discretionary access control list (DACL) that controls access to the secured object, and at most one system access control list (SACL) that specifies which access attempts are audited. The DACL and SACL are ordered lists of access control entries (ACE) that specify access and auditing for users and groups. A RegistryAccessRule or RegistryAuditRule object might represent more than one ACE.