#5,325 in Computers & technology books
Use arrows to jump to the previous/next product
Reddit mentions of A Philosophy of Software Design
Sentiment score: 1
Reddit mentions: 1
We found 1 Reddit mentions of A Philosophy of Software Design. Here are the top ones.
Buying options
View on Amazon.comor
Specs:
I read your question as having two parts:
A) How do I get better at taking a project and breaking it down into smaller tasks?
B) When I encounter an error, how do I get better at finding the cause of it?
There are a few answers to this-- a toolbelt of techniques.
Basic, but very powerful. Your brain can only hold so much at once. If you keep a notebook by your side or a text file open, you can dump your thoughts into it and give your brain an advantage in keeping track of the things you learn. Better yet, when you run into an error, approach it like the scientific method: Form a hypothesis and come up with ways to test that hypothesis.
print()
andimport pdb;pdb.set_trace()
These are ways to look at "what is my code currently doing?" and "what is the value of this variable right now?". They let you gather the information.
Debugging: The 9 Indispensable Rules is a great book on how to use these tools effectively.
When you encounter an error, write a little program which reliably triggers the error. Here is a tutorial on how to use py.test, a tool for writing such programs. The Goat Book is a longer intro to writing Automated Tests.
You want to split your code up into parts which make it easy to understand. That way, when you see an error, you can more easily read the code where that error comes from. How do you do this? A great book to start with, once you've gotten the ability to write some short scripts, is A Philosophy of Software Design. Another great book is Clean Code. You'll notice that these books sometimes disagree with each other. That is because this technique is a big part of what makes up the craft. Welcome.
----
Note: I'm found a bit hard to understand the last sentence. I think that it got mixed up with the sentence before it.
I hope you don't take this as condescending--perhaps you had to dash off a response on your phone. But I'm willing to take the risk of condescension because this advice is far more important than the question of python-vs-java:
Alongside learning to write in a program, it is also important to make a strong habit to write English with solid grammar. Why?