Saturday, April 21, 2012
Assignment 3
Sooooo not gonna lie. I am late on this assignment because I derped hard and procrastinated...
I hate myself sometimes because this was way easier than I thought it was going to be.
I had missed class for the third lecture so I had to watch it to see what to do, but I freaked out because when I looked at the base code (which was practically nothing) I didn't know what to do. OF COURSE though, I didn't finish the whole lecture till this morning and then saw that you went over example code. I felt really stupid. So yeah, I copy pasted the code so that I could connect with myself (I only have one personal computer so yeah) and got the two programs to recognize each other. Once I had that done I started on just trying to send data across and got that working.
Then I realized that the server didn't know how many elements were in the list and that data was not stored on the client side either so I made a loop to count it. But then I realized while writing this that there is probably a function that does that. OH LOOK THERE IS. So I fixed that just now. Anyways, I then made loops to send and recieve the info as individual packets. This was a bit confusing until I realized that I had one of my pointers pointing to the wrong int so I was filling my whole list with list size. But I fixed that and then it worked. Then I found that there was a sort function so I used that on a list that I made one the server side and then sent it back and it did everything that I wanted it to do. Success!
So yeah, the only reason I'm late is because of my own self-machinations of laziness. I'll make sure this doesn't happen again. Thank god for slack days.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment