Tag Archives: Productivity

Bulk Image Resize using Conditional Width

I am currently working on a project in which we have lots of images from an old CMS waiting to be migrated into a new layout. Of course there are restrictions so it should not happen that certain image types exceed a certain max. width.

OK, we have many many images… So I took a closer look at ImageMagick (also take a look at the usage examples). And I have to say: Awsome!

You can install ImageMagick on Ubuntu or Debian with a simple
# apt-get install imagemagick

In combination with a bit conditional scripting I came up with the following solution:

Console doing bulk resize.

Console doing bulk resize.

I wanted to have a shell script that, given a directory containing all our images, checks the width of each image and resizes it if it exceeded a certain width. Simple, but powerful.


$ ./resize_image_dir.sh ../../brand_logos

And you are done with thousands of images in a minute. Do not forget to make a backup if designers change the desired width later…

You can download the shell scripts with example images ready to test:


Find out interesting thoughts and experiences about the selection and usage of a frameworks for your projects in this set of slides ‘Living with Frameworks‘ by Stuart┬áHerbert, Technical Manager at www.gradwell.com.

You will learn about:

  • How frameworks save you time (=money) and ensure quality but can also waste resources if applied in another way the framework was intended to be used.
  • The importance of the framework guru role.
  • That a chosen framework and architecture should be strategically introduced (top-down).
  • Introduction and proper use of a new framework has a steep learning curve.
  • Legacy code and the parallel maintenance hassle.
  • Refactor early, refactor often, perform regular code reviews with the framework guru.
  • Frameworks will not fix bad practice (specification, quality, no training).
  • Your framework should fit your overall development plan and practice.
  • Training your staff in your framework is a means of building your team.
  • Headcount on projects has increased, means more teamwork, organisation around needs to mature too.
  • Importance of upgrades and backward compatibility.

Hippie Completion in Eclipse

I was using a factory like this

$factory = new Object_Factory();
$curr_object = $factory->create('brand');

to generate instances of objects I needed and wondered why Eclipse could not auto-complete e.g. getters and setters in my code for me later on for the $curr_object. My productivity and my motivation to type all that stuff were seriously suffering…

So I found a very nice solution: Hippie Completion!

Instead of listing possible completion solutions like with Strg-Space the

key-combo “Alt-/” (/ on the number block!)

just completes what you started typing. You can also press Alt-/ as many times you like to page through all terms you could have meant like with the Strg-r on the console.

In case you try and wonder why it is not working like expected right away: Precondition for the hippie completion in Eclipse is, you typed the term to be completed once before!

Why didn’t anyone tell me this cool one before!