Tuesday, December 29, 2009

Justifying Failure

Sometimes you don’t fail because you didn’t work hard enough..

Sometimes it’s because you didn’t exactly know what to do…

But could that be a justification???

Thursday, December 17, 2009

To study or not to study..

It’s been long since I have written something for my blog, or written anything for that matter. And today when I am here, I shouldn’t be.. I have taken an off from office and I should be doing nothing but studying.. but allow me to justify my (extra curricular) activities by saying “I am tuning myself to my study mode” :P

 

Anyways, this is supposed to be my second last semester of Masters, and InshaAllah, I’ll be done with Masters in July 2010.

But sometimes I wonder whether it is of any use studying all this or not. For e.g. two out of three courses I am taking this semester are pretty interesting and knowledgeable, but all the knowledge gained (that is, if I do gain any) will be lost as I won’t be able to implement any of it. I am not at this point in a position to implement them. But then again, if I learn them now, I hopefully won’t have to learn it the hard way, that is, if I remember all the things I learn, and if I forget then it would mean I would have to learn them all over again the hard way. Then what exactly am I doing here?

 

But then again I don’t expect to gain any technical knowledge in Masters, now, do I? We were supposed to do that in BS and after that you are on your own.

 

I had a conversation with a friend a while back, and she was of the opinion that if you sit in a class for three hours, every week, for an entire semester and then also give exams, you are bound to learn SOMETHING.. and she is right. You ARE bound to learn something.

But… Do I pay attention in the class?? (well, that’s my fault only) and there are still a lot of other things.. would I learn enough? would I remember enough? Would I be able to implement or make use of it? Ever?? Would saying that I have a Masters degree (once I inshaAllah get it) would be correct? Would I have the same amount of knowledge a Masters degree holder should have?

Or am I just wasting my time?

Well, right now, I AM.. I should be studying.. I have a paper tomorrow..

u15799552

 

 

 

 studying-main_full

But hey, people, who read this some day.. share your experiences.. am I the only one feeling this or do all of us go through this at some point in time… :|

Sunday, November 1, 2009

Inserting HTML tags

The problem with writing HTML, ASP etc. codes in your page is that the browser considers anything starting with an angle bracket as HTML code, it will try to make something of the code and hence your page will not be the way you intended it to be.

Let's say you are writing a tutorial for HTML and you want to convey to your readers how to make certain words appear bold in html. You'll naturally use the tag for bold... you'll try to use the tag, write some text within the opening and closing tags and try to show your users how the tag is used... instead, what you'll get will be the text appearing as bold and the tags used to make words appear bold absent.. this is because the browser considered the bold tag to be what it actually is.. the bold tag, it would think that you intended the text to appear in bold.. how is it supposed to know you are writing a tutorial anyways... (on second thought, if you are good enough to be writing HTML tutorials.. you would know this already)

What makes a tag, a tag are the surrounding angle brackets.. if you omit them anything you write won't be considered HTML or ASP tags.. the trick is to use the codes for the angle brackets...
The codes are as follows









<&lt;
>&gt;


So for the above example, you'll write something like..

<b>This is bold text.</b>

Refer to the following link for more codes..
http://codex.wordpress.org/Writing_Code_in_Your_Posts

Sunday, October 18, 2009

My Blog is Fabulous

There are people in this world who think my blog is fabulous.. Yeh!!!!!!

Hurray!!!!!

** Happy Happy **

** Smile Smile **

 

Haris  Gulzar honoured me with this award.. Thanks a lot :D

Do I have to give a award-receiving-speech? I think, I better not :P

 

Here is the award:

image

Rules of the Award:

* List five current obsessions.

* Pass the award on to five more fabulous blogs.

* On your post of receiving this award, make sure you include the person that gave you the award and link it back to them.

* When you post your five winners, make sure you link them as well.

* Don’t forget to let your winners know they won an award from you by leaving a comment on their blog.

 

Hmm… so FIVE obsessions.. really? five?

 

Okay, let’s try it.. (I think I’ll copy some of Haris’s, coz when I read them, some of them seemed like mine.. :) )

 

TV Shows:

I have been a TV buff, since,… well… as long as I can remember. No matter what’s happening in the world, no matter if I have an important exam the next day, I would still find some time for TV. :)

Now I don’t watch TV, but I still watch TV shows.. on my computer.. I won’t even start listing the shows I have, do or plan to watch.. it would be a complete waste of space.. so just believe me when I say this,  it’s an obsession all right.. :)

 

Farmville: (for the lack of a better obsession :P )

It’s an on and off obsession.

I have never been a games freak. And I still won’t call myself that.

Some of my friends got me to play Farmville, and as I said, since then, it has become an on and off obsession.

Sometimes I don’t even like playing it, and I still keep playing.

Yesterday, if  I hadn’t been playing farmie here, I would have completed that dreaded, lengthy fourth chapter, and would have been able to write *SOMETHING* in the paper. The teacher gave a full question out of chapter 4, and only those topics from that chapter, which I didn’t even bother skimming through.. Can you believe it!!! Well, I know, everyone can… it must have happened with everyone at one time or the other..

 

Talking:

Oh now I am getting the hang of it, coz talking is REALLY an obsession. I can talk for hours.. seriously HOURS

My mom sometimes gets so irritated that she asks me to stop talking.

My friends.. well.. most of them are just like me.. Anyone else, who isn’t that talkative, can’t bare me, let alone be my friend.. :)

If you want prove… check out the length of this post.. it said to list down 5 obsessions.. I could have just abided by the rules and listed them down, instead of writing a story for each..

A lot of people, well one in particular, (are you reading this post? or did you just leave it, like all other posts? :P) has complained about how long my posts are, and how he can’t read any of them, because they are all soo long…

I would stop now.. I’ll write a post on this obsession sometime, maybe.. :P

 

 

Eating: (this is one of Haris’s)

Yes, me too, I live to eat.. not eat to live..

If I am working/studying I get hungry.

If I am free I get hungry.

I eat a lot when I have exams.. and I always have exams.. so.. well…

(and they have just called me for dinner.. haha :P)

 

Chatting:

Is that the same as talking?? well, I am talking about internet, instant-messenger chatting…

I get tired of typing, and I still chat.

I sit in front of the computer at office, and still when I come back to home, I switch on my computer and sign-in to all the messengers.. and pity the person I find online at that time.. I’ll keep bugging that person, till they decide to answer :P

Okay, here are the five blogs I follow, and are fabulous for me

Rambler

Ammad Saleem's Blog

Things I’ll never say

Bewildered Soliloquy

What happens in London

 

I have been really late with this post. I didn’t do any justice with the tag… and this time I won’t give the I have been busy excuse.. but that’s what I have been, busy.. oh was that the same excuse? :P :P

Thank you, Haris, once again, for honouring my blog with this fabulous award. :D :D

Friday, October 9, 2009

Sometimes goodbye’s the only way

I read a blog post, a while ago, about friendships and how they are supposed to always, always end. (Will post the link when I find it)

And the writer was absolutely right.

There was this line in the article that I really liked, and it was something like

“Your friends would do exactly what they promised they won’t do”

And this is a fact. Because when we make friends we just consider them “our friends”, forgetting the most crucial fact.. they are also “people”.

No one’s like you, no one is supposed to be like you. What would be the fun in life when everyone was just the same as you are. What would be the fun if everyone understood each other.

That article constantly reminded that all friendships eventually reach the same fate… “THE END”… all are supposed to end at one point or the other, the thing is, when would that point come.. sooner than you think.. or later than you anticipated.

But I have to disagree with the “ALL” part. Not ALL friendships end. Sometimes you have to make compromises, sometimes you forget about your ego for the other person, that is the time when you realize that your ego is insignificant as compared to the friendship you share with that particular friend of yours. Sometimes you give the other person a second chance. Sometimes you find a way out of the misunderstandings. Sometimes the fights would lead to a better, stronger friendship.. but not all the time… So you fight when you want to end the misunderstandings and continue with the good times as if they were not interrupted at all.

But there are also times,….

