# Concepts for Topic 4 in IB Computer Science Page 191 in the book. These concepts usually have two scopes. The internal of the programming skills and also the organizational skills of "how to do something" **Pre-planning** is the process of planning something in advance (_duh_). If we use this in programming is to think (and do) all the requirements that we need to do _the thing that we actually we want to do_. For example, when you see the typical "get the average of the data on an array" we write something like this ```= MY_ARRAY[40] // array of 40 elements SUM = 0 loop C from 0 to 39 SUM = SUM + MY_ARRAY[C] end loop AVERAGE = SUM / 40 ``` In the line 2 we need to pre-plan that if we want to do a SUM we need to make sure that starts with 0. That's pre-planning. In cooking this is also called "mis en place" (put it place in French because cooking) ![mise-en-place](https://hackmd.io/_uploads/ByFn27Rcp.png) But also can be think as a more complex enviroment. If you run a restaurant, the pre-planning is having all the logistics in place so you have all the elements to cook and the people and so on. ![imagen](https://hackmd.io/_uploads/r1hFTX05a.png) _that's logistics:notes:_ In programming (and more specifically your IA) you need this pre-planning to a) know what are the parts of your IA and how (more less do them) and how they join together b) Find different (if needed) frameworks to each part. **Prefetching** is get data or instructions before they are actually needed. That can be useful to not wait for the RAM or the secondary memory to get that information. In many videogames the "loading screen" is usually about prefetching all the possible information that the player may see. **Gantt chart** ![Gantt_chart_example](https://hackmd.io/_uploads/H1Rt84WlR.png) A Gantt chart is a chart where you can display different tasks that are going to happen through time. This can have mainly 2 scales * Scale of developing. When doing a project (like an Internal Assessment) you will have different tasks to do. Analysis, design, developing, testing, etc. And maybe different people. A Gantt diagram allows to order that and put dates into the equation. * Scale of the program itself. The execution of a program also does different tasks (in one or more threads of execution) and we can use a Gantt diagram to see what is happening at which tyme. Two elements in a Gantt diagram can have a **sequential** order (A happens before or after B) or can be **concurrent**. This means that they happen at the same time. :::info In the past IB test have asked about the specifics of a Gantt diagraman and the term concurrent. :::