cruft_folder_2Usually when jumping into a new OS, I largely disregard the built in programs. My typical thought is that they’re for newbies, grandmas, and otherwise lack the features that other 3rd party programs offer. (think MSPaint, Getting Started, Fax/Scanner Wizard, Welcome to XP videos, etc). It got so annoying that I actually go out of my way on new installs to make a new folder on the Start Menu to bury those shortcuts.

Windows 7 Snipping Tool Special-K  brought the new Windows 7 Snipping Tool to my attention, and it’s most definitely a productivity enhancer. My snap judgement was “really, a built-in Windows tool?”, but after 10 seconds of using this tool, I knew I’d be using it immediately in place of my current screenshotting process.

Screenshotting

Here’s my typical OLD style of creating a screenshot. Typical use case here is to send a cropped & marked-up screenshot by email, or perhaps for insert into Windows Live Writer.

paint_net Total Clicks/Buttons = up to 15

  • Alt-PrtScn
  • Open Paint.NET
  • Ctrl-V
  • Start cropping
  • Change the color selector to red or yellow or something to make your selection stand out
  • Select the Oval or Rectangle tool to highlight what you need. When Oval doesn’t line up the way you want, Ctrl-Z, and try again x3.
  • Either: a) Select All –> Ctrl V into a new email or b) Save As –> enter a filename, save to desktop. Open email client (Gmail or Outlook), and attach to email as attachment.

Stop the Insanity with Win7’s Snipping Tool

 

Windows 7 Snipping Tool Total Clicks = max 5

  • Keyboard Start key
  • Type sn as if you were typing snipping tool. Hit Enter.
  • Start cropping
  • Highlight, markup, erase, recrop to your heart’s content.
  • Click the Email button to generate a new email message with the image embedded. Launches the default mail client. Works well with Outlook and Gmail.
snip_types

Being the artsy type, you’ll probably want to screenshot in different ways. I think the typical use-case would be the rectangle, whereby you click-drag a rectangle to highlight the parts of your screen that you want. Otherwise, you have the ability to screenshot:

  • a window you choose (it outlines the window when you hover over it, Win7 style)
  • free-form, lasso-style!
  • the entire screen

 

Caveats (or not!)

  • doesn’t work well when you’re trying to capture something from your Start menu!
  • not a caveat – it’s super easy to snip/screenshot your entire toolbar. Select Window Snip, and click your toolbar. The tool captures just your toolbar, from Start button to minimize button. Awesome!
  • not a caveat – saves as .png by default. Yes, Paint.NET does this as well.
  • not a caveat – turns out the .exe isn’t named winsnip.exe (which I would have loved), but rather c:\Windows\System32\SnippingTool.exe

snipping_tool_windows_7_markup_msdn


Posted in: windows 7 , shortcuts , microsoft  Tags:
Actions: E-mail | Permalink | Comments (0) |
Phil posted on October 14, 2009 19:37

Paul Thurrott posted something that I had missed on Channel 9: A documentary on the evolution of Visual Studio. I took the time on a Sunday night to watch both parts (Part 1 and Part 2)

Part One

The first part was a look back at the early-mid 80's: MS-DOS, green-screen, OS/2 + IBM, and the arch of Visual Basic from version 1.0 through 5.0. One thing I did NOT know was that Alan Cooper's prototype of VB was called Tripod, and later Ruby. Cooper talks about the presentation of Tripod to Microsoft reps., "Gates-clones" as he calls them.

cooperRuby-Tripod

It was interesting to me that he scoffed "… like Microsoft would care about something like this."

Some of most interesting bits were around the culture or atmosphere at Microsoft - "pulling more all-nighters at Microsoft than I did at University" was telling. It makes sense - the stakes are much higher, and the environment more professional. It reminded me slightly of Barbarians Led By Bill Gates by Edstrom and Eller. (great read!)

Microsoft was incredibly focused on building a developer community. I feel they've done an amazing job at this, and they really are unparalleled in this respect. I've seen it first-hand at various DevDays.

They traced the evolution of Visual Basic from VB3 to VB5. One interesting part for me was the comment that "you could compile an application as an executable, which was a really big deal at the time." 

Part Two

hotjava   

The second part was a tracing of the genesis or development of C#. The impetus for the new language was due to Java. In 1996/1997, Java was the hot new kid on the block with the promise of 'write once, run anywhere' on other computing platforms.

 csharp

