Tuesday, July 31, 2007

What I have been playing

I have been playing with Habari recently.

I firstly made a test drive habari.sfong.net (now removed) with a few posts documenting my initial experience.    Playing it on localhost and hosting is quite different.   I even made a theme for it which wasn't too difficult.

There is no sight of next developer release so I tested the current subversion here.    My original theme made for the first release didn't fit.    A new theme named 'RoundBox' was made which I quite like its clean and simple look.

Tinyau made a few plugins for Habari and his latest one to display RSS feed of my flickr photos is working in this h722 site (now taken down).

I'm looking forward to the next release such that I could move my content over.

Companion for my toy

I have to find a companion for my toy.    I have dual monitor in the office so not quite comfortable with the little display of MacBook.

I considered Samsung, Philips and eventually picked ViewSonic.    I didn't like Samsung that much until I visited their factory in Korea last year.    Now Samsung is a premium brand like SONY and you really have to pay a premium.    Philips is OK but the look is a bit dull.    ViewSonic is somewhat in between so that was my choice.   Anyway the shop said all monitor of this price range is made in China so I don't think I can really tell the difference especially I'm not a gamer and I don't watch DVD with it.    For $215 I can't be too demanding.

The ViewSonic comes with a built-in speaker but it sounds crap so I guess next companion for my toy would be a reasonably priced USB speaker.


Saturday, July 28, 2007


I have trouble getting my XAMPP installation working properly in my VISTA Ultimte PC. This is very annoying as I have been using XAMPP for a long time and am very comfortable with it.

First installation was smooth but as I click Admin>Plugins within Habari the browser just keep loading. I then tried starting and stopping Apache service then I got "ERROR -1".

I decided to reinstall XAMPP this time with UAC turned off. The 2nd trial is a lot better as I could start/stop Apache without any errors. The problem with Habari remains, too bad, I need alternatives. I have installed WordPress 2.2.1 there without any problem. I have even backed up my site (domain name gone, now taken down), changed the url reference, imported the database into the localhost intstallation which works perfectly.

I could run IIS and install PHP. However I fear that as my host is not running IIS so there could be weird behaviour?

There are in fact other alternatives from this list of WAMP here. I have my eyes on EasyPHP and WAMP5.

I have experience of using IIS5 when I was developing ASP3.0 years ago so I may give it a shot first. I need some luck.

Testing code escape plugin

This is a plugin written by Tinyau which is based on Code Auto Escape.

Below is a sample from K2 theme,



username; ?>

This plugin is must have for coder's blog. I use Code Markup for WordPress which gives you more freedom in rendering your code.

Friday, July 27, 2007


I never learnt how to use a subversion. Tinyau recommended me to use TortoiseSVN as svn client for Windows platform so I checked out latest version 716 from here to have a play with it.

Then I found what I've missed in recent weeks on Habari development. There were substantial changes to the core that this theme doesn't work on revision 716. The theme simply doesn't load and I saw only blank window without any error messages.

I have recently set up again my development environment at my home PC. I guess I'll need some time to "redesign" this theme to work with the latest subversion 716.

Theme file hierarchy

The wiki for Template file hierarchy needs updating. For record sake the K2 theme files that came with 0.1.1 are as follows:-


K2 was my teacher before I know enough what the habari core requires theme files to do hence this theme was built upon the above structure.

The K2 theme that came with rev 716 has below files replacing those in bold.

entry.single.php (post.php)
home.php (posts.php)
page.single.php (page.php)

Also I can't see yet any material differences between home.php and entry.multiple.php. I think entry.multiple.php and entry.single.php are there to satisfy the latest changes to the core Theme class. I did a quick file compare between files and concluded that developers at Habari didn't really spend much time coding the K2 theme.

There'll be more digging for me to do such that I could tidy up this theme to work with rev 716. Thanks again Tinyau for showing me the way.

Saturday, July 21, 2007

Back to Default

I have temporarily taken down the theme "Classical" and you are seeing the default WP theme Kubrick again.

In WP2.2 it comes with jQuery as the Javascript library.   See articles here at Ajaxian and AJAX magazine.   I think in may ways WP is still using jQuery along side with Script.aculo.us and it'll take a fair while to completely flush out codes using the old library.

I'm still using my "Classical" theme here and I'll need time to upgrade the sidebar to use jQuery instead of the trick I learnt from DHTMLGoodies.   All in all it's a lot easier to use jQuery for the sidebar what I have done is only adding a line in header.php adding styles for dl, dt, dd definition lists elements in style.css and changing a bit in sidebar.php

