Making F1 Do Something Useful in Visual Studio

Have you ever wished that hitting the F1 key in Visual Studio actually returned good search results in a quick manner? 

Personally I think the F1 key returns decent results, but there certainly are a lot out there who don’t.  I mostly work in .Net so I’m in the camp of users that F1 works well for.

The think I really don’t like though is the 30 seconds or so it takes to launch the help window.  Once you’re there navigation is pretty painful.

For the last several years I’ve all but abandoned F1 and just search Google with “msdn” and my search term.  95% of the time this returns exactly what I want in the first hit.

Wouldn’t it be nice if we could make Visual Studio do this for us?  Well, we can, and have been able to for years!

Check out OriginalGriff’s solution on Code Project.  He clearly outlines the steps and I have to say his solution is quite nice and tidy.

However, I had two very minor criticism, purely for my own tastes.  This solution opens the webpage inside of Visual Studio’s web browser inside the IDE.  This works, but I really like using my own default browser (currently Chrome).  This allows me to open up various hits in several tabs and bookmark interesting solutions.  I can’t do that in the VS browser window.

Second is it grabs the selected text and performs the search on this.  If you don’t select anything it just opens up a search for “msdn”.  The original F1 functionality use to search whatever word your text cursor was on, nothing had to be selected.  I’m lazy and I like this ability.

Last, but not least, as I was writing this blog post and stated above that 95% of the time my search term came up in the first result it hit me. OMG If I think that what I want will be my first hit, why not just return Google’s first result; the equivalent of hitting the older I’m Feeling Lucky button on Google’s home page. If you look at Griff’s solution you will see below it that I proposed an alternate solution that adds these three features.  Now, when I hit F1 or Shift+F1 I, respectively, get the Google search or the first hit directly.

Enjoy!

When Do You Blog?

I’m fairly busy with a load of tasks at work, but often I use a fun technology or enhance my learning when I can’t find a solution on Google and I think these would make good blog posts. The problem is finding the time to actually write them. Writing a blog post (at least for me) is often more than just typing for a few minutes. It involves code samples, occasional screen shots, previewing and making corrections and then finally posting. For a somewhat in-depth post this can take an hour or several. I have a running set of potential posts I would like to write but my list is getting longer and longer without much actually happening.

So, here’s my question. If you blog on a fairly regular basis (every week or a few times a month) and your posts are mostly instructional when do you do it? Do you have a few hours a week (like Friday after lunch) set aside to do this? Do you do it at 2am when the family is sleeping? Does your employer frown on you blogging on work time or do they actually promote it? For me, my employer doesn’t really know that I do it but they do occasionally see a post or two. I just discipline myself not to take too much work time to do it.

Do you have any tips that you have discovered that make the process a little smoother?

Do you have an assistant?   I’m serious on this one. A lot of my time is spent on correcting errors, re-wording sections and fiddling with format. If I was a professional blogger I’d probably do like movie composers do. I’d write the content, throw it together and then throw it over the wall. Let my assistant clean it up and rephrase complicated sections. Then I’d proof it and post it. I’m sure many professional bloggers have a similar set up. Any services that are somewhat reasonable that you use and would recommend? Maybe this is a market that is yet untapped. 

Thanks!

Testing Browser Compatibility Made Easier with Microsoft VHDs

When you are a website developer, hardly ever do you get to mandate what browsers your users will use.  At my last employment we built a lot of Intranet web applications for our users, who all used the same version of IE that was managed automatically on their work computers via Active Directory.  That was nice.

At my current position the websites I create are used by a variety of school districts and the public.  While the majority of users are browsing my sites with IE7 and IE8 there are a few Chrome, FireFox, Safari and, yes, IE6 users.

 

There is a great community of software applications and web services to help you test how your site will react with different browsers.  Most of them are fairly static showing you how a page will render, but with highly dynamic sites you just need to see how it will work on the actual browser.

Fortunately Microsoft makes this really easy by releasing VHDs with various operating systems and browsers loaded, from WinXP and IE6 up to Vista and IE8.  That’s not the whole Microsoft gamut but it is a good portion and easy to use.  Just load up Microsoft Virtual PC and you are set to go.

Take a look at Microsoft’s offerings here.

Alternating Ordered List Item Styles

We have Policies and Procedures document that we are making available on our website.  This document in its entirety easily spans several hundred pages and has a pretty lengthy table of contents. 

