Jan Lehnhardt keynote: simplicityΒΆ

Tags: django, djangocon

A quote that’s in every second keynote or so: simplicity is not when there’s nothing left to add, but when there’s nothing left to take away.

Steve Jobs: design is how it works. In that sense we’re all designers.

In the end everything is subdivided in layers. Jan is going to take on a couple of them.

Text: the code you write. A kid has an attention span of about 2 pages of code. Your mum or dad about 6. The average number of bugs per 1000 lines of code is some 10-25. Irregardless of programming language. So: write less code, you’ll have less bugs.

Jan’s involved with mustache, a template language. They figured out that leaving features out made the template language actually better. When Jan tried porting the template language from ruby to javascript, he was pleasantly surprised that the code was just three or four pages long, so he was able to port it in a weekend or so. The current ruby version is much faster and more optimized, but the amount of code has skyrocketed. Jan looked at it and decided he could never port that version.

Algorithms. His javascript version was slow. In the end he sped it up a lot by removing one expensive method. The fastest code is the code you don’t write.

Architecture. Yesterday there was a presentation on NoSQL and how to support it in Django. Someone suggested to add an extra layer to abstract away the differences. That was quickly shot down: we don’t want too much.

Data. He’s mostly skipping this.

UI. Less is more. Less means that it is easier to figure out what to do.

UX (user experience). Make your users smile.

Delete all the crappy code you ever wrote. Keep the simple parts. Clean up your code.

Alan Kay quote: [for] any product: simple things should be easy, and hard things should be possible. Sometimes complexity is needed. Where do you put it? Django’s ORM is probably pretty complex. A show of hands: 3 attendants actually work on the ORM. The rest treats it as a black box. It is perhaps fine if there’s complexity inside something others can treat as a black box, assuming that’s the correct place to place the complexity.

On twitter, @jacobian said I’m pleased to hear @janl talk about the inherent tension in Django’s “perfectionists with deadlines” slogan. Too true.

Make the future simple.

Berlin S-bahn
blog comments powered by Disqus
 
vanrees.org logo

About me

My name is Reinout van Rees and I work a lot with Python (programming language) and Django (website framework). I live in The Netherlands and I'm happily married to Annie van Rees-Kooiman.

Weblog feeds

Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):