Saturday, June 19, 2010

crappy coding practices

I've been working with my professor's code for the past 2 years, and it's got a reputation for being hard to work with. At the same time, my prof is so incredibly proud of it, and claims (correctly) that it can do things no other code can do for problems. The hard part is getting it to do what you want correctly.

A quick coding philosophy lesson - like Shrek and onions, good code should have layers, each with a different level of immutability. This tends to hold in general for any algorithm, program, set of instructions for a problem - make it so that small changes to the problem require only small changes to the program in order to adapt to the new problem.

An example of what not to do - say a program uses some general algorithm to solve a mathematical problem. Hard-code information about a particular problem into the algorithm code, however, and you have a code that's intertwined too much, so that things are connected where they shouldn't be. When you change the problem you're solving, you end up needing to change what should be a general algorithm as well.

Of course, this means that if your code is layered, your inner most code will be used by almost everything else, so to change something there may mean recoding most of the code base. My prof's code is a great example; he built things based around coding protocols and methods of the 70's and 80's, so the heart of the code boasts some pretty annoying outdated practices (for those that are interested, two phrases - implicit declarations and global variables). To further complicate matters, since he needs to maintain some form of control over the code, he refuses to let anyone but himself change these data structures.

So you have a code that has worked for my professor, but has been packaged in a way that nobody can fix it, and few people want to use it because it's so user unfriendly.



N.T. Wright's remark about the rigid intertwining of religious belief with political agendas (abortion, evolution) and specific doctrines (specific inerrancy, literal interpretation) reminds me of my experiences with coding. When coding with my professor's code, I have to write the code in a certain way in order for it to fit the logic of the overall codebase.

Similarly, I feel like theological thought needs then to be executed a certain way in order to fit into the framework of such religious thought. Dr Tour at Rice who I've discussed apologetics with is a good example. When we discussed inconsistencies with the gospel accounts, I interpreted it like Luther - the differences exist, but they do not undermine the overall message. Dr Tour took 15 minutes to discuss the details of how the story, told from two different people's points of views, could appear different but be exactly the same. In the end, I walked away fairly confused by the presentation. This isn't to say he's wrong; however, if he is, then I think his faith would take a fairly significant blow because it was built up from a very specific doctrine which may or may not be true.

In this video, Wright makes an observation about Genesis that I've never heard before - that the 6 day description was written for the Jewish people because that's how tabernacles were described as being built. I think I can appreciate his flexible faith - he doesn't start from doctrine, and thus has room for change - especially for when we make mistakes - when new developments arise.

5 comments:

Jose A. said...

While the cons are numerous, I think there are some pros to not having grown up in an environment saturated with a particular doctrinal perspective on the bible. It definitely makes it easier to poke at things and ask big questions, but at the same time, it makes it easier to end up completely interpreting things in whatever manner you see fit.

Focusing on biblical text and trying to find out as much as I can about what the early church really thought has, I think, helped me avoid going down that latter road. There are some things that I've had to accept out of obedience, even if I'd think differently when left to my own emotional reactions... but that certainly isn't the case with everything.

jglc said...

hmm

dude that's so cool, how your knowledge of coding reads into your views of "intertwining" theology + other doctrines (political, philosophical, moral, etc.). Very informative... and, I might add, a real reminder of how God uses our strengths to glorify and illuminate Himself. Cool.

jchan985 said...

jose - that's true; having grown up in the opposite environment, I can agree with you. However, I find it funny that I'm doing the same thing you are now.

I feel like regardless of your upbringing, though, a person will have a few pieces of cultural baggage they bring with him.

jason - you should see how I am with math :P

Mithun said...

I suppose I understand what Wright is saying about the "Tour" approach, but I guess I don't disagree with the logic of the Tour approach. It is less flexible, yes, but I feel more logically sound. That is, the way we interpret one passage (say, Genesis 1-3) speaks about the way we should be interpreting other passsages: they are interconnected and we must be consist. Sure, we can interpret different passages with different tools, but there must be a textual reason why we're making such a distinction. We can't just say Gen. 1-3 is symbolic merely because it doesn't conform with our present understanding of the world. On the other hand, however, we can say that the visions of Daniel are symbolic because Daniel gives or searches for an "interpretation" of them.

Take Wright's "tabernacle" view of Genesis 1-3. Personally, I don't get it, but let's assume it makes coherent sense. Why take that tabernacle view? Do subsequent authors of the Bible take that view of Genesis, or do they have a more literal interpretation? What about Christians historically? Are there any intertextual reasons to take that view? I think these questions should be answered before accepting an interpretation that makes sense merely because it conforms with a convenient way to interpret the Bible (that is, one that makes us more comfortable).

jchan985 said...

Mithun - apologies for the late comment. I have to admit, I'm not sure what the tabernacle view is.

About the rest of the questions
- "Do subsequent authors of the Bible take that view of Genesis, or do they have a more literal interpretation?" That's up to debate; i've seen both views taken w.r.t Paul. However, I do think that asking whether or not the authors believed one thing or not is kind of missing the point - I hope to back this up in the next post.

- "What about Christians historically?" This is actually the most interesting - Augustine, Calvin, etc all had a lot to say on the witness of non-Christians. Augustine's "Literal interp of Genesis" is one of the most widely quoted texts in this area, and historically, all liturgical churches and early evangelicals rejected young earth creationism.

- "Are there any intertextual reasons to take that view?" Perhaps not directly, though I think the way we typically interpret different texts can point out that a young earth interp of Genesis may be a bit out of place.

I do agree we need to ask questions and be careful about things before we rush to judgments - the Anglican church has nearly been split in two because the Episcopalean half has been in such a hurry to come to decisions before thinking and consulting with the larger body.

However, I am starting to take the opinion that the young-earth movement was a knee-jerk reaction, and hence and a rushed judgment of sorts as well.