Op werkdagen voor 23:00 besteld, morgen in huis Gratis verzending vanaf €20
,

Think Perl 6

How to Think Like a Computer Scientist

Paperback Engels 2017 9781491980552
Verwachte levertijd ongeveer 8 werkdagen

Samenvatting

Want to learn how to program and think like a computer scientist? This practical guide gets you started on your programming journey with the help of Perl 6, the younger sister of the popular Perl programming language. Ideal for beginners, this hands-on book includes over 100 exercises with multiple solutions, and more than 1,000 code examples so you can quickly practice what you learn. Experienced programmers—especially those who know Perl 5—will also benefit.

Divided into two parts, Think Perl 6 starts with basic concepts that every programmer needs to know, and then focuses on different programming paradigms and some more advanced programming techniques. With two semesters’ worth of lessons, this book is the perfect teaching tool for computer science beginners in colleges and universities.

-Learn basic concepts including variables, expressions, statements, functions, conditionals, recursion, and loops
-Understand commonly used basic data structures and the most useful algorithms
-Dive into object-oriented programming, and learn how to construct your own types and methods to extend the language
-Use grammars and regular expressions to analyze textual content
-Explore how functional programming can help you make your code simpler and more expressive

Specificaties

ISBN13:9781491980552
Taal:Engels
Bindwijze:paperback
Aantal pagina's:444
Uitgever:O'Reilly
Druk:1
Verschijningsdatum:5-6-2017

Lezersrecensies

Wees de eerste die een lezersrecensie schrijft!

Geef uw waardering

Zeer goed Goed Voldoende Matig Slecht

Over Laurent Rosenfeld

Laurent Rosenfeld has been a software engineer for about 20 years, working especially as a contractor for one of the largest telecommunication operator in Europe, particularly in the field of mobile networks. Over the last few years, he has been working especially in the fields of data migration, data quality, and data munging. He has written a number of tutorials on Perl 5 and Perl 6.

Andere boeken door Laurent Rosenfeld

Over Allen Downey

Allen Downey is a Professor of Computer Science at Olin College of Engineering. He has taught at Wellesley College, Colby College and U.C. Berkeley. He has a Ph.D. in Computer Science from U.C. Berkeley and Master's and Bachelor's degrees from MIT.

Andere boeken door Allen Downey

Inhoudsopgave

Preface

Part 1: Starting with the Basics
1. The Way of the Program
What Is a Program?
Running Perl 6
The First Program
Arithmetic Operators
Values and Types
Formal and Natural Languages
Debugging
Glossary
Exercises

2. Variables, Expressions, and Statements
Assignment Statements
Variable Names
Expressions and Statements
Script Mode
One-Liner Mode
Order of Operations
String Operations
Comments
Debugging
Glossary
Exercises

3. Functions
Function Calls
Functions and Methods
Math Functions
Composition
Adding New Functions (a.k.a. Subroutines)
Definitions and Uses
Flow of Execution
Parameters and Arguments
Variables and Parameters Are Local
Stack Diagrams
Fruitful Functions and Void Functions
Function Signatures
Immutable and Mutable Parameters
Functions and Subroutines as First-Class Citizens
Why Functions and Subroutines?
Debugging
Glossary
Exercises

4. Loops, Conditionals, and Recursion
Integer Division and Modulo
Boolean expressions
Logical Operators
Conditional Execution
Alternative Execution
Chained Conditionals
Nested Conditionals
if Conditionals as Statement Modifiers
Unless Conditional Statement
for Loops
Recursion
Stack Diagrams for Recursive Subroutines
Infinite Recursion
Keyboard Input
Program Arguments and the MAIN Subroutine
Debugging
Glossary
Exercises

5. Fruitful Subroutines
Return Values
Incremental Development
Composition
Boolean Functions
A Complete Programming Language
More Recursion
Leap of Faith
One More Example
Checking Types
Multi Subroutines
Debugging
Glossary
Exercises

6. Iteration
Assignment Versus Equality
Reassignment
Updating Variables
The while Statement
Local Variables and Variable Scoping
Control Flow Statements (last, next, etc.)
Square Roots
Algorithms
Debugging
Glossary
Exercises

7. Strings
A String Is a Sequence
Common String Operators
String Traversal with a while or for Loop
Looping and Counting
Regular Expressions (Regexes)
Using Regexes
Building your Regex Patterns
Putting It All Together
Substitutions
Debugging
Glossary
Exercises

8. Case Study: Word Play
Reading from and Writing to Files
Reading Word Lists
Exercises
Search
Debugging
Glossary
Exercises

9. Arrays and Lists
Lists and Arrays Are Sequences
Arrays Are Mutable
Adding New Elements to an Array or Removing Some
Stacks and Queues
Other Ways to Modify an Array
Traversing a List
New Looping Constructs
Map, Filter, and Reduce
Fixed-Size, Typed, and Shaped Arrays
Multidimensional Arrays
Sorting Arrays or Lists
More Advanced Sorting Techniques
Debugging
Glossary
Exercises

10. Hashes
A Hash Is a Mapping
Common Operations on Hashes
Hash as a Collection of Counters
Looping and Hashes
Reverse Lookup
Testing for Existence
Hash Keys Are Unique
Hashes and Arrays
Memos
Hashes as Dispatch Tables
Global Variables
Debugging
Glossary
Exercises

11. Case Study: Data Structure Selection
The Ternary Conditional Operator
The given ... when “Switch” Statement
Subroutine Named and Optional Parameters
Word Frequency Analysis
Random Numbers
Word Histogram
Most Common Words
Optional Parameters
Hash Subtraction
Constructing New Operators
Sets, Bags, and Mixes
Random Words
Markov Analysis
Data Structures
Building Your Own Data Structures
Debugging
Glossary
Exercises: Huffman Coding

Part 2: Moving Forward
12. Classes and Objects
Objects, Methods, and Object-Oriented Programming
Programmer-Defined Types
Attributes
Creating Methods
Rectangles and Object Composition
Instances as Return Values
Inheritance
Roles and Composition
Method Delegation
Polymorphism
Encapsulation
Interface and Implementation
Object-Oriented Programming: A Tale
Debugging
Glossary

13. Regexes and Grammars
A Brief Refresher
Declarative Programming
Captures
Named Rules (a.k.a. Subrules)
Grammars
Grammar Inheritance
Actions Objects
A Grammar for Parsing JSON
Inheritance and Mutable Grammars
Debugging
Glossary
Exercise: A Grammar for an Arithmetic Calculator

14. Functional Programming in Perl
Higher-Order Functions
List Processing and Pipeline Programming
Creating Your Own Map-Like Functions
The gather and take Construct
Lazy Lists and the Sequence Operator
Currying and the Whatever Operator
Using a Functional Programming Style
Debugging
Glossary
Exercise: Quick Sort

15. Some Final Advice
Make It Clear, Keep It Simple
Dos and Don’ts
Use Idioms
What’s Next?

Appendix: Solutions to the Exercises
Exercises of Chapter 3: Functions and Subroutines
Exercises of Chapter 4: Conditionals and Recursion
Exercises of Chapter 5: Fruitful Functions
Exercises of Chapter 6: Iteration
Exercises of Chapter 7: Strings
Exercises of Chapter 8: Word Play
Exercises of Chapter 9: Arrays and Lists
Exercises of Chapter 10: Hashes
Exercises of Chapter 11
Exercises of Chapter 13: Regexes and Grammars
Exercises of Chapter 14: Functional Programming

Index

Managementboek TOP 5

Rubrieken

Populaire producten

    Personen

      Trefwoorden

        Think Perl 6