[GNC-dev] Sample Report with Examples

flywire flywire0 at gmail.com
Fri Jan 13 17:07:56 EST 2023


John, Can you explain why the PR is a dumb idea?

Comments on customising reports normally say the process is not easy.
Getting the relationships of some of the data right can be complex but
well-presented documentation and code make it a lot easier.

Report documentation is fairly well limited to the report wiki page and
reports with source code comments. There is a simple hello-world.scm
example report specifically written to show you the base layout of a
GnuCash report.

Firstly, a Hello World program is a convention as a minimalist program to
generate hello world output. One of the features is, usually, changing the
string changes the output.

A couple of things make it confusing:

1. hello-world.scm is not a minimalist program so it fails user
expectations, but tweeking the report name would avoid that expectation

2. It is not intuitively obvious in the Reports Examples menu which report
is hello-world.scm, but Welcome to GnuCash would seem more obvious than
Sample Report with Examples

3. Search 'Hello, World' has 22 hits:

* 18 of those hits are 'Hello, World!' used as a section name? Why? It's a
complicated name making the program harder to comprehend and distingush
from output strings (let's ignore searching for the presence/absence of an
exclamation mark). Just changing it to 'Hello' would be easier to read and
make the program clearer.

* 'Hello, World' string is used three times (and in a comment): as a
string, report title, and report name. It is much easier to see what output
unique strings are associated with without even understanding the structure
of the report.

The PR changes points 2 and 3 with minimal change elsewhere.


More information about the gnucash-devel mailing list