Saturday, July 30, 2011

けち

   1:  clear all;
   2:  clc;
   3:   
   4:  % Prompt
   5:  conv    = input('Conversion Rate  : ');
   6:  amt     = input('Amount           : ');
   7:   
   8:  % Synthetize range
   9:  amin = round(amt*0.95*100)/100;
  10:  amax = amt;
  11:   
  12:  range = amin:0.01:amax;
  13:   
  14:  % Find result after rounding
  15:  ay = floor(range*conv*100)/100;
  16:   
  17:  % Result without rounding
  18:  y = range*conv;
  19:   
  20:  % Differences
  21:  dy = y-ay;
  22:   
  23:  % Plot
  24:  subplot(2,1,1);
  25:  plot(range, y, range, ay);
  26:  subplot(2,1,2);
  27:  plot(range, dy);
  28:   
  29:  % Find minimum difference
  30:  [my i] = min(dy);
  31:   
  32:  % Result
  33:  disp(['Best amount      : ' num2str(range(i))]);
  34:  disp(['Result           : ' num2str(y(i),10)]);
  35:  disp(['After conversion : ' num2str(ay(i),15)]);
  36:  disp(['Difference       : ' num2str(dy(i),15)]);



When you’re dealing with Paypal, their conversion rates are usually 5 decimal places (e.g. 2.88145), but what they give you is 2 decimal places.


See the problem? 1 USD is originally RM2.88145, but they give you RM2.88 instead! Yes, they sucked out the RM0.00145 – this might not look a lot to you, but imagine they get RM0.00145 from 1 million people.


RM1450 into the pocket – for doing nothing at all! (after already robbing you by offering lower conversion rates)


This MATLAB script tries to limit your losses to the minimum.


Scenario


I have 429.33 USD, if I convert directly, I’ll get 1237.09 MYR instead of (1237.0929285 MYR), therefore losing 0.0029285 MYR.


Using the script, the best conversion amount is 423.45 USD, yielding 1220.15 MYR (instead of 1220.150003 MYR), therefore losing only 0.000003 MYR.


Excellent? If you haven’t notice, it’s 99.9% savings :D


Yes, I’m stingy =P

Thursday, July 28, 2011

ランスの料理日々– Day 1

Today I finally decided to try on a recipe (more like a sloppy technique) – Fried Pizza. Original recipe from here: http://brainz.org/14-easy-meal​s-every-guy-should-know-how-ma​ke/


Last weekend I had pizza for dinner, but didn’t manage to gobble down 2 regular pizzas like what I’m (or technically, was) usually capable of. So I had leftovers placed in the freezer awaiting for this fated day.


What you need is simple: the biggest frying pan you can find in your house (which unfortunately I didn’t have), a cover for it, cooking oil and (preferably defrosted) pizza.

STEP 1

This is a no-brainer, heat the frying pan with highest heat to remove all moisture. After it’s dry, pour a thin layer of oil onto it and distribute evenly.

STEP 2

After you can see small bubbles forming in the oil, or smoke is coming out, your oil is ready. Turn down your stove to low heat (not medium low, unless you are confident enough not to create a fireball and charcoal pizza like what I just did).


WARNING: Do not heat the oil until it’s smoking too much – this would kill the base of your pizza before the cheese melt.

MY STORY: I was expecting the oil to boil, which in the end it didn’t, except it was smoking like nobody’s business. “What the hell”, I turned the fire to medium-low and placed the pizza onto the pan.


Within a few seconds it turned into charcoal, and best of all, after I removed the pizza from the pan, the pan actually lit up into a ball of flame – till my neighbors yell “API! API!” and went over to check out on me.


At least my kitchen didn’t explode. =P

STEP 3

Cover the frying pan up – this will contain the smoke and heat, hopefully melt your pizza toppings early enough before the crust turns into ashes. (hence defrosting beforehand is helpful)


Wait for around 3-5 minutes and check on the bottom of your pizza (flip it slightly, don’t topple it). If there’s no sign of burn, you may continue frying it until the cheese melts completely.

STEP 4

After the toppings have melted, remove the pizza from the pan and place it on a plate. You may want to place paper towels on the plate beforehand to absorb the excess oil from the pizza. On the other hand, if you still keep the pizza box, you can just place the pizza directly on it, no towels needed :D

STEP 5

Enjoy your crispy-bottom-melty-top fried pizza. Awesome!

AB型

Wednesday, July 20, 2011

星の扉

Three days – munchkin-raccoon pair managed to survive 3 days of (kononnya) battle.

Monday – Elimination Round

First pair was formed by Rotaract members. By the way he spins the racquet, the guy looks pretty strong Smile with tongue out. We were lucky the guy opponent didn’t execute much smashes, and I managed to land a few lucky kills.

First time seeing munchkin getting so aggressive.


Tuesday – Quarter Finals

Was actually very nervous, until I know who our opponents were – two cute cheerful girls (yes, mixed doubles with female doubles inside), with one of them first time playing badminton.

So we ended up a heehaahaa match (and we lucked out again).


Wednesday – Semi Finals

What can I say – the guy is not a noob like me. We were up against a big guy equipped with powerful smashes and good maneuverability (seen his singles match before), and his girlfriend which didn’t looked like a beginner either.

