User Tools

Site Tools


blog:fall2015:ahorton8: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:ahorton8:journal [2015/10/22 02:25] ahorton8blog:fall2015:ahorton8:journal [2015/12/07 17:07] (current) ahorton8
Line 67: Line 67:
 ====October 21st, 2015==== ====October 21st, 2015====
 I got swap done. I dont even remember most of the errors I had with it, a few of them were me not having the right syntax for using obtain with the double pointer (and I messed up calling append as well, oops), which was why it was segfaulting. There was also a small error in my obtain function that needed to be fixed, but it was only one line. So swap works! As for sort, I was able to get up to test 15 (where it actually has the full list...) until itd segfault. So issue with my logic somewhere (that I couldnt find). I had swap kind of going in like a nested loop, and a few iterations in the loop, it would segfault. But, I knew I wasnt going to find the problem tonight, and I already had 58/70 of the tests passing, so I decided to just submit as it is, since thats better than losing the 25% for the late grade. Now onto sll3, oh boy! I got swap done. I dont even remember most of the errors I had with it, a few of them were me not having the right syntax for using obtain with the double pointer (and I messed up calling append as well, oops), which was why it was segfaulting. There was also a small error in my obtain function that needed to be fixed, but it was only one line. So swap works! As for sort, I was able to get up to test 15 (where it actually has the full list...) until itd segfault. So issue with my logic somewhere (that I couldnt find). I had swap kind of going in like a nested loop, and a few iterations in the loop, it would segfault. But, I knew I wasnt going to find the problem tonight, and I already had 58/70 of the tests passing, so I decided to just submit as it is, since thats better than losing the 25% for the late grade. Now onto sll3, oh boy!
 +
 +====October 25th, 2015====
 +Oh, apparently its been a little while since I updated this... Sll3 took less than an hour. Two lines of code (same two lines) in every function, plus one or two extra in two of the functions. I want more projects like that! I started on sll4, and I've done a little bit here and there in the functions. I finished mkgroup pretty quickly, and Ive done a little with rm, display, and append. Unfortunately, none of these actually work entirely - but Ive at least attempted them! display doesnt do anything with displaying just one of the lists out of the group (Ill need to do getpos/setpos for that), but otherwise I think its working okay. Though, I need to add in a check for an invalid position as well. AS for append, it doesnt work... like at all. It runs through okay, doesnt technically have an errors, just... doesnt do anything. To be fair, I didnt logically think anything through yet. I just kind of copied everything over from list's append and changed the names to see what would happen (knew it wouldnt work, just wanted to see how close I could get). With rmgroup, its not emptying the list properly. Technically I cooouuullld just set the group to NULL, but thats bad and I want to know why, so its not setting it to NULL at all yet. What it should be currently is EMPTY, but the populated group isn't emptying, so Ill have to fix that (and everything else...). 
 +
 +====October 26th, 2015====
 +So in rmgroup, my issue was I was forgetting about free (forgot it in rmlist too actually...). Adding that in fixed my issue with it. As for display, I have it almost working completely. I didnt end up needing getpos/setpos for it at least, which was nice. Only issues is its off a little with the qty. You know, 0 instead of 1, 3 instead of 4, 18446744073709551614 instead of 6. Tiny things. But the qty is the only issue left with it. So thats like 2.8/3 functions done, woo!
 +
 +====October 27th, 2015====
 +Okay, got the off-by-one (mostly) error sorted. Basically, in the append function (and insert and obtain, but those are irrelevant here), I was redoing the getpos function, when all I really needed to do was change qty as needed (add 1 in insert and append, subtract 1 in obtain). But I got it to work, so I'm about half way through sll4. With you know, less than two days left to do the rest of it. Oh boy.
 +
 +Ive gotten the majority of setpos/getpos done. Aside from one mismatch in each of them. In getpos, the test thats processing on an empty group and empty list is returning a -1, when it should be returning a -2. And in setpos, the test thats [8/7] is returning nothing. Like, not even an <ERROR> like its supposed to, theres just nothing. However, the test thats [9/7] works perfectly fine. So off-by-one error somewhere most likely? [7/7] also works perfectly, so Im assuming it is the off-by-one thing. So I just need to fix those errors (though quite honestly Im not that worried about them, its only two mismatches), do obtain, append, and insert. 
 +
 +====October 28th, 2015====
 +
 +Okay, got the append issue fixed. At some point I was setting myListGroup->first to place instead of newList, which was nuking the list. But hey, it works now! Just need to do obtain and insert now.
 +
 +So insert is a nogo. Its not segfaulting, not nuking the list (anymore....), but its just not inserting right. It looks like its getting messed up on test 4, when its inserting before the list. However, I cant figure out why. Oddly enough, all of the unit tests pass though. Like, I can clearly see that what I should have isnt what I do have, but when I run make check, or verify-linsert, everything comes up perfect. Apparently this is another one of those glorious moments where I manage to screw it up so badly that things work, woo!
 +
 +So turns out if you type getpos and setpos instead of lgetpos and lsetpos it wont work, but itll think it works. Interesting. Wasted two hours of my life on that. I ended up getting that all fixed, and obtain working up to the last test, where the list should be NULL (when pos is (7/7)). I vaguely realize why I cant get it to set it to NULL, theres a pos-- somewhere in my code, but its nearly midnight and its definitely not worth losing 25 points for to turn it in late. So I got 120/121. So, so close. 
 +
 +====October 30th, 2015====
 +I started working on dln0 a little, didnt really get very far though. It gets through the first test in mknode, theen segfaults with the second. Oops. I dont think Im writing the check right. Like, its "else if((*thatNode)->VALUE != NULL)", which is checking for whether or not its already allocated. but unfortunately, doesnt work. It gets through the first test, but the answer isnt correct. The result is DLN_INVALID when it should be DLN_INVALID | DLN_ERROR... You know, great thing about this opus is I figured out the issue as I was typing out the issue. Its like the rubber duck coding thing. I was doing || instead of | with my returnvalue, so now its returning it correctly. I mean, test 1 is still failing, but Ive got 1 out of 33 points now! Id say thats a pretty good start! I just need to figure out how to go about making the other tests you know... work.
 +
 +====October 31st, 2015====
 +I figured out the segfaulting issue. I didnt need the ->VALUE in that statement, just "else if(*thatNode) != NULL)". So I got that fixed and weeded out a few small errors with it (wrong returnvalues), and got through rmnode with relatively few issues. Actually I did the same exact things wrong with this one that I did with mknode. Oops. So now I need to do cpnode, and dll0. 
 +
 +Ive gotten the majority of cpnode working, just need to work out a few kinks. In test 0, my result is DLN_INVALID | DLN_ERROR, when it should be DLN_ERROR | DLN_NULL. I tried making a check to see if copiedNode and oldNode were NULL, but it unfortunately caused tests 0, 1, AND 2 to fail, so, yeah. Also, in test 5, tmp's value is 52 instead of 37. So thats always fun. Judging by the unit test, its getting reset to that when it shouldnt be. Not checking to see if its not null correctly perhaps? So I mainly just need to figure out how to make the program distinguish from NULL to NULL/NULL node to NULL and NULL node to NULL node, and figure out how to fix the tmp error.
 +
 +====November 1st, 2015====
 +So I was able to get the issue fixed with it not distinguishing between the the cases, but I have yet to figure out the tmp error. I didnt even malloc in my code, and I ended up rewriting it. But its a stubborn little bug, and rewriting did essentially nothing. Yeah, definitely not going to get everything done on time this week!
 +
 +====November 2nd, 2015====
 +Okay, got my issues sorted with cpnode finally. I wasnt really copying over the payload. I had tried coping the ->VALUE, itd cause a segfault. I found out that it was because I needed to use either ->DATA or ->OTHER, since they require more memory. But thats fixed, now onto dll0!
 +
 +====November 4th, 2015====
 +Oh, apparently Ive done a lot in the past few days if I hadnt even started dll0 a few days ago. Well then. I got most things in dll0 moderately functional. Most... I didnt really do much, well, anything with display, and didnt put a whole lot of effort into fixing my issues with cplist. The only two that have zero mismatches are find and mklist. Append has two, both are dealing with the return value, not the actual list structure though. So it... it works, its just not checking for everything I suppose. As for insert, theres only one mismatch, which is the same issue - one of the return values is off. In cplist, theres 11 errors, but thats due to it segfaulting about halfway through the unit test. And that is most likely due to me not using append 100% correctly. Hopefully my not finishing these projects wont interfere too much in the future. I had a lot of work in other classes this week, and I figured my grade would be high enough that not doing as well on this project wouldnt kill me or anything. I had a fun time with this project at least (sarcasm)! Mklist wasnt too bad, cplist was a pain (but so was cpnode, go figure). Append took a while, but eventually I did get it to work. Find I dont believe was too bad, I just had a lot of small errors (mainly missing checks). Insert was relatively easy, since I kind of used append where I could in it. A lot of the function I had to rewrite since it wouldnt work with append, but what would be considered the "average" case worked fine. Display I probably spent 10 minutes on before deciding that I might as well work on the others that are worth far more points instead, since I knew I wasnt going to get everything done. Ohh well, time for dll1!
 +
 +====November 5th, 2015====
 +Surprisingly I managed to get obtain completely done in class. Hooray for getting a headstart! I did it with relatively few issues, just a few returnvalue's were off and I forgot a few things (like resetting prior...) and at one point I had the node pointing to itself, so that was a lovely infinite loop... But yes, thats done at least!
 +
 +I was also able to get empty and rmlist done rather easily. Empty had a few issues, but wasnt bad. Rmlist was pretty easy, due to just needing to call empty and being set to NULL. Compare is technically next on the list, but I might skip ahead to swap - just because swap sounds easier and I might end up needing it in sort. If I get those done and working, Ill go back to compare. Somehow, Im halfway through the project and its not even Friday. Weird.
 +
 +Make that more than halfway! I got swap to work. This one was a bit more difficult than the others - with a few issues with a node pointing to another node that pointed to the first node that pointed to the second, ect... that was fun to attempt to debug. Finally gave up on using the debugger to see where it was happening and just ran the program and did Ctrl C as soon as possible. But I also had a few logic errors that needed to be worked out, but nothing serious. I started trying to work out how to do swap on paper, but between the after and prior pointers and such, I got lost on the second line. But, I did realize I could use obtain and insert/append to do all of the horrible linking for me, which made it a thousand times easier. Next up on the list is sort, and assuming I have time (which, apparently I will since its only thursday), Ill go back to compare.
 +
 +====November 6th, 2015====
 +I started working on sortlist and... didnt really get all that far. All of the basic checks pass, but the ones that actually do stuff... dont. Unfortunately, I dont know exactly why. Its nuking my list. Originally, we thought the issue was in cplist since I hadnt finished that, but upon fixing it and getting it to pass all of its unit tests, I found out that sortlist still is doing it. Soo thats always fun. Mode 0 and mode 1 are written (and hopefully for the most part functioning, cant really tell...), though I still have to do mode 2, which, I dont think will be extremely complicated.  And actually, Ive got about half of sortlist working (well a little more than that, but theres a few issues with the unit test). So Im in good shape at least!
 +
 +====November 9th, 2015====
 +Okay, so I got sort working a bit better. There was an issue in cplist that was fixed, AND an issue in swap, which is what I was using for sort. Swap wasnt checking for whether or not the nodes were right next to each other, so that was causing a few issues (such as a seg fault...). Right now, it sort of works. As in, it swaps the first two nodes in the list and thats it. But you know, progress! And that only works for mode 0, mode 1 is completely useless, but I still need to fix that up a bit. And mode 2 doesnt even exist yet, so thats always good.
 +
 +====November 11th, 2015====
 +After a few days of not getting any farther, I decided to just submit dll1 as it was earlier today. The only issues with it were, well, the majority of sort, and compare's difference thing didnt work. So instead, I updated to dll2. So far, I've gotten all of the quantity stuff working, I just need to add the extra display modes, which I dont thing will be //too// bad...
 +
 +====November 15th, 2015====
 +I'd gotten the majority of dll2 working, and the majority of display (there were only like 19 tests failed I believe). However, after a particularly rough weekend and a need to work on other classes, I decided to submit dll2 as it was, so that I could begin on dls0, which hopefully wont be too difficult. 
 +
 +====November 17th, 2015====
 +I've gotten mkstack done, along with isempty (was only 5 tests, obviously had to go after that). I started working on cpstack, and Ive got it working up to test 4.... but you know, thats 5 tests done! After that it kinda breaks, giving out the wrong codes, causing segfaults when displaying the list, ect. But eh, Ill get them fixed. Eventually...
 +
 +====November 18th, 2015====
 +So Ive done a bit of jumping around with this project. I got rmstack working completely, so theres that, mkstack, and isempty working 100%. I did some work on peek, pop, and cpstack, but none of them work fully. Peek doesnt create a copy, but instead has the same node for each test (issue with cpnode maybe? I couldnt find one). Pop has a few various issues, most of them resulting from something not being checked/being checked in the right place. Though at one point the popped node isnt right, so not sure why thats that way. Cpstack works up to test 4, where it is returning the wrong error code. Then test 5 works, but test 6 stops working, apparently I have a NULL stack when I shouldnt, test 7 is saying DLS_CREATE_FAIL, so its apparently triggering that check. Test 8 (displaying it) just.. seg faults. Which makes sense if its not creating the list. The only one I havent touched upon is push.
 +
 +====November 24th, 2015====
 +After a much needed break, I started working a bit more on dls0. Out of 92 tests, theres only 12 mismatches. Pop works completely now, push has two issues (some issue with my overflow check, its being triggered when it shouldnt be on the last test), and the same issues as before with peek and cpstack. But at least theres progress!
 +
 +====November 30th, 2015====
 +Okay, so apparently its been a while since I updated my opus. I decided to skip the rest of stack, and submitted it as it was on I believe last Tuesday. I started working on dlq0, and got everything except for cpqueue working over break. I'm pretty sure the issue I had with cpqueue is the same issue I had with cpstack, I was forgetting to set (*newQueue) to NULL (at least, I think thats what it was) after making it. So because it wasnt NULL, the program wouldnt run. After changing that, it lit up and everything started working. Well okay, there was one issue, but I believe I was forgetting a check. But its done and submitted now, and I can safely say this is the first time all semester that I couldnt do data structures even if I wanted to.
 +
 +====December 2nd, 2015====
 +I started working a little on the eoce, specifically 0x3. Well, I got 0x0 done too, but that was relatively easy. So far, I have both the journal and participation sections working. I had an issue trying to connect the data into the list, but I was able to get that fixed earlier today. I was reading the information correctly, as in I could read the data from the file and display it in a regular char, but I couldnt get it to work with nodes. However, its functioning now, so I just need to get the project portion working. Which I dont think will be too bad, just kind of a pain to work out how to do I guess. But Ill get there!
 +
 +====December 7th, 2015====
 +I've done a little more work on the eoce. I havent gotten much more done with 0x3, but I have done a little with addnode (segfaults on test 5, when adding 9 to the tree), and I've created everything except for the unit tests in DoublyLinkedNode. Dont know if everything works or not, but the fact that it compiles is a good sign!
blog/fall2015/ahorton8/journal.1445480748.txt.gz · Last modified: 2015/10/22 02:25 by ahorton8