C# was then conceived from the lawsuit and forced failure of Microsoft's implementation of their own Java VM and Visual J++. The fact that Microsoft had the market-leading Java dev toolset at the time, and then extended further with C# is amazing.

 anders

guthrie

C# is inarguably the tool that helped win more developers over to the .NET platform from the Java space. Some great shots of the 2000 PDC with Scott Guthrie presenting. It really highlighted the war with Java in the early 2000s, and how Sun just got crushed. I say: "Thank goodness!" I loved the time-to-market and LOC graphs around Microsoft's copy of the prototypical Java app PetStore.

petstore

 

The video led into some self-criticism about some Visual Studio attributes like performance, the help system, the Ladybug defect/feature website, etc. Lots of talk about how Microsoft wants to connect with its customers, and wants to be more transparent to its customers.

Part 2 then devolved, in my mind, into a sales pitch for VS2010, Team Suite, and Azure. I guess I am not too surprised :)

Some of my favorite lines (Alan Cooper is full of them!):

  • "It (Visual Basic) a very different thing from what I had originally set it out to be. It's like sending your son to college, and he comes back graduating with honors and a sex-change." says Alan Cooper.
  • "I think Basic is a terrible language. Nothing more than FORTRAN with a dress on it. It's a language that should be dragged outside and shot." says Alan Cooper.
  • "C++ - a terrible, terrible language. An awful language… basically un-learnable… not a tool for the masses." says Alan Cooper.
  • "C# - is most of the magic of C++, with a lot of the simplicity of Visual Basic combined" says Dave Mendlen
  • "You don't have to be a genius to be an application developer." - Tim Huckaby

Overall it wasn't as much a "history" of Visual Studio as I had expected. I had expected to hear more fine-grained details about how the product was built/merged. It's definitely a worthwhile watch. Check it out for yourself!

Part 1 and Part 2 of The Visual Studio Documentary at Channel 9.


Posted in: visual studio , microsoft  Tags:
Actions: E-mail | Permalink | Comments (0) |
Phil posted on October 12, 2009 05:43

Damien Guard was nice enough to blog about changes coming to L2S in VS 2010. Rather, the changes are coming in the .NET Framework 4.0.

The whole rumor within the development community/blogs about "Linq To Sql is being unsupported, Entity Framework is the new coolness" was just plain wrong, I believe. Microsoft is too big, and has too many projects on the go. They'll gauge the momentum of both technologies. Have you heard Damien as a guest on Herding Code Episode 50? In this blog post, Damien says that the focus for Microsoft will be on EF, and that's fine. L2S is definitely not dead!

I still believe that if you're needing an ORM, and working with SQL Server, then use Linq To Sql. I've tried EF, and it worked fine. I've ended up with 4 projects using L2S, and haven't found any real need for EF.

Welcome Defect Fixes in coming in .NET 4.0 for Linq-To-Sql

For me, the most interesting changes within Damien's post are:

* Contains() with enums automatically casts to int or string depending on column type

* String.StartsWith(), EndsWith() and Contains() now correctly handles ~ in the search string (regular & compiled queries) - Here's a small defect. I've not needed to search for tildes very much, but I decided to give it a shot just in case! It's true, the behavior is just as described!

tilde-2

tilde 

 

* Now detects multiple active result sets (MARS) better - I am not the heaviest user of L2S, and definitely haven't needed to specify MARS myself. Here's the MultipleActiveResultSets defect as reported on MS Connect. It's a simple issue where the connection string property "MultipleActiveResultSets" is only picked up when CamelCased exactly as shown above. Any deviation will ignore the option!

* DeleteDatabase no longer fails with case-sensitive database servers - Interesting that this functionality even exists. I had to research this method - DataContext.DeleteDatabase(). I can't recall actually seeing it in the Intellisense method list, but indeed it's there! Most blogpost or articles that I read in that 5 minute span were talking about using this method for tear-down during "Unit Testing". I'd call that integration testing, and ill-informed as well. Unit tests should not include databases!

DeleteDatabase

* VarChar(1) now correctly maps to string and not char - This one has bitten me before. The column was called Gender. Of course it was storing M, F, T, or U for unknown. The core of the problem was that some rows were having a blank stored in this field, rather than null. StackOverflow to the rescue! http://stackoverflow.com/questions/1190328/linq-to-sql-exception-string-must-be-exactly-one-character-long. After some thought, I'd agree that storing this value as char(1) would be semantically more correct, more performant, and consume just one byte per tuple.

