Archive for February, 2009

Burning the Red Tape

Noooooooo red tapeOf recent times i have noticed that the amount of project delays due to sheer user laziness has been on the increase. I am not sure why this is becoming the norm in the workplace but it is.

To me the most common scenario is the dependency delay. The dependency delay states the what ever you are working on is dependant on the work someone else is providing , with out them completing their work you are unable to proceed. Now while this is a valid reason it should not be abused so that everything you are working on becomes some one else problem. The trend that people tend to follow is the one where they will go to person A and request some data .Once the request has been submitted they feel their job is done, now while it may take person A few hours to get this data depending on how busy said person is, it does not give the requester permission to just sit around and relax. If it means that you sit by the users desk until you get the data or that you have to constantly check on the user to get the data then do that. Show that you a making and effort to actually get your work and other peoples work done proves that you are actually useful in a growing company.

I have been to way too many meetings where a issue was raised and the person in charge of the issue simply states that they are waiting on someone else ,while this may be valid the first time at any subsequent meetings this should not be the case. While it may look like you are doing your job really well (some times people do work so fast the rest of the office plays catch up) majority of time this is a false positive and does not really indicate just how efficient the person is. I personally feel that you should measure a person based on the end result of their work while taking into consideration length of project and difficulty as well.

Another thing that people seem to love doing these days is putting up red tape. While this is nothing new , in this day and age it has taken on a whole new meaning especially in the IT world. You just have to take a look at the number of story’s like this that appear in The Daily WTF to realize just how much of an issue it is. While it is understandable that at some point in the business life cycle there was a need for some red tape so that efficiency can be measured or even just so that stats can be captured. This is not always needed and it is definitely and ends up slowing down what might have once been an efficient process. Another note that comes to mind is that red tape is usually thrown around by people that a resistant to change.

There is however hope on the horizon (for developers at least) and that hope is agile development .In the agile environment there is usually changes made on a constant basis and because of this a lot of red tape has had to just fall away because it would just encumber the process to the point where it would not work. Now do not misunderstand this , there is still control in a agile development environment , its just that a lot of the office politics that results in red tape has to fall away.

There is still a lot that can be especially with regards to company’s implementing new processes because they have seen bigger company’s use them without realizing that its just not meant for them or that they need to put a decent investment into it to make it work.

As always let me know what you think and any comments are welcome.

~stalkerh

Creating your own IM BOT

Creating your own IM BOT

So one of the cooler things about programming is being able to create stuff like this , i have to say that it is probably what got me into programming in the first place.

What we are going to be making today is a add-on to one of my favorite applications (Miranda IM) that will allow you to create a bot via PHP. Just keep in mind that while i am demonstrating this with PHP there is another plug-in that allows for Python as well.

Things you need to have done :

At this point of the post i need you to have at least installed Miranda IM ( the latest version).

Things we are going to need :

Download the Miranda Scripting Plug-in from here

Getting Started :

First up is installing the mbot plug-in into miranda , this is a lot easier than it sounds .Make sure that you exit Miranda first then simply extract the zip file that was downloaded into the root of your Miranda install (usually C:\Program Files\Miranda IM\) , it should ask you if you want to overwrite the plug-ins folder .At this point say yes to overwrite. Once that is done , start Miranda again then navigate to the options menu and then plug-ins .On the plug-ins page make sure that the mbot plug-in is ticked. Once this is done restart Miranda again.

At this point you should have the scripting engine up and running , if you have any problems drop a comment in the comments section and i will help you out. On start the mbot console pops up by default (as far as i remember) if you see this window then you know all is working .One small tip is that if you find the Pop up window on load annoying like i do , simply navigate to the options page and untick the option ‘Show mbot console on start up’.

To make use of the scripting language in Miranda we are going to have to get acquainted with a bit of PHP , since this is a bit out of the scope of this post i am just going to give a few links that will get you started.

Now to dive into some code quickly.Copy and paste the code below into a text file which you can then rename to helloworld.php

<?php
function mbot_load()
{
//here we’ll register our handler;
mb_SelfRegister(MB_EVENT_MSG_IN,1);
}
//This is the function that gets called when someone sends the bot a messages
function mbe_MsgIn($cid,$body,$timestamp,$known)
{
if($body == “hello”) //Check if the message that was sent to the bot is what we are looking for
{
mb_MsgSend($cid, ‘Hey hwsit going’, 1);//If it is then send the user another message in response to what was sent to us.
return “drop”; //just drop the message
}else{
return 0; //doesn’t match, let others do their jobs
}
}
?>

