Tuesday, September 16, 2008

CX1 (A super comp from Cray) will have Windows HPC Server 2008

Microsoft and Cray on Tuesday took the wraps off a petite supercomputer that runs Windows HPC Server 2008 and, unlike some other supercomputers, doesn't cost more than a Hummer limo.

In fact, Cray's new CX1 supercomputer is priced starting at a relatively cheap $25,000, not bad for an integrated box that weaves together compute, storage, and visualization functions. Cray has designed the CX1 to remove some of the complexity involved with supercomputing that has hindered its adoption, particular in smaller organizations.

Based on 64-bit Windows Server 2008, Windows HPC Server 2008 can scale to thousands of processing cores and features high end management capabilities that span both Windows and Linux platforms. The CX1 uses up to 8 nodes and 16 Intel Xeon processors, with up to 64 gigabytes of memory per node; and also includes up to 4 terabytes of internal storage.

The CX1 is the first Cray supercomputer to use Intel processors, and is also the first fruit from the pact the two companies announced in April to work together on supercomputing systems and technologies over the next few years.

The CX1 is available through Cray's Website and comes with a three-year warranty that includes next-day, on-site Cray-certified support.

Supercomputers help power research in a wide variety of fields, including aerospace, astrophysics, bioinformatics, chemical physics, climate change prediction, medical imaging and the global ATLAS project, which is investigating the forces that govern the universe.

T-Mobile to announce G-Phone late sept.

T-Mobile USA will become the first company in the world to announce a mobile phone based on Google's Android OS at a New York press conference Sept. 23, the New York Times reports, citing T-Mobile.

The handset was manufactured by Taiwan's High Tech Computer (HTC), the Times said. HTC representatives in Taipei declined to comment on the report.

Several other Web sites are also reporting the Sept. 23 event, including Gizmodo, which is displaying what appears to be an announcement from T-Mobile.

HTC has already said it is developing a mobile phone developed around Google's Android  and plans to call the handset "Dream."

The handset maker may end up being first in the world to put out an Android-based mobile phone, but other companies are also developing handsets around Android, including Samsung Electronics.

HTC's Google handset is just over 5-inches long and 3-inches wide, with a keypad underneath the screen that either slides out or swivels out. The aim of the keypad is for easy e-mail, note-taking and writing Web addresses.

Internet navigational controls are situated below the screen on the handset.

Android is an open source software platform that includes an OS and is designed to take advantage of Internet services for mobility. The software could become a potent new rival to Windows Mobile and other handset operating systems. At the launch ceremony early this year, Google announced that over 30 companies had joined the Open Handset Alliance.

Wednesday, August 13, 2008

Microsoft Introduces Zermatt [A Claim-based identity model]

Most developers are not security experts and many feel uncomfortable being given the job of authenticating, authorizing, and personalizing experiences for users. It's not a subject that has been traditionally taught in computer science curriculum, and there's a long history of these features being ignored until late in the software development lifecycle.

It's not surprising nowadays to see a single company with tens or hundreds of web applications and services, many of which have their own private silo for user identities, and most of which are hardwired to use one particular means of authentication. Developers know how tedious it is to build identity support into each application, and IT pros know how expensive it is to manage the resulting set of applications.

One very useful step toward solving the problem has been to centralize user accounts into an enterprise directory. Commonly it's the IT pro that knows the most effective and efficient way to query the directory, but today the task is typically left up to the developer. And in the face of mergers, acquisitions, and partnerships, the developer might be faced with accessing more than one directory, using more than one API.

In the Microsoft .NET Framework, there are lots of different ways of building identity support into an application, and each communication framework treats identity differently, with different object models, different storage models, and so on. Even in ASP.NET, developers can get confused about where they should look for identity: should they look at the HttpContext.User property? What about Thread.CurrentPrincipal?

The rampant use of passwords has lead to a cottage industry for phishers1. And with so many applications doing their own thing, it's difficult for a company to upgrade to stronger authentication techniques.

What is Zermatt All About?

Zermatt is a set of .NET Framework classes; it is a framework for implementing claims-based identity in your applications. By using it, you'll more easily reap the benefits of claims-based systems described in this paper. Zermatt can be used in any web application or web service that uses the .NET Framework version 3.5.

