New Scientist has a great interview with Michael Koubi, who “worked for Shin Bet, Israel’s security service, for 21 years and was its chief interrogator from 1987 to 1993.” A very interesting read, though sadly lacking on details of the techniques used.
Archives for November 2004
An Introduction to Client-Side XSLT: It's Not Just for Server Geeks Anymore
An Introduction to Client-Side XSLT: It’s Not Just for Server Geeks Anymore from Digital Web Magazine
DeLaying Tactics
As CNN is reporting, House Republicans are trying to protect Representative Tom DeLay (R. TX):
> The House Republican Conference, composed of all GOP members in the chamber, planned to vote Wednesday to modify a requirement that would force DeLay to step aside if charged with a felony requiring at least a two-year prison term.
>
> Party rules require leaders to relinquish their posts after a felony indictment, but the change would eliminate the requirement for non-federal indictments.
It appears that the Republican Party has given up any pretense of ethics within its leadership. This is truly sad as it casts a very poor light on other, reputable members of the GOP and chips away at the faith and trust we, as citizens of this great democracy, have placed in our elected representatives.
The changes to the rule were proposed by Representative Henry Bonilla, a fellow Texas Republican, who, oddly enough benefited from the Texas redistricting efforts railroaded by DeLay. Surprised? No, I didn’t think so.
Now, if DeLay isn’t indicted, then I see no reason for him to have to step down, but if he is brought up on charges, he should step down until the case is resolved. But, as he probably has an insane amount of pull, this is unlikely without a sizable public outcry, the odds of which, I expect are pretty low. The populace is rather weary after a grueling election cycle. Sigh.
Ultimately I find it depressing to think of the fact that one of our two major parties has decided to change the ethical requirements that they set because one of their leaders can’t meet the rules. In most organizations, this would indicate that the ‘leader’ should step, or be forced aside to allow more capable/ethical members to step up and lead.
TeachMeFinance.com
TeachMeFinance.com “teaches you basic finance concepts.” Including: Time Value of Money, Annuities, Perpetuities, Kinds of Interest Rates, Future Value of an Uneven Cash flow, Probability Distribution, Standard Deviation, CAPM, Security Market Line, Bond Valuation, Stock Valuation, Cost of Capital and Capital Budgeting
PHP 4 Error Handling
Several days back, S Beam (I don’t know the person’s name) posted a tip to the eVolt list that presented a way to use PHP’s native set_Error_handler() and trigger_error() functions to generate an e-mail “containing a full debugging dump concerning any error to the developers, while providing a nice, innocuous, non-heart-attack-inducing message to the user.” As I really like the concept, and hope to start using it in future projects (and may well go back and add it to older scripts), I decided to post it here for easy retrieval, and to pass the knowledge along to other developers. While I would normally include something like this in a blockquote, I am making an exception in this case as I want as much room as possible for the code, and because I have made some slight modifications to the code. Everything between the horizontal rules is from the original post.
In your init.php script (or equivalent that is prepended to every invocation of php) have the line
set_error_handler ('my_error_handler');
then write a function like this:
function my_error_handler ($errno, $errstr, $errfile, $errline) {
mail(ERROR_RECIPIENT, "Site ERROR", "Error $errno at $errline of
$errfile: [$errstr]"); // Eliminate the carriage return
// Other code to execute, including user error message generation
print "I am the user error message"; // Shown on screen
}
Then in your application, when you come across a condition where you would have used die() or exit(), just do this, e.g.:
trigger_error("Couldn't connect to the DB!", E_USER_ERROR);
Season to taste. The mail will go out and you will not need to hope the user will call you and read the error message to you or anything like that. You could also include a dump of all POST, GET, SESSION or any other variables in your mail to see exactly what the state was when the error occurred.
I look forward to trying this out as I think it could prove to be a great boon for the various Web apps that I have developed, adapted and/or installed.