User Tools

Site Tools


blog:fall2015:bboynton:journal

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
blog:fall2015:bboynton:journal [2015/10/11 20:34] wedgeblog:fall2015:bboynton:journal [2015/12/01 04:46] (current) – [Week 11] bboynton
Line 52: Line 52:
 On Thursday we went over something called metrics. This is a graph Matt made based on when the class worked on the projects and for how long we work on it for. It is interesting to see and I am sure I will check it out every week. After we looked at the first metrics we decided to do a work day again. I was able to get all the way through display backwards with no problems. After that I was able to get most of search done. I figured out it had to do with an infinite loop that caused a segment fault. For copy I I also ran into a problem for segment fault. This was because I forgot to check for a NULL list when I started. I checked for an empty list first with myList->first!=NULL and since myList had no first in it, it would seg fault this was fixed by putting an if statement with  myList==NULL then a else if for myList->first!=NULL. All my other problems had to do with typing myList->after instead of myList->first or last, or mylist instead of myList. So most of the time it had to do with my own spelling mistakes or misuse of words in the code that caused my problems not that I do not understand the function. I am grasping the concept for linked list and nodes and I am having a good time coding these projects. My work load is starting to fall into a schedule so I hope to get the projects done sooner than the due date.  On Thursday we went over something called metrics. This is a graph Matt made based on when the class worked on the projects and for how long we work on it for. It is interesting to see and I am sure I will check it out every week. After we looked at the first metrics we decided to do a work day again. I was able to get all the way through display backwards with no problems. After that I was able to get most of search done. I figured out it had to do with an infinite loop that caused a segment fault. For copy I I also ran into a problem for segment fault. This was because I forgot to check for a NULL list when I started. I checked for an empty list first with myList->first!=NULL and since myList had no first in it, it would seg fault this was fixed by putting an if statement with  myList==NULL then a else if for myList->first!=NULL. All my other problems had to do with typing myList->after instead of myList->first or last, or mylist instead of myList. So most of the time it had to do with my own spelling mistakes or misuse of words in the code that caused my problems not that I do not understand the function. I am grasping the concept for linked list and nodes and I am having a good time coding these projects. My work load is starting to fall into a schedule so I hope to get the projects done sooner than the due date. 
  
 +===Week Seven===
  
-====MONTH Day, YEAR====+This is the weeks before break and during break week.
  
-This is a sample format for a dated entry. Please substitute the actual date for "Month DayYear"and duplicate the level 4 heading to make additional entries.+projects due: sll2sll3sll4
  
-As an aid, feel free to use the following questions to help you generate content for your entries:+10/6/15
  
