Stream: brlcad

Topic: good reads


view this post on Zulip Sean (Jul 11 2018 at 03:58):

There's a nice article here on API design: http://nullprogram.com/blog/2018/06/10/

In BRL-CAD terms, this applies to many if not all of our library subsections (e.g., each separate file with related functions in BU/BN/BG).

view this post on Zulip Cezar (Jul 16 2018 at 09:26):

there are still a lot of alloc's in bu/bn/bg/rt :-? i think 1 and 4 are pretty in line with the code base. lots of debug printing in the libs as well, but i don't see how else it could be done

view this post on Zulip Cezar (Jul 16 2018 at 09:27):

maybe with a string buffer passed as argument, which is filled by the libs and printed by the caller :-?

view this post on Zulip Sean (Jul 16 2018 at 12:37):

another good read on solving linear equations in code: http://wordsandbuttons.online/programmers_introduction_to_linear_equations.html

view this post on Zulip Sean (Jul 16 2018 at 12:39):

there are still a lot of alloc's in bu/bn/bg/rt :-? i think 1 and 4 are pretty in line with the code base. lots of debug printing in the libs as well, but i don't see how else it could be done

yes, most of the modules (at least in bu) are few functions that work on a struct (e.g., bu_vls) .. but definitely not all of them

view this post on Zulip Sean (Jul 16 2018 at 12:50):

printing is a bit of a case by case as it depends on how the message is to be read and by whom -- if it's diagnostic/debug, the pattern we've been moving towards is only printing if an environment variable is set and removing all the debug options from userland. if it's to the user, that could be a string passed in (libged does this) or an application printing callback (mged/bu does this) or better eliminated and handled higher up via return status

view this post on Zulip Daniel Rossberg (Jul 16 2018 at 17:52):

There's a nice article here on API design: http://nullprogram.com/blog/2018/06/10/

The example in (4) contradicts (2).

view this post on Zulip Sean (Jul 16 2018 at 18:11):

haha, I noticed that too -- though to his credit, he says that too in the next sentence "this is difficult to pull off when the library doesn’t allocate its own memory" ... I guess one would pass an allocator or memory buffer in the "..." of the create function

view this post on Zulip Sean (Jul 23 2018 at 19:41):

another good read: https://uselessdevblog.wordpress.com/2018/06/24/why-we-all-choose-to-not-pay-back-tech-debt/


Last updated: Oct 09 2024 at 00:44 UTC