Christian Kaula
Stuff made simple.

  • 3 Tips for Designing RESTful APIs

    Thursday, 17. December 2020

    There are countless books, websites and other resources that talk about how RESTful APIs should be designed. So naturally I have to add to the pile.

  • An Exercise in RESTful Thinking: Implementing a Search Endpoint

    Monday, 09. November 2020

    Our fancy new RESTful API does have a endpoint POST /searchPosts. Now we are sad as it means we aren’t really doing REST at all. Let’s see what we can do about that.

  • The Three Stages of a Programmer

    Saturday, 09. March 2019

    A pet theory of mine is, that there are three stages every programmer goes through throughout their career. Maybe they sound familiar to you.

  • How Programming Has Made Me a Better Person

    Saturday, 23. February 2019

    I guess there’s something to learn in anything. During the last few month I was thinking about what programming has taught me. When the notion of “it probably made me a better person” popped into my mind, I was pretty surprised, to say the least.

  • Musings on Object Oriented Programming: Asking the Right Questions

    Monday, 20. February 2017

    Here’s a thing I don’t like: People asking me stuff like Hey, do you have time on Saturday? while they want to ask Hey, I’m moving. Can you help me haul all my stuff up and down 22 floors on Saturday? I have no way knowing what they want until I gave an answer (or asked why?).

  • Software Development Is Always Test-Driven

    Thursday, 19. June 2014

    There seems to be a lot of discussion going on about TDD being dead these days. Here’s my two cents concerning the matter.

  • Rainerhaertl.de

    Thursday, 31. May 2012

    Update: Sadly Rainer, who I considered more than a client, died much too early on the 26th of October 2013. I know he will be missed.

  • RESTful Web Applications: Code Less, Do More

    Wednesday, 16. November 2011

    What does web development mean? Usually you build some software that gets data out of some database converts it to HTML and sends it to a browser. Usually that software has to handle the other case, too: Receive input from a browser, make sense of it and write the data into the database. There’s your average web project.

  • How to Handle Database Views in Django/South

    Monday, 14. November 2011

    In a recent Django project I had to work with Postgres views quite extensively. The problem is that while South does a great job handling model related stuff, you’re on your own when handling views and other database level stuff. So I thought I’d share the simple/simplistic solution I came up with.

  • The 80% Use Case

    Tuesday, 08. November 2011

    The other day I realized I carry my MacBook most of the time in my cheap carrying bag instead of my super sexy notebook bag. After I thought about it for a few minutes I had the solution: the 80% use case.

  • How to Come Up With a Good Product Idea (As a Coder)

    Tuesday, 18. October 2011

    Recently I submitted my post How to make a better analog watch to Hacker News. My idea was thwarted, of course (I got the feeling I didn’t describe the idea very well, though). But one comment really made me ponder how to break out of the this-is-the-way-it-is-done thinking.

  • Siri Is From the Future

    Thursday, 13. October 2011

    So you probably heard about the new iPhone by now. And perhaps you are one of the many people that said something along the lines “Meh, so it’s just the iPhone 4 with upgraded hardware and that gimmicky feature which allows you to talk to your phone.” You probably are failing to see the point because it’s too big.

  • How to Make a Better Analog Watch

    Saturday, 08. October 2011

    Have you ever thought about the difference of digital watches versus analog ones? I’ll tell you: Digital ones are better at their job and here’s why.

  • Where to Not Put Django Templates

    Saturday, 01. October 2011

    Here’s a hint for you: You are probably putting your Django template files in the wrong place.

  • Camila-overload.de

    Thursday, 08. September 2011

    Screenshot of http://camila-overload.de

  • Studi-tools.de

    Wednesday, 03. August 2011

    Update 2012-11-07: My uni decided to put the schedule and room information behind a login so I my scripts can no longer access those. As such the project is pretty much dead. This is especially sad since the tools the uni offers are - let’s say lacking.

  • REHAU Express Collection

    Saturday, 30. July 2011

    Screenshots of REHAU Express Collection

  • On CSS Structure

    Wednesday, 01. June 2011

    Because I have to do some collaborative work on CSS files (no Sass/Compass) these days I’d like to take the time and write down some pointers regarding CSS structure.

  • My Take on Indention

    Monday, 28. March 2011

    Many battles have been fought about how to indent. And finally it’s my time to beat you around the head with my opinion. Here we go.

  • Why Web Development Is Done in PHP or Java

    Wednesday, 16. March 2011

    These days I’m getting more and more frustrated by my fellow students. It seems everybody is trying to get through with as little work as possible and those who are at least motivated are very reluctant to learn any new languages/technologies.

  • Why My Mac Made My Sansa Clip+ Hang

    Wednesday, 23. June 2010

    Yeah well the other day I got me one of those shiny modern MP3 player thingies — namely a Sansa Clip+. Really nice gadget and all but whenever I copied some of my OGGs on it it would hang during the library update.

  • Python: Decorate a Method That Gets Passed the Class Instance

    Wednesday, 24. March 2010

    The other day I needed to decorate a method with a decorator class that knows about the owner of the method meaning the instance. This works as expected with function decorators:

  • Django Template Tag to Shorten URLs Like Google

    Friday, 12. March 2010

    Need to shorten your URLs like Google does? Something like http://example.com/some/really/long/path/ to http://example.com/…/path/? Here’s my simplistic approach:

  • Nice to Know About Virtualenvwrapper

    Friday, 13. November 2009

    Since I’m mostly working on various Django projects I am working with virtualenv/virtualenvwrapper a lot. It allows to encapsulate environments and keep them identical across all servers your app will run on.

  • A Howto on Django Syndication

    Tuesday, 22. September 2009

    Last week I had to implement a customized RSS feed in Django for the first time. Sounded like a fun project to me until I had a look at the documentation which is… well let’s just say it’s not as good as the core documentation.

  • The Difference Between Work and Play

    Friday, 18. September 2009

    The other day I was wondering what the difference is between work and the screwing around I do at home for fun. After putting quite some thought into it and coming up with the typical explanations like not getting paid, being able to choose what you want to do and stuff it struck me: There are no deadlines for stuff.

  • Nginx Is Even Better Than I Thought

    Wednesday, 09. September 2009

    So for quite a few months I was pretty sure having HTTPS on multiple domains with the same IP was a no-go on nginx. I was wrong.

  • Clear Up Gelato CMS' Gibberish

    Saturday, 05. September 2009

    My search for a nice and easy tumble blog I can host myself lead me in a pretty straight line to Gelato CMS. But when I looked into the database after I had been playing around with it a bit I saw that all umlauts (äöü for you non-umlaut knowing ignoramus people) turned to garbage.

  • Make Django Send Mails to Admins Only

    Wednesday, 19. August 2009

    Image you are running a staging system for your Django project on which all the testing for the production system is done. You are using a dump of the production database to have some actual data you can play around with. And you have this one/many function/s in which you send email to some/all users. They probably will not be happy to get all those emails from your staging system while not having the slightest idea what’s going on.

  • How to Fix Portage

    Friday, 14. August 2009

    And all of a sudden I got this on my Gentoo server no matter what I tried to emerge:

  • Archive Twitter Stuff With Python

    Thursday, 13. August 2009

    Just read this article which gives a description on how to archive Twitter stuff with Python. I saw the code and thought ‘heck why so complicated?’.

  • Wee Free Icons

    Tuesday, 11. August 2009

    I’m talking about the little images - not the star people everybody goes crazy about. Anyway, after having used the Silk Icons for what seems an eternity (they are good you know) it was time for something new.

  • The Problem With Django, Nginx and FCGI

    Friday, 07. August 2009

    Alright after about a whole day of near-continuous downtime I finally found the bug that I overcame few months ago already. I’m using nginx as proxy to Django per FCGI. Now after upgrading nginx the site started to misbehave. No matter which location I tried to access I always ended up on the index page.

  • Pink Ponies for Everybody!

    Tuesday, 21. July 2009

    These days I’m quite amused by all the rage about HTML5 and CSS3. Don’t get me wrong I absolute am for it. There are so many hacks and ‘techniques’ around to archive stuff that should just be in there that sometimes people seem to forget that it could be different.

  • Whoosh Makes the Haystack

    Monday, 20. July 2009

    In search of a workable search pluggable for Django I played a bit with Django Sphinx some time ago. Its potentially nice but involves a lot of work to configure Sphinx itself. So it was difficult enough to configure for me to drop it.

  • Selenium Is Pretty Neat

    Friday, 17. July 2009

    I’ve been playing with Selenium at work for some time now and the more I saw of it the testing framework the more I was impressed.

  • OpenID for Free

    Tuesday, 14. July 2009

    After I see more and more sites offering OpenID authentication and more and more people using it I finally got interested enough to see for myself what it all is about. I didn’t do so earlier because I just am getting a little paranoid and OpenID just seemed to me like giving some big, faceless company access to virtually anything I do on the web. Turns out that is not the case.

  • Multi-Object-Edit With Django FormSets

    Thursday, 09. July 2009

    I had to write a multi-object edit table the other day for a Django project and as such I dove into the FormSet Documentation. Django’s documentation is really good usually but the part abut the FormSets was a bit of a letdown.

  • CSS Is the New C - Sass Is the Future

    Wednesday, 08. July 2009

    So the other day I started to look for tools that let me use variables in CSS. This mainly was because it really gets old to copy paste the same colors over and over again. Thanks to Twitter soon I was pointed in the direction of LESS.

  • Where Asimov Was Right

    Monday, 06. July 2009

    Have you ever read The Last Question by Isaac Asimov? If not please do because I think Asimov is describing the not so far-off future there.

  • The Webdesigners Arch Fiend: IE6

    Friday, 03. July 2009

    I just read this article: http://www.usabilitypost.com/2008/09/05/drop-ie6-support-give-people-a-reason-to-upgrade/.

  • Die Cache, Die

    Thursday, 02. July 2009

    If you ever need to remove a cache fragment that has been created by the cache template tag do like so:

  • What if Twitter Stopped to Be Tomorrow?

    Wednesday, 01. July 2009

    So a combination of two Tweets made me go to thinking mode the other day. The first one asked: “What would you do/think if Twitter didn’t exist tomorrow?” And the second one: “I’ll leave Twitter in the coming weeks - 140 characters aren’t enough.”

  • Django Performance Tuning - Speed Up!

    Tuesday, 30. June 2009

    So these days I spend a lot of my workday trying to get a Django app up to speed that… wasn’t exactly written with performance in mind. Here are a few things that helped me speed up that thing (all without going down to SQL level):

  • Django Members That Are in Fact Raw SQL

    Monday, 29. June 2009

    So the other day I wondered if it wasn’t pretty cool if Django models would have something like members that are in fact raw queries. On the bus home it occurred to me that this functionality already exists. Just add a custom manager to a model which always returns querysets with extras.

  • What to Do if You Have to 'Make All Strings Editable'

    Thursday, 25. June 2009

    Well that’s what I was told the other day. So I came up with the proposal to misuse django-better-chunks as a makeshift database based i18n system. But since I made quite a few changes to the code and wrote some utility functionality I thought ‘heck somebody might need just this’.

  • With Django Debug Toolbar You Can Debug Django… Duh

    Friday, 19. June 2009

    So since right now I’m playing the performance optimizer again I searched for a nice profiling/debugging tool for Django. Loads of snippets I found, loads of middleware, loads of scripts and stuff. And then a colleague of mine said “you know I always used something called Django debug toolbar or something”. I’m like “alright let’s google for it and see if it’s any good”.

  • Macs Are Like Tools

    Thursday, 11. June 2009

    So I will say this and then I’ll be out of the whole Mac/PC flamewar again.

  • Why I Barely Ever Read Comments

    Monday, 08. June 2009

    Alright, after some out-time mainly due to work-overload in the last few weeks (and the general laziness of my person) let’s see what we can do.

  • Bash and the Secret of the Lost Folders

    Wednesday, 13. May 2009

    This bit me majorly yesterday. Nobody tells Bash when the current folder is renamed.

  • Python - Strings Very Much Attached

    Friday, 08. May 2009

    Now this is what you do all the time to strings in Python:

  • Fun With Forms in Django

    Thursday, 07. May 2009

    Now here I got another pearl. It bugged me to no end that one cannot have a ModelForm and override only certain attributes of a certain field without having to overwrite the whole field with all of its default attributes. Well, seems that is actually possible, like so:

  • Subversion: Ignore More

    Wednesday, 06. May 2009

    Just a little reminder for myself, since I never am able to recall how to ignore stuff in Subversion:

  • It's Time for Python Dateutils

    Tuesday, 05. May 2009

    Since I often have to do with date and time arithmetic, Python dateutil seems quite interesting. Loads of additional features concerning date and time stuff. I have play a bit with it sometime.

  • That Is Why Developers Aren't Called Testers

    Monday, 04. May 2009

    One idea that I encountered and that I just didn’t like right from the start is this one:

  • Html Validator - Valid HTML - Profit

    Friday, 01. May 2009

    If you are into web development you probably have to code some HTML from time to time if not constantly. And if you are anything like me you always try to get your HTML as valid as possible (I mean, come on - there are cases when you just say ‘screw it’). So while the W3 Markup Validation Service is nice and stuff, its not really what you call convenient.

  • More Fun With Tracebacks

    Thursday, 30. April 2009

    Okay if you - unlike me - did actually read the documentation of the Python traceback module you probably know that what I wrote here can be archived much easier if you just do this:

  • Django Can Be Too Convenient

    Wednesday, 29. April 2009

    Django is nice, I think I have made my point clear on that. As a framework it lets you some truly short code that does quite a lot. It’s convenient. But you should be careful to not let yourself fall into the trap of convenience. Here’s an example of what I mean:

  • Get Windows for Free (For Internet Explorer Testing on Mac)

    Monday, 27. April 2009

    Alright so you’re one of those web developer/web designer guys, too? And you’re on a Mac and still need to test those websites on the loathed abomination known as Internet Explorer? If you don’t want to shell out any money to be able to do what you probably hate here’s a quick guide:

  • Fun With Python Stracktraces

    Thursday, 23. April 2009

    Today while happily hacking away at my Python code I found myself in the following situation: I needed the traceback of an exception while not wanting the whole app to exit because of the exception being raised.

  • So Sweet the Crons - Sweetcron

    Wednesday, 22. April 2009

    If you are one of those people that totally are into life feeds/streams of… well anything then you will perhaps be interested in Sweetcron. It’s one of those hip lifestream tools - but if you’re a bit paranoid about your personal data (like me) than you probably would rather host something like that yourself.

  • News From the South

    Tuesday, 21. April 2009

    Okay this is exciting news. My favorite Django migration tool South has received a major update. I just stumbled over some changes to the documentation when I browsing the site the other day.

  • VoodooPad - Its a Wiki on Your Desktop

    Monday, 20. April 2009

    So the other day I bought VoodooPad. Yes I actually paid money for it. If you knew me you would know that means something.

  • Take a Note on the Side With Sidenote

    Friday, 17. April 2009

    So you’re coding for a living and every few minutes there is this snippet of code you would like to keep around just in case but don’t know where to put it? Or perhaps you’re one of these people that have great ideas constantly but just never got a piece of paper?

  • Piwik Even Sounds Cooler Than Google Analytics

    Thursday, 16. April 2009

    For all of you who like me are getting a bit paranoid about Google these days and still would like to have the nice stuff that a tracker like that provides I got one nice tool for you: Piwik. This thingie tries to be the free, open source Google Analytics (they actually say that) and it actually comes pretty close for its price.

  • Pixen, Pixel… Editor

    Wednesday, 15. April 2009

    Okay I couldn’t come up with a witty title this time - sue me. But nevertheless I have a real treat for you today. Sure we all use Photoshop and there surly isn’t anything that can compare. Yeah, yeah we know that. But what about those times you fire up the big beast that Photoshop is just to edit some tiny little graphic or need to come up with a simple icon?

  • Suspicious SuspiciousOperation Exceptions

    Thursday, 09. April 2009

    Using Apache and Django is throwing SuspiciousOperation Exception in your face and you have no idea why? Chances are you are using absolute paths. Django doesn’t like that. It expects you to be a good boy/girl and put all your stuff under MEDIA_ROOT with relative paths. Everything else is perceived as suspicious behavior it seems.

  • Compress This Mess

    Wednesday, 25. March 2009

    I think my new favorite Django-pluggable is django-compress. Since I still haven’t figured out how to install the YUI Compressor globally, I now can leave it all to the Django-app.

  • Ack, Knowledged

    Monday, 23. March 2009

    Really nice and handy tool: ack Bundle. It’s about a bangzillion times faster than the ordinary ‘Search in Project’ thing of Textmate. That probably doesn’t make it the optimal tool for your daily office work.

  • Plug in TextMate

    Sunday, 22. March 2009

    Funny that I didn’t know until a short while ago that my favorite text editor TextMate supports plug-ins. Even funnier: With ProjectPlus the lighty light TextMate almost becomes a mini IDE.

  • Put Into Grand Perspective

    Saturday, 14. March 2009

    I’ve been searching for a Mac app that allows me to see where all my precious hard drive space has gone. There is quite a nice little app called SequoiaView which is really good at that task — sadly it’s not available for my beloved Mac.

  • Sub Fine Mecum Nemo Non Consentiet

    Wednesday, 11. March 2009

    I find it interesting that everybody that had the chance (was forced) to work on a Mac for a period of time buys one sooner or later. Most probably do cause these thingies are really good lookin’ - I’m not deluding myself there. But I also think that once used to Mac OS nobody really wants to go back to Windows that soon.

  • You Don't Print the Web Do You?

    Friday, 27. February 2009

    Somehow I find it funny that so many web designers and agencies advertise their services with ‘pixel perfectness’. That probably would mean the site looks like the Photoshop template - down to the pixel. Just like with print stuff where you define positions with a precision of three positions after decimal point and it will look exactly like that when it’s done.

  • What the Heck Is a KeePass?

    Friday, 20. February 2009

    Sometimes I don’t get people: “Oh heck what was my ICQ again? Could you give it to me?” Or how about “Oh… what was my login and pass for my web space again?”

  • I'm Too Cheap for .Mac

    Friday, 20. February 2009

    Got multiple Macs and don’t feel the need to spend money on .Mac? Unison to the rescue! This little tool lets you synchronize directory trees and acts like its some kind of simple CVS, meaning it detects conflicts (for example when a file has been changed on multiple Macs) and lets you resolve them.

  • Going South

    Tuesday, 10. February 2009

    Okay so after taking a few hours to find out how to get a unique SlugField into the database per South here’s what I found out:

  • Database Switcheroo

    Tuesday, 06. January 2009

    Switching the database is quite fun with Django. In my case I’m slowly migrating my sites from MySQL to Postgres.

  • Django? Isn't That Something Like Rails?

    Sunday, 07. December 2008

    Rails is great. At least better than anything I know that is done with PHP. PHP is really some nasty stuff. Seems like more and more people realize that and jump on the Ruby on Rails band wagon. Well since everybody else says its that great it has to be, no?

Christian Kaula Stuff made simple.

ck@10tok.net
Bernardstrasse 93
63067 Offenbach am Main
Germany