When you realize that there are too many misunderstandings, too many problems without a solution, at that time, instead of using harsh words and ending up hurting each other and THEN ending everything.. it’s better just to end it, without the preceding “big fight”.

Sometimes goodbye’s the only way… for everyone involved. It’s not good, but then again, it’s not supposed to be good, but it’s the only way.. and you would eventually GET OVER IT, you’ll HAVE TO.

 

Say your goodbyes with a smile.. and let go…

Sunday, September 27, 2009

Happy Second Birthday to Intricate Zone!!!!!


Happy Second Birthday to my blog.. Intricate Zone... YEH!!!!!!

The first post "And Pakistan Lost" was published on September 25, 2007.
And the blog has now completed TWO WHOLE YEARS... HURRAY!!!! :D :D :D :D

Though the journey started with a different address, but who's noticing..

Yeh.. again...
:D
:D
:D
:D
:D

Good thing I don't have to repeat the same kind of story as was narrated in my first post, coz yesterday Pakistan WON!!!! against India.. Yeh again!!!!!! Hurray again!!!!

And yet again...
Happy Birthday to my blog...
Happy Birthday to Intricate Zone......

:D
:D
:D
:D
:D
:D

Friday, August 28, 2009

Those magical, magical days…..

While I was chatting with a few friends of mine, at night, a memory long buried popped up in my head and demanded attention. And I asked The Writer, when I didn’t think he would know a thing about it, let alone remember it;

“Did you in your childhood read/heard the story Podna Podni?”

And as a reply, I got an excerpt from the story itself. He remembered the full story word for word. We went on discussing our favorite parts of the story. Mine was

“Guhs guhs mere kaan mein guhs” :P

(While on another window I started narrating the whole Podna Podni story to a friend, who had somehow missed it in her childhood).

This is a story I heard in Kassette Kahani. I don’t know how many of you have spent your childhood hearing these Kassette Kahani’s but I know a major part of mine was spent listening, and relistening to them. Always getting my parents to buy me the volumes I didn’t already have. Each Kassette Kahani would have an advertisment of the Kassette next in the series, and then I would want that one too. Traded it with friends just so that I could hear the entire collection. Although some of these stories were the Urdu translation of fairy tales like “Jack and the Beanstalk” and “Cinderella”, these would be the ones I have had had a pleasure of reading as well, but hearing it was another kind of magic.

In the Kassette, the story of Podna Podni is narrated by a Nani amaan to little kids.

For those of you who are wondering; Podna is the name of a little bird (am not sure what the English word for Podna is, was it Sparrow?) Anyways, the King’s men caught Podni and then Podna sets out on a mission to rescue his Podni from “Raja”. Along the way, he meets ants, ocean.. and something else, I still can’t remember what the third thing was, these three after hearing Podna’s noble mission, offers him their help, in reply to which, Podna says;

“Guhs guhs mere kaan mein guhs”

In the end, of course, like all kid’s stories, Podna rescues Podni from Raja with the help of his three friends…

This post is in the memory of all those days, we spent reading and hearing fairy tales. The time long gone, but which still gives pleasure. Those were truly the days… :D

Monday, August 24, 2009

A year gone by

I have been meaning to write this post since 1st July, 2009, but never got around to actually writing it, and until recently I had decided not to write at all.. But it’s worth a shot :)

So… 1st July, 2009 was the date I completed exactly one year at my job. One year gone by.. first year completed of the career journey. And if I think about it, a lot has changed since I graduated from University and joined my very first job. And of course, this is nothing new, it happens with every one, and so has happened with me as well.

There was a time, when I had spent a month at office and a senior had commented

“Aap ko aik maheena ho bhi gaya.. aur pata bhi nahi chala”. (You’ve been here for a month, it didn’t seem like a month to me)

I took no time in replying

“Mujhe se pochein, mujhe to aik aik din pata chala” :P

Such was the extent of my boredom, during the first month. All I was expected to do was to read documents and even edit them. It took me everything not to say

“You know na, I haven’t been hired as a technical writer, rather as a Software Engineer. My appointment letter actually says ‘Associate Software Engineer’.”

At that time, I couldn’t figure out WHY on earth was I being asked to edit some centuries old document, and put in what.. screenshots!!!!

I was also given the code of one of the projects and was asked to go through it

“Ghool ke pee lein isay”

my Boss would tell me. And this is what I tried to do, of course, I wasn’t actually able to do the same, but that did help me to understand a lot of things.

I can still remember my first meeting cum training session, where my supervisors explained the entire theme of the project on a small white board. I don’t think I remember any thing else from the meeting.. except a few terms I didn’t have a clue about.. and I wondered why everyone kept using them but I never realized those terms will become a part of my vocabulary, and I’ll be the one using them in every sentence that comes out of my mouth.. :P

My vocabulary is now punctuated with a lot of terms which don’t actually exist in the dictionary, and if they do, not at all in the sense we use them in our day to day life. The process started when I joined University.. I learnt the word Cheetah there, before that we simply used the word Genius or Einstein… and I thought the process would end there, and that I have learnt all the jargon terms.. but I was so wrong.. In this training session, the words that got my attention and got stuck in my memory were.. let me put the entire sentences here..

Code nahi phatna chaye

Peeli screen nahi aani chaye, chahe kuch ho jaye.. koi bhi screen aa jaye.. peeli screen nahi aani chaye…

Yeah.. go on, call me illiterate for not knowing these terms during bachelors, but we actually didn’t. We simply used to say, in plain terms.. “Yaar error aa gaya”

But now I use all these terms like I learnt them during my first year in this world and not the first year at job.

The first month went by slowly.. with no friends at the new place, my reserved self refusing to go and talk to any one unless and until it was absolutely necessary, avoiding a face-to-face conversation as much as possible, and using our network chat software, trying to figure out whether I’ll be editing documents all the time, or will I be given actual work someday, and then at a later time, am I Support Engineer or what, I should have joined Support instead of the so-called Development team.

But things began to roll, slowly at first, the clients called up with all the problems. In fact, my very first cut over was to go live with all the modifications. I was taken to the client side so that I can get accustomed to the environment, meet our clients and all. That cutover, went smoothly enough. Just one script refused to execute, giving an error every time we tried. I got nervous like anything.. saying things like

Phele to yeh script sahi chal rahi thi (This script worked fine before.)

Thankfully, my supervisor handled the situation pretty well, not loosing his head like I did on the face of a problematic script (:P).

And this above, is actually called a smooth enough cutover, because there are always problems.. always…

I was given a project, which can’t actually be called a project from scratch, but it wasn’t equivalent to giving support to clients either. I was to develop a new module in the existing site, and I wasn’t even able to complete that when I was given another project, I was asked to make changes (which started out as a few changes and later became a big change) in the same project (but on the existing modules).

Then came the time when I was to visit the client side and test out all the new developments and modifications. Again, my boss sensing my nervousness decided that he and my supervisor will go along with me, to make sure everything’s going fine.

My boss asked me then

How much time do you think it will take you to test out everything?

And I said something like.. two hours or maybe two days… and it actually turned out to be WEEKS!!! That time was horrible (but marvelous at the same time :D), I discovered a lot of things I had done wrong, because I didn’t know any better, I used to take the office laptop at home and worked there, then directly went to the client side the next day.

But all that going to the client side for so long, did a very good thing. Before that, I didn’t really like going to the office everyday, but after the client’s visit, I thought, going to office is much better than going to the client side, and though I hadn’t really made any friends at office, at least there was some one to talk to, I could roam about.. and that’s what I did when I came back.. I roamed about, and talked to everyone.. and I started to ease-in a bit with the environment..

Again changes were requested in the project currently deployed at the test server. And again I went through the same cycle; development, testing, testing at client side, entertaining their farmaishine (wishlist).. it was another month or so there.. and finally, a cutover.. on a SUNDAY!!!

During this time I got permanent as well.. thankfully.. I was worried that after so many problems occurring at the client side, they won’t make me a permanent employee… might even let me go.. :)

My Masters began after a month into the job as well.. so all was going at the same time, job, first project, first cutover, classes, midterms, assignments, finals… everything.. and we thought Bachelors was difficult. :P

