Archive for April, 2011

Costs / Benefit Analysis – Littering

Sunday, April 24th, 2011

image

Well I was pondering over the trolley issue I kind of blogged about yesterday and came to the realization that such situations are very common in our daily lives.

Basically, we humans are much like flowing water and mindless sheeps when we make our daily decisions in life.  As a result, we tend to make choices based on minimising the marginal costs or maximising the marginal benefits.

To shape human’s behaviour, we try to introduce new incentives/disincentives.  This has the effect of changing the costs structure so that it becomes cheaper for humans to adopt the new behaviour.

image

MC refers to Marginal Costs and as it is cheaper for more people to perform the undesired behaviour, we need to introduce an incentive, i.e. getting your dollar coin back if you return the cart to its rightful location, to create a new incenticized system.

image

Getting our Trolleys to Line Up–Alignment of Incentives

Friday, April 22nd, 2011

Trolley ChainsIt wasn’t that long ago when our trolleys in the supermarkets were in disarray.  Shoppers after checking out their items in a supermarket generally do not bother to move the trolleys back to their original holding location. 

That is… till the innovation of the chain contraption whereby a person needs to slot in a dollar coin before the trolley could be removed from the trolley chain.  To retrieve back the dollar coin, the shopper will need to chain back the trolley.  The dollar coin was used as some sort of a deposit to incentivize shoppers to return the trolley back to its original holding location.

Trolleys - Give me a Dollar Coin

Some might feel that a civil conscious Singaporean would have returned the trolley to its rightful position without the need of such contraption.  But, maybe instead of overly relying on the innate good naturedness of human beings, it is time for us to start thinking about creating systems with the incentives aligned towards our objectives.

image

Apparently, since the system is working:

Benefits of a shopper using the trolley > Inconvenience of the shopper in returning it to the trolley queue

Morale of the Story:  By aligning the incentives of the system to the desired outcome/objectives, we can more easily achieve our goals.

But seriously, why not just hire another staff (let’s call him the trolley man) to help return trolleys back to the queue.  It might increase costs slightly.. but the increase in costs might be insignificant if we divide the wages of the trolley man by the number of purchases (as in the case of our endless queues at the checkout counters in NTUC).  Hmmm… besides.. it helps with unemployment… 

Seriously, a trolley man might be the best alternative.  Some people will see the chain contraption as a cost savings to the organisation.  But simply looking at the problem that way would have ignored the fact that the trolley man provides a service far superior to a mechanical chain, i.e.  what if the shopper did not have a dollar coin to spare?  what if the shopper needs to rush off somewhere else and that 2 minutes of fumbling for coins and returning the trolley to its rightful location is just… too costly?

Basically, if

Inconvenience of the shopping using and returning the trolley > Wages of Trolley man / no of trolleys returned per month

Then an optimal system will be to hire a dedicated trolley man to take charge of the returning the trolleys….

Morale of the Story:  Success of a system should always be based on the actual benefit and cost analysis across many different stakeholders.

Hmmm… which makes me wonder… as companies replace phone receptionist with automated answering machines that tells you to….

Press 1 if you would like to speak to sales…. Press 2 if you……

Are they really running their Customer Management System in an optimal way?  If you ask me, I think I would prefer to pay a couple of dollars more for some better service over the phone

Picture Story– One Liner

Thursday, April 21st, 2011

Recently, I did a project with NLB.  It is to facilitate the telling of a story through pictures and one-liner descriptions.  Hmmm… wonder how it will really work in practise…

And since just gotten myself a nice digital camera… why not just give it a try!

OnRouteToBCA

On Route to BCA

 

CharKwayTeow

Too early.  Stomache Hungry.  Solution: Char Kway Teow

 

BCAReceptionEnd

Initial Meeting at BCA

I think my story is a little too boring… hmm.. probably need more creative people to be involved in the portal for it to be successful….

Head First Proposal Writing

Wednesday, April 20th, 2011

Recently, I was feeling really bored writing our own standard proposals… so I decided to try something strange.  I started to write my proposals in a more graphic and exploratory way.

Not sure why I did it that way.  I guess I was just bored… tired of doing the same thing over and over again…  Well, today while I was going through the book:

image

It turned out that …  writing when done in an innovative way.. those have a big impact on the mind’s retentive ability… and surely.. one of the most important principles of proposals writing is to stand out amidst a crowd of mediocrity….

Below is a snapshot of some Head First Principles… click on image to expand…

image

CQ–Caching, Frying and Baking

Tuesday, April 19th, 2011

Hmm.. have been working with CMS for all these years.. but never seemed to have heard of this supposed CMS jargons, i.e. frying and baking…

