Final Project AP Computer Science Principles

I created a questionnaire asking people if they thought my would be useful these are the responses (link to these images are below blog had an error when I dragged images in).

https://drive.google.com/file/d/13silGpXtjk6ZZ1VN1KmzYKR1Geg4Vrs5/view?usp=sharing

https://drive.google.com/file/d/1Zs90hevJHvrVFwb6NG_biObs8Klcb9Cx/view?usp=sharing

As you can see by my survey results there is a problem with people being organised.

List of what my client wants:

https://docs.google.com/document/d/15eYX8g7bC6yBJ3q3pcHhMeaq3qAAxGv3kcj1bJpuI6s/edit?usp=sharing

Flowchart:

https://drive.google.com/file/d/1mDPQSYq9VxTzz2p5wjJ53CUKNjkdqmJ9/view?usp=sharing

Testing Document:

https://docs.google.com/document/d/105nlbh_fpVpZ_PvlMP027wClWadYiRz54qGGmwTxWls/edit?usp=sharing

Video Explaining my code and showing how my app works:

I can’t put comments into my code since I am using app inventor and app inventor doesn’t allow you to put in comments so I walk the view through the code in this video.

 

Challenges I faced and how I overcame them:

It was hard to incorporate the timer I used many different functions app inventor has to offer such as a list picker, time picker and a tiny db. However I did further research and found out about the clock function. I was able to incorporate the clock function into my code as the timer.

How I achieved Success:

I was able to accomplish what my client wanted. My code has a to do list feature where you can check things off. It alerts the user when a task has taken too long. I even put a timer so it tells the user how long they have been working on the task.

What I can improve on:

I think making my app more ascetically pleasing adding images and such. Maybe making buttons a certain colour would also make the code more ascetically pleasing.

APCSP Sorting Algorithms

For my sorting algorithms my partner and I choose bubble sort and cocktail sort.

Cocktail sort video:

Cocktail sort explained by me in this video

 

I did research for cocktail sort. Cocktail sort is similar to bubble sort the difference between the two is that once cocktail sort has made its first round of left to right is goes back and goes from right to left. This means that cocktail search is more efficient than bubble sort and can get items sorted faster by using this technique.

 

Bubble sort video

Bubble sort explained int his video by my partner, one of the most simple ways of sorting but inefficient when compared to other sorting methods.

 

Citations:

“Bubble Sort.” GeeksforGeeks, 22 Jan. 2018, www.geeksforgeeks.org/bubble-sort/.

“5.7. The Bubble Sort¶.” 5.7. The Bubble Sort – Problem Solving with Algorithms and Data Structures, interactivepython.org/runestone/static/pythonds/SortSearch/TheBubbleSort.html.

“Cocktail Sort.” GeeksforGeeks, 26 June 2016, www.geeksforgeeks.org/cocktail-sort/.

“Sorting Algorithms/Cocktail Sort.” Sorting Algorithms/Cocktail Sort – Rosetta Code, rosettacode.org/wiki/Sorting_algorithms/Cocktail_sort.

 

Card Trick Algorithm – APCSP

APCSP Card Trick:

Algorithm:

 

 

Citations for other card tricks:

wikiHow. “How to Perform a Card Trick Using Math.” WikiHow, WikiHow, 25 Sept. 2017, www.wikihow.com/Perform-a-Card-Trick-Using-Math.

There are lots of different card tricks on this website but I only looked at the first one, I didn’t choose it because it was too hard and complicated it was hard for me to understand. At first I tried to learn it but I kept messing up.

“Math Card Tricks.” Www.onlinemathlearning.com, www.onlinemathlearning.com/math-card-tricks.html.

Again this website had a lot of different card tricks but I only looked at the top one which is called the AweSum 10. Again this card trick was very complicated so I decided to do a different card trick.

Mobc, and Instructables. “How to Do a Cool and Simple Card Trick.” Instructables.com, Instructables, 1 Dec. 2017, www.instructables.com/id/How-to-do-a-Cool-and-Simple-Card-Trick/.

This card trick was good but I had to choose between the one I did and this one and I choose the one I did because the one I did made the audience think behind the trick more and it was less complicated than this one.