So eventually the project ended, went live with it, and since then, it has been one project after the other, and the journey uptil now has been good. At the beginning, I took more tension then needed, but slowly I got used to it, now I don’t deliberately forget about lunch just because I have work to do. I’ll always have work to do, so better always have something to eat to go along :P

For once in my life, I am getting along with my seniors. Never during my academic life (till Bachelors) have I ever been friends with any of my seniors. My seniors didn’t know me, and I didn’t know them, that is changing (but not much), I hope for the betterment. :)

(This post, highly resembles another post of mine, doesn’t it.. can’t help it.. just love to talk about the first few months at my job :P)

So, I have grown from a fresh graduate to one-year experienced employee, from someone who sat quietly at the corner, working and only working, with no messengers connected, to a person to whom people keep telling “aik yahoo messenger hee reh gaya hai woh bhi khul lo yaar” (Only Yahoo! Messenger has not been installed, why don’t you go ahead with that too?), from a person who didn’t budge from her seat now keeps bugging people until one of them agrees to go to the tuck shop with her, from the person who came in the office, switched on her computer and started working immediately to a person who now gets everyone to go to the roof with her before starting work, from the person who completely forgot the meaning of the term lunch, now starts buzzing her lunch mates to go to lunch from noon almost every other day… and the list goes on…

I know this has been the story with everyone else, but looking back at the year makes me realize that it was a good first year, MashaAllah, Allah ka shukar, :D, hope the rest of the career is as fun, or more fun.. Let’s just keep hoping for the very best and nothing else :D

Saturday, August 22, 2009

Ramzan is here...

And from tomorrow starts the blessed month of Ramadan in Pakistan. :)

We all know that this months brings with it blessings. But it's not only about fasting, it's also about earning more sawab in this month.

We should be praying more and reciting Quran more in Ramadan, and most of us definitely do that, but as it turns out for some of us (and here I am including myself), eat and sleep more during this month. Work and school goes out early so that gives us an opportunity to sleep during the evening as well. We go to sleep early at night so that we can get up in sehri, and then go to sleep again after fajar. This time, we should all try to spend more time in praying.. as one of my university teachers once said;
Sonay se kya ho ga? Kya kal phir neend nahi aye gee? Koi yeh keh de ke mein abhi zada so jaon to agla pura hafta nahi soan ga to woh aur baat hai, par aisa hota to nahi. Phir Ramzan mein to subha jaldi uth jaya karein aap loog. Neend to kabhi puri nahi ho gee.. shayad akhir mein ho jaye.. par woh bhi zaroori nahi
So, this time, let us all try to do the following;
  • Recite Quran as much as possible.
  • Recite the surahs we have memorized as much as possible. This can be done while travelling to and from work/school.
  • Recite Kalmas as much as possible. Again, can be done while travelling to and from work/school.
  • Try to memorize more surahs, but not just memorize the Arabic words, but the translation as well. And let us all try to understand the words.
  • Educate ourselves about our religion. The only way we can improve the image of Muslims in the eyes of the whole wide world is to become better muslims, and we can do that only if we try to earn more knowledge about Islam.
Have a blessed Ramzan everyone. May Allah bestow us with his blessings always. Ameen. :)


Sunday, June 28, 2009

AJAX Control Toolkit

With .NET 3.5, you can easily work on AJAX without installing any add-on. AJAX can be used in any web application without any hassel to speak of. And with AJAX more interactivity can be put in an application.

AJAX control toolkit makes life more easier. It provides many interactive controls, that can be put in your application easily. It is an open-source project.

How to start using AJAX Control Toolkit:

1. Download the toolkit here
2. Here's a video that explains how to set up the toolkit.


ASP.Net's official website gives an over view of all the controls provided in the toolkit here.


With the toolkit you can easily put animation in your app. There are a lot of things which can prove to be very helpful. You should definitely go through the above link, it shows how all the controls work, plus code is given to help you get you on your way to using these control effectively.

For every page that's going to use AJAX, or the toolkit (in other words, AJAX) ScriptManager has to be added.
All you have to do is put

<asp:ScriptManager ID = "Scr_Mgr" runat = "server" />


Plus to use the toolkit you have to register it first. If you just drag and drop any control then the below line of code would be added automatically, other wise you can put the line yourself;

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

Masked Edit Extender:
In the application I am working on these days; I have to provide a mask for the text box, so that each user who enters data can simply punch in the characters and the data will be formatted automatically. Of course, you can use a javascript for this, it's not like people didn't do this before AJAX came into the scene. But with the toolkit, as I mentioned, it becomes much more easier.

For the above scenario, Masked Edit Extender can be used. Masked Edit Extender, extends a textbox, you have to provide a Mask. Mask basically tells the format of the data.

Let's say you are looking for a format like this: "0312-3456789".
The syntax would go something like this;


<asp:ScriptManager ID = "Scr_Mgr" runat = "server" />
<asp:TextBox ID = "txtbx" runat = "server" />

<cc1:MaskedEditExtender ID="txtbx_MaskedEditExtender" runat="server"
TargetControlID="txtbx"
Mask = "9999-9999999"
MessageValidatorTip="true"
MaskType= "None"
InputDirection="LeftToRight"
AcceptNegative="Left"
DisplayMoney="None"
ErrorTooltipEnabled = "true"
ClearMaskOnLostFocus = "false" >
</cc1:MaskedEditExtender>


1. It doesn't let you type more than the number of characters in the mask.
2. It lets you type letters if the mask allows you to. So say you put mask as
"AAAA-99999", for the first four characters only letters will be allowed, and no numbers,
and for the rest of the input, only numbers will be allowed, no letters.

The problem I faced was that, the mask appeared only when the user clicked on the text box, and when
the user was done typing and as the focus shifted to some other control, the input data again became
unformatted. That too can be handled simply by setting a property.

ClearMaskOnLostFocus = "false"

That's all for the moment. Other controls I found helpful are: Filetered Text Box and Validator Callout.
Might write something on them soon. :)

Thursday, June 25, 2009

Shadows of the past.....

It amazes me sometimes, how we keep living in the past. How something bad that happened to us a long time ago still has the power to affect us. I am not talking about things that have put a permanent dent on our lives, but things that we have overcome, simple facts that we have learnt to live with, the facts that are no more facts.
A simple example would be not getting something you really worked hard for, and even after you have realized that that something really wasn't for you, and what you've got as a substitute proved to be perfect for you. That not getting that something, not getting your desire, not getting what you wished dearly for, may have been depressing at the moment, but all got better after that. And maybe you got what you wanted to, but a little late. And you know all this, you know that whatever happened, happened for a reason, and a good one. You know that what happened was the best thing that could've happened to you, but whenever you are pushed down the memory lane, and you have to travel through the same depressing time again, why aren't we strong enough to make the journey down that road again with a smile, knowing that it had all passed now, and what you have at the present is good enough for you. Why?

And why, when you keep on telling people, who are going through something like that in the present, that everything will be fine. You keep reminding them that life won't give you anything you can't handle, and you really believe it too.

But even then, why do we still let that past control our today??
Or... is it just me????

Tuesday, June 23, 2009

And Pakistan brings home the cup..

Again this is not an informative/news post.. EVERYONE knows Pakistan won Cricket World Cup T20, those who didn't watch the match, got to know that by the excited chattering of their cricket-lover friends..
Then what this post is for then? Well.. nothing,, just a post :P

Almost everyone, even people who after being disappointed again and again by Pakistan team's performance, put aside their frustrations and watched the final match between Pakistan and Sri Lanka.

Sri Lanka, who had not lost a single match throughout the tournament, finally lost the most important match of all. But they did play very well. It was not a match won easily. It was not an easy win, and hence deserving, with superb performances by our team. :D :D


And so the people went crazy. We've been disappointed too many times, that when Pakistan won the match, and when we Pakistanis finally got a good news amidst the troubles the nation has been facing for quite a while now, all went delirious (well, most) in their own unique ways.

It was quite a celebration everywhere.

