Skip to content
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

Refactor Code to use getOrDeafult #1416

Conversation

Shubham-Vishwakarma
Copy link
Contributor

@Shubham-Vishwakarma Shubham-Vishwakarma requested a review from a team as a code owner August 28, 2021 09:45
@Shubham-Vishwakarma Shubham-Vishwakarma requested review from jo-elimu, nya-elimu and UmenR and removed request for a team August 28, 2021 09:45
Copy link
Member

@nya-elimu nya-elimu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for making this improvements. The less code, the better 🙂

Have you been able to test that the changes work properly by manually changing the CRON job time in the @Scheduled annotations?

@Shubham-Vishwakarma
Copy link
Contributor Author

Thank you for making this improvements. The less code, the better

Have you been able to test that the changes work properly by manually changing the CRON job time in the @Scheduled annotations?

@nya-elimuai
Thanks for guidance
I have tried this but running it after fixed interval and it looks good.

Just for test evidence

Before:
letterFrequencyMap: {
=2, ’=26,  =64, …=4, '=6, -=15, 0=1, 1=2, 2=1, 3=1, 4=1, 5=1, 6=1, 7=1, 8=1, 9=1, A=34, B=43, C=18, D=12, E=19, F=4, G=9, H=17, I=33, J=2, K=27, L=27, M=19, N=12, O=33, P=11, R=2, S=73, T=83, U=10, V=1, W=27, Y=9, a=914, b=137, c=232, d=489, e=1271, f=181, g=201, h=654, i=516, j=9, k=116, l=432, m=250, n=598, o=814, p=194, q=1, r=576, s=632, t=915, u=245, v=87, w=223, x=15, y=244, z=3}

After:
letterFrequencyMap: {
=2, ’=26,  =64, …=4, '=6, -=15, 0=1, 1=2, 2=1, 3=1, 4=1, 5=1, 6=1, 7=1, 8=1, 9=1, A=34, B=43, C=18, D=12, E=19, F=4, G=9, H=17, I=33, J=2, K=27, L=27, M=19, N=12, O=33, P=11, R=2, S=73, T=83, U=10, V=1, W=27, Y=9, a=914, b=137, c=232, d=489, e=1271, f=181, g=201, h=654, i=516, j=9, k=116, l=432, m=250, n=598, o=814, p=194, q=1, r=576, s=632, t=915, u=245, v=87, w=223, x=15, y=244, z=3}

The count looks same

Copy link
Member

@nya-elimu nya-elimu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Ready to be merged 👍

@Shubham-Vishwakarma Shubham-Vishwakarma merged commit 600f1c2 into elimu-ai:master Aug 30, 2021
@Shubham-Vishwakarma Shubham-Vishwakarma deleted the #1275_refactor_Use_getOrDefault_instead_of_if-else branch August 30, 2021 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants