day 82 — code 365
Thu 3 Mar 2016
Links of the day:
(Easy dimensioning for sprites!)
- Warmup: Nucleotides
- Demos: Fansite
- DOM review: selection, manipulation
- Events review: handlers, callbacks, event object
- Lab: Catwalk
From our fansite demos, we learnt about a few more notable people in programming history. Richard Stallman, and his contribution / attitude towards open source software and copyleft licence (and that his favourite languages are Lisp and C). Grace Hopper, and how she introduced meaningful words, functions, the concept of portability, and also that it’s “better to ask for forgiveness than permission” both in code and life…
Float was designed for wrapping text around an image!
We revised DOM selection and manipulation today — and the various properties that DOM nodes have. It was interesting to know that the console is actually a child object of the window object! Also interesting was investigating the style property of DOM node objects — and which / why CSS properties are listed / are not listed.
We also learnt about timers today — using setTimeout and setInterval, and how they allow code to be executed after a delay, and/or looped. And also that they can be assigned to a variable (timer functions return an ID number) to allow them to be cancelled.
Then we put this into practice by manipulating a cat gif — making it walk back and forth across the screen… and then let loose to create our own hideous collage of animated / timed images!
Thanks for stopping by!