A story for the phone-number exercise

Introduction

You’ve joined LinkLine, a messaging platform aiming to connect people effortlessly. The platform faces a big challenge: users enter phone numbers in all sorts of formats — dashes, spaces, parentheses, and even prefixes. Some numbers are valid, while others are impossible to use.

Your mission is to turn this chaos into order. You’ll clean up valid numbers, formatting them appropriately. At the same time, you’ll identify and filter out any invalid entries.

The success of LinkLine depends on your ability to separate the useful from the unusable. Are you ready to clean up the lines and keep the connections flowing?

2 Likes

I think the language would be simpler here without the question. “Your mission is…”

Sure, updated.

Also since you mentioned “instant messaging” that is a whole other bag of worms to get into. Let’s keep it strictly voice NANP.

The current description reads:

Clean up user-entered phone numbers so that they can be sent SMS messages.

Does “voice NANP” conflict with that?

Edit: I’ll probably opt for a simpler solution. I’m just trying to determine whether the current description conflicts with NANP.

Yeah, it does, but I have ignored it for the most part. I think bringing attention to it is the wrong way to go. The problem is that the short messaging routing rules have short codes. The message and the tests technically contradict, but I focus usually only on the NANP for voice calls. (Fax and data being possible on those lines, but that is an aside and like the biology/genetic exercises we do not get that deep into the technical aspects.

Biology/getnetics being more complicated than telephony networks and routing, though, no doubt about that.

Ok, here’s what I’ll do for now: I’ll replace ‘formatting them for instant messaging’ with ‘formatting them appropriately.’ This way, the story will be simpler while remaining general and avoiding any confusion.

If anyone feels they can improve the first line of the instructions, please feel free to suggest changes when the PR is up.

Non-specificity allows for growth in the exercise, as well. I like it.

I like that story, too!