Monday 17th October, 2011
10:00am to 10:45am
Just because you can doesn't mean you should. Python provides facilities like __metaclass__, __getattr__, __call__, and others which allow programmers to do a lot of clever stuff. This magical code is fun to write, concise, and can be quite elegant. However, too much magic is dangerous, particularly in library code. You may think your code is clever and fun, but your colleague trying to maintain it or re-use it in another project later will probably be confused and annoyed by much thought is needed to understand what the heck your fancy code is doing. We will discuss finding the balance between fun magic and boring but clear with some examples of questionable magic we've encountered in Spotify's Python corpus.
Sign in to add slides, notes or videos to this session