Download : Zermatt Dev. Whitepaper

Thursday, June 12, 2008

WPF Namespace Poster

.NET Coding Guidelines

1. Tabs & Indenting

Avoid tab characters (\0x09) usage in code. 4 Space charactors should be use unsteade.

2 Bracing

Open braces should always be at the beginning of the line after the statement that begins the block. Contents of the brace should be indented by 4 spaces. For example:

if (someCondition)

"case" statements should be indented from the switch statement like this:

switch (someExpression)

case 0:

case 1:

case 2:
int n = 1;

Braces should never be considered optional. Even for single statement blocks, you should always use braces. This increases code readability and maintainability of your code.

3 Single line statements

Single line statements can have braces that begin and end on the same line.

public class Foo
int bar;

public int Bar
get { return bar; }
set { bar = value; }


It is suggested that all control structures (if, while, for, etc.) use braces, but it is not required.

4 Commenting

Comments should be used to describe intention, logical as well as execution flow, algorithmic overview. It would be ideal, if from reading the comments alone, someone other than the author could understand a function's intended behavior and general operation. While there are no minimum comment requirements and certainly some very small routines need no commenting at all, it is hoped that most routines will have comments reflecting the programmer's intent and approach.

Copyright notice

Each file should start with a copyright notice. To avoid errors in doc comment builds, you don't want to use triple-slash doc comments, but using XML makes the comments easy to replace in the future. Final text will vary by product (you should contact legal for the exact text), but should be similar to:

// <copyright file="ContainerControl.cs" company="Microsoft">
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>

Documentation Comments

All methods should use XML doc comments. For internal dev comments, the <devdoc> tag should be used.

public class Foo

/// <summary>Public stuff about the method</summary>
/// <param name="bar">What a neat parameter!</param>
/// <devdoc>Cool internal stuff!</devdoc>
public void MyMethod(int bar) { … }


However, it is common that you would want to move the XML documentation to an external file – for that, use the <include> tag.

public class Foo

/// <include file='doc\Foo.uex' path='docs/doc[@for="Foo.MyMethod"]/*' />
public void MyMethod(int bar) { … }


UNDONE§ there is a big doc with all the comment tags we should be using… where is that?

Comment Style

The // (two slashes) style of comment tags should be used in most situations. Where ever possible, place comments above the code instead of beside it. Here are some examples:

// This is required for WebClient to work through the proxy
GlobalProxySelection.Select = new WebProxy("http://itgproxy/");

// Create object to access Internet resources
WebClient myClient = new WebClient();

Comments can be placed at the end of a line when space allows:

public class SomethingUseful
private int itemHash; // instance member
private static bool hasDoneSomething; // static member

5 Spacing

Spaces improve readability by decreasing code density. Here are some guidelines for the use of space characters within code:

  • Do use a single space after a comma between function arguments.
    Right: Console.In.Read(myChar, 0, 1);
    Wrong: Console.In.Read(myChar,0,1);
  • Do not use a space after the parenthesis and function arguments
    Right: CreateFoo(myChar, 0, 1)
    Wrong: CreateFoo( myChar, 0, 1 )
  • Do not use spaces between a function name and parenthesis.
    Right: CreateFoo()
    Wrong: CreateFoo ()
  • Do not use spaces inside brackets.
    Right: x = dataArray[index];
    Wrong: x = dataArray[ index ];
  • Do use a single space before flow control statements
    Right: while (x == y)
    Wrong: while(x==y)
  • Do use a single space before and after comparison operators
    Right: if (x == y)
    Wrong: if (x==y)

6 Naming

Follow all .NET Framework Design Guidelines for both internal and external members. Highlights of these include:

  • Do not use Hungarian notation
  • Do not use a prefix for member variables (_, m_, s_, etc.). If you want to distinguish between local and member variables you should use "this." in C# and "Me." in VB.NET.
  • Do use camelCasing for member variables
  • Do use camelCasing for parameters
  • Do use camelCasing for local variables
  • Do use PascalCasing for function, property, event, and class names
  • Do prefix interfaces names with "I"
  • Do not prefix enums, classes, or delegates with any letter

