A challenge for Malayalee programmers !

  • Apr. 30th, 2008 at 2:49 PM

There is a bug in GNOME bugzilla regarding a rendering bug in
Malayalam ( http://bugzilla.gnome.org/show_bug.cgi?id=441654 ). This is
the last major rendering bug in GNOME related to Malayalam. If any
programmers can fix it, that would be a great contribution to
Malayalam computing. Please go through the bug and see if you can
help.

Behdad, the mantainer of Pango is looking for a good explanation of
current patch. Otherwise a better patch is required based on his
suggestion.

Tags:

Buildout and setuptools

  • Apr. 24th, 2008 at 3:32 PM

(A comment to blog post by Tres Seavor -- I can't figure out how to add comment there, so this post.)

Buildout is build tool which can be used for any Python packages and
not something only for Zope. Since it is created Jim Fulton, the Zope
Pope, naturally there are many early adopters from Zope community.
Buildout itself may not be enough for all purposes, but it can be
extended using "recipes", the extension mechanism provided by
Buildout. Buildout use setuptools, but it's not for replacing it.
You can make use all features of setuptools while using Buildout. So,
all the strengths of setuptools are available for Buildout also.

A buildout.cfg of a Python need not to have duplicate information
given in setup.py . For example, a typical configuration file for a
package will be like this:
   [buildout]
   develop = .
   parts =

As you can see above there is no additional detail, the only
information given is the packages required to be developed.
(Here . means package in the current directory)

As you know any build system should have some kind of configuration,
if you think its a clutter, well I don't know what to say.

Most of the packages are setuptools based and so you can run any
command provided by setuptools. But if you want to get the benefits
of using Buildout you should learn the Buildout system. Then you will
be able to overcome the "foreign feeling".

As I said, Buildout doesn't prevent you from running any setuptools
command. For example if your package's setup.py is configured to run
'test' command, you can run it. There are some buildout recipe which
helps you to run tests in some weired way, but that is not a problem
of buildout ! That recipe may have it's own reason for doing it that
way, like handle extra dependencies, be more explicit, use a
particular test runner etc.. If you don't want this recipe, it's OK,
use your old setuptools test mechanism.

Tags:


This is for the first time I am writing about Malayalam language in my
blog. Unfortunately, this is about a catastrophe going to happen for
our language :( . I created this blog for writing about my interests
(Python,Zope etc.). I hope you will excuse this cross posted blog.

By breaking Unicode's basic principle, that, it will only inlclude
basic characters of a language, now they are going to add charaters
which are formed from other basic characters in Malayalam. You can
read more about the issue here:
http://fci.wikia.com/wiki/SMC/AtomicChilluIsUnacceptable
and in this document:
http://www.rachanamalayalam.org/docs/ChilluEncodingIsWrong.pdf .
The changes are added to draft version of Unicode 5.1.0, so we still have some
hope that it can be reverted. Please support us !

Some background: I started the Swathanthra Malayalam Computing project
almost 7 years back while studying at NIT Calicut. Later, when Free
Software Foundation of India started working on this project, I joined
them to work on this project (as a Job). After I left FSF India, some
others continued that project. Two years back a
new team started working on this project, you can see details
about this team at their wiki: http://fci.wikia.com/wiki/SMC . This
is such a great team with good leaders. Now they are touching all areas
of Malayalam computing: i18n,l10n and other software tools for
Malayalam. I am no more involved in this project, but I used to follow
up the developments.

Tags:

Yesterday's BangPypers meeting

  • Jan. 28th, 2008 at 2:21 AM

After a long time, we had a BangPypers meet yesterday at ThoughtWorks
office (thanks to ThoughtWorks for hosting us). Pradeep gave us an
excellent introduction to Django using a TODO list application he
created. This application used SQLite (RDBMS), jQuery (JS framework)
and BluePrint (CSS framework). He will publish this code soon in his
site.

Partial content in planets (A Request)

  • Jan. 25th, 2008 at 7:24 PM

Philipp, Martin & Kevin: I used to read planet.plone.org using an
offline feed agregator. I really like your blog posts (I never
missed a single one). I have one request, could you add full
content to your feeds for planets ?

I could have asked this question offline, but I thought other
bloggers who only give a link or part of content to planets may
add their full content to their feeds.

I wonder whether there is any other aspect which I don't
see which prevents them from adding full content to feeds.
One issue which I can see is that, very long posts may clutter
the planets, but I think planets can fix it with a new design
which only shows a part of the content and a link to view full
content.

(Feel free to make comments here)

Tags:

Congratulations to Grok team for new site !

  • Jan. 24th, 2008 at 3:51 PM

Grok project created a new simple,informative and great looking website:
http://grok.zope.org/

Congratulations to the team !

Tags:


Thanks to Alan Runyan for adding the ZCA book in plone.org:
http://plone.org/documentation/books
http://plone.org/documentation/books/guide-to-zca/
I hope this will help to increase the readership of the book.

Recently I started working on a case study chapter.
The source of application can be downloaded from here:
http://www.muthukadan.net/downloads/zcalib.tar.bz2

This is a PyGTK application which use PySQLite & ZODB as pluggable storages.
Looking forward to your suggestions and feedbacks :)

Tags:

I got my ZCA book !

  • Jan. 9th, 2008 at 2:50 PM

Last month I purchased my ZCA book from Lulu. Today it arrived in my
desk. Print quality, cover design and paper are very good. So far I am
the only purchaser of my book ;) The cost of book is $8.75 and
shipping cost to India will be another 6 USD. The book's PDF is available
from my site. If you want to purchase is it for some reason, you can
get it from here.

Tags:

Some updates

  • Dec. 18th, 2007 at 11:49 AM

* My FOSS.IN/2007 talk about Zope went well, There was about 40
people for my talk.

* FOSS.IN/2007 was a great experience, even though there was no Python
talk, Python was everywhere. I heard people mentioning Python
during many talks. There was three Zope related talks. The
lightning talks timer program was created in Python, there was many
BangPypers wandering around the place. Unfortunately, we couldn't
arrange one BoF.

* ZCA book has a new French translation.
I also self published this book at Lulu.

* An interview with me and some other Python programmers.

Tags:

FOSS.IN/2007 is coming up !

  • Nov. 27th, 2007 at 12:25 PM

(This post's target audience are readers of Python, Zope & Plone
planets.)

This year's FOSS.IN/2007 is coming up next month from December 4th to
8th at National Science Symposium Centre, Indian Institute of Science,
Bangalore, India. FOSS.IN is one of the world's largest FOSS events, held annually in India.
The event's main focus is on development and contributions to FOSS from India.
So, most of the talks are related to FOSS contributions. I also will be presenting a
talk about contributing to Zope project. Well, my original talk I submitted was
a general Python talk, which got rejected, so I also ended up with a
talk like this.

There is another talk related to Zope and Plone by Sreekanth S.R.

During the event, BangPypers will be conducting some BOF sessions. We
welcome all Python programmers to BangPypers BOF sessions.

Me & Nikhil N (last year GSoC student who worked on Python 2.5 porting
of Zope 3) planing to work on some Zope projects at hack center. Any
one intereted in Zope are welcome :)