Now that you have created your file and setup everything correctly its time to do a little explaining.

  • Line 1 : This is php marker , anything found in here is php code.
  • Line 2 : Bot Load Function , this is function that is first called when the script is registered , if we need to register for any events it should be done here.
  • Line 5 : Register for a event , on this line we are registering for the message received event.
  • Line 8 : This is the Message In Function , this is the function that is executed when a new message is received.
  • Line 10 : Check if the message that was sent to us was the word ‘hello’ , if so execute one path of code other wise execute the other path
  • Line 12 : If the message that was sent to us was ‘hello’ , then send a message back to the user say ‘hey Hwist going’. It should be noted that the $cid variable contains the ID of contact that sent us a message. If you knew the ID of another user you could set up message forwarding here.
  • Line 13 : We drop the original message that the user sent us , to store the message as normal return store (although you wont be notified) , to continue as normal return 0.
  • Line 15 : We return 0 as there was nothing else that i wanted to do and let message continue on to the user as normal

Now for the last and final step.

Installing the script :

This is actually very simple depending on how you go about this.

  1. Click on the Miranda Menu  -> Mbot -> Mbot Console . This will bring up the console , now simply drag the file from where ever you created it onto the section of the console where you can type.
  2. mbotconsole

Once that is done any knew messages that are received will now follow the rules in your script.

It should be noted that the other way to install scripts is to click the new button then select script then find the file you want to install.

Now all the stuff i have shown here is still very basic ( your hello world IM BOT) , what you can do from here on is limited mostly to how much you know in PHP. This should also not limit your skills since you can easily hook  .Net into php.

Stuff i have done.

  • Created a Warcraft 3 bot that gave me hero stats for DOTA
  • A salaah time calculator (you ask for the time of a salaah and it would get you the time)
  • A VLC remote control.

For more info and details have a look at the MBOT Wiki

As always these are just a few examples for the things that you can do. Please let me know of there is anything else that i can help with.

~stalkerh

Can Social Networks Replace Recruitment Agency’s

With the boom in Social Networks everyone that’s anyone is connected some how or the other. Chances are if you a looking to hire someone you might already know the perfect ( well close enough to perfect person) whether its via a direct relation to someone or via a friend.

Now with the rise of services like twitter , where you do not really need to know a person to actually follow their updates , it becomes alot easier to spread the message around that you are looking for someone to work for you. Chances are that if some one meets the criteria you set you will see a reply really quick.

Once you find a person checking up on them is easy enough if you know them due to the advent of sites like LinkedIn and Facebook. Using these two sites you can pull up pretty detailed information about a person’s previous working experience as any recommendations that he might have from other peers that you know. Based on this information you take take a rough guess whether a person will fit into your organization.

While all this is pretty and nice it does my no means circumvent interviewing the person and doing things like credit checks etc. Remember alot of times its all to easy to fool the system into making you into someone that you are not.

Now this may seem a bit weird to some but a true innovation to other (and just plain hell for others) but recruitment agency’s have also taken to the Social Network space. Idealy for them its a means to reach a vast audience with very little effort thereby increasing their chances of filling positions and different companies.

So what are your thougts , can you use Social Networks to find and fill job opertunities ?

~stalkerh

Knowing your pace in a agile enviroment

So while i would like to discuss some code i felt that there was something a little more important to be discussed today. So to begin this discussion i will begin with a quote that i heard in a movie the other night but struck a chord in me because it relates so well to programming and projects (open or closed source) in general.

‘If you cant keep up , Don’t step up’ — Can’t remember who said it but i will check on this.

Now while this may seem very harsh to quite a few people you always need to remember one thing and that is unless people have specifically asked for your help and unless they really need your help , chances are by joining the project you are going to slow down the pace of the project.It may make you look cool that you were just able to join  a project and help out even though you have so much work but remember that while a project may look easy from the outside its alot tougher once you join the team and start working on it as well. This becomes especially true in the agile environment where things move along so fast.

As soon as some one goes into a sprint (SCRUM) every second counts , by coming in as a new person and trying to catchup on everything that is going on personally ( alot of people do this) you slow the project down as people need to dedicate time to you. There are reasons why processes are documented and meetings are held and it is for this exact purpose of getting people involved in a project.

While it is ultimately up to the Product Owner to decide if new people should be brought in after the project has been initiated,i feel that they should not be as it just interferes with the workings of the project. Although there is one case i feel that is a exception to this rule and this is pair programming. Granted in most cases the people involved in pair programming are already involved in the same project because of the way that pair programming works. But if a new person is introduced to a project , said person should do the following things first, 1.) read up as much on the project as possible before joining the team , 2.)  join as a navigator in a pair programming team. This will allow the new user to jump into the project at a fairly fast pace and not cause a hold up with any of the current project workings.

It is at this point that you need to decide (rather just a little before joining) if you can keep up with the project .It is sometime better to stay behind or leave a project if you know you are going to negatively impact a project. I have seen to many cases where people that should not have been included because they wanted to (or thought they knew alot) but ended up causing so much internal politics that they were forced to leave the project.

As always let me know if you have ever needed to back down from a project or have you just stuck it out and hoped for the best ?

~stalkerh

Nerd Mag Launched

So news of the days is that Nerd Mag has finally launched , if you havent already been there ,head down to NerdMag.

Everything is looking awesome on the site , lets just hope they can handle the volume of users visiting the site on its first day :).

~stalkerh

FireStats icon Powered by FireStats