Read, understand, and then fix your compiler warnings.
Compiler warnings let you know that you've either done something wrong, or you've done something non-standard. Either way, ignorning compiler warnings shows a lack of discipline and skill; it's something like ignoring big red "warning" signs in real life.
I'm working on a .NET solution that, when last compiled, generated over 60 warning
messages. A couple of them I put in to let other developers know about problems
I found, but most warned about things that actually needed to get fixed.
For example, the following line of code:
if (comboBox.SelectedItem == "Do stuff")
generated the warning, "Possible unintended reference comparison; to get a value
comparison, cast the left hand side to type 'string.'"
In other words, the if statement was evaluating whether the object comboBox.SelectedItem
was the same object as the string "Do Stuff," which is an impossibility.
So the comparison would always fail, making it look like the feature was
failing. Yet the compiler warned the developer about the problem, and even said
how to fix it.
If you're wondering, the corrected line looks like this:
if ((string)comboBox.SelectedItem == "Do stuff")
Chicago today banned smoking in restaurants starting January 16th. We've now joined New York, Los Angeles, and a number of other cities that also ban smoking in some public places. Reports the Tribune:
Smoking is allowed in freestanding bars and taverns, and within 15 feet of any restaurant bar, until July 1, 2008. A tavern is defined as an establishment that earns at least 65 percent of its revenues from liquor sales.
My previous entry, about Kansas University Professor Paul Mirecki's beating by religious extremists, may not have hit the correct note of irony and outrage.
I've just read the reports from Mirecki's local paper, the Lawrence Journal-World. The essential sequence of events was this:
- Mirecki wrote in an online forum that his upcoming course, "Special Topics in Religion: Intelligent Design, Creationism, and other religious mythologies," would be a "be a nice slap in [the fundies'] big fat face by teaching it as a religious studies class under the category 'mythology.'"
- On November 29th, the Lawrence Journal-World broke the story about how some Kansas legislators called for hearings to look into Mirecki's conduct.
- Mirecki, or the University, cancelled the course. The University president went so far as to call Mirecki's comments "repugnant."
- Mirecki then apologized publicly, saying it was "an ill-advised e-mail I sent to a small group of students and friends that has unintentionally impugned the integrity and good name of both the university and my faculty colleagues."
- Thugs beat the snot out of him.
Let me re-phrase that:
Thugs beat the snot out of him.
The Journal-World bound up some of Mirecki's postings from the Yahoo! discussion group he participates in. A quick read through those postings shows him to believe religous extremists are irrational, intolerant, and a threat to the American way of life.
Good thing those boys knocked some sense into that egghead.
A zeal for different opinions concerning religion, concerning government, and many other points, as well of speculation as of practice; an attachment to different leaders ambitiously contending for pre-eminence and power; or to persons of other descriptions whose fortunes have been interesting to the human passions, have, in turn, divided mankind into parties, inflamed them with mutual animosity, and rendered them much more disposed to vex and oppress each other than to co-operate for their common good.
—James Madison, Federalist No. 10
For in politics, as in religion, it is equally absurd to aim at making proselytes by fire and sword. Heresies in either can rarely be cured by persecution.
—Alexander Hamilton, Federalist No. 1
From today's Chicago Tribune:
Creationism-as-myth professor beaten
LAWRENCE, KANSAS—A college professor whose planned course on creationism and intelligent design was canceled after he derided Christian conservatives said he was beaten by two men along a rural road.
The Lawrence Journal-World has a long series of stories about this.
For my money, I'm hoping there are enough rational people in Kansas to prevent them blowing up statues and the like.
My friend Danielle is finishing up her tour with the Peace Corps. She's been in Kiribati, where the temperature never seems to get below 30°C (86°F).
Danielle, if you have a chance, you may want to check the weather here before getting on the plane. It's supposed to go below -18°C (0°F) tonight.
From yesterday's column from Paul Krugman (reg.req.):
Over the last few years G.D.P. growth has been reasonably good, and corporate profits have soared. But that growth has failed to trickle down to most Americans.
So where are all those corporate profits going, I wonder?
It was on this day in 1933 that Prohibition ended.
Shortly afterward, marijuana was criminalized, in no small part because the alcohol lobby has always been more powerful, and in the 1930s popularly associated with a different ethnic group, than the marijuana proponents.
I was going to provide links to scholarship to support this point, but there isn't a lot of it out on the Web right now. Even the relatively de-politicized National Institutes of Health and the Journal of the AMA have a dearth of information about the relative dangers of pot vs. booze. (And yes, despite the flap about Plan B, I think the NIH are relatively apolitical. The FDA, on the other hand, not so much under this administration.)
I did find a link to a site about Reefer Madness, which is hi-larious. But it's not really scholarship.
Note: I'll stop parroting the History Channel's daily list for now. But if you're interested in histroy, you should subscribe to it.
We got about 10 cm (4 in.) of snow last night, so this morning Anne and I went out to shovel.
It was on this day in 1818 that my native Illinois became the 21st of the United States.
Tangential question: Why does the History Channel put this tidbit in the Old West category?
Anne and I attended the taping last night of Wait Wait — Don't Tell Me!, the NPR News Quiz. It airs Saturday.
If you don't listen to the show, tune in, and find out how to get Aerosmith and Kenny G to play the same gig, among other things.
Note: You may have seen this post earlier. In a continuation (recurrence?) of earlier problems, Das Blog ate the post about an hour after it went up. Grr.