Computer Science

On this page you'll find projects that will help you learn about computer programming and computer science. We've just launched this new area, and have started out with a set of programming projects based on JavaScript. We like it as a way to get started with programming because all you need is a Web browser and a text editor. You'll also find projects on file compression and a cool Geometry Applet that you can use to make interactive diagrams.
We'll continue to add more Computer Science projects, so keep checking back!
In the brackets are the difficulty levels of the projects which will help u to start.

Artificial Intelligence: Teaching the Computer to Play Tic-Tac-Toe

Objective

The goal of this project is to write a JavaScript program that plays Tic-Tac-Toe. This project will take you through the steps of creating the interface for the game. You will need to take it from there and write the algorithms to create a computer opponent.

Introduction

This is an example of an intermediate programming project. You will be writing a program that allows you to play a game of Tic-Tac-Toe against the computer.

To do this project, you should already be comfortable with creating basic HTML files using a text editor. You should also be familiar with creating HTML form elements, and having them interact with JavaScript functions. If you have not done any JavaScript programming before, we suggest you start with a simpler project, like Forms and Functions: Writing a Simple Calculator Program with JavaScript or ABC's of Programming: Writing a Simple 'Alphabetizer' with JavaScript.

The Introduction will help you get started, in a step-by-step manner. If you follow the steps in the Introduction, you can gradually build up a webpage that you can use to play Tic-Tac-Toe with a friend. The experience you gain from building the two-player game will help you when you take on the challenge of programming the computer to play against you.

Here are the steps covered in the Introduction. First you will learn how to write an HTML file (webpage) that represents a Tic-Tac-Toe board. Next you will learn how to make your webpage respond to mouse clicks on the Tic-Tac-Toe board using JavaScript. Then you will learn how to update the text values of HTML elements on the fly. You will also learn how to program Tic-Tac-Toe knowledge into your program to detect when the game has been won or ended in a draw. At this point, you'll have a webpage that you can use to play Tic-Tac-Toe with a friend.

The challenge we leave you with for your project is to write the algorithms so that the computer can be your opponent instead. Can you create a computer opponent that always gives you opportunities to win? Can you improve that opponent so that it plays strongly but sometimes gives you an opportunity to win? Finally, we all know that it is possible to play a perfect game of Tic-Tac-Toe that results in a draw. Can you write an AI player that never loses?

The important HTML elements used in this project are:



Follow the Bouncing Ball: A Web Animation Project

Objective

The goal of this project is to investigate the effects of timing interval and step size on perceived animation smoothness. You will write a simple JavaScript program that will move an object around on a Web page. This project will help you create more advanced Web pages that could have any type of animation.

Introduction

This is an example of a first-time programming project. You will be writing a basic animation program that will move an object around on your computer screen, on a Web page in your browser window. The project uses JavaScript, an interpreted programming language supported by most Web browsers. You will learn how to write an HTML file containing your program, and how to load and run the file in your browser. You'll also learn how to control the motion of the object, and you will experiment with different settings to see the effect on apparent smoothness of the motion.

Preliminaries

