Monday, November 14, 2016

Ch 3 Stage 4 reflections

Define efficiency in programming.
When we are trying to be "efficient" in our programming what are some (valuable) resources we might be concerned with?  Why does it matter?

I think efficiency in programming is using the minimum amount of code to run a program with the minimum amount of resources needed. The resources we might be concerned with is storage space, amount of ram used, and how much computing power your program requires. It matters because if your computer uses too many of one of these resources, it will slow down the program and any other program being used on the user's computer. This will end up with frustration from the user, and drive them away from your program.


Thought Prompt: What is the “most efficient” way to program the solution for the 3x3 grid?
I know for sure that my solution was not the most efficient, but I think that the most efficient would be a program that minimizes right turns. Right turns take up 3 commands, and cutting down on those would be the easiest way to cut down on code.


  • What surprised you about programming with such a small set of basic commands?
I was surprised there  was no right turn.

  • Were you able to be creative with such a limited set of tools?

I was not very creative, but looking back, if I started out the second program with a right turn, and made the box the opposite direction, it would create 3 left turns  and a right, instead of 4 right turns, which is 12 left turns.

  • What was most frustrating about this activity? If you could add one additional simple command, what would it be, and why?
It was frustrating not having a right turn. I would add a right turn command, because it would cut down on a lot of left turn commands needed.

  • Draw (on paper) the simplest image you can that we would be unable to create with our “building block” commands, and explain why it would be impossible to create.
One simple image would be a triangle. The program is unable to create angled lines.



  • Draw a second image we would be unable to create with the given simple commands, but for a different limiting reason than you cited in the first drawing
One other image would be a circle. The program is unable to draw curved lines.

Thursday, November 10, 2016

Sorting Algorithm Reflection

Write a human machine language program that: Repeatedly shifts the left hand to the right until it finds a 5 or 6 The program should stop when the left hand is at (or past) the end of the list, or it finds a 5, or it finds a 6.

1
Shift LH right
2
if LHCard EQ 5, jump to line 6
3
if LHCard EQ 6, jump to line 6
4
if LHPosition EQ 7, jump to line 6
5
jump to line 1
6
stop



Find min:


1
jump to line 3 if RHand LT LHand
2
shift RHand right
3
move LHand to RHand if RHand LT LHhand
4
jump to line 1 if RHPos NE 7
5
Stop

When working with your partner in class, what challenges did you face in writing your algorithm? Were you able to solve it? If yes, then How did you solve it?  

     One challenge we had to solve was when our partition algorithm got stuck in a infinite loop. It would keep going through the lower value cards with no stop point. To fix this, we made it so the cards don't go to position 0 if they were smaller than the initial card value, and instead stayed in their original position. That way, we could end the "program" when the left hand reached the card at position 0.

Make connections with our algorithms and previous coding experience we have:
What programming statements have you used in the past that you would use in writing your algorithms?  Have you written similiar programs?  If yes write the programs that you remember writing.(you are not giving me the code just making connections here and remembering what you have done)

     Some statements I would use are if, >, <, =, and while loop. I think I have written a program in the past to sort numbers.


Wednesday, November 9, 2016

Minimum Card Algorithm Reflection

  • “How do you know when to stop?”
Our instructions told them to stop when they ran out of new cards or picked up a ace of diamonds

  • “Do your instructions state where and how to start?”
Our instructions told them how to start, but not where. They could choose wherever they wanted to start.

  • “Is it clear where to put cards back down after you’ve picked them up?”
It is specified to put the cards back into their original positions.



“As we look at these algorithms you came up with, we can see they are not all the same. However, there are common things that you are all making the human machine do and commonalities in some of your instructions. Can we define a language of common Human Machine commands for moving cards around? What are the commands or actions most of these instructions have in common?”

We could define a language to move cards around. Common commands and actions would be: move, compare, if, place, pick up, and repeat.


