The Mechanics of Programming

Not many people know this, but coding is a lot like writing. When we write, we use expressions and phrases to express what we are thinking. We do the same thing in programming, only instead of words and sentences, we use things like variables, methods, and classes.

Take this sentence, for example:

images/programming/dog.png

How do you think we could write this sentence in a way a computer could understand? Well, one way you could do it in Java is like this:

images/programming/5dogs.png

This is called a variable. It’s an abstraction of some thought or thing we want to represent ...

Get The Way of the Web Tester now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.