Sunday, July 28, 2013

Coding the Matrix -- Yikes, I'm quite behind.

OK, I'm having trouble keeping focused, as usual.  I didn't start the class assignments for week 1(zero relative) of Coursera's "Coding the Matrix" until this after noon, about 6PM.  It's now 10PM and I'm complete.  The Politics lab was interesting.  I don't know why I'm so slow at working these problems.  I used to be able to handle them quickly.  My age must be getting to me.  Week 3 says
Week 3 is upon us, and with it we enter the middle third of the course. This week's topic, The Matrix, represents a transition. Most of it is, in a sense, mechanics, but it opens the door to the more math material that comes next.

There is a lot of work being assigned this week. If it is possible for you, I suggest you not try to get it all done in a week; take advantage of at least some of the three-week time period you have. Next week's assignment won't be as heavy, so you'll have time to catch up.
I've got to get moving.  At least I've made the due date for week 1.  week 4 is out now.

Now looking back at my work on week 1's assignments I realize I haven't taken advantage of the zip function.  I coded:

  [a[x]*b[x] for x in range(len(a))]

when I should have coded:

  [x*y for x,y in zip(a,b)]

Learning the Python language takes time.  I'm not used to thinking this way.  I've mostly moved from procedural languages into SQL.  This is a step sideways.  SSIS is pictorial.  One uses functions to get the results one wants.  Python is textual.

No comments:

Post a Comment