COMP 310/510
Fall 2013

Lec45:  Lessons from the Labs 

Home  Info  Owlspace (310)   Owlspace (510)   Java Resources  Eclipse Resources  Piazza


Make sure that your network is NOT set to Public


Make sure you fully process the returned data packets when sending a data packet 

 A lot of people are assuming that the returned data packet is an Ok status and are thus ignoring it.     But since the returned value of sending a data packet (via a chat room) is an iterable of data packets, without defining what those data packets are, no assumptions about those data packets can be made and they must be processed as any other data packets.

IHost.getUUID() and IUser.getUUID() must return the same value for all IUsers associated with a given IHost.

IHostand IUser must return the same UUID value otherwise it is impossible to invite a user from one chat room into another because the application only knows IUsers in chat rooms but needs the corresponding IHost in order to invite them to a new chat room.    The UUID is the only way that an  IUser can be associated with a particular IHost.


Don't use mutable static fields!

Very bad things will happen if you do as this will couple your entire system together.   Just don't.   Ever.  


Can game servers reject packets?

Poll is still open!  Not enough votes yet for a quorum.    Remember that poll participation is still being counted!


Develop iteratively

Do NOT attempt to write your entire game before testing it!   Develop your application small piece by small piece, continually testing it other people.


Program defensively!

Assume that the game clients and game servers that are connected to you will behave badly and put in defensive checks to keep your system from crashing due to someone else's bad code.



© 2013 by Stephen Wong