Wednesday, 27 January 2016

Low Level Programming Sessions Summary 14, 27th January

Low Level Programming Sessions Summary 14

27th January

This session we talked a lot about const correctness, something which is a little odd from my perspective. It seems to be that limiting a variable to never be changed is standard practice if it isn't going to be changed in the code. That seems okay, though in my mind it takes away flexibility when creating a program for what seems to be for the sake of code correctness.

Still, in some cases it does seem to be a good idea to use const. If you don't want a variable to be changed, or something like an iterator which will never change, why not use const and get rid of un-necessary overhead.

To be honest, I'm not overly worried about the speed of code, nor am I worried too much about shaving of nano seconds as quite often, I usually end up changing my codebase drastically through development anyway, so I would rather have the flexibility of not using constants so that I could react and change and develop in a different way if I need to. This will be something I will slowly develop I think.

Next, we talked a lot about networking, which is going to be key for creating our next assignment. Making computers talk is fairly easy, but making sense of data being sent isn't. Computers code in packets of data and then send them to be unpacked by another machine. We do this with protocols.

TCP is the transport of the internet, but UCP is also common in games. Every PC has TCP/I which gives an IP address. This is used privately, however, it gives other parts of an IP address to be used publicly by the internet. The TCP uses a 4 byte IP address which is in decimals. A DNS server is a server which converts names into IP addresses. 

Overall I am quite excited to be seeing networking as part of the syllabus. It should be interesting to see what happens.

No comments:

Post a Comment