To help make this easy to navigate and easier to consume we are posting several of the larger topics as individual documents and making them available from a linked table of contents that is created as a web page.

The requirement is that the table of contents uses different numbering styles at each indentation.  So, for instance, the outline below:

Topic A

   Sub-topic A.1

   Sub-topic A.2

      Sub-topic A.2.1

      Sub-topic A.2.2

Topic B

Topic C

would become:

1. Topic A

   a. Sub-topic A.1

   b. Sub-topic A.2

      i. Sub-topic A.2.1

      ii. Sub-topic A.2.2

2. Topic B

3. Topic C

This document isn’t maintained in a database yet so for now the table of contents is created in good old fashioned HTML.  Using a standard <ol> (ordered list) element in HTML looks initially like this:

  1. Topic A
    1. Sub-topic A.1
    2. Sub-topic A.2
      1. Sub-topic A.2.1
      2. Sub-topic A.2.2
  2. Topic B
  3. Topic C

The way to change the numbering style is by using the CSS list-style-type style on the <ol> element with various options such as decimal, lower-alpha and lower-roman.  You can find a great example of this at w3schools.  So, I could manually change the list style of each <ol> tag based on how much it was indented, but this would be a pain to maintain.  Anytime we changed the layout I would have to change the list-style-type styles and be sure to keep everything consistent.  I thought this would be a perfect place to use jQuery.

Using jQuery I was able to define an array of the types I wanted to use.  jQuery would then find all the <ol> and nested <ol> elements and change the style for each indentation.  Once done I could simply maintain the table of contents and jQuery would handle the styling. I couldn’t find any jQuery plug-ins that did this so here is the code I came up with.  If I end up using more than a couple of times I’ll probably create a plug-in for it.

1: function styleOutline() {
2: // List-item-styles we would like to use
3: var olStyles = [‘decimal’, ‘lower-alpha’, ‘lower-roman’];
4:
5: // Process the parent element.
6: styleOl($(‘ol:first’), 0);
7:
8: function styleOl(element, styleIndex) {
9: // Apply style
10: element.css(‘list-style-type’, olStyles[styleIndex % olStyles. length ]);
11:
12: // Call recursively for each nested ol
13: element.children().each(
14: function (i) {
15: var ol = $( this ).children();
16: if (ol) {
17: styleOl(ol, styleIndex + 1);
18: }
19: }
20: );
21: }
22: }
23:

This works great and took me only a couple of minutes to do. Definitely an improvement over the manually written way.  I hope this helps someone else out there!

Business Intelligence vs. Political Correctness in Education

I work for the Val Verde Unified School District and the Riverside County SELPA.  If you don’t know what either of these are don’t worry, just know that we deal with A LOT of student and teacher related data.

That being said, the question that always comes up is, “How we can serve our students better?”  Many people have different ways of interpreting this, whether it is based on grades, overall improvement, discipline, where students head after they graduate, etc.

One area of my particular interest that is starting to seep into the education world is Business Intelligence (BI), or rather the art of turning vast amounts of data into something that is actually useful.  One of our Asst. Superintendents recently said he felt the district was “data rich and information poor”.  He was expressing his frustration that they had an incredible warehouse of data but it was very difficult to analyze or use.  This sounds like a perfect fit for BI.

What kind of data do we have?  Well, just in our Student Information System (we use Aeries from Eagle Software) for each student we have grades, attendance history, class history, demographics (race, address, contacts), test scores, Special Ed info, movement between schools, and discipline records just to name a few.  For our staff we have their classes taught and students in the classes.  We have several other databases as well such as our district-wide library database (we use Destiny from Follett Software), our ASB database that tracks all our student spending for sports, dances, yearbooks and debt and our HR database for staff that includes certifications, degrees, work history, evaluations, etc.

We also use GIS to map students onto our district map allowing a lot of decisions to be made regarding geographic information, such as where to build schools.

With this admin staff and teachers are already attempting to ask questions that will help identify target student groups for extra programs and such.  Some of the work they manually do, such as separating students that are known to disrupt classes if they are put in the same room together.  This is a great start but a far cry of what large companies are doing these days. 

Until recently this type of information analysis has been out of reach for school districts.  While the tools are inexpensive, such as the Microsoft BI stack, there has been very little ability to hire experienced staff or to train their current staff.

