From fcb3ac9b02c3ed150fbf6d539613510cc83627ea Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sat, 14 Jan 2023 22:33:09 +0100 Subject: Re-organized TODO file --- TODO/refactoring.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 TODO/refactoring.md (limited to 'TODO/refactoring.md') diff --git a/TODO/refactoring.md b/TODO/refactoring.md new file mode 100644 index 0000000..eedbd20 --- /dev/null +++ b/TODO/refactoring.md @@ -0,0 +1,28 @@ +# Refactoring + +## Init functions + +* All .h files should have a single init function. +* This function should initialize everything that this module needs, including + calling the init functions of the modules it depends on. +* To avoid multiple initialization of the same module, each should have a + static bool initialized variable. +* Everything that a module needs should be initialized by init(), avoid + initializing stuff when solving. Exception: pruning tables, move tables. +* Most functions should generate some tables and save them to disk. +* Init functions should have a consistent structure (e.g. the way they check + if the tables are already generated should be the same). + +## Cube types + +* Get rid of cubetype.h, split type definitionss into the other modules. +* Every type definition should be in the most fundamental module that needs it. + +## Code style + +* Stop declaring all variables at the beginning of a function. +* Remove variable names from prototypes. +* Sort function implementations alphabetically, ignore static vs non static. +* Rename functions and variable to have a consistent naming scheme. +* Functions that copy data: swap src and dest, follow memcpy standard. +* Read style(9) and decide what to implement. -- cgit v1.3