Thursday, February 02, 2012

Superstition and Programming

So much of my thinking was shaped by programming. People who do not program extensively are missing out on some uniquely valuable mental training.  Now that I am back into it, I am noticing my habits of thinking that I owe to programming.

Today's efforts provide one example. I decided to tackle an issue with accessing the correct directory for jinja2 templates.  When I switched over from django to jinja2, I could not get it to work without putting template htmls in the main directory.  This is an ugly place for them to be.  You want them in their own nice little directory. So this need to put them in the main directory - this is like a "superstition".  Your brain thinks of it the same way as a superstition.  You don't know why it works, but you know it does and you are afraid to change it.  What I learned from programming is that this is faulty thinking.  There is a real reason.  And if you just try, try, try, you will understand it.  The world of the program is complex enough to mimic real life, but still simplified enough that complete understanding is possible.  You just have to push on through the fear. Don't give up.

So, I pushed on through and now I understand what jinja2 is doing much better.  My templates are in the subdirectory where I want them to be.  My directory is all cleared out of miscellaneous files and the little test application is working.

After I moved files around and reran the app, the chat was broken.  My first "superstition" was that a moved file was needed.  I moved them all back!  Still broken. So, I pushed on through and figured out what must be broken.  After staring at the code long enough, I remembered I had made a change to it last night as an experiment.  Obviously, a failed experiment that, once backed out, repaired the function.  Same thing with looking at the user profile.  My mind jumped to the file move as the cause.  But it turned out to be a django/jinja incompatibility.

Programming has made be very non-superstitious in general.  I assume that there are explanations for everything. That quirks are just accidents.  That superstition is really just a lack of understanding.

Comments: Post a Comment

Subscribe to Post Comments [Atom]





<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]