Zaki Mirza’s Blog


… About software and beyond!

Visual Studio Add-in : Creating Context Menus

Note: I assume basic knowledge of what Visual Studio Add-ins are and how to create a sample add-in and tweak it.

There are several articles around the internet that will get you up and started with creating a visual studio add-in (sorry to say, most of them are just rip-offs of the stock-msdn-walk-through on how to create a visual studio add-in from the extensibility wizard). I present here my findings (the hard way, due to lack of proper documentation of these things).

So you have decided to create a visual studio add-in and know what you want to add where. Let’s take the simplified form of what I created and while we do this, we will come across issues that you might not find answer of elsewhere (at least I couldn’t).

Most add-ins require a Menu Items to be added in the main toolbar. Now I’m not going to tell you about how to do that since there are several articles on that already (heck even the walk-through that comes with MSDN tells you how to do that). I’m going to tell you how to add a button anywhere in the visual studio environment (say, on a context menu).

Read the rest of this entry »


Filed under: programming, Troubleshooter, visual studio, , , , , ,

quiz #4: My Contextual Switch!

Here’s really deep down dirty one. Even i havnt been able to answer this one as such, but nonetheless here it goes. (I’m taking up the responsibility of being the Teacher Assistant for the operating systems course for a telecommunications batch, i shall try to answer this completely in a short while. Have your shot! )

How do you go about calculating the time it takes to context switch in a unix enviornment?

I read this question somewhere as a question asked in a google interview. Its really intresting and requires a deep knowledge and concept of the core system. (or so i guess?)

Filed under: linux, programming, quiz, , ,

Quiz #3: What if there were no ‘if’?

Last monday i reached office pretty late since i had to attend my lectures at univ. There was a power fluctuation problem in the whole building and the MIS had requested everyone not to turn on their PCs. So most of the people were either chilling in their cabins chatting or had left. I hung out for a while with a bunch of senior FAST graduates discussing some tecchie gossip and then i moved to the break room. There were some other employees sitting there and were discussing a very thoughtful problem. The problem being my quiz number 3. Its goes something like this:

Given a language that does not have an IF construct, how do you go on about executing different code over a condition? For example call code-block A if condition C is true, and B is condition C is false.

The discussion was going on among some 4-5 employees and since they were pretty seniour to me, (me being just another intern) i was un-noticed. Anyways, have your say in it and ill answer this shortly from my own perspective. (maybe its one of those interview questions, but then again its intresting).

Filed under: programming, quiz, ,

Jeff Atwood’s Top 6 Lists of top 10 programming lists

Jeff Atwood’s Coding horror has been my favourite blog lately (though i have just been following it since not long). Hes been bloging since a while writing on all sorts of computing/IT stuff. Here is what he posted few days ago that i found really very intresting and though provoking about programming and how to improve on it. Ill write a more indepth review for the blog in near future.

Filed under: general, programming

Quiz #2 – Tree Problem (DS)

My brother put this question to me a couple of years ago. Then i found myself having to deal with it in my datastructures project. here it is: 

Suppose you have a tree. A binary tree (for something like simplicity :p). You are traversing it (using infix, postfix or prefix) to search for a node. You find your required node. You just realized that you need to know the path from this node back to the root node (and/or vice versa). Given the following description of the structure of the tree node that you “cant” change:

struct node{Data data; node *right,*left;};

what will you strategy be to tackle this problem.

To make it more intresting (or maybe just the application of the above problem) suppose you find the node A and a node B in consecutive searches. Now what will your strategy be to show a path from A to B. (not neccesarily from the root of the whole tree, but possibly).

 Dont peek in the comments please. Think about it. Rule of pinky: Be honest to yourself atleast :p

You can make any assumption, but dont forget to state it with your solution.

Filed under: programming, quiz

Blog Stats

  • 104,758 landed here so far...
July 2018
« Jan    


Error: Twitter did not respond. Please wait a few minutes and refresh this page.

RSS Google Shared Items

  • An error has occurred; the feed is probably down. Try again later.

RSS Google Reader Starred Items

  • An error has occurred; the feed is probably down. Try again later.

Top Clicks

  • None