Monday, November 22, 2010

Solving problems and making decisions

I've noticed that I usually go through a lot of trainings each year, have fun in those trainings and forget whatever happened. Trainings are definitely a cool way to interact with people other than our project staff. And if you possibly learn something new, that's a bonus. But, most trainings are just crap. C. R. A. P. I'm not here to rant about such a crappy training I've probably been through. It's just that we have a lot of fun in these trainings, but when you try to look back after a couple of years, the only thing that one would possibly remember is whether there was a hot chick present in the training class or not. So, I'm trying to write down the stuff that happened in the training - what we learnt and what we could've and whether it has affected my normal routine in any way.

Lately, I was in a training called 'Problem Solving & Decision Making'. Sounds like bullshit. Kinda was too. I don't understand why my manager nominates me to these trainings. But, I'm also glad I went through this training as I met and socialized with a lot of interesting people, learnt a few things about myself and found out the difference between the 2007 me and the 2010 me.

The day started off in panic mode. We were ready for our trainer (Mrs. Pallavi Mandrawadkar) to begin at 0815hrs and look who comes in - another trainer for the same course. It was funny, incredibly funny. For once, we thought the L&D department had screwed it all up. But, things were resolved soon enough and we finally came to know that there was another training organized for the same course in some other training room. Wow! It could have been a lot more awkward.

One of the things that I realized during the second day of the training was that now I was a lot more comfortable with portraying who I was and what I could do. I did have a strong opinion in most of the discussions that we had as a group and I could see how different people thought about the same problem in different ways. That's that best thing about working in groups. The group's dynamic is so much important than anything else. Another super-important thing that I realized was that people were so easily embarrassed on going wrong. We did an exercise on a tool called 'Appreciative Enquiry' and the morons that we were, we understood the technique incorrectly and ended up doing half of the thing wrong. Embarrassing? Yes. But, we're here to learn and mistakes happen.

I'm glad to have worked in an environment where although mistakes were frowned upon, it was never that bad. Everyone is given a chance to make things right. The fear of making mistakes makes you more and more paranoid and you cannot be at your best when you're paranoid (no gyan, simple funda).

We also did another exercise where we had to build paper airplanes, market the item with a creative jingle and present/sing the jingle as an advertisement for the product. After wasting some time convincing what a 'jingle' means to the team members, I finally started to write a simple jingle while the other members of my group made the paper planes. They looked cool. The jingle was done and I needed a scapegoat who could sing that! Guess what? Nobody's willing to sing it! Well yeah, nobody wants to look like a fucking moron singing a nursery-rhyme-like jingle. But, C'mon it's just a frickin' training room with 15 people! And no offence to the ladies, but there were no hot chicks present too! (Most guys prefer not to act like douchebags in front of hot chicks. True fact.) I didn't want to do it because I had already done my share of presentations earlier and did not want to be termed as a "stage hogger".