I'm not sure if it's faster but it's certainly cleaner.    In due course I'm sure there'll be a lot more plugins (such as this one for comments) and visual tricks written using jQuery.    It'll be fun learning them.

Wednesday, July 18, 2007

Subversion Client

In Windows platform I use TortoiseSVN to check out subversion.    In OSX I picked SCFinderPlugin which is a contextual menu plugin for Finder.

What you need is right click anywhere and you'll get a 'subversion' menu.

I just checked out svn719 to have a play in MAMP.

Management is about...

Management is about people, very few would deny this.    When it's about managing people it's about preaching, so management is about preaching.

I was talking a friend who recently joined a large Japanese corporation.    He based in Beijing reporting to his boss, who is American, based in USA.    His boss reports to someone in Japan.    It's a mix of cultures.

Obviously I can't describe exactly what his dilemmas are but his situation is more or less like everyone believes in one God but they are all of different religion.     How do you preach people around you in this case?

Last night at a dinner gathering I mentioned my belief again, i.e. learning to manage is like going to church.     One has to be reminded about basic principles in life from time to time such that one doesn't get lost.    If you believe in one religion and in order to manage effectively it's a matter of preaching others to follow you.    If you have enough followers at work you are a good Manager.

I don’t know MySQL

I don't know enough to understand what I'm doing.   I just tried the plugin by g30rg3x it works great in localhost.    I didn't know why only character set was required to be changed without allowing users to change Collation of each field in the tables.

What is Table Collation?    Quoting from unicode.org it's about

Collation. The process of ordering units of textual information. Collation is usually specific to a particular language. Also known as alphabetizing or alphabetic sorting. Unicode Technical Standard #10,

Monday, July 16, 2007

mini-DVI to VGA

I was thinking of buying a LCD as the second monitor to be connected to my MacBook.    It was all because of the wrong mini-DVI to DVI adapter I bought along with my MacBook.    The store should have warned me or given me a choice.

With mini-DVI to DVI adapter I must have a monitor, CRT or LCD, which accepts DVI-D signal.    I don't have one.   Today I bought the right adapter of mini-DVI to VGA for $19 and have it connected to my very old EIZO FlexScan F35 CRT display.

I have below choices for resolution
EIZO F35 resolution.jpg

Because the Macbook is of 1280x800 (16:10) widescreen so I picked 1152x 870 for the F35 display.

I bought another piece of useless junk it's a keyboard protection skin for $17.    The touch is simply terrible that no way I could tolerate typing with it.

When the external monitor is connected very quickly MacBook detects it and I could easily set resolution suitable for my monitor.

Accidentally I also found that putting MacBook to sleep without it connected to AC supply is a bad idea as the battery will be drained very quickly.

Character Set and Collation issues of WP2.2

Further to my post here discovering this issue due to upgrading to [tag]wp2.2[/tag] apparently someone has done patches to it, see this thread in the forum.    There is even a plugin just to do that.

I prefer the little script from here which I have tried successfully many times changing [tag]collation[/tag] back and forth a few times at localhost.

It's also good to read the official advices from codex.

Blogging Engine by .NET

Reading Coding Horror's post about Defining Open Source I only come to know that there are [tag]blogware[/tag] written in .NET platform and is 'open source' whatever that may mean to you.

These are DasBlogBlogEngine.NET and SubText.   These are all written in C# which I don't know about.    Are they popular, I can't say but as far as what I have seen they aren't popular probably due to the language barrier and hosting requirements.    I'll include these rare species into my collection here about blogware.

Friday, July 13, 2007

Flock again

I have tried Flock since their version 0.4.xx click this you'll know.

The latest version is 0.9 grab a download here.    I have just tested this again for 2 days.    Surprisingly  Flock does better than Firefox in terms of memory leak.    Normally I test the browser with Netvibes and meebo running for few hours and watch the grow of memory usage.     Flock uses around 120Mb with 4/5 tabs whereas Firefox or Safari 3 beta could be using near 200Mb.

The bit that I still don't like is the blog editor which doesn't support categories.    The insertion of tags isn't fit for UTW plugin as well.    I hope in due course it'll work with WP2.3 built-in tagging feature.

Thursday, July 12, 2007

Text Editor for OSX

I have been using a free editor PSPad in Windows platform which is very nice.   I need something similar in OSX.

Smultron appears to be quite good after using it for a while although I'll need more time to get used to keyboard strokes as I normally could use just the keyboard without a mouse to navigate in PSPad.

