Archive

Archive for the ‘Name generator stuff’ Category

Random name generator in Python

September 4th, 2010 Niels No comments

In this short tutorial I will show you how to make a random name generator in Python.

If you came here looking for some cool random names visit the online name generators.

The name generator script

Open IDLE which is the Python supplied IDE or editor (Go to the bottom of the post to see, how you get started with Python).

Open a new window from the file menu and write the following name generator script into this window.

def name_generator():
  import random
  color = ["Red","Blue","Black","White"]
  tool = ["Hammer","Drill","Cutter","Knife"]
  randomNumber1 = random.randrange(0,len(color))
  randomNumber2 = random.randrange(0,len(tool))
  name = color[randomNumber1] + " " + tool[randomNumber2]
  print(name)

name_generator()

(Be aware that copy-paste from the blog may give syntax errors!
 A correct indent is an important element Python syntax!)

Save it as name-generator.py.  Now you can run the python program by pressing F5.

Name generator walk through

Lets walk through the python script, line by line.

  1. In the first line we define our name generator function.
  2. Then we import the random module, so we can call the random function later on.
  3. In line define 2 arrays (color and tool) and asign values to them
  4. Then we make 2 random numbers based on the length of our arrays. The randrage() function returns an integer in the range defined by the parameters. As parameters we use 0 and the len() function to count the numbers of words in the arrays.
  5. In line 7 and 8 we make the final name and print it on the screen.
  6. Finally we call the name generator function, we have just written.

That’s all it takes to make a simple Python random name generator. When you this basic functionality it’s easy to experiment and develop the random name generator to suit your needs and wishes.

Name generator inspiration

For inspiration visit the name generators where you can find a lot of name generators in several genres. From random names over fantasy and nicknames to band and business names.

Python Beginner guides and tutorials

Python is a free scripting language running on all platforms from Linux to Windows. Python is a relative easy programming language and a name generator is a simple application so it’s a good place to start if you wanna learn some programming.

If you haven’t Python installed at your computer you can download it at Python.org. This name generator script is based on python 3.12, which is the newest stable version at the moment.

At python.org you can find an excellent Python tutorial. And you can find much more about how to use the Random function in Python.

Or visit this beginner guide to Python which contains lots of links and resources.

Name randomizer

August 20th, 2010 Niels No comments

When people think of a name randomizer, they usually mean 1 out of 3.

  1. A random name generator. A  program that makes random names from scratch
  2. A  small app that choose random names from a list. Could be a “choose student to answer a question” radomizer
  3. A application that take the names from a known group of people and randomize the output from a known input

In this post I’ll show you how you make all of these 3 different kinds of name randomizers. It’s quite easy, and you can found both tutorials and  download name randomizer scripts here at my blog. Just keep reading.

1. The random name generator

The first example of a name randomizer is the classic random name generator. The random name generator takes a bunch of names, mix them all together and randomize the output. At my name generators web site you can find a lot of different classic name generators in a whole lot of categories.

If you wanna make your own a name generator take a look at this description of  how you make a name generator. Or download my complete name generator script. It’s thoroughly commented and described and therefor very easy to adjust to your own likings and ideas.

2. Choose a random student

If you want a name randomizer that pick a student from a list, you need another sort of random application. In this JavaScript tutorial: choose a random person, I guide you through the process of how you make your own name randomizer, you can use for choosing students for questions.

This randomizer tutorial was made for a teacher, who needed an application to choose a random student from a list. In the blog post you can also find a choose student script ready for download. You just need to add the names of your students.

3. Randomize known or famous names

This is basically the same as the the classic name generator. The only different is the content you choose to fill in the the arrays or name list.

You can make a guitarist name generator by using the names from world famous guitarist, or what about a dictator name generator, a politician name generator. Or could make a script that randomize the names of all the guest to your next big party. That could be fun. Sky is the limit. ;)

It’s very easy to do. Just grab my name generator script, read the how to (check the first item in this list)  and add you own names and ideas.

Your name randomizer

As always. If you make a cool randomizer, application or other online gadget throw a comment and tell me and the world about it. :)

Band name widget

July 23rd, 2010 Niels No comments

Band name widget at Australian band site entertainya

I was contacted by Aladdin from the  Australian band site entertainya. Aladdin wanted a band name  widget to spice up entertainya.com.au.

Alladin wrote:
My Name is Aladdin, I run and own an Australian online music and entertainment called entertainya. I have been on the hunt for something fresh and exciting to add to my site as i have 1000′s of musicians browsing everyday.
I came across your project and would love for you to consider allowing me to integrate your band name generator onto my site.

