DCSIMG
May 2008 - Posts - Maor's Blog

May 2008 - Posts

Microsoft Source Analysis for C#

Microsoft announce the public release of a new developer tool -  Source Analysis for C#.

Inside Microsoft this tool's name is StyleCop and it enforces code style guidelines on the code we write

Source Analysis comes with a set of default rules analyzers covering approximately 200 best practice rules. These rules are full compatible with the default layout settings in Visual Studio 2005 and Visual Studio 2008.

Specifically, these rules cover the following, in no particular order:

  • Layout of elements, statements, expressions, and query clauses
  • Placement of curly brackets, parenthesis, square brackets, etc
  • Spacing around keywords and operator symbols
  • Line spacing
  • Placement of method parameters within method declarations or method calls
  • Standard ordering of elements within a class
  • Formatting of documentation within element headers and file headers
  • Naming of elements, fields and variables
  • Use of the built-in types
  • Use of access modifiers
  • Allowed contents of files
  • Debugging text

After installation, Source Analysis can be run from within the Visual Studio IDE. You can set this up to be run as a part of your build process as documented here. Since this is plugged in as a MsBuild project you can use it in as a part of Team Foundation Build process as well.

 

Running Source Analysis:

sca1

And the results are:

sca2

 

Download it from: http://code.msdn.microsoft.com/sourceanalysis

Read full details:http://blogs.msdn.com/sourceanalysis/archive/2008/05/23/announcing-the-release-of-microsoft-source-analysis.aspx

Show Me The Money!!

Microsoft will pay you to use their Live Search!

800px-United_States_one_dollar_bill,_obverse

Not really...

Microsoft will pay you cash back from purchases you make after searching for the products on their search engine.  So… if you want a new laptop, search for laptops at Live Search, click through to a product you find in the listings, and make a purchase… then you’ll get cash back. The service name is: Microsoft Live Search Cash Back.

The new service  includes over 10 million product offers and all of them provide a cash amount which is added to the users' free cashback account once the purchase is made. Once the account reaches $5, users can claim their money and go spend it however they want.

Microsoft will be using technology that it gained through the 2007 acquisition of Jellyfish and will allow users to see relevant products and services when performing an online search in one of its 18 new vertical search segments.

I read more about it and found that it’s the advertiser paying the cash back, not Microsoft.  And looks like the amount you get back will vary from product to product and advertiser to advertiser. But it's still an interesting idea. It seems that this is win win situation: Microsoft don’t lose any money out of pocket for the rebates, and the system will theoretically bring them more search traffic.

I cannot see why I should abandon Google for being my search engine, while at the same time I can use Live Search to check out...

When I have to find something, I look for a good search engine that can help me to find what I want quickly and conveniently. I don't think the idea that the search engine with the best results can be replaced for this service. That's why Google is still my favorite search engine!

By the way, there is even cash back for Vista...

livesearch1

Steve Ballmer In Israel

Today, Microsoft's Chief Executive, Steve Ballmer visited Israel. Mr. Ballmer came to Israel for the inauguration ceremony of Microsoft's new research and development center in Herzliya, Israel. I invited by Microsoft and also took place at the press conference.

 P5210016

From the press conference: Left: Danny Yamin -  Microsoft Israel subsidiary CEO; Center-Mr.Ballmer; Right:  Moshe Lichtman - Israel R&D center corporate VP.

 

 

What I have learned from this event?

First, the proportion of Microsoft employees per capita in Israel is almost similar to that in the United States? WOW!! Impressive!!!

Another thing - Tel Aviv is a lot like the Silicon Valley...he knows very few places around the world that offer such a variety of startup opportunities, and that his company intends to purchase more Israeli startup companies. Israeli startups - be ready!!!

Moshe Lichtman - Israel R&D center corporate VP

Localized (in Hebrew) XBOX?? Ballmer apologized that there is no localized XBox, and wrote a note to take care about it...

P5210022

And...what about Yahoo!?   So, Ballmer said that Microsoft is not looking to buy all of Yahoo! but is currently engaging in negotiations about other types of deals with them.

P5210031

Facebook?? yes! Ballmer said that Microsoft have a great relationship with Facebook and they look to continue to invest in that partnership.

After the press conference we went to the inauguration ceremony which included speech of Mr. Shimon Peres, the President of Israel, Mrs. Yael German, mayor of Herzliya and a talk by Ballmer about innovation.

P5210046

Mr. Shimon Peres, President of Israel

P5210050