http://dev.day.com/content/docs/en/cq/current/exploring/concepts.html

In CMS jargon, "baked" refers to the concept of committing data to static files at publish-time, while "fried" refers to the concept of processing data for final presentation at request-time.

Bonnie – Mirror vs Single Disk

Tuesday, April 19th, 2011

I was just kind of curious.  Will there be any performance difference when we run bonnie on a single disk vs a mirror disks array?

Mirror Disk Array Performance

image

Single Disk

image

Dun really see a any performance bonus using a mirrored disk array over a single disk using bonnie…

ESXI Compatibility – GA-880GM-USB3

Tuesday, April 19th, 2011

Just realised that ESXI is compatible with almost every MOBO I could lay hands on in my office.  Installation basically depends on 2 things:

a.  Intel Pro 1000 GTS NIC

b. Disabling C1E Support (http://james.com.sg/2011/04/09/installing-esxi-on-m4a89td-prousb3)

image

Got it working on GA-880GM-USB3….

Benchmarking Tool–Bonnie Installation

Monday, April 18th, 2011

Well,  seems like most ZFS fans use a tool called Bonnie to test hard drive performance.  So here I go… some notes on the installation of bonnie based on the different ZFS base system.

Bonnie on OpenSolaris

Download bonnie++ from http://www.coker.com.au/bonnie++/bonnie++-1.03c.tgz),

After that, just do the standard linux:

  • ./configure
  • make all
  • make install

And bonnie will be installed into your /usr/local/sbin.  From there to run bonnie benchmarks at a particular mount point, do:

/usr/local/sbin/bonnie++ -d /mpool/bonnie/

Bonnie on Nexentus Community Edition

To install bonne here, you can use the really helpful NMC.  Just need to type:

setup plugin install

and answer a series of Y to the ensuing questions.  Refer to:

http://www.nexenta.com/corp/forum?func=view&catid=6&id=528

Benchmarks–ESXI running off Gigabyte GA-G31M-S2L SAN

Monday, April 18th, 2011

Did some benchmarking with ESXI running off a SAN on an old Gigabyte motherboard… through ISCSI…

Really bad performance.

image

Why?

image

Bonnie on the mirrored arrays shows output of up to 110k Read, 77k Writes.  Dun seem to be a Hard Disk Problem… as it looks pretty comparable to my system that runs on Nexenta with speeds at:

image

Installing Nexenta and Importing mpool to run bonnie

Now.. this is really weird. for some reasons… when I reimport the pool… the performance really sucks.  Maybe OpenSolaris zpools are not entirely compatible to the Nexenta ones?

image

Tried recreating new pools… still sucks…

image

Seems like the Nexenta implementation is not really good for systems with low resources.  During the runs, CPU was constantly high at over 80%.

Exploring Communique CQ

Sunday, April 17th, 2011

Well, kind of rounding up my playing with SAN and ZFS until my new hardware arrives from the States.

First thing I did was to download the CRX jar file.  From there I kind of got to the Web UI for the CRX repository.

First Steps

Screencast to get started

http://dev.day.com/ddc/blog/2008/04/firststeps1/docroot/firststeps1.html

Objectives to achieve

a.  Posting to a JCR Path, i.e. /content/firststeps

b.  Reading with Sling

c.  Posting with a * (implies item list)

d. Special input properties, i.e. created, createdBy, lastModified, lastModifiedBy

e.  Accessing a collection of nodes

f.  Listing through javascript template, jst file.

Well couldn’t quite get point f to work… but anyhows.. here are some simple html files to save the next guy from typing all over again…  Sad smile  they should have provided for a file download link for the source…

http://james.com.sg/wp-content/uploads/2011/04/FirstSteps.zip

After typing in all the example… then I realise that FirstSteps is kind of installed with CRX and is available at:

http://localhost:7402/apps/firststeps/0_hello.html

Sigh.. Sad smile

CQ WebDAV URL

http://localhost:7402/crx/repository/crx.default

 

Avenues of working with CRX

Screencast:

http://www.day.com/day/en/products/crx.html

Avenues of Working

Products checkout is over 6Mb.  Will have to stare at the blank screen for a long time as there is no ajax status message.

Interesting to note that… the labelling of all the product attributes is through a xml file at the root of the subversion tree, i.e.

image

image

Different Renditions

CRX allows different renditions to be hooked to the content type, i.e.

  • Txt, View  – By Default
  • Html – Needs to point to a sling:resourceType

image

Packaging

Allows selective packaging of both content and application codes into an easily deployable zip file.

Sample Application Blog

http://dev.day.com/content/docs/en/crx/current/developing/developers_getting_started.html