Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Maybe try to use their own interests and relate the code to a kid's story. How are you going to make the little lamb move 5 steps?

Sample to move 1 step:

function move(steps) {

  $("#lamb").css({

    'right': steps + 'px',

    'transition': 'all 1s'

  });
}

move(100);

becomes

move(500);

I don't know haha, do they even want to code in the first place.

Doesn't even consider requestAnimationFrame or proportional scale. Also I'm starting to realize jQuery is pretty big even the min version especially on slow networks.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: