Wednesday, October 31, 2007

ICA-CP INFO: Making Your Halloween Applet

Step 1) Copy the Halloween Applets subdirectory from the R drive onto your computer.

Step 2) Open the directory. Click on any file ending in .html to run the applet.

Step 3) Please note: An html file is what Internet Explorer, Safari, Firefox, or any other browser uses to display web pages. In the Halloween applets, the html files (ghostfire.html, pumpkin-under-water.html, and kids.html) call an applet. The applet lives in the lake.class file. The html file sends instructions to the applet when it runs. You can modify the instructions to make your image look like it is under water or rock.
Step 4) There are 13 lake.class Halloween demos in the ghost.zip file that is on the R drive in the Halloween Applets subdirectory. Unzip it to try more examples of running the lake.class applet in html.

Here's a web site with a tutorial if you would like more info:

http://www.jaydax.co.uk/tutorials/laketutorial/dgapplet.html

ICA-CP: 10/31/07 - Halloween Applets

Happy Halloween!

Today in honor of Halloween, we are experimenting with Java applets. First, what makes a regular Java program start executing? Answer: It's the main (remember, public static void main (string [] args) ?). Well, an applet is a Java program that executes in a web browser. Since the web browser starts execution, a main is not needed.

Our applets will be using a Java library called lakes.class. The lakes.class library will allow us to make some interesting Halloween applets. For samples, see http://www.codebrain.com/java/specials/halloween1/index.html

Your exercise is to make 2-3 applets with at least 2-3 different pictures using the lake reflection, rocking, and underwater options. Begin by copying the Halloween applets folder to your C:\ drive from the R:\ drive. It contains the html and pictures we will be using for our demo and lecture today. Then, use the CASE method to modify the html to use your pictures.

Monday, October 29, 2007

ICA-CP Info: Audacity

Audacity is a free audio recording and editing program that we are using to make podcasts. It is on the R drive. But, it may also be downloaded for both Macs and PCs from here:
http://audacity.sourceforge.net/download/

Audacity uses a plug-in in order to make MP3 files from your recordings. On the R drive copy this file: lame_enc.dll
to this place: My Computer -> Local Drive(c) -> Program Files -> Audacity.

Week 2 (11/5/07-11/9/07) - Question of the Week

Question: You purchase a music CD, an iTune song, or a video DVD. Should you be allowed to make an archival copy of it? (This assumes you will not share it with others, but may put it on you home's wireless entertainment computer to broadcast to TVs and computers in your house.)


Background: A woman is found guilty and fined $9250.00 a song for allowing downloads (see http://www.usatoday.com/tech/news/2007-10-11-download-jury-award_N.htm). A mother is sued because her kids downloaded music. The charges were dropped, but now her kids are being sued. (see http://www.msnbc.msn.com/id/16293895/). All music and videos transmitted over the airwaves is part of the public domain and may be recorded. But, if you own a CD, making a backup is illegal under the Millenium Copyright Act. If you buy an iTunes song, it can be moved onto MP3 players or computers only 3 times. Then, you have to buy it again. If you have a record, you can put it onto cassette tape -- but, it may be illegal to make it into MP3s and move it between your iPod and PC.

Some references (but, you may look up more):
The United States Copyright Law: A Guide for Music Educators - http://www.menc.org/information/copyright/copyr.html


Millenium Copyright Act:
http://www.gseis.ucla.edu/iclp/dmca1.htm

ICA-CP: 10/29/2007 - Eliza and Flow Charts

Good morning!

Today, we're going to cover some new programming theory on flow charts. A flow chart is a graphic illustration of a computer program. For the other part of class, we're going to work on our Eliza program (remember, it's half of your semster project grade).

Here's the grading breakdown of the 75 points for your Eliza project:

10 points: algorithm document explaining the emotive words and responses (7 per person on team)
10 points: flow chart of program
10 points: user documentation explaining how to install your program and how the program runs in screen comments and in a word document user manual
10 points: has line or multi-line comments explaining how the program runs as well as identifying emotive words and responses
35 points: program is compiled and runs

Some basic information on flow charting symbols may be found at this web site:
http://deming.eng.clemson.edu/pub/tutorials/qctools/flowm.htm

A flow chart symbol "cheat sheet", which I am handing out to you, may be found here:
http://www.breezetree.com/articles/flow-chart-symbols.htm

There's also an example for if and if/else statements in our textbook on page 99.

Thursday, October 25, 2007

Week 1 - Question of the Week

You have run Eliza, one of the first artificial intelligence programs. You know some of its shortcomings now. The question of the week is: Will computers ever be able to act like humans and possess human intelligence?

Some background info: Dr. Alan Turing proposed a test to identify whether a computer possessed human intelligence. You have a human in one room and a computer or robot in another. You don't know which is in which room. You can only hear their answers. You ask questions of both. If you cannot tell the difference between the human and the computer by their answers, then the computer is said to possess human intelligence. For more info from Wikipedia, check here: http://en.wikipedia.org/wiki/Turing_test

ICA-CP: 10/15/07 - Eliza (part of semester project)

Good afternoon!

We are taking a look at Eliza. There are various versions on the web. Here are couple:

http://www-ai.ijs.si/eliza/eliza.html


http://www.manifestation.com/neurotoys/eliza.php3

http://jerz.setonhill.edu/if/canon/eliza.htm

These are for part 1 of our semester project.

ICA-CP: Q2 and Semester 1 Grading

For Quarter 2, there are a total of 500 points possible plus 150 points for a semester project. Here's the Q2 and semester grading breakdown:

29% - Communications Analysis: 190 points
31% - 4 quizzes: 200 points
17% - Programming assignments: 110 points
23% - Semester Programming Project: 150 points

We will have a 50 point quiz on each of these days:
11/1/07, Friday
11/15/07, Thursday
11/29/07, Thursday
12/14/07, Friday

So, the class meeting before each quiz, we will review. You will be able to use your "cheat" sheets. Be sure to bring them to quiz days. You may be asked to create or fix bugs in a program as part of your quiz.

ICA-CP: Communications Analysis for Q2

Each week, you have a choice of doing one of the following:

1) Blogs
2) Question of the Week response
3) A podcast on an approved computer topic
4) Analysis of one or more computer related breaking news articles

