Welcome to MSDN Blogs Sign in | Join | Help

News

  • User Experience
    IT Manager
    Developer
    IT Professional

    These postings are provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use.

    Bloggers

    Christian Beauclair
    Christian Beauclair
    Senior Developer Advisor

    John Bristowe
    John Bristowe
    Developer Advisor

    Joey deVilla
    Joey deVilla
    Developer Advisor

    Qixing Zheng
    Qixing Zheng
    Developer Advisor

    Paul Laberge
    Paul Laberge
    Partner Advisor

[Tip] Spliting and Creating New Windows in Visual Studio

There are two ways to split the current window:

  • From the Menu Bar, go to Window - Split
  • Using the mouse, grab the splitter control found directly above the document scrollbar

But the split command only works horizontally. If you need to split vertically (see Program.cs:2 in the above picture), try using the Window.NewWindow command found on the Menu Bar at Window - New Window. Then, as in the picture above, go to Window - New Vertical Tab Group.

Reposted from Did you know... How to split windows and Create new windows? - #004 by Sara Ford, author of Microsoft Visual Studio Tips


Microsoft TechDays Canada is a technology training conference for IT professionals and developers. With forty, 200+ level sessions, it brings you the rich learning experience of Microsoft Tech·Ed (without the travel) on both current technologies and new products like Windows 7, Exchange 2010 and much more. Register today by visiting http://www.techdays.ca/.

 

Follow @ManningBooks on Twitter and Get Discount Codes

Cover of "The Art of Unit Testing" Cover of "ASP.NET MVC in Action" Cover of "IronPython in Action"

Manning Publications have a great variety of books on .NET development. There’s the stuff you’d expect, such as books on C#, ASP.NET and SharePoint, but they’ve also produced books on IronPython and IronRuby (not many books on these languages), functional programming is both F# and C# and doing brownfield development and building DSLs using .NET. Many of their books have helped me get up to speed with .NET development, and I’m currently working my way through The Art of Unit Testing.

Another great thing about Manning Books is that they’re available in both paper and electronic form. This is great news for me, as I have disk space aplenty, but I’m running short on shelf space. There’s also the fact that while technology-specific books are useful, their shelf life is rather short. I’ll still buy paper editions of books that are longer on theory and technique, but when it comes to specific versions of languages, libraries or frameworks, I’ll take the ebook version.

One more great thing about Manning Books is that they’re generous with the discount codes. Their discount codes are often for 33% to 50% off the regular price, and they announce them on their Twitter account, @ManningBooks. If you’re looking to build your tech library and save money at the same time, you should follow them.

(Just so you know: Neither I nor anyone at the Developer and Platform Evangelism team at Microsoft have any kind of arrangement to promote Manning’s books. I just like their books, and getting a discounts on them is a bonus.)

Cover of "C# in Depth" Cover of "Silverlight 3 in Action" Cover of "IronRuby in Action"

SharePoint Saturday Toronto: July 11th

SharePoint Saturday Toronto

SharePoint Saturdays are free events where you can learn about SharePoint from architects, developers, and other professionals who work with Microsoft Office SharePoint Server 2007 (a.k.a. MOSS). Filled with sessions from respected SharePoint professionals & Microsoft MVPs, they’re day-long events covering a wide variety of SharePoint-oriented topics.

On Saturday, July 11th, Toronto will have its first SharePoint Saturday at Microsoft Canada Headquarters (1950 Meadowvale Boulevard, Mississauga – off Mississauga Road, just north of the 401). The event is free of charge, open to the public and your chance to immerse yourself in SharePoint. The day will start at 9:00 a.m. with a short introductory keynote and sessions will run to 4:30 p.m.. Lunch will be provided and there will be numerous giveaways throughout the day.

There will be three primary content tracks, with each track consisting of five presentations lasting about an hour and ranging from introductory, 100-level content to highly technical, 400-level "expert" sessions. The speakers will represent a broad cross-section of the community and will offer a variety of different perspectives and points of view.

SharePoint Saturday Toronto is a great opportunity to learn, share and network. If you’ve been meaning to learn or expand your knowledge about the SharePoint platform, you should be there!

For more details, visit the SharePoint Saturday Toronto site.

Silverlight on the Silver Screen: One Week Away!

You’ve got to hand it to ObjectSharp: when they do a parody, they pull out all the stops:

"Silverlight on the Silver Screen" "Star Wars" parody poster

