Kung FuKung Fu

Fujian White Crane Kung Fu

ZopeZope

What I have and am doing with Zope

PhotosPhotos

Photoalbum, both old and new.

ReceptsamlingenReceptsamlingen

In Swedish only. About my "Collection of Recipes" website.

Contact meContact me

My contact details and how to contact me.

  Mobile version of this page Mobile version of this page


 

You're viewing blogs from Work only.

View all different categories

10th of September

Google London Automation Test conference (part II)

http://www.flickr.com/photo.../72157594275911985/ 

This is the second part of the summary of the Google London Automation Test conference that I blogged about.

The conference lasted two days. Here's a brief summary of what happened on the second day which was on the same theme as the first: automated testing of software. The highlight of the day was Goranka's talk about performance testing.


>Read the whole text (582 more words)

8th of September

Google London Automation Test conference

I'm writing this from Googles office in London, UK where Google is hosting a conference on Automated Testing. Testing of software that is. There's been very little talking about usability testing or hardware testing. There's been a lot of talks about taking unittesting taken to the next level.

I'm going to blog again about the stuff I learn today. Below is a summary of the stuff I learnt yesterday. Just coming to see the Google office was a very interesting experience. It's very impressive. The office building is beautiful and has a nice feel to it. One of the most impressive things about this office is the free-food canteen which I've used almost excessively but nobody except my girlfriend and my kung fu teacher will minds. I'm only here for two days and they can afford it :)


>Read the whole text (438 more words)

3rd of August

Sorting transform function in PostgreSQL

A database table that I've had to work with has a something called identifiers which are humanreable names of questions. There's a HTML template where the question designer can place the various questions in a human-sorted order. All questions get identifiers in the form of <something><number> like this: Head1 or Soma3 or Reg10 where Head, Soma and Reg are sections. Changing the nameing convention from Head1 to Head01 is too late because all the templates already expect Head1 not Head01. Initially I sorted the identifiers like this:

 SELECT id, identifier 
 FROM questions
 WHERE section=123
 ORDER BY identifier 

The result you would get is:

 Head1
 Head10
 Head2
 Head3
 ...

The human readable sort order should have been this:

 Head1
 Head2
 Head3
 ...
 Head10


>Read the whole text (90 more words)

11th of March

Quick PostgreSQL optimization story

There are several ways to do case insensitive string matching in SQL. Here are two ways that I've tried and analyzed on a table that doesn't have any indices.

Option 1:

 (
  LOWER(u.first_name) = LOWER('Lazy') OR 
  LOWER(u.last_name) = LOWER('Lazy') OR
  LOWER(u.first_name || u.last_name) = LOWER('Lazy')
 )

Option 2:

 (
  u.first_name ILIKE 'Lazy' OR 
  u.last_name ILIKE 'Lazy' OR
  u.first_name || u.last_name ILIKE 'Lazy'
 )

A potentially third option is to make sure that the parameters sent to the SQL code is cooked, in this case we make the parameter into lower case before sent to the SQL code

Option 1b:

 (
  LOWER(u.first_name) = 'lazy' OR 
  LOWER(u.last_name) = 'lazy' OR
  LOWER(u.first_name || u.last_name) = 'lazy'
 )

Which one do you think is fastest?


>Read the whole text (92 more words)

12th of January

An idea for a better timesheet tracker

Here at Fry-IT we use timesheets, like so many other companies, to track the time we spend on each client project. Despite being a very "web modern" company we still don't use a web application to do this. What we use is a python script that I wrote that uses raw_input() to get the details in on the command line. The script then saves all data in a big semicolon separated CSV file and is stored in cvs. This works quite well for us. It's in fact all we need in terms of actually entering our times which is usually very easy to forget.

But, here's an idea for a timesheet tracker that will not guarantee but will really help in not forgetting to fill in your timesheets. The idea is that you have a web application of some sort that is able to send out emails to registered individuals. These emails will be sent at (a configurable time) the end of the work day when you're about to leave for the day. You might have seen this before on other timesheet tracker applications; it's not new. What is new is that the email would contain lots of intelligent URLs that when clicked fills in your timesheets for that day.


>Read the whole text (307 more words)

11th of December

ALTER TABLE patch

Since I always forget how to do this and have to reside to testing back and forth or to open a book I will now post an example patch that alters a table; correctly. Perhaps this is done differently in Oracle, MySQL, etc. but in PostgreSQL 7.4 you can't add a new column and set its default and constraints in the same command. You have to do that separately for it to work and most likely you'll have to run a normal update once the column has been added.