You must decide each week which you are going to do and get Mrs. Clingingsmith's approval. If you choose blog entries, the blog is due before the beginning of the next class. If you choose Question of the Week, a podcast, or news analysis, your work is due on Friday of that week by 5:00 PM.

Here are the weeks with the minumum # of words/minutes required:
Week 1 (10/29-11/2): 300 words or 12 min. podcast (30 pts.)
Week 2 (11/5-11/9): 200 words or 8 min. podcast (20 pts.)
Week 3 (11/12-11/16): 200 words or 8 min. podcast (20 pts.)
Week 4 (11/19-11/21): 200 words or 8 min. podcast (20 pts.)
Week 5 (11/26-11/30): 200 words or 8 min. podcast (20 pts.)
Week 6 (12/3-12/7): 200 words or 8 min.podcast (20 pts.)
Week 7 (12/10-12/14): 300 words or 12 min. podcast (30 pts.)
Week 8 (12/17-12/19): 100 words or 5 min. podcast for 10 points

All of these assignments will be graded on your ability to apply critical thinking skills to the topic you choose. They must be of professional quaility if a podcast and well written of a news analysis or Question of the Week response. The communications analysis component of your Q2 grade totals 170 points or 34%.

Tuesday, October 23, 2007

ICA-CP: 10/23/07 - Grading points for Q2 and S1 project

Today we reviewed Myers-Briggs results. We also talked about Q2 projects and grading. For Q2, there will be 500 points possible. Below are the points you need to achieve a desired grade for Q2:

480-500 points: A
450-479 points: A-
435-449 points: B+
415-434 points: B
400-414 points: B-
385-399 points: C+
365-384 points: C
350-364 points: C-
335-349 points: D+
315-334 points: D
300-314 points: D-
0-299 points: F

Here's the grading breakdown for your semester project:
144-150 points: A
135-143 points: A-
130-134 points: B+
124-129 points: B
120-123 points: B-
115-119 points: C+
109-114 points: C
105-108 points: C-
100-104 points: D+
94-00 points: D
90-93 points: D-
0-89 points: F

Friday, October 19, 2007

ICA-CP: 10/19/07

Good morning!

I'm at school today. We'll pick up where we left off last time I was here. Once we get to lab time, if you are done with your maze, you can try podcasting. Grab a microphone out of the closet, and run the Audacity program. Do a podcast on the difference between the if and while statements that lasts at least three minutes. You can use SEXI if you wish, but you do have to explain the two concepts of if an while, give the difference(s) between them, and give examples.