Feedback: The feedback we got was that we had no end point. It kept telling them to pick up cards, but we never specified new cards, so they were stuck in an infinite loop.

Monday, November 7, 2016

Lego Reflection

  • Were you always able to create the intended arrangement? Were your instructions as clear as you thought?”
We were not always able to create the arrangement and our instructions weren’t as clear as we thought.
  • “Why do you think we are running into these miscommunications? Is it really the fault of your classmates or is something else going on?”
I think these miscommunications come from instructions that weren't clear enough. It wasn’t the fault of our classmates because they might have made assumptions from their experiences building their object.

  • If we were going to change human language to improve our odds of succeeding at this activity, what types of changes would we need to make?
I would make it clearer where each piece went. I think that our description of the pieces were good, but people got stuck on where to put them.

Friday, November 4, 2016

Data story reflection

The data was collected over the period of a 11 days, through an online survey that put the data into google sheets. 8 people answered this quiz almost every day for the time period of the collection. It asked questions such as, how are you feeling, how many hours you slept, how many hours you spent relaxing, how many hours you spent working, how you felt, if you were an only child or had siblings, and what you did to relax.

To create my data visualization, I used google sheets to organize and find trends in my data. With the use of pivot tables, I was able to compare data and find correlations. I then took the data that had a relationship, and put it into a new sheet and cleaned the data into a format that was more graphing friendly. Using the graphs function, I was able to more clearly show the trends in the data.

From our data, I found that hours spent working and sleeping had a relationship. In my graph, as hours spent working goes down, hours spent sleeping goes up. My explanation for this is that people who spend more time working often work late into the night, cutting into their sleep time. If they spend 10 hours working and 2 hours sleeping, there is a high chance that they stayed up all night working on something.

To the people who only slept 3-5 hours, I recommend that they go to sleep earlier, even if they still have work to do. A teacher will understand that getting sleep is essential for teenagers, and if they are staying up until 4 in the morning doing homework, they will probably let you pass on that homework. Another suggestion would be to get your homework done before relaxing. If you stay up until 3 am doing homework, when you were playing video games until 10 pm, that's something that needs to change. Getting more sleep is crucial for teenagers. Studies have shown that teenagers need at least 8 hours of sleep per night to be healthy. My recommendation is strongly supported by my data, but would need further investigation to be sure. Adding a section of asking when that person fell asleep and when they woke up would make things clearer. That way, it would show if people were going to sleep really late, or had to wake up early to go to school.


Thursday, November 3, 2016

Clean Data reflection Unit 2 Stage 13

Write in your blogs what you did to clean up the data and respond to the following prompt in your blog with the title Unit 2 Stage 13

“In order to analyze data with a computer, we need to clean the data first. Based on your experience today, would you say that data analysis is a perfectly objective process? Why or why not?”

To clean up the data, I first made sure all of the numbers were in the same format. One person did a range of numbers of 1-2 and 3-9, so I averaged them and put in 1.5 and 6. For the free form text answers, I split them up into categories such as netflix, games, music, and put a 1 there if they did it. The feeling free form text were mostly categorized, but I generalized it even more by making the categories, good, bad, and ok.

I think data analysis is not a perfectly objective process. You are the one who is deciding what category to put it in. Some people might have different ideas of what category it should go in, so it's not perfectly objective. 

Wednesday, November 2, 2016

Data visualization


  

1. The dataset I chose to visualize was the Hour Created vs Retweet Count. It compared the amount of retweets to the hour it was created.

2. The pattern found in the data implies that tweets around mid day to night (1-10 pm) get retweeted the most. This is shown by the spike in retweet numbers starting around 1 pm.

3. It can be assumed that after 1 pm is usual twitter hours for the U.S. It would make sense because that is when kids start to get out of school and they are a large chunk of the users of Twitter. Interestingly there is a spike of retweets of tweets made at 3 in the morning, but I couldn't really come up with an explanation for it.