Found 63 entries.
After it being a bit mad the past few months, I'm hoping for normality at Christmas and beyond.
It seems I never get that much time for myself these days. Certainly, the past few months has been a bit of a mad time that's for sure as mustard.
Now, I don't usually make New Year's resolutions since I think if you want to change something in your life, you should just do it rather than do it when the rest of world does or because someone says so.
The funny thing being is that there is something I do want to change this year and it just so happens it is almost New Year - I know, I had to make an excuse didn't I?
So what am I going to change? Lately as I said earlier, I've had lots to do and it seems, not much time. I'm going to try and change that.
I want a bit more time to myself. Time to relax and time to do what I want, when I want. I also want to meet up with friends a bit more. To be honest, I am going to have more hours in the day anyway since I have just moved a lot closer to work so that will definately help.
I'm currently away for Christmas and I've been chilling out and relaxing. Reading a book before I switch the light off is something I should do more of but don't. To be honest, I usually end up thinking about something or making something, which means my brain is still wired and I can't sleep (another problem area of mine). These past few days I've slept a lot better so again, that's something I want to change.
Here's hoping that I can chill a bit more in the New Year like I am over Christmas. I know I have organised a number of things over the next two weeks but after that...I hope...it'll calm down for a while!
Labels: resolution, sleep, relaxation, christmas
Inserted: 2006-12-24 21:29 (3 years, 7 months ago)
Zaapt is a small and fast new CMS I am part way through writing.
For a while now I have toyed with a few different CMS tools. To be honest, there are plenty more I haven't played with but of the ones I have, I haven't been very impressed.
Now this post and my new design of a CMS don't have anything to do with the quality of those other CMS's. Quite the contrary and let's face it, the quality is very high. It has more to do with the perspective I am coming from in using and maintaining a CMS. For example, most CMS's are designed to be installed by users who want a website and who don't want to get their hands very dirty with the backend. What this also means is that configuration, design (both HTML and CSS) and plugins are all managed via the web interface.
I don't like this approach.
More importantly however, in a lot (a hell of a lot) of these cases, the people who are managing the CMS don't really know what they're doing. The reason they need this web interface to manage the CMS is because they don't have the expertise to get in via the backend. Unfortunately, this usually means they don't have the expertise for these front-end interfaces either.
I, however, like to get my hands dirty. I certainly don't like web interfaces for this type of configuration - instead I prefer, like and enjoy the command line. I also like source control systems and scripts.
Now I will describe a short lifecycle of using one of the current CMSs.
Let say that a small company (an individual, a friend, a charity, a relation, or whatever) comes to you and asks you for a small website in which they can manage the content all by themselves - a CMS if you will. This approach would work well since they pay you once for installation, you leave them be and they can do the rest themselves! The story then goes that they also leave you alone and you can forget about the whole thing because it just works. It goes both ways.
Except it doesn't quite work like that. Instead this is what really happens.
You tell them that the install went well and they can now start adding content.
But then something happens and it's not so great.
Within one day they've tried changing the layout of the front page, munging the CSS to make the site green instead of blue, installed a forum plugin which doesn't quite work how they want it to along with an FAQ plugin which doesn't work at all. Now it gives unknown errors in the browser window, the CMS's log and the page looks 'a bit funny'. What they are left with is a broken installation, for which they have absolutely no idea how to fix it up and instead have to pay you to correct it for them.
But you don't want to do it since you only ever wanted to install it and be done with it - you didn't even like it in the first place and now you like it even less.
There goes that it just works approach.
That was just a simple example. If the website originally requires an install which has new content types, different design, major template changes or pages with alternative layouts, then you're in even deeper.
So alot of these CMS's are big and can do a lot out of the box. But they're also hairy. Big and hairy don't make nice, easy or beautiful in my book. It can make functional and working but for how long? This is especially true if you vary much from the standard install.
Changing the layout HTML means anguish. Changing the main CSS means pain or starting afresh. Changing the odd page to be different means dead brain cells. Adding functionality means an excercise in self inflicted eye poking.
Also, did I mention that you have to do all of this via a web interface.
So what's the solution?
Well, my approach to this problem is from a programmer perspective. Read on...
If you have to hire a programmer to install, configure and/or fix a system for you, then why not make it as nice for the programmer to do these things pertinent to them as you are trying to make the interface nice for the content manager to manage the content.
This means no fancy web interface for system configuration - the content manager knows nothing of the system. No fancy web interface for changing the layout HTML - what the hell are the content people changing the layout for anyway! No fancy web interface to change the CSS - again, they are content people, not designers. And no fancy web interface to install plugins - what the hell are they ... you get the picture.
You do still have a fancy web interface for managing the content however. This makes sense :-) Adding a new news item, changing the content of a page, editing a blog entry, auditing of comments, addition of links and quotes or a new FAQ entry. These are all content management tasks and that, essentially, is what the website needs to provide and what the content managers need from the website.
So this Programmer perspective CMS, what's in it for you as a programmer?
You get lovely scripts to play with. You get package install scripts which are automatic. You get database patch scripts which just work. You do have to do some minor configuration but convention has given you almost everything you need already. And finally, you get some default HTML templates for the content itself but you get nothing (I repeat nothing) for the site itself. No layouts, no design and certainly no HTML. You also don't get any CSS. At all.
And if you're expecting any more than this, then you're out of luck. You get a couple of examply sites to show what you can do and how you can do it, but that's it. Most of the time, the look and feel of each website is so different, that starting with a default look (added to the fact that it's so hard to change) means that they all end up looking the same - which is no use really. By not giving you anything at all, but instead giving you the power to do anything you want, then you can let you mind free.
You do have to do some other work to setup the webserver and suchlike but it isn't any more work than other CMSs out there.
You have full control over everything and in a way that is easier and more straightforward to you as a programmer. The reason why you understand it better is because you understand how it fits together at the back-end, instead of the more usual black box that you have to control via the web front end. You can also configure it faster since you are within the realm you understand. Not that you'd have to do much configuration anyway. It's a far cry from some slow-ass GUI in which ... [example snipped since it ranted on for too long].
So that's about it. I know I haven't talked technical, but then that's not what a CMS is about. Implementation details can come later.
To summarise, it will be a CMS for programmers which is content managed by users, rather than a CMS for users which is hated by programmers.
At least, that's what I'm aiming for. Wish me luck :-)
Inserted: 2006-12-16 11:12 (3 years, 7 months ago)
This is just a short post to see if my entries still appear on ...
... \[p]{Planet Catalyst|http://planet.catalyst.net.nz/}.
To those of you who don't know, as I said in my last post I have changed jobs. At my old place, \[p]{Catalyst IT|http://www.catalyst.net.nz/}, my entries used to be syndicated onto Planet Catalyst if I tagged my enties with PlanetCatalyst. So I guess now that I've switched jobs, these entries shouldn't appear there - at least that's the theory.
So whoever in Catalyst reads this first, assuming this entry appears, do you wanna remove me ... alternatively, how about having a Planet Catalyst Alumni :-)
Finally, it was nice to catch up with a number of you last night and I'll definately see you again in the New Year.
Labels: planet-catalyst
Inserted: 2006-12-16 11:09 (3 years, 7 months ago)
After a while away in the wilderness, I'm back!
In the past three weeks I have done a number of things:
At the moment I have a shortish timespan where I can update my blog but as I said, I'm still not on the internet at home. Hopefully by next week I'll be back for real - you have absolutely no idea how hard it is to live without connectivity.
So my apologies for the flurry of posts. I have a number of pent-up blog posts I need to get out of my system.
Inserted: 2006-12-16 11:08 (3 years, 7 months ago)
This writing thing is beginning to get bigger in my life.
So here's the deal:
My life is taking a turn I never expected. Looking at it, I've always written things down, but it seems the writing thing is getting bigger and bigger. I would never have guessed.
Although I probably won't specialise in anything; fiction or fact, novels, screenplays or blogs, other random things I want to write about, I'll probably end up just doing whatever makes me happy at that time. Maybe it is just the act of writing rather than the subject matter.
Anyway, to continue my newly found hobby there are a few things floating on the horizon - three to be exact:
The first one is that I'll be doing \[p]{x365.org|http://x365.org/} from my birthday onwards later this year.
The second isn't secret but a few of us here in Wellington are possibly going to put a little something together - to be announced in due course.
The third is a secret and I will let it out of the bag when it is complete :-)
Labels: nanowrimo, writing, x365
Inserted: 2006-11-28 23:39 (3 years, 8 months ago)
After chatting with Travis and Penny, I truely believe that this is one of my best ever achievements.
A lot of people in this world have a list. A list of the 100 things they must do before they die. And in a lot of cases, that list has things like:
Out of that list above, I've done two of them - the first and last. Granted, I walked the final quarter of the Auckland marathon (the wind was against me, see!) but I still did it.
And you know what, doing \[p]{NaNoWriMo|http://www.nanowrimo.org/} and fulfilling the fourth item on that list is about 50,000 times better than running a marathon. At least in my eyes!
So well done to the various people I know around Welly who have also finished it; it's been a great journey, an adventure, funny, hard, crazy, silly, tiring, awesome, completely bizarre and utterly enjoyable - I can't wait 'til next year.
Here are \[p]{Travis|http://cottreau.blogspot.com/2006/11/nanowrimo-2006.html}'s and \[p]{Penny|http://she.geek.nz/archives/331-holy-shit,-I-finished-nanowrimo.html}'s entries about finishing.
So thanks to Travis for pushing me and Penny for pulling me along these last 50,000 words! Phew. I need some sleep.
P.S. I don't have a list of 100 things to do before I die, but if I did, NaNoWriMo would be one of them.
Labels: nanowrimo, penny, travis
Inserted: 2006-11-28 00:14 (3 years, 8 months ago)
I've been taking it easy the past few days though I have also been doing other stuff.
Basically it goes something like this. I was behind, I caught up, now I think I can make it. I'm currently on 44,999 so 5,001 words in the next five days should be easy enough! I have only started writing at about 10:30pm these last couple of days, but hopefully I'll finish by tomorrow night.
Instead of writing, I have been getting back into doing a bit on my site. Some things I've done in the past two days include:
...plus some other bits and pieces.
Also, after chatting with the Wellington Write-In people today, there has been some talk of doing one in June as well as, or maybe instead of, November. For a start it's winter then whereas at the moment, it stays light far too long to be stuck inside all day. Other than that, we had a really good laugh for two hours (hi to everyone that was there).
I guess we'll see how it goes though I'd love to get involved in it again and maybe even do some webstuff for it.
P.S. webstuff is a technical term and if you don't know what it means, you never will!
Labels: nanowrimo, mochikit, mod-gzip
Inserted: 2006-11-26 19:33 (3 years, 8 months ago)
After pulling out all of the stops these past 9 days, I'm now back on track to completion.
The best part about it is that my novel is getting more and more exciting every day I write some. It's been gaining momentum for the past week now and I'm still about 3 days (of writing) away from the climax!
I feel it's just flying off my fingers at the moment, so at least that means I should be able to continue and make the 50,000, especially since the amount I have to write has now come down to below 1,600 per day.
Finally, to all those keeping track of my progress, or any other Wrimo's progress, I challenge you to do it next year. I have already said that this will be one of my most favourite personal achievements so why not give it a go. I know I'm not finished yet, but either way it's been really good and just keeps getting better.
I went along the weekly Wellington Write-In at the library yesterday and one of the other Wrimo's mentioned a few novels which happened to be around 50,000 words. I didn't realise this but when you think of the likes of "The Hitchhiker's Guide to the Galaxy" which you have held in your hand at one time or another, well this will equate to that - if only in volume :-)
When I print it out at the end of the month, I think my smile will be broader than my face!
Labels: nanowrimo, challenge, personal-achievement
Inserted: 2006-11-20 23:21 (3 years, 8 months ago)
At 2006-11-18 03:38.
I'm not sure if I actually woke up when it happened or if I was awake anyway, but this one certainly felt like a big one. I looked at my alarm clock and I remember it showing 03:37, so it must be slightly slow (used to be fine until the power cut last week).
Looking at the Geonet report, it says it was a 5.5 magnitude about 40km south-west of Kapiti which is a pretty big one really and way closer than the previous two I have reported here.
\[p]{Geonet Link|http://www.geonet.org.nz/x2654849g_l.html}
Labels: earthquake
Inserted: 2006-11-18 11:08 (3 years, 8 months ago)
"The Bright Side of Casey Hill" is almost half way.
On my progress report, it says that I did 2316 words yesterday and so far today (we're only 2hr 17mins into it) I've done 1746. Technically though, it was all done on yesterday's date since I haven't been to sleep yet - that's 4062 in total!
But,.. if I think about it in a different way, it means I got higher than what my projected average was yesterday (by 196 words over 2120) and I'm already within 358 words of today's projected average of 2104.
That's really cool,
I figure I can write 358 words in around 20 minutes, so depending on when I get up - and I think I deserve a lie in - I then have the whole of Saturday to start knocking my projected average down :-)
Basically what that means is, since there are 13 days left, everytime I write 13 words my projected average comes down by one. I'm updating my figure regularly now because it is very exciting to see that figure come down...
...but it's even more exciting that we're heading towards the end of the third week and it's looking very good to finish on target.
P.S. \[p]{Penny|http://she.geek.nz/} passed 25,000 today, so congratulations Penny.
P.P.S. Travis passed another milestone at 35,000 today too, well done to you too.
Labels: nanowrimo, penny, travis, casey-hill
Inserted: 2006-11-18 02:33 (3 years, 8 months ago)
It seems that I can't think about anything else at the moment.
Take tonight for instance. I was meant to go out from work with a mate for a few drinks. But really, the whole day, I just wanted to come home and write!
I had a good day on Sunday, on Monday I found it hard since I was tired (just did 1,000 words), but tonight I was rearing to go.
And go I did. Again, I've had a good one and managing over 3,000 words has really pushed me back to believing I can actually do this - my expected average of the rest of the days is now under 2,000 at 1,934.
The best thing is though, my novel is getting exciting (hey, this is all from my point of view, so back off).
As I said at the start of the month, I am way out of my comfort zone here, I can't write, my English isn't great anyway but I don't care. I just want to finish this.
For the statisticians amongst you, I'm currently on 19,045 words, which means that I have hit over 101,000 characters on this here keyboard :-)
Labels: obsession, nanowrimo, comfort-zone
Inserted: 2006-11-14 23:22 (3 years, 8 months ago)
I have managed a really good 4100 words today.
The competition between me and Penny is getting better and I think it's good since we are definately spurring each other on at the moment. It's always good to have someone running at near enough the same speed.
When this morning came around, I was on 10842 and am now on 14946, so I've have a belter of a day writing. The funniest thing is, on my \[p]{Progress Report|http://www.nanowrimo.org/NanowrimoUtils/ProgressReport/135623.html}, it has put today's 4104 figure in bold since it considers it an 'outlier' :-)
In their own words, this is a truly exceptional day so I will take that as a compliment as well as taking it with a pinch of salt.
Basically what this means though, is that I'm in a much much better position to actually get to the target before the end of the month. I think I might actually need more than 50,000 words to finish the novel but if I can say I've done the first 50,000 in November then I'll be able to proudly show off my certificate.
Inserted: 2006-11-12 23:12 (3 years, 8 months ago)
So after thinking about it for a while, I did it.
Here's a list of changes I've made:
Finally, I've also added a new 'content' section to the site which now serves up the index, about and credits pages. This way (moreso for the index page), I can change it regularly without having to do code changes and a new deploy.
In all this, I've certainly used a fair few nice Mason techniques including attributes and methods.
And just to get you off my back, I know I should have been writing tonight for NaNoWriMo, but I just felt like a night off!
Labels: mason, nanowrimo, kapiti-geek-nz
Inserted: 2006-11-11 01:37 (3 years, 8 months ago)
So not only did I forget ("I was busy!") but I didn't have the right stuff anyway.
Ah well, only another 10 years to wait for the next one.
D'oH!
:-(
Inserted: 2006-11-10 00:07 (3 years, 8 months ago)
Just so you know how I'm doing compared to the other people I know doing NaNoWriMo.
Of course, this isn't a War of Words, it just for friendly comparison. Anyway, who cares if someone has more or less, it's about getting the 50,000 by the end of the month.
Cool!
Inserted: 2006-11-09 12:38 (3 years, 8 months ago)
For what will be a great spectacle, Mercury is passing right in front of the sun for the 2nd time (of 14) this century!
Having never seen a transit of anything before (Mercury and Venus being the only two we can see from earth), I'm really wanting to buy myself a telescope and solar filter to take a look.
New Zealand is in the \[p]{privileged position|http://news.bbc.co.uk/2/hi/science/nature/6121822.stm} of being able to see the entire thing from Contact I though to Contact IV (\[p]{a good explanation of contacts|http://sunearth.gsfc.nasa.gov/eclipse/OH/transit06.html}).
If my timezone calculations aren't completely off, it should be occuring between 08:12 and 13:10 tomorrow, Thursday 9th November.
Now go out and have a look (but not without a proper filter). You won't be able to see if with your naked eye, but a small telescope should be big enough (again, DO NOT look at it without a proper solar filter)!
After having seen the \[p]{1999 solar eclipse|http://sunearth.gsfc.nasa.gov/eclipse/SEmono/TSE1999/TSE1999.html} from a location giving totality , I find anything to do with the sun to be pretty amazing. At that time, I was working at \[p]{ESOC|http://www.esa.int/spacecraftops/index.html} on \[p]{XMM-Newton|http://www.esa.int/spacecraftops/ESOC-Article-fullArticle_item_selected-6_12_00_par-33_1069167510361.html} so that made it extra special. BTW: we did our LEOP procedures from the \[p]{control room|http://esamultimedia.esa.int/multimedia/esoc/virtualtour/content_full.html}.
But still, my favourite things about the sun is the images that \[p]{SOHO|http://sohowww.nascom.nasa.gov/} has been taking.
Labels: xmm, mercury, solar-eclipse, esoc, space
Inserted: 2006-11-08 13:53 (3 years, 8 months ago)
It's Friday, it's 1am, I'm tired and I'm wearing sunglasses.
Okay, I'm not wearing sunglasses, but the rest of it is true. I'm now on 5578 which means I'm 578 words ahead of schedule. This could be a good thing because this month is shaping out to be extraordinarily busy,
Here's to show my support of \[p]{NaNoWriMo|http://www.nanowrimo.org/}:
I'm going to try and wake up tomorrow morning with more writing in me, since from about lunch time, I'm out the whole day until late.
Inserted: 2006-11-04 01:04 (3 years, 8 months ago)
I'm off to a good start, but there is so much more I need to do
On Tuesday evening when I was in bed, I couldn't get to sleep because I was thinking of NaNoWriMo. When I turned over, I saw that the clock was 11:57. Three minutes later it turned 12:00 and I started to get excited again.
Lieing there, I swear I could hear the faint tapping on keyboards all around New Zealand seeing as we're one of the first to start!
So Wednesday was the big day. I didn't really think about it much in the daytime, but on the train home, I finally plooted out most of the novel. In the evening I filled it all in before I started the actual writing which came much later.
By the end of Wednesday though, I had managed 1769 words which I was quite pleased with.
Thursday I was busy with other things but managed another thousand between 10:50pm and midnight, which I thought was good going. I'm currently on 2745.
So far, so good, though I have to do at least two hours tonight and lots more over the weekend.
BTW: Many thanks to wc -w novel for helping me out with the counting :-) I mean, it was crap in school having to count all your words for an essay wasn't it?
Labels: nanowrimo
Inserted: 2006-11-03 21:21 (3 years, 8 months ago)
And I still don't know what I'm writing!
November is upon me and after thinking (or indeed not thinking) about \[p]{NaNoWriMo|http://www.nanowrimo.org/} for the past 3 months, it's finally time to actually do something about it. Initial thanks for getting me into this mess goes to \[p]{Brenda|http://www.coffee.geek.nz} (are you doing it, eh?), though I have managed to rope someone else into doing it too (hi Travis).
So far I have decided what the main character's name is - if you must know, it is 'Casey Hill'. Even though I have gone through many changes about the type of novella I wanted to write, I've ended up making it a Science Fiction, though I think (or is that hope) it will be part comedy too. The reason I have ended up in this combination is so that I can make things up, don't have to do much research, and possibly get away with it :-) but not likely.
Apart from those two minor facts, I really don't know what else I'm going to put in it. The main (indeed essential) plan is to write 50,000 words in November and be able to say I've done it. Editing, tearing up of manuscript and open fires made of paper can come later.
Here are some other ideas I've had but whether any of them get into the novel will be decided on the throw of a dice:
And just to complete the list of things I might do, here's a list of things I should do, but probably won't since I'm not a novel writer, don't know what I'm doing, have no-idea why I'm doing it and will have no time for anything else:
(remind me, why am I doing this again)
Tomorrow night I start. Let's go.
Labels: science-fiction, nanowrimo, casey-hill
Inserted: 2006-10-31 23:18 (3 years, 9 months ago)
I've just added support for an archive so that past articles are now browsable.
Once an article has dropped off the front page, it really can't be accessed from this site :-( but only from external links to it.
So, a monthly archive is now available from the left menu.
The CMS also has support for yearly and daily archives as well as monthly ones, in fact, you can put any date and time interval you like (so long as Postgres likes it). Of course, it is restrained by the front end rather than the back-end, so you can't just go making up dates.
As an example, for October, you'd use 2006-10.html and for today you can use 2006-10-29.html.
Enjoy.
Labels: archive, kapiti-geek-nz, fli
Inserted: 2006-10-29 00:32 (3 years, 9 months ago)
Not really mine, but a Google Customisation
A lot of times, I want to be able to search photographers portfolios. I chance upon them, but want a way to search them afterwards, to find that picture of a place I've been or a place I want to see.
Of course, being able to do this up until now has been hard.
Enter Google's \[p]{new|http://googleblog.blogspot.com/2006/10/eureka-your-own-search-engine-has.html} \[p]{Custom Search Engine|http://google.com/coop/cse}.
Anyway, I'm hoping that lots of people suggest new sites to add since it has a limited selection at the moment, Apart from the initial list of five sites, I can't seem to be able to add more - though I think they are going through some teething difficulties to be honest.
But it certainly looks promising for the future.
Inserted: 2006-10-24 22:58 (3 years, 9 months ago)
After playing with Amazon S3, I decided to write a little tool to help.
At the moment it is a first cut with no Debian packaging, but so far it has a nice amount of functionality.
You can create and remove buckets, list keys, add files, delete files but the best part is the ability to upload all missing files (in S3) and download all locally missing files.
At the moment, it doesn't do anything if the key exists and is the same name as a local file, but I did have some code to check the MD5 and upload it if it has changed. This gives the problem that you might have changed the S3 files from somewhere else, therefore I will write a 'diff' which will have to be used manually to upload/download the correct version of the file.
Oopse, I'm getting technical. Anyway, for now, it seems to work and does most of what I want. Go take a look at: s3bak at Google Code.
Inserted: 2006-10-22 23:43 (3 years, 9 months ago)
Phliky has had some improvements lately and is now on this server - quick test!
Phliky has had two things added to it recently:
Like this one:
: Coffee: Black hot drink Milk: White cold drink
Hopefully, they should work - fingers crossed. After all, I added nine extra tests to check the lists and two tests to check the definition lists.
Seems to work, except my CSS for the definition list is a bit out. Will be fixed another time :-)
Labels: phliky, css, unit-test
Inserted: 2006-10-10 22:47 (3 years, 9 months ago)
After uploading the executables yesterday, it now has packaging and has the heady status of being release v0.1!
Working with Google Code has been a joy so far. Not only can I use Subversion but I have also been playing with all of their groups pages too.
PgPatcher now has a \[p]{pgpatcher-discuss|http://groups-beta.google.com/group/pgpatcher-discuss} and \[p]{pgpatcher-commit|http://groups-beta.google.com/group/pgpatcher-commit} group each. Every time I commit, the latter group receives an email outlining which files have been changed.
Not only this, but for a different project, Phliky, in addition to the 'Discuss' and 'Commit' groups there is a new 'Issue' group which gets notified everytime an issue is changed in the issue tracker. It has taken a while to set up all these things, but now it's all working, I'm happy.
I guess my next step is to create a debian repository for all these packages.
Labels: phliky, pg-patcher, google-code, subversion
Inserted: 2006-10-10 22:30 (3 years, 9 months ago)
At 2006-10-09 11:05.
I was in my lounge again on the phone to my brother. It was a very short sharp shake though I wasn't too sure if it was just a wind blast or a quake. It kinda freaked me out since it was late though I said to my brother that I should check geonet. Sure enough, here it was...
\[p]{Geonet Link|http://www.geonet.org.nz/x2636389g_l.html}
Labels: earthquake
Inserted: 2006-10-10 12:26 (3 years, 9 months ago)
They have been uploaded to the Google Code repository for initial viewing.
Now that I have polished up the executables (bugs to be found), I will start on the rest of the repository, including the packaging.
They already have documentation in the form of POD and the packaging will make the man pages from them. There is also an example set of patch files which can show how PgPatcher and PgCreatePatch can help patch PostgreSQL databases.
Anyway, there are still things to write up about it all, but the first stop should be the PgPatcher Index page.
The original version of this script was written by Martyn Smith around a year ago. It was generalised and polished by me and after swearing I didn't like SF, finally decided to release it since Google Code is a lot nicer.
Happy hacking!
Labels: postgresql, pg-patcher, google-code
Inserted: 2006-10-10 00:21 (3 years, 9 months ago)
After being up and going for a few months, my first comment spam appeared. Time to brace myself...
I'm sure more and more will come, though at least I can reject it easily enough.
All the comment contained were a load of links to dodgy medicine (and non-medicine) based 'performance' enhancers etc etc Not that the links would show since I HTML-escape the comments, but still you could read them.
Which leads me to think I need another feature in my blog software. Once a comment comes in, I can either accept or reject it - generally I accept. This is just a status column in the blogs.comment table.
This leads me to think I'll add a delete button too. Even though the 'reject' works functionally (ie. it doesn't show the comment on the page) a 'delete' will also stop it taking up space in my database.
Not that I'm short of disk space (wouldn't that be bad), just that I'd rather it didn't exist at all.
Inserted: 2006-10-03 13:18 (3 years, 10 months ago)
After three attempts last week and failing miserably, I finally added multi-level lists to Phliky. I'm on fire!
It's Sunday night, I've been hacking and ripping the rest of my CD collection all day (minus the tip trip and the face food stuffing) and I'm finally ready to go to bed in peace...
The reason why is that I finally added multi-level lists to Phliky. I have numerous automated tests to try it all out and my previous efforts were all failing on the 2nd half. This time, I added some code and ran the tests ... it was perfect.
I even added one more which was a little weird and it still worked. I'm not going to release it onto this website yet since I'll probably make a v0.2 for it and I'll try it out another time.
Now I need sleep but can rest happy I've cracked it.
Inserted: 2006-10-01 23:32 (3 years, 10 months ago)
...or should that be 'Unleashed'
About a year ago, I wrote a progam called PollPod which I uploaded to \[p]{SourceForge|http://sourceforge.net/}. It did what I wanted and more, but with not really liking the SF interface and the fact that I didn't have an MP3 player, I let it rot. A little, okay, maybe a lot.
Since I bought my Sandisk Sansa e270, I decided to give it a bit of spit and polish and resurrect it for use on my new toy. Now it is simpler, has a proper manual and even better than all that, has Debian packaging :-)
So I had registered the PollPod name at \[p]{Google Code|http://code.google.com/p/pollpod/} (and accepted the transfer from SF (which worked fine). After a few days of cleaning up and clearing out, I have now uploaded v0.1 and created a branch and tag for it - oh how \[p]{Subversion|http://subversion.tigris.org/} is so nice compared to CVS.
Anyways, head over to the previously mentioned Google Code page or take a look at the \[p]{PollPod Discuss|http://groups.google.com/group/pollpod-discuss} or \[p]{PollPod Commit|http://groups.google.com/group/pollpod-comit} lists.
Right then. After a good day of getting myself together and uploading it all, I'm off to listen to \[p]{Chris Evans|http://www.bbc.co.uk/radio2/shows/evans/podcast/}!
Labels: sansa, google-code, poll-pod
Inserted: 2006-10-01 22:17 (3 years, 10 months ago)
After adding trackback to my blog code, I haven't yet enabled it. And I still need to add some trackback code to the admin side...
...tsk tsk.
I really need to get to it, though it has been a mad week or so back in New Zealand. This weekend, I promise.
Oh, and the other thing I need to do is add an archive for my blog...bugger. I really shouldn't think about these things 'coz otherwise I'll just find more and more things that need to be done.
Labels: trackback, kapiti-geek-nz
Inserted: 2006-09-27 19:57 (3 years, 10 months ago)
About a month ago my server had network problems and I lost my Google Juice. Now I want it back.
For about 4 days my site was inaccessible and straight away Google showed that there were less pages indexed from my site. At the moment of course, I have very modest statics since the site has only been going a couple of months, but it said at one stage that about 50 pages were indexed.
A few days ago, it said that about 20 pages were being indexed and now it's up to 30.
There may be another reason for this though and I suspect my server outage was a bit of a red-herring. In between these times I have been away and had only updated my blog the once, so I suspect that was also partly (mostly?) to blame.
So the moral of the story is "though shalt update the website regularly" - which we all kinda knew anyway. Best to learn it the hard way I suppose.
P.S. Just found the term "Google Juice" on \[p]{Jeremy Visser|http://narnia.bounceme.net/jeremy/2006/09/27/downtime/}'s blog which prompted me to write this.
Labels: google, easy-speedy
Inserted: 2006-09-27 19:54 (3 years, 10 months ago)
I didn't want an iPod, that's why.
For a while I waited since I wanted to get one of the new Sandisk Sansa e270's, but still it didn't seem to come out and it was a bit pricey. I held out since they looked so much better than the iPod Nanos.
But now it seems that they went a bit far and from this article on \[p]{Engadget|http://www.engadget.com/2006/05/22/sandisk-wants-you-to-say-idont-to-ipod/} I found that they had created a site called \[p]{iDont.com|http://idont.com}. Personally, I chose to go against iPod for my own reasons though I don't think they should say it themselves since, as the Engadget article says, it smacks of being a poor loser - not that they are, since I think eventually they will catch up on Apple (though probably never take over).
As for the site, I don't have Flash installed so basically my opinion of it is fairly low. And who thinks the little monster thing looks like the \[p]{Telecom|http://telecom.co.nz} mascot (sorry, can't find the picture I want).
Added to the fact that they wrote it in PHP...\[p]{need I say more|http://www.lethargy.org/~jesus/archives/68-PHP-Sucks..html}.
Inserted: 2006-09-26 22:56 (3 years, 10 months ago)
After hearing some random people shout their passwords out, we as Programmers (and other IT peoples) should set a good example.
Recently, in my travels (in the travel agent), the lady serving me was unsure of how to book a couple of gnarly tickets, so she called one of the other staff members over. She had to log on to a new system to do it and was told, right in front of me, the username and password of the system. Further to this, I saw the web address of the site and was blatently public facing. I had all the details to be able to log on!
I told here that I would try and 'forget' those details straight away. She knew I worked in IT and said "I guess you forget them all the time with having so many with your type of work". I said "Quite the opposite, it's exactly those sorts of things I remember". I was quite shocked at the plain inability to understand what passwords are actually used for - not that their password was any good anyhow.
Another time on my travels on the train, two school girls were talking about doing their homework on their parent's computers. One stated that she tried for an hour to log in to her Dad's machine by guessing the password. In the end she realised that no password had actually been set! This isn't so major, but it does make you think.
These two examples obviously show that we still need to educate the people regarding the security and effectiveness of having a good password.
It seems that most of us IT people know what constitutes a good password. You know, the usual no dictionary words, mixture of letters, characters and symbols, of a reasonable length and of course the old favourite, don't write it down.
But at various times (usually working with other systems) I have had the misfortune of coming across a list of usernames with their respective plain-text passwords. I mean come on, if we expect users to be sensible with their passwords, then we also have to be with them too.
Over the past year or so, I've changed the way I deal with passwords. Originally I would get the password and do an MD5 hash of it prior to storing. This seemed good at the time, but it's not really since a lot of people still use dictionary words and with sites like \[p]{md5 reverse lookup|http://md5.crysm.net/} around they can sometimes be figured out if the hashed passwords get into the wrong hands. Try this \c{\[p]{8b1a9953c4611296a827abf8c47804d7|http://us.md5.crysm.net/find?md5=8b1a9953c4611296a827abf8c47804d7}} for starters.
The next stage in my password adventure, I started hashing the password with a 'seed' string. As an example, if the password entered was 'TryMe' and my seed was 'Xg7*e#q!', the hash would use 'Xg7*e#q!TryMe'. This helps, but these days modern computers can reverse engineer the hash within a reasonable length of time, especially if it isn't that long. Armed with the reversed password of a few hashes, the seed (whether tacked on at the start or end) can be figured out and then used to reverse engineer the others more quickly.
Recently, I've taken it a step further and now use both a common seed of random letters, numbers and symbols 8 characters long prepended to the password, followed by another 8 random characters which are unique to that user. This way, even if the common seed can be found by reversing a few hashes, the random characters at the end both lengthens the password and makes sure that dictionary attacks don't suceed. Therefore, unlike the previous example (where a lookup table can then be used), to retrieve each and every password a very lengthy reverse engineering process would have to be undertaken.
As a quick example, if the common seed was as above, the string to be hashed could look like 'Xg7*e#q!TryMekP)i$dYn'.
This is where I'm up to at the moment and I'm a lot happier for it. I'm sure there are probably more ways of doing it to strengthen the password encoding so if anyone has any more hints and tips, I'd be happy to hear them.
But more importantly, let's finally start handling passwords with as much care as we tell our non-computer literate friends and family.
Labels: password, planet-catalyst, md5
Inserted: 2006-09-23 00:29 (3 years, 10 months ago)
After a month away, I'm back and ready to start posting again.
I have a few topics to write about in the next few days, so instead of getting them all out at once, I'll spread them out. Anyways,... my first one will probably be tomorrow since I'm very tired. I know, I'm a wuss.
Inserted: 2006-09-22 23:46 (3 years, 10 months ago)
After 3 days without a good coffee, I'm in need of one. I'll even code...
After 3 days without a good coffee, I need to take desparate measures. I may code, if necessary.
Wellington airport gave me a good coffee from Fuel.
Sydney airport gave me something I'd expect on the flight itself. I tried it, and tried it again, then left the rest - it was not worth it.
Hong Kong airport forced me to go to Starbucks, which I didn't really want to do, but kinda had to. It was okay.
Since being in London, I wasn't in the situation to get one and on the way up to Liverpool, the motorway service station had them for the (converted) rate of $7 a pop. I declined buying one.
Hmmm, maybe I'll not get a good one for three weeks. Maybe this is the time to give up completely, as I have been thinking for a while - I drink too much.
Inserted: 2006-08-27 09:40 (3 years, 11 months ago)
Taken 2004:04:25 16:31:13:

WPoW 0006
Inserted: 2006-08-23 07:49 (3 years, 11 months ago)
So I did it on Saturday and had to wait until Tuesday evening to deploy.
As you know, my server hosting company took the Mick and had routing problems for 4 days. It's hard to go over and fix it yourself when you are in New Zealand and they are in Denmark,
Anyways, now that I have access to my server again (and hence my web admin, my email, my SVN and other stuff) I have updated the site to add trackbacks.
Currently, the DB changes have been made, the site calls the Perl Modules at the backend to display the trackbacks, the admin displays and audits them, so the only thing left to do is publish the trackback link for each entry...
...but I'm going to use this \[p]{trackback form|http://www.reedmaniac.com/scripts/trackback_form.php} first to test it all out.
Labels: trackback, kapiti-geek-nz
Inserted: 2006-08-22 23:48 (3 years, 11 months ago)
...and not very happy with the downtime... :-(
So \[p]{my dodgy server provider|http://easyspeedy.com} had major routing problems on Saturday. This continued into Sunday. Monday was completely wiped out and I'm back just about the end of Tuesday.
Apologies to anyone trying to get the site but I tried my hardest to get them to fix it - and even when they said they did, it still didn't work.
Now, just to put the other side of the story, I've been using EasySpeedy since March and have been so happy with them, I like them, they were the cheapest I found at the time (and have now found \[p]{ServerPronto|http://serverpronto.com} which is cheaper still - by far) and have, up until now, given me no hassle whatsoever.
I know that these things happen, that either servers might go down, or routing problems happen, but the fact that it took four days to come back is a little disturbing. And when they did say that it was resolved, it wasn't.
Anyway, am I glad I can see these pages again...I've kinda missed them.
Labels: server-pronto, downtime, easy-speedy
Inserted: 2006-08-22 23:16 (3 years, 11 months ago)
Taken [unknown]!

Nice Blue Sky
Labels: blue-sky, mountain, wpow
Inserted: 2006-08-18 20:18 (3 years, 11 months ago)
After reading an article on "Web Navigation", I realise my fundamental flaws in my site's design. An update to be scheduled soon I think.
The article in question is \[p]{Where Am I?|http://alistapart.com/articles/whereami} by Derek Powazek. Even though there are some obvious points in there, it's amazing what you forget, don't think about or just plain ignore.
Whilst reading through the article, I kept referring back to these pages on kapiti.geek.nz. As it turns out, I need to update a few things:
So overall, I give myself about 4/10 and a note from the teacher which says: "Andrew must try harder and not let himself be distracted by others talking at the back"!
Labels: web-design, kapiti-geek-nz, usability
Inserted: 2006-08-18 00:04 (3 years, 11 months ago)
Learning a bit about CAcert recently, I signed up immediately since it "Just Makes Sense". Oh, and I can get an SSL certificate for my server too - for free.
Following on from Andrew's \[p]{CAcert Bandwagon|http://blog.etc.gen.nz/index.php?/archives/7-CAcert-Bandwagon.html} entry, Catalyst IT will very soon (from tomorrow I think) have enough people to fully assure someone, anyone, everyone ... providing they have the relevant ID of course :-)
We'll be a good seed in Wellington to grow the number of assurers and get this \[p]{CAcert|http://www.cacert.org/} wagon rolling in our area. Once we've reached these dizzy heights, we should try to get ourselves onto the \[p]{Assurer Groups|http://wiki.cacert.org/wiki/AssurerGroups} page on the \[p]{CAcert Wiki|http://wiki.cacert.org/wiki/}.
(P.S. Just found an entry on the \[p]{CAcert News Blog|http://blog.cacert.org/} asking for assurers in \[p]{Coventry UK|http://blog.cacert.org/2006/08/159.html} to help them kickstart their area. I might give them a shout since I'll be staying with my brother there in a month or so.)
Labels: ca-cert, planet-catalyst, jms
Inserted: 2006-08-17 21:40 (3 years, 11 months ago)
Or what they say is a "ThinkPad Experience" under Linux.
Well, at least we know the hardware will work. Being able to buy a machine (without having to order a truckfull), from a manufacturer with Linux pre-loaded can only be good news.
See \[p]{ThinkPad T Series mobile workstations|http://www.pc.ibm.com/us/notebooks/thinkpad/t-series/workstation.html}.
Labels: planet-catalyst, linux, lenovo
Inserted: 2006-08-17 11:21 (3 years, 11 months ago)
Taken on 2004:07:04 13:56:21

A Frosty Day
Inserted: 2006-08-15 23:05 (3 years, 11 months ago)
At 2006-08-13 16:29.
I was sitting in my lounge and felt this one. After the initial quick shake, it was a slow rumble...seemed to go on for about 15-20 secs. Nothing too scarey, but the initial shake made the house creak :(
\[p]{Geonet Link|http://www.geonet.org.nz/x2609766g_l.html}
Labels: earthquake
Inserted: 2006-08-13 22:55 (3 years, 11 months ago)
Being able to see at what time a row was inserted or updated in PostgreSQL is easy and can be put to good use.
In Using Base Tables in Postgres I showed how to create tables with inserted and updated times. Until now though, the updated column was exactly the same as inserted, but let's change that. Just to review our base table:
CREATE TABLE base (
inserted TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP
);
Looking at this, both inserted and updated default to whatever the time is at insert. What we want though is to change the updated column whenever the row changes (ie. it is updated). To do this we need to set a trigger on the table which calls a function when each row is updated.
Diving right in, here's the function we need:
CREATE FUNCTION updated() RETURNS trigger as '
BEGIN
NEW.updated := CURRENT_TIMESTAMP;
RETURN NEW;
END;
' LANGUAGE plpgsql;
It's a fairly simple function and basically says to set the updated column of the NEW (or in this case, the updated) row, and return it ready to be put into the table. Further information says that the return type is trigger (makes sense) and it is written in the PL/pgSQL language.
At the moment though, this function is standalone and isn't being called from anywhere. So let's create a simple table and set an updated trigger on it:
CREATE TABLE news (
id SERIAL,
title TEXT NOT NULL,
article TEXT NOT NULL,
LIKE base INCLUDING DEFAULTS
);
CREATE TRIGGER news_updated BEFORE UPDATE ON news
FOR EACH ROW EXECUTE PROCEDURE updated();
We have told Postgres is to run this trigger for every single row that is ever updated in the news table. It runs just before the actual update therefore we can change the values of any fields in the NEW row inside the function which are then reflected in the table afterwards. In our case, the updated row will be changed to be the CURRENT_TIMESTAMP, which is what we wanted.
Try inserting a few news articles and see that for every row you added, the inserted and the updated fields are exactly the same:
INSERT INTO news(title, article) VALUES('Aliens Invade!', '...stub...');
INSERT INTO news(title, article) VALUES('Earth Loses!', '...stub...');
SELECT title, inserted, updated FROM news;
Now update the second news item:
UPDATE news SET title = 'Earth Wins!' WHERE title = 'Earth Loses!'; SELECT title, inserted, updated FROM news;
And we're done. This technique is certainly useful in some circumstances to help you track down what's going on in various parts of your database. Of course there are many more and comprehensive techniques for transaction logging but this is a simple one which might save your bacon one day.
Labels: postgresql, trigger
Inserted: 2006-08-13 18:58 (3 years, 11 months ago)
After a fair bit of work over the past month or so (since when kapiti.geek.nz started), my new CMS is starting to take shape.
Today, I finished off adding the content managed pages as seen in the (sparsely populated) Software section.
The best thing about the new Content type though, is that it fulfilled all of the criteria I want for all the new content types which I will be adding to it. So far, the Blog type (which is used for /random) is mostly there but doesn't quite fit the abstraction I want it to. The DB class is fine, but the display pages are lacking since I'd written them for this site before I wrote them for the CMS.
On the other hand, I wrote all of the display code for the Content type before I wrote anything for this site and it turned out well. Out of the box, the CMS will support 'text', 'code' and 'html' types - weird I know but it proves the concept. Despite this, I assign my pages a content type of Phliky then, in kapiti.geek.nz, I override the display of that particular type and don't have another jot of work to do :-)
Inadvertently, though I guess I am inclined that way, this new CMS pretty much follows the MVC pattern. I'm not always sure that this is necessary but once a project starts getting big, then it's the best way to go and hopefully this one will get bigger.
As an example, the database interface code is written in Perl modules. The admin interface (which could be termed the controller) is written in Perl/Mason and is a part of the CMS code. The View pages have default versions in the CMS code, but can be overridden with the website pages, which is the technique I used to display a phliky type in the content pages. This approach seems to be the way it turned out and the way it will continue to move forward.
Oh and by the way, I haven't yet worked out a name for it. At the moment, the working title is Fli since it is a play on Fly and hopefully should be really fast. If anyone has any suggestions, let me know.
Labels: perl, mason, cms, mvc, kapiti-geek-nz
Inserted: 2006-08-13 01:20 (3 years, 11 months ago)
Taken on 2005:01:02 16:09:58

Forrest Floor
Inserted: 2006-08-12 17:27 (3 years, 11 months ago)
I submitted a sitemap to Google Sitemaps and confirmed that I owned the site. But wait, what's this obscure request...
To try out \[p]{Google Sitemaps|https://www.google.com/webmasters/sitemaps/login}, I firstly had to prove that I was the owner of this site. They gave me a URL of the form http://kapiti.geek.nz/google################.html where each # was a number or letter.
A while after I put the page on the site and Google had verified it, I looked in the server logs to see at what time it had been requested. Immediately after the page was requested, another request for the page http://kapiti.geek.nz/noexist_################.html was also there, which obviously gave a 404.
I think they are being slightly suspicious of servers which return a page for any URL requested which I guess is what the noexist request is to stop. Anyway, that kinda made me smile thinking that my server was doing the right thing.
As for the Sitemap itself, well I used the Perl Module \[p]{XML::Mini|http://minixml.psychogenic.com/} which is quite nice in a funny way. I thought that this Google Sitemap Generator would be good for a module, so I looked on \[p]{CPAN|http://www.cpan.org} - lo and behold, there already is one by \[p]{Jason Kohles|http://search.cpan.org/search?query=Google%3A%3ASiteMap&mode=module}.
Ah well (but that's a good thing).
Labels: perl, google, xml, kapiti-geek-nz
Inserted: 2006-08-12 15:58 (3 years, 11 months ago)
After a short while playing with kapiti.geek.nz, I've pretty much done all the admin interface now.
You might have noticed over the week or so, I have done two main things: (1) I broke the posting of comments on the blog entries, and (2) I added a random quote to the top right.
Well, I've fixed the first and am now using the new admin interface to manipulate the blog and its entries. I also have an admin section for the quotes and for the (RSN) content managed pages.
I'm doing it all in such a way that if I want to re-use all these modules in a future project, I can and do so quite easily. This site is a DAMP site (of course), and after a while playing with different websites, I know what I want, how to do it and most of all, be consistent in my approach. This way future additions are easier.
At first, I wanted the administration to allow many users, with different roles and access permissions, but there are many \[p]{CMS tools|http://www.cmsmatrix.org/} out there which do all this - and they are huge, both in function and form.
My plan is to make something a lot smaller and allow any user to change anything. This means there will be the abilty for many people to log in, but no access rights or roles need to be assumed - everyone has the power to do anything. It will be ideal for personal sites and for small to medium businesses. Even so, I have ideas about how it could expand to fill in all these things, but I'm trying to repell them since that will ruin the overall plan - to keep it small.
Eventually, I will get everything together and release it on this page, but not until I have a few different content types and a consistent approach. There are other things on the way but I won't promise too much for the future.
Look out though for some recipe pages over the next week or so :-)
Labels: cms, kapiti-geek-nz, damp
Inserted: 2006-08-12 01:31 (3 years, 11 months ago)
Sometimes object inheritance gets in the way, sometimes it helps. In this case, a small bit of inheritance for tables in Postgres really helps.
Let's say you require all of your tables to contain columns of the same name and type. As an example, in a number of my Postgres databases, I like to have an inserted timestamp field on every table. This means I know exactly when that record was added - it's like a poor-man's audit.
Therefore, instead of adding the inserted column to every table, like this:
CREATE TABLE news (
name TEXT NOT NULL PRIMARY KEY,
title TEXT NOT NULL,
article TEXT NOT NULL,
inserted TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP
);
You can try something like this:
CREATE TABLE base (
inserted TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP
);
then:
CREATE TABLE news (
name TEXT NOT NULL PRIMARY KEY,
title TEXT NOT NULL,
article TEXT NOT NULL,
LIKE base INCLUDING DEFAULTS
);
Of course, in this particular case, you don't save a lot of typing, but imagine if you had a 10, 20 or even hundreds of tables. You get the idea, but don't stop there. Here's another base table I use which also has a column for updated:
CREATE TABLE base (
inserted TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP
);
Obviously, at the moment, this is exactly the same as the inserted column, but you'll see in the next article how this can be used to show the last time this record was updated.
Labels: postgresql
Inserted: 2006-08-12 00:54 (3 years, 11 months ago)
Taken on 2004:07:04 16:37:46

South Island Landscape
Labels: south-island, wpow
Inserted: 2006-08-10 22:30 (3 years, 11 months ago)
After finding out about Google Code today, I decided to put one of my projects on there - Phliky.
So far, it's going well. I've created the project (\[p]{Phliky|http://code.google.com/p/phliky/}) and organised my repository. In true Google style, it has a very clear interface and is also easy to navigate.
Saying that, the interface is quite sparse at the moment though, but I think that it will be filled out as time goes on. As an example, when you click 'Settings' in the top right corner (to change your Subversion password), there are no links to get back to the 'Project Home' and the other 3 main tabbed pages.
There is an \[p]{Issue Tracker|http://code.google.com/p/phliky/issues/list} and they do mention in the \[p]{FAQ|http://code.google.com/hosting/faq.html} that they created it to be minimal but configurable. Looking at the configuration for the Issue Tracker, it makes perfect sense that you can add your own Open and Closed Status values and Issue Labels (which I guess is the same as tagging an entry). This way, you can make the tracker work exactly how you work, though they do already provide a decent set of defaults.
One great thing about \[p]{browsing the repository|http://phliky.googlecode.com/svn/} is that, as soon as you have commited a check-in, it is already updated with the latest Subversion Revision - no waiting round for the web accessible source to update.
One slight problem I had with the repository though was when I checked it
out using the URL I found, I didn't realise that it was already the trunk -
serves me right for not looking close enough. I'm used to checking out the
whole repository - trunk, branches, tags and all - so I ended up making
trunk/ (again), branches/ (again) and tags/ (again)! Bugger. A bit
of tidy-up later and I was good - am so glad it uses Subversion as opposed to CVS.
Overall then, I'm quote impressed and think that I'll like it even more in the future.
Labels: phliky, html, planet-catalyst
Inserted: 2006-08-10 22:22 (3 years, 11 months ago)
After releasing iPic4You to my family last week, I added the ability to comment on each other's photos - it's gone down a storm
I didn't realise what a difference it would make - but it does. This is especially true because all the people using it know each other which means that the comments actually make sense!
Already I can see the comments turning it from a nice photo gallery, to something a whole hell of a lot more personal - which was the plan in the first place.
Also, it's getting funny already :-)
Inserted: 2006-08-05 23:05 (3 years, 11 months ago)
Taken on 2006:07:23 17:29:42

Sunset over Kapiti Island
Inserted: 2006-08-05 12:57 (3 years, 11 months ago)
Since April, it seems that there has been constant raining - but today is nice.
Which gives me the impetus to head out and finally get started on my wpow. That means Wellington Picture of the Week. Now, I'm not going to post a picture every week, nor will it be of Wellington necessarily (and once it has been happening for a while, no-one will remember what wpow means anyway.
So yeah...laters.
Labels: photo, kapiti, wellington, wpow
Inserted: 2006-08-05 12:24 (3 years, 12 months ago)
Having played with CSS using other people's styles, those of my own and those already existing, I had a thought the other day about how I would try it next time.
Even though CSS is supposed to stop us from putting layout details into the HTML, it has it's own layout v style problem. Take, as an example, the following CSS:
div.content {
margin-top: 3px;
color: #333333;
}
This, in my opinion, actually contains both a style (the color) and a
layout (the margin-top). I know that CSS is supposed to be all styles,
which is why it is in the accronym, but sometimes it gets in the way too.
As an example, on a rather large site I have been working on, there are quite a few different pages which share some generic styles but can vary greatly in the layout. It is a very data driven site rather than a content site, therefore, there are lots of finicky bits to help certain data stand out. The above class only contains 2 styles, but for some of these screens there are many, many more styles.
Recently, I've been thinking of a new approach to this problem. On a smaller website I recently completed, in a lot of cases I was assigning 2 or more classes to each of the HTML elements. Sometimes these were each of style and layout, but in some cases, it was two styles and in others, it was two layouts. As an example:
.bg-shaded { background-color: black }
.bg-highlight { background-color: white }
.bg { background-color: gray }
.fg-heading { color: #FFF; }
.em { text-decoration: italic; }
.right { text-align: right; }
.spaceit { margin-top: 3px; }
.padit { padding: 0px 12px; }
Then in the HTML:
<div class="bg-shaded fg-heading em right spaceit padit">This is extreme</div>
I know there are various ways to help with this, especially leveraging the
power of the 'cascading' part of the standard. Also, the use of <h#> and
<p> and the rest can help, but as I said, the site is very data driven
and therefore most things end up in <div>s.
So the thought is that there is a generic.css stylesheet, in which go
the standard styles used across the whole site. Then there is a
styles.css stylesheet in which go the various text, font, colour,
padding and border styles - it is these which can proliferate. But the main
thing which became the hardest thing to cope with was the layout for each
page since they were all very different, therefore, each page has it's own
layout.css stylesheet.
As a small example, here are some stylesheets:
file: generic.css
* {
padding: 0px;
margin: 0px;
font-size: 10px;
font-family: Arial, Helvetiva, sans-serif;
}
file: styles.css
.hdr { color: #ffffff; background-color: #006d1b; }
.sub { color: #ffd96b; background-color: #108d18; }
.em { text-style: italic; }
.upper { text-transform: uppercase }
file: layout.css
.rounded-hdr { width: 400px; background: url(rounded_hdr.jpg) no-repeat top; }
.rounded-sub { width: 400px; background: url(rounded_sub.jpg) no-repeat bottom; }
.squared-hdr { width: 400px; background: url(squared_hdr.jpg) no-repeat top; }
.aquared-sub { width: 400px; background: url(squared_sub.jpg) no-repeat bottom; }
As an example then, you can choose a heading and subheading with rounded or squared corners:
<div class="hdr rounded-hdr">A Heading</div> <div class="hdr rounded-hdr">A sub-Heading</div>
<div class="hdr squared-hdr upper">A Heading</div> <div class="hdr squared-hdr">A sub-Heading</div>
(I know a div of class 'hdr' or 'sub' could have been used around the whole thing and then the internal classes choose the images, but this was just an example. It also retains a great deal of flexibility.)
You can assume that the number of styles, layout CSS and generic CSS is greatly increased on a much larger project.
I might not have convinced you, but I am planning to try this out next time I run across a site with a large number of page layouts.
Inserted: 2006-08-03 15:56 (3 years, 12 months ago)
Using Postgres when working with different timezones is great. Here's a small tip to help.
I was wondering today if there was a way to tell Postgres to default to a
particular time zone when setting or retrieving 'timestamp with time zone'
types. Using the SET... command seemed the way (at first), but after a
quick look at the \[p]{Postgres
documentation|http://www.postgresql.org/docs/7.4/static/datatype-datetime.html},
the PGTZ environment variable can be used to automatically set the
default timezone upon connection.
Then Martyn (in work) made a good suggestion which was to set the variable in the Apache configuration. So I did...
...except it didn't work - at first.
I tried setting it to one of NZST, CEST and UTC, though only the
latter worked. After reading a bit more and playing with tzselect, I
tried setting it to Europe/London and Pacific/Auckland it worked
perfectly. It seems to be very system dependent.
Once figured out, Postgres makes it all so easy. :-)
Labels: postgresql, apache, timezones
Inserted: 2006-08-01 22:44 (3 years, 12 months ago)
I said on 11th July that I would be doing a new photo site for my family. Well I'm mostly done :-)
In this article I mentioned a new site I wanted to develop for my family to upload photos to. Well, I'm pretty much done.
I've done a backend Perl module, built the pages in Perl/Mason using a PostgreSQL backend and it is running on Debian. Yup, you know the score.
I downloaded the design from those guys at \[p]{Open Source Web Design|http://www.oswd.org/} and put the thing together using some scraps of scripts I've had for a while but mostly new stuff.
There are just one or two tweaks to make, at which point I'll put up the source code for everyone to play with (it'll be GPL/Perl Artistic License).
If anyone wants to take a look at the site, head over to \[p]{http://photos.chilts.org/|http://photos.chilts.org/}. You guys will only be able to see any photos the users have marked as public (not many so far and I don't expect there will be) but you get the jist. The main reason for the site though is for my dispersed family to be able to share photos with at least some privacy.
Hopefully other people can use it too.
Once I've updated the code, tied up a few loose ends and made some documentation, I'll be putting a new section onto kapiti.geek.nz under /software/ and will start putting some of my other projects up too.
Labels: photos, planet-catalyst, ipic4you, damp
Inserted: 2006-07-31 22:38 (3 years, 12 months ago)
Sometimes you think that the big things will change your life, but sometimes it's the smaller things that do it.
Over the last couple of days, there has been a few things which made me sit back and think. I won't go into those things here, but let's just say that those few things once added together can add together to be more than a major event.
You think that it's the big things that will change you, a new job, a change in family circumstances - a death or a birth - a disaster, a relationship, or even moving house. Now I'm not so sure. Sometimes we prepare too much for these things to have as big an effect. Sure they change circumstances, but they don't necessarily shift your outlook. They change your priorities but not necessarily your habits.
I've had a good few days to think about things, and in addition those points which made me sit up and channel my thinking a bit more. I think I've realised which things are important and which aren't. Also, I've realised what can be done in the position I am. I am priviledged in some respects and I think it should be used in the right way.
I know this has been a vague entry, but yeah, let's just say I'm happy at the moment. It seems to be mostly coming together.
Labels: perspective, happy-day
Inserted: 2006-07-31 22:03 (3 years, 12 months ago)
Previously, I set up a really simple photo site that members of my family could log into and view photos in. This time I'm going to do it properly.
The old site was run on my computer at home via my cable modem. That made it slightly slower for those guys, but there was a more major disadvantage. I didn't yet give them the ability to upload their own photos.
This time I'm going to do it properly. It will be hosted on my server, it will have proper login details and invites to friends and, of course, you'll be able to upload your own images.
I think it should take between 2 and 3 weeks to get mostly right, then I'll release it to the masses.
Labels: photos
Inserted: 2006-07-11 23:40 (4 years ago)
After playing with Swish++ today, I'm thinking, that looks cool but a little unintuitive. Swish-e looks more straightforward.
After a bit of messing round, I managed to index a few files and search them
using swish++. The funny thing is, it seems to have slightly strange
ways of doing its command line arguments. Hmm.
I just read a little bit about swish-e that swish++ was based on.
I'll learn a bit more about that tomorrow. Will probably post a few
comparisons sometime in the next few days.
Labels: search, index, swish-e, swish
Inserted: 2006-07-10 22:54 (4 years ago)
Now that kapiti.geek.nz is a living breathing thing, I thought I'd offer you my thoughts on the technologies being used to run the thing.
There are many different packages being used to help with the site, but there are five main projects of major use here.
The site is run on a Debian Sarge box, the webserver is Apache, the pages are written in Perl using Mason and PostgreSQL is the backend database. I have become quite accustomed to using each of these and the main thing for me is that each of them is the best at what they do. Collectively, I think they're even better.
Of course, all of this is my opinion and you are welcome to offer your own alternatives. This is my alternative and I like it.
For this, I offer you a new accronym. Forget LAMP (Linux, Apache, MySQL, PHP). I'm using DAMP:
D - Debian A - Apache M - Mason P - PostgreSQL
(Of course, Mason implies Perl).
So next time someone asks if you're using LAMP, reply "Nope, I'm using DAMP."
Labels: planet-catalyst, damp
Inserted: 2006-07-09 21:45 (4 years ago)
A new playground for Andrew Chilton, kapiti.geek.nz is now live.
Not much yet, but there will be, I promise. Just you wait.
Inserted: 2006-07-09 17:36 (4 years ago)