david 的个人资料David Yardy PE, MCSD.NET...照片日志列表 工具 帮助

日志


3月9日

Silverlight 2 (beta 1) Tools for Visual Studio 2008 Installation Error

I received the following error while trying to install the latest Silverlight tools.  Michael Sync had an excellent post regarding these errors.    I read through his post three times, reviewing each potential problem.
image

I remembered that I had installed VS 2008 on my D drive.  No...that couldn't be it I thought.  I took the next 45 minutes to uninstall and re-install on the C drive.  Installed the VS 2008 and the update patch (KB946581) on the C drive. 

Then finally, I installed the Silverlight Tools Beta 1 for VS.NET 2008. 

The problem was that I had installed VS.NET 2008 on the D drive.

All installed perfectly this time.  (p.s. I am on Vista 32 bit)

3月8日

Microsoft Silverlight vs. Microsoft MVC (smack down)

Being a human with limited time and brain space I try to focus myself on learning technologies that can be applied to my current or upcoming projects (as well as those technologies that I feel will be the focus of development in say the next 1-3 years).

Silverlight and MVC are two new products/frameworks that have come into view.  MIX08 announced new versions for both these budding technologies.  Not really a fair fight as really one is a framework for the existing Asp.NET platform while the other is a new platform for developing code.  The following is a brief introduction to each technology followed by questions that I have used to focus my energy.

