Random Stuff

•January 15, 2009 • 2 Comments

I could have annihilated all the Jews in the world, but I left some of them so you will know why I was killing them. [Adlof Hitler]

EH and Comments.!

•November 20, 2008 • 7 Comments

Exception Handling plays an important rule in Commercial enviroment where un certainity of input is common you cannot imagine of writing a code that lacks exception handling apparently comments play an important part as well. Logging exceptions of every kind and having logs of every event is very necessary when you’re working with systems which does Financial transactions . This post is not about how to do exception handling or how to write comments in your code. But its all about what msg to pass on exception handling ! Lets say you are working on a project which is deployed on a server which is being monitored by a Certified System administrator and the client you’re working for is very decent they sent you out logs as-it-is  from the server by the Server Administrator. Then you should write a code like

void myFunction(string someparameter)

{

try {

// some code here.

}

catch(Exception ex) {

throw new Exception(“There was an exception Processing myFunction Source = ” + ex.Source + ” Error Message = ” + ex.Message);

}

}

Now Lets take a case where you are working on a project which is deployed on a Server with no authenticated Server Admin and all of the sudden you get an phone from a moron which happens to be a server admin showing you entire stack trace and yelling that your application lacks logics and all ! and after looking in to logs you find that Problem really doesn’t exists on your side but on some other system. The criteria of handling exception changes not in code though but the msg !

void myFunction(string someparameter)

{

try {

// some code here.

}

catch(Exception ex) {

throw new Exception(“OMG OMG OMG WTF WTF WTF !! SOME THING IS REALLY BITCHIN myFunction UP! FUCK IT AM NOT PLAYING ANY MORE !  “+ ex.Message);

}

}

Some of you might ask me why this well a good answer to the question is that the Moron looking Server admin would never call you up and tell you the entire stack trace he would basically mail you up the entire logs voluntarily  !

It works! Not necessarily all time Why ! ? the moral of people varies if the above thrown exception doesn’t work out for you i would recommend to slightly change the message or include some phrases like “I M GAYLORD” it might work out for you.

I usually comment my code a lot the reason behind it is not that i love to comment or its a good coding practice no way ! but the fact is that i don’t my self remember what i wrote an hour back comments like

// ALAAAAAAT! PAPU !! AGAYA !

// LOCHA HERE !! FIX IT AFTER LUNCH OR FUCK IT!

// YEAH BABY YEH !

the rest are censored. Comments are basically made for the convenience of a programmer and i feel like what i comment on my code can be easily understood by any typical karachite and believe me its fun to read my code :p .

Some Ground Realities.

•November 9, 2008 • 5 Comments

It’s being long since i posted some worth reading stuff and i still don’t know if this post would be worth reading or not.. anyways quite loads of things happening and that too very fast. Politically i am a very moderate personality i don’t like Paki Politics it sucks ! We aren’t democratic in any sense. Couple of weeks back our house was robbed we weren’t in the house and some one intruded while i went out to get police if found an SHO of God knows what area on my way i told him the story of us being robbed and he was like “Why do you have to leave your house locked up don’t you know how dangerous it’s to leave the house locked up now a days” . I was amused by his reply ! Inside i felt like i should tell him “TO FUCK OFF!” though the circumstances didn’t allowed me to we got back home they investigated my home fortunately SHO Of my locality came in as well a young guy with a dashing personality he was an totally different form that Jackass a person who you can talk with very helpful guy and he helped me up with every thing he could. Though this post is not about Police being jerk or helpful its about the Peace of Karachi getting worst and worst i just came to know that one of my relative was gun shot for not giving the “bhatta” a new tradition of “parchi” is on the boom if you go to the area’s in Karachi south i.e. ( Tower,Kharadar,Nayabad,Moosalane,Lee-market,Lyari and other areas that comes in Karachi South. ) I happen to have a chat with my relative he told me the story of the “Parchi” A guy would come up at your shop a baloch mostly and would hand you out an envelope with an amount written on it and on the same day you will get a call on how to deliver that amount if you manage to say no get ready for the first episode .. that would be a firing at your workplace/shop and if you happen to face the first episode you will get a call on the same day weather u still want to resist or not and mostly u will not but if u manage to resist still your family would happen to get your dead body quite soon they happen to know each and every thing about you there are three man groups active in there Jango,Rehman Dakait , Arshad Pappu . Rehman and Arshad Control there every day works from with in the jail how ever Jango is being ruled by some unknown sources.

