Sunday, February 15, 2009

PYTHON

Its not about python, the reptile but a very high level programming language Python :)

http://www.python.org/ says
Python is a dynamic object-oriented programming language that can be used for many kinds of software development. It offers strong support for integration with other languages and tools, comes with extensive standard libraries, and can be learned in a few days. Many Python programmers report substantial productivity gains and feel the language encourages the development of higher quality, more maintainable code

What is dynamic object oriented programming language?

As per the publication http://jeffsutherland.com/papers/Rans/OOlanguages.pdf it is :
A project commenced at Xerox PARC in the early 70z with the aim of creating the quintessential dynamic object oriented language. This is one which allows new classes, objects and behaviouf to be appended on the fly by representing the class hierarchy, objects and methods of a program as meta-data at run-time.
Also,
dynamic programming language
Refers to a language that requires less rigid coding on the part of the programmer. It typically features "dynamic typing," which gives the programmer more freedom to pass parameters at runtime without having to define them beforehand. A dynamic language may also perform some amount of self checking at runtime, which would normally be done ahead of time in a compilation stage. Although a dynamic language offers runtime flexibility and is generally easier to program, it does not eliminate the programmer's responsibility for understanding the interactions that will take place.

Convert to Machine Code at Runtime
The term may also refer to interpreted languages in general, which convert source code or bytecode to machine language at runtime, as well as to just-in-time compilation, the process of compiling the program the moment before it is executed.

Dynamic and Non-Dynamic Examples
Numerous languages fall into the dynamic category, including JavaScript, VBScript, Lisp, Perl, PHP, Python, Ruby and Smalltalk. Examples of languages that are not dynamic are C/C++, Java, COBOL and FORTRAN. See dynamic, interpreter and JIT compiler.


Nice one is http://visualwikipedia.com/en/Object-oriented_programming_language

Some useful sites for python which I found useful as I start to learn python are:

http://code.activestate.com/recipes/146847/
http://koichitamura.blogspot.com/2008/06/various-ways-to-integrate-python-and-c.html
http://svn.python.org/projects/ctypes/tags/ctypes-1.0.2/
http://snippets.dzone.com/tag/python
http://starship.python.net/crew/theller/ctypes/

Sunday, February 08, 2009

Hypocrisy

This is what I read when I check dictionary.com for hypocrisy.

hy⋅poc⋅ri⋅sy 
–noun, plural -sies. 1. a pretense of having a virtuous character, moral or religious beliefs or principles, etc., that one does not really possess.
2. a pretense of having some desirable or publicly approved attitude.
3. an act or instance of hypocrisy.


When ppl expect others to treat them in certain fashion and they themselves treat others in not the same fashion, I think it is a genuine case of hypocrisy. People think others should try to make them happy, think about their scenarios, their problems and be considerate about them but do they themselves do the same when they talk to the same person from whom they expect so much? No is the answer in majority of cases. For such people having the thought to be cared for is hypocrisy I think.


From wikipedia::::

Psychology of hypocrisy
In psychology, hypocritical behavior is closely related to the fundamental attribution error: individuals are more likely to explain their own actions by their environment, yet they attribute the actions of others to 'innate characteristics', thus leading towards judging others while justifying ones' own actions.
Also, some people genuinely fail to recognize that they have character faults which they condemn in others. This is called psychological projection. This is self-deception rather than deliberate deception of other people. In other words, "psychological hypocrisy" is usually interpreted by psychological theorists to be an unconscious defense mechanism rather than a conscious act of deception, as in the more classic connotation of hypocrisy. People understand vices which they are struggling to overcome or have overcome in the past. Efforts to get other people to overcome such vices may be sincere. There may be an element of hypocrisy as well if the actors do not readily admit to themselves or to others how far they are or have been subject to these vices.

A Common Fallacy
It is a common fallacy to accuse someone of being a hypocrite to disprove their argument. This can be known as an ad hominem attack.


This ad hominem attack must have been faced by a large number of ppl. I have seen people restricting others from going to pubs and drinking but they themselves drink, may be in close company of few friends. But, should they drink if they want to restrict others from doing the same. Even in lob, I have seen ppl expecting others to understand them but not taking the pain to understand y similar thing happened with others and they say "lob is the ultimate reason for human existence".

Ppl want others to care for them but do they deserve it?

Persons who believe in certain principles and dont agree with certain other principles but feel proud of calling themselves the follower of a certain culture are also in a way hypocrites. If we dont believe in certain aspects we should say that we dont agree with certain things and we should change them. Not because society expects us to be sth we silently accept things...but if one takes pride in being something, he/she should try to abide by it fully, even if it is painful to him/her. But does it mean hard core followers of religions are right in doing what they do because they believe in these? A bit of confusion here but if people who teach religion to these people teach it the right way, I think there will not be any such confusion. People are misguided and if one wants others to follow what he/she is doing then he/she must have full understanding of the reasons and the implications of it.