<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>dirceu.info</title>
 
 <link href="http://dirceu.info/blog/" />
 <updated>2009-10-26T23:05:35+03:00</updated>
 <id>http://dirceu.info/blog/</id>
 <author>
   <name>Dirceu Pereira Tiegs</name>
   <email>dirceutiegs@gmail.com</email>
 </author>

 
 <link rel="self" href="http://feeds.feedburner.com/dirceuinfo" type="application/atom+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><entry>
   <title>Mini-Review - Erlang Programming</title>
   <link href="http://dirceu.info/blog/mini-review-erlang-programming.html" />
   <updated>2009-10-10T00:00:00+03:00</updated>
   <id>http://dirceu.info/blog/mini-review-erlang-programming</id>
   <content type="html">&lt;p&gt;&lt;a href='http://www.amazon.com/Erlang-Programming-Francesco-Cesarini/dp/0596518188/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1255205652&amp;amp;sr=8-1' title='Erlang Programming'&gt;Erlang Programming&lt;/a&gt; is probably the best book I&amp;#8217;ve ever read about a programming language, and is worth reading even if you don&amp;#8217;t plan to use Erlang.&lt;/p&gt;

&lt;p&gt;The exercises in this book are helping me a lot to learn more about functional programming and recursion; also, it&amp;#8217;s been a very good experience to use processes and &amp;#8220;pure&amp;#8221; functions instead of threading and shared-state.&lt;/p&gt;

&lt;h4 id='book_contents'&gt;Book contents&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Introduction: story, high level overview and cases&lt;/li&gt;

&lt;li&gt;Basic Erlang: data types, shell and patterns matching&lt;/li&gt;

&lt;li&gt;Sequential Erlang: BIFs, conditionals, recursion, libraries and error handling&lt;/li&gt;

&lt;li&gt;Concurrent Programming: process creation and managing, message passing, benchmarks and some theory&lt;/li&gt;

&lt;li&gt;Process Design Patterns: client / server, finite state machines, event managers and handlers&lt;/li&gt;

&lt;li&gt;Process Error Handling: process linking, exit signals, monitors and supervisors&lt;/li&gt;

&lt;li&gt;Records and Macros&lt;/li&gt;

&lt;li&gt;Software Upgrade: hot code swapping&lt;/li&gt;

&lt;li&gt;More Data Types and High-Level Constructs: anonymous functions, list comprehensions, binaries and references&lt;/li&gt;

&lt;li&gt;ETS and Dets Tables&lt;/li&gt;

&lt;li&gt;Distributed Programming in Erlang: communication between erlang nodes&lt;/li&gt;

&lt;li&gt;OTP Behaviours: introduction to generic servers, supervisors and other applications&lt;/li&gt;

&lt;li&gt;Introducing Mnesia&lt;/li&gt;

&lt;li&gt;GUI Programming with wxErlang&lt;/li&gt;

&lt;li&gt;Socket Programming&lt;/li&gt;

&lt;li&gt;Interfacing Erlang with Other Programming Languages&lt;/li&gt;

&lt;li&gt;Trace BIFs, the dbg Tracer, and Match Specifications&lt;/li&gt;

&lt;li&gt;Types and Documentation&lt;/li&gt;

&lt;li&gt;EUnit and Test-Driven Development&lt;/li&gt;

&lt;li&gt;Style and Efficiency&lt;/li&gt;

&lt;li&gt;Appendix - Using Erlang: installing erlang, editors and other tools&lt;/li&gt;
&lt;/ol&gt;

&lt;h4 id='the_good'&gt;The good&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;The book have a great structure that teaches the language, functional and concurrent / distributed programming with baby steps;&lt;/li&gt;

&lt;li&gt;It&amp;#8217;s very well written and formatted;&lt;/li&gt;

&lt;li&gt;Exercises! Every programming language book should provide exercises like these - short, well defined and that sometimes challenging.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id='the_bad'&gt;The bad&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;The EUnit chapter should be in the beginning. It&amp;#8217;s boring to compile and test things manually in the shell. Of course, you don&amp;#8217;t need to read it in order, but still.&lt;/li&gt;
&lt;/ul&gt;</content>
 </entry>
 
 <entry>
   <title>Dealing with distractions</title>
   <link href="http://dirceu.info/blog/dealing-with-distractions.html" />
   <updated>2009-10-09T00:00:00+03:00</updated>
   <id>http://dirceu.info/blog/dealing-with-distractions</id>
   <content type="html">&lt;p&gt;Most developers have trouble with distractions. The 5 minutes you take to check Twitter / Hacker News / Google Reader can quickly become 1 hour, and sometimes you need to &lt;em&gt;force&lt;/em&gt; yourself to actually do something. This post lists some techniques I&amp;#8217;ve been using to get more focused time.&lt;/p&gt;

&lt;h4 id='blocking_websites'&gt;Blocking websites&lt;/h4&gt;

