In Praise of the Happy Face Button

I love a lot of things in the Productivity Power Tools for Visual Studio. Read about them here: http://visualstudiogallery.msdn.microsoft.com/d0d33361-18e2-46c0-8ff2-4adea1e34fef/ install through Extension Manager.

Hint: I’m guessing you’re looking at some key features in VNext of Visual Studio in the Productivity Power Pack – smoothed out and tested.

I’ll blog about a bunch of other cool things in this extension, but I really like the happy face button. The happy face button opens Outlook to send an email direct to the team. Yep, someone is looking at these as I’ve gotten feedback. These happy faces are several places in the Productivity Power Tools. This is really nice because I don’t have to tell them exactly where I was (the subject line changes). I’ve taken the liberty to use them to report features that were nearby as well. I want to make this quick direct feedback effective, so here are some hints:

- Be nice, or at least not rude

- One issue per email !!!

- Be clear – I did this, I thought this should happen, this is what actually happened

- Very specific and as short as possible but not too short

- If you can’t figure out how to do something, tell them, discoverability is a feature

- If you don’t want the team to have your email, use a special Live or Gmail account

- Be patient, if you want feedback and an issue tracked, use Connect

I’d like to see this evolve. There’s a dead web page that shows up and I’m not sure what that’s for. I’d like to access notes from the team on the specific feature. If they already know from 29 other reports, or they have already fixed it for the next drop, I’d like to know avoid re-reporting it.

I’m also willing, although it has to be an opt in, to install things on my machine to help Microsoft debug wacko problems if I have them (anyone else see failures in Ctl-Shift-V?). But historically these have been a pain to use. I’d like to see this simplified through a combination of extensions and a feedback system that runs inside VS (opt-in, disable easily, uninstall guarantee, all the caveats you can think of).

I guess what I’m most excited about is what this represents. It’s a way for them to get feedback on the little annoyances that affect the way we do our jobs every day. Sometimes it feels like the flashy new features eclipse work on just making our tools more solid. This feedback system is a way to concentrate on little details that you can report quickly and go on with your work.

My guess is that you’ll also be making the next version of Visual Studio better, without even running a beta.

Most features of the Productivity Power Tools can be turned off in Tools/Options. It’s granular so you can just turn off the features that you dislike while still being able to collapse all projects in Solution Navigator or some other small but dynamite feature.

So, if the Productivity Power Tools annoy you, send some feedback! And if you love them, well, it’s a happy face, so you can send that as well!

New Hampshire, Vermont, Rocky Mountain Tech Trifecta and New Mexico Sample Code

I’m also uploading my “Step 6” sample. I am not uploading Step1 as that was just exploring the default internet project. As I said in the talk, the Step 6 sample will be a bit tricky to understand without some text. I still hope to write the e-book, but I’m going to try to get some blog posts up in the meantime. You can get the code here. It’s with no warranty of any kind. It’s a sample for goodness sakes.


One of the reasons I delayed is because I spent some time looking at the MVC Scaffolding project last week. I think that still has a ways to go. In particular, it creates too much code for my tastes, isn’t DI centric, and has the fatal flaw of not encouraging regeneration. At the end of the day I decided it’s just not that relevant to this work, although I’ll also try to find time to work on some scaffolding ideas within the NuGet/Scaffolding framework.


Enjoy!

New Hampshire, Vermont, Rocky Mountain Tech Trifecta and New Mexico User Group Slides

I’m uploading a single deck that has the basic slide deck I showed in all these locations, except Nashua. Many of the slides overlap, but if you want that slide deck let me know. Note that the extensibility slides are preliminary, I haven’t figured out how to really express the complexity of the flow and this is my attempt to explain the functionality, and validation isn’t in the right place. I hope to update blog about this flow soon. You can get the slides here. They are my copyright and if you wish to use any of them, please ask.


At the end of this deck is a very rough draft of some slides on a debugging MEF talk. I haven’t had a chance to present this, these slides are very rough, and I pretty much hack my way through MEF debugging, but these notes might help someone. Another thing I should blog L


 

Creating a JavaScript Object as Name Value Pairs

I thought describing how I solved an issue today might help someone else.

I’m working with JqGrid and needed to add a new row full of empty strings. I’ll actually make this more complex later based on the column attributes, but the simple version makes the point.

The documentation for adding a new row is:

clip_image001

Problem is that I’m creating empty data based on the columns – I don’t know what the columns are ahead of time.

I leveraged the fact that JavaScript objects are named value pairs for their properties. The code above creates an object with the properties defined, but you can also create an object with a dictionary style syntax:

clip_image002

This code returns an object which has properties for each column in the grid. Each column contains an empty string, except the key column.

With JQuery causing a resurgence in JavaScript, I suspect the different thinking required to solve a problem like this is going to trip up plenty of .NET coders.

Visual Studio Find in Files Overwhelmed With External JavaScript

Maybe everyone else has already figured this out, but just in case…

I was going rather insane with the huge amount of results I got when I did a Find in Files in MVC projects that include a lot of JavaScript written and often minimized by someone else. I use Find in Files frequently and the large number of results made it useless.

The simple answer is to just remove the external JQuery and other external JavaScript files from your project. I had already moved them to a sub-folder so I could find my own JavaScript files more easily, so this involves just a couple of clicks.

I expect this to break deployment, so include them again before you deploy.

JQuery Append Failing to Add Elements from String

I was building an HTML string and passing it to a JavaScript/JQuery method which appended the new HTML to an existing element. Pretty straightforward stuff, except it was not working. The HTML was created from a Razor View in MVC 3. There were no errors in the Razor View.

Frustrated I grabbed the HTML from the JavaScript debugger and pasted it into a new HTML page in Visual Studio. When I tried to reformat, I finally received errors that pointed me to some errant parentheses not found by Razor syntax checking.

In general, Visual Studio will not format anything it doesn’t like, so attempting to reformat can be a last ditch attempt to see whether the code, text, HTML or whatever is properly formed.

That’s not going to tell you whether the HTML is proper, because HTML issues generally come up as warnings. With the web page open though, you’ll get the warnings and you can explore how you messed up your HTML and confused JQuery. After I fixed the parens, I found that my logic for wrapping the form contents in a table was flawed.