real world (X)HTML

Having been developing mostly in a bubble for a few year, I forgot that some people still use Internet Explorer for Windows. (Sheesh, get Firefox already.) Turns out (thanks, Tantek!) that IE6 doesn’t support XHTML. That’s not usually too much of a problem, unless you try and make a previously non-empty tag, like <script> empty. […]

date sorting code

i was making a birthday-tracking application, and wanted to be able to do year-insensitive date sorts. i couldn’t find what I was looking for, so I wrote this: int personSortByBirthday (NSCalendarDate *d1, NSCalendarDate *d2, void *context) { int day1 = [d1 dayOfMonth]; int day2 = [d2 dayOfMonth]; int month1 = [d1 monthOfYear]; int month2 = […]