.Net Internals and .Net Tools

.Net Internals

Rewrite MSIL Code on the Fly with the .NET Framework Profiling API By Aleksandr Mikunov - http://msdn.microsoft.com/en-us/magazine/cc188743.aspx

.NET Internals and Code Injection By Daniel Pistelli - http://www.codeproject.com/KB/dotnet/DotnetInternals_Injection.aspx

.NET Internals and Native Compiling By Daniel Pistelli - http://www.codeproject.com/KB/dotnet/internals_native.aspx

The Implementation of Model Constraints in .NET By Alex Mikunov - http://www.codeproject.com/KB/dotnet/model_constraints_in_net.aspx


.Net Tools

.Net Framework Tools - http://msdn.microsoft.com/en-us/library/bb400851.aspx

.NET Framework Technologies Development Tools (UISpy …) - http://msdn.microsoft.com/en-us/library/bb400849.aspx

.NET Framework Tools(SqlMetal, CorDbg, Gacutil, Mage, Ngen …) - http://msdn.microsoft.com/en-us/library/d9kh6s92.aspx

Windows Presentation Foundation Tools(Perforator, Event Trace …) - http://msdn.microsoft.com/en-us/library/aa969767.aspx


How to Make People Passionate About Their Work

Generating enthusiasm, or passion, for what you do is essential. It is doubly so in perilous times. When everything around us seems to be coming apart, a leader who has a passion for what he does is essential. Such a spirit fuels the engine of enth/usiasm needed to spark the enterprise. More importantly, such passion is vital to convincing others that the work matters. It is easy to get discouraged by today's market news and so it is vital that someone, be it the CEO or another senior leader, serves as the organization's designated cheerleader.

Ultimately instilling passion for the work is not an exercise in rah-rah; it is a search for meaning and significance. So how can you cultivate passion for work in others and do it in ways that have significance? Here are some suggestions.

Focus on the positive - Passion in leaders can be palpable; you know in an instant that the executive cares about the company. In my experience, those senior leaders who stroll through the halls with a nod or good word to say to all are those executives who get things done. And it is because they are out and about, not cloistered in their offices on mahogany row. Rather, they are meeting with employees and customers, vendors and investors, getting to know issues and concerns. They also use these times to talk up the good things.

Address the negatives - Passionate leaders are not Pollyannas; they know the score, precisely because they spend so much time out of their offices. They see firsthand what is working and what is not, and because they have a relationship with people in all levels of the company, they can more readily mobilize employees to solve problems.

Set high expectations - Those who care about the work and set a high standard challenge others to do the same, but they should remember to balance their approach — knowing to sometimes ease up on workloads but never on expectations.

As much as generating passion for the work matters, it is no guarantee of success, or even survival. Radiating passion is no excuse for ignoring attention to the fundamentals.

ref:http://blogs.harvardbusiness.org/baldoni/2009/07/passion_for_what_you_do_knows.html

Three ways to become an effective explainer

Great Communicators Are Great Explainers. Explanation is a key attribute of leadership communications. Leaders know to inject their communications with verve and enthusiasm as a means of persuasion, but they also need to include an explanation for the excitement.

What does it mean and why are we doing it are critical questions that every leader must answer with straightforward explanations. Here are three ways to become an effective explainer.

Define what it is - The purpose of an explanation is to describe the issue, the initiative, or the problem. For example, if you are pushing for cost reductions, explain why they are necessary and what they will entail. Put the cost reductions into the context of business operations. Be certain to explicate the benefits.

Define what it isn't - Here is where the leader moves into the "never assume mode." Be clear to define the exclusions. For example, returning to our cost reduction issue, if you are asking for reductions in costs, not people, be explicit. Otherwise employees will assume they are being axed. Leave no room for assumptions. This is not simply true for potential layoffs but for any business issue.

