Saturday, February 13, 2010




I've learned


I've learned - 
that you cannot make someone love you. 
All you can do is 
be someone who can be loved. 
The rest is up to them. 

I've learned - 
that no matter how much I care, 
some people just don't care back. 

I've learned - 
that it takes years to build up trust, 
and only seconds to destroy it. 

I've learned - 
that it's not what you have in your life 
but who you have in your life that counts. 
I've learned - 
that you can get by on charm 
for about fifteen minutes. 
After that, you'd better know something. 

I've learned - 
that you shouldn't compare 
yourself to the best others can do 
but to the best you can do. 

I've learned - 
that it's not what happens to people 
that's important. It's what they do about it. 

I've learned - 
that you can do something in an instant 
that will give you heartache for life. 

I've learned - 
that no matter how thin you slice it, 
there are always two sides. 

I've learned - 
that it's taking me a long time 
to become the person I want to be. 


I've learned - 
that it's a lot easier 
to react than it is to think. 

I've learned - 
that you should always leave 
loved ones withloving words. 
It may be the last time you see them. 

I've learned - 
that you can keep going 
long after you think you can't. 

I've learned - 
that we are responsible for what we do, 
no matter how we feel. 

I've learned - 
that either you control your attitude 
or it controls you. 

I've learned - 
that regardless of how hot and steamy 
a relationship is at first, 
the passion fades and there had better be 
something else to take its place. 

I've learned - 
that heroes are the people 
who do what has to be done 
when it needs to be done, 
regardless of the consequences. 

I've learned - 
that learning to forgive takes practice. 

I've learned - 
that there are people who love you dearly, 
but just don't know how to show it. 

I've learned - 
that money is a lousy way of keeping score. 

I've learned - 
that my best friend and I can do anything 
or nothing and have the best time. 

I've learned - 
that sometimes the people you expect 
to kick you when you're down 
will be the ones to help you get back up. 

I've learned - 
that sometimes when I'm angry 
I have the right to be angry, 
but that doesn't give me 
the right to be cruel. 

I've learned - 
that true friendship continues to grow, 
even over the longest distance. 
Same goes for true love. 

I've learned - 
that just because someone doesn't love you 
the way you want them to doesn't mean 
they don't love you with all they have. 

I've learned - 
that maturity has more to do with 
what types of experiences you've had 
and what you've learned from them 
and less to do with how many 
birthdays you've celebrated. 

I've learned _ 
that you should never tell a child 
their dreams are unlikely or outlandish. 
Few things are more humiliating, and 
what a tragedy it would be 
if they believed it. 

I've learned - 
that your family won't always 
be there for you. It may seem funny, 
but people you aren't related to 
can take care of you and love you 
and teach you to trust people again. 
Families aren't biological. 

I've learned - 
that no matter how good a friend is, 
they're going to hurt you 
every once in a while 
and you must forgive them for that. 

I've learned - 
that it isn't always enough 
to be forgiven by others. 
Sometimes you have to learn 
to forgive yourself. 

I've learned - 
that no matter how bad 
your heart is broken 
the world doesn't stop for your grief. 

I've learned - 
that our background and circumstances 
may have influenced who we are, 
but we are responsible for who we become. 

I've learned - 
that sometimes when my friends fight, 
I'm forced to choose sides 
even when I don't want to. 

I've learned - 
that just because two people argue, 
it doesn't mean they don't love each other 
And just because they don't argue, 
it doesn't mean they do. 
I've learned - 
that sometimes you have to put 
the individual ahead of their actions. 


I've learned - 
that we don't have to change friends 
if we understand that friends change. 

I've learned - 
that you shouldn't be so 
eager to find out a secret. 
It could change your life forever. 

I've learned - 
that two people can look 
at the exact same thing 
and see something totally different. 


I've learned - 
that no matter how you try to protect 
your children, they will eventually get hurt 
and you will hurt in the process. 

I've learned - 
that there are many ways of falling 
and staying in love. 


I've learned - 
that no matter the consequences, 
those who are honest with themselves 
get farther in life. 

I've learned - 
that no matter how many friends you have, 
if you are their pillar you will feel lonely 
and lost at the times you need them most. 


I've learned - 
that your life can be changed 
in a matter of hours 
by people who don't even know you. 

I've learned - 
that even when you think 
you have no more to give, 
when a friend cries out to you, 
you will find the strength to help. 


I've learned - 
that writing, as well as talking, 
can ease emotional pains. 

I've learned - 
that the paradigm we live in 
is not all that is offered to us. 



