Posts

Showing posts with the label observation

A quick look at some package repositories

When I visited Python's cheese shop today, I stop for a moment at the total number of packages. This raised my curiosity to look at other languages' package repositories. 1. Perl (11643) http://cpan.org/ 2. Python (2392) http://cheeseshop.python.org/pypi 3. Ruby (1587) http://raa.ruby-lang.org/ 4. PHP (442) http://pear.php.net/packages.php Well, I am not making any conclusion out of this, because there are many other factors required for an analysis.

Python advocacy and marketing

I was reading Tarek's post on Python marketing: http://tarekziade.wordpress.com/2006/10/15/marketing-python-is-urgent-part-1-a-python-certification/ He suggests a Python certification program. Is this list created for discussion related to Python Advocacy?. http://mail.python.org/pipermail/advocacy/ But I cann't see any posts there (hmm.. I send one in last month, just to test)

Why I am biased?!

I was always biased towards many technologies. My favourite programming language is Python, My favourite GUI toolkit is PyGTK. My favourite editor is GNU Emacs. And my favourite web framework is Zope 3. But I think I have to look into django now, because of these posts: http://www.advogato.org/person/titus/diary.html?start=186 http://tabo.aurealsys.com/archives/2006/08/18/guido-van-rossum-and-django-redux/ http://pyre.third-bit.com/blog/archives/613.html http://programming.reddit.com/info/dykr/comments http://www.djangoproject.com/weblog/2006/aug/07/guidointerview/ BTW, Zope 3.3 is coming: http://www.zope.org/Products/Zope3 . Now I am a Zope 3 developer, want to learn the internals for contributing, only few minor commits so far. I managed to create this page: http://kpug.zwiki.org/WhatIsNewInZope33

What to write?!

For the last one month I didn't wrote anything here. I have always wondered how some peoples write long matters in journal/blog. Is it just like composing reply to a technical mail. Do they feel the pain of creativity. I usually read python, gnome and ubuntu planets. I like new ideas in programming, technology also I read humor and philosophy. I think most of the planets didn't restrict topics. Some of them writes highly technical stuff only, some writes about life some writes what's happening everywhere else. Well, it is something like this, a type is declared "int me1;", "float me2;". Yes some people sometimes upcast or downcast their values :) And there are few dynamically typed journals/blogs and I like those very much, the first example I can point is Guido's blog (http://www.artima.com/weblogs/index.jsp?blogger=guido). So a "Pythonic blog is always dynamically typed" :) What is your favorite dynamically typed blog/journal?

Characters per line for technical documentations

I was wondering what will be the best choice for the number of characters per line for text based technical documentations. Well, better to reduce the scope of question. Ok, let it be a documentation for Python package/product written using ReStructuredText. My choice is now 80 characters. Any reason to reduce that or not use a character limit at all? Python PEPs are using 72 characters, is there any style recommendation from Python coding or other standards? I started thinking about this from https://launchpad.net/products/bzr/+bug/39657

ZCML is good for Zope3!

I am still feeling dfficulty to unerstand what's happening behind ZCML (Zope Configuration Markup Language). But still I like it, because it is not Python :) Python is my favourite language, so I cann't say what else I won't be doing in my configuration. Jeff Shell's suggestions in this long mail is great! http://mail.zope.org/pipermail/zope3-users/2005-December/001732.html He also warns Rails-ish frameworks in this mail and his recent blogs: http://griddlenoise.blogspot.com/

Koha and Perl again!

Two year back I was a Koha (http://www.koha.org) consultant, may be the first Koha consultant from India. I did two successful installations, but later when I got a job I stopped my consultancy works. Actually I got many offers from all over India to install Koha. But I found it will be very difficult to support many clients alone. Though two of my customers was happy. Yesterday (Sunday), I visited one of customer. They required few changes in OPAC. In five hours somehow I completed that work. I was constantly referring perlintro, perlretut etc. I think it will be very difficult for a Python programmer to do Perl programming. I have written a document and scripts for ISIS to Koha migrators: http://www.kohadocs.org/CDS_ISIS_to_Koha.html (ISIS versions are distributed by UNESCO since late 60s. and there lots of installation world wide.) Hmm.. now I will get back to office works, I got lots responses for my Zope3 article, so I will improve it.

getdefault method for python dictionary

In this blog: http://blogs.nuxeo.com/sections/blogs/ruslan_spivak/2005_09_01_btrees-setdefault Blogger says that Python's dictionary method, 'setdefault' without explicit default is confusing and useless. Now I think there should be a 'getdefault' method which also requires two explicit arguments, it will return explicit default if no key exists. Here is an example: >>> d = {1: None} >>> print d.getdefault(1, 'Hi') None >>> print d.getdefault(2, 'Hi') 'Hi' Hmm.. there is already a 'get' method. If we have 'getdefault' then 'get' can be deprecated, Here is the reason: >>> d = {1: None} >>> print d.get(1) None >>> print d.get(2) None See, here I didn't thought about any use cases.

Moving from Python to Java :(

For last 9 months my company was developing an enterprise application. Our main language was Python. Its going to implement all over India by next few months. Next month we will start our new project, Java will be our main language. Now I started refreshing my Java. And this is one thought came to me today, when I looked into Strings in Java. One of Python's primary design principle is that: "Special cases aren't special enough to break the rules." That is, the language should avoid having privileged features that you can't reuse for other purposes. The consequence of this principle is, more generalisation of syntax and semantics of a language. In Python : (of course, there are better ways) age = 9 print "He is " + str(age) + " years old." In Java: int age = 9; String s = "He is " + age + " years old."; System.out.println(s); Concatenating string and integer like this is possible in Java, because it is a "spec...