CS - Intro - Pilot

Intro. to Comp. Sci (year) - 1

Fall 2021 -- Peter Brooks

Period 5 Minutes schedule
Period 9 Minutes schedule
Minutes - notes
Period 10 Minutes schedule
Minutes - notes

Online Office Hours         ClassNotes

Final Project Requirements Upload, to the homework server your project:
- either just the .nlogo file if your model does not import any files/images
- if you model imports images or makes use of other files, then ZIP all the files together (including the .nlogo file) and upload the resultant ZIP file.

Documentation: use the Info tab for your project's documentation.  The Info tab should contain AT LEAST the following sections:
- "What Is It?"  should describe the model, briefly.
- If there's user interaction (game/simulation): "How to Use This Model" or "How to Play"
- "Bugs or Misfeatures"  should detail any remaining unsquashed bugs and/or features promised but not implemented.
- "Credits and References"  should list all of those people who helped you with design, coding, testing, chicken soup at 3 am, patience...
- and any other sections describing the model or your trials and tribulations in developing it.
Final Project Tools - See the explanation for importing background images in the ClassNotes above.  Here's the PatchPainter (as discussed in class).
- Gun techniques: mouse-clicking and shooting:  techniques-gun-2.nlogo
- Working with gravity: trajectories: techniques-gravity.nlogo.
- Turtle-turtle interactions: turtle-turtle-interaction.nlogo
- Demo code for Keeping Score and using the timer to limit game-play:  Scores.nlogo

- For those of you who need to move many things at once and make them behave differently, here's the StateVariables-simple.nlogo model showing how to do it, as well as the more complex StateVariables2.nlogo.
Project Proposals, due Sun, 1/23, morning 8:00 - Write up your project proposal so that I can imagine, in my mind's eye, what you plan to do. 

- If creating a game, don't just say you'll create a game like "X", where "X" is the name of a popular game -- assume that I don't know popular games.

- Submit the proposal to the homework server, and then check back, a day or so later, to see my comments on the homework server (View Homework tab).  I will OK or not OK your project, with possible comments.

- The Final Project is due, on the homework server, on Sat, 1/22, midnight.
Thurs, 1/13: We finished Snake.

Tues, 1/11:  Finish the Start button for the Snake game.  See ClassNotes above for details.

Wed, 1/12: Finish the first version of the Play button.
Here is the code for the final version of Snake (right-lick and download)
Thurs, 1/6/22.  I'm absent today, as well.

But there's HOMEWORK: making your first animation.

Feel free to discuss ideas for the homework with others in the class.

Due Mon 1/10 midnight.
Now that y'all know about parameters, you'll find them very useful for creating certain types of animations...

Here's the discussion of the homework.

Sign up here to have your animation shown in class.
Wed, 1/5/22.  I'm absent today. If you haven't watched the Reporters Netlogo videos (12A/B): do so.  Also the video on variables (17)  -- the subject that we covered on Tues.
I have no other class assignments for you for today. 
Wed 12/22:  Turtle shapes today and a bit of animation Techniques-animation.nlogo  and AnimatedDialogue.nlogo
A little animation (BreathingAnimation.nlogo)
Surprise: no quiz today.

Surprise quiz tomorrow

I'm not in today (Monday), but expect to be in tomorrow.
To prepare for the quiz (expect Doom): Make sure you have seen and understood all the NetLogo videos up to 20B, except for 12, 15 and 19. 
Do the video exercises if you haven't already.

As a couple of exercises using the WITH keyword:
a) try creating the French flag
b) or for more of a challenge: create the Norwegian flag.
Fri, 12/17: I'm not in today.  So... The Game of Life READ THE FOLLOWING EXPLANATION TO UNDERSTAND THE GAME OF LIFE:
1. Go to the Game of Life model in the Models Library/Computer Science/Celleular Automata/Life.  Before you play with it (because you will not understand what you're watching), read the What Is It? and the How It Works sections in the Info Tab.

2. Another way to think about what's happening is that:
2a. Every cell is either alive (light-colored) or dead (dark-colored)
2b. When you press the Go-once button, the each cell will decide whether it will be alive or dead by the end of the Go-once procedure, according to the following rules:
2b-1. Each alive cell counts how many of its 8 neighbors are alive. If the count is less than 2 (namely, 1 or 0), then it will die of loneliness. If the count is greater than 3, it will die of overcrowding.  If it's 2 or 3 it will remain alive.
2b-2. Each dead cell will also count how many of its 8 neighbors are alive.  If the count is 3, it will be born (3 parents).  Otherwise it will rmain dead.
3. Each execution of the Go-once procedure is called a "generation".  The Go-forever button just calls Go-once over and over, showing each generation after the other.

4. Now try another little model showing off some simple Game of Life structures:  Download this model: Life-with-structs-3.nlogo.

A little terminology.  When you see little creatures containing exactly 5 alive cells that move diagonally: these are called "gliders".


Now, you may be ready to see some REAL structures.... Watch this video  and/or download this program -- at home -- (Golly) to play with them yourself.

There are philosophical implications of the Game of Life, which I'll talk about when I get a chance after I come back.
Homework on using the mouse.  Due Tues: 12/14 midnight First: watch the NetLogo videos 17 (on variables) and 20A/B: on mouse control.
Second: here are the homework instructions.  Upload your .nlogo file (DO NOT copy the code into the Comments-to-Teacher).  Write any comments about your difficulties into the Comments-to-Teacher.

Here is my answer to the homework (right-click and download)
Working with contrast Here are a couple of additional pictures (house1.jpg and house2.jpg) to use with this model (contrast.nlogo).  Download them all.
Working with pictures Here are two pictures to download and use in class (right-click and download somewhere that you can remember):
Moving stripe and moving picture I'm not in today, so let me clear up yesterday's puzzle of how to get the stripe to move left.
....and moving pictures!

Here's the SOLUTION!
Cool Models Library model, due Sat.12/4 midnight Find, understand and write about a cool model (not a game nor one of the art or sound models, even though some of them are really cool).
Write a paragraph about why it's really interesting to you and what you learned -- that you didn't know before you ran the model. 
Do not just copy/paste information from the Info Tab.
Write your answer into the Comments-to-Teacher.
The Models Library!  Tues, 11/30. - I am not in today.
- Bring up NetLogo.
- I want y'all to explore the Models Library, which is an incredible treasure trove of NetLogo models.
- Go to File/Models Library.
- Stick to the Sample Models and Curricular Models.  The other sections are less interesting for now.
- DO NOT gravitate to the Games section (do that at home).
- Click on a model that looks interesting there, read a little about what it shows BEFORE you press the Open button on the bottom of the window.
- If you're interested, Open that model, and try to figure out how it works.
- There's plenty of information in the Info Tab about it, by the author who created it.
- Look around -- there are remarkable models there.
- We'll start talking about them on Wed.
Quiz: Wed. 11/24. Learn to navigate the NetLogo cribsheet otherwise it will not be easy to use when you get your copy during tests/quizzes.
Homework, due Tue morning 11/23 Duplicate this model: Here.
Note: use a "square" as your shape for one of the problems.  There is no "rectangle" shape.
Right-click on that link, download it (and on Macs, make sure that the suffix is ".nlogo" or change it to ".nlogo" once the file is downloaded) 
Then get into NetLogo and use File/Open to open the file.

Here is my model with the code visible.
More documentation for you:

NetLogo cribsheet is here.
Watch videos 6A,B on sliders, 7 on widget layout, and 8A,B on Randomness -- All of this is review. Do the exercises to refresh your now aging neurons.

Netlogo homework #1, Due Thurs, 11/18 8:00a

Also, about buttons:  Watch the Buttons video in the NetLogo videos (5A & B)
- Download this Netlogo file by right-clicking on it and choosing "Save link as..." from the little menu that comes up.  Save the file in a place you'll remember. Then load it into Netlogo using File/Open. 
- You'll need to duplicate the function of this Netlogo model, complete with the buttons and what they do.  Look in the Info tab for addtional hints and directions.
- Upload your resultant .nlogo file to the homework server's slot.  If you have a problem, upload what you have a include an explanation of the problems you're having in the Comments-to-Teacher.  (Do not upload a copy of my file!)
NetLogo Videos! Watch up to and including video 4A (and, of course, 4B).
For Tues, Nov 2. 1) Download, install and run NetLogo for the first time
Make sure that you download the NetLogo app (use this link) and NOT "NetLogo Web"

32-bit vs. 64-bit Windows issue: If you know that you have a 64-bit version of Windows, you can download the 64-bit version of NetLogo. If you don't know, there's a link to help you find out.  But IT DOESN'T REALLY MATTER --the 32-bit version works with all tribes of Windows perfectly well: you can just use that one.

After installing, launch NetLogo (not NetLogo3D), and it should look like this.

2) Watch the following very short YouTube videos on how the internet works (both British videos, both good): 
A) A Packet's Tale (catch that reference to 60 Hudson St, which is 10 minutes walking distance from Stuy)
B) from the BBC (British Broadcasting Service) -- includes some history of how it got started.
Mon, Nov. 1. 
I am out again (sorry).
Deadline pushed back to Tues, 8:00am for the Presentations.
See this explanation (which you should have received by email).
Here is the survey that I need all of you to fill out, ASAP.

and Deliverables due on Tues, Nov. 2, 8:00am
The Presentation order:
period 5 signup Period 9 signup Period 10 signup

Ignore any taxes - ignore shipping costs as well.
 Just get the cost under the budget amount.

