|
|
|
Ask HN: Are there any resources to learn how to think about programming?
|
|
5 points
by physloop
5007 days ago
|
|
I'm a college sophomore. I've taken various C++ programming classes, and I'm currently in C++ Data Structures. While my assignments have been fairly challenging, I was never really taught how to think about tackling programming problems. I'd write down some pseudocode, then proceed to hack code together until the program met the professor's requirements. The whole time I feel like I'm shooting fish in a barrel hoping I get something instead of coming up with a proper strategy for achieving what I want. I've purchased tons of programming books, but they merely explain language syntax. I don't want to learn how to declare variables and use loops, I want to learn how to approach a difficult problem, break it down, and come up with a proper solution. I want to develop a mindset for problem solving and programming, not learn more syntax. I know the only way to improve in programming is by practicing, but programming is hard to do without a proper foundation in problem solving. |
|
Some other foundational texts I'd recommend:
* "How to Solve It" is a (the?) classic introduction to mathematical problem solving. http://en.wikipedia.org/wiki/How_to_Solve_It
* CLRS ("Introduction to Algorithms") is the classic introduction to solving problems through computation: http://en.wikipedia.org/wiki/Introduction_to_Algorithms
Those texts are useful for "programming in the small." [1] As you get closer to "programming in the large" (basically putting together non-trivial software systems), some good things to look at are:
* The "Gang of Four" book ("Design Patterns: Elements of Reusable Object-Oriented Software") introduced the idea of design patterns to software engineering and provides a useful toolbox and vocabulary for thinking and talking about putting programs together.
* Joshua Bloch's "Effective Java" is an insightful set of heuristics on writing good code. Like with Gang of Four, you can get a lot out of this book by looking past the implementation language and thinking critically about the rationale behind the prescriptions in the book. I'd also recommend Bloch's talk, "How to Design a Good API and Why it Matters" (http://www.infoq.com/presentations/effective-api-design).
* A recent talk I found insightful is Rich Hickey's talk, "Simple Made Easy" (http://www.infoq.com/presentations/Simple-Made-Easy). In this talk, Hickey makes a strong argument for simplicity in software and the ramifications for the working programmer. I'd also recommend his talk, "Hammock Driven Development."
*I would highly recommend the "Destroy All Software" screencast series by Gary Bernhardt (https://www.destroyallsoftware.com/screencasts). These screencasts show an experienced developer working through small programming problems in a test driven style and explaining the reasoning behind his decisions as he goes along.
[1] http://en.wikipedia.org/wiki/Programming_in_the_large_and_pr...