• Election day!

    Well it’s election day. We won’t know the results of the European parliament elections until Sunday and there weren’t any local elections happening here, so there is a gap before we know what happened. The exit polls can now be published though which may make interesting reading. I took part in a yougov poll early this morning and that’s one I’m interested in reading. As I write this there are about 2 or 3 hours until tomorrows newspapers become available which will probably print the exit polls.

    I think the European parliament elections tend to have an odd feel to them because the parliament is so far away politically and geographically. I think the turnout is estimated to be between about 25% and 30% which seems ok. More needs to be done to get people to vote though. And not, as I said before, by changing the system. People should want to vote, not vote because it’s suddenly easier.

    On a side note I managed to loose my polling card, but the nice people at the polling place were able to look up the correct details so everything worked well. Not many people there when I went, which was about 5.30pm, but I heard that some polling places experienced late rushes after people got back from work. At 5.30pm there were still four and half hours remaining until close, so plenty of time at that point.

  • New day, new thoughts

    Well, I feel much better today. I’ve thought about it a bit more and I realise how very lucky I was that I found about the bug before the thing got a public release. I’m already working on some ideas on how to fix it. More on that as I think it up.

    This really shows the importance of testing stuff. So thank you to everyone who has tried SQLEditor in its various versions.

  • Mac OS X 10.3 problems

    Yet again the fact that I’m developing on Mac OS X 10.2.8 is causing problems. Bruce tried out a copy of SQLEditor (Cocoa) on 10.3 (Panther) and it doesn’t seem to work at all. You can’t seem to add objects to the canvas which is the key requirement. Most of the other functionality is based on this particular activity. I’ve looked quite carefully at the code and I really can’t see where the problem is. There isn’t anything odd going on.

    This is really bad news, especially after the previous problems that occurred with the java version on 10.3 (which was the reason I wrote a cocoa version in the first place). I’m really not sure what to do.

    This has made me a bit depressed because I’ve been working really hard on SQLEditor recently to prepare it for release.

    It’s really annoying that there isn’t better compatibility between Mac OS X versions.

    I’ll try to write some more about what I’m going to do about this tomorrow.

  • Beta release schedule

    Yes, I know I said Sunday or Monday for the new beta. But instead I’ve been fixing more bugs and various things. So it should be better. There is now a new way of showing foreign key links which adds shading to the source and destination of the link. There is also an option to disable internet version checking and a new facility that catches connection failures so you don’t keep getting error messages if there is no internet connection available at all.

    So the new beta version is coming soon, really it is, honest. Really and truly.

  • Election time again

    Good news everyone!

    It’s the European parliamentary election on Thursday.

    Given the amazingly high turnouts of previous european elections (perhaps as much as 25% last time), I’m sure the effect on democracy will be significant.

    Or perhaps not.

    The elections here use a proportional representation system which is relatively complicated to understand anyway.

    In addition many areas of England have adopted entirely postal ballots. Postal ballots are inherently less secure as a means of voting. It is obvious that making people vote in person at a fixed location overseen by election officials is going to be more secure than sending out pieces of paper, getting people to fill them in and return them by post.

    The most obvious thing is voter inducements. What is to stop a crooked party from offering inducements to people to vote for them. For instance offering a cash sum to anyone willing to fill in the form and then show the completed form to a party agent.

    I believe the majority of people to be honest enough not to do this, but most people aren’t voting in this type of election anyway. If the small, dishonest element, can all be persuaded to vote in this way then I greatly fear for the state of democracy in this country.

    Given the overwhelming advantages in security for polling station based elections, why are postal voting schemes happening at all?

    Some people say that postal voting is cheaper, but democracy should not be cheap. If we want a democracy we must be willing to pay for it.

    Another reason is that of turnout. The claim is that postal voting will increase voter turnout. I’m somewhat sceptical of this idea. If people are unwilling to take 20 minutes out of their day to vote at a polling station then why should they take 10 minutes out of their day to vote by post, especially given the requirement to find an unrelated person to counter-sign the document.

    We will of course see if this all postal ballot does increase turnout. I will be somewhat surprised if it affects things significantly.

    An important point to note here of course is that previous elections cannot be used for comparison. Only other (similar) regions that are not using postal voting.
    Turnout in elections is to some extent driven by the political mood in the country and so it is probably not correct to compare turnout figures between elections and state categorically that changes in election technique have changed turnouts.

    The real reason for poor turnout of course is a lack of excitement in the political process. People are not inspired by their politicians. When the choice is between three different gray suited men with policies that differ only in the details of the third footnote, why bother voting at all?

    Forced voting is definitely not the answer. Some have suggested it as a solution but not voting is a choice that must be respected. Some people do not wish to vote as a protest, others may have other objections. Forcing people to vote seems to me to be anti-democratic and quite wrong. In practice in tends to lead to spolit ballot papers. There is also no particular evidence that it leads to better results. It also has overtones of communist countries where the glorious leader achives 102% of the vote against a turnout of 109%.

    The government needs to be educating people more about the importance of voting. People also need to be told about the significance of the European parliament. It is the highest elected body for all european countries, yet it is hardly discussed at all in newspapers or television news. There is no regular coverage of the chamber, little understanding of how it works and no clear idea of what it actually does. This has to change.

    We are either in Europe or we are not. Since we appear to be in Europe, we must either accept the situation or act to change it. We cannot just ignore it and hope that it goes away because it won’t.

    That is not to say that I am an anti-EU person. I simply wish for people to understand the great importance of the European parliament to the lives of everyday people across Europe.

    So the key points:

    • Educate people about the role that the EU plays in their lives. It is more important than many people think
    • Say NO to postal ballots. Corruption is almost inevitable
    • Encourage people to vote using education campaigns, but don’t make it a crime not to vote
  • Create a low end database program

    Punkish made the suggestion in one of the comments (actually the only comment) back on May 29th about adding an actual database to SQLEditor and turning it into a database program. The more I think about this the more I like the idea so it may end up happening. Although it will be a separate program from SQLEditor. SQLEditor will continue as it is because I need it that way for various projects myself.

    BTW: The new cocoa version of SQLEditor is about to be released into public beta. Probably either today (Sunday) or tomorrow (Monday).

  • Popup cat and mouse

    Can’t stop the pop-ups | CNET News.com

    The cat and mouse game between web site publishers, advertisers and site visitors continues. The latest thing is popup adds that avoid getting hit by popup blockers.

    I’m kind of preferring either regular banner ads or the type of ad that appears in the main window before the page. In one way if I see an add that takes up the whole page I surely more likely to look at it, and it doesn’t affect the body of the actual page itself. Yahoo groups is using this type of ad quite a bit and it doesn’t actually seem as annoying as the floating adds I get elsewhere. Salon.com allows you to get a free membership if you watch a longer in window ad. I think for premium content this could well be a step forward.

    I guess people are different but maybe if sites asked what kind of ads people wanted it might be useful information. Maybe some people would like banner ads in the middle of articles, while others prefer floating ads that cover the story and then disappear. A third category might really like popup ads. (Although I’m not sure why).

    Advertising is fairly necessary for free access content so it probably isn’t going away. I think the important thing is for people to see it, yet for it not to be too annoying.

  • Overlapping NSViews in cocoa

    One thing that is desperately obvious when rewriting a java application to cocoa is overlapping views. In java you can often overlap swing components as long as they are lightweight (not operating system controls for instance). The cocoa documentation says that you shouldn’t overlap view components. This presents something of a problem obviously. How do you make such a significant change?

    Currently SQLEditor uses NSViews for it’s onscreen rendering, however since the tables and comments can be freely dragged around there are three possibilities:

    1. Use overlapping views and hope that nothing serious happens
    2. Don’t allow views to overlap by restricting the ability of the user to drag them around
    3. Rewrite the display code to use some other class instead of NSView and render the objects by hand

    I’m still thinking about the best way of doing this. (1) is the current solution, I don’t like (2) and (3) looks like lots of work.

    I think the best plan is to find out if (1) works on 10.3 and go from there. One approach that I am seriously considering is to rewrite the container class instead and continue to use NSView subclasses for the subcontainers.

  • Static vs Dynamic content on websites

    One of the big things over the last few years in websites has been the rise of dynamically generated sites. Instead of writing each page by hand developers use languages like php, perl and python to create pages. Websites are written as if they were software programs.

    Microsoft in particular makes it very easy to produce sophisticated websites. The .net architecture allows you to deploy programs in different ways and makes it easy for you program to become a webpage by writing a few new forms and connecting the dots together.

    But should web pages be programs?

    Obviously there are some things that must be dynamically generated: Shopping carts, interactive content, online games, etc. But there are a lot of sites with fairly static content that are using dynamic systems. Why?

    The answer is pretty simple. It makes life easier. With dynamic content sites you can reuse bits of code really easily. Need a common toolbar? Add a line of code and it appears. Need to produce 5000 different product pages? Write a template that grabs data from a database.

    But is this really the right way to go?

    The main problem that always hits dynamic sites is performance. If you invest enough you can get excellent performance, but it will not usually be as efficient as writing a site using static HTML pages. The static page has to be read from disk and sent to the browser. The dynamic page has to be read from disk, the program executed and the result sent to the user. The program execution time might be significant and various things may make it slower yet, particular if there is a database involved. This tends to affect scalability more than raw performance. The overhead of serving a single page to a single user is unlikely to cause problems no matter how inefficient. If you’re serving a page to a million visitors then scalability is very important.

    As so often happens in computing there is a tradeoff. You can cache everything and you might get better performance but you have to store it and manage it.

    This is more useful in some situations than others so you have to really think about what exactly you want to do.

    There are also strategies like pre-compiling scripts and code accelerators that can help by reducing the execution time of the dynamic pages. This approach can be extremely sucessful if you need dynamic content.

    So the question to be answered is: how dynamic do you need the site to be?

    Many sites that I visit are much more dynamic than they need to be. Some of the sites that I’ve created myself fall into this category.

    If the content isn’t changing for each user then you have to ask whether a dynamic approach is correct. In many cases it probably isn’t.

    This is especially true of news sites. Many news and commentary sites I visit use dynamic page generation. Yet they aren’t customizing the page for me at all. Are the adverts customized? I guess they must be, but advertisers handle advertising in their own way whether the page is dynamic or static. The main body of the page isn’t changing.

    Of course for all I know the sites may be using some kind of internal caching system (and I really hope that they are). But it becomes clear that many are not. Witness how many sites that get slashdotted go down with database errors. (As this one would probably do if the link ended up on slashdot. WordPress doesn’t seem to cache anything, although I think there is an output cache plugin which I’m hoping to try soon)

    One approach that can be used quite sucessfully is a hybrid system. Pages are produced using a dynamic system and then rendered statically. This reduces the overall load considerably because the page is only rendered once. It saves storage because only pages that are actually viewed need to be cached.

    If you ever get really stuck and you know you’re about to get slashdotted or something there is sometimes a simple solution. If works if you’re using php, you need immediate caching and you have a site structure using directories (e.g /pagename/). You can use wget to grab a static copy of the page and save it as index.html. This will usually cause apache to display the static page instead of a dynamic php page. Although you have to remember to delete the index.html file before making changes to the dynamic page.

    Of course the best approach is probably a reverse proxy cache. But that’s a bit much for most sites.

    So the key conclusion is: make your sites only as dynamic as they need to be.

    [This entry has been completely rewritten from the prevous version by AngusHardie]

  • SQLEditor Beta 3 (kindof)

    SQLEditor Cocoa Beta 3 is making good progress. The only things remaining for the current beta are:

    • Finish the menu handing
    • Write some help

    It now pretty much supports importing java version saved files although it’s still having trouble with foreign key support. Which is annoying me a bit but I think the current stage is reasonable to go on with until I can devote a bit more time to it.

    Next step is probably to look at implementing more SQL structures and improve compatibility with the standard. I’m particularly interested in developing view support.