<?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"
	>

<channel>
	<title>Paris Holley</title>
	<atom:link href="http://parisholley.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://parisholley.com</link>
	<description>Software Engineer, Hip Hop Artist, Internet Entrepreneur</description>
	<pubDate>Mon, 13 Oct 2008 14:38:28 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>JUnit: OutOfMemoryError using &#8220;junitreport&#8221; Ant task</title>
		<link>http://parisholley.com/?p=82</link>
		<comments>http://parisholley.com/?p=82#comments</comments>
		<pubDate>Mon, 13 Oct 2008 14:37:24 +0000</pubDate>
		<dc:creator>Paris Holley</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[ant]]></category>

		<category><![CDATA[java]]></category>

		<category><![CDATA[junit]]></category>

		<category><![CDATA[memory]]></category>

		<category><![CDATA[test]]></category>

		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://parisholley.com/?p=82</guid>
		<description><![CDATA[If you (like I), have googled all around trying to figure out this problem to no avail then perhaps my solution will work best for you. Everywhere I read said to simply increase the max memory size in your forked JUnit task however, even if that had worked it (which it didn&#8217;t) would seem more [...]]]></description>
			<content:encoded><![CDATA[<p>If you (like I), have googled all around trying to figure out this problem to no avail then perhaps my solution will work best for you. Everywhere I read said to simply increase the max memory size in your forked JUnit task however, even if that had worked it (which it didn&#8217;t) would seem more of a hack and a promotion of bad programming. If your mobile application kept having memory leaks would you simply add more memory to the device?</p>
<p>Finally I came to the conclusion that the tests weren&#8217;t the problem; it was the XML files that tests were producing. They were simply just too large for the junitreport task to handle. In my application, I was using JUnit to run many tests that for the most part relied on the database. This caused Hibernate to output tons of information to the system out which is then logged in the JUnit report XML. So, as you have already guessed, we have to prevent output from entering the XML or disable logging for hibernate.</p>
<p><strong>Solution:</strong></p>
<blockquote><p>outputtoformatters=&#8221;false&#8221;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://parisholley.com/?feed=rss2&amp;p=82</wfw:commentRss>
		</item>
		<item>
		<title>Mozilla Ubiquity: First Impressions</title>
		<link>http://parisholley.com/?p=71</link>
		<comments>http://parisholley.com/?p=71#comments</comments>
		<pubDate>Thu, 28 Aug 2008 00:15:28 +0000</pubDate>
		<dc:creator>Paris Holley</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[mozilla]]></category>

		<category><![CDATA[ubiquity]]></category>

		<guid isPermaLink="false">http://parisholley.com/?p=71</guid>
		<description><![CDATA[When Mozilla Labs announced it&#8217;s first public release of Ubiquity, I like most people, was quite intrigued. The first feature they displayed that caught my eye, was the ability to not only book a flight, but look at its routes and email the schedule to other people at the same time.

Looking at that image at [...]]]></description>
			<content:encoded><![CDATA[<p>When Mozilla Labs announced it&#8217;s first public release of Ubiquity, I like most people, was quite intrigued. The first feature they displayed that caught my eye, was the ability to not only book a flight, but look at its routes and email the schedule to other people at the same time.<br />
<img class="alignnone" title="The Future" src="http://www.azarask.in/gfx/future_ubiquity.png" alt="" width="577" height="259" /></p>
<p>Looking at that image at first glance, I am just wowed, because I am thinking that Mozilla has been hiding this massive project behind the scenes and the web is finally ready to revolutionize. That is, till I realize that it is just what they <em>HOPE</em> the application to have the capability to do in the future. Of course, given the technology that it is built-on (the browser and JavaScript), I am certain it would be possible given some airline company provides the API to do so, though who knows how long that will be.</p>
<p>Going beyond this unimportant image, I was a bit disappointed that this is tied to the browser and not an independent application. I suppose from Mozilla&#8217;s perspective, they already have cross-platform technology to build on (FireFox), so it wouldn&#8217;t make sense to create a new application for each operating system. However, from a consumers perspective (in my opinion), it has no business in a web browser. I say that, not because I am anti-browser (I love FireFox), but I feel this type of user interactivity is best suited for what some would call the Web 3.0 movement. A movement in which data follows very strict standards and semantics, is openly available, and can be retrieved beyond that scope of a web browser. </p>
<p>Expanding on that, I feel as if the future of the &#8220;web browser&#8221; isn&#8217;t far from being extinct (far being around 20 years). I guess I am starting to go on my usual tangent, however I picture the web being able to <em>DO</em> what the user wants; not <em>FIND</em> what the user wants. A concept that is embraced by Ubiquity but the way it is executed is not how I envision. We are decades off from being able to have conversations with our computer but giving it the ability to translate what we tell it in our language and execute those actions is certainly a good start. My only problem with how Ubiquity implements it, is that it relies on the browser. FireFox, as amazing a tool or platform it may be, invests on the principle that the browser is the way users will access information on the internet. I&#8217;m sure years from now, this application will just be a small stepping stone to the larger picture, however I would have much rather like to have it built upon the operating system (I&#8217;m just in love with Mac OS X&#8217;s spotlight feature).</p>
<p>Maybe I&#8217;m just a &#8220;hater&#8221; or it is just to early to judge the success of Ubiquity, who knows. But overall I am just not too impressed because it isn&#8217;t as innovative as I thought it would be when I first came across it. Yes, it is pretty cool that it is easily expandable with just a few lines of JavaScript, but I think that is also it&#8217;s &#8220;ball and chain&#8221;. I certainly won&#8217;t turn down using it with FireFox and might even write a couple commands of my own, but I would have at least like it a little more integrated into the browser than just a popup on the screen.</p>
<p>What do you think?</p>
]]></content:encoded>
			<wfw:commentRss>http://parisholley.com/?feed=rss2&amp;p=71</wfw:commentRss>
		</item>
		<item>
		<title>PHP 5.3: Introduction of Namespaces</title>
		<link>http://parisholley.com/?p=67</link>
		<comments>http://parisholley.com/?p=67#comments</comments>
		<pubDate>Mon, 25 Aug 2008 01:15:49 +0000</pubDate>
		<dc:creator>Paris Holley</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[namespaces]]></category>

		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://parisholley.com/?p=67</guid>
		<description><![CDATA[I think PHP programmers across the world are now rejoicing over the recent addition of namespaces into the PHP 5.3 alpha build. Though it isn&#8217;t likely we will see a stable release till the middle of September or October, this new feature will give programmers more flexibility in developing programs as well as improve existing [...]]]></description>
			<content:encoded><![CDATA[<p>I think PHP programmers across the world are now rejoicing over the recent addition of namespaces into the PHP 5.3 alpha build. Though it isn&#8217;t likely we will see a stable release till the middle of September or October, this new feature will give programmers more flexibility in developing programs as well as improve existing frameworks.</p>
<p><strong>Extend core PHP functionality</strong></p>
<p>Previous to the inclusion of namespaces, there was no ability to create custom functions that had the same name as existing functions in the core of the PHP distributions. The concept known as &#8220;Global space&#8221; will allow a developer to override core functionality which can prove to be very useful.</p>
<pre name="code" class="php">
namespace File;
 
function file_put_contents($file,$data) {
	if( strpos( $file,'ftp://') ){
		// do ftp operation
	}else{
		// will access the core PHP function
		$f = ::file_put_contents($file,data);
		return $f;
	}
}
</pre>
<p>In that example, I can extend the functionality of file_put_contents to also provide FTP uploading if the path string contains the text &#8220;ftp://&#8221;. When used within the same namespace, just calling file_put_contents will give you the updated functionality. However, when used in a different namespace, you will have to access it a bit different.</p>
<pre name="code" class="php">
use File;

File::file_put_contents('ftp://localhost/dofile.txt','my content');
</pre>
<p>Since my transition from PHP to Java, I have started to like the way packages work and would like to see the ability to &#8220;use&#8221; namespaces and not have to reference the namespace when calling a function from a different namespace.</p>
<p>Overall, this release has brought a lot of needed features (all of which you can probably read up on elsewhere or just hit up the PHP docs) and I am glad to see PHP is moving in the right direction. Looking back, I had a tendency to want PHP to include features found in other languages however I think doing so would alter the direction that PHP has tried to take and perhaps its implementation is the best move to make for both backwards compatibility and expandability while keeping its rapid-development goal.</p>
]]></content:encoded>
			<wfw:commentRss>http://parisholley.com/?feed=rss2&amp;p=67</wfw:commentRss>
		</item>
		<item>
		<title>BarCamp: Des Moines Technology Gathering</title>
		<link>http://parisholley.com/?p=59</link>
		<comments>http://parisholley.com/?p=59#comments</comments>
		<pubDate>Sun, 24 Aug 2008 17:18:49 +0000</pubDate>
		<dc:creator>Paris Holley</dc:creator>
		
		<category><![CDATA[Databases]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[barcamp]]></category>

		<guid isPermaLink="false">http://parisholley.com/?p=59</guid>
		<description><![CDATA[What is BarCamp? BarCamp is an ad-hoc gathering born from the desire for people to share and learn in an open environment. It is an intense event with discussions, demos and interaction from participants.]]></description>
			<content:encoded><![CDATA[<p>I had a great time at this year&#8217;s BarCamp and look forward to attending one next year as well. We discussed many different topics and I have taken some interest in things we discussed. I&#8217;ve heard a lot about Twitter lately, and the group session we had on microblogging convinced me to give it a try.</p>
<p>At first, I thought it was kind of stupid that people would just post what they are doing all day on the internet, but after everyone gave their reasoning for using it, it all started to make a bit of sense. The most compelling reason I heard was that people used it to keep track of things their friends do so they can have a topic for discussion the next time they meet. Besides the social networking aspect of it, it helps save those moments of complete silence when you meet up with people.</p>
<p>Another topic that sparked some interest was a self-organization method known as GTD (Getting Things Done). I&#8217;ve find myself over the years having constant memory problems, especially when it comes to remembering tasks to do for projects. Though the idea of keep track of tasks isn&#8217;t a new or revolutionary concept, the process this method encourages seems to be better then ones I have tried in the past.</p>
<p>All in all, I met some great people at the event and look forward to picking their brains over tweeter. TWEET TWEET!</p>
<p><strong>Look what I won:</strong></p>
<p><a href="http://parisholley.com/wp-content/uploads/2008/08/george.gif"><img class="alignnone size-full wp-image-64" title="george" src="http://parisholley.com/wp-content/uploads/2008/08/george.gif" alt="" width="250" height="250" /></a><a href="http://parisholley.com/wp-content/uploads/2008/08/meandgeorge.gif"><img class="alignnone size-full wp-image-65" title="meandgeorge" src="http://parisholley.com/wp-content/uploads/2008/08/meandgeorge.gif" alt="" width="250" height="250" /></a></p>
<p><strong>Topics we discussed:</strong></p>
<ul>
<li>GTD (Getting Things Done)</li>
<li>SeaSide Framework</li>
<li>Podcasting</li>
<li>Advanced Javascript</li>
<li>Microblogging</li>
<li>Amazon Web Services</li>
<li>Agile</li>
<li>Language Architecture</li>
<li>Network Monitoring</li>
<li>REST API</li>
<li>YUI (Yahoo User Interface Library)</li>
<li>Entrepreneurship &amp; Consulting</li>
<li>Ruby</li>
<li>Fitnesse Testing</li>
<li>Content Management</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://parisholley.com/?feed=rss2&amp;p=59</wfw:commentRss>
		</item>
		<item>
		<title>JSF: Stream File for Download</title>
		<link>http://parisholley.com/?p=43</link>
		<comments>http://parisholley.com/?p=43#comments</comments>
		<pubDate>Sat, 16 Aug 2008 14:56:15 +0000</pubDate>
		<dc:creator>Paris Holley</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[java]]></category>

		<category><![CDATA[javaserver faces]]></category>

		<category><![CDATA[jsf]]></category>

		<guid isPermaLink="false">http://parisholley.com/?p=43</guid>
		<description><![CDATA[Sometimes linking directly to a file will not be the ideal way of sending content to a user. You may want to pull files from a database or a remote location without revealing any secure information. There are many ways this can be done but this example uses a simple command link tag and a method that will require you to implement a way to retrieve the file.]]></description>
			<content:encoded><![CDATA[<pre name="code" class="html">
&lt;h:commandLink action="#{myBean.streamFile}"&gt;Download&lt;/h:commandLink&gt;
</pre>
<pre name="code" class="java">
public class MyBean {
	public String getStreamFile(){
		byte[] file = new byte[]{};

		FacesContext ctx = FacesContext.getCurrentInstance();

		HttpServletResponse response = (HttpServletResponse) ctx.getExternalContext().getResponse();
		response.setHeader("Content-disposition", "attachment; filename=file.ext");
		response.setContentType("text/plain");

		try {
			response.getOutputStream().write(file);
		} catch (IOException ex) {
			return "go_to_an_error_page";
		}

		ctx.responseComplete();

		return null;
	}
}
</pre>
<p>When the user selects the link, either the file will be streamed to user so they may download it, or they will be redirected to an error page. You could go one step further and implement a messaging system or use the one built-in with JSF and redirect the user back to the page they attempted to download the file from.</p>
]]></content:encoded>
			<wfw:commentRss>http://parisholley.com/?feed=rss2&amp;p=43</wfw:commentRss>
		</item>
		<item>
		<title>JavaMail 1.4.1: Use Gmail account as SMTP</title>
		<link>http://parisholley.com/?p=36</link>
		<comments>http://parisholley.com/?p=36#comments</comments>
		<pubDate>Wed, 06 Aug 2008 17:00:26 +0000</pubDate>
		<dc:creator>Paris Holley</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[gmail]]></category>

		<category><![CDATA[java]]></category>

		<category><![CDATA[javamail]]></category>

		<category><![CDATA[smtp]]></category>

		<guid isPermaLink="false">http://parisholley.com/?p=36</guid>
		<description><![CDATA[All examples I found of using JavaMail with a Gmail did not seem to work, so with a little tweaking, I came up with a solution that I believe should work (at least with JavaMail 1.4.1).]]></description>
			<content:encoded><![CDATA[<p><strong>Without Attachment</strong></p>
<pre name="code" class="java">
	// Setup connection
	Properties props = new Properties();
	props.put("mail.smtps.auth", true);
	//props.put("mail.debug", true); // uncomment to display in console/log

	Session session = Session.getInstance(props);
	//session.setDebug(true); // uncomment to display in console/log

	// Setup message
	Message msg = new MimeMessage(session);
	msg.setFrom(new InternetAddress("your@email.com"));
	msg.setRecipients(Message.RecipientType.TO, new InternetAddress[] { new InternetAddress("their@email.com") });
	msg.setSubject("My Subject");
	msg.setSentDate(new Date());
	msg.setText("my message");

	// Connect and mail
	Transport transport = session.getTransport("smtps");
	transport.connect("smtp.gmail.com", "username", "abc123abc");
	transport.sendMessage(msg, msg.getAllRecipients());
	transport.close();
</pre>
<p><strong>With Attachment</strong></p>
<pre name="code" class="java">
	// Setup connection
	Properties props = new Properties();
	props.put("mail.smtps.auth", true);
	//props.put("mail.debug", true); // uncomment to display in console/log

	Session session = Session.getInstance(props);
	//session.setDebug(true); // uncomment to display in console/log
	// Setup message

	Message msg = new MimeMessage(session);
	msg.setFrom(new InternetAddress("your@email.com"));
	msg.setRecipients(Message.RecipientType.TO, new InternetAddress[] { new InternetAddress("their@email.com") });
	msg.setSubject("My Subject");
	msg.setSentDate(new Date());

	// Begin attachment
	MimeBodyPart attachment = new MimeBodyPart();

	// Add file to attachment (replace with an existing byte array)
	attachment.setDataHandler(new DataHandler(new ByteArrayDataSource(new byte[]{},
			"text/html")));
	attachment.setFileName("test.html");

	// Create normal email message
	MimeBodyPart text = new MimeBodyPart();
	text.setText("my message");

	// Add attachment and message to email
	Multipart mp = new MimeMultipart();
	mp.addBodyPart(text);
	mp.addBodyPart(attachment);
	msg.setContent(mp);

	// Connect and mail
	Transport transport = session.getTransport("smtps");
	transport.connect("smtp.gmail.com", "username", "abc123abc");
	transport.sendMessage(msg, msg.getAllRecipients());
	transport.close();
</pre>
]]></content:encoded>
			<wfw:commentRss>http://parisholley.com/?feed=rss2&amp;p=36</wfw:commentRss>
		</item>
		<item>
		<title>Naming Conventions</title>
		<link>http://parisholley.com/?p=28</link>
		<comments>http://parisholley.com/?p=28#comments</comments>
		<pubDate>Sun, 27 Jul 2008 20:45:39 +0000</pubDate>
		<dc:creator>Paris Holley</dc:creator>
		
		<category><![CDATA[Databases]]></category>

		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://parisholley.com/?p=28</guid>
		<description><![CDATA[This is a subject that is discussed many times over yet there has never been a general consensus to which way is proper. Take a look at some of the everyday conventions I use in my projects.]]></description>
			<content:encoded><![CDATA[<p>Below I&#8217;ve just put a couple of my own conventions, let me know what you think.</p>
<p><span style="text-decoration: underline;">Databases:</span></p>
<ul>
<li><strong>Tables are lowercase and singular and separated by an underscore. </strong><br />
This prevents confusion both during coding and managing the database. A lot of languages and frameworks are case sensitive and lowercase is the easiest method to remember.<br />
<code>"user" instead of "Users", "users", "User"<br />
"user_role" instead of "userRole", "userRoles"</code></li>
<li><strong>Fields are lowercase, singular, and separated by an underscore.</strong><br />
Fields are easier to read when their words are separated by a character. One reason for not using spaces are because they add more syntax to a typical query (ie: SELECT`first name` vs SELECT first_name ).<br />
<code>"user_id" instead of "userId","user-id","userID","UserID","UserId"</code></li>
<li><strong>Association tables begin with parent and end with child<br />
</strong>There may be instances where an association does not involve a parent and a child, so you must use your best judgment.<br />
<code>"vehicle_car" instead of "car_vehicle"</code></li>
<li><strong>Do not use numbers</strong><br />
You should never have to use numbers in the field name. Perhaps &#8220;address1&#8243; and &#8220;address2&#8243; are acceptable exceptions (because they are used in real world, however adding &#8220;address3&#8243;,&#8221;address4&#8243; are unneeded and probably mean you need to store addresses in a separate table).</li>
<li><strong>Primary key should end with &#8220;_id&#8221;</strong><br />
Most of the time, you will begin with the table name and end with id. Makes joining tables together simpler because you will always know what the primary key is.</li>
</ul>
<p><span style="text-decoration: underline;">Programming</span>:</p>
<ul>
<li><strong>Variables are camel case with meaning or with comments<br />
</strong>Example: If using &#8220;roll&#8221; in a loop, either keep the loop small or commented to explain what the rolling value will contain or use something more verbose such as &#8220;numberEntriesAdded&#8221;.</p>
<ul>
<li>Acronyms are lowercase (&#8221;getXmlDocument&#8221; instead of &#8220;getXMLDocument&#8221;).</li>
</ul>
<ul>
<li>If you find yourself having to place numbers in variable names, your code is either redundant or hard to read.</li>
<li>Private class variables should be prefixed with a &#8220;_&#8221; ( &#8220;_privateVar&#8221; instead of &#8220;privateVar&#8221;).</li>
</ul>
</li>
<li><strong>Classes are uppercase without separation</strong><br />
<code>"MyNewClass" instead of "mynewclass","my_new_class"</code></p>
<ul>
<li><strong>Constants are uppercase with separating underscores.</strong><br />
<code>"MY_CLASS_CONSTANT" instead of "my_class_constant","MYCLASSCONSTANT"</code></li>
</ul>
</li>
<li><strong>Methods are camel cased without separation<br />
</strong><code>"executeMyMethod" instead of "execute_my_method","ExecuteMyMethod"</code></p>
<ul>
<li><strong>Name contains at least an action, object, and value/field</strong><br />
<code><em>action</em>: get,set,increase,decrease,add,subtract&#8230;<br />
<em>object: </em>car,row,page,template&#8230;<br />
<em>value/field(if applicable):</em>width,pixels,id,name</code></li>
</ul>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://parisholley.com/?feed=rss2&amp;p=28</wfw:commentRss>
		</item>
		<item>
		<title>Convert HTML to PHP - Only $19.95!</title>
		<link>http://parisholley.com/?p=24</link>
		<comments>http://parisholley.com/?p=24#comments</comments>
		<pubDate>Sun, 27 Jul 2008 19:32:36 +0000</pubDate>
		<dc:creator>Paris Holley</dc:creator>
		
		<category><![CDATA[Funny]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[html]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[scam]]></category>

		<guid isPermaLink="false">http://parisholley.com/?p=24</guid>
		<description><![CDATA[Never in history has anyone developed a program as revolutionary as this!]]></description>
			<content:encoded><![CDATA[<p>Apparently someone behind <a href="http://www.websitedatabases.com/html-to-php.html" target="_blank">Website Databases</a> has come up with a revolutionary method of turning a HTML (HyperText Markup Language) file into a PHP (HyperText Preprocessor) file. After taking a few seconds to come up with my own inovative ideas, I came across a couple methods that they have possibly implemented.</p>
<ol>
<li>Rename the file from foo.html to foo.php</li>
<li>Place the contents of foo.html into one huge string and print/echo it.</li>
</ol>
<p>I cannot believe I didn&#8217;t think of this myself.</p>
]]></content:encoded>
			<wfw:commentRss>http://parisholley.com/?feed=rss2&amp;p=24</wfw:commentRss>
		</item>
		<item>
		<title>Error: MySQL Server Has Gone Away</title>
		<link>http://parisholley.com/?p=15</link>
		<comments>http://parisholley.com/?p=15#comments</comments>
		<pubDate>Mon, 21 Jul 2008 19:48:32 +0000</pubDate>
		<dc:creator>Paris Holley</dc:creator>
		
		<category><![CDATA[Databases]]></category>

		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://parisholley.com/?p=15</guid>
		<description><![CDATA[This error can occur often when trying to execute large queries or import large amounts of blob data in a SQL dump. Assuming you have access to the my.ini in your MySQL directory, you need to either add the following line underneath your "[mysqld]" section or increase the size to a greater amount...]]></description>
			<content:encoded><![CDATA[<blockquote><p>max_allowed_packet=10M</p></blockquote>
<p>The maximum value you may specify is 1GB however setting it to a high amount (ie: 250mb), will not cause any performance issues because MySQL will only use that much if necessary.</p>
<p><em><strong>NOTE:</strong></em> Make sure you have enough memory on your system to handle the increase in packet size or else you could potentially use swap space thus decreasing the performance of the query.</p>
]]></content:encoded>
			<wfw:commentRss>http://parisholley.com/?feed=rss2&amp;p=15</wfw:commentRss>
		</item>
	</channel>
</rss>
