Three years ago, I started a series of long posts called "PyQt by Example". It reached five posts
before I abandoned for a series of reasons that don't matter anymore. That series is coming back
starting next week, rewritten, improved and extended.
It will do so in a new site, and the "old" posts will be retired to an archive page. Why? Well,
the technologies used in some of them are obsolete or don't quite work nowadays. So, the new
versions will be the preferred ones.
And while I am not promising anything, I have enough written to make this something quite longer,
more nicely layouted, more interesting and make it cover more ground. BUT, while doing some
checks on the traffic statistics for the old posts, some things popped out.
This was very popular
About 60% of my site's traffic goes to those five posts. Out of about 1200 posts over
12 years, 60% of the viewers go to the 0.4% of the pages. That is a lot.
It's a long tail
The traffic has not decreased in three years. If anything, it has increased
So, all this means there is a desire for PyQt documentation that is not satisfied. I am not
surprised: PyQt is great, and the recommended book is not free, so there is bound to be a lot
of demand.
And, here's the not-so-rosy bit: I had unobtrusive, relevant, out-of-the-way-but-visible ads
in those pages for more than two years. Of the 70000 unique visitors, not even one clicked on
an ad. Don't worry, I was not expecting to get money out of them (although I would love to
some day collect a $100 check instead of having google hold my money for me ad eternum).
But really? Not even one ad click? In more than two years, thousands of people? I have to
wonder if I just attract cheap people ;-)
This friday marks the beginning of the 2012 PyCamp. What's PyCamp? It's a lot of
python programmers (this year, about 50) gathering in an isolated place for a long weekend, with nothing
to do except code. We will have our meals catered, there are no TVs, there is
hardly anything within walking distance, and it's going to be very cold.
So, it's going to be awesome. It's a rare chance for me to spend a few
days hacking at my own personal projects, uninterrupted by more important
things like family, work, cooking, or socializing except between nerds.
Sure, there is the occasional monocycle riding, or juggling lesson, or
shooting practice, but really, three or four solid days of hacking.
I intend to work on projects related to Nikola
my static site generator, so if you are interested in that and going to pycamp,
I want to talk with you.
And if you are interested but not going to pycamp, there is no reason
not to join in a virtual sprint. We'll have internet. There is IRC. I will
have time. It's a weekend! Please share any interesting ideas you have
about static site generators in the nikola-discuss group
and we'll see how much can get implemented or at least started.
One of the most important things when you are building a static site
generator like Nikola is that your
site should not be broken. So, I really should have done this earlier ;-)
This is a very simple link checker that ensures the pages Nikola generates
have no broken links. I will make it part of Nikola proper once it's more
polished and doit supports getting a list of targets
To try it, get it and run it from the same place where you
have your conf.py, right after you run doit.
importosimporturllibfromurlparseimporturlparseimportlxml.htmldefanalyze(filename):try:# Use LXML to parse the HTMLd=lxml.html.fromstring(open(filename).read())forlind.iterlinks():# Get the target linktarget=l[0].attrib[l[1]]iftarget=="#":# These are always validcontinueparsed=urlparse(target)# We only handle relative links.# TODO: check if the URL points to inside the generated# site and check it anywayifparsed.scheme:continue# Ignore the fragment, since the link will still work# TODO: check that the fragment is validifparsed.fragment:target=target.split('#')[0]# Calculate what file or folder this points totarget_filename=os.path.abspath(os.path.join(os.path.dirname(filename),urllib.unquote(target)))# Check if it exists, or report itifnotos.path.exists(target_filename):print"In %s broken link: "%filename,targetexceptExceptionasexc:# Something bad happened, reportprint"Error with:",filename,exc# This is hackish: we use doit to get a list of all# generated files. Minor modifications would let you check# the non-generated files as well.fortaskinos.popen('doit list --all','r').readlines():task=task.strip()iftask.split(':')[0]in('render_tags','render_archive','render_galleries','render_indexes','render_pages','render_site')and'.html'intask:# It looks like a generated HTML fileanalyze(task.split(":")[-1])
When I grow up, I want a pink car. Girls like pink.
—Tato (my son, age 4 at the time)
There has been a lot of talk lately about codes of conduct in conferences. I don't have
answers to much, but I do have a lot of questions in my head, and some things seem
to come to my mind because of that, so I will do a little head dumping, and let's see
if clarity appears.
So. The main thing seems to be that the proposed codes of conduct aim at making
events inclusive, and more diverse, and welcoming to people who may have felt
unwelcome in the past. That these groups involve women should be a call of
attention. Women? Women are half the world, and apparently we have been
excluding them, whether intentionally or not.
So, in principle, if adopting a code of conduct helps that, I am all for it. Same
about gays, lesbians, transexuals, etc. They are not 50% of the world, but they are
about 10% of it, so it's a very large amount of people, and adding them to our
groups is another easy optimization.
However, it concerns me a bit that these codes of conduct contain language like this:
Harassment includes offensive verbal comments related to gender, sexual
orientation, disability, physical appearance, body size, race, religion,
sexual images in public spaces, deliberate intimidation, stalking,
following, unauthorized or inappropriate photography or recording, sustained
disruption of talks or other events, inappropriate physical contact, and
unwelcome sexual attention.
Some are completely obvious, people who disrupt the speakers at conferences are
to be thrown out, intimidation is abominable, stalking is creepy, etc. But
"offensive verbal comments related to [everything]"?
And here, I have to make a small detour and talk about street signs. When I
visited London, one thing that called my attention was the language in street
signs. Here's an example:
So, why do they have signs like this? It's probably because they are very
polite people. Also, it may be because offensive signs are punishable by jail.
I have a completely unfounded suspicion that the politeness came first, and then
came the right not to be offended, which ended encoded into law, and now you
just have to be polite, or else.
I am quite loudly atheist, yet I only mention it outside this blog if someone
mentions his religion. So, for example, if someone says "god asks less and yet
he forgives", I may say "that's because he doesn't exist", as a joke. I am
now assuming that saying that in a conference with that kind of code of conduct
is going to be considered offensive behaviour. And let's say I am ok with that,
I can still go for a few hours without offending people. Have not tried it
lately, but I am sure I can do it.
And I know that at a private event, like a conference, there is no inherent
freedom of speech, because there is the right of admission, and I can just
be kicked out without any explanation, and I am also fine with that, because
I reserve the right to kick people out of my own home, too.
So, sure, let's keep religion out of it. It has no place in a technical
conference one way or another, and in any case, I will wear my invisible
pink unicorn shirt as an outward sign of my atheism (it looks just like a
gray v-neck t-shirt).
And I am totally fine about not mocking or harassing people because of their
gender or sexual preferences. I am old and provincial enough that when two
men start kissing next to me, I feel awkward. Luckily, I am enough of an
adult that I just think to myself, "dude, you are a provincial prude" and
look the other way. After all, I have seen people take exception to me
kissing my wife in public, so, live and let live, whatever. I like
women, my wife likes men, so I can understand you liking either.
On the other hand, I understand that the mere existence and presence of
some people can be offensive to others. I know people who would rather
stand for 2 hours than sit next to a transexual. Or would rather get off
the bus instead of being there. And I am enough of an old, provincial
prude that I understand them. So, offending is not the thing here, because
if offending is the thing, then the mere presence of someone can offend
others, and that's the exact opposite of what we want. We want them
to either not be offended, or be offended and get over it, or be offended
and not care.
So, handing out invitations to threesomes to people in hallways is a bit
too much (I never invite people to threesomes before the fourth date, it
is gauche). Hitting on people in bars at night is probably not too bad,
unless it's a constant thing that ruins the night for someone (what do
I know, I have never hit on someone or been hit on in a bar. Except by
other men. Just my luck!) in which case I expect a group of nice people
to form a protective ring around the poor person who is just too
attractive? (again, what do I know, I have never been atractive).
The thing we want is politeness. We want to be nice to each other. We
want everyone to be as nice as they possibly can to as many people as
they can. Specially, we want everyone to be extremely nice to the people
they like the least. Because with people you get along with, you can
do crazy stuff you can't do with others.
On the other hand, I suspect there is something else here I am missing.
Because tolerance and respect is just not my thing. I am all for
proselitizing and disrespect, for creative annoyance and pushing
people outside their comfort zones. But I try not to do it personally,
I try to throw things to the crowd and see what they do with them.
I mean, I have been photographed without my consent. I have even had
my shirt scanned without asking permission (ok, I admit having a QR
code in a shirt is sort of an implicit agreement), I have been called
names, but I know that, in the words of a scifi writer, I live life
in the low difficulty setting, because I am a rather healthy white
heterosexual male born in middle class with a job, so again, I don't
quite know what it's like to be insanely attractive, or gay, or
insanely attractive to gays, or anything. I am not harassable. My face
protects me. I know others don't have such powerful defenses.
So, while that kind of language does fill me with trepidation, and makes
me wonder what kind of community I have been living in, oblivious to
all these things I read about lately, I will accept those codes and
try to follow them. I have never intentionally broken them, even
before they existed (I did once take an inappropriate picture,
it was a joke, I only showed it to one person, and I deleted it, and
I really am sorry and would not do it again, ok?)
So, I hope to see a lot of people I don't know in the next free
software events I attend. Hopefully I will not offend any of them
in a bad way. I will not be too brash. I will try to be inclusive.
I will try to be nice. But remember. If I am very, very nice to
you, it may be because I can't stand you. You're welcome.