Looking for a mentor in code

good afternoon. I'm looking for a mentor in code. There are ready-made files, ready-made code. It is necessary to issue the code to the library. Optimize the code.

Project in github

The main principles of the project:

  • a project for school and university students
  • students should learn the basics of the C ++ language to make the simplest games (pong, snake, tetris)

Please do not scold me for placing all the code in header files. Initially, I did it for myself, and then it went - it went))) I understand that I need to rewrite.

If you share the code here (using code tags) I am sure people will share their ideas for improvement.

For what?

  1. Memory usage
  2. Execution speed
  3. Maintainability
  4. Portability

??

Does "ready made" mean "someone else's"?

What library?

file 3 needs .....
file 4 add ......
file .... do ....

Does this answer help? No?
Guess you have to

Hi, friend! I apologize for writing too short. Wrote from a mobile device. I updated the text, added links)

Hello! I have updated the text.

This ist what I see if I click on your link

This is way toooo lazy for supporting.

In my opinion starting from zero to learn C++ with this code is wayyyy toooo sophisticated

This code provides a shell to run your projects. Operating system, graphical shell - if I may say so.

So you re-invented the wheel of micropython?

No, of course)) we will blink the LED as usual :grin:

mmmm.. students are more interested in working with a handheld console than with a prototyping board. Thus, they have a finished product in their hands that needs to be programmed in such a way that the game would turn out.

needs just a PC (that you need anyway)

No, no, no... only C++, only hardcore))

https://www.codementor.io/

1 Like

Here are some superficial (sometimes opinionated) remarks I wrote down while browsing through your project, I did not look at the structure or functionality of the code.

Version control:

  • Use descriptive commit messages.
  • Do not check in local preferences like those in .DS_Store.

Code:

  • Enable all compiler warnings and extra flags like -pedantic, fix all warnings (some seem to be rather serious).
  • A comma after the last element in an initialiser list is redundant.
  • Avoid #define, use const variables instead.
  • Avoid uninformative comments like /* include */.
  • Avoid constructs like else return false; at the end of a function or method, simply return false;.
  • Be consistent when initialising variables (int x = 10; vs. int x {10};). If you have a choice, prefer the latter.
  • Use informative variables names, so not lii, but lineInterval.
  • Use size_t for array and string sizes.
  • Do not check in commented out code.
  • Be consistent with indentation (e.g., private: is not indented in one file, but it is in an other.
  • PROGMEM only works for static or global variables, check the drawLogo() method.

Thank you very much for your feedback. I will try to fix everything. :+1:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.