Have you read your Python Docs Lately?

April 30th, 2011 § 8 comments § permalink

I — like most peo­ple com­fort­able with my rel­a­tively sane (yet lim­ited) knowl­edge of Python — rarely go and read the python docs except when I know what I’m look­ing for. For exam­ple, I have a win­dow open to iter­tools and col­lec­tions open a lot more than I care to admit (I love you named­tu­ple. I loves you so much), but I rarely go off look­ing for new things/stuff that’s changed.

For those few of you (and really, it should only be a few of you) who don’t know — Ray­mond Het­tinger is a python core devel­oper and author/maintainer of quite a few inter­est­ing mod­ules within the stan­dard library (and a con­stant stream of ASPN recipes). Ray­mond is also highly active on python-dev and other lists the sub­ject of this post being python-list (the one list I refuse to join just due to the time/attention tradeoff).

Oh, he’s also a cur­rent mem­ber of the Python Soft­ware Foun­da­tion board of direc­tors. To say he’s active would be an understatement.

Back to the sub­ject at hand: Docs.

Ray­mond posted some­thing I think should see a lit­tle bit more atten­tion — as I stated in my opener, many of us are guilty of not read­ing much in the way of Python docs unless we are look­ing for some­thing spe­cific. We miss out on gems/updates to older docs that really make them shine. We also miss out on new exam­ples, and other things that really help make Python’s docs some of the best out there.

As I said in my for­ward to Doug Hellmann’s “The Python Stan­dard Library By Exam­ple” -

The stan­dard library’s doc­u­men­ta­tion is good, and con­stantly improving/evolving. Given the size and breadth of the stan­dard library, it’s amaz­ing for what it is. It’s awe­some that we have hun­dreds of pages of doc­u­men­ta­tion con­tributed by hun­dreds of devel­op­ers and users that are used every sin­gle day by hun­dreds of thou­sands of peo­ple to cre­ate things – things as sim­ple as one-off scripts, and as com­plex as the soft­ware that con­trols giant robotic arms.

In Raymond’s post to python-list, he listed some new/newly updated docs that are really interesting:

The newly added/revised log­ging howto by Vinay (author/maintainer of the log­ging mod­ule) is really good to note (You have vis­ited the python docs how­tos, right? It’s here.). The addi­tional log­ging cook­book nicely com­pli­ments Vinay’s revised log­ging mod­ule documentation.

Oh, and if you were won­der­ing — yes, there is an easy to read list in the “What’s new” doc­u­ment for 2.7 (curated by Ray­mond) that lists out all the new Python 3 fea­tures back ported to python 2.7 for your read­ing plea­sure.

Last night, an addi­tional resource popped up on my radar — pyth0n.org — a site, while need­ing some CSS love (oh, the CSS love it needs) is an excel­lent way to jump to just about any­thing within Python (docs, classes, meth­ods, built-ins, etc). I think I killed it with load from tweet­ing about it last night, so be gen­tle. It really is a cool site, it’s like a uber-index of Python.

As an adden­dum — Ray­mond has also become very active on post­ing inter­est­ing bit of python knowledge/pro­tips on his twit­ter account, which have been a joy to see pop up in my tweet stream (Given how guilty I am of say­ing things that might be con­strued as “noise”). Some of highlights:

  • fac­toid: random.sample() auto­mat­i­cally chooses an algo­rithm, remember-previous-picks or remove-picks-from-the-population
  • pro-tip: deque’s optional maxlen argu­ment use­ful for n most recent items, mov­ing aver­ages, slid­ing win­dows, tail­ing files
  • pro tip: def mean(s): return math.fsum(s)/len(s) # don’t lose pre­ci­sion while adding large num­bers of small values.
  • Dirt sim­ple map/reduce util­ity for :

So, take a look around the lat­est docs and fol­low him, and other python devel­op­ers such (Barry War­saw, David Bea­z­ley, Nick Cogh­lan, R. David Mur­ray, Guido Van Rossum) on twit­ter (you can fol­low me if you want). Brett Can­non (another core com­mit­ter) has a twit­ter list of com­mit­ters.

There’s been a lot of work done across the board to improve the docs, add to them and clean them up. A lot of excel­lent peo­ple con­tribute changes almost daily to them. They are a fan­tas­tic resource, and are greatly com­pli­mented by work like the Python Mod­ule of the Week (Doug Hell­mann) and other tuto­ri­als spread across the web.

If you know of a par­tic­u­larly good tuto­r­ial, or expla­na­tion of a mod­ule, you might con­sider sub­mit­ting a ticket cit­ing it, and sug­gest­ing it be included into the stan­dard library docs as well. What are some of your favorite doc­u­men­ta­tion gems, or exam­ples for Python?

Switching to a standing Desk; thoughts

April 25th, 2011 § 19 comments § permalink

IMG 2155

For a 5 month update, check out: “The Stand­ing Desk Exper­i­ment 5 Months in

For about the past year or two, I’ve been work­ing on improv­ing my “state of being” for lack of a bet­ter term — focus­ing on more pro­duc­tiv­ity, health, etc — I think every­one goes though this at one point or another. Var­i­ous events of the past year — an incom­ing sec­ond kid, badly dislocating/injuring my knee and reha­bil­i­tat­ing that, real­iz­ing that being an over­weight, unhealthy geek prob­a­bly wasn’t in my, or my fam­i­lies’ long term inter­est and see­ing my lit­tle girl grow up faster than any­thing I’ve ever seen (see this excel­lent post by Mer­lin Mann — “Crank­ing”) has trig­gered me to make a series of changes, the most recent of which is directly inter­est­ing to a lot of you — I’ve switched over to a stand­ing desk setup at work.