Define what you want people to do - This becomes an opportunity to issue the call for action. Establishing expectations is critical. Cost reductions mean employees will have to do more with less; explain what that will entail in clear and precise terms. Leaders can also use the expectations step as a challenge for people to think and do differently. Your explanation then takes on broader significance.

Good explainers need to be careful, however, not to overdo the details. In a town hall meeting format, the leader sketches the facts and supports them with data points. Dwelling too long on a single point, or points, risks not simply boring the audience but confusing them. Save detailed explanations, which are necessary, for written documentation or team meetings. The latter presents an opportunity for the next level of leaders to translate the communications into action steps.

As such, detailed explanations work well in face-to-face situations, or in team meetings. They become opportunities to elaborate on possibilities. More important, they also allow individuals to offer their feedback, something that typically cannot occur in large-scale town hall events. The explanation becomes an invitation for discussion, and skillful leaders use it to communicate not simply facts, but also to engage support for their ideas.One final point. Explanations may include aspirations.

ref:

Recession proof career Planning

Recession proof career Planning involves 5 major things -

  1. Do work you love.
  2. Network, Network, Network (Build strong relationships based on who you are, not what you achieve)
  3. Learn, Learn, Learn (Continuous learning is the key)
  4. Be proactive.
  5. Build your personal Brand.
ref:

.Net CodePlex Projects to know !

1. Microsoft Application Architecture Guide 2.0 eBook - http://www.codeplex.com/AppArchGuide/Release/ProjectReleases.aspx?ReleaseId=20586

2. WPF (Windows Presentation Framework) Updates Roadmap - http://wpf.codeplex.com/


3. Layered Architecture Sample for .NET - http://www.codeplex.com/LayerSample

This project makes use of .Net3.0 & .Net3.5 features ... Good way to learn latest .Net features !


4. Cosmos (C# Open Source Managed Operating System) is a complete operating system built from the ground up in C#) - http://cosmos.codeplex.com/


5. WPF Property Grid : WPF Property Grid is a WPF version of the well known Visual Studio Property Grid control -

6. Managed Code and Interop Information - http://www.codeplex.com/clrinterop

7. Microsoft Managed WiFi API - http://www.codeplex.com/managedwifi

8. The OpenNetCF Desktop.Communication Library contains classes used for communicating with a CE device from a PC such as Microsoft's Remote API (RAPI) - http://rapi.codeplex.com/

9. .Net Wrapper over Microsoft Bluetooth native API - http://www.codeplex.com/32feet/

10. TLBIMP is a .NET SDK tool that creates an Interop assembly from a COM type library. This project is a managed code implementation of TLBIMP -
http://www.codeplex.com/clrinterop/Release/ProjectReleases.aspx?ReleaseId=17579

Windows OS Tips

1. Digital Signatures for Kernel Modules on Systems Running Windows Vista and later

Microsoft Windows Vista and later versions of the Windows family of operating systems, kernel-mode software must have a digital signature to load on x64-based computer systems.

Enabling Test Signing

Use the Bcdedit command-line tool to enable test signing. To use BCDedit, the user must be a member of the Administrators group on the system and run the command from an elevated command prompt. An elevated command prompt can be launched by creating a desktop shortcut to cmd.exe, and then using right-click and "Run as administrator."

The following shows an example of running BDCedit at the command prompt:

// Accept test signed kernel mode signatures

Bcdedit.exe –set TESTSIGNING ON

// Do not accept test signed kernel mode signatures

Bcdedit.exe –set TESTSIGNING OFF

The TESTSIGNING boot configuration option determines whether Windows Vista accepts test signed kernel mode binaries. The option is not defined by default which means digital signatures on test signed kernel mode drivers will not verify and will not load. When Windows Vista accepts test signed kernel mode binaries, some premium content that is protected may not be accessible on the system.

ref :

http://msdn.microsoft.com/en-us/library/bb530195.aspx

When should I use WPF vs Silverlight?

Microsoft feels that user experience is important, and invested in multiple technologies to promote better user experience. Both WPF and Silverlight use XAML (Extensible Application Markup Language) under the covers.

Let's look at some of the different characteristics of each technology:

WPF:

  • Ships as part of the .NET Framework (version 3.0 and onward)
  • Runs as Windows application or as web "browser application" (called XBAP, for "XAML Browser Application"). Note that XBAPs run only in Internet Explorer with .NET 3.0 and in both Internet Explorer and Firefox with .NET 3.5.
  • Runs on Windows machines only (Windows XP, Windows Server 2003, Windows Vista, and Windows Server 2008)
  • Richest functionality, including 3D graphics

Silverlight:

  • Ships independently
  • Runs in web browsers only (Internet Explorer, Firefox, Safari)
  • Runs on Windows or Mac operating systems (also on Linux via Moonlight, which is an open source implementation of Silverlight based on Mono)
  • Functionality is a subset of WPF's feature set

When should you use each? The maddening answer is (of course): it depends!

WPF is a more mature technology and was designed with a richer feature set. It also has the advantage of being able to run in a browser or as an installed Windows-Form-type app.

Silverlight has a broader reach. You can access Silverlight from many operating systems and web browsers.

The most important reason to choose one over the other should be based on the intended audience for the application. For example, if a corporation is designing an application for internal use only and every employee has Windows XP as the company standard OS, then go with WPF to leverage the richer feature set. If a corporation is designing an external-facing website, then Silverlight is the better choice because potential customers can access the website from a variety of different operating systems and browsers.

Two big reasons why WPF is still relevant:

1) WPF has lots of cool accelerated 3D support that Silverlight lacks. Silverlight lets you build rich applications; WPF lets you build even richer applications.

