Article :: Retaining a Business Resumption Planning Expert Witness (Part 2 of 2)

It may seem wrong, but it's a fact: In court, being believable is more important than being knowledgeable. Leo A. Wrobel and Sharon M. Wrobel conclude their series on choosing an expert witness by examining traits that are as important as subject expertise, but much less objective.

Categories: Agile Programming | Computers | InformIT | InformIT Agile Programming | Programming | Project Management | Technology
Subversion Migration Complete

The migration from CVS to Subversion is complete. The web interface is at svn.php.net. You can read about it at php.net/svn.php, wiki.php.net/vcs/svnfaq. The URL to feed to your svn client is http://svn.php.net/repository. There is also a github mirror. Please use that instead of trying to do a full git clone from the svn repository. See the instructions at wiki.php.net/vcs/svnfaq#git Many thanks to Gwynne who did the bulk of the work and also all the other folks who pitched in. It was a major effort to move 14 years of CVS history to another RCS.

Categories: Computers | PHP | PHP Hypertext Preprocessor | Programming | Technology
PHP 5.2.13 Released!

The PHP development team would like to announce the immediate availability of PHP 5.2.13. This release focuses on improving the stability of the PHP 5.2.x branch with over 40 bug fixes, some of which are security related. All users of PHP 5.2 are encouraged to upgrade to this release. Security Enhancements and Fixes in PHP 5.2.13:Fixed safe_mode validation inside tempnam() when the directory path does not end with a /). (Martin Jansen)Fixed a possible open_basedir/safe_mode bypass in session extension identified by Grzegorz Stachowiak. (Ilia)Improved LCG entropy. (Rasmus, Samy Kamkar) Further details about the PHP 5.2.13 release can be found in the release announcement, and the full list of changes are available in the ChangeLog.

Categories: Computers | PHP | PHP Hypertext Preprocessor | Programming | Technology
CodeSOD: Masquerading as a Loop

"While digging through some inherited code," writes Joe "M2tM" Smith, "I encountered a conditional masquerading as a loop."

"Thankfully, the fellow responsible is 'no longer with us', and I suppose this type of code stands as silent testament to why. This interesting loop is only created so the break keyword can be used as an elaborate GOTO."

bool bCreateModel = false;
for (;;)
{
    if (!pModel)
    {
        bCreateModel = true;
        break;
    }

    if (asModelParts.GetSize() != asModelPartsToLoad.GetSize())
    {
        bCreateModel = true;
        break;
    }

    for (UINT32 i = 0; i < asModelPartsToLoad.GetSize(); ++i)
    {
        if (asModelPartsToLoad[i] != asModelParts[i])
        {
            bCreateModel = true;
            break;
        }
    }

    break;
}




Categories: Computer Humor | Computers | Humor | Programming | Technology | The Daily WTF
Error'd: CAPTCHA'd

What's that, you say? We should have an entire Error'd dedicated to CAPTCHA images? Sure, why not!


Alex van Herwijnen spotted this interesting problem presented...

 

... which, of course Dan Ferrante noticed that ESPN provided a solution for.

 

You're right though, spousal abuse is not funny. But I know what is! Bathroom humor, like what Scott Lewis found at Ticketmaster!

 

See? Even Avast! anti-virus software is getting a peece of that action (from Viront).

 

"Really?" Justin Self wrote, "I have to type this? I just needed some help with Java!"

 

Well Justin, help was out there... but not for your Java. Matt found this combo, which seems to help with the previous pain in the butt.

 

I guess I'll take the advice that Tim Gourley saw, at keep it clean from now on.

 

Moving on, Andy wondered if Bloglines really wanted their CAPTCHA to be linked to the KKK.

 

"Admittedly, this took me a lot longer to solve than usual," wrote Dan Thompson, "but when I finally got to upload my image, I felt a real sense of achievement."

 




Categories: Computer Humor | Computers | Humor | Programming | Technology | The Daily WTF
Article :: All Systems Are Go: An Interview with Rob Pike, the Co-developer of Google's Go Programming Language

Danny Kalev talks with Rob Pike, the co-developer of Google's new Go programming language. In this interview, Pike speaks about the limitations of C++ in large-scale projects, the design philosophy of Go and its unusual type-system, and Go's future.

Categories: Agile Programming | Computers | InformIT | InformIT Agile Programming | Programming | Project Management | Technology
CodeSOD: Swallowed by the Beast