Beyond the simple resources though, the real problem is that too many people are concerned about the Political Correctness of the questions they ask.  If any of you have been following the debates in California you know there is a huge controversy over whether the current tenure system should be replaced with a merit based one.  In a merit based system if you don’t perform you may not have a job the next year.  The issue is how to evaluate a teacher’s performance.

Some staff in our district have definitely pushed the idea that we can just be objective and ask the hard questions, but as a culture I fear we are still to sensitive about the outcome.  In my opinion, to really move ahead you have to be willing to ask the tough questions and honestly look at the results.  Why not find out if there is any link between discipline, grades and perhaps where a student lives?  Other good questions are student performance vs the teachers and courses they have.  You always hear about teachers that excel with higher performing students as well as teachers that are great at motivating and educating “problem cases”.  Perhaps there is a link between student performance and debt they carry?  Perhaps there is a link between teacher’s overall class performance and the movement of the teacher’s position?

Imagine a time where a school district takes all this into account and is able to tailor a student’s journey through school based on the teachers and classmates that would be the most beneficial to everyone.  That would be pretty incredible.  As a parent I would love to hear that our school district is doing everything they can, including using BI, to help make sure that my sons and daughter, and their friends have the best environment and teaching for their strengths and weaknesses.  Perhaps a student is starting down a path that will lead to poor performance and more discipline events, and we can put in measures to help them correct their path before we are in the office discussing suspensions and possibly expulsion.  On the flip-side, imagine an incoming teacher knowing they are in a district where their position and students are fine-tuned to provide the most optimal teaching environment for everyone. 

To me that would be pretty incredible.

As some of you know it is my desire to become the Director of IT and this is one area I would really like to see improved.

When Bad UI Sticks Around – JavaScript Alert Boxes

We recently migrated from one online IEP vendor to another.  This is a program for collecting and managing Special Ed information, but it is an enterprise app and worthy of critique and comment.  They do a great job, but there are some small UI issues I wish could be fixed.

For instance, when you enter data onto a form and try to leave the form without saving they do a nice job of alerting you that you are about to lose the valuable data you just entered.  However, there is a catch:

SNAGHTML97e6ac4

Ouch, did you read that correctly?  “Hit CANCEL to Leave this page.”  The problem with that is I would say 99% of users are used to hitting Cancel when they realize they made a mistake and want to undo it.  Several times I’ve had to stop my knee-jerk reaction to hit cancel when I realized I updated something and didn’t hit Save.

Not only are the button actions inconsistent with what users are used to but I would go further and state they are actually opposite, which to me is one of the worst UI anti-patterns.  In addition the buttons are not very informative, OK and Cancel just don’t tell you what they are doing with your data.  Unfortunately I think it might be stuck as it is.  The software now boasts adoption of over half the state of California.  That’s a good sized client base and the current users are already conditioned to hitting OK to go back to the page and hit the Save button.  If the vendor were to reverse the impact of the buttons now I can just imagine the outcry there would be over users losing data because they are simply used to hitting OK.  You see, no matter how many emails, home page news alerts or training documents you give out half the users won’t even bother to read them.  They won’t know there is a change until they have already lost their data.  Not a good thing.

If I were to have to implement this change I would re-label the buttons all together.  This would not only alert the user that something functions differently then what they are used to but it would also make the dialog more usable, which is also a good UI pattern.  Unfortunately you cannot do this with plain JavaScript.  Since the vendor already makes use of jQuery the UI Dialog plug-in is a great tool to use.  It also standardizes the dialog boxes since JavaScript alerts are handled inconsistently between browsers.

Here’s a sample of what I would do using the jQuery UI Dialog plug-in.  I think it is easy to read and clear in informing the user on what they are about to do.  While this would be a change to what users are used to I think it would be one that is easily adapted to.

image

Hacking your vendor’s product; sometimes good, sometimes not

We have a particular web product that we use for all of our clients.  It is a pretty incredible system and has several hundred clients.  We are one of their largest ones so, between our implementation, and their normal customer needs its understandable why they cannot accomodate every one of our requests right away.

That being said, there was one slight “feature” that went slightly against one of our policies.  So, what to do?  Well, I put on my curiously tipped white hat and go to work.  One of the cool features of the system is they allow us, the admins for our group for all intensive purposes, to update portions of the page for our users.  They don’t escape HTML so it turns out I’m able to inject my own JavaScript code.

Ooohhh, that’s bad.  😉 I let the company know but I proceed on.

Turns out they, being the creative bunch they are, make use of jQuery.  This is definitely turning into a possibility with my toolbox already stocked and ready to go.

