Biotechnology


Introduction: Computers
Watch the video (http://news.cnet.com/1606-2_3-29767.html) and answer the following questions:
  1. What was the Enigma machine used to do?
  2. How many vacuum tubes did ENIAC have?
  3. Whirlwind was the first computer to use what kind of memory?
  4. Which did SAGE do, the computer that cost more than $5 billion?
  5. When did vacuum tubes stop being used?
  6. About how big was a 10MB disk drive?
  7. How much did the “Kitchen Computer” cost? What did it get you?
Webquest: Computer Architecture Your task is to research the architecture of a computer, then design a basic layout for a computer with that knowledge. You will used colored paper for your design, so don't worry about the materials!
  1. What is a computer processor (CPU)?
  2. Go to the Transistor Museum at http://semiconductormuseum.com/Museum_Index.htm. Use “Ctrl + F” to find words within a web page.
  3. How many transistors are in current microprocessor chips (Hint: Use “Ctrl + F” to find “microprocessor)?
  4. How big was the “Type A” transistor (Hint: Use “Ctrl + F” to find “Type A” and then click on the link)?
  5. About how big are modern transistors (Hint: Do a Google search for “size of modern transistors)?
  6. What do you find on a computer motherboard?
  7. What does BIOS stand for, when it comes to computers? Where is the BIOS in a computer found?
  8. What is the biggest capacity hard drive available?
  9. What is an input device? Name at least four input devices that are attached to the computer that you're working on.
  10. What is an output device? Name at least three output devices that are attached to the computer that you're working on.
Introduction: Internet

Read http://compnetworking.about.com/od/tcpiptutorials/a/ipaddrnotation.htm

  1. What does IP mean?
  2. The full range of IP Addresses is from __.__.__.__ to __.__.__.__
  3. What is the difference between IPv6 and IPv4?
  4. What are at least four devices that use IP?
Read http://www.nthelp.com/40/ip.htm to find the private IP Addresses. An IP Address only exists if all of the numbers are between 0 and 255. If an IP Address is not private, then it is public. For each of the following, respond as to whether the IP Address is public, private or does not exist:
  1. 10.0.0.0
  2. 10.130.255.255
  3. 129.22.138.6
  4. 172.16.0.1
  5. 172.33.3.4
  6. 127.33.3.4
  7. 192.169.0.0
  8. 192.168.5.233
  9. 192.168.300.233
  10. 169.255.0.0
  11. 169.256.0.0
  12. 169.254.0.255
Go to http://www.yougetsignal.com/tools/network-location/.
  1. This is different than your IP Address you found before because you are behind a proxy. Where is your actual IP located? (Hint: Look at the right-hand side where it says city and state)
  2. Look up google.com and four of your favorite web sites (type the website name in “Remote Address”) and record the results below:

Web Site

Location

Google.com

Routing Go to http://voip.about.com/od/hardware/p/whatisarouter.htm. Respond:
  1. What is a router?
  2. What does a router keep information about?
  3. When a packet of data arrives at a router, which route does it choose?
  4. Go to http://www.yougetsignal.com/tools/visual-tracert/. This tool shows you the routers that data travels on its way from your computer to the address that you give it. Complete the table below for the three web sites listed and three more that you visit on a regular basis. Replace (Your choice) with the websites that you chose. After you enter the web site, click on “Proxy Trace”.

    Web Site

    Number of hops

    Time

    (in seconds)

    Miles Traveled

    www.google.com

    www.bbc.co.uk

    Click on

    “Use Current IP”

    (Your choice)

    (Your choice)

    (Your choice)

Domain Names Every “domain name” is made up of at least a domain and a top-level domain. A domain name is just an easy way to remember an IP address; every domain name links to an IP address. If we take the domain name www.google.com, “google” is the domain, “com” is the top-level domain (TLD) and “www” is something called the sub-domain.
Go to http://en.wikipedia.org/wiki/List_of_Internet_TLDs.
  1. What are three TLDs that you are familiar with?Scroll down to where the ccTLDs are listed (country code TLDs). List three country TLDs along with the country that they represent.
    ccTLD (Country Code Top-Level Domain) Country Represented
Go to http://www.whois.net/. Using a TLD other than “com”, think of domain names that you would like to have for a web site. Click “Check” to see if it’s available. What is one domain name that is available?
Introduction to JavaScript
  1. What is the main problem of programming, in the author's opinion?
  2. What does a good programming language do, in your own words?
  3. What is the difference between JavaScript and ECMAScript?
  4. Describe, in detail, how to use the console included in this tutorial.
Basic JavaScript: values, variables, and control flow
  1. What is the biggest number that can be stored in JavaScript?
  2. Why should you add parentheses when doing math?
  3. What does the % operator do?
  4. What is a string?
  5. How do you add a new line in a string?
  6. How do you include a tab in a string?
  7. List and explain all 7 comparison operators.
  8. List and explain all 3 logical operators.
  • Show and explain your answers to Ex 2.1 - 2.6.
Functions
  1. What are the parts of a function?
  2. What is recursion?
  3. What is the keyword "undefined"?
  4. What does "alert" do?
  • Show and explain your answers to Ex 3.1 and 3.2.
Data structures
  1. What is a property in JavaScript?
  2. What is an object?
  3. How do you add a property to an object?
  4. How do you delete a property from an object?
  5. What is an array?
  6. What do "push" and "pop" do?
  • Show and explain your answers to Ex 4.1 through 4.11.
Final Project: Biotechnology
You will program Conway's "The Game of Life". There are multiple steps to this process, and we will walk through them together.
  1. Look up the rules to Conway's "Game of Life".
  2. I have already written the program, so go to http://shawmst.org/biology/gameoflife/ to see it in action!
  3. Download http://leroysolay.fatcow.com/GameOfLife.html to a directory on your computer.
  4. Create a new JavaScript file called GameOfLife.js in the same directory. Open it in your favorite IDE.
  5. You will start your JavaScript file with constants and variables: var intMinimum = 1; var intWidth = 100; var intHeight = 100; var intRandomCells = 1200; var strDeadColor = "white"; var strAliveColor = "black"; var strPathToImages = "http://shawmst.org/biology/wp-content/themes/twentyten-book/images/programming/"; window.onload = function() { SetupGrid(); };
  6. The first step is to make the grid object that will hold all of the cells that you will manipulate. To do this, make a new array called "Grid" with a width equal to the intWidth from the previous step.
  7. Next, you will set up the grid that you just created to make sure that it has a cell object in every part of the grid. You may have noticed that in the code from step #5 there was a function called "SetupGrid()". You will now make this function. You will create a "for" loop that takes the variable "i" from "intMinimum" to "intWidth". That means that it will bring i from 1 to 100. At each step, it should make a new array inside of the grid object at Grid[i]. Also, within this same loop, you should take the variable "j" from intMinimum to intHeight. Inside of that loop, you should make a new cell object, passing it the variables "i" and "j".
  8. In the previous step, you referenced a Cell object, but you don't have one yet! Let's make a Cell object that takes two inputs called "x" and "y". Use the following code to start your Cell object: function Cell(x, y) { this.x = x; this.y = y; } All this Cell object does is copy the two variables passed to it to local variables. It will do much more later!
  9. The first thing we need to do with the Cell object is to give it another local variable called "boolOn" and set the default value to false. This means that we are assuming that it starts in the off position, but we can change it later. Also, we need to write a local function for the Cell object called "Switch": this.Switch = function() { } Inside this code, we need to check to see if "boolOn" is on or off. If it's on, we need to switch it to off by calling another local function called "SetDisplay" and passing it the value "false". If it's off, we need to switch it to on by calling "SetDisplay" with the value "true". You will also need to copy the SetDisplay function from below (I'm providing it because it does things that you haven't learned yet): this.SetDisplay = function(boolAlive) { this.strColor = strDeadColor; if (boolAlive) this.strColor = strAliveColor; document.getElementById("grid_" + this.x + "_" + this.y).innerHTML = "<img src='" + strPathToImages + this.strColor + ".png'>"; this.intReturn = 0; if (this.boolOn != boolAlive) this.intReturn = 1; this.boolOn = boolAlive; return this.intReturn; }
  10. Now that we can switch cells and set their display value, we need to make sure that all cells, when created, start in the off position. Inside of the Cell object, write a line (after the SetDisplay function) that sets the display to the "off" position.
  11. The web page that you downloaded automatically calls a function every time you click a cell. Interestingly, that function is called ClickCell and it takes the x and y coordinates as input values. Write a function (outside of the Cell object) to retrieve the appropriate cell from the grid and call the "Switch" function on that cell object.
  12. Now your program should work so that you can click on any cell and it will switch it from one color to the other. If it doesn't work, you will need to check your work, check to see if the web browser is displaying any errors, and fix them appropriately.
  13. The next stage of the program is where we display a randomized grid of cells that are "on". Do this by creating a function called "DisplayRandomGrid" (because that's what the web page is sending to your program) with one input variable - the number of cells to randomly turn on. Write a "while" loop that checks to see if the number of cells is greater than 0. Within that while loop you will use the following code to create random coordinates on the grid: i = Math.round((Math.random() * (intWidth - 1))) + intMinimum; j = Math.round((Math.random() * (intHeight - 1))) + intMinimum; Now, set the display for this cell in the grid to true. Also, inside the loop you should reduce the number of cells to randomly turn on by one.
  14. The last stage of this program is where we actually implement Conway's Game of Life! The web page calls a function called "Start" so go ahead and create this function. I will leave this part up to you to figure out, but you need to loop through every cell in the grid and figure out whether or not a cell should live or die based on how many live neighbors it has. Call your function to determine how many neighbors a cell has "NumberOfNeighborsOn" and call a function on the Cell object in the Grid called "Mark" if it should be marked to stay alive in the next generation. Lastly, this Start function should call another function to display the entire grid.
  15. In the previous step, you called a method "Mark" on the cell object. Write this function now. We'll store this mark value as a local variable called "boolMark". Default this value to false when the cell object is created. Set this value to true if the Mark function is called. While we're here, go ahead and make another function in the Cell object called "IsOn" that returns the value of the "boolOn" local variable. We'll use it in just a second!
  16. Now for the "NumberOfNeighborsOn" function. This function should take as input the x and y coordinates of the cell that we're checking. It should start at the cell that is one to the left and one above and finish at the cell that is one to the right and one below. You should store the number of neighbors that are on in a variable that is initialized to 0. Check to make sure that for each cell you check, it's above the minimum in each direction and below the maximum in each direction. Also, make sure that you are not checking the original cell itself! If this cell is on (use "IsOn" to check), add one to the number of neighbors on variable. After you're all done, return the value of this variable.
  17. We're almost there! Make a "DisplayGrid" function that runs through the entire grid and calls a function "SwitchToMark" for each cell object. Let's write that function in the Cell object. The purpose of this function is to switch the actual value of the cell to the mark, on to on or off to off. Call "SetDisplay" with the mark value, then set the mark value to false.
  18. Your code should now run, so do error checking and see how it goes!