Red-Black Card Trick.” Red-Black Card Trick — Math Fun Facts, www.math.hmc.edu/funfacts/ffiles/10003.1-8.shtml.

This is the card trick I eventually picked. I picked this crd trick because it is really interesting and it involves simple yet hard to figure out math. I explain this card trick in my algorithm. The reason why there will always be the same amount of red cards as black cards in opposite decks is because the when you split the pile into two decks the red and black cards will always be the same because you are simply subtracting the same remaining red cards and black cards. The website I linked here explains the math behind this trick in depth.

 

 

 

Research for APCSP Explore Task Summative – Jacob

Researched and started writing responses on the APCSP Explore Task summative. Researched the controversial effects of GPS.

 

My citations so far:

  1. Stark, Harold. “Since You Asked, Here’s How Google Maps Really Works.” Forbes, Forbes Magazine, 28 Apr. 2017, www.forbes.com/sites/haroldstark/2017/04/26/since-you-asked-heres-how-google-maps-really-works/#985c054dbedd.

 

  1. How Does GPS Work?| Explore, www.physics.org/article-questions.asp?id=55.

 

  1. “When GPS Tracking Violates Privacy Rights.” The New York Times, The New York Times, 22 Sept. 2012, www.nytimes.com/2012/09/23/opinion/sunday/when-gps-tracking-violates-privacy-rights.html.

 

Big data

Searching Rishab

  1. Can’t find anything on Rishab
  2. Don’t know
  3. Nope
  4. Google

Searching myself

  1. Couldn’t find myself
  2. I live in Chung Hom Kok but doesn’t tell you online because you can’t find me online.
  3. Nope
  4. Google

Searching Karan

  1. He has a youtube, high schooler lives in Hong Kong
  2. Hong Kong but can’t find exact address
  3. Not really
  4. Youtube

 

Blown to Bits Chapter 3 summary

In this chapter the author says that the transition from the physical world to the digital world is not as easy as anticipated. A story the author shares is the 2004 incident between an Italian journalist and American soldiers. This shows that some programs have the sense that physical copies are the same as digital copies. After the incident the military realised a report on the digital copy secret information was blacked out but an Italian blogger just unhighlighted the blacked out bits and there was text underneath the blacked out bits.

How can Data be Represented

I was able to do PDF, Jpeg, TIF and PNG.

The resolution size is 1072 by 720 pixels for png, jpeg and tif but it is different for the PDF file.

PDF is 105 kilobytes, the PNG file is 779 kilobytes and the jpeg is 101 kilobytes and the Tiff file is 2.3 megabytes.

The reason the PNG file is so large is because it make the image into multiple layer whilst jpeg and pdf is only one layer. TIFF files are so large because there is no compression of the image when it is saved.

You can’t compress a jpeg to a tiff because a jpeg has already lost it’s quality because it is a jpeg, but you can convert a tiff to a jpeg because a tiff already has its quality.

I found out that pdf are the smallest image files and that tiff are the largest image files and that png files are larger than jpeg and PDF files. gateway-arch

Audio:

Sampling is the rate of which the data is converts from a signal to digital form.

Lossy audio is MP3, WMA

Lossless formats are WAV, FLAC and M4a

The number of bits per second that can be transmitted along a digital network.

Frequency × bit depth × channels = bit rate

Video:

Codec: A digital program used to encode or decode digital data or signals.

Videos that can be used for different devices:

AVI, ASF, MOV

Original video:

New video:

I changed the video size from 6.5 MB to 1.1 MB. So I shrunk it by almost 6 times its original size.

 

 

The Internet and Society

For my project I choose internet censorship, I explain what websites are blocked and modern issues especially with China.

Pros of Internet censorship:

  • Helps with crime, if the government blocks crime websites people won’t do crime because of this
  • Helps with safety of the internet and the country, stops and uprising against the government

Cons of Internet censorchip

  • Obviously freedom of press and speech online is under attack in China
  • Government can manipulate what people read ultimately advancing the government’s agenda.

How the internet is blocked (Connection to what we have learned)

  • DNS filtering and redirection is when blocked domain names are not resolved and the user is redirected
  • URL filtering is when the URL string is scanned for target keywords, China uses this to block access to information regarding the Tiananmen Square protests
  • IP address blocking is access to a certain IP address is denied. If the target Web site is hosted in a shared hosting server, all websites on the same server will be blocked.
  • Network Disconnection is to completely cut off all routers, either by software or by hardware

