Search this blog for:

Tuesday, December 18, 2007

alphafoobar.com isn't going anywhere...

Alphafoobar.com isn't, but the author will be posting this type of stuff at nzfusion.com/james

It is part of our new initiative to drag people over to NZfusion and slowly increase awareness in what it is that we are doing there!

So for new news on what is going on, come over to my new blog: nzfusion.com/james

Friday, December 14, 2007

busy building stuff

Have been very busy recently playing around with our web based applications - progress was slowed substantially on Tuesday - my day of real work! But it is still on track.

Will have a questionnaire ready for share the stars early next week. And have been working on Whizzoo intermittently, so the interface there is much nicer. I think I will also integrate it with Facebook and see how that goes - which sort of outflanks some business ideas about whta we were doing with Whizzoo - but I say it doesn't restrict the potential of Whizzoo, it simply increases its awareness and our knowledge base!

For when we integrate Sharethestars with Facebook!

I have also suggested that ShareMyNZ should integrate with Facebook, I've noticed another NZ Community site is advertising on Facebook - but I don't think they have the background to put together a Facebook portal.

Monday, December 10, 2007

Portable Apps!!

I have just posted about moving to Portable Firefox, which I am very excited about, because I have recently discovered that Firefox run in Wine on Linux, gets DNS responses from my stupid Dynalink router, but Firefox run on my linux box doesn't... it's not just firefox. It also gives bogus data to my wget on linux, but not ping. And sometimes if I ping an address or open a page in Konqueror, then I can also open it in Firefox. I've even tried other distros!

So I could try running firefox in wine on linux from my USB, perhaps I can share the instance!

But the really cool thing is there is a stack of applications available on Portable Apps, including XAMPP, which is a bundled install of PHP, Apache and MySQL... which I will be promoting in our development team to get standalone local servers running! - Some of our team aren't particularly eager to become more technical, tools that make it easy to be technical are appreciated!

However, there are a stack of tools I will be excited to get on a USB stick! Including:

  • Firefox
  • Apache, PHP, MySQL
  • Filezilla
  • Notepad++
  • 7-ZIP
  • VLC
  • Putty
  • And MAC OS 7 on a stick... that just sort of sounds fun :)

Portable Firefox

I've loaded my USB key with a portable version of Firefox. This seems to be a slightly different build of Firefox, which seems a little odd to me... as shouldn't any app be easily run from a USB key - what is the windows registry for anyhow? Ps. I don't care!

The benefit of this is I can take Firefox with me where ever I go, and never have to change my bookmarks again!

Friday, December 07, 2007

Extend Firefox 2 competition

This is a competition that is run every year (perhaps next year it will be extend Firefox 3?). So since I haven't thought of this till now, it seems pointless to try and extend Firefox for the point of the competition.

But what a great way to become a known member of the community. Write a killer app, be anounced to the Mozilla world! Of course there are a tonne of great Firefox extensions already... trying to add to many of them will possibly kill Firefox, but as long as you don't get too greedy - and install them one or two at a time everything will work fine.

My favourite aspect of Firefox was it's small size, this is achieved through a lack of functionality - this should be a computer programming and project management mantra - less is more!

You simply don't need all the bells and whistles to make your product (and project) successful. But being able to add the bells and whistles later - that's gold!

But what new tool would take the prize from the best mozilla firefox apps in the world? How many ideas can I come up with that are already taken?

Thursday, December 06, 2007

PHP Singleton design pattern

I think design patterns are stupid, people publish huge books of them, containing things like the singleton - which I think is a pretty basic pattern in Java. And can be implemented using a static self-typed variable and private constructor... hardly seems worthy of its own design pattern to me.

But it does make it easier for me to find this sort of thing in a language I am less familiar with.

This is a very untested implementation of the singleton pattern in PHP. I want to only load the file once. Because that would seem more sensible to me, so the constructor loads the countries list


