Wednesday, January 13, 2010

Wiki world

As part of my foray into the wiki world of common good, I've written a small, but effective little script for automating conversion and reduction of JPG format images to PNG images of a specific size, using a tool called ImageMagick:
#!/bin/sh
for img in `ls *.jpg`
do
baseimg=`echo $img | sed s/\.jpg/\.png/`
convert $img -resize '300x300>' $baseimg
done

Certainly not the most versatile piece of code (yet), but it was written in minutes and has saved me quite a bit of time so far. If/when the need arises I'll modify it (and post it here).

Enjoy!

- - - - - - - - - -
ImageMagick does a number of things:

Sunday, January 10, 2010

Brave New World

After six months of shell scripting in the hopes of doing some more in-depth 'real' coding, I was laid off (budget cut-backs, poor economy in the US where my employer was based).

A week before typical Christmas holidays, and with only six months of experience but a bundle of enthusiasm I quickly found myself another (dare I say 'better'?) job writing custom aspx/C#... or at least I will be writing custom aspx/C# once I get past the preliminary learning curve of installing our product for our customers.

That brings me to a train of thought that has me wondering: How many other 'programmers' spend more time on installation, minor configuration, manual testing (not coded 'unit tests') and the like? Is it because I don't have experience that I'm pushed to these tasks? Is this the realistic expectation for the future, or do I have some hope of actually doing the work that I have been trained to (and love to) do?

I'm generally an easy person to please. Give me a work environment where the dress-code is clothing, the coffee and water never run dry, my co-workers aren't impossible to tolerate, and the keyboard isn't m ss ng the letter 'I', then I'm happy to go for a good six to twelve months just on those criteria alone.

But what about after those twelve months?

*raises glass* Here's to hoping the next year brings many coding challenges and happy times.

- - - - - - - - - -

Algorithm for ensuring job satisfaction:
if coffeepot.size == empty then: coffeepot.fill
if self.coworker.attitude == amicable then: smile; else: self.hopefor(best)
for letter in keyboard.letters:
if letter.value == null:
newkeyboard.get
Rinse and repeat ad nauseum