<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Benjamin Tigano</title>
	<atom:link href="http://www.benjamin-t.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.benjamin-t.com</link>
	<description>Developer at Large</description>
	<lastBuildDate>Sat, 07 Apr 2012 03:37:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Relationship advice from a guy who knows nothing about relationships</title>
		<link>http://www.benjamin-t.com/2012/02/09/relationship-advice-from-a-guy-who-knows-nothing-about-relationships/</link>
		<comments>http://www.benjamin-t.com/2012/02/09/relationship-advice-from-a-guy-who-knows-nothing-about-relationships/#comments</comments>
		<pubDate>Thu, 09 Feb 2012 18:51:41 +0000</pubDate>
		<dc:creator>bentigano</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[rants]]></category>
		<category><![CDATA[relationships]]></category>

		<guid isPermaLink="false">http://www.benjamin-t.com/?p=185</guid>
		<description><![CDATA[Do you know why people like being single? Because they like the chase. They like working towards something they want. In the majority of cases, once they have it, they no longer want it. There isn’t a need to chase. People will often ask a couple “who’s chasing who?” The argument is that one is [...]]]></description>
			<content:encoded><![CDATA[<p>Do you know why people like being single? Because they like the <strong>chase</strong>. They like working towards something they want. In the majority of cases, once they have it, they no longer want it. There isn’t a need to chase.</p>
<p>People will often ask a couple “who’s chasing who?” The argument is that one is always chasing the other. If a supermodel is dating a greasy nerd, then obviously the greasy nerd is the one chasing. How long is that relationship going to last? Who is the supermodel going to chase? She’s going to chase someone, but it <strong>won’t</strong> be the greasy nerd.</p>
<p>What if both partners were <strong>always</strong> chasing each other. If each partner always works to “out-do” the other, then both would feel like they were chasing, and being chased. I know what you’re thinking – “why do two people that love each other have to compete with one another? That’s like one-upping!” Look at it this way. If two college students constantly try to do better than each other throughout the semester, aren’t they each going to end up with a <span style="text-decoration: underline;">better</span> grade than they would have had otherwise? It’s not “competing”, or “one-upping”. It’s simply doing your very <strong>best</strong> at whatever it is that you do. And when the competition is better, your performance has to be better (otherwise, you’re not competing.)</p>
<p>I wouldn’t consider myself to be an expert, or even a novice source of relationship advice, but I’ve seen some pretty <span style="text-decoration: underline;">serious</span> relationships fail, and I’ve seen even more relationships continue on <strong>miserably</strong> (either for kids, fear of divorce, or just because it’s easier.) It doesn’t have to be like that. Unless you’re a crazy person, or you’re so stuck in your ridiculous ways that you can’t slightly modify a behavior just to please someone, you can make it better. If you’re a messy person, and your partner likes to keep things neat, figure out the better way. I think it’s <strong>obvious</strong> that cleaner is better, so the messy person should start being clean. Like nearly every other behavior, being messy is learned. You know what else can be learned? Being clean. If your partner happens to like having super green grass, then make it happen. Sure, it’s easier and cheaper to let the grass just die or burn. But it’s generally better to have green grass, and more importantly it’s going to make a difference with your partner.</p>
<p>If it seems like your partner wants a lot, step back and figure out if it actually is a lot. If you’re not sure, sit them down and ask them what exactly it is that they want. If it really is a lot, ask yourself if they’re doing it for the <strong>greater</strong> good (like just wanting a better life in general, and if they’re willing to help.) If they’re not, get rid of them because you’ll likely <strong>never</strong> make them happy.</p>
<p>The general principal of doing your best at whatever you do applies to everything. Don’t just do things, do things the best you can absolutely do them. Otherwise, get off this planet, because you’re just taking up space.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benjamin-t.com/2012/02/09/relationship-advice-from-a-guy-who-knows-nothing-about-relationships/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating menus in a Zend_Application web app&#8230;</title>
		<link>http://www.benjamin-t.com/2012/02/02/creating-menus-in-a-zend_application-web-app/</link>
		<comments>http://www.benjamin-t.com/2012/02/02/creating-menus-in-a-zend_application-web-app/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 02:26:21 +0000</pubDate>
		<dc:creator>bentigano</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[zend]]></category>
		<category><![CDATA[zend framework]]></category>
		<category><![CDATA[Zend_Navigation]]></category>
		<category><![CDATA[ZF]]></category>

		<guid isPermaLink="false">http://www.benjamin-t.com/?p=145</guid>
		<description><![CDATA[When I first started exploring the Zend Framework (ZF), one of the issues I ran into was generating menu&#8217;s. My solution (in an effort to not go too much deeper into what ZF had to offer while I focused on the basics) was to put some code in the layout file where I wanted the [...]]]></description>
			<content:encoded><![CDATA[<p>When I first started exploring the Zend Framework (ZF), one of the issues I ran into was generating menu&#8217;s. My solution (in an effort to not go too much deeper into what ZF had to offer while I focused on the basics) was to put some code in the layout file where I wanted the menu. The menu was an array of titles and URL&#8217;s that I&#8217;d loop through and display. I wanted to add a CSS class to the menu item if that&#8217;s where the user was, so I checked the controller and action off of the request to see if it matched the URL, and if it did, I added the CSS. It was simple and quick, but it was messy.</p>
<p>I recently discovered a component in ZF for solving this problem &#8211; Zend_Navigation. The best part about this component is that you can build the menu via code, or from an XML file. I&#8217;ve been testing out both, but I find the XML file to be much easier and clean-cut. Rather than putting the code into the layout again, I created a a view helper in /application/views/helpers named MenuHelper. Below is the view helper class</p>
<pre class="brush: php; highlight: [7,8,10,11]; title: ; notranslate">
&lt;?php
class Zend_View_Helper_MenuHelper
{
   public $view;

   public function menuHelper() {
      $config = new Zend_Config_Xml(APPLICATION_PATH.'/configs/menu.xml', 'nav');
      $container = new Zend_Navigation($config);

      $this-&gt;view-&gt;navigation($container)-&gt;UlClass = &quot;main-nav&quot;;
      return $this-&gt;view-&gt;navigation()-&gt;menu()-&gt;render();
   }

   public function setView(Zend_View_Interface $view) {
      $this-&gt;view = $view;
   }
}
</pre>
<p>The lines specific to building the menu are highlighted. We start by reading in our configuration file, and defining the section we want to load &#8211; &#8220;nav&#8221;. We then create the Zend_Navigation object, define a class for the ul element (&#8220;main-nav&#8221;), and then render the menu to the view.</p>
<p>In our layout, we call the menu helper just like any other view helper:</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php echo $this-&gt;menuHelper(); ?&gt;
</pre>
<p>Almost done. Next, we need to populate the XML file with the menu items. In my example, I added a link back to Zend.com, and a link to the homepage of my site (index/index.) Even though it&#8217;s listed second, the home link will appear first because the order value is less than the order value on the zend link. The file is stored in the application/configs directory, named &#8220;menu.xml&#8221;.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;config&gt;
   &lt;nav&gt;
      &lt;zend&gt;
         &lt;label&gt;Zend&lt;/label&gt;
         &lt;uri&gt;http://www.zend.com&lt;/uri&gt;
         &lt;order&gt;100&lt;/order&gt;
      &lt;/zend&gt;
      &lt;home&gt;
         &lt;label&gt;Home&lt;/label&gt;
         &lt;order&gt;-100&lt;/order&gt;
         &lt;module&gt;default&lt;/module&gt;
         &lt;controller&gt;index&lt;/controller&gt;
         &lt;action&gt;index&lt;/action&gt;
      &lt;/home&gt;
   &lt;/nav&gt;
&lt;/config&gt;
</pre>
<p>Lastly, we want to make sure that we apply a specific CSS class to the menu item if that&#8217;s our current URL. To do that, we do nothing! Why? Because Zend_Navigation does that for us!</p>
<p>Want to read more about what Zend_Navigation has to offer? Check out the reference guide on Zend&#8217;s website <a title="Zend Framework - Zend_Navigation" href="http://framework.zend.com/manual/en/zend.navigation.html" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benjamin-t.com/2012/02/02/creating-menus-in-a-zend_application-web-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Early page cache plugin for Zend Framework MVC Applications</title>
		<link>http://www.benjamin-t.com/2012/02/02/early-page-cache-plugin-for-zend-framework-mvc-applications/</link>
		<comments>http://www.benjamin-t.com/2012/02/02/early-page-cache-plugin-for-zend-framework-mvc-applications/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 18:06:04 +0000</pubDate>
		<dc:creator>bentigano</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.benjamin-t.com/?p=134</guid>
		<description><![CDATA[Zend Framework is one of the more popular PHP frameworks. I recommend it a lot for custom web applications, but speed is sometimes an issue. It&#8217;s a very powerful framework, and as with anything, features and flexibility can effect performance where you don&#8217;t need features. For simple pages (like legal statements, about, company profile, etc.), [...]]]></description>
			<content:encoded><![CDATA[<p>Zend Framework is one of the more popular PHP frameworks. I recommend it a lot for custom web applications, but speed is sometimes an issue. It&#8217;s a very powerful framework, and as with anything, features and flexibility can effect performance where you don&#8217;t need features. For simple pages (like legal statements, about, company profile, etc.), an early page cache system can help you gain performance for the less dynamic areas of a web application.</p>
<p>Yesterday, in an effort to test what an early page cache system would look like, I spent some time to write a plugin for a standard ZF application. I used the generic MVC application that Zend Studio will make for you, and cleaned it up a bit. Here&#8217;s a breakdown of what I did to create the eary page cache plugin.</p>
<p>First, the ini configuration file. I added the section below to register the plugin with the front controller, and store the cache settings. Any kind of settings should ALWAYS be stored in configuration files. It can be XML, INI, or even a PHP array, but keep it separate from the rest of your application. In the case below, I&#8217;m using a lifetime of 3600 seconds (1 hour) for my cache. You&#8217;ll likely want to adjust this (and the other settings) based on your application&#8217;s needs.</p>
<pre class="brush: plain; title: ; notranslate">
resources.frontController.plugins.pagecache = &quot;My_Controller_Plugin_PageCache&quot;
pageCache.frontEnd = core
pageCache.backEnd = file
pageCache.frontEndOptions.lifetime = 3600
pageCache.frontEndOptions.automatic_serialization = true
pageCache.backEndOptions.lifetime = 3600
pageCache.backEndOptions.cache_dir = APPLICATION_PATH &quot;/../cache/pageCache&quot;
</pre>
<p>The next item to discuss is the Bootstrap file (/application/Bootstrap.php). While there isn&#8217;t anything specific to the plugin we&#8217;re creating, there is something that the plugin depends upon. In almost all of my ZF applications, I store the config in the Zend_Registry so that I can access it wherever I need it. Here is the section of code that does that:</p>
<pre class="brush: php; title: ; notranslate">
protected function _initConfig()
{
    $config = new Zend_Config($this-&gt;getOptions(), true);
    Zend_Registry::set('config', $config);
    return $config;
}
</pre>
<p>Now, whenever we want to access the configuration settings, we can use the following code:</p>
<pre class="brush: php; title: ; notranslate">
$config = Zend_Registry::get('config');
</pre>
<p>Another addition to the Bootstrap is registering the namespace where the plugin will live (line highlighted below):</p>
<pre class="brush: php; highlight: [5]; title: ; notranslate">
protected function _initAutoload()
{
	// add autoloader empty namespace
	$autoLoader = Zend_Loader_AutoLoader::getInstance();
	$autoLoader-&gt;registerNamespace('My_'); // added this for the early page cache plugin
	$resourceLoader = new Zend_Loader_Autoloader_Resource(array(
	'basePath' 		=&gt; APPLICATION_PATH,
	'namespace' 	=&gt; '',
));
</pre>
<p>Last but not least is the plugin itself. I won&#8217;t go into too much depth on this because if you&#8217;re not familiar with at least the basics of a Zend MVC application, you&#8217;re probably not understanding the rest of this article. We start by creating methods for the dispatchLoopStartup and dispatchLoopShutdown. We use dispatchLoopStartup because after all this is an EARLY page cache. We use the dispatchLoopShutdown because at that point, we&#8217;ve gone through the full dispatch loop and have a complete response that we can cache for the next request.</p>
<p>In the dispatchLoopStartup, we grab the configuration from the Zend_Registry that we stored it to during bootstrapping. We use those settings to create the Zend_Cache object. The first check we do is to make sure we&#8217;re only caching GET requests. The next thing we do is create a cache pool key based on the page name. Next, we see if we can get a cache hit. If this is the first time we&#8217;re visiting the page, it&#8217;ll be a miss. If we do get a hit, we set the response based on what was in the cache, send the response, and then exit. If we didn&#8217;t exit, we would go through the normal dispatch loop and avoid caching.</p>
<p>In the dispatchLoopShutdown, we do a few checks to make sure that the page is a good candidate for caching. If it is, we save it in the cache based on the same key we generated in the dispatchLoopStartup method.</p>
<p>Here is the code for the plugin class:</p>
<pre class="brush: php; title: ; notranslate">
class My_Controller_Plugin_PageCache extends Zend_Controller_Plugin_Abstract
{
	public static $doNotCache = false;
	public $cache;
	public $key;

	public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request)
	{
		$pageCacheConfig = Zend_Registry::get('config')-&gt;pageCache;

		$this-&gt;cache = Zend_Cache::factory(
		$pageCacheConfig-&gt;frontEnd,
		$pageCacheConfig-&gt;backEnd,
		$pageCacheConfig-&gt;frontEndOptions-&gt;toArray(),
		$pageCacheConfig-&gt;backEndOptions-&gt;toArray());

		if (!$request-&gt;isGet()) {
			self::$doNotCache = true;
			return;
		}

		$path = $request-&gt;getPathInfo();

		$this-&gt;key = md5($path);

		$data = $this-&gt;cache-&gt;load($this-&gt;key);
		if ($data)
		{
			$response = $data;
			$this-&gt;setResponse($response);
			$this-&gt;getResponse()-&gt;sendResponse();
			exit;
		}
	}

	public function dispatchLoopShutdown()
	{
		if (self::$doNotCache
		|| $this-&gt;getResponse()-&gt;isRedirect()
		|| (null === $this-&gt;key))
		{
			return;
		}
		$this-&gt;cache-&gt;save($this-&gt;getResponse(), $this-&gt;key);
	}
}
</pre>
<p>As always, there will be cases where you don&#8217;t want a particular controller or action to be cached, in that case, we&#8217;ve built in a static property you can set in your controller that will stop the plugin from caching the response.</p>
<pre class="brush: php; title: ; notranslate">
My_Controller_Plugin_PageCache::$doNotCache = true;
</pre>
<p>Below is a zip file contained the full MVC application, minus the Zend Framework library (to save space.) You should drop the Zend folder inside the library folder, and create the .htaccess file (assuming you&#8217;re using Apache with mod_rewrite enabled) to point to public/index.php.</p>
<p>If you&#8217;ve got questions, comments, or suggestions, leave them in the comments!</p>
<p><a href="http://www.benjamin-t.com/wp-content/uploads/2012/02/zend_early-page-cache.zip">Get The Code!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.benjamin-t.com/2012/02/02/early-page-cache-plugin-for-zend-framework-mvc-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Mom</title>
		<link>http://www.benjamin-t.com/2012/01/31/my-mom/</link>
		<comments>http://www.benjamin-t.com/2012/01/31/my-mom/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 21:38:52 +0000</pubDate>
		<dc:creator>bentigano</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.benjamin-t.com/?p=130</guid>
		<description><![CDATA[I had a great lunch yesterday. It was leftover Beef Burgundy that my Mom made for me yesterday (for my birthday.) I had to call my Mom to let her know that it was probably the greatest lunch I’d had at work in a long time (measured in months, if not years.) That got me [...]]]></description>
			<content:encoded><![CDATA[<p>I had a great lunch yesterday. It was leftover Beef Burgundy that my Mom made for me yesterday (for my birthday.) I had to call my Mom to let her know that it was probably the greatest lunch I’d had at work in a long time (measured in months, if not years.) That got me thinking…(and then I started to smell something burning.)</p>
<p>I have the <strong>greatest</strong> mother in the <strong>world</strong>. Everyone says they love their Mom, and their Mom is the best, but that’s so subjective. My mom is objectively the best person ever made, and I’ll tell you why….</p>
<p>When I was younger, I always remember my mother being around. We had a traditional household, so most of the time, my Dad was at work. Some could argue he was at work too much, but I could see myself making the same mistake, so it’s neither here nor there. When I was in 3<sup>rd</sup> grade, my parents got divorced. Naturally, my Mom started working more. She was taking care of mentally-handicapped adults in a day program full-time, but we never saw less of her. Somehow, she still managed to be in the lives of my older brother and I. We ALWAYS had home-cooked meals, and we ALWAYS ate together as a family.</p>
<p>In the summer when we were off from school, she would always leave a list of chores for my brother and I to complete before she came home from work. It wasn’t a big list, but we were kids, so we usually waited until the last minute, or conveniently forgot. If my Mom came home and things weren’t done, or weren’t done right, she’d be upset. My brother and I sometimes joke and make her out to be a monster, but I will be the same way with my kids because I know how the results turn out. It’s called teaching responsibility, and not a lot of parents used to do it, and even less do it nowadays. Growing up, I was one of the few kids in school that knew the value of hard work, and how important it was to be responsible. Back then I didn’t realize it, but now I do. Now that I see what came of it, it’s much easier to spot the differences. I had friends that would come home from school and play video games, or would just stay out all night. I wouldn’t even think about that for fear that my Mom would shoot me down if I asked her to do either. Sometimes my friends would ask if I could sleep over, and instead of saying “let me ask my Mom”, I’d just say “she said no.” Not because she was a monster, but because I knew what the answer would be. If I mouthed off, or didn’t do chores, I know that the answer would be no.</p>
<p>I also know parents that are on the extreme side – not letting their kids do anything, learn anything themselves, and controlling everything. I would say that my Mom had control over my brother and I growing up, but I wouldn’t say we were robots. We were kids, and kids need to be controlled because they don’t know any better. However, that’s not to say that she didn’t let us have our freedom. She let us learn our own lessons, and be ourselves – in fact, she encouraged it.</p>
<p>My Mom gave up a lot for my brother and I. As the children of divorced parents sometimes feel, my brother and I NEVER felt like we weren’t <span style="text-decoration: underline;">first</span> priority. If there was something we needed, we had it. I’m not talking about the latest video game, or the coolest bicycle. When we went to school, name brands were everything. If you weren’t wearing Nike’s or Adidas shoes, you needed to be made fun of. My Mom understood that, so she made sure we had the things we “needed” in order to have a comfortable life in school. She never explicitly talked to me about it, but somehow she made me understand that it was wrong. I NEVER made fun of someone for not having name brand sneakers, and when I saw it happening, I always tried to intervene or change the subject. When I think about some of the saddest things I’ve ever seen in my life, I think back to those times where I saw someone getting made fun of because of their shoes. If bullies had a mother like mine, we wouldn’t have bullies, and certainly wouldn’t need to be passing laws prohibiting bullying.</p>
<p>As we got older, I realized more and more how much of a hard worker my Mom was. She tried a couple times to start her own business, so she could retire comfortably someday or leave her children something after she’s gone. Even if I didn’t agree with what she was doing specifically (I worked in the restaurant business and didn’t want my Mom to have to work that hard), I still admired her determination to make things work. She put in more heart than everyone else combined. Even when things seemed hopeless and defeat was likely inevitable, she kept on <strong>pushing</strong>. Things like that inspired me. I used to take long drives alone to clear my mind and process things I had experienced. I realize now that it was because I have such an amazing person in my life, and people weren’t designed to understand something so remarkable. I still don’t understand how or why <em>my</em> Mom is so amazing, but it’s something I’ve learned to live with.</p>
<p>At one point, we moved out of Taunton and into Fall River. Changing schools is one of the most difficult things a child (or teen, as we were) can go through. Tauntonwas “school-by-choice”, so even though we lived in another city, they allowed us to attend (presuming we kept good grades and didn’t stir up any trouble.) Before my older brother was able to drive, my mother brought us to school. Every day of the week, she would wake up, get ready, get my baby brother ready, and bring us to school. She’d do the same thing in the afternoon to pick us up. Whether it was down-pouring, or there was 8” of snow on the ground, she made those <strong>compromises</strong> so that we didn’t have to change schools – all this while she was working to provide for our family. I feel the need to disclose that we did go to Fall River schools, but only for about a month. My older brother did something stupid in high school that set off my Mom (<span style="text-decoration: underline;">for good reason</span>), so she moved us toDurfeeHigh School inFall River as punishment. The school was doing us more harm than good, so she transferred us back. It sucked, but it definitely put us in our places.</p>
<p>About 7 years ago, my Mom was diagnosed with Multiple Sclerosis (MS.) It’s a disease the causes the body’s immune system to incorrectly target the myelin (the tissue that insulates and protects the nerve endings in your brain) as an enemy. In a nutshell, the body targets and <span style="text-decoration: underline;">destroys</span> itself. The results vary, ranging from uncontrollable body spasms, to paralysis and loss of vision. I helped my Mom with her daily injections of Copaxone until she tried other medications that didn’t require such a destructive treatment path as putting a needle in a different part of your body every day. She now goes to the doctor for a monthly infusion (similar to a chemotherapy), and is doing better than she was when she was on the daily injection treatments. Nearly every Friday night, she goes to a local restaurant to dance (she probably dances better than most young girls) just so she knows she still can. Luckily, I don’t think I could ever see her stop dancing. Multiple Sclerosis doesn’t have a cure, so it’s never been defeated, but it’s certainly going to have a hell of a time trying to significantly effect my Mom.</p>
<p>Still though, she keeps<strong> pushing</strong>. She still invites everyone over for the holidays, and has a spread that could rival something you’d see on Food Network. People are always amazed when they see how much food and desserts. She always caters to everyone, so if there’s going to be a vegan at one of her parties, she’ll have vegan-friendly items on the menu. And it’s not just quantity &#8211; it’s quality. Again, people always say <em>their</em> Mom is the best cook. But objectively, my Mom cooks the best food. She is married to a chef that’s been cooking his whole life and is a <span style="text-decoration: underline;">great</span> cook – yet she can still put him to shame. She puts love into everything that she cooks &#8211; no matter when, no matter what, no matter who.</p>
<p>As my brother and I found girlfriends (now his wife, and my fiancé), she was very <strong>supportive</strong>, and welcoming to them. Of course though, things aren’t always fine and dandy. When I wasn’t seeing eye-to-eye with my fiancé, my Mom would ask for the whole story. I was her son, So I’d expect her to side with me, but she didn’t always. When I was wrong, she called me out on it. It was another one of those things I hated at the time, but looking back, I wouldn’t have it any other way. When I’m right is when she sides with me. If neither of us is right, she offers advice to help me work toward a solution. Other parents will make spouses feel uncomfortable, non-existent, or even disrespect them. There have been so many times where I didn’t feel welcomed by my in-laws, and I do everything I can to prove myself. It’s discouraging, and honestly makes me sad knowing that nothing I could do (except throw myself in front of a train) could make some people happy. (Okay, maybe not throw myself in front of a train, but definitely walk away.) Luckily, my Mom taught me things to counteract behavior like that, and I am comforted knowing that my fiancé will never have to feel those same feelings.</p>
<p>My Mom never went to college. Back in the 80’s, most girls graduated high school and had children. It’s different now, but back then, that’s how it was. However, she still showed me the importance of college. She would go so far as to make an example out of herself in an effort to get me to enroll in college (though it was a bad example because my Mom is also one of the <span style="text-decoration: underline;">smartest</span> people I know.) When I graduated high school, I wanted to go to New England Tech. She brought me there, I passed all of the entry exams with flying colors, and then we went to enroll. Apparently, it costs about $15,000 per semester to attend that school, and we neither the cash nor the credit to pull that off. I was pissed, but she <span style="text-decoration: underline;">persevered</span>. She didn’t want me to give up, so she kept at it. I ended up enrolling at Bristol Community College, and she paid for my first class with the money she <span style="text-decoration: underline;">didn’t</span> have. We both knew she wasn’t going to be able to pay for my schooling, but she didn’t have to. She wanted to get me started on the right foot, and the rest would take care of itself.</p>
<p>She taught me the skills and responsibilities I needed to be able to hold a job while I was in school and balance everything. I’ve been employed every day of my life (with some overlap) since I was 14 years old – full-time since I was 16. I held the same job for the first 5 years of my working life, and have <strong>never</strong> been fired from any employer. Today, I’ve got a career to be <span style="text-decoration: underline;">proud</span> of. In fact, it’s a life to be proud of. I own my own home with my fiancé, and am getting married in less than 8 months. My brother and sister-in-law live right down the road, and I’m closer with them than I’ve ever been. My little brother (who I haven’t mentioned here too much because he wasn’t born until I was 14) is one of the most important people in life, and I am proud to say that I helped raise him. He even takes after me (so many people say he’s like a mini-me) so every time he has a victory, it’s like a victory for me.</p>
<p>My Mom is the most caring, supportive, loving person I’ve ever met in my life. She means <strong>more</strong> to me than I could ever express in a blog post or any other form of communication. She taught me 99.98% of everything I know about life, love, family, respect, and responsibility.</p>
<p>The song I chose for the mother-son dance at my wedding is something that took me about 2 years to choose. I knew it when I heard it (to be fair, I had some help in being introduced to it), and it’s really important to my Mom that the song has some meaning and resonates for both of us. She knows I have found the perfect song, and has been begging me to hear it, but I want it to be a <span style="text-decoration: underline;">surprise</span>. Hopefully I don’t let her down, because in 26 years, she has <strong>never</strong> let me down…</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benjamin-t.com/2012/01/31/my-mom/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Pagination with Zend Framework</title>
		<link>http://www.benjamin-t.com/2012/01/29/115/</link>
		<comments>http://www.benjamin-t.com/2012/01/29/115/#comments</comments>
		<pubDate>Sun, 29 Jan 2012 21:48:13 +0000</pubDate>
		<dc:creator>bentigano</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[pagination]]></category>
		<category><![CDATA[zend]]></category>
		<category><![CDATA[zend framework]]></category>
		<category><![CDATA[Zend_Paginator]]></category>
		<category><![CDATA[ZF]]></category>

		<guid isPermaLink="false">http://www.benjamin-t.com/?p=115</guid>
		<description><![CDATA[I&#8217;m currently working on the photo gallery portion of a website for a constructions company that sells and installs fiberglass pools. Obviously, having images of gorgeous pools can help convince a potential buyer (especially when these particular pools are like the ones you see on MTV Cribs), so the gallery needs to be advanced &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently working on the photo gallery portion of a website for a constructions company that sells and installs fiberglass pools. Obviously, having images of gorgeous pools can help convince a potential buyer (especially when these particular pools are like the ones you see on MTV Cribs), so the gallery needs to be advanced &#8211; built from the ground up. I&#8217;ve been given hundreds of different galleries to post on the site, each with dozens of pictures per album. That creates the need to paginate. Like the rest of the site, I&#8217;m using components of Zend Framework. I haven&#8217;t yet needed to paginate anything using ZF, so I figured I&#8217;d share my experience testing out what they&#8217;ve got to offer.</p>
<pre class="brush: php; title: ; notranslate">
// first, include the files we'll need
require 'Zend/Paginator.php';
require 'Zend/Paginator/Adapter/Array.php';

$array = array('1', '2', '3', '4', '5', '6', '7'); // array of data to paginate
$paginator = new Zend_Paginator(new Zend_Paginator_Adapter_Array($array)); // create the paginator
$paginator-&gt;setCurrentPageNumber((int)($_GET['page'])); // get the current page number that we're on
$paginator-&gt;setItemCountPerPage(2); // only show two per page

// these are the variables we'll likely need in order to create the &quot;prev/next page&quot; links
$currentPageNumber = $paginator-&gt;getCurrentPageNumber();
$itemCountPerPage = $paginator-&gt;getItemCountPerPage();
$totalItemCount = $paginator-&gt;getTotalItemCount();
$totalPageCount = $paginator-&gt;count();
</pre>
<p>Now that we&#8217;ve got the paginator set-up and loaded with our data, we can now output the HTML for the prev/next links.</p>
<pre class="brush: php; title: ; notranslate">
// if not page 1, show the &quot;prev&quot; page link
&lt;!--?php if ($currentPageNumber != 1):?--&gt;
&lt;a href=&quot;/?page=&lt;?php echo $currentPageNumber - 1 ?&gt;&quot;&gt;Prev&lt;/a&gt;
&lt;!--?php endif; ?--&gt;&lt;/pre&gt;
&lt;pre&gt;
// if not the last page, show the &quot;next&quot; page link
&lt;!--?php if ($currentPageNumber &lt; $totalPageCount):?--&gt;
   &lt;a href=&quot;/?page=&lt;?php echo $currentPageNumber + 1 ?&gt;&quot;&gt;Next&lt;/a&gt;
&lt;!--?php endif; ?--&gt;

// display each item on the current page in the paginator
&lt;!--?php if (count($paginator)): ?--&gt;&lt;/pre&gt;
&lt;pre&gt;
&lt;!--?php endif; ?--&gt;
</pre>
<p>You&#8217;ll likely want to display the results differently, but I just wanted to show a quick example since you&#8217;ll have to show the prev/next links and traverse through each pages items regardless of your implementation.</p>
<p>Got comments or questions? Leave a message below.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benjamin-t.com/2012/01/29/115/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Year&#8217;s Resolution</title>
		<link>http://www.benjamin-t.com/2011/12/24/new-years-resolution/</link>
		<comments>http://www.benjamin-t.com/2011/12/24/new-years-resolution/#comments</comments>
		<pubDate>Sat, 24 Dec 2011 12:44:04 +0000</pubDate>
		<dc:creator>bentigano</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[rivtech solutions]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.benjamin-t.com/?p=87</guid>
		<description><![CDATA[This year, I&#8217;m making a New Year&#8217;s Resolution &#8211; to &#8220;officially&#8221; start a web development company. Nothing major, just something on the side, similar to what I have now, just more professional. I&#8217;ve tried starting Rivtech Solutions, but I can&#8217;t cash checks made out to &#8220;Rivtech Solutions&#8221;, so to me, it&#8217;s not real yet. Plus, [...]]]></description>
			<content:encoded><![CDATA[<p>This year, I&#8217;m making a New Year&#8217;s Resolution &#8211; to &#8220;officially&#8221; start a web development company. Nothing major, just something on the side, similar to what I have now, just more professional. I&#8217;ve tried starting <a title="Rivtech Solutions" href="http://rivtech-solutions.com" target="_blank">Rivtech Solutions</a>, but I can&#8217;t cash checks made out to &#8220;Rivtech Solutions&#8221;, so to me, it&#8217;s not real yet. Plus, I wouldn&#8217;t mind a company name without the word &#8220;tech&#8221; in it. Not really sure why &#8211; just a gut thing.</p>
<p>I recently won a 99cent domain from <a title="Twitter: Dotster" href="http://twitter.com/#!/dotster" target="_blank">@Dotster</a>, my hosting provider, so that&#8217;ll certainly help if I decide on a new name.</p>
<p>My older brother, Dominic, will hopefully be joining me on this venture on this business side of things (he can communicate with clients in ways that I can&#8217;t even dream of.)</p>
<p>The business will be part-time for both of us, who are employed full-time &#8211; but don&#8217;t let that make you think it&#8217;ll be back-burner material for either of us! <img src='http://www.benjamin-t.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>More to come!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benjamin-t.com/2011/12/24/new-years-resolution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RhodeIslandComedy.com mobile is live!</title>
		<link>http://www.benjamin-t.com/2011/09/12/rhodeislandcomedy-com-mobile-is-live/</link>
		<comments>http://www.benjamin-t.com/2011/09/12/rhodeislandcomedy-com-mobile-is-live/#comments</comments>
		<pubDate>Mon, 12 Sep 2011 12:11:25 +0000</pubDate>
		<dc:creator>bentigano</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[RhodeIslandComedy]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.benjamin-t.com/?p=75</guid>
		<description><![CDATA[Remember the post about getting RhodeIslandComedy.com to be optimized for mobile devices? If you don&#8217;t, you can read it here. Well, I&#8217;m proud to announce that it was deployed yesterday morning, and will be announced to the RhodeIslandComedy.com community within the week. So far, you can view upcoming events, view locations and events specifically at [...]]]></description>
			<content:encoded><![CDATA[<p>Remember the post about getting RhodeIslandComedy.com to be optimized for mobile devices? If you don&#8217;t, you can read it <a title="RhodeIslandComedy.com…mobile!" href="http://www.benjamin-t.com/2011/07/06/rhodeislandcomedy-com-mobile/">here</a>.</p>
<p>Well, I&#8217;m proud to announce that it was deployed yesterday morning, and will be announced to the RhodeIslandComedy.com community within the week.</p>
<p>So far, you can view upcoming events, view locations and events specifically at those locations, and even view the profiles of comedians listed on the full site. Soon, you&#8217;ll be able to find events by geographic location. Whether you&#8217;re looking for events within 10 miles of Providence, or within 20 miles of your current location, it&#8217;ll all be possible soon.</p>
<p>Wanna check it out? Visit <a title="Rhode Island Comedy" href="http://rhodeislandcomedy.com" target="_blank">RhodeIslandComedy.com</a> from your iOS or Android device and you&#8217;ll be pointed to the mobile version automatically! Or you can visit it directly by going to <a title="Rhode Island Comedy - Mobile" href="http://m.rhodeislandcomedy.com" target="_blank">m.rhodeislandcomedy.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benjamin-t.com/2011/09/12/rhodeislandcomedy-com-mobile-is-live/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WP Settings Generator is now live!</title>
		<link>http://www.benjamin-t.com/2011/08/26/wp-settings-generator-is-now-live/</link>
		<comments>http://www.benjamin-t.com/2011/08/26/wp-settings-generator-is-now-live/#comments</comments>
		<pubDate>Fri, 26 Aug 2011 17:25:23 +0000</pubDate>
		<dc:creator>bentigano</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[generator]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[settings]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.benjamin-t.com/?p=71</guid>
		<description><![CDATA[For a while, I&#8217;ve been talking about creating a &#8220;settings generator&#8221; for WordPress. Nothing major, just something that WP developers and theme designers can use to quickly create settings for use in plugin or theme code. Well, as of about 10 minutes ago, I just published the tool I&#8217;ve been working on. I didn&#8217;t put [...]]]></description>
			<content:encoded><![CDATA[<p>For a while, I&#8217;ve been talking about creating a &#8220;settings generator&#8221; for WordPress. Nothing major, just something that WP developers and theme designers can use to quickly create settings for use in plugin or theme code.</p>
<p>Well, as of about 10 minutes ago, I just published the tool I&#8217;ve been working on. I didn&#8217;t put a whole lot of time toward it, and it isn&#8217;t bulletproof, but it certainly does the trick and can save a boatload of time. It&#8217;s open for anyone to use, and currently resides at <a title="WP Settings Generator" href="http://wps.benjamin-t.com" target="_blank">wps.benjamin-t.com</a>.</p>
<p>In the near future (once it helps speed up development time on other WordPress site projects I&#8217;m currently working on), I plan to expand upon it to allow for different types of values (string, numeric, boolean, etc.), and enable default values.</p>
<p>Let me know what you think of it in the comments below. Happy PHPing!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benjamin-t.com/2011/08/26/wp-settings-generator-is-now-live/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RhodeIslandComedy.com&#8230;mobile!</title>
		<link>http://www.benjamin-t.com/2011/07/06/rhodeislandcomedy-com-mobile/</link>
		<comments>http://www.benjamin-t.com/2011/07/06/rhodeislandcomedy-com-mobile/#comments</comments>
		<pubDate>Wed, 06 Jul 2011 12:23:15 +0000</pubDate>
		<dc:creator>bentigano</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[RhodeIslandComedy]]></category>

		<guid isPermaLink="false">http://www.rivtech-solutions.com/wordpress/?p=43</guid>
		<description><![CDATA[So, RhodeIslandComedy.com is a pretty big hit and it&#8217;s still very young. If you&#8217;ve looked at the site from your Android device or an iPhone/iPad browser, you&#8217;ll (hopefully) notice that the theme holds up well. Sure, it&#8217;s a bit small, but surely still usable. A lot of sites become unusable because of the way the layout appears. [...]]]></description>
			<content:encoded><![CDATA[<p>So, <a title="Rhode Island Comedy" href="http://www.rhodeislandcomedy.com/" target="_blank">RhodeIslandComedy.com</a> is a pretty big hit and it&#8217;s still very young. If you&#8217;ve looked at the site from your Android device or an iPhone/iPad browser, you&#8217;ll (hopefully) notice that the theme holds up well. Sure, it&#8217;s a bit small, but surely still usable. A lot of sites become unusable because of the way the layout appears. However, we&#8217;re not settling there.</p>
<p>I personally am not interested in native applications. There are just too many devices, and too much maintenance involved. Then, (in the case of Apple) the App Store has to approve of your application. Instead, I&#8217;d rather go the direction of mobile-optimized web sites &#8211; particularly using the HTML5 features offered by the most popular devices (read &#8220;non-Windows phones&#8221;.) I can get a website in the browser of an iPhone that looks and feels better than a native app, and the same goes for Android devices.</p>
<p>The mobile-optimized version of <a title="Rhode Island Comedy" href="http://www.rhodeislandcomedy.com/" target="_blank">RhodeIslandComedy.com</a> will obviously be a simplified version of the full site. My question though, is exactly what features folks would want? Right now, visitors can see upcoming events, and the locations at which those events are happening. I&#8217;m wondering if we could find not only the upcoming events, but the ones closest to your physical location. So if you&#8217;re in Lincoln, it&#8217;s going to give you the line-up of events happening for the next few nights at Catch a Rising Star in Twin River. Perhaps give folks the ability to post comments about shows as they happen. I don&#8217;t know &#8211; they&#8217;re just thoughts.</p>
<p>Anyone have any comments? Not that I think anyone is reading this stuff (I use this site more as a portfolio and outlet for my thoughts, rather than a blag that people are actually going to read.) <img src="http://benjamin-t.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.benjamin-t.com/2011/07/06/rhodeislandcomedy-com-mobile/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Custom WordPress options utility (continued)&#8230;</title>
		<link>http://www.benjamin-t.com/2011/06/05/custom-wordpress-options-utility-continued/</link>
		<comments>http://www.benjamin-t.com/2011/06/05/custom-wordpress-options-utility-continued/#comments</comments>
		<pubDate>Sun, 05 Jun 2011 12:20:57 +0000</pubDate>
		<dc:creator>bentigano</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[37signals]]></category>
		<category><![CDATA[getting real]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.rivtech-solutions.com/wordpress/?p=41</guid>
		<description><![CDATA[In a recent post, I talked about a web application that would create a custom WordPress options page with custom settings that developers and designers could use to quickly give their end clients options for any custom development. I&#8217;ve been working on it a little bit each day, and finally have a proof-of-concept. Right now, the [...]]]></description>
			<content:encoded><![CDATA[<p>In <a title="Custom WordPress Options Utility" href="http://www.benjamin-t.com/2011/05/26/custom-wordpress-options-utility/">a recent post</a>, I talked about a web application that would create a custom WordPress options page with custom settings that developers and designers could use to quickly give their end clients options for any custom development. I&#8217;ve been working on it a little bit each day, and finally have a proof-of-concept.</p>
<p>Right now, the utility will take in a page title and slug, and then any number of settings you want to define. Right now, it only supports text settings, so on/off switches and dropdowns aren&#8217;t supported. Once you have everything configured, it packages up the plugin into a zip file for download. Then the user just needs to extract and upload to their wp-content/plugins directory.</p>
<p>I&#8217;d like to add support for different datatypes, and I still need to style the interface of the application, but functionally it&#8217;s deployable. In reading <a title="Getting Real by 37signals" href="http://gettingreal.37signals.com/" target="_blank">Getting Real</a>, I&#8217;m thinking I should deploy it without the additional features and then add them in after. But then I&#8217;ll likely need to touch the styling twice, so now I&#8217;m not sure.</p>
<p>Any suggestions?</p>
<p>One thing is for sure, it&#8217;s not getting released without some level of styling. It literally has no CSS. <img src="http://benjamin-t.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.benjamin-t.com/2011/06/05/custom-wordpress-options-utility-continued/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

