https://bugzilla.wikimedia.org/show_bug.cgi?id=62566

--- Comment #8 from Erik Zachte <ezac...@wikimedia.org> ---
Sure, let's see how to get this ball rolling.

I suggest we focus on runtime arguments and general setup first, as you already
started to do. Everything become easier if you have a working setup, as you can
step into code with debugger. (I used Windows OptiPerl during development, now
mostly edit code on WMF server directly).

About comment 1/2: it looks more than it is, as I split out nested paths into
several statements. Having said that I certainly agree this could be coded
better and more flexible, and I could use some advice here. Now I run most jobs
from home folder and push to git mainly for archive purposes. If that could be
done without editing bash files that would be a big win (environment variable
?). BTW somehow getting push working from /a/wikistats_git proved a bottleneck.
Some authorization issues.

About code base in general. As you know WikiCounts.pl produces csv files,
mostly from xml files (and some api results, php files, translatewiki output,
etc). Some parts of WikiCounts are ugly or hard to comprehend even for me. Some
parts are more or less self contained and maybe could be made into standalone
script (to further modularisation). WikiReports.pl is probably the hardest to
read (but some parts, once modularized, may find reuse even in a HADOOP
environment, e.g. page view reports). 

As for coding conventions: Especially in WikiReports there are lots of one
letter variables and very maintenance-unfriendly function names. I tried to
make names for complex functions reasonably understandable, but chose really
cryptic function names for many small one line functions used for html mark-up
(kind of c-style function name approach).There is only half-hearted systematic
in those cryptic names, all in the name of getting code done.
WikiReportsHtml.pm is by far the worst, I have to lookup names there all the
time. My dilemma is giving all those mini-functions self-explanatory names
would make the code using them much less readable (wood, trees). Now the html
presentation details are kind of obfuscated but it doesn't distract from main
presentation logic.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to