Realistic break-apart effect in Photoshop

There are a lot of tutorials on the web about break-apart effect. But for sure your not that old because anyone who stop’s learning is old, whether at twenty or eighty.

.net Naming Conventions (Part 2)

.net Naming conventions covers a great topic when naming windows controls. It will give you a wide range of ideas and options to promote readability and integrity for your next project.

To Build a Bridge

This story is one of the best I have ever read. Imagine a man who can only move one of his fingers yet he was still able to pursue and achieve his dream. Inspiring isn't it?

14 June 2011

To Build a Bridge

The Brooklyn Bridge that spans the river tying Manhattan Island to Brooklyn is truly a miracle bridge. In 1863, a creative engineer named John Roebling was inspired by an idea for this spectacular bridge. However, bridge-building experts throughout the world told him to forget it; it could not be done.

Roebling convinced his son, Washington, who was a young upand coming engineer, that the bridge could be built. The two of them developed the concepts of how it could be accomplished and how the obstacles could be overcome. With un harnessed excitement and inspiration, they hired their crew and began to build their dream bridge.

The project was only a few months under construction when a tragic accident on the site took the life of John Roebling and severely injured his son, Washington. Washington was left with permanent brain damage and was unable to talk or walk. Everyone felt that the project would have to be scrapped since the Roeblings were the only ones who knew how the bridge could be built.

Even though Washington was unable to move or talk, his mind was as sharp as ever, and he still had a burning desire to complete the bridge. An idea hit him as he lay in his hospital bed, and he developed a code for communication. All he could move was one finger, so he touched the arm of his wife with that finger, tapping out the code to communicate to her what to tell the engineers who were building the bridge. For thirteen years, Washington tapped out his instructions with his finger until the spectacular Brooklyn Bridge was finally completed.

Coffee for a thought?

A group of alumni, highly established in their careers, got together to visit their old university professor. Conversation soon turned into complaints about stress in work and life.

Offering his guests coffee, the professor went to the kitchen and returned with a large pot of coffee and an assortment of cups - porcelain, plastic, glass, crystal, some plain looking, some expensive, some exquisite - telling them to help themselves to the coffee.

When all the students had a cup of coffee in hand, the professor said: "If you noticed, all the nice looking expensive cups have been taken up, leaving behind the plain and cheap ones. While it is normal for you to want only the best for yourselves, that is the source of your problems and stress.

Be assured that the cup itself adds no quality to the coffee. In most cases it is just more expensive and in some cases even hides what we drink. What all of you really wanted was coffee, not the cup, but you consciously went for the best cups... And then you began eyeing each other's cups.

Now consider this: Life is the coffee; the jobs, money and position in society are the cups. They are just tools to hold and contain Life, and the type of cup we have does not define, nor change the quality of life we live.

Sometimes, by concentrating only on the cup, we fail to enjoy the coffee. Savor the coffee, not the cups! The happiest people don't have the best of everything. They just make the best of everything. Live simply. Love generously. Care deeply. Speak kindly.

09 June 2011

Faith

An Atheist Professor of Philosophy was speaking to ...his Class on the Problem Science has with GOD, the ALMIGHTY. He asked one of his New Christian Students to stand and . . .

Professor : You are a Christian, aren't you, son ?

Student : Yes, sir.

Professor: So, you Believe in GOD ?

Student : Absolutely, sir.

Professor: Is GOD Good ?

Student : Sure.

Professor: Is GOD ALL - POWERFUL ?

Student : Yes.

Professor: My Brother died of Cancer even though he Prayed to GOD to Heal him.

Most of us would attempt to help others who are ill.

But GOD didn't. How is this GOD good then? Hmm?

(Student was silent )

Professor: You can't answer, can you ? Let's start again, Young Fella.
Is GOD Good?

Student : Yes.

Professor: Is Satan good ?

Student : No.

Professor: Where does Satan come from ?

Student : From . . . GOD . . .

Professor: That's right. Tell me son, is there evil in this World?

Student : Yes.

Professor: Evil is everywhere, isn't it ? And GOD did make everything. Correct?

Student : Yes.

Professor: So who created evil ?

