A notch above a monkey

image-diet2 and pyimagediet

Couple of years ago I hacked together a small Django app called image-diet which automatically compresses images processed by Easy Thumbnails as they are uploaded to a website. Its code was atrocious with configuration for external tools baked in, it only worked with Easy Thumbnails and Python2 and...I could go on, but it worked and at Aptivate we have been using it successfully ever since.

Well, I finally found time and rewrote the whole thing. New version is now called image-diet2 because it is completely backwards incompatible and I screwed up versioning of the original one. Mea culpa.

It's implemented as a Django storage backend augmenting default one, but can easily be added as a mixin to any other so it should work no matter which tool or backend you use to upload files. Supporting new compression tools or changing configuration of existing does not require a new release or poking in virtualenv anymore. It is better tested, documented and is not limited to 2.x branch of Python anymore. You really should give it a try.

image-diet2 is actually a thin Django wrapper around separately packaged pyimagediet that actually process files. My hope is that others may find it useful enough to use it on non-Django projects. It also comes with a tool to compress images and generate configuration file tailored to your system. If you can think of anything else that would make integration even easier, then please let me know.

There are few bits still missing, but functionality is mostly complete. What I plan to do next is to test different configurations to find how well they work and what are their tradeoffs. Prior useful work such as this exists, but I'd like tests to be more expansive and in reusable format. They need to be easily replicable by anyone as their versions of processing tools might give different results than mine.

Books I read in 2015

2015 was a year of completely missed plans and that was equally true when it came to reading. I read even fewer books than a year before, but at least I am happy with my picks. There were no complete duds and I liked almost all of them.

We bought a Kindle Voyager before our 3 months journey, but I did not read enough on it to form a definite opinion. I prefer to read programming books on tablet, but for everything else Kindle feels better. Paper still works best for me unless I want to make notes.

I have started an experiment of marking interesting parts and bookmarking them with Post-It bookmarks so I can return and transcribe them once I have finished the book. It is definitely more work than just sliding a finger across screen, but I am curious to see how this turns out.

As always unaffiliated links point to Amazon and are there only for those that are at least fine. I did not provide a link for The Trial because my copy doesn't have one and I am not familiar with any of the many available editions. Bold is reserved for those I found best: Missing Person, Poor Economics and The Arab of the Future.

  • The Trial by Franz Kafka. I expected to like this book more than I did. It didn't help that (old?) Slovenian translation sounds often very germanic and that it isn't finished. Dialog is often odd and it is unlikely you'll find brilliant stylistic passages, but it may win you over with pervasive mood of desperation, alienation and impotence (absolutely not sexual).
  • DIY Toolkit by Nesta. A good introduction on various tools and techniques NGOs can you use for better results in their work. Most of which will be familiar to UX practitioners and some of which would benefit from a deeper introduction.
  • Missing Person by Patrick Modiano. The kind of multi-layered books I would write if I had talent and more depth. A noirish pursuit of lost identity that is also an engaging exploration of self. Highly recommended.
  • Wyrd Sisters by Terry Pratchett. Started reading after I learned about Terry's death to console myself. It worked and the book lost none of its charm since I last read it.
  • Poor Economics: A Radical Rethinking of the Way to Fight Global Poverty by Abhijit Banerjee and Esther Duflo. Absolutely fantastic book that everyone with even slight interest in international aid should read. I wish I had a copy of it with me at all times so I could throw it at anyone feeling the urge to pontificate on failings of the poor.
  • The Shepherd's Crown by Terry Pratchett. Last Discworld book, the only series I ever read. It was difficult to read about death of a character I liked for almost two decades. Terry died before he finished polishing text and it shows. It is not among his great, but it is a decent finish at a difficult time.
  • The Arab of the Future by Riad Sattouf. A controversial portrait of author's early childhood in Libya, France and Syria full of humor, humanism and barbed observations that may not be to everyone's liking. But they were to mine.
  • Debugging Teams: Better Productivity through Collaboration by Brian Fitzpatrick & Ben Collins-Sussman. Book with some useful advice that for me did not live up to its praise as I found most of it obvious or out of scope. I got really annoyed by its common use of female pronouns in negative contexts which is especially annoying in so male-dominated industry and its reliance on personal opinions where there has been ample research (e.g. open spaces).

This year will be busy, but I would still like to pick up the pace and read at least 15. Hopefully some of them will be fiction, but mostly I will read to learn and not for pleasure.

Related articles

2015 review

Happy new year everyone!

I still don't know what to think of 2015. Probably won't until enough time has passed. It certainly was completely unlike what I expected and planned, but at least it significantly improved in its last month.

I have spent about a third of last year travelling. Work took me to India, Tajikistan and Bolivia. It was physically demanding, especially Tajikistan, where dry climate and poor sanitation led to weeks of diarrhoea that dried me like a raisin, confirmed that I am indeed in no way an equestrian person and culminating in my first visit to a doctor on my travels. Not only did I not "salvage summer" as I hoped, I spent most of autumn recovering from exhaustion.

Still, even though trips were though and mostly not as successful as we expected, I am glad I got to do them. It was a tremendous learning experience and we met and worked with some amazing people (and some decidedly less so). As much as I enjoy field work, I don't expect to do it in 2016.

My family spent a lot of time in hospitals and I with them. Any time is really too much, but at least I can solace myself with good outcomes. Still, it would be great if none of us entered one next year.

There is no need to go through the list of things I planned a year ago as I did none of them. Life intervened, but I also did not use first half of the year as well as I should. However last couple of months were great. Reader still lives only in my head, but I did finally rewrite image-diet which is now called image-diet2 and is in pretty much everything better than previous version.

I did not learn a new programming language and doubt I will next year, but I did start learning Spanish. Little I know was already useful in Bolivia and by the end of the year I'd like to read a book in Spanish (which I did not manage to pull off this year). I do plan to deepen my knowledge of Python3, ES2015 and ES2016 now that I have more opportunity to use them.

It was a tumultuous year and yet I feel calmer than ever which I mostly attribute to TM. It is difficult to judge its other effects on me as they are clearly not as pronounced, but feeling more peaceful even under stressful circumstances makes meditating worthwhile enough for me.

I do not know what to expect of 2016, but it feels seminal. The image stuck in my head for last couple of days was my first week at university. Totally clueless and wrong about where life will take me, but knowing it will be different afterwards. In a way this year feels like one of last opportunities to easily redefine who I want to be.

The biggest change next year will be professional. I have happily worked for Aptivate for four years and hope to continue doing so in the future, but not solely. I will be available for freelance work. Talk to me if you will need help from someone with my background.

Another goal for this year is to present a talk at a conference as I haven't done that in a while. "Competition" for slots at interesting ones is strong enough that giving even one will be a success.

Other than that I am trying too avoid being too ambitious with my plans as I expect this year to be busy as it is. I plan to do a homeconf once per quarter and read more than I did this year. I will write publicly more as it would be difficult to write less and I am again not bereft of things to share (although most of them are not ready yet).

I finally hacked Mark's journal script to fit my needs. I can now summon it at any time and commit new entry without switching applications. My plan is mainly to jot down non-obvious problems and solutions I encounter, but I'd love to hear what others write in their work journals.

Spending few hours each month on tooling seems sensible. I have rejigged my set up late last year and difference is palpable. Development takes less effort with better results. Removing friction from doing the right thing is already a win, but if I can make it easier than doing wrong things, then that's golden.

In any case I have few firm plans for next year. Getting freelancing off the ground and presenting at conference should keep me busy enough. I expect to be overworked at least some of the time and yet it's been a while since I have felt so optimistic. Let's see how it goes.

Page 1 / 112 »