Next Thursday, June 9th – exactly one week from today -- ObjectSharp will host Silverlight on the Silver Screen, a presentation on the upcoming revision of Silverlight, Silverlight 3, along with Expression Blend, SketchFlow, Windows 7’s touch technology, Microsoft Office SharePoint System (MOSS), Visual Studio 2010 and Team System. They’ll cover all sorts of things, including:

  • How to design user interactions with SketchFlow
  • Integrating rich applications using SharePoint and Visual Studio Team System
  • Building rich line-of-business applications with Silverlight and .NET RIA Services
  • Tying together rich media and advertising with the Microsoft platform
  • Touch tech with Windows 7 and WPF

There’ll be something for you, no matter which of the “Three Ds” – designer, developer or decision-maker – you are!

Silverlight on the Silver Screen will take place at the Scotiabank Theatre (259 Richmond Street West, just west of  John) on Thursday, July 9th from 9:00 a.m. to 12:00 p.m..

Registration is free – all you have to do is visit the Silverlight on the Silver Screen registration page to sign up. I’ll see you there!

31 Days of Silverlight

July 2009 calendar showing each date as a Silverlight logo

31 Days of SIlverlight is a series of blog posts posted through the month of July by Microsoft Developer Evangelist Jeff Blankenburg (yes, the same guy behind the Toughest Developer Puzzle Ever, which was covered in the previous post).

For each day in July 2009, Jeff will post a fairly in-depth article on his blog covering some aspect of Silverlight development. He says that they’ll be “100- to 300-level in difficulty” (introductory to upper-intermediate) and will provide enough information for someone new to Silverlight could start from scratch building the examples.

So far, he’s posted two articles, both with plenty of examples and downloadable source code:

  1. Mouse Events in Silverlight
  2. Silverlight Screen Transitions

These first two articles are packed with information; with them alone, a Silverlight newbie should be able to build a HyperCard-like application or “Choose Your Own Adventure”-style game without much trouble. At this rate, by the time July is over, there’ll be enough material published in the series to make a decent book or course. I’m looking forward to seeing the rest of 31 Days of Silverlight!

The Toughest Developer Puzzle Ever

Montage of images from the "Toughest Developer Puzzle Ever" site

The Toughest Developer Puzzle Ever is a new puzzle site aimed at programmers in the same vein as web-based puzzle challenges such as notpron, Rankk and Python Challenge. Created by Microsoft Developer Evangelist Jeff Blankenburg, “TDPE” consists of a sequence of 30 web pages, each one with a puzzle that when solved will take you to the next one. Each puzzle provides the necessary hints to solve it, although some of the hints are tucked away in not-so-obvious places. Some puzzles can be solved with a little programming skill, some require a little knowledge of computer programming theory (although a little Binging will do) and some can be solved with a little logic and lateral thinking.

Jeff has offered a prize to the first fifteen people who complete the The Toughest Developer Puzzle Ever (only those who complete it will know how to prove it). Judging from the Twitter account for “TDPE” and tweets with the #TDPE hashtag, not all the prizes have been claimed yet.

I managed to power through the first 29 puzzles while watching Ghostbusters on TV yesterday, but the very last one has me stumped. As others who’ve been flummoxed by this problem have said on Twitter, I’m sure I’m overthinking it.

Can you beat the Toughest Developer Puzzle Ever? I’m sure you can, but you might want to do it after work. Let me know how you’re doing in the comments!

Happy Canada Day!

Canadian flagCreative Commons picture courtesy of Rene Erhardt.

From all of us at Microsoft Canada, we’d like to wish you a happy Canada Day! Have a safe and fun holiday, and we’ll see you tomorrow!

[Tip] Visible White Space in Visual Studio

A simple, but very powerful, little feature, especially when you deal with white space as much as I did when I tested the editor. The first time I saw one of our developers using it, I thought, "Yuck!" But now I'm addicted, even when I'm not testing white space vs tabs:

  • From the Menu Bar, go to Edit – Advanced – View White Space
  • From the keyboard, press Ctrl+R, Ctrl+W (using the General Settings configuration)

Note: This command is only available when a file is open. The visible white space state will persist across new files, re-opening files, and, most importantly, Visual Studio sessions.

Reposted from Did you know... How to view Visible White Space - #003 by Sara Ford, author of Microsoft Visual Studio Tips


Microsoft TechDays Canada is a technology training conference for IT professionals and developers. With forty, 200+ level sessions, it brings you the rich learning experience of Microsoft Tech·Ed (without the travel) on both current technologies and new products like Windows 7, Exchange 2010 and much more. Register today by visiting http://www.techdays.ca/.

Ottawa IT Community Awards Night Tonight