The reasons to extend the public rules (no Hungarian, no prefix for member variables, etc.) is to produce a consistent source code appearance. In addition a goal is to have clean readable source. Code legibility should be a primary goal.

7 Naming Conventions

Interop Classes

Classes that are there for interop wrappers (DllImport statements) should follow the naming convention below:

  • NativeMethods – No suppress unmanaged code attribute, these are methods that can be used anywhere because a stack walk will be performed.
  • UnsafeNativeMethods – Has suppress unmanaged code attribute. These methods are potentially dangerous and any caller of these methods must do a full security review to ensure that the usage is safe and protected as no stack walk will be performed.
  • SafeNativeMethods – Has suppress unmanaged code attribute. These methods are safe and can be used fairly safely and the caller isn't needed to do full security reviews even though no stack walk will be performed.

class NativeMethods
private NativeMethods() {}

internal static extern void FormatHardDrive(string driveName);

class UnsafeNativeMethods
private UnsafeNativeMethods() {}

internal static extern void CreateFile(string fileName);

class SafeNativeMethods
private SafeNativeMethods() {}

internal static extern void MessageBox(string text);

All interop classes must be private, and all methods must be internal. In addition a private constructor should be provided to prevent instantiation.

8 File Organization

  • Source files should contain only one public type, although multiple internal classes are allowed
  • Source files should be given the name of the public class in the file
  • Directory names should follow the namespace for the class

For example, I would expect to find the public class "System.Windows.Forms.Control" in "System\Windows\Forms\Control.cs"…

  • Classes member should be alphabetized, and grouped into sections (Fields, Constructors, Properties, Events, Methods, Private interface implementations, Nested types)
  • Using statements should be inside the namespace declaration.

namespace MyNamespace

using System;

public class MyClass : IFoo

// fields
int foo;

// constructors
public MyClass() { … }

// properties
public int Foo { get { … } set { … } }

// events
public event EventHandler FooChanged { add { … } remove { … } }

// methods
void DoSomething() { … }
void FindSomethind() { … }

//private interface implementations
void IFoo.DoSomething() { DoSomething(); }

// nested types
class NestedType { … }



Wednesday, June 11, 2008

