Skip to content

3.5 Redundancy and duplication in code should be avoided -- rewording suggestion #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
airbr opened this issue Apr 5, 2025 · 3 comments
Assignees
Labels
taskforce-webdev This issue affects the web development taskforce. technical Corrections, bugs, or minor omissions

Comments

@airbr
Copy link
Member

airbr commented Apr 5, 2025

RE Guideline 3.5 Redundancy and duplication in code should be avoided: https://w3c.github.io/sustainableweb-wsg/#redundancy-and-duplication-in-code-should-be-avoided and criterion https://w3c.github.io/sustainableweb-wsg/star.html#WD05-3 .

My suggestion is that we do not need to name a specific methodology in the guideline

Within CSS and JavaScript, use methodologies (like BEM) and systems like DRY and WET to optimize the arrangement and output of your source code.

Could become:

Within CSS and JavaScript, use an organizing methodology and systems like DRY and WET to optimize the arrangement and output of your source code.

Or "use organizing methodologies" alternatively.

This change suggestion was inspired to me from a few observations:

  1. It seems more appropriate for the success criterion and as an example rather than given full guideline weight
  2. There is some reasonable debate about BEM in some places. I know of variations to BEM, and considerable back and forth discussion about BEM and other methodologies. Even if its featured strongly as an example it might make sense to change the guideline and leave the success criterion as an example with BEM rather than specific guideline to be "like BEM".
  3. Per @andreadavanzo - It makes sense to be agnostic to specific methodologies, generally speaking
@AlexDawsonUK
Copy link
Member

I disagree strongly with the removal of the other two SC's.

  • The SC for removal of unused or dead code is aimed at cleaning out code which is not in use and thereby is safe to remove.
  • The SC labeled "Remove Or Simplify" is aimed at optimizing a codebase (so is in use but could be written better to be more efficient; also asks people to consider if features are actually necessary.
  • The SC labeled "Iteration Over Recreation" is about how a product is developed and has impacts RE prior to deployment (code creation).

While there may be a relationship between them (which is why they are under the same guideline), they cover very different things and have different impact parameters that need to be addressed.

@andreadavanzo
Copy link

Ok. Comment removed

@AlexDawsonUK AlexDawsonUK added technical Corrections, bugs, or minor omissions taskforce-webdev This issue affects the web development taskforce. labels Apr 5, 2025
@AlexDawsonUK AlexDawsonUK moved this to In Progress in WSG Roadmap Apr 5, 2025
AlexDawsonUK added a commit to AlexDawsonUK/sustainableweb-wsg that referenced this issue Apr 18, 2025
@AlexDawsonUK
Copy link
Member

AlexDawsonUK commented Apr 18, 2025

Agreed (RE the changing of the Success Criteria wording).

An update for this has been deployed with the latest pull request.

@AlexDawsonUK AlexDawsonUK self-assigned this Apr 18, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in WSG Roadmap Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
taskforce-webdev This issue affects the web development taskforce. technical Corrections, bugs, or minor omissions
Projects
Status: Done
Development

No branches or pull requests

3 participants