Ottawa IT Community logoThe Ottawa IT Community Awards Night takes place tonight (Tuesday, June 30th), and if you want to attend, you’ve got until 4 p.m. to register!

It’s hosted by these four groups:

The event will honour the partners and members of the groups who helped make 2008/2009 another great season for developers, IT pros and DBAs. It’ll have free food, some great competition and draws for prizes,

It takes place at the Yuk Yuk’s in downtown Ottawa (292 Elgin Street, under Hooley’s) and runs from 6:00 p.m. until about 9:00 p.m.. If you’d like to attend, you need to register.

[Tip] Box/Column Selection in the Visual Studio Editor

Did you know that Visual Studio offers two different selection models Stream and Box?

Stream selection is what everyone is familiar with using Shift+Arrow Key.

Box selection allows you to manually select columns and lines at the same time. Just hold down Shift+Alt+Arrow Key, and you'll quickly get the feel for box selection. Cut, Copy, Paste... it all still works, but just keep track of where you started to select the text. Ah, it brings back testing memories...

Reposted from Did you know... How to do Box / Column Selection in the editor? - #002 by Sara Ford, author of Microsoft Visual Studio Tips


Microsoft TechDays Canada is a technology training conference for IT professionals and developers. With forty, 200+ level sessions, it brings you the rich learning experience of Microsoft Tech·Ed (without the travel) on both current technologies and new products like Windows 7, Exchange 2010 and much more. Register today by visiting http://www.techdays.ca/.

LearnHub: Powered by Rails, Searches with Bing

Introducing LearnHub

learnhub_home_pageLearnHub's home page.

If you’re a student applying to colleges and universities and are looking for help with the process, you should try LearnHub. Based in Toronto, LearnHub is a social learning network that helps students to prepare for standardized tests, assists with finding places to study abroad and provides career counseling. LearnHub’s site has hundreds of thousands of pages of free content, including the world's largest bank of questions that appear in the GMAT and SAT standardized tests. The site has a large following among students worldwide, particularly in India, and has partnerships with 25 universities to recruit domestic and international students.

learnhub

With those hundreds of thousands of pages, LearnHub needed to provide a way for students to find what they’re looking for. They provide a search function, and it’s powered by Bing.

The people at LearnHub are part of that sector of Toronto tech that’s into Ruby on Rails, open source and founding startups. Founders John Philip Green and Malgosia Green are a husband-and-wife team who are known for building web applications for education and have been active members of Toronto’s tightly-knit open source tech community since the earliest DemoCamps. John caught Rails fever after trying it out and decided to rewrite a major application using it. The core development team of Wesley Moxam, Carsten Nielsen and Libin Pan are fixtures of the local Toronto’s on Rails scene; a gathering of local Rubyists doesn’t feel complete without them.

So what are they doing, using Bing?

Site-Wide Search

learnhub_dev_management_teamThe main room at LearnHub’s offices. Management are to the left, developers to the right.

In the beginning, they went with their first instinct, which was to use Google. “We launched in March 2008,” said co-founder John Philip Green, “and we needed to provide site-wide search, so we went with Google. We signed up, and for a few hundred bucks a year, we got a search function that covered about 5,000 pages. It seemed like a pretty big number, and we thought that would be more than enough to cover our site.”

They soon found that the results weren’t what they expected. “We weren’t getting good results. We’d use our site-wide search to search for something that we knew was in our site, and it wouldn’t show up in the results.” The same search would work just fine if you did it from Google.com, but not from their Google-powered search function. “The results just weren’t relevant, and we also had a limited number of queries,” John said.

learnhub_management_dev_teamThe main room at LearnHub’s offices. That’s management in the foreground, developers in the back.

LearnHub’s page count grew quickly and beyond the 5,000 pages covered by their arrangement with Google. “Going up to a bigger package was expensive;” John said, “it would have cost a couple thousand for 50,000 pages, and we were already at hundreds of thousands.”

“We could’ve gotten the functionality for free, but that’s only an option when you show ads in the search results, and the ads that showed up were for our competitors.”

learnhub_sales_teamLearnHub's sales team.

There was another problem: Google’s site search returned its results as a web page. In order to make LearnHub’s site-wide search’s results page have the same look and feel as the rest of the site, they had to stick the Google results in an iframe. “And even then, what was inside the iframe didn’t match the rest of the page,” added John.

They started looking at other options for implementing LearnHub’s site-wide search, including running their own spider. “We really didn’t want to do that,” said programmer Wesley Moxam.

Enter Bing

wes_moxamLearnHub developer Wesley Moxam.

