On Tue, Nov 30, 2010 at 12:03 AM, Hartmut Goebel <h.goebel@goebel-consult.de> wrote:
Am 29.11.2010 09:34, schrieb nap:

On Sun, Nov 28, 2010 at 11:15 PM, Hartmut Goebel <h.goebel@goebel-consult.de> wrote:
Am 25.11.2010 09:52, schrieb nap:

For the "properties" dict, it look better wil a uniq line than with multiple lines. It look more clear I think. I'm not for the "80 characters max" rule avery where. It's only when it's apply that when it's not. And for properties it's more clear when it's in one line.
Esp. for the properties I do not agree. In some modules, these are lines and lines of unstructured text. Hard to read, hard to what one is searching for.
what do you mean by unstructured text? For properties?
Sorry, I meant unstructured code/data. Yes, the properties in e.g. host.py
Yes, I'm trying to put the properties more readable. Theses dict are the core of the code. They must be easy to read and understand (data programming is not easy to understand/read, but is quite powerful :) )
comments instead of docstrings,
Yes, this one I know. I do nto like docstrings. I really stry, but somethign that is between function prototype and code is not a good thing for me. I came from C, and I see code like :
Well, but shinken is a Python program :-) Even if you personally dislike docstrings, you should rethink this. Python programmers love dostrings and using them will be some kind of marketing ;-)
Yes it's true. But it will make C coders hate even more the code, and most of monitoring guys are from C in the "Nagios world" ;)
I you try to address C coders, shinken will get a C program written in Python syntax. If you want to get a pythonic Python program there is less sense in attracting C coders.
Yep. Maybe it's time to attrack new coders in this monitoring world. There are plenty of fun things to do in it. Such a program can be cool for Python dev. And in some times maybe even a configuration UI, so even web dev will be happy ;)

But let try the docstrings. After all, we can also try a tool like Sphinx and some people will like to use it, and so will begin to hack the code. And if that make Python guys look at the code, it's good after all.
Using Sphinx is a good decision :-)
I'm always wondering if such tool is so useful. I always find data with a grep :) But if it can attract/help new dev, it's a thing to do.

[... properties ...]

The code will be quite long after that, but it's another problem.
Yes, this is a drawback. But maybe this a place we have to think about a different approach. I did not yet to have a deep enough understanding of the code, though.
I think the properties dict are long, but it cut quite a LOT the rest of the code. In one line (ok, 4 now) you add a new property without touching the rest of the code, so it's good :)

By the way, all patches are applyed, and the pylint pass in in progress :)


Schönen Gruß - Regards
Hartmut Goebel
Dipl.-Informatiker (univ.), CISSP, CSSLP

Goebel Consult 
Spezialist für IT-Sicherheit in komplexen Umgebungen

Monatliche Kolumne: http://www.cissp-gefluester.de/
Goebel Consult mit Mitglied bei http://www.7-it.de

Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
Shinken-devel mailing list