As soon as Pakistan won, people started messaging each other, sending their congratulations to their friends. Appropriately saying.. "We WON!!!!"

Many had already gathered at friend's places so that they can watch the match together, and that sure would have been fun.

The next day, people were actually hugging each other and saying congratulations.

Almost everyone on my messenger and gtalk list mentioned in their nicks that: "Yehhhh.. Pakistan won" (by the grace of Allah)

This was prove enough that we were all full of bliss.. :D

A good post, with a few facts can be found at Ammad Saleem's blog


Monday, June 22, 2009

Office Chuckles

Note:
The following though may not be very funny for all, and it wasn't exactly hilarious for me either, but it was something I thought was worth sharing on blog.. so here goes.. (aren't Notes supposed to be in the end??? well.. never mind.. :) )

As I sat trying to work my way through the log files, trying to find the reason due to which the customers were facing an error, thinking..
"Ab kya phat gaya yaar?" ("NOW what's wrong?")

suddenly a voice like "Peeepp" from behind me startled me, but only for a few seconds, as I realized what it was, I got back to my work.

A message popped on my screen (Office Network Chat);
F:
"That voice...any idea?"

Me:
"Yup, it's the laptop. Apni zindagi kee akhri saansein letay waqt chila raha hai.. (crying while counting minutes to it's death)"

F:
"Oh...."

The peep voice continued and after a while I added.

Me:
"And all of us are too busy to put the laptop to peace. We'll let it shout and disturb us rather than get up and do something about it. Getting up and taking a few steps towards the laptop may be counted as exercise you know."

F:
"Then why don't you get up if you are so worried about it."

Me:
"Naah... Let it be"

Just about then I found the root of error and called my boss. At that point my boss and the people sitting next to him realized the noise pollution emitting from the cubicle near me... It took them a few seconds to realize that it was the laptop. And I, helpful as I am (:P), suggested that we keep it for charging.
And my boss, as he walked towards the laptop, rejected my suggestion and did something more wise.. He put it to sleep... (equivalent to killing it in accordance with my analogy of the laptop dying).

Though it was the obvious thing to do if you weren't in the mood of going through the hassle of putting the laptop on charge, neither F nor I came up with it. And it was a little funny when I saw my boss executing the easier solution.

Friday, June 19, 2009

Cricket World Cup T20




It's been a long long time, almost two years, since I have watched cricket.
When I did watch, it was more for the love of watching Pakistan win than the love for the game itself. I have always been interested in Pakistan playing and winning (of course) as compared to enjoying the game.
And why it has been so long.... the last year at Bachelors, which we like to call the FYP year was spent doing a lot of things; studying, making your FYP, job surfing, interviews and of course enjoying the last year, celebrating days etc. I was so busy doing all this that I forgot about cricket altogether. Plus, the last World Cup, with the coach's story and Inzi resigning and Pakistan loosing horribly, didn't help at all. And then when that hectic year ended, another began, and the tempo was lost somewhere. :P
Anyways, so these days, I am not actually free, but I have found my long-lost interest in Cricket... that may very well be because of the fact that Pakistan is performing better. Plus, after every match, team mates discuss the highlights. All this was bound to get me back on my track..
So ta-daaaa I am back!!!!!!

Anyways, so I am not actually here to discuss World Cup T-20, if you wanna do that.. go hang out on Cricinfo... Here we'll be discussing something else... :P This is a trip down the memory lane.. only people who were there with me will be able to enjoy this (of that too there is only a thin chance) :P

So all of this cricket-fuss reminded me of the time when I used to be a die-hard fan and still couldn't understand why there was such a thing as LBW.. :P

Only one of the girls in my class shared my never-dying (which eventually did die.. but only for a while) devotion for Pakistan team, and only one was what I needed.
During breaks between classes, we'll rush to the computer labs, trying to find a free computer, hurridely logging in and then checking cricinfo for the latest updates. But more fun was when we didn't find any free computer, but still we couldn't risk not knowing ball-to-ball details, so we would go and nag others;


  1. We would either find someone with cricinfo open (and there were many!!), we would make sure they happen to come in our route to the door, and give a furtive, non-interested glance to their computers while we were passing by, and there... we'll have our scores.

  2. Or we'll sneak up on our unsuspecting friends, snatch away the keyboards from them, and check the score. And hear things like;

    "Koi kaam nahi hai tum logon ko kya????"



    "Don't you people have TRW class?"



    "Khud ko to kuch karna nahi hai.. humein to project/assignment bananye do...."



And then there was that day, when one of our teachers, who proved to be an even-bigger fan, started discussing a match, giving her comments (and that too like an expert) on yesterday's game, and suddenly one of the guys stood up, and said, with a very serious expression on his face..

"Ma'am mein abhi ja ke score check kar ke aata hoon"

like that was the most important thing in the world to do at that exact moment.. and seriously it was... :) :P


And then came the World Cup... I wasn't disappointed at Pakistan loosing, more disappointed by the way our people were reacting. No matter how important it is for anyone to watch Pakistan win, it's still just a game, nothing more, nothing less.. These are the people who make heroes and they are the ones who perish them.

And I remember.. well not exactly, as I didn't watch the match... the match between Pakistan and Ireland, which unfortunately Pakistan lost, and which was Inzimam's last match.

Back to the present, as Rambler and I were going up the flight of stairs, making our way towards the lunch room and we had an encounter with two ladies coming back from lunch....

Lubrilu:
"Mubarak ho India haar gaya"

And as the match I mentioned above (the one between Pakistan and India), was all that I had on my mind that day, I found the mention of cricket as a great opportunity to let everyone have an insight on my story... I immediately switched into my story-telling mode, not caring at all whether anyone was interested even a bit or not;

"I remember that Pakistan-Ireland match... and can you imagine? I had a mid-term the next day.. and that too of Software Engineering.. Why would they ever schedule papers during World Cup... "

FarQuest said:
"And I know you still watched the match"

Me:
"NO!!!! I studied.. and I flunked... well what else was I supposed to do... Almost everyone failed that mid-term.."


(And I don't know why I would mention something like me failing a paper on my blog.. but well.. I just did. And I'll get people to comment and vouch for 'everyone failed that midterm..' to prove that I wasn't the only one)

The reason I decided to mention this match was that I still remember the only glimpse I had of that match.. Inzimam-ul-haq going back to the pavilion after playing his last batting inning, with tears in his eyes... You put in so much of your time on a game, even if you are playing for yourself, and not for your country or your team, even then.... you deserve a better farewell than Inzi got.. His team mates might have given him a better one.. and maybe Pakistanis did too, and I just don't know of that, but what I do know is that what was happening in those days, our reaction at that time.. well, they weren't good.. :)

And as that was the last match I watched before I lost my interest in Cricket, it's going through my head these days, this match and all the fun we had in uni, the way we died to hear of the updated score. And I thought I should better write a post on it (for the need of having something better to write)

Anyways.. I am back on track.. I have started watching cricket again.. Pakistan is in Finals (YEHHH!!!)
Yesterday, everyone was hugging each other and saying Congratulations like Pakistan has won the final already.. (when it has won the semi-final only, I hope it does win the finals, and then it will be time for celebration..)
And about two to three times, the semi final was discussed by my team-mates.. Sentences like
"Kya awesoommee match tha yaar.."

kept landing on my ears...

P.S:

  1. The first post I wrote on my blog was of Pakistan loosing the match.. :P

  2. The Writer commented on me a few days ago..
    "You can write an essay on anything"

    Though I did not take very lightly to that comment.. but I think I have just proved him right, haven't I?
    Just wrote a mindless post.. on a mindless topic, which was completely OFF the topic... :P :P



Sunday, April 26, 2009

Saturday, April 18, 2009

We, the "IT" people

Excerpt from a chat session with a uni friend. This must have happened somewhere in July, August 2008.

Me:"The fact that you are not replying to me and am still talking is prove enough of how boooreedd to death I am"

Dhat: "Yeah... they say Software Engineers go crazy after a while"