2) Silverlight runs in a sandbox. Among other things, it can't access the local file system. (It does support isolated storage so data can be persisted locally, but isolated storage is highly virtualized and is a far cry from unfettered file system access.) WPF is the better choice for building traditional document-handling applications.

There are other reasons WPF is still the right choice for some apps, but admittedly, Silverlight blurs the line between traditional apps and browser-based apps and it opens up a whole new world of possibilities for the latter.

ref:

Swiss MSDN team’s Blog -

http://blogs.msdn.com/swiss_dpe_team/archive/2008/12/15/wpf-vs-silverlight-for-intranet-line-of-business-apps.aspx

Jennifer Marsman’s Blog -

http://blogs.msdn.com/jennifer/archive/2008/05/06/when-should-i-use-wpf-vs-silverlight.aspx

Jeff Prosise's Blog -

http://www.wintellect.com/CS/blogs/jprosise/archive/2007/05/02/mix-update-wpf-vs-silverlight.aspx


An 18-Minute Plan for Managing Your Day

We can manage our day in three steps that take less than 18 minutes over an eight-hour workday -

STEP 1 (5 Minutes) Set Plan for Day: Before turning on your computer, sit down with a blank piece of paper and decide what will make this day highly successful. What can you realistically accomplish that will further your goals and allow you to leave at the end of the day feeling like you've been productive and successful? Write those things down.

Now, most importantly, take your calendar and schedule those things into time slots, placing the hardest and most important items at the beginning of the day. And by the beginning of the day I mean, if possible, before even checking your email. If your entire list does not fit into your calendar, reprioritize your list. There is tremendous power in deciding when and where you are going to do something.If you want to get something done, decide when and where you're going to do it. Otherwise, take it off your list.

STEP 2 (1 minute every hour) Refocus: Set your watch, phone, or computer to ring every hour. When it rings, take a deep breath, look at your list and ask yourself if you spent your last hour productively. Then look at your calendar and deliberately recommit to how you are going to use the next hour. Manage your day hour by hour. Don't let the hours manage you.

STEP 3 (5 minutes) Review: Shut off your computer and review your day. What worked? Where did you focus? Where did you get distracted? What did you learn that will help you be more productive tomorrow?

If you choose your focus deliberately and wisely and consistently remind yourself of that focus, you will stay focused. It's simple ... Have a great working day.

