Giter Site home page Giter Site logo

marcusplieninger / htdp_2e_solutions Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 5.0 171 KB

Solutions to the exercises in "How to Design Programs, Second Edition" by Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, Shriram Krishnamurthi

Racket 100.00%

htdp_2e_solutions's Introduction

HtDP_2e_solutions

This project contains solutions to the exercises found in the textbook, How to Design Programs, Second Edition by Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, and Shriram Krishnamurthi.

Note: On stackoverflow, Professor Felleisen responded on 6/17/14 that we should use the draft version and not the stable one of the second edition with the caveat "unless you are an instructor." For parts V and VI, we should switch to the first edition. At the time he said that he is "developing replacements but no promises." He stated that "Parts VII and VIII will not replaced." Need to research if these instructions are still valid.

For my studies, I am using the stable version (release date 12/24/17) since this seems to be more updated than the draft version (release date 12/19/17) as of this writing.

The second edition will be released in print on 04/10/18 and will be available at Amazon.

Purpose

The purpose of this project is to acquire the fundamentals of systematic program design.

Timeline

Start Date End Date
December 11, 2017 IN PROGRESS

Table of Contents and Exercises

There are 528 exercises in total.

Pt. Ch. Sc. Title Exercises Date Completed % of Total Daily Time Spent Total Time Spent
I. Fixed-Size Data
1. Arithmetic
1.1 The Arithmetic of Numbers 1 12/11/17
1.2 The Arithmetic of Strings 2 12/11/17
1.3 Mixing It Up 3, 4 12/11/17 03h01m00s 03h01m00s
1.4 The Arithmetic of Images 5, 6 12/12/17
1.5 The Arithmetic of Booleans 7 12/12/17
1.6 Mixing It Up with Booleans 8 12/12/17 04h06m00s 07h07m00s
1.7 Predicates: Know Thy Data 9, 10 12/13/17 1.89% 00h57m34s 08h04m34s
2. Functions and Programs
2.1 Functions 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 12/14/17 3.79% 03h48m00s 11h52m34s
2.2 Computing 21, 22, 23, 24, 25, 26 12/15/17 4.92% 02h54m00s 14h46m34s
2.3 Composing Functions 27, 28, 29 12/18/17 5.49% 01h19m00s 16h14m34s
2.4 Global Constants 30 12/18/17 5.68% 00h03m00s 16h17m34s
2.5 Programs 31, 32 12/18/17 6.06% 03h36m00s 19h53m34s
3. How to Design Programs 33 12/19/17 6.25% 02h45m00s 22h38m34s
3.1 Designing Functions 12/19/17
3.2 Finger Exercises: Functions 34, 35, 36, 37, 38 12/20/17 7.20% 03h50m00s 26h28m34s
3.3 Domain Knowledge 12/20/17
3.4 From Functions to Programs 12/20/17
3.5 On Testing 12/20/17
3.6 Designing World Programs 39, 40, 41, 42, 43, 44 12/31/16 8.33% 08h17m00s 34h45m34s
3.7 Virtual Pet Worlds 45, 46, 47 01/09/17 8.90% 05h27m00s 40h12m34s
4. Intervals, Enumerations, and Itemizations
4.1 Programming with Conditionals
4.2 Computing Conditionally 48, 49 01/10/17 9.28% 01h31m00s 41h43m34s
4.3 Enumerations 50, 51 01/11/17 9.67% 01h56m00s 43h39m34s
4.4 Intervals 52
4.5 Itemizations 53, 54, 55, 56, 57
4.6 Designing with Itemizations 58
4.7 Finite State Worlds 59, 60, 61, 62
5. Adding Structure
5.1 From Positions to posn structures
5.2 Computing with posns
5.3 Programming with posn 63, 64
5.4 Defining Structure Types 65, 66, 67, 68
5.5 Computing with Structures 69, 70, 71
5.6 Programming with Structures 72, 73, 74, 75
5.7 The Universe of Data 76, 77, 78, 79
5.8 Designing with Structures 80, 81, 82
5.9 Structure in the World
5.10 A Graphical Editor 83, 84, 85, 86, 87
5.11 More Virtual Pets 88, 89, 90, 91, 92, 93
6. Itemizations and Structures
6.1 Designing with Itemizations, Again 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105
6.2 Mixing Up Worlds 106, 107, 108, 109
6.3 Input Errors 110, 111, 112, 113
6.4 Checking the World 114
6.5 Equality Predicates 115
7. Summary
Intermezzo I Beginning Student Language
BSL Vocabulary
BSL Grammar 116, 117, 118, 119, 120
BSL Meaning 121, 122
Meaning and Computing
BSL Errors
Boolean Expressions 123
Constant Definitions 124
Structure Type Definitions 125, 126, 127
BSL Tests 128
BSL Error Messages
II. Arbitrarily Large Data 229
Intermezzo 2: Quote, Unquote 234
III. Abstraction 299
Intermezzo 3: Scope and Abstraction 309
IV. Intertwined Data 411
Intermezzo 4: The Nature of Numbers 420
V. Generative Recursion 483
Intermezzo 5: The Cost of Computation 488
VI. Accumulators 528
Epilogue: Moving On

Next steps

After completing these exercises, I will move onto the following:

Depending on how things go, I may also add the following material as mentioned here:

  • How to Design Worlds
  • Picturing Programs: An Introduction to Computer Programming

The Road Ahead

The purpose of working through this material is to lay a solid foundation for learning Java using Stanford's iTunes courses. After acquiring Java, the plan is to work through Stanford's Swift course with the goal of building an app. I will then work through Python Programming: An Introduction to Computer Science by John Zelle, followed by Concepts, Techniques and Models of Computer Programming by Voy and Haridi.

After understanding this material, I will approach the study of algorithms beginning with Cormen and Sedgewick, and, if I make it that far, Knuth.

Additional Reading

I am collecting a list of books as background to supplement this work (subject to revision):

CS

Logic

(Also consider books by Niklaus Wirth, Edsger Dijkstra, etc.)

Study Hacks, etc.

  • Cal Newport, Deep Work
  • Barbara Oakley, Learning How to Learn
  • Barbara Oakley, Mindshift
  • You Are Not a Device [?]

Credits

A big help in putting together a curriculum for myself was this essay by Peter Norvig.

I learned of the mathematics books here.

Keep Going

This will take a long time, hopefully not too long, and I am not sure I have the right stuff.

One key factor will be to optimize the curriculum and my process as I proceed.

Only one way to find out.

A Note on Time Spent Figures

I track my time using RescueTime.

htdp_2e_solutions's People

Contributors

marcusplieninger avatar

Stargazers

Adilson Nunes avatar  avatar Zhang Shuo avatar Philippe Rigovanov avatar Alexey Nikitin avatar Yangliang avatar Yukuan Xu avatar Stanley Ulili avatar QI avatar  avatar  avatar Samuel avatar

Watchers

James Cloos avatar  avatar programmint avatar

htdp_2e_solutions's Issues

Quick question

Hi Marcus,

I have written this issue in the hopes that you see it. I see this as the only means of communication considering github has no direct message function.

I have recently been using your solutions to HTDP2e and it has been an amazing study aid. I can't thank you enough . Your solutions are extremely conherent and well designed. My question is did you finish posting solutions to the remainder of the book roughly after the itemization section as clicking on the links in the file directs me to an unrelated college website.

Thanks for your time and thanks again for the solutions you've posted thus far.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.