Thursday, April 28, 2011

GCC Linkage order

I accidentally learned a new fact today about the GCC toolchain. It is regarding the Linkage order of libraries. Let us see what the GCC manual says

A library which calls an external function defined in another library should appear before the library containing the function.


For example, a program ‘data.c’ using the GNU Linear Programming library ‘libglpk.a’, which in turn uses the math library ‘libm.a’, should be compiled as,

$ gcc -Wall data.c -lglpk -lm
since the object files in ‘libglpk.a’ use functions defined in ‘libm.a’.
Most current linkers will search all libraries, regardless of order, but since some do not do this it is best to follow the convention of ordering libraries from left to right.
This is worth keeping in mind if you ever encounter unexpected problems with undefined references, and all the necessary libraries appear to be present on the command line.

Saturday, April 23, 2011

Compiling a GNUStep Application under Windows

A friend of mine had some issues compiling a GNUstep program under Windows. I investigated the problem and here is what we have to do .

From the MingW Command windows (MSYS ) I typed

mount

mount will print the information about folders mounted relative to the root.


SAP@SAP-PC ~/pai


$ mount

C:\Users\SAP\AppData\Local\Temp on /tmp type user (binmode,noumount)

H:\GNUstep2\mingw on /mingw type user (binmode)

H:\GNUstep2 on / type user (binmode,noumount)

H:\GNUstep2 on /usr type user (binmode,noumount)

a: on /a type user (binmode,noumount)

c: on /c type user (binmode,noumount)

d: on /d type user (binmode,noumount)

f: on /f type user (binmode,noumount)

g: on /g type user (binmode,noumount)

h: on /h type user (binmode,noumount)

i: on /i type user (binmode,noumount)

j: on /j type user (binmode,noumount)



SAP@SAP-PC ~/pai

 
I have installed GNUstep @ H:\GNUstep2 and the folder is mapped to /usr ( and / )

From this I could get the Library Headers ( Foundation kit ) @

/usr/GNUstep/System/Library/Headers

and the Libraries are available @

/usr/GNUstep/System/Library/Libraries

Once we have figured out Path for headers and libraries , we need to link following libraries

-lobjc  , -lgnustep-base , -lgnustep-gui

The Complete program and the instructions to compile it is given below


///////////////////////////////////////
// Fstring.m
// 
// On a Windows 7
// --------------
// gcc -o test.exe FString.m 
//        -fconstant-string-class=NSConstantString
//        -I /usr/GNUstep/System/Library/Headers
//        -L /usr/GNUstep/System/Library/Libraries
//        -lobjc -lgnustp-base -lgnustep-gui -enable-auto-import
//         
//
//
//
//
#import <Foundation/Foundation.h>

int main( int argc , char **argv )
{     

    NSString *r = @"Hello World....";   
    NSLog(@"Objective C %@ \n ",r);   
    return 0;
}


Thursday, April 21, 2011

Breadth First Learning vs Depth First Learning

When you try to master ( can any one master some established discipline now a days ? ) something , too often ,depth is emphasized more than it ought to be .

Take the case of Mathematics as I have encountered it.

After 10th , I have not studied Mathematics formally. I learned bulk of my math through self learning . I started with Differential Calculus and to further my knowlege , I was forced to learn Trignometry. Then , TrignoMetry made sense. When I learned Integral Calculus , Differential Calculus began to make sense. When It reached Differential Equations , Integral calculus began to make sense. When I learned , Partial differentiation , Ordinary differential equations began to make sense to me. When Closed form solutions for some problems evaded  me , I learned that Numerical methods are the way to go.

When I learned Numerical Methods (by writing Computer Programs ) , things like Continuity , Limiting operations , Linearity (Matrix stuff ) began to make more sense.

I got interested in Computer Graphics Programming. This gave more insights into Co-Ordinate Systems , Co-ordinate Transformation , Vector DotProduct , Cross Product , Matrix Algebra , Orthogonality , OrthoNormality etc etc

Then came Finance which helped me to brush my arithematic and algebra for sure. Then , found applications for Non linear root findings for computing Internal Rate of Return (IRR) , Progression for deriving formula for EMI , Statistics for calculating Beta , Regression analysis and Trend Projection.

Then , came Stochastic Analysis of Finance models. This was really an eye opener where I really understood stuffs  like Discrete Random Variables , Continuous Random Variable , Sampling , Monte Carlo Simulation , Continuous time finance ( e , base of natural logarithm ) etc.


Emphasis should be on breadth first learning as using mathematics is different from doing mathematics. By trying to spread thin , you find more opportunity to apply the math you have come across and appreciate mathematics much more. 






"Whatis" in a Name ?

Dear Friends,

"Yesterday I got a very funny call from Google. I had created an advertisement for the event BarCamp Kerala 10 using google adwords and was waiting for approval. This lady calls me up and apologized saying that they cannot approve the ad saying that they have a policy against ads related to liquor. I tried talking some sense into her explaining the about the event asking her to 'google' about it etc. But she refused, she demanded that the only way to get the ad running is to change the name and the url. Can you believe this, a company as reputed as google making such stupid stand on an event which is conducted all over the world."

Kenney Jacob

Tuesday, April 19, 2011

Airtel Mess

