<?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>WallOfScribbles &#187; development</title>
	<atom:link href="http://wallofscribbles.com/tag/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://wallofscribbles.com</link>
	<description>The ramblings of a man</description>
	<lastBuildDate>Sat, 07 Jan 2012 01:14:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Getting more with the MORE tag</title>
		<link>http://wallofscribbles.com/2008/getting-more-with-the-more-tag/</link>
		<comments>http://wallofscribbles.com/2008/getting-more-with-the-more-tag/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 13:05:26 +0000</pubDate>
		<dc:creator>Corey Dutson</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.wallofscribbles.com/?p=261</guid>
		<description><![CDATA[So who out there uses WordPress? I&#8217;ve been told it&#8217;s somewhat popular. I myself am a fan despite it&#8217;s assault on the CPU and database. It&#8217;s fast, it&#8217;s simple, and so long as your website isn&#8217;t gaining huge traffic (or you&#8217;re paying peanuts for CPU usage and storage) than it&#8217;s a great selection. It&#8217;s fairly [...]]]></description>
			<content:encoded><![CDATA[<p>So who out there uses WordPress? I&#8217;ve been told it&#8217;s <a title="Wordpress: Most popular CMS" href="http://publisherblog.automattic.com/2008/01/23/wordpress-most-popular-cms-in-technoratis-top-100/">somewhat popular</a>.</p>
<p>I myself am a fan despite it&#8217;s <a title="Coding Horror: Behold WordPress, destroyer of CPUs" href="http://www.codinghorror.com/blog/archives/001105.html">assault on the CPU and database</a>. It&#8217;s fast, it&#8217;s simple, and so long as your website isn&#8217;t gaining huge traffic (or you&#8217;re paying peanuts for CPU usage and storage) than it&#8217;s a great selection. It&#8217;s fairly customizable, <a title="Wordress: Extend" href="http://wordpress.org/extend/">has a huge support and user base</a>, and it&#8217;s just damned easy to use. I&#8217;ve been slowly getting more and more into customizing and extending what WordPress can do out of the box.There&#8217;s more in the code than people think.</p>
<p>Recently I <a title="Bartek Gniado" href="http://bart.whahay.net">a friend of mine</a> ripped a strip off of me for only using summaries in my RSS feed. He told me that he, along with other net-savvy users, didn&#8217;t have time to get teased by RSS summaries.</p>
<p><strong>UPDATE: As of December 3rd, 2008 I&#8217;ve turned this baby into a plugin! <a title="Corey Dutson: PostDivider" href="/wordpress-plugins/postdivider/">Check it out.</a></strong></p>
<p><span id="more-261"></span></p>
<p><em>For those wishing to skip the lengthy buildup, here is a little table of contents:</em></p>
<ul>
<li><a title="The Back story" href="#solution_history">The Back Story</a></li>
<li><a title="Solution" href="#solution">Solution</a></li>
<li><a title="Explanation" href="#solution_explanation">Explanation</a></li>
<li><a title="Installation and Usage" href="#solution_installation">Installation and Usage</a></li>
<li><a title="Further Notes" href="#solution_notes">Further Notes</a></li>
</ul>
<h3 id="solution_history">The Back Story &#8211; To Summarize or not to Summarize</h3>
<p>This is some what of a conundrum, as I want people to actually come to my site. On the flip side, I want people to read what I write. So I can force people to come to my site and gain page views, or I can increase my RSS readership. After careful consideration, I&#8217;ve opted to fix my RSS feed to display the entire content.</p>
<p>Here&#8217;s the issue: Until now, I&#8217;ve used &#8216;The Excerpt&#8217; field in WordPress. Basically this allows me to have a pretty excerpt instead of 55 characters truncated with a &#8220;READ MORE PLEAZE!&#8221; I use the custom excerpt for the top part of the post; the preview if you will. The problem with this is that I had to rip out the first couple paragraphs from the post area, add some HTML to make sure it worked, and then post. The result looked pretty, but had some unexpected side-effects on the RSS.</p>
<p>As it turns out, when you decide to use the EXCERPT field, that excerpt will become the summary in the RSS. That&#8217;s all well and good, but what If you want to have the whole post? One would hope that it would stitch the Excerpt and the Post together, but alas this was not the case.</p>
<p>I turned to the &lt;!&#8211;more&#8211;&gt; tag to assist me.</p>
<p>What they don&#8217;t document about the more tag is pretty much all the bitchy parts of it. When you use the &lt;!&#8211;more&#8211;&gt; tag, you split the content, allowing for the excerpt to be defaulted to all the content preceding the tag. This is great, except for how my layout works. You see The top have is the Excerpt, and the bottom half is the rest of the post. Just using the_content wouldn&#8217;t work, because I would be repeating all the pre-more content.</p>
<p></p>
<p>I thought about maybe using an hr tag, or reworking my entire layout, but I dismissed those due to the complexity of the markup. My only option was to carve into WordPress itself. I first checked Google to see if anyone had come up against what I was facing. As it turns out <a title="Wordpress: Support" href="http://wordpress.org/support/topic/184581">people have asked the question</a>, but no one has posted the answer.</p>
<p>I am fixing that right now.</p>
<h3 id="solution">Getting the Pre and Post &lt;!&#8211;more&#8211;&gt; content separately</h3>
<p>Here is my solution, in full:</p>
<blockquote><p>function the_formatted_pre_more_from_content ($body)<br />
{<br />
$returnVal = get_the_formatted_pre_more_from_content ($body);<br />
if ($returnVal !== FALSE)<br />
echo get_the_formatted_pre_more_from_content ($body);<br />
else<br />
the_excerpt();<br />
}</p>
<p>function get_the_formatted_pre_more_from_content ($body)<br />
{<br />
$moreTag = &#8216;&lt;!&#8211;more&#8217;;<br />
$content = FALSE;</p>
<p>$morePos = stripos($body, $moreTag);<br />
if ($morePos !== FALSE || $morePos &gt; -1)<br />
$content = substr($body, 0, $morePos);<br />
else<br />
return FALSE;</p>
<p>$content = apply_filters(&#8216;the_content&#8217;, $content);<br />
$content = str_replace(&#8216;]]&gt;&#8217;, &#8216;]]&gt;&#8217;, $content);</p>
<p>return $content;<br />
}</p>
<p>function the_formatted_post_more_from_content ($body)<br />
{<br />
echo get_the_formatted_post_more_from_content ($body);<br />
}</p>
<p>function get_the_formatted_post_more_from_content ($body)<br />
{<br />
$moreTag = &#8216;&lt;!&#8211;more&#8217;;<br />
$content = FALSE;</p>
<p>$morePos = stripos($body, $moreTag);</p>
<p>if ($morePos !== FALSE || $morePos &gt; -1)<br />
{<br />
$content = substr($body, $morePos + strlen($moreTag));<br />
$morePos = stripos($content, &#8216;&#8211;&gt;&#8217;); // reuse variable<br />
if ($morePos !== FALSE || $morePos &gt; -1)<br />
$content = substr($content, $morePos + 3); // strip off rest of more tag<br />
}<br />
else<br />
$content = $body;</p>
<p>$content = apply_filters(&#8216;the_content&#8217;, $content);<br />
$content = str_replace(&#8216;]]&gt;&#8217;, &#8216;]]&amp;gt;&#8217;, $content);</p>
<p>return $content;<br />
}</p></blockquote>
<h3 id="solution_explanation">Explanation</h3>
<p>The two important functions here are &#8216;get_the_formatted_pre_more_from_content&#8217; and &#8216;get_the_formatted_post_more_from_content&#8217;. Long names, I know, but at least their mission is clear.</p>
<p></p>
<p>The other two functions &#8216;the_formatted_pre_more_from_content&#8217; and &#8216;the_formatted_post_more_from_content&#8217; pretty much add a bit of logic and echo the content automatically. I chose this naming structure and function structure to emulate what is already in WordPress (e.g. &#8216;the_content&#8217; versus &#8216;get_the_content&#8217;).</p>
<h3 id="solution_installation">Installation and Usage</h3>
<p>To use this code, add it all to your functions.php file of your theme. I&#8217;m sure I, or some other enterprising person, could turn this into a plugin, but at the moment I don&#8217;t feel it&#8217;s warranted.</p>
<p>All of the functions take one parameter:<strong> $body</strong>.</p>
<p>When you call these functions you must be in The Loop.</p>
<p><em><strong>example usage</strong>: &lt;?php the_formatted_pre_more_from_content($post-&gt;post_content); ?&gt;</em></p>
<p><em><strong>explanation</strong>: This call will display the content preceding the &lt;!&#8211;more&#8211;&gt; tag.</em></p>
<p><em><strong>example usage</strong>: &lt;?php the_formatted_post_more_from_content($post-&gt;post_content); ?&gt;</em></p>
<p><em><strong>explanation</strong>: This call will display the content proceeding the &lt;!&#8211;more&#8211;&gt; tag.</em></p>
<h3 id="solution_notes">Further Notes</h3>
<p><strong>UPDATE: As of December 3rd, 2008 I&#8217;ve turned this baby into a plugin! <a title="Corey Dutson: PostDivider" href="/wordpress-plugins/postdivider/">Check it out.</a> I&#8217;ve also fixed the post_content bug!<br />
</strong></p>
<p>Note the <strong>$post-&gt;post_content</strong> that is passed into the function. This exists automatically when you are in The Loop. This will pass all of the posts content to the function without any formatting. The only thing that isn&#8217;t straight text &#8211; conveniently &#8211; is the &lt;!&#8211;more&#8211;&gt; tag. As a result the content becomes fairly straight forward.</p>
<p>As of right now you must pass $post-&gt;post_content to the functions. I tried to do it without passing the value, and they don&#8217;t seem to pick up the value.</p>
<p>I opted for using a substring functionality as opposed to an array split function simply because it was 2 am when I finally got this going. I don&#8217;t know which is more efficient, so someone who is more knowledgeable in PHP can comment on this and state which is better.</p>
<p>I only search for &#8216;&lt;!&#8211;more&#8217; because according to the tag documentation, there is text that can follow the MORE that changes some functionality. As a result, I have an additional if statement in the get_post function that will detect for the end of the tag and substring the content again to trim that out.</p>
<p>I hope that this helps out some people who may be in a similar boat as I was.</p>
]]></content:encoded>
			<wfw:commentRss>http://wallofscribbles.com/2008/getting-more-with-the-more-tag/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My First Project: A Reflection</title>
		<link>http://wallofscribbles.com/2008/my-first-project-a-reflection/</link>
		<comments>http://wallofscribbles.com/2008/my-first-project-a-reflection/#comments</comments>
		<pubDate>Thu, 08 May 2008 04:02:49 +0000</pubDate>
		<dc:creator>Corey Dutson</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Self-Improvement]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[lessons]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[project management]]></category>
		<category><![CDATA[teaching]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://www.wallofscribbles.com/?p=143</guid>
		<description><![CDATA[So I'm nearing the end of my first major project. Well alright I've had many projects in my life, but this was my first professional project. I was ... many things in my project: Lead Developer, Lead Architect, Psudo-Business Analyst, Negotiator, Trainer, Mediator, Whip-cracker. The list goes on.

As the project is finally winding down, I feel it prudent that I write down some of the nuggets of information that I have gleaned from the experience.

Follow along and learn with me as I half-rant life tips.]]></description>
			<content:encoded><![CDATA[
<a href="http://wallofscribbles.com/gallery/Misc. Images/whiteboard.jpg" title="" class="thickbox" rel="singlepic560" >
	<img class="ngg-singlepic" src="http://wallofscribbles.com/gallery/cache/560__400x250_whiteboard.jpg" alt="whiteboard.jpg" title="whiteboard.jpg" />
</a>

<h3>Know your time lines and stick to them</h3>
<p>This is pretty straightforward people. <em>Know when you need to deliver</em> things by (milestones, project builds, documents, etc) and make sure they&#8217;re delivered by that date/time. When things start slipping from the timeline, then it just compounds as one section runs into another. Believe me when I say that there is only so much overlap you can orchestrate before something breaks. Think Jenga.</p>
<p>On that same note, make sure that your time requirements are accurate. I cannot stress that enough. If you think something should only take you an hour, give yourself 2. If you end up ahead of schedule, great! You&#8217;ve just created buffer time for when something goes wrong. I&#8217;m not advocating giving yourself a week to do a day-long job, but be <strong>realistic </strong>with your time lines, not <strong>optimistic</strong>.</p>
<h3>Don&#8217;t bother getting mad, you&#8217;ll only give yourself a hernia</h3>
<p>I learned this about half way through the project, which is depressing because had I learned sooner I wouldn&#8217;t be as sick as I have been. Stressing out and getting upset by every mishap isn&#8217;t worth the energy expended to do so. The phrase &#8220;No use crying over spilled milk&#8221; has never wrung so true as it has for me during this time.</p>
<p>I realized that getting upset doesn&#8217;t do anyone any good, and only serves to fray already shot nerves. Realize that thing&#8217;s aren&#8217;t going according to plan, and plot out a logical course of action. I&#8217;m not saying that you shouldn&#8217;t care that your project is 1 hour before a presentation to 100 important people and not working. Far from, actually. What I&#8217;m saying is that muttering your last rights in the corner as you rock back and forth in a fetal position isn&#8217;t going to do anyone any good.</p>
<h3>Don&#8217;t play the blame game, but don&#8217;t let things slide either</h3>
<p>This was a big one for me. Throughout the entire project, my mantra has been (and probably will always be for projects): &#8220;I don&#8217;t care why it was broken, so long as it&#8217;s fixed now.&#8221; What This means is that I don&#8217;t care who&#8217;s fault it may or may not be. I care that the project is continuing to move toward its goal now that the problem has been overcome.</p>
<p>If someone&#8217;s not pulling their weight, <em>fix it</em>. If someone made a mistake, <em>tell them</em>. People are responsible for their action or lack there of. That doesn&#8217;t mean you should go pinning the blame on people when something goes haywire. Explain the problem like an adult, and approach it like an adult. Saying &#8220;You didn&#8217;t do X so fix it now&#8221; isn&#8217;t going to get you the warm reception you&#8217;re expecting. People get defensive when you attack them head on, and this is how arguments over stupid topics start.</p>
<h3>Think before you open your damned mouth</h3>
<p>This one was/is hard for me. I have a habit of shooting my mouth off when I shouldn&#8217;t and I know it. This translates directly into how I work with others, and I have to make a conscious effort to think about what I&#8217;m saying and how I&#8217;m saying it. I&#8217;ve noted a couple times during this project that I&#8217;ve sounded like a complete dick. I don&#8217;t mean to, but because I worded things badly it makes me look like a jerkhole.</p>
<p>Before you click the send button, open your mouth, or pick up the pen, think. <em>Figure out what you want to say and how you want to say it.</em> Try and make sure you&#8217;re not being out-right offensive (unless that&#8217;s your goal) and be concise. Taking the extra five seconds can make the resulting exchange that much easier.</p>
<p></p>
<h3>Write it down</h3>
<p>There were so many times when steps in installation, documentation, development, and God knows where else were overlooked, ignored, or outright forgotten. If you happen to have the goldfish memory that I do, you will benefit from this. Writing things down at least gives you a paper-trail to work with. If you find yourself taking a lot of notes, give them a time stamp. Use different colours of pens and/r highlighters to signify different sections or notation types.</p>
<p>I&#8217;ve found that by the time I&#8217;ve taken to write down what I want to remember, it&#8217;s already locked in my head. The simple act of writing it down seems to solidify the memory so that the note I just took is now no longer required, as my brain has done its job.</p>
<p>Writing things down has the added bonus of allowing others to know what you know. If you&#8217;re not going to be around for a while, at least others have your notes to work from. Sure they could be utterly insane to anyone that isn&#8217;t you, but at least it&#8217;s something.</p>
<p>P.S. The same goes for commenting code.</p>
<h3>Pay attention</h3>
<p>Try and keep tabs on where everyone is in their time lines. If you need something from someone, make sure that when you need it, they haven&#8217;t swanned off to a meeting or vacation. There&#8217;s nothing worse then being ahead of the game, only to be brought back down or even pulled behind on your deliverables because Adam McMoron has decided to try and get Finance Girls number.</p>
<p>If you&#8217;re in charge of people, make sure that they aren&#8217;t playing minesweeper or Facebooking their best friend thrice-removed. I know it sounds stupid, but <em>if you give people a week to do something, they&#8217;ll find a way to make it last a week</em>. I&#8217;m not saying you need to have armed guards holding their families hostage to make sure they&#8217;re working efficiently, but make sure you know what&#8217;s going on. Schedule end-of-day meetings, or set up mandatory emails stating what they&#8217;ve been doing. If you want to get really stingy, find a time-logging program that you and your underlings can use.</p>
<h3>Despite popular belief, assuming only makes an ass of you</h3>
<p><em>It&#8217;s not their fault when you assumed something</em>. Assumptions are guesses based on half-information and the ethers. <em>If you have to assume something, there hasn&#8217;t been enough communication</em>. If you find yourself saying things like &#8220;He&#8217;s supposed to be doing it&#8221; or &#8220;It should be here monday&#8221; you are assuming. Words like &#8216;should&#8217; and &#8216;supposed&#8217; are bad news.</p>
<p>You can avoid assuming by simply confirming what you think. If you think the package will be here on Monday, call the postal service. If you think that someone is supposed to be doing a job, ask them. The bottom line here is that assuming will end up biting you in the ass. Sometimes you assume right, but I assure you that most of the time you will assume very wrong.</p>
<h3>Learn from your mistakes, lest you repeat them</h3>
<p>During this project, there was a night that I was at work for <strong>40 </strong>hours. Why? simply put: <em>the shit got fucked up</em>. I cannot and will not go into the details as to what happened or why, but suffice it to say that bad time-management, assumptions and flat out bad luck found most of the team working well into the next day. It sucked but we managed.</p>
<p>One month later,<em> it happened again</em>.</p>
<p>What the hell happened? Different problems, but many of the same root causes. Assumptions were made, time was mis-managed, and we weren&#8217;t paying attention where we should have. As a result the work that was scheduled for 9 AM didn&#8217;t begin until 9 PM. There&#8217;s no excuse for this, and I won&#8217;t make one. I know where the flaws are now, and I&#8217;ll be Goddamned if I&#8217;m going to let it happen again.</p>
<p>That&#8217;s all for now. I&#8217;m sure when the project is totally finished, I&#8217;ll do a postmortem and regale you with even more fun tidbits that you can use (or ignore, though that would be silly.)</p>
<h4>Photo credit: <a title="Stock.xchng - Jonathan Natiuk" href="http://www.sxc.hu/profile/jnatiuk" target="_blank">Stock.xchng &#8211; Jonathan  Natiuk</a></h4>
]]></content:encoded>
			<wfw:commentRss>http://wallofscribbles.com/2008/my-first-project-a-reflection/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

