<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Thu, 20 Jun 2013 02:12:45 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Chris Hartjes' Blog: How the Testing Sausage Gets Made]]></title>
      <guid>http://www.phpdeveloper.org/news/17970</guid>
      <link>http://www.phpdeveloper.org/news/17970</link>
      <description><![CDATA[<p>
For those either just getting into unit testing your applications (maybe even <a href="http://en.wikipedia.org/wiki/Test-driven_development">TDD</a>) or those that are old hat at it and what to figure out a few more tricks of the trade, you should check out <a href="http://www.littlehart.net/atthekeyboard/2012/05/17/how-the-testing-sausage-gets-made/">this latest post</a> from <i>Chris Hartjes</i> about some of the tools he uses to get the job done.
</p>
<blockquote>
So how does the Grumpy Programmer write code, TDD style? It starts with using a set of tools that reduce the amount of friction required. First, I do almost all my work from a terminal.  [...] Why the terminal? PHPUnit is a CLI application. Yes, many popular editors and IDE's can do things like execute PHPUnit for you, but they are limited in what flexibility they provide. 
</blockquote>
<p>
He also talks about his editor of choice, <a href="http://www.vim.org/">vim</a>, and some of the plugins he uses in his day to day testing development. This includes tools to handle things like interfacing with git/gists, working with ctags to see the code's structure, working with "surroundings" and the <a href="https://github.com/tpope/vim-pathogen">pathogen</a> plugin to make adding other plugins easier. He keeps the code up in one terminal and his testing tool (PHPUnit or other) accessible in a second, making it a simple matter of switching to write the test then the functionality to make it pass.
</p>
<blockquote>
If there is a lesson to be learned from this, it's to make sure that every tool that you use reduces the friction that is generated when building your application using TDD.
</blockquote>]]></description>
      <pubDate>Thu, 17 May 2012 09:19:33 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Brian Moon's Blog: Check for a TTY or interactive terminal in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16809</guid>
      <link>http://www.phpdeveloper.org/news/16809</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Brian Moon</i> describes a need he had for detecting if the client or user calling a PHP script was <a href="http://brian.moonspot.net/tty-or-interactive-terminal-in-php">using an interactive terminal (TTY)</a> or not:
</p>
<blockquote>
Let's say I am trying to find out why some file import did not happen. Running the job that is supposed to do it may yield an error. Maybe it was a file permission issue or something. There are other people watching the alerts. What they don't know is that I am running the code and looking at these errors in real time.
</blockquote>
<p>
Since the errors were being sent to the log file, they were lost to the client/user on the other end left staring at their script wondering what went wrong. He ended up with a solution (a pretty simple one too) that uses <a href="http://www.php.net/posix_ttyname">posix_ttyname</a> and <a href="http://php.net/posix_isatty">posix_isatty</a>. He includes the little snippet of code he puts in his prepend file that checks for errors then checks for a TTY. If both are there, it turns off logging the errors to the file and sends them direct instead.
</p>]]></description>
      <pubDate>Fri, 02 Sep 2011 09:12:47 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Rob Morgan's Blog: Howto Log Directly to Your OS X Terminal using Zend Framework and NodeJS]]></title>
      <guid>http://www.phpdeveloper.org/news/14058</guid>
      <link>http://www.phpdeveloper.org/news/14058</link>
      <description><![CDATA[<p>
In an interesting post to his blog <i>Rob Morgan</i> shows how you can <a href="http://robmorgan.id.au/post/385010188/howto-log-directly-to-your-os-x-terminal-using-zend">log in to a terminal</a> from a Zend Framework application (on OS X) with the help of <a href="http://nodejs.org/">NodeJS</a>.
</p>
<blockquote>
<a href="http://nodejs.org/">NodeJS</a> is a tool designed to provide an easy way to build scalable network programs. By using the I/O capabilities of NodeJS, I have built a simple <a href="http://en.wikipedia.org/wiki/Transmission_Control_Protocol">TCP</a> server that writes log messages to the OS X terminal (via STDOUT). 
</blockquote>
<p>
He shows how to take <a href="http://github.com/robmorgan/node_log">his example script</a> and run NodeJS as a server on a local port (like 8003). You can then use <a href="http://github.com/robmorgan/zfnode_log_writer">his log writer plugin</a> in your Zend Framework app to write directly to the waiting NodeJS server.
</p>]]></description>
      <pubDate>Fri, 19 Feb 2010 11:14:02 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHP-GTK Community Site: Three Widgets and a Timer Class]]></title>
      <guid>http://www.phpdeveloper.org/news/7943</guid>
      <link>http://www.phpdeveloper.org/news/7943</link>
      <description><![CDATA[<p>
The PHP-GTK website has four new posts highlighting three different widgets and a Timer class to make working with delays in applications simpler:
</p>
<ul>
<li><a href="http://www.php-gtk.eu/code-snippets/command-widget">CommandWidget</a> - a terminal like widget for php-gtk
<li><a href="http://www.php-gtk.eu/code-snippets/dial-widget">Dial widget</a> - a graphical widget to display an analog value
<li><a href="http://www.php-gtk.eu/code-snippets/scrolling-label">ScrollingLabel</a> - a funny label widget with scrolling capabilities
<li><a href="http://www.php-gtk.eu/code-snippets/timer-class">Timer class : simplifying gtk::timeout_add</a>
</ul>
<p>
Keep an eye on the <a href="http://www.php-gtk.eu/code-snippets/php-gtk-2-code-snippets">Code Snippets</a> section of the PHP-GTK website for more helpful tips and tricks.
</p>]]></description>
      <pubDate>Thu, 31 May 2007 10:26:00 -0500</pubDate>
    </item>
  </channel>
</rss>
