« June 2006 | Main | August 2006 »

July 31, 2006

links for 2006-07-31

July 30, 2006

links for 2006-07-30

July 29, 2006

links for 2006-07-29

July 28, 2006

links for 2006-07-28

July 27, 2006

links for 2006-07-27

July 26, 2006

links for 2006-07-26

July 25, 2006

links for 2006-07-25

July 24, 2006

links for 2006-07-24

July 23, 2006

links for 2006-07-23

July 16, 2006

links for 2006-07-16

July 15, 2006

links for 2006-07-15

July 14, 2006

links for 2006-07-14

July 13, 2006

links for 2006-07-13

July 12, 2006

links for 2006-07-12

July 11, 2006

links for 2006-07-11

July 10, 2006

links for 2006-07-10

July 07, 2006

links for 2006-07-07

July 06, 2006

links for 2006-07-06

July 05, 2006

links for 2006-07-05

July 03, 2006

links for 2006-07-03

July 02, 2006

A debugging statement

I am writing a shopping cart controller in JavaScript and CSS for the last few days. It's rather complex, and tonight I found I had written this debugging statement:

 alert((function(){var a=""; for(var i in controller){a+=i+" : "+controller[i];return a;}})()); 

which I quickly realized should be amended to

  alert((function(){var a=''; for(var i in controller){a+=i+" : "+controller[i];}return a;})());

which then became

alert((function(){var a=''; for(var i in controller){a+="\n"+i+" : "+controller[i];}return a;})());

and finally in exasperation,

  alert((function(){var a=''; for(var i in controller){a+="\n"+i+" : ";}return a;})()); 

links for 2006-07-02