A notch above a monkey

Impostor for Django

A class of bugs I really dislike debugging are those that depend on specific data and affect only a very small subset or just one user. Things could sometimes be fixed so much faster if you could just log in as him to see what is happening. Sometimes this is exactly what we do with his explicit permission , but I really dislike asking for passwords.

First it inconveniences user. He has to come up with either a new good password or go through two password changes. Second it implicitly teaches wrong behavior. Passwords simply should never be revealed.

That is why I wrote Impostor , a Django app that allows staff members (and only them) to login with their own credentials as a different user. Idea is not mine (kudos goes to Ned Batchelder ), but I like it. To discourage abuse every such authentication is recorded and can be seen in Django admin interface, but can not be altered from there.

So how does it work in practice?

Lets say that I would need to log in as user fry . To do this I would enter as my username markos as fry, provide my password and voila, I’m him. This has been recorded so anyone with access to ImpostorLog part in admin can see all such cases, mine included.

Impostor may also ease your development by removing need to remember different passwords for testing. This is usually not a problem unless you happen to develop with fake data but real accounts. Like me.

And again for morally challenged out there: you should never login as somebody else without his explicit permission .

Update : Thanks Ross for reminding me where idea came from. I updated text accordingly.

Books I read in 2010

This is why you should never promise a delivery date. Days promised in my previous post stretched to few weeks because of unexpected work. ?Still, here it is, a list of books I read last year together with my thoughts on them. Since this is the second time I am doing this, I can say it is an annual event that you can, but won’t, look forward to.

I was wrong thinking my plan was to read 30 books. I actually planned to read 25 and while I did this, it is obvious I haven’t actually met my goal. I expected a low count on account of thick books I planned to read and yet a cursory glance over my list shows that A LOT of them were very short (which mind you doesn’t mean short on value).

Like last year I linked every book I liked and bolded those I heartily recommend. Alas bold is nowhere to be seen. Changing typeface of my blog robbed me of its bold font (for now). So do buy The Suspicions of Mr. Whicher, The Crusades through Arab Eyes, The Absence of War, Too Loud a Solitude and The Pursuit of Glory . Your soul will thank you for this.