There is being a recent loot in Iqbal Market robbing 40 Shops at a single time by one of the group the people of these localities are no more secure in any way i would say musharaf period was way too good because there’s being rumors that Rehman is one of the great follower/Supporter of bhutoo. Government should take some bold step to wipe these terrorists out of the country rather then going for international terrorism Pakistan itself is being very unfair with these people ? You people might say why the fuck did you said that ? Well they people were the first to come here Karachi was the place of “Machaira’s” and before any one here they were here and they are still there being “Machairas” Every one except them got flourish in karachi government should gave them opportunities and make them stand out in a suitable place as to wipe off these issues. anyways.. that’s my opinion what do you guys think ? 😉

Some vidz i came across.

This is place is not dead yet!

•October 30, 2008 • 3 Comments

Its being long since i blogged about any thing there’s being quite alot happening around me ! My house got robbed :/ !! trying to tackle out hell loads of stuff at home! Got my degree in hands yay! finally no more clearance and all.. Coding at it max..i would be writing an article about how to invade an acadmic server lol!! when i get time got so much ppl requesting it :p buwahahah any ways ! guys pray for my mom she aint feelin well now a days !

peace.

Azeem.

How to pwn!

•October 6, 2008 • Leave a Comment

A step by step procedure would be posted soon

that would be !!

( The day i get tyme to update this freaky blog )

Stay Tunedd! 😉

Tea Break Advertisment Funda.

•September 15, 2008 • 7 Comments

 

Tea break adverts

Tea break adverts

Wierd isn’t it ?! LOL!

Robust Application Development in Visual Studio 2005

•September 14, 2008 • 1 Comment

Well , VS2005 is one of the most “Expensive” and “Sexy is what i call it” IDE for doing development in MS Technologies. It makes the life of a developer very easy. With tons of features that have been given to developer to do Robust Application development. While Randomly writing 100’s of lines at work i realized a fact that there is a lot of copy paste stuff we do usually ! and the cost of Search + CTRL_C + Getting Back + CTRL_V increased Exponentially if you dont remeber where the last time you wrote the line of code that you want back “Typically happens when you are not fully aware of the project” and usually happens with me I forgot what i code most of the time for that i wanted to put my comments where ever i make changes Lets say there is a function called GetLostWorld() and i have to change its functionallity so i usually mark a comment on it for record of others that i have messed up here i.e.

void  GetLostWorld() {

console.writeline(“Get Lost world”);

}

Now if i make changes to it i would typically mark my comments so that it would be convinent for me to get back and see what happened i.e.

/// <summary>
/// <Author> Azeem </Author>
///

I wonder if i could change the way Comments being put in C# There are couple of work around for doing that one is to change the rendering of XML Comment which i am not fortunate enough to find. There is some xml file that would do the work in vB however i wasn’t able to find out a way to do that in C#.

So i did a little bit of googling and found out about snippets they are way cool ! Checkout this web if you want to know how to tackle snippets an example of for snippet is given below

<?xml version=”1.0″ encoding=”utf-8″ ?>

<CodeSnippets  xmlns=”http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet”&gt;

<CodeSnippet Format=”1.0.0″>

<Header>

<Title>for</Title>

<Shortcut>for</Shortcut>

<Description>Code snippet for ‘for’ loop</Description>

<Author>Microsoft Corporation</Author>

<SnippetTypes>

<SnippetType>Expansion</SnippetType>

<SnippetType>SurroundsWith</SnippetType>

</SnippetTypes>

</Header>

<Snippet>

<Declarations>

<Literal>

<ID>index</ID>

<Default>i</Default>

<ToolTip>Index</ToolTip>

</Literal>

<Literal>

<ID>max</ID>

<Default>length</Default>

<ToolTip>Max length</ToolTip>

</Literal>

</Declarations>

<Code Language=”csharp”><![CDATA[for (int $index$ = 0; $index$ < $max$; $index$++)

{

$selected$ $end$

}]]>

</Code>

</Snippet>

</CodeSnippet>

</CodeSnippets>

It comes up with VS 2005 one can create unlimited number of snippets with respect to project he/she is doing. Every one should explore this thing out i bet there would be a marginal number of key stroke optimization can be obtained by making 5 to 10 snippets as per the project of your requires..