From: Masaaki A. <mas...@gm...> - 2011-09-24 08:17:27
|
Hi, 2011/9/23 Nikolai Weibull <no...@bi...>: > On Tue, Sep 20, 2011 at 16:46, Masaaki Aoyagi <mas...@gm...> wrote: > >> * yagi_gnome-0.0.1.pre.gem >> a tool to automate tasks and source parser(still incomplete) > > Please take the following criticism as my thoughts only. I think that > this tool has a lot of potential and I would to see it be used for the > Ruby-GNOME2 project. I think that a tool like this is necessary for > us to be able to bring the documentation up to the quality that we > desire. > > The coding style isn’t like the standard: > > * You use a tabwidth of 2 instead of spaces > * You use a “_” prefix for method parameters > * You use explicit return > * You define constants that only act as shortcuts to other constants, > for example, CO = YARD::CodeObjects > * You define multiple classes per file > * You use common prefixes for all methods in a class, which just gets > in the way; see, for example, lib/yagni_gnome/template/code_object.rb > (are you doing that because you’re monkey-patching YARD::CodeObjects?) > > There are also a lot of singleton methods. I feel that such code is > begging for a refactoring. (Singleton objects in disguise.) > > There’s also a lot of commented-out code. > > You also monkey-patch String, which I don’t think is a very good thing > to do. There’s also a lot more monkep-patching going on, of, for > example, Hash, Nokogiri::XML::Node, YARD::Docstring. Thanks for your advice. Will be helpful. yagi |