These are things you need to know before you get started.

  1. You'll need to write your file with a text editor, which is a program that can save plain text files. The "Notepad" program that comes with Windows will do just fine. You should not use a word processing program (e.g., Word), because word processors do not save files as plain text by default.
  2. JavaScript is a programming language for web pages, so the HTML file you will be writing is like a simple web page. Here is the basic format of an HTML file:




    [Title and JavaScript functions go here.]



    [The parts you want to appear on the page go here.]


    HTML uses tags to designate various parts of the document. Tags are enclosed by the characters "<" (less-than sign) and ">" (greater-than sign). The first line is a comment, enclosed by "". Comments in an HTML file are ignored by the browser, so you can use them as notes to yourself. They can help you remember what the different parts of your program are supposed to do. You need the tag "" at the beginning. The document has two sections, a HEAD section, which contains general information about the document, and a BODY section which contains the displayed material. The HEAD section is where you would specify the title of the document, and also where you would put JavaScript functions used in the document. The end of the HEAD section is indicated by the end tag, "". Next comes the BODY section, with material that you wish to appear on the page. It is ended by the end tag "". Finally, the end of the document is indicated by the HTML end tag, "". The same pattern applies to all HTML tags: the end tag is made by adding "/" (the forward slash character) to the beginning of the corresponding start tag.

  3. For practice, try using your text editor to write a very simple HTML file like the one below. (You can write it yourself, or you can copy and paste from your browser to your text editor.)

    Hello, world!
  4. Use your text editor to save the file. Call it something like "HelloWorld.html" (when choosing a name for your file, always end the name with ".htm" or ".html").
  5. Now open your HelloWorld.html file with your browser. In your browser, use the "File" menu, and choose the option "Open..." (for Firefox, choose "Open File..."). Using the controls in the File Open dialog box that pops up, navigate to your file and select it. You should see "Hello, world!" on both the browser title bar and on the body of the page.

Getting Started with JavaScript

Now that you've succeeded with writing an HTML file and opening it with your browser, you're ready to delve into JavaScript. The following link has a step-by-step tutorial that will give you a great introduction to JavaScript programming: http://www.webteacher.com/javascript/index.html

Writing a JavaScript Animation

The rest of the Introduction will cover the pieces that you need to write an animation program in JavaScript:

  1. a function, to control the timing and placement of the image on the page,
  2. one or more HTML image objects to move on the page,
  3. a JavaScript object (that is, a way to refer to the HTML object(s) in JavaScript), and
  4. a timer, to update the page at regular intervals.
Once you have put all these together, you will be able to start exploring how changing the settings affects the appearance of the animation.

A JavaScript Function

As you learned in the tutorial, JavaScript uses functions. Functions can do nearly anything you want them to do. Your function will contain code that will run your animation. A function in JavaScript looks like this:
// This is an example of a single-line JavaScript comment.
// Below is an example of a multi-line JavaScript comment.
/* This function doesn't do anything useful yet,
but we will add code later to make it work.

function myFunction()
{
/* Your animation code will go here */
}

Here is how to put the JavaScript function into an HTML file. The function is included in the section of the HTML file, like this:

My Page

An HTML Image Object

Your function will need an object to animate. For this example, we will keep it simple. We will use a ball as an object. To get your object, right click on the red ball (below), and do a "Save As..." Save the ball image as ball1.gif, in the same directory as your HTML file. (Note: if you choose a different filename, you will also have to change the name in the HTML tag, below.) Here is the ball image for you to save:

SCRIPTThe

Now you can write JavaScript code inside the script section. Let's start by creating the function we will call whenever a button is clicked:

function squareclicked(square)
// squareclicked is a function that is called whenever a button is clicked.
{
}

These four lines create a function that will do nothing. The first line is a comment. It summarizes what the function does. The function is named "squareclicked," and it has one argument, "square." The argument will be used to tell the function which button has been clicked. This means you need to update your buttons to call the squareclicked() function:



Notice how "this" is being sent whenever we call the squareclicked() function. When you put "this" inside an onclick attribute it represents the that the onclick attribute is created in. This means that whenever a button is clicked it will call the squareclicked() function and pass itself to the function. This will enable you to set the value of the square. Now update the squareclicked() function to set the value of the button:

function squareclicked(square)
// squareclicked is a function that is called whenever a button is clicked.
{
square.value = 'X';
}

