Monday, December 15, 2014

Activity 1.3.8 While Loops


  1. If you change between 1 and 20 from the previous program to between 1 and 6000, how many guesses will you need to guarantee that you have the right answer? Explain.
You will need 6000 guesses to be guaranteed that you have the right answer because there are 6000 integers in the range from 1-6000. Thus, you need one guess for each integer.
  1. Describe the difference between a while loop and a for loop.
The for statement iterates through a collection of values, whereas the while statement loops through until a condition is False.

Friday, December 12, 2014

Activity 1.3.7 For Loops


Sometimes code using an iterative loop can be written without a loop, simply repeating the iterated code over and over as separate lines in the program. Explain the disadvantages of developing a program this way.

The disadvantages of repeating the iterated lines of code multiple times is the fact that the coder loses both time and efficiency. Also if an error were to occur somewhere in the program, it would be more difficult to find the erroneous line of code because there would be so many more to choose from as opposed to using loops.

Name a large collection across which you might iterate.

One example of a large collection across which one might iterate is a collection of books. In this, the program would have the list of all of the books, and would function with iterations to search for one specific book based on the input that the user has entered.

What is the relationship between iteration and the analysis of a large set of data?

Iteration is used in the analysis of a large set of data in the fact that it goes through the list of data to find a specific key, element, line, or whatever is needed in that particular code. Thus, iteration is a very helpful and beneficial method in analyzing a large set of data. If there was no iteration, searching a list of integers for one specific integer would be time consuming, so luckily iteration is around to ease the coding and lessen the time of work for the programmers.

Friday, December 5, 2014

Activity 1.3.6 Tuples and Lists



1. Consider a string, tuple, and list of characters.
In []: a = 'acbde'
In []: b = ('a', 'b', 'c', 'd', 'e')
In []: c = ['a', 'b', 'c', 'd', 'e']
The values of a[3], b[3], and c[3] are all the same. In what ways are a, b, and c different? 
All tuples and lists are made up of strings, so they are longer and more complex. Also, tuples are immutable while lists are mutable.
2.  Why do computer programming languages almost always have a variety of variable types?    
Computer programming languages have a variety of variable types so that they can operate in an efficient manner appropriate to the scenario at hand. For example, Boolean is used for occasions where True and False are the only possible outputs.
3.  Why can't everything be represented with an integer?
Everything can't be represented with an integer because there aren't enough integers to represent everything such as letters. If all we used was integers, everybody would probably have a seizure.

Wednesday, December 3, 2014

Twitter Checker



  • Line 1 is defining the function "check_twitter"
  • Line 2 sets "message" equal to the user's input after they are prompted with "Enter Tweet here:"
  • Line 3-4 say that if the message is longer than 140 characters, the console will return with the message "Sorry, your tweet is longer than 140 characters; please try again."
  • Line 5-6 say that if either a comma, an exclamation point, or a question mark are missing from the user's tweet, the console will return with the message "Sorry, you seem to be missing either: , ! or ? Please try again." This will only occur once the tweet is less than 140 characters.
  • Lines 7-8 say that if the tweet meets all of the guidelines, the console will return with the message "Great, thanks for tweeting!"
Conclusion Questions: 


1.       How many characters are in this sentence? Does it matter whether Python is storing the string as one byte per character or four bytes per character?
It depends on which language the code is to be written in; some languages such as English use one byte per character, while Unicode uses four bytes per character.

2.      This question asks you about something you have not learned. In fact, the question is asking about details that go beyond what you will learn in this course. However, wondering what is going on at a lower level of abstraction – and talking about it – can be a useful strategy when learning about computing.

Describe what you think occurs in memory when the following code is executed.

In []: a = 'one string'
In []: b = 'another'
In []: c = a[:3] + ' and ' + b
In []: print(c[6:10])

This code creates a string "c" that adds the first 3 characters of string "a" to "and", and to the entire string "b". Thus string "c" would be "one and another".
The code would print "d an".

Friday, November 21, 2014

Blown to Bits Chapter 2 Questions



Blown to Bits Chapter 2 Questions


1.) Critique the quote, “We accept our loss of privacy in exchange for efficiency, convenience, and small price discounts” and explain how the quote makes you feel.

2.) Compare this quote to a real-world example: “Meanwhile, international terrorism has made the public in most democracies more sympathetic to intrusive measures intended to protect our security.”

3.) Identify the name of the book written by Katherine Albrecht and Liz McIntyre and summarize what it contains.

4.) Analyze the Privacy Act; was it effective? Why or why not?

5.) Predict how future governments may help to counteract this privacy predicament. Do you think it will escalate, or will society return to its state of privacy?

Sunday, November 9, 2014

Brytton and Matt's App