Silverlight

  • cross-platform, cross-browser plug-in which enables rich application development including media, interactivity and animation
  • enables identical development modal regardless of user operating system and browser
  • .NET language support (c# and vb.net) as well as Ruby, Python and managed JScript
  • XAML (pronounced zamel) is the language for user interface design
  • enables exchange of data between client and server via ajax technologies
  • unlike Adobe Flash, Sliverlight code can be delivered to the client in one package with content such as pictures and video separately thereby promoting re-use of code
  • WPF XAML and Silverlight XAML is different.  The latter is a simplified version compared to the former.

Microsoft MVC (Model View Controller)

  • framework methodology that divides the application's implementation into 3 components (Models, Views and Controllers)
  • primary benefit being increased ability for unit testing since the interfaces between layers is more clearly defined
  • support for existing asp.net aspx, ascx and .master markup files (these would be considered view templates)
  • does not utilize existing post-back/viewstate paradigms

Where to concentrate my energy?  Consider the following questions:

  • Which technology is more revolutionary?
  • Which technology would my customers see the largest benefits?
  • Which technology appears to have the greatest longevity and/or have the biggest impact on future projects?
  • Which technology could potentially be utilized across a number of Microsoft platforms and technologies(i.e. Sharepoint, Report Solutions, CRM and potentially WCF (Communication Foundation), WF (Workflow Foundation), WPF Desktop applications)
  • Which technology resolves current 'limitations' in the current development environment? (if you were listing the biggest limitations of current application (web) development which of the above has biggest impact on those limitations)
  • How 'ready' is the technology for implementation in real world projects? (at this point I am guessing that both are neck in neck in this 'production' ready race (currently both are beta 2 products)

For me while answering the above questions; the answer to the question "Which technology to focus on?" becomes quite obvious.  Tomorrow I start with Silverlight.

Through the development of a number of small Silverlight applications my goal is to very quickly understand the technology.  I will also be able to gain perspective as to the direction of the technology and to schedule future implementations (based on limitations). 

I will try to document my findings.

Downloads:
Silverlight 2 Beta 1
Microsoft Silverlight Tools Beta 1 for Visual Studio 2008

3月4日

SQL Server String Concatenation (T-SQL) - New way to do this in SQL 2005

For years I have been doing something similar to the following:

DECLARE @list varchar(200)
SET @list =''
SELECT @list = COALESCE(@list + ',','') + DisplayName FROM Customers

Here COALESCE returns the first thing in the list that is not null.  This can also be achieved with

DECLARE @list varchar(200)
SET @list=''
SELECT @list = @list + ',' + DisplayName

The problem with the above approach is dealing with NULLs and also if you attempt to order the values that are concatenated you may not get all the values.

New in SQL 2005 provided specifically for string concatenation FOR XML Path('').  The above can properly be achieved by

DECLARE @list varchar(200)
SET @list = ''
SELECT @list = STUFF((SELECT ',' + DisplayName FROM Customers {WHERE } {ORDER BY})  FOR xml path('')),1,1,'')

Note: FOR XML Path is only situation where you can use Order by in a subquery.  Using an unnamed column for XML Path('') you get a straight concatenation with no XML tags.  This is the recommended way for concatenating strings in SQL 2005

3月2日

Software Development - Striving for Excellence

I have thought about this concept over the last few years while involved on numerous development projects.  As you may have surmised by now (and most likely you have) there can be very a large discrepancy between individuals' motivation levels on software projects.  In terms of 'excellence'  I am really referring to the desire to do one's best within the constraints of time, resources, and knowledge. 

With respect to software development it is directly related to the following:

  • Documented requirements meet and exceed user expectations (Documents are concise, detailed and fully represent the product features and functionality.).
  • Code design, performance and style conform to industry accepted best practices.
  • Delivered product(s) exceed user expectations in terms of user interface layout, design, features, functionality and consistency.

Through these concepts I am narrowing my discussion to the roots of motivation.  Where does motivation come from?

  • genetics
  • taught (learned)
  • experience
  • competition
  • desire to please/sense of worth (respect from others)
  • reward/celebration
  • enjoyment

The oracle of words lead me quickly to the definition of motivation-reason or reasons for engaging in a particular behavior. Why do some individuals have the stamina for excellence (within our context) while others seem to run out of steam?

The sources listed above for motivation can be characterized by two types of motivation: extrinsic and intrinsic.

"Extrinsic motivation is triggered by outside sources, rather than from within.  Outside forces may come in the form of a reward such as candy,...or a pat on the back or a celebration... Rewards are thought of as anything that has market value and is expected. While extrinsic motivation may work for a short time eventually its'  ability to motivate diminishes."   The above quotes and excerpts came from, What Every Teacher Should Know about Student Motivation, by Donna Walker Tileston.

"Intrinsic motivation" is most easily described as the motivation that one derives from non-reward incentives.  It is very much the unconscious effort by the brain to establish importance (often through enjoyment, challenge or pleasure).   Per Marzano (2001), "If the task is judged important, if the probability of success is high, and a positive effect is generated or associated with the task students will be motivated to engage in the new task."  In effect this breaks down to the following factors:

  • Examining importance (Is the task instrumental in satisfying a basic need or in the attainment of a personal goal?)
  • Efficacy ("extent to which individuals believe that they have the resources, ability, or power to change a situation based on a past experience,...confidence a person has that he/she has the ability to be successful").  Efficacy relates heavily on past experience and the adage, "success breeds success," is true.
  • Emotional response ("Negative emotion can literally shut down thought processes, while positive emotions can help shape our motivation to learn.")

Stated more simply, intrinsic motivation can be defined as, "stimulation that drives an individual to adopt or change a behavior for his or her own internal satisfaction or fulfillment. Intrinsic motivation is usually self-applied, and springs from a direct relationship between the individual and the situation."  While extrinsic motivation can initially ensure a basic level of success eventually the success of the team is must be driven by the collective intrinsic motivation of the individuals. 

Obviously, the classification and measurement of motivation is an area deeply covered in psychology text books.  Through this entry, we have been able to better categorize motivation and understand some general concepts around the sources of motivation. 

At this point, one may be thinking about the following:

  • Why is there the great divide in individuals' intrinsic motivation?
  • How can an organization encourage intrinsic motivation? Is this possible in a business environment?
  • Is it possible to measure one's intrinsic motivation? ( This ability through an interview process would be invaluable for hiring organizations.)

Software excellence (as defined above) is directly related to motivation.  The ability for an organization to impact motivation is really a larger discussion and a challenge for many organizations.