While looking around at search options, Wesley found the Live Search API, which is now known as the Bing API. “It was free, well-designed and spits out JSON,” he said. “Google requires a JavaScript interface or SOAP, and SOAP libraries in Ruby are painful.”

“It took a day to implement and get it up and running,” said Wesley, “The entire switch-over project happened over three days, with us working on it on and off, while we were doing other tasks. Best of all, we get consistent results – the results from the API are the same results you’d get if you just used the Bing site.”

“Bing’s API is simple and straightforward. You call it, you get the results, you take those results and use them how you like,” he continued. “It’s good. It’s hard to explain good software; good software is inherently simple.”

Here’s a screenshot of a LearnHub search results page for the search term “accordion” – and yes, the word appears on a handful of Learnhub pages!

LearnHub search results page for the search term "accordion" LearnHub’s search results page for the term “accordion”.

LearnHub have benefited from using Bing to power their site-wide search, and they’ve decided to share the wealth. Wesley’s working on refactoring the Ruby library he wrote to act as a wrapper for the Bing API and open source it for anyone to use. It should be available later this summer. He’ll announce it when it’s released, and I’ll announce it here.

The Bing API

Bing logo

It’s easy to harness the power of Bing in your applications, whether for desktop, web or mobile.

The first step is to get an AppID, which is a string that uniquely identifies you as a registered Bing application developer. Go to the Bing Developer Center, sign in with your Windows Live ID (which you can get for free) and follow the link to created a new AppID. You’ll be asked to supply some very basic information about your application and to review the Bing API’s Terms of Use. If you provide the information and agree to the Terms of Use (which I summarize in plain English below), you'll get an AppID.

Once you have an AppID, you can start experimenting right away with the Bing API. All you need to do is start typing URLs with the format below into your browser’s address bar:

http://api.search.live.net/xml.aspx?AppID=<AppID>&query=<SearchTerms>&sources=<SourceTypes>

where:

  • <AppID> is the AppID assigned to you
  • <SearchTerms> are your urlencoded search terms
  • <SourceTypes> specifies the type(s) of search results you want. The different sourcetypes are explained in the table below:
SourceType Description Example Search Terms
Web Searches for web content accordion – returns web pages containing the term “accordion”
Image Searches for images on the web accordion – returns images of accordions
News Searches news stories accordion – returns news articles about accordions
InstantAnswer Searches Encarta online what is an accordion – returns the definition of “accordion”

convert 1.6 kilometres to miles – returns “0.9941939 miles”

sin(30 degrees) – returns “0.5”
Spell Searches Encarta Dictionary for spelling suggestions accordian – returns “accordion” 
Phonebook Searches phonebook entries accordions in Toronto – returns location results for “accordions in Toronto”
RelatedSearch Returns query strings most similar to yours accordion – returns results like “{piano accordion; button accordion; accordion store}”
Ad Returns advertisements to incorporate with results (use this to make money with you Bing-powered application) accordion – returns ads relevant to the keyword “accordion”

 

The default format for results is XML, and that’s the format you get when typing in API calls in your browser. You can also have the results returned as JSON or SOAP if you prefer.

You can find out more about the Bing API in the Bing API section of MSDN.

Bing’s Terms of Use, Explained as Simply as Possible

Here’s a quick explanation of Bing’s Terms of Use for those of us without a law degree. It’s adapted from the Bing documentation and provides a quick summary of what application developers using the Bing API must do and cannot do (besides the obvious "I promise not to use the API to plan a terrorist attack, run a drug smuggling ring or help the band Nickelback take forceful despotic rule of planet Earth").

What you must do:

  • You must display all the results you request. No filtering!
  • You must display your results in the context of a user-facing application or website.
  • You must display attribution to Bing in a manner compliant with our branding rules. Currently, you may determine the specific manner in which you display attribution. A link to http://www.live.com with the query echo is a suggested example.
  • You must restrict your usage to less than 7 queries per second per IP address. You may be permitted to exceed this limit under some conditions, but this must be approved through discussion with the folks at api_tou@microsoft.com.
  • If you interleave data from any source other than the API with data from the API, you must clearly
    differentiate the respective sources. (Yes, you can interleave Bing results with other data!)

What you cannot do:

  • You cannot use API results for search engine optimization (SEO). In particular, using the API for rank checks is explicitly prohibited.
  • You cannot display advertisements in positions other than the mainline and sidebar.
  • You cannot change the order of the results the API returns from a SourceType other than Web. (In other words, you can re-order results from standard searches for web pages!)

Bing Your Apps!

