[Kde-finance-apps] Alkimia Database Class -First Commit
Alvaro Soliverez
asoliverez at gmail.com
Wed Jun 23 05:06:36 CEST 2010
On Tue, Jun 22, 2010 at 12:55 AM, Alvaro Soliverez <asoliverez at gmail.com> wrote:
>
>
> On Mon, Jun 21, 2010 at 11:10 PM, Fernando Vilas <fvilas at iname.com> wrote:
>>
>> On Monday, June 21, 2010 13:45:09 Thomas Baumgart wrote:
>> > Hi all,
>> >
>> > on Monday 21 June 2010 18:53:07 Mukesh Gupta wrote:
>> > > Hello Friends,
>> > >
>> > > My first commit to for alkimia is here
>> > >
>> > > https://svn.kde.org/home/kde/trunk/playground/office/alkimia/alkdbus/Alkr
>> > > ec ord/
>> > >
>> > > It consists of alkrecord class which will handle query and register
>> > > functions for the dbus server.Will add more functionality soon.The
>> > > file
>> > >
>> > > :ALK_DBASE: file is the sqlie database which is initially populated
>> > > with
>> > >
>> [snip lots of useful feedback]
>> >
>> >
>> > So much for now. I know, Rome wasn't built in one day, but I want to
>> > give
>> > as much feedback as possible.
>>
>> [snip lots more of useful feedback]
>>
>
> I see you added some printf statement, probably for debug. That's a good
> indication that you have to add unit tests, which can provide you better on
> what you are doing. We cannot stress enough how important unit testing is.
> Some people will even add the unit tests first and the main code later, and
> they can tell when they are done with coding because all tests pass.
>
> About the connection, one way to do it is keeping the connection open along
> the life of the class, checking that's it's effectively open every time you
> are going to use it. As Fernando said, opening and closing connections every
> time is very expensive.
>
> I guess you have a lot to do based on this feedback. Please don't hesitate
> to ask if there's anything you don't quite understand or that you have
> doubts about.
>
> The good things about FOSS is that people can see your code and comment it.
> The bad thing is that people can see your code and comment it. You are doing
> great and you'll fix these nuisances easily.
>
> Regards,
> Alvaro
>
One more thing to add to this, is that you should try to avoid big commits.
What do I mean by this? It's easier for us to review, when you make
small incremental commits, for each of the issues that we pointed out,
and not wait for a week, then you make a big commit and we have to go
through everything at once.
For example, when I'm working on a class, I will commit once for
removing old code, once for refactoring of existing methods, and once
for new features, and an additional one for style fixes. That way,
it's easier to follow through changes. Of course, each commit has its
corresponding meaningful commit message.
And, you can setup a commit notifier in commitfilter.kde.org, to send
you an email when a commit is made to your branch of code. We have it
setup for our code, and I added the Alkimia branch to my list of
notifications.
Just a few advices that makes the work easier.
Regards,
Alvaro
More information about the Kde-finance-apps
mailing list