Details learned to support my opinion

  • Gambling websites and drug websites should be blocked to promote a safer place on the internet and to decrease crime
  • China’s censorship of the press and Tiananmen square is wrong because it violates basic human rights (freedom of press and speech)

 

This Video explains China’s censorship of the internet well
Citations:

“Internet Censorship.” Wikipedia, Wikimedia Foundation, 14 Oct. 2017, en.wikipedia.org/wiki/Internet_censorship.

“How China Has Censored Words Relating to the Tiananmen Square Anniversary.” Public Radio International, www.pri.org/stories/2016-06-03/how-china-has-censored-words-relating-tiananmen-square-anniversary.

Schmidt, Eric, and Jared Cohen. “Web Censorship: the Net Is Closing In.” The Guardian, Guardian News and Media, 23 Apr. 2013, www.theguardian.com/technology/2013/apr/23/web-censorship-net-closing-in.

Toyama, Kentaro. “How Internet Censorship Actually Works in China.” The Atlantic, Atlantic Media Company, 2 Oct. 2013, www.theatlantic.com/china/archive/2013/10/how-internet-censorship-actually-works-in-china/280188/.

“The Advantages Of Internet Censorship Media Essay.” UKEssays, www.ukessays.com/essays/media/the-advantages-of-internet-censorship-media-essay.php.

 

Images:

https://www.google.com.hk/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=0ahUKEwjMhYmmlvfWAhXMp48KHaHoA68QjRwIBw&url=http%3A%2F%2Fmoney.cnn.com%2F2014%2F12%2F30%2Ftechnology%2Fchina-internet-firewall-google%2Findex.html&psig=AOvVaw276rHoSm8_0AF_w5D-6LoX&ust=1508313090134368

https://www.google.com.hk/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=0ahUKEwi5xoe-lvfWAhVGRo8KHRLnA2kQjRwIBw&url=http%3A%2F%2F1039.juicefm.ca%2Fcategory%2Fkelowna-killer-question%2F&psig=AOvVaw0UpKb_Q7QaliQF5l3Y6Qnm&ust=1508313135149081

https://www.google.com.hk/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=0ahUKEwjU3fXMlvfWAhUEP48KHaSeB3EQjRwIBw&url=https%3A%2F%2Fwww.goldenfrog.com%2Fvyprvpn%2Ffeatures%2Fvyprdns&psig=AOvVaw3h2JdAsVf5vVsa36DOfB0d&ust=1508313178449344

https://www.google.com.hk/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=0ahUKEwjQxYXqlvfWAhVFKY8KHZpICfkQjRwIBw&url=https%3A%2F%2Fwww.dreamstime.com%2Froyalty-free-stock-image-disconnect-network-cable-metaphorical-image-danger-internet-image34280186&psig=AOvVaw3iHPHT2gJDQ4Xz0FCBBH9P&ust=1508313241095857

https://www.google.com.hk/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=0ahUKEwjO-Iz3lvfWAhUJp48KHUsdC0sQjRwIBw&url=http%3A%2F%2Ftechpp.com%2F2009%2F11%2F30%2Faccess-blocked-websites-by-bypassing-url-filtering%2F&psig=AOvVaw0kElNiYFgC7zwyRjJ_yixR&ust=1508313261537397

https://www.google.com.hk/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=0ahUKEwixlr-Tl_fWAhWHvI8KHRJIBxQQjRwIBw&url=https%3A%2F%2Fwww.buycpanel.com%2Fhow-to-block-harmful-ip-addresses-using-cpanel%2F&psig=AOvVaw2VuTBKuinmXsc4fMt2loXB&ust=1508313328283944

https://www.google.com.hk/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=0ahUKEwim8rChl_fWAhUGK48KHUO-AEgQjRwIBw&url=https%3A%2F%2Fbetbubbles.com%2Fsociology-of-gambling%2F&psig=AOvVaw2lqb7htg_c3As3Jrqd_yz-&ust=1508313358365263

