logrotating all my Zope event logs

February 6, 2008
0 comments Zope, Linux

I've installed a lot of Zope instances on my laptop since version 2.7.3 and out of curiosity and desperate need for more hard drive space I thought I'd log rotate them all with the standard Linux logrotate program.

Before doing the log rotate, the total size of all my event.log files came to about 290Mb! After running logrotate (twice of course to go from event.log.1 to event.log.2.gz) the total size become 20Mb. Not a huge significance in the world of gigabyte hard drives but at least something.

Ocado gets customer service right

February 2, 2008
8 comments Misc. links

I don't shop from Ocado anymore but maybe I should start doing that again. The reason I only tried it once was that I wasn't able to find as many products on their website as I needed plus if you're not a big family it often doesn't make sense to buy too much fresh food in one go.

They're cleverly keeping me in check by sending sporadic emails very rarely about changes to their features and other bits and pieces. I'd call it "spam I don't mind" and I don't get annoyed when I get them because they're so rare. And here's one that arrived the other day which I actually appreciate a lot. Basically, they've gone out of their way to improve their image on the environment to send me another email. It's well phrased, humane, well layed-out and informative.

Ocado gets customer service right

Keep up the good work guys!

Why Django and Grok matters

February 2, 2008
5 comments Web development

Now I realise why I'm taking a serious look at new "shorthand frameworks" like Django and Grok rather than Twisted, Plone 3 or Zope3: Because of jQuery! The Javascript framework which makes writing normal Javascript a joke.

Ever since I discovered jQuery I haven't looked back. Seeing "manual" Javascript code makes my crinch. By jQuery'ifying a pile of pure Javascript code you can go from 100 lines of code splashed with semi colons and for-loops into 20 human-readable lines. There's lots of magic which I guess you've just got to get over and accept but what's so brilliant is that stepping out of the magic into the wild is so damn easy and near. My only regret is not using jQuery since the day it was released. Now I've been using it for at least a year and can't see any reason for using anything else.

Ruby on Rails looks tempting too with its own nifty magic but I'm just afraid the step into "raw mode" is going to be too big. Like Plone, if you just do what you're told you can do you're getting brilliant results but anything more exceptional than that and you're back to more trouble than if you had done it without a framework.

My personal current dilemma is that I can't decide which on to invest in fully: Django or Grok. Grok seems technically superior but Grok as a community is where Django was a very long time ago. I'm going to try to master them both and some point in the future drop one of them. This is what I did when the Javascript frameworks came out. I eventually gave up on Prototype and Mootools and put all my effort into jQuery instead and I'm glad I did.

The Official Dilbert Widget

January 31, 2008
0 comments Misc. links

The Official Dilbert Widget If you like Dilbert there are now a bunch of really nice widgets of different sizes that you can put into your Netvibes, MySpace, Facebook or Blogger. It's just a flash widget that shows the latest Dilbert plus an ability to see past ones. It looks very promising to me. I like the fact that these are coloured whereas the same strip on www.dilbert.com is black and white.

I did load one into my Facebook and one into my Netvibes start page but because it's flash and takes several seconds to load it slowed down my Netvibes front page so I'm kind of putting that on hold.

Clearly web services has taken off in the world of network plumbing and the higher level equivalent for non-programmers is widgets. I don't think Youtube was the first to do it but was clearly what proved it to be a working idea in the mainstream.

"lost my phone :("

January 26, 2008
3 comments Mobile

