Archive for category Development

Nortel VoIP: It just feels wrong

I have a VoIP phone on my desk. It’s part of the Corporate VoIP solution, and in most cases it works pretty well. One of my favorite features is the ability to act as a meeting phone with the speaker on. It usually works great, but there is one thing with the speaker feature, which [...]

Tags:

Google App Engine

I’ve been playing a bit with the Google App Engine the past few nights. It’s one of the newest toys out of Google, and it could very well be a very important piece of infrastructure to many web developers trying to create a dotcom adventure. Google App Engine (once they let you in) allows you [...]

Tags: ,

Fetching Image details in Perl

Image::Size is fine, if size is the only thing, which matters. Sometimes, however, it isn’t enough, and when that is the case Image::Info (again fetched from CPAN) is your friend. Point it to a file (through various methods), and it will return a hash with all the information available about the image you pointed at. [...]

Tags: ,

Converting between image formats in Perl

Changing files from one format to another is quite easy with a little bit of Magick. In the example below a JPG image (test.jpg) is converted into a GIF-image (test.gif). To output in a different (ImageMagick supported) format, just change the “image->Set” line. 1 2 3 4 5 6 7 8 9 10 11 12 [...]

Tags: ,

Rotating an Image with Perl

Turning images is quite simple. In the example below an image is turned 90 degrees clockwise, wirtten to a file, turned another 90 degress and written to a file again. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 #!/usr/bin/perl -w use strict; use Image::Magick;   my $image = Image::Magick->new(magick=>’JPEG’); [...]

Tags: ,

Making thumbnails with Perl

With the help of ImageMagick you can automagically use Perl to create thumbnails. The example below is quite rude and makes a 50 by 50 thumbnail (no matter which size and shape the master had). Before using it in a real world scenario, check the aspect ratio, the size of the original image and what [...]

Tags: ,

CVS – Getting started

CVS is a sourcecode version control system, which is just about the best thing which can ever happen to a software project. CVS gives you the power to manage the development of your sourcecode and keep track of changes in the code. Below there’s a few pointers to the net, where you can find lots [...]

Tags:

PHP Coding Standards

If you’re part of a larger team developing (and sharing) code, it is a pretty good idea to have some common standards. In the PHP work, such a set of common standards include the PEAR Coding Standards. While it may be a challenge to agree on standards, it can be done – the hard part [...]

Tags: , , ,

Database optimization thoughts

If you’re working on heavy duty websites, knowing your database and how to use it best can make a world of difference in terms of performance, and thus you should always optimize the database. That’s pretty much obvious. The tricky part is how you do the optimization? Often it requires a lot of reading up [...]

Tags: , , ,

Substring magic with mysql

Mysql is a wonderful database, and while many use it, most people only scratch the surface of what the database can do. One of the practical functions available is the substring_index function, and an imaginary mailing list example is a nice way to show how to use it. Let imagine we have a mailinglist in [...]

Tags: , ,