204111 Computer and 204111 Computer and Programming Lecture #1: Introduction Massive Information & Knowledge Engineering http://mike cpe ku ac th/204111 http://mike.cpe.ku.ac.th/204111 Department of Computer Engineering Kasetsart University Bangkok, Thailand. MIKE TM approved Version 2006/1 Introduction � Programming is to solve problems using computers - How to do it at all ? H t d it t ll ? - How to do it robustly ? - How to do it effectively ? � Programming consists of two steps: - Algorithmic design (the architects) Coding (the construction workers) Coding (the construction workers) - � Programming requires: a programming language (e.g., C#) to express your ideas g g g g ( g ) y - a set of tools to design, edit, and debug your code - - compiler to translate your programs into machine code - a machine to run the executable code MIKE TM approved 2 Version 2006/1
Why 204111 ? y � Computer is becoming ubiquitous … programming gets you more out of computer - learn how to solve problems - dealing with abstractions dealing with abstractions - - be more precise - � Unfortunately, most people y, p p know little about Computer Science - know little about Programming - write bad or buggy programs write bad or buggy programs - become lost when writing large programs - � What can help? � What can help? Take 204111 ! Take 204111 ! MIKE TM approved 3 Version 2006/1 This Course � The goal of 204111 is to learn elementary and intermediate programming techniques - how to craft small to large programs - C# programming language (Java is similar) C# programming language (Java is similar) - some important algorithms and data structures - some software tools and operating systems - some in-depth knowledge about Computer Science i d th k l d b t C t S i - � A heavy programming course � Use Microsoft .NET C# Compiler � Intended mainly as your first programming course MIKE TM approved 4 Version 2006/1
Crafting Programs Effectively g g y � Program design d design process i - stepwise refinement & top-down design - bottom-up design - - modularization, interfaces use of abstractions - � Programming style g g y structured programming - readable code - effective use of language constructs effective use of language constructs - “ formatting ” - software organization – � Documentation and comments D t ti d t MIKE TM approved 5 Version 2006/1 Algorithms and Data Structures g � Algorithm: a strategy for computing something, e.g., sorting: putting data in order by key - searching: finding data in some kind of index - finding primes and generating random numbers - string processing - graphics: drawing lines, arcs, and other geometric objects - � Data structure: a way to store data e g � Data structure: a way to store data, e.g., arrays and vectors - linked lists - � Two are related: data structures organize data - algorithms use that organization algorithms use that organization - MIKE TM approved 6 Version 2006/1
Java Programming Language g g g g � Sun Microsystems corporate research project (1991) - Code-named Green, led by James Gosling and Bill Joy - Based on C and C++ � Intended for intelligent consumer-electronic devices Lack of popularity almost causes cancellation - � Sudden popularity of WWW provides new potential � Sudden popularity of WWW provides new potential Java capable of dynamic content (e.g., animation, interaction) - Grabbed attention of business community - � Now very widely used Enhance functionality of WWW servers - Provide applications for consumer devices Provide applications for consumer devices - MIKE TM approved 7 Version 2006/1 .NET Framework � Introduced by Microsoft (June 2000) Vision for embracing the Internet in software development - Heart of .NET strategy - � Language and platform � Language- and “ platform- ” independence independence Visual Basic .NET, Visual C++ .NET, C# and more - Includes Framework Class Library (FCL) for reuse - � Executes programs by Common Language Runtime (CLR) Programs compiled to Microsoft Intermediate Language (MSIL) - MSIL code translated into machine code - � (Unlike Java) this is mostly Windows (MS) centric There is a Linux port (see the Mono project) - MIKE TM approved 8 Version 2006/1
C# Programming Language g g g g � Developed at Microsoft by Anders Hejlsberg et al � Event driven, object oriented, visual programming language � Based from C, C++ and Java � Incorporated into .NET platform Web based applications can be distributed - Programs that can be accessed by anyone through any - device Allows communicating with different computer languages - � Integrated Design Environment (IDE) g g ( ) Makes programming and debugging fast and easy - Rapid Application Development (RAD) - MIKE TM approved 9 Version 2006/1 Why C# (not C++) in 204111 ? y ( ) � They support so called safe internet programming. � They support so-called safe internet programming. � They are simpler than other object-oriented languages [C++]. � They are safe and robust --- no core dump or dead console. � They have good graphics package. � They are related to C and C++. � They have good client-server and network support. � They are good for your summer job. � However, they are not easy to learn; each has many features … � Right now, C# has a better buzz than Java. MIKE TM approved Version 2006/1 10
Learning C# g � Just like learning any new language g y g g � Syntax: “ new words ” � Grammar: how to put them together � Programming: telling a coherent story � Library: use plots already written � Library: use plots already written � Initially overwhelming, but pays off in the end! � Picking up Java and C++ after C# should be easy! � Picking up Java and C++ after C# should be easy! MIKE TM approved Version 2006/1 11 Course Information � Lecture hour: Mon 10-12.00, E0803, 60-Yr Building � Lab hour: Tue 13-16.00, E201, Engineering Computing Center � Information, assignments, & lecture notes are available on-line. We won’t use much paper ! – � Official URL: http://tmp-www.cpe.ku.ac.th/~mcs/courses/2007_02/204111 � Please read online information at least once every two days! � Pl d li i f ti t l t t d ! MIKE TM approved Version 2006/1 12
Course Assignments g � Around 8 assignments in all Mostly programming; from small & easy to large & difficult M l i f ll & l & diffi l - Due on the date specified on the schedule sheet - - Assignments will be posted online for download (no paper handout! ) � Any C# programming environment would work! Microsoft Visual Studo . NET (C# IDE) - • Need 3.3 GB disk space & 256 MB memory p y - .NET Framework SDK (batch C# compiler, ~130 MB disk space) TextPad editor download at – http://tmp-www.cpe.ku.ac.th/~mcs/courses/2007_02/204111/download.html � Almost all assignments must be submitted online (see the web site for detail) MIKE TM approved Version 2006/1 13 Grading Policy g y � 10% for Assignments + Lecture and Lab attendance � 10% for Assignments Lecture and Lab attendance � 10% for unannounced quiz � 20% for 2 lab exams (10% each) � 30% for written midterm exam � 30% for written final exam MIKE TM approved Version 2006/1 14
Copying/Cheating Arrangement py g g g � 1 st time, -1 polar ( ลบ 1 ประจ ) � 2 nd time, another -2 polar, and according to the faculty of engineering policy, those th f lt f i i li th involved will be sent to the Dean for disciplinary action. disciplinary action. � Unless stated otherwise, all projects are � Unless stated otherwise, all projects are individual assignments and are expected to be the student's own work. MIKE TM approved Version 2006/1 15 Definition of Computer Definition of Computer • Devices for performing computations at D i f f i t ti t high speeds with great accuracy • A machine that can be programmed to manipulate symbols • Physical components are known as “ Hardware ” 16
Computer System p y � Hardware (HW) - Actual physical machines (equipment) that make Actual physical machines (equipment) that make up the computer. � Software (SW) � Software (SW) - Programs written for a specific application are often called software (e.g., Windows XP, Linux, Microsoft Office) , ) MIKE TM approved Version 2006/1 18 Computer Categories Computer Categories • Personal Computer p – Desktop Computer – Notebook – PDA – Personal Digital Assistant • Supercomputer � Mainframe p p – High Computation Power 18
Computer Components p p Secondary Secondary Memory Main Memory HD CPU Output Devices Input Devices MIKE TM approved Version 2006/1 17 Computer Components Computer Components • Input Devices p • Output Devices • Computing & Processing Unit • Computing & Processing Unit 20
Computer Components (pictures) Computer Components (pictures) Hard disc CPU 21 Computer Memory Computer Memory Can be divided into 2 Categories Can be divided into 2 Categories – RAM (Random Access Memory) – ROM (Read Only Memory) ROM (Read Only Memory) • Memory in Computer M i C – Main Memory – Secondary Memory 22
Recommend
More recommend