Ever since I blogged about losing my mobile phone about 25 people have emailed personally (mainly for India) asking me if I can help them find their phone or block it (no, I'm not joking). Clearly they think my personal website gives the impression that I am able to do this. Either that or they're neither reading nor looking at what this site offers. Right, so I just received this:


Hi ,
     I was at yoga yesterday at the lochend community center in edinburgh with  
my friend samantha,my friends mum doreen and her son and 2 cleaners.Before yoga 
i had put my phone next to my friends phone on top of a cupboard.Ater yoga i 
took my phone and put it in my pocket,me and my friend and my friends mum's son 
all went through int oa little room and played hide and seek in the dark.A 
little while later about 20 mins i realized that my phone was not in my pocket 
:(. i only got it for christmas this year :O

Everyone looked high and low but couldn't find it.
What shall i do ?
Can you replace it with a new one?

Email me back on Dancingdizzy13@aol.com

Please hurry !!!! x

So, if anybody has seen a mobile somewhere in the Scotland area that belongs to Dancingdizzy13 then let me know. Perhaps I can replace it.

UPDATE

You'd think by writing this it'd put off people from contacting me about lost mobile phones but this arrived a few seconds ago:


my mobile phone NOKIA N73 was stolen.how to find my mobile phone?please help me
Imeino:353641013194935
Name:Yuvraj.D.Sisodiya
Contact no:09879531575,09725041575
  i am live in india(gujarat)  pls sent me your mobile no.pls quickly your email.

UPDATE 2

It doesn't stop. Today's harvest of stupidity:


Subject: my nokia mobile 2310 thefted

Name:p. vishnu vardhan babu
adress:6-8-9,ravindranagar,nalgonda,a.p,india.
mobile no:9966519774
IMEI NO.:355532010272527
missed date:22/2/08
model:2310 nokia

Ugliest e-commerce site of the month - Comfy-Feet

January 19, 2008
2 comments Misc. links

Ugliest e-commerce site of the month - Comfy-Feet This time it's an e-commerce site called Comfy-Feet which seems to have been developed with Frontpage 5.0 and that doesn't surprise me at all.

I remember hearing somewhere that turnover on e-commerce and "good design" don't have any relationship. In other words, just because you're making an e-commerce site prettier doesn't mean you'll sell more. Well, I beg to differ that that rule must have some extreme exceptions.

A few quick things you immediately notice:

  • Why two large Union Jack flags?
  • blue text within black text making you think they're links
  • no consistent layout when you drill down into various pages
  • title tag doesn't even include the word "Comfy-Feet" just "Buy: Shoe Insoles, ..."
  • If you add something to the cart, the click the "Back to store" button they ask you which site you want to go back to.
  • I don't think a single page I clicked on was without error message in the validator

Actually, I feel a bit guilty for complaining about this site since it's probably as far from corporate as possible can be. It was one of few decent sites I even found that sells insoles with a decent range. I just hope these guys didn't pay anybody (lots of money) to work on this. If not, I'm sorry. If so, get a better web designer company next time!

input/textarea switcher with jQuery

January 11, 2008
2 comments JavaScript

Here's a very early version of a solution to a problem where you have an input box want to give the user the option to expand the box to a textarea if they want to enter more stuff such as multiple line content. Your implementation, when you attempt the same thing, might be differently but feel free to copy this as a good start for your own projects. The demo show how it works.

What was important for me in doing this was that I didn't want to get close to the XHTML at all since (in this particular case) it was generated from a widget mechanism and I wanted the expanding option a luxury only for those who bother with the full Javascript. The key solution for me was the ability to replace elements in the DOM tree and copy the attributes when going from input to textarea or the other way around.

Feedback welcomed. Bare in mind that this was a quick first attempt and that I haven't tested this on IE.

jQuery and Highslide JS

January 8, 2008
5 comments JavaScript

If you use the wonderful Javascript library jQuery and the wonderful (standalone) Javascript plugin Highslide JS of recent version you should be aware of something.

As of recent versions of Highlide the way the Expander function works is that it looks at an element's onclick attribute and not it's attached events which means that if a DOM element has the event but not the attribute you get a Javascript error. In older versions of Highslide you were able to do this:


$('a.highslide').click(function() {
   return hs.expand(this, options);
});

But that's no longer working since the attribute isn't set. Here's the new way of doing it:


$('a.highslide').each(function() {
   this.onclick = function() {
     return hs.expand(this, options);
   };
});

The Love Mattress

January 6, 2008
0 comments Misc. links

The Love Mattress I'm currently not in urgent need for one of these (in other words: I'm single) but if I wasn't this might be a really cool thing to try: The Love Mattress

How many times haven't you gone to bed tucked up close to someone warm and soft and then your arm painfully falls asleep before you do? Many! I say. This invention makes it possible to wrap your arm around and under someone without this person having to feel like sleeping on a exhaust pipe across the shoulders or neck.

I guess the only criticism against this invention is that sleeping in a snuggled up position is only a very small part of the whole sleeping (or "jumping") experience a bed attempts to make as comfortable as possible.

Anyhow, I like the cuteness of the idea enough to blog about it.

EditArea vs. CodePress

January 3, 2008
5 comments Web development

EditArea and CodePress are two text editors that are run in the browser. They're not WYSIWYG editors and the most important feature it really actually adds is syntax highlighting. First and foremost I think this is a solution to a problem that shouldn't exist: either you go full-on in emacs/vi/eclipse or you don't do any editing at all.

However, if there is a (client) need where you want to allow for source code editing in the browser, either CodePress or EditArea is probably the way.

I seem to remember a EditArea implementation for Zope which replaces the dumb textarea tags in the ZMI for Python Scripts which was a neat idea but I quite quickly turned it off and went back to the plain vanilla solution. My beef with it was simple: speed. It takes almost more than 2 seconds to load it fully and the browser feels unresponsive for a quite a few seconds even after it's fully loaded. And unlike emacs/vi/eclipse, in a web browser the reason you're editing code is probably because you're jotting down a quick hack or editing a tiny detail. Neither activity means that you keep the editor open for a long time.

Truncated! Read the rest by clicking the link below.