790 likes | 983 Views
CPS120 Introduction to Computer Science. Lecture 2. Types of Programming Languages. Machine language Procedure-oriented languages Object-oriented languages Event-driven languages. What Can a Program Do?. A program can only instruct a computer to: Read Input Sequence Calculate
E N D
CPS120 Introduction to Computer Science Lecture 2
Types of Programming Languages • Machine language • Procedure-oriented languages • Object-oriented languages • Event-driven languages
What Can a Program Do? • A program can only instruct a computer to: • Read Input • Sequence • Calculate • Store data • Compare and branch • Iterate or Loop • Write Output
Fundamental Programming Concepts • Assignment of values to a variable • Iteration (Looping) • Over a set of set of statements • With respect to a logical expressions (conditions) • Delegation of sub-tasks to functions / procedures
The Structure Theorem The Structure Theorem states that any algorithm can be built from three basic control structures. • One-after-another (Sequence) • Decision-making (Selection) • Making choices between 2 or more alternatives • Repetition (Iteration) • Concerned with repetitive tasks (and the termination conditions of loops)
Electronic Communications CPS120 Introduction to Computer Science
E-Mail • Addresses • Location of an individual mailbox on the Internet • User name, @ sign, domain – no spaces
Web-based E-mail • Don’t need email client • Popular Web-based E-mail Services • www.hotmail.com • www.email.com • mail.yahoo.com
By type: .com .edu .gov .mil .net .org By country Australia - .au Canada - .ca Ireland - .ie Italy - .it Japan - .jp United Kingdom - .uk Organization Other new codes have been defined
Newest Additions to the Web New domain names: • .info • .biz • .name • .pro • .museum • .coop • .aero
E-mail Features • Address books • Signatures • Attachment of files • Try to keep under 50Kb • Sometimes certain types of files are screened
E-Mail Issues • Emoticons • :-) • Abbreviations • LOL • TTFN • Netiquette • Shouting • Flame
Viruses • An e-mail virus is a program that can disrupt the normal operation of a computer • Display of unusual messages • Destroying files on the hard drive • Sending mail to people in your address book • Triggered by opening files; sometimes only in preview • Anti-Virus programs available commercially • Must be kept up-to-date
Mail Groups • A mailing list is a discussion group that uses e-mail to communicate • A list of mailing lists is at www.liszt.com • Moderated vs. un-moderated lists • Must subscribe to participate • Two addresses • Mailing list addresses • Administrative addresses
Newsgroups • A discussion group that allows people with common interests to communicate with each other • USENET (User’s Network) • All the computes that distribute newsgroup information • Messages • Individual posts • Threads • Messages and all replies
Addressing • First word describes the main topic • Each additional word is separated by a dot and serves to narrow the topic
Networking Aspects • Newsreader – program that lets you read and post online • Microsoft Outlook has a built-in reader • Gravity • Free Agent • News server • A computer that stores newsgroup messages
alt biz comp misc rec sci Soc talk General Interest Business Computers Miscellaneous Recreation & Hobbies Science Social (culture/politics) Debate Newsgroup Categories • alt.fans.actors • biz.entrepreneurs • comp.security.misc • misc.books.technical • rec.food.recipes • sci.physics • soc.history • talk.politics.misc
Newsgroup Etiquette • Lurk first • Read FAQ • Reply • Send a private reply
Chatting • One of the most popular features on the Internet (but no one admits to doing it) • Text-based • Multi-media • Internet Relay Chat (IRC) channels • Need a program to participate (www.mirc.com) • Instant messaging allows you to communicate privately with others • MSN or AOL
Networks CPS120 Introduction to Computer Science
What Is a Network • A network is a group of connected computers that allow people to share information and equipment
Types of Networks • LAN (Local Area Network) connects computers within a small geographic area like a building • WAN (Wide Area Network) connects computers across a large geographic area like a city or country (often via satellite) • Internet: World-wide network of networks
Advantages to Networking • Road warriors • Eliminate “sneakernet” • Share information • Share equipment
Who Runs It? • A network administrator manages the network and makes sure it runs smoothly • Often called a systems administrator or an IS manager
Network Applications • Electronic mail • Groupware • Calendaring • Scheduling • Video-conferencing • Requires sound card, speakers, mike & camera
Physical Networking • Hubs • A hub is a device that provides a central location where all the cables on a network come together • NICs (Network Interface Card) • An expansion card that physically connects each computer to the network • Cables • Coaxial, Unshielded Twisted Pair (UTP), Shielded Twisted Pair, Fiber-optic • Wireless
How Information Is Stored • Client-Server: • Used for large networks • Files are stored on a central computer and everyone who can access the network can be given access them • Easy to create scheme to backup and protect files • Client: a computer that can access information stored on the server • Server: Central computer that stores files • NetWare, UNIX, Windows NT/2000
How Information Is Stored • Peer-to-Peer: • Used for a small number of computes (e.g. 10) • Files stored on own computers; access given to them to others on the network • LANtastic, Windows-98, Windows-ME
How Information Is Exchanged • Ethernet: • Most popular and least expensive solution • Each computer waits for a pause before sending information • Like polite conversation • Collisions between information often occur • Computers wait a moment, then resend • Ethernet – 10 Mbps, Fast Ethernet – 100 Mbps, Gigabit Ethernet 1000 Mbps
How Information Is Exchanged • Token-ring is a type of network where a token that collects and delivers information is passed from compute to computer • Speeds of 4 or 16 Mbps • Asynchronous Transfer Mode (ATM) is a type of network that works by sending information in equal-sized pieces called cells • 25, 155, 622 or 2488 Mbps • Often networks networks
Network Security • Operating System Security • Other system software • Firewall – specialized hardware or software package designed to protect a private computer network from unauthorized access • Think “Moat” • User name and password • Used for authentication • Good passwords
Intranet • Small version of the Internet in a company • Uses familiar web-browsers and email packages • Allows hyper-linking • VPNs (Virtual Private Network) • End-to-end encryption • More cost efficient than private lines
Internet and WWW Chapter 10
Internet Fundamentals • Dates from DARPA in the 1960s • Consists of thousands of connected networks around the world • Each organization on the Internet is responsible for maintaining its own equipment • These organizations allow you to pass-through their nets • Designed to provide multiple routing to bypass disabled computers • Called cyber-space or the information superhighway
Internet Offerings • Electronic mail (Most popular application) • Information • Entertainment • Discussion Groups • Chat • Programs (Shareware) • Online shopping
Connecting • Computer • Software • Modem or high-speed connection • ISP (Internet Service Provider) • Access for a fee
World Wide Web • Part of the Internet consisting of a huge collection of documents stored on computers around the world • Web server: computer that stores and delivers web pages • Web site: collection of web pages • URL (Uniform Resource Locator) – unique address • HTTP, Computer, Directory, Name of Page • Hyperlinks jump to different web pages
Browsers • A program that lets you view and navigate information on the World Wide Web • Home Page: Web page that appears each time you start your web browser • Browser: • Internet Explorer • Netscape Navigator • Features • Bookmark • History lists
Multimedia • MP3 – compressed files containing music or video • WinAmp • Streaming video – requires player • RealPlayer, QuickTime • Enhancements • Java • JavaScript • ActiveX
Web Portal • Central starting point for browsing personalized by the individual • Yahoo, Excite, Go, Lycos • Info • Free services like email, shopping, chat, games, stock quotes and sports scores
Create & Publish Web Pages • HyperText Mark-up Language is a computer code used to create Web pages • There are many programs available, called visual editors which can help you create Web pages without having to learn HTML • Publishing your pages – loaded to an addressable server
Security CPS120 Introduction to Computer Science
Aspects of Computer Security • A. Hardware • B. Files • C. Connectivity
Key Areas Addressed by Security • Physical security – how do I keep my hardware and key files safe • Password security – what is a good password and how do you set one • Computer viruses – what they are and how to protect your computer • Network security -- how to protect yourself • Firewalls - what the can and can’t do and why they are important for always-on connections • Backup strategies - why and how to backup your work
All Computers • Temperature • If too high, components malfunction • Components generate heat which must be removed • Humidity • If too high: condensation and corrosion of metal parts • If too low: static electricity (very high voltage!) • Electric power • Irregularities: power spikes, dips, and brown-outs • Special care during thunderstorms! • Power failure: un-interruptible power supply (UPS)
Physical Access • Access to the computer room • Logs of who goes in and out • Console security • Screen passwords, etc. • Access to the physical network • Locking laptops, protecting components on desktops, servers, etc. • Policies • Contingency planning