Thứ Sáu, 24 tháng 12, 2004

Best of the Hughalanche





Hmmm... care to see the results of a "Hughalanche"? Yeah, I know, I've got a long way to go to reach even "third tier" status in the blogosphere, but...







...when Hugh Hewitt's blog (worth reading every day, BTW) posts a link to your site, you'll know it.



I first came across Mr. Hewitt on, I believe, Fox News. Interviewed in typical Fox "boxing match" fashion, with a Left-leaning pundit opposite him (it might have been Newsweek's Jon Meacham), Hewitt laid down an eviscerating rap that left his opponent -- literally -- speechless. It was a devastating victory in a difficult venue and one which doesn't often happen on television.



I was like, "who is that guy?". That led me to the Hewitt site and, of course, his Liberal-punishing daily missives that combine simile and historic perspective in concise, expansive, and often breathtaking fashion.



Hewitt on a Richard Stevenson article:



It isn't surprising that the New York Times intends to attack the president throughout his second term and to try and turn Iraq into Vietnam. What's surprising is the baldness of the tactics, and their lack of art. Peddling the same old story line with the same old tired sources isn't going to impress anyone outside of the fever swamp.




On Roger Ailes' comments on the MSM:



The anti-Americanism of many elite media is palpable, and increasingly resented by Americans of all backgrounds. Ailes knows this, and knows as well that any network that simply does not attack America on a nightly basis will be ahead of CNN.




On Time Magazine's naming a blog of the year:





Time has named a first-ever "blog of the year," and it is the very blog that not only nailed Rather, but also helped propel Christmas-Eve-not-in-Cambodia into the mainstream... Look a little closer and you'll find three extraordinarily credentialed legal professionals who have been writing on serious subjects for years... The Minneapolis Star Tribune ought to have locked these guys up a year ago, but the self-importance of the always-ignored editorial board has probably intimidated the time-servers there from raising the subject of the bloggers who have generated more news and sparks in one year than the Strib has in 50.



In short, Time has identified the hot blogger(s), and any media property looking for eyeballs ought to be beating a path to their collective door to try and sign the free agents.



Just a thought. A profitable, market-driven thought, so it will probably not occur to the dopes running CNN, to cite one example of legacy media trying very hard to reclaim audience.




On JP Blecksmith, a US Marine who died fighting terrorist insurgents in Fallujah.



"Good versus evil" I put those words in bold above because that is the only way to communicate the stakes --in Iraq, in Afghanistan, in the Netherlands, in the Ukraine, in countless struggles across the globe. JP Blecksmith gave everything, including his life, for "the good," and as Lincoln said 141 years ago, we must agree "that we here highly resolve that these dead shall not have died in vain." That "we" means "us," and that means freedom for the Iraqis and the Afghanis, and nothing --nothing-- less for the children of the Netherlands. JP believed in "the good." That is why we honor and grieve his sacrifice, and pray for the comfort of his family.




The bottom line is simply this: if you're not reading Hewitt, you should be.

Instrumenting Code





Here's an example of how I've instrumented code in the past. The main focus of this logic is to provide peer-to-peer services for the BadBlue software. The server can listen for connection requests, which can come in either of two formats: HTTP or Gnutella. HTTP requests are dispatched to web services processing, not covered here.



Gnutella protocol requests are dispatched to, among other places, the snippet of code, below. Each request operates in its own thread (this is Win32, which uses a threading model - not the forked process model of Unix/Linux). Multiple threads are thus connected to multiple peers, simultaneously, all exchanging messages, relaying query results, performing discoveries, etc.



The net result can be a system of some complexity. In order to debug this code -- and to get a glimpse into activities of a running production box -- a tunable logging system was added.



The beginning of the snippet notes that we are initializing, with a logging level of 7. This means that if the administrator has "turned up the instrumentation dial" to 7 or above, this message will be sent to the system log.



A little bit further down, we report errors: a bad port number (logging level of 7, we really don't care too much during normal operations) and an attempt to connect to a restricted IP address (which we always want to report as a noteworthy error).



Note that rather than throwing exceptions, the code breaks out. This enables us to dispense with the overhead of exception processing and provide inline instrumentation of any noteworthy events and errors. But exceptions could be thrown just as easily once the instrumentation has done its job. In C++, there appears to be some overhead for using exceptions (and they're forbidden in certain types of real-time or mission-critical systems), so I trap for miscellaneous exceptions - but don't rely upon them for normal error-handling activities.



The log method, below, provides tunable logging consistent with what I've already described.



I suppose the key point here is not whether you're returning error-codes or throwing exceptions; it is, instead, to have sufficient discipline to provide paranoid levels of error-checking and instrumentation so that you can always determine what kinds of things are happening in your code. Even if you think things are hunky-dory.



	// beginning of snippet...

//

do { try {



// Mark initialization.

//

strLog.Format("[%8.8lX] Thread initializing",

m_hThread

);

m_pEXTObject->Log(strLog, 7);



// Initialize our socket.

//

if (!m_sockID) {



// Do we need to connect ourselves?

//

if (!m_strConnectAddress.IsEmpty()) {

if ((nCursor = m_strConnectAddress.Find(':')) >= 0) {

i = atoi(m_strConnectAddress.Mid(nCursor + 1));

strTemp = m_strConnectAddress.Left(nCursor);

if (!i || (UINT) i > 0x7FFF) {

//

strLog.Format("[%8.8lX] Error, bad port (%s)",

m_hThread, m_strConnectAddress

);

m_pEXTObject->Log(strLog, 7);

//

break;

}

if (!m_pEXTObject->CheckIP(strTemp)) {

//

strLog.Format("[%8.8lX] Connection forbidden: IP address %s",

m_hThread, m_strConnectAddress

);

m_pEXTObject->Log(strLog, 0);

//

break;

}

} else {

strTemp = m_strConnectAddress;

i = DEF_HTTP_PORT;

}

// ...



// ...end structured processing.

//

} catch (...) {

rc = BBX_MISC_EXCEPTION;

} } while (0);

m_bTerminating = TRUE;

m_dTerminateStarted = COleDateTime::GetCurrentTime();

if (m_bBaseThread) {

strLog.Format("[%8.8lX] BT: Error %d, base thread closing",

m_hThread, rc

);

m_pEXTObject->LogEvent(rc, EVT_WARNING, strLog);

} else {

strLog.Format("[%8.8lX] Thread closing (%d)",

m_hThread, rc

);

m_pEXTObject->Log(strLog, 3);

}

if (m_SocketID != INVALID_SOCKET && m_SocketID != 0) {

// SD_SEND, don't allow any more sends

m_Thunk_p->shutdown(m_SocketID, 1);

m_Thunk_p->closesocket(m_SocketID);

m_SocketID = INVALID_SOCKET;

m_hFile = (UINT) CFile::hFileNull;

}

//

// Array locking should not be necessary (terminating flag)...

//

for (i = 0; i < m_cpaOutboundQueue.GetSize(); i++) {

pcbaTemp = (CByteArray*) m_cpaOutboundQueue.GetAt(i);

if (pcbaTemp != NULL) {

delete pcbaTemp;

}

}

//

strLog.Format("[%8.8lX] Thread closed",

m_hThread

);

m_pEXTObject->Log(strLog, 7); //



// ...end of snippet



// Gnutella logging.

// Multi-threaded tunable logging facility.

//

VOID CExtExtension::Log(

LPCTSTR pMessage,

DWORD dwLoggingLevel,

BOOL bFlush

) {



// SP...

//

CTime timeTemp;

CString strLogEntry;

do {



// Not available? Forget it.

//

if (m_fileLog.m_hFile == CFile::hFileNull) {

break;

}



// Logging level not sufficient? Forget it.

//

if (dwLoggingLevel > m_dwLoggingLevel) {

break;

}



// Get our timestamp.

//

timeTemp = CTime::GetCurrentTime();



// Format a log entry.

//

strLogEntry.Format(

"%s %s\r\n"

,

timeTemp.Format("%y-%m-%d %H:%M:%S"),

pMessage

);

m_ccsLog.Lock();

m_strLog += strLogEntry;

if (bFlush || m_strLog.GetLength() > MAX_LOG_CACHE_BYTES) {

m_fileLog.Write(m_strLog.GetBuffer(0), m_strLog.GetLength());

m_strLog = "";

m_fileLog.Flush();

}

m_ccsLog.Unlock();



// ...end SP.

//

} while (0);

}


2004 Joseph Goebbels Awards





Click here for Amazon...This year's Joseph Goebbels award goes by a narrow but decisive margin to CBS News anchorman Dan Rather for his planned broadcast on "60 Minutes" -- just days before the election -- to discredit President Bush's National Guard service 30 years earlier. Leave aside for the moment the fact that discrepancies in the documents he relied on have convinced experts and many others that they were forgeries. Why was what George W. Bush did or didn't do 30 years earlier "news" in 2004?



It was news by Dr. Goebbels' standard -- something that could lead to desired political reactions by the audience. Waiting until it would have been virtually impossible for an effective answer to be made before election day was in the same Goebbels spirit. Had the documents been real, Dan Rather would still have been a strong contender for the award. The fact that virtually everyone, with the notable exception of Mr. Rather, now regards those documents as fake -- instead of simply "not authenticated" -- makes Dan Rather the clear winner of the Joseph Goebbels award for 2004...




Thomas Sowell: 2004 Joseph Goebbels Awards

Thứ Năm, 23 tháng 12, 2004

Leave Rumsfeld Be





Click here for Amazon...Have we forgotten what Mr. Rumsfeld did right? Not just plenty, but plenty of things that almost anyone else would not have done. Does anyone think the now-defunct Crusader artillery platform would have saved lives in Iraq or helped to lower our profile in the streets of Baghdad? How did it happen that our forces in Iraq are the first army in our history to wear practicable body armor? And why are over 95 percent of our wounded suddenly surviving — at miraculous rates that far exceeded even those in the first Gulf War? If the secretary of Defense is to be blamed for renegade roguery at Abu Ghraib or delays in up-arming Humvees, is he to be praised for the system of getting a mangled Marine to Walter Reed in 36 hours?



And who pushed to re-deploy thousands of troops out of Europe, and to re-station others in Korea? Or were we to keep ossified bases in perpetuity in the logic of the Cold War while triangulating allies grew ever-more appeasing to our enemies and more gnarly to us, their complacent protectors?



The blame with this war falls not with Donald Rumsfeld. We are more often the problem — our mercurial mood swings and demands for instant perfection devoid of historical perspective about the tragic nature of god-awful war. Our military has waged two brilliant campaigns in Afghanistan and Iraq. There has been an even more inspired postwar success in Afghanistan where elections were held in a country deemed a hopeless Dark-Age relic. A thousand brave Americans gave their lives in combat to ensure that the most wicked nation in the Middle East might soon be the best, and the odds are that those remarkable dead, not the columnists in New York, will be proven right — no thanks to post-facto harping from thousands of American academics and insiders in chorus with that continent of appeasement Europe.



Out of the ashes of September 11, a workable war exegesis emerged because of students of war like Don Rumsfeld: Terrorists do not operate alone, but only through the aid of rogue states; Islamicists hate us for who we are, not the alleged grievances outlined in successive and always-metamorphosing loony fatwas; the temper of bin Laden’s infomercials hinges only on how bad he is doing; and multilateralism is not necessarily moral, but often an amoral excuse either to do nothing or to do bad — ask the U.N. that watched Rwanda and the Balkans die or the dozens of profiteering nations who in concert robbed Iraq and enriched Saddam.



Donald Rumsfeld is no Les Aspin or William Cohen, but a rare sort of secretary of the caliber of George Marshall. I wish he were more media-savvy and could ape Bill Clinton’s lip-biting and furrowed brow. He should, but, alas, cannot. Nevertheless, we will regret it immediately if we drive this proud and honest-speaking visionary out of office, even as his hard work and insight are bringing us ever closer to victory.




Victor Davis Hanson (hat tip: LGF): Leave Rumsfeld Be

"Dying can't be as bad as living"





Click here for AmazonHas there been a tragicomic character in recent memory as simultaneously compelling, disturbing, and paradoxical as Mike Tyson? If you haven't been tracking the escapades of the former heavyweight champion and ex-con, he recently lost two bouts in a row. The latter, against journeyman Danny Williams, was specifically designed to catapult him back into the ranks of contending heavyweights.



Instead, it has relegated Tyson into a state of semi-retirement and shattered his dreams of rebuilding his wealth, once valued at around $400 million. He now lives in a $100,000 house in Arizona, contemplating his fall from grace... and a new life.



...The last time I'd met Tyson was more than a year ago, after Frank Bruno was taken to hospital to help him deal with his own demons.



Tyson says he cried for his old foe at the time and is glad when I tell him Frank is on the mend.



"That makes me happy," he says. "The worst thing that can happen to you is for you to lose your mental powers, especially when you've got a wife and kids."



And he should know. Muttering something about a boxer's biggest fight coming after he leaves the ring, Tyson then comes over all philosophical.



"Dying can't be as bad as living," he muses. "There's no way that dying can be as bad as living. But while you're living you have to live.



"I don't know what I'm doing. I just live, I guess, get some food. But I don't cook. I go to restaurants every night." Asked how he fills his days, he replies: "I don't do anything. My life sucks." ...




The Mirror: Dying can't be as bad as living

Islamist Intentions for the U.S.





Click here for AmazonDaniel Pipes:



I frequently meet with disbelief when I explain that the Islamist goal is to take over the United States and replace the Constitution with the Koran. Well, as they say, a picture is worth a thousand words, and here is that picture, culled from "The American Muslim" website:







The Arabic written across the United States is the basmalah, usually translated into English as "In the Name of God, the Merciful, the Compassionate." This Koranic invocation, the authoritative Encyclopaedia of Islam (vol. 1, p. 1084) informs us, "at the beginning of every important act, calls down the divine blessing on this act and consecrates it."



It also bears noting that "The American Muslim" website portrays itself as "providing a balanced, moderate, alternative voice focusing on the spiritual, dimension of Islam rather than the more often heard voice of extreme political Islamism." Sounds great, yet this website includes precisely such voices of "extreme political Islamism" in the form of Yahiya Emerick and Ibrahim Hooper. In keeping with the above graphic, Emerick is author of an essay titled "How to Make America an Islamic Nation" and Hooper has stated "I wouldn't want to create the impression that I wouldn't like the government of the United States to be Islamic sometime in the future..."




Daniel Pipes: Islamist Intentions for the United States

DESPERATE MEASURES





Click here for Amazon...The key point of this attack — and indeed of a number of recent attacks against U.S. soldiers, Iraqi police and military and, most significantly, Iraqi civilians — is that the insurgents are taking fewer and fewer personal risks.



Devastated by American assaults, demoralized by the stubborn determination of Iraqis to participate in upcoming elections and to return to a normal and newly democratic life, the radical Islamists are desperate. Their perverted dream of a medieval society dominated by terror is evaporating before their very eyes. The Iraqi people are winning. Thus the terrorists pursue any desperate ploy to disrupt, to delay to terrorize the Iraqi population.



You'll notice that I did not refer to the population as "their fellow Iraqis" because a great many of the terrorists are now foreigners — Syrians, Palestinians, Saudis, Iranians — the enemy has had to draw from disaffected radicals throughout the region.



They're fighting a losing battle...



Frederick J. Chiaventone is a novelist, screenwriter and a retired Army officer who taught counterinsurgency at the U.S. Army Command & General Staff College.




NY Post: Desperate Measures