User Tools

Site Tools


opus:fall2011:kpryslop:start

Kyle Pryslopski's Opus

Introduction

In this space you can provide a description of yourself, your pursuits, your interests. To fill out this section, click the edit button off to the right, delete this placement text, and type your original content.

Part 1

Entries

Aug 29, 2011

First day of class. We went over the syllabus and learned about the opus(EVIL) as well as the portfolio.

Sept 16, 2011

We played with linked lists thats all I can remember.

Sept 19 or 23, 2011

On one of these days Matt let us work on things and he put out small fires and babies.

Sept 30, 2011

Today is the last class in the month of September. We are working on stacks at the same time I am working on the opus(EVIL). Matt can't decide what he wants to do. First In Last Out or Last In First Out.

Topics

Keyword 1

Version Control is a system used to track and control changes to a projects's files, in particular to source code, documentation, and web pages.

Commit- Is used to make a change to a project; more formally, to store a change in the repository in such a way that it can be incorporated into future releases of the project.

Checkout- The process of obtaining a copy of the project from a repository.

Update- To ask that others' commits be incorporated into your local copy of the project; that is, to bring your copy “up-to-date”.

Add- Inputs a file into a list of files to be tracked before a commit is made.

Log- A reminder attached to each commit, describing the nature and purpose of the commit.

Keyword 2

Pointers- Point loctations in memory.

Address of- Can be represented by '&' and is what the pointer points to.

Assingment- Points two pointers to the same pointee.

Deferencing- Follows the arrow from the pointer to the pointee.

Keyword 3

Void Pointers- Pointers that do not have a type so they can point to any data type.

Keyword 4

Pointer Arithmetic - Only addition and subtraction operations are allowed to be conducted on pointers.

ex) cha++;

Array- It is the same concept as pointers, the identifier of an array is equivalent to the address of its first element, as a pointer is equivalent to the address of the first element that it points to.

Keyword 5

Null Pointers- A regular pointer of any type which has a special value that indicates that it is not pointing to any valid reference or memory address, the value is the result of type-casting the integer value zero to any pointer type.

Keyword 6

Function Pointers- Passing a function as an argument to another function, since these cannot be passed dereferenced in order to declare a pointer to a function we have to declare it like the prototype of the function, except that the name of the function is enclosed between parentheses () and an asterisk is inserted before the name.

ex) (*proto)(char,char);

Keyword 7

Static allocation vs. Dynamic allocation- Statically allocated variables have their storage allocated and initialized before main starts running and are not deallocated until main has terminated. Dynamic allocation the program determines how much memory it needs at run time, and allocate exactly the right amount of storage.

Keyword 8

Memory allocation (malloc(), new)- malloc is a subroutine for performing dynamic memory allocation in the C and C++ programming languages, though its use in C++ has been largely superseded by operators new and new[]. malloc is part of the standard library for both languages and is declared in the stdlib.h header although it is also declared within the std namespace via C++'s cstdlib header.

Keyword 9

Memory De-allocation (free(), delete)- The delete operator calls the destructor of the given argument, and returns memory allocated by new back to the group. A call to delete must be made for every call to new to avoid a memory leak. After calling delete the memory object pointed to is invalid and should no longer be used. Many programmers assign 0 (null pointer) to pointers after using delete to help minimize programming errors.

Keyword 10

Structures- A structured type that aggregates a fixed set of labelled objects, possibly of different types, into a single object. A struct declaration consists of a list of fields, each of which can have any type. The total storage required for a struct object is the sum of the storage requirements of all the fields, plus any internal padding.

Keyword 11

Structure pointer- Pointers can be used to refer to a struct by its address. This is particularly useful for passing structs to a function by reference.

Keyword 12

Linked Lists- a way to store data with structures so that the programmer can automatically create a new place to store data whenever necessary.

Objectives

Objective 1

Discuss the representation and use of primitive data types and built-in data structures

Method

How well I have done understanding what we have done in class.

Measurement

What I have learned is how to make and edit a linked list.

Analysis

  • Not that got to start.
  • There is a lot of room for imporvement.
  • Yes.
  • Yes.
  • Tell exectly what we will learn in it.

Experiments

Experiment 1

Question

What is the question you'd like to pose for experimentation? State it here.

Resources

Collect information and resources (such as URLs of web resources), and comment on knowledge obtained that you think will provide useful background information to aid in performing the experiment.

Hypothesis

Based on what you've read with respect to your original posed question, what do you think will be the result of your experiment (ie an educated guess based on the facts known). This is done before actually performing the experiment.

State your rationale.

Experiment

How are you going to test your hypothesis? What is the structure of your experiment?

Data