For more info on how to create a podcast, go here: http://lesson.taskstream.com/lessonbuilder/v.asp?LID=utcvc6ephshiffzu

Tuesday, October 16, 2007

ICA-CP: 10/16/07

Good morning!

I'm sorry to say that I'm home sick today. S. Pauline will be your substitute teacher today. I forgot to tell her that there is brainfood in the closet. So, you might ask her to open it for you.

Today, we were going to go over your Myers-Briggs results. Two people still owe me the Myers'Briggs papers. Please give them to S. Pauline. We will go over your MB results on Thursday.

Please work on your Karel maze programs today. In order to be complete, they need to use if/else, while, iterate, and the conditions that Karel may know, for example, leftIsBlocked or leftIsClear. So, for the first pass of your program, if using conditions does not make sense to you, just write a program that will get Karel through the maze. We will be doing a tutorial on the conditions.

This week is the end of the quarter. Please be sure you have the blog for today finished by Thursday. I'll see you all on Thursday.

Friday, October 12, 2007

Class Summary: 10/12/07 - What we've learned so far

Lee scribed our review summaries into the class blog for us today.

Sandra
Hello World - class application
J creator - program for java
system.out.println - cursor goes to bottom

Ashley
Four Main Food Groups for Computer Programmers - Candy, Sugar, Pizza, Caffeine
Karel Commands - iterate, etc.
Intuitive Learner - Don't mind if details are clear, they'll work around it

Lizette
Algorithms - a set of instructions
SEXI - acronym used to describe things; State, Explain, eXemplify, Illustrate
commands to check which direction Karel is facing if(facingNorth)

Devinah
Learned possible way of using cassette tape to transfer info onto a bart/credit card
Algorithms have to be really specific
SEXI - created by Professors @ Sonoma State

Beverly
SEXI - State, Elaborate, eXemplify, illustrate
"Hello World" - Common 1st time Java Program
An "If Then" statement gives Karel a set of instructions on what to do if certain conditions are true.

Jaime
public static void main(string[]args)
println - what shows on screen
BlueJay - Java editor

Courtney
CASE - Copy and steal everything
Karel the Robot: iterate means to do something however many times
Algorithms are used in our everyday lives

Natalye
Braces need to match
3 lefts make Karel turn right
Everything needs to be spelled exactly

Katherine
Import - java command to open up library
Print - cursor 1 line down
Two kinds of comments: multi, end of line comment

ICA-CP: 10/10/07

This posting for our October 10th class is a little late. But, I want to make sure these ideas are very, very clear. As I said in class, I was disappointed that some programmers in our class just copied others' Karel assignments 1-6 and turned them into me as their own. I could tell from timestamps, mistakes made, files sizes, etc. So, I'm going to summarize again what I said in class about the differences between CASE, pair programming, and plargarism.

CASE, which we all know stands for Copy And Steal Everything, is my term for a very legitimate coding practice of creating code for reusabability. In other words, programmers don't want to reinvent the wheel each time they write programs. So, they start with code created previously and then modify for the new use. They might borrow code from someone else, but for major programs they acknowledge the source of the borrowed code in comments and then make it their own with modifications. We will see this in greater complexity when we cover extending a class in Java next semester.

Pair Programming is a collaborative team environment with the basic concept of sharing ideas and helping each other. In Pair Programming, two programmers work on a single program. We create a collaborative working environment in class where helping each other with ideas is encouraged. However, sharing is encouraged in order to help another understand and then use a concept in coding a programming. It is not giving someone your program to plagarize.

