<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1204687399787349866</id><updated>2011-11-27T15:20:38.666-08:00</updated><category term='数据库'/><category term='职业发展'/><category term='软件开发管理'/><category term='软件架构'/><title type='text'>LuckyRainy</title><subtitle type='html'>愿乘风破万里浪,甘面壁读十年书。</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://luckyrainy.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1204687399787349866/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://luckyrainy.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Rainy</name><uri>http://www.blogger.com/profile/03486079127440003099</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1204687399787349866.post-1515156918038133548</id><published>2008-07-02T19:59:00.000-07:00</published><updated>2008-07-02T20:04:19.347-07:00</updated><title type='text'>Silverlight Grid Control</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.devexpress.com/Products/NET/Controls/Silverlight/Grid/i/header_top.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px;" src="http://www.devexpress.com/Products/NET/Controls/Silverlight/Grid/i/header_top.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;&lt;br /&gt;&lt;a href="http://community.devexpress.com/blogs/theonewith/archive/tags/AgDataGrid/default.aspx"&gt;&lt;span style="text-decoration: underline;"&gt;http://community.devexpress.com/blogs/theonewith/archive/tags/AgDataGrid/default.aspx&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1204687399787349866-1515156918038133548?l=luckyrainy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.devexpress.com/Products/NET/Controls/Silverlight/Grid/' title='Silverlight Grid Control'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1204687399787349866/posts/default/1515156918038133548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1204687399787349866/posts/default/1515156918038133548'/><link rel='alternate' type='text/html' href='http://luckyrainy.blogspot.com/2008/07/silverlight-grid-control.html' title='Silverlight Grid Control'/><author><name>Rainy</name><uri>http://www.blogger.com/profile/03486079127440003099</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1204687399787349866.post-5817766487712087979</id><published>2008-01-27T23:29:00.000-08:00</published><updated>2008-01-27T23:31:55.768-08:00</updated><title type='text'>Configuring Visual Studio to Debug .NET Framework Source Code</title><content type='html'>&lt;p&gt;It's finally here - the launch of the .NET Reference Source project.  This post (hopefully!) contains everything you need to know.  Over the past few weeks, we ran a pilot of this feature and collected lots of great data that helped us work through some issues and understand where people were likely to have problems.  &lt;/p&gt; &lt;p&gt;First, though, if you have any problems, please make sure you've followed all of the steps exactly as described.  If you're still having problems, please check the &lt;a linkindex="34" href="http://blogs.msdn.com/sburke/archive/2008/01/16/configuring-visual-studio-to-debug-net-framework-source-code.aspx#faq"&gt;FAQ/Troubleshooting&lt;/a&gt; section at the bottom.  If that doesn't work, post a comment below and I'll look into it.&lt;/p&gt; &lt;h4&gt;BASIC SETUP&lt;/h4&gt; &lt;p&gt;Note this functionality is &lt;strong&gt;not&lt;/strong&gt; available on the Express versions of the Visual Studio 2008 products.&lt;/p&gt; &lt;p&gt;1) Install the &lt;a href="https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=10443&amp;amp;wa=wsignin1.0" target="_blank" mce_href="https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=10443&amp;amp;wa=wsignin1.0"&gt;Visual Studio 2008 QFE&lt;/a&gt;.  This Hotfix just updates a DLL that's part of the Visual Studio debugger that fetches the source files, more details on the download page.&lt;/p&gt; &lt;p&gt;&lt;strong&gt; UPDATE:&lt;/strong&gt;  If you get an error installing the Hotfix , try inserting your VS 2008 DVD and then running the Hotfix EXE again.  We're looking into the root cause - it's related to having a prior version of VS 2008 (e.g. Beta 2) installed on the machine.  But this workaround should allow the Hotfix to install properly.&lt;/p&gt; &lt;p&gt; &lt;strong&gt;UPDATE (1/18):&lt;/strong&gt; There were some problems with the QFE link above that have been addressed, sorry for the inconvenience, it's fixed now.&lt;/p&gt; &lt;p&gt;2) Start Visual Studio 2008 and bring up Tools &gt; Options &gt; Debugging &gt; General.  If you are running under the &lt;strong&gt;Visual Basic Profile&lt;/strong&gt;, you will need to check the box on the &lt;strong&gt;lower left of the Options Dialog &lt;/strong&gt;marked "&lt;strong&gt;Show All Settings&lt;/strong&gt;" before continuing (other profiles won't have this option).&lt;/p&gt; &lt;p&gt;Set the following two settings:&lt;/p&gt; &lt;ul&gt;&lt;li&gt;Turn &lt;strong&gt;OFF &lt;/strong&gt;the "&lt;strong&gt;Enable Just My Code&lt;/strong&gt;" setting &lt;/li&gt;&lt;li&gt;Turn &lt;strong&gt;ON&lt;/strong&gt; the "&lt;strong&gt;Enable Source Server Support&lt;/strong&gt;" setting &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Your settings should be as below:&lt;/p&gt; &lt;p&gt;&lt;a linkindex="35" href="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_38.png" mce_href="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_38.png"&gt;&lt;img style="border-width: 0px;" alt="image" src="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_thumb_11.png" mce_src="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_thumb_11.png" border="0" height="439" width="756" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;3) Next, bring up the "Symbols" Page and set the symbols download URL and a cache location.  Specifically, set the three settings below:&lt;/p&gt; &lt;ul&gt;&lt;ul&gt;&lt;li&gt;Set the symbol file location to be: &lt;strong&gt;http://referencesource.microsoft.com/symbols&lt;/strong&gt; &lt;/li&gt;&lt;li&gt;Set a cache location.  Make sure this is a location that your account has read/write access to.  A good option for this is to place this path somewhere under your user hive (e.g. c:\users\sburke\symbols) &lt;/li&gt;&lt;li&gt;Enable the "Search the above locations only when symbols are loaded manually" option. &lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt; &lt;p&gt;When you're finished, the settings should look like the image below:&lt;/p&gt; &lt;p&gt;&lt;a linkindex="36" href="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_23.png" mce_href="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_23.png"&gt;&lt;img style="border-width: 0px;" alt="image" src="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_thumb_2.png" mce_src="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_thumb_2.png" border="0" height="438" width="763" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Setup is done!  That's it, really!&lt;/p&gt; &lt;h4&gt;DEBUGGING INTO FRAMEWORK SOURCE&lt;/h4&gt; &lt;p&gt;For this simple example, we'll start with a blank C# Windows Application project, but it will work the same with a VB, Web, or WPF project.  To walk through this, go ahead and create that project.&lt;/p&gt; &lt;p&gt;Set a breakpoint in &lt;strong&gt;Form_Load&lt;/strong&gt;:&lt;/p&gt; &lt;p&gt;&lt;a linkindex="37" href="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_10.png" mce_href="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_10.png"&gt;&lt;img style="border-width: 0px;" alt="image" src="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_thumb_4.png" mce_src="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_thumb_4.png" border="0" height="87" width="616" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Now run your project to hit that breakpoint and go to your &lt;strong&gt;Call Stack&lt;/strong&gt; window (&lt;strong&gt;CTRL+ALT+C&lt;/strong&gt;).  In the Call Stack, right click a frame that starts with &lt;strong&gt;System.Windows.Forms.dll&lt;/strong&gt;, and choose "&lt;strong&gt;Load Symbols&lt;/strong&gt;".  This will load the symbols for the System.Windows.Forms assembly, which are about 10 megabytes, so the speed of the download will vary according to your connection speed.  Note that Visual Studio may be unresponsive during this time.   However, this download is a one-time cost for each assembly.  The symbols (PDB) file will be cached on your machine, in the directory specified in the steps above.  &lt;/p&gt; &lt;p&gt;&lt;a linkindex="38" href="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_12.png" mce_href="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_12.png"&gt;&lt;img style="border-width: 0px;" alt="Loading Symbols Manually" src="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_thumb_5.png" mce_src="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_thumb_5.png" border="0" height="378" width="801" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;This will load the symbols for the DLL from the server, and you'll see some information in the status bar to reflect this.  Note that when this completes, the call frames will turn black and line numbers will be available.  Note you'll need to do the &lt;strong&gt;Right Click -&gt; Load Symbols&lt;/strong&gt; step each time you launch a debugging session (but, again, the symbols will now be cached locally so they won't have to download).  For more information on this, see the ADVANCED USERS section below.&lt;/p&gt; &lt;p&gt;&lt;a linkindex="39" href="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_14.png" mce_href="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_14.png"&gt;&lt;img style="border-width: 0px;" alt="image" src="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_thumb_6.png" mce_src="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_thumb_6.png" border="0" height="124" width="719" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;You have now loaded the symbols for the Windows Forms DLL and can begin viewing the code.  You can view code in any way that you normally would in a debugging session.  In this case you can either &lt;strong&gt;Step In&lt;/strong&gt; to the line of code above, or you can&lt;strong&gt; double-click one of the frames&lt;/strong&gt; in the Call Stack Window.   For this case, we'll step in (&lt;strong&gt;F11&lt;/strong&gt;).&lt;/p&gt; &lt;p&gt;The first time you step into code, we'll be presented with the EULA for accessing the source code.  Please take the time to read this EULA.  If you agree to the terms of the EULA, hit ACCEPT, and the source will then be downloaded.&lt;/p&gt; &lt;p&gt;That's it! You're now debugging .NET Framework Source!&lt;/p&gt; &lt;p&gt;&lt;a linkindex="40" href="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_16.png" mce_href="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_16.png"&gt;&lt;img style="border-width: 0px;" alt="Debugging Form.cs in Windows Forms" src="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_thumb_7.png" mce_src="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_thumb_7.png" border="0" height="484" width="542" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Now, for each assembly that you'd like to debug into just repeat the steps above (note you'll only see the EULA &lt;em&gt;once&lt;/em&gt;, not for each file).&lt;/p&gt; &lt;p&gt;There are times when the Assembly you'd like to debug into isn't on the call stack, for example in the code below:&lt;/p&gt; &lt;p&gt;&lt;a linkindex="41" href="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_18.png" mce_href="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_18.png"&gt;&lt;img style="border-width: 0px;" alt="image" src="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_thumb_8.png" mce_src="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_thumb_8.png" border="0" height="100" width="729" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Before you step in to &lt;strong&gt;Graphics.DrawRectangle&lt;/strong&gt;, you need to get the symbols for &lt;strong&gt;System.Drawing.Dll&lt;/strong&gt; loaded.  To do this, we use the &lt;strong&gt;Modules Window&lt;/strong&gt; (&lt;strong&gt;CTRL+ALT+U&lt;/strong&gt;).  This lists all of the modules (DLLs) loaded by the debuggee.  Just find &lt;strong&gt;System.Drawing.DLL&lt;/strong&gt; in this list, &lt;strong&gt;right click&lt;/strong&gt;, and choose &lt;strong&gt;Load Symbols&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;&lt;a linkindex="42" href="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_22.png" mce_href="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_22.png"&gt;&lt;img style="border-width: 0px;" alt="Load via Modules Window" src="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_thumb_10.png" mce_src="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_thumb_10.png" border="0" height="208" width="859" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Note that once a symbol file is loaded, the path to the symbol file shows up in the "Symbol File" column. &lt;/p&gt; &lt;p&gt;You can now step into the Graphics.DrawRectangle code above using F11!  In this case, note, you'll have to step through the PaintEventArgs.Graphics property code first.&lt;/p&gt; &lt;h4&gt;ADVANCED USERS&lt;/h4&gt; &lt;p&gt;Normally, each time you launch a debugging session, Visual Studio attempt to download symbols for each DLL that loads into the debuggee process.  As part of this process, it asks each path specified in the Debugging Symbols dialog for the corresponding PDB.  Some projects load a LOT of DLLs which won't have symbols available, so this process can significantly impact debugger startup time as this probing occurs.  It is mainly for this reason we've recommended manual symbol loading in the steps above; we don't want using this feature to degrade the debugging experience across-the-board.&lt;/p&gt; &lt;p&gt;There is, however, a way to allow automatic symbol loading (which avoids the "Load Symbols" step) in a way that minimizes performance impact.   This is for more advanced users because it requires regular trips back to this Debugging Symbols Dialog.  Note you can quickly get to this dialog by choosing the "&lt;strong&gt;Symbol Settings...&lt;/strong&gt;" item on the right click menus pictured in steps above form the Call Stack or Modules windows.&lt;/p&gt; &lt;p&gt;The key is to get all of the symbols for a given project type downloaded and cached locally, then turn off the automatic symbol downloads.  This will prevent the pings at debugger startup as well.&lt;/p&gt; &lt;p&gt;To do this, configure your setup as above with the following difference: &lt;strong&gt;Uncheck the&lt;/strong&gt; "&lt;strong&gt;Search from the above locations..."&lt;/strong&gt; item on the dialog.&lt;/p&gt; &lt;p&gt;Now, launch your project in the debugger.  This will cause all of the symbols available for the DLLs in your process to be downloaded at on-demand as the DLLs are loaded into the process.  Depending on your connection speed, this could take a while (it's generally about 50MB of symbols), so it's a good idea to hit F5 then go do something else for a while.  Again, these symbols are cached so this is a one-time cost.  Visual Studio will likely be unresponsive during this download process.&lt;/p&gt; &lt;p&gt;&lt;a linkindex="43" href="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_26.png" mce_href="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_26.png"&gt;&lt;img style="border-width: 0px;" alt="image" src="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_thumb_12.png" mce_src="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_thumb_12.png" border="0" height="437" width="758" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Once that process has completed, stop the debugger, and UNCHECK the the Reference Source Server symbol location, and hit OK:&lt;/p&gt; &lt;p&gt;&lt;a set="yes" linkindex="44" href="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_28.png" mce_href="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_28.png"&gt;&lt;img style="border-width: 0px;" alt="image" src="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_thumb_13.png" mce_src="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_thumb_13.png" border="0" height="442" width="761" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Now when you launch the debugger, symbols will load automatically and you'll be be able to step in and through call stacks normally.  Note if you switch to a different project type (that has different assemblies), or have assemblies that are loaded later by your project, you can just repeat these steps to get any assemblies you don't have cached locally).  &lt;/p&gt;&lt;a class="" title="faq" name="faq"&gt;&lt;/a&gt; &lt;h4&gt;FAQ/TROUBLESHOOTING&lt;/h4&gt; &lt;h5&gt;1) Which assemblies are currently available for symbol/source loading:&lt;/h5&gt; &lt;ul&gt;&lt;li&gt;Mscorlib.DLL &lt;/li&gt;&lt;li&gt;System.DLL &lt;/li&gt;&lt;li&gt;System.Data.DLL &lt;/li&gt;&lt;li&gt;System.Drawing.DLL &lt;/li&gt;&lt;li&gt;System.Web.DLL &lt;/li&gt;&lt;li&gt;System.Web.Extensions.DLL &lt;/li&gt;&lt;li&gt;System.Windows.Forms.DLL &lt;/li&gt;&lt;li&gt;System.XML.DLL &lt;/li&gt;&lt;li&gt;WPF (UIAutomation*.dll, System.Windows.DLL, System.Printing.DLL, System.Speech.DLL, WindowsBase.DLL, WindowsFormsIntegration.DLL, Presentation*.dll, some others) &lt;/li&gt;&lt;li&gt;Microsoft.VisualBasic.DLL &lt;/li&gt;&lt;/ul&gt; &lt;h5&gt;2) When I choose "Load Symbols" I get an Open File dialog asking for the PDB.&lt;/h5&gt; &lt;p&gt;This can be caused by one of four situations:&lt;/p&gt; &lt;ul&gt;&lt;li&gt;You didn't configure the symbol location URL properly from basic setup above.  Ensure it's &lt;strong&gt;http://referencesource.microsoft.com/symbols&lt;/strong&gt;. &lt;/li&gt;&lt;li&gt;You chose a cache symbols directory that your user account doesn't have write permissions for. &lt;/li&gt;&lt;li&gt;You attempted to Load Symbols for a DLL that's not available in the list above &lt;/li&gt;&lt;li&gt;You have a different version of the .NET Framework on your machine - this can happen, for example, if you're running a Windows Server 2008 Beta.  To check this, go to the Modules Window in Visual Studio (CTRL+ALT+U) and ensure that the version number of your mscorlib.dll is 2.0.50727.1433, as below.  If not, make sure you install the &lt;a linkindex="45" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=333325fd-ae52-4e35-b531-508d977d32a6&amp;amp;displaylang=en" target="_blank" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=333325fd-ae52-4e35-b531-508d977d32a6&amp;amp;displaylang=en"&gt;RTM Version of the .NET Framework 3.5&lt;/a&gt;. &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="46" href="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image61.png" mce_href="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image61.png"&gt;&lt;img style="border-width: 0px;" alt="" src="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image61_thumb.png" mce_src="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image61_thumb.png" border="0" height="82" width="472" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;ul&gt;&lt;li&gt;Check your "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE" (or wherever you installed VS) for a file called &lt;strong&gt;symsrv.no&lt;/strong&gt;.  If that file exists, rename it to &lt;strong&gt;symsrv.yes&lt;/strong&gt;, and restart Visual Studio.  &lt;/li&gt;&lt;/ul&gt; &lt;h5&gt;3) When I try to open or step into a source code file, I get a dialog that says "Source is not available for this location" or I get an Open File dialog for the file.&lt;/h5&gt; &lt;p&gt;First, see FAQ item (2) above to ensure the symbols for the DLL were loaded successfully.  You can verify this by looking in the Modules Window under the "Symbols Status" column.&lt;/p&gt; &lt;p&gt;If the Symbols Status is "Symbols loaded.", check the following.&lt;/p&gt; &lt;ul&gt;&lt;li&gt;If you have configured &lt;a linkindex="47" href="http://www.microsoft.com/whdc/devtools/debugging/debugstart.mspx" target="_blank" mce_href="http://www.microsoft.com/whdc/devtools/debugging/debugstart.mspx"&gt;Microsoft Symbol Server&lt;/a&gt; in the past, you may have already downloaded symbols for this DLL that don't contain source information.  Try specifying a different cache path or deleting your existing cache path, and then repeating the Load Symbols command.   See FAQ #4 for more information on this. &lt;/li&gt;&lt;li&gt;Ensure you have checked the "&lt;strong&gt;Enable Source Server&lt;/strong&gt;" item on the &lt;strong&gt;Tools -&gt; Options -&gt; Debugging -&gt; General&lt;/strong&gt; page &lt;/li&gt;&lt;li&gt;Ensure that your account has read/write access to your cache path &lt;/li&gt;&lt;/ul&gt; &lt;h5&gt;4) I also use &lt;a linkindex="48" href="http://www.microsoft.com/whdc/devtools/debugging/debugstart.mspx" target="_blank" mce_href="http://www.microsoft.com/whdc/devtools/debugging/debugstart.mspx"&gt;Microsoft Symbol Server&lt;/a&gt; to download symbols.  What's the difference? Can these two programs co-exist?&lt;/h5&gt; &lt;p&gt;Microsoft Symbol Server provides symbols without any source information in them.  That information has been removed (sometimes referred to as "stripped") before publishing.  The symbols provided on the Reference Source Server are full symbols with debugging information.&lt;/p&gt; &lt;p&gt;The key to using both is to have your Reference Source path above the Symbol Server Path so that those symbols are searched/found first.  As described in the ADVANCED USERS section above, you'll likely want to launch your debugger once with this configuration to get all the symbols downloaded, then uncheck both of these paths to avoid debugging launch slowdowns in the future.  Also note that this may conflict in the future as more DLLs are added to the Reference Source Project.  Meaning, if you've already downloaded the Symbol Server symbol, you'll need to delete that or change your cache path to get the Reference Source one (Visual Studio has no way of knowing which is which).&lt;/p&gt; &lt;p&gt;&lt;a linkindex="49" href="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_32.png" mce_href="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_32.png"&gt;&lt;img style="border-width: 0px;" alt="image" src="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_thumb_15.png" mce_src="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_thumb_15.png" border="0" height="374" width="644" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;One final note here, if you have the Microsoft Symbol Server configured via _NT_SYMBOL_PATH, you'll need to add the Reference Source path above to that path as well - _NT_SYMBOL_PATH overrides the above settings.&lt;/p&gt; &lt;h5&gt;5) Does this work with 64-bit?&lt;/h5&gt; &lt;p&gt;Yes, we've also provided 64-bit versions of the PDBs.  Note some DLLs work on multiple architectures, so not all of them need a separate 64-bit PDB.&lt;/p&gt; &lt;h5&gt;6) How do I set breakpoints in Framework code?&lt;/h5&gt; &lt;p&gt;Visual Studio requires the code to exactly match what is expected by the PDB.  The source publishing process, however, makes some small updates to the code, such as pushing a standard copyright banner to the end of the source file.  This changes the signature (CRC) of the code file.  However, it's still easy to set a breakpoint.  &lt;/p&gt; &lt;p&gt;Just set your breakpoint as normal (you'll see it fails with a little warning icon), then right click the breakpoint and choose "Location..."&lt;/p&gt; &lt;p&gt;&lt;a set="yes" linkindex="50" href="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_34.png" mce_href="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_34.png"&gt;&lt;img style="border-width: 0px;" alt="image" src="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_thumb_16.png" mce_src="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_thumb_16.png" border="0" height="244" width="807" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Then check the "Allow Source to be Different" box, hit OK.&lt;/p&gt; &lt;p&gt;&lt;a linkindex="51" href="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_36.png" mce_href="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_36.png"&gt;&lt;img style="border-width: 0px;" alt="image" src="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_thumb_17.png" mce_src="http://blogs.msdn.com/blogfiles/sburke/WindowsLiveWriter/ConfiguringVisual.NETFrameworkSourceCode_9B9C/image_thumb_17.png" border="0" height="233" width="598" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Now the breakpoint will set successfully.&lt;/p&gt; &lt;p&gt;If you find yourself doing this often, you can also disable source matching in general by disabling Tools-&gt;Options-&gt;Debugging: “Require source files to exactly match the original version.” &lt;/p&gt; &lt;h5&gt;7) Why don't some features like "Go To Definition" work?&lt;/h5&gt; &lt;p&gt;Browse database information is separate from symbol (PDB) information within the debugger, so that information is maintained by the project system when a project is compiled and is not present within the symbol files.  So, unfortunately, that ability is not available here.&lt;/p&gt; &lt;h5&gt;8) Why are some member or local variables unavailable?  Why can't I step into certain functions or lines of code?&lt;/h5&gt; &lt;p&gt;The .NET Framework bits that you have installed on your machine are “retail” bits, which means they are optimized for size and performance.  Part of this optimization process removes certain information from the process when it is no longer needed.  Debugging retail assemblies reflects this.  However, most debugging information is still present in the session, and setting breakpoints earlier in a function often allows it to be visible.   Another aspect of retail builds is that some small methods may be “inlined” which means you will not be able to step into them or set breakpoints in them.  But for the most part you can step and debug as normal.&lt;/p&gt; &lt;h5&gt;9) Why does it take so long to download some source files?&lt;/h5&gt; &lt;p&gt;Some source files are very large - nearly 1MB - and unfortunately many of these are the common ones to download.  However, most are significantly smaller and download quickly.  Source files must be downloaded each time you restart Visual Studio.  They are not persistently cached like symbols are.&lt;/p&gt; &lt;h5&gt;10) Can I just download all of the code at once?&lt;/h5&gt; &lt;p&gt;Not currently, but we are currently working on enabling this functionality in the future. &lt;/p&gt; &lt;h5&gt;11) When I debug into VB code, for example in Microsoft.VisualBasic.dll, there is a C# style comment at the bottom, is this a bug?&lt;/h5&gt; &lt;p&gt;Not really - we do run a post processing step when publishing the code and it adds a standard copyright banner at the bottom.  The processor, at this time, isn't able to support multiple comment formats.  Having it in a non-VB format doesn't affect the debugging functionality in any way.&lt;/p&gt; &lt;h5&gt;12) I got to a source file and all that downloaded was a blank file?&lt;/h5&gt; &lt;p&gt;This is something we've seen intermittently but have not been able to diagnose.  If you see this, usually the workaround is to just restart VS, which will force the file to reload.  If you observe this behavior, please use the "Email" link on the left to email me the name of the file that failed and about what time the failure occurred.&lt;/p&gt; &lt;h5&gt;13) What happens if I download a Hotfix or a Service Pack?  Will I be able to get source for that?&lt;/h5&gt; &lt;p&gt;We've built a system that allows us to publish any number of versions of source and symbols for a given product.  We haven't made any firm decisions on how often we'll publish source and are open to customer feedback on those issues.  For example, it's clear that publishing source for each Service Pack makes sense, but it's unclear if we'll be able to do so for each Hotfix.  Again, we're looking forward to feedback here.&lt;/p&gt; &lt;p&gt;In the meantime, also note that symbol files may no longer match a module if a framework DLL has been updated via a Hotfix. In those cases, the modules window will indicate that the symbols could not be downloaded for that module. Assuming a new symbol file was published, it can be downloaded and cached using “Load Symbols”.&lt;/p&gt; &lt;h5&gt;14) Can I point a web browser at the symbols URL and download the symbols directly?&lt;/h5&gt; &lt;p&gt;No, you'll get an &lt;strong&gt;HTTP 400 (Bad Request)&lt;/strong&gt; response.&lt;/p&gt; &lt;h5&gt;SUPPORT &lt;/h5&gt; &lt;p&gt;If you have any other questions, please visit our new MSDN Forum on the topic: &lt;a set="yes" linkindex="52" href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=2019&amp;amp;SiteID=1" target="_blank" mce_href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=2019&amp;amp;SiteID=1"&gt;Reference Source Server Discussion&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Thanks!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1204687399787349866-5817766487712087979?l=luckyrainy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://blogs.msdn.com/sburke/archive/2008/01/16/configuring-visual-studio-to-debug-net-framework-source-code.aspx' title='Configuring Visual Studio to Debug .NET Framework Source Code'/><link rel='replies' type='application/atom+xml' href='http://luckyrainy.blogspot.com/feeds/5817766487712087979/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1204687399787349866&amp;postID=5817766487712087979' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1204687399787349866/posts/default/5817766487712087979'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1204687399787349866/posts/default/5817766487712087979'/><link rel='alternate' type='text/html' href='http://luckyrainy.blogspot.com/2008/01/configuring-visual-studio-to-debug-net.html' title='Configuring Visual Studio to Debug .NET Framework Source Code'/><author><name>Rainy</name><uri>http://www.blogger.com/profile/03486079127440003099</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1204687399787349866.post-5186874060992142670</id><published>2008-01-13T17:38:00.000-08:00</published><updated>2008-01-13T17:40:04.439-08:00</updated><title type='text'>SQL Server 2005 Remote Connectivity Issue TroubleShoot</title><content type='html'>&lt;h2&gt;SQL Server 2005 Remote Connectivity Issue TroubleShoot&lt;/h2&gt;   &lt;p&gt;With shipping SQL Server 2005, we heard from customer feedback about suffering make successful remote connection against SQL 2k5, plus, if running SQL Server on XP/WIN2K3/VISTA behind firewall, such problem occurs more frequently and harder for customer to get clue of behind reason.&lt;/p&gt; &lt;p&gt;&lt;span style="background-color: rgb(127, 255, 212);"&gt;I. Background of remote connectivity issue.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;The reason we saw the issue comes out w/ SQL 2k5 instead of SQL 2k is because two breaking change in SQL 2k5 compared to SQL 2000.&lt;/p&gt; &lt;p&gt;1) Network Protocols Off by Default: In order to make system secure, we limit connectivity when a user install SQL 2k5, thereby reducing surface area for attack. By default, SQL server (SQLEXPR, SQLDEV and EVAL SKUs), on installation will listen only on Shared memory and local-only Named Pipe. TCP and remote Named Pipe will be off-by-default. VIA will also be off-by-default; SQL server (SQLENT, STANDARD and Workgroup SKUs), on installation will listen only on Shared memory, local-only Named Pipe and TCP. Remote Named Pipe will be off-by-default. VIA will also be off-by-default.&lt;/p&gt; &lt;p&gt;Therefore, when you mae remote connection, you should make sure at least either Named Pipe or TCP are enabled in your remote SQL instance.&lt;/p&gt; &lt;p&gt;2) SQL Browser service: which is a replacement of SSRP system in SQL Server 2000, run as a Windows Service on installation of SQL 2k5. Upon startup, SQL Server Browser starts and claims UDP port 1434. When SQL Server 2000 and SQL Server 2005 clients request SQL Server resources, the client network library sends a UDP message to the server using port 1434. SQL Server Browser responds with the TCP/IP port or named pipe of the requested instance.&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Therefore, you need to make sure SQL Browser is enabled and started when remote client ask for which tcp port or pipe name SQL Server is listening on. If your remote SQL Instance is a default instance, you do not necessary enable sql browser since client would always try default TCP port 1433 and pipe name &lt;a href="file://%3cremoterserver%3e/pipe/sql/query"&gt;\\&lt;remoterserver&gt;\pipe\sql\query&lt;/a&gt;. But, if you have SQL 2k5 named instance installed or SQL 2000 and SQL 2k5 side by side installed, you must enable and start sqlbrowser.&lt;/p&gt; &lt;p&gt;&lt;span style="background-color: rgb(127, 255, 212);"&gt;II. Problem list:&lt;/span&gt;&lt;/p&gt; &lt;p&gt;By understanding background 1) and 2), I belive you can imagine issues you may face when make remote connection against SQL 2k5:&lt;/p&gt; &lt;p&gt;1) Fail to connect over TCP/IP or Named Pipe if  the request protocol was not enabled. &lt;/p&gt; &lt;p&gt;2) Fail to connect over TCP/IP or Named Pipe if Firewall enabled on the remote server and tcp port or "File and Printer Sharing"  is not added to the Firewall exception list.&lt;/p&gt; &lt;p&gt;3) Fail to connect to remote sql named instance if SQL Browser was not enabled or UDP port 1434 that browser listening on is added to the Firewall exception list.&lt;/p&gt; &lt;p&gt;&lt;span style="background-color: rgb(127, 255, 212);" &gt;III. Troubleshooting Tips:&lt;/span&gt;&lt;/p&gt; &lt;p&gt;Assumption: your SQL Server was installed on remote server and behind firewall; SQL Instance was started; and  your client app specify correct remote sql instance name.&lt;/p&gt; &lt;p&gt;&lt;u&gt;&lt;strong&gt;On your server side:&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt; &lt;p&gt;[1] Enable remote named pipe or tcp: All programs | Microsoft SQL Server 2005| Configuration Tools | SQL Server Surface Area Configuration | Configuration for Services and Connections | Remote Connections, choose either enable TCP or Named Pipe or both.&lt;/p&gt; &lt;p&gt;[2] Sql Instance was restarted successfully, check Server ErrorLog, find which tcp port or pipe name server is listening on.&lt;/p&gt; &lt;p&gt;[3] netstate -ano | findstr &lt;portnumber&gt; if server enable TCP, and make sure server is listening on the correct port.&lt;/p&gt; &lt;p&gt;[4] go to services.msc, find service "SQL Server Browser", enable it and restarted, also, go to SQL Server Configuration Manager, check properties for SQL Browser service, in Advanced tab, make sure it is active.&lt;/p&gt; &lt;p&gt;[5] Enable "Fire and Printer Sharing" in Firewall exception list.&lt;/p&gt; &lt;p&gt;[6] Add TCP port or sqlservr.exe to Firewall exception list, either add "..\Binn\sqlsevr.exe" or add port.&lt;/p&gt; &lt;p&gt;If your server was not started successfully by any reason, it is very helpful to collect info from server logs; also, you can get clear picture of protocols that server is listening on, for eg, if TCP was enabled, you should be able to see which port server is listening on, and if Np was enabled, you can make connection throgh the pipe name.&lt;/p&gt; &lt;p&gt;[7] Add Sql Browser service to Firewall exception list, you can either add program " C:\Program Files\Microsoft SQL Server\90\Shared\sqlbrowser.exe" or add UDP port 1434.&lt;/p&gt; &lt;p&gt;[8] Make sure if your remote sql Server Instance is a default instance, it must listen on tcp port 1433 and pipe &lt;a href="file://./pipe/sql/query" mce_href="file://\\.\pipe\sql\query"&gt;\\.\pipe\sql\query&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;&lt;u&gt;&lt;strong&gt;On your Client Side:&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt; &lt;p&gt;[1] ping &lt;remote&gt; return correct IP address of your remote server.&lt;/p&gt; &lt;p&gt;[2] telnet &lt;remoteserver&gt; &lt;portnumber&gt; works, &lt;portnumber&gt; is the port that your remote sql instance is listening on.&lt;/p&gt; &lt;p&gt;     telnet &lt;&gt; &lt;port&gt; works&lt;/p&gt; &lt;p&gt;[3] \\&lt;remoteserver&gt;, make sure you can access share of remote server.&lt;/p&gt; &lt;p&gt;[4] Go to SQL Server Configuration Manager | SQL Native Client Configuration | Client Protocols, make sure Named pipe or tcp is enabled; Click properties of Client Protocols, make Sure you see at least Np or tcp is in enabled protocols, plus, recommend put TCP on the top of the order.&lt;/p&gt; &lt;p&gt;[5] If you are using MDAC ( Driver={SQL Server} or SQLOLEDB.x) in your client application, in command line, tyep "cliconfg.exe", also enable NP and TCP and put TCP on top of order.&lt;/p&gt; &lt;p&gt;[6] Use osql or sqlcmd to try " osql /S&lt;remoteserver&gt; /E" or "osql /S&lt;remoteserver&gt;\&lt;instancename&gt; /E" see whether connection works. &lt;/p&gt; &lt;p&gt;[7] Check your client connection string syntax: a. do you specify correct remote server name? b. do you specify correct instance name? if remote sql is default instance, you just need to specify remote server machine name, otherwise, you need to specify " &lt;remoteserver&gt;\&lt;instancename&gt;" c. do you  spcify tcp port or pipe name in your connection string, if so, double check the port and pipe name are the one server is listening on, otherwise, remove it.&lt;/p&gt; &lt;p&gt;[8] If your client app connect to remote server using server alias name, a. if you are using MDAC, try "cliconfg.exe", in "Alias" Tab, check whether you specify any alias in which the tcp port or the pipe name should be the one remote server is listening on; b. if you are using SQL Native Client, go to SQL Server Configuration Manager, check "Aliases" configuration.&lt;/p&gt; &lt;p&gt;If you are sure the network protocol configuration for remote connection are all correct by going through above checklist, and still face specific problem, pleas refer following blog that give troubleshooting tips based on concrete error message:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/sql_protocols/archive/2005/10/22/483684.aspx" mce_href="http://blogs.msdn.com/sql_protocols/archive/2005/10/22/483684.aspx"&gt;http://blogs.msdn.com/sql_protocols/archive/2005/10/22/483684.aspx&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/sql_protocols/archive/2005/10/29/486861.aspx" mce_href="http://blogs.msdn.com/sql_protocols/archive/2005/10/29/486861.aspx"&gt;http://blogs.msdn.com/sql_protocols/archive/2005/10/29/486861.aspx&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/sql_protocols/archive/2005/12/22/506607.aspx" mce_href="http://blogs.msdn.com/sql_protocols/archive/2005/12/22/506607.aspx"&gt;http://blogs.msdn.com/sql_protocols/archive/2005/12/22/506607.aspx&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/sql_protocols/archive/2006/03/23/558651.aspx" mce_href="http://blogs.msdn.com/sql_protocols/archive/2006/03/23/558651.aspx"&gt;http://blogs.msdn.com/sql_protocols/archive/2006/03/23/558651.aspx&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1204687399787349866-5186874060992142670?l=luckyrainy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://blogs.msdn.com/sql_protocols/archive/2006/09/30/SQL-Server-2005-Remote-Connectivity-Issue-TroubleShooting.aspx' title='SQL Server 2005 Remote Connectivity Issue TroubleShoot'/><link rel='replies' type='application/atom+xml' href='http://luckyrainy.blogspot.com/feeds/5186874060992142670/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1204687399787349866&amp;postID=5186874060992142670' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1204687399787349866/posts/default/5186874060992142670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1204687399787349866/posts/default/5186874060992142670'/><link rel='alternate' type='text/html' href='http://luckyrainy.blogspot.com/2008/01/sql-server-2005-remote-connectivity.html' title='SQL Server 2005 Remote Connectivity Issue TroubleShoot'/><author><name>Rainy</name><uri>http://www.blogger.com/profile/03486079127440003099</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1204687399787349866.post-9146633276414643068</id><published>2007-12-30T22:24:00.000-08:00</published><updated>2007-12-30T22:42:57.736-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='数据库'/><title type='text'>SQL常用字符串函数</title><content type='html'>&lt;p&gt;&lt;strong&gt;一、字符转换函数&lt;br /&gt;&lt;/strong&gt;1、ASCII()&lt;br /&gt;返回字符表达式最左端字符的ASCII 码值。在ASCII（）函数中，纯数字的字符串可不用‘’括起来，但含其它字符的字符串必须用‘’括起来使用，否则会出错。&lt;br /&gt;2、CHAR()&lt;br /&gt;将ASCII 码转换为字符。如果没有输入0 ~ 255 之间的ASCII 码值，CHAR（） 返回NULL 。&lt;br /&gt;3、LOWER()和UPPER()&lt;br /&gt;LOWER()将字符串全部转为小写；UPPER()将字符串全部转为大写。&lt;br /&gt;4、STR()&lt;br /&gt;把数值型数据转换为字符型数据。&lt;br /&gt;STR (&lt;float_expression&gt;[，length[， &lt;decimal&gt;]])&lt;br /&gt;length 指定返回的字符串的长度，decimal 指定返回的小数位数。如果没有指定长度，缺省的length 值为10， decimal 缺省值为0。&lt;br /&gt;当length 或者decimal 为负值时，返回NULL；&lt;br /&gt;当length 小于小数点左边（包括符号位）的位数时，返回length 个*；&lt;br /&gt;先服从length ，再取decimal ；&lt;br /&gt;当返回的字符串位数小于length ，左边补足空格。&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/decimal&gt;&lt;/float_expression&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;二、去空格函数&lt;br /&gt;&lt;/strong&gt;1、LTRIM() 把字符串头部的空格去掉。&lt;br /&gt;&lt;br /&gt;2、RTRIM() 把字符串尾部的空格去掉。&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;三、取子串函数&lt;/strong&gt;&lt;br /&gt;1、left()&lt;br /&gt;LEFT (&lt;character_expression&gt;， &lt;integer_expression&gt;)&lt;br /&gt;返回character_expression 左起 integer_expression 个字符。&lt;br /&gt;&lt;br /&gt;2、RIGHT()&lt;br /&gt;RIGHT (&lt;character_expression&gt;， &lt;integer_expression&gt;)&lt;br /&gt;返回character_expression 右起 integer_expression 个字符。&lt;br /&gt;&lt;br /&gt;3、SUBSTRING()&lt;br /&gt;SUBSTRING (&lt;expression&gt;， &lt;starting_&gt;， length)&lt;br /&gt;返回从字符串左边第starting_ position 个字符起length个字符的部分。&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;四、字符串比较函数&lt;/strong&gt;&lt;br /&gt;1、CHARINDEX()&lt;br /&gt;返回字符串中某个指定的子串出现的开始位置。&lt;br /&gt;CHARINDEX (&lt;’substring_expression’&gt;， &lt;expression&gt;)&lt;br /&gt;其中substring _expression 是所要查找的字符表达式，expression 可为字符串也可为列名表达式。如果没有发现子串，则返回0 值。&lt;br /&gt;此函数不能用于TEXT 和IMAGE 数据类型。&lt;/expression&gt;&lt;/starting_&gt;&lt;/expression&gt;&lt;/integer_expression&gt;&lt;/character_expression&gt;&lt;/integer_expression&gt;&lt;/character_expression&gt;&lt;/p&gt; &lt;p&gt;2、PATINDEX()&lt;br /&gt;返回字符串中某个指定的子串出现的开始位置。&lt;br /&gt;PATINDEX (&lt;’%substring _expression%’&gt;， &lt;column_&gt;)其中子串表达式前后必须有百分号“%”否则返回值为0。&lt;br /&gt;与CHARINDEX 函数不同的是，PATINDEX函数的子串中可以使用通配符，且此函数可用于CHAR、 VARCHAR 和TEXT 数据类型。&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;五、字符串操作函数&lt;/strong&gt;&lt;br /&gt;1、QUOTENAME()&lt;br /&gt;返回被特定字符括起来的字符串。&lt;br /&gt;QUOTENAME (&lt;’character_expression’&gt;[， quote_ character]) 其中quote_ character 标明括字符串所用的字符，缺省值为“[]”。&lt;/column_&gt;&lt;/p&gt; &lt;p&gt;2、REPLICATE()&lt;br /&gt;返回一个重复character_expression 指定次数的字符串。&lt;br /&gt;REPLICATE (character_expression integer_expression) 如果integer_expression 值为负值，则返回NULL 。&lt;br /&gt;&lt;br /&gt;3、REVERSE()&lt;br /&gt;将指定的字符串的字符排列顺序颠倒。&lt;br /&gt;REVERSE (&lt;character_expression&gt;) 其中character_expression 可以是字符串、常数或一个列的值。&lt;br /&gt;&lt;br /&gt;4、REPLACE()&lt;br /&gt;返回被替换了指定子串的字符串。&lt;br /&gt;REPLACE (&lt;string_expression1&gt;， &lt;string_expression2&gt;， &lt;string_expression3&gt;) 用string_expression3 替换在string_expression1 中的子串string_expression2。&lt;br /&gt;&lt;br /&gt;4、SPACE()&lt;br /&gt;返回一个有指定长度的空白字符串。&lt;br /&gt;SPACE (&lt;integer_expression&gt;) 如果integer_expression 值为负值，则返回NULL 。&lt;br /&gt;&lt;br /&gt;5、STUFF()&lt;br /&gt;用另一子串替换字符串指定位置、长度的子串。&lt;br /&gt;STUFF (&lt;character_expression1&gt;， &lt;start_&gt;， &lt;length&gt;，&lt;character_expression2&gt;)&lt;br /&gt;如果起始位置为负或长度值为负，或者起始位置大于character_expression1 的长度，则返回NULL 值。&lt;br /&gt;如果length 长度大于character_expression1 中 start_ position 以右的长度，则character_expression1 只保留首字符。&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/character_expression2&gt;&lt;/length&gt;&lt;/start_&gt;&lt;/character_expression1&gt;&lt;/integer_expression&gt;&lt;/string_expression3&gt;&lt;/string_expression2&gt;&lt;/string_expression1&gt;&lt;/character_expression&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;六、数据类型转换函数&lt;br /&gt;&lt;/strong&gt;1、CAST()&lt;br /&gt;CAST (&lt;expression&gt; AS &lt;data_&gt;[ length ])&lt;br /&gt;&lt;br /&gt;2、CONVERT()&lt;br /&gt;CONVERT (&lt;data_&gt;[ length ]， &lt;expression&gt; [， style])&lt;br /&gt;&lt;br /&gt;1）data_type为SQL Server系统定义的数据类型，用户自定义的数据类型不能在此使用。&lt;br /&gt;2）length用于指定数据的长度，缺省值为30。&lt;br /&gt;3）把CHAR或VARCHAR类型转换为诸如INT或SAMLLINT这样的INTEGER类型、结果必须是带正号或负号的数值。&lt;br /&gt;4）TEXT类型到CHAR或VARCHAR类型转换最多为8000个字符，即CHAR或VARCHAR数据类型是最大长度。&lt;br /&gt;5）IMAGE类型存储的数据转换到BINARY或VARBINARY类型，最多为8000个字符。&lt;br /&gt;6）把整数值转换为MONEY或SMALLMONEY类型，按定义的国家的货币单位来处理，如人民币、美元、英镑等。&lt;br /&gt;7）BIT类型的转换把非零值转换为1，并仍以BIT类型存储。&lt;br /&gt;8）试图转换到不同长度的数据类型，会截短转换值并在转换值后显示“+”，以标识发生了这种截断。&lt;br /&gt;9）用CONVERT（） 函数的style 选项能以不同的格式显示日期和时间。style 是将DATATIME 和SMALLDATETIME 数据转换为字符串时所选用的由SQL Server 系统提供的转换样式编号，不同的样式编号有不同的输出格式。&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/expression&gt;&lt;/data_&gt;&lt;/data_&gt;&lt;/expression&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;七、日期函数&lt;br /&gt;&lt;/strong&gt;1、day(date_expression)&lt;br /&gt;返回date_expression中的日期值&lt;br /&gt;&lt;br /&gt;2、month(date_expression)&lt;br /&gt;返回date_expression中的月份值&lt;br /&gt;&lt;br /&gt;3、year(date_expression)&lt;br /&gt;返回date_expression中的年份值&lt;br /&gt;&lt;br /&gt;4、DATEADD()&lt;br /&gt;DATEADD (&lt;datepart&gt;， &lt;number&gt;， &lt;date&gt;)&lt;br /&gt;返回指定日期date 加上指定的额外日期间隔number 产生的新日期。&lt;/date&gt;&lt;/number&gt;&lt;/datepart&gt;&lt;/p&gt; &lt;p&gt;5、DATEDIFF()&lt;br /&gt;DATEDIFF (&lt;datepart&gt;， &lt;date1&gt;， &lt;date2&gt;)&lt;br /&gt;返回两个指定日期在datepart 方面的不同之处，即date2 超过date1的差距值，其结果值是一个带有正负号的整数值。&lt;br /&gt;&lt;br /&gt;6、DATENAME()&lt;br /&gt;DATENAME (&lt;datepart&gt;， &lt;date&gt;)&lt;br /&gt;以字符串的形式返回日期的指定部分此部分。由datepart 来指定。&lt;br /&gt;&lt;br /&gt;7、DATEPART()&lt;br /&gt;DATEPART (&lt;datepart&gt;， &lt;date&gt;)&lt;br /&gt;以整数值的形式返回日期的指定部分。此部分由datepart 来指定。&lt;br /&gt;DATEPART (dd， date) 等同于DAY (date)&lt;br /&gt;DATEPART (mm， date) 等同于MONTH (date)&lt;br /&gt;DATEPART (yy， date) 等同于YEAR (date)&lt;br /&gt;&lt;br /&gt;8、GETDATE()&lt;br /&gt;以DATETIME 的缺省格式返回系统当前的日期和时间 &lt;/date&gt;&lt;/datepart&gt;&lt;/date&gt;&lt;/datepart&gt;&lt;/date2&gt;&lt;/date1&gt;&lt;/datepart&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1204687399787349866-9146633276414643068?l=luckyrainy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1204687399787349866/posts/default/9146633276414643068'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1204687399787349866/posts/default/9146633276414643068'/><link rel='alternate' type='text/html' href='http://luckyrainy.blogspot.com/2007/12/sql.html' title='SQL常用字符串函数'/><author><name>Rainy</name><uri>http://www.blogger.com/profile/03486079127440003099</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1204687399787349866.post-5009148801987744322</id><published>2007-12-28T00:05:00.000-08:00</published><updated>2007-12-30T22:40:27.683-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='软件架构'/><title type='text'>软件架构师，就是孔乙己</title><content type='html'>&lt;span style="font-weight: bold; color: rgb(0, 0, 0);font-family:arial;" &gt;软件架构师，就是孔乙己。&lt;br /&gt;&lt;br /&gt;什么是孔乙己？&lt;br /&gt;孔乙己是知道“回”字的四种写法的人。&lt;br /&gt;&lt;br /&gt;一个软件需求，技术方案会有多种可能，最后采用的，一定只有一种。如何在多种技术间权衡、糅合、选取，是软件架构师的职能。&lt;br /&gt;&lt;br /&gt;软件架构师不但要知道“回”字有四种写法，还要知道这四种“回”字该怎么写；不但要会写四种“回”字，还应该知道在什么情况下应该写哪种“回”字。&lt;br /&gt;&lt;br /&gt;这便是软件架构师之孔乙己说。 &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1204687399787349866-5009148801987744322?l=luckyrainy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1204687399787349866/posts/default/5009148801987744322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1204687399787349866/posts/default/5009148801987744322'/><link rel='alternate' type='text/html' href='http://luckyrainy.blogspot.com/2007/12/blog-post.html' title='软件架构师，就是孔乙己'/><author><name>Rainy</name><uri>http://www.blogger.com/profile/03486079127440003099</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1204687399787349866.post-8567282422299786232</id><published>2007-11-13T13:12:00.000-08:00</published><updated>2007-11-12T21:35:02.946-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='软件开发管理'/><title type='text'>软件开发管理的75条体会[转载]</title><content type='html'>&lt;div id="msgcns!A619225E845C8CF5!590" class="bvMsg"&gt;&lt;div&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;1. 你们的项目组使用源代码管理工具了么？&lt;/strong&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：应该用。VSS、CVS、PVCS、ClearCase、CCC/Harvest、FireFly都可以。我的选择是VSS。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;2. 你们的项目组使用缺陷管理系统了么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：应该用。ClearQuest太复杂，我的推荐是BugZilla。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;3. 你们的测试组还在用Word写测试用例么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：不要用Word写测试用例（Test Case）。应该用一个专门的系统，可以是Test Manager，也可以是自己开发一个ASP.NET的小网站。主要目的是Track和Browse。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;4. 你们的项目组有没有建立一个门户网站？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要有一个门户网站，用来放Contact Info、Baselined Schedule、News等等。推荐Sharepoint Portal Server 2003来实现，15分钟就搞定。买不起SPS 2003可以用WSS (Windows Sharepoint Service)。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;5. 你们的项目组用了你能买到最好的工具么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：应该用尽量好的工具来工作。比如，应该用VS.NET而不是Notepad来写C#。用Notepad写程序多半只是一种炫耀。但也要考虑到经费，所以说是“你能买到最好的”。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;6. 你们的程序员工作在安静的环境里么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：需要安静环境。这点极端重要，而且要保证每个人的空间大于一定面积。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;7. 你们的员工每个人都有一部电话么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：需要每人一部电话。而且电话最好是带留言功能的。当然，上这么一套带留言电话系统开销不小。不过至少每人一部电话要有，千万别搞得经常有人站起来喊：“某某某电话”。《人件》里面就强烈谴责这种做法。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;8. 你们每个人都知道出了问题应该找谁么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：应该知道。任何一个Feature至少都应该有一个Owner，当然，Owner可以继续Dispatch给其他人。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;9. 你遇到过有人说“我以为…”么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要消灭“我以为”。Never assume anything。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;10. 你们的项目组中所有的人都坐在一起么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：需要。我反对Virtual Team，也反对Dev在美国、Test在中国这种开发方式。能坐在一起就最好坐在一起，好处多得不得了。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;11. 你们的进度表是否反映最新开发进展情况？ &lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：应该反映。但是，应该用Baseline的方法来管理进度表：维护一份稳定的Schedule，再维护一份最新更改。Baseline的方法也应该用于其它的Spec。Baseline是变更管理里面的一个重要手段。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;12. 你们的工作量是先由每个人自己估算的么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：应该让每个人自己估算。要从下而上估算工作量，而不是从上往下分派。除非有其他原因，比如政治任务工期固定等。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;13. 你们的开发人员从项目一开始就加班么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：不要这样。不要一开始就搞疲劳战。从项目一开始就加班，只能说明项目进度不合理。当然，一些对日软件外包必须天天加班，那属于剥削的范畴。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;14. 你们的项目计划中Buffer Time是加在每个小任务后面的么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：不要。Buffer Time加在每个小任务后面，很容易轻易的就被消耗掉。Buffer Time要整段的加在一个Milestone或者checkpoint前面。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;15. 值得再多花一些时间，从95%做到100%好&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：值得，非常值得。尤其当项目后期人困马乏的时候，要坚持。这会给产品带来质的区别。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;  &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;16. 登记新缺陷时，是否写清了重现步骤？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要。这属于Dev和Test之间的沟通手段。面对面沟通需要，详细填写Repro Steps也需要。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;17. 写新代码前会把已知缺陷解决么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要。每个人的缺陷不能超过10个或15个，否则必须先解决老的bug才能继续写新代码。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;18. 你们对缺陷的轻重缓急有事先的约定么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：必须有定义。Severity要分1、2、3，约定好：蓝屏和Data Lost算Sev 1，Function Error算Sev 2，界面上的算Sev 3。但这种约定可以根据产品质量现状适当进行调整。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;19. 你们对意见不一的缺陷有三国会议么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：必须要有。要有一个明确的决策过程。这类似于CCB (Change Control Board)的概念。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;20. 所有的缺陷都是由登记的人最后关闭的么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：Bug应该由Opener关闭。Dev不能私自关闭Bug。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;21. 你们的程序员厌恶修改老的代码么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：厌恶是正常的。解决方法是组织Code Review，单独留出时间来。XP也是一个方法。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;22. 你们项目组有Team Morale Activity么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：每个月都要搞一次，吃饭、唱歌、Outing、打球、开卡丁车等等，一定要有。不要剩这些钱。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;23. 你们项目组有自己的Logo么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要有自己的Logo。至少应该有自己的Codename。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;24. 你们的员工有印有公司Logo的T-Shirt么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要有。能增强归属感。当然，T-Shirt要做的好看一些，最好用80支的棉来做。别没穿几次就破破烂烂的。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;25. 总经理至少每月参加次项目组会议&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要的。要让team member觉得高层关注这个项目。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;26. 你们是给每个Dev开一个分支么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：反对。Branch的管理以及Merge的工作量太大，而且容易出错。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;27. 有人长期不Check-In代码么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：不可以。对大部分项目来说，最多两三天就应该Check-In。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;28. 在Check-In代码时都填写注释了么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要写的，至少一两句话，比如“解决了Bug No.225”。如果往高处拔，这也算做“配置审计”的一部分。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;29. 有没有设定每天Check-In的最后期限？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要的，要明确Check-In Deadline。否则会Build Break。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;30. 你们能把所有源码一下子编译成安装文件吗？ &lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要的。这是每日编译（Daily Build）的基础。而且必须要能够做成自动的。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;  &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;31. 你们的项目组做每日编译么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：当然要做。有三样东西是软件项目/产品开发必备的：1. bug management; 2. source control; 3. daily build。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;32. 你们公司有没有积累一个项目风险列表？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要。Risk Inventory。否则，下个项目开始的时候，又只能拍脑袋分析Risk了。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;33. 设计越简单越好&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：越简单越好。设计时候多一句话，将来可能就带来无穷无尽的烦恼。应该从一开始就勇敢的砍。这叫scope management。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;34. 尽量利用现有的产品、技术、代码&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：千万别什么东西都自己Coding。BizTalk和Sharepoint就是 最好的例子，有这两个作为基础，可以把起点提高很多。或者可以尽量多用现成的Control之类的。或者尽量用XML，而不是自己去Parse一个文本文 件；尽量用RegExp，而不是自己从头操作字符串，等等等等。这就是“软件复用”的体现。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;35. 你们会隔一段时间就停下来夯实代码么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要。最好一个月左右一次。传言去年年初Windows组在Stevb的命令下停过一个月增强安全。Btw，“夯”这个字念“hang”，第一声。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;36. 你们的项目组每个人都写Daily Report么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要写。五分钟就够了，写10句话左右，告诉自己小组的人今天我干了什么。一则为了沟通，二则鞭策自己（要是游手好闲一天，自己都会不好意思写的）。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;37. 你们的项目经理会发出Weekly Report么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要。也是为了沟通。内容包括目前进度，可能的风险，质量状况，各种工作的进展等。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;38. 你们项目组是否至少每周全体开会一次？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要。一定要开会。程序员讨厌开会，但每个礼拜开会时间加起来至少应该有4小时。包括team meeting, spec review meeting, bug triage meeting。千万别大家闷头写code。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;39. 你们项目组的会议、讨论都有记录么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：会前发meeting request和agenda，会中有人负责主持和记录，会后有人负责发meeting minutes，这都是effective meeting的要点。而且，每个会议都要形成agreements和action items。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;40. 其他部门知道你们项目组在干什么么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要发一些Newsflash给整个大组织。Show your team’s value。否则，当你坐在电梯里面，其他部门的人问：“你们在干嘛”，你回答“ABC项目”的时候，别人全然不知，那种感觉不太好。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;41. 通过Email进行所有正式沟通&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：Email的好处是免得抵赖。但也要避免矫枉过正，最好的方法是先用电话和当面说，然后Email来确认。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;42. 为项目组建立多个Mailing Group&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：如果在AD+Exchange里面，就建Distribution List。比如，我会建ABC Project Core Team，ABC Project Dev Team，ABC Project All Testers，ABC Project Extended Team等等。这样发起Email来方便，而且能让该收到email的人都收到、不该收到不被骚扰。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;43. 每个人都知道哪里可以找到全部的文档么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：应该每个人都知道。这叫做知识管理（Knowledge Management）。最方便的就是把文档放在一个集中的File Share，更好的方法是用Sharepoint。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;44. 你做决定、做变化时，告诉大家原因了么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要告诉大家原因。Empower team member的手段之一是提供足够的information，这是MSF一开篇的几个原则之一。的确如此，tell me why是人之常情，tell me why了才能有understanding。中国人做事喜欢搞限制，限制信息，似乎能够看到某一份文件的人就是有身份的人。大错特错。权威、权力，不在于 是不是能access information/data，而在于是不是掌握资源。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;45. Stay agile and expect change&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要这样。需求一定会变的，已经写好的代码一定会被要求修改的。做好心理准备，对change不要抗拒，而是expect change。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;  &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;46. 你们有没有专职的软件测试人员？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要有专职测试。如果人手不够，可以peer test，交换了测试。千万别自己测试自己的。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;47. 你们的测试有一份总的计划来规定做什么和怎么做么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：这就是Test Plan。要不要做性能测试？要不要做Usability测试？什么时候开始测试性能？测试通过的标准是什么？用什么手段，自动的还是手动的？这些问题需要用Test Plan来回答。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;48. 你是先写&lt;span style="font-family:Verdana;"&gt;Test Case&lt;/span&gt;然后再测试的么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：应该如此。应该先设计再编程、先test case再测试。当然，事情是灵活的。我有时候在做第一遍测试的同时补上test case。至于先test case再开发，我不喜欢，因为不习惯，太麻烦，至于别人推荐，那试试看也无妨。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;49. 你是否会为各种输入组合创建测试用例？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：不要，不要搞边界条件组合。当心组合爆炸。有很多test case工具能够自动生成各种边界条件的组合——但要想清楚，你是否有时间去运行那么多test case。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;50. 你们的程序员能看到测试用例么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要。让Dev看到Test Case吧。我们都是为了同一个目的走到一起来的：提高质量。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;51. 你们是否随便抓一些人来做易用性测试？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要这么做。自己看自己写的程序界面，怎么看都是顺眼的。这叫做审美疲劳——臭的看久了也就不臭了，不方便的永久了也就习惯了。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;52. 你对自动测试的期望正确么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：别期望太高。依我看，除了性能测试以外，还是暂时先忘掉“自动测试”吧，忘掉WinRunner和LoadRunner吧。对于国内的软件测试的现状来说，只能“矫枉必须过正”了。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;53. 你们的性能测试是等所有功能都开发完才做的么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：不能这样。性能测试不能被归到所谓的“系统测试”阶段。早测早改正，早死早升天。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;54. 你注意到测试中的杀虫剂效应了么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：虫子有抗药性，Bug也有。发现的新Bug越来越少是正常的。这时候，最好大家交换一下测试的area，或者用用看其他工具和手法，就又会发现一些新bug了。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;55. 你们项目组中有人能说出产品的当前整体质量情况么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要有。当老板问起这个产品目前质量如何，Test Lead/Manager应该负责回答。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;56. 你们有单元测试么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：单元测试要有的。不过没有单元测试也不是不可以，我做过没有单元测试的项目，也做成功了——可能是侥幸，可能是大家都是熟手的关系。还是那句话，软件工程是非常实践、非常工程、非常灵活的一套方法，某些方法在某些情况下会比另一些方法好，反之亦然。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;57. 你们的程序员是写完代码就扔过墙的么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：大忌。写好一块程序以后，即便不做单元测试，也应该自己先跑一跑。虽然有了专门的测试人员，做开发的人也不可以一点测试都不做。微软还有Test Release Document的说法，程序太烂的话，测试有权踢回去。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;58. 你们的程序中所有的函数都有输入检查么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：不要。虽然说做输入检查是write secure code的要点，但不要做太多的输入检查，有些内部函数之间的参数传递就不必检查输入了，省点功夫。同样的道理，未必要给所有的函数都写注释。写一部分主要的就够了。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;59. 产品有统一的错误处理机制和报错界面么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要有。最好能有统一的error message，然后每个error message都带一个error number。这样，用户可以自己根据error number到user manual里面去看看错误的具体描述和可能原因，就像SQL Server的错误那样。同样，ASP.NET也要有统一的Exception处理。可以参考有关的Application Block。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;60. 你们有统一的代码书写规范么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要有。Code Convention很多，搞一份来发给大家就可以了。当然，要是有FxCop这种工具来检查代码就更好了。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;  &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;61. 你们的每个人都了解项目的商业意义么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要。这是Vision的意思。别把项目只当成工作。有时候要想着自己是在为中国 某某行业的信息化作先驱者，或者时不时的告诉team member，这个项目能够为某某某国家部门每年节省多少多少百万的纳税人的钱，这样就有动力了。平凡的事情也是可以有个崇高的目标的。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;62. 产品各部分的界面和操作习惯一致么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要这样。要让用户觉得整个程序好像是一个人写出来的那样。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;63. 有可以作为宣传亮点的Cool Feature么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要。这是增强团队凝聚力、信心的。而且，“一俊遮百丑”，有亮点就可以掩盖一些问题。这样，对于客户来说，会感觉产品从质量角度来说还是acceptable的。或者说，cool feature或者说亮点可以作为质量问题的一个事后弥补措施。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;64. 尽可能缩短产品的启动时间&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要这样。软件启动时间（Start-Up time）是客户对性能好坏的第一印象。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;65. 不要过于注重内在品质而忽视了第一眼的外在印象&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：程序员容易犯这个错误：太看重性能、稳定性、存储效率，但忽视了外在感受。而高层经理、客户正相反。这两方面要兼顾，协调这些是PM的工作。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;66. 你们根据详细产品功能说明书做开发么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要这样。要有设计才能开发，这是必须的。设计文档，应该说清楚这个产品会怎么运行，应该采取一些讲故事的方法。设计的时候千万别钻细节，别钻到数据库、代码等具体实现里面去，那些是后面的事情，一步步来不能着急。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;67. 开始开发和测试之前每个人都仔细审阅功能设计么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要做。Function Spec review是用来统一思想的。而且，review过以后形成了一致意见，将来再也没有人可以说“你看，当初我就是反对这么设计的，现在吃苦头了吧” &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;68. 所有人都始终想着The Whole Image么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要这样。项目里面每个人虽然都只是在制造一片叶子，但每个人都应该知道自己在制造的那片叶子所在的树是怎么样子的。我反对软件蓝领，反对过分的把软件制造看成流水线、车间。参见第61条。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;69. Dev工作的划分是单纯纵向或横向的么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：不能单纯的根据功能模块分，或者单纯根据表现层、中间层、数据库层分。我推荐这么做：首先根据功能模块分，然后每个“层”都有一个Owner来Review所有人的设计和代码，保证consistency。  &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;70. 你们的程序员写程序设计说明文档么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要。不过我听说微软的程序员1999年以前也不写。所以说，写不写也不是绝对的，偷懒有时候也是可以的。参见第56条。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;71. 你在招人面试时让他写一段程序么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要的。我最喜欢让人做字符串和链表一类的题目。这种题目有很多循环、判断、指针、递归等，既不偏向过于考算法，也不偏向过于考特定的API。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;72. 你们有没有技术交流讲座？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要的。每一两个礼拜搞一次内部的Tech Talk或者Chalk Talk吧。让组员之间分享技术心得，这笔花钱送到外面去培训划算。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;73. 你们的程序员都能专注于一件事情么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：要让程序员专注一件事。例如说，一个部门有两个项目和10个人，一种方法是让 10个人同时参加两个项目，每个项目上每个人都花50%时间；另一种方法是5个人去项目A，5个人去项目B，每个人都100%在某一个项目上。我一定选后 面一种。这个道理很多人都懂，但很多领导实践起来就把属下当成可以任意拆分的资源了。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;74. 你们的程序员会夸大完成某项工作所需要的时间么？&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：会的，这是常见的，尤其会在项目后期夸大做某个change所需要的时间，以次来抵制change。解决的方法是坐下来慢慢磨，磨掉程序员的逆反心理，一起分析，并把估算时间的颗粒度变小。 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;75. 尽量不要用Virtual Heads&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;　　MVM：最好不要用Virtual Heads。Virtual heads意味着resource is not secure，shared resource会降低resource的工作效率，容易增加出错的机会，会让一心二用的人没有太多时间去review spec、review design。一个dedicated的人，要强过两个只能投入50%时间和精力的人。我是吃过亏的：7个part time的tester，发现的Bug和干的活，加起来还不如两个full-time的。参见第73条。73条是针对程序员的，75条是针对 Resource Manager的。 &lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="footerLinks"&gt;&lt;nobr&gt;&lt;/nobr&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1204687399787349866-8567282422299786232?l=luckyrainy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1204687399787349866/posts/default/8567282422299786232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1204687399787349866/posts/default/8567282422299786232'/><link rel='alternate' type='text/html' href='http://luckyrainy.blogspot.com/2007/11/75.html' title='软件开发管理的75条体会[转载]'/><author><name>Rainy</name><uri>http://www.blogger.com/profile/03486079127440003099</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1204687399787349866.post-6521586908348833757</id><published>2007-11-12T22:01:00.001-08:00</published><updated>2007-12-30T22:42:31.387-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='职业发展'/><title type='text'>保证你现在和未来不失业的十项IT关键技术(转贴)</title><content type='html'>&lt;div id="msgcns!A619225E845C8CF5!218" class="bvMsg"&gt;&lt;div&gt; &lt;p&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;strong&gt;一、XML&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;　　&lt;span style="color: rgb(0, 128, 0);"&gt;在 十种技术中，最重要的一种技术我想应该非XML莫属。这里不仅仅指XML规范本身，还包括一系列有关的基于XML的语言：主要有XHTML， XSLT，XSL，DTDs，XML Schema（XSD），XPath，XQuery和SOAP。如果你现在还对XML一无所知，那么赶快狂补吧。XML是包含类似于HTML标签的一个文 本文件，在这个文件中定义了一个树型结构来描述它所保存的数据。XML最大的优点是你既可以在这个文本文件中存储结构化数据，也可以在其中存储非结构化数 据——也就是说，它能包含和描述"粗糙的"文档数据，就象它描述"规则的"表格数据一样。XHTML是目前编写HTML的首选方法；因为XHTML本身就 是格式良好的XML，与通常畸形的HTML文档相比， XHTML格式文档更容易处理。XSLT和XSL是对XML文档进行转换的语言。它们可以将XML文档转换成各种格式，比如另一个文本文件、PDF文件、 HTML文件、逗号分割的文件，或者转换成其它的XML文档。DTDs 和XML Schema用来描述XML文件所包含的数据内容的类型，使你不用编写定制的代码就能对XML文档的内容进行"有效性"检查，使内容强行遵守给出的规则。 XPath 和 XQuery是查询语言，用它们可以从XML文档中吸取单个的数据项或者数据项列表。XQuery的功能特别强大，因为它对XPath查询进行了扩展。实 际上，XQuery和XML的关系就像SQL之于关系数据库一样。SOAP是Web services间进行通讯的标准协议。你不必知道SOAP协议的所有细节，但是你应该熟悉其常用规则及其工作原理，这样你才能使用它&lt;/span&gt;。 &lt;/span&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;strong&gt;二、Web Services&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;　　&lt;/span&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Web 服务是XML流行后的直接产物。因为XML可以描述数据和对象，XML大纲可以保证XML文档数据的有效性，因为XML的基于文本的规范，因而 XML文档极其适合于作为一种跨平台通讯标准的基本格式。如果你还没有接触过Web服务，那么过不了多久你肯定会碰到它，所以必须熟练掌握Web服务，最 好是精通它，因为它是迄今为止应用程序间跨不同种类机器、语言、平台和位置通讯的最简单的一种方式。不管你需不需要它，Web服务都会是将来互用性的主要 趋势。&lt;br /&gt;XML工作组的John Bosak曾说过："XML使得Java有事可做"，那么，我们也可以说，Web服务使得所有语言都有事可做。Web服务让运行在大型机上的COBOL应 用程序与运行在手持设备上的应用程序相互沟通；让Java小应用与.NET服务器相互通讯，让桌面应用与Web服务器进行无缝交互，不但为商业数据处理， 同时也为商业功能提供了方便的实现——并且这种实现与语言、平台、和位置无关&lt;/span&gt;。&lt;/span&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;strong&gt;三、面向对象编程&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;　　&lt;span style="color: rgb(128, 0, 128);"&gt;许 多程序员仍然认为OOP乃技术的象牙之塔，但是细细想一下过去十年里在面向对象领域里占据过统治地位的开发语言之后，你就不会这么认为了，OOP理念从 Smalltalk开始，然后蔓延到C++和Pascal（Delphi），到Java成为真正的主流，几年之后，VB.NET 和 C#的出现可以说是OOP发展到了登峰造极的地步。虽然使用这些语言不必了解OOP的概念，但如果你缺乏一些OOP的基本知识和方法，我想你很难在逐渐疲 软的就业市场中找到工作。&lt;/span&gt;&lt;/span&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;strong&gt;四、Java, C++, C#, VB.NET&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;　　&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);font-size:130%;" &gt;如 果你热衷于技术，并且热爱编程，那么我想你应该轻松玩转这些高级语言，我说的玩转并不一定要你成为超级编程高手。而是能看懂用这些语言编写的代码即可。如 果你还有精力用它们编码那就更好了。其实这种机会甚少。但是看代码的机会很多，学习编程的最有效的一种方式就是看源代码——浩如烟海的源代码中很多都不是 用你所钟爱的开发语言编写的。&lt;br /&gt;在过去的几年里，各个语言功能的发展基本上都差不多。现在你完全可以用VB.NET来写Windows服务、 Web应用或者命令行程序。即使你只用其中的一种语言写程序。我认为也完全有必要学习另外一种语言，使自己能阅读和理解它们现有的例子代码，并且能将一种 语言编写的代码转换成你首选的编程语言代码。这里列出的四种语言可谓是一个强大的开发语言工具箱，如果你掌握了它们，毫无疑问你一定是一个众人仰慕的高 手。这里我要声明一下：那就是我并没有要忽略和排除其它的高级语言，如：FORTRAN、COBOL、APL、ADA、Perl和Lisp等等，根据你所 从事的领域不同，应该选择适合的语言和工具。&lt;/span&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;strong&gt;五、JavaScript&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;　 　Java 和JavaScript两者的名字尽管很类似，但它们之间并没有什么关系。为什么一种脚本语言会如此重要，以至于将它列入十种关键技术之一呢？仔细想一下 就知道了，目前所有主流的浏览器都使用JavaScript。如果你要编写Web应用程序，那么JavaScript不可或缺。此外， JavaScript还能作为一种服务器端的脚本语言，如将它嵌入在ASP、ASP.NET中，或者嵌入XSLT来扩展功能。目前JavaScript在 Mozilla/Netscape中是激活基于XUL界面的首选语言，它派生出了ActionScript，成为Flash MX应用的编程语言。还有就是JavaScript极有可能成为未来新设备的脚本语言以及主流应用的宏语言。相比之下，VBScript虽然在微软的产品 中得到很好的支持，但从长远来看，没有迹象表明它会有美好前途。微软自己都趋向于用JavaScript（或者用由JavaScript派生的 JScript）来编写其客户端脚本代码。因此，如果你要选择脚本语言，非JavaScript莫属。&lt;/span&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;strong&gt;六、Regular Expressions&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;　　&lt;span style="color: rgb(128, 128, 0);"&gt;从 所周知，关系数据库的查询使用SQL，搜索XML文档用XPath 和XQuery，而正则表达式则用来搜索纯文本。例如，你可以用一个命令来查找或删除HTML格式文件中的注释内容。大家都用过"IndexOf"、 "InStr"以及"Like"这些内建在JavaScript或VB中的文本搜索函数，这些函数虽然很容易使用，但是它们的功能却无法与正则表达式同日 而语——现在每一种主流的开发语言都提供对正则表达式的存取。尽管有人认为正则表达式本身的读写艰涩难懂，但毕竟它的功能强大，使用它的领域也越来越多。&lt;/span&gt;&lt;/span&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;strong&gt;七、Design Patterns&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;　&lt;span style="color: rgb(0, 128, 0);"&gt;　就像OOP通过创建和分类对象来简化编程一样，设计模式将普通的对象交互分类成指定的模型，这是一个从一般到具体的过程。OOP的成分使用得越多，设计模式就显得越有用武之地。所以你必须理解它们，跟上其总体理论的发展。&lt;/span&gt;&lt;/span&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;strong&gt;八、Flash MX&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;　　&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);font-size:130%;" &gt;当你需要比HTML和CSS所能提供的更多的客户端图形和编程能力时，Flash是最佳选择。在Flash中编程比用Java小应用或者.NET代码来得快得多，也容易得多。&lt;br /&gt;在 最新版本中（MX），Flash不仅可以画图和进行动画打包，它还是个高度的可编程应用环境。具备强大的与SOAP Web服务沟通的能力，可以调用运行在远端服务器上的ColdFusion、Java或.NET代码。可以说Flash几乎无处不在，包括手持设备、置顶 盒、甚至是新的平板电脑，你到处都可以见到它的身影，所以使用它实际上可以扩展和延伸你的应用程序使用领域。&lt;/span&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;strong&gt;九、Linux/Windows&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;　　&lt;span style="color: rgb(128, 0, 0);"&gt;这 是当今PCs机操作系统的两大阵容，如果你想在计算机行业里混，就一定要熟悉它们。对于Linux，最好能自己安装，配置，下载它的图形用户界面以及一些 应用程序。自己安装Apache并会编写Web应用程序。要清醒地认识到这个世界除了Windows之外，还有Linux的存在。并且这种局面将会长期存 在。反过来，如果你是一个死忠的Linux开发者，不要再继续对Windows的憎恶，要相互学习，取长补短，看看Windows有什么好的东东可以采 纳。记住Windows仍然是桌面之王。谁也说不准你们公司什么时候会决定从Linux转向Windows，或者从Windows转向Linux。谁也说 不准什么时候你会跳槽跑到另外一个使用不同平台的公司上班——或者即便不跳槽，也有可能在不同平台上开始另外一个杀手级项目——所以最好在每个平台上都积 累一些经验，而不要在一棵树上吊死。&lt;/span&gt;&lt;/span&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;&lt;strong&gt;十、SQL&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;　　&lt;span style="color: rgb(0, 128, 0);"&gt;尽 管SQL在当今众多的技术中已不是什么新东西，而且在未来的十年里它的作用很有可能被削弱，甚至整个被淘汰，但它仍然是一种基本技能——别看它是一种基本 技能，至今仍有许多开发人员不懂什么是SQL或对它了解不多。不要指望基于图形用户界面的SQL构造器会帮你的忙，还是自己亲手写SQL查询吧，确定你掌 握了SQL的基本语法。现在理解了SQL，不仅对以后学习XQuery有所裨益，而且可以使你很快找到简化或改进当前开发项目的途径。&lt;/span&gt;&lt;/span&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;strong&gt;尾声：培养对技术的好奇心&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;　 　其实，不管技术的发展趋势如何，每个人最重要的一个技能是好奇心。敢于面对挑战，在你目前或未来的工作中，新语言或新技术可能很重要，也可能不怎么重 要，你所学习的东西并不一定非要针对你的工作。不要怕失败，任何新的技术对初学者来说都是困难的。大多数的失败都可以归咎于本身急功近利，希望速成。俗话 说——千里之行，始于足下，应该脚踏实地，一步一个脚印地往前走。不要让时间来左右你行动，而是要利用时间来关注、研究、测试新的开发技术和工具。但有一 点无庸置疑—— 那就是保持良好的好奇心始终会使你充实和睿智&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1204687399787349866-6521586908348833757?l=luckyrainy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luckyrainy.blogspot.com/feeds/6521586908348833757/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1204687399787349866&amp;postID=6521586908348833757' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1204687399787349866/posts/default/6521586908348833757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1204687399787349866/posts/default/6521586908348833757'/><link rel='alternate' type='text/html' href='http://luckyrainy.blogspot.com/2007/11/it.html' title='保证你现在和未来不失业的十项IT关键技术(转贴)'/><author><name>Rainy</name><uri>http://www.blogger.com/profile/03486079127440003099</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
