The GNU C Programming Tutorial

Total Page:16

File Type:pdf, Size:1020Kb

The GNU C Programming Tutorial Edition 4.1 The GNU C Programming Tutorial Mark Burgess Faculty of Engineering, Oslo College Ron Hale-Evans Copyright c 2002 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; there being no Invariant Section, with the Front-Cover Texts being \A GNU Manual", and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled \GNU Free Documentation License". (a) The FSF's Back-Cover Text is: \You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development." Function pointers i Table of Contents Preface ...................................... xi 1 Introduction............................... 1 1.1 The advantages of C..................................... 1 1.2 Questions for Chapter 1 ................................. 2 2 Using a compiler........................... 3 2.1 Basic ideas about C ..................................... 3 2.2 The compiler ........................................... 4 2.3 File names .............................................. 4 2.4 Errors .................................................. 5 2.4.1 Typographical errors ............................ 6 2.4.2 Type errors .................................... 6 2.5 Questions for Chapter 2 ................................. 6 3 The form of a C program................... 9 3.1 A word about style ..................................... 10 3.2 Comments ............................................. 10 3.3 Example 1 ............................................. 11 3.4 Questions for Chapter 3 ................................ 11 4 Functions ................................ 13 4.1 Function names ........................................ 13 4.2 Function examples ..................................... 14 4.3 Functions with values................................... 14 4.4 Function prototyping ................................... 15 4.5 The exit function...................................... 16 4.6 Questions for Chapter 4 ................................ 17 5 Variables and declarations................. 19 5.1 Integer variables ....................................... 19 5.1.1 The char type................................. 20 5.1.2 Floating point variables ........................ 20 5.2 Declarations ........................................... 21 5.3 Initialization ........................................... 22 5.4 The cast operator ...................................... 22 5.4.1 Cast operator demo............................ 23 5.5 Storage classes ......................................... 24 5.5.1 External variables ............................. 24 5.5.2 Static variables ................................ 25 5.5.3 Other storage classes........................... 25 5.6 Questions for Chapter 5 ................................ 25 ii 6 Scope .................................... 27 6.1 Global Variables ....................................... 27 6.2 Local Variables ........................................ 28 6.3 Communication via parameters.......................... 28 6.4 Scope example ......................................... 29 6.5 Questions for Chapter 6 ................................ 29 7 Expressions and operators................. 31 7.1 The assignment operator................................ 31 7.1.1 Important note about assignment ............... 32 7.2 Expressions and values ................................. 32 7.3 Expressions ............................................ 33 7.4 Parentheses and Priority ................................ 34 7.5 Unary Operator Precedence ............................. 34 7.6 Special Assignment Operators ++ and -- ................. 34 7.7 More Special Assignments .............................. 35 7.8 Comparisons and logic .................................. 37 7.9 Logical operators....................................... 38 7.9.1 Inclusive OR .................................. 38 7.10 Questions for Chapter 7 ............................... 39 8 Parameters ............................... 41 8.1 Parameters in function prototypes ....................... 42 8.2 Value Parameters ...................................... 42 8.3 Actual parameters and formal parameters ................ 43 8.4 Variadic functions ...................................... 45 8.5 Questions for Chapter 8 ................................ 45 9 Pointers.................................. 47 9.1 Pointer operators....................................... 47 9.2 Pointer types .......................................... 49 9.3 Pointers and initialization............................... 51 9.4 Variable parameters .................................... 51 9.4.1 Passing pointers correctly ...................... 52 9.4.2 Another variable parameter example ............ 53 9.5 Questions for Chapter 9 ................................ 54 10 Decisions................................ 55 10.1 if ................................................... 55 10.2 if... else........................................... 56 10.3 Nested if statements .................................. 57 10.4 The ?...:. operator ................................ 59 10.5 The switch statement ................................. 59 10.6 Example Listing ...................................... 60 10.7 Questions for Chapter 10 .............................. 62 Function pointers iii 11 Loops ................................... 63 11.1 while ................................................ 63 11.2 do...while........................................... 64 11.3 for .................................................. 65 11.4 The flexibility of for .................................. 67 11.5 Terminating and speeding loops ........................ 69 11.5.1 Terminating loops with break ................. 69 11.5.2 Terminating loops with return ................ 69 11.5.3 Speeding loops with continue ................. 70 11.6 Nested loops .......................................... 71 11.7 Questions for Chapter 11 .............................. 71 12 Preprocessor directives................... 73 12.1 A few directives ....................................... 73 12.2 Macros ............................................... 74 12.2.1 Macro functions .............................. 76 12.3 Extended macro example .............................. 77 12.4 Questions............................................. 80 13 Libraries ................................ 81 13.1 Header files ........................................... 81 13.2 Kinds of library ....................................... 83 13.3 Common library functions ............................. 84 13.3.1 Character handling ........................... 85 13.4 Mathematical functions ................................ 88 13.5 Questions for Chapter 13 .............................. 90 14 Arrays .................................. 91 14.1 Array bounds ......................................... 92 14.2 Arrays and for loops .................................. 92 14.3 Multidimensional arrays ............................... 96 14.4 Arrays and nested loops ............................... 98 14.5 Initializing arrays ..................................... 99 14.6 Arrays as Parameters................................. 101 14.7 Questions for Chapter 14 ............................. 102 15 Strings................................. 105 15.1 Conventions and declarations ......................... 105 15.2 Initializing strings .................................... 105 15.3 String arrays......................................... 106 15.4 String library functions ............................... 108 15.5 Questions for Chapter 15 ............................. 111 iv 16 Input and output ....................... 113 16.1 High-level file routines ................................ 115 16.1.1 Opening a file ............................... 115 16.1.2 Closing a file ................................ 116 16.1.3 Block input and output ...................... 117 16.1.4 File position ................................ 120 16.1.5 Stream buffering ............................ 121 16.1.6 End-of-file and error functions ................ 122 16.2 String output and input .............................. 123 16.2.1 Unformatted string output ................... 123 16.2.1.1 puts ............................... 123 16.2.1.2 fputs .............................. 124 16.2.2 Formatted string output ..................... 125 16.2.2.1 printf ............................. 125 16.2.2.2 Formatted output conversion specifiers ........................................ 126 16.2.3 fprintf .................................... 129 16.2.4 asprintf ................................... 130 16.2.5 Deprecated formatted string output functions.. 131 16.2.5.1 sprintf............................ 131 16.2.6 String input................................. 132 16.2.6.1 getline............................ 132 16.2.6.2 getdelim .......................... 133 16.2.7 Deprecated string input functions ............. 134 16.2.7.1 gets ............................... 134 16.2.7.2 fgets .............................. 135 16.2.8 Formatted string input....................... 136 16.2.8.1 sscanf ............................. 136 16.2.8.2 Formatted input conversion specifiers ........................................ 138 16.2.9 Deprecated formatted string input functions ... 140 16.2.9.1 scanf .............................. 140 16.2.9.2
Recommended publications
  • Studying the Real World Today's Topics
    Studying the real world Today's topics Free and open source software (FOSS) What is it, who uses it, history Making the most of other people's software Learning from, using, and contributing Learning about your own system Using tools to understand software without source Free and open source software Access to source code Free = freedom to use, modify, copy Some potential benefits Can build for different platforms and needs Development driven by community Different perspectives and ideas More people looking at the code for bugs/security issues Structure Volunteers, sponsored by companies Generally anyone can propose ideas and submit code Different structures in charge of what features/code gets in Free and open source software Tons of FOSS out there Nearly everything on myth Desktop applications (Firefox, Chromium, LibreOffice) Programming tools (compilers, libraries, IDEs) Servers (Apache web server, MySQL) Many companies contribute to FOSS Android core Apple Darwin Microsoft .NET A brief history of FOSS 1960s: Software distributed with hardware Source included, users could fix bugs 1970s: Start of software licensing 1974: Software is copyrightable 1975: First license for UNIX sold 1980s: Popularity of closed-source software Software valued independent of hardware Richard Stallman Started the free software movement (1983) The GNU project GNU = GNU's Not Unix An operating system with unix-like interface GNU General Public License Free software: users have access to source, can modify and redistribute Must share modifications under same
    [Show full text]
  • CS 297 Report Improving Chess Program Encoding Schemes
    CS 297 Report Improving Chess Program Encoding Schemes Supriya Basani ([email protected]) Advisor: Dr. Chris Pollett Department of Computer Science San Jose State University December 2006 Table of Contents: Introduction......................................................................................................................... 3 Deliverable 1:...................................................................................................................... 4 Chess Game Databases and GNU Chess Program ......................................................... 4 Book.dat generation algorithm: .................................................................................. 5 Database lookup algorithm: ........................................................................................ 6 Deliverable 2:...................................................................................................................... 7 GNU Chess program's PVS Algorithm .......................................................................... 7 PVS algorithm:............................................................................................................ 8 Deliverable 3:.................................................................................................................... 10 Extension to PVS algorithm and Auto play setup ........................................................ 10 1. Extension to PVS algorithm.................................................................................. 10 2. Autoplay Setup.................................................................................................
    [Show full text]
  • The GNU C Library: System & Network Applications
    The GNU C Library: System & Network Applications For GNU C Libraries version 2.3.x by Sandra Loosemore with Richard M. Stallman, Roland McGrath, Andrew Oram, and Ulrich Drepper This manual documents the GNU C Libraries version 2.3.x. ISBN 1-882114-24-8, First Printing, March 2004. Published by: GNU Press Website: www.gnupress.org a division of the General: [email protected] Free Software Foundation Orders: [email protected] 51 Franklin St, Fifth Floor Tel: 617-542-5942 Boston, MA 02110-1301 USA Fax: 617-542-2652 Copyright © 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2, or any later version published by the Free Software Foundation; with the Invariant Sections being “Free Software and Free Manuals”, the “GNU Free Documentation License”," and the “GNU Lesser General Public License”, with the Front Cover Texts being “A GNU Manual”, and with the Back Cover Texts as in (a) below. A copy of the license is included in the section entitled “GNU Free Documentation License”. (a) The Back Cover Text is: You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom. Cover art by Etienne Suvasa. Cover design by Jonathan Richard. Printed in USA. i Short Contents 1 Introduction ............................................ 1 2 Low-Level Input/Output .................................. 17 3 File-System Interface .................................... 71 4 Pipes and FIFOs ...................................... 119 5 Sockets .............................................. 125 6 Low-Level Terminal Interface ...........................
    [Show full text]
  • Unix Et Programmation Shell
    Unix et Programmation Shell Philippe Langevin d´epartment d'informatique UFR sciences et technique universit´edu sud Toulon Var Automne 2013 Philippe Langevin (imath/ustv) Unix et Programmation Shell Automne 2013 1 / 33 document brouillon en r´evision site du cours : http://langevin.univ-tln.fr/cours/UPS/upsh.html localisation du fichier : http://langevin.univ-tln.fr/cours/UPS/doc/file.pdf Philippe Langevin (imath/ustv) Unix et Programmation Shell Automne 2013 2 / 33 derni`eresmodifications man.tex 2017−09−07 12:27:47.738251920 +0200 perm.tex 2016−09−30 09:41:54.766553521 +0200 file .tex 2016−09−30 09:19:02.810595120 +0200 bash.tex 2016−09−15 12:09:09.887948313 +0200 term.tex 2016−09−14 18:50:05.124091515 +0200 upsh.tex 2015−10−25 18:09:36.027434338 +0100 proc.tex 2015−10−20 22:09:35.450391618 +0200 shell.tex 2015−09−10 19:31:04.581529236 +0200 prologue.tex 2015−09−07 09:06:31.773157847 +0200 tools.tex 2015−07−11 09:04:38.890915266 +0200 pipe.tex 2014−10−02 19:10:22.426127326 +0200 direct.tex 2014−10−02 07:49:17.162784238 +0200 syntaxe.tex 2014−10−01 23:52:29.859357485 +0200 part.tex 2014−10−01 23:52:29.372363438 +0200 Philippe Langevin (imath/ustv) Unix et Programmation Shell Automne 2013 3 / 33 fichier 4 - fichier structure I-noeud commande fichier r´epertoire tube nomm´e netcat commande r´eseau Philippe Langevin (imath/ustv) Unix et Programmation Shell Automne 2013 4 / 33 fichier structure structure g´en´erale L'ensemble des syst`emesde fichiers d'un syst`eme unix est un arbre enracin´edans r´epertoire / .
    [Show full text]
  • UC Santa Cruz UC Santa Cruz Electronic Theses and Dissertations
    UC Santa Cruz UC Santa Cruz Electronic Theses and Dissertations Title Embedding Security into Systems After Their Design Permalink https://escholarship.org/uc/item/1vn6v7wg Author Capelis, D J Publication Date 2015 License https://creativecommons.org/licenses/by/4.0/ 4.0 Peer reviewed|Thesis/dissertation eScholarship.org Powered by the California Digital Library University of California UNIVERSITY OF CALIFORNIA SANTA CRUZ EMBEDDING SECURITY INTO SYSTEMS AFTER THEIR DESIGN A dissertation submitted in partial satisfaction of the requirements for the degree of DOCTOR OF PHILOSOPHY in COMPUTER SCIENCE by D J Capelis September 2015 The dissertation of D J Capelis is approved: Darrell DE Long, Chair Ethan L Miller Ahmed Amer Tyrus Miller Vice Provost and Dean of Graduate Studies Table of Contents Abstract v Acknowledgments vii 1 Introduction 1 1.1 New Possibilities . 2 1.2 Ease of Deployment . 2 1.3 Consolidation . 3 1.4 Consistency . 5 2 Changing Networking 7 2.1 Related Work . 10 2.2 Technical Detail . 13 2.2.1 Core Services . 13 2.2.2 Session Initiator . 21 2.3 Performance . 21 2.4 Potential Improvements . 24 2.4.1 Integration into the Kernel . 24 2.4.2 Integration into Hardware . 25 2.5 Deployment . 25 2.5.1 Deploying with Unmodified Applications . 26 2.5.2 Deploying with Unmodified Computers . 26 3 Changing the Computer Organization 28 3.1 Goals . 29 3.2 Related Work . 31 3.3 Technical Design . 33 3.3.1 Trusted Loading . 35 3.3.2 Trusted Data . 37 3.3.3 Trusted Runtime . 39 3.3.4 Trusted Channels .
    [Show full text]
  • Linux Installation and Getting Started
    Linux Installation and Getting Started Copyright c 1992–1996 Matt Welsh Version 2.3, 22 February 1996. This book is an installation and new-user guide for the Linux system, meant for UNIX novices and gurus alike. Contained herein is information on how to obtain Linux, installation of the software, a beginning tutorial for new UNIX users, and an introduction to system administration. It is meant to be general enough to be applicable to any distribution of the Linux software. This book is freely distributable; you may copy and redistribute it under certain conditions. Please see the copyright and distribution statement on page xiii. Contents Preface ix Audience ............................................... ix Organization.............................................. x Acknowledgments . x CreditsandLegalese ......................................... xii Documentation Conventions . xiv 1 Introduction to Linux 1 1.1 About This Book ........................................ 1 1.2 A Brief History of Linux .................................... 2 1.3 System Features ......................................... 4 1.4 Software Features ........................................ 5 1.4.1 Basic commands and utilities ............................. 6 1.4.2 Text processing and word processing ......................... 7 1.4.3 Programming languages and utilities .......................... 9 1.4.4 The X Window System ................................. 10 1.4.5 Networking ....................................... 11 1.4.6 Telecommunications and BBS software .......................
    [Show full text]
  • De-Sign and Implementation of a Computer Vision System for an Au
    Journal of Computer Science & Technology, Volume 18, Number 1, April 2018 - ORIGINAL ARTICLE - Design and Implementation of a Computer Vision System for an Autonomous Chess-Playing Robot Guillermo Larregay1, Federico Pinna1, Luis Avila1,2, and Daniel Mor´an1 1Laboratorio de Mecatr´onica, Universidad Nacional de San Luis, Villa Mercedes, San Luis, Argentina. 2Laboratorio de Investigaci´on y Desarrollo en Inteligencia Computacional, Universidad Nacional de San Luis, San Luis, Argentina. {golarregay, fpinna, loavila, dmoran}@unsl.edu.ar Abstract chess in an autonomous manner against a human op- ponent. This work describes a mechatronic system composed Briefly, this implementation is based on an by a robot arm that can play chess autonomously. The industrial-grade robot manipulator, a computer vision system is based on an industrial-grade robot manipu- system, and an open source chess game engine. The lator, a computer vision system, and an open source chess engine, based on the GNU Chess open source chess engine. Classification algorithms were imple- package, is used as the back-end engine for the chess mented in order to detect whether a given chessboard game. In order to achieve a proper and uniform level square is occupied, and in that case, if the piece is of illumination on the chessboard surface, a theoret- black or white. Such algorithms were compared in ical model of the illuminance curve of an LED was terms of their complexity of implementation, execu- used as the evaluation function for a genetic algo- tion time and accuracy of predictions. To achieve an rithm, implemented to optimize each LED orienta- uniform illumination of the chessboard, a theoretical tion using heuristic techniques so as to uniformly dis- model of an LED illuminance curve was used to find tribute the average illumination over the chessboard the best orientation for each diode using a genetic al- surface.
    [Show full text]
  • Simple Computer Vision System for Chess Playing Robot Manipulator As a Project-Based Learning Example
    Simple computer vision system for chess playing robot manipulator as a Project-based learning example Emir Sokic, Melita Ahic-Djokic Faculty of Electrical Engineering, University of Sarajevo Zmaja od Bosne bb, 71000 Sarajevo, Bosnia and Herzegovina [email protected], [email protected] Abstract— This paper presents an example of project-based learn- course material is learned through homework problems and ing (PBL) in an undergraduate course on Image processing. The de- study prior to an exam. Evaluation of learning is based on sign of a simple, low-cost computer vision system for implementation project solutions, the method and presentation of solutions, on a chess-playing capable robot is discussed. The system is based on a standard CCD camera and a personal computer. This project and possibly a final examination [2]. is a good tool for learning most of the course material that would This paper proposes an adequate example of Project-based otherwise be mastered by homework problems and study before an learning intended to be part of an Image processing undergrad- exam. uate course. The example is interesting because it incorporates An algorithm which detects chess moves is proposed. It compares most of the topics discussed in the course: image representa- two or more frames captured before, during and after a played chess move, and finds differences between them, which are used to define a tion and display, image histograms, contrast and brightness played chess move. Further image processing is required to eliminate enhancement, histograms equalization, color transformations, false readings, recognize direction of chess moves, end eliminate image resizing, interpolation, affine and higher-order spatial image distortion.
    [Show full text]
  • GNU Automake for Version 1.11.1, 8 December 2009
    GNU Automake For version 1.11.1, 8 December 2009 David MacKenzie Tom Tromey Alexandre Duret-Lutz This manual is for GNU Automake (version 1.11.1, 8 December 2009), a program that creates GNU standards-compliant Makefiles from template files. Copyright c 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled \GNU Free Documentation License." Chapter 2: An Introduction to the Autotools 1 1 Introduction Automake is a tool for automatically generating `Makefile.in's from files called `Makefile.am'. Each `Makefile.am' is basically a series of make variable definitions1, with rules being thrown in occasionally. The generated `Makefile.in's are compliant with the GNU Makefile standards. The GNU Makefile Standards Document (see Section \Makefile Conventions" in The GNU Coding Standards) is long, complicated, and subject to change. The goal of Automake is to remove the burden of Makefile maintenance from the back of the individual GNU maintainer (and put it on the back of the Automake maintainers). The typical Automake input file is simply a series of variable definitions. Each suchfile is processed to create a `Makefile.in'. There should generally be one `Makefile.am' per directory of a project.
    [Show full text]
  • 세기 시민정보사회추진을 위한 종합연구 21 a Complex
    21세기 시민정보사회추진을 위한 종합연구 A complex Study on Developing a Civil Information Society for the 21st Century 1998. 5. 25. 주관연구기관() 사 새문명아카데미 정보통신부 -1- 제출문 정보통신부 장관 귀하 본 보고서를“21 세기 시민정보사회추진을 위한 종합프로젝트에 관한 연구 ” 의 최종 연구개발 결과 보고서로 제출합니다. 1998년월 5 25 일 주관연구기관:( 사 ) 새문명아카데미 연구책임자: 송한식 참여연구원: 성경륭 박석 홍만표 -2- 요약문 1. 제목 21세기 시민정보사회 추진을 위한 종합 프로젝트에 관한 연구 2. 연구의 목적 및 중요성 정보사회로의 전환은 한 산업부문이나 정부정책의 문제만이 아니라 사회전체의 총체적인 변 혁이다.,, 정보화의 추진은 정부 기업 시민사회의 모든 분야에 걸쳐 있는 과제이고 , 특히 그 성과를 내는데 있어서 민간의 참여가 매우 중요하다. 이러한 사회의 총체적 변화를 위하여 민간의 광범한 참여를 추진력으로 하는 정보화에 관하여 시민 정보사회의 이름으로 논의할 필요가 있다. 그 동안 정보화의 진전과 함께 정보사회에 관한 패러다임도 변화하고 있는 바, 기술 중심적 인 관점,, 미래를 예측하는 관점에 바탕을 둔 논의에서 나아가 그 동안 정보사회에 관한 선 진국의 논의 성과를 반영하고 보다 바람직한 사회를 의도적으로 창조한다는 관점에서 시민 정보사회를 연구할 필요가 있다. 나아가 시민과 민간의 입장에서 정보산업과 정보사회의 비전을 제시하고,21 세기정보사회의 사회적 근본이 되는 새로운 가치와 규범을 모색하고, 정보통신공간에서의 시민적 참여와 교 육의 가능성을 검토할 필요가 있다. 본 연구는 이러한 문제의식에 입각하여 오늘의 현실-- 경제적 불황과 대량실업 을 해결하는 전향적 대안으로서의 기초적 패러다임을 모색하는 것이다. 정보화의 진척에 따라 변화하는 시대적 요구를 반영하여,21 다가올 세기의 정보사회의 미래상으로서 새로운 한국적 정보사 회론을 연구하고,21 보다 바람직한 세기의 비전으로서의 시민정보사회에 관한 이론적 연구 와 정보화 정책의 새로운 패러다임을 탐구하며, 민간의 참여를 위한 시민정보사회의 선도적 네트워크의 가능성을 모색하기 위한 것이다. -3- 3. 연구의 내용 및 범위 본 연구는 먼저 한국에서의 정보사회에 관한 기존 이론을 검토하고 그 이론들이 현재의 시 대적 변화에 비추어 대단히 진부한 것임을 밝힌다.
    [Show full text]
  • Nandan Banerjee Résumé
    Nandan Banerjee Resum´ e´ OBJECTIVE b iRobot Corporation To work on state of the art robots, devise new algorithms re- 8 Crosby Drive, Bedford, MA 01730, USA lated to SLAM, vision, and other robotics problems. T +1 (774) 4208142 B nbanerjee [at] irobot [dot] com WORK EXPERIENCE E www.nandanbanerjee.com JUNE 2015 – PRESENT iRobot Corporation EDUCATION Bedford, MA, USA Sr. Robotics Software Engineer 2013 – 2015 Robotics Engineering MASTER OF SCIENCE Development of state of the art algorithms for mapping and Worcester Polytechnic Institute navigation, vision, and manipulation in the R&D division. 2008 – 2012 Computer Science BACHELOR OF TECHNOLOGY JUNE 2014 – AUGUST 2014 National Institute of Technology, Durgapur Vecna Technologies Cambridge, MA, USA Robotics Research Intern SIGNIFICANT PROJECTS Model based tracking algorithm implementation to track the 2018 Persistent Maps on Roomba hand of a Kinova JACO arm. Implementation of a Calibra- (SLAM, Computer Vision, Occupancy Mapping) tion Helper tool to partially automate generating camera-robot Mapping and navigation research - algorithms for vi- transforms. sion front end, occupancy mapping, SLAM-graph op- timization and sparsification in heavily constrained JULY 2012 – JULY 2013 computational platforms to enable lifelong mapping Samsung Research India for next generation Roombas (i7) and other consumer Bangalore, INDIA robots. Software Engineer 2014 DARPA Robotics Challenge (Robot Dynamics, Robot Control, Perception) Interfaced parts of the Tracfone prepaid engine for a Samsung Programming perception and manipulation capabili- feature phone. Implemented AT commands for AT&T feature ties for the ATLAS robot. Simulating Inverse Kine- phones. Debugged file system, SD card, USB and other system matics for Atlas’ arms, visual servoing, trajectory op- layer issues related to ST Ericsson’s ARM9 processor.
    [Show full text]
  • A Style Guide for GNU Documentation
    A Style Guide for GNU Documentation by Ron Hale-Evans Based largely on comments by Robert J. Chassell and Richard M. Stallman Copyright c 2001 Free Software Foundation, Inc. Chapter 1: Basic points of style 1 1 Basic points of style The goal of free GNU documentation is to help the users and developers of GNU software. There is no need for you to provide examples for software running under other operating systems. In particular, there is no need for you to provide examples for operating systems that take away your freedom. • Show, don’t just tell. Use plenty of examples (but don’t be overly redundant). • Move slowly. Do not impose too much of a cognitive load at once on the reader. • Explain things in detail if you are writing a tutorial for a novice. Since one tends to under-explain anyway, pretend you are writing for an in- telligent person who lives in an undeveloped country and is unfamiliar with the technology you are explaining. • Don’t say too little. If you cannot include enough information on a topic to do more than tantalize a novice, omit it entirely. • Do not assume the reader has specific knowledge of mathematics or computer science when it is possible she doesn’t. You may have to explain what an integer is or what a byte is, at least at the level of a tutorial. • Explain your value judgments. For example, if you say a code snippet is or is not “useful”, explain why it is or is not. Value judgments can only be formed by people with knowledge of the relevant subject, and if the reader had the knowledge you use to form your judgments, she probably wouldn’t need to read your documentation! • If necessary, repeat yourself, especially if the information you are repeat- ing is important and might be missed the first time.
    [Show full text]