Skip to main content

Post 010 - College Weekly

I was able to complete my first week of Term 4 on time, and, in my opinion, with good content.

I fear I may have gone a little overboard with the theoretical direction of my Discussion Forum contribution.. It was a simple question: Who is responsible for catching errors and handling errors in programs, the computer or the computer program?

My response was based on conditions, three of which left the responsibility on the programmer. I eventually made it to declaring between the computer and program, but it felt like a means to answer the question for the grade and not the truth. The problem being that I feel the question is flawed. In the end it was a good thing, because it spurred a great dialogue with a peer. I saved the contents of that thread because I want to be able to look back on that in the future. A lot of my perspective dealt with the intentions of computers in the first place, and the layers of abstraction/protection that are in place before we even get to the program. Since this is supposed to be from the perspective of OOP/Java we can see how even the compiler won't allow for but so many issues, least of all semantic. It's the weird oddities like Integer Overflow, infinite recursion, and other semantic issues that can make it passed the compiler. How can we expect to get passed the programmer being responsible for catching errors?

I was pissed that the Learning Journal section in this term is, yet again, just another assignment to be graded and has nothing to do with a journal. I made sure to point that out in my submission, including the fact that I keep a copy of everything I submit to college (they will just delete it at the end of term anyway), that I have a personal blog, and that I can not view it in any other way than an requirement, saying something like, "involuntary" to describe the mood I will have when writing.

The assignment was kinda fun. Sorting algorithm benchmarking. I spent too much time trying to remember how I measured time in a previous assignment, and googling to find the syntax for nano-second, only to then read where the instructor provided the syntax for milliseconds in the assignment. Ultimately, I decided to go with milliseconds, because it was easier to comprehend. I liked the level of detail that nano- provided, especially at lower array sizes (maybe less than 1000?) where the sorting can be done in 0ms with the Arrays.sort() method using (int)(Integer.MAX_VALUE * Math.random())  for the array index values, but the duration for the 100,000 values was unwieldy. And it can be said many times that you can sort arrays in the millions, just don't use Selection Sorting methods or you will be stuck a while.

In the vein of random number generators, I watched a neat video about Super Mario World's RNG with my son, who being only 5 and having just thrown up was not as excited about how to byte-shift for sprite movements. BUT I found it incredibly interesting and would suggest it.

Comments