The difference in firepower was very obvious.

Did managed to exploit the girl for a few times with low serves and lucky kills. Munchkin was really scary today with her kills.

Vice versa, the guy managed to kill off some of our serves.

The guy later tend to stick closer to the girl preparing to take most the kills, and the girl gave less room for kills. Her clears were still quite vulnerable.

We were essentially at the mercy of the guy – he was clearly avoiding smashes, so I took back my idea of smashing the girl either. We wouldn’t stand a chance if he go all out.

It was a good defeat, we were simply outmatched by the knight and his princess.


We had the chance to compete for the 3rd placing. This time, our opponent is nowhere comparable to the previous one, both in terms of skill and power.

The guy didn’t manage to smash at all, and his back-court clears unfortunately only manage to reach mid-court – highly vulnerable to smashes.

The girl on the other hand, shared the same quirk like the previous girl – vulnerable to net kills when serving.

And so we happily exploited our way to the 3rd place.

Bah, at least we (a bunch of noobs) got to play more than a round. (Lucky!) Smile with tongue out

Sunday, July 17, 2011

緋色の空

It has been a while since I last blogged. But here I am, trying to jot down the little bits of my life, for the future me to look at the footprints he left.

Tomorrow will be the first time I participate in a badminton competition. Till now I rarely compete in sports (except during times I was being forced to participate). The basketball competition I was forced to join last time still gives me the chills.

Considering the amount of time I spent on playing badminton lately, and considering mixed doubles is probably the easiest category in badminton, I have not much confidence in winning the competition. Somehow the mind and body are not used to badminton just yet.

Though I didn’t really originally plan to join this competition, will try to do my best and hopefully this odd raccoon + munchkin team can at least go through the elimination round, into the semi-finals.


On a side-note, I have achieved my education goal (or at least achieved a primary objective) by securing a solid degree. But somehow I don’t really feel as happy as I expected. Human emotions is such a mystery.

However I’m standing at a crossroad between securing a job on a MyKad related company, doing my masters in the states, or climbing onto PhD at South Korea. I wonder if the extra education is really worth the time and money, does it really matter in practical situations? Or is practical work experience gives a better edge in the corporate world?

Anyhow, what lies in front of me is the door to the adult world, upon stepping into it, I’m bidding farewell to the carefree days, landing my feet right into the world of responsibilities, liabilities, and commitment, there’s no turning back.

Somehow I envy the young people who are living their carefree life off their parents.

But still, life goes on.

Monday, June 20, 2011

正義・無力

The feeling of helplessness sucks. The feeling of regret, that you could save somebody’s life, only if you’ve chosen another path. If only you knew a simple action would have changed someone’s fate.

A simple action would have brought light to her. A simple action would have protected her from the darkness, the bastards. A simple action would have swayed a fine young girl from her death.

I’m sorry, I should have chosen to know you better. I would have pulled you out of the circle.

Rest in peace, Elli.

Saturday, June 4, 2011

EPILOGUE 2011

It only has been half of 2011 and already feels like a year had passed by. The past 6 months had been full of events and experiences. Though I’m worn out a bit, recalling back all the information that had gone through my 5 senses – the amount more than what I’ve experienced in the past 3 years altogether – I somehow feel satisfied.

I started off my year with my life shifted 180 degrees. It was the time when I experience, for the first time, an emotional attachment to something. It’s something like the feeling of euphoria drugs give you, and they leave you craving for more – you basically get addicted to it. It’s the first thing you think of in the morning, and the last thing you think of before you go to bed.

Throughout the days I learnt a lot of new things, things I wouldn’t learn if I was still single, experience I wouldn’t go through if there wasn’t a 180 degree shift in my life, dreams I wouldn’t dream of if I was still the old me.

They say good times won’t last forever – and they were right.

Things were heating up pretty fast during the 2nd quarter of 2011. Project management challenges, technical difficulties, college stress caused a snowball effect. Things seriously went downhill when the emotional attachment I was clinging on to, suddenly got detached.

My life took another turn of 180 degrees.

Yes, I didn’t see that coming. It hit me like a brick right in the face and left me sulking for days. Analogous to the withdrawal symptoms you get in drugs, I couldn’t get used to the big hole it left in me, totally lost my mind.

That’s when I finally realized how vulnerable I could be – and I don’t want this to end this way.

Faced with finals around the corner, I had to bite the bullet. There’s no choice left for me but to gaze to the front and run like hell. I’ve seen how my condition can do shit to people if they don’t move on, I’m definitely not willing to share the same fate.

After sleepless nights, lots of hard work, lots of Redbull/Livita and a bit of ass-covering, somehow I managed to run past everything relatively unscathed. Boy, I didn’t think I am a mean bad ass, but I guess I am :D

I managed to get rid of my addiction (thankfully) and learn to cherish things I would normally take for granted – my brothers-in-arm, they’re probably the only ones that will watch your back when shit happens; and family, they’re the only ones that will shower you with unconditional love. Like air, these are the important people that are there all along, but always get swept aside.

And now I stopped and think – hey, things weren’t so bad after all, I’m glad everything turned out this way, except the part he, who went through similar fate as mine, is still stuck in the endless limbo. Hope he pull himself back up soon.

Now, I’m proud to say – I can build robots from scratch. ;)