[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-edu-devel
Subject:    [kde-edu]:  R: Re:  R: Re: Kartesio
From:       LucaTringali <TRINGALINVENT () libero ! it>
Date:       2011-03-27 15:38:36
Message-ID: 30787803.2469161301240316780.JavaMail.defaultUser () defaultHost
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Ok, I'm gonna work making the code following the KDE coding style.
Luca Tringali


----Messaggio originale----

Da: tcanabrava@kde.org

Data: 27/03/2011 16.26

A: <kde-edu@kde.org>, "LucaTringali"<TRINGALINVENT@libero.it>

Ogg: Re: [kde-edu]: R: Re: Kartesio



I took a look at the code, and I think it could be better designed, ie, all code is \
on mainwindow.cpp, but inside the mainwindow you have a parser, a plotter, you are \
also using non-english names for variables (texto, for instance). 

the names of the member variables are wrong, if you follow the kde-coding guidelines. \
for instance, you have  xmin = 0;    xmax = 50;    ymin = 0;
    ymax = 50;
if you follow the kde-coding guidelines, they should be
    m_xmin = 0;    m_xmax = 50;
    m_ymin = 0;    m_ymax = 50;
the m_ on front indicates that they are member-variables instead of method variables.
also, you are doing a *lot* of string operations on your code, you should consider \
using QByteArray for that instead of QString list as QByteArray is much faster on \
those. so,1 - fix ObjectOriented Programming in your app. doing everything inside the \
main class is bad. 2 - fix your code-standards to meet kde's ( \
http://techbase.kde.org/Policies/Kdelibs_Coding_Style ) as for a new program for \
that, I don't know if it's good. for instance, it looks like it could be done on \
KmPlot instead of a new app just for that.

Tomazyou should also not use on_variable_signal() auto-connections, for a simple \
change in the ui can break your program.

On Sun, Mar 27, 2011 at 12:12 PM, LucaTringali <TRINGALINVENT@libero.it> wrote:

Well, it's just a little more complex: maxima does only the part of solving

the

function, but the algorithm for best fit is implemented into Kartesio, and

can't be done with maxima commands. Plus, the interface of Kartesio has been

designed for this particular use, while Cantor is fundamentally a paper for

mathematical calculations. It could be a good idea to write a plugin for

Cantor

that works with Kartesio as a backend, but I should think about how this

could

be done.



Luca Tringali



> > ----Messaggio originale----

> > Da: aspotashev@gmail.com

> > Data: 27/03/2011 13.24

> > A: <kde-edu@kde.org>, "LucaTringali"<TRINGALINVENT@libero.it>

> > Ogg: Re: [kde-edu]: Kartesio

> > 

> > 2011/3/27 LucaTringali <TRINGALINVENT@libero.it>:

> > > Hello everybody,

> > > I wrote a program that takes a series of points, a generic curve, and

tries

> > > to give a best fit. I called it Kartesio, it works using maxima to solve

> > > functions and KDE libraries for the UI.

> > > For example, if you give it (1;0) (2;3) (3;7) (4;8) (5;11) and the

function

> > > y=a*x+b, it will return y=3*x -3, and plot it to show differences between

> > > the best fit curve and the original points. It can also export the results

> > > into an svg image, a latex document (using pstricks).

> > > Give it a look, and tell me what do you think:

> > > http://quickgit.kde.org/?p=scratch%2Flucatringali%2Fkartesio.git&amp;a=summary

> > > Here's a screenshot:

> > > https://docs.google.com/leaf?

> id=0B6K8rmHlVyTFZTliYzIwMmEtODZlOS00NjhkLThiYjItNWM1YTIzMzBmNDc2&amp;hl=en

> > > Could it be included into kde-edu collection? What does it miss?

> > 

> > As your application uses Maxima, the same thing can probably be done

> > as a plugin for Cantor (http://edu.kde.org/applications/all/cantor/).

> > 

> > 

> > --

> > Alexander Potashev

> > 

> 

> 





_______________________________________________

kde-edu mailing list

kde-edu@mail.kde.org

https://mail.kde.org/mailman/listinfo/kde-edu


[Attachment #5 (text/html)]

<p style="margin: 0px; padding: 0px;">Ok, I'm gonna work making the code following \
the KDE coding style.</p><p style="margin: 0px; padding: 0px;"><br></p><p \
style="margin: 0px; padding: 0px;">Luca Tringali</p><p style="margin: 0px; padding: \
0px;"><br></p> <blockquote>
----Messaggio originale----<br>
Da: tcanabrava@kde.org<br>
Data: 27/03/2011 16.26<br>
A: &lt;kde-edu@kde.org&gt;, "LucaTringali"&lt;TRINGALINVENT@libero.it&gt;<br>
Ogg: Re: [kde-edu]: R: Re: Kartesio<br>
<br>
I took a look at the code, and I think it could be better designed, ie, all code is \
on mainwindow.cpp, but inside the mainwindow you have a parser, a plotter, you are \
also using non-english names for variables (texto, for instance).&nbsp;<div> \
<br></div><div>the names of the member variables are wrong, if you follow the \
kde-coding guidelines.&nbsp;</div><div>for instance, you \
have</div><div><br></div><div><div>&nbsp;xmin = 0;</div><div>&nbsp;&nbsp; &nbsp;xmax \
= 50;</div><div>&nbsp;&nbsp; &nbsp;ymin = 0;</div> <div>&nbsp;&nbsp; &nbsp;ymax = \
50;</div><div><br></div><div>if you follow the kde-coding guidelines, they should \
be</div><div><br></div><div><div>&nbsp;&nbsp; &nbsp;m_xmin = \
0;</div><div>&nbsp;&nbsp; &nbsp;m_xmax = 50;</div><div> &nbsp;&nbsp; &nbsp;m_ymin = \
0;</div><div>&nbsp;&nbsp; &nbsp;m_ymax = 50;</div></div><div><br></div>the m_ on \
front indicates that they are member-variables instead of method variables.</div> \
<div>also, you are doing a *lot* of string operations on your code, you should \
consider using QByteArray for that instead of QString list as QByteArray is much \
faster on those.</div><div><br></div><div>so,</div><div>1 - fix ObjectOriented \
Programming in your app. doing everything inside the main class is bad.</div> <div>2 \
- fix your code-standards to meet kde's (&nbsp;<a \
href="http://techbase.kde.org/Policies/Kdelibs_Coding_Style" \
mce_href="http://techbase.kde.org/Policies/Kdelibs_Coding_Style">http://techbase.kde.org/Policies/Kdelibs_Coding_Style</a>&nbsp;)</div><div><br></div><div>as \
for a new program for that, I don't know if it's good. for instance, it looks like it \
could be done on KmPlot instead of a new app just for that.</div> \
<div><br></div><div>Tomaz</div><div>you should also not use&nbsp;on_variable_signal() \
auto-connections, for a simple change in the ui can break your program.<br> <div \
class="gmail_quote">On Sun, Mar 27, 2011 at 12:12 PM, LucaTringali <span \
dir="ltr">&lt;<a href="mailto:TRINGALINVENT@libero.it" \
mce_href="mailto:TRINGALINVENT@libero.it">TRINGALINVENT@libero.it</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" mce_style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex;"> Well, it's just a little more \
complex: maxima does only the part of solving<br> the<br>
function, but the algorithm for best fit is implemented into Kartesio, and<br>
can't be done with maxima commands. Plus, the interface of Kartesio has been<br>
designed for this particular use, while Cantor is fundamentally a paper for<br>
mathematical calculations. It could be a good idea to write a plugin for<br>
Cantor<br>
that works with Kartesio as a backend, but I should think about how this<br>
could<br>
be done.<br>
<br>
Luca Tringali<br>
<br>
&gt;&gt;----Messaggio originale----<br>
&gt;&gt;Da: <a href="mailto:aspotashev@gmail.com" \
mce_href="mailto:aspotashev@gmail.com">aspotashev@gmail.com</a><br> &gt;&gt;Data: \
27/03/2011 13.24<br> &gt;&gt;A: &lt;<a href="mailto:kde-edu@kde.org" \
mce_href="mailto:kde-edu@kde.org">kde-edu@kde.org</a>&gt;, "LucaTringali"&lt;<a \
href="mailto:TRINGALINVENT@libero.it" \
mce_href="mailto:TRINGALINVENT@libero.it">TRINGALINVENT@libero.it</a>&gt;<br> \
&gt;&gt;Ogg: Re: [kde-edu]: Kartesio<br> &gt;&gt;<br>
&gt;&gt;2011/3/27 LucaTringali &lt;<a href="mailto:TRINGALINVENT@libero.it" \
mce_href="mailto:TRINGALINVENT@libero.it">TRINGALINVENT@libero.it</a>&gt;:<br> \
&gt;&gt;&gt; Hello everybody,<br> &gt;&gt;&gt; I wrote a program that takes a series \
of points, a generic curve, and<br> tries<br>
&gt;&gt;&gt; to give a best fit. I called it Kartesio, it works using maxima to \
solve<br> &gt;&gt;&gt; functions and KDE libraries for the UI.<br>
&gt;&gt;&gt; For example, if you give it (1;0) (2;3) (3;7) (4;8) (5;11) and the<br>
function<br>
&gt;&gt;&gt; y=a*x+b, it will return y=3*x -3, and plot it to show differences \
between<br> &gt;&gt;&gt; the best fit curve and the original points. It can also \
export the results<br> &gt;&gt;&gt; into an svg image, a latex document (using \
pstricks).<br> &gt;&gt;&gt; Give it a look, and tell me what do you think:<br>
&gt;&gt;&gt; <a href="http://quickgit.kde.org/?p=scratch%2Flucatringali%2Fkartesio.git&amp;a=summary" \
mce_href="http://quickgit.kde.org/?p=scratch%2Flucatringali%2Fkartesio.git&amp;a=summary" \
target="_blank">http://quickgit.kde.org/?p=scratch%2Flucatringali%2Fkartesio.git&amp;a=summary</a><br>
 &gt;&gt;&gt; Here's a screenshot:<br>
&gt;&gt;&gt; <a href="https://docs.google.com/leaf" \
mce_href="https://docs.google.com/leaf" \
target="_blank">https://docs.google.com/leaf</a>?<br> \
&gt;id=0B6K8rmHlVyTFZTliYzIwMmEtODZlOS00NjhkLThiYjItNWM1YTIzMzBmNDc2&amp;hl=en<br> \
&gt;&gt;&gt; Could it be included into kde-edu collection? What does it miss?<br> \
&gt;&gt;<br> &gt;&gt;As your application uses Maxima, the same thing can probably be \
done<br> &gt;&gt;as a plugin for Cantor (<a \
href="http://edu.kde.org/applications/all/cantor/" \
mce_href="http://edu.kde.org/applications/all/cantor/" \
target="_blank">http://edu.kde.org/applications/all/cantor/</a>).<br> &gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;--<br>
&gt;&gt;Alexander Potashev<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
<br>
<br>
_______________________________________________<br>
kde-edu mailing list<br>
<a href="mailto:kde-edu@mail.kde.org" \
mce_href="mailto:kde-edu@mail.kde.org">kde-edu@mail.kde.org</a><br> <a \
href="https://mail.kde.org/mailman/listinfo/kde-edu" \
mce_href="https://mail.kde.org/mailman/listinfo/kde-edu" \
target="_blank">https://mail.kde.org/mailman/listinfo/kde-edu</a><br> \
</blockquote></div><br></div> <br>
</blockquote><p><br></p>



_______________________________________________
kde-edu mailing list
kde-edu@mail.kde.org
https://mail.kde.org/mailman/listinfo/kde-edu


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic