Archive for the ‘Uncategorized’ Category

Reflection in .Net Part - 1

Thursday, September 25th, 2008

Reflection in .Net Part - 1

Reflection is a very interesting and powerful feature in .Net. Use reflection wisely and you can avoid dependencies. Today I did some really good reflection stuff and thought of writing this post.

You can dynamically load assemblies at runtime. You can instantiate Types, execute methods etc… When you instantiate classes from an external assembly, you need to know the full name of the assembly. In this first part of a series of posts on reflection, let us see scratch the surface of reflection.
System.Reflection is the most important namespace that we would be using in reflection.
In today’s post let us see how you can load a dll from a file, find the types that are in it.


using System.Reflection;

Assembly myAssembly = Assembly.LoadFile(”C:\\Example.dll”);

This LoadFile method loads the specified assembly into the caller’s domain.

Now we can list all the Type’s in the given assembly from the Assembly instance we just created.

Type[] allTypes = myAssembly.GetTypes();

The GetTypes() method returns an array of all the Types in the assembly.
There are several other interesting methods in the Assembly class. I will be covering the rest of the static methods of Assembly class in the next part.

References:
Assembly class on MSDN

Reflection in .Net Part - 1

Swamy Vivekanandas qoutes

Tuesday, September 2nd, 2008

Swamy Vivekanandas qoutes

“The older I grow ,the more everything seems to me to lie in manliness.”

The background,the reality,of everyone is that same eternal,ever blessed,ever pure and ever perfect one.It is the atman,the soul,in the saint and the sinner,in the happy and the miserable,in the beautiful and ugly,in men and in animals;it is the same throughout.It is the shining one.

Here I stand and if I shut my eyes,and try to conceive my existence,”I”,”I”,”I”,– what is the idea before me?The idea of a body.Am I,then,nothing but a combination of material substances?The Vedas declare,”No”.I am a spirit living in a body.I am not the body.The body will die,but I shall not die.Here am I in this body;it will fall,but I shall go on living.

The Vedas say the whole world is a mixture of independence and dependence,of freedom and slavery,but through it all shines the soul independent,immortal,pure,perfect,holy.For if it is independent,it cannot perish,as death is but a change,and depends upon conditions;if independent,it must be perfect,for imperfection is again but a condition ,and therefore dependent.And this immortal and perfect soul must be the same in the highest God as well as in the humblest man,the difference between them being only in the degree in which this soul manifests itself.

It cannot be that the soul knows,but it is knowledge.It connot be that the soul is happy,it is happiness itself.That which is happy,has borrowed its happiness;that which has knowledge,has received its knowledge;and that which has relative existence,has only a reflected existence.

hat very thing which we now see as the universe,will appear to us as God (Absolute),and that very God who has so long been external will appear to be internal,as our ownself.

Swamy Vivekanandas qoutes

Why “Why Outsourcing Sucks” Sucks

Friday, August 15th, 2008

Why “Why Outsourcing Sucks” Sucks

Here is a the most stupid article written by a very stupid guy titled “Why Outsourcing Sucks

His Point:
Major Indian software companies are recruiting low quality programmers.
Yes may be because they recruited this guy. But because Indian Software Companies made a mistake once by recruiting him doesn’t mean that they are recruiting low quality programmers intentionally.

A large percentage (I am afraid more that 50%) of the programmers are from non-CS backgrounds. Many are mechanical engineers, electrical/electronics engineers or civil engineers.
So ? I saw some people with Non CS Background who are very very better at coding and commitment wise far better than CS Grads. Trust me, I personally know atleast a dozen of them. And I am pretty sure some of them can even beat the writer of that stupid article.

The pay scales for fresher posts here are not the best even according to Indian standards.
What is he saying ? Helooooooooo can someone explain please.

We don’t care for the quality of the work we do for you. Now I don’t want to piss off any one, but the fact is that seriously no one cares about the quality of their code they do for some American company which they don’t know much about. You will get quality code only if it comes from your heart - like when you code for yourself. Most Indian software engineers don’t feel any kind of commitment to their organizations
May be this guy doesn’t care for his work, may be this guy has less commitment levels. That is really not the case. I see a lot of people sweating hard and working extra hours to get the project done and some people really really care.

Part of the reason why many companies recruit low quality programmers is that the works we get here are mainly some support work or very monotonous and boring development work that looks like it will take ages to get completed. Many Indian programmers have their own pet projects which they dedicate their free time to and they concentrate on the quality of the code they produce for that pet projects instead of the projects they have to do in their organizations.

Really ?

Conclusion: This poor guy really had a bad time, may be he is not competent enough and he has no commitment for his project. He is just interested in sitting for 8 hours in office and getting his salary. Only people with above qualities write posts like this. A small advice, if you find it so nasty leave this job and get into another industry. Find a job which satisfies you and work hard. Unless you are satisfied with your job, you cannot make significant progress in your career. All the best. Really if you dislike software and think most programmers in India are good for nothing, I can bet and say you are the worst of all.

Finally all outsourcing guys, outsourcing has its advantages and disadvantages. It may or may not suit your project. So, decide well and outsource as per the needs.

PS. This post will not hit 1st page of Reddit because most of reddits 1st page posts are manipulated ;)

Why “Why Outsourcing Sucks” Sucks

Links for August 6th 2008

Thursday, August 7th, 2008

Links for August 6th 2008

Tools:
SQLExport

ASP.Net:
ASP.NET version of “Form ViewState”
CreateUserWizard control in ASP.NET 3.5
ASP.NET AJAX Development Approach Part 1

AJAX:
Reduce ASP.NET Page size and complexity using JQuery-Part 2

WCF:
Patterns & Practices WCF Security Guide

LINQ:
Querying with LINQ to Entities vs ObjectQuery in EF
The Dark Side of LINQ
Using Stored Procedures In Linq

Links for August 6th 2008

Reduce your Power Costs using Edison PC Power Management Software

Thursday, August 7th, 2008

Reduce your Power Costs using Edison PC Power Management Software

Edison was developed by Verdiem, a company that has helped enterprises the world over reduce energy waste from IT devices. Now Verdiem is bringing Edison into your home—at no cost whatsoever. Download Edison and start saving energy today!

Link

Reduce your Power Costs using Edison PC Power Management Software