I've learned - 
that credentials on the wall 
do not make you a decent human being. 

I've learned - 
that the people you care most about in life 
are taken from you too soon. 


I've learned - 
that although the word "love" 
can have many different meanings, 
it loses value when overly used. 

I've learned - 
that it's hard to determine 
where to draw the line 
between being nice and 
not hurting people's feelings 
and standing up for what you believe.

EOF.

"sleepy meepy" - A

Posted by Posted by Mohd Alif at 3:52 PM
Categories:

0 comments  



Knowing Fish

One day Mudim and a friend were walking by a river.
"Look at the fish swimming about," said Mudim
"They are really enjoying themselves."
"You are not a fish," replied the friend,
 "So you can't truly know that they are enjoying themselves."
"You are not me," said Mudim. "So how do you know that
I do not know that the fish are enjoying themselves?"


Now think! how often that situation ruin your day. 

EOF.

"A brutal form of wit" - A

Posted by Posted by Mohd Alif at 3:09 AM
Categories:

0 comments  

Monday, February 1, 2010


Tutorial will be written in Bahasa Malaysia mostly, with some English to facilitate sentences meaning delivery. (As requested, also as proposed by Ramzul Ihsan.)



Perkara yang perlu dilakukan sebelum mengikuti tutorial ini:
  1. Download jquery library. Pilih yang PRODUCTION, dah trimmed, thus ringan. Terbaik untuk web page load dgn optimis.
  2. Sudah pun install php server, dan apache web server. Senang cerita, download xampp package, install.
  3. Notepad adalah paling basic. (IDE pun takpa). 
  4. Focus! ;D
Tutorial ini akan menggunakan Notepad++ sebagai IDE.



Here we go!

Copy dan buat fail cuba.php dalam direktori di mana anda publish web. Contoh di sini menggunakan xampp bundle, jadi direktorinya adalah 'htdocs'.

<!doctype html>
<html>
  <head>
    <script type="text/javascript" src="jquery-1.4.min.js"></script>

    <script type="text/javascript">
      // kat sini kita akan letak javascript dan jquery functions
    </script>
  </head>
  <body>
    <a href="http://itsmefila.blogspot.com/">Hello Durian Tunggal</a>
  </body>
</html>


Cuba open web page di atas, should be in localhost. Hasilnya ada seperti begini:



Contoh direktori adalah seperti di bawah:



Seterusnya, kita akan modify pada link Hello Durian Tunggal untuk handle click event. Pertama sekali perlu meletakkan kod $(document).ready() function as a replacement to native javascript style, window.onload

Beza antara kedua function tersebut adalah, dengan menggunakan window.onload, web browser perlu habis loading kesemua webpage barulah segala function2 dalam window.onload execute. Bayangkan kalau web page tu heavy, kena tunggu lama lah. Inefficient.

But, compare to jquery predefined function $(document).ready() sebagai pengganti kepada window.onload, ia akan terus execute function javascript pada mana2 element html yg sudah pun berjaya load ke atas web browser walaupun the web page is actually not fully loaded.

Seterusnya, bagaimana nak buat click event handling pada mana2 html element yang valid.

<!doctype html>
<html>
  <head>
    <script type="text/javascript" src="jquery-1.4.min.js"></script>
    <script type="text/javascript">
      // di sini kita akan letak javascript dan guna jquery functions.
   $(document).ready(function() {
    
           $("#link1").click(function(e) {
     
      alert("Lompat pagar hari-hari");
      e.preventDefault();
           });
   
   });
    </script>
  </head>
  <body>
    <a href="http://itsmefila.blogspot.com/" id="link1">Hello Durian Tunggal</a>
  </body>
</html>



Modify kod awal tadi dengan kode di atas ini, kemudian cuba reload page, dan click pada link Hello Durian Tunggal, kemudian hasilnya adalah seperti ini:


Library Jquery ada tersedia event helpers yang lebih banyak lagi, seperti blur, change, mouseover, focus, keyup dan lain2.. Cuba rujuk pada documentation jquery section event helpers, kemudian cuba event handling yang lain.

Berbalik kepada contoh di atas, pada kod ini
  
           $("#link1").click(function(e) {  
alert("Lompat pagar hari-hari");
 e.preventDefault();
           });


#link adalah selector of html element. penggunaan simbol adalah seperti berikut:

  • #element - untuk memilih element html yang mengikut attribut Id nya. ()
    • <img scr="bla.gif "  id="element"> 
    • $("#element").click()
  • .element  - dot sahaja adalah untuk memilih element html mengikut attribut class nya. 
    • <img scr="bla.gif "  class="element"> 
    • $(".element").click()
  • element - memilih html native element.
    • <img scr="bla.gif ">
    • $("element").click()