BTW, this is for the first time I am going to meet Nikhil in person.
It was a nice exprience working with him during GSoC project. He is
also from my native place, Kerala. So, most of our discussions were in
our native language, Malayalam.

Tags:

Adapter pattern vs ZCA adapter

  • Nov. 24th, 2007 at 6:02 PM

This is a section I added to ZCA book recently. I am not a pattern guru,
so please correct me if anthing is not correct or required more explanation.
Thanks !


Adapter pattern
~~~~~~~~~~~~~~~

The adapter concept in Zope Component Architecture and the classic
`adapter pattern` as described in Design Patterns book are very
similar.  But the intent of ZCA adapter usage is more wider than the
`adapter pattern` itself.  The intent of `adapter pattern` is to
convert the interface of a class into another interface clients
expect.  This allows classes work together that couldn't otherwise
because of incompatible interfaces.  But in the `motivation` section
of Design Patterns book, GoF says: "Often the adapter is responsible
for functionality the adapted class doesn't provide".  ZCA adapter has
more focus on adding functionalities than creating a new interface for
an adapted object (adaptee).  ZCA adapter lets adapter classes extend
functionality by adding methods.  (It would be interesting to note
that `Adapter` was known as `Feature` in earlier stage of ZCA
design. ) [#feature]_

The above paragraph has a quote from Gang of Four book, it ends like
this: " ...adapted class doesn't provide".  But in the next sentence I
used "adapted object" instead of "adapted class", because GoF
describes about two variants of adapters based on implementations.
The first one is called `class adapter` and the other one is called
`object adapter`.  A class adapter uses multiple inheritance to adapt
one interface to another, on the other hand an object adapter relies
on object composition.  ZCA adapter is following object adapter
pattern, which use delegation as a mechanism for composition.  GoF's
second principle of object-oriented design goes like this: "Favor
object composition over class inheritance".  For more details about
this subject please read Design Patterns book.

The major attraction of ZCA adapter are the explicit interface for
components and the component registry.  ZCA adapter components are
registered in component registry and looked up by client objects using
interface and name when required.

.. [#feature] Thread discussing renaming of `Feature` to `Adapter`:
   http://mail.zope.org/pipermail/zope3-dev/2001-December/000008.html

Tags:


Lorenzo Gil Sanchez (Gazpacho fame) is working on a Spanish
translation of ZCA book (PDF). It was a surprise for me to see a new bzr
branch at Launchpad for Spanish translation. Kent Tenney was also
excited, keep up the good work, Lorenzo ! I have published his
translation in my site (PDF). If anyone want to help him with
this translation or start a new translation to another language, you can
simply create bzr branch there and start working it.

Since I am involved in Zope 3, I become a heavy svn user. Now, after
I started using bzr for this project I realized the power of bzr (This
may be applicable to other DVCS). Currently we have three active
branches, the feature I like very much is merging from other branches
(Oh ! it's really cool). Thanks to Canonical for providing such a nice
hosting for bzr. After all Launchpad is a ZCA based application, then
how it won't be cool ? ;)

Since I published this work in last month, there was almost 5000 hits
for ZCA book. Also I got good comments and feedbacks in my journal
and through mail. It looks like people are also interested in
translating this work to other languages. To coordinate all these
efforts, I have created a google group. So, if you are interested to
help me in any way to finish this work, you can join me there.
Well, this is not a general discussion list for ZCA itself, you can
use zope3-users list for that.

Tags:

ZCA book project at Launchpad

  • Nov. 14th, 2007 at 10:08 AM

I got good comments for my last post about ZCA book (PDF).
Thanks to all those who commented in my journal.

Few days back, Kent Tenney suggested to host this project in a public repository,
so that, others can also contribute. Then, he himself setup a Lauchpad
project for the book
. Details about how to contribute is given in
the README.txt file there. I hope you will create a branch there :)

Kent Tenney also created a nice logo:

Tags:

At last Zope 3 releases coming to an end !

  • Nov. 7th, 2007 at 1:38 PM

Few days back Stephan Richter released Zope 3.4 second beta release.
The Zope 3.4 release may be the last release of Zope 3 release
as a single package. There is still a minor chance for a 3.5 release.
Anyway, Zope 3 as a single package is coming to an end. I won't be
surprised if the term "Zope 3" itself vanish in the future.

This is a good thing for the future of Zope project & community. As I
implied in one of my last post, Zope is becoming more "Pythonic".
Well, I am not going to describe "What is Pythonic" :) . You know,
Zope is even dropping the server business ! (Zope 3 used Twisted web
server as the default server for a long time). We also retired
zope3-dev list last month .

For those who using Zope 3.3 or earlier versions, Zope 3.4 is a chance
(may be last) for migrating to egg and buildout based system for
development and deployment.

Now you might wonder, "Where is Zope going ?" . This is a very
difficult question for me to answer, so, I refrain from trying it :)
Here I am just giving two pointers: Grok, Repoze.