Wednesday, July 11, 2007

Long lasting theme

What is a long lasting look?    This is obviously very subjective.   I think this really depends on your age, life experience, artistic taste, mood and state of mind etc.

I didn't have time to play with theme at this site in recent months suddenly I feel that I need a refreshing look.    In fact what you are seeing isn't refreshing at all as this theme is what I have been using elsewhere.    I looked back it was February this year that I have this sunrise/sunset themes finished here.

There isn't much at the sidebar if you are new here looking for something I suggest you head over to Link + Archives to find things or try this Search by Tag which is very interesting and easy to use.    I'm really wondering if I could do a theme without sidebar/menu/navigation?

Nothing beautiful is long lasting.

Tuesday, July 10, 2007

MAMP and WordPress

Downloaded MAMP from living-e the recommended development environment for Mac, Apache, MySQL and PHP.    Max OSX comes with Apache and PHP but it could be troublesome messing around with configuration.   MAMP installed as an application in OSX with everything you need.

Got also the latest 2.2.1 from here I quickly have a blog running in localhost.

MAMP doesn't start automatically upon starting of OSX so the MAMP Control widget can be installed in Dashboard for easy access to Apache and MySQL server.

Next would be finding a good text editor.

mini-DVI from MacBook

My problem is exactly as described in this review.    It's quite normal when you buy something new from a shop you'll be relying on the shop to recommend accessories such as this Apple mini-DVI to DVI adapter for a external display.    It was just $19, no big deal but it was completely useless.    I would have expected the shop to warn me that a DVI-D equipped display is required for this adapter to be useful.

Learning new things along the way I found this good article about various kinds of connection for display.   

Now if I really want to use dual monitor or larger external display I have to replace my very old FlexScan L350 by a modern LCD display that supports DVI-D input.

In Mac it's called Clamshell mode if you are using external display with the MacBook lid-closed.    This article shows you how.    In my case I would like to run MacBook in dual monitor mode.

Monday, July 9, 2007

Taking screenshot or print screen in OS X

Taking screenshot in Windows is easy because traditional keyboard has a key at the end of function key row for "print screen".    Press it and paste the image copied onto a default program/application like "paint".

In OSX you got to know below key symbols first
keyboard symbols.jpg

Note that in MacBook keyboard layout Control key behaves not the same as the control key in a Windows keyboard, e.g. to add a new tab in your broswer you need "command + t" not "ctrl + t" and copy is "commend + c" not "ctrl + c".

To look up what keyboard shortcuts are available to you, you click the blue apple on the top menu bar > system preferences > keyboard & mouse > keyboard shortcut.

To save a screenshot to file on desktop it's simply "command + shift + 3".   To save selected area of screen to file it's "commend + shift + 4" then drag the corner.    The file is saved as png then you could use the default application "Preview" to save the file as other format.

What I wanted to do was to paste below image here.   iStat Pro (you see just a small section of it below) is a nicely designed widget which gives you lots of information about your Mac.    This is far better than any sidebar gadgets available to Vista.


Saturday, July 7, 2007

My new MacBook

I have a new toy, I described it there.

As I would be putting my programming stuff here in this blog so I won't be blogging about MacBook there.

Since I have my MacBook up and running my first few tasks have been looking for freeware that I need to enable daily use of the notebook, few key ones are

  1. Text editor, hopefully free, few links are here.
  2. Development environment, i.e. Apache, MySQL and PHP etc, links are here

  3. Office Suite?    I have MS Office for Mac 2004 test drive came with the MacBook but I won't be buying it so I need something else.   I have tried OpenOffice in XP but it just looks too much like MS product so I prefer NeoOffice.

  4. I'm also using Firefox along side with Safari because of the great add-ons such as ScribeFire that I used to post this.

links for 2007-07-06

Thursday, July 5, 2007

My new Toy - MacBook

I have a new toy


I have very careful deliberation as to what I should get. It wasn't easy to decide on a MacBook from iMac or Mac-mini. My main purpose is a Mac not another PC running on Microsoft's Windows.

For record sake I got this on 2 July and first experience was just more than OK. I didn't have any wow....!

Getting familiar with it wasn't that difficult but lots of things that you do on Windows is different in a Mac. After all a Mac was designed to be different.

Too bad the Entourage that comes with Microsoft Office 2004 for mac doesn't support pst file or else I could have used MacBook in the office.

My main intention is to learn to use iMovie and a webserver to learn a bit more about Habari. I'll be posting more about what I have learnt on my MacBook at this site which is mostly for programming stuff.