Perform your experiment, and collect/document the results here.

Analysis

Based on the data collected:

  • was your hypothesis correct?
  • was your hypothesis not applicable?
  • is there more going on than you originally thought? (shortcomings in hypothesis)
  • what shortcomings might there be in your experiment?
  • what shortcomings might there be in your data?

Conclusions

What can you ascertain based on the experiment performed and data collected? Document your findings here; make a statement as to any discoveries you've made.

Experiment 2

Question

What is the question you'd like to pose for experimentation? State it here.

Resources

Collect information and resources (such as URLs of web resources), and comment on knowledge obtained that you think will provide useful background information to aid in performing the experiment.

Hypothesis

Based on what you've read with respect to your original posed question, what do you think will be the result of your experiment (ie an educated guess based on the facts known). This is done before actually performing the experiment.

State your rationale.

Experiment

How are you going to test your hypothesis? What is the structure of your experiment?

Data

Perform your experiment, and collect/document the results here.

Analysis

Based on the data collected:

  • was your hypothesis correct?
  • was your hypothesis not applicable?
  • is there more going on than you originally thought? (shortcomings in hypothesis)
  • what shortcomings might there be in your experiment?
  • what shortcomings might there be in your data?

Conclusions

What can you ascertain based on the experiment performed and data collected? Document your findings here; make a statement as to any discoveries you've made.

Experiment 3

Question

What is the question you'd like to pose for experimentation? State it here.

Resources

Collect information and resources (such as URLs of web resources), and comment on knowledge obtained that you think will provide useful background information to aid in performing the experiment.

Hypothesis

Based on what you've read with respect to your original posed question, what do you think will be the result of your experiment (ie an educated guess based on the facts known). This is done before actually performing the experiment.

State your rationale.

Experiment

How are you going to test your hypothesis? What is the structure of your experiment?

Data

Perform your experiment, and collect/document the results here.

Analysis

Based on the data collected:

  • was your hypothesis correct?
  • was your hypothesis not applicable?
  • is there more going on than you originally thought? (shortcomings in hypothesis)
  • what shortcomings might there be in your experiment?
  • what shortcomings might there be in your data?

Conclusions

What can you ascertain based on the experiment performed and data collected? Document your findings here; make a statement as to any discoveries you've made.

Part 2

Entries

Oct 3, 2011

First class of October and yeah stuff going on. Just to remind Matt I will not be here friday. Function Pointers.

October 14th, 2011

I do not know what we did on friday so today is up in the air for me. Sideways stacks yo? Now we work and this is fine with me.

October 17, 2011

Week eight and working on stuff and waiting for one email from a teacher. Joe's class was cancelled :), poor Joe.

October 24, 2011

First day of the last full week of October. Signals!!!

data Topics

Keyword 1 B

Doubly Linked Lists- Linked data structures that consists of a set of sequentially linked nodes. Each node contains two fields that are references to the previous and to the next node in the sequence of nodes. The beginning and ending nodes' previous and next links, respectively, point to some kind of terminator, typically a sentinel node or null, to facilitate traversal of the list.

Keyword 2 B

Stack- Last in, first out (LIFO) abstract data type and data structure. Can have any abstract data type as an element, but is characterized by only three fundamental operations: push, pop and stack top.

Array-based- A certain amount of memory is determined before used.

Linked List-based- Memory is not determined before hand but can be.

Keyword 3 B

Pushing- Adds a new item to the top of the stack, or initializes the stack if it is empty. If the stack is full and does not contain enough space to accept the given item, the stack is then considered to be in an overflow state.

Keyword 4 B

Popping- Removes an item from the top of the stack. A pop either reveals previously concealed items, or results in an empty stack, but if the stack is empty then it goes into underflow state (It means no items are present in stack to be removed).

Keyword 5 B

Top- gets the data from the top-most position and returns it to the user without deleting it. The same underflow state can also occur in stack top operation if stack is empty.

Keyword 6 B

Overflow condition- When the stack is full and can not take any more input. Push is the cause of this.

Keyword 7 B

Underflow condition- When the stack has no data in it. Pop and Top cause this.

Keyword 8 B

LIFO or FIFO?- Stacks are a LIFO.

Keyword 9 B

Queues- particular kind of collection in which the entities in the collection are kept in order and the principal (or only) operations on the collection are the addition of entities to the rear terminal position and removal of entities from the front terminal position. This makes the queue a First-In-First-Out (FIFO) data structure.

Array-based- A certain amount of memory is determined before used.

Linked List-based- Memory is not determined before hand but can be.

Keyword 10 B

Enqueuing- Placing an item in a queue.

Keyword 11 B

Dequeuing- Removing an item from a queue.

