Introduction

It’s important not to use your real name or any personal information in your online username. In this project you’ll generate usernames that you can use on websites like Scratch.

To try out the finished project:

  • Click the girl to generate a new username;
  • When you find a username you like click on the tick to add it to the list;
  • Right-click on the username list to save your list of usernames to a file.

Step 1: Generating Usernames

There are lots of websites and apps that use a username to identify you. This username is often visible to others. Usernames can also be called screen names, gamer tags or handles.

It’s important that your user name isn’t your real name and doesn’t include personal information such as your age, year of birth or where you live. Other people will see your username so make sure it’s polite and consider what people will think about you when they read it. Remember that you might be using your username for a long time, will you still like it in three years?

As you can see, it’s important to choose your username carefully. Let’s create a Scratch project to generate AdjectiveNoun usernames like DiamondIguana.

Activity Checklist

  • Open the ‘Username Generator’ Scratch project. Your club leader will give you a copy of this project, or you can open it online at jumpto.cc/username-go.

  • You should see two lists on the stage: adjectives and nouns:

    screenshot
    screenshot
  • Click on Data and then uncheck the boxes next to adjectives and nouns to hide them.

    screenshot
    screenshot
  • Add a variable called username:

    screenshot
    screenshot
  • Uncheck the box next to the username variable to hide it from the stage:

    screenshot
    screenshot
  • Add a person sprite, you can choose which one.

    screenshot
    screenshot

    You can also click on Costumes and choose the costume that you prefer.

  • Add this code to your person sprite:

    screenshot
    screenshot
  • You need to combine an adjective and a noun. Add a join block inside your set block:

    screenshot
    screenshot
  • Add a random adjective in the first box in the join:

    screenshot
    screenshot
  • Add a random noun in the second box:

    screenshot
    screenshot
  • Now add the code to get your person to say the username:

    screenshot
    screenshot
  • Test your code by clicking on the person. You should get a new random username each time.

    screenshot
    screenshot

Save your project

Challenge: Add more variety

Can you add more items to the lists of adjectives and nouns?

Check the tickboxes for the lists to show them on the stage. Then click the + to add a new item to the list. Don’t forget to start each word with a capital letter.

screenshot
screenshot

Real and imaginary animals and creatures work well for nouns. Try to think of unusual ones.

Here are some ideas for adjectives:

  • Metals: Zinc, Copper, Iron, Brass, Silver, Gold
  • Colours: Crimson, Aqua, Magenta, Golden, Indigo
  • Gems: Quartz, Emerald, Sapphire, Diamond
  • Habitats: Moon, Desert, Snow, Jungle, Forest, Space

Remember to hide the lists from the stage when testing your project.

Save your project

Step 2: Saving Your Favourite Usernames

You probably want to consider a few different usernames. Let’s add usernames that you like to a list.

Activity Checklist

  • Create a new list called ‘names I like’:

    screenshot
    screenshot
  • The list will appear on the stage. Drag it to the right of your person and make it wider:

    screenshot
    screenshot
  • Add the tick sprite and drag the tick sprite on the stage to the right of the speech bubble:

    screenshot
    screenshot
  • Add code to the tick sprite to add the current username to ‘names I like’ when the tick is clicked:

    screenshot
    screenshot
  • Test your code by clicking on the person until you find a username you like and then clicking on the tick:

    screenshot
    screenshot
  • You can export your list of possible usernames to a text file. Right-click on the names I like list on the Stage and choose ‘Export’ ad choose a place to save (check with your volunteer if you’re not sure where to save.)

    screenshot
    screenshot

    You now have a text file containing a list of names which you can open with Notepad or another text editor.

Save your project

Challenge: Add a number

On some popular websites and apps it can be really hard to find a username that someone else hasn’t already used. You might find that the username you use on other sites is already taken. You could add a number to the end of the username. Remember not to use your age or your date or year of birth.

Can you use these blocks to generate usernames with a random number on the end.

screenshot
screenshot

Your new usernames should have numbers on the end:

screenshot
screenshot

Save your project

Challenge: Create your profile picture

Can you use the costume paint tool in Scratch to create your own profile picture to go with a username?

screenshot
screenshot

If you want to try drawing using shapes that you can move around then switch to vector mode by clicking the button on the bottom right:

screenshot
screenshot

Here’s an example:

screenshot
screenshot

You can also save your picture so you can use it on websites or apps that use a profile picture. Right-click on a costume to save it to a local file:

screenshot
screenshot

Images created in bitmap mode will be saved as ‘.png’ files. Images created in vector mode will be saved as ‘.svg’ files.

‘.png’ files are more widely used, you can switch to bitmap mode before saving to get a ‘.png’ file (undo will get you back to vector mode.)

Save your project