Thursday, September 24, 2009

The Long Awaited Finish is Here!

*Warning: Some words used may need experience in Java Programming!*

Good day guys! Have you experienced pressure? Pressure that consume you from the inside and out? Not just physically, but also mentally and emotionally? Have you experienced wanting to explode and give up but yet you continue to do it because either you have no choice or you feel that you can do it? And then, at long last, the pressure and pain that enveloped you is quickly replaced by enjoyment and happiness? Well, that is what I am feeling right now! Whew!

Just recently, our instructor gave us a laboratory exercise in which we are asked to construct and implement a Binary Search Tree and an AVL Tree. Actually, the algorithm is not that hard to understand so I just took my time in coding the program. All went according to plan until I encountered an unexpected error, java.lang.NullPointerException. At first, I was thinking that it's just a minor problem. So I went on debugging and putting some conditions to satisfy and prevent the exception. My line count doubled as time passes by and by the end of the day the code was like messed up. Thinking that I can do it without any help, I continued coding the day after. The same error keeps showing up! I was in panic mode because the deadline was fast approaching. It took me almost 3 days to call it quits and ask help from my classmates. One of my classmates helped me and after about 5 hours of debugging with her, we realized that the constructors were poorly constructed and we had to revise the constructor and recode the whole program. And now, thanks to my classmate, I finally finished the codes but is 2 days behind schedule. This piece of code is the reason for everything. LOL!
AVLTree() {
        root = new AVLNode();

One thing I learned from this ordeal is that if all else fails and you have done everything that you can, you don't need to act tough. You can always lower your pride and ask for help! Always remember that no man is an island!

God bless and keep the faith intact!

No comments: