From: Joshua B. <jbl...@ma...> - 2006-09-26 15:28:18
|
John Bailey wrote: > > I was looking the other day to this web page: > > http://www.artima.com/weblogs/viewpost.jsp?thread=3D168511 > > and saw this inside yahoo_buddy_icon_upload_connected(): > > if (!d) > > return; > > That seems like bad code. >=20 > This is hardly bad code. It is a simple check to return from the functio= n if d=20 > is null and is needed because it is possible NOT to have a buddy icon to = send to=20 > the server. It makes far more sense to have the null check in this funct= ion=20 > than to check for null everywhere the function is called, which would be = the=20 > alternative. Oh come now - are you saying that random weblogs could possibly be wrong when they spew forth Rules for Coding? Surely you aren't implying that individual implementations might have reason to do something that Michael Feathers would blanketly label as bad... Kids these days. --jtb |