https://www.google.com.hk/imgres?imgurl=https%3A%2F%2Fwww.lvcriminaldefense.com%2Fwp-content%2Fuploads%2F2015%2F03%2Fburglary.jpg&imgrefurl=https%3A%2F%2Fwww.lvcriminaldefense.com%2Ffelony-charges%2Ftheft-crimes%2Fburglary%2F&docid=rjq6ujODLtoI2M&tbnid=fyiQhcyNiVKrcM%3A&vet=10ahUKEwin-ee7l_fWAhUBOo8KHdxABQ0QMwjVASgAMAA..i&w=800&h=533&safe=strict&bih=776&biw=1440&q=burglary&ved=0ahUKEwin-ee7l_fWAhUBOo8KHdxABQ0QMwjVASgAMAA&iact=mrc&uact=8

https://www.google.com.hk/imgres?imgurl=http%3A%2F%2Fi.imgur.com%2FkBpaaQd.png&imgrefurl=https%3A%2F%2Fgizmodo.com%2Fnorth-koreas-internet-only-has-28-websites-but-they-sur-1786867255&docid=SMOHQ9MZzGfR_M&tbnid=yKRfuqf4EhQj8M%3A&vet=10ahUKEwix2JHIl_fWAhVLOo8KHa3-D30QMwglKAEwAQ..i&w=999&h=942&safe=strict&bih=776&biw=1440&q=pro%20north%20korean%20sites&ved=0ahUKEwix2JHIl_fWAhVLOo8KHa3-D30QMwglKAEwAQ&iact=mrc&uact=8

https://www.google.com.hk/imgres?imgurl=https://upload.wikimedia.org/wikipedia/en/1/17/Muslim_Brotherhood_Logo.png&imgrefurl=https://en.wikipedia.org/wiki/File:Muslim_Brotherhood_Logo.png&h=181&w=186&tbnid=R8qAEqSy1KS2zM:&tbnh=146&tbnw=151&usg=__2aZC_y3e1MvN1NLBp5PuvmOc45I=&vet=1&docid=vPD5z-ZAcd7ToM&itg=1&sa=X&ved=0ahUKEwjIg5XTl_fWAhWJOI8KHQgNBNwQ_B0IgwEwCw

https://www.google.com.hk/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=0ahUKEwiqueHtl_fWAhVJQo8KHdHuABoQjRwIBw&url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FFalun_Gong&psig=AOvVaw081Acc9N-_IUbBOK_LE546&ust=1508313518905534

https://www.google.com.hk/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=0ahUKEwjViLr7l_fWAhWFs48KHWZNDLkQjRwIBw&url=http%3A%2F%2Fzeeko.ie%2Funcategorized%2Finternet-safety-for-kids%2F&psig=AOvVaw1PdirgGr8jNNX48dmfpvCG&ust=1508313543881784

https://www.google.com.hk/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=0ahUKEwjamcCEmPfWAhUBPI8KHRSBDUYQjRwIBw&url=https%3A%2F%2Fcertification.comptia.org%2Fit-career-news%2Fhub%2Fsecurity&psig=AOvVaw1KyQRP87jYtDiMD4s3eH15&ust=1508313565834527

https://www.google.com.hk/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=0ahUKEwjk7vufmPfWAhXDsJQKHYgrBMIQjRwIBw&url=http%3A%2F%2Fwww.looppng.com%2Fcontent%2Fsamoa-freedom-press-or-pressed-freedom&psig=AOvVaw2umRT6hETOyCYtecSLS74u&ust=1508313617422343

https://www.google.com.hk/imgres?imgurl=https%3A%2F%2Fimg.haikudeck.com%2Fmi%2F953fb0eb928c158c9ae400b02520f555.jpeg&imgrefurl=https%3A%2F%2Fwww.haikudeck.com%2Ffreedom-of-speech-education-presentation-d94YXn8P2d&docid=CEYURYfpPHOmmM&tbnid=5brN3vkmBzTXdM%3A&vet=10ahUKEwi3uLWmmPfWAhXKp48KHXZrDCQQMwjwASgJMAk..i&w=515&h=599&safe=strict&bih=776&biw=1440&q=freedom%20of%20speech&ved=0ahUKEwi3uLWmmPfWAhXKp48KHXZrDCQQMwjwASgJMAk&iact=mrc&uact=8

