DEV Community

A Story About Pluralization In Code (2 Items vs 2 Boxes)

John Eliud Odhiambo on January 05, 2026

I was building a small console application. A simple cart. It was nothing fancy but a chance to experiment with input, calculations, and formatted ...
Collapse
 
frickingruvin profile image
Doug Wilson

This was a sleeper. I didn't expect much from it. Boy, was I wrong! Nice, simple idea that builds and reveals its hidden complexity in ways that are generally applicable. Really well done. Thanks! More please!

Collapse
 
johneliud profile image
John Eliud Odhiambo

Thank you very much. I appreciate your time in reading this, and I am grateful to know you loved it. Stay tuned for more.

Collapse
 
kevwasonga profile image
Kevin Wasonga

This is the kind of article that quietly makes you feel like a better developer after reading it.

Collapse
 
johneliud profile image
John Eliud Odhiambo

Thank you very much. I appreciate sparing your time to go through this. I am glad to know the article resonates with you.

Collapse
 
sloan profile image
Sloan the DEV Moderator

We loved your post so we shared it on social.

Keep up the great work!

Collapse
 
johneliud profile image
John Eliud Odhiambo • Edited

Thank you very much. I appreciate your time to go through this and to the extent of even sharing it to a larger audience on your page. It means a lot.

Collapse
 
dashaun profile image
DaShaun

I loved where this was going! I really enjoyed when you brought in the LLM. I thought I knew where you would end up, but I was wrong.

Why not use Redis, to capture your pluralizations?

Low latency, no duplication, still have control.

A local LLM or even SLM could be used also!

Thank you so much for writing this up! Keep up the good work!

Collapse
 
johneliud profile image
John Eliud Odhiambo

Thank you very much. I appreciate you reading this and glad you enjoyed it.

Collapse
 
acessays profile image
Anna

I love how this highlights the little details that make code feel polished! Pluralization seems small, but it really improves user experience and readability. Thanks for sharing these practical insights!

Collapse
 
johneliud profile image
John Eliud Odhiambo

Thank you very much. I appreciate your time to go through this and your insights as well.

Collapse
 
abdullah_abdulraheem_58ee profile image
Abdullah Abdulraheem

This is really helpful.

Collapse
 
johneliud profile image
John Eliud Odhiambo

Thank you very much. I appreciate your time to go through this and glad you liked it.

Collapse
 
oxtimilehin profile image
Oluwatimilehin Awoniyi • Edited

Technically funny 😁

Collapse
 
johneliud profile image
John Eliud Odhiambo

Thank you very much. I appreciate your time to read the article and leave a comment.

Collapse
 
victor_webdev profile image
Victor

Good one. This is quite refreshing. I am not a dev yet, but I was able to read your solution clearly and understand 100%.

Collapse
 
johneliud profile image
John Eliud Odhiambo • Edited

Thank you very much. I appreciate your time to go through this and glad you found it easy to understand despite not having a technical background.