<body> <body>



Friday, March 6 @ 5:51 PM

Debug's Life

Our first hands-on this fourth grading was a fortunate event, for me at least. I had the pleasure of having a school PC that's fast and working. It set my mood for Visual Basic work ;)


* * * * *

Debug's Life

Making this quarter's programs was a lot of fun. It was easy enough for me not to give up, yet challenging enough for me not to lose interest. It had the right balance between work and fun. But it also had its share of the downy-dumps, the hitch, the bad side. AKA bugs.

According to Wikipedia, a bug, or specifically a software bug is an error, flaw, mistake, failure, or fault in a computer program that prevents it from behaving as intended (e.g., producing an incorrect or unexpected result). Most bugs arise from mistakes and errors made by people in either a program's source code or its design, and a few are caused by compilers producing incorrect code. That's kind of Pig Latin to me but I'm sure that the bugs I encounter are caused by the errors I made in writing the codes.

Sometimes, when I run the program to test it, a warning appears and the faulty part of the program code is highlighted. That's how I know which part needs correcting.

For the Message and Input Boxes program, I encountered only one bug.





Run-time error '13': Type Mismatch

According to the vbforums.com, a type mismatch happens when one is trying to use the wrong data type, eg: writing a string into a variable which is declared as Integer. I encountered this while making the codes for the seventh and last message box.

For the Math Operator, I came across three bugs. And these are:


Compile Error: Expected End Sub


This happens when there is incorrect syntax. If I remember correctly, this happened when I tried to replace the End Sub with an End If.

Compile Error: Method or data member not found

According to edndoc.esri.com, if one attempts to use a property and either forget or misuse the Set keyword, Visual Basic will fail the compilation of the source code with a "method or data member not found" error message.

Compile Error: Block If without End If

Sample:

Private Sub Option2_Click(Index as Integer)

If Index = 0 Then 'Yellow

frmMath.BackColor = RGB(255, 255, 51)

If Index = 1 Then 'Blue

frmMath.BackColor = RGB(0, 51, 255)

If Index = 2 Then 'Violet

frmMath.BackColor = (51, 0, 102)

(and so on...)

According to xtremevbtalk.com, this error happens when there are not enough End If's for the If statements. This happened when I accidentally typed in If instead of ElseIf. This caused the program to have more If statements than End If's.

That's it. I've only encountered four bugs. I know there are many others. And I'm not hoping to have problems with them the next time. I've learned my lesson=]

Labels: ,



Sunday, January 25 @ 5:39 PM

Programming, Anyone?

Blinkie Text Generator at TextSpace.net


The first half of my senior year TLE class was spent making flowcharts and stuff.

The second half started with quite a surprise especially when the hands-on part came.

I was coping well with the discussion of the Visual Basic environment but I was left behind when we started tackling about the codes and stuff. I had no idea how to relate the flowcharting logic with what is facing me now. I was paired with Zelita who was just as clueless as I am. During our first activity (the Lucky Seven), we totally had no idea of what we were doing. I mean, we know we had to create a program for a slot machine and we were DOING it. But we were just copying the codes from the hand-out. We didn't know what the codes meant. We didn't know what it does and how it functions. They were just numbers, letters, characters that have no meaning. I almost gave up, it looks all too complicated for me. What made it even worse was that even if we wanted to learn, the computer won't let us. LOL. It was operating very slowly and we usually end up with our work not done.

The worse is yet to come.

One day I just learned that we have to finish the activities from all the four lessons for our project due Monday (two days later)! We can't do it in school since our PC wasn't working properly. But I knew I could do it. We already finished the 1st activity (Lesson 1) so we only have 3 more to go.

I managed to borrow an installer and decided to just do it at home. I had trouble with installing it but I got it right after some time. I started reading the hand-out's PATIENTLY. Then I started to do it on the computer, continuing where Zelita and I left off. While working on the program, I realized it wasn't as complicated as I thought. I was overthinking before that's why I found it hard. My doubt shadowed my understanding that's why I did not see the simplicity beyond its complex facade. I beautified the layout and background and managed to pull it off icompletely in two hours. I proudly saved my work and was glad that our project was done.



OR NOT. . .

"Everything is not what it seems!"
I learned that the hard way.

I forgot to properly save the project. I thought it was just like saving in MS Word or in Publisher. When I checked back to see how our programs were faring, I just couldn't open them. I had to redo everything. Again, my patience was tested. I managed to save it properly this time. I felt bad, frustrated and was annoyed. But I also felt good. I was able to finish the project, made it better the second time. I also realized my errors and learned from them. All in all, I feel good. I feel good about doing something that I thought was impossible before. I feel good because I worked hard. I feel good because I accomplished something.



~ You see. It's not everyday I get to create a program. Even if it's just for a slot machine or some kind of color mixer. It may not be the most advanced, but still I did it.~

Labels: ,



Profile.

Mara
super sweet 16 (anu to exiled??)
lovesreading.wordplay.food.harry
potter
andallthingsrelated.
eraserheadsandallthingsrelated.
guitarheroIII.
CIRCUSfreak.
gradeoneCITIZEN.
♥Ǝ♥

Website Design
Website Design

PLEASE TELL ME IF THE FONT'S TOO SMALL OR IF IT'S TOO STRAINING TO READ.

Links.

.german. shayne. jakii. marou. kevin. bert. alfred. russ. alex. jay. xedric. erron. claudz. danica. cledz. tin. sarah. gien. zaldy. alina. cj. donna. naxcz. rica. edzzz. rai. bekai LISTVERSE

Tagboard.





History.
May 2007
June 2007
July 2007
August 2007
November 2007
December 2007
January 2008
March 2008
April 2008
May 2008
June 2008
July 2008
August 2008
September 2008
October 2008
November 2008
December 2008
January 2009
February 2009
March 2009
April 2009
May 2009
June 2009
July 2009
August 2009
September 2009
October 2009
November 2009


Credits.

Layout: I
Fonts: I
Image: I
Brushes: I II