SitePoint Sponsor

User Tag List

Results 1 to 25 of 25

Threaded View

  1. #1
    Foozle Reducer ServerStorm's Avatar
    Join Date
    Feb 2005
    Location
    Burlington, Canada
    Posts
    2,699
    Mentioned
    89 Post(s)
    Tagged
    6 Thread(s)

    Jeff Mott - June's MOTM - Please Congratulate Him

    June's MOTM - Jeff Mott

    The Sitepoint staff is pleased to honour Jeff Mott as June's Member Of The Month. This is awarded to a member of the forums that consistently has high quality posts, extends help to all skill levels in a welcoming way, and helps make Sitepoint a great place for our members.

    Please enjoy the interview. To make it a little more interesting, we have done it in a little different way. As Jeff is a PHP expert, the interview has been written as a PHP object. For those of you not familiar with PHP, don't worry. It has been done in a way you can follow; just read the $questions and $answers. Remember also to read the code comments

    Please send your congratulations to Jeff for this honour.

    The Interview

    Code PHP:
    <?php
     /*
     * Value Object Of Our Valued MOTM Jeff Mott
     */
     
    /*
     * Objects use.
     * 1) Instantiate this one of a kind object
     * 2) Use the questionAndAnswer() method to add the questions and answers
     * 3) Call the getInterview() method to return the interview in html output
     * 
     * For those interested, you can copy all the code into a php page and run it.
     * The interview will output as HTML with a sprinkle of CSS.
     * 
     */
     
    $JeffMott = new JeffMott();
     
    /* Set Introduction */
    $opening_statement = "
      We've really appreciated your great contributions to the forums.
      Congratulations on being our latest Member of the Month!";
     
    $response = "
      Thanks. There are sharp people here at SitePoint, and it's a great 
      honor to be recognized by this group.";
     
    $JeffMott->questionAndAnswer($response, $opening_statement );
     
     
    /* Set drawn to Sitepoint */
    $question = "
      What brought you to Sitepoint, and what drives you to help others?";
     
    $answer = "
      SitePoint was on my radar for a very long time. I often referred 
      people to its' XHTML vs HTML FAQ -- an accurate guide on a topic 
      that was often misunderstood. And I noticed some brilliant developers, 
      such as Paul O'Brien, who made SitePoint their home. That combination 
      of top-notch devs and authoratative guides made SitePoint feel like the 
      place to be for any serious developer. My drive to help others isn't 
      entirely selfless. Partly it's because I enjoy the work I do. I enjoy 
      programming and thinking through problems, and I feel satisfaction from 
      building elegant and well structured solutions. And partly it's because 
      facing the plethora of problems that come through SitePoint forces me 
      to work through scenarios I wouldn't normally face in my day-to-day work, 
      and I think I'm a better developer for it.";
     
    $JeffMott->questionAndAnswer($answer, $question);
     
     
    /* Set super smart programmatic knowledge */
    $question = "
      Your posts demonstrate strong programmatic knowledge. What other 
      languages and skill sets do you have? Where did it all start?";
     
    $answer = "
      Once upon a time, I made a StarCraft fan site... using Microsoft Word. 
      That was the first site I ever made. I wanted to learn more, so I 
      peeked at others' source code, I checked what WYSIWYG editors would 
      generate, and I worked through tutorial sites such as HTMLGoodies. 
      In hindsight, I don't think any of those are good ways to learn. 
      My turning point came when I became extremely selective about where 
      I learn from. I looked for the most authoritative people and the most 
      comprehensive resources. I read the HTML spec cover to cover, the 
      CSS spec, DOM, XML, the JavaScript language reference and ECMAScript 
      standard, and others. Eventually I moved into Perl/CGI (PHP wasn't big yet), 
      and I made a point to read the book written by Perl's creator himself. 
      To choose your teachers carefully is one of the most important lessons 
      I've learned and that I could convey to others, because that one decision 
      affects everything else you learn.";
     
    $JeffMott->questionAndAnswer($answer, $question);
     
     
    /* Set about job */
    $question = "
      As we often don't even get one layer of an onion peeled off
      a Sitepoint member in their day to day posts, the MOTM interview provides
      this opportunity. Please let us know a little about what you do for your job.";
     
    $answer = "
      Years ago I worked for an agency that caters to enterprise-level 
      clients. It was a great job that gave me the opportunity to work with 
      recognizable name brands such as Walmart, Rackspace, and Autodesk. 
      Today I contract with Intel and work on their website and associated 
      microsites. Usually that means learning one proprietary CMS after another. 
      I've gone back and forth between the corporate world and the agency world, 
      and both have their appeal. In the agency world, you get to learn a lot 
      of technologies, and you learn them quickly. Every project might use 
      something new. In the corporate world, you get to be a specialist and a 
      perfectionist because you're working on the same site for a prolonged period.";
     
    $JeffMott->questionAndAnswer($answer, $question);
     
     
    /* Set favourite Web personality */
    $question = "
      Do you have a favourite web personality (other than your own ;) )?";
     
    $answer = "
      A few names that come to mind are Fabien Potencier, Doug Crockford, 
      and Steve Souders. Potencier is the creator of the Symfony framework, 
      and reading his code has taught me more about design patterns than 
      any book ever could. Crockford is a JavaScript wizard, and I 
      think his teachings are a big reason why JavaScript is now perceived 
      as a good and serious language. And Souders' research led to the 
      performance rules that changed the way we construct pages, and he 
      continues to uncover new performance rules today. On the lighter 
      side of things, I also like to watch HDstarcraft's videos and the \"How 
      It Should Have Ended\" parodies.";
     
    $JeffMott->questionAndAnswer($answer, $question);
     
     
    /* Set needed developer behaviour or knowledge */
    $question = "
      Assuming they had a choice, what types of thinking would you 
      want every developer to endear?";
     
    $answer = "
      Probably the most important quality for a developer is an 
      insatiable curiosity. Ours is a field that is extremely broad 
      and constantly changing. You can't ever become too comfortable 
      with what you know. You have to be just as hungry to learn 
      something new as when you were just starting.";
     
    $JeffMott->questionAndAnswer($answer, $question);
     
     
    /* Set favourite things (other than Sitepoint ;) ) */
    $question = "
      As you haven't published much in your profile,
      the lack of self-promoting signature, and the fact that
      my poorly written web-scrapers couldn't find out much
      about you, apart from spending time at the SitePoint forums,
      what - other than Sitepoint - are a few of your other favourite things?";
     
    $answer = "
      I'm largely a homebody. I like stories and storytelling, whatever medium 
      they may come in, even a 
      <a href=\"http://en.wikipedia.org/wiki/Final_Fantasy_VII\">game</a> or 
      <a href=\"http://www.trans-siberian.com/lyrics_story/xmas_eve_lyrics-01.php\">album</a>. 
      I had some fun with 
      <a href=\"https://picasaweb.google.com/Jeff.Mott.OR\">photography</a> for a while. 
      And I have a fun dog named 
      <a href=\"http://sphotos.xx.fbcdn.net/hphotos-ash4/
      292891_687204509921_43005566_35375264_1870188785_n.jpg\">Tucker</a>. 
      When I get outdoors, I tend to be an adrenaline junkie. 
      I like white water rafting, skydiving, scuba diving, obstacle courses, 
      roller coasters, and such. Other random interests include poker, 
      billiards, haunted houses, and thunderstorms. :-)";
     
    $JeffMott->questionAndAnswer($answer, $question);
     
     
    /* Set Can sitepoint be better */
    $question = "
      If you could change something with Sitepoint 
      to make it a better place, what would it be?";
     
    $answer = "
      I'd like an easy way to give praise to people and posts. I think 
      rewarding high quality posts with sincere appreciation will help 
      encourage more high quality posts.";
     
    $JeffMott->questionAndAnswer($answer, $question);
     
     
    /* Set Garbage Collection */
    $question = "
      Please tell us something about yourself,
      or your life, that you don't want anyone at Sitepoint to know.";
     
    $answer = "
      I would... but that would defeat the purpose. ;-)";
    $JeffMott->questionAndAnswer($answer, $question);
     
     
    /* Set More Garbage Collection due to excessive memory leaks */
    $question = "
      You appear to be a very knowledgeable person
      so please relate to or answer these questions?
      <ol>
        <li>Mu mesons.</li>
        <li>How long can a snail sleep? Is this unfair?</li>
        <li>Who invented the scissors? Are there any recent
             inventions that will have such lasting impact and
             will you have a part in them?</li>
        <li>Name one edible ingredient in dynamite? Do you like this food?</li>
        <li>How long is a 'Jiffy'? Do you program in Jiffys or in some other time frame?</li>
      </ol>";
     
    $answer = "
      <ol>
        <li>Bazinga</li>
        <li>Google says anywhere from weeks to years. I wonder if they 
             could literally sleep their life away?</li>
        <li>Edward Scissorhands?</li>
        <li>Was I not supposed to eat the whole thing?</li>
        <li>It varies depending on whether I have Jiffy Lube handy. :-P</li>
      </ol>";
     
    $JeffMott->questionAndAnswer($answer, $question);
     
     
     /* Free to set shameless self promotion */
    $shameless_self_promotion = "
      One of the benefits of MOTM is this chance for shameless, 
      unmoderated, self promotion... Is there a website that you'd like 
      to draw our attention to?";
     
    $answer = "
      Nothing of my own, but here are a couple sites worthy of whatever 
      promotion we can give them: <a href=\"http://www.youtube.com/watch?v=2lXh2n0aPyw\">TheFunTheory</a> and 
      <a href=\"http://www.khanacademy.org\">Khan Academy</a>.";
     
    $JeffMott->questionAndAnswer($answer, $shameless_self_promotion);
     
     
    $JeffMott->getInterview();
     
     
    Class/*y*/ JeffMott {
      protected $jeff_q_and_a;
      public function __construct(){
        $this->jeff_q_and_a = array();
      }
      public function questionAndAnswer($answer, $question = 0){
        $this->jeff_q_and_a[$question] = $answer;
      }
      public function getInterview(){
        echo $this->jeffSpeaks();
      }
      protected function jeffSpeaks(){
        $display = '
        <!DOCTYPE html>
            <head>
                <meta charset="utf-8">
                <title>Jeff Mott Wins June 2012, Member Of The 
                Month (MOTM) at Sitepoint.com/forums</title>
                <style>
                  body {
                    margin: 0;
                    padding: 0;
                    color: #666;
                    font-family: "Segoe UI", Segoe, Calibri, Verdana, Arial, sans-serif;
                    font-size: 100%;
                    line-height: 1.6;
                  }
                  h1 {
                    font-size: 1.5em;
                    margin: 0 0 0 20px;
                    min-width: 40%;
                    text-align: center;
                    border-bottom: 1px dotted #333;
                  }
                  p:first-letter {
                    text-transform: uppercase;
                    font-size: 3.0 em;
                    font-weight: bold;
                  }
                  p {
                    min-width: 400px;
                    padding: 10px 10px 10px 20px;
                    margin: 0 0 0 20px;
                    border-bottom: 1px dotted #333;
                  }
                  p.with_ul{
                    min-width: 400px;
                    padding: 10px 10px 10px 20px;
                    margin: 0 0 0 20px;
                  }
                  p.no_line{
                    min-width: 400px;
                    padding: 10px 10px 10px 20px;
                    margin: 0 0 0 20px;
                    border: none !important;
                  }
                  li {
                    padding: 10px 10px 10px 20px;
                    margin: 0 0 0 20px;
                      min-width: 400px;
                  }
                  em {
                    padding: 20px 0 0 0;
                    display:block;
                    width: 50px;
                    border-bottom: 1px dotted #333;
                  }
                </style>
            </head>
            <body>
            <h1>Jeff Mott Wins June 2012, Member Of The Month 
            (MOTM) at Sitepoint.com/forums</h1>'; 
            foreach($this->jeff_q_and_a as $question => $answer){
             /*Check for the question that contains the ordered list and format it 
              * by ensuring that the border and answer formatting works for 
              * both the paragraph and the list
              */
              if(preg_match('/<ol>/', $question) == 1){
                $question = preg_replace('/\<ol\>/', '</strong></p><ol>', $question);
                $display .= "<p class='no_line'>";
                $display .= '<strong>' . $question;
                $display .= '<p class="no_line"><br /><em></em><br />' . $answer . '</p>';
              } else {
              /* Format a standard question and answer paragraph */
                $display .= "<p>";
                $display .= '<strong>' . $question  . '</strong>';
                $display .= '<br /><em></em><br />';
                $display .= $answer;
                $display .= '</p>';
              }
            }
            $display .= "
                <p>END OF INTERVIEW</p>
              </body>
            </html>";
         return $display;
      }
    }
    ?>

    Excerpt from Jeff's Interview: Favorite Answers: (So you can click the links):
    I'm largely a homebody. I like stories and storytelling, whatever medium they may come in, even a game or album. I had some fun with photography for a while. And I have a fun dog named Tucker. When I get outdoors, I tend to be an adrenaline junkie. I like white water rafting, skydiving, scuba diving, obstacle courses,
    roller coasters, and such. Other random interests include poker, billiards, haunted houses, and thunderstorms. :-)";

    Excerpt from Jeff's Interview: Shameless Self promotion:
    Nothing of my own, but here are a couple sites worthy of whatever promotion we can give them: TheFunTheory and Khan Academy.

    Way to go Jeff!

    Regards,
    Steve
    Last edited by ralph.m; May 31, 2012 at 06:52. Reason: fixed line break issue
    ictus==""


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •