Python can be my friend again

by havoc

I made my program work, and have to admit that it would have taken a
lot longer in any other language (due to either intrinsic or
logistical issues with said languages). Though I am still grumpy about codeset
conversion:

>>> f = open("/tmp/foo1", "w")
>>> fb = open("/tmp/foo2", "wb")
>>> s = u'\N{ARABIC LETTER KHAH}'
>>> f.write(s)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
UnicodeEncodeError: 'ascii' codec can't encode character u'\u062e' in position 0: ordinal not in range(128)
>>> fb.write(s)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
UnicodeEncodeError: 'ascii' codec can't encode character u'\u062e' in position 0: ordinal not in range(128)

On another note, interesting to read Nat’s post
on software design. Basically the same contrast drawn in The Inmates
are Running the Asylum, between design-driven and feature-driven
development.

The complexity that comes in is that feature-driven development exists
for real reasons. Two big ones are that people use feature
matrixes to decide what to buy, and customers (and users) really do
get angry in the face of regressions and changes, even small ones.

Balancing this properly is very, very hard. You could explain the
history of GNOME (and probably many other projects) in terms of
trying to get the balance right.

(This post was originally found at http://log.ometer.com/2004-10.html#31)

My Twitter account is @havocp.
Interested in becoming a better software developer? Sign up for my email list and I'll let you know when I write something new.
Name
Email *