Cecil Westerhof <
Ce...@decebal.nl> wrote:
> Erik Leunissen <lo...@the.footer.invalid> writes:
>
>> On 20/12/17 11:09, Cecil Westerhof wrote:
>>> I posted an article on the wiki:
>>> Get CPU Temperature Statistics
>>>
http://wiki.tcl.tk/49319
>>>
>>> I am interested what you think about it. And if I should post in a
>>> different way: let me know.
>>
>> I, for one, believe it is a really interesting purpose/application
>> for the Tcl/Tk language, certainly worth publishing onto the wiki.
>> I at least, and probably most people to whom you're publishing,
>> would like to see *the code work*.
>
> That is good to hear (or actually read).
>
>> (The) one thing blocking this ultimate mutual profit is that your
>> readers cannot make the code work because they cannot see what's
>> inside [getDB] (since they do not have access to your file
>> /usr/local/share/tcltk/utilities.tcl).
>
> It is just opening a database connection and setting the timeout. ;-)
>
>
> I will publish my utilitys.tcl on GitHub. And I will share the
> systemd service and databease.
I think Erik's point is that the code block on the wiki would be much
improved if it was self contained, exclusive of standard base modules,
and standard tcllib or tklib modules, or other well known modules (i.e..
sqlite, listbox, etc.).
I.e., try to make the wiki code blocks as close to a copy/paste/run
cycle from the wiki as possible.
For yours, this might mean including a stubbed out getdb proc that
really does nothing, but explains the intended DB format to be used,
and a stubbed out db eval that returns a couple lines of static data to
let the rest work.
That second one is more difficult, so another possibility might be to
take a sql dump of a small db and post it as well, instructing a reader
to use it to init a fake db to use to see the code itself work.