All posts by jasechong

100th day of the Global Corporate Challenge!

This is my pedometer.

My close friend and hated enemy for the last 100 days.  We’ve gone through the joys of reaching new personal bests.  The disappointments when my daily step count has been so low that it’s screaming at me to do more.  Even going to sleep in bed with it sometimes accidentally!

Back in May this year, my workplace signed up to be part of the Global Corporate Challenge – basically a workplace fitness and health program with 2 main aims – get employees fit and healthy, and raise money for some charities (The Iganga Babies Home – and the Foundation for Chronic Disease Prevention –

Entry money was covered by my work, so the real personal challenge was doing at least 10,000 steps everyday for 16 weeks.  Whoa… at the start I thought that this would not be possible.  My job is in the IT industry – sitting at the desk for practically the whole day.  I reckon days could go by and I wouldn’t do walk more than 3,000 steps.   So to get to 10,000 would mean I’d have to do something… each and every day.   And to do it for nearly 4 months!   1 month I could probably adjust temporarily for… but for 4 months, this is almost like they want this to really change daily habits!

Well, a few of us signed up in our group here, and we started really enthusiastically.  Instead of sitting at our desks for lunch, we actually went out and walked.  It was liberating getting out of the office.  I joined a local cycling club and started doing rides every Saturday morning so that I could relax my step count for the rest of the week.  But unfortunately, lately our team has been hit by a few travel trips, a few cases of the cold, rainy weather – and my average and the team’s average has dropped.

Being an engineer, I started to take note of routes and how many steps I would do on each.  Nothing like being able to get out for a quick 15 minute walk and raking up a couple of thousand steps 🙂 

And of course, the computer nerd in me meant that I had to create a spreadsheet where I tracked steps, cycling kms, and so on.  Even down to how many kms I’d need to cycle to catch the next team ahead of us.

Now we’re 2 weeks from the end and my average is currently 15,466 steps.  Not bad, but it has dropped since I started when it was hovering around 17,000 steps. 

But the great news is that the consistent exercise and getting out on the bike combined with eating less has resulted in weight loss!

Now I’m on my 100th day with less than 2 weeks to go.  I was looking forward to the freedom of not having to clip on the pedometer one morning, but the fitness bug in me has decided to sign up for another work fitness challenge – another month of wearing the pedometer!

RIP Grandma 1923-2012


My grandmother on my mother’s side passed away just over a month ago.   Here’s the eulogy I wrote for her:

My Grandma was born in 1923 in Singapore.   Whilst she only had 4 years of formal education at Methodist Girls School, she was smart and resourceful through her entire life.

Being the eldest of 7 children, Grandma spent a lot of time helping her Mum with home duties and looking after her 4 brothers and 2 sisters.

At 17, Grandma married my Grandpa, Siang Him.   Just two years later, the Second World War came to Singapore and Grandma’s Father died.   But my Grandma and Grandpa were able to overcome these challenges and start their young family, bringing up Henry and then Andrew.   Their family continued to grow with my Mum in 1946, then four years later with Dennis and the next year with Nancy, who was adopted out to Grandpa’s cousin.  I am truly inspired by how Grandma was able to do the best she could with what she had and care for her family during these tough years.

Being mainly family oriented, Grandma had few interests outside of her home and family – but she was very good at handicrafts.   My Mum recalls how talented she was with embroidery and sewing and making paper flowers with crepe paper.  Grandma also loved and was very good at cooking, a pastime that she enjoyed and was happy to share with family and friends.

In 1975, Grandma came to Australia by herself for 6 months to help Mum when I was born.   But in 1981 at the age of 58, Grandma showed immense courage as she migrated to Australia away from her brothers and sisters and the Chinese culture that she had grown up with.  Grandpa joined her two years later, staying initially with Mum and Dad in the Granny Flat in Walcott Street before moving to their own house a few blocks away in Marradong Street.

I will always admire the love, care, personal strength and devotion that Grandma had to my Grandpa in the late 90s when he battled with cancer and eventually passed away in 1998.

Grandma moved in with my parents when she was 80, but longed for independence and her own space again, so she moved out when she was 86.

You can never be too old to make new friends or have new experiences.  For the last few years, Grandma joined in the weekly excursions for seniors organized by the Stirling City Council in a group called “The Tuesday Travellers”.   Grandma always looked forward to and enjoyed these outings, giving us a passionate report about the lunch afterwards.  She was looking forward to join in their Christmas in July function on 17th July but unfortunately did not make it.

Despite having a heart attack in 2002, suffering from asthma that grew worse as she got older, and some pain in her leg, Grandma worked very hard in the garden and around her house to keep it very tidy and clean.   Her routine would include as she says, “sweeping the compound” – raking the leaves and box tree seeds, pruning plants and pulling weeds.   She died doing what she enjoyed and what was keeping her fit in her old age – cleaning up the backyard.

Her life reminds me of truths that we all know deep inside – that you don’t need belongings to be happy or leave your mark on the world.  Compared to what she had, she gave so much and she was so blessed with being able to enjoy seeing her 4 great grandchildren grow up and spoiling them.    Grandma, may you now be reunited in heaven with Grandpa.  We miss you and we’ll always remember and love you.

Made a controllable iPhone robot face!

Isn’t the internet a wonderful place?

The other day, I stumbled across instructions on how to make an iPhone robot face called Mimbo!   Here’s my finished result:

Little Miss 10 helped me cut out the cardboard template.  Unfortunately we ran into a few small issues:

* We started folding the robot cardboard body together BEFORE we cut out its eyes – bad move – it’s easier to cut the eyes out first!

* There is no mouth on the PDF template!  In the end, I cut one out, but then realised that the eyes and mouth didn’t match the iPhone face later on.   I moved the eyes and mouth around to fit.

* I spent a couple of hours wondering what to do with the .pde file!  After much Googling I found that you need to install Processing, which is a program which provides a programming and application platform.    You can download Processing from here:

* I followed the advanced instructions and got it working with FaceOSC.   What this does is let you control whether the robot smiles depending on whether you’re smiling or not!  It’s pretty cool!  I discovered that there’s a whole community around FaceOSC and interfacing it with other software (in particular music performance software) that I’ll have to explore another day.   It was refreshing to see that Osculator found FaceOSC with no problems.  However, it didn’t seem to be routing any events to Processing.   After some mucking around, I found that in Osculator, you can click the Parameters button, and then set up where to route OSC events.   It seems mine was being routed directly to my iPhone instead of through Processing.   Just click “OSC Routing”, then enter in localhost:8000 to route OSC events to port 8000, which will be picked up by the Processing script.

Definitely a very good introduction into TouchOSC.  Now to try to hook up TouchOSC to other things like Traktor!

Instructions here:

2011 Gone!

Wow, I can’t believe another year has drifted by!

A few personal thoughts on 2011:

One Post A Day is too much!

Yep, I started with a noble but in the end, unrealistic goal of one blog post a day.   I think I burnt out so much that it partly contributed to little to no blog posts for the rest of the year!   I’ve been thinking lately about the purpose of my blog – it was really to document things/tricks that I’ve found/done/learnt or taken time to figure out so that I can refer back to it in the future and possibly help others.   And this seems to correlate to the posts I get the most hits from and the people who comment about my posts.   In 2012, I definitely want to go back “to my blog roots” 🙂

Youth Church Band and Guitar!

One great community give back in 2011 was getting involved in the Youth Group Band at church.  OK, I don’t’ really consider myself a “youth” anymore, but it was fantastic to get involved, see other youths get involved, introduce more “youthful” music/repertoire at church, and do it all by playing the acoustic guitar more!   So much that I even had 2 guitar lessons towards the end of the year that really inspired me to do more in 2012.

Date Nights

This is something wifey and I have been struggling but I’m happy with how this went in 2011.   One date per month (minimum) on the anniversary of our wedding date.   Now that the kids are older, we tend to go out with the kids rather than without since it’s “easier”, but when we do go with the kids, we’re missing out on our own couple time.   Definitely something I want to continue in 2012!

Photography Returns!

I think 2011 was the most successful year so far in getting something back from my photography hobby.  Enough to partly upgrade my DSLR to a D700 anyway.  But I wonder now whether I should start actively pursuing paid work or continue the “for fun” aspect.   There was a time near the end of 2011 where photography started becoming a “chore” which is definitely NOT what I want it to be.  I started losing that creative/inventive spark and I don’t want that to happen again.   On the other hand, I now thoroughly recognise having to charge a reasonable amount for my time and “talent” 🙂

Giving The Kids Space

The hardest thing I did in 2011 as a parent was giving the kids more space and trusting them more, especially Miss 12.   I definitely struggled with the concept of actually NOT helping with her homework, trusting that she’ll study for school tests without my help and complete her homework in time.   There’s still this hidden urge in me to want to help her, help her do her best, force her to tell me how school went – but this never worked out the way I wanted.   Time and time again in 2011, I found that it was the moments when I didn’t say anything and just let her be, that she would be happier and there would be those magic moments when she would make her own effort to open up and talk – often just before bedtime.    Parenthood doesn’t get easier as the kids get older – it just changes 😉

Finally, thank you readers, friends and family for coming and visiting my blog!  I really hope you find it informative, sometimes entertaining, and sometimes thoughtful 🙂  May 2012 bring much more happiness and joy into your lives!



Siri – a week later and my next killer Siri app idea

It’s now been nearly a week since my wife got her iPhone 4S.  I’m surprised that the way she uses her phone has changed slightly.  All because of Siri.

I’ve caught her talking to that Siri person, even late at night.  And I know she’s been talking to Siri in the car.  Why is she talking so much with this person?

It just so happens that it’s much faster to say “Remind me to call the dentist at 9 tomorrow” than to pull up the Reminders, click the +, give it a title, select a time, etc. 

It’s just so much faster to say “What’s the weather tomorrow?” than to find a weather app, click on it, etc.

It’s just so much faster to say “Play Fix You” than to click the Music icon, scroll up and type out “Fix You” using the keyboard.

But I now wish that Siri could connect and be used by apps.  

On the theme of “Personal Assistant”, my killer idea for today is to integrate Siri with shopping list intelligence.  Imagine how useful Siri could be if you could dictate your shopping list throughout the week.  If you run out of something during the week, just tell Siri “Remind me to buy toothpaste”.   Or if you’re looking up a recipe to cook up, just dictate what you need to get like “Add onions, garlic and tomatos to my shopping list”.  Then when you get to the shops, it can remind you to buy those items.   That would be absolutely brilliant.

Or all TomTom or other GPS app interaction should be by voice like “Drive me home” or “I wanna go home”, or if you’re on a long roadtrip with the kids, “Navigate to the nearest McDonald’s” or “We need to get a toilet quick!”


Thoughts on Siri and Artificial Intelligence

When I was at Uni, I did some work that covered a bit of Artificial Intelligence.  Now AI is a huge field, but my project was on a basic speech recognition engine.  There are many areas being researched in AI, but one large problem is “learning”.   If we could train an AI system by feeding it more input, and if it can continually get better at categorising/recognising/classifying the input, then it would appear to be get more “intelligent”.

One problem is getting enough input.  For my speech recognition project at Uni, I had access to a CD with a handful of sound samples – of different people saying the same set of words.  The idea is, the more it heard different people saying, eg. the number “One”, then it should get eventually be able to recognise anyone saying “One”.   It would have been wonderful to record everyone in my unit, or even everyone doing Engineering as input to my project – but the logistics were too hard.

The problem of getting a large bank of input is not just for my speech recognition project – it’s for any AI learning system.

And that’s one thing that I’m so excited about for Siri – the new Personal Assistant Application on the iPhone 4S.

Imagine this – you gather over 300 researchers from 25 of the top research institutions in the world to work on an Artificial Intelligence project to build an AI assistant.   Then you put the findings and results of their work into a common handheld device, combine it with a voice recognition system, and unleash it to millions of people around the world who might be using it regularly, if not just to play with for novelty’s sake.

That is one MASSIVE bank of input data from an Artificial Intelligence point of view.

Just imagine the amount of new input data that is being received and processed.  On one hand, I wonder if Apple are collecting and storing the phrases people are saying into Siri and the privacy concerns around this.  But on the other hand, if Apple are using this data for Siri to continually improve its responses and intelligence, then you’d hope that it will get better at producing more useful results as time moves on.

The other thing I’m excited about (wow, readers must think I’m a real Apple fanboy), is that, yes, even though speech/voice recognition is not new by any means, Siri’s conversational interface is in line with the touch UI of the Apple iPad/iPhone – in that user’s shouldn’t need to THINK about HOW to interact with the technology, it should just work naturally.

All those patents about how the iPhone touch interface bounces at the end of scrolling, and how it slows down – those are concepts to make the screen appear and act like a physical object with momentum and inertia – it makes it seem more “real”.   And so with Siri – I know it’s not perfect, but the user doesn’t have to remember some strange sequence of words or to re-work sentences into specific structures, or speak slowly one syllable or word at a time to make it understand you.   You should be able to talk to it like any other person, and it should just understand.   I like where Apple is heading with this – where technology really is there to “assist” humans when required, and us “humans” don’t need to try to translate our intentions into the computer’s view of the world.

Perth Beach Wedding – Renae & Ywain

A few weeks ago, the gloomy weather in Perth decided to stay away, and the beautiful Spring sunshine arrived for Renae and Ywain’s wedding.   The weather was perfect – one of those days when you think to yourself “This is why I live in Perth!”   Renae & Ywain – thank you for letting me be part of your wedding day and capturing your love for each other!

The shoot started at the boy’s house.   It was also the day of the West Coast Eagles’ final in Melbourne, and this kept the boys entertained for a while!

We scooted quickly over to the Ocean Beach Hotel in Cottesloe where the girls were getting ready.  It was definitely beach weather with lots of people chilling at the OBH.  I just loved the amount of natural light streaming in through the windows that day.

Renae and Ywain had organised a 1958 Cadillac Fleetwood Limousine from JC Classic Automobiles.  According to the driver, John, it turns out that he bought and carefully and personally restored this American car as a labour of love!

After the wedding, the bridal party had a couple of hours to chill out and wander around the Surf Club and beach for photos.  Yes, we did get all the shoes off, but luckily no-one got too wet 🙂

There was an amazing sunset that day, so we just HAD to get back out on the beach one more time before the reception at the Surf Club.  I can’t believe how fortunate we were with the sky that evening.

The reception was held on the balcony of the City of Perth Surf Life Saving Club overlooking the beach where the celebrations continued!

ANCA WA Choral Festival Concert Photos

ANCA is the Australian National Choral Association – an organisation which aims to encourage and promote choral music and choirs in Australia.   The WA chapter has just been reformed and they had Choral Festival Day to mark this occasion.

No, this was not a “concert” – it was a festival where for a few hours, everyone first did a warm-up, then different choirs sang for each other and it all finished with a big “sing” – where everyone learnt a song together.

It was a fantastic session – the age range of participants ranged from Primary School to people in their 70’s-80’s!  So many choirs and people were interested attending that there weren’t enough seats in the venue!

I was there to take some snaps to document the day.  The hardest part was choosing the right time to click the shutter button as many of the items were quiet – so I had to time my shots with louder parts of songs, or right at the end just before or with the applause.  Maybe I need to investigate a mirror less camera body one day or some noise dampening for the Nikon D700 🙂

Here are some shots from the day!

PCCC Fundraising Concert Photos

A few months ago, I was asked to take some photos for a church fundraising concert.  It was great to see such a huge audience turnout for the concert, which unfortunately pushed me right to the backs and sides only.  However, there were many different acts so I was able to move around between items and get different angles.

The best part of the event was the last item where various ensembles all combined together!  It was wonderful to see the adult choir, childrens choir and orchestra all together.  Was it professional musical standard?  Of course not, these were all amateurs doing something for a good cause.  But what struck me was the gusto – the passion that they all had – well done to all!

Here are a few of my favourite shots from the day!

Applescript to bulk transcode video files using Handbrake

Real life has taken over my life recently so my blog is feeling a little neglected.

However, thought I’d share something I’ve been working on for the last week.

After buying a bigger hard drive, I’ve finally got all my M2TS files from my Sony HDR-SR7 video camera consolidated together in one spot.  But so far, I’ve been using iMovie to capture and organise all my other home video footage from Video8 and miniDV tapes.

I know I can get the AVCHD (M2TS and MTS) files into iMovie by converting them with Voltaic first into a QuickTime MOV file (encoded using the Apple Intermediate Codec), or by opening up the MTS files as a camera archive.

However, one thing that the family have been bugging me for so far is to get them into a format that’s easy for the rest of the family to view.  iMovie is not exactly a media player.  Nor is using Finder with Voltaic easy for the family.

My plan was to transcode all the raw footage into something that can be viewed either on the PS3 or iPad.

Luckily Handbrake is able to transcode M2TS files into any other format.  But I had a few hundred files to process, and even though Handbrake has a queue for processing, it doesn’t have the ability to submit a bulk set of files to transcode at once.

So I ventured into AppleScript land!   I’m a professional programmer and familiar with DOS batch files, VBScript and javascript – but all really on a Windows platform.   What is this AppleScript thing?

After some mucking around, I’ve written an AppleScript which can be run, or be saved as a droplet and files or folders drag and dropped to it, which will convert the files to MP4 using Handbrake.

To help everyone else, here it is!

To use, just:

  1. Copy and paste the code below
  2. Open up Applications -> Utilities -> AppleScript Editor
  3. Paste into a new document
  4. Then either
    1. Click Run to run the script immediately    OR
    2. Save somewhere (e.g. the Desktop) with type of Application, then drag and drop the folders you want to transcode onto the icon

Sorry about the formatting – once you paste into AppleScript Editor it should look all nice again 🙂

** This droplet will convert any file/folder dropped onto it or selected to the Apple Universal format using Handbrake.
** It currently will reuse the same filename for all files except MTS files, with which it will rename using the file’s creation timestamp.
** by Jason Chong
** Revision Description
** 1.0 Initial version

property type_list : {} — e.g.: {“PICT”, “JPEG”, “TIFF”, “GIFf”}
property extension_list : {“m2ts”, “mts”, “mov”, “avi”, “mpg”, “mkv”, “dv”} — e.g.: {“txt”, “text”, “jpg”, “jpeg”}, NOT: {“.txt”, “.text”, “.jpg”, “.jpeg”}
property typeIDs_list : {} — e.g.: {“public.jpeg”, “public.tiff”, “public.png”}

** This function is called if the script is run by executing the script directly.
on run
set these_items to choose folder with prompt “Select a folder to convert:” with multiple selections allowed
set dest_folder to choose folder with prompt “Select a destination folder:”
repeat with one_item in these_items
process_item(one_item, dest_folder)
end repeat
end run

** This function is called if the script is run by dropping files/folders onto the item
on open these_items
set dest_folder to choose folder with prompt “Select a destination folder:”
repeat with one_item in these_items
process_item(one_item, dest_folder)
end repeat
end open

** This function does the high level processing of the items chosen
on process_item(the_item, dest_folder)
set the item_info to info for the_item
if folder of the item_info is true then
— If a folder then call this function recursively for each item within
set these_items to list folder the_item without invisibles
repeat with i from 1 to the count of these_items
set this_item to alias ((the_item as Unicode text) & (item i of these_items))
process_item(this_item, dest_folder)
end repeat
— If not a folder then check the extension, file type, etc
set this_extension to the name extension of item_info
on error
set this_extension to “”
end try
set this_filetype to the file type of item_info
on error
set this_filetype to “”
end try
set this_typeID to the type identifier of item_info
on error
set this_typeID to “”
end try
— Only process if meets all criteria
if (package folder of the item_info is false) and (alias of the item_info is false) and ((this_filetype is in the type_list) or (this_extension is in the extension_list) or (this_typeID is in typeIDs_list)) then
convert_video(the_item, dest_folder)
end if
end if
end process_item

** This procedure does the actual conversion of video files using Handbrake
on convert_video(this_item, dest_folder)
log “Processing file: ” & this_item as string
with timeout of (720 * 60) seconds
tell application “Finder”
if (label index of this_item is 0) then

— Set to gray label to indicate processing
set label index of this_item to 7

— Set original file name
set origFilepath to this_item as string
set origFilepathPOSIX to quoted form of POSIX path of origFilepath

if name extension of this_item is “MTS” then
— If MTS then make destination filename equal to YYYYMMDDHHMMSS.MP4
set origFileCreationDate to creation date of this_item
set newFilepathPOSIX to POSIX path of dest_folder
set newFilepathPOSIX to (newFilepathPOSIX & (getDateAsString of me from (origFileCreationDate))) & “.mp4”
set newFilepathPOSIX to quoted form of newFilepathPOSIX

— For all other files, keep destination filename the same (assume it’s already in YYYYMMDDHHMMSS format)
set nameWithExtension to name of this_item
set nameWithoutExtension to getBaseName of me from (nameWithExtension)
set newFilepathPOSIX to POSIX path of dest_folder
set newFilepathPOSIX to newFilepathPOSIX & nameWithoutExtension & “.mp4”
set newFilepathPOSIX to quoted form of newFilepathPOSIX

end if

— Start the conversion
— Refer to and
— for HandBrakeCLI presets
set shellCommand to “nice /Applications/HandBrakeCLI -i ” & origFilepathPOSIX & ” -o ” & newFilepathPOSIX & ” –preset=\”Universal\””

— display dialog shellCommand — uncomment for troubleshooting
log “Executing command: ” & shellCommand
tell current application
do shell script shellCommand — comment out for debugging
end tell

— Set the label to green in case file deletion fails
set label index of this_item to 6
log “Successfully converted item: ” & this_item as string

— Remove the old file
— set shellCommand to “rm -f ” & origFilepath
— do shell script shellCommand

log “Skipping already processed item: ” & this_item as string
end if

on error errmsg
— Set the label to red to indicate failure
set label index of this_item to 2
log “Failed to convert item: ” & this_item as string

end try
end tell
end timeout
end convert_video

to getDateAsString from t
set creationDateString to year of t as string
set creationDateString to creationDateString & text -2 thru -1 of (“0” & getMonthNum(t) as string)
set creationDateString to creationDateString & text -2 thru -1 of (“0” & day of t as string)
set creationDateString to creationDateString & text -2 thru -1 of (“0” & hours of t as string)
set creationDateString to creationDateString & text -2 thru -1 of (“0” & minutes of t as string)
set creationDateString to creationDateString & text -2 thru -1 of (“0” & seconds of t as string)
return creationDateString
end getDateAsString

on getMonthNum(theDate)
— French Vanilla, by Emmanuel Lévy
— set theDate to the current date –or any other date
copy theDate to b
set the month of b to January
set monthNum to (1 + (theDate – b + 1314864) div 2629728)
return monthNum
end getMonthNum

to getBaseName from t
— by Kai Edwards
set d to AppleScript’s text item delimiters
set AppleScript’s text item delimiters to “.” — separated at periods
if (count t’s text items) > 1 then set t to t’s text 1 thru text item -2
set t to t’s text items — splits t into a list again at the periods
tell t to set t to beginning & ({“”} & rest) — puts it back together to
set AppleScript’s text item delimiters to d — always set them back again!
return t
end getBaseName