Save
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

techniques

2.2 - programming techniques

TermDefinition
sequence when code runs in a specific (often linear) order
iteration/looping whenever code is set to run multiple times
count vs condition controlled loops count controlled loops iterate code a specific number of times condition controlled loops iterate code until a statement is true
selection/branching when the order of the code/ the code ran depends on a condition
nest structures whenever different techniques are combined in the same project (eg a for loop within an if statement)
global variables variables that are stored outside of a function i.e. they can be used anywhere within the program
local variables variables that can only be used within the function they are defined in, and their memory address is wiped whenever the function is finished
global variable issues can be used and therefore tampered with anywhere within the program their storage in memory can be inconsistent due to their function generally considered bad programming practice, but can be sometimes necessary
modularity the process of decomposing a problem down into smaller, more manageable chunks, giving each chunk with a sub-procedure
procedures vs functions both are subroutines, yet only functions return a value
parameters the values the sub procedure need when a function is called (used in their definition)
passing by value where a parameter that the subroutine uses is treated as a local variable based on the argument (variables passed in will not change as the sub-procedure changes it)
passing by reference where a parameter that the subroutine uses changes the value of the argument directly (variables passed in will change as the sub procedure changes it)
IDEs Integrated Development Environments - programs that help users code more effectively and effectively, often by either helping them directly or abstracting/managing the more complicated parts of programming
IDE stereotypical benefits - code highlighting/autocompletion/autocorrection - auto compiling - inbuilt debuggers (often telling the coder what exactly caused the error) - auto documentation/saving
arguments the values the sub procedure uses when a function is called (used when they're called)
rules of recursion to prevent indefinite iterations - contains a stopping condition (base case) - the base case should be reachable in a finite number of iterations - the function iterates itself if it's not using the base case
ways of visualizing the order/events of code code using a truth table (selection), flow chart (general case), stacks (often for iteration/recursion)
recursion benefits / downsides whilst it is powerful to use if the coder is aware of it, saving lines and preforming tasks that pure iteration can not do, it is not very efficient in memory as a new copy of the function is needed for every iteration of the recursion
when should object oriented programming be used? when you’re able to encapsulate and model entities as objects, defining them as classes and investigating how they should interact with each other
main examples of OOP GUI (graphics user interface) Computer games
recursion when a sub-procedure is defined in terms of itself (the sub-procedure calls itself somewhere within it)
Created by: That cool NAMe
Popular Science sets

 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards