Ugh, how did I end up in this situation again. I told myself I was going to spend about thirty minutes or so getting started on this programming assignment, how that turned into SIX HOURS is beyond me.
Six hours I've spent on a networking assignment where we have to write a simple WinSock echo server and client. For anyone who isn't familiar with computer networking, it's basically a program where you type something, then your computer sends it to another computer, then the other computer sends the same thing back to your computer and appears on the screen next to what you've originally typed. Exciting right?
So there I was just starting to hammer out the basic structure of the program when I suddenly decide that it would be a good idea to write a huge table for converting a majority of the error codes in WinSock to plain readable text. The upside is that now when my program throws some kind of error, I don't need to go look it up, it'll just print it to the screen. The downside is, well, it takes a while to write.
Then I said to myself, "oh, you know what I really need is some kind of wrapper for WinSock so I can write cleaner implementation". That's how this and this happened. I believe I finished these somewhere around the four hour mark.
At this point I decided to double check the submission guidelines for this assignment to make sure I wasn't leaving anything out.
Config file, oh man I forgot. So now I need to write some implementation for loading some settings from a text file. Now, usually this is pretty easy to do. But at 4am, things get a little bit... wonky. See, the problem was instead of getting an IP address like 127.0.0.1, I was getting ╠╠╠╠╠╠╠╠╠╠╠Il&-@3.
It took me way to long to figure out that my code wasn't the problem, but instead, the config file wasn't in the right folder. So yeah, time wasted there.
Finally I decide to actually do the assignment (aka, make the program do something). So I basically rubbed two sockets together and got a simple connection going from the server to the client. This took about an hour ( debugging included ).
It's been a really weird night for me, after telling myself "gee, I'd better not put off this assignment any longer", I went and did the whole freaking thing, I got stuck in this sort of flow where I couldn't stop until it was done. I think my reasoning for doing all of these ancillary tasks was to gradually build up the impetus to actually start the assignment. However these little tasks became big ones and before I knew it, the sun was coming out.
The sad thing is (and this left me feeling fairly dejected after an initial feeling of accomplishment), with all the effort and care I've put into this, it's just an echo system, one in hundreds (your computer probably comes with one), and all it does is repeat what you say back to you. :/