Writing the code last… TDD?!

Posted on April 3rd, 2009 in Ruby on Rails, Coding by arnoldu

When I first stumbled upon the idea of TDD (Test driven development) - it made me shudder! Writing the tests before any line of code? That looked to me at first sight like spending the first year in the garage repairing your new Ferrari - before you actually drove her on the street once? Why would one do this? But I became a convinced fellower - here’s the story which might give some readers a push to go the same way…#

The optimal Toolset for Rails developers

Posted on March 19th, 2009 in Ruby on Rails, Coding by arnoldu

Developing applications with Ruby on Rails (Rails for short) is fun and easy - but beginners often don’t know how to start. After two years of developing many Rails application I gathered a set of tools and programs to make this development easy for me. I want to share my insights and experience to give noobs an easy start.

Ruby, my dear

Posted on March 19th, 2009 in Ruby on Rails, Coding, This and that by arnoldu

Ruby my dear is the title of an old jazz standard written by Theolonius Monk and first recorded 1949. Incidentially Ruby turned out to be the name one of my favourite programming language because it has some features I feel any programming language should have which makes it extremeley versatile and logical to me. I have a quite long programming history which mostly involved some version of Object /Turbo-Pascal Delphi. Now I now what I have missed all those years.
You should consider sneeking a peek at Ruby - I found many uses for it…

Filecopy in Ruby, scanning dirs recursive

Posted on March 19th, 2009 in Ruby on Rails, Coding by arnoldu

Sometimes even the simplest things are pretty well hidden behind the obvious. I once wanted to simply copy a local file from here to there. After a search for an hour an a day it stroke me how easy it was:

require ‘ftools’
File.copy(src,target)

Another thing which is required when processing a large bunch of files is to collect all - say image files - within a directory and all descending subdirectories. Here I found a very obvious solution:

Dir[‘**/*.jpg’].foreach do |filename|
process your filename here
end

This might be of any help for all the other seeking souls out there.

Server side scaling of images - the easy way

Posted on February 6th, 2009 in PHP, Coding by arnoldu

Intro

The web got pictionary - images and photos everywhere on nearly any page in the uncharted backwaters of the web. To put a pic on a webpage is easy, basically its just a simple <img> -tag which loads the image from a server and presents the image on your page.

The author presents a rather flexible solution to the need for multiresolution pictures which are scaled on the fly on the server side and cached for later reusage. All is needed is a standard Apache / PHP environment and a very small script. The concept should work with other environments as well.

Hello Coders - about me

Posted on February 5th, 2009 in This and that by arnoldu

Me - just meWell this is my coding blog. You can expect some interesting news and ideas I stumbled upon while working (mostly coding), websurfing or whatever. If you like, drop me a line.

If you want to know something about me:

I am a German programmer, 43 years old and located in Hamburg which is in the rather cold northern part of Germany. But even if weather is bad - mood is always high. I am programming for making my living and for fun - I am programming since I was 12 years old which is over 30 years now. I have had everything, from 8080 handwritten assembler code to smalltalk - I stucked many, many years with Borlands Object Pascal in various flavours (a.k.a. Turbopascal, Borland-Pascal, DELPHI …) and got (finally) into the safe heaven of Ruby and Ruby on Rails which is one of the most beautiful (programming-) languages I have seen in all those years.

Beside working I take piano lessons, like to travel around the world and like Jazz music.