<?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>Henrique Barroso - Web developer freelancer</title>
	<atom:link href="http://www.henriquebarroso.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.henriquebarroso.com</link>
	<description>Porfolio, Web Development, Design and  Security</description>
	<lastBuildDate>Thu, 02 Sep 2010 03:31:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>jPictag , my first jQuery plugin</title>
		<link>http://www.henriquebarroso.com/jpictag-my-first-jquery-plugin/</link>
		<comments>http://www.henriquebarroso.com/jpictag-my-first-jquery-plugin/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 03:31:57 +0000</pubDate>
		<dc:creator>Henrique B.</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.henriquebarroso.com/?p=337</guid>
		<description><![CDATA[Hi everyone, It&#8217;s with great pleasure that I&#8217;m showing you my first jQuery plugin. It&#8217;s called jPictag and it enables any website to have a image tagging system, much like the ones you see on Facebook or Flickr. Official website: http://www.jpictag.com/ Demos: http://www.jpictag.com/demos NOTE I&#8217;m also giving away 5 free copies to the first ones [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.jpictag.com/"><img src="http://www.henriquebarroso.com/wp-content/uploads/2010/09/logo.png" alt="" title="logo" width="344" height="100" class="alignnone size-full wp-image-338" /></a></p>
<p>Hi everyone,<br />
It&#8217;s with great pleasure that I&#8217;m showing you my first jQuery plugin.<br />
It&#8217;s called jPictag and it enables any website to have a image tagging system, much like the ones you see on Facebook or Flickr.</p>
<p>Official website: <a href="http://www.jpictag.com/">http://www.jpictag.com/</a><br />
Demos: <a href="http://www.jpictag.com/demos">http://www.jpictag.com/demos</a></p>
<p><strong>NOTE</strong> I&#8217;m also giving away 5 free copies to the first ones to comment on this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.henriquebarroso.com/jpictag-my-first-jquery-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Regular expressions from noob to ninja (part I)</title>
		<link>http://www.henriquebarroso.com/regular-expressions-from-noob-to-ninja-part-i/</link>
		<comments>http://www.henriquebarroso.com/regular-expressions-from-noob-to-ninja-part-i/#comments</comments>
		<pubDate>Sun, 20 Jun 2010 18:32:29 +0000</pubDate>
		<dc:creator>Henrique B.</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[regular expressions]]></category>

		<guid isPermaLink="false">http://www.henriquebarroso.com/?p=315</guid>
		<description><![CDATA[I for one have to admit, one of my worse flaws as a web developer was not being able to completely work with regular expressions. There, I said it. I would just normally find a working RE on the web and past it right on my code. However, you have to agree with me, in [...]]]></description>
			<content:encoded><![CDATA[<p>I for one have to admit, one of my worse flaws as a web developer was not being able to completely work with regular expressions.<br />
There, I said it. I would just normally find a working RE on the web and past it right on my code. However, you have to agree with me, in that, regular expressions are somewhat hard to read and understand, even some advanced users have difficulties reading some RE expressions.<br />
But what they bring can be a time safer and it&#8217;s a really great tool that should be under any webdev belt. </p>
<p><span id="more-315"></span></p>
<h4>Erm..yeah, what&#8217;s a regular expression anyway ?</h4>
<p>Ah, my dear friend, regular expressions are like women, hard to understand, but you can&#8217;t-live-without once you find them.<br />
So in a nutshell, regular expressions are well, a string containing it&#8217;s own syntax to match search pattern.<br />
You are probably familiar with wildcards right ? &#8220;dir *.exe&#8221; or &#8220;ls *.sh&#8221;, regular expressions work like this but on a more advanced and more useful way. Their main purpose is to search,find,and get data out of text string or a file, or anything you want actually. </p>
<h4>Where to start ?</h4>
<p>So, I&#8217;m going to keep this simple and I&#8217;m targeting my examples for PHP.<br />
Fire up your IDE or Text editor and past this:</p>
<pre class="brush: php; ">

&lt;?php
	// My first regular expression
	$my_string = &quot;I love regular expressions&quot;;
	preg_match_all(&quot;/love/&quot;, $my_string, $output);
	print_r($output);
?&gt;
</pre>
<p>I&#8217;m only going to explain line number 4 of this example.<br />
We could translate this in plain english to something like: &#8220;find any love words in $my_string variable and put any find matches in $output var as an array&#8221;. Easy right ?</p>
<p>The output of that code will be:</p>
<pre class="brush: php; ">

Array ( [0] =&gt; Array ( [0] =&gt; love ) ) 
</pre>
<p>One match found, great uh ? Well, yeah, but not very useful, I bet that you can find a couple of PHP function that would this as well. But hey you gotta start somewhere right ?</p>
<p>Let&#8217;s try another one, let&#8217;s find out every vowel in that string, let&#8217;s change our RE to:</p>
<pre class="brush: php; ">

&quot;/[aeiou]/&quot;
</pre>
<p>&#8220;What, are those square braces ?&#8221; you may ask. They&#8217;re called character classes and they represent  what your search content must contain, and nothing else, this means that if <a href="http://php.net/manual/en/function.preg-match-all.php">preg_match_all</a> find any letter of those, they will include it in our $output array.<br />
The output will be:</p>
<pre class="brush: php; ">

Array
(
    [0] =&gt; Array
        (
            [0] =&gt; o
            [1] =&gt; e
            [2] =&gt; e
            [3] =&gt; u
            [4] =&gt; a
            [5] =&gt; e
            [6] =&gt; e
            [7] =&gt; i
            [8] =&gt; o
        )

)
</pre>
<p>It found 9 results, but more aware minds might find out that  an &#8220;I&#8221; is missing, the actually only upper case char. Why ?<br />
Simple because our our expression only included low case chars, let&#8217;s change it to</p>
<pre class="brush: php; ">

&quot;/[aeiouAEIOU]/&quot;
</pre>
<pre class="brush: php; ">

Array
(
    [0] =&gt; Array
        (
            [0] =&gt; I
            [1] =&gt; o
            [2] =&gt; e
            [3] =&gt; e
            [4] =&gt; u
            [5] =&gt; a
            [6] =&gt; e
            [7] =&gt; e
            [8] =&gt; i
            [9] =&gt; o
        )

)
</pre>
<p>Ah, there it is, but hey, that is actually stupid. RE actually have a shortcut to include upper and down case it&#8217;s &#8220;/i&#8221; at the end of our RE. So</p>
<pre class="brush: php; ">

&quot;/[aeiou]/i&quot; // &lt;-- notice the &quot;i&quot; at the end
</pre>
<p>The last &#8220;i&#8221; is a shortcut that will find any upper or down chars. Awesome right ? Yeah, I get excited pretty easily&#8230;let&#8217;s move on.</p>
<p>This is all fine and dandy, but what if you want to make sure no vowel is not in that phrase ? The anwser to that is &#8220;^&#8221;.<br />
&#8220;^&#8221; is the no-go in regular expression. Lets look at another example.</p>
<pre class="brush: php; ">

&quot;/[^aeiou]/i&quot; // &lt;-- notice the the ^ inside []
</pre>
<p>Ouput:</p>
<pre class="brush: php; ">

Array
(
    [0] =&gt; Array
        (
            [0] =&gt;
            [1] =&gt; l
            [2] =&gt; v
            [3] =&gt;
            [4] =&gt; r
            [5] =&gt; g
            [6] =&gt; l
            [7] =&gt; r
            [8] =&gt;
            [9] =&gt; x
            [10] =&gt; p
            [11] =&gt; r
            [12] =&gt; s
            [13] =&gt; s
            [14] =&gt; n
            [15] =&gt; s
        )

)
</pre>
<p>Now, there will be times where you probably want to include all the alphabet in that equation.<br />
Let me introduce to you, ranges or &#8220;-&#8221;<br />
Example:</p>
<pre class="brush: php; ">

&quot;/[a-z]/i&quot; 
</pre>
<p>This means: &#8220;find everything between A and Z including lowcase and upper case&#8221;. Easy right ?<br />
You can also include numbers</p>
<pre class="brush: php; ">

&quot;/[a-z0-9]/i&quot; 
</pre>
<p>any letter from A to Z and any number from 0 to 9. Some might ask &#8220;what about the &#8220;-&#8221; char, what if I want to find that ?&#8221;, pretty simple just put in at the beginning of the square braces. </p>
<h4>Let wrap it up&#8230;</h4>
<ul>
<li> PHP has a lot of functions to use with RE (preg_match_all, preg_match, preg_grep, etc..)</li>
<li> An expression is a string that must contain at least &#8220;//&#8221;</li>
<li> <strong>[...]</strong> Character classes and negate character  <strong>[^...]</strong> allows you to list any matching or non-matching chars. The <strong>&#8220;-&#8221;</strong> dash  them represent a range of chars or number, look a it as  a shortcut</li>
<li> <strong>&#8220;/i&#8221;</strong> at the end allows you to make that expression valid both for upper case and downcase
</ul>
<p>On the next chapter we will go a little more deeper and starting to actually doing something more useful with our expressions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.henriquebarroso.com/regular-expressions-from-noob-to-ninja-part-i/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Will it scale ?</title>
		<link>http://www.henriquebarroso.com/will-it-scale/</link>
		<comments>http://www.henriquebarroso.com/will-it-scale/#comments</comments>
		<pubDate>Tue, 11 May 2010 02:19:33 +0000</pubDate>
		<dc:creator>Henrique B.</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[scalable]]></category>

		<guid isPermaLink="false">http://www.henriquebarroso.com/?p=303</guid>
		<description><![CDATA[&#8220;Does MySQL scale ?&#8221;, &#8220;Does Rails scale ?&#8221;, &#8220;Will Django Scale ?&#8221;. Any association with the web show &#8220;Will it blend&#8221; are merely coincidental. Or is it ? This article targets on the most top asked question today for developers and anyone related to technology. Which is &#8220;Yeah, but does _____ scale ?&#8221;. Everyone seems [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;Does MySQL scale ?&#8221;, &#8220;Does Rails scale ?&#8221;, &#8220;Will Django Scale ?&#8221;.
<p>Any association with the web show <em>&#8220;Will it blend&#8221;</em> are merely coincidental. Or is it ?<br />
This article targets on the most top asked question today for developers and anyone related to technology. Which is <strong>&#8220;Yeah, but does _____ scale ?&#8221;</strong>.
<p>Everyone seems to worry too much about scalability, people turn down frameworks and databases based on that argument. My question however is <strong>&#8220;Do you really need to scale it?&#8221;</strong>. </p>
<p>For example, one of the most recent myths is that Rails can&#8217;t scale, and people say it because Twitter, yes, that huge 50 million messages per day website had some issues scaling itself. I know it&#8217;s good to have some vision, but come on, do you really expect to get that kind of traffic on your website ?<br />
And if you  remotely do, would you blame Rails for it ?
<p>Don&#8217;t get me wrong, you <strong><u>SHOULD</u></strong> build with scalability in mind, it&#8217;s one of the &#8220;must have principles&#8221;, but what you don&#8217;t need is to stress yourself and neglect some good technology just because some random top 10 website is having some slightly issues with it. Scalability from my point of view is not something  directly related with a framework or database, but with how you plan your application, and how you architect  it. A couple of months ago I&#8217;ve a met this guy who was brainwashing his entire team with how good CouchDB was and how it would improve their app performance , yes CouchDB piece of software but this comes from the same guy that was creating a CRM using iframes with <strong>meta http-equiv=&#8221;refresh&#8221; content=&#8221;600&#8243;</strong> all over it.  See where I&#8217;m heading ?
<p>Scalability should be in all aspects of you project, from optimized code algorithms to server infrastructures. Because in the end the main goal is: Speed and uptime. But you shouldn&#8217;t rely only on one technology or trash another because your site won&#8217;t scale. From what I know, everything scales, yes, sometimes it can be a really pain in the <em>arse</em>, but for most of us, worrying about it and waste precious time debating it , is in fact, worse, because you don&#8217;t get anything done.
<p>We worry too much, we over analyze things too much, we are very pessimistic and we are always expecting that the world will end tomorrow. The truth is , no it won&#8217;t. If you build it with good principals in mind, no matter what technology you use, and write this down, <strong>&#8220;It will scale&#8221;</strong>.<br />
So just free yourself of this &#8220;should I use this ?&#8221; and get your stuff done.</p>
<p>
PS: just look at Facebook and their PHP <img src='http://www.henriquebarroso.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />   </p>
]]></content:encoded>
			<wfw:commentRss>http://www.henriquebarroso.com/will-it-scale/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Do you really need to create your own framework ?</title>
		<link>http://www.henriquebarroso.com/do-you-really-need-to-create-your-own-framework/</link>
		<comments>http://www.henriquebarroso.com/do-you-really-need-to-create-your-own-framework/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 15:47:26 +0000</pubDate>
		<dc:creator>Henrique B.</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[frameworks]]></category>

		<guid isPermaLink="false">http://www.henriquebarroso.com/?p=290</guid>
		<description><![CDATA[I don&#8217;t know if it&#8217;s just me, but every time a new framework hype arrives you get all this discussions between people who say wonderful things about it, and people who just hate them, or simply don&#8217;t care. As a professional web developer for almost 9 years and a web/internet enthusiast for, well&#8230;almost my entire [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know  if it&#8217;s just me, but every time a new framework hype arrives you get all this discussions between people who say wonderful things about it, and people who just hate them, or simply don&#8217;t care.</p>
<p>As a professional web developer for almost 9 years and a web/internet enthusiast for, well&#8230;almost my entire life, I&#8217;ve came across with a lot of different ways of doing things.<br />
I remember when some people said &#8220;man, you gotta learn Flash/JAVA, it will be the end of HTML for good&#8221;, I think Apple is laughing at them right now. Oh, and I never really learned flash, except for some little AS script skills. Point being is, technologies come and go and you either learn them or reject them. At the end of the day it&#8217;s really up to you. Do you really want to kill a bird with a bazooka , or an elephant with a mouse trap ?</p>
<p>Today however, language frameworks are the ones in the spot light, you have, Ruby on Rails; Django; Kohana, etc.. and some people just simply refuse to use it.<br />
Why ? Well, some of them argue that in order to become a really programmer you need to know how to create a framework, you have to know how things are done.<br />
You can agree with them, in fact, if you are learning a new language, doing things from scratch can really help you. Or can&#8217;t ?</p>
<p>It depends, are you a very good programmer ? Or a lousy one ? If you are a lousy one, chances are you will not learn anything by creating a framework, in fact it will even make you a worse one. Why ? Well, a framework is a very overwhelming piece of software, it&#8217;s like building a factory for creating not just one type of product but a lot of different ones. And if the factory is not correctly build, your products will not be good, or worst case scenario, your factory won&#8217;t fit your needs in a long run.<br /> Besides, most of this custom frameworks are created by one person, which leaves them with a lot of stuff to think of, while open source can be contributed by many, and so it can get more stable much faster. And don&#8217;t get me started on bugs and security. Also, the fact is, if you don&#8217;t comment or document your code in a year or two you will not know what your code is actually doing, and then you start to think of creating a new one from scratch. </p>
<p>I&#8217;m against creating a custom framework without being OS. Not against custom code of course. But call it whatever you want, but building custom code should meet a very specific purpose. Look at Facebook for instance, they&#8217;ve created their own app, hell, they even created their own PHP compiler, but because they really need it. On the other hand you have Twitter with almost 7TB of tweets per day, and they are running RoR (Or were, according to Techcrunch). So what&#8217;s your purpose for creating your framework ?</p>
<p>In fact, I believe most of people who create custom frameworks for their own are unexperienced programmers. Why ? Most of the professionals programmers I know use or learn a framework, not because they don&#8217;t know how to code, but because they&#8217;ve all done what the framework does, and we are sick reinventing the wheel every time. Been there, done that, got the t-shirt. So why waste more time creating it ? Why not just use that time to create something meaningful, instead of worrying about ORM, Cache, template, form validations, etc. It&#8217;s old and it&#8217;s boring. I could that if I wanted, but I don&#8217;t have to, it won&#8217;t add any more value to me as a programmer.</p>
<p>If you need something more specific that a framework can&#8217;t do, do it yourself, nothing wrong about that, this is where you will learn something, because you never done it.</p>
<p>At the end, I believe that the good programmers who create their own framework are afraid of just letting go. Are afraid of stopping to worry about specific issues that their users won&#8217;t even know it&#8217;s there, like core code. It&#8217;s like they need to do that from bottom up, in order to believe that they are the hardcore-kick-ass-coders.</p>
<p>So, do you really need to create your own framework ?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.henriquebarroso.com/do-you-really-need-to-create-your-own-framework/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Books you should be reading right now</title>
		<link>http://www.henriquebarroso.com/books-you-should-be-reading-right-now/</link>
		<comments>http://www.henriquebarroso.com/books-you-should-be-reading-right-now/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 13:41:51 +0000</pubDate>
		<dc:creator>Henrique B.</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Startups]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[books]]></category>

		<guid isPermaLink="false">http://www.henriquebarroso.com/?p=259</guid>
		<description><![CDATA[If you work as a developer, designer or something in between, you know you must update your skills. It&#8217;s like fuel, you got to have it, otherwise you will end up in a dead end with little work, or worse, no work at all. If you are like me, you hate being outdated and you [...]]]></description>
			<content:encoded><![CDATA[<p>If you work as a developer, designer or something in between, you know you must update your skills.  It&#8217;s like fuel, you got to have it, otherwise you will end up in a dead end with little work, or worse, no work at all.<br />
If you are like me, you hate being outdated and you are curious about new stuff that comes out almost every week.<br />
It&#8217;s kinda hard to keep up with it all, so many new technologies, some of them will prevail some of them won&#8217;t. What to choose ?<br />
Should your precious time  be considered for learning a new technology that may be forgotten in a couple of months ?</p>
<p>Well, it&#8217;s really up to you.<br />
I will however try to help you. Here are some of books you should be reading in order to improve your technical and personal skills.</p>
<p><img src="http://www.henriquebarroso.com/wp-content/uploads/2010/04/django3.jpg" alt="The Definitive Guide to Django: Web Development Done Right, Second Edition" title="The Definitive Guide to Django: Web Development Done Right, Second Edition" /><br />
<strong>The Definitive Guide to Django: Web Development Done Right, Second Edition</strong><br />
If you don&#8217;t know what <a href="http://www.djangoproject.com/" target="_blank">Django</a> is, you really should come out of that rock more often. Django is a <del>MVC</del> MVT Python framework, and in one word, <strong>&#8220;awesome&#8221;</strong> is what comes to my mind. Django is an ORM, fully OO, already build with a cool template system, plus a ready-to go admin interface. If you don&#8217;t know Python don&#8217;t worry, it&#8217;s a very easy language to learn.</p>
<p><img src="http://www.henriquebarroso.com/wp-content/uploads/2010/04/mongodb.png" alt="CouchDB: The Definitive Guide" title="CouchDB: The Definitive Guide" width="100" height="132" class="size-full wp-image-277" /><br />
<strong>CouchDB: The Definitive Guide</strong><br />
CouchDB is a fully high-scalable database, it&#8217;s also known as a NoSQL database, and if you are building web apps for a huge crowd, you will definitely need to know this. </p>
<p><img src="http://www.henriquebarroso.com/wp-content/uploads/2010/04/dontmakemethink1.png" alt="Don&#039;t make me think" title="Don&#039;t make me think" width="100" height="129" class="size-full wp-image-278" /><br />
<strong>Don&#8217;t make me think</strong><br />
What can let your application to fail , even if it&#8217;s a good tool ? Speed ? Marketing ? No, <strong>usability</strong>, if your application is hard to understand and to use, users won&#8217;t, well&#8230;.use it, even if it do wonders behind it. So get this book and start doing some designs with user usability concerns.</p>
<p><img src="http://www.henriquebarroso.com/wp-content/uploads/2010/04/rework1.jpg" alt="rework" title="rework" width="100" height="152" class="size-full wp-image-279" /><br />
<strong>Rework</strong><br />
This book is mind blowing if you like me hate the way some of the IT companies are run out. It was written by <strong>Jason Fried</strong> and <strong>David Heinemeier Hansson</strong> from <a href="http://37signals.com/" target="_blank">37Signals</a>. It&#8217;s all so simple stuff that really makes you think, for instance, why some projects fail and why workaholics are bad for a company, why less is more, and why VC funding is not always the best option. I&#8217;ve read it in 3hours, awesome.</p>
<p><img src="http://www.henriquebarroso.com/wp-content/uploads/2010/04/webappsdesignpatterns1.jpg" alt="Web Application Design Patterns (Interactive Technologies)" title="Web Application Design Patterns (Interactive Technologies)" width="100" height="130" class="size-full wp-image-281" /><br />
<strong>Web Application Design Patterns (Interactive Technologies)</strong><br />
This is not a so technical book, but has great tips on how to design great web apps by comparing with some of the best web sites right now. Once again, it&#8217;s never enough to bold the statement that a great web app can&#8217;t be just a good tool, it must be user friendly and easy to use.</p>
<p><img src="http://www.henriquebarroso.com/wp-content/uploads/2010/04/html5css31.jpg" alt="Beginning HTML5 and CSS3: Next Generation Web Standards" title="Beginning HTML5 and CSS3: Next Generation Web Standards" width="100" height="100" class="size-full wp-image-282" /><br />
<strong>Beginning HTML5 and CSS3: Next Generation Web Standards</strong><br />
I really shouldn&#8217;t even tell you why you should read this. Specially if you are front end dev.</p>
<p><strong>Update:</strong> This book is not yet published, but you should really consider it in a couple of months.</p>
<p>A lot more could be added, give me your feedback and what books should be here for a second part of this series.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.henriquebarroso.com/books-you-should-be-reading-right-now/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change your wallpaper with Python</title>
		<link>http://www.henriquebarroso.com/change-your-wallpaper-with-python/</link>
		<comments>http://www.henriquebarroso.com/change-your-wallpaper-with-python/#comments</comments>
		<pubDate>Tue, 26 May 2009 21:19:14 +0000</pubDate>
		<dc:creator>Henrique B.</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[wallpaper]]></category>

		<guid isPermaLink="false">http://www.henriquebarroso.com/?p=207</guid>
		<description><![CDATA[From a while I&#8217;ve been coding in Python. Exploring it&#8217;s potentialities . And they&#8217;re a lot, from topnotch frameworks like Django, to an excellent easy to read syntax, nice graphic libraries and a great participative community. Today we I will show you how to create a script that allows you to change your desktop wallpaper [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.henriquebarroso.com/wp-content/uploads/2009/05/python-wallpaper.jpg" alt="python-wallpaper" title="python-wallpaper" width="200" height="200" class="alignleft size-full wp-image-208" /><br />
From a while I&#8217;ve been coding in Python. Exploring it&#8217;s potentialities . And they&#8217;re a lot, from topnotch frameworks like <a href="http://www.djangoproject.com/">Django</a>, to an excellent easy to read syntax, nice graphic libraries and a great participative community.<br />
Today we I will show you how to create a script that allows you to change your desktop wallpaper with random backgrounds.( Windows only).</p>
<p><span id="more-207"></span><br />
<br />
<a href="http://labs.henriquebarroso.com/wallpaper.zip">Download (1kb)</a> </p>
<p>Everytime I start to learn a new language I like to create some simple scripts or applications, just to try to apply some of the knowledge I&#8217;ve acquired .<br />
So, this time I will create a simple script that will fetch from a directory a random image and put it as your wallpaper.</p>
<h4>Objective</h4>
<ul>
<li>Change the wallpaper every time we run the script</li>
<li>Let the user choose the searching directory as a parameter</li>
<li>Define as a startup script</li>
</ul>
<h4>Requirements</h4>
<ul>
<li><a href="http://www.python.org/">Python 2.5</a> (duh&#8230;)</li>
<li><a href="http://www.pythonware.com/products/pil/">Python Image Library</a></li>
</ul>
<h4>Code</h4>
<pre class="brush: python; ">

import ctypes
import Image
import os
import sys
import random
</pre>
<p>These are the libraries that we will use, there it is <strong>Image aka PIL</strong>.<br />
Now, I won&#8217;t lie, I&#8217;m pretty new at Python, so I really don&#8217;t know if Python brings a more simple Image lib, in these case to convert to .bmp, so for now we will use PIL.</p>
<pre class="brush: python; ">

def wallpaper_dir(path):
	try:
		directory = os.listdir(path)
	except WindowsError:
		print &quot;Directory does not exist&quot;
		exit(0)
	wallpapers = []
	types = [&#039;jpg&#039;, &#039;png&#039;, &#039;gif&#039;]
	for file in directory:
		ext = file[-3::]
                if ext in types:
        		wallpapers.append(path + file)
	return wallpapers
</pre>
<p>This function we be responsible for the search on a specific directory for image files, in this case i&#8217;ve used only the most used types, jpg, gif and png.<br />
It&#8217;s not a recursive function, so it will not search on sub directories. The main purpose here it&#8217;s to have a dir with a lot of images and let our script search for one,<br />
I think the code speaks for himself, you can rapidly know what&#8217;s going on. The var <strong>directory</strong> will keep on a <strong>List</strong> every file found by the method <strong>os.listdir</strong> by the param <strong>Path </strong> of our function.</p>
<p>After that, it will go through the List and search for every .jpg, .png and .gif files, as in, the last 3 chars of each item <strong>ext = file[-3::]</strong>. I as you may guess, it will not validate if it&#8217;s an image or not, but you can do that pretty easily with PIL.</p>
<pre class="brush: python; ">

def set_wallpaper(wallpapers):
	random.seed()
	random.shuffle(wallpapers)
	wallpaper = random.sample(wallpapers,1)
	im = Image.open(wallpaper[0])
	im.save(&quot;wallpaper.bmp&quot;)
	MY_WALLPAPER = &quot;wallpaper.bmp&quot;
	SPI_SETDESKWALLPAPER = 20
	ctypes.windll.user32.SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0, MY_WALLPAPER , 0)
</pre>
<p>This is like the main function of our script, by the param <strong>wallpapers</strong> which in reality it&#8217;s nothing more than  a <strong>List</strong> of the previous result, this function  will randomly choose a file and covert it to .bmp, and using WIN32 API function it will change your wallpaper.<br />
Again, the code speaks for itself, that&#8217;s on the things I love about Python, the code speaks for himself.</p>
<pre class="brush: python; ">

def main(argv):
	if len(sys.argv) &gt; 1:
		sys.argv[1] = sys.argv[1] + &quot;/&quot;
		wallpapers = wallpaper_dir(sys.argv[1]);
		if len(wallpapers) &gt; 0:
			set_wallpaper(wallpapers)
		else:
			print &quot;No wallpapers were found.&quot;
	else:
		print &quot;Usage: wallpaper.py &lt;dir&gt;&quot;	

if __name__ == &quot;__main__&quot;:
	main(sys.argv)
</pre>
<p>At last  we have <strong>main()</strong> function, that will receive a parameter  from the command line indicating where&#8217;s the wallpaper directory.</p>
<p>Now we just need to run it, e.g &#8220;wallpaper.py c:\wallpapers&#8221;  and let it work his magic.</p>
<p>For the startup, all you need to do is a shortcut and drag it to your &#8220;startup&#8221; folder in &#8220;Start&#8221; windows menu.</p>
<p>I hope you&#8217;ve enjoyd it.</p>
<p>
<a href="http://labs.henriquebarroso.com/wallpaper.zip">Download (1kb)</a> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.henriquebarroso.com/change-your-wallpaper-with-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to simulate digg comments style</title>
		<link>http://www.henriquebarroso.com/how-to-simulate-digg-comments-styl/</link>
		<comments>http://www.henriquebarroso.com/how-to-simulate-digg-comments-styl/#comments</comments>
		<pubDate>Thu, 21 May 2009 20:03:04 +0000</pubDate>
		<dc:creator>Henrique B.</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.henriquebarroso.com/?p=187</guid>
		<description><![CDATA[Today we will play (once again) with jQuery. This time we will simulate the digg&#8217;s comment style, scroller style. I mean, let&#8217;s imitate how digg shows the &#8220;more&#8221; comments with jQuery (Ajax) and PHP. Source Code(25KB) &#124; See Demo Some love it, some hate it the way digg&#8217;s show their comments in a scroller way. [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.henriquebarroso.com/wp-content/uploads/2009/05/diggcomments.jpg" alt="diggcomments" title="diggcomments" width="200" height="200" class="alignleft size-full wp-image-188" /> Today we will play (once again) with <a href="http://www.jquery.com/">jQuery</a>.<br />
This time we will simulate the digg&#8217;s comment style, scroller style. I mean, let&#8217;s imitate how digg shows the &#8220;more&#8221; comments with <strong>jQuery (Ajax)</strong> and <strong>PHP</strong>.<br />
<span id="more-187"></span></p>
<p><a href="http://labs.henriquebarroso.com/diggcomments/diggcomments.zip">Source Code(25KB)</a> | <a href="http://labs.henriquebarroso.com/diggcomments/">See Demo</a></p>
<p>Some love it, some hate it the way digg&#8217;s show their comments in a scroller way.<br />
I for one, love it, in a sense that don&#8217;t make the visitor to go through every page to read user comments (boring&#8230;).</p>
<p><strong>WARNING, this is only a prototype, we will not create DB or reply functions. It will only serve as a base, even though the rest can easily be implemented </strong></p>
<h4>HTML</h4>
<p>To start, lets define our HTML. I will not stretch  too much on this step. I will simple try to reproduce the digg comments style presentation.<br />
<strong>index.php</strong></p>
<pre class="brush: html; ">

&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;
                    &quot;http://www.w3.org/TR/html4/loose.dtd&quot;&gt;
&lt;html&gt;
&lt;head&gt;
	&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot;/&gt;
	&lt;title&gt;Digg comment style&lt;/title&gt;
	&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;style.css&quot;/&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id=&quot;comments&quot;&gt;
	&lt;ul&gt;
		&lt;li&gt;
			&lt;div class=&quot;comment&quot; id=&quot;comment_1&quot;&gt;
				&lt;div class=&quot;avatar&quot;&gt;
					&lt;img src=&quot;img/avatar.jpg&quot; align=&quot;left&quot;&gt;
					&lt;strong&gt;User&lt;/strong&gt;&lt;br&gt;
					&lt;div  class=&quot;date&quot;&gt;Today, 15:31&lt;/div&gt;
				&lt;/div&gt;
				&lt;div class=&quot;message&quot;&gt;
					Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
				&lt;/div&gt;
				&lt;div style=&quot;clear:both;&quot;&gt;&lt;/div&gt;
			&lt;/div&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
&lt;/div&gt;

&lt;div id=&quot;scroller&quot;&gt;
	&lt;a href=&quot;#&quot; id=&quot;vermais&quot;&gt;See more&lt;/a&gt;
&lt;/div&gt;
&lt;div id=&quot;status&quot; style=&quot;display:none&quot;&gt;Loading...&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>Like I said, this is only a prototype, a div <strong>comment_1</strong> is there only to make some data appear visible, obviously that if this was a production site, there will be a <strong>foreach</strong>.<br />
You may have noticed that the  div <strong>comment_1</strong> is inside a <strong>UL</strong> and <strong>LI</strong>, this will help us in case you need, to have replys inside an comment, and became organized in a hierarchy way.</p>
<p>Look at this.</p>
<pre class="brush: html; ">

&lt;div id=&quot;scroller&quot;&gt;
	&lt;a href=&quot;#&quot; id=&quot;vermais&quot;&gt;More&lt;/a&gt;
&lt;/div&gt;
&lt;div id=&quot;status&quot; style=&quot;display:none&quot;&gt;Loading...&lt;/div&gt;
</pre>
<p>Two divs, the last one <strong>status</strong>, will only became visible when we are loading through Ajax the next comments.</p>
<h4>Comments</h4>
<p>Since this is only a example, we will have to create a PHP file to simulate the comments request from <strong>ajax</strong>.<br />
For our example I&#8217;ve created the file <strong>comments.php</strong>.</p>
<pre class="brush: php; ">

&lt;ul  style=&quot;display:none&quot;&gt;

&lt;?
	$x = 0;
	while($x &lt;= 10){
?&gt;
	&lt;li&gt;
		&lt;div class=&quot;comment&quot; id=&quot;comment_1&quot;&gt;
			&lt;div class=&quot;avatar&quot;&gt;
				&lt;img src=&quot;img/avatar.jpg&quot; align=&quot;left&quot;&gt;
				&lt;strong&gt;User&lt;/strong&gt;&lt;br&gt;
				&lt;div  class=&quot;date&quot;&gt;Today, 15:31&lt;/div&gt;
			&lt;/div&gt;
			&lt;div class=&quot;message&quot;&gt;
				Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
				&lt;br clear=&quot;all&quot; /&gt;
			&lt;/div&gt;
			&lt;div style=&quot;clear:both;&quot;&gt;&lt;/div&gt;
		&lt;/div&gt;
	&lt;/li&gt;
&lt;?
		$x++;
	}
?&gt;
&lt;/ul&gt;
</pre>
<p>Very simple, a loop to generate 10 comments  everytime we make a request.<br />
Notice the first line:</p>
<pre class="brush: html; ">

&lt;ul  style=&quot;display:none&quot;&gt;
</pre>
<p>This is very important, because in our example we will &#8220;animate&#8221; from <strong>jQuery</strong> all the comments that we are requesting, giving it a more smooth look (something digg still doesn&#8217;t have haha).<br />
Where&#8217;s <strong>jQuery</strong> ???</p>
<h4>Ajax</h4>
<p>In the file <strong>index.php</strong> insert:</p>
<pre class="brush: javascript; ">

&lt;script src=&quot;http://code.jquery.com/jquery-latest.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;
	$(document).ready(function(){
		$(&quot;#vermais&quot;).click(function(){
			var html = $.ajax({
			  url: &quot;comments.php&quot;,
			  async: false,
			  beforeSend: function(){
			   		$(&quot;#status&quot;).css({&#039;display&#039; : &#039;block&#039;})
		  	  	},
		  	  complete: function(){
			   		$(&quot;#status&quot;).css({&#039;display&#039; : &#039;none&#039;})
	  	  		}
			 }).responseText;
			$(&quot;#comments&quot;).append(html);
			$(&quot;ul:last&quot;).slideDown(&quot;slow&quot;);
		});
	});
&lt;/script&gt;

//insert before the &lt;/body&gt;
</pre>
<p>This code it&#8217;s pretty simple, when the vistor hits the link with the ID <strong> #vermais</strong>, a request will be made from Ajax  <strong> $.ajax</strong> to our page <strong>comments.php</strong>, and it will save this data on a variable <strong>var html</strong>.<br />
We can see that there&#8217;s two more events, <strong>beforesend</strong> and <strong>complete</strong>, these will show and hide the div <strong>status</strong>, the one the shows &#8220;loading&#8230;&#8221;.</p>
<p>Using the function <strong>append</strong>  we will add to our <strong>#comments</strong> div the data from the <strong>var html</strong>, and for last we will use our <strong>slideDown</strong> effect.<br />
<br />
Do you remember our first line in the HTML file from <strong>comments.php</strong> ?<br />
In case we don&#8217;t have it, the <strong>slideDown</strong> effect will not work, because it will be already visible from the start.</p>
<p>As you can see, it gives a nice effect, instead of the some boring &#8220;next&#8221; and &#8220;previous&#8221; comments pages.<br />
Like I said, this is only a simple script on how to simulate this kind of presentation.</p>
<p><strong>Cool things to add:</strong></p>
<ul>
<li>Allow replys</li>
<li>Replace &#8220;more&#8221; with the total pages, eg: 1-10 ; 11-20; 21-30; etc.</li>
<li>Show at the page&#8217;s top the total of comments</li>
<li>Allow to expand all of the comments and replys</li>
</ul>
<p></p>
<p><a href="http://labs.henriquebarroso.com/diggcomments/diggcomments.zip">Source ode (25KB)</a> | <a href="http://labs.henriquebarroso.com/diggcomments/">See more</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.henriquebarroso.com/how-to-simulate-digg-comments-styl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The secret of making money on the Internet</title>
		<link>http://www.henriquebarroso.com/the-secret-of-making-money-on-the-internet/</link>
		<comments>http://www.henriquebarroso.com/the-secret-of-making-money-on-the-internet/#comments</comments>
		<pubDate>Thu, 14 May 2009 22:52:11 +0000</pubDate>
		<dc:creator>Henrique B.</dc:creator>
				<category><![CDATA[Startups]]></category>
		<category><![CDATA[ideas]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[money]]></category>

		<guid isPermaLink="false">http://www.henriquebarroso.com/?p=181</guid>
		<description><![CDATA[Not so long ago, I saw a video that inspired me. This is a presentation made by David Heinemeier Hansson , creator of Ruby on Rails. He explains how we can make money on the internet. I though I should share this, not only is a complete fresh way to see it, but also inspiring. [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.henriquebarroso.com/wp-content/uploads/2009/05/david-heinemeier-hansson.jpg" alt="david-heinemeier-hansson" title="david-heinemeier-hansson" width="200" height="200" class="alignleft size-full wp-image-183" style="margin-bottom:20px" /><br />
Not so long ago, I saw a video that inspired me.<br />
This is a presentation made by  <strong>David Heinemeier Hansson </strong>, creator of <a href="http://rubyonrails.org/">Ruby on Rails</a>.<br />
He explains how we can make money on the internet. I though I should share this, not only is a complete fresh way to see it, but also inspiring.</p>
<p><span id="more-181"></span></p>
<p><object width='520' height='276'><param name='movie' value='http://www.omnisio.com/bin/Embed.swf?embedID=dvkTBcd0Sr3yehadbiFy2w' /><param name='bgcolor' value='#FFFFFF' /><param name='quality' value='high' /><param name='allowscriptaccess' value='always' /><param name='allowfullscreen' value='true' /><embed type='application/x-shockwave-flash' src='http://www.omnisio.com/bin/Embed.swf?embedID=dvkTBcd0Sr3yehadbiFy2w' bgcolor='#FFFFFF' quality='high' allowfullscreen='true' allowscriptaccess='always' width='520' height='276' ><noembed>
<div><a href='http://www.omnisio.com'>Share and annotate your videos</a> with Omnisio!</div>
<p></noembed></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.henriquebarroso.com/the-secret-of-making-money-on-the-internet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a slide menu with jQuery</title>
		<link>http://www.henriquebarroso.com/creating-a-slide-menu-with-jquery/</link>
		<comments>http://www.henriquebarroso.com/creating-a-slide-menu-with-jquery/#comments</comments>
		<pubDate>Thu, 14 May 2009 16:44:00 +0000</pubDate>
		<dc:creator>Henrique B.</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.henriquebarroso.com/?p=118</guid>
		<description><![CDATA[Today we will work with jQuery. Wanna see how to make a sleek slide menu with only 13 lines of code ? Don&#8217;t you believe ? Source code (21kb) &#124; See demo I will assume that most of you already know jQuery, but if that&#8217;s not the case, this is a nice way to explore [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-167" title="slide_menu" src="http://www.henriquebarroso.com/wp-content/uploads/2009/05/slide_menu.jpg" alt="slide_menu" width="200" height="200" /> Today we will work with <a href="http://jquery.com/">jQuery</a>.<br />
Wanna see how to make a sleek slide menu with only 13 lines of code ? Don&#8217;t you believe ?<br />
<span id="more-118"></span></p>
<p><a href="http://labs.henriquebarroso.com/jquerymenu/jquerymenu.zip">Source code (21kb)</a> | <a href="http://labs.henriquebarroso.com/jquerymenu/">See demo</a><br />
I will assume that most of you already know <strong>jQuery</strong>, but if that&#8217;s not the case, this is a nice way to explore some of it&#8217;s features.<br />
I did this menu in a couple of minutes, I can even say that it took me longer to write this article and to create the menu itself.<br />
We live happy times my friends. Does anyone still remember the huge lines of weird javascript that was neeed it to create something that moved ?<br />
I do, web dark ages. Fortunately today we have some great top-noch frameworks that helps us in this process, and let us have more free time and to work on what really matters. So let&#8217;s get going.</p>
<h4>Skeleton</h4>
<p>Let&#8217;s start by creating the html skeleton.<br />
On the header we will put our <strong>jQuery</strong> library.</p>
<pre class="brush: html; ">

&lt;script src=&quot;jquery-1.3.2.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
</pre>
<p>Inside the BODY tag we will create our menu.</p>
<pre class="brush: html; ">

&lt;ul&gt;
	&lt;li id=&quot;m1&quot;&gt;&lt;a href=&quot;#&quot;&gt;Menu 1&lt;/a&gt;&lt;/li&gt;
	&lt;li id=&quot;m2&quot;&gt;&lt;a href=&quot;#&quot;&gt;Menu 2&lt;/a&gt;&lt;/li&gt;
	&lt;li id=&quot;m3&quot;&gt;&lt;a href=&quot;#&quot;&gt;Menu 3&lt;/a&gt;&lt;/li&gt;
	&lt;li id=&quot;m4&quot;&gt;&lt;a href=&quot;#&quot;&gt;Menu 4&lt;/a&gt;&lt;/li&gt;
	&lt;li id=&quot;m5&quot;&gt;&lt;a href=&quot;#&quot;&gt;Menu 5&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</pre>
<p>We can&#8217;t already call this a menu, but we are in a good path.</p>
<p><img class="alignnone size-full wp-image-137" title="slidemenu_01" src="http://www.henriquebarroso.com/wp-content/uploads/2009/05/slidemenu_01.jpg" alt="slidemenu_01" width="455" height="134" /></p>
<h4>CSS</h4>
<p>Let&#8217;s give some color to this menu.</p>
<pre class="brush: css; ">

&lt;style&gt;
	*{ padding: 0; margin: 0; }

	.menuitem{
		width:100px;
		height:40px;
		list-style:none;
		margin:0px;
		padding:3px;
		font: 13px &quot;Lucida Sans Unicode&quot;;
		color:#fff;
		text-align:right;
		float:left;
	}

	.menuitem a{
		display:block;
		float:none;
		height:40px;
		color:#fff;
		text-decoration:none;
	}

	#m1{ background-color: #ef9200; }
	#m2{ background-color: #d21044; }
	#m3{ background-color: #bf041d; }
	#m4{ background-color: #350d25; }
	#m5{ background-color: #251112; }
&lt;/style&gt;
</pre>
<h4>Action</h4>
<p>Our menu is a little bit more presentable. But, where is <strong>jQuery</strong> ?<br />
This is were we work our magic. Read the comment lines so you can understand better what is being done.</p>
<pre class="brush: javascript; ">

&lt;script&gt;
	//As soon as the document is loaded...
	$(document).ready(function(){
		//Let change the style class for every &lt;li&gt;
		$(&quot;li&quot;).addClass(&quot;menuitem&quot;);
		//Creates an event HOVER
		$(&quot;li&quot;).hover(
			//this is the function of hover
			function(){
				//stop all animations
				$(this).stop();
				//use the function animate, and enlarge the menu by 200px in 0,3sec.
				$(this).animate({width: &quot;200px&quot;},300);
			},
			//this is the function OUT
			function(){
				$(this).stop();
				$(this).animate({width: &quot;100px&quot;},300);
			}
		);
	});
&lt;/script&gt;
</pre>
<p>And that&#8217;s it-<br />
We have a sleek sexy functional menu, with clean code without the need of  Flash or anything like it.<br />
I hope you&#8217;ve enjoyed it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.henriquebarroso.com/creating-a-slide-menu-with-jquery/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>8 ways to improve your website&#8217;s SEO</title>
		<link>http://www.henriquebarroso.com/8-ways-to-improve-your-websites-seo/</link>
		<comments>http://www.henriquebarroso.com/8-ways-to-improve-your-websites-seo/#comments</comments>
		<pubDate>Thu, 14 May 2009 01:45:28 +0000</pubDate>
		<dc:creator>Henrique B.</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[accessbility]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[sitemaps]]></category>

		<guid isPermaLink="false">http://www.henriquebarroso.com/?p=64</guid>
		<description><![CDATA[One of the most frequently questions that people make me is &#8220;How do I make google index my website faster and in top results ?&#8221;. Now, I don&#8217;t have the secret, that will involve knowing exactly how google&#8217;s algorithm work. But what I will do, is to share some of my techniques that I use [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-169" title="seo_seo" src="http://www.henriquebarroso.com/wp-content/uploads/2009/05/seo_seo.jpg" alt="seo_seo" width="200" height="200" /><br />
One of the most frequently questions that people make me is <em>&#8220;How do I make google index my website faster and in top results ?&#8221;</em>.<br />
<span id="more-64"></span></p>
<p>Now, I don&#8217;t have the secret, that will involve knowing exactly how google&#8217;s algorithm work.<br />
But what  I will do, is to share some of my techniques that I use for myself, and how you can get filtred and indexed faster by search engines.</p>
<h4>1. Be URL-google-friendly</h4>
<p>People, for once and for all, forget urls like <strong><span style="color: #000000;">http://www.something.com/index.php?noticiaid=91919</span></strong> and start using a more descriptive one, besides giving your site a more amateur look and feel, and even though Google will index it, it will be much fast to index something like, <span style="color: #000000;"><strong>http://www.something/my-news-title</strong></span>. I think you can pretty much understand why this last url is much better, and yes, the hifen (-) works better than underscore (_), at least for Google.</p>
<h4>2. 100% Flash ?!?!</h4<br />
Google, don't read FLASH. Period.<br />
I heard it will read in the future, but not for now.<br />
I don't care how much animation, weird effects you can put in your flash website, for google your site is nothing more than a .swf file.<br />
Flash is a powerfull tool, but base you site 100% in it is a huge mistake if you depend on content from search engines.<br />
Besides, in accessibility terms, Flash is horrible. Imagine being a handicap visitor, and depending of software applications to read and retrieve the content. In html it's pretty straightforward, but what about flash ?</p>
<h4>3. HTML</h4>
<p>One of the things I&#8217;ve learned is that google loves to read HTML tags. Especially the relevant ones, like:</p>
<ul>
<li>Everytime as possible use ALT=&#8221;" and TITLE=&#8221;" over links and images, if you have a site with huge visual content it&#8217;s the best you can do. Does images.google.com ring a bell ?</li>
<li>Forget content inside tables, better yet, DIE to TABLE, google hated them and so do I, used them only for what their name is for, data, not layouts.</li>
<li>meta name=&#8221;description&#8221; , even tough it&#8217;s not too much relevant, it helps to have HEADER description of what the content is</li>
<li>H1,H2,etc.. is fantastic for indicate a title or what&#8217;s the major content information is all about.</li>
<li>Instead of B use STRONG</li>
<li>FRAME and IFRAME are forbidden.</li>
</ul>
<p>There are a lot more, more this will be a good start.</p>
<h4>4. Link exchange</h4>
<p>One of the things that will put your site on the top is Page Rank, this was a very important concern to SEO&#8217;s not so long time ago, it is still very important but not as in the past. PR is basically a way to let google know how many websites are linking to yours, and what is the link quality from their site to yours.<br />
So, it&#8217;s a good strategy  to exchange links inside other websites with the same ninche, or use social networks like <a href="http://www.digg.com">digg.com</a> or <a href="http://www.feedburner.com">feedburner.com</a> , or blogs, forums, etc. Spread the seed baby.</p>
<h4>5. Sitemaps</h4>
<p>Having a sitemap it&#8217;s a must.<br />
A sitemap will help google dig around your site without too much effort finding new links.<br />
A <a href="https://www.google.com/webmasters/tools/docs/pt_BR/protocol.html">Sitemap</a> is basically a xml file with all the urls from your website. Like the good old &#8220;Site map&#8221; links.</p>
<h4>6. Accessible links</h4>
<p>And for speaking in sitemaps&#8230;<br />
Think on how your site flows.<br />
Don&#8217;t use Javascript to activate/show/redirect links. Search engines will not know how to do it, so they will never find that link.<br />
Yes, the sitemap could help in this cases, but why make it harder ?<br />
It really wouldn&#8217;t cost to a have a more fluid website without requiring Javascript or Flash.</p>
<h4>7. Tools</h4>
<p>It&#8217;s worth nothing optimizing your site for SEO if you don&#8217;t know how to control the content that your visitors hit.</p>
<p><a href="http://www.google.com/analytics/">Google Analytics</a>, It&#8217;s the best for this, besides having some cool statistics algorithms, Google Analytics you can check out what are your visitors search for, what type of content, what more days are they hitting, from which sites they came and so on.</p>
<p><a href="http://www.google.com/webmasters/tools/ ">Webmaster tools</a>,  another great tool from google. From here you can submit the sitemaps that we&#8217;ve talked about.</p>
<h4>8. Update</h4>
<p>Nothing more makes Google hating you than a site without updates.<br />
So Updated you site often so it won&#8217;t be forgotten over time-</p>
<p>And that&#8217;s it,<br />
I will try in the future to explain and focus a little bit depth in every one of these rules.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.henriquebarroso.com/8-ways-to-improve-your-websites-seo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
