[Biococoa-dev] BCNucleotideRNA

Koen van der Drift kvddrift at earthlink.net
Sat Sep 25 16:35:20 EDT 2004

On Sep 25, 2004, at 9:29 AM, John Timmer wrote:

> Just to let you guys know, the grant I run a database for us up for 
> renewal,
> and I've got a huge rebuild coming up over the next few days.  I 
> probably
> won't be able to do anything code-wise until the end of next week.

Good luck with the grant!

> Looking up methods in an ObjC superclass is significantly slower
> than having them in the object being used.

I didn't know that. Is this only for ObjC, or also for other OO 
languages, such as C++ and Java?

> Elegant implementation != elegant use.  A single class looks cleaner, 
> but
> all the complementation/representation abilities in the bases are 
> extremely
> useful, but make no sense applied to amino acids.

That's where wrappers or decorators come in handy, like we already do 
for translation and mass calculation, and later for digesting and other 

>  There's also going to be
> a bunch of situations where you'd have to waste time asking what type 
> of
> sequence something is, which I personally would find extraordinarily
> inelegant ;).

If you do it just once before each calculation, I don't see how much 
extra time that would take.  Check the sequence once, then do something 
with 1000 symbols. You already are using a lot of type testing in your 
nucleotide classes, so one more test wouldn't hurt, I guess. In fact it 
could speed things up: if we know we are dealing with a DNA sequence 
(because it was created by using a strict DNA BCSymbolSet), then there 
is no need to test each symbol as well.

> Although we can't
> prevent stupidity (and I'm an occasional practitioner), I think we 
> should
> try to design our classes to make some of these things a bit harder to 
> do.
> Separating classes, some basic error testing, and using ID as little as
> possible should help a great deal.

I agree :)

> In most cases, it is probably a balancing act where there's no single 
> right
> answer, and the elegance/practicality decision will just be made by 
> whoever
> writes the class.

I'm not sure if I agree here. I think we should agree on a similar 
approach for all classes. That would make things more transparent not 
only for us, but also for users.

(I guess I shouldn't have used the word 'elegant' ;-)


- Koen.

More information about the Biococoa-dev mailing list