Coding Bullshit Meter (Outlook Addin)

I thought this will be fun. We developers often get some mail from corporate management, which are completely bullshit to us. How much bullshit it has?? Lets calculate? To calculate I have created a small outlook Add-in (plug-in) which will Display the bullshit percentage on the ToolBar when you select the mail item.


Some of the keywords its uses to calculate the bullshit is this


synergy,strategic fit,gap analysis,revisit,bandwidth,best practice,bottom line,hardball,out of the loop,benchmark,value added,proactive,win-win,think outside the box,fast track,result driven,empower,knowledge base,total quality,quality driven,touch base,mindset,client focus

This is the first time i am developing any kind of Add-In for any application. I used Visual Studio 2010 (beta) 2010 for developing.

You will get many problems,  when you will develop an outlook plug-in. One of the biggest problem I faced was that "Event of 'Item selection change' was not firing".
this.Application.ActiveExplorer().SelectionChange
I finally come to know that you need to keep a reference of the ActiveExplorer all the time in the class.

Ok, this trick worked!!!

Download Source Code Here

I am not creating installer for this (or any kind of set-up). If at all you want to use this, please download the source code and compile on your machine. You might need Visual studio 2010 for this.

Simplest Way to Add code review using CodeCollaborator

One of the simplest way to add code review is by doing a diff on 2 folders. Where Folder1 Contains the previous code and Folder2 contains updated code.

Unfortunately the documentation was lil messy and I was not able to do it.


Here is simplest simplest example.

Use command line client of Code Collaborator and type this command
ccollab adddiffs new  Folder1 Folder2

Instead of new, you can write the review number which you have created at your server.

ccollab adddiffs 12345  Folder1 Folder2

I had problem about this, so posting here. May be this will help you as well.

Good thing is smatbears people are on twitter and they helped me.. Thanks guys.


Bungee with BungeeAmerica (on The Bridge to Nowhere)

Yes, I am talking about my life time experience of bungee jumping which I did with company called Bungee America.





How to get reservation
--Call them (310-322-8892) and follow the procedure

Experience

  1. Bungee Jumping is awesome, I jumped thrice.  But jumping with bungee America is even cool, because you are 100% safe.
  2. Before reaching to bungee spot, we hiked 5 miles in canyons(deep inside San Gabriell mountains). that was really cool. In-fact I hv never done any hiking like that before. Hiking on the trail, was really adventurous.
  3. First we all reached Azusa, 6th street. From there we drove our car to last parking deep inside the San Gabriell mountains.
  4. From Last Parking lot we all hiked to "Bridge To Nowhere", which is a 5 mile hike, and you will cross the river 6 times. So our shoes gone wet (we all were in Bermuda Pants). This hike takes almost 2 hours of time and very tiring, though there are no steep slope.
  5. We all had our lunch with us, because there is nothing you will get there to eat.
  6. When you will reach there everyone will be excited & when you will go for bungee, everyone will cheer you up. That is cool, because when you are going for something like that you need support of crowd.


Photos
Here you go FullScreen
(Photos are mapped here)
Note: Azusa is a place near to Los Angeles, CA

Small Lil Updates

Currently i am on a official trip, here in San Diego,CA. Came after very idiotic visa hassle. US Consulate gave me something called pink Slip, (We, in geek language say it Pink Slip Of death.).They give when they want to process ur Visa Application thoroughly. Eventually I was one of the victim of PSOD.
(my busy schedule here, preventing me from updating my blog).

Here is something, (when u don't have anything to read from my blog.)



Thanks
Keep reading my blog.


What a software engineer can learn from YSR’s death

One of the reason media figured out for YSR death is “he ignored safety processes/guidelines, and he influenced the aviation staff to fly during bad weather condition”.

Now question is whose mistake??

Is it the mistake of CM to influence staff who takes care of safety guidelines? Or it’s the mistake of staff that he got influenced???

I believe it’s the mistake of staff.

Very often this happens in software industry as well, we are given some tight schedule and we are forced to finish it. How you act in such scenario?? Mostly we try to finish that within deadline and we skip essential steps e.g. we skip unit testing, we skip code reviews and all of above we tend to write quick and dirty code.

Before doing anything like that you should ask a question to you.

Which is more dangerous?

· Refusing to work on tight guideline?

· Or writing quick and dirty code, and skipping process guideline?

Act accordingly!!

I personally refuse to work on tight guideline many time, because I think that might annoy my Boss for a moment but when something will go seriously wrong after product delivery, it might annoy whole company.

[sad about the death of a mass leader]

YQL hack to get DZone popular articles on 1 page

Problem with DZone feed is, it contains the link to DZone page. No way i can jump to article, skipping the DZone page. At the end of this article You will be getting a simple YQL based hack to get a DZone popular links on 1 page linked to original blog page.

Note: if you are not interested in how i got it Jump to Demo.

STEP-1
Using YQL first get the popular links.  using feed table (use YQL console).

URL to popular link feed is http://feeds.dzone.com/dzone/frontpage
So my YQL query will be.

select * from feed where url='http://feeds.dzone.com/dzone/frontpage'

You will get the details of all popular articles linked to Dzone’s page (same as in feed).

I am just interested in links so my YQL will be (replace * by link).
select link from feed where url='http://feeds.dzone.com/dzone/frontpage'

STEP-2
With all those link retrieved in the step-1, get the HTML page out of it. get the title node using an XPath query .
First by simple DOM inspection i can figure out that title node is wrapped in a DIV element  whose class name is ‘ldTitle’.
select * from html where url in (select link from feed where url='http://feeds.dzone.com/dzone/frontpage') and xpath='//div[@class="ldTitle"]/a'
Select format as XML and grab the REST URL
which will look like this

http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%20in%20(select%20link%20from%20feed%20where%20url%3D'http%3A%2F%2Ffeeds.dzone.com%2Fdzone%2Ffrontpage')%20and%0A%20%20%20%20%20%20xpath%3D'%2F%2Fdiv%5B%40class%3D%22ldTitle%22%5D%2Fa'&format=xml

STEP-3

Now Time to do some tweaking. if i get this data in XML i have to parse it. if i will get it in JSON, JavaScript will do all the parsing for me. That's why i love JSON.

Now if i get everything in JSON i have to regenerate DOM via a JavaScript code. I am lazy to do even that. So i want result formatted in JSON and DOM section as it is(i.e. in XML).

I can do this by putting a call-back as argument in above REST URL.

so my REST URL will be

http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%20in%20(select%20link%20from%20feed%20where%20url%3D'http%3A%2F%2Ffeeds.dzone.com%2Fdzone%2Ffrontpage')%20and%0A%20%20%20%20%20%20xpath%3D'%2F%2Fdiv%5B%40class%3D%22ldTitle%22%5D%2Fa'%0A%0A&format=xml&callback=loadlist

My call back name is ‘loadlist’. so lets implement this call-back.

which is like this.

function loadlist(data)
{
var content_div=document.getElementById('content');
if(!data.query)
{

content_div.innerHTML="error.. failed to load"
}
else
{
var i=0;
var html="";
for(i=0;i<data.query.count;i++)
{
html= html+data.results[i]+"<br/>";
}
content_div.innerHTML=html;
}
}


To see the full source code, visit this page and view source code. I have implemented extra function ‘track’ for some purpose. .



DEMO