When we work in a project , there will be a software architect. The Architect will come up with a tentative blue print of the software which we are planning to build. The vision has to be concretized by the whole team to come up with something useful for it's stake holders.
Many a times when i have donned the hat of Software Architect , i have across a situation where team members are interested in coding the stuff . What i usually look towards them is for their "BrainShare" to refine my tentative design.
Try to propogate this meme and you will see the results trickling in. At least , it has for me.
Thursday, September 30, 2010
Plausible Explanation Explained !
Now a days , i interact with lot of fresh graduates as their mentor. Being on the aggressive side of their youth , they are more of doers. I am big fan of thought before action. This leads to conflict.
Here is my explanation.
Since Abstraction is the name of the game , people on the ground knows the facts better. When there is feedback from the ground , That has to be logically explained. Even if I won't be able to understand the ground reality , based on the Plausibility of reasoning given , (90% of the time ) I will
be able to zero in on to the point.
When you talk to a veteran of any Industry , try to explain the stuff . He will be able to do Inference based on the Plausibility of Explanation. This is true for any Industry. If you cannot explain the stuff to your senior, In all probability , you have not understood it yourself.
Here is my explanation.
Since Abstraction is the name of the game , people on the ground knows the facts better. When there is feedback from the ground , That has to be logically explained. Even if I won't be able to understand the ground reality , based on the Plausibility of reasoning given , (90% of the time ) I will
be able to zero in on to the point.
When you talk to a veteran of any Industry , try to explain the stuff . He will be able to do Inference based on the Plausibility of Explanation. This is true for any Industry. If you cannot explain the stuff to your senior, In all probability , you have not understood it yourself.
Labels:
Computer Programming
| Reactions: |
It's October !
The month of October has always been a lucky month for me. In my school days , this is the month second mid term exams used to be held and i have always scored good marks ( for some reason unknown to me ). This used to be the month of Navrathri and there will be lot of holidays including Gandhi Jayanthi etc.
When i started professional life , this month has always been good for me . I do not know what is in store for me , this time around.
P.S :- There is nothing called Superstitious belief. Belief itself is superstitious.
When i started professional life , this month has always been good for me . I do not know what is in store for me , this time around.
P.S :- There is nothing called Superstitious belief. Belief itself is superstitious.
Labels:
Ways of Life
| Reactions: |
Tuesday, September 28, 2010
Pycon 2010 India - A personal perspective (Day 2 )
On the day two of the Pycon 2010 India , i reached the venue some thirty minitues earlier to meet presenters and attendees and to have tech discussions. I met lot of good guys.
Polyform Puzzler and a Pythonic Algorithm X By David GoodGear
-------------------------------------------------------------------
David explained various ways to tile shapes to form composite shapes. Being a person interested in Combinatorics , i really enjoyed it. I am yet to study the stuff he explained ( To really get the stuff he explained to your vein , one needs to study it ).
He introduced lot of memes like
Tetrominoes - Building blocks you see in Tetris game (is an example of Polyforms )
Monomino , domino , triomino , tetramino and pentomino are examples of other Polyforms
David seems to be a avid science fiction reader and he came across Polyforms from a Arthur C Clarke's science fiction novel , when he was kid
He seems to be a avid fan of patterns. He explained how he implemented the Polyform search program available at http://puzzler.sourceforge.net/ ( Read what is on the home page and search wiki you will be
having materials for rest of your life )
The algorithmic complexity is O(N^3 ) ( it is based on adapted algorithms of Knuth's Set Cover )
I think , data dominate here as we need to operate on boolean matrix ( we need to slice/splice it )
The biggest take aways were
a) Use Python's builtin data structure , it is written (and evolved ) by people smarter than us
b) if a JIT compiler makes your stuff really fast , there is something wrong with your alogirthmic implementation
c) Computers never think the way we think , so never make them do anything the way we do things
It was a good session from Software engineering point of view as well.
Internet Protocols in the Python Standard Library By Senthil
-------------------------------------------------------------
I liked this talk the most because of the way he delivered it. The guy was talking about the stuff
he was breathing all the day. If you knew what a socket is ( IP address/Port stuff ) , this presentation
would have given you the stuff you can do (fast) using the Python's "Batteries Included" approach to
network programming.
He highlighted the need to think at a high level , when you write Protocol clients . He did show some
demoes of the stuff he was explaining . I had two pages of notes after his session.
The discussion about NNTP news client in Python was very informative and he did tell about
the idiom , "if there are not enough bug reports , usage might be low !".
Building Scalable Apps using Google App Engine By Pranav Prakash
----------------------------------------------------------------------
This session gave a quick primer of Google's Application Infrastructure
viz Google AppEngine. He talked about Google DataStore and Key/Value
pair databases ( aka NOSQL ) and how it helps in scalability. From the enusing
discussion , i understood that NOSQL DB's are good for applications were
writes are low and reads are high . I think , for LOB applications , the good old relational
DB is still the favorite. He did show some code snippets and discussed about
scheduled jobs. Another valuable informamtion was , a request should not last more than
thirty seconds !.
NoSQL Primer by Harsh Vachani and Amol Gupta
-----------------------------------------------------
The talk started out well . There was element of advocacy in the talk. There were questions on the performance front and reliability front . The Presenters could not handle the heat well. Personally,
i picked up lot of information from the discussions happened on the topic.
The incident which i will remember is when the presenter was trying to talk about Linear Complexity , he inadvertantly mentioned Log(1) complexity . Within in milliseconds , the reply came Log(1) is Zero !
There was a question on , at what point of load ,data loss (lost upates) might happen in NoSQL DB etc.
I enjoyed the talk as i always believe that "Knowledge comes through confrontation as well !"
Lunch time !. I picked conversations with lot of guys
Python in the hardware world: MyHDL By Anish Mangal
---------------------------------------------------------
He started with Intel 4004 and showed modern pentium. With this , he put Hardware Description
Language and Synthesis in perspective for the audience. He talked about VHDL , Verilog , System C
and Systtem verilog. Sinc these tools are proprietory and vendor lock in is a way of lif e, he highlighted
the value of a Open source Simulation package like MyHDL.
He showed some code snippets. It was a short and sweet presentation
Extending and Embedding Python under Windows By Praseed Pai K.T. (That is me !)
-----------------------------------------------------------------------
In this presentation , i talked about Windows DLL and introduced keywords like
extern "C" , __stdcall , __declspec(dllexport) etc. Then, i created a Windows DLL
with Visual C++ command line compiler. That was followed by Static linking
and Dynamic Linking .
Next , i demonstrated a Simple Python Extension which can be compiled for Python
3.x and Python 2.x and there was code walkthrough.
Then there were some audience quesitons regarding Python BigNumber package ,
usage of SWIG etc .
Finally , i demonstrated how we can create a Python class from C/C++.
Marketing Python:Lessons Learned By Ramadas S
---------------------------------------------------
He was mid way into his presentation when i reached the hall. He is a awsome speaker and has
got capacity to persuade the audience. He highlighted strategies for "pushing" python in the
workplace by talking about the solutions. if we talk about technology , people are not going
to come our way was the message.
He gave lot of anecdotal examples of Python in the SMB world . Highlighted the economics
of training market for Python Programming . Other options include $3 hosting etc.
I had discussions with him after the talk and we went out for a coffee along with CR anil etc
I attended the AGM of IPSS ( For the first time , i was attending a AGM ) and Kenneth stole
the show !
To sum up , I really enjoyed the event and looking forward to the next Edition in Chennai.
Polyform Puzzler and a Pythonic Algorithm X By David GoodGear
-------------------------------------------------------------------
David explained various ways to tile shapes to form composite shapes. Being a person interested in Combinatorics , i really enjoyed it. I am yet to study the stuff he explained ( To really get the stuff he explained to your vein , one needs to study it ).
He introduced lot of memes like
Tetrominoes - Building blocks you see in Tetris game (is an example of Polyforms )
Monomino , domino , triomino , tetramino and pentomino are examples of other Polyforms
David seems to be a avid science fiction reader and he came across Polyforms from a Arthur C Clarke's science fiction novel , when he was kid
He seems to be a avid fan of patterns. He explained how he implemented the Polyform search program available at http://puzzler.sourceforge.net/ ( Read what is on the home page and search wiki you will be
having materials for rest of your life )
The algorithmic complexity is O(N^3 ) ( it is based on adapted algorithms of Knuth's Set Cover )
I think , data dominate here as we need to operate on boolean matrix ( we need to slice/splice it )
The biggest take aways were
a) Use Python's builtin data structure , it is written (and evolved ) by people smarter than us
b) if a JIT compiler makes your stuff really fast , there is something wrong with your alogirthmic implementation
c) Computers never think the way we think , so never make them do anything the way we do things
It was a good session from Software engineering point of view as well.
Internet Protocols in the Python Standard Library By Senthil
-------------------------------------------------------------
I liked this talk the most because of the way he delivered it. The guy was talking about the stuff
he was breathing all the day. If you knew what a socket is ( IP address/Port stuff ) , this presentation
would have given you the stuff you can do (fast) using the Python's "Batteries Included" approach to
network programming.
He highlighted the need to think at a high level , when you write Protocol clients . He did show some
demoes of the stuff he was explaining . I had two pages of notes after his session.
The discussion about NNTP news client in Python was very informative and he did tell about
the idiom , "if there are not enough bug reports , usage might be low !".
Building Scalable Apps using Google App Engine By Pranav Prakash
----------------------------------------------------------------------
This session gave a quick primer of Google's Application Infrastructure
viz Google AppEngine. He talked about Google DataStore and Key/Value
pair databases ( aka NOSQL ) and how it helps in scalability. From the enusing
discussion , i understood that NOSQL DB's are good for applications were
writes are low and reads are high . I think , for LOB applications , the good old relational
DB is still the favorite. He did show some code snippets and discussed about
scheduled jobs. Another valuable informamtion was , a request should not last more than
thirty seconds !.
NoSQL Primer by Harsh Vachani and Amol Gupta
-----------------------------------------------------
The talk started out well . There was element of advocacy in the talk. There were questions on the performance front and reliability front . The Presenters could not handle the heat well. Personally,
i picked up lot of information from the discussions happened on the topic.
The incident which i will remember is when the presenter was trying to talk about Linear Complexity , he inadvertantly mentioned Log(1) complexity . Within in milliseconds , the reply came Log(1) is Zero !
There was a question on , at what point of load ,data loss (lost upates) might happen in NoSQL DB etc.
I enjoyed the talk as i always believe that "Knowledge comes through confrontation as well !"
Lunch time !. I picked conversations with lot of guys
Python in the hardware world: MyHDL By Anish Mangal
---------------------------------------------------------
He started with Intel 4004 and showed modern pentium. With this , he put Hardware Description
Language and Synthesis in perspective for the audience. He talked about VHDL , Verilog , System C
and Systtem verilog. Sinc these tools are proprietory and vendor lock in is a way of lif e, he highlighted
the value of a Open source Simulation package like MyHDL.
He showed some code snippets. It was a short and sweet presentation
Extending and Embedding Python under Windows By Praseed Pai K.T. (That is me !)
-----------------------------------------------------------------------
In this presentation , i talked about Windows DLL and introduced keywords like
extern "C" , __stdcall , __declspec(dllexport) etc. Then, i created a Windows DLL
with Visual C++ command line compiler. That was followed by Static linking
and Dynamic Linking .
Next , i demonstrated a Simple Python Extension which can be compiled for Python
3.x and Python 2.x and there was code walkthrough.
Then there were some audience quesitons regarding Python BigNumber package ,
usage of SWIG etc .
Finally , i demonstrated how we can create a Python class from C/C++.
Marketing Python:Lessons Learned By Ramadas S
---------------------------------------------------
He was mid way into his presentation when i reached the hall. He is a awsome speaker and has
got capacity to persuade the audience. He highlighted strategies for "pushing" python in the
workplace by talking about the solutions. if we talk about technology , people are not going
to come our way was the message.
He gave lot of anecdotal examples of Python in the SMB world . Highlighted the economics
of training market for Python Programming . Other options include $3 hosting etc.
I had discussions with him after the talk and we went out for a coffee along with CR anil etc
I attended the AGM of IPSS ( For the first time , i was attending a AGM ) and Kenneth stole
the show !
To sum up , I really enjoyed the event and looking forward to the next Edition in Chennai.
Labels:
Pyhon,
Ways of Life
| Reactions: |
Monday, September 27, 2010
Pycon 2010 India - A personal perspective (Day 1 )
I went to Bangalore after a period of five years to attend Pycon 2010 event. I came back to Kerala in the year 2005 ( Sept. 8th to be exact ) and it was my first visit in five years. Fearing the Fallout of Ayodhya Verdict , I decided to fly this time a day before.
Due to the traffic ( Garden city has now become Gaadi city ) and rain , the day was pretty uneventfull.
On the event day , i reached MSRIT a bit late and Keynote speaker David Goodgear was already well into his talk. I heard him talking about Python Advocacy , Activities of PSF etc.
Talks attended
llvm-py: Writing Compilers Using Python by Mahadevan
----------------------------------------------------------
I enjoyed the session very much. He explained the basics of writing a front end. He talked about AST ( Abstract Syntax Tree ) , IR ( Intermediate representation ) , Lexical Analysis , Parsing ( I learned
that ANTLR has got a python target from him ) , Multi pass compilation ( Explained what a pass is )
, Code Generator Generators , CLang project etc to name a few. I asked couple of questions and
answers helped me a lot.
Considering the fact that explaining a vertical topic like Compiler backend is a tough job , he did a remarkable job.
I took my Muchnich book out and read it , when i reached Kochi yesterday. I am planning to
port my open source compiler SLANG4.net ( http://slangfordotnet.codeplex.com/ ) to Python
and planning to use llvm-py for my backend.
Multi-core programming with Python By Keerthi Shankar
---------------------------------------------------------
This was another session which was informative. The venerable Thread vs Process spawning issue
popped up again and again. He explained about the GIL ( Global Interpreter Lock ) and why it
hampers concurrency , if we are having "threading" mindset. His example was Merge sort , a recursive implementation. ( Recursion is welcome in MultiCore programming ! ) He stressed the Amdhal's law
to explain the limit of parallelism and there was mention of Map/Reduce ( even though he did not
name it that way )
A nice job by him
Python Celery by Mahendra M
--------------------------------
The guy knows his stuff really well. There were lot of vexing questions , he answered them all with conviction. He started with explanations about the need for a task engine to write responsive web sites.
He explained about AMQP , Producer / Consumer programming model of Celery , Queue configuration
, The Audit information which celery stores etc
It was informative for me and being a software architect who "owned" a Asynchronous Task framework for
a period of two years , it was music to my ears.
It's Lunch Time and what a queue !. I caught up with Mahadevan and Ramakrishnan had a chit chat and surprised to learn that they are from my own place. I have met the latter before at a GNU event back in
the year 2001
After the lunch , i spent the rest of the evening in the hitech hall . I got power supply and tweeted a lot about what was happening in the hall ( @praseed3point14 ).
GUI Programming with PyQt - Ankur Gupta
---------------------------------------------
This was an excellent session. I was impressed with his guts to generate an Arbitary UI (in this case firefox ) based on a request from the audience. He did show Qt designer ( why not Qt Creator ? ) and
explained the semantics of .ui file . He started explaining about QT signals and slots and compared
with the callback mechanism available in other UI frameworks.
I think , a workshop by him would have been cool and the fact that hall was packed shows people are
interest in Qt programming using Python.
I tweeted , Ankur is a "Cute" ( Qt ! ) Guy
Introduction to Image processing with Python - By Anil CR
-----------------------------------------------------------
He started with some mathematical formalism . It "stunned" the audience. Wait ..Wait ...
After that he used iPython ( Interactive Python ) to explain the stuff. He used Lena image
( Lena image is the drosophila melanogaster of Image processing and analysis ) to demonstrate
various filters ( His sentence " All image processing operations are filters of sort ! " is apt )
for Edge detection , FFT ( Fast Fourier Transform ) , Convolution operations etc. His explanation
of SciPy and NumPy and it's relation to Linear algebra packages was superb.
There were discussions about Pythom Imaging Library , Open CV as well.
Being a one time Image / 3D graphics guy , i enjoyed the talk. He should have prepared
lot of code snippets before starting. Lot of time got wasted because of his "workshop" approach.
Great Job by him !
Semantic Web Programming in Python an Introduction - Biju / Jagannadh
--------------------------------------------------------------------------
It was the most informative session for me . This might be due to the fact that
i am a person who is interested in Information Engineering. I read about these
stuff a lot. The explanation of triple , storing information as graph and collapsing
the graph using ConjunctiveGraph was great. He explained about FOAF stuff.
( FOAF - Friend of a Friend. Read about Six degrees of seperation )
I think , the person who took the session was doing it for the first time. I feel,
he was bit tensed. I had the co-presenter sitting besides me and asked clarfications
on certain stuff and they were talking from their experience.
Great job guys !. You have prompted me to take my RDF book out of the shelf
to have a quick glance.
Text Parsing in Python By Gayatri/Madhubala
----------------------------------------------
The talk was targetted at beginners. She ( Gayatri ) went beyond that.
Her talk had three aspects to it
a) String Library ( Lexing/Parsing using it !)
b) Regular Expressions ( Some examples were shown )
c) Parser generation tools ( did mention about PLY )
she did a good job and i felt that she uses all of the above in her daily
job. Due to the shortage of time , she could not explain Python Lex
and Yacc ( PLY ) and i feel it can be a topic for the next year !
Deadly Combo -- python & newt by Kushal Das
-------------------------------------------------
He explained about newt , a alternate system for writing Console based application. The code
snippets were well written and for me it looked like Clipper ( my first programming language).
The speaker explained (well) the difference between newt programming model and ncurses
programming model.
Unfortunately for him , Audience were full of GUI programmers and they could not appreciate
the polled mode programming model of Console APIs
It was well presented for me and it invoked certain nostalgia about Text mode UI
An Extempore speech by Praseed Pai ( that is me ! )
-----------------------------------------------------
After Kushal's session , there was supposed to be another session in the same hall. The speaker did not
turn and Kushal continued for a while. When the floor was open , there were suggestion for "quickies".
I got up and started sharing my experiences with Python and mentioned about my talk "Extending
and Embedding Python under Windows " . In that process , a question came "Why windows?" .
The discussion drifted into Windows vs FOSS movement. I explained about my upcoming talk
at the kerala barcamp titled "FOSS in Kerala - a case of inmates are running the assylum ?"
( http://www.barcampkerala.org/blog/sessions/ ) . Then there was exchange of ideas regarding
that. Finally some one brought sense to the madness by saying that we are not talking python here.
That is all for the day 1 !
Due to the traffic ( Garden city has now become Gaadi city ) and rain , the day was pretty uneventfull.
On the event day , i reached MSRIT a bit late and Keynote speaker David Goodgear was already well into his talk. I heard him talking about Python Advocacy , Activities of PSF etc.
Talks attended
llvm-py: Writing Compilers Using Python by Mahadevan
----------------------------------------------------------
I enjoyed the session very much. He explained the basics of writing a front end. He talked about AST ( Abstract Syntax Tree ) , IR ( Intermediate representation ) , Lexical Analysis , Parsing ( I learned
that ANTLR has got a python target from him ) , Multi pass compilation ( Explained what a pass is )
, Code Generator Generators , CLang project etc to name a few. I asked couple of questions and
answers helped me a lot.
Considering the fact that explaining a vertical topic like Compiler backend is a tough job , he did a remarkable job.
I took my Muchnich book out and read it , when i reached Kochi yesterday. I am planning to
port my open source compiler SLANG4.net ( http://slangfordotnet.codeplex.com/ ) to Python
and planning to use llvm-py for my backend.
Multi-core programming with Python By Keerthi Shankar
---------------------------------------------------------
This was another session which was informative. The venerable Thread vs Process spawning issue
popped up again and again. He explained about the GIL ( Global Interpreter Lock ) and why it
hampers concurrency , if we are having "threading" mindset. His example was Merge sort , a recursive implementation. ( Recursion is welcome in MultiCore programming ! ) He stressed the Amdhal's law
to explain the limit of parallelism and there was mention of Map/Reduce ( even though he did not
name it that way )
A nice job by him
Python Celery by Mahendra M
--------------------------------
The guy knows his stuff really well. There were lot of vexing questions , he answered them all with conviction. He started with explanations about the need for a task engine to write responsive web sites.
He explained about AMQP , Producer / Consumer programming model of Celery , Queue configuration
, The Audit information which celery stores etc
It was informative for me and being a software architect who "owned" a Asynchronous Task framework for
a period of two years , it was music to my ears.
It's Lunch Time and what a queue !. I caught up with Mahadevan and Ramakrishnan had a chit chat and surprised to learn that they are from my own place. I have met the latter before at a GNU event back in
the year 2001
After the lunch , i spent the rest of the evening in the hitech hall . I got power supply and tweeted a lot about what was happening in the hall ( @praseed3point14 ).
GUI Programming with PyQt - Ankur Gupta
---------------------------------------------
This was an excellent session. I was impressed with his guts to generate an Arbitary UI (in this case firefox ) based on a request from the audience. He did show Qt designer ( why not Qt Creator ? ) and
explained the semantics of .ui file . He started explaining about QT signals and slots and compared
with the callback mechanism available in other UI frameworks.
I think , a workshop by him would have been cool and the fact that hall was packed shows people are
interest in Qt programming using Python.
I tweeted , Ankur is a "Cute" ( Qt ! ) Guy
Introduction to Image processing with Python - By Anil CR
-----------------------------------------------------------
He started with some mathematical formalism . It "stunned" the audience. Wait ..Wait ...
After that he used iPython ( Interactive Python ) to explain the stuff. He used Lena image
( Lena image is the drosophila melanogaster of Image processing and analysis ) to demonstrate
various filters ( His sentence " All image processing operations are filters of sort ! " is apt )
for Edge detection , FFT ( Fast Fourier Transform ) , Convolution operations etc. His explanation
of SciPy and NumPy and it's relation to Linear algebra packages was superb.
There were discussions about Pythom Imaging Library , Open CV as well.
Being a one time Image / 3D graphics guy , i enjoyed the talk. He should have prepared
lot of code snippets before starting. Lot of time got wasted because of his "workshop" approach.
Great Job by him !
Semantic Web Programming in Python an Introduction - Biju / Jagannadh
--------------------------------------------------------------------------
It was the most informative session for me . This might be due to the fact that
i am a person who is interested in Information Engineering. I read about these
stuff a lot. The explanation of triple , storing information as graph and collapsing
the graph using ConjunctiveGraph was great. He explained about FOAF stuff.
( FOAF - Friend of a Friend. Read about Six degrees of seperation )
I think , the person who took the session was doing it for the first time. I feel,
he was bit tensed. I had the co-presenter sitting besides me and asked clarfications
on certain stuff and they were talking from their experience.
Great job guys !. You have prompted me to take my RDF book out of the shelf
to have a quick glance.
Text Parsing in Python By Gayatri/Madhubala
----------------------------------------------
The talk was targetted at beginners. She ( Gayatri ) went beyond that.
Her talk had three aspects to it
a) String Library ( Lexing/Parsing using it !)
b) Regular Expressions ( Some examples were shown )
c) Parser generation tools ( did mention about PLY )
she did a good job and i felt that she uses all of the above in her daily
job. Due to the shortage of time , she could not explain Python Lex
and Yacc ( PLY ) and i feel it can be a topic for the next year !
Deadly Combo -- python & newt by Kushal Das
-------------------------------------------------
He explained about newt , a alternate system for writing Console based application. The code
snippets were well written and for me it looked like Clipper ( my first programming language).
The speaker explained (well) the difference between newt programming model and ncurses
programming model.
Unfortunately for him , Audience were full of GUI programmers and they could not appreciate
the polled mode programming model of Console APIs
It was well presented for me and it invoked certain nostalgia about Text mode UI
An Extempore speech by Praseed Pai ( that is me ! )
-----------------------------------------------------
After Kushal's session , there was supposed to be another session in the same hall. The speaker did not
turn and Kushal continued for a while. When the floor was open , there were suggestion for "quickies".
I got up and started sharing my experiences with Python and mentioned about my talk "Extending
and Embedding Python under Windows " . In that process , a question came "Why windows?" .
The discussion drifted into Windows vs FOSS movement. I explained about my upcoming talk
at the kerala barcamp titled "FOSS in Kerala - a case of inmates are running the assylum ?"
( http://www.barcampkerala.org/blog/sessions/ ) . Then there was exchange of ideas regarding
that. Finally some one brought sense to the madness by saying that we are not talking python here.
That is all for the day 1 !
Labels:
Python,
Ways of Life
| Reactions: |
Saturday, September 25, 2010
Writing a "Hello World" Extension for Python
At this point of time , we have got Python 2.x and Python 3.x . Mechanism for writing extensions went for some minor changes in the version 3.x. I have used C/C++ pre-processor to write extensions in a portable manner.
Let us see the source code of the extension
Every Python Extension function ( classes will be dealt later ) have a mandatory entry point
PyObject * ( PyObject *self , PyObject *args );
PyObject is just a C/C++ struct which stores the data and you can treat it as a container for the Python type.
You can consult Python C API documentation to figure out what each of the types and function do above. All it does is return a string to the Python Interpreter.
Let us compile and this to make PyExt module. The DLLs are renamed as .pyd for Python to load it.
Once we have compiled it as above . we can load the extension under Python Environment or invoke from a Python Program.
Let us see , how this code can be invoked from Python 3.x environment
First Compile and Link the source code with Python31.lib . The code is written in such a way that we need to give a pre-processor directive to call it from 3.x.
Let us see , how this can be invoked.
Let us see the source code of the extension
///////////////////////////////
//
// PyExt.cpp
//
// A Simple Python Extension under Visual C/C++
//
// Written by Praseed Pai K.T.
// http://praseedp.blogspot.com
//
//
// At the Visual studio Command prompt
//
// For Python 3.1 => We need to define _PYTHON_3X
// -----------------------------------------------
// The Python path for my machine is C:\Python31
//
// cl /c -IC:\Python31\include /D_PYTHON_3X PyExt.cpp
//
// link /DLL /out:PyExt.pyd PyExt.obj C:\Python31\libs\Python31.lib
//
// For Python 2.5
// -----------------------------------------------
// The Python path for my machine is C:\Python25
//
// cl /c -IC:\Python25\include PyExt.cpp
//
// link /DLL /out:PyExt.pyd PyExt.obj C:\Python25\libs\Python25.lib
//
//
#include <Python.h>
#include <stdlib.h>
/////////////////////////////////
//
// This is the actual routine which returns the string "Hello World.."
//
//
//
static PyObject * SayHello( PyObject *self , PyObject *args )
{
PyObject *return_value = 0;
return_value = Py_BuildValue("s","Hello Bengaluru ....");
return return_value;
}
////////////////////////////////////////
//
// Initialize the PyMethodDef table
//
//
static struct PyMethodDef pyext_methods[] = {
{"SayHello",SayHello,METH_NOARGS,0},
{ 0 , 0 }
};
#ifdef _PYTHON_3X
///////////////////////////////////
//
// Initialize the table
//
//
static struct PyModuleDef PyExtModule = {
PyModuleDef_HEAD_INIT,
"PyExt", /* name of module */
0, /* module documentation, may be NULL */
-1, /* size of per-interpreter state of the module,
or -1 if the module keeps state in global variables. */
pyext_methods
};
//////////////////////////////////////
//
// Python Interpreter initializes the module by
// calling the routine given below
//
//
PyMODINIT_FUNC PyInit_PyExt(void) {
return PyModule_Create(&PyExtModule);
}
#else
extern "C" __declspec(dllexport) void __stdcall initPyExt() {
Py_InitModule("PyExt",pyext_methods);
}
#endif
Every Python Extension function ( classes will be dealt later ) have a mandatory entry point
PyObject *
PyObject is just a C/C++ struct which stores the data and you can treat it as a container for the Python type.
You can consult Python C API documentation to figure out what each of the types and function do above. All it does is return a string to the Python Interpreter.
Let us compile and this to make PyExt module. The DLLs are renamed as .pyd for Python to load it.
Once we have compiled it as above . we can load the extension under Python Environment or invoke from a Python Program.
Let us see , how this code can be invoked from Python 3.x environment
First Compile and Link the source code with Python31.lib . The code is written in such a way that we need to give a pre-processor directive to call it from 3.x.
Let us see , how this can be invoked.
Labels:
Mixed Mode Windows Development,
Python
| Reactions: |
How to Write a DLL under Windows (for Dynamic Languages !)
In Pycon 2010 , i am planning a session on Extending and Embedding Python under Windows.
Writing a extension involves two things
a ) Learning to write a Dynamic Link Library ( or Shared Object .so under Linux/MAC)
b) Learning the Python C API (or Perl API , PHP API etc )
Rest is just that , Details !
Let us write a C function which takes two integers as argument and returns the value after adding them
In the above code snippet you might see three stuff which is not available in vanilla C/C++ programs
extern "C" - We are promising the C++ compiler that this function won't be overloaded. We do not need
this , if our extension is .c ( I prefer CPP extension for better type checking , default parameter and consuming C++ libraries etc )
__declspec(dllexport) - We are instructing the Visual C++ compiler that we are going to export this function
__stdcall - The function follows the calling convention __stdcall ( for C/C++ it is __cdecl or __thiscall ) . The parameters are pushed from right to left and callee cleans up the stack. This is ideal for calling from a scripting language or a non C/C++ program.
A note about Name mangling
-----------------------------
Microsoft C++ compiler mangles the function name with following convention
_ (underscore) + FunctionName + @ + parametersize
So , our Add function will become
_Add@8
To avoid this , we need to create a Module definition file
Go to the Visual studio command prompt . Now we can compile and link the stuff as given above to get test.dll
When we create a DLL , we get a .Lib file . Such files are called Import Libraries. The Import Library
works as a dictionary for the Linker to find where to look for the functions to be linked. This is called
static linking of DLL.
Let us write a C/C++ function to call this DLL.
Here we are giving test.lib to the linker to do the binding. The loader does some plumbing to resolve the
actual address of the functions ( DLLs are loaded at different positions in memory . )
We can now run the program.
Languages like Python , Perl , Java (!) prefers dynamic loading of the DLL. There are couple of functions
which enables us to do that.
They are
LoadLibrary - Load a DLL into the memory ( dlopen in GNU Linux/Mac OS X )
GetProcAddress - retrieve the address of a procedure ( dlysym in GNU Linux/MAC OS X )
FreeLibrary - Release the DLL ( dlclose in GNU Linux/MAC OSX )
Let us write a C/C++ program which will dynamically load our test.dll ( we need not give import library here )
Compile and Link the above code
We have come a long way from where we started. if you can do this , writing an Extension Module in Python is just a matter of time.
Writing a extension involves two things
a ) Learning to write a Dynamic Link Library ( or Shared Object .so under Linux/MAC)
b) Learning the Python C API (or Perl API , PHP API etc )
Rest is just that , Details !
Let us write a C function which takes two integers as argument and returns the value after adding them
/////////////////////////////
// test.cpp
//
// A Simple DLL written using C/C++
//
// At the Visual studio command prompt
//
// cl /c test.cpp
//
// link /DLL /out:test.dll /DEF:test.def test.obj
//
#include <stdio.h>
extern "C" __declspec(dllexport) int __stdcall Add(int a , int b ) {
return a + b;
}In the above code snippet you might see three stuff which is not available in vanilla C/C++ programs
extern "C" - We are promising the C++ compiler that this function won't be overloaded. We do not need
this , if our extension is .c ( I prefer CPP extension for better type checking , default parameter and consuming C++ libraries etc )
__declspec(dllexport) - We are instructing the Visual C++ compiler that we are going to export this function
__stdcall - The function follows the calling convention __stdcall ( for C/C++ it is __cdecl or __thiscall ) . The parameters are pushed from right to left and callee cleans up the stack. This is ideal for calling from a scripting language or a non C/C++ program.
A note about Name mangling
-----------------------------
Microsoft C++ compiler mangles the function name with following convention
_ (underscore) + FunctionName + @ + parametersize
So , our Add function will become
_Add@8
To avoid this , we need to create a Module definition file
LIBRARY test
EXPORTS
AddGo to the Visual studio command prompt . Now we can compile and link the stuff as given above to get test.dll
When we create a DLL , we get a .Lib file . Such files are called Import Libraries. The Import Library
works as a dictionary for the Linker to find where to look for the functions to be linked. This is called
static linking of DLL.
Let us write a C/C++ function to call this DLL.
////////////////////////////////////
// caller.cpp
//
// cl caller.cpp test.lib
//
//
//
#include <stdio.h>
extern "C" int __stdcall Add( int , int );
int main( int argc , char **argv )
{
printf("The value is %d\n",Add(2,3));
}Here we are giving test.lib to the linker to do the binding. The loader does some plumbing to resolve the
actual address of the functions ( DLLs are loaded at different positions in memory . )
We can now run the program.
Languages like Python , Perl , Java (!) prefers dynamic loading of the DLL. There are couple of functions
which enables us to do that.
They are
LoadLibrary - Load a DLL into the memory ( dlopen in GNU Linux/Mac OS X )
GetProcAddress - retrieve the address of a procedure ( dlysym in GNU Linux/MAC OS X )
FreeLibrary - Release the DLL ( dlclose in GNU Linux/MAC OSX )
Let us write a C/C++ program which will dynamically load our test.dll ( we need not give import library here )
/////////////////////////////
//dyncaller.cpp
//
//
//Call a DLL at the run time
//
// cl dyncaller.cpp
//
#include <stdio.h>
#include <windows.h>
///////////////////
//
// typedef for Binary Function ( Add(int , int ) )
//
//
typedef int (__stdcall * BinaryFunc ) ( int , int );
int main( int argc , char **argv )
{
HMODULE h = LoadLibrary("test.dll");
if ( h == INVALID_HANDLE_VALUE ) {
fprintf(stdout,"Failed to load the DLL\n");
return -1;
}
BinaryFunc bfn = (BinaryFunc)GetProcAddress(h,"Add");
if ( bfn == 0 ) {
fprintf(stdout,"Failed to retrive func pointer\n");
return -2;
}
printf("The value is %d\n",(*bfn)(2,3));
FreeLibrary(h);
return 0;
}
Compile and Link the above code
We have come a long way from where we started. if you can do this , writing an Extension Module in Python is just a matter of time.
Labels:
Mixed Mode Windows Development,
Python
| Reactions: |
Wednesday, September 22, 2010
Merits of "Mediocrity" in Software Industry
There is great emphasis placed on Merit everywhere. This pressurizes people into doing things which they are not comfortable with. Excellence gives opportunity to a few where as mediocrity gives opportunity to a lot.
That is the reason merit is emphasized in the urban areas and mediocrity is encouraged in the rural areas. Urban people see life as a race and Rural people see it as a rally.
So , in a big team ,all need not excel in what they do at an absolute scale. To ship a software , the team members have to reach a "thresh-hold" level mandated by the project and the project sponsors in question.
A company which is small and short of capital , will try to make up that by upping the ante on the technical front. There the stuff is different as each members have to scale beyond the average. Then the problem really starts.
Some people think that the job which they have got is result of their educational qualification , their assured right as they have completed Engineering /MCA etc
They compare their stuff based on the bottom line and the snobbery aspect which they are subjected to.
So question boils down to
"Where should I work and how much should I earn to be a worthy person? (in front of snobs)"
The more ambitious ( there is no correlation between technical ability and ambition ) "urban" types will take this question very seriously and they will try to switch companies until they get tired or snob effect gets lesser.
For them , it is a survival battle. They have not seen permanence in life. They have shifted locations eight to nine times by the time they completed their teens. ( Let us call them Urbans )
These "urbans" will be working with rural types. In small companies , rural types are a majority and presence of some urban types can vitiate the atmosphere. The rural types have seen permanence , adherence to their parents and world is "static". Such people "value" ( are forced to ) Skill , self improvement etc.
They are not suited for happy go lucky attitude of the urban types. But, at the snob front they are on
the receiving end from their kith and kin.
These urban types will end up "corrupting" rural types. Some rural types will try to keep up with the "Jones".
In their quest to emulate these urbans , rurals might end up in place where they are clueless (they might endup clueless about the corporate power-structure and their whole belief system can get crumbled. )
Then these neo-urbans (erstwhile "rurals" ) will lead a mechanical life , will end up marrying another urbanite ( in the name of better "proposol") and will end up becoming "soulless" individuals.
See , what kind of person you are ?Try to formulate your plans for life (based on that) , otherwise misery beckons you. ( You can train yourself to be hybrid , which might get better result than the extremes )
I am a rural type and my views are biased. But , the message is important.
That is the reason merit is emphasized in the urban areas and mediocrity is encouraged in the rural areas. Urban people see life as a race and Rural people see it as a rally.
So , in a big team ,all need not excel in what they do at an absolute scale. To ship a software , the team members have to reach a "thresh-hold" level mandated by the project and the project sponsors in question.
A company which is small and short of capital , will try to make up that by upping the ante on the technical front. There the stuff is different as each members have to scale beyond the average. Then the problem really starts.
Some people think that the job which they have got is result of their educational qualification , their assured right as they have completed Engineering /MCA etc
They compare their stuff based on the bottom line and the snobbery aspect which they are subjected to.
So question boils down to
"Where should I work and how much should I earn to be a worthy person? (in front of snobs)"
The more ambitious ( there is no correlation between technical ability and ambition ) "urban" types will take this question very seriously and they will try to switch companies until they get tired or snob effect gets lesser.
For them , it is a survival battle. They have not seen permanence in life. They have shifted locations eight to nine times by the time they completed their teens. ( Let us call them Urbans )
These "urbans" will be working with rural types. In small companies , rural types are a majority and presence of some urban types can vitiate the atmosphere. The rural types have seen permanence , adherence to their parents and world is "static". Such people "value" ( are forced to ) Skill , self improvement etc.
They are not suited for happy go lucky attitude of the urban types. But, at the snob front they are on
the receiving end from their kith and kin.
These urban types will end up "corrupting" rural types. Some rural types will try to keep up with the "Jones".
In their quest to emulate these urbans , rurals might end up in place where they are clueless (they might endup clueless about the corporate power-structure and their whole belief system can get crumbled. )
Then these neo-urbans (erstwhile "rurals" ) will lead a mechanical life , will end up marrying another urbanite ( in the name of better "proposol") and will end up becoming "soulless" individuals.
See , what kind of person you are ?Try to formulate your plans for life (based on that) , otherwise misery beckons you. ( You can train yourself to be hybrid , which might get better result than the extremes )
I am a rural type and my views are biased. But , the message is important.
Labels:
Ways of Life
| Reactions: |
Tuesday, September 21, 2010
Pycon India , 2010 - Talk schedules announced
The talk schedule of the Pycon India , 2010 has been announced. You can go to http://in.pycon.org/2010/schedule to have a look at it.
I am presenting a session on Extending and Embedding Python under Windows using C/C++ (I will be using Visual C/C++ compiler to demonstrate my examples ). You can download my slides , source from
http://in.pycon.org/2010/talks/21-extending-and-embedding-python-under-windows-(-using-c-c-)
I am presenting a session on Extending and Embedding Python under Windows using C/C++ (I will be using Visual C/C++ compiler to demonstrate my examples ). You can download my slides , source from
http://in.pycon.org/2010/talks/21-extending-and-embedding-python-under-windows-(-using-c-c-)
Labels:
Talks
| Reactions: |
Monday, September 20, 2010
The Concept of "Code Shape"
When you code against a virtual machine platform like .net or java (php,python etc), most of the memory management chorus is taken care by the run time. This has created a army of programmers who are productive on the job and software industry has expanded to this stage.
At times , when these programmers work with C/C++ language and the problem will begin to emerge. When we program at the native level , we need to have a mental model of how code and data will reside in the memory. In effect , we should know the shape of the code. Hence the word "Code Shape".
Things get complicated when we use Objective C++ ( mixing C , C++ , Objective C and Objective C++ code ) as it is a dynamic language as well. To get the reference counting mechanism right , one need to give attention to the detail and programmer should have intense familiarity with the shape of the code.
Try to spread this meme of "Code Shape" and also try to explain the stuff to the people around you.
At times , when these programmers work with C/C++ language and the problem will begin to emerge. When we program at the native level , we need to have a mental model of how code and data will reside in the memory. In effect , we should know the shape of the code. Hence the word "Code Shape".
Things get complicated when we use Objective C++ ( mixing C , C++ , Objective C and Objective C++ code ) as it is a dynamic language as well. To get the reference counting mechanism right , one need to give attention to the detail and programmer should have intense familiarity with the shape of the code.
Try to spread this meme of "Code Shape" and also try to explain the stuff to the people around you.
| Reactions: |
Setting a Pixel Color in 64 bit MAC OS X ( Linux 64 , Win 64 as well )
When we say truecolor , it can be either 24 bit RGB or 32 bit ARGB mode. The usual way to set a particular pixel was
*( (int *)( (void *) (pixelbuffer + offset )) ) = MAKEARGB(r,g,b,a);
Since MAC OS X is a 64 bit system , this code can create a sorry situation where , you will set the current pixel to the desired color and the adjacent pixel will become black.
The correct stuff is
*( (int_32 *)( (void *) (pixelbuffer + offset )) )
=(int_32) MAKEARGB(r,g,b,a);
*( (int *)( (void *) (pixelbuffer + offset )) ) = MAKEARGB(r,g,b,a);
Since MAC OS X is a 64 bit system , this code can create a sorry situation where , you will set the current pixel to the desired color and the adjacent pixel will become black.
The correct stuff is
*( (int_32 *)( (void *) (pixelbuffer + offset )) )
=(int_32) MAKEARGB(r,g,b,a);
Labels:
Computer Graphics,
GNU Linux Programming,
MAC OS/iPhone development,
Windows C/C++ Programming
| Reactions: |
Sunday, September 19, 2010
Writing Cross Platform Shellscript - Are we close ?
I came across Windows PowerShell this July. I fiddled with it for some time and even took a session on the stuff at K-Mug DevCon , 2010.
Very early , i understood that you need to approach Powershell with a "clean" mind (what i meant was most people might have got "corrupted" with Unix shell script model. I hope the "saracism" is well understood !). Powershell passes Objects between the processes. It relies on the Reflection .Emit .
I came across PASH , a cross platform/open source Powershell implementation which will run on Linux , MAC OS X and Windows. The project is based on the Mono Implementation of .net platform.
The Url of the project is @ http://pash.sourceforge.net/
Also read this post
Very early , i understood that you need to approach Powershell with a "clean" mind (what i meant was most people might have got "corrupted" with Unix shell script model. I hope the "saracism" is well understood !). Powershell passes Objects between the processes. It relies on the Reflection .Emit .
I came across PASH , a cross platform/open source Powershell implementation which will run on Linux , MAC OS X and Windows. The project is based on the Mono Implementation of .net platform.
The Url of the project is @ http://pash.sourceforge.net/
Also read this post
Labels:
GNU Linux Programming,
Software (General)
| Reactions: |
Source code reuse - Apple has brought it back ?
The Apple's iPhone and iPad requires small memory footprint software. Now a days , there is heavy emphasis on Object Oriented Programming , reusable libraries and modularization ( at the binary level ).
Take the case of Base64 encoding. Apple does not provide a codec for that. On the net , lot of people have written routines to fill that void. In majority of the , we require only encoding (or decoding). It is advisable to split the stuff to two classes , Rather than using a single class.
I believe , it is time for reading the code so that you can adapt for your situation than going for a binary re-use.
Take the case of Base64 encoding. Apple does not provide a codec for that. On the net , lot of people have written routines to fill that void. In majority of the , we require only encoding (or decoding). It is advisable to split the stuff to two classes , Rather than using a single class.
I believe , it is time for reading the code so that you can adapt for your situation than going for a binary re-use.
| Reactions: |
A Good Article on MultiParadigm Programming
In the IPGOFKERALA , Anoop Madusudhanan posted a link about a wonderful article written by Ted neward ( Author of Effective Enterprise java ).
Labels:
Software (General),
Software(.NET)
| Reactions: |
Roads of Vaikom - I understand what Quagmire means !
Yesterday , after giving a talk at the CEC Chengannur , i took a bus from Kottayam to Eranakulam. Oh man ...it is was a jolly good ride. At this point of time , it will be the most dangerous roads in the world. if you are going by a bike , you will definitely skid between ThalayolaParmbu and Vaikom.
The roads are in this situation because of the Japanese Drinking water project. Blaming govt. for this is absolutely ridiculous. When it is raining , it is not
possible to repair it.
The roads are in this situation because of the Japanese Drinking water project. Blaming govt. for this is absolutely ridiculous. When it is raining , it is not
possible to repair it.
Labels:
Ways of Life
| Reactions: |
Wednesday, September 15, 2010
I am giving a talk at the Elixir 2010 , CEC Chengannur
I am giving a talk titled "How to make a living from Computer Programming !" @ the
Elixir 2010 event which is being held at the CEC Chengannur. I am speaking in the "Meet the Professionals " track on 18th September 2010 (Saturday, 9.00 am to 1 pm).
Details of the event can be retrieved from http://www.cecelixir.com/# .
The talk is going to advocate a platform nuetral , language agnostic programming model. I will be using C/C++ programming language as a primary vehichle to explain the process of cross platform programmming.
Elixir 2010 event which is being held at the CEC Chengannur. I am speaking in the "Meet the Professionals " track on 18th September 2010 (Saturday, 9.00 am to 1 pm).
Details of the event can be retrieved from http://www.cecelixir.com/# .
The talk is going to advocate a platform nuetral , language agnostic programming model. I will be using C/C++ programming language as a primary vehichle to explain the process of cross platform programmming.
Labels:
Computer Programming,
Kerala,
Talks
| Reactions: |
Objective C is a "verbose" language !
The Objective C Programming language is the language through which Apple exposes it's native API for MAC OS X and iOS. Even though, language has got good features and idioms , writing code in Objective C is hard compared to vanilla C Programming Language. ( Do not throw stones at me saying that old habits never die! Even those
who started their programming career using Objective C as the first lanuage agrees with me as well ).
The difficult part of the language is named parameters and it make things complicated and verbose. I refactored some of the code and did convert some code into C language subset ot ease the programming. In one case , i even converted
the module into Objective C/C++ ( .mm extension ) to get the default parameters.
In the bargain , i got better static type checking as well
So , Objective C is a multiparadigm language
.c - C source file
.cpp - C++ source file
.m - Objective C source file
.mm - Objective C++ source file.
The advantage with Apple is that , it allows one to mix all of these in a single project. ( GCC under Linux supports this feature too)
who started their programming career using Objective C as the first lanuage agrees with me as well ).
The difficult part of the language is named parameters and it make things complicated and verbose. I refactored some of the code and did convert some code into C language subset ot ease the programming. In one case , i even converted
the module into Objective C/C++ ( .mm extension ) to get the default parameters.
In the bargain , i got better static type checking as well
So , Objective C is a multiparadigm language
.c - C source file
.cpp - C++ source file
.m - Objective C source file
.mm - Objective C++ source file.
The advantage with Apple is that , it allows one to mix all of these in a single project. ( GCC under Linux supports this feature too)
| Reactions: |
Monday, September 13, 2010
F# - if there is C# with functional programming support , why we need it?
The above stuff was asked by a friend of mine after listening to a talk on F# at the Devcon 2010 conducted by the K-MUG (http://k-mug ).
I think , there is point in this question. F# has got tremendous cognitive value for a programmer. It will make you a better programmer. But,on the ground it is a "useless" language.
I think , there is point in this question. F# has got tremendous cognitive value for a programmer. It will make you a better programmer. But,on the ground it is a "useless" language.
Labels:
Software(.NET)
| Reactions: |
Confusion about the term "Key" in a Cryptographic context
Broadly,there are two types of encryption viz Symmetric Encryption and Asymmetric encrpytion. In the former case , sender and reciever will have the same key and in the case case of the latter,they will be using different keys.
In a real life scenario , both will be used to secure an application protocol. Since Asymmetric encryption is slow , it will be used for key exchange (symmetric key !) and actual encrpytion will be done using a symmetric key. Even hard core techies , has got problems in figuring out the meaning of the usage.
Proof by Contradiction is the only way to convince people regarding this. To clarify , always use adjective ( Symmetric or Assymetric ) before the usage of the
term "Key. That holds the key to a good security architecture.
In a real life scenario , both will be used to secure an application protocol. Since Asymmetric encryption is slow , it will be used for key exchange (symmetric key !) and actual encrpytion will be done using a symmetric key. Even hard core techies , has got problems in figuring out the meaning of the usage.
Proof by Contradiction is the only way to convince people regarding this. To clarify , always use adjective ( Symmetric or Assymetric ) before the usage of the
term "Key. That holds the key to a good security architecture.
Labels:
Software (Design)
| Reactions: |
Cross Platform GUI programming using C# - Part 1
Off late , i am getting some calls to port C# applications to MAC OS X and GNU Linux.
This series is aimed at C# programmers who want to migrate their applications to other platforms
Here is our first program
Here is the screen snapshot on my machine ...!
This series is aimed at C# programmers who want to migrate their applications to other platforms
Here is our first program
////////////////////////////////
// test.cs
// A simple C# program which can be compiled
// using Mono on Linux , MAC OS X and Windows
//
// mcs test.cs /r:System.Windows.Forms.dll
// mono test.exe
//
using System;
using System.Windows;
using System.Windows.Forms;
/////////////////////////////////////////
//
// Every Desktop application has got a MainForm
// which is derived from System.Windows.Forms.Form
//
//
//
public class MainForm : Form {
///////////////////////////////////////
//
// The constructor just sets the title ....
//
MainForm():base() {
this.Text ="Cross Platform Mono code...";
}
///////////////////////////////
//
// The Entrypoint ...
//
//
public static void Main(String [] args ) {
MainForm mf = new MainForm();
Application.Run(mf);
}
}
Here is the screen snapshot on my machine ...!
Labels:
Mono
| Reactions: |
Sunday, September 12, 2010
Am i a capitalist ?
A person whom i know was critical about my criticism of the FOSS movement in Kerala. Being a left leaning guy , he made an allegation that i am a capitalist. After pondering for a while , i understood that i am concerned about my freedom ( physical , intellectual and financial ) and at
this point of time , free market ( with some overseeing ) is the best way to go to give individuals
their freedom.
this point of time , free market ( with some overseeing ) is the best way to go to give individuals
their freedom.
Labels:
Ways of Life
| Reactions: |
Catholic Church - What is happening "inside"?
I know a friend of mine , (who is a catholic himself) has got a soft corner for his fellow catholics. But, i noticed a curious pattern there. Let call him Jai .
Jai Like Catholics , but Catholics does not seem to like Jai. ( Thus he got the moniker
Catholic Jai )
The clergy who create noise in kerala , about the alleged mistreatment metted out to the Catholics in Orissa, Karnataka and Bihar etc were silent when a guy from their own fold got his hand chopped off by some islamic fundamentalists in their heartland. Not only , they were silent about the whole issue , i just happened to see in Manorama news that a comminique was sent to all the parish (in Kothamangalam ) explaining why the action was taken against Prof. Joseph.
I think Kerala is going to the "Dogs"
Jai Like Catholics , but Catholics does not seem to like Jai. ( Thus he got the moniker
Catholic Jai )
The clergy who create noise in kerala , about the alleged mistreatment metted out to the Catholics in Orissa, Karnataka and Bihar etc were silent when a guy from their own fold got his hand chopped off by some islamic fundamentalists in their heartland. Not only , they were silent about the whole issue , i just happened to see in Manorama news that a comminique was sent to all the parish (in Kothamangalam ) explaining why the action was taken against Prof. Joseph.
I think Kerala is going to the "Dogs"
Labels:
Ways of Life
| Reactions: |
Effective C# - The Indian Edition is available
The Effective Development Series is a series of books published by Addison Wesley publishing. The consulting editor for the project is Scott Meyers , the author of Effective C++ and More Effective C++.
Effective C# is written by Bill Wagner. The book is priced at Rs. 399 and by flipping through my copy , i can tell it is worth the money.
Effective C# is written by Bill Wagner. The book is priced at Rs. 399 and by flipping through my copy , i can tell it is worth the money.
Labels:
Books
| Reactions: |
Saturday, September 11, 2010
How Computer Science graduates get "polluted" in Kerala ?
Given below is a post which i wrote in a thread @ BarCampKerala google group.
It is not a question of who is right or who is wrong. RMS is a true genius who designed GNU CopyLeft Licensing model ( An imagintve leap from a social perspective).
His Free Software foundation has transformed the way we live in this world.
GPL is a great license for System software , if some one has put the stuff in the public domain. The original intention was to create a seperate patent free , non-proprietory computing infrastructure like UNIX from the scratch. The movement and the amount of software became a huge success. The final missing link was the Kernel which was finished by a finnish student.The finnish student was rebelling against a dutch professor who we all know through his Computer networking , Minix and Computer Organization book.
Unfortunately , people began to call the Linux kernel + GNU utilities as Linux. The name Stallman was about to go to the oblivion. Then ,FSF advocated the use of the moniker"GNU Linux" ( GNU utilities + Linux kernel ). This is in the early 1991/1992. Microsoftwas at that point of time competing with IBM on OS/2 , Windows has just managedto make it presence felt on the scene ( Windows v3 ) etc.
Microsoft (thanks to it's deadly "virus" MSDOS ) won the GUI war and they became the dominant desktop system. For any movement to survive , there should be a cause and there should be a group which is supposed to be against this cause. Thus Microsoftwas chosen by the fate to be the group supposed to be the quintessential "proprietory"villan. Microsoft , to it's credit build a developer echo system like MSDN ( Microsoft DeveloperNetwork ) , MVP program and better programming tools.
Slowly, but steadily GNU Linux began to make inroads into the server space and people's mind.Economics of hosting a server infrastructure was the primary motive there. The FSF fearedthat , without advocacy four freedom (4Fs ) cannot be maintatined. RMS became it's Ambasador and the general respect for him gave this great credibility. ( Stallman practiceswhat he preach ).
Another event in the year 1998 forced FSF to be agressive about it's Philosophy. Eric S Raymond published a book by the title "Cathedral and the Bazar" and Open Source movement was launched. Now, FSF began to fight battle with OSI initiaive as well. The reason for this movement was to create a business model around public domain code where the sourceis open. Netscape opened up it's browser and Mozilla project was born.
Now the distinction began to get clear for people. Free Software is a social movement andOpen source is a business model. World does not care much other than the economics of this infrastructure and promptly christened it as FOSS ( Free and Open Source Software)and people from the FSF also liked it because "Freedom" got the prime spot.
Third complicating factor was LGPL. The LGPL license was forced upon the FSF movement to make their Libraries link against properietory systems. We need to release only the derivativeof the library to the public. The LGPL , OSI licenses ( MIT , BSD , Mozilla, Apache P , Microsoftshared source etc ) and the commercial interest of the companies and individuals gave OSI good acceptance. Linus Torvalds also was appreciative of OSS part.
Till this time , it was Software developers vs Software developers. In some countries ( kerala in India especiall ) , the social movement aspect which FSF promotes got great acceptance. Soon, Politicians/Lawyers/NGOs (to name a few ) began to promote themselves as proponentsof "SWATHANTHRYAM" ( Freedom ) .
These people has got right to speak against anyone. In their musings ,they pollute young minds by saying that use of proprietory system is a crime. (Essentially , they are advocating you livepoor by ignoring a reality [ The economics of closed systems in some case ]). This makes themhate Windows , Other Linux Distributions (!) other than their favorite one. Debian is the "boy" at this time. This creates software profesionals who are useless on the ground.
Think about the plight of a young man whose family has got million dollar expectation on him ,has to procure a car/flat with EMI of 40,000+ for his chosen girl , has to fight snobbery everywhere and has to protect the "freedom" as RMS defines it. He will commit suicide .Or else like some "comorades" will build a fortune by ignoring all these "crap" as he sees it.
These "polluted" minds will join as freshers under people like me.The work has to be done on Windows , MAC ,unixes ,embedded systems. He has to be trained in all these tools andmore over it take him more time , because his mind says do not work with the proprietory system.
So basic idea , is use Software based on Technical merit. Love software , it will give you ample reward. Embrace OSS software. Try to use GPL for System software. Use proprietorysystem, if it fits the context. This will bring wealth to all of us.
regards
Praseed Pai
http://praseedp.blogspot.com
It is not a question of who is right or who is wrong. RMS is a true genius who designed GNU CopyLeft Licensing model ( An imagintve leap from a social perspective).
His Free Software foundation has transformed the way we live in this world.
GPL is a great license for System software , if some one has put the stuff in the public domain. The original intention was to create a seperate patent free , non-proprietory computing infrastructure like UNIX from the scratch. The movement and the amount of software became a huge success. The final missing link was the Kernel which was finished by a finnish student.The finnish student was rebelling against a dutch professor who we all know through his Computer networking , Minix and Computer Organization book.
Unfortunately , people began to call the Linux kernel + GNU utilities as Linux. The name Stallman was about to go to the oblivion. Then ,FSF advocated the use of the moniker"GNU Linux" ( GNU utilities + Linux kernel ). This is in the early 1991/1992. Microsoftwas at that point of time competing with IBM on OS/2 , Windows has just managedto make it presence felt on the scene ( Windows v3 ) etc.
Microsoft (thanks to it's deadly "virus" MSDOS ) won the GUI war and they became the dominant desktop system. For any movement to survive , there should be a cause and there should be a group which is supposed to be against this cause. Thus Microsoftwas chosen by the fate to be the group supposed to be the quintessential "proprietory"villan. Microsoft , to it's credit build a developer echo system like MSDN ( Microsoft DeveloperNetwork ) , MVP program and better programming tools.
Slowly, but steadily GNU Linux began to make inroads into the server space and people's mind.Economics of hosting a server infrastructure was the primary motive there. The FSF fearedthat , without advocacy four freedom (4Fs ) cannot be maintatined. RMS became it's Ambasador and the general respect for him gave this great credibility. ( Stallman practiceswhat he preach ).
Another event in the year 1998 forced FSF to be agressive about it's Philosophy. Eric S Raymond published a book by the title "Cathedral and the Bazar" and Open Source movement was launched. Now, FSF began to fight battle with OSI initiaive as well. The reason for this movement was to create a business model around public domain code where the sourceis open. Netscape opened up it's browser and Mozilla project was born.
Now the distinction began to get clear for people. Free Software is a social movement andOpen source is a business model. World does not care much other than the economics of this infrastructure and promptly christened it as FOSS ( Free and Open Source Software)and people from the FSF also liked it because "Freedom" got the prime spot.
Third complicating factor was LGPL. The LGPL license was forced upon the FSF movement to make their Libraries link against properietory systems. We need to release only the derivativeof the library to the public. The LGPL , OSI licenses ( MIT , BSD , Mozilla, Apache P , Microsoftshared source etc ) and the commercial interest of the companies and individuals gave OSI good acceptance. Linus Torvalds also was appreciative of OSS part.
Till this time , it was Software developers vs Software developers. In some countries ( kerala in India especiall ) , the social movement aspect which FSF promotes got great acceptance. Soon, Politicians/Lawyers/NGOs (to name a few ) began to promote themselves as proponentsof "SWATHANTHRYAM" ( Freedom ) .
These people has got right to speak against anyone. In their musings ,they pollute young minds by saying that use of proprietory system is a crime. (Essentially , they are advocating you livepoor by ignoring a reality [ The economics of closed systems in some case ]). This makes themhate Windows , Other Linux Distributions (!) other than their favorite one. Debian is the "boy" at this time. This creates software profesionals who are useless on the ground.
Think about the plight of a young man whose family has got million dollar expectation on him ,has to procure a car/flat with EMI of 40,000+ for his chosen girl , has to fight snobbery everywhere and has to protect the "freedom" as RMS defines it. He will commit suicide .Or else like some "comorades" will build a fortune by ignoring all these "crap" as he sees it.
These "polluted" minds will join as freshers under people like me.The work has to be done on Windows , MAC ,unixes ,embedded systems. He has to be trained in all these tools andmore over it take him more time , because his mind says do not work with the proprietory system.
So basic idea , is use Software based on Technical merit. Love software , it will give you ample reward. Embrace OSS software. Try to use GPL for System software. Use proprietorysystem, if it fits the context. This will bring wealth to all of us.
regards
Praseed Pai
http://praseedp.blogspot.com
Labels:
BarCamp
| Reactions: |
Friday, September 10, 2010
My encounter with FOSS
After working with SCO unix in 1996 for a project , i have been working with windows for more than 14 years (with occassional forays into Linux for Cross Platform programming work ). The crash of my desktop PC on January 31st , 2010, a day after delivering a session @K-mug by the title "Write Your Own .net compiler" (using C# - http://slangfordotnet.codeplex.com/ ) prompted me to install Fedor 9 for browsing the internet via FireFox.
Now a days , there is emphasis on using C#/.NET everywhere under Windows and this has become a personal problem for me. Even though , i am comfortable with C# , it has lessened my comparitive advantage with other professionals. When Visual C/C++ was in vogue , i was a professional which companies were eager to hire. With .NET, there is nothing much to differntiate between me and a newbie with three years experience. Due to the frequency of updates in their API , Microsoft ( inadvertently ) makes "oldies" like me sweat a lot.Practically speaking , a twelve year experienced programmer and two year exprience is samein .NET. ( I call it Modulo 10 Platform )
On February 14th 2010 ( Valentine's day ) , I wrote a toy program to print the hello world using GCC from my fedora machine. To explore further , i wrote some more C/C++programs and I posted first series of programs on my personal blog. When the program count reached 10 , i began to get some mails asking for clarfications.This enthused me to write more programs.
To broaden my knowledge , i began to go for ILUG , Kochi meetings. I saw too much emphasis given on Talk about Licensing and little programming stuff was discussedover there. I appreciated their conviction about what they advocate at that point of time. I picked at least 25 new shell techniques from the discussions with people.I am now a "matured" user of Linux system because of my interaction with some people there. I was unhappy about people's lack of interest in Computer Programmingthough. I also got Debian Lenny CD from there and installed it on my Dell Inspiron1520 laptop. ( Now it is linux everywhere for me )
In mid march ,I, Ranjith avarachan and Rajesh Sukumaran ( an erstwhile colleague of mine )talked about iPhone development through twitter. I have worked with Objective C on Windows for a project in the year 2001. That afternoon , i tried to compile a Objective C Program from the Wiki. Fedora 9 promptly gave a reply that Objc-develpackage is not installed and using yum installed that. What ever I learned , i posted it on my blog. You can access the stuff from http://praseedp.blogspot.com/p/gnu-linux-programming.html . Slowly but steadlyi began to get really comfortable with Linux shell commands , Bash scripts , Directory structure and the programming model of Linux tool chain.
After seeing my blog on Objective C , a friend of mine sent the stuff to the peoplein his company. There were Computer Graphics related material in my blog. The CTOof that company was looking for some one to work with iPhone and OpenGL ES. I got a consulting assignment thanks to lobbying of my friend. I did not have any MAC machine with me at that time. I will get a MAC machine for a period of five days to complete the project. To learn more about MAC Programming model , i searched the internet and found a project called GNUStep ( It is a wonderful project which will help you to learn about MAC OS X programming under the comfort of Linux and Windows !) . I wrote some GNUStep programs. When i got a physical MAC OS X laptop , itdid not have some favorite keys of mine and i asked Ranjith and Juwal Bose aboutthe stuff. ( CTRL + C / CTR+V - did not work...so i become a defunct programmer fora while ). I completed the project with flying colours and tested it on my emulator. The bangalore company promptly sent me the paycheck. In a matter of couple of months , i profited from my adventure into the Linux territory. Had it not been for the Objective C language and the GNUStep project under Linux , i would not have become a MAC developer.
Now my day job is MAC OS X / iPhone programming. This enthused me to explore Linux further !. I re-learned Qt , WxWidgets and XLib programming. Helped some Windows developers to rejuvanate their career to learn further. ( Lookat the power of Selfishness !!! )
As i matured , i began to note some "hostility" towards me at the ILUG meeting.I mentioned Mono Project and it did not go well with the some of participants. Perplexedby this , i asked couple of people why they stopped going to ILUG meetings. Theytold it is "License To Kill". ( They meant it is all about GPL Licensing talk and why freedom is important for them !). Still , my self-interest dictatedme to go there as i was becoming a better Linux user. JJ (Founding member of ILUG)organized couple of sessions on GNU Linux programming by conducting meetings on saturdays. We had three such meetings and some youngsters benifited from it.
The true color of the ILUG came to the fore , when i posted an article called"Windows Programming under Linux". My idea was to use WineLib( http://winehq.org/ ) as a Software development toolkit to recompile Windows programs on to Linux. I believe , this is a great way to increase the installed Application base of Linux. ( The power of Windows system is their Application programs ). To my surprise , I heard statements similar to "Do not Talk about the Poland!" and i began to get comments bordering abuse. I also "retaliated" in my own way. Soon, people began to let their frustrationcome out in the open. I got great support there. To understand the root cause of the issue , i began to search through the ILUG,Kochi archive and found about a name change somewhere in 2008.
I was thinking that ILUG is Indian Linux User Group (It was uptil 2008). Due to the name change , the spirit of the group changed a lot. ILUG,Kochi is all about Free software advocacy,Licensing and Philosophical issues. I realized my mistake. ( I have not gone for the meetings thereafter. I actively particpate in the discussions there though )
Another question which brings sort of identity crisis to FOSS enthusiasts is how to make a living out of them. I began to explore tools like Mono , Harbour ( I recompiled my 1994 clipper application to run as native binary underWindows , Linux and MAC OS X using this project. It is a great tool for Kerala as there are thousands of systems running here using Xbase tools. Spread the wordabout this and i am happy to help people who are stuck up in the Clipper world ) ,Wine ( I recompiled a 50,000 line application on GNU Linux under four hours. Thattoo an application full of Windows API call ) and other tools.
To due the above activities , i have earned some extra money during my weekends. I am confident that this model can be replicated. When i explained this to people , i began to note a curious pattern. To clarify this , let me ask a question to myself.
Why i was able to migrate to Linux very fast ?
We are all familiar with the 1998 movie Punjabi House. In that particular moviethere is a dialogue which goes as follows. Kochin Haneefa makes a statement which goes as "In India it is like this , I do not know about Punjab !". In my case , "In Windows it is like this , how about it in Linux". This comparitive study helped me to become good ( i am really good at it now a days !) at Linux Programming .
Here the real issue starts , Due to their strict interpretation of freedomthese people vow not to use any proprietory system. That means these peopleare Windows "blind" !!!!!!. Naturally , they do not know about Windows Programming model , Windows Programming eco system. You will be a poorprogrammer , if you cling to a platform. ( The FOSS people who workwith real projects are comfortable with Windows. The Lawyers , Professors,Activists are the real issue here )
Know your enemy before you attack is my policy. It has been a successful model for ages. Without knowing Microsoft Windows , how come you are going to beat it ?
One thing is sure , Microsoft knows the mind of average developer. Thousandsof people are computer programmers just because of the Microsoft Corporation.Their IDEs ( Developer studio ) , C/C++ Compiler , Compilers for .net , Libraries, Communities ( They do talk technology , there are some occassional dig at FOSS community ) and ubiquity contributes value to the masses.The entry barrieris low. In the case of FOSS , we need to do some demand side learning. ( Demandside learning is what you do when you study about cars before making a decisionto buy them. )
There are some problems in their (Microsoft's) approach as well. To follow indian ethos of seeing "Good and the Bad" as two sides of the same coin ,( I believe) we should be centrist in our approach. I am advocating that without giving much emphasis on "Free" aspect of FOSS stuff , a place like India has to focus on OSS part. I also believe that GPL is a great licence for system software ( for it was originally designed ) and for application systems , a OSI approvedopen source license is better.
Once we see Open Source aspect ( balancing with Free software criteria for system software. ) , we will approach Microsoft , Linux , MAC OS X and other OSes with same eye. Then the attention switches to Software engineering.if we spread the usage of Linux system , Microsoft won't be brining new APIs as they are doing now.
I am again repeating my program , "Beat Microsoft "
"BEAT" Microsoft the strategy is as follows
a ) if you have got a DOS application without source , run it using DosBox under Linux
b) if you have got a DOS application with source (80% of DOS applications were written using XBase ) , we can use Harbour to port it to Linux
c) if you have got a Windows binary , Most Windows binaries ( 32 bit one ) run on Wine
d) if you have got a Windows program with source written in C/C++ , Recompile it using Wine
e) if you have got a C# application , use Mono project to bring it to GNU Linux
f) GCC for Java ( GCJ ) can compile most java desktop applications to GNU Linux ELF executable
Using the above strategy , 80% of the applications to run on GNU Linux and we can give Microsoft run for their money.
Encourage people to embrace FOSS , by bringing more and more programmes into this . This is the context of my talk at the BarCampKerala #9
Now a days , there is emphasis on using C#/.NET everywhere under Windows and this has become a personal problem for me. Even though , i am comfortable with C# , it has lessened my comparitive advantage with other professionals. When Visual C/C++ was in vogue , i was a professional which companies were eager to hire. With .NET, there is nothing much to differntiate between me and a newbie with three years experience. Due to the frequency of updates in their API , Microsoft ( inadvertently ) makes "oldies" like me sweat a lot.Practically speaking , a twelve year experienced programmer and two year exprience is samein .NET. ( I call it Modulo 10 Platform )
On February 14th 2010 ( Valentine's day ) , I wrote a toy program to print the hello world using GCC from my fedora machine. To explore further , i wrote some more C/C++programs and I posted first series of programs on my personal blog. When the program count reached 10 , i began to get some mails asking for clarfications.This enthused me to write more programs.
To broaden my knowledge , i began to go for ILUG , Kochi meetings. I saw too much emphasis given on Talk about Licensing and little programming stuff was discussedover there. I appreciated their conviction about what they advocate at that point of time. I picked at least 25 new shell techniques from the discussions with people.I am now a "matured" user of Linux system because of my interaction with some people there. I was unhappy about people's lack of interest in Computer Programmingthough. I also got Debian Lenny CD from there and installed it on my Dell Inspiron1520 laptop. ( Now it is linux everywhere for me )
In mid march ,I, Ranjith avarachan and Rajesh Sukumaran ( an erstwhile colleague of mine )talked about iPhone development through twitter. I have worked with Objective C on Windows for a project in the year 2001. That afternoon , i tried to compile a Objective C Program from the Wiki. Fedora 9 promptly gave a reply that Objc-develpackage is not installed and using yum installed that. What ever I learned , i posted it on my blog. You can access the stuff from http://praseedp.blogspot.com/p/gnu-linux-programming.html . Slowly but steadlyi began to get really comfortable with Linux shell commands , Bash scripts , Directory structure and the programming model of Linux tool chain.
After seeing my blog on Objective C , a friend of mine sent the stuff to the peoplein his company. There were Computer Graphics related material in my blog. The CTOof that company was looking for some one to work with iPhone and OpenGL ES. I got a consulting assignment thanks to lobbying of my friend. I did not have any MAC machine with me at that time. I will get a MAC machine for a period of five days to complete the project. To learn more about MAC Programming model , i searched the internet and found a project called GNUStep ( It is a wonderful project which will help you to learn about MAC OS X programming under the comfort of Linux and Windows !) . I wrote some GNUStep programs. When i got a physical MAC OS X laptop , itdid not have some favorite keys of mine and i asked Ranjith and Juwal Bose aboutthe stuff. ( CTRL + C / CTR+V - did not work...so i become a defunct programmer fora while ). I completed the project with flying colours and tested it on my emulator. The bangalore company promptly sent me the paycheck. In a matter of couple of months , i profited from my adventure into the Linux territory. Had it not been for the Objective C language and the GNUStep project under Linux , i would not have become a MAC developer.
Now my day job is MAC OS X / iPhone programming. This enthused me to explore Linux further !. I re-learned Qt , WxWidgets and XLib programming. Helped some Windows developers to rejuvanate their career to learn further. ( Lookat the power of Selfishness !!! )
As i matured , i began to note some "hostility" towards me at the ILUG meeting.I mentioned Mono Project and it did not go well with the some of participants. Perplexedby this , i asked couple of people why they stopped going to ILUG meetings. Theytold it is "License To Kill". ( They meant it is all about GPL Licensing talk and why freedom is important for them !). Still , my self-interest dictatedme to go there as i was becoming a better Linux user. JJ (Founding member of ILUG)organized couple of sessions on GNU Linux programming by conducting meetings on saturdays. We had three such meetings and some youngsters benifited from it.
The true color of the ILUG came to the fore , when i posted an article called"Windows Programming under Linux". My idea was to use WineLib( http://winehq.org/ ) as a Software development toolkit to recompile Windows programs on to Linux. I believe , this is a great way to increase the installed Application base of Linux. ( The power of Windows system is their Application programs ). To my surprise , I heard statements similar to "Do not Talk about the Poland!" and i began to get comments bordering abuse. I also "retaliated" in my own way. Soon, people began to let their frustrationcome out in the open. I got great support there. To understand the root cause of the issue , i began to search through the ILUG,Kochi archive and found about a name change somewhere in 2008.
I was thinking that ILUG is Indian Linux User Group (It was uptil 2008). Due to the name change , the spirit of the group changed a lot. ILUG,Kochi is all about Free software advocacy,Licensing and Philosophical issues. I realized my mistake. ( I have not gone for the meetings thereafter. I actively particpate in the discussions there though )
Another question which brings sort of identity crisis to FOSS enthusiasts is how to make a living out of them. I began to explore tools like Mono , Harbour ( I recompiled my 1994 clipper application to run as native binary underWindows , Linux and MAC OS X using this project. It is a great tool for Kerala as there are thousands of systems running here using Xbase tools. Spread the wordabout this and i am happy to help people who are stuck up in the Clipper world ) ,Wine ( I recompiled a 50,000 line application on GNU Linux under four hours. Thattoo an application full of Windows API call ) and other tools.
To due the above activities , i have earned some extra money during my weekends. I am confident that this model can be replicated. When i explained this to people , i began to note a curious pattern. To clarify this , let me ask a question to myself.
Why i was able to migrate to Linux very fast ?
We are all familiar with the 1998 movie Punjabi House. In that particular moviethere is a dialogue which goes as follows. Kochin Haneefa makes a statement which goes as "In India it is like this , I do not know about Punjab !". In my case , "In Windows it is like this , how about it in Linux". This comparitive study helped me to become good ( i am really good at it now a days !) at Linux Programming .
Here the real issue starts , Due to their strict interpretation of freedomthese people vow not to use any proprietory system. That means these peopleare Windows "blind" !!!!!!. Naturally , they do not know about Windows Programming model , Windows Programming eco system. You will be a poorprogrammer , if you cling to a platform. ( The FOSS people who workwith real projects are comfortable with Windows. The Lawyers , Professors,Activists are the real issue here )
Know your enemy before you attack is my policy. It has been a successful model for ages. Without knowing Microsoft Windows , how come you are going to beat it ?
One thing is sure , Microsoft knows the mind of average developer. Thousandsof people are computer programmers just because of the Microsoft Corporation.Their IDEs ( Developer studio ) , C/C++ Compiler , Compilers for .net , Libraries, Communities ( They do talk technology , there are some occassional dig at FOSS community ) and ubiquity contributes value to the masses.The entry barrieris low. In the case of FOSS , we need to do some demand side learning. ( Demandside learning is what you do when you study about cars before making a decisionto buy them. )
There are some problems in their (Microsoft's) approach as well. To follow indian ethos of seeing "Good and the Bad" as two sides of the same coin ,( I believe) we should be centrist in our approach. I am advocating that without giving much emphasis on "Free" aspect of FOSS stuff , a place like India has to focus on OSS part. I also believe that GPL is a great licence for system software ( for it was originally designed ) and for application systems , a OSI approvedopen source license is better.
Once we see Open Source aspect ( balancing with Free software criteria for system software. ) , we will approach Microsoft , Linux , MAC OS X and other OSes with same eye. Then the attention switches to Software engineering.if we spread the usage of Linux system , Microsoft won't be brining new APIs as they are doing now.
I am again repeating my program , "Beat Microsoft "
"BEAT" Microsoft the strategy is as follows
a ) if you have got a DOS application without source , run it using DosBox under Linux
b) if you have got a DOS application with source (80% of DOS applications were written using XBase ) , we can use Harbour to port it to Linux
c) if you have got a Windows binary , Most Windows binaries ( 32 bit one ) run on Wine
d) if you have got a Windows program with source written in C/C++ , Recompile it using Wine
e) if you have got a C# application , use Mono project to bring it to GNU Linux
f) GCC for Java ( GCJ ) can compile most java desktop applications to GNU Linux ELF executable
Using the above strategy , 80% of the applications to run on GNU Linux and we can give Microsoft run for their money.
Encourage people to embrace FOSS , by bringing more and more programmes into this . This is the context of my talk at the BarCampKerala #9
Labels:
BarCamp
| Reactions: |
Wednesday, September 08, 2010
Slides and Examples of my talk at PyCon India 2010
I am giving a talk by the title "Extending and Embedding Python under Windows using C/C++" at PyCon 2010 india. You can download the slides , code examples ( tested using Visual C/C++ ) from the PyCon 2010 site.
The code will work with 2.5.x and 3.x versions of python. I have inserted necessary pre-processor directives to make this possible. Without much difficulty , the code can be integrated with Python on MAC and Python on Linux. In the case of both platforms we can use GCC to compile the examples. I will be blogging about this in the coming day
In the mean time , pls. go to the following url @
Do visit the site http://in.pycon.org/2010/ to know about the event to be conducted at Bangalore on September 25th and 26th 2010.
The code will work with 2.5.x and 3.x versions of python. I have inserted necessary pre-processor directives to make this possible. Without much difficulty , the code can be integrated with Python on MAC and Python on Linux. In the case of both platforms we can use GCC to compile the examples. I will be blogging about this in the coming day
In the mean time , pls. go to the following url @
Do visit the site http://in.pycon.org/2010/ to know about the event to be conducted at Bangalore on September 25th and 26th 2010.
| Reactions: |
When it comes to API design ,the Microsoft is the King
In the world of API design , APIs can be broadly classified into two viz. Fine grained API and Coarse Grained API. For a developer , both of them are limiting. Coarse Grained API expects a handful of scenario and if your context does not fit into this , you have got a real issue. In the case of Fine grained API , we need to be concerned about the minutest detail and the calls has to be made in
a particular order to acheive certain tasks. So,most companies end up writing elaborate wrappers over the fine grained APIs.
In the case of Java , the vendor pull forces it to become a fine grained API by compulsion. $MS is good at combining both approaches . In some cases , you will have multiple APIs for the same.
Another issue with committee designed API is API/SPI overlap. Microsoft is good at separating SPI ( Service Provider Interface ) from it's API.
I have written this based on my past month's software development activities.
a particular order to acheive certain tasks. So,most companies end up writing elaborate wrappers over the fine grained APIs.
In the case of Java , the vendor pull forces it to become a fine grained API by compulsion. $MS is good at combining both approaches . In some cases , you will have multiple APIs for the same.
Another issue with committee designed API is API/SPI overlap. Microsoft is good at separating SPI ( Service Provider Interface ) from it's API.
I have written this based on my past month's software development activities.
Labels:
Software (Design)
| Reactions: |
An Unusual usecase for the Mono Project
I have been always appreciative about the Mono Project from it's inception. You can see high quality C/C++ code and also understand how certain .NET Platform features are implemented. Whe ever , i mention this most of my friends who are deep
into the .NET world gets disguste. The usual argument is lack of an IDE like Visual Studio ( I do agree with them on this ) ,ASP.net support is not full ( it is not the fault of the mono project per se ) etc.
In my current project , i used C#/Mono for an unusual purpose. Being a Linux/MAC OS X shop , my current company has got only few Windows machines and are used by other developers. Thanks to this , i write code in MAC OS X , Compile and test using mono (on MAC OS X ) and when i feel it is production ready , it will be transferred to the Windows machine to create a Visual studio project.
So, use mono to develop C#/.NET applications for windows in the comfort of Linux or MAC OS X !.
into the .NET world gets disguste. The usual argument is lack of an IDE like Visual Studio ( I do agree with them on this ) ,ASP.net support is not full ( it is not the fault of the mono project per se ) etc.
In my current project , i used C#/Mono for an unusual purpose. Being a Linux/MAC OS X shop , my current company has got only few Windows machines and are used by other developers. Thanks to this , i write code in MAC OS X , Compile and test using mono (on MAC OS X ) and when i feel it is production ready , it will be transferred to the Windows machine to create a Visual studio project.
So, use mono to develop C#/.NET applications for windows in the comfort of Linux or MAC OS X !.
Labels:
Software(.NET)
| Reactions: |
Tuesday, September 07, 2010
It's Soccer everywhere for my boy !
My son Sidharth ( 8+ years ) is very fond of MS Paint and Notepad. He is so fond of these tools that he calls Windows command prompt as "Blackpad". He forrayed into the Aluva Subjail ground the other day. It is the "mecca" of the aluva football. Now a days he thinks and breaths soccer. i even heard him using the terms like striker ( The power of TV !) . Today , i saw him doodling a football player using Paint.
Labels:
SID's corner
| Reactions: |
Monday, September 06, 2010
The Synopsis of my talk at the BarCamp Kerala #9
FOSS in Kerala - A case of inmates are running the asylum ?
by Praseed Pai K.T.
Free and Open Source Movement (FOSS) is a force to reckon with, in the modern Software Engineering world. The FOSS developers have created thousands of open source tools,libraries and applications which helps the software industry to ship their products. In Kerala , people who do not know much about software engineering are running the show and they are "irrittatingly assertive" about Free aspect of FOSS movement. This boils down to talks about Licensing , Philosophy and Advocacy. The presentation will talk about the state of the art as the presenter sees it (as of now). Then he will narrate about how relaxation of freedom component can bring wealth to our state. . The session also talk about how the presenter made some money and a change in career by bringing "dreaded" Windows programming knowlege into the GNU Linux operating system (Do not worry , i won't show any source code !) . The other title of this talk would have been "how to make a living from FOSS ?" As Amitabh Bachan said in a movie , "Meim ye nehi jantha Woh acha hai , ye acha hai. Mujh jaise vyapari sabh ko apna lethe hai ".
by Praseed Pai K.T.
Free and Open Source Movement (FOSS) is a force to reckon with, in the modern Software Engineering world. The FOSS developers have created thousands of open source tools,libraries and applications which helps the software industry to ship their products. In Kerala , people who do not know much about software engineering are running the show and they are "irrittatingly assertive" about Free aspect of FOSS movement. This boils down to talks about Licensing , Philosophy and Advocacy. The presentation will talk about the state of the art as the presenter sees it (as of now). Then he will narrate about how relaxation of freedom component can bring wealth to our state. . The session also talk about how the presenter made some money and a change in career by bringing "dreaded" Windows programming knowlege into the GNU Linux operating system (Do not worry , i won't show any source code !) . The other title of this talk would have been "how to make a living from FOSS ?" As Amitabh Bachan said in a movie , "Meim ye nehi jantha Woh acha hai , ye acha hai. Mujh jaise vyapari sabh ko apna lethe hai ".
Labels:
BarCamp
| Reactions: |
Subscribe to:
Posts (Atom)









