I don't want to let this week go by without posting something. Last week was a reasonable exception as I was away traveling from Friday to Monday. Also sick for a while as well. I doesn't do to get back into bad habits of procrastination. I'll just have to deal with the guilt of not having something good to post this week.
I did spend time on some coding though, been looking into the Java programming language and have to grudgingly accept that it is a useful tool. Object Orientated Programming; where you treat the building blocks of a program as discrete objects fits my way of thinking about parts of a program quite well. This part is the display, the routine to update the program state goes here, this is the map data and here are the mobile units upon it. My way of writing code was a weird mix of objects and functions and I can see why purely having objects would be effective.
As far as I can tell, to make the most use of objects they should be self contained elements which handle all their own updating of state and displaying on the interface. All they should present to other parts of the code are methods of getting and setting internal, private variables. This makes the objects highly modular and enables all kinds of useful ways of using inheritance to take one kind of object with many methods and then add a few more for and extended object to implement the functionality you need. The Java swing graphical user interface library has been perfect for this.
Unsurprisingly the first idea I had for using networking was multiplayer games. It also gave me a great opportunity to play around with lots of different objects for the many parts of the code: the server that runs the game, the clients of which there can be an arbitrary number, the game objects running on the server and the representation of those objects data on the client. I was a rewarding organisation task and kept me occupied for awhile.
I feel guilty about wasting time on these hobby projects when my life is in such a mess. Better to post something to try to gain some satisfaction from it rather than clamming up completely.