Our Daily Bread

what I need to do ...

  • Continious learning -unlearn as necessary
  • Reach out to family & loves ones
  • Maintain fitness - strong core and clear IPPT
  • Pick up parenting skills
  • Save up and plan for renovation
  • Build passive business & investment income
  • Back up Data
  • Manage $ Cash flow
  • Learn sinan mori

Monday, January 26, 2009

Capture Argc to String Object

A simple mundane task yet it took me an hour to get it done. ={}
....
if( argv[1]!=NULL ) {
string videoFileStr = argv[1];
videoFileStr = videoFileStr.substr ( 0,videoFileStr.find_last_of("."));
videoFileStr += ".jpg";
cout << videoFileStr;
}
....

The culprit is c's printf is unable to print c++ 's string object content.
Arg!

Side effect of mixing c++ & C.
Got to move on......

Saturday, January 24, 2009

Einstein's Riddle

an email puzzle i receive ....

Einstein wrote the following riddle when he was a young boy.
He said that 98% of the world could not solve it.
But several NIEHS scientists were able to solve it, and
they said it's not all that hard if you pay attention and are very patient.

Give it a try:

There are 5 houses in 5 different colours in a row.
In each house lives a person with a different nationality.
The 5 owners drink a certain type of beverage, smoke a certain brand of cigar, and keep a certain pet. No owners have the same pet, smoke de same brand of cigar, or drink the same beverage. Other facts/clues:

1. The Brit lives in the red house.
2. The Swede keeps dogs as pets.
3. The Dane drinks tea.
4. The green house is on the immediate left of the white house.
5. The green house's owner drinks coffee.
6. The owner who smokes Pall Mall rears birds.
7. The owner of the yellow house smokes Dunhill.
8. The owner living in the centre house drinks milk.
9. The Norwegian lives in the first house.
10. The owner who smokes Blends lives next to the one who keeps cats.
11. The owner who keeps the horse lives next to the one who smokes Dunhill.
12. The owner who smokes Bluemasters drinks Beer.
13. The German smokes Prince.
14. The Norwegian lives next to the blue house.
15. The owner who smokes Blends lives next to the one who drinks water.

The Question Is: WHO OWNS THE FISH?

-----------------------------------

My solutions:


nationality(Brit,Swede,Dane,German,Norwegian)
smoke(Dunhil,Pall Mall,Prince,Blends,Bluemaster)
col {red,green,white,blue.yellow}

16. H1 = Norwegian (9) not Red (1) not Green(4) not white (4) hence left -> yellow -> Dunhil(7)

17. H2 = Blue (9,14) -> Horse(11,16)
18. H3 = Milk (8)
19. H3 != Green (18,5)
20. H4=Green,H5=White (16,17,19,4) H4->Coffee (5)
21 H3=red,Brit









Thursday, January 22, 2009

Day 2: Sun Tech Day 2009.

I went for the client track & Open Solaris track. Very briefly the outline as follows:.

[1] The day kicks off with a key note speech on cloud computing – a new paradigm
  • The cloud is made of ‘layers’:
  • Iaas – Infrasture,--> handle multiple environment
  • PaaS - Platform, --->not just a isolated IDE, encourage team collaboration
  • SaaS –Software...
  • Introduction of Project Kenai.
  • When there is no developer there is no cloud.
  • Zemby is able to collate and represent votes from two separate social networks.


[2] Java J2ME: What’s next? => LWUIT
  • J2me is open source now.
  • Challenges: Fragmentation at device-level, standards implementation
  • Upcoming : Light weight user interface tool kit

[3] Open Storage ---- storage as commodity vs being locked by a vendor.
[4] JavaScript coding in Netbeans 6.5
[5]Develop and deploy securely.

Have one more day to go ...University day.

Lots of catching up to do for my studies ....

Wednesday, January 21, 2009

sun tech day singapore 2009 - Day 1