I have had my share of IT people, and when I joined my job I promised myself I wouldn't join their league. I have this friend, who because of the pressure he has to endure at work, has become very quiet. He spends his entire day at office, and that's more than the usual 9-6 timing. Then at home too, he sits either in front of the tv or spends his time with his beloved laptop. And this is exactly what I didn't wish myself to get into.

And during the first few months, I held true to my promise. After 4 hard years at university, where even when we were at our homes, we had to spend our time working on the computer as we had a lot of assignments, projects and presentations to get done. So naturally, when I joined job and came back home at about 7, and had nothing to do at all, I felt I had a lot of time on my hands, and I spent it sitting with my father, talking endlessly, then I would go to the kitchen and sit on a stool and talk to my mother, both of them now know everyone I know at my office. And then I don't know what happened, but I went back to my old routine, which includes coming back at home, freshing up and then switching on the computer. Sometimes the excuse is;

"I have to submit this presentation proposal tomorrow."
OR
"I have a long overdue assignment I have to work on"


But they are just that.. excuses, mere excuses. And I too have become a part of the league I was trying to evade in the beginning. It hasn't been one year yet and I have broken the promise I made to myself.
In my university days, when I noticed what that friend of mine (the one I wrote about above) was doing to himself and when I thought that his family must miss talking to him, my resolution not to become like him one day strengthened. But now, I have become just like him. And it's not just me, it's the story of every other software engineer I know.

We all wake up in the morning, as late as possible, get ready for work, go to our offices, sit in front of our machines for 9 hours or more, then come back to our homes and then again switch on our machines, and spend the remaining of our day in front of our Home PCs. The only times we aren't sitting in front of our computers is when we are eating, sleeping, or traveling. We don't have much time to talk to our families, or our friends. We don't know what's going on in their lives, and we don't much care either. We get more worried when our computer breaks down, then we care about when one of our friends is feeling low.

The friendships that have remained since I graduated are with the people who have the same routine I have, and this is because we can chat with each other. The rest of my friends.... I don't know where they are, or what they are up to these days.

To prove my point, this is an excerpt from an actual-talking session with one of my class-fellows and now my colleague;

"I go back home, switch on my machine, log in to MSN, and spend my time doing on one thing or the other(all which involves computer). My mom keeps shouting that I don't spend any time at home, even when I am at home. But what to do? I guess she'll get over it"


The truth has been twisted here a bit. But more or less, this is what we are all doing.

And I have realized that this is the reason, why I am exhausted all the time. I have a life, yes I do, but there is no such quality of life to speak of. I never feel relaxed because even during the time I should be relaxing, I do things that get on my nerves and the funny thing is that I don't even realize it.

The problem lies in our daily routine. And the fact that we are not aware of the problem. We are just spending our lives... just spending it, not actually living it.
We all are a part of a marathon, and we don't even know who we are competing against, are we just trying to prove others that we can spend the most time in front of our computers without having an actual conversation with any one, without having any life?????

How long do we think we can go on like this?????

Saturday, April 11, 2009

Penny for my thoughts......

Prologue
A lot has been happening for the past month or so (why do my posts have to start with this?), and I have had time to think a lot about all that's been happening, this isn't because I have nothing better to do, it's because I can't stop thinking about it all. And my friends have to go through the torture of listening to me and then calming me.. So I decided to save them from the trouble and pour all this on my blog (but I would still make them read it, so there's no salvation for them :P)... so this is sort of a page from my personal diary (which by the way I don't have :P). So here goes....

Penny for my thoughts


...maybe if I could just be able to steal myself away from all this, maybe if I could just learn to forget, maybe then I'll stop feeling like this, maybe then I'll feel a little better... maybe if I could just stop dwelling on the past... maybe...
...maybe if we could just stop the blame game, maybe.... maybe this wouldn't happen.....

The wars inside...


A while ago I received a forwarded sms from a friend and I thought I would write a post on it, but wasn't able to because I didn't get time, and when I did get time, I wasn't in my "writing mood".
I have deleted the sms now, but this is what I can remember:

An old man told his son;

"Every day two wolves fight inside us. One wolf is good, joy, happiness.. the other wolf is evil, anger, ego.."


The son asks;

"Which wolf wins?"


And the old man replies;

"The one we feed..."

And if you think about it, this is very true. At the end of the day, what matters is the decisions we made, in fact, the entire day depends upon the decisions we make. We can decide to get angry and not only ruin our mood but also other's, or we could just let it be.


The human aspect

And I wonder sometimes about us human beings.. how we are made.. sometimes in fact, most of the times, we forget all the good a person has done for us, and remember the one bad thing he does, the one mistake he committed.

And sometimes it's because we have had enough, maybe we were forgiving and forgetting things for so long that we can't continue with it anymore. At that time we think that putting an end to it all is a much better option. And sometimes we are right in thinking that.


Forgiving and Forgetting

I read this (also in an sms), and I am not sure whether it's correct or not...

"Learn to forgive people for their mistakes, like you want Allah to forgive you for yours"


But it's so hard to forgive someone, right???
And why should we be the one forgiving others? Why don't they try? Why be the first one to end a petty fight?
And sometimes we even forget what it was all about, how it began, but we still continue living between walls...
And we are so wrong in doing all this. We expect Allah to forgive us for even bigger crimes, and we expect others to forgive us every time we hurt them, but we are not willing to do the same for other people.


And those we love

And then there are times when we vent out our feelings, more specifically our anger, on the people we love. These are our parents, our siblings, our friends, or maybe just someone who's willing to listen. These are the people who had nothing to do with making us angry or depressed. These are the people who have always been there for us, and this is exactly why we take them for granted...


Everything happens for a reason

Now isn't that true? Everything happens for a reason. Isn't that what everyone says, particularly those who at the moment are enjoying the best of everything, their lives couldn't have been any better, and they are the ones to give you advice. What do they know??
But let me tell you, they are right. 100%. Everything does happen for a reason. It's what you do with it that makes all the difference....


And you get what you deserve

And I have finally realized that this is very very true. A while ago, I found myself in a situation where whatever decision I made would leave one of my friends hurt. And one decision would hurt me more than the other. And guess what I did.. I made the decision that would hurt me less, and guess what.. I was wrong, the decision I made did hurt me as well as the other person.

But the thing is, about an year ago, I put one my very nice friends in such a situation. It was for the same event, and the situation couldn't have been more identical. And she, being an intelligent and mature person that she is, made the right decision. And still I was furious with her, and I didn't talk to her at all for (I don't know) a few days, when somewhere in my heart I did know that it wasn't her fault at all, it wasn't her doing, but someone else's, but I still had to show my anger, and I chose this way (silence) to let the anger out of my system. I ignored her, even when she herself came and talked to me, I just passed by, ignoring her. It must have hurt her a lot, I realize now, but at that time I had my own anger to cater to.

And now I understand how wrong I was, when fate put me in the same situation, and when I made the worst decision that I could. I realize now how wrong I was....
But never the less, I don't want time to go back or something, what's done is done..

but...


...maybe if I could just be able to steal myself away from all this, maybe if I could just learn to forget, maybe then I'll stop feeling like this, maybe then I'll feel a little better... maybe if I could just stop dwelling on the past... maybe...
...maybe if we could just stop the blame game, maybe.... maybe this wouldn't happen.....

The Marks Theory

Back in Bachelors we waited for results and dreaded them at the same time. But at least I had a category of good and bad marks. But in Masters the very thick line between what are good marks and what are bad marks has not just gone thin, but it has vanished completely. I don't have any concept in my mind now which defines good marks.
This Tuesday, one of our Professors showed us our Mid-term copies. I sorted through the answer scripts, looking for my roll number, fetched my copy and of course my eyes automatically went to the section where marks are entered.
'Hmm 64 out of 70,, hmm not bad'
(whereas in Bachelors it would have been
'Coollll yaar, I got 64 out of 70, I mean, come on yaar, SEVENTY.. SIXTY-FOUR SEVENTY')
As I walked back to my seat with the copy in my hands, I realized it wasn't 70, it was 90. And still the expression remained the same, 'hmmm, not bad'. Whereas in Bachelors it would have been...
'GOD!!!! 64 out of 90. I have practically FLUNKED my mid term. How would I ever recover in finals? And how many marks would I realistically be able to obtain in Finals, when we would have the entire course, and this time it wasn't even half the course. I would have more to study......'
And the depression phase would have gone for the entire day. And resurface again before the finals.

I don't know if it happens with everyone or not, but it sure is happening with me... Am I normal?? :P Please, don't answer that, I don't even wanna know the answer to that. :P :)

Monday, April 6, 2009

Masterpieces

For some unknown reason, the image I have put on my header doesn't display. Why am I so desperate, that I keep on mentioning it over my blog (you don't know what the people around me are going through these days, they have to listen to me all day long complaining about the header, and the image it refuses to show), is because I got one of my very nice friends to make an image for my header. She visited my blog just for that and then Photoshoped three images for me. As I can't put them on the header, I guess, it's fair enough to dedicate a post on them.. so here are the images people... All created by this talented friend of mine..