Dalam event handler click di atas, terdapat function. Ini adalah bertujuan untuk implement callback function, maksudnya, apabila user click what will happen. So, you can manipulate inside that space whatever u want.

 e.preventDefault() --> function ini adalah untuk prevent webpage daripada redirected to the URL according the link yang kita sedang manipulate. This is very useful at most situations.


Seterusnya adalah bagaimana untuk bermain effect. Modify kod anda tadi seperti di bawah:

<!doctype html>
<html>
  <head>
    <script type="text/javascript" src="jquery-1.4.min.js"></script>
    <script type="text/javascript">
      // di sini kita akan letak javascript dan guna jquery functions.
    $(document).ready(function() {
    
           $("#link1").click(function(e) {
    e.preventDefault();
    $(this).fadeOut("slow", function(){
    $(this).fadeIn("slow").css("font-size","40px");
      
     }); 
              });  
   });
    </script>
  </head>
  <body>
    <a href="http://itsmefila.blogspot.com/" id="link1">Hello Durian Tunggal</a>
  </body>
</html>

 

Function yang ditambah adalah berikut:

 $("#link1").click(function(e) {
     e.preventDefault();
 $(this).fadeOut("slow", function(){
     $(this).fadeIn("slow").css("font-size","40px");
  }); 


fadeOut dan fadeIn adalah effect function yang terdapat dalam library jquery. $(this) adalah merujuk kepada current object in scope yang kita sedang manipulate. In this code adalah link1.


Dalam function fadeOut, it takes two parameters, satu adalah speed animation untuk object link1 fade out. next is, callback function. Means, apa yang kita ingin buat selepas function fadeOut execute.

Dalam code di atas, dalam callback function, ada other function which is fadeIn. As you can see, it goes like that simple. The best thing is, we can write statement yang bersambung, seperti contoh di atas:

$(this).fadeIn("slow").css("font-size","40px");


Means, kita nak fadeIn object link2 slowly, simultaneously change the font size using CSS changer function from the jquery library.

Woohoo! Enough kot for today.  I will cover on more jquery tutorials other time. Possibly how to construct ajax with jquery. Again, believe me, it is very simple, short, and small.

Start to explore jquery documentation and study the API. For clearer assistance and demos, rujuk ja kat numerous website tutorials on the net. It's free.

Just start, dont wait.

"Write less, Do more".
Good luck ;D


Sumber tambahan: Download Jquery Starter Kit

Posted by Posted by Mohd Alif at 8:54 PM
Categories:

0 comments  

Why should i? Because it will...

  • Save yourself some time when you read the code 10 weeks/month/years later.
  • Help your friends understand your code in a team's project.
  • Help your instructor/TA give you a good grade.
  • Make debugging faster by not duplicating code.





" I'm just an observer of Java, and where Microsoft wants to go with C# is too early to tell. "- Dennis Ritchie 

Posted by Posted by Mohd Alif at 10:26 AM
Categories:

1 comments  

Wednesday, September 2, 2009


A programmer may not necessarily be a developer, developer always can be a programmer. Here are some points that i believe true according to my experiences. I'm so tired having around with peers who only knows to talk about technical stuffs in motivation just to ensure they are not outdated and know-it-all. Well that is good in some ways, but not enough to compete in real software industry. Stretch our mind, read a lot, do not condemn, do not feel proud to say critiques about others, instead, motivating + suggest + encouraging each other. Be the one who always think to create opportunities instead of waiting. Talent only is not sufficient.




Programmer

  • Technical oriented
  • Not really in concern with users needs, code the application is what matters and fun things.
  • Cares only the code, (show off-ing. hu's smarter which wont promise solve anything to peoples)
  • Building the application under someone's supervising and command. (The Boss perhaps)
  • No project, no job.
  • Simplicity is define as to cut everything VITAL into short. (which they think cool act.)




Developer

  • Users concern comes first, then technical issues follows..
  • Care about application usability & efficiency in priority list.
  • Solving REAL people problems is damn fun and satisfying.
  • Able to recognize opportunities around.
  • Possess innovative mind & highly inventive.
  • Think of simplicity as easiness & usefulness. (it might consume lots of time to plan for quality simplicity.)

Posted by Posted by Mohd Alif at 1:10 PM
Categories:

0 comments  

Friday, August 28, 2009


Posted by Posted by Mohd Alif at 6:13 AM
Categories: Labels:

0 comments