This may get a little geeky/technical for some folks, sorry.
My last programming assignment was a little tough. My partner and I were having a terrible time getting things to work the way we wanted them to. The task was to write a program that would computer the cheapest route to different cities based on the file with cities and values given to us. We also had to use Dijkstra’s algorithm to do it. It was nearly identical to my assignment for my networking class (we had to write it in c to update routing tables). My problem was that I was reading in city names this time. I couldn’t for the life of me think of a way to keep the names, and node numbers associated with them, sorted and manageable while still working.
Eventually I did exactly what I did for my networking assignment with the added fun of a couple of arrays and an arraylists for the names. It may have been redundant and could have been coded better, but I didn’t realize until about two hours before the deadline that we had to sort our results alphabetically. I didn’t want to have to completely rewrite sections of code, so I threw my print statement in a loop. My loop passed my arraylist into a new array and then sorted the array of names. which then properly printed everything in alpha order! Go me! In hindsight, I see where it would have been smarter to move a few things out of my loop. However, I got it working and needed to get it ready to submit, so I didn’t see it at the time.
So now I am doing something almost exactly the same using Kruskal’s algorithm. However, I am just way too burned out to work on anything. Not to mention that I have an exam on Thursday and this program is due Friday night. I wish we were doing something different, something fun. Maybe then I would be motivated.
It gets frustrating sometimes going over theory and rarely getting to gui related programming. Both are rather necessary in today’s java programming world. /sigh I suppose if I wanted to do that, I could go into the Media Design something major. That is mostly for video game development. I could contribute to the dumbing down of society! Maybe not.