https://www.google.com.hk/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=0ahUKEwjo5sOxmPfWAhWFJpQKHWFZCloQjRwIBw&url=https%3A%2F%2Fwww.quora.com%2FHow-should-have-China-dealt-with-the-Tiananmen-Square-protests&psig=AOvVaw2S9HHAt6hqd1z7sALCR8tE&ust=1508313660102076

https://www.google.com.hk/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=0ahUKEwiE7enFmPfWAhXK6Y8KHccrDIsQjRwIBw&url=http%3A%2F%2Fpngimg.com%2Fimgs%2Fcars%2Fsign_stop%2F&psig=AOvVaw1xUB7jtIxiqbFY4L9Svn2U&ust=1508313703611408

 

 

Abstraction Summative – Jacob

Definition of Abstraction:

A simpler way of representing something

An example of abstraction is google maps it is a simpler way of representing streets.

I made my abstractions by starting at the most complex form of abstraction which was pseudo code. Then I made the pseudo code simpler by just outlining the steps the pseudo code takes which was a flowchart. Finally I made my simplest form of abstraction which was a paragraph explaining the machine. The process of doing this is done by starting of using a complicated form of abstraction and making the representation simpler. Doing this helps programmers write code because they know what to write rather than getting confused by looking at something complicated.

Psuedo code:

Flow chart middle tier of abstraction:

Simplest way of abstraction:

Flowchart (middle tier of abstraction) improved:

 

 

Abstraction can be very useful for programming as demonstrated here. In programming it is easier to create a simpler way of representing the program and code from there instead of using a very complicated form of the code. Abstraction can be used for mathematical problems such as the Konigberg bridges problem where Euler used abstraction to solve the problem by represent the seven bridges more simply. The Konigsberg bridge problem was is it possible only to walk on one time on each bridge in a day and Euler found with the help of his abstraction that it was impossible. The simplest form of abstraction won’t give you details but will provide a good founding base to code and once you start coding the more detailed parts the more complicated abstraction you need.

Konigsberg bridge problem Abstraction image:

Abstraction Code:

https://github.com/theweponyrebel/APCSP/blob/master/Abstraction%20Summaitve.py

My code has different abstraction levels to it one being complex form of abstraction and one being low form of abstraction. I have a print statement and a input variable that are very low forms of abstraction they are low levels of abstractions because they are simple code. My higher forms of abstraction are the function that is a more complex form of abstraction because it is more complicated code.

Why is a high level program easier to understand than a lower-level language in a program?

A high level program will use code that sounds more like english than a lower level program. Also a higher level program will be more streamline and organised rather than a lower level program that might have a lot of if statements and print statements.

 

Sources:

“Seven Bridges of Königsberg.” Wikipedia, Wikimedia Foundation, 27 Aug. 2017, en.wikipedia.org/wiki/Seven_Bridges_of_K%C3%B6nigsberg.

“Flow Chart Symbols.” 重新導向通知, www.google.com.hk/imgres?imgurl=https%3A%2F%2Fwcs.smartdraw.com%2Fflowchart%2Fimg%2Fbasic-symbols.jpg%3Fbn%3D1510011089&imgrefurl=https%3A%2F%2Fwww.smartdraw.com%2Fflowchart%2Fflowchart-symbols.htm&h=454&w=482&tbnid=4Drbvcc8kDxthM%3A&tbnh=160&tbnw=169&usg=__kjJnxbLo-ag444RExWhw2Dol3mw&vet=10ahUKEwje8ejX05zWAhWLzLwKHbdaD20Q9QEIKDAA..i&docid=Zi-LQs9A3wb8KM&sa=X&ved=0ahUKEwje8ejX05zWAhWLzLwKHbdaD20Q9QEIKDAA

“Konigsberg Diagram.” Math.stackexchange.com, www.google.com.hk/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=0ahUKEwidwOrj9Z7WAhUKO7wKHWWABKYQjhwIBQ&url=https%3A%2F%2Fmath.stackexchange.com%2Fquestions%2F1554756%2Fhow-do-i-explain-the-k%25C3%25B6nigsberg-bridge-problem-to-a-child&psig=AFQjCNGe5av29uWaIZvEH8AsTvZpTS7wZw&ust=1505280710504873.