DNAnalyzer icon indicating copy to clipboard operation
DNAnalyzer copied to clipboard

Refactor Properties.isRandomDNA(String)

Open VerisimilitudeX opened this issue 2 years ago â€ĸ 9 comments

I've selected Properties.isRandomDNA(String) for refactoring, which is a unit of 12 lines of code and 5 branch points. Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Simple Units of Code guideline rating! 👍

Here's the gist of this guideline:

  • Definition 📖 Limit the number of branch points (if, for, while, etc.) per unit to 4.
  • Why❓ Keeping the number of branch points low makes units easier to modify and test.
  • How 🔧 Split complex units with a high number of branch points into smaller and simpler ones.

You can find more info about this guideline in Building Maintainable Software. 📖


ℹī¸ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the 🔲 next to them. The risk profile below the candidates signals (✅) when it's enough! 🏁


Good luck and happy coding! :shipit: :sparkles: :100:

VerisimilitudeX avatar Oct 10 '22 21:10 VerisimilitudeX

is this issue still open?

sanjeev0210 avatar Oct 13 '22 14:10 sanjeev0210

Yes, do you want me to assign it to you?

VerisimilitudeX avatar Oct 13 '22 16:10 VerisimilitudeX

Sure I will look into it

sanjeev0210 avatar Oct 13 '22 17:10 sanjeev0210

@Verisimilitude11 I have observed that there is an exactly same issue with a PR that is rejected here why is that so?

sanjeev0210 avatar Oct 14 '22 15:10 sanjeev0210

@Verisimilitude11 I have observed that there is an exactly same issue with a PR that is rejected here why is that so?

I don't think that I rejected that PR, for me it shows that it is merged. How far are you on this issue?

VerisimilitudeX avatar Oct 24 '22 16:10 VerisimilitudeX

Issue #73 is a clone of this issue and that is already done. So does this still need a PR?

sanjeev0210 avatar Oct 29 '22 17:10 sanjeev0210

Yes, it does as that PR didn't fix the issue @sanjeev0210. Also, could you please star this repository and join our Discord server (https://discord.gg/5ShCNmyp) to support our mission? Thank you.

VerisimilitudeX avatar Oct 29 '22 21:10 VerisimilitudeX

okay! Will do

sanjeev0210 avatar Oct 30 '22 09:10 sanjeev0210

Sounds great!

VerisimilitudeX avatar Oct 30 '22 16:10 VerisimilitudeX

@sanjeev0210 how far are you on this issue?

VerisimilitudeX avatar Nov 14 '22 17:11 VerisimilitudeX

Hello @Verisimilitude11. I'm still looking into it. Will let you know once I'm done.

sanjeev0210 avatar Nov 26 '22 15:11 sanjeev0210

Sounds good @sanjeev0210.

VerisimilitudeX avatar Nov 28 '22 16:11 VerisimilitudeX

Hi there,

I hope this message finds you well. I noticed that it has been over a month since you last contributed to the DNAnalyzer project, and I wanted to check in with you to see if you are still interested in being a part of the team.

If you are still interested in working on DNAnalyzer, please let me know and we can discuss how you can get re-involved with the project. If you are no longer interested, I understand and will unassign you from the project for now. However, if you change your mind and want to get involved again in the future, please don't hesitate to reach out – I'll be happy to add you back to the team.

Thank you for your previous contributions to DNAnalyzer, and I hope to hear back from you soon.

Best, @Verisimilitude11

VerisimilitudeX avatar Dec 28 '22 05:12 VerisimilitudeX

Hello!

Thank you for the acknowledgement of my contributions. I would say that I have my plate full right now. And therefore, I would not be picking it up at the moment. But I would surely contribute to the repository once I get some time.

Thanks and Regards, Sanjeev.

sanjeev0210 avatar Jan 03 '23 16:01 sanjeev0210

You're welcome! Thank you for considering contributing to the repository. I understand that you're busy right now, so don't feel any pressure to contribute. Whenever you do have some free time and feel motivated to contribute, we would love to have your input. In the meantime, if you have any questions or need help with anything, feel free to reach out to me.

Best regards, Piyush Acharya (@Verisimilitude11)

VerisimilitudeX avatar Jan 03 '23 16:01 VerisimilitudeX

Stale issue message

github-actions[bot] avatar Mar 09 '23 18:03 github-actions[bot]

    IntStream diffs = IntStream.of(Math.abs(a - t),
                                   Math.abs(a - g),
                                   Math.abs(a - c),
                                   Math.abs(t - g),
                                   Math.abs(t - c),
                                   Math.abs(g - c));
    return diffs.allMatch(diff -> diff <= 2);

You could generate the pairwise distances programmatically too, if you'd like.

xlxs4 avatar Mar 31 '23 12:03 xlxs4

You can also do things like

"atgc".chars().map(c -> nucleotidePercentage(nucleotideCount.get(c), dna));

if you want more DRY code

xlxs4 avatar Mar 31 '23 12:03 xlxs4

Oh that's a great idea! Would it be possible for you to open a new PR for this real quick? Thanks! (Also I would really appreciate it if you could support us by starring the repository 😀)

@xlxs4

VerisimilitudeX avatar Mar 31 '23 14:03 VerisimilitudeX