Tuesday, March 29, 2005
Monday, March 21, 2005
Friday, March 18, 2005
Friday, March 04, 2005
So long and thanks for all the Shit
Happy again!!
:)
Posted by
An Ideal Boy
at
5:54 AM
0
comments
Monday, February 28, 2005
Washing powder Nirma
Ferry day trip ticket.. 15$
Backardi breezer.. 5$
Aaloo Parathe.. 8$
Listening to "Washing powder Nirma" jingle in a Sydney restaurant.. priceless
:)
Happy!!
Posted by
An Ideal Boy
at
11:47 AM
0
comments
Friday, February 25, 2005
Indiresen’s Law
"Second-rate persons select third-rate persons.’’
--Dr P V Indiresen
Director, IIT Chennai
Posted by
An Ideal Boy
at
9:07 AM
0
comments
Friday, February 18, 2005
GetHashCode()
Spent two hours on a seven page chapter about "Understanding the Pitfalls of GetHashCode()".
Total waste.
Posted by
An Ideal Boy
at
10:21 AM
0
comments
Communist Party of Australia
The members of communist party of Australia are so afraid of retribution that they ask newspapers not to publish their real names.
That piece of news made my day.
Wondering when this will happen in India.
Posted by
An Ideal Boy
at
10:12 AM
0
comments
Tuesday, February 15, 2005
Dotnut talks about the higher powers
Read: Algorithmic and Heuristic approaches towards software development
Well yes, we both played in the hands of the higher powers at the same place for quite a long time and ended up slogging our ass off for products, one of which sold a couple of licenses and one which never materialised. Anyway I never thought that product is going to sell a single copy. Good that two people bought it. God bless them.
Lesson learnt: "Nobody is going to listen to an engineer who knows something about bzness. But they will listen to people who know little bit about bzness and nothing about technology."
Now, engineering degrees. That’s one sore point. People who get them now days are not engineers but mugpots. You mug, you score and you get a degree. They simply don't have the ability to think on their own. Being from a reputed college can assure you that the degree holder has some firepower, at least the will to succeed and be more then 'one of the guys'. But that’s about it. The same goes for certification, for example just ask a .Net certified professional (?) about Tracing and you can see him going belly up. Yup!! Even I am one and that’s how I know.
One should hire people who can think and solve problems, may be not even solve problems, just give an approach. The rest will follow.
As far as approaches towards software development goes, let me assure you that we do very little software development. We are mostly into maintenance and support.
And that’s why you see most companies applying the Algorithmic approach and hire people who can be typist.
Software industry in India is young. Infact we are a young nation, just 50 years old. But the software industry is not that young abroad. Here, I am sitting next to a professional who has thirty years of experience in this field. And let’s accept it; this is just like any other industry which will be affected by the economic cycle. Sun will shine in the day and long nights will follow. That's the way it is for people who make Steel and that’s the way it will be for us.
We are not eespesial!!
Rahi baat Chinese logon ki to, may be one day their cheap typists will replace our typists.
Big deal.
Posted by
An Ideal Boy
at
10:47 AM
0
comments
Monday, February 14, 2005
Process..
After working with my first employer for two years and struggling with the lack of process now I am working for a company where they generate more process documents then code.
They simply do not let you code.
For the last project I kicked off, I prepared 12 documents in two weeks time and then I was left with 10 days to finish the coding effort for the first phase. And that’s not the end. In those 10 days you have to fend off efforts of a quality manager who knows nothing about the difference between 'by ref' and 'by val' but when you try and reason with him, comes and tells you that since he is studying for MCAD so you should take his word. God bless Suhas who handled that jerk. You cannot argue with dumb people because once you start doing that they will drag you their own level and that’s the end of it.
As the saying goes "Excess of anything is harmful". But to decide the threshold you need intelligent people, which we don't have.
Posted by
An Ideal Boy
at
11:49 AM
0
comments
Is there God ?
That’s one thing I asked myself again and again after hearing about people dying in the killer tsunami. How can somebody give a reason for such destruction where innocents were killed in such a cruel manner?
Rajeev tries to give us some answer’s here: Rajeev Srinivasan: Does God discriminate?
But the contradiction is evident when he sums it up as “We fall back upon something ancient, atavistic and mystical: faith; this is the only comfort when we are overwhelmed by catastrophe.”
Please note that 'this is the only comfort'.
As Khattar Kaka would have said “It is for people to feel comfortable, to console ourselves that God is there and he will take care of everybody. It is for people who have done the hardwork and got nothing out of it, to feel better by thinking that God is there and they will get their due in heaven”
May be it’s a influence of reading Khattar kaka (By Hari Mohan Jha ) but nevertheless….
.
.
….because no other reason holds good.
Posted by
An Ideal Boy
at
11:27 AM
0
comments
Saturday, October 23, 2004
Events/Delegates
Have you ever wondered whats the difference between events and delegates.
Yes/no whatever, just read on....
All the documentation that I have read makes them look like pretty differnt from each other. But, but just you wait.
My question is, what you can do with events, you can easily do with delegates? Right? Confused? Think...think :)
To get started check this example,
namespace DifferenceEvDel
{
using System;
delegate void BarkHandler(string s);
class DogApplication
{
public static event BarkHandler delegate1;
public static BarkHandler event1;
static void Main(string[] args)
{
delegate1 += new BarkHandler(DogBarking);
event1 += new BarkHandler(DogBarking);
delegate1("Bow!! Bow!! used delegate");
event1("Bow!! Bow!! used event");
}
static void DogBarking(string str)
{
Console.WriteLine(str.ToString());
}
}
}
Differnt approach, same result. Now you will agree on what I said in the begining.
MSDN clearly says :
"The event keyword lets you specify a delegate that will be called upon the occurrence of some "event" in your code."
Lets check out whats new in the events, point by point:
* Event can be invoked by the class which declared it. Delegate has no such restriction. Derived classes from the class declaring the event also aren't allowed to fire the event.
namespace DifferenceEvDel
{
using System;
delegate void BarkHandler(string s);
class BlueDog
{
public static event BarkHandler event1;
public static BarkHandler delegate1;
static void Main(string[] args)
{
delegate1 += new BarkHandler(DogBarking);
event1 += new BarkHandler(DogBarking);
new BlackDog().TeaseTheDog();
Console.ReadLine();
}
static void DogBarking(string str)
{
Console.WriteLine(str.ToString());
}
}
class BlackDog
{
public void TeaseTheDog()
{
BlueDog.event1("Bow!! Bow!! used events");
//The event 'DifferenceEvDel.BlueDog.event1' can only
//appear on the left hand side of += or -=
//(except when used from within the type 'DifferenceEvDel.BlueDog')
//Comment the above line to compile
BlueDog.delegate1("Bow!! Bow!! used delegate"); // compiles fine
}
}
}
An event of BlueDog can not be invoked from BlackDog, but a delegate can be.
*Accessor specifiers
When you put an access specifier(private, public etc.) on an event it controls who can register or listen to that event. Now, how would you specify the access control for the invocation of that event? In the question lies the answer :)
There will be two access modifiers like 'public public event' which is not so intutive. So as of now Event can be invoked by the class which declared it. But there are always ways to bypass this.
*Event can be included in an interface.
This one is the most important difference from the design perspective.Try this in the same namespace as above
namespace DifferenceEvDel
{
interface IDog
{
//Delegate in interface, error, comment this line to compile ;)
BarkHandler delegate1; //Err: Interfaces cannot contain fields
//Event in interface, its okey, Karry on I mean Carry on
event BarkHandler event1;
}
class Dog : IDog
{
public event BarkHandler event1; // Implement the interface
static void Main(string[] args) {}
}
}
*Events have an add and remove method(like get set).You can override these, so you can find out when somebody subscribes to your event.
public event BarkHandler event1
{
add
{
Console.WriteLine("Bow!! Bow!! I got added"); msgNotifier += value;
}
remove
{
Console.WriteLine("Bow!! Bow!! I got removed"); msgNotifier -= value;
}
}
My conclusion:
"Events are nothing more then a modifier on delegate type, Like all modifiers it adds some restrictions to be enforced by the compiler.
Keep watching this space for more events on delegates.
Posted by
An Ideal Boy
at
9:11 PM
0
comments
Friday, October 22, 2004
Holiday !!
This poem comes from a ten year old girl, whom I happen to know.
I rate it as one of the best poems I have ever read.
I feel swell whenever I read this :)
Holiday means a fun making day,
It comes on Sunday.
After all the hard work and play,
I rest for the whole day.
In the evening when the Sunday is coming to an end,
I look worried-
Mom says in an angry voice "Have you studied ?"
How can I say no ?
Because she will beat me so.
Now it is the time for Monday,
And again, after six days will come Sunday.
Because of MOnday all those who are sad,
They are all mad.
And don't realize that,
Sunday will come again, come again, come again.
Posted by
An Ideal Boy
at
1:39 PM
0
comments
Datasource for DataGrid
Our custom DataSource for Microsoft .Net DataGrid is finally working, fully!! I guess Chandra will not be able to find one more bug ;)
The problem was with the Allow New property.When you click in the last row of grid with asterisk, it changes to a pencil image.As soon as you click in the last row, the 'AllowNew' function of datasource (IBindingList.AddNew) is called.This adds a new object to the internal collection of data source. This object is in temporary state and its addition to datasoure will be cancelled if the user makes no changes to it and selects any other row or when he presses escape key. When you start typing in the last row a new row with asterisk sign will be added and the state of the object added to thecollection will be made permanent. The problem arises when the user does not makes any change and selects some already existing row.
In our datalist class as soon as the AddNew function is called we add an object and Raise an OnListChnaged event.But when the user cancels the operation the newly added row is removed from the Grids Internal Collection but there is no way we can get notified about this.The missing communication link can be taken care of by implementing IEditableObject in the class whose object will be stored in the DataList.But still there are problems. The DataGrid calls the item's IEditableObject.CancelEdit() function when you press ESC on an new row or activate a different row. But it never fires the ListChanged event nor does it remove the item from the data list. So there is no way for the list to remove the invalid new row from the data list.A new flag should be added, (called isNew) to the object that will be stored in the DataList.This should be exposed by either making it public or by using an internal property.By default it will be false but when a new object is added by using IbindingList.AddNew then it will be set to true using the exposed property.Check the implementation for more details and use of 'isNew'. As I don't feel like writing about it :)
For once the documentation/sample in MSDN are misleading and do not work.
Summary:
If you want to pass your own collection as DataSource for MS .NET DataGrid then implement IBindingList interface in your collection. If you want a strongly typed collection then use CollectionBase class as your base class otherwise use ArrayList. Most importantly, do not forget to implement IEditableObject interface in your classes whose objects you are going to store in your own collection.
Posted by
An Ideal Boy
at
1:07 PM
1 comments
Monday, September 13, 2004
Memory use in .NET
Here is something I found out
"Task manager in Windows shows the memory requested by the Application and not the memory used by the application"
From my side
"If a application has requested and has been allocated more memory (remember it may or may not be using it) then you need not get worried about it and say Oh!! my app using so much memory and try and optimize it because when OS needs the unused memory , ( when OS is low on available memory and some other application is requesting for it ) it will reclaim it automatically."
As of now its consistent with the results I am getting.
For amusement, create a simple Win App in Dot Net, run it and chk the memory usage in task manager.
Now maximize and minimize it and again chk the memory used by it.
For answer go to
Posted by
An Ideal Boy
at
11:40 AM
0
comments
The Curious Incident Of Dog In the Night
Some books in which a kid is narrating a story....
I get full kicked whenever I am reading such stuff. Its so nice to know that there are like minded people who had the same kind of feelings as kid, as you had. For example in 'The Curious Incident of Dog In the Night' this Boone chap dislikes strangers just like I do, though I act as if it does not matter, but I do. I have this uneasy feeling, may be some where I am trying to judge that person which is a bad habit but I do it. It takes a lot of time for me to reach a certain comfort level. There was only one single instance in my life when I approached a person. It never worked out the way I wanted it to.I don't know whether it was worth it or not, sometimes I am depressed about it.But as Boone says in the Dog book 'In life there are no straight answers'. An Ideal Boy agrees, and moves on.
Posted by
An Ideal Boy
at
11:34 AM
0
comments
Saturday, September 04, 2004
Russian school hostage crisis
I and the public know.
What all schoolchildren learn.
Those to whom evil is done.
Do evil in return.
-W.H. Auden, poet (1907-1973)
No matter what their cause is, those who hide behind
children to save there lives, those who kill children
are not human beings.
Show no mercy towards them.
If you have a cause and you want to fight for it then
it should be man to man, face to face.
Is this what Kuran teaches Muslisms?
Do these people have faith in any religion?
I doubt....
Posted by
An Ideal Boy
at
1:56 PM
0
comments
Friday, September 03, 2004
Missing Class
Namespace: System.Reflection
Remarks: Represents a missing Object. This class cannot be inherited. Missing is used to invoke a method with a default argument. Only one instance of Missing ever exists.
Now when will you use this? When you have to pass a variable by ref set it to Missing.Value this is comparable to passing null to the function. Necessary because the C# null cannot be passed by reference.
Posted by
An Ideal Boy
at
4:33 PM
0
comments
Tuesday, August 31, 2004
Schadenfreude
Call me evil, but revenge is sweet. And now even the scientists back me.So if you feel cheated and hurt then its about time you pay him/her back as best as you can.
Kill-Bill
Posted by
An Ideal Boy
at
10:54 AM
0
comments
Thursday, August 26, 2004
And the song which I am singing these days....
Why does it always rain on me?
Posted by
An Ideal Boy
at
10:20 PM
0
comments