ref:

PETER BREGMAN's Blog -

http://blogs.harvardbusiness.org/bregman/2009/07/an-18minute-plan-for-managing.html


Service Oriented Analysis and Design(SOAD)

The interdisciplinary OOAD method facilitating successful SOA deployments, which can be referred to as Service-Oriented Analysis and Design (SOAD).


SOA architectural style aims to provide enterprise business solutions that can extend or change on demand. SOA solutions are composed of reusable services, with well-defined, published and standards-compliant interfaces. SOA provides a mechanism for integrating existing legacy applications regardless of their platform or language.


In SOA, always the focus is on Messages (XML) rather than API.



Conceptually, there are three major levels of abstraction within SOA:


1.Operations:
Transactions that represent single logical units of work (LUWs). Execution of an operation will typically cause one or more persistent data records to be read, written, or modified. SOA operations are directly comparable to object-oriented (OO) methods. They have a specific, structured interface, and return structured responses. Just as for methods, the execution of a specific operation might involve invocation of additional operations.


2.Services:
Represent logical groupings of operations. For example, if we view CustomerProfiling as a service, then, Lookup customer by telephone number, List customers by name and postal code, and Save data for new customer represent the associated operations.


3.Business Processes:
A long running set of actions or activities performed with specific business goals in mind. Business processes typically encompass multiple service invocations. Examples of business processes are: Initiate New Employee, Sell Products or Services, and Fulfill Order.
In SOA terms, a business process consists of a series of operations which are executed in an ordered sequence according to a set of business rules. The sequencing, selection, and execution of operations is termed service or process choreography. Typically, choreographed services are invoked in order to respond to business events.


BPM, EA, and OOAD positioning






The Layers of design











SOA Choreography vs SOA Orchestration (From WebService perspective)

Process choreography, as the term is commonly used in the IT world, describes the interplay of various trading partners to implement a multi organization business function. For example, in the supply chain space, the fulfillment of a product purchase may involve the exchange of purchase orders, advance shipping notices, and money between two or more companies. Choreography does not describe how each company would conduct its operations, only how the different companies would interface with each other.

Process orchestration [of web service] is a technique to recursively compose and orchestrate web services to provide a new composite webservice Process orchestration is when a central process coordinates the execution of different Web services operations. The central conductor (as in an orchestra) is aware of the overall goal of the orchestration, the operations involved, and the order of the operation invocation. This centralized management allows Web services to be added or removed without each being aware of its effect on others, as well as compensatory processes to be implemented in case of faults and exceptions.

ref:

Elements of Service-Oriented Analysis and Design - http://www.ibm.com/developerworks/webservices/library/ws-soad1/

Place XML Message Design Ahead of Schema Planning to Improve Web Service Interoperability - http://msdn.microsoft.com/en-us/magazine/cc188900.aspx

Case Study: SOA Design Scenario - http://www.redbooks.ibm.com/redpapers/pdfs/redp4379.pdf

SOA AntiPatterns - http://www.ibm.com/developerworks/webservices/library/ws-antipatterns/



Oracle’s SOA Architect Center - http://www.oracle.com/technology/tech/soa/index.html



IBM’s SOA Center - http://www-01.ibm.com/software/solutions/soa/



Service Façade - http://searchsoa.techtarget.com/tip/0,289483,sid26_gci1346145_mem1,00.html

SOA Design Pattern Application Sequences: Service Facade + UI Mediator -

http://www.oracle.com/technology/pub/articles/erl_soa_design_patterns_app_sequences.html



Non-Agnostic Context SOA Pattern -

http://searchsoa.techtarget.com/tip/0,289483,sid26_gci1347582_mem1,00.html



Domain Inventory SOA Pattern -

http://searchsoa.techtarget.com/tip/0,289483,sid26_gci1349152_mem1,00.html



E-business patterns -

http://www.ibm.com/developerworks/patterns/index.html

https://www.ibm.com/developerworks/patterns/library/

