Programming standards

Rosie
Rosie. Cute, much?

APK. Variables, comments

Say you write a program today. Six months later, your boss asks you to write a similar one. You copy that program, and adjust it.

That's fine, but you have to understand your past code before you can change it.

Ray
Ray

Wait. Of course you'll understand it. You wrote it.

Maybe not. Your brain doesn't remember all the deets of everything you do. It's common for programmers to not remember how code they're written in the past works.

Most companies have programming standards. Following standards make it easier for future you and others to work with your code.

We'll have a few standards in this course. Not many, just the most important ones. Follow them in every program you hand in.

Variable names

Three things here:

  • Lowercase only
  • Snake case
  • Meaningful

EXPLAIN

Comments

Description, name, date

Pattern markers

Complicated code.

More?

We might add new standards as we go. But for now, these will do.

Summary

Up next