This is a read-only archive!

Python

People are stupid. We're blinded by our own prejudices and biases and preconceptions. It's kind of understandable because no one has enough time to really collect enough information to have an informed opinion about everything. So we end up extrapolating or relying on expert opinion or turning to our gut feeling. Inevitably we end up being wrong some of the time.

This leads to two problems. One is that being a person myself, I'm also stupid, meaning there are almost certainly some beliefs I currently hold that are wrong. The second is that from my perspective, I appear to be right about everything. This is trivially true of everyone; as soon as a person decides they're wrong, they change their mind right away and become right again. The problem then is how can I tell when I'm wrong and when I'm right? I quick objective glimpse at reality suffices most of the time, but sometimes we're still tricked.

Those two things in combination are a problem for everyone. I think the best anyone can do is to realize that this is the case, be open to being wrong, and to take some efforts to rectify it. At least minimize the damage, try to be as right about as many things as you can.

This is why e.g. I started learning Emacs even though I love Vim, and why I stick with it even though it's unpleasant at first. A lot of smart people say good thing about Emacs. My opinion of it is much different now than before I'd used it a lot. I think many things people say about it are wrong, but many are also right. There is some good stuff there.

For the same reason, I've decided to learn Python. I've been wanting to for quite a while anyways. In spite of the pain I've had trying to use it in the past, and my generally low opinion of the language, there may just be something worthwhile there. A lot of smart people say good things about it, and a lot of good programs are written in it. The community is large and active and enthusiastic.

My first shot was to try some of the stuff at Python Challenge. It's an interesting site full of puzzles that you need a programming language to solve; many of them are geared toward Python or toward libraries available in Python, but you can use any good language for many of them. I got through 17 of the puzzles last night, but I did look at "hints" on the forum for about half of those. A lot of them require sort of specialized knowledge apart from knowledge of Python, on a wide variety of subjects, so it's pretty fun.

My first pet peeve (of many to come, I'm sure): why doesn't python --help or python --version work? Instead you have to use python -h and python -V (capital V). This is non-standard. It worries me when people do things like this differently. But we'll see.

June 14, 2008 @ 4:14 AM PDT
Cateogory: Programming
Tags: Python, Rant

8 Comments

foo
Quoth foo on June 14, 2008 @ 6:59 AM PDT

I'm not sure what you're doing, but python --help and python --version works for me....

foo
Quoth foo on June 14, 2008 @ 6:59 AM PDT

Sorry, --help and --version.

foo
Quoth foo on June 14, 2008 @ 7:00 AM PDT

Well, that's weird, Wordpress converts two -'s into one -. Anyway, I meant to have two -'s before help and version.

Brian
Quoth Brian on June 14, 2008 @ 7:03 AM PDT

Yeah Wordpress sucks. Wrapping in pre tags works OK.

chester ~ $ python --help
Unknown option: --
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.
chester ~ $ python --version
Unknown option: --
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.
chester ~ $ python -V
Python 2.4.4
foo
Quoth foo on June 14, 2008 @ 9:39 AM PDT

Try updating ;p I'm using version 2.5.1. The newest version is 2.5.2, but I'm guessing it won't be backported to Gutsy.

Brian
Quoth Brian on June 14, 2008 @ 9:47 AM PDT

Hmm, OK. I use Gentoo and Python drives Portage so I'm unsure what's going to break. But I can install 2.4 and 2.5 in parallel, so I'll try.

Why did it take so long for those flags to be implemented, assuming it was changed as of version 2.5? (Rhetorical question)

foo
Quoth foo on June 14, 2008 @ 9:52 AM PDT

The rhetorical question mark clearly needs to be brought back into usage, for the internet: http://en.wikipedia.org/wiki/Question_mark#Rhetorical_question_mark ;/

Brian
Quoth Brian on June 14, 2008 @ 11:35 AM PDT

Yeah I think it might be hard to get new punctuation added to the English language at this point. Sadly.

Python 2.5.2 does indeed recognize --help and --version flags.

There, I fixed Wordpress to stop mangling my --'s.