Microsoft WiFi and Bluetooth API in C++/.Net

Bluetooth and WiFi are both wireless networking standards that provide connectivity via radio waves. The main difference is that Bluetooth's primary use is to replace cables, while WiFi is largely used to provide wireless, high-speed access to the Internet or a local area network.

WiFi :

Microsoft Native WiFi API - http://msdn.microsoft.com/en-us/library/ms706556(VS.85).aspx

Microsoft Managed WiFi API - http://www.codeplex.com/managedwifi

The OpenNetCF Desktop.Communication Library contains classes used for communicating with a CE device from a PC such as Microsoft's Remote API (RAPI) - http://rapi.codeplex.com/

.Net Wrapper over Microsoft WiFi native API - http://www.codeproject.com/KB/vista/wifi.aspx

A Vista Wireless Network Scanner - http://www.codeproject.com/KB/gadgets/WifiScanner.aspx?msg=2171576

Bluetooth :

Microsoft Native Bluetooth API - http://msdn.microsoft.com/en-us/library/aa362932(VS.85).aspx

.Net Wrapper over Microsoft Bluetooth native API - http://www.codeplex.com/32feet/

(

32feet.NET is a shared-source project to make personal area networking technologies such as Bluetooth, Infrared (IrDA) and more, easily accessible from .NET code. Supports desktop, mobile or embedded systems. The project currently consists of the following libraries:-

1. Bluetooth

2. IrDA

3. Object Exchange

)



Windows 7 Sensor and Location Platform

The Windows Sensor and Location platform, which is new for Windows 7, enables your computer and applications to adapt to their current environment. With location sensors including GPS(Global Positioning System) devices, WWAN radios, and even triangulation technology your applications and gadgets can know exactly where they are, enabling them to provide more locally relevant content and functionality.

The platform provides a standard way to integrate sensor and location devices into Windows, as well as a standard programming interface for applications to take advantage of these devices. On Windows 7, the user has control over how data from these devices is exposed to applications. Hardware manufacturers can learn how to write sensor and location drivers by installing the Windows 7 WDK. Developers can learn how to write location-aware and sensor-enabled applications by installing the Windows 7 SDK

The Windows 7 Sensor and Location Platform is an API built into Windows 7 that will allow application developers to interact with sensors in a standard way, and it allow a standard way for hardware vendors to create their sensor interfaces. Hence, it allows hardware and software developers to speak a common language.

Application developers will be able to create environmentally aware applications much easier by using these standard API interfaces built into Windows 7, instead of writing code for each specific piece of sensor hardware they want to use.The APIs are provided primarily as native code interfaces using C++ and COM. However, a lightweight
.NET Interop Library has been published for .NET development.

ref:
Windows Sensor and Location Platform Resources -
http://www.microsoft.com/whdc/device/sensors/default.mspx

Windows Sensor and Location specific downloads and code samples -
http://code.msdn.microsoft.com/SensorsAndLocation

Windows 7 Sensor and Location API information on Matt’s Blog –
http://fusionovation.com/blogs/mbohn/archive/2009/05/11/windows-7-sensor-and-location-api.aspx

Why we need to Fail !

Most of us spend a tremendous effort trying to avoid even the possibility of failure.

According to Dr. Carol Dweck, professor at Stanford University, we have a mindset problem. Dweck has done a tremendous amount of research to understand what makes someone give up in the face of adversity versus strive to overcome it.

It turns out the answer is deceptively simple. It's all in our head.

If you believe that your talents are inborn or fixed, then you will try to avoid failure at all costs because failure is proof of your limitation. People with a fixed mindset like to solve the same problems over and over again. It reinforces their sense of competence.

Children with fixed mindsets would rather redo an easy jigsaw puzzle than try a harder one. Students with fixed mindsets would rather not learn new languages.
CEOs with fixed mindsets will surround themselves with people who agree with them. They feel smart when they get it right.

