neon-mmd / websurfx

:rocket: An open source alternative to searx which provides a modern-looking :sparkles:, lightning-fast :zap:, privacy respecting :disguised_face:, secure :lock: meta search engine
GNU Affero General Public License v3.0
706 stars 91 forks source link

:technologist: Clean code for improving readability and stability #522

Open neon-mmd opened 7 months ago

neon-mmd commented 7 months ago

What would you like to share?

Work Expected From The Issue

Improve the readability and stability of code by making the following changes listed below:

For example: In the code below, the 3.14 value is used directly. So we can move into a constant data type declaration (as shown in the code snippet below the previous one).

fn calculate_area_of_circle(radius: u32) -> f32 {
    3.14 * radius * radius
}
const PI: f32 = 3.14;

fn calculate_area_of_circle(radius: u32) -> f32 {
    PI * radius * radius
}

For more information on how making this change can stabilize function signature. See:

https://piped.video/watch?v=6c7pZYP_iIE

Reasoning Behind The Proposed Changes

The reasoning behind the following changes is to improve the readability and stability of code, which can drastically improve developer experience and avoid unintentional breaking changes.

Do you want to work on this issue?

None

Additional information

No response

github-actions[bot] commented 7 months ago

The issue has been unlocked and is now ready for dev. If you would like to work on this issue, you can comment to have it assigned to you. You can learn more in our contributing guide https://github.com/neon-mmd/websurfx/blob/rolling/CONTRIBUTING.md

github-actions[bot] commented 5 months ago

Stale issue message

github-actions[bot] commented 2 months ago

Stale issue message

github-actions[bot] commented 1 week ago

To reduce notifications, issues are locked until they are https://github.com/neon-mmd/websurfx/labels/%F0%9F%8F%81%20status%3A%20ready%20for%20dev and to be assigned. You can learn more in our contributing guide https://github.com/neon-mmd/websurfx/blob/rolling/CONTRIBUTING.md