← Back to team overview

kicad-developers team mailing list archive

Re: Coding Style Guide

 

On 09/13/2010 04:17 AM, Alex G wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 09/13/2010 08:09 AM, Dick Hollenbeck wrote:
>   
>> On 09/12/2010 11:42 PM, Dick Hollenbeck wrote:
>>     
>>> Attached is the document that Wayne and I have put together, first
>>> public draft.
>>>
>>> There should be hyperlinks from the PDF table of contents, but
>>> OpenOffice 3.2 seems to have broken this support.  I am still looking
>>> into that, since I feel it is important.  I may have to use a different
>>> OpenOffice version when I have more time.
>>>
>>>
>>> Dick
>>>   
>>>       
>> OpenOffice 2.4 worked for the TOC hyperlinks, revision attached.
>>
>>     
> Thanks! One particular item of interest to me is that I wasn't able
> gauge is the use of "this->" to explicitly state that the variable is a
> member of the object. Is this acceptable?
>   

No.  This is not really C++.  What you talk about is often done in Java,
but I don't like that either, and I don't personally do that.  This was
another reason for using the 'a' prefix in front of argument names, so
that you can be sure you will never collide between a member variable
name and an argument.



> BTW, +2 for using spaces instead of tabs. For some reason I keep leaving
> tabs on, and it works very nicely, but then I open it up in a different
> editor, and ouch!
>
> Alex
>
> P.S. Do you have any preference as to which IDE you use for kicad? I
> know it has nothing to do with coding guidelines, but I am looking for
> suggestions, as my favorite until recent IDE (NetBeans) is incapable of
> handling large projects.
>   

I use JEdit to edit, and a terminal window to compile, on Ubuntu, with
dual monitors.  So I can see the compiler and the editor each in their
own window, on their own screen.  To capture a lot of errors, I will
occasionally run the build tool like this:

$ make 2>&1 | less

which will capture the stderr output to into the less scrolling tool. 
Otherwise when I am programming perfectly or expecting few errors, its
simply:

$ make

JEdit can also be taught to run the compiler, but then it puts the
output into a smaller window and I might be using less than a full
screen for viewing.  I like seeing as much as I can.

Dick





Follow ups

References