Polish words of the day

Posted by – November 19, 2011

A few months ago I started taking Polish language classes at Polword near Oxford Circus in central London. It has since become my favorite weekly activity. The school is conveniently located and is staffed by lovely native Polish speakers who can teach well.

Even though I only have class once a week, I know that I won’t ever learn the language if I don’t practice every day. To help enrich my vocabulary, I’ve created a spreadsheet on Google Docs that has my Polish words of the day (polskie słowa dnia Ryana). Every day I will add a new noun (rzeczownik), adjective (przymiotnik), and verb (czasownik) to the list.

I find daily doses of information coupled with weekly reviews to be good for long term retention. I used this same method when learning the basic key sequences for emacs commands and it definitely helps.

Today’s words, the first on the list so far, are:

  1. grzyb (m) – mushroom
  2. głośny – loud, noisy
  3. pilnować (aspekt dokonany: dopilnować) – to look after, watch, guard (among other meanings)

grzyb (m) - mushroom

If you are also a Polish language student and would like edit permissions, please let me know.

Don’t use string literals for sender values in Django’s signal dispatcher

Posted by – August 8, 2011

TL; DR Don’t use a string literal as the value of the sender attribute when defining your own Django signals.

I got bit by a nasty bug today using Django’s signal framework. I used the signal like so:

show_user_widget_responses = show_user_widget.send(
    sender='my_widget_view',
    user=user
)

I ran the tests to make sure the signal was being sent to the listeners (i.e receivers) and they all passed. I then noticed the view sent another signal in certain conditions and its sender was a set to a different string. For the sake of consistency, I changed the above signal’s sender string to “widget-user-view” and went to make a cup of tea.

When I returned to my desk, I got a bit distracted and continued to work on the feature. I ran the app’s tests and they started failing: the test listeners weren’t being called. Oops.

More