Paul was having a good morning.  It was a beautiful day outside, he managed to shave 15 minutes off his commute, and even the local coffee shop had his favorite donut in stock.  All of that changed when he got his first support call of the day.  It was from a client running "the beast" product.  "The beast", as Paul and his coworkers nicknamed it, was a legacy version of their application developed somewhere overseas years before Paul was hired, by hundreds of poorly trained, and probably poorly paid, developers.  The company's sales team actively encouraged clients to upgrade from the legacy application, but a select few had resisted.

"The beast" had a reputation for containing some of the worst code Paul had ever seen and every time he had to support it, he felt like he needed a shower afterwards.  It was during his fourth hour of debugging that Paul came across a previously unvisited function shown below. 

public boolean isWidgetReferenced(int widgetId) {
	boolean available = false;

	try {
		String query;
		ResultSet rs = null;
		int count = 0;

		Connection connection = getConnection();
		query = "SELECT COUNT(*) FROM WIDGET_REGION WHERE widgetId=" + widgetId;
		rs = connection.createStatement().executeQuery(query);
		for (; rs.next();) {
			count = rs.getInt(1);
			break;
		}
		if (0 < count) return false;

		query = "SELECT COUNT(*) FROM WIDGET_OFFERING WHERE widgetId=" + widgetId;
		rs = connection.createStatement().executeQuery(query);
		for (; rs.next();) {
			count = rs.getInt(1);
			break;
		}
		if (0 < count) return false;

		query = "SELECT COUNT(*) FROM WIDGET_ORDERS WHERE widgetId=" + widgetId;
		rs = connection.createStatement().executeQuery(query);
		for (; rs.next();) {
			count = rs.getInt(1);
			break;
		}

		if (0 < count) return false;
		query = "SELECT COUNT(*) FROM WIDGET_NEW WHERE widgetId=" + widgetId;
		rs = connection.createStatement().executeQuery(query);
		for (; rs.next();) {
			count = rs.getInt(1);
			break;
		}

		if (0 < count) return false;
		query = "SELECT COUNT(*) FROM WIDGET_HISTORY WHERE widgetId=" + widgetId;
		rs = connection.createStatement().executeQuery(query);
		for (; rs.next();) {
			count = rs.getInt(1);
			break;
		}

		if (0 < count) return false;
		query = "SELECT COUNT(*) FROM WIDGET_STATS_RECORDED WHERE widgetId=" + widgetId;
		rs = connection.createStatement().executeQuery(query);
		for (; rs.next();) {
			count = rs.getInt(1);
			break;
		}

		if (0 < count) return false;
		query = "SELECT COUNT(*) FROM WIDGET_VIEWED WHERE widgetId=" + widgetId;
		rs = connection.createStatement().executeQuery(query);
		for (; rs.next();) {
			count = rs.getInt(1);
			break;
		}

		if (0 < count) return false;
		query = "SELECT COUNT(*) FROM WIDGET_SETS WHERE widgetId=" + widgetId;
		rs = connection.createStatement().executeQuery(query);
		for (; rs.next();) {
			count = rs.getInt(1);
			break;
		}

		if (0 < count) return false;
		query = "SELECT COUNT(*) FROM WIDGET_INSTALLED WHERE widgetId=" + widgetId;
		rs = connection.createStatement().executeQuery(query);
		for (; rs.next();) {
			count = rs.getInt(1);
			break;
		}

		if (0 < count) return false;
		query = "SELECT COUNT(*) FROM WIDGET_PENDING WHERE widgetId=" + widgetId;
		rs = connection.createStatement().executeQuery(query);
		for (; rs.next();) {
			count = rs.getInt(1);
			break;
		}

		if (0 < count) return false;
		query = "SELECT COUNT(*) FROM WIDGET_JOURNAL WHERE widgetId=" + widgetId;
		rs = connection.createStatement().executeQuery(query);
		for (; rs.next();) {
			count = rs.getInt(1);
			break;
		}

		if (0 < count) return false;

		available = true;
	} catch (Exception e) {
		logger.error("isWidgetAvailable", e);
	}

	return available;
}

Paul wasn't sure what bothered him the most: that the developer had used a strangely formed for() loop on a structure that always returned exactly one record; that the integer count could have been implemented as a boolean; or that the pattern had been repeated 10 times in this file and dozens of times in other files.  As it turns out, the root cause of the issue was unrelated to the sheer amount of repetitive code.  Had the developer taken the time to clean up this function, they might have noticed that they never closed any of the JDBC connection resources defined in the method.




