<aside> ‼️ Trigger warning: This lesson is extremely relevant and has the potential to induce trauma. If you need to sit this one out, I fully understand. I won't ask any questions. Let me know in a private message.

</aside>

Reading Code

Reading code is just as important as writing code. Take a look at this and think about what it'll do.

to setup
  clear-all
  reset-ticks
  ask patches [
    set pcolor white
  ]
  
  create-turtles 1000
  
  ask turtles [
    setxy random-xcor random-ycor
    set color black
  ]
end

to go
  
end

Let's use this to create a virus simulation! Open up a blank NetLogo page or use this link to use the template: http://netlogoweb.org/web?url=https://raw.githubusercontent.com/mchen0037/models/master/models/apcsp/virus-spread-template.nlogo

Thinking about Building

How should we move on with this model. We have some things written so far, but what should we do next?

Take some time to discuss as a group and then we'll get back together to discuss how to move forward.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/21f09302-6936-4a15-89dc-2221b5b12237/Untitled.png

Moving Forward

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/5c09b19b-1681-4131-adcd-4c6cc7d463b3/4WqQ.gif

NetLogo's website has a large collection of models that is free to use. In my experience with coding and learning how to code, it was imperative that I looked at other people's examples and how they did something. Searching the web is essential! Note that most tutorials, however, will not teach you how to think.

Nevertheless, it is still useful to look at people's stuff to see how they coded something. Unfortunately, Chromebooks are bad. While I'd like for us to explore NetLogo's library of models, this may not be possible with the technology we have...

Here's a link to something that will work:

Try the model and talk about what it does.

Think about which procedures of this code might be useful for us.. And snip them right out and put it into ours!

‼️ Don't just take people's code. Be sure to credit the author.

Variables that change