Name Well

One of the hardest parts of programming—and computer science—is choosing names. This is no joke—it really is difficult, and it is critically important. No, the computer and phone don’t care what you named your button. But for humans, this is a big deal.

Names are more than just a word or two to describe what something does. The process of naming causes you to think about what it should do and what it should not do. You might have a button named submit_button, for example. This name makes it clear to others, and to you, that the button is used in the process of submitting something. It is not for clearing the screen or any other function. It is for submitting.

As another example, a variable might be named sum, and that could be a good ...

Get Learning MIT App Inventor: A Hands-On Guide to Building Your Own Android Apps 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.