Friday, April 25, 2008

Setting charset in pages/forms with content-type: text/javascript

The Character set-setting for a page/form doesn't seem to do anything more than to set the character encoding for the text if content-type is text/javascript.

With character set set to Unicode (UTF-8), and content-type to text/javascript, Norwegian letters look like this:


If I set content-type to: text/javascript; charset=utf-8



Much better.. :)

Monday, April 7, 2008

How I got started with Lotus Notes

Quite a coincidence actually. After I graduated as a Bachelor of Information Technology in 2004, it was quite hard to get a programming-job in my part of Norway.

I applied for every interesting/uninteresting job I found (including project manager/etc :D), and got some interviews, but never got called back.

While still applying for programmer positions, I had a small job, setting up ADSL in private homes. The hourly pay was ok, but I only got one or two jobs per month.

Got tired of that, and started working at NorDan in Egersund, January 2005, putting together balcony doors/etc. While the job itself sucked, it was an overall fun time I had there, because of great colleagues (I'm more blue-collar than white-collar).

I had an interview with Compendia, my current employer. During the interview I got asked about Lotus Notes, which I'd never heard about. A month later, I got a call from my current boss.. I think my first words was something along the lines of "Ehhrmm... Who?". Having had several interviews that seemed to go ok before/not getting called back, I'd almost forgotten that I'd applied for a job. July 2005, I first put my hands on Lotus Notes (6.5).

If I hadn't gotten the job, I'd probably have gone back to school again..

Wednesday, April 2, 2008

A small simplification to "lookups" on the web

In this post, I referred to a method of looking up one document in a view, using the parameters startkey and untilkey.

E.g.

http://server/db.nsf/view?openview
&startkey=alex
&untilkey=alex_



I discovered today (wonder why it took so long) that the good old count-parameter works just as well as the untilkey-parameter. Personally, I think that the count-parameter is more readable than the previous method.

Simplified url:

http://server/db.nsf/view?openview
&startkey=alex
&count=1



I don't know if there is a performance-difference between the two methods. I tried a couple of benchmarks in firebug, but got nothing conclusive.