This version of the site is now archived. See the next iteration at v4.chriskrycho.com.
Topic: “funny”

Something you should never do, but which did provide some hilarity for us today:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
if (idate < 65535)
  {
    CTime itime = CTime::GetCurrentTime();
      iyear = itime.GetYear();
        imonth = itime.GetMonth();
          idate = itime.GetDay();
            icurdate = (iyear - 2005)*512+12800 + (imonth*32 +1) + idate;
              if(icurdate > tdate)
                {
                  sprintf(str, "Key Expired");
                    MessageBoxEx(m_hWnd, str, "Error", MB_OK,LANG_ENGLISH);
                      exit(-1);
                    }
                  }

The whole 1500-line module was written up that way. Why? We have no idea. It’s better now. Less funny, but better.

Point of minor hilarity: wherever I type “cookie” for web dev, I want to spell it with an extra e, because that’s how you spell Wookiee.