<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Random Thoughts - Tylermac.Net</title>
	<atom:link href="http://tylermac.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://tylermac.wordpress.com</link>
	<description>Junk food for thought</description>
	<lastBuildDate>Tue, 27 Apr 2010 14:43:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='tylermac.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Random Thoughts - Tylermac.Net</title>
		<link>http://tylermac.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://tylermac.wordpress.com/osd.xml" title="Random Thoughts - Tylermac.Net" />
	<atom:link rel='hub' href='http://tylermac.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Draggable &amp; Resizable Widgets in Flex 3</title>
		<link>http://tylermac.wordpress.com/2009/09/25/widgets-in-flex-3/</link>
		<comments>http://tylermac.wordpress.com/2009/09/25/widgets-in-flex-3/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 00:56:41 +0000</pubDate>
		<dc:creator>Tyler</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Canvas]]></category>
		<category><![CDATA[Draggable]]></category>
		<category><![CDATA[MXML]]></category>
		<category><![CDATA[Resizable]]></category>
		<category><![CDATA[TitleWindows]]></category>
		<category><![CDATA[Widgets]]></category>
		<category><![CDATA[wrapper]]></category>

		<guid isPermaLink="false">http://tylermac.wordpress.com/?p=42</guid>
		<description><![CDATA[Working on a project, a requirement was for widgets to be placed on the main view. These widgets where required to be moveable and resizable. In the past, I have used FlexLib’s MDI Canvas to accomplish this. In this instance however, I wanted to use pre existing components, and didn’t want to have to extend [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tylermac.wordpress.com&amp;blog=335004&amp;post=42&amp;subd=tylermac&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Working on a project, a requirement was for widgets to be placed on the main view. These widgets where required to be moveable and resizable.</p>
<p>In the past, I have used <a href="http://code.google.com/p/flexmdi/">FlexLib’s MDI Canvas</a> to accomplish this. In this instance however, I wanted to use pre existing components, and didn’t want to have to extend other classes.</p>
<p>My solutions was to create a wrapper for MXML for <a title="Flex 3 - TitleWindow layout container" href="http://livedocs.adobe.com/flex/3/html/layouts_12.html">TitleWindows</a> that would turn any container into bounds for the TitleWindows.</p>
<p>  <span id="more-42"></span>
<p>Here is the Widget Manager that I’ve come up with.</p>
<p><pre class="brush: java;">
package net.tylermac.utils
{
	import flash.display.DisplayObject;
	import flash.display.Sprite;
	import flash.events.Event;
	
	import mx.binding.utils.ChangeWatcher;
	import mx.containers.Panel;
	import mx.containers.TitleWindow;
	import mx.core.IDeferredInstance;
	import mx.core.IMXMLObject;
	import mx.core.UIComponent;
	import mx.events.CloseEvent;
	import mx.managers.PopUpManager;
	
	[DefaultProperty(&quot;children&quot;)]
	/**
	 * Class to handle widgets on the screen
	 */
	public class WidgetManager implements IMXMLObject
	{
		private var _parent:UIComponent;
		private var _id:String;
		private var _initalizedCount:int;
		
		[InstanceType(&quot;mx.containers.TitleWindow&quot;)]
		[ArrayElementType(&quot;mx.core.IDeferredInstance&quot;)]
		public var children:Array;
		
		public function WidgetManager()
		{
		}
		
		public function initialized(document:Object, id:String):void
		{
			_parent = document as UIComponent;
			_id = id;
			
			_initalizedCount = 0;
			if(_parent)
			{
				//Preoptimization, just for fun
				_parent.addEventListener(Event.ENTER_FRAME, proccessAChild);
			}
		}
		
		private function proccessAChild(event:Event):void
		{
			if(_initalizedCount == children.length)
			{
				_parent.removeEventListener(Event.ENTER_FRAME, proccessAChild);
				return;
			}
			var win:TitleWindow = IDeferredInstance(children[_initalizedCount]).getInstance() as TitleWindow;
			ChangeWatcher.watch(win,&quot;includeInLayout&quot;,toggleDisplay);
			if(win.includeInLayout)
			{
				displayWindow(win);
			}
			_initalizedCount++;
		}
		
		private function toggleDisplay(event:Event):void
		{
			var win:TitleWindow = TitleWindow(event.target);
			if(win.includeInLayout)
			{
				displayWindow(win);
			} else {
				closeWindow(win);
			}
		}
		
		private function displayWindow(win:TitleWindow):void
		{
			win.showCloseButton = true;
			win.addEventListener(CloseEvent.CLOSE,handleCloseButton);
			
			win.maxHeight = _parent.height - 10;
			win.maxWidth = _parent.width - 10;
			
			PopUpManager.addPopUp(win, _parent);
			if(win.x == win.y &amp;&amp; win.x == 0) {
				PopUpManager.centerPopUp(win);
			}
			win.callLater(drawResizeGraphic, [win]);
		}
		
		private function closeWindow(win:TitleWindow):void
		{
			win.removeEventListener(CloseEvent.CLOSE, handleCloseButton);
			PopUpManager.removePopUp(win);
		}
		
		private function handleCloseButton(event:CloseEvent):void
		{
			TitleWindow(event.target).includeInLayout = false;
		}
		
		public function toString():String
		{
			return _id;
		}
		
		private function drawResizeGraphic(win:Panel):void
		{
			var s:Sprite = new ResizeIcon();
			s.name = 'resizeGraphic';
			win.rawChildren.addChild(s);
		}
		
		private function positionResizeGraphic(win:Panel):void
		{
			var s:DisplayObject = win.rawChildren.getChildByName('resizeGraphic');
			s.x = win.width - s.width;
			s.y = win.height - s.height;
		}
	}
}
	import flash.display.Sprite;
	import flash.events.Event;
	import mx.controls.Alert;
	import flash.display.Graphics;
	import flash.display.DisplayObjectContainer;
	import mx.effects.Resize;
	import mx.core.UIComponent;
	import flash.display.DisplayObject;
	import flash.events.MouseEvent;
	import mx.managers.CursorManager;
	import mx.collections.CursorBookmark;
	import mx.managers.PopUpManager;
	import flash.display.Shape;
	import mx.managers.SystemManager;
	import flash.media.Microphone;
	

class ResizeIcon extends Sprite
{
	private var _parent:DisplayObjectContainer;
	private var _hitArea:Sprite;
	
	public function ResizeIcon(color:uint = 0x000000)
	{
		this.draw(color);
		this.setHitArea();
		this.setupListeners();
	}
	
	override public function get hitArea():Sprite
	{
		return _hitArea;
	}
	
	private function draw(colour:uint):void
	{
		var g:Graphics = graphics;
		g.clear();
		g.lineStyle(2,colour);
		g.moveTo(4, 9)
		g.curveTo(7, 7, 9, 4);						
		g.moveTo(4, 9)
		g.curveTo(5, 5, 6, 5);
	}
	
	private function setHitArea():void
	{
		this._hitArea = new Sprite();
		this._hitArea.graphics.drawRect(0,0,10,10);
	}
	
	private function setupListeners():void
	{
		this.addEventListener(Event.ADDED, added);
		this.addEventListener(Event.REMOVED, removed);
		this.addEventListener(MouseEvent.MOUSE_DOWN, startResize);
	}
		
	private function added(event:Event):void
	{
		if(this.parent == _parent) return;

		if(_parent)
		{
			_parent.removeEventListener(Event.RESIZE, parentResized);
		}
		
		_parent = this.parent;
		positionResizeIcon();

		_parent.addEventListener(Event.RESIZE, parentResized);
	}
	
	private function removed(event:Event):void
	{
		if(_parent)
		{
			_parent.removeEventListener(Event.RESIZE, parentResized);
		}

		_parent == null;
	}
			
	private function positionResizeIcon():void
	{
		x = _parent.width - 10;
		y = _parent.height - 10;
	}
	
	private function parentResized(event:Event):void
	{
		positionResizeIcon();
	}
	
	private function startResize(event:Event):void
	{
		var rubber:RubberbandPlaceHolder = new RubberbandPlaceHolder();
		rubber.mimic(this.parent as UIComponent);
	}
}

class RubberbandPlaceHolder extends UIComponent
{
	private var mimicedWin:UIComponent;
	
	public function RubberbandPlaceHolder() { super(); }
	
	public function mimic(win:UIComponent):void
	{
		this.mimicedWin = win;
		this.x = win.x;
		this.y = win.y;
		this.height = win.height;
		this.width = win.width;
		PopUpManager.addPopUp(this, win.parent,true);
		systemManager.addEventListener(MouseEvent.MOUSE_MOVE,handleMouseMove);
		systemManager.addEventListener(MouseEvent.MOUSE_UP,handleMouseUp);
	}
	
	private function handleMouseMove(event:MouseEvent):void
	{
		event.stopPropagation();
		this.width = Math.min(Math.max(event.stageX - this.x, 150, mimicedWin.minWidth), mimicedWin.maxWidth, mimicedWin.parent.width - this.x - 5);
		this.height = Math.min(Math.max(event.stageY - this.y, 300, mimicedWin.minHeight), mimicedWin.maxHeight, mimicedWin.parent.height - this.y - 5);
	}
	
	private function handleMouseUp(event:MouseEvent):void
	{
		event.stopPropagation();
		mimicedWin.width = this.width;
		mimicedWin.height = this.height;
		
		systemManager.removeEventListener(MouseEvent.MOUSE_MOVE, handleMouseMove);
		systemManager.removeEventListener(MouseEvent.MOUSE_UP, handleMouseUp);
		PopUpManager.removePopUp(this);
		
		this.mimicedWin = null;
	}
	
	override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
	{
		var g:Graphics = graphics;
		g.clear();
		g.lineStyle(1);
		g.beginFill(0xCCCCCC,.8);
		g.drawRect(0,0,unscaledWidth, unscaledHeight);
		g.endFill();
	}
}
</pre></p>
<p>* Some clean up required.</p>
<br />Posted in Flex Tagged: Canvas, Draggable, Flex, MXML, Resizable, TitleWindows, Widgets, wrapper <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tylermac.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tylermac.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tylermac.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tylermac.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tylermac.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tylermac.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tylermac.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tylermac.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tylermac.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tylermac.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tylermac.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tylermac.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tylermac.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tylermac.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tylermac.wordpress.com&amp;blog=335004&amp;post=42&amp;subd=tylermac&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tylermac.wordpress.com/2009/09/25/widgets-in-flex-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a5c4fb93aaac189286c63c23c4b505b?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">tylermac</media:title>
		</media:content>
	</item>
		<item>
		<title>How I&#8217;m using Smarty Templates with Haxe/PHP project in FlashDevelop</title>
		<link>http://tylermac.wordpress.com/2009/09/06/haxe-php-smarty-flashdevelop/</link>
		<comments>http://tylermac.wordpress.com/2009/09/06/haxe-php-smarty-flashdevelop/#comments</comments>
		<pubDate>Sun, 06 Sep 2009 18:10:19 +0000</pubDate>
		<dc:creator>Tyler</dc:creator>
				<category><![CDATA[Haxe]]></category>
		<category><![CDATA[flashdevelop]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[smarty]]></category>

		<guid isPermaLink="false">http://tylermac.wordpress.com/?p=33</guid>
		<description><![CDATA[So I have been playing with Haxe for a little while now. I&#8217;ve decided I&#8217;m ready to build a hobby project using this new language. It will be a PHP browser game with Flash elements to utilize AMF remoting. Skip to Implementation The first thing I did (after the unit testing framework failed to work [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tylermac.wordpress.com&amp;blog=335004&amp;post=33&amp;subd=tylermac&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So I have been playing with <a href="http://haxe.org">Haxe</a> for a little while now. I&#8217;ve decided I&#8217;m ready to build a hobby project using this new language. It will be a <a href="http://php.net">PHP</a> browser game with Flash elements to utilize AMF remoting.</p>
<blockquote><p><a href="#Implementation">Skip to Implementation</a></p></blockquote>
<p>The first thing I did (after the unit testing framework failed to work with PHP) was to decide I didn&#8217;t want to hardcode my HTML in code. Having worked on many PHP projects in the past, I have become a fan of using <a href="http://www.smarty.net/" title="Smarty: Template Engine">Smarty</a> to abstract my views.</p>
<p>So in order to learn how to include Smarty in my project, I begin by looking up <a href="http://haxe.org/doc/js/extern_libraries">examples for using external libraries</a>. It shows how to use the <code>extern</code> keyword on classes to make references that the Haxe Compiler can&#8217;t interpret.</p>
<p>Using this, I was able to create a Smarty.hx file that implemented all the functionality I needed.</p>
<p><pre class="brush: cpp;">
//empty package because they are not natively supported by the PHP target
package ;

//Using NativeArray, since that is what Smarty is expecting
import php.NativeArray;

extern class Smarty 
{
    public var template_dir:String;
    public var compile_dir:String;
    public var config_dir:String;
    public var plugins_dir :NativeArray;
    public var debugging:Bool;
    public var error_reporting :Int;
    public var compile_check:Bool;
    public var force_compile :Bool;

    public function assign(tpl_var:Dynamic, ?value:Dynamic):Void;
    public function append(tpl_var:Dynamic, ?value:Dynamic, ?merge:Bool):Void;
    public function clear_assign(tpl_var:String):Void;
    public function clear_all_assign():Void;

    public function register_block(block:String, block_impl:String, ?cacheable:Bool, ?cache_attrs:Dynamic):Void;
    public function unregister_block(block:String):Void;

    public function display(resource_name:String, ?cache_id:String, ?compile_id:String):Void;
    //Returns Boolean or String containing parsed template
    public function fetch(resource_name:String, ?cache_id:String, ?compile_id:String, ?display:Bool):Dynamic;
}
</pre></p>
<p>Using this class will trigger a runtime error of not being able to locate the class file. Makes sense since we haven&#8217;t installed it yet. So next was to figure out how to how to include this file.</p>
<p>The first option was just to require the Smarty file using &#8220;<code>untyped __call__('require_once', smarty_location);</code>&#8221; in the main file. Although this may be alright for this scenario, I wasn&#8217;t happy with it because I do not require this library when I will start with remoting.</p>
<p><strong>EDIT: </strong> It&#8217;s also possible to include this code in a <code>static __inline__</code> function in the external class, which eliminates this issue.</p>
<p>So I began digging into what the compiled PHP looked like. One of the first relevant bits I came across, in lib/php/Boot.class.php, was <code>_hx_register_type</code> that would allow the path to be declared for the class file. This could have worked, by implementing a mapping between external libraries and their types.</p>
<p>However, I started then noticing the structure of the generated PHP&#8217;s for the base package. They are simply in the form of (class name).class.php. So I simply copied the contents of Smarty&#8217;s libs directory into the generated lib directory of my project, and confirmed it worked.</p>
<p>This worked because:</p>
<ol>
<li>My <code>extern class</code> was in the base package. (to avoid the compiler&#8217;s work around for packages in PHP)</li>
<li>The Smarty class file was called Smarty.class.php, which is the format expected by Haxe&#8217;s auto_load function.</li>
</ol>
<p>Now that I&#8217;ve confirmed this is working, I then went ahead to create it as part of my build.</p>
<h3>Implementation</h3>
<p>So first I created a Haxe/PHP project in FlashDevelop. I deleted the generated Bin folder and pointed the output to a subfolder oh my htdocs, changing the custom run command at the same time.</p>
<p>Next I created a lib directory in the root of my project directory and copied the Smarty libs there.</p>
<p>I then created all the default folders for Smarty under the root of my project.</p>
<ul>
<li>templates</li>
<li>templates_c</li>
<li>configs</li>
<li>cache</li>
</ul>
<p>I created a simple html page and saved it as index.tpl under the the templates folder.</p>
<p>I created my main class to test the template.</p>
<p><pre class="brush: cpp;">
static function main()
{
    var template = new Smarty();
    template.display('index.tpl');
}
</pre></p>
<p>Next I have to make sure these files get copied to during the build. Since I&#8217;m using Vista, I decided to make use of RoboCopy for this step. I created a batch file called doCopy.bat and placed in the the project&#8217;s root directory, and set it as the the pre build command.</p>
<p><pre class="brush: bash;">
@echo off
REM USE: in prebuild use 
REM $(ProjectDir)\doCopy.bat &quot;$(ProjectDir)&quot; &quot;$(OutputDir)\$(OutputName)&quot;

REM copy the full directory to the output directory, removing generated and deleted files
robocopy %1 %2 /MIR /XD *src /XF *.hxproj *.bat

REM robocopy return and exit code between 0 and 8 for success
REM FlashDevelop will only continue for exit code 0
EXIT /B 0
</pre></p>
<p>Testing, I ran into the follow error</p>
<blockquote><p>uncaught exception: <b>unlink(templates_c\%%3F^3F5^3F5AD92D%%MainTemplate.tpl.php) [<a href='function.unlink'>function.unlink</a>]: No such file or directory (errno: 2) in C:\dev\httpdocs\FirstSite\lib\internals\core.write_file.php at line #46unlink(templates_c\%%3F^3F5^3F5AD92D%%MainTemplate.tpl.php) [<a href='function.unlink'>function.unlink</a>]: No such file or directory</b></p>
<p>Called from net.tylermac.PHPIndex::runApp<br />Called from net.tylermac.PHPIndex::main</p></blockquote>
<p>Line 44 (not 46) of lib/internals/core.write_file.php contains <code>@unlink($params['filename']);</code>. Of course, the @ in PHP is suppose to suppress errors, however, it doesn&#8217;t if there is a error handler set. Haxe sets one up for us, so this line throws an error if the filename does not exists. (It doesn&#8217;t on first run). So to correct it, I simply modified as follows</p>
<p><pre class="brush: php;">
if (file_exists($params['filename']))
{
	@unlink($params['filename']);
}
</pre></p>
<p>This causes a small performance hit rather then trying to silently ignore the error, but I find it acceptable.</p>
<p>Running the code again, and suddenly I have the html displaying for me.</p>
<br />Posted in Haxe Tagged: flashdevelop, Haxe, php, smarty <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tylermac.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tylermac.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tylermac.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tylermac.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tylermac.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tylermac.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tylermac.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tylermac.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tylermac.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tylermac.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tylermac.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tylermac.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tylermac.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tylermac.wordpress.com/33/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tylermac.wordpress.com&amp;blog=335004&amp;post=33&amp;subd=tylermac&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tylermac.wordpress.com/2009/09/06/haxe-php-smarty-flashdevelop/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a5c4fb93aaac189286c63c23c4b505b?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">tylermac</media:title>
		</media:content>
	</item>
		<item>
		<title>What is in a brand?</title>
		<link>http://tylermac.wordpress.com/2008/05/20/what-is-in-a-brand/</link>
		<comments>http://tylermac.wordpress.com/2008/05/20/what-is-in-a-brand/#comments</comments>
		<pubDate>Tue, 20 May 2008 17:59:15 +0000</pubDate>
		<dc:creator>Tyler</dc:creator>
				<category><![CDATA[Site News]]></category>
		<category><![CDATA[branding]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://tylermac.wordpress.com/?p=28</guid>
		<description><![CDATA[So I&#8217;ve been thinking about branding a new site for myself. I&#8217;ve been working with George Matthews on creating a logo for the new design. This is the current design. Nice, clean, functional design. I&#8217;ll extract the symbol to use as a favicon on the site as well. I&#8217;ll be putting the site together through [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tylermac.wordpress.com&amp;blog=335004&amp;post=28&amp;subd=tylermac&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://tylermac.files.wordpress.com/2008/05/tylermac.jpg"><img src="http://tylermac.files.wordpress.com/2008/05/tylermac.jpg?w=128&#038;h=85" alt="Current Draft" width="128" height="85" style="float:left;" class="size-thumbnail wp-image-29" /></a>So I&#8217;ve been thinking about branding a new site for myself. I&#8217;ve been working with <a href="http://www.elitegd.com" title="EliteGD - New Brunswick Web Design">George Matthews</a> on creating a logo for the new design.</p>
<p>This is the current design. Nice, clean, functional design. I&#8217;ll extract the symbol to use as a favicon on the site as well.</p>
<p>I&#8217;ll be putting the site together through out the next month. I&#8217;ll post here when it is complete.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/tylermac.wordpress.com/28/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/tylermac.wordpress.com/28/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tylermac.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tylermac.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tylermac.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tylermac.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tylermac.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tylermac.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tylermac.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tylermac.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tylermac.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tylermac.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tylermac.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tylermac.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tylermac.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tylermac.wordpress.com/28/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tylermac.wordpress.com&amp;blog=335004&amp;post=28&amp;subd=tylermac&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tylermac.wordpress.com/2008/05/20/what-is-in-a-brand/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a5c4fb93aaac189286c63c23c4b505b?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">tylermac</media:title>
		</media:content>

		<media:content url="http://tylermac.files.wordpress.com/2008/05/tylermac.jpg?w=128" medium="image">
			<media:title type="html">Current Draft</media:title>
		</media:content>
	</item>
		<item>
		<title>Geak Speak?</title>
		<link>http://tylermac.wordpress.com/2008/05/19/geak-speak/</link>
		<comments>http://tylermac.wordpress.com/2008/05/19/geak-speak/#comments</comments>
		<pubDate>Mon, 19 May 2008 23:55:26 +0000</pubDate>
		<dc:creator>Tyler</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[practice]]></category>
		<category><![CDATA[skill]]></category>
		<category><![CDATA[training]]></category>

		<guid isPermaLink="false">http://tylermac.wordpress.com/?p=27</guid>
		<description><![CDATA[Here’s a question: Are good programmers a product of an inherit ability, or is the ability more cognitive? Is programming an art, like music or writing where some can become decent, but only a few can become great; or is it more like a language, where those who are exposed to it before they finalize [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tylermac.wordpress.com&amp;blog=335004&amp;post=27&amp;subd=tylermac&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here’s a question:</p>
<p>Are good programmers a product of an inherit ability, or is the ability more cognitive? Is programming an art, like music or writing where some can become decent, but only a few can become great; or is it more like a language, where those who are exposed to it before they finalize their thinking model can just get it?</p>
<p>Of course, some would say that anyone can become a great developer? Is this true, or is it just people trying to make ourselves feel good?</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/tylermac.wordpress.com/27/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/tylermac.wordpress.com/27/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tylermac.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tylermac.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tylermac.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tylermac.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tylermac.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tylermac.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tylermac.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tylermac.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tylermac.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tylermac.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tylermac.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tylermac.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tylermac.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tylermac.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tylermac.wordpress.com&amp;blog=335004&amp;post=27&amp;subd=tylermac&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tylermac.wordpress.com/2008/05/19/geak-speak/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a5c4fb93aaac189286c63c23c4b505b?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">tylermac</media:title>
		</media:content>
	</item>
		<item>
		<title>Eventful F#</title>
		<link>http://tylermac.wordpress.com/2008/02/23/eventful-fsharp/</link>
		<comments>http://tylermac.wordpress.com/2008/02/23/eventful-fsharp/#comments</comments>
		<pubDate>Sat, 23 Feb 2008 16:30:32 +0000</pubDate>
		<dc:creator>Tyler</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[Event-Driven Programming]]></category>
		<category><![CDATA[F#]]></category>

		<guid isPermaLink="false">http://tylermac.wordpress.com/2008/02/23/eventful-f/</guid>
		<description><![CDATA[Working with events in F# is super easy. No more delegates, just events as values. Now with this under my belt, it leads to way to highly reactive programming. Here is a simple example with two closures sharing a single state, throwing an event whenever the state changes. The state can now be listened to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tylermac.wordpress.com&amp;blog=335004&amp;post=24&amp;subd=tylermac&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Working with events in F# is super easy. No more delegates, just events as values. Now with this under my belt, it leads to way to highly reactive programming.</p>
<pre><pre class="brush: csharp;">
let add, remove, event =
 let doChange, changeEvent = IEvent.create() in
 let value = ref 0 in (
  (fun x -&gt;
	value := !value + x;
	doChange(x, !value);
	!value;
  ),
  (fun y -&gt;
	value := !value - y;
	doChange((y * (-1)), !value);
	!value;
   ), changeEvent);;

event.Add(fun (x,y) -&gt; printfn &quot;changed by %d to make %d&quot; x y);;
</pre></pre>
<p>Here is a simple example with two closures sharing a single state, throwing an event whenever the state changes. The state can now be listened to anywhere without affected the original code. Makes maintenance easier to manage.</p>
<p>The real benefit here will be when used in conjunction with asynchronous functions, for parallel execution.</p>
<p>For more reference, check out <a href="http://blogs.msdn.com/dsyme/articles/FSharpCompositionalEvents.aspx" title="Don Syme's on F# and Other Reseach Projects : Simplicity and Compositionality in Asynchronous Programming through First Class Events (Article Version)">Don Syme&#8217;s Article on Events</a>.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/tylermac.wordpress.com/24/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/tylermac.wordpress.com/24/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tylermac.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tylermac.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tylermac.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tylermac.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tylermac.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tylermac.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tylermac.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tylermac.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tylermac.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tylermac.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tylermac.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tylermac.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tylermac.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tylermac.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tylermac.wordpress.com&amp;blog=335004&amp;post=24&amp;subd=tylermac&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tylermac.wordpress.com/2008/02/23/eventful-fsharp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a5c4fb93aaac189286c63c23c4b505b?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">tylermac</media:title>
		</media:content>
	</item>
	</channel>
</rss>
