<?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>dingobytes &#187; Development</title>
	<atom:link href="http://www.dingobytes.com/category/development/feed" rel="self" type="application/rss+xml" />
	<link>http://www.dingobytes.com</link>
	<description>what your nephew can't make you</description>
	<lastBuildDate>Fri, 11 Jun 2010 03:26:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Replacing text in multiple files</title>
		<link>http://www.dingobytes.com/tutorial/replacing-text-in-multiple-files</link>
		<comments>http://www.dingobytes.com/tutorial/replacing-text-in-multiple-files#comments</comments>
		<pubDate>Wed, 12 May 2010 16:02:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[multiple files]]></category>
		<category><![CDATA[replace]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://www.dingobytes.com/?p=120</guid>
		<description><![CDATA[Unfortunately during testing I have had some typo's and the generated report stored in the directory structure did not display as intended. The changes needed really didn't warrant processing the script again and adding more useless entries into the database, so I decided to change the script and then update the html in the report.]]></description>
			<content:encoded><![CDATA[<p>Recently I took a new job and it involves a lot of report generating. This has been a great fit for me and I have enjoyed the short time here in St Paul, MN.</p>
<p>The process for the current project is to pull a *.csv file from an email account, parse it into a database query/queries, generate html code and then store the html in a directory structure while also storing the report information in the database.</p>
<p><span id="more-120"></span></p>
<p>Unfortunately during testing I have had some typo&#8217;s and the generated report stored in the directory structure did not display as intended. The changes needed really didn&#8217;t warrant processing the script again and adding more useless entries into the database, so I decided to change the script and then update the html in the report.</p>
<p>Having over 100 reports generated, I needed a simple script to do this. I had done this with bash before, but I thought there had to be an easier way then looping through a for statement, saving the changes to a new file and then moving the new file to replace the old.</p>
<p>In comes Perl. Looking through some posts, I found that you can edit text in the file with Perl. The command goes something like this:</p>
<p><code>perl -pi -w -e 's/search/replace/g;' *.html</code></p>
<p>Here is a further explanation of what is going on. </p>
<p><code>-p assume loop (like -n) but print line also, like sed<br />
-i edit <> files in place (makes backup if extension supplied)<br />
-w enable many useful warnings (RECOMMENDED)<br />
-e execute the follwing line of code</code></p>
<p>The code referred to after the -e is just a search and replace regular expression. </p>
<p>The &#8216;s/&#8217; means to search and start your regular expression to search for. </p>
<p>You then enter your expression that you want to search for. You need to make sure you escape out special characters with the back-slash [\]. The forward slash is used to separate what you are searching for and what you want to replace. The replace section is an expression as well and you need to treat special characters the same way.</p>
<p>Finally you have the last forward slash indicates the end of your replace expression and the &#8216;g&#8217; indicates global.</p>
<p>Here is an example of how I would change the directory used for images from &#8216;/image/&#8217; to &#8216;images/&#8217; for all the files in a directory with the extension of .html.</p>
<p><code>perl -pi -w -e 's/\/image\//images\//g;' *.html</code></p>
<p>That is how you do it. If you have to go through multiple directories, you could use a bash or perl command to loop through those directories. Hope it didn&#8217;t confuse you too much.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dingobytes.com/tutorial/replacing-text-in-multiple-files/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Developing applications with KISS</title>
		<link>http://www.dingobytes.com/development/developing-applications-with-kiss</link>
		<comments>http://www.dingobytes.com/development/developing-applications-with-kiss#comments</comments>
		<pubDate>Tue, 11 Aug 2009 01:53:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[applications]]></category>
		<category><![CDATA[KISS]]></category>

		<guid isPermaLink="false">http://www.dingobytes.com/?p=68</guid>
		<description><![CDATA[When it comes to developing new applications for the web, it doesn&#8217;t take long for plans to spiral out of control. The development track usually starts off simple, but somewhere between initial planning and final release there is this thing we here like to call &#8220;Feature Creep&#8221;. What might start off as a simple idea [...]]]></description>
			<content:encoded><![CDATA[<p>When it comes to developing new applications for the web, it doesn&#8217;t take long for plans to spiral out of control. The development track usually starts off simple, but somewhere between initial planning and final release there is this thing we here like to call &#8220;Feature Creep&#8221;.</p>
<div class="wp-caption alignleft" style="width: 372px"><a href="http://stuffthathappens.com/blog/"><img title="Our Application" src="http://www.talkingtext.com/wordpress_en/wp-content/uploads/2008/04/googleproduct.jpg" alt="our application vs. good application" width="362" height="700" /></a><p class="wp-caption-text">our application vs. good application</p></div>
<p>What might start off as a simple idea is turned into a three headed monster as more people add their input. The longer it takes the application to be completed, the more features are added to it until the next thing you know, the application has forms, polls, feedback, email to a friend, embed, etc all added to this small 300 x 300 pixel box.<span id="more-68"></span>There are some steps that can make your product more user friendly and have a clean finished product. So just how do you make such a product? Well here are just a few ideas we have that might help you create a useful end product.</p>
<ol>
<li>Step one is one you have heard before, we are sure. When you create the product follow the KISS (Keep It Simple Stupid) philosophy during the planning stages. Keeping the product simple helps speed the development, keeps the product focused on its core purpose and gives a good base foundation for the future of the product.</li>
<li> Make the product scalable. When ever possible, try to think about how this product can be built to allow it to grow. Keep in mind server, database, and client side concerns that might affect the product when it becomes an world wide sensation. If you can design a product that is scalable, it has the chance to have a much longer product life as well.</li>
<li>Stick to the original plan. If the project was well thought out, it should be flexible and grow as the product grows. If during the development, there are new ideas, don&#8217;t change the development path to include those. If the ideas are important they can be included in future versions of the product.</li>
<li> Use technology wisely. AJAX is useful, but it doesn&#8217;t mean the entire site has to be created using JavaScript. Some web users may be using applications that do not have JavaScript and would be left out of the experience. The product should gracefully degrade when necessary. Use client side and server side validation.</li>
</ol>
<p>The end user has an important role with the products development. Let users know you want their constructive criticism of the product (and not just that it sucks). Have them be specific as to what they like and do not like about the product. It doesn&#8217;t mean every idea is a great idea, but listening can help you develop a better product.</p>
<p>So keeping your product simple, scalable and relevant can do more then just save you time, but also make your product more useful to the end user.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dingobytes.com/development/developing-applications-with-kiss/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