(Student did not answer)

Professor: Is there Sickness? Immorality? Hatred? Ugliness?
All these terrible things exist in the World, don't they?

Student : Yes, sir.

Professor: So, who Created them ?

(Student had no answer)

Professor: Science says you have 5 Senses you use to Identify and Observe the World around you.
Tell me, son . . . Have you ever Seen GOD?

Student : No, sir.

Professor: Tell us if you have ever Heard your GOD?

Student : No , sir.

Professor: Have you ever Felt your GOD, Tasted your GOD, Smelt your GOD?
Have you ever had any Sensory Perception of GOD for that matter?

Student : No, sir. I'm afraid I haven't.

Professor: Yet you still Believe in HIM?

Student : Yes.

Professor : According to Empirical, Testable, Demonstrable Protocol,
Science says your GOD doesn't exist. What do you say to that, son?

Student : Nothing. I only have my Faith.

Professor: Yes,Faith. And that is the Problem Science has.

Student : Professor, is there such a thing as Heat?

Professor: Yes.

Student : And is there such a thing as Cold?

Professor: Yes.

Student : No, sir. There isn't.

(The Lecture Theatre became very quiet with this turn of events )

Student : Sir, you can have Lots of Heat, even More Heat, Superheat, Mega Heat, White Heat,
a Little Heat or No Heat.
But we don't have anything called Cold.
We can hit 458 Degrees below Zero which is No Heat, but we can't go any further after that.
There is no such thing as Cold.
Cold is only a Word we use to describe the Absence of Heat.
We cannot Measure Cold.
Heat is Energy.
Cold is Not the Opposite of Heat, sir, just the Absence of it.

(There was Pin-Drop Silence in the Lecture Theatre )

Student : What about Darkness, Professor? Is there such a thing as Darkness?

Professor: Yes. What is Night if there isn't Darkness?

Student : You're wrong again, sir.
Darkness is the Absence of Something
You can have Low Light, Normal Light, Bright Light, Flashing Light . . .
But if you have No Light constantly, you have nothing and its called Darkness, isn't it?
In reality, Darkness isn't.
If it is, were you would be able to make Darkness Darker, wouldn't you?

Professor: So what is the point you are making, Young Man ?

Student : Sir, my point is your Philosophical Premise is flawed.

Professor: Flawed ? Can you explain how?

Student : Sir, you are working on the Premise of Duality.
You argue there is Life and then there is Death, a Good GOD and a Bad GOD.
You are viewing the Concept of GOD as something finite, something we can measure.
Sir, Science can't even explain a Thought.
It uses Electricity and Magnetism, but has never seen, much less fully understood either one.
To view Death as the Opposite of Life is to be ignorant of the fact that
Death cannot exist as a Substantive Thing.
Death is Not the Opposite of Life: just the Absence of it.
Now tell me, Professor, do you teach your Students that they evolved from a Monkey?

Professor: If you are referring to the Natural Evolutionary Process, yes, of course, I do.

Student : Have you ever observed Evolution with your own eyes, sir?

(The Professor shook his head with a Smile, beginning to realize where the Argument was going )

Student : Since no one has ever observed the Process of Evolution at work and
Cannot even prove that this Process is an On-Going Endeavor,
Are you not teaching your Opinion, sir?
Are you not a Scientist but a Preacher?

(The Class was in Uproar )

Student : Is there anyone in the Class who has ever seen the Professor's Brain?

(The Class broke out into Laughter )

Student : Is there anyone here who has ever heard the Professor's Brain, Felt it, touched or Smelt it? . . .
No one appears to have done so.
So, according to the Established Rules of Empirical, Stable, Demonstrable Protocol,
Science says that You have No Brain, sir.
With all due respect, sir, how do we then Trust your Lectures, sir?

(The Room was Silent. The Professor stared at the Student, his face unfathomable)

Professor: I guess you'll have to take them on Faith, son.

Student : That is it sir . . . Exactly !
The Link between Man & GOD is FAITH.
That is all that Keeps Things Alive and Moving.

*************************************************

I believe you have enjoyed the conversation, and if so,
you'll probably want your friends/colleagues to enjoy the same. Won't you?
Forward them to increase their knowledge, or FAITH.
That student was Albert Einstein. =)