From there, the sky’s the limit. The Bing API is very straightforward and easy to use, it costs nothing to use it, and as someone who’s been using Bing as his default search engine since its beta period, the results it provides are great. Go forth and Bing your apps!

[Tip] Incremental Search in Visual Studio

I didn't know about incremental search until someone showed me. Now I can't live without it. 

  1. Press Ctrl+I
  2. Start typing the text you are searching for. Note: You'll see the cursor jump to the first match, highlighting the current search string.
  3. Press Ctrl+I again to jump to the next occurrence of the search string
  4. (advanced tip) Press Ctrl+Shift+I to search backwards
  5. To stop searching, press ESC

Reposted from "Did You Know... Behold The Power of Incremental Search - #001" by Sara Ford, author of Microsoft Visual Studio Tips


Microsoft TechDays Canada is a technology training conference for IT professionals and developers. With forty, 200+ level sessions, it brings you the rich learning experience of Microsoft Tech·Ed (without the travel) on both current technologies and new products like Windows 7, Exchange 2010 and much more. Register today by visiting http://www.techdays.ca/.

The Windows 7 Early Bird Discount

Windows 7 logoIf you told me a year ago that I'd be running a beta version of Windows on my main production machines, I'd have checked you into the nearest psychiatric institution. But here we are, more than half a year later, and I've been productive and happy with both the beta and release candidates of Windows 7.

It’s running on both the heftier laptop I use for development and demos and the smaller one that I use when I want to work on the go or for writing “TPS Reports” without a hitch. Much of what I like about it has to do with “the little things”, from a much quicker boot time to the new taskbar to the Windows-P key combo to switch monitor/projector modes to the now-indispensable dockable Windows (which are very useful for writing, whether it’s code or blog entries). Even my friends with Powerbooks have hit me up for copies of the beta and release candidate and were impressed when they installed it. I’m looking forward to having the final release.

Windows 7 will be released on October 22, but we’re rewarding “early bird” orders with a discount of more than 50%. If you pre-order Windows 7 starting today (Friday, June 26th) through Saturday, July 11th, you’ll save big and get it at these prices:

  • Windows 7 Home Premium Upgrade: $64.99
  • Windows 7 Professional Upgrade: $124.99

For more details, see:

Scenes from May’s Metro Toronto .NET User Group

Better late than never! Here are a couple of pictures I shot at the Metro Toronto .NET User Group in late May, where I presented my walk-through of ASP.NET MVC, Canada’s Next Top Model View Controller.

Colin Bowern opened the session with some quick announcements about upcoming events as well as other .NET user groups in the Greater Toronto and surrounding areas:

metro_toronto_dot_net_ug_1

He then introduced me, and I got started with my presentation. I did a quick walkthrough of the basic concepts behind MVC (that is, the Model-View-Controller design pattern), after which I introduced a special guest who I brought along with me: Paul Doerwald. Paul’s a Ruby on Rails developer, and he gave the audience a quick demonstration of building a Ruby on Rails project from scratch:

metro_toronto_dot_net_ug_2

Bringing in a Rails guy to speak in front of a .NET crowd was a little unexpected, but I thought it was important to show them the inspiration behind ASP.NET MVC, whose creators acknowledge Ruby on Rails’ influence on their framework. I think that they benefited from this outside perspective, and it worked on Paul as well – he was impressed by the size of the crowd, the nice settings (the Metro Toronto .NET User Group has a nice arrangement to use the conference rooms at the Manulife office building), the extent and organization of all the .NET user groups in the Toronto area and even the male-female ratio (while the women were still vastly outnumbered by the men, the percentage of women at the User Group was still high in comparison to some open source gatherings).

Much of my presentation was a walk-through of building the basic structure of the NerdDinner application featured in the book Professional ASP.NET MVC 1.0 and online at NerdDinner.com, with plenty of additional commentary by me, explaining in further detail why things were done a certain way. I encouraged the audience to download the free chapter from the book and actually build the application themselves; after all, the best way to learn is to do.

I had a wonderful time presenting in front of the very attentive and appreciative crowd at the Metro Toronto .NET User Group and would like to thank the audience for watching, Paul for helping out and the organizers for inviting me. I’d love to do it again sometime!

As for ASP.NET MVC, watch this space for more articles and code examples!

Toronto Coffee and Code This Friday!

coffee_and_code_may_29_2009_1The scene at the big communal table at the May 29th Coffee and Code.

There’s a Toronto Coffee and Code this Friday! For details, see the Coffee and Code blog.

More Posts Next page »
Page view tracker