apcsp week 4 notes

collaboration

collaboration helps to take code further

go by yourself if you want to go fast, go with others if you want to go far

pair share code: a pair works together to code. 1 person types in code, the other person comments on it

leave helpful comments on code to make it easier for others to understand

computing purpose

Computing innovation Categories applications, physical devices, systems SOCIAL MEDIA:allows people to communicate from long distances ECOMMERICE: allows user to ignore hassle of visiting store or looking for specific items

computing innovations solve problems

Computing innovations allow us to do what we would have never thought of before, solve problems or pursue interests in creative expression.

program input usually from User

Program input usually effects output.

programs accept input in different forms:

touch

audio

visual

text

ex: smartphone accepts input from touchscreen, buttons get input from touch, text (entering password)

programs written in event oriented environment

ex: what type of events can user trigger? think of things like mouse clicks, audio input, etc.

Input usually effects output, but not always. you need to sometimes do specific thing to trigger output

action may trigger event

code segments may be called by certain actions

program function

A program is only a collection of program statements that do something when run by computer

A code segment is a collection of program statements, so a code segment is part of a program

programs need to work for variety of inputs and situations

A program is a set of statements

A statement is a single command.

A group of statements is called a code segment

Program design and development

How is program developed?

start with idea

developed with specific purpose in mind

create plan.

sometimes development is exploratory. discovering the new.

developers investigate problem and reflect. investigation is important in development.

determine constraints, user concerns, requirements.

after investigating developers design program

-brainstorm ideas

-plan user experience

How is program developed?

developers decide on program requirements, then use outline to make prototype.

make sure program is tested.

refine and revise program based on reflection

test

working with others on development

program development is usually team based.

Individuals work on different components.

MAKE SURE TO CREDIT OTHERS. NAMES MUST BE WRITTEN IN DOCUMENTATION. GIVE CREDIT WHERE CREDIT IT DUE, EVEN FOR SMALL THINGS.

you can use comments to give credit

you can also use comment to notify bugs.

using other’s code segments is useful in saving time. You can use other’s code segments but you have to give credit in documentation.

Program documentation is a description of code segments, programs,and how it was developed.

Program documentation describes program, its requirements, its functions/methods, and it’s development, as well as contributors.

documentation improves productivity. it is helpful to remember things and tell others what you were thinking.

comments are the best way to do documentation. use good comments to remind yourself of stuff or help other programmers know what you were thinking

Use comments to help others who read your code

4.1

how do computers connect to network?

computers used to not be able to communicate along networks. now computers can send and recieve data. this data is transfered in packets. Packets have source and destination. Packets like envelopes.

packet switching: a msg is broken into packets and sent. the packets are rebuilt on the recipients device.

Bandwidth is max amount of data sent in a fixed amount of time on computer network.

Packets help move data a little bit at a time.

how does the internet work?

Protocol is agreed-upon set of rules the specify behavior of system.

protocols dictate rules for info being transferred, data goes thru layers.

Network access Layer. data hops from our computer to internet Layer Data Transmission.

Data Transmission: data goes through routers and go through paths. no definite path.

Transport Layer: TCP looks over packets fixes errors. UCP is more lax.

Application layer: ips are changed to names.

questions wrong

I got one question on the first quiz wrong because I misread the question.

I got 2 wrong on the 2nd quiz. It was sometimes hard to understand how sudo code worked and how it would run. The descriptions for the programs were also hard to understand.

I got all 3 right on the last quiz, but the 2nd question was kind of hard to understand.