Computer Science Field Guide V2.8.1

Total Page:16

File Type:pdf, Size:1020Kb

Computer Science Field Guide V2.8.1 Computer Science Field Guide v2.8.1 Print Edition Sponsors Funding for this guide has been generously provided by these sponsors Produced by the CS Education Research Group, University of Canterbury, New Zealand, and by many others. The Computer Science Field Guide uses a Creative Commons (CC BY-NC-SA 4.0) license. 2 of 521 Computer Science Field Guide - v2.8.1 1. Introduction 1. Introduction Watch the video online at https://www.youtube.com/embed/v5yeq5u2RMI?rel=0 1.1. What's the big picture? Why is it that people have a love-hate relationship with computers? Why are some people so fanatical about particular types of computers, while others have been so angry at digital devices that they have been physically violent with them? And what does this have to do with computer science? And what is computer science anyway? I'm glad you asked! Put simply, computer science is about tools and techniques for designing and building applications that are very fast, have great interfaces, are reliable, secure, helpful --- even fun. A lot of people confuse computer science with programming. It has been said that "computer science is no more about programming than astronomy is about telescopes" ( Mike Fellows). Programming is the tool that computer scientists use to bring great ideas to life, but just knowing how to give programmed instructions to a computer isn't enough to create software that delights and empowers people. For example, computers can perform billions of operations every second, and yet people often complain that they are too slow. Humans can perceive delays of about one tenth of a second, and if your program takes longer than that to respond it will be regarded as sluggish, jerky or frustrating. You've got well under a second to delight the user! If you are searching millions of items of data, or displaying millions of pixels (megapixels), you can't afford to do things the wrong way, and you can't just tell your users that they should buy a faster computer ... they'll probably just buy someone else's faster software instead! Here's some advice from Fred Wilson, who has invested in many high profile tech companies: First and foremost, we believe that speed is more than a feature. Speed is the most important feature. If your application is slow, people won't use it. I see this more with mainstream users than I do with power users. I think that power users sometimes have a bit of sympathetic eye to the challenges of building really fast web apps, and maybe they're willing to live with it, but when I look at my wife and kids, they're my www.csfieldguide.org.nz/en/ 3 of 521 1. Introduction mainstream view of the world. If something is slow, they're just gone. ... speed is more than a feature. It's a requirement. -- Fred Wilson (Source) A key theme in computer science is working out how to make things run fast, especially if you want to be able to sell your software to the large market of people using old-generation smartphones, or run it in a data centre where you pay by the minute for computing time. You can't just tell your customers to buy a faster device --- you need to deliver efficient software. 1.2. Beyond speed Computer science isn't just about speed. Try using the following two calculators to make a simple calculation. They both have the same functionality (they can do the same calculations), but which is nicer to use? Why? (This book has many interactives like this. If the calculators don't work properly, you may need to use a more recent browser. The interactive material in this book works in most recent browsers; Google Chrome is a particularly safe bet.) Use the interactive online at http://www.csfieldguide.org.nz/en/interactives/awful-calculator/index.html The second calculator above is slower, and that can be frustrating. But it has a fancier interface --- buttons expand when you point to them to highlight what you're doing. Does this make it easier to use? Did you have problems because the "C" and "=" keys are so close? How interfaces work is a core part of computer science. The aesthetics --- images and layout --- are important, but what's much more crucial is the psychology of how people interact. For example, suppose the "OK" and "Cancel" buttons in dialogue boxes were occasionally reversed. You would always need to check carefully before clicking on one of them, instead of using the instinctive moves you've made countless times before. There are some very simple principles based on how people think and behave that you can take advantage of to design systems that people love. Making software that can scale up is another important theme. Imagine you've built a web interface and have attracted thousands of customers. Everything goes well until your site goes viral overnight, and you suddenly have millions of customers. If the system becomes bogged down, people will become frustrated waiting for a response, and tomorrow you will have no customers --- they’ll all have moved on to someone else's system. But if your 4 of 521 Computer Science Field Guide - v2.8.1 1. Introduction programs are designed so they can scale up to work with such large amounts of data your main problem will be dealing with offers to buy your company! Some of these problems can be solved by buying more equipment, but that can be an expensive and wasteful option (not just for cost, but because of the impact on the environment, including the wasted power used to do the processing inefficiently). With mobile computing it's even more important to keep things lean and efficient --- heavy duty programs chew up valuable battery life, and processing and memory must be used sparingly as these affect the size, weight and even heat dissipation of devices. If your system is successful and becomes really popular, pretty soon people will be trying to hack into it to steal valuable customer data or passwords. How can you design systems so that you know they are secure from such attacks and your customers can trust you with their personal information or business transactions? All these questions and more are addressed by the field of computer science. The purpose of this guide is to introduce you to those ideas so that you have a better idea of whether this field is for you. It is aimed at high-school level, and is intended to bring you to the point where you have a good overview of the field, and are well prepared for further in-depth study to become an expert. We've broken computer science up into a whole lot of topics that you'll often find in curricula around the world, such as algorithms, human-computer interaction, compression, cryptography, computer graphics, and artificial intelligence. The reality is that all these topics interact, so be on the lookout for the connections. This guide isn't a list of facts for you to memorise, or to copy and paste into projects! It is mainly a guide to things you can do --- experiences that will engage you with the topics. In fact, we won't go through all the topics in great detail, but will give you references to websites and books that explain things thoroughly. The idea of this guide is to give you enough background to understand the topics, and to do something meaningful with them. 1.3. Programming And what about programming? You can get through this whole guide without doing any programming, although we'll suggest exercises. Ultimately, however, all the concepts here are reflected in programs that people write. If you want to learn programming there are many excellent courses available. It takes time and practice, and is well worth doing in parallel with working through the topics in this guide. There are a number of free online systems and books that you can use to teach yourself programming. A list of options for all ages learning to program is available at www.code.org, where there is also a popular video of some well-known high-fliers in computing that is good to show classes. www.csfieldguide.org.nz/en/ 5 of 521 1. Introduction Programming is just one of the skills you'll need to be a computer scientist. In this book you'll be exercising many other skills --- maths, psychology, and communication are important ones. 1.4. How to use this guide This guide is intended to support a variety of curricula, and teacher guides will become available for using it in different contexts. For students, we've designed most chapters so that they can stand alone; the few that build on previous chapters explain at the outset what preparation you need (the most useful general preparation is the chapter on data representation, because everything on a computer is stored using binary numbers and so they have an important role in many areas of computer science.) Each chapter begins with a section about the "big picture" --- why the topic is useful for understanding and designing computer systems, and what can be achieved using the main ideas in the chapter. You'll then be introduced to key ideas and applications of the topic through examples, and wherever possible we'll have interactive activities that enable you to work with the ideas first hand. Sometimes these will be simplified versions of the full sized problems that computer scientists need to deal with -- our intention is for you to actually interact with the ideas, not just read about them.
Recommended publications
  • Customizing and Extending Powerdesigner SAP Powerdesigner Documentation Collection Content
    User Guide PUBLIC SAP PowerDesigner Document Version: 16.6.2 – 2017-01-05 Customizing and Extending PowerDesigner SAP PowerDesigner Documentation Collection Content 1 PowerDesigner Resource Files.................................................... 9 1.1 Opening Resource Files in the Editor.................................................10 1.2 Navigating and Searching in Resource Files............................................ 11 1.3 Editing Resource Files........................................................... 13 1.4 Saving Changes................................................................13 1.5 Sharing and Embedding Resource Files...............................................13 1.6 Creating and Copying Resource Files.................................................14 1.7 Specifying Directories to Search for Resource Files.......................................15 1.8 Comparing Resource Files........................................................ 15 1.9 Merging Resource Files.......................................................... 16 2 Extension Files................................................................18 2.1 Creating an Extension File.........................................................19 2.2 Attaching Extensions to a Model....................................................20 2.3 Exporting an Embedded Extension File for Sharing.......................................21 2.4 Extension File Properties......................................................... 21 2.5 Example: Adding a New Attribute from a Property
    [Show full text]
  • IPBES Workshop on Biodiversity and Pandemics Report
    IPBES Workshop on Biodiversity and Pandemics WORKSHOP REPORT *** Strictly Confidential and Embargoed until 3 p.m. CET on 29 October 2020 *** Please note: This workshop report is provided to you on condition of strictest confidentiality. It must not be shared, cited, referenced, summarized, published or commented on, in whole or in part, until the embargo is lifted at 3 p.m. CET/2 p.m. GMT/10 a.m. EDT on Thursday, 29 October 2020 This workshop report is released in a non-laid out format. It will undergo minor editing before being released in a laid-out format. Intergovernmental Platform on Biodiversity and Ecosystem Services 1 The IPBES Bureau and Multidisciplinary Expert Panel (MEP) authorized a workshop on biodiversity and pandemics that was held virtually on 27-31 July 2020 in accordance with the provisions on “Platform workshops” in support of Plenary- approved activities, set out in section 6.1 of the procedures for the preparation of Platform deliverables (IPBES-3/3, annex I). This workshop report and any recommendations or conclusions contained therein have not been reviewed, endorsed or approved by the IPBES Plenary. The workshop report is considered supporting material available to authors in the preparation of ongoing or future IPBES assessments. While undergoing a scientific peer-review, this material has not been subjected to formal IPBES review processes. 2 Contents 4 Preamble 5 Executive Summary 12 Sections 1 to 5 14 Section 1: The relationship between people and biodiversity underpins disease emergence and provides opportunities
    [Show full text]
  • Digital World Bug: Y2k38 an Integer Overflow Threat-Epoch
    International Journal of Computer Sciences and Engineering Open Access Review Paper Volume-5, Issue-3 E-ISSN: 2347-2693 Digital World Bug: Y2k38 an Integer Overflow Threat-Epoch S. Harshini1*, K.R. Kavyasri2 , P. Bhavishya3, T. Sethukkarasi4 1*Department of Computer Science and Engineering, R.M.K Engineering College, Chennai ,India 2Department of Computer Science and Engineering, R.M.K Engineering College, Chennai ,India 3Department of Computer Science and Engineering, R.M.K Engineering College, Chennai ,India 4Department of Computer Science and Engineering, R.M.K Engineering College Chennai ,India *Corresponding Author: [email protected] Available online at: www.ijcseonline.org Received:12/Feb/2017 Revised: 20/Feb/2017 Accepted: 10/Mar/2017 Published: 31/Mar/2017 Abstract-: Digital universe has been menaced by plenty of bugs but only a few seemed to pose a great hazard. Y2K,Y2K10 were the most prominent bugs which were blown away. And now we have Y2K38. The Y2K38 bug, if not resolved, it will get hold off the predictions that were made for the Y2K bug would come face reality this time. Y2K38 bug will affect all the system applications and most of the embedded systems which use signed 32 bit format for representing the internal time. The number of seconds which can be represented using this signed 32 bit format is 2,147,483,647 which will be equal to the time 19, January, 2038 at 03:14:07 UTC(Coordinated Universal Time),where the bug is expected to hit the web. After this moment the systems will stop working correctly.
    [Show full text]
  • Writing Mathematical Expressions in Plain Text – Examples and Cautions Copyright © 2009 Sally J
    Writing Mathematical Expressions in Plain Text – Examples and Cautions Copyright © 2009 Sally J. Keely. All Rights Reserved. Mathematical expressions can be typed online in a number of ways including plain text, ASCII codes, HTML tags, or using an equation editor (see Writing Mathematical Notation Online for overview). If the application in which you are working does not have an equation editor built in, then a common option is to write expressions horizontally in plain text. In doing so you have to format the expressions very carefully using appropriately placed parentheses and accurate notation. This document provides examples and important cautions for writing mathematical expressions in plain text. Section 1. How to Write Exponents Just as on a graphing calculator, when writing in plain text the caret key ^ (above the 6 on a qwerty keyboard) means that an exponent follows. For example x2 would be written as x^2. Example 1a. 4xy23 would be written as 4 x^2 y^3 or with the multiplication mark as 4*x^2*y^3. Example 1b. With more than one item in the exponent you must enclose the entire exponent in parentheses to indicate exactly what is in the power. x2n must be written as x^(2n) and NOT as x^2n. Writing x^2n means xn2 . Example 1c. When using the quotient rule of exponents you often have to perform subtraction within an exponent. In such cases you must enclose the entire exponent in parentheses to indicate exactly what is in the power. x5 The middle step of ==xx52− 3 must be written as x^(5-2) and NOT as x^5-2 which means x5 − 2 .
    [Show full text]
  • Long Cycles: a Bridge Between Past and Futures Professor Adrian Pop, Ph.D. Lecturer Răzvan Grigoras, Ph.D
    6th International Conference on Future-Oriented Technology Analysis (FTA) – Future in the Making Brussels, 4-5 June 2018 Long Cycles: A Bridge between Past and Futures Professor Adrian Pop, Ph.D. National University of Political Science and Public Administration, Bucharest, e-mail: [email protected] Lecturer R ăzvan Grigoras, Ph.D. National Defence University “Carol I”, Bucharest, e-mail: [email protected] Abstract Developing an anti-fragile behaviour by enhancing foresight capacity is a mandatory asset in the risk society. Cycles of continuity and change are preferred topics in the fields of history, economics, and international relations. Although centred on the past, the long cycles theory in general, and George Modelski's model in particular, might offer valuable insights into probable futures that might be involved in the planning practice of international actors. By identifying recurring historical patterns, one could extrapolate future developments. However, the key assumption of the paper is that possible novel developments are bound to be influenced by a series of drivers, both trends and wild cards. Therefore, it is necessary to increase the predictive capacity of the long cycle theory by using future study methodologies. The present paper attempts to suggest some ways for doing that in a two-step progressive method. The first step is to identify the most important drivers that could trigger deviations from the extrapolation of historical patterns identified by the long cycles theory and to quantify the expected shifts in the distribution power by using four indexes: the Foreign Bilateral Influence Capacity (FBIC) Index, the Global Power Index (GPI), the Gross Domestic Product (GDP), and the State of the Future Index (SOFI).
    [Show full text]
  • How Many Bits Are in a Byte in Computer Terms
    How Many Bits Are In A Byte In Computer Terms Periosteal and aluminum Dario memorizes her pigeonhole collieshangie count and nagging seductively. measurably.Auriculated and Pyromaniacal ferrous Gunter Jessie addict intersperse her glockenspiels nutritiously. glimpse rough-dries and outreddens Featured or two nibbles, gigabytes and videos, are the terms bits are in many byte computer, browse to gain comfort with a kilobyte est une unité de armazenamento de armazenamento de almacenamiento de dados digitais. Large denominations of computer memory are composed of bits, Terabyte, then a larger amount of nightmare can be accessed using an address of had given size at sensible cost of added complexity to access individual characters. The binary arithmetic with two sets render everything into one digit, in many bits are a byte computer, not used in detail. Supercomputers are its back and are in foreign languages are brainwashed into plain text. Understanding the Difference Between Bits and Bytes Lifewire. RAM, any sixteen distinct values can be represented with a nibble, I already love a Papst fan since my hybrid head amp. So in ham of transmitting or storing bits and bytes it takes times as much. Bytes and bits are the starting point hospital the computer world Find arrogant about the Base-2 and bit bytes the ASCII character set byte prefixes and binary math. Its size can vary depending on spark machine itself the computing language In most contexts a byte is futile to bits or 1 octet In 1956 this leaf was named by. Pages Bytes and Other Units of Measure Robelle. This function is used in conversion forms where we are one series two inputs.
    [Show full text]
  • Automatically Adapting Programs for Mixed-Precision Floating-Point Computation
    Automatically Adapting Programs for Mixed-Precision Floating-Point Computation Michael O. Lam and Bronis R. de Supinski and Jeffrey K. Hollingsworth Matthew P. LeGendre Dept. of Computer Science Center for Applied Scientific Computing University of Maryland Lawrence Livermore National Laboratory College Park, MD, USA Livermore, CA, USA [email protected], [email protected] [email protected], [email protected] ABSTRACT IEEE standard provides for different levels of precision by As scientific computation continues to scale, efficient use of varying the field width, with the most common widths being floating-point arithmetic processors is critical. Lower preci- 32 bits (\single" precision) and 64 bits (\double" precision). sion allows streaming architectures to perform more opera- Figure 1 graphically represents these formats. tions per second and can reduce memory bandwidth pressure Double-precision arithmetic generally results in more ac- on all architectures. However, using a precision that is too curate computations, but with several costs. The main cost low for a given algorithm and data set leads to inaccurate re- is the higher memory bandwidth and storage requirement, sults. In this paper, we present a framework that uses binary which are twice that of single precision. Another cost is instrumentation and modification to build mixed-precision the reduced opportunity for parallelization, such as on the configurations of existing binaries that were originally devel- x86 architecture, where packed 128-bit XMM registers can oped to use only double-precision. This framework allows only hold and operate on two double-precision numbers si- developers to explore mixed-precision configurations with- multaneously compared to four numbers with single preci- out modifying their source code, and it enables automatic sion.
    [Show full text]
  • Programming Curriculum
    PARC VLP PROGRAMMING CURRICULUM WWW.PARCROBOTICS.ORG Overview Study of programming languages, paradigms and data structures. Chapter 1: Programming Basics Sections A. What is programming? B. What is a programming language? C. Writing source code D. Running your code E. Using IDE Chapter 2: Programming Syntax Sections A. Why Python?A. Why Python? B. Basic statementsB. Basic statements and expressions and expressions C. Troubleshooting issues C. Troubleshooting issues Chapter 3: Variables and Data Types Sections A. IntroductionA. to Introductionvariables and to data variables types and data types B. WorkingB.W withorking variables with variables across Languages across Languages C. Working with numbers C. Working with numbers D. Working with strings E. WorkingD. with commentsWorking with strings E. Working with comments Chapter 4: Conditional Code Sections: A. Making decisions in code B. Exploring conditional code C. Working with simple conditions D. Conditionals across languages PAN-AFRICAN ROBOTICS COMPETITION 1 Chapter 1 SECTION A What is programming? Programming is the process of converting ideas into instructions that a computer can understand and execute. These instructions are specific and sequential. You can think of it as a recipe. Let's you want to prepare your favorite food; you would need first a list of ingredients and then a set of instructions as to which ingredients go in first. If you have ever cooked before or watched someone cook before you will know that the amount of each ingredient can dramatically affect the outcome. Computers are very literal. They try to execute our commands exactly. When we give them bad instructions, we might introduce bugs or even make the computer crash.
    [Show full text]
  • Text File Text File Example Text Reading Overview
    CS106A, Stanford Handout #53 Fall, 2003-04 Nick Parlante Files Text File The simple "text file" is one of the oldest and simplest types of file. For that reason, text files are one of the most universally standard ways to store information. A text file is something you could type up in a word processor, and save with the "plain text" option. A text file is made of a sequence of characters, organized as a series of horizontal lines of text. There is no notion of bold or italic or color applied to the characters; they are just plain text characters, as we would store in a String. Historically, text files have been made of the familiar roman keyboard alphabet – abcdef..xyz012..89!@#$.. – with the extremely standard ASCII encoding (American Standard Code for Information Interchange). More recently, text has grown to include the idea of unicode characters like ø and !, but the encodings for those are not yet as standard as ASCII. The .java files where we write our Java code are examples of text files. The text file is such a simple, flexible way to store information, it will be with us for a long time to come. If you want to store information in a simple, non-proprietary way, the text file is a great choice. XML files, which are a very modern way to store information, are a type of text file. Text File Example This is the first line of my 4 line text file, and this here is the 2nd. The above line is blank! The above example text file is 4 lines long.
    [Show full text]
  • Methods for Enhancement of Timestamp Evidence in Digital Investigations
    View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by NORA - Norwegian Open Research Archives Svein Yngvar Willassen Methods for Enhancement of Timestamp Evidence in Digital Investigations Doctoral thesis for the degree philosophiae doctor Trondheim, January 2008 Norwegian University of Science and Technology Faculty of Information Technology, Mathematics and Electrical Engineering Department of Telematics NTNU Norwegian University of Science and Technology Doctoral thesis for the degree philosophiae doctor Faculty of Information Technology, Mathematics and Electrical Engineering Department of Telematics © Svein Yngvar Willassen ISBN 978-82-471-6227-9 (printed version) ISBN 978-82-471-6230-9 (electronic version) ISSN 1503-8181 Doctoral theses at NTNU, 2008:19 Printed by NTNU-trykk iii ACKNOWLEDGMENTS I would first like to thank my advisor, Stig Frode Mjølsnes. His guidance and helpful feedback has helped shape and direct this work. I would also like to thank the others at Department of Telematics for many discussions providing valuable inspiration. Special thanks to Kristian Gjøsteen for mathematical insights and fruitful discussions about digital forensics and digital security. Thanks to Tore Amble at the Department of Computer and Information Science for introducing me to Shanahan ’s Event Calculus. Also thanks to Eugene Spafford at Purdue University and Pavel Gladyshev at University College Dublin. The discussions we had during our meetings in Norway as well as during my visits to West Lafayette and Dublin were most inspiring. Thanks to the many people in the Digital Forensics community in Norway. Special thanks to my previous colleagues in Økokrim, Inger Marie Sunde, Steffen Thorkildsen and Lars Wilberg and to my previous colleagues in Ibas AS.
    [Show full text]
  • Distributing Liability: the Legal and Political Battles of Y2K LSE Research Online URL for This Paper: Version: Accepted Version
    Distributing liability: the legal and political battles of Y2K LSE Research Online URL for this paper: http://eprints.lse.ac.uk/103330/ Version: Accepted Version Article: Mulvin, Dylan (2020) Distributing liability: the legal and political battles of Y2K. IEEE Annals of the History of Computing. ISSN 1058-6180 Reuse Items deposited in LSE Research Online are protected by copyright, with all rights reserved unless indicated otherwise. They may be downloaded and/or printed for private study, or other acts as permitted by national copyright laws. The publisher or other rights holders may allow further reproduction and re-use of the full text version. This is indicated by the licence information on the LSE Research Online record for the item. [email protected] https://eprints.lse.ac.uk/ Distributing Liability The legal and political battles of Y2K Dylan Mulvin* • Dylan Mulvin is an Assistant Professor in the Department of Media and Communications at the London School of Economics and Political Science – London, UK WC2A 2AE. E-mail: [email protected]. Abstract In 1999 the United States Congress passed the Y2K Act, a major—but temporary— effort at reshaping American tort law. The Act strictly limited the scope and applicability of lawsuits related to liability for the Year 2000 Problem. This paper excavates the process that led to the Act, including its unlikely signature by President Clinton. The history presented here is based on a reconsideration of the Y2K crisis as a major episode in the history of computing. The Act, and the Y2K crisis more broadly, expose the complex interconnections of software, code, and law at the end of the 20th century, and, taken seriously, argue for the appreciation of the role of liability in the history of technology.
    [Show full text]
  • Plain Text & Character Encoding
    Journal of eScience Librarianship Volume 10 Issue 3 Data Curation in Practice Article 12 2021-08-11 Plain Text & Character Encoding: A Primer for Data Curators Seth Erickson Pennsylvania State University Let us know how access to this document benefits ou.y Follow this and additional works at: https://escholarship.umassmed.edu/jeslib Part of the Scholarly Communication Commons, and the Scholarly Publishing Commons Repository Citation Erickson S. Plain Text & Character Encoding: A Primer for Data Curators. Journal of eScience Librarianship 2021;10(3): e1211. https://doi.org/10.7191/jeslib.2021.1211. Retrieved from https://escholarship.umassmed.edu/jeslib/vol10/iss3/12 Creative Commons License This work is licensed under a Creative Commons Attribution 4.0 License. This material is brought to you by eScholarship@UMMS. It has been accepted for inclusion in Journal of eScience Librarianship by an authorized administrator of eScholarship@UMMS. For more information, please contact [email protected]. ISSN 2161-3974 JeSLIB 2021; 10(3): e1211 https://doi.org/10.7191/jeslib.2021.1211 Full-Length Paper Plain Text & Character Encoding: A Primer for Data Curators Seth Erickson The Pennsylvania State University, University Park, PA, USA Abstract Plain text data consists of a sequence of encoded characters or “code points” from a given standard such as the Unicode Standard. Some of the most common file formats for digital data used in eScience (CSV, XML, and JSON, for example) are built atop plain text standards. Plain text representations of digital data are often preferred because plain text formats are relatively stable, and they facilitate reuse and interoperability.
    [Show full text]