Efficient Image Resizing With ImageMagick

ImageMagick is one of my favorite tools ever.  I’ve used for years for a whole lot of different things – from simple image resizing, through animation generation, to palette manipulation.  And still, I don’t really know it that well, so when I see articles like this – “Efficient Image Resizing With ImageMagick“, I get excited.  Not only it gives you a better way of doing things, but it also explains the path of how to get there.  From a simple command like:

convert input.jpg -resize 300 output.jpg

to something as advanced as this:

mogrify \
  -path OUTPUT_PATH \
  -filter Triangle \
  -define filter:support=2 \
  -thumbnail OUTPUT_WIDTH \
  -unsharp 0.25x0.25+8+0.065 \
  -dither None \
  -posterize 136 \
  -quality 82 \
  -define jpeg:fancy-upsampling=off \
  -define png:compression-filter=5 \
  -define png:compression-level=9 \
  -define png:compression-strategy=1 \
  -define png:exclude-chunk=all \
  -interlace none \
  -colorspace sRGB \
  -strip INPUT_PATH

What’s even more exciting is that it looks like this optimization will make its way into WordPress 4.4, together with some other improvements for the responsive images.

Super cool!

How does a relational database work

databases

How does a relational database work” is an excellent (lengthy, technical, but simply written and well explained) article on some of the most important bits inside the relational database.  It’s somewhat of a middle ground between a theoretical database discussion in college and vendor-specific documentation of a database engine.

Though the title of this article is explicit, the aim of this article is NOT to understand how to use a database. Therefore, you should already know how to write a simple join query and basic CRUD queries; otherwise you might not understand this article. This is the only thing you need to know, I’ll explain everything else.

I’ll start with some computer science stuff like time complexity. I know that some of you hate this concept but, without it, you can’t understand the cleverness inside a database. Since it’s a huge topic, I’ll focus on what I think is essential: the way a database handles an SQL query. I’ll only present the basic concepts behind a database so that at the end of the article you’ll have a good idea of what’s happening under the hood.

Whether you are a young programmer or an experienced DBA, I think, you’ll still find something in there which you either didn’t know or didn’t think about in this particular way.   Even if you know all this stuff, it’s a good memory refresher.

Strongly recommended!

HTTP Status Dogs

HTTP Status Dogs – Hypertext Transfer Protocol response status codes. And dogs.  If you are even a tiny bit familiar with HTTP or dogs, this will put a smile on your face.  I’m thinking to use these as default error pages from now on.

502

One year at Qobo

Today marks a year since I joined Qobo as a CTO.  And what a year it has been!  On one hand, it flew by like a week.  On the other hand, looking at how much has been done, it feels like a decade.  Here are just a few highlights, in no particular order:

  • Team changes – a few people left, a few people joined.  A gadzillion people were interviewed, met, and even worked with on a project basis.  Those who are in the office now have also grown and got better both individually and as a team.  I’m always excited to see change in people.
  • Technology focus – a variety of technologies from earlier company history were consolidated into fewer, but better solutions.  We are a PHP shop now, with solid expertise in WordPress, CakePHP, and SugarCRM.  Focusing on fewer technologies allowed us to gain deeper knowledge and to perfect our tools.  Which leads me to the next point …
  • Open Source Software.  I’ve been a fan and an advocate for Open Source Software for years.  But it was always difficult to push it in the corporate world.  I got better with it at each previous work place, and Open Source grew up with years too.  But it wasn’t until Qobo that I got to the level that I wanted.  Have a look at our GitHub profile – there are forks of projects that we contribute to (mostly third-party WordPress plugins), our project templates, experiments, and tools.  And we are far from done yet.
  • Hosting consolidation and the cloud.  When I joined a year ago, the company was using a variety of hosting companies around the world.  While that provided an immediate base for some of the platforms in use, it was somewhat difficult to manage.  Since then, we’ve moved everything to Amazon Virtual Private Cloud.  We use quite a bit of the AWS stack, mainly – VPC, EC2, Route53, and S3.  And it works great for us!
  • Deployment automation, quality assurance, monitoring, etc.  We’ve built (yet again) and (finally) Open Sourced our deployment automation tools.   I’ve built this kind of tools before, but I was never quite happy with them, and I had to reiterate again and again.  Finally, we have something that works quite well.  There’s always room for improvement, of course, but it served us well for a few month now.
  • Projects, projects, projects.  We’ve worked on client projects big and small all year round.  And there are quite a few that we are proud of.  The Portfolio page for our website is coming soon too, so we can properly showcase those.
  • Office move.  We’ve moved offices in the shortest possible time,  optimizing and completely restructuring our internal infrastructure.  We are now in better premises with a better setup.  We need less hardware and things are much easier to handle.
  • Podcasts and audio books.  In the last year, I’ve driven over 40,000 kilometers, mostly going back and forth between Limassol and Nicosia.  Most of this time was spent listening to podcasts and audio books, from which I’ve learned a lot and got a billion ideas.

There’s plenty more, of course.  But the most important out of this all, I think, is that I’ve learned a whole lot about a whole lot, I’ve tried plenty of things I wanted to try for a while, and I’ve had a tonne of fun, even though sometimes that meant long nights and no weekends.

It’s been a great year and I hope I’ll have many more like this one.  To all, who were around – a big thank you and please don’t go away.  To those who parted ways – thanks anyway and good luck.  I hope more people get to experience what I’ve experienced this year.

P.S.: And the blog section of our website is coming soon too.  Once it’s up, we’ll keep you all updated on our endeavors through there.

Everyone needs a website

Matthew DiIulio shares a few good reasons for why “Everyone Needs A Personal Website“.  All are valid, even if simplistic:

Using social media for your web presence works wonderfully, but you don’t own and control your content. At any time your social media account could be deleted, and then your long time web presence is gone.

Seth Godin’s post “You are what you share” takes a different, deeper, world-changing approach:

Sharing an idea you care about is a generous way to change your world for the better.

The culture we will live in next month is a direct result of what people like us share today. The things we share and don’t share determine what happens next.

As we move away from the top-down regime of promoted movies, well-shelved books and all sorts of hype, the recommendation from person to person is now the most powerful way we have to change things.

I recommended blogging to everyone for years using a completely different set of reasons, varying from improved language and writing skills, through wider social and professional network, to useful memory dumping.

At the end of the day, it doesn’t really matter why you should do it.  Everyone has their own reasons.  But one thing I do agree with the gentlemen above – do have your own web presence, and keep sharing your stuff.