Sunday, April 5, 2009

Parametric Singleton Pattern

We were asked to study Parametric Singleton patterns as an assignment. It was a long time ago, and I just thought today that I can write a post on it... just for the sake of having something new on my blog, if not for anything else. :P

You implement Singleton, when you want that only one instance of your class can be created. A single instance is created the first time, and everytime an instance is requested the same instance is returned. You do this by making the constructor private, and creating a function which takes care of creating an instance when the first request is made and then returning that instance on subsequent requests.

Now what happens when you want to maintain single instances pertaining to particular parameters. You could go with creating multiple Singleton classes, but it would be a complete waste of time if the three classes do the exact same thing but differ only in the parameters.

While searching, the best example I found that explained to me the need of having Parametric Singleton was of Logging.

When you create an application, most of the times you need to maintain a log file, which keeps track of all the things the application is doing. Let's say your application connects with a database and plays with the data and manipulates it depending on certain logic. It iterates through each row and makes a decision on what to do with it. Let's say you wanna keep track of all the rows it iterates through and the decision it takes. And you decide to log it all in a file. For this specific purpose Singleton Pattern will do just fine. In fact it would do just great... But what if your application needs to maintain more than one log. Let's say your application connects with an external interface and it needs to maintain a log for that, then there are things that the application does internally and it needs to maintain a log for that too. So now we have two logs, creating two separate singleton classes for each kind of log is not a very good option because if you get down to it, it's simply writing in two different log files, just the path and the name of the file is different, all the rest remains the same. So why have two different classes which do the exact same work, why not have one Singleton class which could this time return two instances pertaining to each file type (external interface and one for internal working).

So:
  • In a parametric singleton pattern a single instance of a class is created for a parameter.
  • It is based on the Singleton design pattern in which a single class is created. Whenever an object of that class is required the same object is returned.
  • Similarly, in parametric singleton pattern a single object is created pertaining to each parameter.
  • The instances are created and put in a hash table, array list etc. (to keep track of the objects created). When ever an object with particular parameters is requested, this table is checked to determine whether an object containing the specified parameters has already been created or not. If it has, the existing instance is returned; otherwise a new object is created and returned. This new object is saved in the table as well.

The advantages of using Parametric Singleton, I suppose, would include all the advantages you get from Singleton pattern.

You can get rid of creating extra instances of a class now, based on parameters. This couldn't be done with using our traditional Singleton and hence we ended up not-using Singleton and creating multiple instances, though not exactly needed.


Do check out the following sites for better insight:

http://www.c-sharpcorner.com/UploadFile/satisharveti/ParametricSingleton02112009062638AM/ParametricSingleton.aspx (this one's has a good code example)

http://www.c-sharpcorner.com/UploadFile/dhananjaycoder/singlepattern11252008002706AM/singlepattern.aspx
(Singleton Pattern)

http://www.jot.fm/issues/issue_2007_03/column2/

Saturday, April 4, 2009

Accident

Neither was this one imported.....

Originally Posted on: 11/21/07