The particular portion of the page I choose to launch my JavaScript from is ideal because it is on the navigation bar, ensuring that it will be displayed on almost every screen.  Because we can only change content for our users it ensures that my changes will only affect our users and not those of their other clients.  However, with 5,000 users I had better make sure my code is well tested and clean.  I still have the ability to disrupt my 5,000 users if I make a bad mistake.  Point noted.

The vendor puts a character limit on the particular area of the page I’m changing.  That means I have to inject JavaScript that tells the browser to load a larger script from elsewhere.  No big, I put the script on our department website.  Hmmm, not so good.  The system is now throwing a warning that I’m loading JavaScript from a non-secure source.  Hmm.  Sure would be nice if I could load the script directly on my vendor’s server.

Well, I can. 🙂  The vendor also allows us to upload documents to a library that our users can download from.  So, I upload the script.  Uh, oh, didn’t work.  Turns out they block all but a few extensions.  So, instead of calling it myscript.js I change it to a text file called myscript.txt.  That uploads great and, guess what, the browser is happy to execute it.  Great!  On my way.

After a few tests it turns out I’m able to quite nicely make our little “issue” a thing of the past.  First I check to make sure the page in question is the one being viewed.  That way the bulk of the code (all 6 lines of it) runs only when necessary.  Then it cleans up after itself by removing my injected code from the page DOM.  Nice!

It’s not foolproof of course.  If the user isn’t running JavaScript then my trick won’t work, however,  half the system won’t work for them anyway since JavaScript it is required.  Also, if someone is sneaky enough they can load the original source and see where I injected my code.  But, if they are going to do that we have bigger problems then them simply disabling my script.

OK, that covers the techy issues, what about the people ones?  Well, as you may have guessed, no matter how many times we alerted our users to the changes we made, some users started calling the vendor’s Help Desk asking what happened to the report they were used to.  The vendor then called me after spending two days trying to solve the issue they weren’t seeing.  They didn’t really care for the changes.  They understood the necessity and gave me props for how I handled it but now their Help Desk had no idea if a problem call was because of their system or my code.  Granted, this totally makes sense.

So, they gave us a choice.  We can continue to develop our own “customizations” but we have to take over all Help Desk calls for our users for the entire system.  I understand that, but directly supporting 5,000 users is not something we are capable of doing.  I have to note also that the Help Desk is absolutely outstanding, one of the best  Ihave ever worked with.

So, after the vendor agreed to look into implementing our change we are allowed to keep the code and support the Help Desk for any questions regarding this one issue.  Once the vendor has solved the problem we will remove it and go on our way.

So, here is the moral of the story: Hacking your vendor’s site open doors to lots and lots of capabilities, however, it may aggravate your vendor a little or, quite possibly, cause an early termination to your contract.  I suggest you keep this little tool in your developer’s pocket for extreme cases.

It was fun and our vendor is great.  Once I put the change in place we started to come up with lists of additional “nice to have” features I could implement, but, in the end, we’ll just hand those over to our vendor and see if they make it in someday.

Windows 7 Phone, on it’s way!

We had a great time at the Inland Empire launch of the new Windows 7 Phone.  I got to present on developing for the phone along with Dustin Davis and Oscar Azmitia.  James Johnson and the Inland Empire .Net Users Group hosted the event at DeVry University.  Fun was had by all.

I recorded the sessions so I will have them up soon for all to see how we did.

Take care and happy developing!

Why we switched from WebEx to Adobe Connect

We had been using WebEx at my work to allow us to hold online meetings.  We are very small scale and only use it once or twice a month, but when we do it really comes in handy.  Once a month or so we have a user group meeting with our 22 districts across Riverside County.  If all our attendees came in person some of them would be driving over 4 hours roundtrip for a 2 hour meeting.  Not fun nor economically and environmentally friendly.  Online meeting software was definitely a requirement here.

WebEx was what I was used to and hadn’t seen anything better from GoToMeeting or the others.  So we signed up with them.  It works and we didn’t have any problem with it.  It’s just a little sterile and complicated for non-techie users.  Plus our vendor never returned our emails regarding renewing our contract.  So much for that.  We can’t even give them our money. 😐

One of my co-workers teaches an online class for USC.  They use an online teaching tool that makes use of Adobe Connect.  He really liked it so he told me to check it out since our WebEx contract was coming up for renewal.

