<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Dro &#187; Web Design</title>
	<atom:link href="http://the-dro.com/category/web-design/feed/" rel="self" type="application/rss+xml" />
	<link>http://the-dro.com</link>
	<description>Musician, Web Developer, Programmer, Graphic Designer, &#38; Editor</description>
	<lastBuildDate>Thu, 22 Jul 2010 09:16:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>New Twitter Background</title>
		<link>http://the-dro.com/music/new-twitter-background/</link>
		<comments>http://the-dro.com/music/new-twitter-background/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 02:37:51 +0000</pubDate>
		<dc:creator>The Dro</dc:creator>
				<category><![CDATA[Graphic Design]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[background]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[dro]]></category>
		<category><![CDATA[graphic design]]></category>
		<category><![CDATA[the dro]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://the-dro.com/?p=271</guid>
		<description><![CDATA[I finally got a few minutes of downtime which is pretty rare for me and decided to spice up my twitter background. As a graphic designer &#038; developer, it frustrates me that I don&#8217;t have a custom bad-ass web site and personal social networking designs. I spend all of my time designing for others and [...]]]></description>
			<content:encoded><![CDATA[<div style="align:center;"><a href="http://the-dro.com/images/twitter_bg2.png"><img src="http://the-dro.com/wp-content/uploads/2010/01/twitter_ss_sm.png" alt="Download the Custom Dro Twitter Background" title="Custom Twitter Background" width="475" height="229" class="aligncenter size-full wp-image-272" border="0" /></a></div>
<p>I finally got a few minutes of downtime which is pretty rare for me and decided to spice up my twitter background. </p>
<p>As a graphic designer &#038; developer, it frustrates me that I don&#8217;t have a custom bad-ass web site and personal social networking designs. I spend all of my time designing for others and never have enough time to design for myself anymore. It&#8217;s unfortunate because the reality is, no matter how many hours I put in each day, I still seem to be getting no-where financially.</p>
<p>The thing that sucks about my field at the moment is that no one is really willing to pay what us designers and developers are worth. In turn, projects take longer to complete and are more difficult because freelancers end up having to take on more projects at a time, at lower costs than normal, in order to pay the bills &#038; survive.<br />
I strongly believe that if clients were willing to pay more, designers could focus more of their attention to the one specific project at hand and not worry about having to take on others just to stay afloat. </p>
<p>Regardless, I took a bit of time I had left over after completing a task and decided to finally design something for myself. Check out my new Twitter Background image and feel free to comment and let me know what you think. </p>
<p>I have uploaded it to the server in case anyone wants to use it as their background. I understand that it&#8217;s a personal background and has all my links on it, but if anyone requests a custom made one for use on their page, I will gladly create one for them as time permits. </p>
<p>Link to the full size image: <a href="http://the-dro.com/images/twitter_bg2.png" title="Download the Custom Dro Twitter Background">http://the-dro.com/images/twitter_bg2.png</a></p>
]]></content:encoded>
			<wfw:commentRss>http://the-dro.com/music/new-twitter-background/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>My Opinions on using Flash for Web Design</title>
		<link>http://the-dro.com/web-design/my-opinions-on-using-flash-for-web-design/</link>
		<comments>http://the-dro.com/web-design/my-opinions-on-using-flash-for-web-design/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 15:32:34 +0000</pubDate>
		<dc:creator>The Dro</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[adobe flash]]></category>
		<category><![CDATA[autoplay]]></category>
		<category><![CDATA[fla]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[LinkedIn]]></category>
		<category><![CDATA[loading times]]></category>
		<category><![CDATA[splash pages]]></category>
		<category><![CDATA[swf]]></category>

		<guid isPermaLink="false">http://the-dro.com/?p=95</guid>
		<description><![CDATA[There have been many times when a client asks me about using flash to build their web site. I’m not against using flash for design, but I believe that if you can make the web site function the same using XHTML/CSS or Javascript, why use flash? Flash shouldn’t be for building full web sites in my opinion. It should only be used to create elements on your site which cannot be programmed with normal use of XHTML/CSS or Javascript.]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="size-full wp-image-96 aligncenter" title="Flash Fail!" src="http://the-dro.com/wp-content/uploads/2009/07/flash_fail.png" alt="Flash Fail!" width="350" height="169" /></p>
<p>There have been many times when a client asks me about using flash to build their web site. I usually immediately let out an internal sigh and begin to think about ways to explain to him why it’s not always the best idea. Now, don’t get me wrong. I’m not against using flash for design, but I believe that if you can make the web site function the same using XHTML/CSS or Javascript, why use flash? Flash shouldn’t be for building full web sites in my opinion. It should only be used to create elements on your site which cannot be programmed with normal use of XHTML/CSS or Javascript.</p>
<p><span id="more-95"></span></p>
<p>I see most web sites which are fully designed in flash as tacky. There are definitely a few designers who have been able to pull off full web designs by just using Flash but most of those sites are usually designed for entertainment purposes only. One example of this would be movie web site. Movie web sites are usually designed to give the feel of the movie itself and have the user feel like they’re a part of that story. However, there are many ways to get that effect without the use of a full flash design.</p>
<p style="text-align: center;">
<h2>Here are a few things about flash that every designer &amp; client should consider:</h2>
</p>
<h2>1. Flash Intros and Splash Pages</h2>
<blockquote><p>Some of the most annoying and tacky web designs I have seen include a Flash intro or splash page. They usually take forever to load, even on a fast connection. The worst mistake that some flash designers make are forgetting or intentionally leaving out a SKIP button so that users can bypass the long and usually useless intro. I usually visit web sites to gather information about the subject I am seeking and Flash Intros just get in the way of that. It’s bad enough that you’ve created a splash page or intro to your site but please don’t make it worst by not letting the user skip it. If it’s true that you only have a split second to grab a user’s attention in order to keep him on your site, then you’ve just lost about 50% of your potential users to load time alone. Another 40% will most likely leave when they see that they cannot bypass your annoying splash page.</p></blockquote>
<h2>2. Navigation</h2>
<blockquote><p>Let’s say the other 10% have the time and patience to sit around waiting for your intro to end and site to load. Where do they go from here? Many flash designers have chosen to make the site cool and hip by creating a navigation system that is hidden under elements on the page and usually don’t even put descriptive text over those elements. I’m sure you’ve all seen sites which you must hover over all the elements just to find out which are clickable. Then you get to the page which it has linked you to only to find out that it’s not the page you were looking for. You then have to go back and forth trying to find the information you need because some shoddy designer decided to create a useless navigation system. By this time you’ve probably lost another 8% of users.</p></blockquote>
<h2>3. Sounds and Music set to Autoplay</h2>
<blockquote><p>I don’t know about you, but when I’m on the computer browsing the web I’m usually listening to music. It’s pretty irritating to land on a site with loud music or annoying sound effects that are set to automatically play.  I then scroll down to hit stop or mute on the player only to find out that there is no player on the page and there’s also a missing mute button. Who ever created these types of sites must have for some reason decided that the only way for you to experience their design is through their horrible music and sound effects.  Audio on flash web sites should always include a visible way to mute the sound. Not all your users are going to want to listen to it so don’t be surprised when you lose the rest of your 2% who actually decided to sit through the other annoyances that came with visiting your site.</p></blockquote>
<h2>4. Ranking and SEO</h2>
<blockquote><p>Unless Google comes up with a way to read exactly what’s on images and flash files, there’s no way your site is going to rank well if it’s built solely on flash. There are some ways nowadays to create flash elements which can be read by the search engine but if you’re whole site is just based on a flash movie, you can kiss that part of optimization goodbye. So by now you have a site which loads slow, confuses users, annoys them with intrusive music or sound effect and doesn’t rank at all with search engines. If you think about it, what’s the point of even having the site up if it’s just going to sit there with no real purpose? You’re basically just wasting your money on hosting and who wants to waste money on days like these?</p></blockquote>
<p>So In the end, I just want to make it known that I don’t completely hate the use of flash nor do I think it’s completely useless. I just ask that flash gurus keep it in the realm of animation, game and special effects other than web design. If there’s parts of site design that can be accomplished with XHTML/CSS or JavaScript, then by all means allow us programmers and designers to keep it that way. Do yourself and your potential customers a favor and take all of this into consideration before asking for a full flash web site design.</p>
]]></content:encoded>
			<wfw:commentRss>http://the-dro.com/web-design/my-opinions-on-using-flash-for-web-design/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>40 Tips for optimizing your php code</title>
		<link>http://the-dro.com/web-design/programming/40-tips-for-optimizing-your-php-code/</link>
		<comments>http://the-dro.com/web-design/programming/40-tips-for-optimizing-your-php-code/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 23:22:23 +0000</pubDate>
		<dc:creator>The Dro</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[clean code]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[echo]]></category>
		<category><![CDATA[LinkedIn]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[optimizing]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php optimization]]></category>
		<category><![CDATA[print]]></category>

		<guid isPermaLink="false">http://the-dro.com/?p=14</guid>
		<description><![CDATA[Great article I found on <a href="http://reinholdweber.com/">http://reinholdweber.com/</a> about optimizing your php code.]]></description>
			<content:encoded><![CDATA[<p>Great article I found on <a href="http://reinholdweber.com/">http://reinholdweber.com/</a> about optimizing your php code.<br />
</p>
<ol>
<li>If a method can be static, declare it static. Speed improvement is by a factor of 4.</li>
<li><em>echo</em> is faster than <em>print</em>.</li>
<li>Use echo&#8217;s multiple parameters instead of string concatenation.</li>
<p><span id="more-14"></span></p>
<li>Set the maxvalue for your for-loops before and not in the loop.</li>
<li>Unset your variables to free memory, especially large arrays.</li>
<li>Avoid magic like __get, __set, __autoload</li>
<li>require_once() is expensive</li>
<li>Use full paths in includes and requires, less time spent on resolving the OS paths.</li>
<li>If you need to find out the time when the script started executing, $_SERVER[’REQUEST_TIME’] is preferred to time()</li>
<li>See if you can use strncasecmp, strpbrk and stripos instead of regex</li>
<li>str_replace is faster than preg_replace, but strtr is faster than str_replace by a factor of 4</li>
<li>If the function, such as string replacement function, accepts both arrays and single characters as arguments, and if your argument list is not too long, consider writing a few redundant replacement statements, passing one character at a time, instead of one line of code that accepts arrays as search and replace arguments.</li>
<li>It&#8217;s better to use switch statements than multi if, else if, statements.</li>
<li>Error suppression with @ is very slow.</li>
<li>Turn on apache&#8217;s mod_deflate</li>
<li>Close your database connections when you&#8217;re done with them</li>
<li>$row[’id’] is 7 times faster than $row[id]</li>
<li>Error messages are expensive</li>
<li>Do not use functions inside of for loop, such as for ($x=0; $x &lt; count($array); $x) The count() function gets called each time.</li>
<li>Incrementing a local variable in a method is the fastest. Nearly the same as calling a local variable in a function.</li>
<li>Incrementing a global variable is 2 times slow than a local var.</li>
<li>Incrementing an object property (eg. $this-&gt;prop++) is 3 times slower than a local variable.</li>
<li>Incrementing an undefined local variable is 9-10 times slower than a pre-initialized one.</li>
<li>Just declaring a global variable without using it in a function also slows things down (by about the same amount as incrementing a local var). PHP probably does a check to see if the global exists.</li>
<li>Method invocation appears to be independent of the number of methods defined in the class because I added 10 more methods to the test class (before and after the test method) with no change in performance.</li>
<li>Methods in derived classes run faster than ones defined in the base class.</li>
<li>A function call with one parameter and an empty function body takes about the same time as doing 7-8 $localvar++ operations. A similar method call is of course about 15 $localvar++ operations.</li>
<li>Surrounding your string by &#8216; instead of &#8221; will make things interpret a  little faster since php looks for variables inside &#8220;&#8230;&#8221; but not inside  &#8216;&#8230;&#8217;. Of course you can only do this when you don&#8217;t need to have  variables in the string.</li>
<li>When echoing strings it&#8217;s faster to separate them by comma instead of dot.   	          Note: This only works with echo, which is a function that can take several strings as arguments.</li>
<li>A PHP script will be served at least 2-10 times slower than a static  HTML page by Apache. Try to use more static HTML pages and fewer  scripts.</li>
<li>Your PHP scripts are recompiled every time unless the scripts are cached. Install a PHP caching product to typically increase performance by 25-100% by removing compile times.</li>
<li>Cache as much as possible. Use memcached &#8211; memcached is a high-performance memory object caching system intended to speed up dynamic web applications by alleviating database load. OP code caches are useful so that your script does not have to be compiled on every request</li>
<li>When working with strings and you need to check that the string is  either of a certain length you&#8217;d understandably would want to use the  strlen() function. This function is pretty quick since it&#8217;s operation  does not perform any calculation but merely return the already known  length of a string available in the zval structure (internal C struct  used to store variables in PHP). However because strlen() is a function  it is still somewhat slow because the function call requires several  operations such as lowercase &amp; hashtable lookup followed by the  execution of said function. In some instance you can improve the speed  of your code by using an isset() trick.Ex.if (strlen($foo) &lt; 5) { echo &#8220;Foo is too short&#8221;; }vs.
<p>if (!isset($foo{5})) { echo &#8220;Foo is too short&#8221;; }</p>
<p>Calling isset() happens to be faster then strlen() because unlike  strlen(), isset() is a language construct and not a function meaning  that it&#8217;s execution does not require function lookups and lowercase.  This means you have virtually no overhead on top of the actual code  that determines the string&#8217;s length.</li>
<li>When incrementing or decrementing the value of the variable $i++  happens to be a tad slower then ++$i. This is something PHP specific  and does not apply to other languages, so don&#8217;t go modifying your C or  Java code thinking it&#8217;ll suddenly become faster, it won&#8217;t. ++$i happens  to be faster in PHP because instead of 4 opcodes used for $i++ you only  need 3. Post incrementation actually causes in the creation of a  temporary var that is then incremented. While pre-incrementation  increases the original value directly. This is one of the optimization  that opcode optimized like Zend&#8217;s PHP optimizer. It is a still a good  idea to keep in mind since not all opcode optimizers perform this  optimization and there are plenty of ISPs and servers running without  an opcode optimizer.</li>
<li>Not everything has to be OOP, often it is too much overhead, each method and object call consumes a lot of memory.</li>
<li>Do not implement every data structure as a class, arrays are useful, too</li>
<li>Don&#8217;t split methods too much, think, which code you will really re-use</li>
<li>You can always split the code of a method later, when needed</li>
<li>Make use of the countless predefined functions</li>
<li>If you have very time consuming functions in your code, consider writing them as C extensions</li>
<li>Profile your code. A profiler shows you, which parts of your code consumes how many time. The Xdebug debugger already contains a profiler. Profiling shows you the bottlenecks in overview</li>
<li>mod_gzip which is available as an Apache module compresses your data on the fly and can reduce the data to transfer up to 80%</li>
<li><a href="http://phplens.com/lens/php-book/optimizing-debugging-php.php" target="_blank">Excellent Article</a> about optimizing php by John Lim</li>
</ol>
<p>This article has been translated in several languages, the newest one is a portuguese translation by <a href="http://blog.lucas-ts.com/programacao/traducao-39-dicas-de-perfomance-php/" target="_blank">Lucas Stephanou</a></p>
]]></content:encoded>
			<wfw:commentRss>http://the-dro.com/web-design/programming/40-tips-for-optimizing-your-php-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
