octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Contributing to octave?


From: Daniel J Sebald
Subject: Re: Contributing to octave?
Date: Mon, 02 Feb 2015 00:40:59 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

On 02/01/2015 04:53 PM, A B wrote:
Hi,

I declared my intention to subscribe to this list, yesterday, Saturday.
I received the confirmation today, Sunday.

I would like to contribute code.
I had a look at the list of possible projects. Following your advice,
however, I would like you to suggest some work from which I will
take something to work on. Please say also something about dead-
lines.

I may humbly admit that I have some experience in writing software
for many different applications in many different languages on many
different platforms. Also Verilog and VHDL.

The attached piece of code shows how I lay out my code. I wrote it
a couple of days ago to keep track of my credit-card expenses.
After 13 years, I started using a credit card again, four weeks ago.
If you do not agree with this layout please let me know.

Hello PK,

Octave is primarily in C++ and script files (.m). The C++ files typically only use C comment style in the header, and then only

/*
<header>
*/

without a string of asterisk characters. Other than the header, the C++ comment style is used, i.e., //.

Use comments sparingly. Only when there is something tricky and non-obvious, or some overriding concept that needs to be understood to help decipher code should you place a comment. E.g., looping is a common programmers paradigm, no need to explain that.

As for code like itoa(), etc., with the C++ usage comes a wealth of library and class functions that can probably provide anything needed in terms of low level functionality. Search through a C++ online library reference for a function and you will likely find it. That is, if you think "Hey, there really should be a function for this.", it's probably in a library. Get creative, I guess.

For general formatting, follow the precedent in the files themselves. Use whitespace and tabs the same way the file already uses them. If there is some file that is formatted inconsistent with the whole project, one of the main developers will probably eventually catch that.

Same goes for script files. Use the comment characters ## and # in a similar fashion to other script files.

Speed/efficiency is always important. It takes a lot of experience and familiarity with underlying pros/cons of Octave commands (e.g., matrix constructs are faster than looping) to write efficient code. A lot of times it is trial and error determining what is most efficient.

Dan



If you want to open the thing on windowze please run it through
"unix2dos" before opening. I run an old version of Linux Fedora.

I thank you!!

Regards,

The defiant one.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]