Peres's speech was impressive. He compared Israel's situation to Microsoft's product. He said: "If I have to say it in your language, go from a country in need of walls, to a country that can open windows...".

Ballmer's talk about innovation.

P5210056

P5210064

Also was here, Israel’s UN Ambassador Danny Gilerman.

P5210068

Thanks to Microsoft and Michal. I really enjoyed this event!!

Search The File System Using LINQ

Do you want to search a file or file type in the file system? Nice way to do it is using LINQ.

var files = from file in new DirectoryInfo(@"D:\temp").GetFiles()
            where file.Name == "MyFile.txt"
            select file;

Or even search after specific file extension :

var files = from file in new DirectoryInfo(@"D:\temp").GetFiles()
            where file.Extension == ".txt"
            select file; 

Enjoy,

Maor

VS User Settings Are Reset When Installing VS 2008 SP1 Beta

I installed Visual Studio 2008 SP1 Beta on top of Visual Studio 2008 and I got surprise:  my VS user settings were reset to default VS settings.... :-(

I don't know if this behavior is specially for me or its a bug, but my advice: backup your VS settings before upgrading to VS 2008 SP1 Beta.

To backup VS settings:

Navigate to Tools menu --> Import and Export Settings and then select the Export selected environment settings.

VSSSettings1 VSSSettings2

ONE YEAR BLOG ANNIVERSARY
Happy-Anniversary-Balloon-Bouquet

Last week it was exactly one year since I started blogging, so this is my blog first birthday!!  Tell you the truth, this is more exciting to me than my real birthday.

I started blogging a few weeks after I visited one of my customers and asked by him to share my professional kb. I had just started blogging and was really excited about the future, and “wondered what could blogging do for me?” I was very skeptical and concerned that (a) I didn’t have anything to say and (b) didn’t have the time.

So, time is a real problem but I try to do my best...While perhaps not every post is a perfectly honed gem, I do try my best to make them interesting and informative.

 

 

 

 

 

Here’s a few stats on the blog over the past year:

  • Technorati Rank: 11
  • Subscribed readers: ~130-~200
  • Total Blog Posts: 192
  • Total Comments: 269
  • Total Categories/tags: 57
  • Google Page Rank: 4
  • Google Analytics over 12 month period
    • Visits: 26,986
    • Page Views: 34,825
    • Average time on site: 2:28

Top 20 Posts: (ordered)

  1. Reset autonumber (IDENTITY) column in SQL Server
  2. ASP.NET 2.0 - Web Site vs Web Application project
  3. Linq to XML - Adding,Updating and Deleting data
  4. C# Coding standards guideline
  5. Query XML using XLINQ
  6. Getting started with LINQ
  7. C# attributes
  8. SQL Server does not Allow Remote Connections Error
  9. Create custom task for MSBuild - Step by Step
  10. Interface vs Abstract Class
  11. WCF - Part 2: Basic Client/Server app
  12. How to: Calling Web Services methods from Client Script in ASP.NET AJAX
  13. SqlMetal for Linq
  14. Team Foundation Server 2008 Installation Problems
  15. C# Automatic Properties
  16. Lambda expressions introduction
  17. MSBuild Basics
  18. How to prevent SQL injections
  19. TeamBuild 2008 - SetBuildProperties Task
  20. Automatically Compare Data and Schema Using MSBuild and Data Dude

Tell me how can I improve!


The most important thing to me is to continue to be 1) interesting, or 2) add value. I’d like to hear from you how I can improve this blog, feel free to leave a comment, and if you want to be anonymous, that’s fine too.

Thanks,

Maor

VSTS Database Professionals msdb Projects

You can now download the sample msdb database projects from Microsoft Code Gallery to create cross database references between your database project schema objects and the schema objects that reside within the msdb database.

There are msdb database projects for both Visual Studio Team System 2008 release of Database Edition as well as the Visual Studio Team Edition 2005 for Database Professionals Service Release 1 for both SQL Server 2000 and SQL Server 2005.

Cross-database references requires that you define a corresponding reference in the properties of your database project. If you refer to objects in other databases but you do not define the corresponding references in your project, warnings will appear. For each database that you reference, you can define SETVAR variables that correspond to the server and database that you want to reference. When you modify an object definition to include the reference, you can define it by using these variables instead of the explicit names of the server and the database. When you build the database project, the variables are replaced by the values that you specified.

Search

Go

This Blog

News

    RSS

     

    Connect with Me

    Maor's Facebook profile  Follow Maor on Twitter  Maor's profile on Linkedin  Maor in FriendFeed 
           

Syndication