# Revision M24 CS No order over here # Topic 1. System fundamentals Differences between words Implementation: Can refer to a) the specificacion of a specific solution to a problem. (usually in a method or subprogram) b) The deployment of a solution or a system (remember that systems can also include Hardware or even people) in an organization. Stages: phases. In the development cycle there are several ways to separate it. For example, design (finding a solution), implementation (writing the actual solution), deployment (applying the solution to the real context), production (regular running of the solution). Compatibility issues and legacy systems Legacy systems: old existing systems (they can work properly or not, they can be updated or not) Compatibility issues: * Incompatible hardware (diskettes and CDs). Different wiring (USB-C - lightning) * Different data structures (Different objects layouts, different data formats, different date formats) * Incopatibility in their interface (when we have a program that should interact with other and that doesn't work properly) SaaS Software as a Service. Example: Clickedu, Teams, WoW. The company lends the right to use the software and even the infrastructure to use the software. Hades or Open TTD: not sofware as a service. ### Types of installation * Direct Changeover * Parallel * Pilot * Phased ### Data migration Transfer of information from one place to another. Usually between formats, storages types or even systems. Problems that may arise - Incompatibility issues - Data loss - Data misinterpreted (09-11-2001 can refer to different dates) ### Testing Testing is to check if our program works _as intended_. If the program does whatever we want to do we call it _feature_ if we don't want to do it that way we call it an error or a _bug_ and we usually want to fix it. The process of finding the problem that we need to fix in a bug is called _debug_ ### Testing vocabulary #### Types of data when doing a test Normal data Data at the limits Extreme data Abnormal/illegal data Example. "Percentage of people wearing gloves at the opera" Normal data 5, 6, 8.5 Data at the limits 0, 100 Extreme data -2, 105, 3500 Abnormal/illegal data: "three" ":smile:" ":bat:" " 22_d2" ### Types of testing regarding the people who test (Usually asked in the exams) Alpha testing: internal from the software developer Beta testing: open to some (or all) final users. User acceptance testing: Determines if the software works or not usually to end the contract. (can be a beta test or not) ### Different types of testing regarding how is it done Dry-run testing. Pen and paper. Unit testing. One "component" of the code is tested separatedly from the others. :::info What is a component or a module is a part of a bigger code, for example in many projects the backend(DB) and the frontend are different components) Also other projects can have other components or subcomponents. For example a website can have different webpages to test independently ::: Integration testing: the entire testing is tested at the same time so we can verify if all the components work together as intended. :::info In big projects there is an especific **enviroment** to this kind of integration testing. ::: ### Validation and verification In context of data input * Validation: is this data correct in the specifications? (validateDNI) * Verification: is the data the data that was actually input? In the context of software development * Validation: Is my IA doing what is suposed to do? * Verification: Is my IA doing it's thing in the correct way? ### Documentation * **Internal documentation.** Part of the code and how is understood by the developers. Can be on coments on code or can be an internal wiki. * **External docuentation.** Part of the documentation for the external users. One of this types of documentation is... * **Technical documentation.** How to install the system. ### Ways to deliver user documentation. * Online * Printed pdfs * FAQ website * Embedded Assistance * Help files Other ways of support * Email support * Live chat sessions * Phone support * Remote desktop connections. ### Delivering user training * Self instruction * Formal classes * Online training ## System backup _this is always on the exam_ ### Data loss Data lost or destroyed for several reasons. Reasons: + accidental deltion + Power failure + Viruses + Data corruption + Ransomeware Consequences of data loss. Depending on the context but can be very severe. * Bank context * If we lose the data of the balance of all the accounts on the bank it's going to be a huge problem to get everything back. * Medical context * If the medical records of people get lost (and not recovered) a lot of diagnosis would have to be redone and many diagnosis can be misleading since they have missing information. * School context * We may need to repeat a lot of test or get back a lot of information. Methods to prevent data loss * Regular backups * Data storege in 2 or more locations * Systems to avoid accidental deletion Less efficient: * Firewall * Instalation of antivirus program Redundancy: duplication of data Failover system: Computer system that can come online in the case that the main system fails. ## Sofware deployment Deploy is when we actually put the software on practice (production) or we deliver it to the public. Nowadays we are used to software deployments that are online. When we change significantly the system (sofware, etc) we have to deploy the new version. We can have different levels of change. From the smallest to the biggest are these: * Patch. I usually a newer version that corrects something that was wrong. A bug usually (or several). * Update. Usually have small improvements and not only bug patching. * Upgrade. Usually have significant new characterists and also cumulative bug fixes. * Release. Final working version of software applications. ## System design basics ### Vocabulary * Hardware: _maquinari_ in catalan * Softawre: _programari_ in catalan * Peripheral device * Computer network. Set of computers connected together (it's going to get into a deeper level on topic 3) ### Roles of a computer in a network * Dumb terminal * Thin client * Client * Email server * Router * Domain Name System Server * Firewall * Client server architecture ## Ethical and social issues Remember that for these kind of questions we need to think in the context of computer science. Remember that ethical/social issues are not things like "efficency" or "profit" The idea is to talk about possible human ethical issues * Copyright (Intellectual property) * Human Rights * Privacy * Right to be forgotten * Consent * Personal data * Sensitive personal data Usually the structure of a question like this is "To what extent A or B?" (usually 4 to 6 marks) And the answer should be usually something like "A is [definition of A], B is [definition of B]" then pros of A and cons of A, pros of B, cons of B and a conclusion that is tied to what you have said. ## System design and analysis Stakeholder: someone that has interest in a system. Can be the client, the user or somebody affected by it. Can be individuals or groups or the society as a whole even. * Some of the stake holders ar the **end-users** ### How to get the information from the stakeholders *Common in the exams* ~~Punching them until they say something~~ * Interviews * Questionnaires * Direct observation ### How to get information to arrive to a solution * Examing current systems * Research * Competing products (people that are doing something similar to the actual project) * Organizational capabilities ### Representation of system requirements #### Types of processing * Online processing (interactive). * Real-time processing * Batch processing :::info Online doesn't mean that is through the internet! ::: * Online processing (interactive). As soon as we have some feedback from the user, it gets a response. * Real-time processing. Is processing data without the interaction of a user. Examples: day/night systems in games and also processing of sensors (security cameras and weather stations) * Batch processing. Processing usually a big chung of work in a batch. For example payrolls, insurance notifications. Types of flowcharts This is something that is rare to be seen in exams. But, sometimes they ask questions about general algorithms that work with software. Tipical question of this type is Let's supose that we have a brand with different stores in different cities. In one of them they are celebrating a new opening. We, as a brand, want to send to our customers from that city an invitation to the event. Supposing that we have a sequential file where we have the records of all the clients and their data. Describe the process of sending the invitations. solution would be something similar to what you have in the spoiler :::spoiler We're going to **loop through** the sequential file **checking**each record and seeing if the record of the client has an address of the city that we want to send the invitations. In that case we're going to copy the relevant information (name, address) into a **template** of a word processor and once we have finished the loop we're going to send to print the letters already filled with invitations. ::: ### Prototypes Preliminary versions. Can be working or not working or can be just a demo, or even a mock-up A mock-up is usually done in design to see how it would something look like without even actually doing it. An example is with t-shirt shops that they usually have mock-up files where you input the image of a t-shirt and you have the result of how it would look like ![imagen](https://hackmd.io/_uploads/SyI4RPeCa.png) But as you can see in the image there is no actual model posing for all the t-shirts. Purposes of prototypes * Create hype and attract attention of inverstors * Provide (to an actual client) a more detail idea of what this project will look like * Helps with the process of development (through fails) ### Iteration Iteration has 2 meanings in context of CS * Repetition through loops (while or for) inside an algorithm * Repetition of the _design process_ usually creating different versions. ## Charts and flowcharts Flowcharts of algorithms is something that is more common to be seen in topic 4 buuut sometimes you need to do a structure chart. Better seen with an example: From what I have seen in past papers, I have seen some questions about diagrams where the student given a certain scenario has to draw a diagram of what is happening. Something like "Describe what is the flow of a program of a supermarket where the casher has to use a peripheral to know what is the code of the purchase, is going to be consulted in a database that is in a central computer in the store and then processed so it can be displayed in a screen and later into a ticket" (3-4 marks)" The answer can be something like the following chart. In this case you can remember that DB are usually represented with a cilinder. ![imagen](https://hackmd.io/_uploads/rkSk1Dab0.png) If you don't remember the shapes and you draw something like this. ![imagen](https://hackmd.io/_uploads/B1deJPabC.png) probably is perfectly acceptable and you will get if not all the marks all but 1 mark ## Human interaction with the system ### Accessibility Potential of people that can use it fully. If you can use the system but your grandmother can't is not because is not usable, but because is not accessible enough. Usability refers to effectiveness and full potential. Ergonomics is the science of designing to human scale. Refers to hardware. # Topic 2 Concepts of input, process, storage and output ## CPU * Control Unit (CU) _THE CONTROLLER OF THE BEAST_ * Arithmethic Logic Unit (ALU) _THE BEAST_ * Memory Address register (MAR) holds where is the data that is going to be processed. Is in the CU. * Memory Data Register (MDR) holds the data (itself) that is to be processed ## Primary memory Primary memory that can be accessed directly by the CPU. Main types are RAM and ROM ![Daft_Punk_-_Random_Access_Memories](https://hackmd.io/_uploads/BJqeMCHRp.png) * RAM (Random Access Memory) is a storage that is wiped out when we reset the computer. Is fast and is not as big as secondary memory. Can be read and written. * ROM (Read Only Memory) is a read-only memory and are instructions or data that are basic to the functioning of the computer (basic instructions, name of the model) ## Cache ![29004](https://hackmd.io/_uploads/HkaoGAB0p.jpg) Cache can occurr in CS in different contexts In software is some data that is hold somewhere temporarely to have it at hand. For example browsers have a cache of the images that you have visited so if you visit the same page you don't need to download again the same image. The other context is the same concept but in _hardware_ Cache in RAM Cache in RAM is going to store the most common instructions so if they're needed again they are in a place that is easier to access. Static RAM is an example of Cache. Is a more expensive and faster type of ram and it's saved for just a small caché of common instructions. Dynamic RAM is slower (but bigger an cheaper) RAM. L1 caché is placed in the CPU L2 caché is placed in the RAM ## The machine instruction cicle _they usually ask about this_ 1. Fetch 2. Decode 3. Execute 4. Store You need to understand the steps. ## Secondary memory Secondary memory. Not accesible directly by the CPU. Types of secondary memory * HDD * CDs * DVDs * Flash drives * SDcards * SSD ## Operating systems (OS) An Operating Systems (OS) is a set of software (can be one program or one set of programs) that controls the computer's hardware resources and provides services for computer programs (the applications that we put on them). It acts as a middle-person between the applications and the hardware. Also is called a layer in the software. Services (things that an OS does) * Peripheral communication. Using a subtype of software called *drivers* * Memory management. OS is responsible to manage the memory (primary and secondary) used by applications. * Resource monitoring and multitasking. The OS is making the "magic" that for the users we can do several tasks at the same time. * Networking. OS handles communication through LAN and WIFI. * Security. OS usually have a layer of security (autenthication) Examples of OS MacOS Windows Linux FreeBSD Android iOS ### Where is the OS The OS usually is stored into secondary memory. (Usually a HDD or a SSD). When booted (initialized) it's stored in the primary memory (RAM). In some cases when the OS is so little that can be directly manufactured into the microcontroller is written on the ROM. Not the case usually. ## Applications For these you need to understand that the software that you use can be set in certains categories. "word" or "google docs" are "Word processors". You should remember what are they by their names. * Word processors. Creates written documents. Example: word, gdocs, iPages. * Spreadsheets. Organize and clasify data in rows and columns. Example: Excel, gsheets, OpenOffice Calc * Data Base Managment System (DBMS): A program to manage DB. For example Access and some clients of DB * Email client: A program that ask an email server for email (send and recieve). For example outlook or thunderbird. Also Gmail aplication. * Browser: A program that interprets HTML pages and process also http requests. For example, Chrome, Edge, Firefox, Opera, Safari ![61N0K1ARWTL._AC_UF894,1000_QL80_](https://hackmd.io/_uploads/r1i4-IClR.jpg) _not to confuse Browser with Bowser from Mario_ * CAD: Computer Aided Design. Programs to draw/design. There are a lot of subtypes * Photo and raster retouch: Adobe Photoshop, GIMP * 3D design: Tinkercad, Blender, WOMP, AutoCAD, SketchUp * 2D vector design: inkscape, adobe illustrator, autoDesk AutoCAD * Graphic Processing software. Also manipulating images using software. The line with CAD is difficult. * Photo and raster retouch: Adobe Photoshop, GIMP ::: success Usually we use this names for applications that are downloaded. Not for applications that are directly on the browser ::: ### Lexicon about features GUI: Graphic User Interface (the menus that we see) ![Sin título](https://hackmd.io/_uploads/B1_0niK06.jpg) CLI: Command Line Interface (when you can type something to control the program) ![1 cWNqDxNXYGvoL4oJx6aJow](https://hackmd.io/_uploads/rksJpotRa.png) Pros and cons of CLI and GUI ## Binary representation ### Binary, denary, hexadecimal Need to be able to pass numbers from one to another. byte: 8 bits. 256 possible values. Data representation * ASCII 7bits for representing text (English characters) * Unicode, variable (UTF 8, UTF 16, UTF 32) :::info They sometimes ask questions about languages, characters in Strings and the student should write about the different types of encoding. ::: Strings: array of characters Colours. Colours are represented in monitors through pixels. Each pixel has 3 LEDs one with one primary colour that can have values from 0 to 255 (256 different values) \#FFFFFF this kind of coding ### Boolean operators And, not, or, xor, xnor, nand Write truth tables, symbols, venn diagrams # Topic 3: networks ## Definitions * Pin. Copper wire that connects 2 elements with only one conductive element. * Bus. Pins that go in parallel from one place to another. USB is a type of Bus (Universial Serial Bus) * Cable. Physical element that includes one or mor conductive elements protected usually by plastic. (Usually they have buses inside, a USB cable has inside a bus (of the standar USB)) * Topology (or bus topology). How are the elements connected between them. Mathematical field. * Gateway: Link between computer networks. Usually is a also a router. The common networks that are linked together are the local (wifi or LAN) and the internet but can be others. * Handshake: Exchange of predetermined signasl to signifay that a connection has been established between 2 systems. Example with SOUND the handshake of old 56k modems. https://www.youtube.com/watch?v=vvr9AMWEU-c nowwadays these handshakes are silent but they still happen. TCP/IP has a handshake. UTP doesn't. ## Packet stuff :::info In IB are fond of asking about packets, packets switching and elements that are inside. ::: * Packet (or data packet): Group of bits that are interchanged together. May include control signals, error control bits, coded information and the destination (address) * Data integrity: Accuracy of the data after some kind of process. In the context of networks is transmission but can be also through input, storage or processing. * Check digit(s). Extra digit to nomerical data that is used to check data integrity. It's common in Computer Science but also in IDs. * Checksum, error detecting system that adds the digits of a packet and generates a sum. That sum is also sent and revised in the other end.