API and code documentation. - General Discussion and Assistance - CHDK Forum

API and code documentation.

  • 8 Replies
  • 5262 Views
API and code documentation.
« on: 19 / October / 2009, 12:36:59 »
Advertisements
Why don't you comment the code? I want to understand the API, but there are no comments in the headers. In the source files there are only comments like this:

//-- -----------------------------------------------------------------
//extern int xxxx, eeee;
//-------------------------------------------------------------------

OR

// if exists "A/CHDK/SCRIPTS" go into

Very useful comments, aren't they?!

Please, make the API documentation.


Re: API and code documentation.
« Reply #1 on: 19 / October / 2009, 18:30:34 »
Very useful comments, aren't they?!

Well, I am studying CHDK to learn 'C' programming and also learn how CHDK works.
The lack of comments simply means that I have to work harder, even looking-up programming techniques on the Web.

Quote
Please, make the API documentation.

Why don't you, you are probably a more experienced programmer than am ?  :)

*

Offline RaduP

  • *****
  • 926
Re: API and code documentation.
« Reply #2 on: 19 / October / 2009, 18:35:12 »
Most programmers don't comment their code. The problem is not with the C code though, which is relatively easy to understand. The problem is with the ASM code, especially with the hackish part.
reyalp is one of the few that has good comments there.
« Last Edit: 19 / October / 2009, 18:49:38 by RaduP »

*

Offline reyalp

  • ******
  • 14082
Re: API and code documentation.
« Reply #3 on: 19 / October / 2009, 19:39:19 »
Why don't you comment the code? I want to understand the API, but there are no comments in the headers.
See my sig.

More seriously, because people are lazy, and tend to focus on whatever bit of code they need to solve their particular problem. I do add comments to things I find confusing or broken, and I encourage others to do the same. I would gladly add patches that consisted of only of informative comments!

If there is some specific thing that you are having trouble with, feel free to ask here.
Don't forget what the H stands for.


Re: API and code documentation.
« Reply #4 on: 20 / October / 2009, 11:15:42 »
Why don't you, you are probably a more experienced programmer than am ?  :)
I can write the documentation, but later.
How many people are now maintaining the upper-level part of CHDK? Is it being developed?

*

Offline reyalp

  • ******
  • 14082
Re: API and code documentation.
« Reply #5 on: 20 / October / 2009, 21:24:23 »
How many people are now maintaining the upper-level part of CHDK? Is it being developed?
What part are you referring to ?
Don't forget what the H stands for.

*

Offline RaduP

  • *****
  • 926
Re: API and code documentation.
« Reply #6 on: 20 / October / 2009, 22:23:17 »
I guess he means most of the C stuff, as opposed to the camera specific things.

Re: API and code documentation.
« Reply #7 on: 21 / October / 2009, 05:59:55 »
What part are you referring to ?
I guess he means most of the C stuff, as opposed to the camera specific things.
Yes, I mean the common C stuff - gui and other stuff in core/.


Re: API and code documentation.
« Reply #8 on: 21 / October / 2009, 08:53:23 »
You can't know how I am happy when I find somewhere that 0X16BC is in fact the adress of the state of some leds/button somewhere in the memory.

I like to see an old good  #define LEDRED (*((int*)0xC02200A0)) instead of just using 0xC02200A0 everywhere in the code.


 

Related Topics