-  * What action or concept of significance, as related to the course, did you experience on this date? +on Tuesday before break we talked about sll2. We went over the assignment and the functions we had to write. There were obtain clear remove swap and sort. Clear uses the remove node function to make a populated list into an empty list. remove list uses clear to an empty list then makes a NULL list. So it just remove just a larger scale version of remove node. Obtain is just taking a certain node out of a list and reconnect the list. This will be used in swap and sort to make it easier. Swap just switches two nodes in a list which can be used in sort since it has to take the nodes and move them after we obtain the nodes we are switching we just have to reconnect them which is very easy with just a few tmps. Calling swap in the sort function will allow us to move nodes around without having to reconnect them manually each time. Along with talking about the project we also talked more about empty and NULL list. Along with that came with talking about having things like mylist=NULL and mylist2=mylist so meaning that mylist2=NULL. But if we do mylist=mklist() and mylist2=mylist we have mylist2 pointing to the same empty list that mylist is pointing to. We also talked about double node pointers we have to do (*tmp) to use it for after or info. So it stands that for triple pointers it would be (**tmp). 
-  * Why was this significant? +
-  * What concepts are you dealing with that may not make perfect sense? +
-  * What challenges are you facing with respect to the course?+
  
 +10/8/15 
  
 +We started talking about projects sll2 and sll4 which are due 2 weeks after break. Sll3 is a smaller project. It just has use put a qty to insert, append,obtain, and mklist. Now sll4 is very interesting. We are moving from looking at a list as a bunch of nodes and are now looking at lists of list or groups. We are adding another level to the programs. I do not think we will go pass making groups of list and manipulating them. For sll4 we have to write a make group, remove group, list append, list obtain,list display,list get pos and list set pos. Now this I am guessing are very similar to the ones we use for nodes and the lists but now the list are the nodes. Now we have list pointers for after. I have not spent much time working on these as I was focus on sll2 and getting my ideas about those functions but I am very excited to try these. 
 +
 +I wish i could say I worked on the projects all week over break but sadly I did not. I spent sometime doing some work on paper and bouncing ideas around but could not find time to sit down at my computer and type up some real C code for them. I have a pretty good idea about how these functions work. Im sure I can get them done before the due date. 
 +
 +===Week Eight===
 +
 +Week eight was not filled with a lot of new skill learning or learning new forms of list. 
 +
 +sll2 recap:
 +Working through sll2 which I thought was going to be easy turned into problem after problem sort and swap were where most of the problems happened. I am not sure if it was my logic that was causing things to break but I had segment faults occurring in my other programs like insert or copy list. The insert was due to the fact that in swap node it would swap nodes that were right next to each other but since the nodes were obtained then inserted at at a tmp that was not in the list anymore. Copy list I am still a little confused why it was segfaulting. I was able to get all but sort list to pass all the unit test. I will be working on trying to get the copy list working the way it should when I find the time.
 +
 +10/20/15 
 +
 +Tuesday we looked at some drawings to help understand the obtain. Basically all it is, is the setting of a nodes after to tmp then linking the list so the node we want is no longer any other node’s after. This is really easy to understand in picture form and I am glad that we can draw them. 
 +
 +After it was a work on in class day. This gave me time to work and finding all the conditions I had to look for when calling obtain and get some basic structure for the logic in place.
 +
 +Swap list took a little more work doing. I had to check for:
 +Either being first or last
 +both of them being first and last (ie item1=first item2=last/item2=first item1=last)
 +if they were next to each other(reason why insert was seg faulting / had to be checked in each other check)
 +
 +if they were not at the first or last
 +
 +Sll3 and sll4 are due on at the end of the 28th. I have been trying to get sll3 done but am getting trouble with qty only returning 0. I have not had to the time to spend a lot of time looking as why but hopefully I will find it soon. I think it has something to do with how I am using the qty in the functions. Hopefully it will be easy to find cause staying up all night coding leads to a lot mistakes that takes a long time to correct. 
 +
 +====Week Nine====
 +
 +This week marked the end for the singly linked list and the start of the doubly linked list and nodes. We started class on tuesday by talking about the doubly linked list. The code for them seems very straightforward. The biggest difference was the prior pointer that the nodes now have. With this new pointer we have to make sure we set it to the correct place otherwise the list would not be right. Also this removes a need for a get pos and set pos function as we just have to reference the after and prior pointers to do things like append and insert. One of the biggest problems I am going to face is the use of return codes instead of a list pointer. Setting up the checking statements for each condition will take some time and planning. After those it will be very similar to the code for the old singly linked lists. For thursday we worked on so code for the doubly linked list. We found we can do things like nodes prior after = newnode and that would insert a new node at the current nodes spot without having to set tmps everywhere. After we looked at code and drawings we had a worki in class day. I was able to get most of the checking statements set up for make during that time. I had to put off working on it over the weekend due to some test I had to study for and hopefully it goes smoothly and I meet the deadline.
 +
 +Sll4 caused some big problems for me. I had trouble with the insert append and obtain. I am still lost in why I was getting these problems. I think it has something to do with my code from before was broken. I could not really figure it. I am excited to start over for these new projects and getting to make better code instead of the mess I had before. 
 +
 +====Week Ten====
 +
 +We started working with doubly linked list and nodes. I am feeling very good about these. The big difference is the prior pointer each nodes have. dll0 turned out very well. I only had problems with time and find. Find did what it was suppose to do but I had trouble finding how to make it keep its spot in the list for a resume function. I was able to get dln0 working completely with few problems. The biggest problem I have is the return statements. I am not sure why but it does not sit well with me. I am able to work through them it just takes alittle bit of work. Tuesday we talked about dll1. This is just making more list functions for doubly linked list. Thursday was a work on stuff day. I was able to get most of the obtain done in that time. So far since then I was able to get obtain 100 percent empty 100 percent and remove 100%. I think I have compare almost completely. The only problem I am facing is setting deference is to a value. I am sure this is a very simple problem to fix but I am just over looking. I am not looking forward to sort as I was not able to complete that one before on the singly list projects. I feel like this time might be different as my main problem before was with other code that I wrote for other functions breaking and seg faulting. Fallout 4 is coming in an hour so hopefully my grades do not drop. Fallout hype.
 +
 +
 +====Week 11====
 +
 +Coding has been going well for the most part. Not finishing display before is coming back to haunt me as I have to code it again with new functions. The idea of printing out ascii characters instead of the number values seems like it would be easy to but in. Have a if statement for forward and backwards/with or without spacing then a if for ascii or number values. No problem. Putting qty into the old code gave me some trouble as I forgot that it is ->qty=*number* and not just qty=*number*. This took me way longer to figure out then I would like. Always for getting the same things. I feel like I am doing solid work on these projects as far as the list and nodes are concerned. We are started to work on stacks now along with the list and nodes. I am scared of these as the are confusing. I think a stack is a similar to a list but we can only access it in a backwards order. I have not really had a good look at the functions that use the stacks but I am pretty sure that we can use list functions on them. Obtain insert and append all went very well for the doubly linked list. It went a lot smother then the singly list versions. This mainly do to the fact that they are like the same code. This time the I just had to worry about the priors pointing in the right place. I also ran into a slight problem with my code in that the unit test would give the functions the wrong list and then compare it to a result that was based on the right list. I do not know if this is because of my old code I did not finish. 
 +
 +
 +====Week 12====
 +
 +Data structures has been going well. I am quite surprised at how well really. The last couple of projects have been iffy. I think mainly because I did not give myself enough time to really work out the code step by step. I feel like my code could be a lot shorter but I understand the basics of each. Since we are nearing the end of the semester we have not really covered new topics in class. We talked about queues which I got really easy once I understood that the list was already there so I did not need to create the list each time just simply give it a pointer name. I was even able to get it done early since the due date was moved till after break. Speaking of break I wish I could say that I coded the whole time and finished the next project. I really wish I could but I can not. So hopefully I can start and finish it before the this Thursday. I feel pretty good about stacks. My understand is that it is like a opposite to queues. So instead of changing the last of the under laying list we are looking at the first then we want to add things we have to append them at the last of list and when we grab we grab from the start of the list. 
blog/fall2015/bboynton/journal.1444595691.txt.gz · Last modified: 2015/10/11 20:34 by wedge