"My first impression of my predecessor was a positive one," writes Michal Ochman, "he was well-spoken, sharply dressed, and seemed to be an all-around nice guy."

"My first impression of my predecessor's code was also positive — it was sanely structured, well-commented, and all-around seemed pretty clean. And then I started actually looking through it. It was filled with a lot of... well... this."

<?php

/* Base 64 Encoding function **
** PHP does it natively but just for consistency and 
** ease of maintenance, let's declare our own function **/
function base64Encode($plain) {

  // Initialise output variable
  $output = "";

  // Do encoding
  $output = base64_encode($plain);

  // Return the result
  return $output;
}

/* Base 64 decoding function **
** PHP does it natively but just for consistency and 
** ease of maintenance, let's declare our own function **/
function base64Decode($scrambled) {

  // Initialise output variable
  $output = "";

  // Do encoding
  $output = base64_decode($scrambled);
 
  // Return the result
  return $output;
}

?>

Michal continued, "after getting to know some of my new coworkers, they described my predecessor as 'seemingly a nice guy at first, but really just a phony'. I guess I could see that."

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!