Yesterday could be categorized as a bad day for us - our class. A friend of ours, had a bad accident. All we got to know in the morning was that she had an accident. God knows why I didn't think it was serious. I just can't understand this attitude of mine. An accident is an accident. it's just that yaar.
Anyways, i heard my friends saying that it was a serious accident. but it didn't hit my stupid-self until i saw her. and that was that. I was horrified to see her like that, couldn't even recognize her. :( and then today i got to know the details. a car hit her and she flew and fell a few feet away. the guy who hit her, who by the way is younger than us (is a student of matric) had atleast the decency to take her to the hospital. when her father came back to the site, he only saw her shoes there. isn't this all horrible. difficult to contemplate.

a friend of mine in college met a horrible accident too. a truck hit the bike his brother was riding, she was sitting behind him. you haven't heard the horrible part yet.... her brother died. she was in a critical situation, but she survived....

but if you ever go through such situations, would you ever be able to forget, be the same again....
you might become a better person after that or you might become a worse person, but can you ever be the same again????

Searching

Didn't import this one either..... :( :(

Originally Posted on: 11/21/07

Don't need to make a post for this... but what the hell....
these days we (my group members and i) are trying to make some sense out of codes written by other people. we mostly fail. sometimes we just succeed in understanding what a particular functions is supposed to do without putting much thought in how it does it. :P

I have found a treasure on the internet :D

I am trying to do something about the comments that Blogger failed to import to my new blog.. and I found that I might be missing a post or two as well. I tried to search for this post on this new blog of mine, and I couldn't. Though this post is not a very interesting one, but I still wrote it.. so here I am pasting it here... :) :)

Originally Posted on: 1/25/08

You can find everything on the internet."
"Internet can really help you in a lot of things."

That's all very true.
I knew it to be true for a very long time.
When I learnt a few things by reading the tutorials on the internet.
Like I learnt to work on Macromedia Fireworks by reading tutorials provided by a website called www.entheosweb.com.
When the internet helped me in studying for some of my courses.
When the internet helped me in completing research assignments, presentations and stuff etc.

I knew for a very long time that Internet can help you in a lot of stuff.

But I never loved it like I do now.

For some time now I have gotten this strange urge to collect as many ebooks as I can.
On as many different subjects as I can. (but these different subject must have to do something with the computers).

It wasn't until I found a treasure of ebooks on internet that I fell completely in love with it.
Internet really is a treasure.
And it wasn't when I found the ebooks of infomational material like books on Software Engineering or Data Mining when I started enjoying the internet. It was when I found a reservoir of Stephen King novels that I realized how useful internet can be.
I found books on the net whose titles I have only read on other books but never saw then in any book store or book fairs. Like The Dead Zone.
And if you can get them for free on the internet then why wouldn't you like it haan?

Before I found the ebooks on internet I used to go through the "net storage" of my institute and found books there. But ofcourse they only provided course or reference books. What else would you expect from a university? Novels?


So here are the websites you can find good books on:
www.dbebooks.com
www.esnips.com (this one has novels too).

Aur bhi ghum hain zamanay mein.....

For quite a while now I have been trying to upgrade my blog's theme, adding more widgets (which actually work). I can't find my way around CSS and I am bad at designing, and I mean really bad. Girls are supposed to be good at choosing colors and contrasts sort of things, but guess what, I am different!! :P
So I got this friend of mine, who is a complete cheeti in Photoshop (next thing I am calling her up to tell that she got mentioned in my blog, maybe that would get her to visit it), to design some good images for my header.
And she sent me three brilliant designs, loved all three of them, and picked up the one I thought was the best... NEWS FLASH!!!! Blogger uploads the image all fine, saves it all fine, but when it comes to displaying it on the blog... THERE IS NO IMAGE THERE TO SPEAK OF...

Then there is this other thing going on.. Blogger introduced "Reactions" to posts thing, which I think is pretty cool.. But.. it doesn't work on my blog either. Any guesses why?

The only reason I could come up with is "They HATE me".. Why? I don't have any answer to that.
Maybe they are just angry, why?? I don't know that either.

So I got another blogger to upload an image on his header.. maybe there wasn't anything wrong with my blog, maybe things were going not-so-well at blogger people's end.. but not prizes for guessing, the image uploads and displays on his blog, but refuses to do so on my blog (so maybe they really do hate me).

I decided to put my rantings on Google's help forum, thinking that I would get some answer, some solution, or just some sympathies.... ohhh I was so so wrong.. Uptill now there hasn't been any answer there.. just my lonely lonely post....

And there was the problem of my comments not getting imported on this new blog :( :( sigh, sigh.... tears, tears.....

So I again started searching for themes. And couldn't find anything good on internet. I want some thing that is simple and which doesn't take ages to load.

I am quite happy with my current theme, if it would just allow me to upload a decent image.. I only want to upload an image, for crying out loud, is that too much to ask for????

I finally found a working code for "Most popular posts". Appartently, it's working fine.. let's see for how long that remains true.

I checked "Google's help forum" yesterday, to see if someone had answered my post there, but what I found there was not an answer to any of my problems, but a lot of other problems... and thought "Yaar, aur bhi ghum hain zamanay mein.. yahan to sirf aik image hee nahi upload ho raha...."

Sunday, March 15, 2009

Mid term blues

And the mid terms are here AGAIN... Exams never seem to end, do they?

And I still find myself wondering why I didn't study side by side.
If exams are not going on or about to start, studying doesn't seem an option at all. It's always I am tired right now. I do nothing fun the entire week so Saturday and Sundays are for that, having fun, chilling out, sleeping, watching tv and movies, NOT for studying.
But when the time's up I always always promise myself that this won't happen the next time. From now onwards I'll study hard, concentrate on my classes, read up on things on a weekly basis, search the topics we cover in class on the internet so that I get more knowledge, but even when I am thinking all of this I know they are nothing but empty promises.. and that's what they always turn out to be.

So right now... I am trying to study Design Patterns, am stuck with the Adapter patterns since about 8 in the morning. Trying to get the assignment done as well (yeah an assignment during mids, don't think we didn't try to stop him.. but there is never stopping teachers.)
I am still on the trying to study phase as I refuse to sign out of the two messengers installed on my machine, and so I continue chatting with my friends, who by the way don't have any exams so they can chat all they want.

My deciding to write a post for my mid terms is prove enough, I guess, that I am in no mood to study (am I ever?).

Anyways....... I think I should get back to the assignment. If anyone has ever done any assignment on "Parametrized Adapters" feel free to share... :P :P

Tuesday, March 3, 2009

SQL Server Triggers

Scenario:
  • Stop a query from execution
  • Know from the query was being executed.
Solution:
I was a bit skeptical about this. About the part where you execute a query from execution.
We knew we had to create a trigger for this, but how on earth would you stop a query from execution.
Turned out, SQL Server does provide a way to do that.

So let's take a look at the syntax of creating a trigger as put in on MSDN:

CREATE TRIGGER [ schema_name . ]trigger_name
ON { table | view }
[ WITH [ ,...n ] ]
{ FOR | AFTER | INSTEAD OF }
{ [ INSERT ] [ , ] [ UPDATE ] [ , ] [ DELETE ] }
[ WITH APPEND ]
[ NOT FOR REPLICATION ]
AS { sql_statement [ ; ] [ ,...n ] | EXTERNAL NAME }

::=
[ ENCRYPTION ]
[ EXECUTE AS Clause ]

::=
assembly_name.class_name.method_name

Trigger on a CREATE, ALTER, DROP, GRANT, DENY, REVOKE, or UPDATE STATISTICS statement (DDL Trigger)
CREATE TRIGGER trigger_name
ON { ALL SERVER | DATABASE }
[ WITH [ ,...n ] ]
{ FOR | AFTER } { event_type | event_group } [ ,...n ]
AS { sql_statement [ ; ] [ ,...n ] | EXTERNAL NAME <> [ ; ] }

::=
[ ENCRYPTION ]
[ EXECUTE AS Clause ]

::=
assembly_name.class_name.method_name

Trigger on a LOGON event (Logon Trigger)
CREATE TRIGGER trigger_name
ON ALL SERVER
[ WITH [ ,...n ] ]
{ FOR | AFTER } LOGON
AS { sql_statement [ ; ] [ ,...n ] | EXTERNAL NAME <> [ ; ] }
::=
[ ENCRYPTION ]
[ EXECUTE AS Clause ]

::=
assembly_name.class_name.method_name

The part in bold is what is responsible for getting the trick done.

You use INSTEAD OF when you don't want the query which fired the event to execute. And you mention the category the query falls under (the one that is to be stopped from execution) after INSTEAD OF.

So the Trigger become something like

CREATE TRIGGER trgr_Name
ON Tbl_Name
INSTEAD OF DELETE
AS
BEGIN
//Your code
END


Now, let's come to the second part. The part where you discover from which machine the query was fired.

And guess what? That has a simple enough syntax.

HOST_NAME() give you the name of the machine.
So all you have to do is declare a variable

DECLARE @Host_Name VARCHAR(20);
@Host_Name = HOST_NAME();



There was a whole piece of code for getting the IP from Host_Name, but I don't remember it exactly, so will put that when I find it. :)

The whole point of this post was so that I myself can find it when I need it again, as I don't really trust my memory for such important stuff. So no offense to all the people from whose websites I collected this material from.

Monday, March 2, 2009

And.... it's done!!!!

It's done.. I have finally given the presentation I was supposed to give for, I don't know, one month.. I have trying to avoid it, plus there were a lot of more pressing tasks to be completed. The task being the completion of a project and all.

Anyways, I should tell you what the presentation was about. It was about .NET Framework 3.0/3.5.

The story behind why I was given this particular topic to present was that since I joined I had been nagging everyone to migrate to 3.5 or at least make the new applications in 3.5. They finally got me to stay quiet by saying "Why don't you give a presentation on .NET Framework 3.5? Just highlight the new technologies introduced and convince us that we should migrate."
And since then I stopped mentioning 3.5.

Not that I didn't want to go through the hassle of making the presentation slides. It had more to do with gathering up the courage to speak in front of so many people (that means 10 people at the max) who you know have more knowledge than you about the topic you are speaking on.

Anyways, this time they scheduled it for Monday (that is, today 2nd March, 2009). I didn't get time in the office to work on the presentation, and I had a quiz this Saturday (which I am failing by the way) so I spent my entire Sunday on it. Full of tension, true, but learnt a lot things and that was fun.

I liked what WPF made possible, but I never really tried my hands on XAML, and I am glad I did for the presentation. Just a few lines of code were enough to get a button rotate on an angle of 45 and the window to appear in the form of Ellipse rather than the conventional rectangular shape one. :)

I might add a few references or a bit of the stuff I used in my presentation in near future (keep a note of 'might'). But none of the things I used were mine.... of course.. working on .NET 3.5 for a day doesn't make me any expert.

Anyways, almost the entire day, today (Monday) was spent on the presentation. I was supposed to cover all technologies (WPF, WCF, WF, WCS and LINQ) but was only able to touch WPF, WCF and LINQ. So in the morning it was decided that we'll go with this and for the rest of the things we'll schedule another presentation.
Showed the slides to my boss.
Then spent the rest of the time before presentation worrying about what I'll do when they start asking questions. And some of my team members encouraging me and telling me there is nothing to worry about. And also asking people not to ask questions.. the people I could ask to do so.
And installing Visual Studio 2008 on a laptop that will be used for the presentation, and not being able to.
Trying to find out why on earth does the VS 2008 on my Home PC doesn't color code XAML. Still don't have an answer for that though, can anyone answer that??

And finally the time for presentation came. Wasn't even able to connect the laptop with the projector. Two people were involved so that the slides could be projected for everyone to see.
During the presentation it seemed like I was giving it to my top-most boss only, with a few glances to the other people in the room. Couldn't help it. Even back in the days I used to debate, I concentrated mostly on one particular portion of the audience and had to make an effort to look at the others too.
A lot of questions were asked.
None of which I was able to answer :P
People got really excited about WPF though. :) And liked the two code examples I put in. :)

All in all the presentation went okay. With my supervisor supporting me by answering all the questions that were targeted towards me. And the rest of the team chipped in nice comments about the presentation and encouragement after the presentation ended. :D And it really felt good to hear those comments. :)