class survey_countries
{
var $content;

/**
* Create an instance of the survey countries class.
*
* @return survey_countries
*/
private function survey_countries()
{
$temp_file = new common_io_file("../lib/countries_file", /*FILE.*/READ);
$this->content = $temp_file->get_contents();
}

/**
* Return the content array.
*
* @return array
*/
function get_content()
{
return $this->content;
}

/**
* implements the 'singleton' design pattern.
* @return survey_countries
*/
static function get_instance()
{
static $instance;
if (!isset($instance)) {
$instance = new survey_countries();
}
return $instance;
}
}

Wednesday, December 05, 2007

PHP questionnaire application part 2

It was quite a busy day yesterday... obviously I didn't get this completed, or I'd have a link here and would be inviting you all to come along and fill it in! But I think I've made some good progress...

The basic idea I'm building on, is I'll have a questionnaire file and an administrative function that will create database tables and a php page based on that file - an install phase. Hopefully I'll be able to extend this to allow versioning of the questionnaire, so we can make changes on the fly and not lose survey data! But thats is something someone else can do in the future.

Once the php page is created and the database tables created, then the form will be open for business. The same fields (a PHP class I've created for each data type) will be used to validate the incoming data... with the validation parameters written into the generated php file.

Since the tables are generated (one table per question), the database is custom built to the specification of the questionnaire... which means the data validation can occur on the user form, in the php data acceptance layer and in the database. Making it less likely garbage will make it through.

This is similar to a Java Swing form I built a while ago, except this time I am building the form once, and then I built the form at runtime.

I was slowed down, as I had to get a CVS server operational somewhere. Luckily CVS comes pre-installed on our current host: hostmonster! Once we had SSH set up, we could connect to CVS via SSH. It isn't as fast as my previous solution (hosting CVS at home), but it is more available to the other developers on the team!

I also got a wiki for the team online at whizzoo.com/wiki. whizzoo.com is our primary domain at hostmonster, which is fun as we didn't really have any idea what we would do with it! So now it looks like it will be debated for a while and host our primary tools.

Unfortunately, setting up a defect management tool is not as easy... I failed to get both Trac (my preferred solution) and Bugzilla running. Obviously Trac requires more software than I am willing or able to install on our hostmonster plan.

A reader suggested using Lighthouse, but it seems to require I use SVN. Also the interface of Lighthouse is very pretty... but to me it doesn't look like much more than a community message board... I can add milestones and tickets, but I can't assign a severity? I'd like to be using SVN, but CVS it was I've got - for now.

Lighthouse do give an example Beacon file for integration with SVN, it is in Ruby. I don't really understand Ruby. But most languages are very similar - those little features of Ruby are likely to confuse me if I change too much of this Beacon file! So I might be able to get it to work with CVS... but why bother?

I've created a lighthouse project - but discovered its free account is limited to 2 users! ridiculous! So a waste of time using it. We could pay for it... but we'd probably have to buy the top end package to get the number of users we want on it... and looking at the functionality - I think I could build it in a week anyway... then Belle could make it look pretty.

Tuesday, December 04, 2007

PHP questionnaire application

Today I am planning to build a PHP questionnaire application that can take an input file and create a suitable database for the information... I also want it to be able to plug in some sort of results system... so users will be able to view results of the survey after they have voted.

As a starting point I am using this questionnaire example and I'd like to integrate amcharts (or similar for the results).

It is a little optimistic to get this working today perhaps... but we have a lot to do and this is sort of a little something extra, which may be a useful tool in the future if it is done right.

Monday, December 03, 2007

The Brain Map

Brainlandmap
The designers at New Zealand's Unit Seven created this New Brainland Map that visualizes and, er, maps out various neural regions. They used a reference photo of a human brain to model the 3D terrain. Computer wallpapers of the image are free and large color prints on silk paper are available for US$15-US$70 depending on the size. From the project page:

This digital elevation model was then used to create contour line data, relief shading and to plan where the roads and features should be placed for map compilation. Real New Zealand public domain data was then added for the surrounding islands.