Last year’s disclaimer is also still valid. Most links point to Amazon and include my affiliate ID meaning if you buy them after following these links, I get few cents that might eventually lead to purchase of another book.

  1. Coders At Work by Peter Seibel. Fascinating look into titans of programming, but you probably have to be a programmer to enjoy reading it.
  2. The Suspicions of Mr. Whicher by Kate Summerscale . Amazing book. An intriguing never solved crime gets well researched to the point where it can present a plausible explanation of what happened. Also well written, so it’s hard to imagine being bored.
  3. A Smile in the Mind by Beryl McAlhone, David Stuart. A compendium of different ways in which design can delight us. It’s a topic that can’t be distilled in a how-to, but it does come close.
  4. Fixed to Flexible: Four Simple Lessons about Cost, Price, Margin and The Options Available to The 21st Century Business by Todd Sattersten. An ebook I forgotten and hence can’t judge.
  5. Rocket Surgery Made Easy: The Do-It-Yourself Guide to Finding and Fixing Usability Problems by Steve Krug. His first book is legendary. Second probably won’t be, but it’s still a very good (and quick) read if you want to learn effective usability testing on cheap.
  6. Designing books: practice and theory by Jost Hochuli, Robin Kinross. A book about book design from a long time practitioner. Great read for us who are into that sort of thing and don’t disdain swiss design, but it’s likely boring to everyone else.
  7. Handcrafted CSS: More Bulletproof Web Design by Dan Cederholm. Dan shows how you can use CSS3 today to progressively improve pages. Not quite the same approach as Andy Clarke’s (missing because I read it this year), but they both persuasively teach you to do more today.
  8. The Crusades through Arab Eyes by Amin Maalouf . Title really says all. I started reading this one together with comprehensive tome from western PoV (which I plan to finish in 2011). I can recommend it even to those, who don’t have a particular interest in crusades.
  9. The Art of Capacity Planning: Scaling Web Resources by John Allspaw. A great first step into domain of capacity planning. Get it even if you only suspect you might need this knowledge.
  10. Arcadia by Tom Stoppard . This and next 4 plays were actually in one book and I’ve seen a few of them on stage. Loved every one of them, each of them being a delight for mind.
  11. The Right Thing by Tom Stoppard
  12. Night & Day by Tom Stoppard
  13. Indian Ink by Tom Stoppard
  14. Hapgood by Tom Stoppard
  15. High Performance Javascript by Nicholas C. Zakas. A book for every Javascript developer, especially those who think they know it all. If you learn nothing, then I salute you.
  16. One Dimensional Woman by Nina Power. I liked it, but have forgotten more or less everything. I’m not sure if this tells me something.
  17. Street Fighting Mathematics by Sanjoy Mahajan. More involved, but also more general approaches to getting fairly accurate estimates than in Mind Performance Hacks
  18. Kitchen by Banana Yoshimoto. Don’t know what to think of it, except that translation seems dubious.
  19. The Absence of War by David Hare . Great political drama that is still relevant.
  20. The Brief Wondrous Life of Oscar Wao by Junot Diaz. Liked it a lot, but still having a feeling that I missed a lot by not understanding untranslated Spanish parts.
  21. I Shall Wear Midnight by Terry Pratchett. Liked it, but I might have liked it more (or less) if I wasn’t a fan who read almost everything written by Terry.
  22. Too Loud a Solitude by Bohumil Hrabal . Everything reviewers said: short, eccentric, playful and…a must read.
  23. Master of Shadows: The Secret Diplomatic Career of the Painter Peter Paul Rubens by Mark Lamster. Insightful and often surprising even for us who knew about his second career.
  24. The Pursuit of Glory by Tim Blanning . Could be the best history book I’ve ever read and its lingering effect on me might make it also one of most?influential.
  25. Costa Rica: A Traveler’s Literary Companion edited by Barbara Ras. I planned to read this while we travelled around Costa Rica, but failed. I read most of it during our last days on the trip and on our way home. Uneven, with some stories quite good while others resulting in “huh?”, but you do see country differently and I would recommend it to all who plan to travel there.

I also discovered Granta , a really great literary magazine through which you can discover new authors or simply authors you don’t know yet.

At the end I would like to mention a book I read this year, so it’s not on the list, but which I find too important to ignore for a year. It’s Eating Animals by Jonathan Safran Foer. If you care what you eat and especially if that involves meat, you ought to read it. It’s well researched and even better written book that will inform you what “western” meat production means these days. I don’t think I can recommend it enough.

2010 review

I returned from Costa Rica two days ago after a month spent there. It’s probably one of few places where you can have an amazing time even though it rains on you regularly and I wish I wasn’t back yet. I expected lots of nature and friendly people (got plenty of both), but I had no idea you can be cold for so long just 9 degrees from equator ? a combination of exceptionally cold weather and spending lots of time at high altitude places instead of a beach.

But this is not a travel post. A year ago I wrote my yearly review and it’s time to write a new one. Looking back at this year I feel disappointed. It wasn’t really a bad year, even less so if looking at it objectively, but the feeling is here nevertheless.

I guess it’s been a year of good intentions going wrong. I eat almost exclusively plant based diet, but I contracted salmonella while making a cake for family and suffered through most unpleasant week in recent memory. My stint as Zemanta ‘s product guy ended after several months and I still have mixed feelings about the whole thing. I haven’t finished much of what I started, exception being HTML Lint , which was mostly Fry’s work anyway.

I also learned and read less than I thought I would. Year hasn’t ended yet, but self-imposed goal of 30 books won’t be quite achieved. I did however managed to emit less CO 2 while travelling than last year.

I am more optimistic about next year. COP16 wasn’t utter failure like the previous one was. I think a public goal of 30 books read will be met. There are good reasons to be optimistic about personal projects and I’ll try to raise my chances by not announcing them just yet.

This is it. At the end a bit late, but not any less heartfelt happy holidays to everyone.