You team will be creating two things:
1) A presentation in Google Slides or Powerpoint. 
2) A document containing your ComponentsList in Word or Google Docs form.

One of your team members should upload these items to a folder on Google Drive and send me permission to view these objects by placing the link to the folder (or links to the two files) onto the Comments-to-Teacher.

Your presentation should start with slide with the team name, the task, and the names of the members.  And then, convince us to buy!
Wed: 10/27: Out again.  Work with your team on your task.  Remember: it's not just the list of  components -- you want to make a sale.  
Tues: 10/26:  I'm out again today. 1) Work together on your projects;
2) and/or work on the homework for tomorrow morning (Wed).
3) When you get home, fill out the survey about your task/team, by tonight (Tues)
Computer Jargon homework.  Due, Wed. 10/27, 8:00a You'll be researching (and hopefully understanding) at least 8 terms from this list.
Fri: 10/22:  I'm out today. During class:
1. Minutes should be given by the minutes-person (but there will not be minutes given on Monday, because I'm out today).
2. Read through and understand all about the GPU (link below).
3. You may get together and work with your team on your presentation. (deadline for the document your team will prepare and submit: 10/31, midnight [Halloween]).
Hardware project
Group signup by Mon, 10/18, 8:00a
Here's an outline...  more details to come....

period 5 signup Period 9 signup Period 10 signup

Here's a general outline of the parts of a computer.
All about RAM (Main memory)
All about the CPU.
All about the GPU (Graphics Processing Unit).
All about Hard Drive vs. SSD storage
All about graphics and  Monitors.
All about Operating Systems.
3rd Scheme homework, due Wed, 10/6, 8:00a Here it is.  I've included a recursive function, not to create but rather to analyze.
Scheme/Racket Cribsheet This is a reference document that will be given to you during Scheme test(s).
2nd Scheme homework, due Mon, 10/4, 8:00a Here it is.  This should be straightforward, given what we have overed in class.
SchemingBat is here.  
1st Scheme homework, due Thurs, 9/23, 8:00am Here it is.  It's mostly calculations, which you should copy/paste into the Comments-to-Teacher.
Get DrRacket.
  1. Download, install and run DrRacket for the first time.  You'll need to make a choice between 32-bit and 64-bit versions of this software.  The 32-bit version of DrRacket will run somewhat slower than the 64-bit version, but you'll probably never know the difference. If you know that you are running a 64-bit version of your operating system (Windows or MacOS), then download the 64-bit version of DrRacket.  If not, then download the 32-bit version.
  2. Install the downloaded software...
  3. On Windows, just double-click on the file you've downloaded to install it.  Then you can look in the "Program Files" directory for the "Racket" directory, and find the DrRacket.exe application
  4. On a Mac, download the file and double-click on it, and it should help you install it as an application
  5. Having installed it, run it for the first time, and go through the same procedure that we did in class to choose R5RS as the language of choice.
  6. If you've had problems, try to remember what step the failure occurred in, and bring it to class to ask others who might have overcome hat problem.
1st Homework, due on the Homework server by 8:00am, Wed (9/15) Ask a question about the computer world (hardware or software or philosophical) that you're dying to find out the answer to (or, at least reasonably interested in). 
It should not be so broad as "Can you explain quantum computing?", nor so particular as "How come my laptop crashes every time my brother burps?"
Go to the homework server and choose "Submit Homework" and type your question into the Comments to Teacher box.
First day survey due by Wed. midnight.  
How to CompSci at Stuy This is a document that's been in the works by several CS teachers (Holmes, Genkina, Mykolyk) and their students for several years.  It is our best advice to you.  Read it all.
First task: fill out your Profile on the Homework server.
  1. Go to the main class link page (http://bert.stuy.edu/pbrooks)
  2. Click on the Homework/Grade server link (or use the one at the bottom of this webpage)
  3. Choose the Profile menu item
  4. Choose your period and name
  5. Log in with your OSIS number as your password
  6. Fill out your email address and preferred first name only, DO NOT CHANGE YOUR PASSWORD YET.
  7. Save: (press Change Profile button)...
  8. (optional, but recommended): now you should change your password for this Homework server:
  9.  Go back to the Profile page, create a password and press the Change Password button.
  10. REMEMBER this password!
Help from Mr. Brooks In school, I live in the CS nest (room 301). I'm free periods 6,7,8.  Come on in, no appointment necessary.  If I'm busy, we'll work out a time.  If I'm not there, ask someone when I'll be back and/or try reaching me telepathically.
Sending email to Mr. Brooks:
Send mail to: pbrooks@stuy.edu

You MUST include your name in the subject line or body of the message, otherwise I won't know who it's from.
Stuyvesant bell schedule  
Homework/grade server  
Mr. Brooks MicroMind, Inc.
Support Wikipedia