This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
blog:fall2015:bboynton:journal [2015/10/11 20:34] – wedge | blog: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-> | 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-> | ||
+ | ===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 Day, Year", and duplicate the level 4 heading to make additional entries. | + | projects due: sll2, sll3, sll4 |
- | 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 | + | 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 |
- | * Why was this significant? | + | |
- | * What concepts | + | |
- | * What challenges are you facing | + | |
+ | 10/ | ||
+ | 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, | ||
+ | |||
+ | 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/ | ||
+ | |||
+ | 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/ | ||
+ | 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/ | ||
+ | |||
+ | |||
+ | ====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. |