After playing with it I really began to like it.  It offers many of the same features as WebEx but it is just more fluid and has a much nicer UI.  It is Flash based so it avoids many of the ActiveX or browser plug-in issues that WebEx has.  Since Flash is pretty much installed on any computer it works out of the box.  Also, Adobe Connect allows us to let guests enter a meeting just by connecting to the URL.  This is really nice as users had to enter a password with WebEx.  Password protected meetings are just one extra step to trip up non-techie users and completely unnecessary in our case. 

Also, we can set a permanent URL for a meeting we hold regularly.  This allows users to bookmark the meeting or bring it up from an old email.  With WebEx we always pointed users to our general WebEx page.  We usually only had one meeting on the calendar so it wasn’t that confusing, however, for larger organizations it can be a bother to sort through all the scheduled meetings.  Having a permanent URL that connects you straight to the meeting is a nice touch.

And guess what?  It’s cheaper for our account as well.  WebEx basic pricing runs about $60 a month for an annual subscription, which is limited to 25 concurrent attendees.  They will let more than 25 attendees connect but you will be charged for the overage.  Adobe Connect basic pricing runs about $45 a month for an annual subscription and allows up to 100 concurrent attendees.

All in all Adobe Connect is friendlier, easier to setup and less expensive.  Definitely a win for our needs.

If you are considering online meeting software definitely give Adobe Connect a look.  Also, if you do go with Adobe Connect, consider MeetingOne as a vendor rather than contracting directly with Adobe.  Check out my previous blog post about how their personal customer service really saved our day while also getting us a cheaper rate.

Praise for Meeting One – Adobe Connect vendor

In today’s Internet world where everything is automatic and at the tip of my finger the need (and room) for personal service quickly disappears.  As a fast paced individual myself I actually lean more towards automated solutions.  Often I can find an answer, directions, a phone number, a solution on a development or IT problem, etc in a matter of seconds on the Internet rather than asking someone.  It’s because of this, and having to deal with pushy vendors in various past, that have made me largely anti-salesman.  If I can purchase something online with a credit card number and a few clicks of a mouse I’m much more inclined to go the non-human route than to get someone on the phone.  I’m somewhat introverted so that may also be part of the issue. 🙂

However, as a retail software salesman in one of my many past careers, a personal technical consultant and having dealt with many great small businesses I know that the personal touch is still very useful and worth the money.

In this particular case it saved my day.

We recently switched from WebEx to Adobe Connect for our online meeting software at my work.  You can read my post about why we switched here.  Mark Stevenson of MeetingOne contacted me as an authorized vendor for government contracts for Adobe Connect.  He was very nice on the phone and answered all of my questions.  However, I was still inclined to thank him, hang up and sign us up online through the Adobe web page.  Mark was able to get us a small discount so I gave him the benefit of the doubt. 

We are a very small contract.  I am the only staff member who uses online meeting software and I only 1.5 times a month on average, yes, only 1.5 times.  He had almost no incentive to give us a deal or even continue talking with me.  Honestly, if this was a fortune 500 company (MeetingOne very well could be, they just don’t give off that impersonal vibe, a compliment I assure you :)) his sales lead analysis tool would probably have already told him to hang up as it wasn’t even worth his time to keep talking with me on the phone.

I had previously signed up online with an Adobe Connect trial account while we were researching various products.  We had a meeting today but, as we are still in the middle of our purchasing process, we were forced to use our trial account.  I didn’t think too much of it as there is no indication that the trial accounts are limited to the number of connected attendees.  However, sure enough, after 5 attendees connected to the meeting the phone started ringing off the hook.  Users were getting turned away with an error message that the account had exceeded its usage.  Ouch!  What to do?

I called up Mark right away and he saved the day.  After talking over the issue and our meeting needs he set up a meeting for us under the MeetingOne account.  I sent out the new link to all our users and within minutes we were up and running full steam.  He even stayed in the meeting while he was working and assisted with a couple of technical issues we had while switching between presenters.

I have a very large suspicion that we wouldn’t have received this type of support had we contracted directly with Adobe.

So here is a BIG THANKS to Mark and MeetingOne.  He has helped change my attitude towards vendors.  The good ones are still out there, it’s just hard to find them sometimes.  Fortunately Mark found us. 🙂

If you are in the market for online meeting software, consider Adobe Connect.  If you do, please consider MeetingOne.  They are one of the good guys and will definitely help you out.