lbfm-rwth / GaussParallel

https://lbfm-rwth.github.io/GaussParallel/
GNU General Public License v2.0
2 stars 5 forks source link

Beautify our code #176

Open emmakatherina opened 5 years ago

emmakatherina commented 5 years ago

I suggest that we spend a little time on cleaning up our code, because even though it works pretty well it should also be "pleasant to look at" (as stated in https://www.itworld.com/article/2900311/quality-is-line-one-8-characteristics-of-good-software-code.html#slide6).

The points that I see are restructuring our help functions (especially those in gap/main.g and gap/dependencies.g) and unifying our spacing. We should also extend the names of the one-letter variables in gap/main.g (while keeping the references to the paper!).

When I am talking about unifying our spacings I am thinking about things like to following: for k in [ a .. b ] do, for k in [a .. b] do and for k in [a..b] are three different versions of the same command. Ths makes it more difficult to change the start value from a to c in numerous places, because one has to search and replace [ a, [a.. and [ a. And it doesn't look nice. For widely used programming language there are so-called beautifiers or formatters. After a quick google search I believe that nothing of this sort exists for gap.

Is there a standard that describes what gap code should look like?

ssiccha commented 5 years ago

I agree with you 100%. Let's wait with this issue until we get milestone 0.2 done. Once we've got that we should be able to completely merge the parallel and sequential code paths. Then we should revisit this issue and make a list of things we want to clean up.

ssiccha commented 5 years ago

Re code formatting guidelines: https://github.com/gapdays/gap-sage-days2016/wiki/Code-formatting-recommendations To break overlong lines I use https://www.python.org/dev/peps/pep-0008/ That wiki page is a bit hidden since it wasn't finished and thus didn't make it into the GAP wiki. When I have a few minutes I'll

ssiccha commented 5 years ago

@emmakatherina We have merged the sequential and parallel code paths. Would you want to make a todo list with formatting things that still need to be improved?