[BioRuby] [GSoC][NeXML and RDF API] Code Review.

Anurag Priyam anurag08priyam at gmail.com
Fri Jul 2 12:27:11 UTC 2010


>
> > The idea here was to implement a type system and stick close to the class
> > hierarchy followed in the schema. However, looking back, I myself do not
> > find the code for the Matrix class very elegant.
>
> Over 3000 lines of code for an XML parser sends out alarm bells. If
> you have the right testing files it should be easy to refactor. Make
> it simpler. Also, when parsing this type of XML some Ruby reflection
> may come in handy - I did some of that in my BioRuby GEO parser, which
> lives in my GEO branch on github.  You should look at each class and
> see if you can refactor it down to a single solution. Just make sure
> it is not at the expense of readability and understanding.
>
> Post us some ideas here, before you start hacking code.
>
>
Perhaps it would be better to use Kernel.const_get and initialize the
correct type. So, if I have a DnaMatrix i would use DnaSequence or DnaToken
for matrix cells. It would make the code a *lot* shorter. I should also do
away with the type hierarchy of Rows( DnaSeqRow, RnaSeqRow and others ).


-- 
Anurag Priyam,
2nd Year Undergraduate,
Department of Mechanical Engineering,
IIT Kharagpur.
+91-9775550642



More information about the BioRuby mailing list