Photo Share!
Designer Screen of the App
  1. In deciding which type of app to create, Matt and I went through the simple process of brainstorming. In that process, we came up with a bunch of possibilities of what kind of app we could make, and how we could go about doing it. Thus, the brainstorming process was the most useful to us because it allowed us to explore a great number of opportunities and, ultimately, choose an idea which we believed we could fulfill within the given time window. 
  2. I believe that Matt and I worked very well together due to the fact that there were never any arguments or significant misunderstandings. In order to work to the best of our abilities in the partnership, we decided to do all of the work on my computer in order to prevent confusion or future compilation of projects.  Ergo, all of the app-inventing work was done on my computer, while Matt's computer was used primarily for outside information and research that was needed for the progress of our app. By doing it this way, we were able to complete the app in a more timely fashion because we were able to do two things simultaneously. 
  3. The primary problem of our app was having the ability to free-draw an image and then share it through means of SMS-messaging or social media. Although the sharing component app was an arduous task, we ultimately overcame our dilemmas with the help of Scrum-Master Palmer. Thus, our app does everything that we originally intended for it to do.
  4. a.) One problem Matt and I encountered during the creation of the app was how to get the canvas image to send to someone via text messaging. However, as it turns out, one cannot simply apply the canvas to the texting component of the app because it is not a valid message. To solve this problem, we (with the help of Mr. Palmer) implemented a Tiny Database and the Share component so that the image would just be uploaded onto any social media or communication platforms available on the Android device.                                                           b.)Another problem Matt and I had, although minor, was how to make the app so that the user would be able to draw whatever shape they wanted, as opposed to just circles or straight lines. In order to overcome this problem, we troubleshooted until we discovered the DrawLine component ad how it really works. This component now allows the user to free-draw any shape.
    This is an image of the DrawLine code we used in our app which helped to solve our drawing problem. What this code is saying is that when the user touches the canvas, it sets the paint color to whatever the colored sliders are set to, and draws a line. To draw the line, the app takes the coordinates of the user's finger position ad systematically connects that point to a new point which the user drags their finger to. Although this system of connecting the dots could work quicker to get a smoother drawing, it works well enough for the user to get the gist of it.

    This image is the code which corresponds to our sharing problem that we faced. What this code is saying is that when the Send button is clicked, the app stores the image of the Canvas onto the Tiny Database under the name "filename". Then, the app changes the previous Database file to the Sharing file which can be shared via virtually any social media or messaging app the Android device has. For example, if the user had the desire to, they could draw a quick doodle and post it onto their Facebook wall to share with all of their friends. 
    5. If Matt and I were given more time to create this app, we would have improved it in a few different ways. For example, we would make the app so that the user would be able to alter the thickness of the lines being drawn. Another thing we would add would be that the user would be able to upload an existing image into the app, making it the canvas, and then draw over that image. A final thing we would improve on would be the creation of the feature which allows the user to add text to the image in order to write messages or captions.                                         Link to the app: http://ai2.appinventor.mit.edu/#6136589174439936

Thursday, October 16, 2014

"Blown to Bits" Responses to Tyler Thompson

Brytton Burnside
"Blown to Bits" Responses
Responses to Tyler Thompson's Questions
Define the term “bits” where does it occur?
A bit, also known as a binary digit,  is a unit of digital information expressed as either a "1" or a "0". Bits are stored on the disks of home computers, data centers in large corporations, and everywhere in between.
Would you allow location services or providers to determine your location in case of emergency? (Justify your answer)
Yes, I would allow for my cell phone service providers to enable my location services because, in the event of an accident, they would be able to successfully identify my whereabouts so that help can come as soon as possible.
Justify how our modern technology impact our lives and state an example.
Modern technology impacts our daily lives by providing us with many luxuries and conveniences that otherwise would be impossible. For example, if I don't know something, instead of going to the closest library to search for the book that would answer my question, I can just look the problem up on the Internet. This saves time, gives me a more accurate and up-to-date answer, and ensures that I would get the information regardless of whether or not the book is actually in the library.
How would you respond, If personal pictures would appear on the internet.
It would ultimately depend on the content of said pictures. If they were just of me hanging out with friends, or at some tourist location, it wouldn't be that bad because they aren't detrimental to me in any way. I could care less if someone saw a picture of me at Letchworth State Park or something because it's just a picture. However, if the picture was more personal to my life, like family photos that are only to be shared with my family members, I would not appreciate if those pictures were put on the Internet. Since they are supposed to be private, nobody else has the need to see my business.

Response to "Computing will transform society"

I agree with this statement because computing is indeed changing the way that the world functions on a daily basis. For example, advancement in computing helps save time, reduce costs, make people smarter, connecting more people, and help save lives. Computing reduces costs by supplying information on Google, music and videos on Youtube, and games on various websites. By doing so, people no longer have the need to buy books, music, games, etc. thus saving money. Computing can save lives now because of location services, GPS, and other various tracking programs that can help find out where people are when they go missing. Lastly, computing helps to connect people from various parts of the world through social media, e-mail, and gaming sites. Thus, if computing never existed, the world would still go on, but at a slower, more inefficient way.

Tuesday, October 14, 2014

"Blown to Bits" Chapter One with Erik LaCourt

Brytton Burnside and Erik LaCourt
Blown to Bits

1. As technology advances, the ways in which people go about their day-to-day lives are becoming more and more digital.

2.  a.) Identify the difference between exclusive and rivalrous bits.
     b.) Based on your opinion, can a computer make mistakes, or are they perfect? Justify your answer.
     c.) Draw a Venn diagram regarding the pros and cons of having advanced technology.
     d.) Summarize Moore's Law and the advancement of processing power.

Monday, October 6, 2014

Pokemon Cave Game

Brytton Burnside


During the project, I believe all three of us worked very well together, helping each other out when one of us didn't completely understand something. One of the things I learned from this project was how to make different sprites work together. In this instance, we had to make many black "curtain-like" sprites in order to cover up the rest of the cave while the player ventures through the levels. Thus, we had to figure out how to make the curtains move with the player. Due to time constraints however, we were unable to implement everything we wanted to originally in order to make the game much better.