However, I believe Zope 3 will live for a long time through the
numerous packages derived from it.

Update:I forgot another pointer: zopeproject

Tags:


Last week, Kent Tenney send me a cool Firefox trick for ZCA reference lookup.
His suggestions helped me to improve English style and usage in that book (Thanks Kent!).
With this cool trick you can go to a reference section just typing 'zca ' follwed by the word all in small letters.

I am quoting his message as such:


I just created a Firefox bookmark with the following properties:

Name: Zope Component Architecture
Location: http://www.muthukadan.net/docs/zca.html#%s
Keywork: zca

Now, when I type in the Firefox location bar:
zca getadapter

I'm taken to the reference for that method.

Handy!


Kent, I reused this nice trick for another purpose also :)
To render reST page as HTML you can create a bookmark like this:


Name: reST to HTML
Location: http://api.rst2a.com/1.0/rst2/html?uri=%s&style=zope
Keywork: r2h


Thanks to rst2a.com team ! Now whenever I see a reST file online, I just prefix it with 'rst ',
this gives me a nice HTML page !

Text below is for my Kerala friends:

എല്ലാ കേരളീയര്‍ക്കും എന്റെ കേരളപ്പിറവി ആശംസകള്‍ !

Tags:


If you check PyPI recent update any time, you can see at least one package
update from Zope community. Zope 3 itself has more than 140 eggs.
Zope 2 also started using eggs, I think Zope 2 itself is going be fully
eggified soon after 2.11 release.

It would be interesting to read Pradeep's post to BangPypers list along
with this. He says:

"The kind of functionality available in Zope and plone especially when
it comes to fine grained authentication, content metadata,
internationalisation support, are yet to be seen on other python
framework. However, the choice is simpler now, because Zope is pushing for a
``Python Ecosystem'' rather than a single do-it-all framework
. Once
again they lead the way."

Tags:

Zope component architecture article -> book

  • Oct. 22nd, 2007 at 10:23 AM

