VP AND EXECUTIVE PUBLISHER | Don Fowley |
EXECUTIVE EDITOR | Beth Lang Golub |
PROJECT LEAD | Samantha Mandel |
EDITORIAL PROGRAM ASSISTANT | Elizabeth Mills |
EXECUTIVE MARKETING MANAGER | Christopher Ruel |
CREATIVE DIRECTOR | Harry Nolan |
SENIOR DESIGNER | Wendy Lai |
COVER PHOTO | simon2579/iStockphoto |
SENIOR PRODUCTION EDITOR | Sujin Hong |
This book was set in Times New Roman 10 by Ljubomir Perkovic and printed and bound by Courier. The cover was printed by Courier.
This book is printed on acid-free paper.
Founded in 1807, John Wiley & Sons, Inc. has been a valued source of knowledge and understanding for more than 200 years, helping people around the world meet their needs and fulfill their aspirations. Our company is built on a foundation of principles that include responsibility to the communities we serve and where we live and work. In 2008, we launched a Corporate Citizenship Initiative, a global effort to address the environmental, social, economic, and ethical challenges we face in our business. Among the issues we are addressing are carbon impact, paper specifications and procurement, ethical conduct within our business and among our vendors, and community and charitable support. For more information, please visit our website: www.wiley.com/go/citizenship.
Copyright 2012 John Wiley & Sons, Inc. All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, website www.copyright.com. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030-5774, (201) 748-6011, fax (201) 748-6008, website www.wiley.com/go/permissions.
Evaluation copies are provided to qualified academics and professionals for review purposes only, for use in their courses during the next academic year. These copies are licensed and may not be sold or transferred to a third party. Upon completion of the review period, please return the evaluation copy to Wiley. Return instructions and a free of charge return mailing label are available at www.wiley.com/go/returnlabel. If you have chosen to adopt this textbook for use in your course, please accept this book as your complimentary desk copy. Outside of the United States, please contact your local sales representative.
ISBN: 978-0-470-61846-2
Printed in the United States of America
10 9 8 7 6 5 4 3 2 1
To my father, Milan Perkovi (1937 - 1970),
who did not get the chance to complete his book.
Contents
Preface
This textbook is an introduction to programming, computer application development, and the science of computing. It is meant to be used in a college-level introductory programming course. More than just an introduction to programming, the book is a broad introduction to computer science and to the concepts and tools used for modern computer application development.
The computer programming language used in the book is Python, a language that has a gentler learning curve than most. Python comes with powerful software libraries that make complex taskssuch as developing a graphics application or finding all the links in a web pagea breeze. In this textbook, we leverage the ease of learning Python and the ease of using its libraries to do more computer science and to add a focus on modern application development. The result is a textbook that is a broad introduction to the field of computing and modern application development.
The textbook's pedagogical approach is to introduce computing concepts and Python programming in a breadth-first manner. Rather than covering computing concepts and Python structures one after another, the book's approach is more akin to learning a natural language, starting from a small general-purpose vocabulary and then gradually extending it. The presentation is in general problem oriented, and computing concepts, Python structures, algorithmic techniques, and other tools are introduced when needed, using a right tool at the right moment model.
The book uses the imperative-first and procedural-first paradigm but does not shy away from discussing objects early. User-defined classes and object-oriented programming are covered later, when they can be motivated and students are ready. The last three chapters of the textbook use the context of web crawling and search engines to introduce a broad array of topics. These include foundational concepts such as recursion, regular expressions, depth-first search, and Google's MapReduce framework, as well as practical tools such as GUI widgets, HTML parsers, SQL, and multicore programming.
This textbook can be used in a course that introduces computer science and programming to computer science majors. Its broad coverage of foundational computer science topics as well as current technologies will give the student a broad understanding of the field and a confidence to develop real modern applications that interact with the web and/or a database. The textbook's broad coverage also makes it ideal for students who need to master programming and key computing concepts but will not take more than one or two computing courses, in particular math, science, and engineering majors.
The Book's Technical Features
The textbook has a number of features that engage students and encourage them to get their hands dirty. For one, the book makes heavy use of examples that use the Python interactive shell. Students can easily reproduce these one-liners on their own. After doing so, students will likely continue experimenting further using the immediate feedback of the interactive shell.
Throughout the textbook, there are inline practice problems whose purpose is to reinforce concepts just covered. The solutions to these problems appear at the end of the corresponding chapter, allowing students to check their solution or take a peek in case they are stuck.
The textbook uses Caution boxes to warn students of potential pitfalls. It also uses Detour boxes to briefly explore interesting but tangential topics. The large number of boxes, practice problems, figures, and tables create visual breaks in the text, making the volume more approachable for today's students.
Most chapters in the text include a case study that showcases the concepts and tools covered in the chapter in context. Finally, the textbook contains a large number of end-of-chapter problems, many of which are unlike problems typically found in an introductory textbook.
Online Textbook Supplements
The link to the book's online content is www.wiley.com/college/perkovic . These supplements are available there:
- Powerpoint slides for each chapter
- Expanded tutorials on SQL and HTML
- Code examples appearing in the book
- Exercise and problem solutions (for instructors only)
- Project ideas for (for instructors only)
- Exam problems (for instructors only)