Jackpot! Now whenever a button is clicked it gets the value 'X'. The next step is to put the right value in the square based on whose turn it is.

  • Alternating turns. In order to alternate turns and place the right value in the square that is clicked we will need to keep track of whose turn it is. You can do this by creating a "global" variable (a global variable can be accessed from any function) in the JavaScript section outside of the squareclicked() function, like this:

  • image of a red ball

    Now we will add the ball to your HTML file by inserting the following text just after :

    Save your HTML file and open it in the Web browser. You should see the little red ball on your Web page. The ball should be 10 pixels wide. It should be located 200 pixels from the top of the Web page and 200 pixels from the left edge of the page. You can try changing the way your ball looks by changing the value of left, top, width, and height. For example, if you want a bigger ball, you can change the width and height from 10 to 50. Prove to yourself that it works. Try changing some of these values, saving the HTML file, and opening the file in a browser.

    An Object in JavaScript

    The object from step 2 is an HTML image object. We need to be able to use this object in JavaScript, so we have to create a JavaScript variable to represent the ball. Add this variable on the line before myFunction.

    var myBall;

    The statement above creates the variable, next we have to assign a value to the variable. That is, we have to tell JavaScript that myBall should represent the HTML object "ball." To do this, we use a built-in JavaScript object called document. We can use document to get an HTML object by its ID. To do this, replace the last line you added with:

    var myBall = document.getElementById("ball");

    This line tells JavaScript to look in the HTML document and find the object, or element, with the ID "ball," and assign it to the JavaScript variable myBall. You will notice in the HTML our ball has the ID of "ball." Now JavaScript knows about the ball in the Web page.

    The Time

    Animation requires that we change something on an interval. For example, we may want to change the position of the ball every five seconds, or change the color every ten seconds. We will tell JavaScript to call our function, on an interval so we can change something. To accomplish this add the following call to the built-in JavaScript method, "setInterval" (add this line before the code for myFunction()):

    setInterval("myFunction()", 200);

    This line tells JavaScript to run myFunction every 200 milliseconds. Right now, myFunction does not do anything. So let's add animation code to myFunction.

    Writing a Simple Animation Function in JavaScript

    For the first animation example, we will have the ball keep moving down the screen. First we need another variable to keep track of our current location. Add this variable after the myBall variable:

    var loc = 200;

    Add this code between the braces of myFunction:

    loc += 10; // This adds 10 to the value of loc
    myBall.style.top= loc; // This moves the ball

    In this case we are changing one of the properties of the ball. The property is style.top. We can change this property to make the ball move up or down.

    Now save your HTML file, and open it in your Web browser. You should see your ball keep moving down the screen. You have just created an animated Web page! If your page is not working, here is the entire HTML file:
    My Page

    Improving the Animation Function: A Bouncing Ball

    Just having a ball move down of you Web page may not be very exciting. We can make the ball move up and down by using a variable to determine the direction the ball is moving. Once it reaches an upper limit or a lower limit, we will make it turn around. Add the variable direction to the line above myFunction:

    var direction = 0;

    We will use this variable called direction so we know which way the ball is moving. 0 means the ball is moving down, and 1 means the ball is moving up. Try replacing myFunction with this new myFunction (to keep your previous work, save the HTML file with a new name):

    function myFunction()
    {
    if(0 == direction)
    {
    /* move down */
    loc += 10;

    if(loc >= 500)
    {
    /* reached lower limit, change direction */
    direction = 1;
    }
    }
    else
    {
    /* move up */
    loc -= 10;

    if(loc < direction =" 0;" top =" loc;">

    Going Further

    The goal of this project is to determine the best settings for the timer interval and ball step size in order to produce the smoothest animation. You can make the project even better by going further with your investigation of animation. The Variations section, below, has some suggestions to get you thinking.

    Note for JavaScript files with Internet Explorer:
    If you experience difficulty running your JavaScript code in Internet Explorer, we strongly suggest that you install the Firefox web browser and use it instead of Internet Explorer. For more information or to download the Firefox installer, see: http://www.mozilla.com/firefox/.

    If you want to continue to use Internet Explorer, try adding the following line at the beginning of your file:

    This line will cause Internet Explorer to run your file according to the security rules for the Internet zone on your computer. In our experience this may work, or it may not. For more information see: http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/overview/motw.asp and http://www.phdcc.com/xpsp2.htm.

    Terms, Concepts and Questions to Start Background Research

    To write a simple program in JavaScript, you should do research that enables you to understand the following terms and concepts:

    • HTML concepts:
      • start tags and end tags,
      • comments,
      • the section,
      • the
      • How about making it even more realistic, and have it lose some height with each bounce, and eventually stop?
      • For a multiple image animation, you could try animating a stick figure. From your ball animation you may have an idea how much an arm or leg should move with each time step, and what the time interval should be. Try it and see if the motion looks realistic!
      • For a fairly advanced animation, how about two stick figures bouncing the ball back and forth between them?
      • Another idea would be to try to relate your findings to the human visual system. What is the typical frame rate for displaying movies on a screen? How does this relate to the best timer intervals for your animation? Can you think of ways to measure visual response times? Persistence of vision? Computer monitor response times?

    How Fast is Your Computer?

    Objective
    The goal of this project is to compare how long it takes to perform various mathematical operations with different variable types.

    Introduction
    Computer technology keeps advancing at an amazing pace. Today's home computers have more memory, run faster and are relatively less expensive than computers from ten or even five years ago. Is there a way to measure how fast your computer is? You might think that you could tell simply from the processor clock frequency, but this doesn't tell the whole story. The clock frequency just tells how many operations per second the CPU can perform. In modern multi-tasking operating systems, the CPU's time is split between many programs running at once. Also, the central processor (CPU) sends data to and receives data from other subsystems on the computer (e.g., memory, disk drives, video display) which usually run at slower speeds. Modern processors are equipped with high-speed data buffers (called caches) to alleviate these bottlenecks. There are also many strategies for optimizing the order of operations in a program for greatest efficiency.

    In this project you will use a Java applet (see Experimental Procedure, below) to measure how long it takes for the computer to perform arithmetic operations (addition, subtraction, multiplication and division) with various data types (integers, long integers, floating point numbers and double-precision floating point numbers).

    Measuring how long an operation takes provides useful information, both for optimizing algorithm performance, and also as a "benchmark" comparison between two computers. However, you must keep in mind that with today's multi-tasking operating systems, measuring the execution time of any single process is difficult. The operating system splits CPU time between all of the programs that are running. No program has "exclusive" access to the CPU. Generally, CPU processing speed is fast enough so that you don't notice this because programs appear to be instantly responsive. Behind the scenes though, each program is getting a slice of CPU time, then waiting for its next turn before it can run again.

    So it is important to remember that, due to multi-tasking, the processing times you measure with the applet below will not represent the actual CPU time required to perform an addition or subtraction. In order for the applet to give you a best estimate, keep the number of open applications to a minimum, and make sure that any open applications are not performing tasks that require lots of CPU time (e.g., printing files or downloading content from the Internet).

    How the Timing Applet Works
    The applet works by repeating the arithmetic operations within two nested loops. In the inner loop, the program steps through an array (of the chosen data type: int, long, float or double) of 10,000 elements. The chosen operation (addition, subtraction, multiplication or division) is performed by pairing array elements: one counter (index "j", in the code snippet below) starts at the beginning of the array and counts up, the other (index "k" in the code snippet below) starts at the end of the array and counts down. Thus, the inner loop performs the chosen operation 10,000 times.
    The outer loop (index "i" in the code snippet below) counts how many times the inner loop should be executed. The default choice is 10,000 times, which means that the arithmetic operation will be performed 10,0000 × 10,000 or 108 times.
    The time it takes to execute these two nested loops is measured by the two calls to the Date().getTime() method, which returns the time with millisecond resolution. By subtracting startTime from endTime, the program determines how many milliseconds it took to execute the two nested loops. Again, it is important to remember that the operating system does not give the applet exclusive access to the CPU. The total time measured will also include some time that the operating system allocated to other programs while the applet was running. This is unavoidable, but do your best to minimize the number of other programs running.

    startTime = new Date().getTime(); for(int i = 0; i < j =" 0," k =" nElements" endtime =" new">

    The applet is written in the Java programming language, which includes four different "primitive" data types for representing numbers: int, long, float and double. The "int" data type uses 32 bits to represent an integer, while the "long" data type uses 64 bits. So the "long" type can represent numbers with larger magnitude than the "int" type, but at the cost of taking up twice as much space, and perhaps taking longer time to process at the CPU. (You'll find out when you make your measurements.) Similarly, the "float" type is a 32-bit decimal number, while the "double" type is a 64-bit decimal number. Which data type do you predict will be processed most quickly? Which do you predict will be processed most slowly?
    The two non-arithmetic operations, "no op" and "assign", can be used to calculate the loop "overhead" (the time the program spends incrementing and decrementing the loop variables, and assigning the result to the output array). In the "no op" case, there is an empty statement (literally no operation) in the inner loop. In the "assign" case, a constant value is copied to each member of the output array.
    The controls of the applet are self-explanatory (including pop-up "tool tips" that display when the mouse hovers over a control). The "Run" button executes the currently chosen operation. Be careful not to set the number of iterations too high, or you'll be waiting a long time for it to finish. Rememeber that this is the count for the outer loop, and that the actual number of operations performed will be 10,000× this number (since there are 10,000 array elements to cycle through for each iteration of the outer loop).
    The text box will show a report of all of the tests you've run. It will display the operation performed, the total number of operations (outer loop count × inner loop count), the total time this took (in milliseconds, abbreviation: ms) and the time per operation (in nanoseconds, abbreviation: ns). The time per operation is calculated by dividing the total time by the number of operations.

    Terms, Concepts and Questions to Start Background Research
    To do this project, you should do research that enables you to understand the following terms and concepts:

    • bit
    • numerical data types: int, long, float, double
    • two's complement notation (for representing positive and negative integers)
    • multi-tasking
    • CPU frequency
    • CPU clock period

    Questions
    What is the lowest number that can be represented in 32 bits using twos complement notation? In 64 bits?
    What is the highest number that can be represented in 32 bits using two complement notation? In 64 bits?
    What is the clock period for a processor that runs at 2.4 GHz?

    Bibliography
    Wikipedia contributors, 2005. "Primitive types". Wikipedia, The Free Encyclopedia [accessed January 6, 2006] http://en.wikipedia.org/w/index.php?title=Primitive_type&oldid=29101932
    Wikipedia contributors, 2005. "Floating point". Wikipedia, The Free Encyclopedia [accessed January 6, 2006] http://en.wikipedia.org/w/index.php?title=Floating_point&oldid=33961235
    Wikipedia contributors, 2005. "Two's complement". Wikipedia, The Free Encyclopedia [accessed January 6, 2006] http://en.wikipedia.org/w/index.php?title=Two%27s_complement&oldid=32853980
    Wikipedia contributors, 2005. "Benchmark (computing)". Wikipedia, The Free Encyclopedia [accessed January 6, 2006] http://en.wikipedia.org/w/index.php?title=Benchmark_%28computing%29&oldid=32439222

    Materials and Equipment

    • computer with Java-enabled web browser and Internet access
    • calculator or spreadsheet program for analyzing results

    Experimental Procedure

    1. First do your background research and make sure that you understand the terms and concepts and can answer the questions above.
    2. Use the applet below to measure the execution time for each of the operations for integers.
    3. Run the applet at least 10 times for each operation.
    4. You can use the keyboard to copy and paste the results from the applet to a spreadsheet program for analysis.
      Click on the output text area.
      Type +a to select all of the contents.
      Type +c to copy the contents to system clipboard.
      Finally, switch to your spreadsheet application and paste from the clipboard.
    5. As mentioned in the Introduction, the "no op" operation does nothing within the loop, so it provides a measure of the loop overhead. The "assign" operation simply copies a constant value to the output array (no calculation is performed). These two operations provide a control conditions. Both should take less time than any of the other operations. The time for the "int assign" operation can be subtracted from the time to complete the arithmetic operations for integers.
    6. Use a calculator or spreadsheet program to calculate the average time for each operation.
    7. Repeat your measurements and analysis (steps 1–6) for each of the four data types (int, long, float and double). You will want to measure the "assign" time separately for each data type.
    8. How do your predictions about processing time compare with the actual results? Were you surprised? If so, can you think of an explanation for what is going on? Can you think of another experiment you might try to test your explanation?

    Variations

    1. Try running the applet on different computers whose processor type and speed you know and compare the results. Keep conditions as similar as possible (e.g., minimize the number of additional programs running). How do the times compare vs. speed within the same processor type? How do the times compare across processor types?
    2. Do your results change if you have other programs running while you make measurements with the applet? Does it matter if they are actually doing something or not?
    3. Here's an idea for analyzing your data further: how many clock cycles does each operation take? If you know the "speed" of your processor (in MHz or GHz), you can calculate this by multiplying the time per operation (in seconds) by the processor frequency (in hertz).
    4. For a more advanced project, use JavaScript to write your own program to investigate execution time for a function call or writing data to the screen. For example: how long does it take to generate a random number using Math.rand()? How does this compare with calculating the sine of an angle using Math.sin()? How does this compare to simple arithmetic operations in JavaScript? Can you estimate how many arithmetic operations are performed to generate a random number? How long does it take to write a line of text to the screen? How does this compare with changing the background color?
    5. For an even more advanced project, use a C or C++ compiler to write a native timing program. Java is an interpreted programming language, so it is likely that your native compiled C program will run faster than the Java applet. Is this the case?


    CD Burning: Take it to the Edge

    Objective
    In this experiment you will investigate the relationship between the amount of information stored on a CD-R disc and the size of the "burn" by measuring with a ruler.
    Introduction
    The music that we listen to, the movies we watch, and the video games we play are often stored on CDs. A CD is a way of storing data, or information, by using a laser to etch the data into a long groove, called a track. The data in the track is etched as a long series of tiny bumps that are scanned by a laser in your CD or DVD player. Each CD has one long spiral track of data that circles from the inside of the disc to the outer edges. Each tiny data track is only about 0.5 microns wide, with a spacing of 1.6 microns between each track. A micron is a millionth of a meter, so each individual track is much too small to be seen by the naked eye!
    A CD has a long, spiraled data track. If you were to unwind this track, it would extend out 3.5 miles (5 km). (Harris, 2006)
    If you have a CD burner, you can store data by using special CDs called CD-Recordable discs, or CD-R's. These special discs don't have any bumps in the data track. Instead they use a series of light and dark spots which are "burned" into the track when the laser of the CD burner shines on the track and reacts with a special light-sensitive dye inside the disc. When the disc is empty the dye is clear, but when you heat the dye with concentrated light from the laser, the dye darkens. By blinking the laser on and off along the track, the CD burner etches a series of light and dark spots which create a digital pattern that a standard CD player can read.
    In this experiment you will take advantage of the change in the light-sensitive dye inside the CD-R to measure how much data has been burned. After marking the border between used and unused parts of the disc, you will use a ruler to measure how much space the data uses. What will happen to the amount of free disc space as more data is burned to a disc?
    Terms, Concepts and Questions to Start Background Research
    To do this type of experiment you should know what the following terms mean. Have an adult help you search the Internet, or take you to your local library to find out more!
    • Compact Disc - Recordable (CD-R)
    • CD burner
    • data
    • file size (MB)

    Questions
    How much information can be stored on a CD?
    Can you see the information stored on a CD?
    How can the amount of information on a CD be measured?

    Bibliography
    Brain, M., 2006. "How CD's Work," HowStuffWorks, Inc. [accessed: 3/29/06] http://computer.howstuffworks.com/cd.htm
    Harris, T., 2006. "How CD Burners Work," HowStuffWorks, Inc. [accessed: 3/29/06] http://computer.howstuffworks.com/cd-burner.htm

    Materials and Equipment

    • computer
    • CD burner (internal or external)
    • 8 blank CD-R discs
    • a photo, music file, or folder about 100 MB in size
    • permanent marker
    • metric ruler

    Experimental Procedure

    1. In this experiment you will need to use a CD burner to write data onto a CD-R disc. First, check with a parent to make sure you have access to a CD burner. It can either be internal (inside your computer) or external (something you will need to connect with a cable). Have your parents show you how to properly use the device.
    2. CD-burners use software to help you burn data onto the disc. Familiarize yourself with the software that your parents use to burn CDs. Make sure you know how to:
      load files onto the blank CD,
      find the allocated (used) disc space,
      find the available (unused) disc space,
      initiate and complete the burn.
    3. You will need some data to burn onto your CD. Good sources of data are photos and music. Try to find a file that is about 100MB. It is a good idea to save a separate copy of this file, because you will be writing on your CD later (and probably spoiling it for reading on your computer). So be sure that the file you choose is either unimportant or is saved somewhere on the computer else.
    4. Once you find the file you want to use, put it in a new folder on your desktop entitled, "CD Burn Experiment" so that you can find it easily.
    5. Next, you need to make a data table to record your results
    6. Place your first CD-R into the burner, place one copy of your file on the disc and burn. Write down the amount of used and unused disc space in your data table.
    7. After the burn is complete, write "Trial #1" on the front of the CD with a permanent marker.
    8. Turn the CD-R over to the shiny side. While tilting the CD-R from side to side, try and locate a fine line that encircles the disc. The inner side of the line will appear slightly dull compared to the outer side of the line. This line is at the edge of the laser etched portion of the data you have written on the disc, which appears dull.
    9. When you see it, place a dot on the line with a permanent marker. Measure the distance from the center of the CD-R to the dot you have marked. Write the data in your data table.
    10. Repeat steps 6–9 with the next CD-R, but this time put two copies of your file on the disc (which should be about 200 MB). When complete, label the disc "Trial #2" and find the line, mark and measure as before.
    11. Continue to add one more file each time, until you have a total of 6 or seven trials. This will depend upon the size of the file you use (<> 100 MB) and the size of your CD-R (74 or 80 min).
    12. What happens to the location of the line as more data is stored onto the disc?
    13. Make a graph of your results. Does the distance from the center of the disc increase or decrease as more data is added? Is the amount of increase in distance the same each time? Why or why not?


    Variations
    There are many other variables you can test with CD-R and data storage. How does the speed of the burn change as the amount of data increases? Try using different brands of CD-R discs, do they all use the same amount of measured disc space for the same amount of data?
    For a more advanced measurement you can use geometry to calculate the area of used and unused disc space for each trial. The area of a circle is πr2 and the radius (r) is one half of the diameter. To calculate the area of used disc space, you need to subtract the area of the inner circle (the hole at the center of the CD-R) from the area of the outer circle (where you marked the edge of the used disc space). To calculate the unused disc space, subtract the area of the used disc space plus the area of the hole from the area of the entire CD-R. How do these results compare to the previous results? How do these results compare to the measurments from the CD burning software? Is this way of seeing the data more or less consistent?
    For other projects about data, information and file sizes see How Many Letters?

    Wild About Wildcards

    Objective
    In this experiment you will test the use of wildcards to maximize the number of results from a search.
    Introduction
    Wildcards are special characters that are used during a search to find all of the possible variations of a word or search term. A search term can have a wildcard character (*) in any position that is normally a letter. The (*) will act as a substitute for any number of letters and can be used in any position of a word, either at the end or in the middle of the word. For example:
    win*
    win, wins, winter, window, windows, etc.
    win*w
    window

    You can use wildcards as a strategy to retrieve better information when searching for something on the Internet. In this experiment you will search for a topic using the Yahooligans search engine. By using wildcards in different places, you can test whether using a wildcard will get better results from your search.

    Terms, Concepts and Questions to Start Background Research
    To do this type of experiment you should know what the following terms mean. Have an adult help you search the Internet, or take you to your local library to find out more!

    • wildcard
    • search term
    • search engine
    • algorithm

    Questions
    How do search engines work?
    What search terms give the best results?
    How can using wildcards get you better results for a search term?

    Bibliography
    Yahooligans is a search engine just for kids that you will use for this experiment: Yahoo, 2006. "Yahooligans: the Web Guide for Kids." [accessed: 3/10/06] http://yahooligans.yahoo.com/
    Here is an excellent tutorial for kids on conducting Internet searches, so take a search lesson from Kids Click: Kuntz, J., 1999. "Kids Click! Worlds of Web Searching," Ramapo Catskill Library System. [accessed: 3/10/06] http://www.rcls.org/wows/
    This is a search site built by librarians just for kids. Conduct an Internet search, browse through the different categories, or take a search lesson: Kids Click, 2005. "Web Search for Kids by Librarians," University of California, Berkeley. [accessed: 3/10/06] http://sunsite.berkeley.edu/KidsClick!/
    Google is the number one search engine these days. Learn the Google Search basics by reading through this tutorial: Google Help Center, 2006. "The Essentials of Google Search," Google. [accessed: 3/10/06] http://www.google.com/help/basics.html

    Materials and Equipment

    • computer with Internet connection
    • notebook and pencil
    • graph paper
    • printer

    Experimental Procedure

    • You will be using the Yahooligans search site for this experiment, so familiarize yourself with the site before you begin.
    • Decide on a topic to do your search. Choose something that is specific and that has multiple spellings, like biology (bio, bio sci, biology, biologist, biologists, biological, biological science, biological sciences, biotechnology, etc.).
    • Choose your search terms and write them in the table. Choose terms with and without wildcards (bio, bio*, biol, biol*, biolog*, biology, etc).
    • Type each term into the search box of Yahooligans, and click "search" to get your results.
    • Write the number of "Category Matches" and "Web Site Matches" into your data table.
    • Continue for each search term you can think of. Do as many different combinations of terms and wildcards that you can think of.
    • Make two graphs of your data: one for the "Category Matches," and one for the "Web Site Matches." The best type of graph is a bar graph. Draw a scale on the left side of the graph (Y-axis) that represents the number of results. Draw a bar labeled with each search term up to the number of matches.
    • What was the effect of the wildcard, did it retrieve fewer matches or more matches? Was it better to use the complete spelling of a specific word, or to use a wildcard for retrieving more matches? Do the same strategies work for "Category Matches" and "Web Site Matches," or should you use different strategies? Did you get unexpected or irrelevant results for any of your terms?

    Variations

    • Yahooligans is one site for searching for information, but there are many other databases where wildcards can be useful for finding information. One place where wildcards can be useful if for searching through the computer catalog at the library. Try this experiment at your local library to test the use of wildcards for finding books, magazine and articles on a topic of interest.
    • Google is a very popular search engine that uses automatic wildcards. That means Google adds a wildcard to your search term without your even knowing so it can find more search results for you. Investigate how Google automatically assigns wildcards to your search term. Are the results ranked higher or lower than your original term? Try misspelling a term on purpose. How does the Google algorithm fix the problem?
    • Try this experiment with other search engines like Alta Vista, Lycos, Dog Pile, or Web Crawler. Do you get the same results for different search terms with each one? What does this reveal about how search engines are programmed? Do you think the different search engines use the same or different algorithm?
    • For another experiment on using search engines, try Getting More Out of Less: Google Hits and Search Terms.

    Engineering News

    Central Board of Secondary Education

    Architecture News

    Management News

    Medical News

    Journalism News

    ss_blog_claim=39d0fbd9150037431cf33bbbf3c7c7ce