.net Naming Conventions (Part 2)

The part two of the article will be a little bit tricky. I may not be able to suggest a concrete idea for you on how to name some of the controls on the windows form. All I can do is to give you ideas about the pro’s and cons of the name you will give to the control. Well, let’s start with the easy ones.

Windows forms
I used the prefix “frm” followed by the name of the form with the first letter of the word capitalize. Very easy to read. Easy to search on intellisence grouping and you can easily identify your forms with their prefixes.

Examples:  frmHome      frmProducts       frmLogdetails


Well now enough for the easy part. Let’s get to the hard part. Well be talking about these controls first the Label, Textbox, Buttons, Combobox and Panels because these controls are what I used the most and has the most conflict.
When I was just starting out vb.net it was very easy for me to name this controls. See the example below:


Now the first con with these is when you have to change control type. At first you only expected to put names on Textbox right? But how about the issue regarding the returning students? To solve the issue you decided to change it to a combobox instead so that if the name already existed you just have to enable his account again. What if there are 20 statements in your code using the control txtName? It would really take time to change those names to cbxName right?
Here is a possible solution to the problem:


With this type of naming convention you can easily change control types without having difficulty to change their occurrences on your code. Let’s use the problem that we had above. At first we were using a textbox for our name. With this convention we use the NameField as the name for our textbox. If we decide to change it to a combobox we will just delete the textbox control then add a combobox control and give the combobox the same name because it has the same purpose on the form. It is a field for our Name.

Now, due to larger demands for friendlier and better GUI, we also have to come out with more uses with our controls. Make something different from what most control usually do. Just like the example below.
You can’t make those buttons by simply using the default button control so I used panels for those buttons because panels support transparent backgrounds and able to contain images. With the naming convention that we used above, we can simply name the panel CloseCommand and MinimizeCommand without having any problems identifying its purpose. We don't even have to emphasize on the name that it is panel because we don't use it as a panel in our form. It is a command button.

If you feel that it’s getting clearer now, well it’s not. Let’s take a look back with what we are missing here. Ok I remember, how about the picturebox? The checkbox? In short the other controls. What kind of suffix shall we give them? This is the point where it gets really tricky.

I’m a developer who promotes readability and integrity, even if your not that good at programming I want you to be able to understand what the program is all about. I would not say that the solution I made is the one you should follow, as I said before it really depends on your team what conventions to use to promote readability and integrity on your project.

Here are some examples of the names I used for the controls since I stick with the “frm” naming for my forms:

NameTextbox     SubmitButton     LogoPicturebox     ActiveCheckedBox     BackgroundPanel


I used the names above for the controls that are used just the way they are supposed to. Now for the controls that are used in other ways:

ClosePanel_Cmd      MinimizePanel_Cmd


I put an underscore plus the abbreviate description of what it will do as a suffix to its name and control type. Through this method you can easily identify that the panel has other purpose on the form.

You might be thinking now, how about the change in control scenario? Do we have to waste a lot of time to renaming the deleted control with the new one?

I found two ways to solve this.

● Using quick replace

  1. Change your control type from textbox to combobox then give it a name.
  2. Go to your code, then press ctrl + F and the Find and Replace diaglog box will appear.
  3. Click the quick replace tab, type the name of your deleted textbox in the “Find what” field then type the name of your combobox on the Replace with Field.
  4. Then click replace all. You’re done.

● Using rename

  1. Go to your code and right click on the name of your textbox control.
  2. Choose rename, and then type the name you want for your combobox control.
  3. Now delete the textbox control on your form. Replace it with a combobox and name your combobox   with the name you choose to rename the text box in the code.
  4. That’s it you’re done.

I made all this adjustments on the names based on my experiences, it's working great for me when I'm doing vb.net projects at school. 

I hope you learn a lot from this article. I'm not really sure if I could still make a part 3 of this since I'm already running out of idea on naming conventions. But if you have questions, clarifications and suggestions feel free to leave a comment below maybe then we could compile your comments to create a part 3 of this article as a close up on .net naming conventions. 

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More