Coding Study Guide

The Four Pillars

There are four major concepts that should be understood about programming and these are universal in all programming languages, Variables, Loops, Conditions and Functions. The definition links and the examples below are in different languages, to make exactly this point. Operators are probably worthy of a pillar themselves, but there are slight variations in languages, unlike the other four examples.

The PHP example below uses the final code from the HTML 5 Part 2 tutorial with comments stripped out for readability. I included a definition for parameters/arguments, which may be supplied as variables or literal data, but are not to be confused with or identified as a variable.

The Processing example is followed by a Sketch where you can copy and paste the code to understand the nested loops that are included within the code. Open up Processing and run that code, moving things inside out outside of the loops to get a better understanding of how loops and conditionals work.

You will be Tested on this

First part of the test will be vocabulary and ability to identify correctly functions, loops, variables, conditions, arrays, parameters and scope for any piece of code you are shown. This will be closed book and will test your knowledge. From our WordPress work, you should be familiar with the Dashboard, and know the difference between a Page and a Post, what a functions.php is and what is required in a Child Theme. Know what a shortcode is and how to pass parameters via shortcode as well as who uses it and where it is used.

An example for this portion of the test might be to show a .jpg of a block of code with a variable that increments within a loop or nested loop and we will ask for the value of that variable once all the loops have run. The numbers will be simple, but it will require you to fully understand how loops work. You will need to know the math Operators listed on the Processing Reference page under Operators.

You will not be allowed to write or run code or use references for this portion of the test.

The second part of the test will be open book/web/reference/notes and will require you to complete two coding tasks in Processing Java Mode. The tasks will be based on your homework below:

Complete the Processing 2D Transformations tutorial and then add two symmetrically placed antenna onto the robot, that rotate from the base (top of the robots head). If you cannot complete this task as homework, you will not be able to pass this half of the test.

Additional study material would be to complete the Robot tutorial (not the same Robot as above!) section of Getting Started with Processing, the example files are included in Processing, located at Processing>Examples>Books>Getting Started>Robots This tutorial also reviews variables, functions and arrays, which will really help with the first part of the test as well.

The test will be about an hour – 15 minutes for the vocabulary test and 45 minutes for the code test.



Leave a Reply