I thought the idea sounded exiting and started to develop a band name widget. The band name widget gave the idea to make a free  name generator widget.

Band name generator

The band name generator  widget is a  full copy of the band name generator. Same amount of band name combinations and with a 100%  functionality.

You can see the band widget and how seamless  it integrates with the site.  Entertainya.com.au is based on a  joomla cms.  The band generator code is run locally on the client, so it will work with all blogs, cms as well as ordinary html pages.

Behind the band widget

The band name widget is programmed in JavaScript, HTML and CSS, and Alladin  just needed to add a single line of JavaScript to include on his website.

The widget is compressed to minimize download time, and of course follows the w3.0rg standards for proper HTML and validates as XHTML 1.1.

Do you want a cool name widget too?

Do you want a similar or other specialized cool name widget on your site, blog or  favorite forum? Check out this free name generator widget.

Are you looking for a different kind of cool name widget? Please contact me and let’s see if we can work out something.

Other ways to get a name generator

How to make a name generator

Name generator script

Name generator widget

July 12th, 2010 Niels 4 comments

I continue to give away stuff.  This time it’s a name generator widget.

The name generator widget integrates seamlessly with the web site. The widget contains all the necessary code to run very easily on a web page. Just add a single line of code to your page.

The name generator widget makes code names, that can be used in various ways.  Use the  widget to make code names for bands, projects, blog names etc.

See how the widget works at my sidebar. —–>

How to install the widget

Just insert this line of simple  code, where you want the  name generator to run, and you got a fully functional name generator on your site.

<script type=”text/javascript” src=”http://name-generators.com/widgets/name-generator-widget-beta.js”></script>

The widget takes care of the rest. From name generation to styling.

How to customize the name widget.

Use firebug or other developer tool to see the unique id’s and classes on  all elements.  Just add these to your style sheet with the styles you want. In this way it’s easy to add background images or cool buttons to the widget.

Name widget specs

The widget is programmed in JavaScript. It is minified to minimize the load time for your users.

The name widget  works crossbrowser. It is tested in Firefox, Internet Explorer 7+8, Opera and Chrome.

It follows the XHTML standarad set by the w3.org and validate as XHTML 1.1.

Do you want another name widget?

Do you want a business, superhero or maybe a fantasy name widget on your site, blog or  favorite forum?

Please contact me and let’s see if we can work out something. I’m always interested in some serious text link cooperation. ;)

For another working example check this band name generator widget.

Other free name generator stuff

Also remember to check out the:

How to make a name generator

Name generator script

Talk like a pirate day 2010

June 27th, 2010 Niels No comments

We are rapidly closing in on talk like a pirate day in 2010. In 2010 is will be 17′th celebration of the talk like pirate day.

As usually the annual pirate day is held on September the19′th . In 2010 it on a Sunday.  So again this year we got to celebrate the talk like a pirate day away from the office. But hey. When you got a cool family it’s OK. My Sons are 12 and 14 so it’s about time, that the get a closer knowledge of the more adult and humoristic approach to  pirate talk, pirate life and pirate names.

Talk like a pirate resources

Talk like a pirate day website. The official talk like a pirate day homepage. Talk like a pirate day was started by John Baur and Mark Summers  in 1995. In 7 years they were pretty much the only nerds in the world celebrating the annual talk like a pirate day. Today we are many more.

Pirate name generator. Can’t go through the pirate day without a cool pirate name. The pirate name generator uses old pirate expressions and pirate names to generate genuine pirate names. I just gave the pirate name generator a major brush up to make it ready for the talk like a pirate 2011.

Pirate dictionary. If you wanna talk like a real one, you can’t avoid the pirate dictionary.

Pirate day on facebook. Well of course pirate day also got a fan side on facebook. Over 7000 members have joined the group today and the group is rapidly growing.

Now you should be ready to have a cool and groovy talk like a pirate day 2010. Have a fantastic day. :)

Name generator script

May 11th, 2010 Niels 1 comment

I have made a  complete name generator script to download and use as your own. The script contains a full functional HTML page with all necessary JavaScript code, HTML and CSS, and can be run in any browser.

The name generator script is a complete do-it-yourself name generator! Ready to run with or without changes. The script is a simplified version one of the one I use at all my name generators.

The script is thoroughly explained and commented in the download file. So it is very easy  to work with for everybody, even for beginners to web programming. If you like further explanation on how the script works visit my How to make a name generator tutorial, where i you through a only slightly more simple generator script.

To get up and running just download the script, change the text and change the word arrays to your likings.  And you got yourself your own personal name generator.