In all that commotion finally someone decided to get on there and do the presentation. I asked him to sing out the jingle nicely and do the regular advertising stuff (I've heard/seen a fair amount of jingles and I know the pattern quite well). But, this guy (the jackass that he is) went up there and started talking some crap that we hadn't even written down and stole Cadbury's Dairy Milk's tag line and used that in the ad. Obvious disappointment! The guy was so embarrassed, he just wanted to get out of there. No biggie. But then I thought to myself, would I let my group's work go to waste by staying quiet and not giving our original jingle even a single try? No can dosville baby doll! I decided I should give it a try myself and said, "Pallavi, we actually have an original jingle that the team has made. But, maybe he's just a wee bit embarrassed to sing it as it's a little funny. I'd like to give it a try".

I went up to the center of the room and blurted it out! To my surprise, everyone liked it. Wow! It's such a great feeling that you get when your audience approves of your crappy material. Coming up with a jingle in 10 minutes is hard. Very hard. But, we did it! That made my day!

The rest of the training went fine. Learned a lot, maybe, I can't remember.

Thursday, September 30, 2010

Ideas and their execution…

It’s fair to say that 80% of the ideas that pop up in my head everyday never get executed or reach any valuable form of realization. Reasons for that to happen can be anything from time and money budget constraints to utter disregard for the problem. Until the problem really poses a PROBLEM, I never try to solve it. Necessity is the mother of invention they say.

Today, I came across a great mini-project idea to implement a distributed build system for C/C++ which by utilizing the resources of an idle/available PC would reduce the build times by a considerable amount. Our build at work takes about an hour to complete. It sucks, (Viola! a performance necessity!) and hence the invention. Well, someone else has already invented it. There are a lot of tools/products based on this. distcc, however looks really cool. Like so many of my other ideas, it may stay as just an idea and never be implemented. But, I seriously hope I give this one a try. The guys at work use a proprietary department-wide build system and there’s fairly less chance that such an idea be accepted easily. But, just for the heck of it I’m just gonna go try this concept and in the process (however short) learn some cool stuff.

The line between making up ideas and realizing them into concrete objects which satisfy/solve a problem is definitely not fine. It takes incredible effort and fortunately, for the one who can withstand the temptations of the world, brings great rewards.

Sunday, September 26, 2010

Taking the blame.

I’ve been meaning to write something for a while now and the blog feels kind of dead. Being a World Champion procrastinator, its no surprise I’ve successfully put it off for a long time now. So let me break this down and lets talk some unwise wisdom.

Its no new thing that a lot of people piss me off. Those are mostly people who don’t agree with me. I *really* don’t like those people. But, I guess that’s what makes me what I am. And fortunately for my employer, it has been a good thing so far. What am I talking about here? Frankly, I don’t know too. I’m trying to figure that out as I write this shit blog.

My workplace is a warzone. People point their guns right at you when you include their name during talks, in mails and other formal/informal conversations. Why the insecurity? It’s hard to answer that question in one straightforward line. Think about this – You’re a great software dev, highly appreciated for your work in the previous projects you’ve been in. You now enter a sub-par project where almost 70% of stuff is done the wrong way. A software project can easily become sub-par over a period of time. You just need a bunch of shitty jack-asses who don’t really care about the software being developed and just give them complete responsibility over most of the features in the software. What you get then is “shitty software”. I feel bad for all the shitty software that has been developed over the years. It gets no love, both from the guys who maintain it and the guys who use it.

You don’t want the blame. You start pointing fingers at each other trying to be as secure as possible. Shit! Your friggin’ appraisal depends on that! And that’s the part I hate the most. People who screwed up the software in the first place are no longer here. So why are we blaming each other? Making things right is what needs to be done. But that never happens! All the hostility creeps me out. And yes, I’ve fallen victim to these insecurities lately and I too carry a huge gun around waiting for my next firearms combat.

office_fight

But this is plain wrong. I don’t want to be hostile. I hate being that guy. I cannot blame people who screwed up my work because they’re not here anymore. Blaming them wouldn’t mean anything. Blaming anyone doesn’t mean anything. You’ve just got to agree that we screwed up and make the best of what you have. I love my software and I hate it when somebody tries to screw it up. I get mad at people and say stuff that I regret later. I want my work to be fun. Don’t screw it up please.

When you’re new to the software development game, everything has to be perfect. “Perfect” gets a new definition after you spend some time developing software. And, as time passes you realize that every single decision you make today – big or small – will come to haunt you if you don’t put your heart into it in the first place. Don’t be the person who fires the blame rockets everywhere. Nobody likes such people. It even makes you look really childish.

images

I try to see these problems as opportunities that need to be worked on. Improving the software makes my work more and more fulfilling. I’ve got a great team of developers/testers who are pretty much dedicated to building a good product. Encouraging them to do the same makes my work twice/thrice/.. as easier. That makes me happy. There will be a few glitches along the way. But, I’m glad to know that we’ll survive.

Monday, July 19, 2010

A compact PC-Lint error output file parser

This code has been hanging around in my drafts folder for quite some time now. I needed to get it out. I wrote this simple parser for extracting information from the .out file PC-Lint provides as output after its analysis. This information will further be fed to a VS add-in that would integrate this content with the editor. It's going to be a cool one! I'm going to setup the alpha version of the add-in next month on Google Code.

Here's the code.

public class PCLintOutputReader
{
    public PCLintOutputReader(string filePath)
    {
        _content = File.ReadAllText(filePath);
    }

    public List<ErrorMessageInfo> ParseTextErrorMessages()
    {
        const string errorPatternAsString = @"T:\s*(?<Type>\w*)\r\n"
                                          + @"N:\s*(?<ErrorNumber>[0-9]*)\r\n"
                                          + @"F:\s*(?<FileName>.*)\r\n"
                                          + @"L:\s*(?<LineNumber>[0-9]*)\r\n"
                                          + @"M:\s*(?<Message>.*)\r\n";

        Regex errorPattern = new Regex(errorPatternAsString, RegexOptions.Compiled | RegexOptions.IgnoreCase);

        var errorMessages = new List<ErrorMessageInfo>();
        var matches = errorPattern.Matches(_content);
        foreach (Match match in matches)
        {
            GroupCollection groups = match.Groups;
            errorMessages.Add(
                ErrorMessageInfo.Parse(groups["Type"].Value, groups["ErrorNumber"].Value, groups["FileName"].Value,
                    groups["LineNumber"].Value, groups["Message"].Value)
            );
        }

        return errorMessages;
    }

    private string _content;
}


public class ErrorMessageInfo
{
    public ErrorMessageInfo() { }
    public MessageType Type { get; set; }
    public int ErrorNumber { get; set; }
    public string FileName { get; set; }
    public int LineNumber { get; set; }
    public string Message { get; set; }

    public static ErrorMessageInfo Parse(string aType, string aErrorNumber, string aFileName, string aLineNumber, string aMessage)
    {
        ErrorMessageInfo errorMessage = new ErrorMessageInfo();
        switch (aType)
        {
            case "Info":
                errorMessage.Type = MessageType.Info;
                break;
            case "Warning":
                errorMessage.Type = MessageType.Warning;
                break;
            case "Error":
                errorMessage.Type = MessageType.Error;
                break;
            default:
                throw new ArgumentException("Could not identify the type of PC-Lint error.", aType);
        }

        int temp = 0;
        int.TryParse(aErrorNumber, out temp);
        errorMessage.ErrorNumber = temp;

        int.TryParse(aLineNumber, out temp);
        errorMessage.LineNumber = temp;

        errorMessage.FileName = aFileName;
        errorMessage.Message = aMessage;
        return errorMessage;
    }
}


public enum MessageType
{
    Info,
    Warning,
    Error
}

Disclaimer: This is a very amateur implementation of the solution. Kindly use the code at your own risk and don't blame me if your laptop bursts into flames. Please forgive any obvious coding convention errors. And let me know if you find any bugs.
Have fun!

Sunday, July 4, 2010

The Engineering Sprint

I was listening to Episode 164: Agile Testing with Lisa Crispin on SE-Radio a few days ago. It was a nice podcast and Lisa's views are very much similar to the views of hundreds of Agile experts out there. While describing the work she's currently into, she mentioned the term "Engineering Sprint".
An Engineering sprint is a 2 week long iteration every 6 months where the team tries out new tools, upgrades existing tools and tries out some new approach to do things better than the way its always done.
I really liked the idea. I do that on a regular basis. I'm always on the lookout to find new and better tools to do my work more efficiently. Nowadays, we do a lot of work - which with a little bit of thinking - can be automated and we can save ourselves a whole bunch of time. But, the team usually doesn't have time to look at the existing situation and evaluate options to make it better. It's the scrum master's responsibility to allocate enough time to each individual to make such evaluation and it is the team's responsibility to make sure they make the best of it.

I'm not asking for a 20% personal time like Google does. But, even letting the team know that such suggestions are welcome can go a long way in making things better. There are always people in the team who are bored of doing the same shitty work everyday. Let them do something different, something interesting and something which will make them more productive in future.

Friday, July 2, 2010

Give it a name!

We all make mistakes, both big and small. But there are always opportunities in life where the smart ones learn to hide their mistakes by redirecting attention to something good (or at least something that looks good). For example, I feel most of the famous and most delicious recipes have been the result of a screw-up. Like when the chef added a little too much pepper in the chicken, they called it 'Hot Pepper Chicken', more ginger and they called it 'Ginger Chicken'. Well, for one, these are fairly easy instances to get out of and second, you cannot always be a smart-ass. The lucky ones get away with murder.


But, making excuses is great till the time someone somewhere catches your bluff. It's really embarrassing then. Not trying to be some kind of a wise man or something. I just came across this topic tonight while preparing dinner when I added too much ginger garlic paste in the chicken. I'll call it 'Pro Ginger Garlic Chicken'.

Since you wasted your precious time reading this crap, the least I can do is leave you with a thought -
'When life gives you lemons - you don't make lemonade; you sell the lemons at double the price, buy lemonade with the first half and keep the second.'


Update: This variation of 'When life gives you lemons' was my own creation and it provoked me to look for more such related interesting quotes. I could find these -
"When life gives you lemons, buy a lemonade stand and use the profits to buy a machine gun. Lets see if life makes the same mistake twice."
"When God gives you lemons, find a new God."
"When life gives you lemons, make grape juice. Then sit back and watch the world try to figure out how you did it."
"When life gives you lemons, throw them at mean people."
"When life gives you lemons, trade it for an apple or something."
"When life gives you lemons, squeeze the juice into a squirt gun and squirt it into someone's eye. It'll make you feel better."
"When life gives you lemons, throw them away! WHO THE FUCK gives lemons out? Mercury Sympathizers thats who!"
"When life gives you lemons, make lemonade. Then give it to your enemies cause it'll be real shitty unless life gave you sugar too."
"When life gives you lemons, you should be use to it because you are a loser and you already have a shitload of them."
"When life gives you lemons, find someone who's life gives them fish & chips and enjoy."
"When life gives you lemons, gentically modify them and use your Super Lemons to destroy the world!"
"When life gives you lemons, rip said lemons in half and jam the wet ends into life's eyes. That'll teach the fucker."
"When life gives you lemons, sell them on e-bay."
"When life gives you lemons, ask for the receipt."
"When life hands you lemons, make lemonade and find someone else who life handed vodka to, and have a party."

P.S. I promise my future posts will definitely be more sensible.

Wednesday, June 23, 2010

Not the world's most faithful employee

Yes, I'm not the world's most faithful employee. But then, who is? I haven't been fair to my employer by lurking around for better opportunities or as they say "looking for greener grass". But, who doesn't do that? I'm not The Buddha or Mr. HarishChandra to always be true about whatever I do.

And one fine day I get a cool offer letter from XYZ corp. Yay! Sounds great, doesn't it? Oh wait, you haven't heard the half of it yet. Lets go back a couple of moments from when the mail popped into my inbox. This is what happened - My reporting manager and I are having a nice code review for a feature I've been implementing for some time. We're completely immersed into the review and I'm explaining her on how the code works. "Bing" goes my desktop and an Outlook alert pops up saying, "Offer letter from XYZ" and we totally froze for about a couple of seconds. Now comes the difficult part; behaving as if nothing happened. So we do our expression-less poker face which would look somewhat like this.


But, she's freaked out inside somewhat like this.


And, the best thing was that we didn't talk about it even after the review was over; extremely professional ya know! Uh, not so professional when I realized she had called up my project manager and informed that they were losing a developer (I really couldn't find a picture to portray his grief). As far as XYZ is concerned, they won't have the pleasure of working with me. Will call up and reject the offer tomorrow. I'm staying.

