Pages

Sunday, June 21, 2009

A well worded reflection on the nature of engineering and science

"Inquiry is the essence of science, design is the essence of engineering, and in their pure forms, these activities are utterly different. Scientific inquiry draws observations from the world to reshape the mind; engineering design projects ideas from the mind to reshape the world. One is an eye, the other a hand, afferent and efferent flows of information."

from Eric Drexler's blog

Programming in Python

I've been learning Python stuff. I get a similar "soulcraft" feeling from doing programming that people describe getting from mechanical work. I think the two fields are quite similar on an abstract level; both involve identifying problems, isolating them, forming hypotheses about them testing the hypotheses, fixing, and iterating. A significant difference, though, is that with programming you are in a position to do more original creation, whereas that part is already done with a mechanical object like a motorcycle.

I'm working my way through this free book on programming called "How to Think Like a Computer Scientist; Think Python." It's a nice gentle introduction, but even the "gentle" exercises provide fertile ground for creativity and problem solving. Here's a couple of functions I created for the exercises from chapter four and their graphical results:

def flower(t,n,r):
turnAngle = 360/(n)
angle=(360/(n/2))
for i in range(n):
lt(t,turnAngle)
arc(t,r,angle)
lt(t)
arc(t,r,angle)

def polypie(r,s):
theta=360.0/s
alpha=(180.0-theta)/2
edge=sqrt(r**2+r**2-2*r*r*cos(theta*pi/180))
for i in range (s):
fd(bob,r)
rt(bob,180-alpha)
fd(bob,edge)
rt(bob,180-alpha)
fd(bob,r)
rt(bob,180)


(that one's done four times, moving the turtle to the edge and turning it each time. "bob" is the name of the turtle, btw.)

Not mind-blowing, I realize, but nonetheless the product of quite a bit of thought. It will seem more mind-blowing if you try to come up with the functions from scratch; quite a bit of ingenuity (and (basic) math) is required.

I remember computer classes from when I was a kid that used some predecessor to this little grapical program (TurtleWorld). I remember mostly being irritated with it... having to type commands and so on. I wish someone had taught me control structures, back in the day.

Grades!

And now, the moment you've all been waiting for! Grades! I did quite well.

Data Mining: A
Design of Experiment: A
Neuroscience: learning and memory: A
Fundamentals of Programming: B+
Calculus: C

Only the first two are graduate level classes, and so I spent the bulk of my time on them. I was disappointed about the programming grade not being an A, but considering the circumstances, a B+ is quite nice. I need go back and improve my algebra level so I can do better in the next calculus.

I'm also thinking that I'll take Logic in the fall.