Web colour and testing tools

Posted by Graham Stratton Thu, 02 Feb 2006 13:01:00 GMT

Today I came across this excellent colour scheme generator

Earlier I came across a company called Browsercam who allow you to view your website rendered in a variety of browsers and operating systems. What might be nice is if it could tell you whether the block layout was the same between them.

no comments

Cool web development tools

Posted by Graham Stratton Wed, 01 Feb 2006 11:08:33 GMT

A link

no comments

Access keys

Posted by Graham Stratton Mon, 30 Jan 2006 18:50:00 GMT

Accessibility is an issue for many groups, and one which is often neglected is those with motor difficulties, which often makes control of a mouse hard.

One way of making life easier for such people is to have access keys to enable easy navigation: keys can be associated with the most common links, and py pressing alt-key under windows, or control-key on Macs, navigation can be easier.

The main problem is how to know which key is associated with which link. I have seen sites which underline the matching letter, in the same way that menu systems often do, and another site where the access key letter was a different colour.

Here is a good article on Access Keys

no comments

CSS layout

Posted by Graham Stratton Mon, 30 Jan 2006 17:44:00 GMT

I’ve spent most of today trying to get some CSS to do what I want. It shouldn’t have been that hard, but it was. I found that someone else had the same problem last year, and the conslusion was that there is not solution.

The problem is, when using a fluid design, to produce a page with a header. The header has an image on the left, and some text on the right which is aligned with the bottom of the image.

There are a number of ways of nearly achieving this, but none of them work if the text on the right won’t fit on one line. The problem is to find the one which fails in the least offensive manner.

If you try to use vertical-align to align the image and the text, then you can’t put the text on the right.

If you position the box on the right absolutely, then the text will go straight over/under the image when it gets too wide.

If you use float:left for the image and float:right for the text, then you need to push the text down somehow to line up with the bottom of the image. If you add a large margin above, then when the text gets too long and jumps to below the image, there’s a massive gap. If you put an empty 100% width div above the text, then that does work, except in IE, which renders the 100% width div below the image. Which I can understand. I’m not even sure why it isn’t meant to.

A good fluid design site is HTMLDog. See this inspriring floats tutorial.

no comments

fcgi fun

Posted by Graham Stratton Mon, 23 Jan 2006 10:56:00 GMT

I’ve been trying to set up Rails with fcgi using mod_fcgid and apache2 on my debian-based system.

I had a load of errors that looked like this in my Apache error log

[error] (13)Permission denied: mod_fcgid: couldn't bind unix domain socket /etc/apache2/logs/fcgidsock/1534.5
[warn] (13)Permission denied: mod_fcgid: spawn process /home/graham/public_html/blog/dispatch.fcgi error

I solved this with

sudo chmod 555 /etc/apache2/logs/

The apache log then said

[notice] mod_fcgid: server /home/graham/public_html/blog/dispatch.fcgi(1814) started
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__': no such file to load -- fcgi (MissingSourceFile)
So, I need to install ruby-fcgi. There is no debian package, but just do
sudo gem install fcgi
assuming ruby gems is installed.

Comments about