How to use the name generator script

Getting started

Download the name-generator-script.zip.

Or just visit the name generator script demo, right click the page. Select view source. Copy the source to a text-editor.
Save is at generator.html.

How to run it

It’s easy. Just open the html file with your favorite browser.

How to edit it

To edit this page open it with a text editor with syntax highlighting. I’ll strongly recommend notepadd++ a free, fast and flexible text editor, I also use myself.

Name Generator FAQ

No one yet. Guess the code must be  self-explanatory. ;)   Well seriously… if you need help just ask your questions below. I’ll try my best to help you.

How to get visitors on your new name generator

If you make a cool name generator, I might wanna make a review of it. Just write a comment and I’ll look into it.

How to make a name generator

May 8th, 2010 Niels 2 comments

In this tutorial I’ll show how to make a simple name generator. A sort of  “build your own name generator” to experiment with. You just need to add your own word lists and you’re up and running.  But you can expand and modify the  name generator code to your own likings and abilities.

The name generator tutorial is very simple and are aimed at absolute beginners in web programming.

But enough talk, here is some name generator code that makes superhero names:

function generator(){
  // Add your own words to the wordlist. Be carefull to obey the showed syntax
  var adjectives = ["Cool","Masked","Bloody","Lame"]
  var animals = ["Hamster","Moose","Lama","Duck"]

  // Random numbers are made
  var randomNumber1 = parseInt(Math.random() * adjectives.length);
  var randomNumber2 = parseInt(Math.random() * animals.length);
  var name = adjectives[randomNumber1] + " " + animals[randomNumber2];

  alert(name); //Delete this when the below works            

  //If there's already a name it is removed  
  if(document.getElementById("result")){
    document.getElementById("placeholder").removeChild(document.getElementById("result"));
  }
  // A div element is created to show the generated name.
  //The Name is added as a textnode. Textnode is added to the placeholder.
  var element = document.createElement("div");
  element.setAttribute("id", "result");
  element.appendChild(document.createTextNode(name));
  document.getElementById("placeholder").appendChild(element);
}

The script is a simplified version of the one I use to make superhero names with my superhero generator.

The name generator piece by piece

The arrays

The most important part of  the name generator is the word lists. The more words in the list the more variety in the output. So the first part to do is to create a couple of arrays holding all our cool words:

var adjectives = ["cool","masked","bloody","lame"];
var animals = ["hamster","moose","lama","duck"]

To retrieve data  from the list we call the name of array with the count of the word as a parameter in a square bracket.  Be aware that counting in programming almost always starts at zero and not at 1.

So adjectives[0] is cool and  animals[1] gives moose

Randomness

We of course want random names, so we need to replace the hard coded numbers with random numbers. In our case numbers between 0 and 3 because we have 4 words in our lists. Instead of counting the words ourself, we do that we let the JavaScript length function do the counting. Then we multiply it with a random floating-point number between 0 and 0.9999999999999. Finally we use the parseInt funktion to make the floating-point number into a integer.

All sounds a bit complicated but code wise  it’s  quite easy.

randomNumber1 = parseInt(Math.random() * adjectives.length);
randomNumber2 = parseInt(Math.random() * animals.length);

The output

The most simple way to output the name is using the alert function. I use it only to check the generated name cause,  the alert box is  very annoying. So just delete the line, when the code below is up an running.

We will use 7 extra lines to integrate the result into the web page in a more natural way.

But before we begin you need to make an empty div tag in your HTML:

<div id=”placeholder”></div>

And here are the 7 lines that write the result in the page..

if(document.getElementById("result")){
  document.getElementById("placeholder").removeChild(document.getElementById("result"));
}

element = document.createElement("div");
element.setAttribute("id", "result");
element.appendChild(document.createTextNode(name));
document.getElementById("placeholder").appendChild(element);

In short it works like this:

  1. If there’s already a result it is removed
  2. Then a new div element to hold the result  is created
  3. The name is added as a text node
  4. Finally the element is appended to a placeholder in the HTML.

When this part works, you can delete the alert(name) from the script.

Putting it all together

The generator function can either be included in the head of the HTML document or you can place it in a external JavaScript file.

Now you can call the function from your HTML page.  I always do it 2 places. First in the body tag with an onload event. The generator function then also runs when the page is loaded.

<body onload=”generator()”>

And then I also call the JavaScript function on a button:

<input type=”button” onclick=”generator()” />

Download the name generator script

Download name generator script here and read the description of how to make the name generator script work.

Want a review of your name generator?

Write a comment if  you make a cool name generator with this script. I might very well  write a review of it.  :)