varchar

len zero 

* Decimal precision and scale are now emitted correctly in the DbType attributes for stored procedures & computed columns - I couldn't reproduce this defect, and perhaps I misunderstood.  I defined a decimal(18,5) attribute on the table, and L2S brought it back without any problems. Then I realized the key to this defect was probably the 'computed' bit. So I went and created a simple decimal return type. I ran the query, and still no defect.

computeddecimalsOK

Then I clued in - the defect was under the Linq To Sql Designer heading. So upon further inspection, here's the defect in the myL2S.designer.cs. The return type is calculated as decimal(0,0). Ouch! :)

  decimalzero

* Foreign key changes will be picked up when bringing tables back into the designer without a restart - This defect has hit me a few times as well. It appears as such:

  • Edit a FK in SQL Server. If you've got an open L2S file, deleting + dragging and dropping those tables back onto the L2S surface DO NOT show your FK changes.
  • Clicking the Refresh button in Server Explorer doesn't help.
  • The only solution is to close your L2S file, and re-open.

* Changing a FK for a table and re-dragging it to the designer surface will show new FK’s - this is very much related to the item above.

* Opening a DBML file no longer causes it to be checked out of source control - this has appeared to me a few times. Simply opening/viewing the L2S file creates a 'check out'. Nothing earth shattering here, and glad to see this is fixed.

* Can edit the return value type of unidentified stored procedure types - This feature is great! It's very helpful when you've got a sproc that shapes data just the exact perfect way that you'd like to show on a custom report. Perhaps you're binding to an asp:GridView or including as part of an MVC FormViewModel. The normal course of action is:

  • Create your sproc to shape your data as you like

    Sproc-To-Custom-Object

  • Drag a sproc onto the Methods section of the L2S designer.
  • Try change its return type to a class you've created solely for the purpose of binding

  • Oops, it's locked!

    locked

    The work around is a bit time-consuming. You have to:

    • open up the myL2S.designer.cs file

    • find your method marked with the attribute containing your sproc name

    • replace the default return type int with ISingleResult<T> - in my simple example here, it's ISingleResult<CustomerReport>

      modify dbml

    The frustrating bit here is that this behavior isn't predictable (to me at least). I CONSTANTLY have to go through this process to properly set the return type of 2 sprocs in one particular project. This defect fix in particular by Microsoft will be welcome!


Posted in: linq-to-sql , c# , microsoft  Tags:
Actions: E-mail | Permalink | Comments (0) |
Phil posted on July 10, 2009 07:42

Bing, You've Done Well.

I don't have any problems with Bing. That sounds like a backhanded compliment, but it's definitely meant as a kudo. For Bing, Dethroning the Big G is a Gargantuan task.

David Pogue at the New York Times has a great video review of Bing. He talks a lot about the consumer-ish features, which I didn't really pay attention to. Yes, the Ajaxy previews are a great feature. The image searches feel a lot cleaner to me as well. I don't really care for all the text cruft when looking for an image. If I want a 'big'-ish image, I'll choose the size option from the left menu. Still, it's in Bing's interest to give value to the searches that most humans are doing: travel, local and consumer-ish type things.

As a Developer…

…all I really needed to know is why I was getting 'Cannot implicitly convert type 'System.Xml.XmlDocument' to 'System.Xml.XmlNode'' when trying to pass XmlDocument back and forth between web services. (hey, I didn't specify XmlNode, but that's what gets auto-generated in your Web Service's  Reference.cs!) Oh look, first result!

A month ago, I took the Bing 1 Month Challenge. There were a handful of times that I felt I might be able to do better in Google, and about half those times, I found what I was looking for in Google. The majority of searches though, Bing provided me with the results that I need. Basically it never left me hangin'. Who would have thought that a rebranded, remixed and Ajax'd MSN Search would have turned out so well?

The guys on the Herding Code Podcast pretty much panned it a month ago on Herding Code Episode 49 . I am much more optimistic for Bing's future. I'll be keeping it as my default search engine.

Celebrate Good Times

Great job, @Bing Team! Kudos!

bing-logo_2


Posted in: bing , microsoft  Tags:
Actions: E-mail | Permalink | Comments (1) |