Edit: 
My good friend @Gamer_Rags guessed what my project manager's face would be like. I've actually seen that face today. Thanks buddy!


I really need a disclaimer. Have a nice evening!

Sunday, June 20, 2010

The Beginning

So here I am wondering what to write on this blog and I really can't find a topic on which I could endlessly blabber about. But, I'm human. I come across new stuff everyday. Good stuff, bad stuff, beautiful stuff, ugly stuff and stuff I shouldn't blog about. Well, now that stuff has a home, it's here. Today I'm going to talk about stuff that has been on my mind and stuff I want to share about my new blog - sort of a curtain raiser. Here we go.

Why a new blog?
I'm not a blog hopper. I knew I wanted a new blog. My old blog on GeeksWithBlogs.net was a totally technical blog and writing personal stuff over there was not really a great idea. The good thing is that that frickin' blog still gets at least 40 hits a day only with 20 posts! Google Search really helps the blog stay alive. The GeeksWithBlogs.net community is totally awesome and I really liked posting out there. But, that's past now. I want my blog to be both technical as well as personal. I want my blog to be a place where I share my views on things that happen to me in my life. And, I want my blog to be a portrayal of myself and not as some XYZ blogger on GWB. Soon, I'll move to a custom domain. That would help me getting my blog a unique identity.

