Friday, June 2, 2023

Files, Unit Tests, Macros, Interface


 

- As mention on previous post from now on all things will be on files. Only a few things will be debated and  updates to files will be refereed.

- Unit tests are a new thing and it should be present on any professional code, if you don't have unit tests your code is very limited. The explanation for Unit tests is very simple is a function to call another function to make tests : string_copy() , ut_string_copy(), 2º should call 1º. Is so simple don't know why people don't adopt it. Prefer to search for bugs which will take a lot of time.

- macros The header files are mainly for macros, which as is explained by professionals is not .c it have other type of rules. It resume C code in to a more mathematical form.

- interface found! this very nice code for the interface. is simple and very professional. It will be in the interface.c. It can be used on small projects .

- Since will be adding and working width the files will explain them in here.


Files: (just overview)

Macros.h (many things are macros .h and not .c code. people confound pre processor and C rules)
general_manipulation.c (the code in one library, so we can edit and make improvements to code)
standard_variables.c (separation of variables, it could be in general manipulation but if you don't need any of that functions, is ready to use to another file like in OOP)
str.c (rules for the str files, if you need another is separeted)
db.c (db functions)
css.c (rules for css)
progs_learn.c (prog examples to learn)
definitions.c (separate definitions in to one file to make more manipulation)
ut_general_manipulation.c (unit tests for general manipulation
interface.c (interface parts, width code)
the_box.c (the box functions).

Ps: time limitations prevent to add all things will be just the interface and unit tests.

No comments:

Post a Comment

hi

Rules

Rules, Steps & methods This is the current way to implement and be implemented but there could be more things to add : Root or loader  (...