Operational Governance Knowledge Flashcards No. 05/19

Coding

From the Operational Governance flashcard deck; today this discipline goes by BizOps. The original card is republished here as a field note.

01 What is it

A method for instructing computers — systems that automatically carry out sequences of arithmetic or logical operations — to perform specific tasks. When we code, we are creating a program (a set of instructions) for the computer to interpret and execute.

Most computers consist of at least a processing unit (to perform arithmetic and logical steps) and some form of memory to store data.

02 When is it useful

For everything from sleeping better to achieving world peace. It is an engineering tool: a way to use the principles of science to solve practical problems.

When we need a computer to perform tasks or solve a problem, relieving us humans from the grind of burdensome tasks in a fraction of the time.

03 How to use it

  1. Pick an appropriate programming language for the problem (usually Python).
  2. Incorporate all the useful pre-programmed tools you can find from the community.
  3. Write your additional code in such a way that the computer can interpret what you want it to perform.
  4. Test the code for bugs.
  5. Let your software be free and roam the world.

04 The learning path on the card

  • Prepare your coding environment
  • The console vs the text editor
  • Use functions
  • Use conditionals
  • Use loops
  • Want more? Objects, classes, inheritance…

05 Common pitfalls

  • Don’t let the choice of a language prevent you from learning. Just pick one and start coding. Don’t worry if you ever need to learn a different one: the “new” learning curve will be trivial.
  • Rely heavily on the community in forums, code repositories, etc. Do not reinvent the wheel — reuse good code that is already available out there.
  • If the program is not doing what you want, then you are wrongly telling the computer to do something else. It’s not the computer’s fault.

06 References and resources

  • The best YouTube Python tutorial I could find for total beginners