&lt;p&gt;I&amp;#8217;ve been using &lt;a href='http://al3x.net/2009/09/14/my-get-back-to-work-hack.html' title='Alex Payne&amp;apos;s Get-Back-To-Work Hack'&gt;Alex Payne&amp;#8217;s &amp;#8220;Get-Back-To-Work Hack&amp;#8221;&lt;/a&gt; with success for almost two weeks. It&amp;#8217;s very simple and while I can easily edit /etc/hosts and un-block everything, I don&amp;#8217;t do it. In fact, I&amp;#8217;m spending much less time on twitter, email and feeds.&lt;/p&gt;

&lt;h4 id='dont_guess_measure'&gt;Don&amp;#8217;t guess, measure&lt;/h4&gt;

&lt;p&gt;I use the &lt;a href='http://www.rescuetime.com/' title='Rescue Time'&gt;Rescue Time&lt;/a&gt; daemon to track how I&amp;#8217;m using my time. It have some pretty cool reports on the web interface and that is helping me a lot to see what distract me most.&lt;/p&gt;

&lt;h4 id='stop_notifications'&gt;Stop notifications&lt;/h4&gt;

&lt;p&gt;I&amp;#8217;ve disabled Growl, changed the clock to analog and now I just keep &lt;a href='https://www.getdropbox.com/referrals/NTI2NDIyMDk' title='Dropbox - Secure backup, sync and sharing made easy'&gt;Dropbox&lt;/a&gt;, wi-fi status, volume and the clock on the top bar. The digital clock distracts me more than the analog one (since I cannot see the exact time without clicking on it).&lt;/p&gt;

&lt;h4 id='automate_what_you_can'&gt;Automate what you can&lt;/h4&gt;

&lt;p&gt;I use &lt;a href='https://www.getdropbox.com/referrals/NTI2NDIyMDk' title='Dropbox - Secure backup, sync and sharing made easy'&gt;Dropbox&lt;/a&gt; to automatically backup my dotfiles (/etc/apache2, .zsh*, .bash*, .ssh/config, etc), ebooks, pictures and other important files automatically - it&amp;#8217;s really cool that you can use symlinks instead of copying / pasting.&lt;/p&gt;

&lt;p&gt;I also schedule tasks using &lt;a href='http://culturedcode.com/things/' title='Things - task management on the Mac'&gt;Things&lt;/a&gt; so I always remember to do repeating tasks and stuff in my calendar.&lt;/p&gt;

&lt;h4 id='dont_use_im'&gt;Don&amp;#8217;t use IM&lt;/h4&gt;

&lt;p&gt;Most of the time I don&amp;#8217;t use any IM software. I have google talk and skype accounts, but I only use it to talk to my co-workers (when I &lt;strong&gt;really&lt;/strong&gt; need it). I think that a good (and short) meeting at the beginning or at the end of the day is way better then staying online all day on google talk, for example.&lt;/p&gt;

&lt;p&gt;This &amp;#8220;rule&amp;#8221; have at least two good exceptions: Skype (for pair-programming) and IRC. IRC it&amp;#8217;s nice because you don&amp;#8217;t get windows jumping on your face and you can give attention to it when &lt;strong&gt;you&lt;/strong&gt; want; also reading the logs is easier than on Skype.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;m working on a project with a friend and usually we don&amp;#8217;t work at the same time, so IM don&amp;#8217;t work well. We&amp;#8217;re using the &lt;a href='http://coopapp.com/' title='Join the Co-op'&gt;Co-op app&lt;/a&gt;, a twitter-like application with cool additions like a solo / group agenda to communicate about the project.&lt;/p&gt;

&lt;h4 id='take_breaks'&gt;Take breaks&lt;/h4&gt;

&lt;p&gt;When you simply can&amp;#8217;t work on something, try taking a break &lt;strong&gt;away from keyboard&lt;/strong&gt;. Sometimes I feel my concentration going away because I&amp;#8217;m too tired, so I take a break, drink some water (or tea, caffeine FTW) and just rest for some minutes. Sometimes a &amp;#8220;power nap&amp;#8221; is a good idea too, if you don&amp;#8217;t overdo it.&lt;/p&gt;

&lt;h4 id='additional_links'&gt;Additional links&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href='http://news.ycombinator.com/item?id=869034' title='Ask HN: How do you concentrate?'&gt;Ask HN: How do you concentrate?&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href='http://webr3.org/blog/general/forced-coding/' title='Forced Coding'&gt;Forced Coding&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href='http://lifedev.net/2006/09/computer-fast/' title='The 5 Day PM Computer Fast: Why I Got More Done In Less Time'&gt;The 5 Day PM Computer Fast: Why I Got More Done In Less Time&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href='http://www.scotthyoung.com/blog/2007/10/18/the-art-of-the-finish-how-to-go-from-busy-to-accomplished/' title='The Art of the Finish: How to Go From Busy to Accomplished'&gt;The Art of the Finish: How to Go From Busy to Accomplished&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href='http://calnewport.com/blog/?p=115' title='The Einstein Principle: Accomplish More By Doing Less'&gt;The Einstein Principle: Accomplish More By Doing Less&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content>
 </entry>
 
 <entry>
   <title>Installing Erlang, Yaws and Erlyweb on Mac OS X
</title>
   <link href="http://dirceu.info/blog/installing-erlang-yaws-and-erlyweb-on-mac-os-x.html" />
   <updated>2009-08-10T00:00:00+03:00</updated>
   <id>http://dirceu.info/blog/installing-erlang-yaws-and-erlyweb-on-mac-os-x</id>
   <content type="html">&lt;p&gt;This is a short how-to showing how to install &lt;a href='http://erlang.org/' title='Erlang Programming Language'&gt;Erlang&lt;/a&gt;, &lt;a href='http://yaws.hyber.org/' title='Yaws'&gt;Yaws&lt;/a&gt; and &lt;a href='http://erlyweb.org/' title='Erlyweb: The Erlang Twist on Web Frameworks'&gt;Erlyweb&lt;/a&gt; on Mac OS X via &lt;a href='http://www.macports.org/' title='The MacPorts Project'&gt;MacPorts&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;First we need to install Erlang and Yaws and link Yaws under erlang/lib:&lt;/p&gt;&lt;pre&gt;$ sudo port install erlang yaws
$ sudo ln -sf /opt/local/lib/yaws /opt/local/lib/erlang/lib/yaws&lt;/pre&gt;&lt;p&gt;Then we append erlang/bin to the PATH env variable (you can put this on your ~/.bashrc file):&lt;/p&gt;&lt;pre&gt;$ export PATH=/opt/local/lib/erlang/bin:$PATH&lt;/pre&gt;&lt;p&gt;And finally we install Erlyweb:&lt;/p&gt;&lt;pre&gt;$ git clone git://github.com/dirceu/erlyweb.git
$ cd erlyweb ; make ; sudo make install
$ cd .. ; rm -rf erlyweb&lt;/pre&gt;&lt;p&gt;My fork of Erlyweb contains some changes I did today:&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;"make install" creates a create_erlyweb_app.sh under erlang/bin. It's just a link to erlyweb/scripts/create_app.sh and takes two arguments: AppName and AppDir;&lt;/li&gt;
&lt;li&gt;erlyweb_util:create_app/2 now creates a "log" directory (for Yaws log files) and a ready-to-run yaws.conf file.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;With this changes you can create and run a simple application using:&lt;/p&gt;&lt;pre&gt;$ mkdir -p ~/apps/myapp
$ create_erlyweb_app.sh myapp ~/apps
$ cd ~/apps/myapp
$ yaws --conf yaws.conf&lt;/pre&gt;&lt;script type='text/javascript'&gt;disqus_url='http://dirceu.info/blog/installing-erlang-yaws-and-erlyweb-on-mac-os-x/';&lt;/script&gt;</content>
 </entry>
 
 <entry>
   <title>I'm a Mac (again)
</title>
   <link href="http://dirceu.info/blog/im-a-mac-again.html" />
   <updated>2009-04-13T00:00:00+03:00</updated>
   <id>http://dirceu.info/blog/im-a-mac-again</id>
   <content type="html">&lt;p&gt;Almost three years ago &lt;a href='http://blog.xiru.org/' title='Trovas do Xiru'&gt;my boss&lt;/a&gt; sent me an iBook G4 to work with. It was an absolutely awesome machine: fast, great battery life, beautiful hardware, beautiful OS. I loved it, but after 1,5 years using it some problems arise.&lt;/p&gt;

&lt;p&gt;First, the battery just died - it just worked when connected to the charger. Second, I work(ed) with Zope and Plone on a daily basis, and things like running the entire &lt;a href='http://www.dirceu.info/blog/category/gsoc/' title='Gsoc | dirceu.info'&gt;gocept.zeoraid&lt;/a&gt; test suite took about 40 minutes. Even PloneTestCase with some functional tests was painfully slow. A Macbook was too expensive for me at that time, but I needed a new laptop. &lt;h3&gt;Linux&lt;/h3&gt; Before using that iBook I used Linux for almost 4 years, so I brought an &lt;a href='http://www.submarino.com.br/produto/10/21362520/notebook+w93+core+2+duo+t5450+2gb+120gb+14' title='Notebook W93 Core 2 Duo T5450 2GB 120GB 14&amp;quot; - Submarino.com.br'&gt;inexpensive laptop&lt;/a&gt; to run Linux. The laptop has an Intel Core 2 Duo 1.66GHz, 2 GB of RAM and 120 GB of disk space - a reasonably good machine, except for the video and the wireless card. It took me almost 6 hours to install Ubuntu on that laptop (which came with &lt;a href='http://www.satux.org.br/' title='satux'&gt;Satux Linux&lt;/a&gt; installed by default) and much, &lt;strong&gt;much&lt;/strong&gt; more time to get everything right.&lt;/p&gt;

&lt;p&gt;I was reasonably happy with that setup, but every now and then I needed to fix something in the OS. One day I decided to buy a &lt;a href='http://www.submarino.com.br/produto/10/21376068/monitor+lcd+22+widescreen+2232bw+plus?menuId=695' title='Monitor LCD 22&amp;quot; Widescreen 2232BW Plus - Submarino.com.br'&gt;second monitor&lt;/a&gt;, and so I did it. Big mistake. &lt;h3&gt;Windows&lt;/h3&gt; It seems that the SiS Mirage 3 video card is a Windows fanboy and I couldn&amp;#8217;t get the new monitor to work with Linux. It worked out of the box with an &lt;a href='http://www.submarino.com.br/produto/10/21342603/notebook+eee+pc+celeron+512mb+4gb+7+-+asus' title='Notebook Eee PC Celeron 512MB 4GB 7&amp;quot; - Asus - Submarino.com.br'&gt;Asus eeePC&lt;/a&gt; running eeeBuntu, but not on my laptop. Damn it. After that and some other minor annoyances I decided to give Windows Vista a try, following some advice from &lt;a href='http://awkly.org/' title='dreamcatching'&gt;Sidnei&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Windows Vista surprised me. It&amp;#8217;s a good OS, every piece of hardware on my machine worked without &amp;#8220;serious&amp;#8221; configuration. As I can&amp;#8217;t live without a Unix I installed &lt;a href='http://andlinux.org/' title='andLinux.org -- Run Linux natively on Windows'&gt;andLinux&lt;/a&gt;, but it was not enough: using Linux to manipulate a NTFS filesystem is a PITA. &lt;h3&gt;Mac OS X - Again&lt;/h3&gt; After so much trouble I realized I was losing time with all these annoyances; then I saved money, did some freelance work on my spare time and &lt;em&gt;voila&lt;/em&gt;: last week I brought a white Macbook.&lt;/p&gt;

&lt;p&gt;I can&amp;#8217;t tell you how much I&amp;#8217;m happy with it. It took me less than 1 hour to download and install every application that I need - well, almost all of them, since XCode is really big and the download took almost 2 hours itself.&lt;/p&gt;

&lt;p&gt;One good surprise is XCode / iPhone Simulator. XCode is a very good IDE and it&amp;#8217;s been a lot of fun to learn Objective-C and how to develop iPhone applications.&lt;/p&gt;

&lt;p&gt;If you need to buy some tool (be it hardware or software), buy the best tool your money can buy. Some programmers hesitate to spend some money on a good chair, on a good editor or on a good computer (like me, before all this) but damn, we spend 8-12 hours a day using these things! Every single thing that can save you time or give you more comfort is worth it.&lt;/p&gt;

&lt;p&gt;I have a profile on &lt;a href='http://osx.iusethis.com/user/dirceu' title='i use this os software: dirceu'&gt;iUseThis&lt;/a&gt; that shows the apps that I have on my Mac. If you have any recomendations please leave a comment!&lt;script type='text/javascript'&gt;disqus_url='http://dirceu.info/blog/im-a-mac-again';&lt;/script&gt; &lt;script type='text/javascript'&gt;disqus_url='http://dirceu.info/blog/im-a-mac-again/';&lt;/script&gt;&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Usando Emacs
</title>
   <link href="http://dirceu.info/blog/usando-emacs.html" />
   <updated>2009-03-09T00:00:00+03:00</updated>
   <id>http://dirceu.info/blog/usando-emacs</id>
   <content type="html">&lt;img class='alignleft size-full' title='gnu-and-penguin-color-300x276' src='/blog/images/gnu-and-penguin-color-300x276.jpg' height='276' align='left' alt='gnu-and-penguin-color-300x276' width='300' /&gt;
&lt;p&gt;Por que o Emacs? Pelo mesmo motivo que me levou a aprender Zope e Plone: tem muita gente &lt;strong&gt;realmente boa&lt;/strong&gt; usando o Emacs, o que significa que algo de bom ele tem. Al&amp;#233;m disso o Emacs &amp;#233; multiplataforma, o que &amp;#233; importante pra mim, j&amp;#225; que pretendo voltar a usar Mac OS X em breve.&lt;/p&gt;

&lt;p&gt;Logo que voltei a estudar o Emacs eu assisti o screencast &lt;a href='http://peepcode.com/products/meet-emacs' title='Meet Emacs | PeepCode Screencasts'&gt;Meet Emacs&lt;/a&gt;, do &lt;a href='http://peepcode.com' title='PeepCode Screencasts'&gt;PeepCode.com&lt;/a&gt; (altamente recomendado, ali&amp;#225;s), o que me ajudou muito. O screencast apresenta os principais comandos, major / minor modes, color modes, eshell, ido-mode, textmate.el, vc-mode (para controle de vers&amp;#227;o), magit (para usar git) e v&amp;#225;rios outros recursos interessantes.&lt;/p&gt;

&lt;p&gt;A coisa mais &amp;#250;til do screencast, na verdade, foi apresentar o &lt;a href='http://github.com/technomancy/emacs-starter-kit/' title='technomancy&amp;apos;s emacs-starter-kit'&gt;Emacs Starter Kit&lt;/a&gt;. O ESK &amp;#233; um diret&amp;#243;rio de configura&amp;#231;&amp;#227;o para o Emacs (.emacs.d) cheio de major e minor modes muitos &amp;#250;teis e v&amp;#225;rios &lt;em&gt;defaults&lt;/em&gt; melhorados. Vale a pena testar.&lt;/p&gt;

&lt;p&gt;No github existe uma &lt;a href='http://github.com/technomancy/emacs-starter-kit/network' title='The emacs-starter-kit Network'&gt;grande variedade de forks&lt;/a&gt; do Emacs Starter Kit; eu mesmo mantenho meu .emacs.d como um fork desse projeto. O &lt;a href='http://github.com/dirceu/emacs-starter-kit/' title='dirceu&amp;apos;s emacs-starter-kit'&gt;meu fork&lt;/a&gt; adiciona algumas coisas interessantes como o yasnippet (com snippets variados para Python, Ruby e outras linguagens) e o whitespace.el (muito &amp;#250;til pra programar em Python).&lt;/p&gt;

&lt;p&gt;O Emacs &amp;#233; muito flex&amp;#237;vel. Abrir diversos buffers lado a lado, fazer commits, verificar sintaxe, fazer diffs e fun&amp;#231;&amp;#245;es como a jump-to-symbol do ido-mode sem d&amp;#250;vida me proporcionaram uma maior produtividade. O contraponto disso &amp;#233; que &amp;#233; f&amp;#225;cil ficar &amp;#8220;perdendo tempo&amp;#8221; personalizando o .emacs.d e brincando com elisp :-).&lt;/p&gt;

&lt;p&gt;No geral estou bastante satisfeito com a minha escolha de editor. Pretendo me aprofundar mais e assim melhorar minha produtividade - afinal de contas um dos requisitos para entrar no estado de &amp;#8221;&lt;a href='http://www.thatvoodooyoudo.com/best-practice/flow/' title='Flow: Get into the Zone at Work'&gt;flow&lt;/a&gt;&amp;#8221; &amp;#233; usar bem e intuitivamente as ferramentas que mais usamos.&lt;/p&gt;

&lt;p&gt;No meu &lt;a href='http://delicious.com/dirceu/' title='dirceu&amp;apos;s Bookmarks'&gt;delicious&lt;/a&gt; tem alguns links interessantes sobre Emacs: &lt;a href='http://delicious.com/dirceu/emacs' title='dirceu&amp;apos;s emacs Bookmarks'&gt;http://delicious.com/dirceu/emacs&lt;/a&gt;.&lt;script type='text/javascript'&gt;disqus_url='http://dirceu.info/blog/usando-emacs';&lt;/script&gt; &lt;script type='text/javascript'&gt;disqus_url='http://dirceu.info/blog/usando-emacs/';&lt;/script&gt;&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Why you should switch to Git
</title>
   <link href="http://dirceu.info/blog/why-you-should-switch-to-git.html" />
   <updated>2008-11-26T00:00:00+03:00</updated>
   <id>http://dirceu.info/blog/why-you-should-switch-to-git</id>
   <content type="html">&lt;p&gt;Over the last few months I&amp;#8217;ve switched from Subversion and Bazaar to Git. I&amp;#8217;m using Git on a daily basis now and I&amp;#8217;m much happier with it than I was when using Subversion. In this post I&amp;#8217;ll try to explain why and provide some useful links. &lt;h3&gt;You can work offline&lt;/h3&gt; How cool is that? You can clone a repository (which is similar to doing a &amp;#8220;checkout&amp;#8221;), go offline and then change what you want, commit, merge, branch and whatever. When you go back online you can push your commits to the origin server - if you want.&lt;/p&gt;

&lt;p&gt;When using Git you don&amp;#8217;t work on a &amp;#8220;working copy&amp;#8221; of the last revision (as you do with Subversion) - using &amp;#8220;git clone URL&amp;#8221; you clone the &lt;em&gt;entire repository&lt;/em&gt;: all commits, merges, branches, everything. &lt;h3&gt;It's fast as hell&lt;/h3&gt; Git is fast. Really fast. Doing commits, branches, merging and even cloning a remote repository: everything is (way) faster than Subversion. I didn&amp;#8217;t do any benchmarks on my own, but it&amp;#8217;s what I can see. &lt;h3&gt;It will make you want to try new things&lt;/h3&gt; Branching and merging in Git are trivial tasks. In Subversion these operations are kind of &lt;em&gt;troublesome&lt;/em&gt;; you need to interact with the remote copy, merging is not so easy and you need write access to the remote repository. This - the need of write access - is actually the main problem with it.&lt;/p&gt;

&lt;p&gt;With Git I can clone a remote repository, create branches, try things out and never ever send anything back to the origin repository. I can do pretty much everything without getting permission, without bureaucracy. &lt;h3&gt;Github&lt;/h3&gt; &lt;a href='http://github.com'&gt;&lt;img class='size-medium wp-image-109' title='Github - Social Code Hosting' src='/blog/images/github_logo.png' height='60' align='left' alt='Github - Social Code Hosting' width='157' /&gt;&lt;/a&gt; &lt;a href='http://github.com' title='Github'&gt;Github&lt;/a&gt; is a really cool social network for programmers. It allows you to share and manage Git repositories in a very easy way; with a few clicks one person can fork, say, &lt;a href='http://github.com/jnunemaker/httparty' title='httparty'&gt;httparty&lt;/a&gt;, branch, merge and do whatever with it.&lt;/p&gt;

&lt;p&gt;Also it allows you to make &amp;#8220;pull requests&amp;#8221; (a way to poke someone and let them know you&amp;#237;ve got some code they may want) and get your code on the main repository. &lt;h3&gt;Some useful links about Git&lt;/h3&gt; So this is why I&amp;#8217;m using Git. The following links are tutorials and explanations about how and why Git works and more reasons to use it. Enjoy. &lt;ul&gt;
	&lt;li&gt;&lt;a href='http://tomayko.com/writings/the-thing-about-git' title='The Thing About Git'&gt;The Thing About Git&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href='http://drnicwilliams.com/2008/02/03/using-git-within-a-team/' title='Using Git within a project (forking around)'&gt;Using Git within a project (forking around)&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href='http://github.com/blog/120-new-to-git' title='New to Git?'&gt;New to Git?&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href='http://peepcode.com/products/git-internals-pdf' title='Git Internals PDF | PeepCode'&gt;Git Internals&lt;/a&gt; (Highly Recommended!)&lt;/li&gt;
&lt;/ul&gt;&lt;script type='text/javascript'&gt;disqus_url='http://dirceu.info/blog/why-you-should-switch-to-git';&lt;/script&gt; &lt;script type='text/javascript'&gt;disqus_url='http://dirceu.info/blog/why-you-should-switch-to-git/';&lt;/script&gt;&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Creating RSS feeds with rssifier
</title>
   <link href="http://dirceu.info/blog/creating-rss-feeds-with-rssifier.html" />
   <updated>2008-10-16T00:00:00+03:00</updated>
   <id>http://dirceu.info/blog/creating-rss-feeds-with-rssifier</id>
   <content type="html">&lt;p&gt;Two of my favorite webcomics doesn&amp;#8217;t have official feeds - &lt;a href='http://www.malvados.com.br' title='Quadrinhos de humor - tirinhas dos Malvados'&gt;Malvados&lt;/a&gt; and &lt;a href='http://www.giantitp.com/comics/oots.html' title='Giant in the Playground Games - The Order of The Stick'&gt;The Order of The Stick&lt;/a&gt; (this one actually &lt;em&gt;have&lt;/em&gt; a feed, but the images aren&amp;#8217;t shown in the feed items). I didn&amp;#8217;t like to visit these sites manually, so I quickly wrote a script (which is now a very simple Ruby lib) to create these feeds for me: &lt;a href='http://github.com/dirceu/rssifier/tree/master' title='dirceu&amp;apos;s rssifier at master'&gt;rssifier&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The lib code is ugly at some points, but it&amp;#8217;s working for me. Here is an example script (malvados.rb) that uses rssifier to create a feed:&lt;/p&gt;
&lt;script src='http://gist.github.com/17310.js' /&gt;
&lt;p&gt;(&lt;a href='http://gist.github.com/17310' title='gist: 17310 (malvados.rb)'&gt;Link of the Gist&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;And &lt;a href='http://dirceu.info/malvados.xml' title='malvados.xml'&gt;this&lt;/a&gt; is the result; I have a cronjob calling the malvados.rb periodically, so this XML gets updated from time to time.&lt;/p&gt;

&lt;p&gt;Any contributions via�&lt;a href='http://github.com/dirceu/rssifier/tree/master' title='dirceu&amp;apos;s rssifier at master'&gt;github&lt;/a&gt; are obviously welcome :-).&lt;script type='text/javascript'&gt;disqus_url='http://dirceu.info/blog/creating-rss-feeds-with-rssifier';&lt;/script&gt; &lt;script type='text/javascript'&gt;disqus_url='http://dirceu.info/blog/creating-rss-feeds-with-rssifier/';&lt;/script&gt;&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Quick Tip - Testing Django send_mail</title>
   <link href="http://dirceu.info/blog/quick-tip-testing-django-send_mail.html" />
   <updated>2008-10-07T00:00:00+03:00</updated>
   <id>http://dirceu.info/blog/quick-tip-testing-django-send_mail</id>
   <content type="html">&lt;p&gt;I&amp;#8217;ve been working on a Django project lately and I had the need to send some emails from my application. I was trying to figure out how to write a mocked version of django.core.mail.send_mail when I read about &lt;a href='http://docs.djangoproject.com/en/dev/topics/testing/#e-mail-services' title='Django - Testing Email Services'&gt;django.core.mail.outbox&lt;/a&gt;, which apparently is a new feature of Django 1.0.&lt;/p&gt;

&lt;p&gt;django.core.mail.outbox is a list of all instances of emails sent with django.core.mail.send_mail that is available only in the testing framework. With it you can do things like these:&lt;/p&gt;
&lt;script src='http://gist.github.com/15413.js' /&gt;
&lt;p&gt;(&lt;a href='http://gist.github.com/15413' title='gist 15413'&gt;Link of the Gist&lt;/a&gt;)&lt;script type='text/javascript'&gt;disqus_url='http://dirceu.info/blog/quick-tip-testing-django-send_mail';&lt;/script&gt; &lt;script type='text/javascript'&gt;disqus_url='http://dirceu.info/blog/quick-tip-testing-django-send_mail/';&lt;/script&gt;&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Browsers gone wild!
</title>
   <link href="http://dirceu.info/blog/browsers-gone-wild.html" />
   <updated>2008-09-03T00:00:00+03:00</updated>
   <id>http://dirceu.info/blog/browsers-gone-wild</id>
   <content type="html">&lt;p&gt;Dois lan&amp;#231;amentos recentes est&amp;#227;o deixando o povo que &amp;#8216;mexe com web&amp;#8217; agitado: o &lt;a href='http://labs.mozilla.com/2008/08/introducing-ubiquity/' title='Mozilla Labs - Introducing Ubiquity'&gt;Mozilla Ubiquity&lt;/a&gt; e o &lt;a href='http://googleblog.blogspot.com/2008/09/fresh-take-on-browser.html' title='A fresh take on the browser'&gt;Google Chrome&lt;/a&gt;. &lt;h3&gt;&lt;strong&gt;Ubiquity&lt;/strong&gt;&lt;/h3&gt; O Ubiquity &amp;#233; um &amp;#8216;Quicksilver-do-Firefox&amp;#8217;, uma ferramenta que permite que usu&amp;#225;rios manipulem diversas ferramentas web usando uma interface de texto simples. Por exemplo, clicando Ctrl+Space (para abrir a interface de comando) e digitando &amp;#8216;map criciuma,brazil&amp;#8217; ver&amp;#225; um google map mostrando a &lt;a href='http://desciclo.pedia.ws/wiki/Crici%C3%BAma' title='Desciclopedia - Crici&amp;uacute;ma'&gt;cidade onde eu moro&lt;/a&gt;. Essa &amp;#233; uma &lt;em&gt;excelente&lt;/em&gt; ferramenta para agilizar o uso de diversas ferramentas da web - al&amp;#233;m do google maps do exemplo acima, na vers&amp;#227;o 0.1 do Ubiquity j&amp;#225; existem comandos para fazer buscas na Amazon, no Flickr, definir termos, fazer c&amp;#225;lculos e fazer muitas outras coisas. &lt;p style='text-align: center;'&gt;&lt;img class='aligncenter size-medium' title='email-picture-selection' src='/blog/images/email-picture-selection-287x300.png' height='300' alt='' width='287' /&gt;&lt;/p&gt;&lt;/p&gt;

&lt;p&gt;Uma das coisas que eu mais achei interessante &amp;#233; a facilidade de manipular conte&amp;#250;do; voc&amp;#205; pode, por exemplo, selecionar um texto qualquer em uma p&amp;#225;gina, abrir o ubiquity e digitar &amp;#8216;email this to fulano&amp;#8217; - isso ir&amp;#225; abrir uma tela do gmail j&amp;#225; com um email parcialmente preenchido para o &amp;#8216;fulano&amp;#8217; (que deve estar nos seus contatos). &lt;h3&gt;&lt;strong&gt;Chrome&lt;/strong&gt;&lt;/h3&gt; O Chrome &amp;#233; o novo browser do google. &amp;#201; um browser que usa o engine Webkit para renderizar as p&amp;#225;ginas e um novo engine javascript (o &lt;a href='http://code.google.com/p/v8/' title='v8'&gt;v8&lt;/a&gt;), bem mais r&amp;#225;pido que o dos browsers atuais. O Chrome foi pensado na web atual, n&amp;#227;o na web de tempos atr&amp;#225;s: a web atual &amp;#233; uma plataforma de aplica&amp;#231;&amp;#245;es. GMail, GDocs, Basecamp, Twitter, Github, GReader, GCalendar, Facebook&amp;#8230; parando pra pensar, eu praticamente n&amp;#227;o entro mais em &amp;#8216;sites&amp;#8217; - mesmo os blogs que leio s&amp;#227;o sempre via RSS.&lt;/p&gt;
&lt;p style='text-align: center;'&gt;&lt;a href='http://chrome.google.com'&gt;&lt;img class='aligncenter size-medium wp-image-61' title='google-chrome' src='/blog/images/google-chrome.jpg' height='244' alt='' width='300' /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;O Chrome foi desenhado pensando nessa &amp;#8216;nova web&amp;#8217;: entre outras coisas, cada aba &amp;#233; um processo. Isso faz com que esse navegador seja mais seguro (uma aba n&amp;#227;o consegue acessar os dados das outras), mais r&amp;#225;pido (uma aba lenta n&amp;#227;o afeta as outras) e trave menos (se uma aba travar, &amp;#233; s&amp;#243; ela que vai travar). A interface &amp;#233; minimalista: a id&amp;#233;ia &amp;#233; que o navegador seja &amp;#8216;invis&amp;#237;vel&amp;#8217;, que o usu&amp;#225;rio s&amp;#243; preste aten&amp;#231;&amp;#227;o no conte&amp;#250;do que est&amp;#225; acessando.&lt;/p&gt;

&lt;p&gt;&amp;#8221;&lt;em&gt;Mas como assim p*rra? O Google e a Mozilla n&amp;atilde;o tinham um 'caso'?&lt;/em&gt;&amp;#8221;&lt;/p&gt;

&lt;p&gt;Pois &amp;#233;. Como &lt;a href='http://awkly.org/2008/09/01/googles-to-be-unveiled-firefox-killer/' title='Google&amp;iacute;s to-be-unveiled Firefox-Killer'&gt;bem disse&lt;/a&gt; o Sidnei, o Chrome tem tudo pra &amp;#8216;roubar&amp;#8217; usu&amp;#225;rios do Firefox. De qualquer forma, &lt;a href='http://groups.google.com/group/arqhp/msg/2b115b62ade51be1'&gt;a baga&amp;ccedil;a &amp;eacute; open source&lt;/a&gt; - se a Mozilla quiser pode &amp;#8216;deitar e rolar&amp;#8217; com o c&amp;#243;digo do Chrome - inclusive pode aproveitar e come&amp;#231;ar a usar a &lt;a href='http://code.google.com/p/v8/' title='v8'&gt;engine javascript&lt;/a&gt; do novo browser, que &amp;#233; bem mais r&amp;#225;pida que a do Firefox. &lt;h3&gt;&lt;strong&gt;Qro nstala n Linx comofas/&lt;/strong&gt;&lt;/h3&gt; Perdeu, preib&amp;#243;i. Por enquanto o Ubiquity s&amp;#243; roda em Windows e Mac OS X, enquanto o Chrome s&amp;#243; em Windows.&lt;/p&gt;

&lt;p&gt;E vejam que beleza: migrei do OS X de volta pra Linux h&amp;#225; menos de uma semana. O jeito &amp;#233; usar o &lt;a href='http://hamacker.wordpress.com/2008/04/30/virtualbox-no-ubuntu-804/' title='VirtualBox no Ubuntu 8.04'&gt;VirtualBox&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;sigh&lt;/em&gt;&lt;script type='text/javascript'&gt;disqus_url='http://dirceu.info/blog/browsers-gone-wild';&lt;/script&gt; &lt;script type='text/javascript'&gt;disqus_url='http://dirceu.info/blog/browsers-gone-wild/';&lt;/script&gt;&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Usando o git-svn
</title>
   <link href="http://dirceu.info/blog/usando-o-git-svn.html" />
   <updated>2008-08-30T00:00:00+03:00</updated>
   <id>http://dirceu.info/blog/usando-o-git-svn</id>
   <content type="html">&lt;p&gt;Nos &amp;#250;ltimos dias venho trabalhando em uma app Django e, como sou iniciante no uso desse framework, todos os dias aprendo algum feature novo para melhorar meu c&amp;#243;digo (como generic views, por exemplo). Para testar esses features o ideal &amp;#233; criar um branch, usar os features no c&amp;#243;digo e, se valer a pena, fazer o merge. O problema: usamos svn &lt;a href='http://pytown.com' title='PyTown.com'&gt;na empresa&lt;/a&gt;, e fazer branches no svn &amp;#233; bem chatinho (principalmente se comparado ao git). Para resolver isso estou usando o &lt;a href='http://git.or.cz/course/svn.html' title='Git-SVN Crash Course'&gt;git-svn&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Segue abaixo meu fluxo de trabalho no git-svn:&lt;/p&gt;
&lt;script src='http://gist.github.com/8107.js' /&gt;&lt;a href='http://gist.github.com/8107' title='Gist 8107 - git-svn'&gt;Link do Gist&lt;/a&gt;
&lt;p&gt;Enfim, esse &amp;#233; um post pra que eu mesmo n&amp;#227;o esque&amp;#231;a como fazer isso. Alguns links e tutoriais interessantes sobre o git e o git-svn est&amp;#227;o no meu &lt;a href='http://delicious.com/dirceu/' title='delicious.com/dirceu'&gt;del.icio.us&lt;/a&gt;: &lt;a href='http://delicious.com/dirceu/git' title='delicious.com/dirceu/git'&gt;http://delicious.com/dirceu/git&lt;/a&gt;.&lt;script type='text/javascript'&gt;disqus_url='http://dirceu.info/blog/usando-o-git-svn';&lt;/script&gt; &lt;script type='text/javascript'&gt;disqus_url='http://dirceu.info/blog/usando-o-git-svn/';&lt;/script&gt;&lt;/p&gt;</content>
 </entry>
 
 
</feed>
