<?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>Softexpert Moldova - A Blog for IT Professionals</title>
	<atom:link href="http://softexpert.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://softexpert.wordpress.com</link>
	<description>for IT Professionals</description>
	<lastBuildDate>Mon, 11 Jul 2011 08:07:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='softexpert.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Softexpert Moldova - A Blog for IT Professionals</title>
		<link>http://softexpert.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://softexpert.wordpress.com/osd.xml" title="Softexpert Moldova - A Blog for IT Professionals" />
	<atom:link rel='hub' href='http://softexpert.wordpress.com/?pushpress=hub'/>
		<item>
		<title>14 golden rules for site optimization</title>
		<link>http://softexpert.wordpress.com/2007/10/25/14-golden-rules-for-site-optimization/</link>
		<comments>http://softexpert.wordpress.com/2007/10/25/14-golden-rules-for-site-optimization/#comments</comments>
		<pubDate>Thu, 25 Oct 2007 17:56:46 +0000</pubDate>
		<dc:creator>softexpert</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Project management]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://softexpert.wordpress.com/2007/10/25/14-golden-rules-for-site-optimization/</guid>
		<description><![CDATA[1: Minimize HTTP Requests 80% of the end-user response time is spent on the front-end. Most of this time is tied up in downloading all the components in the page: images, stylesheets, scripts, Flash, etc. Reducing the number of components in turn reduces the number of HTTP requests required to render the page. This is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=softexpert.wordpress.com&amp;blog=1901056&amp;post=23&amp;subd=softexpert&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:center;"><img src="http://softexpert.files.wordpress.com/2007/10/gold.jpg?w=780" alt="golden rules" /></p>
<p class="MsoNormal"><strong>1: Minimize HTTP Requests</strong></p>
<p class="MsoNormal">80% of the end-user response time is spent on the front-end. Most of this time is tied up in downloading all the components in the page: images, stylesheets, scripts, Flash, etc. Reducing the number of components in turn reduces the number of HTTP requests required to render the page. This is the key to faster pages.</p>
<p class="MsoNormal"><strong>2: Use a Content Delivery Network</strong></p>
<p class="MsoNormal">The user&#8217;s proximity to your web server has an impact on response times. Deploying your content across multiple, geographically dispersed servers will make your pages load faster from the user&#8217;s perspective.</p>
<p class="MsoNormal"><strong>3: Add an Expires Header</strong></p>
<p class="MsoNormal">Web page designs are getting richer and richer, which means more scripts, stylesheets, images, and Flash in the page. A first-time visitor to your page may have to make several HTTP requests, but by using the Expires header you make those components cacheable. This avoids unnecessary HTTP requests on subsequent page views. Expires headers are most often used with images, but they should be used on all components including scripts, stylesheets, and Flash components.</p>
<p class="MsoNormal"><strong>4: Gzip Components</strong></p>
<p class="MsoNormal">The time it takes to transfer an HTTP request and response across the network can be significantly reduced by decisions made by front-end engineers. It&#8217;s true that the end-user&#8217;s bandwidth speed, Internet service provider, proximity to peering exchange points, etc. are beyond the control of the development team. But there are other variables that affect response times. Compression reduces response times by reducing the size of the HTTP response.</p>
<p class="MsoNormal"><strong>5: Put Stylesheets at the Top</strong></p>
<p class="MsoNormal">Front-end engineers that care about performance want a page to load progressively; that is, we want the browser to display whatever content it has as soon as possible. This is especially important for pages with a lot of content and for users on slower Internet connections. The importance of giving users visual feedback, such as progress indicators, has been well researched and documented. In our case the HTML page is the progress indicator! When the browser loads the page progressively the header, the navigation bar, the logo at the top, etc. all serve as visual feedback for the user who is waiting for the page. This improves the overall user experience.</p>
<p class="MsoNormal"><strong>6: Put Scripts at the Bottom</strong></p>
<p class="MsoNormal">Rule 5 described how stylesheets near the bottom of the page prohibit progressive rendering, and how moving them to the document HEAD eliminates the problem. Scripts (external JavaScript files) pose a similar problem, but the solution is just the opposite: it&#8217;s better to move scripts from the top to as low in the page as possible. One reason is to enable progressive rendering, but another is to achieve greater download parallelization.</p>
<p class="MsoNormal"><strong>7: Avoid CSS Expressions</strong></p>
<p class="MsoNormal">The problem with expressions is that they are evaluated more frequently than most people expect. Not only are they evaluated when the page is rendered and resized, but also when the page is scrolled and even when the user moves the mouse over the page. Adding a counter to the CSS expression allows us to keep track of when and how often a CSS expression is evaluated. Moving the mouse around the page can easily generate more than 10,000 evaluations.</p>
<p class="MsoNormal"><strong>8: Make JavaScript and CSS External</strong></p>
<p class="MsoNormal">Using external files in the real world generally produces faster pages because the JavaScript and CSS files are cached by the browser. JavaScript and CSS that are inlined in HTML documents get downloaded every time the HTML document is requested. This reduces the number of HTTP requests that are needed, but increases the size of the HTML document. On the other hand, if the JavaScript and CSS are in external files cached by the browser, the size of the HTML document is reduced without increasing the number of HTTP requests.</p>
<p class="MsoNormal"><strong>9: Reduce DNS Lookups</strong></p>
<p class="MsoNormal">The Domain Name System (DNS) maps hostnames to IP addresses, just as phonebooks map people&#8217;s names to their phone numbers. When you type www.yahoo.com into your browser, a DNS resolver contacted by the browser returns that server&#8217;s IP address. DNS has a cost. It typically takes 20-120 milliseconds for DNS to lookup the IP address for a given hostname. The browser can&#8217;t download anything from this hostname until the DNS lookup is completed.</p>
<p class="MsoNormal"><strong>10: Minify JavaScript</strong></p>
<p class="MsoNormal">Minification is the practice of removing unnecessary characters from code to reduce its size thereby improving load times. When code is minified all comments are removed, as well as unneeded white space characters (space, newline, and tab). In the case of JavaScript, this improves response time performance because the size of the downloaded file is reduced.</p>
<p class="MsoNormal"><strong>11: Avoid Redirects</strong></p>
<p class="MsoNormal">Redirects are accomplished using the 301 and 302 status codes. Here&#8217;s an example of the HTTP headers in a 301 response:</p>
<p class="MsoNormal"><span>      </span>HTTP/1.1 301 Moved Permanently</p>
<p class="MsoNormal"><span>      </span>Location: http://example.com/newuri</p>
<p class="MsoNormal"><span>  </span><span>    </span>Content-Type: text/html</p>
<p class="MsoNormal">The browser automatically takes the user to the URL specified in the Location field. All the information necessary for a redirect is in the headers. The body of the response is typically empty. Despite their names, neither a 301 nor a 302 response is cached in practice unless additional headers, such as Expires or Cache-Control, indicate it should be. The meta refresh tag and JavaScript are other ways to direct users to a different URL, but if you must do a redirect, the preferred technique is to use the standard 3xx HTTP status codes, primarily to ensure the back button works correctly.</p>
<p class="MsoNormal"><strong>12: Remove Duplicate Scripts</strong></p>
<p class="MsoNormal">It hurts performance to include the same JavaScript file twice in one page. This isn&#8217;t as unusual as you might think. A review of the ten top U.S. web sites shows that two of them contain a duplicated script. Two main factors increase the odds of a script being duplicated in a single web page: team size and number of scripts. When it does happen, duplicate scripts hurt performance by creating unnecessary HTTP requests and wasted JavaScript execution.</p>
<p class="MsoNormal"><strong>13: Configure ETags</strong></p>
<p class="MsoNormal">The problem with ETags is that they typically are constructed using attributes that make them unique to a specific server hosting a site. ETags won&#8217;t match when a browser gets the original component from one server and later tries to validate that component on a different server, a situation that is all too common on Web sites that use a cluster of servers to handle requests. By default, both Apache and IIS embed data in the ETag that dramatically reduces the odds of the validity test succeeding on web sites with multiple servers.</p>
<p class="MsoNormal"><strong>14: Make Ajax Cacheable</strong></p>
<p class="MsoNormal">One of the cited benefits of Ajax is that it provides instantaneous feedback to the user because it requests information asynchronously from the backend web server. However, using Ajax is no guarantee that the user won&#8217;t be twiddling his thumbs waiting for those asynchronous JavaScript and XML responses to return. In many applications, whether or not the user is kept waiting depends on how Ajax is used. For example, in a web-based email client the user will be kept waiting for the results of an Ajax request to find all the email messages that match their search criteria. It&#8217;s important to remember that &#8220;asynchronous&#8221; does not imply &#8220;instantaneous&#8221;.</p>
<p class="MsoNormal"><span> More details about the 14 rules can be found here: </span><a href="http://developer.yahoo.com/performance/rules.html"><span>http://developer.yahoo.com/performance/rules.html</span></a><span></span></p>
<p class="MsoNormal"><span> It is also possible to try all these rules on practice at <a href="http://stevesouders.com/examples/rules.php">http://stevesouders.com/examples/rules.php</a></span></p>
<p><span> A great web based tool for site loading time analyze is available at <a href="http://tools.pingdom.com/fpt/">http://tools.pingdom.com/fpt/</a></span></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/softexpert.wordpress.com/23/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/softexpert.wordpress.com/23/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/softexpert.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/softexpert.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/softexpert.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/softexpert.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/softexpert.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/softexpert.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/softexpert.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/softexpert.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/softexpert.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/softexpert.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/softexpert.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/softexpert.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/softexpert.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/softexpert.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=softexpert.wordpress.com&amp;blog=1901056&amp;post=23&amp;subd=softexpert&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://softexpert.wordpress.com/2007/10/25/14-golden-rules-for-site-optimization/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/aafd80e8d7757f6337ac351960e31a50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">softexpert</media:title>
		</media:content>

		<media:content url="http://softexpert.files.wordpress.com/2007/10/gold.jpg" medium="image">
			<media:title type="html">golden rules</media:title>
		</media:content>
	</item>
		<item>
		<title>How to connect to a serial port in Linux using c++?</title>
		<link>http://softexpert.wordpress.com/2007/10/18/how-to-connect-to-a-serial-port-in-linux-using-c/</link>
		<comments>http://softexpert.wordpress.com/2007/10/18/how-to-connect-to-a-serial-port-in-linux-using-c/#comments</comments>
		<pubDate>Thu, 18 Oct 2007 15:22:20 +0000</pubDate>
		<dc:creator>Vladimir Iachimovici</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[serial port]]></category>

		<guid isPermaLink="false">http://softexpert.wordpress.com/2007/10/18/how-to-connect-to-a-serial-port-in-linux-using-c/</guid>
		<description><![CDATA[In Linux all devices have a file in /dev directory, so the communication with these devices is very simple, just need to open necessary file, and make read and write operations upon them. In this article is shown how to connect to serial port in Linux, using c++. First of all we include all needed [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=softexpert.wordpress.com&amp;blog=1901056&amp;post=21&amp;subd=softexpert&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="line-height:normal;">In Linux all devices have a file in <em>/dev</em> directory, so the communication with these devices is very simple, just need to open necessary file, and make read and write operations upon them.</p>
<p class="MsoNormal" style="line-height:normal;">In this article is shown how to connect to serial port in Linux, using c++.</p>
<p class="MsoNormal" style="line-height:normal;">First of all we include all needed libraries, and declare all necessary variables:</p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#948a54;">#include &lt;stdio.h&gt;</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#948a54;">#include &lt;string.h&gt;</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#948a54;">#include &lt;fcntl.h&gt;</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#948a54;">#include &lt;errno.h&gt;</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#948a54;">#include &lt;termios.h&gt;</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#948a54;">#include &lt;unistd.h&gt;</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#948a54;"> </span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#948a54;">int fd1;</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#948a54;">int fd2;</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#948a54;">char *buff,*buffer,*bufptr;</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#948a54;">int wr,rd,nbytes,tries;</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#948a54;"> </span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#948a54;">int main()</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#948a54;">{</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#948a54;">return 0;</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#948a54;">}</span></strong></p>
<p class="MsoNormal" style="line-height:normal;">Next step, we connect to device through associated file and check the connection:</p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#948a54;">fd1=open(&#8220;/dev/ttyS0&#8243;, O_RDWR | O_NOCTTY | O_NDELAY);</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#948a54;"><span> </span>if (fd1 == -1 )</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#948a54;"><span> </span><span> </span>{</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#948a54;"><span>  </span>perror(&#8220;open_port: Unable to open /dev/ttyS0 &#8211; &#8220;);</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#948a54;"><span>  </span>}</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#948a54;"><span> </span>else </span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#948a54;"><span>  </span>{</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#948a54;"><span>   </span>fcntl(fd1, F_SETFL,0);</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#948a54;"><span>   </span>printf(&#8220;Port 1 has been sucessfully opened and %d is the file description\n&#8221;,fd1);</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#948a54;"><span>  </span>}</span></strong></p>
<p class="MsoNormal" style="line-height:normal;">Where, <em>“/dev/ttyS0”</em> is associated with <em>COM1</em> port.</p>
<p class="MsoNormal" style="line-height:normal;">With following code we send to device some bits:</p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#948a54;">wr=write(fd1,&#8221;ATZ\r&#8221;,4);</span></strong></p>
<p class="MsoNormal" style="line-height:normal;">And for reading response from device:</p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#948a54;">rd=read(fd1,buff,10);</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#948a54;">printf(&#8220;Bytes sent are %d \n&#8221;,rd);</span></strong></p>
<p class="MsoNormal" style="line-height:normal;">At the end, close the connection:</p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#948a54;">close(fd1);</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong>Enjoy!</strong></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/softexpert.wordpress.com/21/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/softexpert.wordpress.com/21/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/softexpert.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/softexpert.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/softexpert.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/softexpert.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/softexpert.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/softexpert.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/softexpert.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/softexpert.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/softexpert.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/softexpert.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/softexpert.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/softexpert.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/softexpert.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/softexpert.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=softexpert.wordpress.com&amp;blog=1901056&amp;post=21&amp;subd=softexpert&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://softexpert.wordpress.com/2007/10/18/how-to-connect-to-a-serial-port-in-linux-using-c/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e0dbef3b12b92aad2eaf31d337924c5a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">iachimovici</media:title>
		</media:content>
	</item>
		<item>
		<title>How to connect to a MySQL DB using c++ Linux?</title>
		<link>http://softexpert.wordpress.com/2007/10/18/how-to-connect-to-a-mysql-db-using-c-linux/</link>
		<comments>http://softexpert.wordpress.com/2007/10/18/how-to-connect-to-a-mysql-db-using-c-linux/#comments</comments>
		<pubDate>Thu, 18 Oct 2007 09:52:38 +0000</pubDate>
		<dc:creator>Vladimir Iachimovici</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://softexpert.wordpress.com/2007/10/18/how-to-connect-to-a-mysql-db-using-c-linux/</guid>
		<description><![CDATA[C++ is a very good programming language with high-level and low-level capabilities. Linux is a Unix-like computer operating system. It promotes community of free and open source software. Almost using those instruments it is possible to make a complex and sophisticate enterprise system. MySQL is a multithreaded, multi-user SQL database management system. It is a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=softexpert.wordpress.com&amp;blog=1901056&amp;post=20&amp;subd=softexpert&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="line-height:normal;"><strong>C++</strong> is a very good programming language with high-level and low-level capabilities.</p>
<p class="MsoNormal" style="line-height:normal;"><strong>Linux</strong> is a Unix-like computer operating system.<span>  </span>It promotes community of free and open source software. Almost using those instruments it is possible to make a complex and sophisticate enterprise system.</p>
<p class="MsoNormal" style="line-height:normal;"><strong>MySQL</strong> is a multithreaded, multi-user SQL database management system. It is a popular database system, which has more than 10 million installations.</p>
<p class="MsoNormal" style="line-height:normal;">In this article is shown how to connect to a MySQL database using C++ under a Linux operating system.</p>
<p class="MsoNormal" style="line-height:normal;">First of all we include all needed libraries:</p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;">#include &lt;sys/time.h&gt;</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;">#include &lt;stdio.h&gt;</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;">#include &lt;mysql.h&gt;</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><span style="color:black;"><span> </span>Now we declare main function:</span></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;">int main(char **args)</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;">{</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;">// code</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;">return 0;</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;">};</span></strong></p>
<p class="MsoNormal" style="line-height:normal;">Next, we declare all necessary variables:</p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;">MYSQL_RES *result;</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;">MYSQL_ROW row;</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;">MYSQL *connection, mysql;</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;">int state;</span></strong></p>
<p class="MsoNormal" style="line-height:normal;">Of course if we want to use MySQL database, we must connect to it, using the next code:</p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;">mysql_init(&amp;mysql);</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;">connection = mysql_real_connect(&amp;mysql,host,usr,pswd,database,0,0,0);</span></strong></p>
<p class="MsoNormal" style="line-height:normal;">Where</p>
<p class="MsoNormal" style="line-height:normal;"><strong><em><span style="font-size:10pt;font-family:'Courier New';color:#4a442a;">host</span></em></strong><span style="font-size:10pt;"> </span>– is a host name, the location of the <span> </span>MySQL database server, for example “localhost” or “remotehost.com”</p>
<p class="MsoNormal" style="line-height:normal;"><strong><em><span style="font-size:10pt;font-family:'Courier New';color:#4a442a;">usr</span></em></strong><span style="font-size:10pt;"> </span>– is the username</p>
<p class="MsoNormal" style="line-height:normal;"><strong><em><span style="font-size:10pt;font-family:'Courier New';color:#4a442a;">pswd</span></em></strong><span style="font-size:10pt;"> </span>– is the password</p>
<p class="MsoNormal" style="line-height:normal;"><strong><em><span style="font-size:10pt;font-family:'Courier New';color:#4a442a;">database</span></em></strong><span style="font-size:10pt;"> </span>– is the name of the MySQL database from the Host.</p>
<p class="MsoNormal" style="line-height:normal;">If something goes wrong, for example password is not right, we must know it, and display the error message:</p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;">if (connection == NULL) </span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;">{ </span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;"><span>      </span>printf(mysql_error(&amp;mysql)); </span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;"><span>      </span>return 1; </span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;">}</span></strong></p>
<p class="MsoNormal" style="line-height:normal;">Now we make a simple query like <em>“SELECT * FROM mytable”</em> and check if it has no errors, where <em>“mytable”</em> is the name of wished table:</p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;">state = mysql_query(connection, &#8220;SELECT * FROM mytable&#8221;);</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;"><span> </span>if (state !=0)</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;">{</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;"><span>    </span>printf(mysql_error(connection));</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;"><span>    </span>return 1;</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;">}</span></strong></p>
<p class="MsoNormal" style="line-height:normal;">After the successful execution of the query, we must store the results somewhere:</p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;">result = mysql_store_result(connection);</span></strong></p>
<p class="MsoNormal" style="line-height:normal;">Using <em>mysql_num_rows</em> function, we can get number of rows from result:</p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;">printf(&#8220;Rows:%d\n&#8221;,mysql_num_rows(result));</span></strong></p>
<p class="MsoNormal" style="line-height:normal;">Using <em>while</em> statement and <em>mysql_fetch_row</em> functions, it possible to process each row in the result set:</p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;">while ( ( row=mysql_fetch_row(result)) != NULL )</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;">{</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;"><span> </span>printf(&#8221; %s,<span>  </span>%s\n&#8221;, (row[0] ? row[0] : &#8220;NULL&#8221;), (row[1] ? row[1] : &#8220;NULL&#8221; ));</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;">}</span></strong></p>
<p class="MsoNormal" style="line-height:normal;">At the end, we must free the memory:</p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;">mysql_free_result(result);</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:9pt;font-family:'Courier New';color:#4a442a;">mysql_close(connection);<span>    </span></span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="color:red;">IMPORTANT!!! </span>How to make this code under Linux?</strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span style="font-size:10pt;font-family:'Courier New';color:#4a442a;">g++ test.cpp -I/usr/include/mysql /usr/lib/mysql/libmysqlclient.so</span></strong></p>
<p class="MsoNormal" style="line-height:normal;"><strong>Enjoy!</strong></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/softexpert.wordpress.com/20/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/softexpert.wordpress.com/20/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/softexpert.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/softexpert.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/softexpert.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/softexpert.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/softexpert.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/softexpert.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/softexpert.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/softexpert.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/softexpert.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/softexpert.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/softexpert.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/softexpert.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/softexpert.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/softexpert.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=softexpert.wordpress.com&amp;blog=1901056&amp;post=20&amp;subd=softexpert&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://softexpert.wordpress.com/2007/10/18/how-to-connect-to-a-mysql-db-using-c-linux/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e0dbef3b12b92aad2eaf31d337924c5a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">iachimovici</media:title>
		</media:content>
	</item>
		<item>
		<title>Skin color detection</title>
		<link>http://softexpert.wordpress.com/2007/10/17/skin-color-detection/</link>
		<comments>http://softexpert.wordpress.com/2007/10/17/skin-color-detection/#comments</comments>
		<pubDate>Wed, 17 Oct 2007 15:14:54 +0000</pubDate>
		<dc:creator>softexpert</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[algorithm]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[detection]]></category>
		<category><![CDATA[rgb]]></category>
		<category><![CDATA[skin]]></category>

		<guid isPermaLink="false">http://softexpert.wordpress.com/2007/10/17/skin-color-detection/</guid>
		<description><![CDATA[Computer vision is one of many areas that wants to understand the process of human functionality and copy that process with intention to complete human life with intelligent machines. For better human – computer interaction it is necessary for the machine to see people. This can be achieved by employing face detection algorithms, which algorithm [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=softexpert.wordpress.com&amp;blog=1901056&amp;post=19&amp;subd=softexpert&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><span>Computer vision is one of many areas that wants to understand the process of human functionality and copy that process with intention to complete human life with intelligent machines. For better human – computer interaction it is necessary for the machine to see people. This can be achieved by employing face detection algorithms, which algorithm is based on skin color detection. One of the problems this and similar algorithms have to deal with is sensitivity to the illumination conditions under which the input image is captured. Hence illumination sensitivity influences face detection results. One of the aspects from which we can observe illumination influence is the choice of proper color space. Since come color space are designed to eliminate the influence of illumination when describing color of object, an idea of using such a color space for skin-color detection has been taken under consideration.</span></p>
<p class="MsoNormal"><span>The skin color for example for fair complexion is determined with the following rules, which describe the skin cluster in the RGB color space:</span></p>
<p class="MsoNormal"><span>R &gt; 95 <span> </span>AND <span> </span>G &gt; 40 <span> </span>AND <span> </span>B &gt; 20 <span> </span>AND </span></p>
<p class="MsoNormal"><span>max{R, G, B} – min{R, G, B} &gt;15 <span> </span>AND </span></p>
<p class="MsoNormal"><span>|R – G| &gt; 15 AND</span></p>
<p class="MsoNormal"><span><span> </span>R &gt; G <span> </span>AND <span> </span>R &gt; B</span></p>
<p class="MsoNormal"><strong><span style="font-size:12pt;line-height:115%;">OR</span></strong></p>
<p class="MsoNormal"><span>R &gt; 220 <span> </span>AND <span> </span>G &gt; 210 <span> </span>AND <span> </span>B &gt; 170 <span> </span>AND </span></p>
<p class="MsoNormal"><span>|R &#8211; G| &lt;= 15 AND </span></p>
<p><span>R &gt; B <span> </span>AND <span> </span>G &gt; B</span></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/softexpert.wordpress.com/19/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/softexpert.wordpress.com/19/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/softexpert.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/softexpert.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/softexpert.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/softexpert.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/softexpert.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/softexpert.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/softexpert.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/softexpert.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/softexpert.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/softexpert.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/softexpert.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/softexpert.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/softexpert.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/softexpert.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=softexpert.wordpress.com&amp;blog=1901056&amp;post=19&amp;subd=softexpert&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://softexpert.wordpress.com/2007/10/17/skin-color-detection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/aafd80e8d7757f6337ac351960e31a50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">softexpert</media:title>
		</media:content>
	</item>
		<item>
		<title>How to teach computers to understand red color?</title>
		<link>http://softexpert.wordpress.com/2007/10/17/how-to-teach-computers-to-understand-red-color/</link>
		<comments>http://softexpert.wordpress.com/2007/10/17/how-to-teach-computers-to-understand-red-color/#comments</comments>
		<pubDate>Wed, 17 Oct 2007 14:08:31 +0000</pubDate>
		<dc:creator>Vladimir Iachimovici</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[teach]]></category>
		<category><![CDATA[understand]]></category>

		<guid isPermaLink="false">http://softexpert.wordpress.com/2007/10/17/how-to-teach-computers-to-understand-red-color/</guid>
		<description><![CDATA[Why is it so important? Our world is not so perfect! There are a lot of people who are blind, or whose sight is impaired, and hence can not locate and read attention signs. So there are some technologies what are designed to resolve that problem, such as Global Position System (GPS) and Smith-Kettlewell’s Rehabilitation [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=softexpert.wordpress.com&amp;blog=1901056&amp;post=18&amp;subd=softexpert&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><strong><span>Why is it so important?</span></strong></p>
<p class="MsoNormal"><span><br />
Our world is not so perfect! There are a lot of people who are blind, or whose sight is impaired, and hence can not locate and read attention signs. So there are some technologies what are designed to resolve that problem, such as Global Position System (GPS) and Smith-Kettlewell’s </span><span>Rehabilitation</span><span> </span><span>Engineering</span><span> </span><span>Research</span><span> </span><span>Center</span><span>’s<span> </span>“Talking Signs” project. Functionality of those all solutions is to detect, locate and read general information signs, this involves segmenting signs from the background, estimating their pose, and reading them. These are all difficult problems particularly in cluttered street scenes where the illuminant color can vary greatly, where the pose and position are unknown, and where the signs can be partially obsured or in shadow.</span></p>
<p class="MsoNormal"><span></span><br />
<strong><span>Solution!</span></strong></p>
<p class="MsoNormal"><span>The color can be represented in different ways, but in this case will be used RGB (Red, Green, Blue) color model. Well the conditions of understanding if some color X is red, are such:</span></p>
<p align="center" style="text-align:center;" class="MsoNormal"><strong><span style="font-size:13pt;color:blue;font-family:'Courier New';">R(X)&gt;128 and G(X)&lt;0.8*R(X) and B(X)&lt;0.8*R(X)</span></strong></p>
<p class="MsoNormal"><span>Where <span style="color:#ff6600;">R(X) – red value</span> of X color, <span style="color:lime;">G(X) – green value</span> and <span style="color:blue;">B(X) – blue value</span></span></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/softexpert.wordpress.com/18/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/softexpert.wordpress.com/18/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/softexpert.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/softexpert.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/softexpert.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/softexpert.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/softexpert.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/softexpert.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/softexpert.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/softexpert.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/softexpert.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/softexpert.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/softexpert.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/softexpert.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/softexpert.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/softexpert.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=softexpert.wordpress.com&amp;blog=1901056&amp;post=18&amp;subd=softexpert&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://softexpert.wordpress.com/2007/10/17/how-to-teach-computers-to-understand-red-color/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e0dbef3b12b92aad2eaf31d337924c5a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">iachimovici</media:title>
		</media:content>
	</item>
		<item>
		<title>Optimizing Page Load Time in PHP</title>
		<link>http://softexpert.wordpress.com/2007/10/15/optimizing-page-load-time-in-php/</link>
		<comments>http://softexpert.wordpress.com/2007/10/15/optimizing-page-load-time-in-php/#comments</comments>
		<pubDate>Mon, 15 Oct 2007 15:00:41 +0000</pubDate>
		<dc:creator>Vladimir Iachimovici</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[eval]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[optimise]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://softexpert.wordpress.com/2007/10/15/optimizing-page-load-time-in-php/</guid>
		<description><![CDATA[There are lots of PHP optimization tricks, and all of them are good, they make loading page of Web Site faster, what is very important for end users. For example it can be done by optimizing CSS or HTML code, reducing HTTP requests, and of course optimizing the PHP code with using some function instead [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=softexpert.wordpress.com&amp;blog=1901056&amp;post=17&amp;subd=softexpert&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="line-height:normal;" class="MsoNormal"><span>There are lots of PHP optimization tricks, and all of them are good, they make loading page of Web Site faster, what is very important for end users. For example it can be done by optimizing CSS or HTML code, reducing HTTP requests, and of course optimizing the PHP code with using some function instead of other.</span></p>
<p style="line-height:normal;" class="MsoNormal"><span>But, what is the solution in case our page contains many forms, and every form has some number of actions. For example:</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#ffc000;font-family:'Courier New';">&lt;form action=</span><span style="font-size:9pt;color:#548dd4;font-family:'Courier New';">&#8220;test.php&#8221; </span><span style="font-size:9pt;color:#ffc000;font-family:'Courier New';">method=</span><span style="font-size:9pt;color:#548dd4;font-family:'Courier New';">&#8220;post&#8221;</span><span style="font-size:9pt;color:#ffc000;font-family:'Courier New';">&gt;</span><span style="font-size:9pt;font-family:'Courier New';"></span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#ffc000;font-family:'Courier New';">&lt;input type=</span><span style="font-size:9pt;color:#548dd4;font-family:'Courier New';">&#8220;text&#8221;</span><span style="font-size:9pt;font-family:'Courier New';"> <span style="color:#ffc000;">name=</span><span style="color:#548dd4;">&#8220;txt&#8221;</span><span> </span>/&gt;</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#ffc000;font-family:'Courier New';">&lt;input type=</span><span style="font-size:9pt;color:#548dd4;font-family:'Courier New';">&#8220;submit&#8221; </span><span style="font-size:9pt;color:#ffc000;font-family:'Courier New';">name=</span><span style="font-size:9pt;color:#548dd4;font-family:'Courier New';">&#8220;form1&#8243;</span><span style="font-size:9pt;font-family:'Courier New';"> <span style="color:#ffc000;">value=</span><span style="color:#548dd4;">&#8220;action1&#8243;</span> <span style="color:#ffc000;">/&gt;</span></span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#ffc000;font-family:'Courier New';">&lt;input type=</span><span style="font-size:9pt;color:#548dd4;font-family:'Courier New';">&#8220;submit&#8221;</span><span style="font-size:9pt;font-family:'Courier New';"> <span style="color:#ffc000;">name=</span><span style="color:#548dd4;">&#8220;form1&#8243;</span> <span style="color:#ffc000;">value=</span><span style="color:#548dd4;">&#8220;action2&#8243;</span> <span style="color:#ffc000;">/&gt;</span></span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#ffc000;font-family:'Courier New';">&lt;/form&gt;</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;font-family:'Courier New';"></span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#ffc000;font-family:'Courier New';">&lt;form action=</span><span style="font-size:9pt;color:#548dd4;font-family:'Courier New';">&#8220;test.php&#8221;</span><span style="font-size:9pt;font-family:'Courier New';"> <span style="color:#ffc000;">method=</span><span style="color:#548dd4;">&#8220;post&#8221;</span><span style="color:#ffc000;">&gt;</span></span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#ffc000;font-family:'Courier New';">&lt;input type=</span><span style="font-size:9pt;color:#548dd4;font-family:'Courier New';">&#8220;text&#8221;</span><span style="font-size:9pt;font-family:'Courier New';"> <span style="color:#ffc000;">name=</span><span style="color:#548dd4;">&#8220;txt&#8221;</span><span> </span><span style="color:#ffc000;">/&gt;</span></span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#ffc000;font-family:'Courier New';">&lt;input type=</span><span style="font-size:9pt;color:#548dd4;font-family:'Courier New';">&#8220;submit&#8221;</span><span style="font-size:9pt;font-family:'Courier New';"> <span style="color:#ffc000;">name=</span><span style="color:#548dd4;">&#8220;form2&#8243;</span> <span style="color:#ffc000;">value=</span><span style="color:#548dd4;">&#8220;action1&#8243;</span> <span style="color:#ffc000;">/&gt;</span></span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#ffc000;font-family:'Courier New';">&lt;input type=</span><span style="font-size:9pt;color:#548dd4;font-family:'Courier New';">&#8220;submit&#8221;</span><span style="font-size:9pt;font-family:'Courier New';"> <span style="color:#ffc000;">name=</span><span style="color:#548dd4;">&#8220;form2&#8243;</span> <span style="color:#ffc000;">value=</span><span style="color:#548dd4;">&#8220;action2&#8243;</span> <span style="color:#ffc000;">/&gt;</span></span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#ffc000;font-family:'Courier New';">&lt;/form&gt;</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:8pt;font-family:'Courier New';"></span></p>
<p style="line-height:normal;" class="MsoNormal"><span>The basically code of processing looks like:</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#00b050;font-family:'Courier New';">if</span><span style="font-size:9pt;font-family:'Courier New';"> <span style="color:#0070c0;">(isset($_POST[</span><span style="color:red;">'form1'</span><span style="color:#0070c0;">]))</span></span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#0070c0;font-family:'Courier New';">{</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;font-family:'Courier New';"><span></span><span style="color:#00b050;">if</span> <span style="color:#0070c0;">($_POST[</span><span style="color:red;">'form1'</span><span style="color:#0070c0;">]==</span><span style="color:red;">&#8220;action1&#8243;</span><span style="color:#0070c0;">)</span></span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#0070c0;font-family:'Courier New';"><span></span>{</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;font-family:'Courier New';"><span></span>do_action1_form1();</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;font-family:'Courier New';"><span></span><span style="color:#0070c0;">}</span></span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;font-family:'Courier New';"><span></span><span style="color:#00b050;">else if</span> <span style="color:#0070c0;">($_POST[</span><span style="color:red;">'form1'</span><span style="color:#0070c0;">]==</span><span style="color:red;">&#8220;action2&#8243;</span><span style="color:#0070c0;">)</span></span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#0070c0;font-family:'Courier New';"><span></span>{</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;font-family:'Courier New';"><span></span>do_action2_form1();</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;font-family:'Courier New';"><span></span><span style="color:#0070c0;">}</span></span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;font-family:'Courier New';"><span></span><span style="color:#00b050;">else if</span> <span style="color:#0070c0;">($_POST[</span><span style="color:red;">'form1'</span><span style="color:#0070c0;">]==</span><span style="color:red;">&#8220;action2&#8243;</span><span style="color:#0070c0;">)</span></span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#0070c0;font-family:'Courier New';"><span></span>{</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;font-family:'Courier New';"><span></span>do_action3_form1();</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;font-family:'Courier New';"><span></span><span style="color:#0070c0;">}</span></span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#0070c0;font-family:'Courier New';">}</span></p>
<p style="line-height:normal;" class="MsoNormal"><span>This is too redundant, and for a big number of forms it will be too difficult to generate this sequence of statements. </span></p>
<p style="line-height:normal;" class="MsoNormal"><strong><span style="font-size:12pt;">What we are doing?</span></strong></p>
<p style="line-height:normal;" class="MsoNormal"><span>The simple solution will be to use “eval” function from PHP.</span></p>
<p style="line-height:normal;" class="MsoNormal"><span>First off all, we must define what forms must be processed.</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#ffc000;font-family:'Courier New';">// List of forms from page</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;font-family:'Courier New';">$forms <span style="color:#548dd4;">= array</span>(<span style="color:red;">&#8220;form1&#8243;</span>, <span style="color:red;">&#8220;form2&#8243;</span>, <span style="color:red;">&#8220;form3&#8243;</span>);</span></p>
<p style="line-height:normal;" class="MsoNormal"><span>Of no less importance is to define what method is using forms.</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#ffc000;font-family:'Courier New';">// Which method uses forms for sending data</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;font-family:'Courier New';">$method <span style="color:#548dd4;">=</span> <span style="color:red;">&#8220;POST&#8221;</span>;</span></p>
<p style="line-height:normal;" class="MsoNormal"><span><span></span>Now we must get all values, after submission action.</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#ffc000;font-family:'Courier New';">// Get values from submission</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#548dd4;font-family:'Courier New';">eval</span><span style="font-size:9pt;font-family:'Courier New';">(<span style="color:red;">&#8220;\$values = \$_$method;&#8221;</span>);</span></p>
<p style="line-height:normal;" class="MsoNormal"><span><span></span>Now, let’s check if some of form was submitted.</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#ffc000;font-family:'Courier New';">// Get the name of every form</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#00b050;font-family:'Courier New';">foreach</span><span style="font-size:9pt;font-family:'Courier New';">($forms <span style="color:#00b050;">as</span> $form_name)</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;font-family:'Courier New';">{</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;font-family:'Courier New';"><span></span><span style="color:#ffc000;">// check if any form was submitted</span></span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;font-family:'Courier New';"><span></span><span style="color:#00b050;">if</span> (<span style="color:#00b0f0;">isset</span>($values[$form_name]))</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;font-family:'Courier New';"><span></span>{</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;font-family:'Courier New';"><span></span><span style="color:red;">// Processing code</span></span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;font-family:'Courier New';"><span></span>}</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:12pt;font-family:'Courier New';">}</span></p>
<p style="line-height:normal;" class="MsoNormal"><span>If there has been found any submitted forms then we should get the action name of this event.</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#ffc000;font-family:'Courier New';">// Get action name</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;font-family:'Courier New';">$action_name <span style="color:#00b0f0;">=</span> $values[$form_name];</span></p>
<p style="line-height:normal;" class="MsoNormal"><span>Well at least after collecting all necessary information, the necessary function have to be called.</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#ffc000;font-family:'Courier New';">// Get function name</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;font-family:'Courier New';">$function_name <span style="color:#00b0f0;">=</span> $form_name.<span style="color:red;">&#8220;_&#8221;</span>.$action_name;</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#ffc000;font-family:'Courier New';">//Check if function exists</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#00b050;font-family:'Courier New';">if </span><span style="font-size:9pt;font-family:'Courier New';">(<span style="color:#00b0f0;">function_exists</span>($function_name))</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;font-family:'Courier New';">{</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;font-family:'Courier New';"><span></span><span style="color:#ffc000;">// call function</span></span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;font-family:'Courier New';"><span></span><span style="color:#00b0f0;">eval</span>(<span style="color:red;">&#8220;$function_name();&#8221;</span>);</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;font-family:'Courier New';">}</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#ffc000;font-family:'Courier New';">// quit the foreach statement, </span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#ffc000;font-family:'Courier New';">// because only one form from page can be submitted, </span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#ffc000;font-family:'Courier New';">// and with one action</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#00b050;font-family:'Courier New';">break;</span></p>
<p style="line-height:normal;" class="MsoNormal"><span>Now just define functions of needed action processing. The function for submit action with name action2 at form with name form3, will look like:</span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#00b0f0;font-family:'Courier New';">function</span><span style="font-size:9pt;font-family:'Courier New';"> form3_action2<span style="color:#00b0f0;">()</span></span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#00b0f0;font-family:'Courier New';">{</span></p>
<p style="text-indent:36pt;line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:red;font-family:'Courier New';">// Code . . . <span></span></span></p>
<p style="line-height:normal;" class="MsoNormal"><span style="font-size:9pt;color:#00b0f0;font-family:'Courier New';">}</span></p>
<p style="line-height:normal;" class="MsoNormal"><span>After this type of optimization, the time of loading page will dramatically improve.</span></p>
<p style="line-height:normal;" class="MsoNormal"><strong><span>Enjoy!</span></strong></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/softexpert.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/softexpert.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/softexpert.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/softexpert.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/softexpert.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/softexpert.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/softexpert.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/softexpert.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/softexpert.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/softexpert.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/softexpert.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/softexpert.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/softexpert.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/softexpert.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/softexpert.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/softexpert.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=softexpert.wordpress.com&amp;blog=1901056&amp;post=17&amp;subd=softexpert&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://softexpert.wordpress.com/2007/10/15/optimizing-page-load-time-in-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e0dbef3b12b92aad2eaf31d337924c5a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">iachimovici</media:title>
		</media:content>
	</item>
		<item>
		<title>Learn .htaccess in 10 minutes</title>
		<link>http://softexpert.wordpress.com/2007/10/15/learn-htaccess-in-10-minutes/</link>
		<comments>http://softexpert.wordpress.com/2007/10/15/learn-htaccess-in-10-minutes/#comments</comments>
		<pubDate>Mon, 15 Oct 2007 10:52:20 +0000</pubDate>
		<dc:creator>softexpert</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://softexpert.wordpress.com/2007/10/15/learn-htaccess-in-10-minutes/</guid>
		<description><![CDATA[A list of htaccess code snippets and examples. Any web designer MUST know them. Any htaccess rewrite examples should always begin with: Options +FollowSymLinks RewriteEngine On RewriteBase / This lets google crawl the page, lets me access the whole site (24.205.23.222) without a password, and lets my client access the page WITH a password. It [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=softexpert.wordpress.com&amp;blog=1901056&amp;post=16&amp;subd=softexpert&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:center;" align="left"><img src="http://softexpert.files.wordpress.com/2007/10/475576500_71b48df3e2.jpg?w=780" alt="Mode rewrite" /></p>
<p align="center"><font><font size="4"><font>A list of htaccess code snippets and examples.</font></font></font><br />
<font><font size="4"><font>Any web designer MUST know them.</font></font></font></p>
<p>Any htaccess rewrite examples should always begin with:</p>
<p><strong><font>Options +FollowSymLinks</font><br />
<font>RewriteEngine On</font><br />
<font>RewriteBase /</font></strong></p>
<p>This lets google crawl the page, lets me access the whole site (24.205.23.222) without a password, and lets my client access the page WITH a password. It also allows for XHTML and CSS validation! (w3.org):</p>
<p><strong><font>AuthName &#8220;SiteName Administration&#8221;</font><br />
<font>AuthUserFile /home/sitename.com/.htpasswd</font><br />
<font>AuthType basic</font><br />
<font>Require valid-user</font><br />
<font>Order deny,allow</font><br />
<font>Deny from all</font><br />
<font>Allow from 24\\.205\\.23\\.222</font><br />
<font>Allow from w3.org htmlhelp.com</font><br />
<font>Allow from googlebot.com</font><br />
<font>Satisfy Any</font></strong></p>
<p>Make any file be a certain filetype (regardless of name or extension)<br />
#Makes image.gif, blah.html, index.cgi all act as php<br />
ForceType application/x-httpd-php:</p>
<p><em><font>Redirect non-https requests to https server fixing double-login problem and ensuring that htpasswd authorization can only be entered using HTTPS<br />
</font></em><br />
<strong><font>SSLOptions +StrictRequire</font><br />
<font>SSLRequireSSL</font><br />
<font>SSLRequire %{HTTP_HOST} eq &#8220;google.com&#8221;</font><br />
<font>ErrorDocument 403 https://google.com</font></strong></p>
<p align="center"><font size="4">SEO Friendly redirects for bad/old links and moved links</font></p>
<p>For single moved file:</p>
<p><strong><font>Redirect 301 /d/file.html http://www.htaccesselite.com/r/file.html</font></strong></p>
<p>For multiple files like a blog/this.php?gh:</p>
<p><strong><font>RedirectMatch 301 /blog(.*) http://www.askapache.com/$1</font></strong></p>
<p>different domain name:</p>
<p><strong><font>Redirect 301 / http://www.newdomain.com</font></strong></p>
<p>Require the www:</p>
<p><strong><font>Options +FollowSymLinks</font><br />
<font>RewriteEngine On</font><br />
<font>RewriteBase /</font><br />
<font>RewriteCond %{REQUEST_URI} !^/robots\\.txt$</font><br />
<font>RewriteCond %{HTTP_HOST} !^www\\.example\\.com$ [NC]</font><br />
<font>RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]</font></strong></p>
<p>Require the www without hardcoding:</p>
<p><strong><font>Options +FollowSymLinks</font><br />
<font>RewriteEngine On</font><br />
<font>RewriteBase /</font><br />
<font>RewriteCond %{REQUEST_URI} !^/robots\\.txt$ [NC]</font><br />
<font>RewriteCond %{HTTP_HOST} !^www\\.[a-z-]+\\.[a-z]{2,6} [NC]</font><br />
<font>RewriteCond %{HTTP_HOST} ([a-z-]+\\.[a-z]{2,6})$ [NC]</font><br />
<font>RewriteRule ^/(.*)$ http://%1/$1 [R=301,L]</font></strong></p>
<p>Require no subdomain:</p>
<p><strong><font>Options +FollowSymLinks</font><br />
<font>RewriteEngine On</font><br />
<font>RewriteBase /</font><br />
<font>RewriteCond %{REQUEST_URI} !^/robots\\.txt$</font><br />
<font>RewriteCond %{HTTP_HOST} \\.([a-z-]+\\.[a-z]{2,6})$ [NC]</font><br />
<font>RewriteRule ^/(.*)$ http://%1/$1 [R=301,L]</font></strong></p>
<p>Require no subdomain:</p>
<p><strong><font>Options +FollowSymLinks</font><br />
<font>RewriteEngine On</font><br />
<font>RewriteBase /</font><br />
<font>RewriteCond %{HTTP_HOST} \\.([^\\.]+\\.[^\\.0-9]+)$</font><br />
<font>RewriteCond %{REQUEST_URI} !^/robots\\.txt$ [NC]</font><br />
<font>RewriteRule ^(.*)$ http://%1/$1 [R=301,L]</font></strong></p>
<p>Redirect everyone to different site except 1 IP address (useful for web-development):</p>
<p><strong><font>ErrorDocument 403 http://www.someothersite.com</font><br />
<font>Order deny,allow</font><br />
<font>Deny from all</font><br />
<font>Allow from 24.33.65.6</font></strong></p>
<p>Add a &#8220;en-US&#8221; language tag and &#8220;text/html; UTF-8&#8243; headers without meta tags:</p>
<p><strong><font>AddDefaultCharset UTF-8</font><br />
<font># Or AddType &#8216;text/html; charset=UTF-8&#8242; html</font><br />
<font>DefaultLanguage en-US</font></strong></p>
<p>Using the Files Directive:</p>
<p><strong><font>AddDefaultCharset UTF-8</font><br />
<font>DefaultLanguage en-US</font></strong></p>
<p>Using the FilesMatch Directive (preferred):</p>
<p><strong><font>AddDefaultCharset UTF-8</font><br />
<font>DefaultLanguage en-US</font></strong></p>
<p>Securing directories: Remove the ability to execute scripts:</p>
<p><strong><font>AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi</font><br />
<font>Options –ExecCGI</font><br />
<font>Only allow GET and PUT request methods to your server.</font><br />
<font>Options -ExecCGI -Indexes -All +FollowSymLinks</font><br />
<font>RewriteEngine On</font><br />
<font>RewriteBase /</font><br />
<font>RewriteCond %{REQUEST_METHOD} !^(GET|PUT)</font><br />
<font>RewriteRule .* &#8211; [F]</font></strong></p>
<p>Processing All gif files to be processed through a cgi script:</p>
<p><strong><font>Action image/gif /cgi-bin/filter.cgi</font></strong></p>
<p>Process request/file depending on the request method:</p>
<p><strong><font>Script PUT /cgi-bin/upload.cgi</font></strong></p>
<p>Force Files to download, not be displayed in browser:</p>
<p><strong><font>AddType application/octet-stream .avi</font><br />
<font>AddType application/octet-stream .mpg</font></strong></p>
<p>Dramatically Speed up your site by implementing Caching!:</p>
<p><strong><font># MONTH</font><br />
Header set Cache-Control &#8220;max-age=2592000&#8243;<br />
<font># WEEK</font><br />
Header set Cache-Control &#8220;max-age=604800&#8243;<br />
<font># DAY</font><br />
Header set Cache-Control &#8220;max-age=43200&#8243;</strong></p>
<p>Prevent Files image/file hotlinking and bandwidth stealing:</p>
<p><strong><font>Options +FollowSymLinks</font><br />
<font>RewriteEngine On</font><br />
<font>RewriteBase /</font><br />
<font>RewriteCond %{HTTP_REFERER} !^$</font><br />
<font>RewriteCond %{HTTP_REFERER} !^http://(www\\.)?askapache.com/.*$ [NC]</font><br />
<font>RewriteRule \\.(gif|jpg|swf|flv|png)$ http://www.askapache.com/evil-hotlinker.gif [R=302,L]</font></strong></p>
<p>ErrorDocuments:</p>
<p><strong><font>ErrorDocument 404 /favicon.ico</font><br />
<font>ErrorDocument 403 https://secure.htaccesselite.com</font><br />
<font>ErrorDocument 404 /cgi-bin/error.php</font><br />
<font>ErrorDocument 400 /cgi-bin/error.php</font><br />
<font>ErrorDocument 401 /cgi-bin/error.php</font><br />
<font>ErrorDocument 403 /cgi-bin/error.php</font><br />
<font>ErrorDocument 405 /cgi-bin/error.php</font><br />
<font>ErrorDocument 406 /cgi-bin/error.php</font><br />
<font>ErrorDocument 409 /cgi-bin/error.php</font><br />
<font>ErrorDocument 413 /cgi-bin/error.php</font><br />
<font>ErrorDocument 414 /cgi-bin/error.php</font><br />
<font>ErrorDocument 500 /cgi-bin/error.php</font><br />
<font>ErrorDocument 501 /cgi-bin/error.php</font></strong></p>
<p align="center"><font><font size="4">Authentication Magic</font></font></p>
<p>Require password for 1 file:</p>
<p><strong><font>AuthName &#8220;Prompt&#8221;</font><br />
<font>AuthType Basic</font><br />
<font>AuthUserFile /home/askapache.com/.htpasswd</font><br />
<font>Require valid-user</font></strong></p>
<p>Protect multiple files:</p>
<p><strong><font>AuthName &#8220;Development&#8221;</font><br />
<font>AuthUserFile /.htpasswd</font><br />
<font>AuthType basic</font><br />
<font>Require valid-user</font></strong></p>
<p>Example uses of the Allow Directive:</p>
<p><strong><font># A (partial) domain-name</font><br />
<font>Allow from 10.1.0.0/255.255.0.0</font></strong></p>
<p><strong><font># Full IP address</font><br />
<font>Allow from 10.1.2.3</font></strong></p>
<p><strong><font># More than 1 full IP address</font><br />
<font>Allow from 192.168.1.104 192.168.1.205</font></strong></p>
<p><strong><font># Partial IP addresses</font><br />
<font># first 1 to 3 bytes of IP, for subnet restriction.</font><br />
<font>Allow from 10.1</font><br />
<font>Allow from 10 172.20 192.168.2</font></strong></p>
<p><strong><font># network/netmask pair</font><br />
<font>Allow from 10.1.0.0/255.255.0.0</font></strong></p>
<p><strong><font># network/nnn CIDR specification</font><br />
<font>Allow from 10.1.0.0/16</font></strong></p>
<p><strong><font># IPv6 addresses and subnets</font><br />
<font>Allow from 2001:db8::a00:20ff:fea7:ccea</font><br />
<font>Allow from 2001:db8::a00:20ff:fea7:ccea/10</font></strong></p>
<p>Using visitor dependent environment variables:</p>
<p><strong><font>SetEnvIf User-Agent ^KnockKnock/2\\.0 let_me_in</font><br />
<font>Order Deny,Allow</font><br />
<font>Deny from all</font><br />
<font>Allow from env=let_me_in</font></strong></p>
<p>block access to files during certain hours of the day:</p>
<p><strong><font>Options +FollowSymLinks</font><br />
<font>RewriteEngine On</font><br />
<font>RewriteBase /</font><br />
<font># If the hour is 16 (4 PM) Then deny all access</font><br />
<font>RewriteCond %{TIME_HOUR} ^16$</font><br />
<font>RewriteRule ^.*$ &#8211; [F,L]</font></strong></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/softexpert.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/softexpert.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/softexpert.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/softexpert.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/softexpert.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/softexpert.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/softexpert.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/softexpert.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/softexpert.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/softexpert.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/softexpert.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/softexpert.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/softexpert.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/softexpert.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/softexpert.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/softexpert.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=softexpert.wordpress.com&amp;blog=1901056&amp;post=16&amp;subd=softexpert&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://softexpert.wordpress.com/2007/10/15/learn-htaccess-in-10-minutes/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/aafd80e8d7757f6337ac351960e31a50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">softexpert</media:title>
		</media:content>

		<media:content url="http://softexpert.files.wordpress.com/2007/10/475576500_71b48df3e2.jpg" medium="image">
			<media:title type="html">Mode rewrite</media:title>
		</media:content>
	</item>
		<item>
		<title>Web project estimation advices</title>
		<link>http://softexpert.wordpress.com/2007/10/14/web-project-estimation-advices/</link>
		<comments>http://softexpert.wordpress.com/2007/10/14/web-project-estimation-advices/#comments</comments>
		<pubDate>Sun, 14 Oct 2007 17:14:55 +0000</pubDate>
		<dc:creator>softexpert</dc:creator>
				<category><![CDATA[Project management]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[lifehack]]></category>

		<guid isPermaLink="false">http://softexpert.wordpress.com/2007/10/14/web-project-estimation-advices/</guid>
		<description><![CDATA[The more specific you are the less problems will appear. What seems obvious for you might seem very different to you client. Even if there is something about fonts, text and the number of items on a specific area, you should plan ahead and describe it in details. You should firstly write good specifications for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=softexpert.wordpress.com&amp;blog=1901056&amp;post=14&amp;subd=softexpert&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><img src="http://softexpert.files.wordpress.com/2007/10/grid.jpg?w=780" alt="Project Estimation" /><br />
<strong><span><br />
The more specific you are the less problems will appear. </span></strong></p>
<p class="MsoNormal"><span>What seems obvious for you might seem very different to you client. Even if there is something about fonts, text and the number of items on a specific area, you should plan ahead and describe it in details. You should firstly write good specifications for the project. A good specification is a document that answers absolutely all possible questions. It could seem impossible to take into account everything at the first glance. But you have to make it. The good news is you have an exhaustive set of tasks at the inception phase. The bad news is you could work a lot gathering the necessary details and consult with the client to find the goals and solution, after which the client will change his mind and abandon the project, or simply use this specifications to shop around a better price for the project that now has a shape. To avoid this- you should make a contract before you start designing the specifications, or consider this phase as a separate one and charge it. </span></p>
<p class="MsoNormal"><strong><span>Do not deviate from your path.</span></strong></p>
<p class="MsoNormal"><span>The path was established at the specifications phase. You designed the project and estimated in terms of time and money. You could use different pricing methods like rate/hour or rate/task or rate per project – the last one is very tricky because you have to be very experienced at that.<span>  </span>But the point in not deviating from your path is not accepting small or appealingly easy changes. You could thing – “Well, if it is really easy I could satisfy the client in 5 more minutes”, but trust us – you won’t. <span> </span>You should always log the changes, document them, re-estimate the work and make a new contract or a simply add a new page to the first contract. <span> </span>Make sure the client properly understand this and agrees on these scheme of changes. It seems clear that the client risks to run out of the budget, but on the other hand – he needs something worth a better price. </span></p>
<p class="MsoNormal"><strong><span>Deliver on time</span></strong></p>
<p class="MsoNormal"><span>If you think you will manage to deliver the work in 7 weeks for example, but there is still something undiscovered or you are still dependent on some actions of the client like some new details – just consider the work will be finished in 7 week from the date you have cleared everything or received those new details. This is to inform the client that he is responsible for the final delivery date too. Otherwise you alone will be responsible for the faults with deadlines. </span></p>
<p class="MsoNormal"><span>The goal of this post is to protect the developer’s team, but this doesn’t mean it’s to the detriment of the client, as very often the client can be his own worst enemy. <span> </span>Be aware that it is not possible to make a project in its perfect state. The scope is to get the things done and achieve the goals, after which there is room for improvements and upgrades. </span></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/softexpert.wordpress.com/14/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/softexpert.wordpress.com/14/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/softexpert.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/softexpert.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/softexpert.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/softexpert.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/softexpert.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/softexpert.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/softexpert.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/softexpert.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/softexpert.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/softexpert.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/softexpert.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/softexpert.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/softexpert.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/softexpert.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=softexpert.wordpress.com&amp;blog=1901056&amp;post=14&amp;subd=softexpert&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://softexpert.wordpress.com/2007/10/14/web-project-estimation-advices/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/aafd80e8d7757f6337ac351960e31a50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">softexpert</media:title>
		</media:content>

		<media:content url="http://softexpert.files.wordpress.com/2007/10/grid.jpg" medium="image">
			<media:title type="html">Project Estimation</media:title>
		</media:content>
	</item>
		<item>
		<title>GOal  Oriented Desing is GOOD</title>
		<link>http://softexpert.wordpress.com/2007/10/14/goal-oriented-desing-is-good/</link>
		<comments>http://softexpert.wordpress.com/2007/10/14/goal-oriented-desing-is-good/#comments</comments>
		<pubDate>Sun, 14 Oct 2007 11:04:55 +0000</pubDate>
		<dc:creator>softexpert</dc:creator>
				<category><![CDATA[Project management]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[Goal]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[web 20]]></category>
		<category><![CDATA[win]]></category>

		<guid isPermaLink="false">http://softexpert.wordpress.com/2007/10/14/goal-oriented-desing-is-good/</guid>
		<description><![CDATA[&#160; Once upon a time, when we just began working in web design, our only goal was to impress the client. Today we consider this vision is totally wrong, except the case when a web site has one single user – the client. Any web site should be built in response to certain needs. The [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=softexpert.wordpress.com&amp;blog=1901056&amp;post=11&amp;subd=softexpert&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><img src="http://softexpert.files.wordpress.com/2007/10/52660486_6ca085f7a8.jpg?w=780" alt="GOAL oriented design" /><br />
<span><em><br />
Once upon a time, when we just began working in web design, our only goal was to impress the client. Today we consider this vision is totally wrong, except the case when a web site has one single user – the client.<br />
</em><br />
Any web site should be built in response to certain needs.<span> </span>The web is medium of information, and the content is king. No matter how good the design will be, without fulfilling the needs for information – the site will be a failure. </span></p>
<p class="MsoNormal"><span>Goals are best visualized when you make scenarios for real user experience. A common mistake is focusing on the technologies and forgetting about how easy will the real user find the information he needs, and what will be the overall impressions after using the site. The point is to make the user happy and reward it with something he needs in response to his time spend. </span></p>
<p class="MsoNormal"><span>Our advice is to think of a web site as of a two-way dialog medium.<span> </span>Imagine yourself chatting with that site and getting pleasant responses, you will be delighted with the feeling it works for you.<span> </span>Here we would like to introduce the so called – “system intelligence” this concept provides the greatest opportunity to differentiate excellent web products from the mainstreams. Think ahead what dialogues should be anticipated or avoided, what errors can possible occur, how can the site respond in a way that increases the user’s satisfaction. Also the “404 – File not found” solution is actually very rude!<span> </span>You could design the system to pull up a list of similar pages to look through – this is much more user friendly. </span></p>
<p class="MsoNormal"><span>A good and intelligent system is always predicting the next step of the user, and acts accordingly. Even if this requires more resources to design such a system there always are win-win approaches that will work for your users and your goals. Here are some examples of win-win solutions:</span></p>
<p class="MsoListParagraphCxSpMiddle"><span><strong>Advertising messages at resting pages.</strong><br />
Let’s say there is a downloading page, the user is happy with the download and meanwhile can actually pay attention on some advertising.</span></p>
<p class="MsoListParagraphCxSpMiddle"><span><strong>Inline advertising.</strong><br />
It’s easy to imagine a newspaper and advertising boxes through the lines. The user can easily ignore it, or sneak a look.</span></p>
<p class="MsoListParagraphCxSpMiddle"><span><strong>Advertising by entertainment.</strong><br />
Probably the most pleasant way of advertising – it’s always very interesting and funny to observe a cartoon message that invites you to click and find out the rest of the story.</span></p>
<p class="MsoListParagraphCxSpMiddle"><span><strong>The cat and mouse approach.</strong><br />
It’s when you want to sell the cat, but you offer the mouse for free and the user has the impression he still wants more. The user discovers something new or of interest, you are advertising your services and as a consequence sell more. It’s a trivial win-win isn’t it?</span></p>
<p class="MsoListParagraphCxSpLast"><span><strong>Advertising via Newsletters.</strong><br />
It’s a perfect way to provide the right users the right information, without their having to go and get it, as soon as it becomes available. <span></span>Also it collects the users’ information as contact details which represent a route of direct communication and target oriented actions. Besides, it is a very cost-effective win-win solution.</span></p>
<p class="MsoNormal"><span>Even this post has some goals, one of which is to encourage you finding win-win solutions and always use the GOOD philosophy. </span></p>
<p class="MsoNormal">&nbsp;</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/softexpert.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/softexpert.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/softexpert.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/softexpert.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/softexpert.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/softexpert.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/softexpert.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/softexpert.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/softexpert.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/softexpert.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/softexpert.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/softexpert.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/softexpert.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/softexpert.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/softexpert.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/softexpert.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=softexpert.wordpress.com&amp;blog=1901056&amp;post=11&amp;subd=softexpert&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://softexpert.wordpress.com/2007/10/14/goal-oriented-desing-is-good/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/aafd80e8d7757f6337ac351960e31a50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">softexpert</media:title>
		</media:content>

		<media:content url="http://softexpert.files.wordpress.com/2007/10/52660486_6ca085f7a8.jpg" medium="image">
			<media:title type="html">GOAL oriented design</media:title>
		</media:content>
	</item>
		<item>
		<title>How to properly begin a project in 10 steps</title>
		<link>http://softexpert.wordpress.com/2007/10/13/how-to-properly-begin-a-project-in-10-steps/</link>
		<comments>http://softexpert.wordpress.com/2007/10/13/how-to-properly-begin-a-project-in-10-steps/#comments</comments>
		<pubDate>Sat, 13 Oct 2007 15:08:43 +0000</pubDate>
		<dc:creator>softexpert</dc:creator>
				<category><![CDATA[Project management]]></category>
		<category><![CDATA[lifehack]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://softexpert.wordpress.com/2007/10/13/how-to-properly-begin-a-project-in-10-steps/</guid>
		<description><![CDATA[1. Estimate your capabilities and capacities. Make sure you have enough time and resources to do the project. 2. Get to know your clients. Spend as much time with your client as possible. 3. Make sure client knows what he wants. Find out what the client needs. Not what he wants, but what he needs. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=softexpert.wordpress.com&amp;blog=1901056&amp;post=8&amp;subd=softexpert&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><strong><span>1. <span>Estimate your capabilities and capacities.</span></span></strong></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span>Make sure you have enough time and resources to do the project.</span></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span>2. <span>Get to know your clients.</span><br />
</span></strong><span>Spend as much time with your client as possible. </span></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span>3.<span> Make sure client knows what he wants.</span><br />
</span></strong><span>Find out what the client needs. Not what he wants, but what he needs.</span></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span>4. Make sure the goal is defined.<br />
</span></strong><span>Talk with the client. Understand their goals. Once you know this, your solutions can target those goals. </span></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span>5.<span> Prepare a good plan.</span><br />
</span></strong><span>Planning on paper helps you stay focused and ensures you won’t forget any of your ideas as you dive into the work. </span></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span>6.<span> Create a vision for the project.</span><br />
</span></strong><span>An extremely important condition is to have a vision. You will clearly understand the purpose of the project, your client will be satisfied with the end result.</span></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span>7.<span> Observe the competition.</span><br />
</span></strong><span>You want to learn from the mistakes of your competition. Find out what they did right, what they did wrong, and what they didn’t do at all.</span></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span>8.<span> Get money before you start.</span><br />
</span></strong><span>You should always ask the first part of money to begin the work.</span></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span>9.<span> Brainstorm!</span><br />
</span></strong><span>Write down as many random ideas as you can on pieces of paper. Nothing has to make sense or have any real value — but just get the ideas out on paper.</span></p>
<p class="MsoNormal" style="line-height:normal;"><strong><span>10.<span>Search the truth using critical sense</span><br />
</span></strong>Consult with someone who has a keen critical sense. Research till you drop. Get as much collateral information about the market, similar projects.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/softexpert.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/softexpert.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/softexpert.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/softexpert.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/softexpert.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/softexpert.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/softexpert.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/softexpert.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/softexpert.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/softexpert.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/softexpert.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/softexpert.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/softexpert.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/softexpert.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/softexpert.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/softexpert.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=softexpert.wordpress.com&amp;blog=1901056&amp;post=8&amp;subd=softexpert&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://softexpert.wordpress.com/2007/10/13/how-to-properly-begin-a-project-in-10-steps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/aafd80e8d7757f6337ac351960e31a50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">softexpert</media:title>
		</media:content>
	</item>
	</channel>
</rss>