Last Monday I posted about an article I am writing about Zope component
architecture
. This weekend I added a reference chapter. Now it has total 76 pages,
now it is more than the size of an article, so I would like to call it as a book :)
(I don't know the criteria for a book, may be I am wrong)

You can read the book here.

I didn't got any feedback for this work yet from Python/Zope/Plone community :( .
Though, I didn't lost my hope. I hope this time I will get some feedback :)

Update:I have added an HTML version of book (Thanks to Anonymous commenter).
Also I have uploaded the reST source.

Tags:

Zope component architecture article

  • Oct. 15th, 2007 at 5:39 PM

Few months back, I started writing an article about Zope component architecture.
But I couldn't finish it at that time. My friend Brad (thanks Brad!) reviewed the
initial draft at that time. Even now I didn't completed it as I wished, though,
last weekend I did some polish works. The last chapter is just a copy paste with
some minor changes from README.txt in source code of zope.component package.

Anyway, here is what I wrote so far. I am planning to look into
this article after some time (may be weeks/months). If you have any
comments/questions, please add it as a comment here.

Tags:

Good bye zope3-dev list !

  • Oct. 12th, 2007 at 12:01 PM

Zope 3 developers list is going back to where it is started.

The first mail to zope3-dev list was from Jim Fulton in 2001 and he
closed the list with a final thread. There was average 146 KB (gziped version)
mail per month for last 6 years and 500+ subscribers in zope3-dev list.

Recently Zope 3 has been "exploded" into individual projects.
The discussions about development of these projects will continue in
zope-dev list (The 'zope-dev' list is almost 9 years old now).

This is a good move, because Zope 3 is no more a single project. Zope
itself had more projects from the beginning. But projects like Zope 2
(Original Zope application + application server and/or framework),
ZODB (object database), CMF (content management framework) etc. was
more coarse grained. Then Zope3 also started like this, but it
consisted many re-usable packages. With the arrival Python eggs, it
become easy to manage small packages. Buildout pushed this trend
further. At last, this lead to splitting of packages into separate
projects, and we have a new term for that, "satellite projects". Also
these projects are more fine grained compared to Zope 2,ZODB etc. (I
heard Jim has plan to split ZODB into small individual packages in
future)

The 'zope3-users' list will function as it is now. In future, this
list *may* also merge to general 'zope' list in favor.

Tags:

Why Zope community use namespace packages ?

  • Sep. 25th, 2007 at 4:46 PM

Zope project and the community in general use lots of namespaces
packages. Though, we have some non-namespace packages like
ZODB3,ZConfig etc. Zope community has created many namespaces
for packages like `zope`, `zope.app`, `zc`, `z3c`, `lovely` etc. Here
`zc` stands for Zope Corporation, `z3c` for Zope 3 Community and
lovely for Lovely Systems' packages.

Python is a language with namespace support at many levels.
Remember, the last line of Zen of Python reads like this: "Namespaces
are one honking great idea -- let's do more of those!"
Take it positively, don't interpret it more ;)

A namespace package will not have any method,class or any other
objects defined in that level. So a normal namespace package will be
only having an empty `__init__.py` file. Eggs and setuptools provides
some new advantages for the distribution of namespace packages. So,
normally a namespace package's `__init__.py` file will contain
something like this:

import pkg_resources
pkg_resources.declare_namespace('zope')

That's all you required to put in your namespace package's
`__init__.py` file. But you also will be required to add one more
keyword argument for `setup` function in your `setup.py` script like
this:

namespace_packages=['zope']

You can even have nested namespace packages, in that case you have to
add it like this:

namespace_packages=['zope', 'zope.app'],

Remember, Zen of Python also says: "Flat is better than nested." .
Even though Zope use `zope.app` nested namespace package, Zope
community discourage nested namespace packages. The `zope.app`
namespace may be consider as a mistake of Zope project.

The `zope` and `zope.app` were the first namespace packages used by
Zope. I still remember the appraisal I got from Jim Fulton after
implementing his proposal for making `zope.app` a pure namespace
package.

Here I will list some advantages of namespace packages. Feel free to
add/explain anything you found. :)


  1. Better grouping for projects/community/companies
  2. Better name for packages and don't worry about a name conflict
  3. Re-use package name in different namespaces
  4. Easy distribution as eggs

I think the last point requires bit explanation. Consider two
packages in same namespace, `zope.interface` and `zope.testbrowser`.
In Python, package name is tied to directory structure. So, in normal
distutils based distribution both `interface` and `testbrowser` should
be under `zope` directory. But setuptools and eggs allows you to
install both separately and still use both.

Let's save some names for new generation smart Python programmers !
Don't pollute top-level names, use namespace packages !!

Tags: