making changes to DataEngine

Aaron J. Seigo aseigo at kde.org
Wed Nov 30 08:32:08 UTC 2011


hi :)

the code in DataEngine (and related classes) is very unforgiving. it must 
absolutely and at all times follow to the letter the contracts it sets forth 
as to things like source availability, calls to dataUpdated, etc.

every time one of these things is wrong in the code we get bugs in applets and 
dataengines as a result. trust me, i managed to do that several times while 
writing that code in the first place. ;) in fact, just last week i fixed 
another interesting edge case.

what i'm trying to say is that the code there is not particularly robust to 
changes unless there is a relatively deep understanding of what's going on in 
there.

the result is that within the last couple of weeks two people have fixed the 
same bug in the same incorrect manner. i didn't notice the original change as 
it happened while i was heading out on vacation .. noticed the issue while 
reading through the code and 'fixed' it, reintroducing the original bug, which 
another person then fixed back to exactly the same original problem.

so ... in future, when working on DataEngine code please consider the 
following:

* even if it is a one-liner, run it by me. i know that code better than anyone 
and will be able to point out problems that are not perhaps immediately 
apparent.

* if you do make a change in the code to address a non-obvious situation, 
please leave a comment in the code noting why that change was made.

thanks ...

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20111130/66c0c6c9/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20111130/66c0c6c9/attachment-0001.sig>


More information about the Plasma-devel mailing list