By V. Anton Spraul
The genuine problem of programming isn't studying a language's syntax—it's studying to creatively clear up difficulties so that you can construct whatever nice. during this distinctive textual content, writer V. Anton Spraul breaks down the ways in which programmers resolve difficulties and teaches you what different introductory books frequently forget about: easy methods to Think Like a Programmer. each one bankruptcy tackles a unmarried programming inspiration, like sessions, tips, and recursion, and open-ended routines all through problem you to use your wisdom. You'll additionally find out how to:
* break up difficulties into discrete parts to cause them to more uncomplicated to solve
* utilize code reuse with services, periods, and libraries
* decide the proper information constitution for a selected job
* grasp extra complex programming instruments like recursion and dynamic memory
* manage your options and improve options to take on certain types of problems
Although the book's examples are written in C++, the artistic problem-solving strategies they illustrate transcend any specific language; actually, they typically succeed in outdoors the world of machine technology. because the so much skillful programmers be aware of, writing nice code is an inventive art—and step one in growing your masterpiece is studying to Think Like a Programmer.
Read or Download Think Like a Programmer: An Introduction to Creative Problem Solving PDF
Similar programming books
As programmers, we’ve all noticeable resource code that’s so gruesome and buggy it makes our mind soreness. during the last 5 years, authors Dustin Boswell and Trevor Foucher have analyzed 1000s of examples of "bad code" (much of it their very own) to figure out why they’re undesirable and the way they can be stronger.
Seeing that its first quantity in 1960, Advances in desktops has awarded certain assurance of thoughts in and software program and in desktop conception, layout, and functions. It has additionally supplied contributorswith a medium within which they could study their topics in higher intensity and breadth than that allowed by way of usual magazine articles.
This 3rd variation introduces the newest conception and purposes in optimization. It emphasizes restricted optimization, starting with linear programming after which continuing to convex research, community flows, integer programming, quadratic programming, and convex optimization. You’ll find a host of sensible enterprise purposes in addition to non-business purposes.
- Linear Programming: Foundations and Extensions (2001)(2nd ed.)(en)(450s)
- Software Visualization: International Seminar Dagstuhl Castle, Germany, May 20–25, 2001 Revised Papers
- Fast Software Encryption: Second International Workshop Leuven, Belgium, December 14–16, 1994 Proceedings
- Programming Languages and Systems: 23rd European Symposium on Programming, ESOP 2014, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2014, Grenoble, France, April 5-13, 2014, Proceedings
Additional info for Think Like a Programmer: An Introduction to Creative Problem Solving
In this first problem, we’ll perform identification number validation. In the modern world, almost everything has an identification number, such as an ISBN or a customer number. Sometimes these numbers have to be entered by hand, which introduces the potential for error. If a mistakenly entered number doesn’t match any valid identification number, the system can easily reject it. But what if the number is wrong, yet valid? For example, what if a cashier, attempting to credit your account for a product return, enters another customer’s account number?
The middle Kratzz, however, interacts with the other two. Again, if you didn’t see the analogy, don’t worry. You’ll start to recognize them more after you put yourself on alert for them. General Problem-Solving Techniques The examples we have discussed demonstrate many of the key techniques that are employed in problem solving. In the rest of this book, we’ll look at specific programming problems and figure out ways to solve them, but first we need a general set of techniques and principles. Some problem areas St r a t eg i e s f o r P r o b l e m So l vi n g 15 have specific techniques, as we’ll see, but the rules below apply to almost any situation.
Try a medium-difficulty sudoku puzzle (you can find these all over the Web and probably in your local newspaper), experimenting with different strategies and taking note of the results. Can you write a general plan for solving a sudoku? 1-2. Consider a sliding tile puzzle variant where the tiles are covered with a picture instead of numbers. How much does this increase the difficulty, and why? 1-3. Find a strategy for sliding tile puzzles different from mine. Chapter 1 1-4. Search for old-fashioned puzzles of the fox, goose, and corn variety and try to solve them.
Think Like a Programmer: An Introduction to Creative Problem Solving by V. Anton Spraul