But if you believe your talent grows with persistence and effort, then you seek failure as an opportunity to improve.
People with a growth mindset feel smart when they're learning, not when they're flawless.

Michael Jordan, arguably the world's best basketball player, has a growth mindset. Most successful people do. In high school he was cut from the basketball team but that obviously didn't discourage him: "
I've missed more than 9,000 shots in my career, I've lost almost 300 games. Twenty-six times I've been trusted to take the game wining shot and missed. I've failed over and over and over again in my life. And that is why I succeed."

If you have a growth mindset, then you use your failures to improve.
If you have a fixed mindset, you may never fail, but neither do you learn or grow.

In business, we have to be discriminating about when we choose to challenge ourselves. In high risk, high leverage situations, it's better to stay within your current capability. In lower risk situations, where the consequences of failure are less, better to push the envelope. The important point is to know that pushing the envelope, that failing, is how you learn and grow and succeed. It's your opportunity.

Here's the good news: you can change your success by changing your mindset. When Dweck trained children to view themselves as capable of growing their intelligence, they worked harder, more persistently, and with greater success on math problems they had previously abandoned as unsolvable.

A growth mindset is the secret to maximizing potential.
Want to grow your staff? Give them tasks above their ability. They don't think they could do it? Tell them you expect them to work at it for a while, struggle with it. That it will take more time than the tasks they're used to doing. That you expect they'll make some mistakes along the way. But you know they could do it.

Want to increase your own performance? Set high goals where you have a 50-70% chance of success. According to Psychologist and Harvard researcher the late David McClelland, that's the sweet spot for high achievers. Then, when you fail half the time, figure out what you should do differently and try again. That's practice. And according to recent studies, 10,000 hours of that kind of practice will make you an expert in anything. No matter where you start.

If you are not losing enough, you are not testing yourself and growing. It's better 'fail early' than 'succeed early' because early successes are highly deceptive - more often than not, they are designed to succeed, give illusion that the problem is softer than it really is, and eventually lead to grand failures. You should not be afraid of Failure as it's not 'NEW', Failure is part of ongoing improvement process.

Fail to Learn ... You will grow till you learn ... You will be Successful till you Grow !

ref : http://blogs.harvardbusiness.org/bregman/2009/07/why-you-need-to-fail.html

Stop reacting to the past and Start reacting to the future !

Our reaction to an event creates an unproductive outcome.

Flow : event -> reaction -> outcome

This simple event-reaction-outcome chain governs most of our spontaneous action. Something or someone hooks us and we react. Someone yells at us, we yell back and create the outcome of a damaged relationship. It's not that we want a damaged relationship, it's just what happens when we yell back.

And that's the problem. The most important part of the chain, arguably the only part that really matters, the outcome, is collateral damage from our reaction. It's not intentional. We're reacting to the event. The outcome is simply fallout.

An alternate chain. Focus on the outcome, then choose your reaction.

Flow : event -> outcome -> reaction

When an unsettling event occurs, pause before reacting. In that pause, ask yourself a single question: what is the outcome I want? Then, instead of reacting to the event, react to the outcome.

In other words, stop reacting to the past and start reacting to the future.

If someone yells at you, pause before yelling back. Then ask yourself what outcome you want. If the answer is "an improved relationship," don't yell back. Instead, in a normal voice, empathize with their anger and ask some questions about the concerns raised in the midst of the screaming. That's a reaction that will achieve a better relationship.

Here's the hard part: You react to the event because it's asking you to react to it. But just because the event catalyzed your action, doesn't mean it should determine it. How you react can and should be determined by the outcome; by the future you want to create.

Maybe a colleague comes to you complaining about a situation she's in with her boss (event). How should you respond (reaction)? If the outcome you want is her feeling supported, then listen to her with empathy. If you want to help her, then offer solutions. If you simply want to get back to work, then find a graceful escape.

ref:

http://blogs.harvardbusiness.org/bregman/2009/07/to-get-what-you-want-dont-go-with-your-gut.html