Page 1 of 51 >> (less recent)
If you're writing code like this:
try:
foo = somevar.getBlah()["xyz"].split(".")[-1].decode("ascii", "replace")
except:
pass
Please stop! You're killing the rain forest!
Back in June I must have:
Anyhow, comments are working again.
In Miro, we've got long strings that are displayed in the user interface. I think the code that defines these strings is messy and hard to parse. For example:
def some_func():
description = _("""\
This is a really long description that has multiple sentences and a few \
things that need to %(getfilledin)s and it goes on and on and on and on \
and I'm not really sure what's the best way to format it so that it's happy \
in editors and easier to parse.""") % {"getfilledin": blahblah}
PEP-8 doesn't address this, which is fine. I was curious to see what other projects do.
The United States Post Office increases the cost of postage periodically. They do faster than I use the stamps that I've bought. In the process of this, I ended up with first class stamps that have no value listed on them, so I had no idea how much they were worth.
Buried on the USPS web-site is this quick service guide that lists the values of all stamps that have no value listed on them. Hooray for search engines!
I was at OSCON last week and met many people some of whom I've known for several years (Ted, Steve, ...). I also met a bunch of people who I've followed for many years and some people I've worked with when doing the Firefox 3 work I did. It was really exciting to be there. I didn't attend any keynotes or sessions, but the conversations I had were well worth trekking all the way to Portland, OR and back. I also got to spend a week with my sister who lives in Portland.
On the flight there and back, I worked on PyBlosxom. I mostly concentrated getting better acquainted with nose and using nose and coverage to help guide my testing efforts. The results were phenomenal. I increased the test count from 53 or so to 207, I increased coverage from some low number to 57% and I discovered and fixed a bunch of bugs. Because I switched to git over svn, I was able to commit locally and manage the work I was doing. All very exciting.
Miro is coming along very nicely. We took the plunge to ditch the previous frontend for a new one that has fewer layers of indirection. The results so far are encouraging--I think it was absolutely the right thing to do. Incidentally, I blogged about OSCON on my Miro devblog.
In the last few months, I've thrown together several web-sites using werkzeug, sqlalchemy, and mako. I really like this stack since it doesn't involve a lot of infrastructure and the number of files and "things" involved is pretty small. I think this is going to be my preferred stack for webapps going forward.
Just before OSCON, I signed up with identi.ca. It's my first micro-blogging account. Mostly I wanted to see what micro-blogging was like and follow other OSCON attendees. OSCON had a _lot_ of back-channel conversations going on.
Just before signing up for an identi.ca account, I met Jack, who lives around the corner from where I live. I wish I had made the effort to contact him years ago.
I think that's about it. It's been an interesting few months.
I'm heading to Portland, OR for OSCON 2008 to help man the Mozilla booth at the Expo. I registered as an Expo attendee, but I'll be there (or near there) from the 19th through the 26th.
My primary purpose there is as a representative for Miro and talking to people about it. However, I'm also interested in meeting up with people working on:
If you're interested, too, ping me. I'm hanging out on the #oscon
channel on irc.freenode.net and you can always get me by email or comments
below.
I volunteered at ROFLCon yesterday and today. The whole experience was really surreal but fantastic! I thoroughly enjoyed the sessions I attended while "on duty" and the new friends I made. I also came home with a sticker that says "Bacon is a vegetable". That sums that up.
A couple of days ago, I did a dist-upgrade on my server which runs Debian. I'm not sure what version I had prior to the upgrade, but after the upgrade I'm at 1.6.2. The problem is that the wiki syntax is different, so my wiki data was mildly hosed. I ended up spending 45 minutes to an hour trying to figure out how to migrate the data.
The magic script is /usr/share/python-support/python-moinmoin/MoinMoin/script/moin.py .
You need to run it like this:
$ ./moin.py --config-dir=/path/to/wikiconfig.py/dir/ migration data
The other problem I had is that I had no meta file in my data
directory and so the moin.py script would die with a stack
trace like this:
Traceback (most recent call last):
File "./moin.py", line 24, in ?
run()
File "./moin.py", line 15, in run
MoinScript().run(showtime=0)
File "./../../MoinMoin/script/__init__.py", line 138, in run
self.mainloop()
File "./../../MoinMoin/script/__init__.py", line 251, in mainloop
plugin_class(args[2:], self.options).run() # all starts again there
File "./../../MoinMoin/script/__init__.py", line 138, in run
self.mainloop()
File "./../../MoinMoin/script/migration/data.py", line 44, in mainloop
curr_rev = meta['data_format_revision']
File "./../../MoinMoin/wikiutil.py", line 472, in __getitem__
return dict.__getitem__(self, key)
KeyError: 'data_format_revision'
I assumed that I had some version of 1.5 previously and so I created a
meta file with this in it:
data_format_revision: 01050800
After doing that, the moin.py script worked nicely and all
my wiki data is in the correct syntax now.
Updated: 4/26/2008 - Fixed some grammar to make the meta file
creation step clearer.
I'm trying to get Ubuntu Hardy support for Miro. I installed Hardy Beta 1 in a virtual machine with VirtualBox. The install went fine. I had problems fixing the resolution, though.
Hardy starts off with an 800x600 resolution which is too small to run Miro. To fix it, you have to:
sudo displayconfig-gtk from a terminal
DON'T change the monitor AND the resolution of the screen at the same time. If you do that, you see no errors, no changes get made, and you'll spend a while scratching your head wondering what happened.
If all went well, you should see the resolution you were looking for.
Note that since Ubuntu Hardy is beta software, this could all change tomorrow.
Updated: 4/19/2008 - It looks like they took displayconfig-gtk out of the menus in the Hardy release candidate so I updated the instructions above.
Sold the first guitar I ever bought today. I'm a little bummed about it because of the sentimental value it had, but I have to get rid of things to balance out getting new things. I'm trying to use mark and sweep garbage collection on my stuff. The unfortunate part is that I'm a very very slow CPU and it takes ages to do a single pass.
Page 1 of 51 >> (less recent)
All contents Copyright 1996 to 2008 Will Guaraldi.
This work is licensed under a
Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.