Just doing:

 ALTER TABLE users ADD mobile VARCHAR(20) NOT NULL DEFAULT '';

...won't work and you'll get an error.


>Read the whole text (167 more words)

21st of August

An ideal company blog tool

There's lots of small pieces of knowledge in our company. Not the kind of knowledge that requires thinking but stuff like,

  • where's the black stapler
  • how to add a domain to the xyz-server apache config
  • who to call to sort out the airconditioner

Most of this core "knowledge" we have tried to store in a relatively structured Wiki (we use zwiki) which has been a really good start. It's good because whenever I need to refresh my memory on some IP address or how to install a printer I can go to our company wiki and search for it there.

The problem is that it's such a choir to maintain the wiki. It takes several seconds to go there, log in and (biggest bore) to find the most appropriate places to write anything new or where to update something old. I know I sound disgustingly lazy, but when you have to do it many times per day you want the software to help you rather than being an obstacle. I'm now instead looking for a different solution: a blog!


>Read the whole text (249 more words)

12th of June

My trade salary has gone down, apparently

http://www.marketingvox.com..._salaries_chart.php 

Sorry about the cryptic title. My actual salary has not gone down but if you are to believe this chart the salary (in the US) for "Web programmer/developer (back end systems)" has gone down with 2.2% in the last five years but actually gone up by 8.2% in the last year.

What is quite interesting is that of "Content developer" which has seen a rise of 6.5% in the last five years. I guess that's the blogging. More and more people get employed now just to blog about a particular industry. This seems to be a modern trend that we'll see more and more of now that setting up a blog of your own is so much easier (I wrote mine from scratch :). I wonder where these "content developers" come from; their individual technical industries such as programming or design or if they come from literary background like book writing.

Anyway, looks like the general trend is that all salaries have gone up from 2004 to 2005.

19th of May

MOBi phonebook into Excel

http://www.mobi.co.uk 

A new feature has just recently been added to MOBi Phonebook that I developed for our client (the owners of MOBi) for free in my spare time.

mobi-excel.png The reason for this is that I use MOBi myself a lot and I needed an easy way to export my contacts and later be able to import it again. So I used the Excel HTML solution and simply added a bit of formatting to it. It opens in right up in Excel (or like in my case, OpenOffice oocalc) which makes it damn easy to edit the contacts.

If you need to put this back into MOBi you have to save your spreadsheet as a comma separated CSV file. Fortunately that importing is pretty smart. It can add and update new data and everything it can't handle (conflicts) it shows you for manual editing.


>Read the whole text (57 more words)

15th of April

Noise reduction headphones

http://www.bose.co.uk/noise...ion/qc2_headphones/ 

My kind company just gave me a little gift to make our office environment less noisy. A pair of Bose noise reduction headphones. Click here for a picture

I was sceptic at first thinking that noise reduction will work but only in such a small way that one might as not bother. Boy was I wrong! It actually only really works if you play music through them. Unsurprisingly the sound quality is stunning (wouldn't expect less for that price :) and when you play music it starts to look like people are miming and you stop hearing little noises like tapping the keyboard, distant phones ringing and air conditioners. From now I'll have to keep my mobile in my pocket so that I can feel it vibrating because I've missed a call when the mobile was on my desk and I didn't notice at all.

They really work! A word of warning though, not having music is pointless. Noise is reduced but you can actually hear the headphones themselfs in a strange way. It's difficult to explain but it sort of rings in your ears like when you exit a nightclub and come somewhere it's quiet. If you don't want music and just quiet, just buy some ear plugs

12th of July

Company loyalty

http://www.fry-it.com/Our%20Philosophy 

Last week we had a company meeting to talk about all kinds of stuff. I raised the issue that I wanted the company to pay for my phone usage and SMS I send. I followed up by saying that I will get the itemised bill from Orange to estimate how much of my phone bill is work related (i.e. that Fry-IT should pay for). My boss then said: "Don't worry. Just give us the bills and we'll pay for the whole thing." But I chose to reject that saying that I only want Fry-IT to pay for work related calls and SMS; not private stuff.

So I was offered to have a "free company contract" but I chose not to. That's company loyalty.

3rd of July

Fry-IT people picture

http://www.peterbe.com/photos/work/fry-it.jpg/view 

Fry-IT people I've just uploaded a picture I took yesterday of my collegues at Fry-IT.

The Fry-IT website is found on: www.fry-it.com