`require': no such file to load -- mkmf (LoadError)
mean that you didn’t install ruby-dev.

Death during
checking for fcgiapp.h... no
means libfcgi isn’t installed:
sudo apt-get install libfcgi
sudo apt-get install libfcgi-dev
sudo apt-get install libfcgi-ruby
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__': no such file to load -- rdoc/rdoc (LoadError)
means that I never got round to installing rdoc:
sudo apt-get install rdoc

Now everything installs! However, there’s still an error at runtime about not being able to write to fcgi.crash.log So I set the log in dispatch.fcgi to something writeable, but it doesn’t put anything useful there. Apache just returns a server error and there are segfaults in the apache log.

The remaining problem was presumably that the application couldn’t connect to the database (not sure that should result in a segfault), since starting it in production mode worked!!

Posted in  | no comments

mod_fcgid fun

Posted by Graham Stratton Sun, 22 Jan 2006 12:52:00 GMT

Since lighttpd seems to be the recommended way of running Rails applications, but I can’t find any evidence of anyone using it to host Zope3 applications, I need another solution. mod_fastcgi is apparently buggy, so mod_fcgid is currently recommended. To install it, follow the instructions at http://paul.querna.org/journal/articles/2006/01/01/using-mod_fcgid-for-ruby-on-rails-applications You’ll need apache2-dev, if it’s not already installed.

Posted in  | no comments

Optimizing rails

Posted by Graham Stratton Sun, 22 Jan 2006 12:23:04 GMT

Here’s a useful article about optimizing rails for a production environment: http://deezsombor.blogspot.com/2005/10/sort-of-fixing-rails-memory-usage.html

no comments

Suspend to RAM on C840

Posted by Graham Stratton Sun, 22 Jan 2006 11:50:38 GMT

Someone has reported that the instructions at https://wiki.ubuntu.com/HoaryPM work for getting suspend to RAM to work on a Dell Latitude C840. I’ll try it with Breezy and report what happens.

Posted in ,  | 1 comment

Zope 3.2 install

Posted by Graham Stratton Fri, 20 Jan 2006 11:10:00 GMT

Installed Zope3 3.2 this morning, as a replacement to 3.1c3 which I’d been running before. The major change, which should be transparent, is that 3.2 is based on Twisted instead of Zope’s own Zserver.

Apparently there’s also a test browser built in, so I’ll have to have a look at that.

I thought the install would be trivial. Then I discovered that Ubuntu doesn’t even contain make as part of its default installation. I seem to spend a lot of time installing things which aren’t part of the default Ubuntu, but which were included in Knoppix.

Then I got
unable to execute gcc: no such file or directory
Excellent. Now, gcc-4.0 is installed, so do I symlink to that, or do I install 3.4? Or 3.3? I go for the symlink. I try to run make. I get a stream of errors resembling the Mississippi in flood, starting with something about not being able to find limits.h Now, I guess that’s either a kernel header or a python header. Let’s try installing python-dev. Nope, still drowning in error messages. There’s also stdlib.h and assert.h missing, so I retract my earlier statement, and try installing libc-dev. I’m getting more nervous every time I type make now.

This time I get lots of

warning: pointer targets in passing argument 1 of 'PyString_FromStringAndSize' differ in signedness

I read it a few times, but it still doesn’t make any sense to me. I decide to ignore it and continue. ‘make install’, and all seems fine. Now what do I do? I think I have to ‘mkzopeinstance’ using the new Zope, and then copy the bits I’d developed (and hopefully the existing ZODB) into the new instance.

I start Zope3.2. It takes a little longer than 3.1 had. It also seems to use 63MB of memory. Now 63MB per instance seems rather excessive to me. Especially since my virtual server only has 128MB RAM.

Posted in  | no comments

Software Advancement Talk

Posted by Graham Stratton Wed, 18 Jan 2006 22:56:00 GMT

In the first talk at the Cambridge group of the SPA, Steve Cook, a Software Architect in the Enterprise Frameworks and Tools group in Microsoft Visual Studio, talked about Software Factories: Assembling Applications with Patterns, Models, Frameworks and Tools.

He started with some figures showing how poorly most projects match up to their requirements. 20% of the American GDP now goes on computing, that’s $250bn. Only 18% of software projects are delivered on time and on budget, and these on average implement 42% of their requirements. Shocking figures? Maybe.

Steve went on to compare the software industry to other types of industry, saying that at the moment it is still really a cottage industry, and the days of mass-production are still to come. Then he said that manufacture was trivial with software (buring CDs), and that it was design that is hard. He said that the software industry doesn’t compare well with other manufacturing industries. I would have thought that The Machine that Changed the World showed that the car industry can’t (or certainly couldn’t) do design efficiently either. Interestingly, the Japanese approach to car design is to get all the stakeholders together at the beginning, so that the design happens without ignoring anyone’s interest. This seems to tie in to some degree with the XP ideas.

The finale of Steve’s talk was the introduction of a facility in Visual Studio to enable simple creation of domain specific languages for certain tasks. Whether these tasks are likely to be performed by different people to those implement the DSL was not clear.

I have to admit being rather dubious as to whether this is often likely to be a useful feature. It is interesting that the Ruby community seem feel strongly that everything should be done in Ruby, and creating extra languages is the wrong way to tackle problems. They argue, that, as in LISP, you should build up the language to your problem, rather than building down to the base level below.

What the talk did not address, which I would have been interested in, is the increasing use of frameworks for developing certain types of application. To me this makes a lot of sense, as generally the outisde bit of applications is the same, and it’s the middle bit which varies. I can’t help feeling that automatic code generation (other than to create a skeleton which you then flesh out) is fundamentally evil, but that’s another issue.

What I consider to be a more interesting way of looking at things is to ask what the minimum amount of information is to describe what we want a program to do. Clearly the programmer is going to have to input that information, but no more (except unexpected exception handling). If we want to say ‘like application x, but with these changes’, then we either need a framework or a library containing the essential bits of application x.

To me, the most interesting thing about the Zope3 and twisted frameworks is that they allow you to do simple things simple and complex things, well, with no more effort than necessary. With low level languages I always got the impression that that was an impossible goal, but fortunately it seems not. Just how clever you need to be in order to create such a framework is another question altogether.

Posted in  | no comments

Older posts: 1 ... 3 4 5 6