[bt-devel] Sword++ Help

Israel israeldahl at gmail.com
Thu Sep 29 18:29:42 MST 2016


On 09/27/2016 12:58 PM, Jaak Ristioja wrote:
> Hi, Gary!
>
> I must admit, that I'm a better developer than a project lead. There are
> a number of things I've thought about which I'd want to improve, but I
> haven't approached these goals very systematically, because I've just
> reviewed and attempted to improve the code single-handedly up to this
> point. So please don't take this reply to be comprehensive. Since I'm
> limited by time, I haven't much thought about this from a project
> management perspective, but mostly from a technical viewpoint.
>
> Overall, we need to raise the level of abstraction. Sword++ currently
> looks like "C with classes": there is a lot of unsafe strcpy and pointer
> arithmetic being done, where one should rather use safer alternatives,
> e.g. use std::string, iterators, ranges etc. We should use
> std::make_unique, std::make_shared etc instead of malloc/calloc, which
> will force us to use smart pointers and eliminate most memory leaks
> right away. Using such abstractions would make the code easier much to
> understand, help find bugs etc. I think the performance loss with all of
> this is rather small if done properly. Since this is no HPC library,
> performance doesn't matter as much anyway. Foremost, the code should
> express intent.
>
> But if you want something specific to work on right now, then look at
> compiler warnings from GCC and Clang, cppcheck output. There are
> probably some analysis tools based on Clang. We should probably
> integrate with Coverity as well. Fixing these warnings will help us find
> real bugs. This might help you get started. Or you could just explore
> the code, try to comprehend it and ask yourself if it could be improved
> in any way. I've found many places where one can rewrite the code so
> that it better expresses the intent, or where one can deduplicate code,
> use some std:: classes/algorithms to replace hand-written error-prone
> code etc. Functions which return their status using char or int types.
> These should probably return bool or enum values instead. I think I
> could keep writing about similar things, but you will probably find the
> C++ Core Guidelines [1] much better written as an introductory point.
>
> I think it is too early to discuss larger architectural changes. But we
> will get to those.
>
> Many blessings,
> J
>
>   [1]: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines
>
> PS: I haven't read through the whole of [1] myself yet. ;/
>
>
> On 27.09.2016 03:41, Gary Holmlund wrote:
>> Jaak,
>>
>> I can help with sword++, but I am not sure where best to start.
>>
>> A few ideas:
>>
>> code - warnings, other specific area?
>>
>> test - maintain the "tests" area
>>
>> builds - windows and android 32 bit issues
>>
>>
>> Your thoughts?
>>
>> Gary
>>
>>
>>
>> _______________________________________________
>> bt-devel mailing list
>> bt-devel at crosswire.org
>> http://www.crosswire.org/mailman/listinfo/bt-devel
>
> _______________________________________________
> bt-devel mailing list
> bt-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/bt-devel

Hi,

Since this seems a much safer area to talk about Sword++ (I have been
lightly following the thread in the sword list which got heated at
times).  I am quite glad you are doing this!

I am quite interested in where this goes, and wanted to encourage you as
a brother to allow God to lead you in this task.  I have found
(personally) it is a great thing to let the Logos (Word, logic,
computation) lead you in programming.  Often I have found much simpler
ways of doing things when just asking for guidance.

I am not a very accomplished C++ programmer, but this is a project I am
interested in and might throw a commit in if I get some time.  I do
enjoy programming a great deal, and have been learning it for a while in
order to work on more libre software, which the SWORD project is one of
my most favorite around!

-- 
Regards




More information about the bt-devel mailing list