I’ve done quite a number of programs and I’m very sure that I’m still going to do a lot of programming in the future. And what I like most about programming is that I’m getting my chance to execute my plan. And the hardest part in programming is when you’re only starting to do it because it requires one thing that is said to be God given and something you can pull out inside you for you to develop it is called logic. Another thing is how you analyze and view things because in programming you would have to look closer and to dig deeper in order for you to come up with the solution to the problem. Is programming complicated? Yes, but it would depend on the problem and how are you going to handle it.
Try asking yourself “Why is it like this?” or “What is this for?” or “What if it doesn’t have this?” These questions are the same questions that you’ll be answering when someone asks you about your program. Similarly, questions like “What if I’m going to do this before this?” or “What if I’m going to use this instead of this?” are the ones that you should ask yourself when you’re creating a program.
Now in analyzing you should be efficient because even though you can analyze very well there are times that you’ll overlook some details which are very important. This is the most critical part of when creating a program because the result would depend on this stage. If you’re going to interpret the problem correctly then that’s great but what if you went the other way then most probably the things that you’re going to do next might become just a waste of time. Another key is to just deliver what you’re asked to. Print out the required output the way they wanted to and that’s it.
Formulating the solution is only second to the hardest part when you’re creating a program. In this part I’m talking about coming up with a solution not using programming language yet but still the English language. I recommend you to go through this step so that you’re going to have a concrete picture on how you’re going to put everything together in the end. This part would be like the planning part and it’s always better to have one than not have one.
Then here comes the most frustrating part, the encoding. This part would be like the planning part and it’s always better to have one than not. Basically, this is translating your formulated solution to the programming language you’re using. Sounds easy? But it isn’t because you should know the right functions to use and how are you going to use them. And the most difficult part would be figuring out how to combine these functions so that they’ll complement each other and produce the desired result that you want to have. One good thing about programming is that you can have different solutions to one problem. It’s up to you to choose the best solution.
The shorter the better that’s how you’re going to determine a good program. Of course a shorter program that produces the exact output as the longer one is always better. Not only that it would consume less memory on your computer but it shows that the program is more efficient. For example if you’re asked to determine a vowel from a consonant. There are two ways to deal with this and (1) one is to set a conditional statement for to determine if the input is a vowel and (2) the other is to do the same thing to verify if the input is a consonant. Which one is more efficient? If you chose (1) then you’re right because for that one you’ll only have 5 comparisons unlike in the other way where in you’ll be comparing the input among the 21 letters. Here’s the algorithm for that example:
Input “Enter a letter”; letter$
If (letter$ = “a” or letter$ = “e” or letter$ = “I” or letter$ = “o” or letter$ = “u”) then
Print “The letter is a vowel”
Else
Print “The letter is a consonant”
End if
Now that code isn’t perfect because it should still compare for the uppercase letters and it should determine if the input is indeed a letter and not a number. If you’re going to input a number when you run this program the output would be “The letter is consonant”. Same principle applies to the symbols and punctuation marks. My point here is to make each program as perfect as possible. Find all the loopholes in your program and fix each of them. Bugs or loopholes are inevitable but they can be destroyed. The key is to try all possible inputs that would make the program respond differently.
To conclude this post let me share several things that I do when I’m creating a program.
- I make sure that my mind is focused and I’m in the mood to program. If I don’t feel like programming then I don’t program because forcing myself to do it would only frustrate me in and I wouldn’t be able to accomplish anything in the end.
- I drink Coke or iced tea or sweetened cold black coffee because it makes me think faster.
- I listen to my play list while I’m programming at home but in school I don’t.
- For difficult problems I simulate everything first on a piece of paper.
- I tend to close my eyes to think deeper in order to come up with the solution and to avoid distractions.
- I think about someone that will motivate or inspire me so that I won’t give up if I can’t figure out how things should be done.
Saturday, November 28, 2009
RTP#41: Drop by
@ 1:45AM
I just finished studying for my quiz tomorrow for my statistics class. Yes, I really did study even I couldn’t able to believe that I had actually studied only because of a quiz. Most probably I am asleep right now but at some point the coffee gave me an extra push but there’s this little inspiration which really motivated me to study tonight. And the goal here is to get a perfect score for competition’s sake and of course it would also benefit me a lot. I am determined to get a perfect score tomorrow and I wouldn’t even attempt to cheat during the quiz. I’m pretty confident that I’ll be getting a high score on this quiz. Despite my body’s not on its 100% because I am having a slight cold and a bit of a headache to come with it. Well for me being sick wouldn’t matter because I’m awesome. Gtg, need some sleep so that my mind would function awesomely tomorrow. Good luck to me and to her. ;)
I just finished studying for my quiz tomorrow for my statistics class. Yes, I really did study even I couldn’t able to believe that I had actually studied only because of a quiz. Most probably I am asleep right now but at some point the coffee gave me an extra push but there’s this little inspiration which really motivated me to study tonight. And the goal here is to get a perfect score for competition’s sake and of course it would also benefit me a lot. I am determined to get a perfect score tomorrow and I wouldn’t even attempt to cheat during the quiz. I’m pretty confident that I’ll be getting a high score on this quiz. Despite my body’s not on its 100% because I am having a slight cold and a bit of a headache to come with it. Well for me being sick wouldn’t matter because I’m awesome. Gtg, need some sleep so that my mind would function awesomely tomorrow. Good luck to me and to her. ;)
EP#50: It's been a while
It’s been a while I won’t discuss what happened during the past weeks but instead I’ll just stick with what happened today. Don’t worry the previous were awesome as usual.
The main thing here is the confrontation that I had with my Mom.
Let me give you a brief description on our situation right now. From this July until now I’ve been living in Pasig during school days. Then just a few weeks after, T-Tel got a job and also lived there eventually. Which means me and T-Tel are in Pasig while T-Tin, Anne and Mom are in Cavite.
Well with the freedom that I was able to get once again the first term became legen.. wait for iiiit.. dary! LEGENDARY! And here comes the second term where in I wasn’t aware that there’s going to be Sunday make-up classes. So I settled for my schedule which is during M-F is from 10:30AM - 4:30PM then from 7:30AM-12:00PM during Saturdays. It’s a pretty good schedule avoiding the rush hour and taking the more subjects than usual. But then here comes the Sunday classes which are scheduled for each day of the week. (For ex: last Sunday it’s our Monday class which is scheduled and tomorrow it will be the day for our Tuesday class) Now it’s so clear that I won’t have any weekend until this term is over. The major concern for me is my health. I wonder if my body can withstand the fatigue the stress and the pressure.
But here’s a bigger dilemma which I was able to see earlier and it’s about the communication within our family. Now everyone has a thing to get busy with and I became really busy and sometimes up to the point where in I am grasping for some rest.
Now let me go to the main thing, after dinner I got irritated when my Mom began to talk about safety precautions and knowing that those kind of talks will last for a while I decided to go upstairs. And to my surprise my Mom called me back before I even set foot on the first step of our stairs. And then she asked me about is there something that she did that made me don’t want to listen to what she’s saying. I am a kind of person where in you’ll need a shovel when you’re talking to. Not to hit me but to dig deeper and get to what I really am thinking or saying. And often when you’re talking to me it seemed like I’m not paying attention and completely not listening to what you’re saying but I really am listening.
(For my own privacy I won’t tell what we talked about.)
At the end of the talk I almost cried. My eyes were so teary and I am feeling so sorry. I realized that it’s the biggest thing that we’re missing. Even me and T-Tel we don’t always get the chance to talk everyday and there are times where in we really wouldn’t see each other even though we’re just under the same roof. Catching up with each other is the hardest thing for my family right now. I have a solution but I can’t implement it because even I can’t assure if I would be able to do it. We just have to stay strong for now and try to burst out this situation.
The main thing here is the confrontation that I had with my Mom.
Let me give you a brief description on our situation right now. From this July until now I’ve been living in Pasig during school days. Then just a few weeks after, T-Tel got a job and also lived there eventually. Which means me and T-Tel are in Pasig while T-Tin, Anne and Mom are in Cavite.
Well with the freedom that I was able to get once again the first term became legen.. wait for iiiit.. dary! LEGENDARY! And here comes the second term where in I wasn’t aware that there’s going to be Sunday make-up classes. So I settled for my schedule which is during M-F is from 10:30AM - 4:30PM then from 7:30AM-12:00PM during Saturdays. It’s a pretty good schedule avoiding the rush hour and taking the more subjects than usual. But then here comes the Sunday classes which are scheduled for each day of the week. (For ex: last Sunday it’s our Monday class which is scheduled and tomorrow it will be the day for our Tuesday class) Now it’s so clear that I won’t have any weekend until this term is over. The major concern for me is my health. I wonder if my body can withstand the fatigue the stress and the pressure.
But here’s a bigger dilemma which I was able to see earlier and it’s about the communication within our family. Now everyone has a thing to get busy with and I became really busy and sometimes up to the point where in I am grasping for some rest.
Now let me go to the main thing, after dinner I got irritated when my Mom began to talk about safety precautions and knowing that those kind of talks will last for a while I decided to go upstairs. And to my surprise my Mom called me back before I even set foot on the first step of our stairs. And then she asked me about is there something that she did that made me don’t want to listen to what she’s saying. I am a kind of person where in you’ll need a shovel when you’re talking to. Not to hit me but to dig deeper and get to what I really am thinking or saying. And often when you’re talking to me it seemed like I’m not paying attention and completely not listening to what you’re saying but I really am listening.
(For my own privacy I won’t tell what we talked about.)
At the end of the talk I almost cried. My eyes were so teary and I am feeling so sorry. I realized that it’s the biggest thing that we’re missing. Even me and T-Tel we don’t always get the chance to talk everyday and there are times where in we really wouldn’t see each other even though we’re just under the same roof. Catching up with each other is the hardest thing for my family right now. I have a solution but I can’t implement it because even I can’t assure if I would be able to do it. We just have to stay strong for now and try to burst out this situation.
LP#25: Uninspired
Every second I want to be with you
Being in my dream isn’t enough
Even if it’s the sweetest one
Because I want to always be beside you
Can’t wait to make you smile
Can’t wait to hug you tight
Can’t wait to kiss your lips
That every minute I’d surely miss
You and I forever
And I don’t want another
Can’t wait much longer
For us to be together
Every minute I want to spend it with you
To be alone with you is what I want
Even if it’s just for a day
So that I can always be beside you
Then I will make you smile
I will hug you tight
I will kiss your lips
There’s not a minute I’m going to waste
You and I forever
And I don’t want another
Can’t wait much longer
For us to be together
Every second of the day
I think about you all the time
Wishing that you’d be mine
And hoping that it would last for a lifetime
You and I forever
And I don’t want another
Can’t wait much longer
For us to be together
Being in my dream isn’t enough
Even if it’s the sweetest one
Because I want to always be beside you
Can’t wait to make you smile
Can’t wait to hug you tight
Can’t wait to kiss your lips
That every minute I’d surely miss
You and I forever
And I don’t want another
Can’t wait much longer
For us to be together
Every minute I want to spend it with you
To be alone with you is what I want
Even if it’s just for a day
So that I can always be beside you
Then I will make you smile
I will hug you tight
I will kiss your lips
There’s not a minute I’m going to waste
You and I forever
And I don’t want another
Can’t wait much longer
For us to be together
Every second of the day
I think about you all the time
Wishing that you’d be mine
And hoping that it would last for a lifetime
You and I forever
And I don’t want another
Can’t wait much longer
For us to be together
LP#24: Substitution
Written by: Benj Medina III
Written on: Nov 18 ’09 @ 11:25PM – 11:54PM
It surprises me to see you still with him
After all what he’s been doing
You know there’s someone else he’s seeing
Why can’t you see? (I’m just right here)
I’m one of the better guys for you
And never would I hurt someone like you
Just give me this day
And I’m sure you’re going to make me stay
Because you’re better off with me
Time to change sides (time to change sides)
Make this substitution (Because I’m the better man)
And girl let me be part of your life
I know it’s going to break your heart
But I’m always going to be here for you
So make this substitution (Because I’m the better man)
And girl I want you to be part of my life
It surprises me to see you even date him
After all what he’s been doing
You know how many girls he all left crying
Why can’t you see? (I’m just right here)
I’m one of the better guys for you
And never would I hurt someone like you
Just give me this day
And I’m sure you’re going to make me stay
Because you’re better off with me
Time to change sides (time to change sides)
Make this substitution (Because I’m the better man)
And girl let me be part of your life
I know it’s going to break your heart
But I’m always going to be here for you
So make this substitution (Because I’m the better man)
And girl I want you to be part of my life
I know I’m not someone you can trust easily
But I’m sure that I’ll love you more than he ever did
And I’m never going to do the things that he did to you
And there’s no way that I will hurt you girl
Because for me you’re the one and the only one
So make this substitution (Make this substitution)
Make this substitution (Make this substitution)
And I’m sure you’re going to make me stay
Because you’re better off with me
Time to change sides (time to change sides)
Make this substitution (Because I’m the better man)
And girl let me be part of your life
I know it’s going to break your heart
But I’m always going to be here for you
So make this substitution (Because I’m the better man)
And girl I want you to be part of the rest of my life
Written on: Nov 18 ’09 @ 11:25PM – 11:54PM
It surprises me to see you still with him
After all what he’s been doing
You know there’s someone else he’s seeing
Why can’t you see? (I’m just right here)
I’m one of the better guys for you
And never would I hurt someone like you
Just give me this day
And I’m sure you’re going to make me stay
Because you’re better off with me
Time to change sides (time to change sides)
Make this substitution (Because I’m the better man)
And girl let me be part of your life
I know it’s going to break your heart
But I’m always going to be here for you
So make this substitution (Because I’m the better man)
And girl I want you to be part of my life
It surprises me to see you even date him
After all what he’s been doing
You know how many girls he all left crying
Why can’t you see? (I’m just right here)
I’m one of the better guys for you
And never would I hurt someone like you
Just give me this day
And I’m sure you’re going to make me stay
Because you’re better off with me
Time to change sides (time to change sides)
Make this substitution (Because I’m the better man)
And girl let me be part of your life
I know it’s going to break your heart
But I’m always going to be here for you
So make this substitution (Because I’m the better man)
And girl I want you to be part of my life
I know I’m not someone you can trust easily
But I’m sure that I’ll love you more than he ever did
And I’m never going to do the things that he did to you
And there’s no way that I will hurt you girl
Because for me you’re the one and the only one
So make this substitution (Make this substitution)
Make this substitution (Make this substitution)
And I’m sure you’re going to make me stay
Because you’re better off with me
Time to change sides (time to change sides)
Make this substitution (Because I’m the better man)
And girl let me be part of your life
I know it’s going to break your heart
But I’m always going to be here for you
So make this substitution (Because I’m the better man)
And girl I want you to be part of the rest of my life
LP#23: Time Out
Written by: Benj Medina III
Written on: Nov 15, 2009 from 11:40PM-12:14AM
One rainy Sunday afternoon
I’m all alone sitting by the window
Waiting for the rain to stop
Then I saw you and you came to me
All of a sudden all my problems were gone
To see you out of the blue
Maybe I’m just lucky because it’s just a coincidence
Maybe it’s about time for me to believe in destiny
Being alone with you seemed unreal
So I pinched myself to make sure it’s real
We looked very comfortable with each other
Sharing some disappointments and some laughter
Less than an inch you’re right here at my left
Walking slowly and looking closely
At that beautiful face of yours
I wish that today is every day
Because I just can’t get enough of you
If I could then I would stop the time
To stare at you for as long as I want
And to kiss you before making the time run again
Looking forward to each day that I’m going to see you
And every day I just want to be with you
Even if it’s just for a short period of time
It’s enough to make and see you smile
Being alone with you was only a dream
So I pinched myself to make sure that this is real
I would really like to stop the time
So that I would be alone with you as long as I want to
Written on: Nov 15, 2009 from 11:40PM-12:14AM
One rainy Sunday afternoon
I’m all alone sitting by the window
Waiting for the rain to stop
Then I saw you and you came to me
All of a sudden all my problems were gone
To see you out of the blue
Maybe I’m just lucky because it’s just a coincidence
Maybe it’s about time for me to believe in destiny
Being alone with you seemed unreal
So I pinched myself to make sure it’s real
We looked very comfortable with each other
Sharing some disappointments and some laughter
Less than an inch you’re right here at my left
Walking slowly and looking closely
At that beautiful face of yours
I wish that today is every day
Because I just can’t get enough of you
If I could then I would stop the time
To stare at you for as long as I want
And to kiss you before making the time run again
Looking forward to each day that I’m going to see you
And every day I just want to be with you
Even if it’s just for a short period of time
It’s enough to make and see you smile
Being alone with you was only a dream
So I pinched myself to make sure that this is real
I would really like to stop the time
So that I would be alone with you as long as I want to
Subscribe to:
Posts (Atom)