The Technical Side
Well, if you ask me what I do, I'd say "I'm a professional C++/C# developer". But, I'm glad it doesn't end there. I'll try to share every tool I work with, every great coding experience I come across and every interesting software development tidbit. I currently work with Windows XP (Yes, I still work on WinXP), and Visual Studio 2008. I keep using tools like CppUnit, NUnit, NAnt and Compuware DevPartner. My current job includes compiler design and development, but I'll try to avoid any talk about it as it can get really really boring. I remember studying "Compiler Design" during the 6th semester of engineering - it was hell. I'm a software developer at heart. I take pride in what I do and sharing my experiences about it helps me know that I'm learning something new everyday.

The Personal Side
I love/hate a lot of people (the latter being larger in number) for the things they do everyday. There are some super-annoying people and some incredibly awesome people who I interact with everyday. I could ramble about them for hours. And then there's me - the super-annoying incredibly awesome person. All the crazy things I do will be a part of this blog.

The Name of the Blog
Well, I've been looking for good blog names for quite some time now. I could come up with a few including
Websteroy
Royware
Royology
... and I realized how much I suck on producing good names. The search for a good blog name kept me from actually starting the blog. It's no wonder I'm a champion procrastinator. I keep finding ways to not do what I'm supposed to do. So Ellogical is not really a fixed and final name for this blog. I just had to give it a go. Drop in a comment about what you think about the blog's name or if you can suggest some other good name for this blog.

Killing the smileys
Although this blog is a personal-cum-work related blog, this is fairly serious writing and there will be no smileys (I'll try to control myself as much as possible). I use them regularly on Twitter as sometimes 140 characters are not enough to express joy, sorrow, etc. But, here, it's a no-no.

Swearing
I'm an angry person and I'm totally allowed to use expletives out here. IT'S MY F**KING BLOG. You don't tell me what I can/should write.

What next?
Not a bad start, but I really don't know what my next post will be about. I'm sure I can find something to talk about. Till then, have fun. Peace.