For my forgetful brain:
ruby /rails_repo/bin/rails new projectname --dev
Thursday, August 25, 2011
Monday, August 15, 2011
Superstitious programming
Some programmers tend to think that something causes a problem without examining it further and confirming it. Then they just "fix" it or work around it, blaming it on the suspected cause.
For example, you're using an external library and you found that things went haywire. There are possible causes to this. First, the library causes it. How likely is it? You can look at the number of users (in other word, popularity) of the library. The more users, the less likely that it is the library's problem. Of course there's a remote possibility of you discovering a rare bug. But more likely, perhaps you're just not using the library right.
Here's a way of thinking that is also applicable in real life. Always check your assumption. Ensure that when you think something is causing the other, that it really is the case. Remove or change the cause and see if the effect changes or disappears. Only when you have that correlation that you can confidently say, "Yes, that's really the cause."
Having a knowledge of the scientific method will help greatly when doing this, and as a bonus, also when navigating life generally.
For example, you're using an external library and you found that things went haywire. There are possible causes to this. First, the library causes it. How likely is it? You can look at the number of users (in other word, popularity) of the library. The more users, the less likely that it is the library's problem. Of course there's a remote possibility of you discovering a rare bug. But more likely, perhaps you're just not using the library right.
Here's a way of thinking that is also applicable in real life. Always check your assumption. Ensure that when you think something is causing the other, that it really is the case. Remove or change the cause and see if the effect changes or disappears. Only when you have that correlation that you can confidently say, "Yes, that's really the cause."
Having a knowledge of the scientific method will help greatly when doing this, and as a bonus, also when navigating life generally.
"Assumptions that aren't based on well-established facts are the bane of all projects." (from The Pragmatic Programmer by Andrew Hunt and David Thomas)
"One of the biggest differences between hobbyists and professional programmers is the difference that grows out of superstition into understanding." (from Code Complete, Second Edition by Steve McConnell)
Subscribe to:
Posts (Atom)