Posts Tagged python

OSCON, 2008

Well, this is an obvious thing to blog about…I’m at OSCON, taking workshops for the first two days.

I started in an introduction to Rails plugins.  I didn’t belong in an introduction to Rails plugins.  I haven’t really thought much about Rails since the first Rails conference, over a year ago.  And I hadn’t updated Rails since then.  So I tried to get Rails 2.0 running this morning and run through a tutorial to refresh myself.

And lemme say, I think it’s really sucky of Rails to “automatically” use SQLite, but then not make it clear that Ruby doesn’t by default include SQLite, so I have to install it.  And if I had more time, it probably would have been clear, but dammit, I wanted to go through the tutorial in 10 minutes and that’s just not enough time to RTFM.

But I did get a lot out of the course.  I remembered how it feels to think the instructor is speaking a foreign language using English words.  I have some students who are definitely in that boat.  Of course, I know that it’s possible to figure out what’s going on.  I honestly believe that some of my students don’t know just how lost they are.

And I got Rails to run.

And I felt very female.  After 45 minutes or so, I looked around and noticed very few other women in the session.  Ah, but there was one a few rows back!  Alas, she was the other woman in my group.  She also ditched the second half of the talk.

So, I decided to go from the sublime to the ridiculous, or some such thing, and spend the last hour and a half of the morning in an Introduction to Python session.  It’s been 8 months or so since I’ve thought about Python, but it’s come back a whole bunch faster.

Nice workshop though.  I can pay attention and do other things, like blog and get the PyDev add in working in Eclipse.  Good slides for the next time I need to learn Python.

And some cool phrasology…”Python is a language for consenting adults” for anytime something slightly dangerous is done (like dispensing with getters and setters).  Of course, this is not something someone interested in Python in the high school is wanting to hear.  But then, it’s been my reason for not wanting to use Python in the high school

And the Double UNDERscore is called the “dunder.”  Of course.  How cool.  What a dork I’ll look like in class this fall!

For purely cool programming, there’s Python function building…

def adderNew(n):
   def add(m):
      return m+n
   return add

add20 = adderNew (20)
add42 = adderNew (42)

x = 2
y = add20 (x)
z = add42(x)
print x, y, z

which gives 2, 22, 44!

We’re getting ready to leave…even though I don’t have to fight lines in the ladies room, I should finish up for now.

Advertisements

Comments (1)