The screenshot attached here doesn't really show it but the nav at the bottom is supposed to stay at the bottom as you scroll but that doesn't seem to work on the iPad. Shows me up for not using solid basic (X)HTML.

Do you train Kung Fu?
Or know someone who does?
Then check out KungFuPeople.com
Mobile version of this pageRSS
Hot topics
by Peter: Got to find the time to read this http://www.zopemafia.com/Members/chrism/...
Loadtesting this site and compare with static Apacby Peter: Improved it now so that it returns more than one spelling suggestion. Very ...
New search feature on this siteOld entries
April, 2010
Word Whomp solvers love Crosstips
UPPER vs. ILIKE
Who was logged in during a Django exception
fcgi vs. gunicorn vs. uWSGI
Cycling across England on Orange Snapshot
March, 2010
The awesomest way possible to serve your static stuff in Django with Nginx
Beautiful photos from the Katrina hurricane
Speed test between django_mongokit and postgresql_psycopg2
How and why to use django-mongokit (aka. Django to MongoDB)
Ubuntu Cola or Ubuntu Linux
Importance of public URLs and how enterprisecarsales.com gets it wrong
February, 2010
January, 2010
2009
2008
2007
2006
2005
2004
2003
You're viewing blogs from This site only.
30th of April
22nd of October
Make makes my website slow? DNS
Pagetest web page performance test is a great tool for doing what Firebug does but not in your browser. Pagetest can do repeated tests to iron out any outliers. An alternative is Pingdom tools which has some nifty sorting functions but is generally the same thing.
So I ran the homepage of my website on it and concluded that: Wow! Half the time is spent on DNS lookup!
The server it sits on is located here in London, UK and the Pagetest test was made from a server also here in the UK. Needless to say, I was disappointed. Is there anything I can do about that? I've spent so much time configuring Squid, Varnish and Nginx and yet the biggest chunk is DNS lookup.
In a pseudo-optimistic fashion I'm hoping it's because I've made the site so fast that this is what's left when you've done all you can do. I'm hoping to learn some more about this "dilemma" without having to read any lengthy manuals. Pointers welcomed.
8th of July
I'm not a hacker
Every week I get an email via this website from someone who wants me to help them hack something. I've written things about the subject "hacking" but that doesn't make me a hacker. I'm not a hacker. Here's this week's nutter email I got:
"Hai,
im suraj from India.
Actually i want to b a computer expert.There must b nothin wth the coputer tht i cant do.so i think it can b done only wth a hacker.So can u plz help me wth this.pPleae tel me wht i hav to learn.
Than Q."
Does that make any sense?
16th of May
No, I'm not going to freeze your account
Yesterday I got another one of these:
dear sir, yesterday some body stolen my cell cell number 9848133384 please search for the same and freeze my account so that no body can use it thank you yours faithfully kgdeekshitulu
It seems that a lot of people in India lose their mobile phones these days and that a lot of people in India think that by emailing me about it that I can do something about it.
I'm just a blogger. I don't have a machine that can cancel mobile SIMs.
20th of October
New domain name
I've recently registered now set up a new domain name for this website. It's peterbe.mobi and is there to the be mobile version of the pages.
I've also made some of these slight improvements to the css for mobile and removed the category images on the blog items. There is so much more that I can do but I just haven't had time. For example, there's no search on the mobile version.
The screenshot here to the right is from a Firefox extension I have called "Small Screen Rendering" which is useful if you want to get a guessimate look of how your page might appear in browser with a very small screen. Immediate conclusion: there's a hell of a lot of scrolling :)
27th of January
Photos from FWC China 2005
I've now finally uploaded all my photos from the trip to China.
![]()
From 1,000 huge jpegs (at 1.6Gb) down to 300 resized ones (at 43Mb) it took quite a long time to rotate, chose, colour modify and title. To do it I had to use digikam which is the best photo album organiser program available on Linux. Even though it's the best I've found so far it still sucks. It's frustrating when you have lots to do but it's free and works better than nothing and I haven't donated any money to it.
As you might have noticed I have had to reduce the image quality quite a bit especially of the thumbnails. Sorry about this but I see thumbnails as navigation, not the real content. If you want higher resolution images I might be able to get you the original JPG if you ask kindly for it.
24th of January
Bad spelling a good thing?
At the time of writing, if you do any of these searches on google:
charles dunston carphone warehouse
...you'll notice two patterns:
- My site is no. 1 on all three
- They're all badly spelled
1st of November
www aliases set up
I've now set up alias to www.peterbe.com such that ww.peterbe.com and wwww.peterbe.com both redirect to www.peterbe.com.
We'll see what effect this might have and if it's worth. I guess 99% of all visitors on this site get it right but this tightens the "fool-proofness" even more. Google have one such alias set up on ww.google.com but not wwww.google.com
10th of October
Dream: python bindings for squidclient
At the moment I'm not running Squid for this site but if experimentation time permits I'll have it running again soon. One thing I feel uneasy about is how to "manually" purge cached pages that needs to be updated. For example, if you read this page (and it's cached for one hour) and post a comment, then I'd like to re-cache this page with a purge. Setting a HTTP header could be something but that I would only be able to do on the page where you have this in the URL:
which, because of the presence of a querystring, is not necessarily cached anyway. The effect is that as soon as the "?msg=Comment+added" is removed from the URL, the viewer will see the page as it was before she posted her comment. squidclient might be the solution. ...sort of.
5th of June
I'm back! Peterbe.com has been renewed
Finally I got my domain name back. What happened was that it expired without me being notified. The reason I wasn't notified was that the email address that Network Solutions use is ancient and I don't check it anymore. What I had to do was to send a signed fax with a photocopy of me driving license to Network Solutions in the states to tell them to change my email address. Once I've changed my email address I was able to log in and renew the service for three years.
What confused the whole thing was that apparently I thought I could transfer the domain name over to mydomain.com who I use to administer the domain name. The reason it didn't work was that the domain could not be transfered when it was pending deletion.
Long story short: I'm back. To all those of you who have emailed me on mail @peterbe.com you and have got a delivery-error-message, do you want to resend that important piece of email now?
19th of October
I'm back and awake!
I'm back! My dear little website is back up and running. This time on a different computer on a different network.
What happened was that the poor little old laptop that my computer was running on completely screwed itself up after a hard restart. Everything on its memory became totally random. When it managed to boot up I had several gigantic folders, some with equal name that couldn't be opened. My friend Jan Kokoska helped me eventually run a few disk-checking programs and eventually we could see my non-backedup files again. With a Linux LiveCD we managed to copy the data across to another computer and eventually it got up here on this server.
21st of May
PlogRank - my own PageRank application
Now I've done something relatively useful with my PageRank algorithm written in Python that I'm actually quite proud of. It's not rocket science but at least I've managed to understand the Google PageRank algorithm and applied it to my own setup. This application is very simple and not so useful as one could hope but at least I prove to myself that it can be done.
I call it PlogRank. As you might have noticed, most blog items here on this site have on the left hand side, beneath the menu, a list of "Related blogs". These are from now on sorted by PlogRank! Cool, ha?
The "Related blogs" work by specific word matching. Every blog item has a list keywords that I define manually through the management interface. The selection of keywords is helped by another little database that filters out all typical words. E.g. "PageRank" is a particular word and "page" is not; so selecting these keywords is very easy for me.
Anyway. What I do now, once every week, is that I load a huge matrix of all connections between pages. If this blog item has a link to PageRank in Python then that page increases in PlogRank. It does not effect this page. I then feed this into the PageRanker program I've written which calculates the corresponding PageRank for each blog item. Easy! The whole calculation takes only a couple of seconds with 30 iterations. The calculation is actually only a small part of that time because reading from and writing to the database is the real bottleneck.
So, the end result is that every blog item that has related links will show these links in PlogRank-sorted order. Isn't that neat?
14th of April
The importance of being findable
Did a quick analysis on all the referers to my web site. Referers being when web users click a link to my site from another site instead of manually typing in the URL. The result is not surprising but quite sad. About 5% of all referer visits to my web site is from other normal web pages. All the remaining is from search engine results such as Yahoo, Google etc or other obscure web services.

The sad truth is that very few people make a link to my site :(
The good thing is that my site must be very findable.
The most important conclusion is probably that people don't surf the web anymore. Instead they search it. I for one trust Google so much that I sometimes search instead of digging up the URL written down somewhere. This proves the importance of being findable on the web. You have to make your pages findable otherwise you don't get any hits. So, redesign your sites so that Google can index them accurately and avoid silly things like frames or images with text in them.
4th of March
Optimized stylesheets
I have been experimenting recently with HTML optimization but haven't applied it yet. But I have applied this now to my stylsheets. The size gain is 33%! (1577 bytes to 1027 bytes) However, the speed gain involves also the time to perform the optimization so the speed gain will obviously be less than 33%. But the optimization takes, on this slow computer, 0.004 seconds so in approximate terms the speed gain is also 33%. This is on a stylesheet file with some but short and few comments.
The optimization script removes almost all unnecessary whitespace (newline characters included) and all comments. The code for python friends looks like this:
css_comments = re.compile(r'/\*.*?\*/', re.MULTILINE|re.DOTALL)
def _css_slimmer(css):
css = css_comments.sub('', css)
css = re.sub(r'\s\s+', '', css)
css = re.sub(r'\s+{','{', css)
css = re.sub(r'\s}','}', css)
css = re.sub(r'}','}\n', css)
return css
19th of February
This site 7 months ago
The Wayback Machine has archived my websites since April 2001.
The last archive entry is of how this website looked like with the new design first. I.e. 7 months ago. I didn't know about this project but it looks promising yet limited. It's like a permanent cache.
Another fun one was my profile page from our intranet when I was working for Net4Any. (have patience and wait for the animated mug shot)
12th of February
RSS 1.0 feed now
I've changed my RSS feed to be RSS 1.0 compliant. My feed has been invalid for couple of days so I thought I needed to upgrade.
RSS 1.0 also allows for a Subject meta data so my items will look better on Webforce.at
10th of February
Breaking usability principles for usability
In my blog about Wikipedia I mentioned that one thing I didn't like about Wikipedia is that there are too many links that distract you when you're reading. I prefer to read the text when the inline links aren't underlined like they do it on susning.nu or metafilter.com.
Slashdot disagrees with me. Look at this example on Slashdot. So many links that you don't know whether to read it or to click everything.
18th of January
Quick URLs for some pages
Supposing I want to send someone a URL to one of the pages of my site. Then if the URL is too long it gets complicated. In emails there's the risk that the long URL gets broken up on many lines. And on SMS there's too much typing. So I've introduced Quick URLs.
For example: http://www.peterbe.com/photos/misc/balloon-flying/ballong_skog_eld.jpg/view becomes http://www.peterbe.com/q-004 Much easier to type in when sending a text, isn't it.
I have to manually select every URL that I want to do this too, but this might change with time. When you enter a Quick URL like the one above you get redirected to the real URL.
14th of January
Printer friendly and PDF version of every page
Now there are two icons on all pages of this site in the bottom right-hand corner. One is for a printer friendly version and the other is an experimental PDF version.
The PDF trick idea I got from this How-To by Maik Jablonski.
The trick to enable multiple versions of the header & footer was actually inspired by myself. I wrote about this on ZopeLabs.com a long time ago.
13th of January
About page finally written
This is my first attempt on trying to describe some of the technical mechanisms of this site. I will try to keep it updated as I change the website.
Hopefully I will also write a little something about me, myself and I when time allows.