The remaining day was spent thinking 'shukar hai ho gaye presentation, tension to khatam huai'.

So an entire day was spent on a presentation. :P

Disclaimer: :P

This post is more for memory then for my two or three readers.. :) I should, like everyone else, keep the tag 'Dear Diary' as I have so many posts which fits this category. :)

Friday, February 27, 2009

Visual Studio Shortcuts

A few days back I wanted to indent a piece of code... and as I didn't remember the shortcut (I never do) I had to do it through the menu.. Edit -> Advanced -> Indent (something like this).. and yeah, I am talking about Visual Studio here. I tried to google the shortcut but didn't get any worthwhile results. And today when I am reading up on Abstract Factory, I found this link on the left hand side... seems very useful, so putting it on my blog so if not for anyone else, I can find it easily when I want to.

VS Shortcuts

Wednesday, February 25, 2009

Blog moved.. Phase II

Realization followed by complete HORROR:
They didn't export my comments.. I already had a few of them and they didn't even import that!!
Maybe they have a minimum/maximum limit or something... if you don't have these many comments you can keep on dreaming of importing them to your new blog.. Or maybe it's their way of saying "How stupid would you be to import blog from an hosting site and then export it on the same."
Whatever the reason was.. I know that the comments are imported as well. After all, Rambler did it... then why did they choose to act discriminatly (I don't think that's a word. I checked on dictionary.com and didn't find it, but you do get my point don't you)... maybe they have something against me as well.
I think I'll ask them about it... soon... but no use now. Because I have comments on this blog now.. so importing the old blog again on this one would mean loosing the new comments.

Should I go with copy pasting comments from my old blog on this one???.. I AM khwaar after all.. and don't have that many on the old one anyways...


Attention Blogger:
I might have ignored this before, but a colleague brought my wandering attention to a tennie wennie detail (read ERROR!) on my blog.

"Intricate
View my complete profile.
There was an error in this gadget"


What happened was.. there was nothing wrong with my profile. But the gadget below it refused to work on my new blog (maybe it didn't like the new address).

So have removed it.. what??? you thought I would keep it as a souvenir.


The not so cool background:
I got bored with the themes provided by blogger. So I decided to go elsewhere and searched for themes on google. A lot of good ones I found but a few didn't work.. the one that did was the one that was the theme on my blog for a long time.
UNTIL.. someone told me.. it's not as good as you think it is :P :P
No.. no one exactly put it that bluntly to me.. but there were problems of loading with this theme.. it took a long time doing that.. so decided to go again with blogger. Until I find a better theme... and for finding something you have to look for it, don't ya? And for that you need time, don't ya mattie? And I don't exactly have that,, what with all the sleeping I think I need to to do, and the novel that I must finish.. and the other stuff.. I am supposed to be preparing for a presentation but being the dedicated blogger that I am, I am spending the little time I have on it.

Tuesday, February 24, 2009

Bad times...

You learn a lot of things from people around you.... if you just care to notice. Like I learnt from a friend of mine that a person should always keep alive the spirit to enjoy everything no matter what.
This life is too short, the time gone would never come again so why waste it.
Everyone has their own set of moods, you don't have to ruin yours because of others. I am not saying be selfish, no not at all. You have to be there for others too, support them in their troubles, walk them through their worrisome phase and get them walking back on the path of happiness. But not enjoying, not making the most of the time you have, just because others don't feel like it is a little short of stupidness.
Sometimes we get so preoccupied with our lives, our troubles, our worries, our problems that we forget to live. We forget that everyone else goes through the same thing every day, even if they don't show it, they might be going through even worst than we can imagine.
Again, I am not saying that we should forget our problems, don't do anything about them and continue living like nothing has happened. Just saying that a bad day isn't the end of it all. :)

Saturday, February 21, 2009

Friend - a relative term

The statement popped into my head while I was pressing my clothes.. Pressing is such a boring job that all kinds of inane stuff moves through my head while I am trying to get done with it..

But come to think of it, in my case, this statement does turn out to be true, very true.
Friend IS a relative term.
I am not trying to be philosophical or something, in fact, I hate philosophy. But this is so true, if you just think about it.

I don't know why I started to write this post, but I thought I have to, I just have to, even if I don't write anything worth reading. :P

So, back to the point.. I say friend is a relative term. You ask why... because I think everyone has their own definition of Friend, of what friends are supposed to be.
Friendship might mean different thing to different people.
Some people may give this relationship more importance than it calls for. And some might not understand why it's worth anything.

The importance may be learnt after a broken friendship, or the importance might be lost after realizing how much friends can hurt. The importance may break on you when you have a blast with your friends, or when you miss them.

But the thing is it might not be what you think it is. And others are sure to have a different opinion then you.

For example, when we were kids we all had a different perspective. A friend was a person who had the most expensive toys, and was also willing to share them with you. At that time friends changed and it wasn't that hurting.

I remember every other person used to be my friend. My favorite dialogue was "Dost nahi ho yaar."
Till college I used to threaten my friends with
"Mein tumhein apnay dost kee post se kharij kar doon geen" :P

And as I grew up the definition changed in a drastic manner. Now I think a million times before giving the title of friend to anyone.

And that works, because eventually, when they do what I expect them to do, it doesn't hurt that much, and it doesn't matter that much, and in the end you think that all that happened was for a good reason.

Another example, for some people breaking up a friendship is not that difficult, because for them friends aren't that important and thus they don't care. For them the definition is quite different.

Hence proved,
'Friend' is a relative term.

Of lsam

Wuzu kar ke sonay k 4 fazail
1) Us ke rooh Baitullah Sharif ka tawaf karti hay.
2) Farishtay sari raat us ke liye naikyan likhtay rehtay hain.
3) Jab karwat badalta hai farishtay iski bakshish k liye dua kartay hain.
4) Jab subha so kar uthta hai to jo dua mangta hai puri hoti hai.


Namaz k 10 faiday

1) Cheray ke nooraniyat.
2) Dil ka noor.
3) Jism kee rahat.
4) Qabr mein sathi.
5) Nuzuley rehmat ka zarya.
6) Aasmanon ke chabi.
7) Meezane hisab ka wazan.
8) Allah ke raza.
9) Jannat kee kemat.
10) Aag se bachao ka zarya.


Jumay ke roz 7 martaba durood pak parhanay walay kee 100 hajatein puri hoti hain, 30 duniya kee, 70 akhirat kee.


Hadees-Nabwi (P.B.U.H) :
"Musalman ko jo ranj, dukh, fikar, ghum, takleef or pareshani paish aati hai yahan tak ke usay aik kanta bhi chubta hai to Allah us takleef ko us ke kisi na kisi gunah ka kafara bana deta hai."


Allah Pak farmatay hain "Tu mujhe fajar aur asar kee namaz ke baad thodi dair yaad kar liya kar, tere tamam kamoon ke zimedari mere hai."


Hazrat Ali (R.A.)
"Logo ko is tarah maaf karo jis tarah tum Allah se umeed rakhtay ho ke woh tumhein maaf karay ga."

Friday, February 20, 2009

Blog moved...

EVERYONE who got to know my blog address had a few words for the address...
intricate86 why 86.. what's your obsession with 86 that everything has to have "86" appended at the end..
Everyone had to say something about it, and believe me it wasn't good.

So have finally decided to move it. The address is almost the same. Now it is the same as the name of the blog.. By the way I have a post on why it was what it was. So read up on it too. :P (like you have nothing better to do.)

Moving the blog wasn't that hard, mainly because of the Import/Export feature provided by blogger.
I had no fear of loosing my readers for the simple fact that I don't have any. :P

So it's only me who reads the blog and I don't have any problems in remembering the new address.. :P

A few things remain though.
Not all the widgets were imported correctly, so will have to do some copy/pasting for that.
But it can wait... as no one really depends on my blog.. and I have an assignment due, which I haven't started yet..

So the few people who stumble upon my blog..
Happy Reading!!!

Do drop in your comments. They are much awaited and appreciated.