» Read the rest of this entry «

Explaining the Python Software Foundation (PSF) Part 1

April 17th, 2011 § 1 comment § permalink

Intro­duc­tion

It’s been over a year since I was elected by the PSF mem­ber­ship to be a mem­ber of the board of direc­tors of the Python Soft­ware Foun­da­tion — this past week, I was lucky to be reelected. In that year, and even in the years prior to my elec­tion, I’ve long wanted to write down my thoughts and feel­ings about the foun­da­tion. This includes what it is, what it does and what it should do. You’d be stunned how many peo­ple — PSF mem­bers included — who don’t know the answer to these three things. Worse still, you’d prob­a­bly be even more sur­prised to find out many peo­ple who don’t think the PSF should exist — or even that it exists at all.

Before we start, I want to clar­ify a few things:

  • What fol­lows is my opin­ion; and may be shared by some — or none — of the cur­rent 13 PSF board members.
  • What fol­lows is not the opin­ion of my employer (not that I need to say that…).
  • What fol­lows has no rela­tion or bear­ing on my role as co-chair and pro­gram com­mit­tee chair of PyCon.
  • What fol­lows may be incom­plete, I reserve the right to amend or make clar­i­fy­ing statements.
  • None of this is meant as a crit­i­cism of any past direc­tors, mem­bers, etc.

With that pile of dis­claimers done, I will state this: what fol­lows is my offi­cial opin­ion of the PSF and it’s duties and role in the Python Com­mu­nity as a direc­tor of the PSF — this means that if you are a PSF mem­ber, and dis­agree with what fol­lows, con­sider vot­ing against me when the elec­tion comes up this year. I will state that it is my goal to not only express what I think the PSF is, does and should do but also to pro­vide some­thing that:

  • Helps explain the fun­da­men­tals of the PSF.
  • Helps explain what the Board of Direc­tors is.
  • Helps make the argu­ment why com­pa­nies should become sponsors.
  • Helps make the argu­ment as to why you should donate to the PSF.

Much of what I will be writ­ing may be a sim­pli­fied or updated ver­sion of the infor­ma­tion that is also on the main Python Soft­ware Foun­da­tion page. I’d like to note that this post has spanned sev­eral months of on-and-off writ­ing — and PyCon 2011 right in the mid­dle of it, so there is some infor­ma­tion shear as time passed.

» Read the rest of this entry «

Python Mentors site is up, hooray!

April 10th, 2011 § 0 comments § permalink

I posted the Python Men­tors — Python Core Men­tor­ship site last night. It’s pretty bare/minimalist (inten­tion­ally) right now — if there’s infor­ma­tion you think is miss­ing, or some­thing you would like to see, drop me a com­ment or an email. Feel like hack­ing on the source? Check out the bit­bucket repo — it’s a sim­ple blo­gofile site right now, and I don’t think we need much more for the forsee­able future.

Many thanks goes to OSUOSL for the free hosting.

 

Python Core Mentorship, up and running.

April 5th, 2011 § 4 comments § permalink

So, after my ini­tial pro­posal to Python-Dev about the core men­tor­ship pro­gram I received a pretty impres­sive out­pour­ing of sup­port and inquiries from peo­ple — both men­tors and “stu­dents” look­ing to join into the pro­gram. Frankly, I’m floored at how pos­i­tive the response has been.

I got the mail­ing list up in short order (go here), and any­one who expressed inter­est to me, or on the python-dev list was directed to it — we have a total of 57 mem­bers right now, and many of the men­tors have sent intro­duc­tions to the list. We’ve also to hashed out the ini­tial code of con­duct, as well as pro­duc­tively answered questions.

Things seem on track — mod­ulo my inabil­ity to carve off time to deploy the small sta­tic about site to pythonmentors.com — on my task list for today. Just to share for your own edi­fi­ca­tion, below is our python-inspired (mean­ing: sim­ple, suc­cinct) code of con­duct for the mail­ing list:

The fol­low­ing code of con­duct is not meant as a means for pun­ish­ment, action or cen­sor­ship for the mail­ing list or project. Instead, it is meant to set the tone and expec­ta­tions and com­fort level for men­tors and those wish­ing to be men­tored on the list.

  • We ask every­one to be wel­com­ing, friendly, and patient.
  • Flame wars and insults are unac­cept­able in any fash­ion, by any party.
  • Any­thing can be asked, and “RTFM” is not an accept­able answer.
  • Nei­ther is “it’s in the archives, go read them”.
  • List archives are avail­able only to sub­scribers, but sub­scrip­tion is open to everyone.
  • Since the archives are “closed” — cross post­ing to pub­lic mail­ing lists is discouraged.
  • State­ments made by core devel­op­ers can be quoted out­side of the list.
  • State­ments made by oth­ers can not be quoted out­side the list with­out explicit per­mis­sion. [1]
  • We endorse the PSF’s Diver­sity state­ment.
  • The list admin­is­tra­tors reserve the right to revoke the sub­scrip­tion of mem­bers (includ­ing men­tors) that per­sis­tently fail to abide by this Code of Con­duct. [2]

[1] Anonymised para­phrased state­ments “some­one asked about…” are ok — direct quotes with or with­out names are not appro­pri­ate.
[2] All men­tors are signed up as administrators.

 

The next steps are to get the basic site up (noth­ing fancy) and to get a blog post up on the newly minted python insider blog. Oth­er­wise: I encour­age those look­ing to learn and con­tribute to join in, the water is fine.

Where am I?

You are currently viewing the archives for April, 2011 at jessenoller.com.