Also remember to visit my name generators to see  how I make superhero names with the superhero generator.

Blog name generator

April 10th, 2010 Niels 1 comment

A friend of mine suggested that I made a blog name generator. Why? I already have a great blog name generator.  ;)

Code Name – Blog Name Generator?

No reason to start all over. The  Code and Blog Name Generator makes cool  ideas for blog names.  By design it of course is originally a code name creator, but  the results is useful in a wide variety of areas. And many of the generated code names would also work great as blog names. What would you say to blog names like:

  • Rough Heart
  • Scarlet Moving Pens
  • Autumn Confidential
  • Subtle Knife

I think they could be pretty cool blog names. So from today instead of  reinventing the wheel, I simply claim the code generator to also be a Blog Name Generator.

Making names

The names are made by 2 and 3 word combinations from word list specially chosen for making code names. Words with lots of  meaning a strong ability of creating  images. The results is powerful, inspiring and creative code and cool blog names.

An algorithmic program gives variation and up to 5 million different code or blog names.

Whats in a good blog name

Well it really depends on the he subject of the blog and the personalty of the blogger. But a good blog name could be

  • describing for the content of articles and subjects
  • content important keywords
  • memorable
  • catchy and cool

A blog name generator can’t do much for you if you’re looking for specific and descriptive title like the title of my blog. But if you’re looking for catchy, cool, funny, subtle or humorous names a blog name generator can help you in the process.

Idea generator

Don’t expect too much. A name generator is basically an idea generator. It does not necessarily make the perfect names. A simple artificial intelligence of a rather simple script don’t get the subtle meanings in certain word combinations. And it’s often  the subtle nuances and meanings that separates the good blog name from the bad one.

The strength of a generator is that it can come up with endless combinations, cool ideas and a lot of suggestions.

You just have to take the good ideas and form them into you personal blog name.

Go to the Code and Blog Name Generator.

Make your own blog name generator

If you are not happy to use the code name generator as a solution, it has never been easier to make you own blog name generator. You just have to download the full functional name generator script, and add you own word lists.

In a  few minutes you can have a simple blog name generator up and running. And if you put a little more work into it, you can very easily make a full blown blog name generator.

Better vampire names

March 28th, 2010 Niels No comments

I have made a major update to the vampire names generator. It was one of my first name generators, so it needed a serious overhaul. The vampire names was generally too long and needed so serious tightening up.

Try the better vampire names.

More and better names

I have increased the number of names. I have recycled the fantasy names with the most East European sound and feel. And i have added both new vampire names for girls and boys.  In return some of the least suited boys and girls vampire names also has been removed.

The effect of the increased numbers of name is many more possible unique name combinations. And the effect of the added fantasy names is more mystic, cryptic and devious vampire names.

Changed algorithms

I have also changed the algorithms of the generator. The names are now shorter and more powerful. Also the variation in names has increased because of  more complex random algorithms.

Overall the consequence is much cooler and better vampire names.

Vampire background

Finally I have also added a few new links to other vampire resources and updated the articles with some vampire background and history.

Bad vampire names?

And the usual disclaimer. I still make bad names. Sorry but I have to take chances to surprise. Bear with me and just generate a bunch of vampire names and only choose the best ones.

Go and get the new and improved vampire names!

Categories: Name generator stuff Tags: ,

Alternative use of name generators

March 19th, 2010 Niels No comments

Spicing things up with a name generator

In  this article by the Dutch photographer Michael Van der Tol: photographic project names,  he gives ideas for alternative uses of name generators. He tells about the slump you often get into. Things get uninspired and you often end up doing the same things over and over again.

You need new inputs to get new ideas. Use a project name generator to generate ideas for new exiting photographically projects.

Michael Vander Tol:

If you’re like me the project rarely comes before the photographs; and actually, the project title comes last. So I’m proposing you mix things up a bit and start with the project title.

Generate ideas and names for writing

Inspired by Michael van der Tools idea we  can also use name generators to generate ideas for writing. Ideas to use for novels, essay, short stories etc.

What about letting “yellow foot” be the secret code name of a military operation of  “alpha beat” could be the name of upcoming pop group, or the state of the first hearts beats after a time travel in a science fiction short story.

(“yellow foot” is the project name for user interface using the Summa search engine.  “alpha beat” is the  name of an upcoming pop group ;)  not generated by the project name generator, but might as well been)

T-shirts and cool names

Another alternative use of cool names would be as a t-shirt text. Strange t-shirt text are usually some cool icebreakers in many contexts.

Opportunities are abundant.