I was at the sun tech day 2009. 20 Jan 2009
Very fruitful day indeed, being introduced to various
upcoming technologies, trend and tools for developers.

I spent most of time at Enterprise track. Very briefly i picked up the following:

  • GlassFish, heard about it, today i get to see how it works. Features like call-flow monitoring for developers -- which container is more time spent?
  • The concept of Comet ---- instead of typical client ---request---> server. We have for client <---events----server.
  • Why GlassFish ? You get enterprise features at open source!
  • I get an idea what's DTrace is all about briefly through the track. DTrace is only available on Solaris. In the process of debugging we go through the stages of :
  • hypothesis->instrumentation->data gathering->analysis->....cycle repeats.
  • DTrace eliminate the instrumentation stage. With as many as 50,000 probes.
  • Got to appreciate the D Dynamic Language
  • Java FX, sounds like Flash MX, get to lots of rich interactive media.i am keen to find out how i can use it for mobile phone.
  • I am amazed by zembly. Widgets, Service and Application.The key chain, clone feature are useful. Somehow found widgets and application to be similar.
  • Connecting the World with REST => Representational State Transfer. Tenets.
  1. Give everything an ID - URI
  2. User standard HTTP methods, so that it is cacheable
  3. Links things together.
  • MySQL: Database for Web 2.0 --- I learn alot about storage engine. And the 'EXPLAIN' syntax which is very useful to observe what's happening.
  • Groovy and Grails --- have not use it, got a feel of it.

  • Won a Wii in the referal lucky draw, awesome i can do some development work with Wii =)

Sunday, January 18, 2009

How does a human brain look?

When you go to most market in this season you will see plants blooming with flowers sold everywhere. I will pop by at various plants stalls to check out the various colorful models line up to dazzle your eyes. I stumble upon on this pink flower which looks like a human brain! I have no ideas what it is call, maybe I should name it the brainy plant.


Saturday, January 17, 2009

Kardiomou

2 weeks in school ...

In my professional communication lesson, i learn a new word - Kardio/mou
its a Greek word.

  • Kardio ---- means heart ---that's where you get the word cardio
  • mou --- my

It means my sweet heart, darling and so on .....

Saturday, January 10, 2009

Research Writing In Brief

Met my FYP supervisor,who gave a quick brief:
  • What is your contribution?
  • What are you adding to the body of knowledge? (Problem or a particular field)
  • 1-2 two few, 3-4 just rite
  • The intensity can vary for each contribution.
  • Are the contribution novel?
  • How is it significant and have an impact on the people?
  • Claim of Bee having 5 strips is of no value to people.
  • Why is the contribution necessary? Motivation
  • Justify it is new --- why? Comprehensive survey
  • Literature Review --- Related work --- Limitation.... Not solve hence i should solve it.
  • Too many knowledge know what to focus on.

Quotes

  • You are your thoughts.The thoughts in your head are what institute the laws of attraction. You think therefore you are. - Joe Vitalli, The Laws of Attraction
  • Don't react blatantly in Anger and become a Zero - Papati
  • Don't miss out in the learning values of problems by over-looking the root causes but starting at the occurences - Raj
  • You can do almost anything if you have a steady income. Little or much, what matters is that you can count it, month after month.Without the regular flow of funds, you will be constantly distracted from you goals - Norm & Bo
  • Time is greater than money, you can never really buy time. Don't let time slip away. - Raj
  • Ignore technology advancement and you will either be left behind or you have to fork out more - Raj
  • Without passion nothing happens in life but without compassion the wrong things happen - Jan Eliasson
  • The poorer you are the more you need to plan and act wisely. Any undesired outcome you have little resource to manoeuvre.
  • “Life changes when you least expect it to. The future is uncertain. So, seize this day, seize this moment, and make the most of it.”
  • To get to where you want to go in life you must start from where you are - Tan
  • Maturity does not come with age,it comes with the acceptance of responsibilities - Tan

ACM TechNews