Archive for the 'Django' Category

Alternate syntax for Django urlpatterns

Sunday, December 3rd, 2006

Django’s urlpatterns variable has traditionally expected callbacks to be specified as strings, and extra arguments (commonly used with generic views) to be passed as a separate dict, for example:


  info_dict = {
    ‘queryset’: Entry.objects.all(),
    ‘date_field’: ‘pub_date’,
  }

  urlpatterns = patterns(‘django.views.generic.date_based’,
    (r‘^(?P<year>\d{4})/$’,   ‘archive_year’,   info_dict),
  )
 

(more…)

Speaking in code

Tuesday, November 28th, 2006

Once upon a time there was a guy called Donald Knuth. Besides being the author of our discipline’s most prominent work, the Art of Computer Programming, he also invented Literate Programming, of which he says:

I believe that the time is ripe for significantly better documentation of programs, and that we can best achieve this by considering programs to be works of literature. Hence, my title: “Literate Programming.”

Let us change our traditional attitude to the construction of programs: Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do.

The practitioner of literate programming can be regarded as an essayist, whose main concern is with exposition and excellence of style. Such an author, with thesaurus in hand, chooses the names of variables carefully and explains what each variable means. He or she strives for a program that is comprehensible because its concepts have been introduced in an order that is best for human understanding, using a mixture of formal and informal methods that reinforce each other.

(more…)

EuroPython 2006 post-mortem

Saturday, July 15th, 2006

This was ours (Exoweb’s) first EuroPython, and our first to CERN and Geneva as well.

Geneva and CERN were wonderful. Geneva was charming and beautiful, CERN and its projects were mindblowing. A picture is worth a thousand words, so see the photo album of the Geneva and CERN visit. There’s also flickr photo pool for EuroPython 2006.

Between sampling a meter of beer we managed to go to many interesting talks and meet many like-minded people. It seems companies are often struggling with the same issues, one recurring one is how to organize and manage a distributed software development company practicing agile methodologies. Both the Programmers of Vilnius and Canonical held talks about this.

I also participated in the first day of the PyPI Sprint with Richard and Johannes. The Python Package Index—PyPI, also known as the Cheese Shop—is a very important project with a lot of potential. A comprehensive, well organized, easy-to-use package library is essential for Python’s future. The Cheese Shop and Python Eggs should be what CPAN is to Perl, and Ruby Gems is to Ruby. More on this later.

Richard’s been working hard at it, but he needs more help, so if you’ve got free time, please contact him. PyPI is implemented in a minimal home-grown Python framework using ZPT/ TAL/ TALES. It’s okay, but it would’ve been nicer in Django :)

Exoweb at EuroPython 2006

Saturday, July 1st, 2006

Although it’s relaxing and nice to visit relatives in Norway, I’m starting to look forward to EuroPython 2006 next week in Geneva, Switzerland.

Exoweb is going with three people: Ken Wong, Gzregorz Jakacki, and me.

Are you going as well? Drop us a line. Would be fun to meet up and chat, especially if it’s about Python, Django, Dojo, or Postgres. :)

Vrooooom…

Saturday, March 11th, 2006

Or as programmers like to say: Hello World! After spending so much time investigating the blog engines out there I thought a “vrooom” might be a better title for this, the start-up post.

Although my favorite technical environment would be Django and Python, and Socialist Software has made a decent implementation of the WordPress K2 theme using Django, I still opted for a real WordPress installation so I can get used the the full power of a mature blog software. At least this way, when the itch of not running on Django gets too noticable, I know how to scratch it ;)

I plan to write on subjects that matter to me at any given time, syndicating the whole or parts of the site (using tags) to other places. This include:

  • General business, management, agile software development, and human resources issues relating to Exoweb, the outsourced software research & development firm I founded and am still working in. This will be syndicated to the Exoweb planet site when it is ready.
  • Technology issues, generally open source, and mostly relating to web application development using Ajax, Django, Python, or Ruby on Rails. A post or two on Mac or Linux might sneak in as well, as I’m quite fond of the Unix family of operating systems. These posts may be syndicated to other technology sites once I figure out which ones and how to do it.
  • Impressions on the incredible place I live in–Beijing, China–or memories of the even stranger place I come from–Havøysund, Norway. It’d be nice if there were some RSS aggregators for these communities.
  • Ideas on personal development and lifehacking. I’m blessed with good sense of logic, but cursed with bad long-term memory. Without systems I just can’t deal with all the stuff thrown at me.
  • Personal experiences that I want to share with friends and family. Pictures will be posted to my beorn flickr account.

Don’t hesitate to get back to me with comments. I expect the more feedback I get, the more I’ll write. We humans are funny that way.

Thanks for reading! This blog is on the roll…!


tracker