It all goes back to critical thinking. As I keep saying in class, I want you to understand how to think about programming. If you understand and not just memorize, the concepts underlying computer programming, you may forget about the Java language in two or three years, but you will know how to analyze, problem solve, and create solutions to different kinds of computer related issues. Since computers are everywhere in our daily life, this may entail figuring out something very practical some day -- like how to restart the computer in your car so the doors will open and you can exit it. (See http://discuss.fogcreek.com/joelonsoftware/default.asp?cmd=show&ixPost=43493 to find out about a BMW trapped the finance minister of Thailand.)

Thursday, October 04, 2007

Class Summary 10/3/07: Internet Addresses

State
Question: When I want to go to a web site, how does my computer know how to get there? Answer: My computer looks it up in an Internet address book known as a domain name server.

Elaborate:
Every computer with a public web site has to register its domain name with the Internet Corporation for Assigned Names and Numbers, better known as ICANN. ICANN maintains an address book of web domains and IP (or Internet Protocal) addresses worldwide. All or parts of the worldwide address book are kept at local servers known as DNS or Domain Name Servers. When I want to go to a web site, like www.icacademy.org, my local DNS server looks up the name. If my local DNS server doesn't know the name and address, it requests the information from another DNS server that does. The address book lookup takes the name, like www.icacademy,org, from my computer and then sends back to my computer the IP address. For www.icacademy.org the IP address is 64.202.163.150. My computer can them go visit the address 64.202.163.150 and see the web page there.

Exemplify:
If I want to go to myspace.com from my computer at home, I type www.myspace.com in the address line of my web browser. My home computer sends a request to a DNS server. If my ISP is AT&T Yahoo DSL, the request goes to an address book that is on a DNS server at AT&T Yahoo. The DNS server takes the name, looks up the IP address, then sends back the IP address to my computer. My computer then goes to that IP address and displays the web pages there.

If I'm at school and want to visit www.myspace.com, I usually get a message that indicates the web site is blocked. How does that happen? Well, at ICA we pay for a content filter service in our hardware firewall that checks address requests before it lets them go through. If the address request is to a place that is on the "forbidden" list, then the request is blocked, and I see a message indicating that the web site is blocked. (If the request isn't blocked, the content filter in the firewall sends the request to the DNS server.) Does that mean I absolutely can't go to myspace.com from a school computer? As many enterprising students at ICA know, there are ways around the ICA content filter firewall.

According to Wikipedia, a proxy server is "a server which services the requests of its clients by forwarding requests to other servers." (See http://en.wikipedia.org/wiki/Proxy_server for further info.) If, very, very hypothetically here, I were to go to a proxy server first and then enter my request to go to www.myspace.com, what would happen? The request to lookup the address of the proxy server would be sent by the computer at which I'm sitting at school. The content filter in the ICA firewall would not recognize the proxy server as a forbidden location and would allow the request to pass throug to a DNS server. My computer at school would be allowed to open up the web page at the proxy server. Once at the proxy server web page, since I am now looking beyond the firewall, I could ask the proxy server to request the IP address for myspace.com for me. The proxy server would forward my request for myspace.com to its own DNS server, and then would return the IP address of myspace.com to my school computer bypassing the ICA content filter. The web browser on my computer would then jump to that address. But . . . if by chance the address and names of the proxy servers were added to the content filter forbidden list in the ICA firewall, then my initial request to go to the proxy server would be blocked.

An aside (ethical issues about censorship): The country of Arabia controls all internet requests through proxy servers. If the government does not want a web site visited, it removes the domain name and IP address from the country's proxy servers. In China, the country is too large to controll all Internet traffic through proxy servers. Instead, since most cannot afford Internet at home, the Chinese government installs video cameras at Internet cafes. If they see you visiting a forbidden web site, like www.msnbc.com, you may be arrested.

Illustrate
So, the DNS servers are like a worldwide phone book. If my number is unlisted, I can't be found -- even though I may have a phone number that works. If my number is listed and my phone is broken, someone can find me but my phone won't ring. If my phone is working and someone looks up my number in the phone book and then
calls, my phone rings, and I can answer.

Class Summary 10/3/07: Computer Hardware

State:
Inside of a computer, there are three major subsystems: the Central Processor Unit (AKA the CPU), memory, and input/output.

Elaborate
When we run a Java program, the program actually executes in the hardware of the computer. The program uses the CPU, memory, and input/out subsystems. When we use JCreator or BlueJ, the Java program is stored on the hard drive, which is part of the input/output subsystem, when we save it. When we run a Java program, the program is copied from the hard drive into memory where the CPU actually executes each instruction.


Exemplify:
The CPU is the "brain" of the computer. In a PC, it consists of a microprocessor like an Intel Pentium or Duo Core chip.

The memory is similar to our own memory. When a software program runs, the program is copied into memory.

The input/output is similar to our senses. Information flows into and goes out of the computer through input and output devices. Input devices include a mouse, a keyboard, web cam, or microphone. Output devices include printers, speakers, and monitors. Devices that perform both input and output functions include hard drives, touch screens, digital cameras, floppy drives, and flash disks.

Illustrate
The three major hardware subsystems are often compared to a human body where the CPU is the brain, the memory is similar to human memory, and the input/output is like the senses.