Selection in Visual Studio 2008 SP1 RTM (Multiple Control Formatting at it's best]

Last week, I have installed Visual Studio 2008 SP1 RTM and I am happy to bring a new feature in your knowledge [i.e. multiple selection and alignment operations in Design]. This feature has been introduced in Visual Studio 2008 SP1 RTM and Visual Web Developer Express 2008 SP1 RTM.

I do understand that designing pages using absolute positioning of elements is a tedious task and some people avoids it. However we have to been relying on the functionality that Visual Studio used to provide since VS 2002 and expected feature to stay in subsequent versions.

But the things are changing rapidly here. In VS 2008 Microsoft Visual Studio Product Group has replaced old IE based designer by a new designer that is shared with Expression Web and is based on former FrontPage technologies. But neither FrontPage nor Expression Web ever had multiple selection functionality in their releases, even Visual Interdev 98 is amongst the same page with these tools, Thus it took us some time to implement the feature in the new code base and it was not yet ready for SP1 Beta release.

Due to time constraints, not all functionality available in VS 2005 will become available in VS 2008 SP1. Here is what will be included:

1. Multiple selection using Ctrl+Click
2. Primary selection is indicated by white tab
3. Position menu with Absolute and Relative sub items
4. Align, Make Same Size and Order menus commands.
5. Ability to apply property to multiple controls in the Properties window
6. Delete multiple controls

Excluded Functionality :

1. Ability to drag multiple controls
2. Cut/Copy/Paste multiple elements

But its an interesting move: look at these pictures.

How to Implement, Transparency, Gradients and 3D Glass Effects on .NET Compect Framework.

Now mobile application developers can create more user friendly UI with .NET Compect Framework!!!

With the release of Microsoft® Windows Vista® and new development technologies such as Microsoft Silverlight™, .NET Micro Framework and Microsoft Windows® Presentation Foundation [WPF], expectations of what constitutes an acceptable application user interface on various Microsoft client platforms have never been higher. Since a long this move was expected from Microsoft as the company is aggresively capturing mobile deveolopment market, the Independent Software Vendor (ISV) creating software for Microsoft Windows Mobile® has always had to compete on features and functionality, but increasingly also faces competition on look and feel. Developers creating LOB (Line of Business) Windows Mobile solutions must now consider going beyond the out-of-the-box Windows Forms controls available in the .NET Compact Framework to create more compelling Windows Mobile–based application user interfaces that match the new graphic metaphors introduced in Windows Mobile 6.

Creating controls for .NET Compact Framework–based applications—which includes transparency, gradients, and three-dimensional glass-like appearance—is well within reach today, using existing Microsoft Windows Mobile development tools. This article will demonstrate how to achieve transparency, gradients, and glass effects by extending existing .NET Compact Framework controls and leveraging some powerful native graphics features available in the Windows Mobile operating system.

Sunday, June 01, 2008

Microsoft releases ASP.NET MVC [Model-View-Controller] Preview - 3

Last week (27th May 2008) , Microsoft released the latest preview version of its model-view-controller (MVC) architecture for Web application frameworks.

The debut of Version 3 was announced Tuesday on the blog of Scott Guthrie, corporate vice president of Microsoft's .NET Developer Division. This version includes many of the changes detailed in a post in April and several new ones, including improvements to the MVC, bug fixes, additions to HTML helper methods and a new URL routing engine that will also "ship in .NET 3.5 SP1 this summer," Guthrie wrote.

Another improvement he highlighted is a richer URL route mapping offering, including support for new characters.

Guthrie also commented on changes planned for upcoming versions. "In future preview releases, you'll start to see more improvements higher up the programming model stack in areas [such as] views (HTML helpers, validation helpers, etc.); AJAX; subcontrollers and site composition; deeper log-in, authentication, authorization and caching integration; as well as data scaffolding support," he wrote.

The preview is available for public download here. The source code is available here.

Tuesday, May 27, 2008

Microsoft Research - SecPAL (A new authorization language)

The development of large-scale, decentralized distributed computing environments has highlighted the need for fine-grained control over trust relationships and delegated access rights. Existing approaches do not fully satisfy these needs. They typically lack precision and/or require an undesirable reliance on centralized administration to be effective. In addition, one finds multiple independent mechanisms, with disparate semantics, being used to manage trust, delegation and authorization. This makes it difficult to understand the effective security in large distributed systems and complicates their management.

The goal of the SecPAL project is to develop a language for expressing decentralized authorization policies, and to investigate language design and semantics, as well as related algorithms and analysis techniques. This project is a collaboration between the advanced technology incubation group of Microsoft's Chief Research and Strategy Officer and Microsoft Research Cambridge.

Download : SecPAL for .NET

Microsoft Releases ".NET Micro Framework"

Microsoft has announced a new release of its .NET Micro Framework platform for low-end embedded processors. Version 2.5 adds a native TCP/IP stack and support for Web Services on Devices (WSD), which aims to allow network-connected devices to discover and connect to one another without user intervention.Networking a .NET MF device previously required calling through to an underlying operating system with sockets support, according to Microsoft. Version 2.5 now provides a stack that is available even when running directly on the hardware. Since device makers need only provide a driver for the network interface, a wider selection of network-capable hardware development platforms will be available, the company says.Microsoft adds that the new version of .NET MF will also include client and server support for Web Services on Devices, also known as Device Profile for Web Services (DPWS). Already part of Windows Vista and Windows CE 6.0 Release 2, this "enables a USB-like level of plug-and-play for networked devices," in the company's words. DPWS-enabled devices on a network can discover one another, then invoke the functionality each device provides.About .NET Micro Framework Microsoft .NET Micro Framework (.NET MF) in 2006, aiming it at wireless remote controls, watches, and other cost-sensitive devices with constrained processor and memory resources. The .NET MF grew out of Microsoft's Smart Personal Objects Technology (SPOT) initiative, with embryonic versions variously dubbed .NET Embedded and Tiny CLR.According to Microsoft, .NET MF supports low-end embedded processors and doesn't require an MMU (memory management unit). A typical runtime image is only about 300 KB in size, the company says.AvailabilityThe .NET Micro Framework, version 2.5, is available now, according to Microsoft. It is being demonstrated this week at the Embedded Workd 2008 show, in Nuremberg, Germany, in the Microsoft Windows Embedded booth (hall 11, stand 318).

Tuesday, April 22, 2008

ASP.NET 2.0 Page & Control Event Cycle

Here is the event cycle in ASP.NET 2.0 Page.


Wednesday, April 02, 2008

The SML.NET compiler

What is ML?
ML is a programming language originally developed at the University of Edinburgh around twenty years ago. There are now two variants: Standard ML (also known as SML), which has a formal definition most recently revised in 1997, and O'Caml, developed at INRIA in Paris.
What is ML like?
ML is a high-level language that abstracts away from the machine so that the programmer doesn't have to worry about low-level details like memory management, data representation and pointer chasing. It therefore has advantages of increased productivity, clearer and more maintainable code, and fewer errors. Its features include:
Static type checking and type inference
Garbage collection
Exception handling
4. Parameterized types and parametric polymorphism
5. Recursive datatypes and pattern matching
6. Mutable references
7. First-class functions
8. Sophisticated module system with parameterized modules
What is ML good for?
ML is particularly good for language-processing, hence its widespread use amongst the research community in compilers, interpreters, program analysis tools, theorem provers and formal verifiers. But the advantages listed above make it useful for many applications.
What is SML.NET?
SML.NET is a Standard ML compiler developed at Microsoft Research Cambridge that targets the .NET Common Language Runtime (CLR). It's very easy to use: tell it where your source code lives, give it the name of a "root" structure, and it produces an assembler file which it then runs through the CLR assembler to produce an executable or DLL. The code that it produces is verifiable.


One topic I'm often asked about is obfuscation of managed code, What is that? Is it a new way to secure your assembly/code?. Let me tell you, obfuscation is the process of scrambling the symbols, code, and data of a program to prevent reverse engineering. The technique is also preventing code from the possible security threats.
Optimizing C++ compilers for native code tend to produce obfuscated code by default. In the process of optimizing, the code is often rearranged quite a bit and symbols are stripped from retail builds. In contrast, managed code compilers (C#, VB.NET, etc) generate IL, not native assembly code. This IL tends to be consistently structured and fairly easy to reverse engineer. Most optimization happens when the IL is JIT-compiled into native code, not during compilation.
This means it's pretty easy to take a compiled assembly and de-compile it into source code, using a tool such as Lutz’s Reflector and File Disassembler . While this is a non-issue for web scenarios where all the code resides on the server, it's a big issue for some client scenarios, especially ISV applications. These client applications may contain trade secrets or sensitive information in their algorithms, data structures, or data. This is where obfuscation tools come in.
Obfuscation tools mangle symbols and rearrange code blocks to foil decompiling. They also may encrypt strings containing sensitive data. It's important to understand that obfuscators (as they exist today) can't completely protect your intellectual property. Because the code is on the client machine, a really determined hacker with lots of time can study the code and data structures enough to understand what's going on. Obfuscators do provide value in raising the bar, however, defeating most decompiler tools and preventing the casual hacker from stealing your intellectual property. They can make your code as difficult to reverse engineer as optimize native code.
If you're interested in obfuscation for your code, I recommend taking a look at one of the third-party obfuscators that work on managed code. For example,
Visual Studio ships with the community edition of Dotfuscator, a popular obfuscation package. The community edition only mangles symbol names, so it's not doing everything the full-featured editions do, but it will at least give you an idea of how an obfuscator works. And there are other third-party obfuscators that work on managed code as well. Keep in mind that obfuscating your code may make debugging more difficult or impossible. Many of the third-party obfuscators have features that help with debugging, however, such as keeping a mapping file from obfuscated symbol names to original symbol names.
I'm also asked what is Microsoft's stance on obfuscation? Do MS obfuscate their own code? The answer for the .NET Framework team is no. As a development platform, it makes more sense not to obfuscate, so MS protect their intellectual property by other means. Some Microsoft products that use managed code have opted to obfuscate.

MS Surface

It's lil bit longer then expected, but Microsoft has its first customer ready to put Surface computers into public use.
Perhaps most interestingly, the first one out of the gate is not one of the company's earliest partners. Instead, it is cellular carrier AT&T that is ready to make use of the touch-screen computers.

The company will use several counter-height units inside its cellular retail stores. The company is beginning with five stores on April 17: two in New York, one in San Francisco, one in San Antonio, and one in Atlanta. Each store will have a few of the Surface machines where customers can compare the features of different phones as well as check out service plans and view coverage maps. Currently AT&T uses laptops in the store to offer such features.
"We're in business now," said Pete Thompson, the general manager of Microsoft's surface computing unit.
Microsoft had talked about such a retail use for Surface, but in its demonstrations had featured AT&T rival T-Mobile. Thompson said that T-Mobile remains a partner, but he had no update as to when that carrier will be ready to use Surface in its stores.
And, although Microsoft CEO Steve Ballmer has said he wants the consumer version of surface speed up, Thompson said he also wants to make sure that the company doesn't disappoint its earliest customers, who are all large businesses.
Microsoft has said it is aiming to have the consumer version on shelves by 2011, as much as two years earlier than its initial plan.
"We are trying to do the right thing and accelerate where we can," Thompson said, but added, "I am very much focused on making this initial commercial plan a success without getting distracted."
As for those early buyers, Thompson said that Microsoft does have other unnanounced customers for the Surface, though he declined to name names. (One name we've heard mentioned is Disney, though Thompson would not comment on that.) He did say that we would start to see activity through partners in some additional areas, such as government, health care, and education.
At last year's partner conference, Microsoft talked about having a software development kit available by April.
Thompson said that the company has started offering a development kit for some software makers and partners, but that for the time being the kit will only be available to select developers.
"We're looking at more of a managed rollout of the SDK at this point," he said, adding that he would not characterize the software kit as being broadly available. "That's where we want to get to. I don't want to say this is a closed or managed system over time."
Although AT&T will be the first place the public can go to regularly see the Surface, Microsoft has permanently installed the machines in one other place: its own campus.
"You can just walk into most lobbies," Thompson said, adding that the company has about 15 to 20 buildings with the machines so far. "We're putting in three to five a week."

Microsoft Wins Open-Format Designation

Microsoft has won an international standards designation for its open-document format, according to voting results obtained Tuesday, apparently ending a divisive yearlong battle with software rivals before a global standards-setting organization.
Microsoft’s Office Open XML, a format for interchangeable Web documents, was approved by 24 of 32 countries in a core group in a ballot by the International Organization for Standardization. Approval by the standards-setting body, a nongovernmental network of 157 countries based in Geneva, is considered almost certain to influence software spending by governments and large companies.
The tally reversed a loss by Microsoft in first-round voting before an 87-nation panel in September, a process that involved blunt lobbying by both sides toward members of national standards committees — typically made up of technicians, engineers and bureaucrats.
In the final round of voting, which ended Saturday, three-quarters of the core group members — including Britain, Japan, Germany and Switzerland — supported Microsoft’s standard, according to the results document. Of the 87 votes, 10 opposed the standard: Brazil, Canada, China, Cuba, Ecuador, India, Iran, New Zealand, South Africa and Venezuela.
Under organization rules, at least 66 percent of core group members must accept a standard for it to be approved, and no more than 25 percent of all voting nations can be opposed.
Roger Frost, a spokesman in Geneva for the standardization group, would not confirm that Microsoft’s format had been designated, saying the organization would disclose the vote Wednesday after informing its members. The International Herald Tribune obtained the results from one of the delegations contacted by the standardization group.
Microsoft’s request for rapid approval of its standard in early 2007 produced an intense lobbying campaign by
I.B.M. and Sun Microsystems, which had helped develop a rival interchangeable document format called Open Document Format.
This rival was the first interchangeable document format to receive approval by the standardization group in 2006, and its backers used that in selling the technology to governments and large companies. The format is now being considered for use by 70 nations.
Microsoft’s push for speedy approval led to objections from many members of the standards group. They felt pressure from the company, whose Office application suite is the standard on more than 90 percent of computers and archives worldwide, according to International Data in Framingham, Mass.
There were tart remarks even from countries that abstained from the vote, like the Netherlands. “This is like someone with six shopping carts of food trying to go through the express lane at a supermarket,” said Michiel Leenaars, a member of the Dutch delegation. “The end result of this will be confusion. The standard is simply too big. There are still a lot of questions out there.”