Categories: Computer Humor | Computers | Humor | Programming | Technology | The Daily WTF
PHP 5.2.14 Released!

The PHP development team would like to announce the immediate availability of PHP 5.2.14. This release focuses on improving the stability of the PHP 5.2.x branch with over 60 bug fixes, some of which are security related. This release marks the end of the active support for PHP 5.2. Following this release the PHP 5.2 series will receive no further active bug maintenance. Security fixes for PHP 5.2 might be published on a case by cases basis. All users of PHP 5.2 are encouraged to upgrade to PHP 5.3.Security Enhancements and Fixes in PHP 5.2.14:Rewrote var_export() to use smart_str rather than output buffering, prevents data disclosure if a fatal error occurs.Fixed a possible interruption array leak in strrchr().(CVE-2010-2484)Fixed a possible interruption array leak in strchr(), strstr(), substr(), chunk_split(), strtok(), addcslashes(), str_repeat(), trim().Fixed a possible memory corruption in substr_replace().Fixed SplObjectStorage unserialization problems (CVE-2010-2225).Fixed a possible stack exaustion inside fnmatch().Fixed a NULL pointer dereference when processing invalid XML-RPC requests (Fixes CVE-2010-0397, bug #51288).Fixed handling of session variable serialization on certain prefix characters.Fixed a possible arbitrary memory access inside sqlite extension. Reported by Mateusz Kocielski.Key enhancements in PHP 5.2.14 include:Upgraded bundled PCRE to version 8.02.Updated timezone database to version 2010.5.Fixed bug #52238 (Crash when an Exception occured in iterator_to_array).Fixed bug #52237 (Crash when passing the reference of the property of a non-object).Fixed bug #52041 (Memory leak when writing on uninitialized variable returned from function).Fixed bug #51822 (Segfault with strange __destruct() for static class variables).Fixed bug #51552 (debug_backtrace() causes segmentation fault and/or memory issues).Fixed bug #49267 (Linking fails for iconv on MacOS: "Undefined symbols: _libiconv").To prepare for upgrading to PHP 5.3, now that PHP 5.2's support ended, a migration guide available on http://php.net/migration53, details the changes between PHP 5.2 and PHP 5.3.For a full list of changes in PHP 5.2.14 see the ChangeLog at http://www.php.net/ChangeLog-5.php#5.2.14.

Categories: Computers | PHP | PHP Hypertext Preprocessor | Programming | Technology
Is Your PC Frozen?

Bob was in the process of shutting down a software company that he had built over the past seven years. He had found a buyer for all of the software that he'd developed, collected his "eff you money" and was now retiring.

In fact, things were at the point where Bob had already closed the building and redirected the phones to his home phone with a distinctive ring so that he could tie up loose ends while the building was up for sale.

Bob woke one morning at 8:00am to the phone ringing, crawled out of bed and picked up the ‘Bat Phone,' as he called it, in the living room.

"Hello?" Bob said, and gave the name of the company.

Without preamble or introduction, Bob was informed by a woman's voice, "Hi this is Sally Brumbaker, my user id is smb1985. My computer's frozen."

Bob didn't recognize the voice and certainly not the name. Also, it was before coffee. "Your computer's frozen?" Bob affirmed.

"Yes."

"Is the side cold?" Bob asked matter of factly.

"Wait a minute," replied Sally, and then after a pause, "No not at all."

"Ok, then," Bob assured her. "Your computer's not frozen, then, it's probably just running a program. Give it a minute."

"I don't understand, what do…" the woman began, and then, "Oh, ok. There is goes." and that, she hung up the phone and Bob did the same, thinking about how much cream to put into his coffee.

THREE MONTHS LATER

The ‘Bat Phone’ rings. Though the company had long been put to bed, Bob was suddenly reminded of was that he’d forgotten to stop the phone service.

"Hello?" Bob asked, and with a little hesitation, gave the name of his (now non-existent) company.

"Hello,” introduced the caller in a very serious tone, “I need to speak to someone in charge of your technical support."

"Well, that's pretty much me,” replied Bob, “What do you need?"

"Did you or someone working for you tell Sally So-And-So that she could tell if a computer was frozen by feeling the side?"

"What?"

"Sally says she called this number three months ago, and was informed by a support tech that she could tell if a PC was frozen by feeling for the side being cold. Since then, she's been feeling the sides of people's computers, and she's completely humiliated."

"Sally works in your IT department?" Bob asked.

"No, Sally is the Director of our human resources department," Bob was informed.

"And this is...?"

"I sit on the board for Plainston-Princeboro Teaching Hospital."

"I see. So, Sally hires doctors and nurses."

"She does - and now she's been humiliated by you or someone at your company,” huffed the voice on the phone,” What do you have to say for yourself?"

"Well, first," Bob answered, "I'd like to say that, if I get seriously hurt, I'll drag myself right past YOUR hospital."

"WHAT!?"

"Sir," Bob said, with great sincerely, "you have to admit, that's pretty dumb."

Suddenly, the man on the other end of the line was at a sudden loss for words.

"Ok," he said finally, a little deflated, "Sally isn't the most computer savvy person we have, but that doesn't give you the right to prey on her..."

"Sir," Bob said, "I took that call, Sally didn't identify herself, and as soon as she thought she had an answer from me, she hung up the phone before I could explain that I was kidding. I'm sorry if I humiliated her, but I have no idea how she got my number and this isn't a computer technical support company."

"Oh, I see," the person informed Bob. "We’ll, just be more careful, next time,” and with that, hung up the phone.

Since then, Bob disconnected the ‘Bat Phone’ for good, officially severing himself from his old life, but still gets a chuckle thinking of a smartly dressed executive going through the hospital, troubleshooting issues by feeling the sides of PC's and telling their users whether they were frozen of not.




Categories: Computer Humor | Computers | Humor | Programming | Technology | The Daily WTF
Article :: Essential GWT: Developing Your Application

What kind of applications should you develop with GWT? How can you go about it? And, why would you use GWT? Federico Kereki answers these questions in this introduction to his book.

Categories: Agile Programming | Computers | InformIT | InformIT Agile Programming | Programming | Project Management | Technology
Error'd: Logon-ing Off

Andrew Carpenter writes, "I guess this is like turn-oning off a switch?"

 

"While trying to signup for a Windows Live account, I found myself without my best friend Neil," wrote Rob, "unfortunately, my second-best friend Ray, third-best friend Jane, and fourth-best friend Tom are also excluded."

 

"I got this rather odd message when trying to install the Evo Java client," wrote Nick Edwards, "I clicked OK and it worked... even though I wasn't SURE_IT_WORKS!"

 

"I'm not sure why Google would omit entries and return zero results," Michael noted, "clicking on the link, I received 0 omitted results which were indeed very similar."

 

"YUM!! Blank Insert bear claws," wrote Matthew Sowders

 

"This came up while configuring Neverwinter Nights on my PC," Ville Rastas writes, "I was worried the game might not support today's high resolution screens, but I guess it's quite the opposite."

 

"I knew IKEA has some funny names on it's furniture," writes Patrik, "but who knew they were into the new fashion trend of nerd chic?

 

"According to Virgin Mobile," writes Glenn Jones, "Unlimited is twice as big as 10G (so maybe around 20G), except for videos where Unlimited is only 1.3 times 10G."

 




Categories: Computer Humor | Computers | Humor | Programming | Technology | The Daily WTF
Article :: Introduction to Business Intelligence Today

In this chapter, Mike Biere discusses overall BI scenarios today, the view of the CIO, the IT perspective, the end user perspective, and establishing a vision.

Categories: Agile Programming | Computers | InformIT | InformIT Agile Programming | Programming | Project Management | Technology
Article :: Introduction to vSphere

vSphere 4.0 is VMware's successor to Virtual Infrastructure 3 (VI3). In this chapter, Eric Siebert and Simon Seagrave introduce the many new features of vSphere 4.0.

Categories: Agile Programming | Computers | InformIT | InformIT Agile Programming | Programming | Project Management | Technology
Article :: The Developer's Guide to Social Programming: Application Discovery, Tabbed Navigation, and the Facebook JavaScript Library

This chapter explores how you can use dashboards in your Facebook Platform application through the Dashboard API and how you can use application tabs as a way of sharing your application's information with users and their friends.

Categories: Agile Programming | Computers | InformIT | InformIT Agile Programming | Programming | Project Management | Technology
Article :: Posting Links, Photos, and Videos in Google Buzz

Learn the ins and outs of posting links, photos, and videos to Google Buzz. In addition, take a look at how to deal with those items in Gmail, Buzz's home base.

Categories: Agile Programming | Computers | InformIT | InformIT Agile Programming | Programming | Project Management | Technology
PHP 5.2.12 Released!

The PHP development team would like to announce the immediate availability of PHP 5.2.12. This release focuses on improving the stability of the PHP 5.2.x branch with over 60 bug fixes, some of which are security related. All users of PHP 5.2 are encouraged to upgrade to this release. Security Enhancements and Fixes in PHP 5.2.12:Fixed a safe_mode bypass in tempnam() identified by Grzegorz Stachowiak. (CVE-2009-3557, Rasmus)Fixed a open_basedir bypass in posix_mkfifo() identified by Grzegorz Stachowiak. (CVE-2009-3558, Rasmus)Added "max_file_uploads" INI directive, which can be set to limit the number of file uploads per-request to 20 by default, to prevent possible DOS via temporary file exhaustion, identified by Bogdan Calin. (CVE-2009-4017, Ilia)Added protection for $_SESSION from interrupt corruption and improved "session.save_path" check, identified by Stefan Esser. (CVE-2009-4143, Stas)Fixed bug #49785 (insufficient input string validation of htmlspecialchars()). (CVE-2009-4142, Moriyoshi, hello at iwamot dot com) Further details about the PHP 5.2.12 release can be found in the release announcement, and the full list of changes are available in the ChangeLog.

Categories: Computers | PHP | PHP Hypertext Preprocessor | Programming | Technology
CodeSOD: Command 696

Think of all those old applications you’ve had to maintain. You know the type: the ones written by long-forgotten developers in long-lost languages. The ones that, after spending days searching for that one line of code that needs to be changed, you frustratingly decree “this f%*#@ thing needs to be rewritten.” And, naturally, the ones that never are, nor never will be rewritten.

Call it luck or persistence, but after dozens and dozens of maintenance requests over the years, Israel Brewster finally was given the opportunity to rewrite an application. From scratch. And the right way, this time. No shoddy VB6 front-end; no horribly-designed SQL Server 2000 (only) database; and certainly no Microsoft Access-based administration tool.

Though, after his third straight week of digging through form validation logic requirements – many of which were quadruplicated (or more), inconsistent, and often incorrect –he’s started to question if a rewrite is even possible. Consider, for example, Command 696: a method named that simply because Command1 through Command695 were already taken.

Private Sub Command696_Click()

  On Error GoTo Err_Command696_Click

  Dim stDocName As String
  Dim Response As Integer

  If Frame500 = 1 And pax > 37 Then
     MsgBox "CHECK PAX DASH 8 LIMIT 37 SEATS", vbOKOnly
  Else
  End If
  If Frame500 = 2 And pax > 29 Then
     MsgBox "CHECK PAX DASH 8 LIMIT 29 SEATS", vbOKOnly
  Else
  End If
  If totalload1 > 2000 Then
     MsgBox "OVERWEIGHT Fwd Shelf ", vbOKOnly
  Else
  End If
  If ttshelf > 1000 Then
     MsgBox "OVERWEIGHT Aft Shelf ", vbOKOnly
  Else
  End If
  If totalload1 + ttshelf > 2000 Then
     MsgBox "OVERWEIGHT Aft Compartment max 2000 lbs ", vbOKOnly
  Else
  End If
  If Frame500 = 1 And totalloadsecd > 0 Then
     MsgBox "DASH 8 WITHOUT SECTION D ", vbOKOnly
  Else
  End If
  If Frame500 = 2 And totalloadsecd > 2150 Then
     MsgBox "OVERWEIGHT SECTION D ", vbOKOnly
  Else
  End If
  If Remaining < 0 Then
    MsgBox "DASH 8 OVERWEIGHT REDUCE LOAD !!!!", vbOKOnly
  Else
  End If
  If ttload <= 0 Then
    Response = MsgBox("ARE YOU SURE AFT CARGO COMPARTMENT IS EMPTY!!!!", vbYesNo)
  Else
   Response = 6
  End If
  If Frame500 = 1 And pax <= 37 And totalload1 <= 2000 And _
     ttshelf <= 1000 And totalloadsecd = 0 And _
     Remaining >= 0 And totalload1 + ttshelf <= 2000 And Response = 6 Then
    stDocName = "csaprintinfo37seats"
    DoCmd.OpenReport stDocName, acPreview
  Else
  End If
  If Frame500 = 2 And pax <= 29 And totalload1 <= 2000 And _
     ttshelf <= 1000 And totalloadsecd <= 2150 And _
     Remaining >= 0 And totalload1 + ttshelf <= 2000 And Response = 6 Then
    stDocName = "csaprintinfo29seats"
    DoCmd.OpenReport stDocName, acPreview

  Else
  End If




Categories: Computer Humor | Computers | Humor | Programming | Technology | The Daily WTF