One of the biggest mistake I made after coming to Bangalore is opting for Airtel Connection. Howmuch ever I try to give the Id Proof , It seems they want more. Today also I am in Half duplex communication mode. They have blocked my outgoing call facility for some reason which I am yet to find out .

Monday, April 18, 2011

Friendship

Prem and Tilak were discussing about Friendship with their friends.

Tilak =>"Jeniffer is my friend ....who is a journalist by Profession"

Prem =>"Friend ... ???"

Tilak =>"Why did u ask so ?"

Prem =>"A guy cannot ever be friend with a gal "

Tilak =>"She is a nice character and your observation here is wrong "

Let us talk to the Guruji

Prem =>"Can a guy and a girl ever be friends ?"

Guruji =>"It is against laws of nature . In most opposite gender friendship , the guy goes into
some kind of "ATMA PEEDAN" in the name of being a good friend... !!!"

Wednesday, April 13, 2011

Hero !

Prem and Tilak were at swords when it comes to their favorite actor. Being from southern most district of Kerala , Prem has got natural affinity for Mohan Lal. Whatver Prem Thinks , as per their script , Tilak thinks just the opposite.

Prem =>"Mohan Lal is a great actor !"

Tilak =>"It depends ! "

Prem => "Why did u say so ?"

Tilak =>"There is nothing called a good actor.Character has to have some scope. Moreover , he is past his prime "

Prem => "He is better than Mammootty  , who has got his own mannerisms and older...."

Tilak => "Let us consult , Guruji "

Together they went to meet the Guruji.

Guruji =>"Rather than comparing actors , I will tell you something which  Bamboo Bhatti , a Sardarji told me "

Prem => "what ?"

Guruji =>"Bhattiji was travelling from Bangalore to Trivandrum by an Indian Airlines flight. A movie was screened and he noted one peculiar thing. "

Tilak =>"What is that ?"

Guruji =>"He does not understand the language and the movie did not have a Hero !!"

Prem => " A movie without a Hero ?"

Guruji =>"Actually , It was a recent Mohan Lal movie and poor Bhattiji could not understand who is the hero !!!"



Saturday, April 09, 2011

Instantiating a Model or Modeling according to the context ?

I have seen a class of people who have got a canonical model for themselves. They sell this model to others and it is rare that an uncalibrated model is useful. The funny fact is that most human models in a contextless scenarios are rarely useful in the context in question.

Since the modern world is more dynamic than it used be , It is not a good idea to have a model for all situation. It should be model for the situation.

Some kind of inertia is responsible for people to create a model for their action. These kind of people wait for miracles to happen in their life or they are looking for some messiah who will be able to use their skills or talent as is.

It rarely happens in Life.

C# - Test Automation Profile

Recently , I have seen C# emerging as a leading language for writing Test Automation applications. For Writing test cases meant for Automation , One needs to determine whether something is amenable for
Automation.

A person who wants to pursue a career in test automation  should be familiar with

C# Programming Language
Base Class Library String and Regular Expressions
Writing Console Applications
Writing Windows forms application
Writing WPF applications ( desirable )
P/Invoke ( calling Win32/Win64 applications - must have )
COM Interop - must have

Desirable

Writing Custom DLLs
Windows Powershell


Why Techies are "second class" citizens in most Software companies ?

Most Companies are organized around Functional ( Verticals ) , Geographic ( Asia/Pacific,Emea ) or Product lines. Each of these divisions require business drivers to head the division. Multiple projects will be running concurrently and each of them (within a division ) requires a project manager.

Some organizations try to have architects work in parallel with multiple projects. From a stakeholders perspective , Project manager ought to have the final authority.


So , Techies end up as second class citizens and from a Industry point of view, it is correct as well

Is there a Life in the City ?

"There is no life here" is something which I hear most Keralites talk about Bangalore ( for that matter Chennai , Hyderabad etc ) and other Cities.

When they say , there is no life , It essentially means, Out door life. IMHO , Indoor life is same everywhere. But , the difference is in a Metro , you will have more economic opportunities.


Now , a new model called "Virtual Life" has come into the existence. Monday to Friday , It is commute and work. During the weekend , catching up with the lost sleep. But , economically it is the most rewarding .

For outdoor life , stay in the town or village you were born. For in door life , move to a city where economic opportunities are there.


Friday, April 08, 2011

God's Own Country

Prem and Tilak were perplexed about why Kerala is called God's Own Country.

Prem => " I think it is a pure branding excersize "

Tilak => "Ya, Even I feel so ............."

Prem =>" Let us go and talk to Guruji ..."

Guruji =>"Kerala is God's Own Country ....But , the God is Yama...!!!"

Wednesday, April 06, 2011

We are Exchanging "Value" , not Skill or Knowledge

I have time and again come across an argument that people with good Knowledge , Skill or combination of both ought to get bigger pie than the rest, in any economic context.

If you take a closer look , we human beings are in the business of value exchange and the single most determinant of value proposition is the "economics" of the buyer. What kind of value add a buyer of skill/knowledge can have in his economic context can vary between the Individuals and Places.

Some element of luck ought to be there to find the right kind of buyer. Context is the king here.  People with Knowledge/Skill look down on people whom they perceive to be of  lesser intellect. This will rob those people many an economic opportunities.