« | » Main « | »

Coverage.py v3.5.2b1

Sunday 29 April 2012

I just posted Coverage.py v3.5.2 beta 1. This release of the foremost code coverage tool for Python includes a number of small fixes:

  • The HTML report has been slightly tweaked.
  • You can now provide custom CSS for the HTML report if you'd like to tweak it further.
  • Source files with encodings declared at the top are properly handled in the HTML report in Python 2. They had always been handled properly in Python 3.
  • Better error handling when a supposed Python file can't be parsed.
  • Better handling of exit status for the coverage command.
  • Better installation in PyPy.

The full details, including links to the tickets that were closed, are in the coverage.py beta change history.

Please give this a try, and let me know of any problems. Given the nature of the changes, I should be upgrading it to "released" within the week.

Two problems

Thursday 26 April 2012

Once upon a time, Jamie Zawinski said,

Some people, when confronted with a problem, think, "I know, I'll use regular expressions." Now they have two problems.

BTW: Jeffrey Friedl dug into the history and found that someone said it about awk before jwz said it about regular expressions!

I seem to have developed a fascination for new variants of this joke, especially where the concept being referenced is important to the structure of the joke. For example, last June I said,

Some people, when faced with a problem, think, "I know, I'll use binary." Now they have 10 problems.

The other day I contributed,

Some people, when confronted with a problem, think, "I know, I'll use threads," and then two they hav erpoblesms.

It seems that Eiríkr Åsheim earlier had a similar one,

Some people, when confronted with a problem, think "I know, I'll use multithreading". Nothhw tpe yawrve o oblems.

Making fun of Java is easy. Chris Lonnen said,

Some people see a problem and think "I know, I'll use Java!" Now they have a ProblemFactory.

Floating point can be surprising. Tom Scott quipped,

Some programmers, when confronted with a problem, think "I know, I'll use floating point arithmetic." Now they have 1.999999999997 problems.

Finally, this is not a technical joke, but is too true to leave out. Tom Dale said (and then deleted?),

Some people, wanting an escape from their full-time job, think "I know, I'll contribute to open source." Now they have two full-time jobs.

Brendan Berg has a list of others if you want more...

Python iteration presentation

Wednesday 25 April 2012

Last night I did a half-hour presentation about Python Iteration, starting with the basics, and touching on generators and why they are wonderful. This was part of a night of Foundational Topics at Boston Python.

I'm not sure I got the level of the material right, I think there were people there who wanted to learn more, but this went too fast, or over their heads. It's hard because there's no way to make it right for everyone.

Unicode tidbits

Tuesday 17 April 2012

Since writing Pragmatic Unicode, or, How do I stop the pain?, I've collected a handful of Unicode-related stuff:

  • Unicode 6.1 came out last year, Andrew West's summary of the latest additions is a view from the trenches. The commenters on his blog are asking about the status of their favorite exotic script, for example.
  • A PDF showing what is proposed to be added in Unicode 6.2. It's very clear that semantic distinctions are not important for new characters! Also, we finally get U+1F5D1, TRASH CAN!
  • Michael Kaplan has a series of blog posts, Every character has a story, exploring some of the back-stories of characters in Unicode. His musings on the three monkeys are especially erudite.
  • Matt Mayer has some interesting stories about Love Hotels and Unicode. I especially like the reasoning behind the "regional indicator symbols" A-Z, to avoid having to put flags in Unicode.
  • On the lighter side, the Fake Unicode Consortium presents more creative names for Unicode characters. Currently, you can't see the characters because of a Google+ redesign, but maybe soon... ☹
  • Finally, in 1889, when telegraph messages were paid for by the word, "Unicode" was the name for a dictionary of commonly-sent phrases mapped to obscure words so that instead of sending, "Jones dines with us this evening and remains the night - Smith," you could send, "Jones Coctivus Smith." It's of course no use to us now, but interesting to see how communications technology was accommodated. Also a bit shocking to see how maternity has changed: flip to page 11 to the section labelled "Births" to see the kinds of messages people needed to commonly send.

« | » Main « | »