Keyword 12 B

Overrun conditions- When the queue is full and can not take any more input.

Underrun conditions- When the queue has no data in it.

data Objective

Objective B

Describe how the data structures are allocated and used in memory

Method

The definitions on the opus.

Measurement

The definitions are very well done.

Analysis

  • Good
  • Yes
  • Yes
  • Yes
  • No the course objective is fine.

Experiments

Experiment 1 B

Question

What happens when you try to delete a number by zero?

Resources

My grandmother had an error message that got me thinking about this.

Hypothesis

I think that if a program was made to do this it would get a seg fault or a zero as the answer.

Experiment

#include<stdio.h>
int main()
{
        int num;
        num = 0;
        printf("Please enter a value: ");
        scanf("%d", &num);
        num = num / 0;
        printf("The answer is: %d\n", num);
        return(0);
}

Data

Please enter a value: 9 Floating point exception

Analysis

Based on the data collected: My hypothesis was worng.

Conclusions

Dividing by zero, you will not get what you thing you should.

Experiment 2 B

Question

What do you need to do to get decimals in a math program?

Resources

Experiment 1 B

Hypothesis

All you need to do is change any ints in the program to floats.

Experiment

#include<stdio.h>
int main()
{
        float a = 0;
        float b = 0;
        float c = 0;
        float d = 0;
        float e = 0;
        float num = 0;
        printf("Please enter a value for a: ");
        scanf("%f", &a);
        printf("Please enter a value for b: ");
        scanf("%f", &b);
        printf("Please enter a value for c: ");
        scanf("%f", &c);
        printf("Please enter a value for d: ");
        scanf("%f", &d);
        printf("Please enter a value for e: ");
        scanf("%f", &e);
        num = ((a + b) * (c - d)) / e;
        printf("The answer is: %f\n", num);
        return(0);
}

Data

The answer to the problem ((1+2) * (3-4)) / 5 = 0(with ints) or 1(with floats)

Analysis

Based on the data collected: My hypothesis was wrong.

Conclusions

What you really need to do is change all ints to floats and change all (%d)s to (%f)s.

Experiment 3 B

Question

6/2(1+2)=?

Resources

Tyler.

Hypothesis

The answer is 1.

Experiment

#include<stdio.h>
int main()
{
        int num;
        num = 6 / 2 * (1 + 2);
        printf("The answer is: %d\n", num);
        return(0);
}

Data

The computer has a certain way of answering the problem.

Analysis

Based on the data: My hypothesis was wrong.

Conclusions

People can not agree on an answer.

Part 3

Entries

Novemeber 11, 2011

Work day.

November 18, 2011

Bubbles and pie oh and no Karl. Happy thoughts.

November 21, 2011

Work on stuff and played cards, won the first game.

November 28, 2011

Trying to finish the Opus and got the EOCE.

data Topics

Keyword 1C

LIFO or FIFO?- Queues are FIFO.

Keyword 2C

Computational Complexity- a branch of the theory of computation in theoretical computer science and mathematics that focuses on classifying computational problems according to their inherent difficulty, and relating those classes to each other.

Keyword 3C

Big O notation- used to describe the limiting behavior of a function when the argument tends towards a particular value or infinity, usually in terms of simpler functions.

Theta- the function, f(n) is bounded both from the top and bottom by the same function, g(n).

bounds- Upper and lower bounds, observed limits of mathematical functions.

Keyword 4C

Sorting Algorithms- an algorithm that puts elements of a list in a certain order.

Keyword 5C

Selection sort algorithm- a sorting algorithm, specifically an in-place comparison sort.

http://en.wikipedia.org/wiki/Selection_sort

Keyword 6C

Bubble sort algorithm- also known as sinking sort, is a simple sorting algorithm that works by repeatedly stepping through the list to be sorted, comparing each pair of adjacent items and swapping them if they are in the wrong order.

http://en.wikipedia.org/wiki/Bubble_sort

Keyword 7C

Insert sort algorithm- a simple sorting algorithm: a comparison sort in which the sorted array (or list) is built one entry at a time.

http://en.wikipedia.org/wiki/Insertion_sort

Keyword 8C

Quick sort algorithm- a sorting algorithm developed by Tony Hoare that, on average, makes O(nlog n) (big O notation) comparisons to sort n items. In the worst case, it makes O(n2) comparisons, though this behavior is rare.

http://en.wikipedia.org/wiki/Quicksort

Keyword 9C

Merge sort algorithm- an O(n log n) comparison-based sorting algorithm. Most implementations produce a stable sort, meaning that the implementation preserves the input order of equal elements in the sorted output. It is a divide and conquer algorithm.

