So, I was a bit worried because I was pretty sure we had homework, but did not check until shortly before I needed to get ready for my vacation to France. I had not started and was intimidated by the assignment. I tried to write some of it on the train, mostly copying the Microsoft tutorial with the patchy T-Mobile Internet while I was within German telephone service. I wasn't able to run it successfully and assumed it was because I didn't have internet on my computer, just my phone. But we had an early night and I was able to use the free Wi-Fi.
I was having problems getting it to connect to each other. Finally, Shervin mentioned something about Keenan's code which I did not understand at first. I eventually tried digging through the files on Perforce and found a sample of the program. It worked much better than the Microsoft tutorial and I used it and the program was mostly done.
I was so happy to see the .sort() function did all the work for me. I had earlier tried to figure out how I would send all the data. For whatever reason, I first thought to put the list into an array and send the one array at once and reassemble the list. I am glad I had time to think about it and use this far superior method.
I finally got the programs sending data, but I was getting random packets of 20s at the beginning so I made packets which came before every packet which said it was a valid packet coming next and that did the trick. I was quite happy. All in all, this program made me very worried and then very satisfied. There are a lot of optimizations I could make, but for now, this will do.
No comments:
Post a Comment