http://en.wikipedia.org/wiki/Merge_sort

Keyword 10C

Binary Search algorithm- finds the position of a specified value (the input “key”) within a sorted array

Keyword 11C

Trees- a widely-used data structure that emulates a hierarchical tree structure with a set of linked nodes.

Binary Trees- a tree data structure in which each node has at most two child nodes, usually distinguished as “left” and “right”.

nodes- a structure which may contain a value, a condition, or represent a separate data structure (which could be a tree of its own).

parents- A node that has a child.

children- Each node in a tree has zero or more child nodes, which are below it in the tree (by convention, trees are drawn growing downwards).

Keyword 12C

insertion- the inserting of a node into a tree in a certain spot.

data Objective

Objective

State the course objective; define what that objective entails.

Method

State the method you will use for measuring successful academic/intellectual achievement of this objective.

Measurement

Follow your method and obtain a measurement. Document the results here.

Analysis

Reflect upon your results of the measurement to ascertain your achievement of the particular course objective.

  • How did you do?
  • Room for improvement?
  • Could the measurement process be enhanced to be more effective?
  • Do you think this enhancement would be efficient to employ?
  • Could the course objective be altered to be more applicable? How would you alter it?

Experiments

Experiment 1C

Question

Does a computer know that a negative number raised to an even power will make an even answer?

Resources

Internet.

Hypothesis

I believe that a computer is not able to compute that without ()'s.

Experiment

#include<stdio.h>
#include<math.h>
int main()
{
        int x, y, z = 0;
        printf("Please input a x value. \n");
        scanf("%d", &x);
        printf("Please input a y value. \n");
        scanf("%d", &y);
        z = pow(x,y);
        printf("The value for z is: %d\n", z);
        return(0);
}

Data

The computer does know how to but if the x is raised to a -y it dont.

Analysis

Based on the data collected: My hypothesis was wrong.

Conclusions

I should not underestimate the power of a computer.

Experiment 2C

Question

What is the question you'd like to pose for experimentation? State it here.

Resources

Collect information and resources (such as URLs of web resources), and comment on knowledge obtained that you think will provide useful background information to aid in performing the experiment.

Hypothesis

Based on what you've read with respect to your original posed question, what do you think will be the result of your experiment (ie an educated guess based on the facts known). This is done before actually performing the experiment.

State your rationale.

Experiment

How are you going to test your hypothesis? What is the structure of your experiment?

Data

Perform your experiment, and collect/document the results here.

Analysis

Based on the data collected:

  • was your hypothesis correct?
  • was your hypothesis not applicable?
  • is there more going on than you originally thought? (shortcomings in hypothesis)
  • what shortcomings might there be in your experiment?
  • what shortcomings might there be in your data?

Conclusions

What can you ascertain based on the experiment performed and data collected? Document your findings here; make a statement as to any discoveries you've made.

Experiment 3C

If you're doing an experiment instead of a retest, delete this section.

If you've opted to test the experiment of someone else, delete the experiment section and steps above; perform the following steps:

State Experiment

Whose existing experiment are you going to retest? Prove the URL, note the author, and restate their question.

Resources

Evaluate their resources and commentary. Answer the following questions:

  • Do you feel the given resources are adequate in providing sufficient background information?
  • Are there additional resources you've found that you can add to the resources list?
  • Does the original experimenter appear to have obtained a necessary fundamental understanding of the concepts leading up to their stated experiment?
  • If you find a deviation in opinion, state why you think this might exist.

Hypothesis

State their experiment's hypothesis. Answer the following questions:

  • Do you feel their hypothesis is adequate in capturing the essence of what they're trying to discover?
  • What improvements could you make to their hypothesis, if any?

Experiment

Follow the steps given to recreate the original experiment. Answer the following questions:

  • Are the instructions correct in successfully achieving the results?
  • Is there room for improvement in the experiment instructions/description? What suggestions would you make?
  • Would you make any alterations to the structure of the experiment to yield better results? What, and why?

Data

Publish the data you have gained from your performing of the experiment here.

Analysis

Answer the following:

  • Does the data seem in-line with the published data from the original author?
  • Can you explain any deviations?
  • How about any sources of error?
  • Is the stated hypothesis adequate?

Conclusions

Answer the following:

  • What conclusions can you make based on performing the experiment?
  • Do you feel the experiment was adequate in obtaining a further understanding of a concept?
  • Does the original author appear to have gotten some value out of performing the experiment?
  • Any suggestions or observations that could improve this particular process (in general, or specifically you, or specifically for the original author).
opus/fall2011/kpryslop/start.txt · Last modified: 2014/01/19 09:20 by 127.0.0.1