<?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>Franklin Dattein</title>
	<atom:link href="http://dattein.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://dattein.com/blog</link>
	<description>My personal blog in English and Brazilian Portuguese.</description>
	<lastBuildDate>Tue, 31 Aug 2010 12:15:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>First month in Sydney (Video)</title>
		<link>http://dattein.com/blog/first-month-in-sydney-video/</link>
		<comments>http://dattein.com/blog/first-month-in-sydney-video/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 12:15:38 +0000</pubDate>
		<dc:creator>fsamir</dc:creator>
				<category><![CDATA[Australia Immigration]]></category>
		<category><![CDATA[Trips]]></category>
		<category><![CDATA[sydney]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://dattein.com/blog/?p=665</guid>
		<description><![CDATA[This is a video compilation of our first month living in Sydney, Australia.

]]></description>
			<content:encoded><![CDATA[<p>This is a video compilation of our first month living in Sydney, Australia.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/iOa4Arzw5b8?fs=1&amp;hl=en_US" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="385" src="http://www.youtube.com/v/iOa4Arzw5b8?fs=1&amp;hl=en_US" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://dattein.com/blog/first-month-in-sydney-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Grails: Mocking localization in Controllers</title>
		<link>http://dattein.com/blog/grails-mocking-localization-in-controllers/</link>
		<comments>http://dattein.com/blog/grails-mocking-localization-in-controllers/#comments</comments>
		<pubDate>Wed, 12 May 2010 18:21:25 +0000</pubDate>
		<dc:creator>fsamir</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[mocking]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://dattein.com/blog/?p=624</guid>
		<description><![CDATA[If you are wondering how to mock the localizaton provider in a Grails Controller, these are two example on how to do it.
The first one  (FooController) is used when you want to have an instance of MessageSource injected as a member of your controller.

class FooController {
  def messageSource

  def index = {
  [...]]]></description>
			<content:encoded><![CDATA[<p>If you are wondering how to mock the localizaton provider in a Grails Controller, these are two example on how to do it.</p>
<p>The first one  (FooController) is used when you want to have an instance of MessageSource injected as a member of your controller.</p>
<pre name="code" class="Java">
class FooController {
  def messageSource

  def index = {
    def someMessage = messageSource.getMessage("some.key")
    log.debug("Localized message: " + someMessage)
    render(someMessage)
  }
}
</pre>
<p>And its test class:</p>
<pre name="code" class="java">
class FooControllerTests extends ControllerUnitTestCase {
  void testIndex() {
    //controller.messageSource = [getMessage: { def key, def locale -&gt; return key }]
    controller.messageSource = [getMessage: { def key -&gt; return key }] //returns the input key
    controller.index()
    assertEquals "Should return a localized key", "some.key", controller.response.contentAsString
  }
}
</pre>
<p>The second one (BarController) is when you prefer to use the &#8220;message&#8221; closure:</p>
<pre name="code" class="java">
class BarController {
  def index = {
    def someMessage = message(code: "some.key", default: "Some default message")
    log.debug("Localized message: " + someMessage)
    render(someMessage)
  }
}
</pre>
<p>Finally, how to mock it:</p>
<pre name="code" class="java">
class FooControllerTests extends ControllerUnitTestCase {
  void testIndex() {
    //controller.messageSource = [getMessage: { def key, def locale -&gt; return key }]
    controller.messageSource = [getMessage: { def key -&gt; return key }] //returns the input key
    controller.index()
    assertEquals "Should return a localized key", "some.key", controller.response.contentAsString
  }
}
</pre>
<p>Quick and simple. I hope you enjoy these simple and useful examples.</p>
]]></content:encoded>
			<wfw:commentRss>http://dattein.com/blog/grails-mocking-localization-in-controllers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exception Handling vs. Reflection calls. Wich is more expensive?</title>
		<link>http://dattein.com/blog/exception-vs-reflection/</link>
		<comments>http://dattein.com/blog/exception-vs-reflection/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 18:08:53 +0000</pubDate>
		<dc:creator>fsamir</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[exceptions]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[reflection]]></category>

		<guid isPermaLink="false">http://dattein.com/blog/?p=576</guid>
		<description><![CDATA[In terms of performance, it is well known that Reflection Calls and Exception Handling are some of the most expensive operations in a programming language.
However, which of them is more expensive?
It only makes sense to compare the performance of these two mechanisms, if you have a situation on where one can replace the other. I [...]]]></description>
			<content:encoded><![CDATA[<p>In terms of performance, it is well known that <strong>Reflection Calls </strong>and <strong>Exception Handling </strong>are some of the most expensive operations in a programming language.<br />
However, which of them is more expensive?</p>
<p>It only makes sense to compare the performance of these two mechanisms, if you have a situation on where one can replace the other. I have to admit that if a problem can be solved with Reflection or Exceptions, then the solution for this problem<strong> smells very bad</strong>.<br />
That is exactly the situation which brought up this question, a stink code. My team is working with the <a href="http://nvelocity.sourceforge.net/">NVelocity library</a>, a version of the popular <a href="http://velocity.apache.org/">Java Template Engine</a>, ported to MS .Net. This lib makes extensively use of the <a href="http://en.wikipedia.org/wiki/Coding_by_exceptio">Code by Exception</a> anti-pattern and refactoring its code is not an option due to the lack of time.<br />
It is weird, but in that code there is a comment suggesting that a reflexive call could avoid a Exception Raising/Handling.</p>
<p>I don&#8217;t know about you, but I was surprised by the result. A reflexive call is 5 times faster than an Exception raising and handling.</p>
<p>The following code (in CSharp) runs a Reflexive call and an Exception raising/handling 10.000 times.</p>
<p><span id="more-576"></span><br />
</p>
<pre class="csharp">
public void LoopExceptionAndReflectionCallsTest()
        {
            const int max = 100000;

            if (!Stopwatch.IsHighResolution)
                Console.WriteLine("This machine has no high resolution timer available. Results may be affected.");

            MeasureException(max);
            MeasureReflection(max);
        }

        private void MeasureReflection(int max)
        {
            Stopwatch sw = Stopwatch.StartNew();
            Foo foo = new Foo();

            for (int i = 0; i < max; i++)
            {
                foo.GetType().InvokeMember("someField", BindingFlags.GetField | BindingFlags.Instance | BindingFlags.NonPublic, null, foo, null);
            }
            sw.Stop();

            Console.WriteLine("Time Elapsed w/ Reflection: {0} ms", sw.Elapsed.TotalMilliseconds);
        }

        private void MeasureException(int max)
        {
            Foo foo = new Foo();
            Stopwatch sw = Stopwatch.StartNew();

            for (int i = 0; i &lt; max; i++)
            {
                foo.RaiseandCatchException();
            }
            sw.Stop();

            Console.WriteLine("Time Elapsed w/ Exception: {0} ms", sw.Elapsed.TotalMilliseconds);
        }
    }

    sealed class Foo
    {
        private int someField = 1;
        public void RaiseandCatchException()
        {
            try
            {
                throw new Exception("SomeException");
            }
            catch (Exception)
            {
            }
        }

        public int DoNothing()
        {
            return someField;
        }
    }
</pre>
]]></content:encoded>
			<wfw:commentRss>http://dattein.com/blog/exception-vs-reflection/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Practicing the Australian accent</title>
		<link>http://dattein.com/blog/practicing-the-australian-accent/</link>
		<comments>http://dattein.com/blog/practicing-the-australian-accent/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 17:05:53 +0000</pubDate>
		<dc:creator>fsamir</dc:creator>
				<category><![CDATA[Australia Immigration]]></category>
		<category><![CDATA[accent]]></category>
		<category><![CDATA[english]]></category>

		<guid isPermaLink="false">http://dattein.com/blog/?p=556</guid>
		<description><![CDATA[I thought I was able to understand any English accent in the world, since I work with Americans, Indians, Chinese and off course, Brazilians.  Poor guy It was until I started having to argue with Australians.
The Australian accent is so different in a variety of aspects: fresh new slang, completely different pronunciation,  an intonation which [...]]]></description>
			<content:encoded><![CDATA[<p>I thought I was able to understand any English accent in the world, since I work with Americans, Indians, Chinese and off course, Brazilians.  Poor guy It was until I started having to argue with Australians.<br />
The Australian accent is so different in a variety of aspects: fresh new slang, completely different pronunciation,  an intonation which makes their sentences sound like questions, vocabulary, etc.</p>
<p>I realized it would be prudent if I had some training on this new stuff, before arriving there.</p>
<p>So, there is it. These are the resources which are helping me to enhance my Australian Communication Skills.</p>
<p><strong>Accent</strong></p>
<p>Although listening to radios is not the best way to learn their accent, due to the very clear English the radio professionals speak, it is still an alternative. Specially because you some of them allow you to download their Podcasts and listen everywhere.<br />
Follow my preferred radios:</p>
<p><strong>Australia Now</strong><br />
Talks about Australian culture, geography, immigration and politics.</p>
<p>http://www.abc.net.au/ra/podcast/australianow/podcast.xml</p>
<p><strong>Tech Stream<br />
</strong>The subject here is technology.<strong><br />
</strong>http://www.abc.net.au/ra/podcast/techstream/podcast.xml</p>
<p><strong>AUS Radio Stations.com<br />
</strong>It is a list of all OZ radio stations<a href="http://www.ausradiostations.com/"></p>
<p>http://www.ausradiostations.com/</a></p>
<p><strong>Radio Australia Podcasts</strong><br />
<a href="http://www.radioaustralia.net.au/subscribe/">http://www.radioaustralia.net.au/subscribe/</a></p>
<p><strong>Youtube </strong><br />
Browse for Australian Accent.<br />
<a href="http://www.youtube.com/results?search_query=australian+accent">http://www.youtube.com/results?search_query=australian+accent</a></p>
<p>The Angy Aussie. Not that I really enjoy all that  he says, but it  is a really rich source of vocabulary and the channel is updated very often.<br />
<a href="http://www.youtube.com/user/AngryAussie">http://www.youtube.com/user/AngryAussie</a></p>
<p><strong>Slang</strong><br />
<a href="http://www.upfromaustralia.com/aussieslang.html">http://www.upfromaustralia.com/aussieslang.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dattein.com/blog/practicing-the-australian-accent/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Can&#8217;t login after upgrading Wordpress to 2.9.2</title>
		<link>http://dattein.com/blog/cant-login-after-upgrading-wordpress-2-9-2/</link>
		<comments>http://dattein.com/blog/cant-login-after-upgrading-wordpress-2-9-2/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 18:16:27 +0000</pubDate>
		<dc:creator>fsamir</dc:creator>
				<category><![CDATA[Geek]]></category>

		<guid isPermaLink="false">http://dattein.com/blog/?p=523</guid>
		<description><![CDATA[After upgrading Wordpress to 2.9.2, I wasn&#8217;t able to login at the admin page of this blog.
By disabling all plugins I was able to login again. After that , I have enabled every single plugin, one by one,  until a found out that qTranslate was the cause of this failure. (Google for &#8220;Disabling Wordpress plugins&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>After upgrading Wordpress to 2.9.2, I wasn&#8217;t able to login at the admin page of this blog.<br />
By disabling all plugins I was able to login again. After that , I have enabled every single plugin, one by one,  until a found out that qTranslate was the cause of this failure. (Google for &#8220;Disabling Wordpress plugins&#8221; if you don&#8217;t know how to do that).</p>
<p>A few hours after Googling for a fix, I couldn&#8217;t find any useful information. However, this error happened with me in the past and it as due to the desynchronization of the &#8220;AUTH_KEY&#8221;  on wp-config.php file and the &#8220;wp_default_secret_key&#8221; in my language file (wp-content/languages/en_US.php).</p>
<p>I went to the en_US.php file and it was ok, the keys were equals. So I deleted this file, just to see what would happens. Voilá! It was working again.</p>
<p>So, the fix is as simple as:</p>
<blockquote><p>rm /&lt;installation folder&gt;/wp-content/languages/en_US.php</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://dattein.com/blog/cant-login-after-upgrading-wordpress-2-9-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Kitesurfers jumping a pier</title>
		<link>http://dattein.com/blog/kiteboarding-jumping-a-pier/</link>
		<comments>http://dattein.com/blog/kiteboarding-jumping-a-pier/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 14:14:38 +0000</pubDate>
		<dc:creator>fsamir</dc:creator>
				<category><![CDATA[Kiteboarding]]></category>

		<guid isPermaLink="false">http://dattein.com/blog/?p=515</guid>
		<description><![CDATA[video of kiteboarders jumping a pier.]]></description>
			<content:encoded><![CDATA[<p>Nice video of some friends jumping a pier, during a competition, in Atlântida beach, one of my favorite kite spots.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="560" height="340" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/OTwV0MH6FLA&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="560" height="340" src="http://www.youtube.com/v/OTwV0MH6FLA&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://dattein.com/blog/kiteboarding-jumping-a-pier/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IELTS Study Guide</title>
		<link>http://dattein.com/blog/ielts-study-guide/</link>
		<comments>http://dattein.com/blog/ielts-study-guide/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 17:21:03 +0000</pubDate>
		<dc:creator>fsamir</dc:creator>
				<category><![CDATA[Australia Immigration]]></category>

		<guid isPermaLink="false">http://dattein.com/blog/?p=508</guid>
		<description><![CDATA[This is a quick guide on how to prepare yourself to take the IELTS, based on my own experience.
Overview
I don&#8217;t think taking classes is really necessary. If you have discipline, the entire preparation can be made through books. On the other hand, if you have time and money, an English Teacher is definitely the better [...]]]></description>
			<content:encoded><![CDATA[<p>This is a quick guide on how to prepare yourself to take the IELTS, based on my own experience.</p>
<p><strong>Overview</strong></p>
<p>I don&#8217;t think taking classes is really necessary. If you have discipline, the entire preparation can be made through books. On the other hand, if you have time and money, an English Teacher is definitely the better alternative.<br />
I do English classes in a regular basis  and I had 8 months to do the test, so I did 8 months of English classes focused on IELTS.</p>
<p><span id="more-508"></span></p>
<p>During the classes the book we used was &#8220;<a href="http://www.amazon.com/Focus-on-IELTS/dp/0582829127/">Focus on IELTS</a>&#8220;. It is a nice book if you want to study for a long term. It is focused on IELTS, but also in other aspects of the English language.<br />
In addition, I would say that all that we learned in the classes is covered in a 80 pages book, called &#8220;<a href="http://www.amazon.com/Target-Band-Maximize-Academic-Module/dp/0646497855">Target Band 7</a>&#8220;. This is the Book I have used as a reference guide, during the last 3 weeks of preparation.<br />
During the preparation, another important tool was the <a href="http://www.ielts-blog.com/">IELTS Blog</a>. It is a blog full of essays with their grades. you can submit your essay to them and they will give you a grade, which is very handy if you don&#8217;t have a teacher to review them for you.<br />
Finally, I got the exercises from the <a href="http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dstripbooks&amp;field-keywords=Cambridge+IELTS&amp;x=0&amp;y=0">Cambridge IELTS Series</a>.</p>
<p><strong>Summary</strong></p>
<p>- If you don&#8217;t fell totally comfortable with your English, hire a teacher experienced on  IELTS.<br />
- If you want to practice general English speaking while you practice for IELTS, use the book &#8220;Focus on IELTS<strong>&#8220;.<br />
</strong>- If you have fluent English, at least take a look on Target Band 7 book and make one full set of exercices from the Cambridge books.<strong> </strong></p>
<p>- Finally, write essays, record your voice, train your memory for the listening part and be fast in the reading part. <strong><br />
</strong></p>
<p><strong><br />
</strong></p>
<p><strong>FAQ:</strong></p>
<p><strong>- I already speak English fluently. Should I study before the test?<br />
</strong>At least read the Target Band 7 and make some example tests. IELTS can be trick even for native speakers.<br />
<strong> &#8211; Is a teacher really needed?<br />
</strong>It depends on your level, time and money.<br />
<strong> &#8211; How long the certificate is valid?</strong></p>
<p><strong>- How to book the exam?</strong></p>
<p><strong>- How much does it cost?<br />
</strong>Around U$200,00</p>
]]></content:encoded>
			<wfw:commentRss>http://dattein.com/blog/ielts-study-guide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Marketcetera review</title>
		<link>http://dattein.com/blog/marketcetera-review/</link>
		<comments>http://dattein.com/blog/marketcetera-review/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 19:56:51 +0000</pubDate>
		<dc:creator>fsamir</dc:creator>
				<category><![CDATA[Trading]]></category>

		<guid isPermaLink="false">http://dattein.com/blog/?p=499</guid>
		<description><![CDATA[This is a quick review of the Marketcetera Automated Trading System.
Pros:
- Youtube channel with a lot of usefull Screencasts
- Active community and forum.
- Easy to install on Windows machines, trough and .exe that comes with all you need.
- View and Model Layers are decoupled. You can run it in a server and access it remotely [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" style="border: 3px solid white; margin: 3px;" title="d" src="http://sourceforge.net/dbimage.php?id=135290" alt="" width="286" height="254" />This is a quick review of the <a href="http://www.marketcetera.org">Marketcetera Automated Trading System</a>.</p>
<p><strong>Pros:</strong><br />
- <a href="ttp://www.youtube.com/user/Marketcetera">Youtube channel</a> with a lot of usefull Screencasts<br />
- Active community and <a href="http://www.marketcetera.org/community/forums/list.page">forum</a>.<br />
- Easy to install on Windows machines, trough and .exe that comes with all you need.<br />
- View and Model Layers are decoupled. You can run it in a server and access it remotely or locally via the GUI, called Photon.<br />
- Uses the FIX standard protocol.<br />
- Has a Fix simulator at <a href="http://exchange.marketcetera.com/marketDisplay">http://exchange.marketcetera.com/marketDisplay</a><br />
- Built in Java, which means it runs in any platform and is highly extensible.<br />
- It us Open Source with paid support. It means that if you are running it with real money and you have a problem, you have someone to hire and fix it.<br />
- The Strategies can be written in Java and Ruby.<br />
- Strategies can be rapidly coded inside of Photon or <a href="http://www.marketcetera.org/confluence/display/MOL/Java+Strategy+Authoring">in any Java IDE</a>.<br />
- The graphical interface (Photon) is based on Eclipse RCP</p>
<p><strong>Cons:</strong><br />
- Doesn&#8217;t work with Proxy Connections.<br />
- Doesn&#8217;t have a Realtime Graph (It has a JFreechart plugin to generate (poor) graphs. It would be nice to get the Graphs from EclipseTrader and integrate on Marketcetera.<br />
- Difficult to Backtest based on CSV files. (It requires a<a href="http://www.marketcetera.org/confluence/display/MOL/CSV+Market+Data+Adapter"> plugin</a>)<br />
- Does not support protocols other than FIX.</p>
]]></content:encoded>
			<wfw:commentRss>http://dattein.com/blog/marketcetera-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to produce T-shirts</title>
		<link>http://dattein.com/blog/how-to-produce-t-shirts/</link>
		<comments>http://dattein.com/blog/how-to-produce-t-shirts/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 20:05:29 +0000</pubDate>
		<dc:creator>fsamir</dc:creator>
				<category><![CDATA[Geek]]></category>

		<guid isPermaLink="false">http://dattein.com/blog/?p=474</guid>
		<description><![CDATA[Introduction

I have started thinking about producing some Kiteboarding T-Shirts and perhaps start a small Kite Wear Company about six months ago. As a software developer, I am comfortable with computers and I thought I could do the designs myself, after watching some Illustrators Tutorials on the internet. I quickly realized that I was completely wrong. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction</strong></p>
<p><img class="alignleft" style="border: 3px solid white; margin: 3px;" title="Brother GT541 sample" src="http://farm3.static.flickr.com/2527/4222892102_c652f941f3_m.jpg" alt="" width="240" height="176" /></p>
<p>I have started thinking about producing some Kiteboarding T-Shirts and perhaps start a small Kite Wear Company about six months ago. As a software developer, I am comfortable with computers and I thought I could do the designs myself, after watching some Illustrators Tutorials on the internet. I quickly realized that I was completely wrong. I have no skills neither talent to create artistic designs. Thus, I went to the Auto Tracing Tools, such as Corel Trace and some others.<br />
Their result were even worse than my manually generated designs.<br />
I had no choice, if I wanted to produce high quality t-shirts, I would have to hire a professional designer.</p>
<p>I did some budged estimates and I almost gave up due to the high cost to produce a vector design. It was about U$100,00.  To be honest it is not  that expensive for an established company. However, I don&#8217;t have a company, I was not even thinking about opening one. I was willing to produce small quantities of 5 or 10 different designs. In this case, the U$100,00 for images would be too expensive.<br />
In order to produce T-shirts with good quality and an affordable price, we have to find and talented and affordable  designer and a base image to start.</p>
<p><strong>Requirements</strong></p>
<p>This paragraph is to explain what are the requirements involved in the life-cycle of the t-shirt production, such as tools, prototyping, vectorization, printing, colors, fabric types and cuts.</p>
<p><span id="more-474"></span></p>
<p>- Basic understanding of vectorization tools like Adobe Illustrator or Corel Draw<br />
- A good designer capable of producing vector images<br />
- A way to prototype before producing large quantities<br />
- A good silk screen company<br />
- A good fabric provider<br />
<strong> </strong></p>
<p><strong>Tools</strong></p>
<p>You can&#8217;t use regular images like JPGs to print using silk-screen, this image needs to be converted to the vector format.<br />
The Silk Screen process consists in the separation of every color in an image and printing them one after the other. so, it requires you to provide a way to print every color in separete<br />
There are some tools that can convert an image to vector automatically, such as Coral Trace, but unfortunately the result is almost always with low quality.</p>
<p>I prefer to use Adobe Illustrator because it is user friendly, but keep in mind that most of the silk-screen companies only have Corel.</p>
<p><strong>Finding a good designer</strong></p>
<p>I have no doubt that hiring a consultant designer is the best way to get exactly what you want and with high quality. However, professional designers are usually expensive and not suitable for small projects. I have found consultants charging an average of U$100,00 per job. By job I mean, a complete T-shirt design without review limitations.<br />
So, I started browsing the web for cheap alternatives, as always. In this journey I have passed through several designers, charging from U$5,00 to U$40,00. Most of them are natural from India, China and Russia, Pakistan, etc.</p>
<p><strong>- PGConversion.com: </strong><br />
These guys are amazing. They charge U$26,00 to convert and JPG to vector and U$40,00 to convert and JPG and add their creativity to a complete T-shirt design. They also offer unlimited reviews in this price.<br />
My first try with them was to convert and picture to a vector and that was the result after 2 or 3 reviews:</p>
<div>
<table style="height: 303px;" border="0" width="473">
<tbody>
<tr>
<td style="text-align: center;">
<div class="wp-caption alignnone" style="width: 205px"><img src="http://farm2.static.flickr.com/1384/3270506728_57a3a770b3_m.jpg" alt="" width="195" height="213" /><p class="wp-caption-text">Before</p></div></td>
<td>
<p><div class="wp-caption alignnone" style="width: 208px"><img src="http://farm5.static.flickr.com/4022/4323193486_f3b028dd1c_m.jpg" alt="After" width="198" height="227" /><p class="wp-caption-text">After</p></div></td>
</tr>
</tbody>
</table>
</div>
<p><strong> </strong></p>
<p>In a second try I gave them a more complex image to be converted and asked (and payed more) them to use their creativity. It took about 20 reviews, has cost U$40,00 but the resulting vector was pretty good.<br />
Although the result is very good, it is a JPG to Vector conversion as usual, without many creativity. I had to provide all the elements in the picture:</p>
<p><div class="wp-caption alignnone" style="width: 250px"><img src="http://farm5.static.flickr.com/4014/4332597629_9c2fa0ded3_m.jpg" alt="" width="240" height="180" /><p class="wp-caption-text">Base image</p></div>
<div class="wp-caption alignnone" style="width: 386px"><img src="http://farm5.static.flickr.com/4039/4323193320_e5dbeb05ef.jpg" alt="After" width="376" height="199" /><p class="wp-caption-text">First version. (Nice, but too many colors for a T-Shirt)</p></div>
<div class="wp-caption alignnone" style="width: 321px"><img src="http://farm3.static.flickr.com/2730/4332563056_8b35483f61.jpg" alt="Final result" width="311" height="177" /><p class="wp-caption-text">Final version after about 20 reviews.</p></div>
<p><strong>- RentACoder.com: </strong><br />
ReantACoder is a auction web-site for developers. You can offer you skills and hire skilled developer and designers. They provide a very good interface to add your requirements and instructions on how to get them done well and without frustration.<br />
The main advantage of RaC is the price. You can get vectors as low as U$5,00. Off course you get what you pay for.<br />
I have asked for samples in all my auctions. If you don&#8217;t ask for a sample you might get an &#8220;auto-traced vector&#8221;.<br />
It is worth the try, specially if you image is simple.<br />
The conversion below has a cartoons style and its cost was only U$10,00.</p>
<div>
<table border="0">
<tbody>
<tr>
<td style="text-align: center;">
<div>
<dl style="width: 220px;">
<dt><img class="alignnone" src="http://farm2.static.flickr.com/1011/3270499244_1ddfcc1c90_m.jpg" alt="" width="210" height="240" /> </dt>
<dd>Before</dd>
</dl>
</div>
</td>
<td><img class="alignnone" src="http://farm5.static.flickr.com/4059/4251840336_1be075bfe9_m.jpg" alt="" width="240" height="206" /></p>
<div>
<dl style="width: 208px;">
<dt> </dt>
<dd style="text-align: center;">After</dd>
</dl>
</div>
</td>
<td></td>
</tr>
</tbody>
</table>
</div>
<p><strong> </strong></p>
<p><strong><br />
</strong><strong>Prototyping</strong></p>
<p>The Silk Screen companies usually require you to print a minimum quantity of 20 units. Imagine if there is a small mistake in the entire production. You would end up with 20 brand new pijamas.<br />
Fortunately there are two good ways to prototype. Imaging prototyping and with a Inkjet printer.</p>
<p>The imaging prototyping is simple as putting your art over a clena T-shirt picture in your preferred image editor. You can use this clean pictures: <a href="http://www.flickr.com/photos/frankllin/tags/tshirtbackground/">http://www.flickr.com/photos/frankllin/tags/tshirtbackground/</a> (These are not the best T-shirt color in the world. I would appreciate you someone could provide me other colors)</p>
<p>After that you can print a sample in a  T-shirt Printer and avoid the most common mistakes.<strong> </strong>There is a &#8220;T-Shirt Kiosk&#8221; in a shopping mall closer to my home, which has a Brother GT-541 printer and charges U$12,00 per t-shirt. The result is usually poor, lacks for the white color and the cost is slightly higher than Silk Screen, but the advantage is that you can print a single unit before sending your artwork for production.</p>
<p>These are the mistakes that I look when prototyping:</p>
<ul>
<li>Position and alignment of the image.</li>
<li>If the combination of colors fits well in the fabric.</li>
<li>If my art has more details than a printing can handle.</li>
</ul>
<p>Finally,  a good Silk Screen Company has to provide a sample. If they don&#8217;t provide you samples, find another company. Believe me, without a sample you build a collection of pijamas.<strong><br />
</strong></p>
<p><strong>Printing with </strong><strong>Silk Screen<br />
</strong></p>
<p>A t-shirt is generally printed with silk-screen, which requires every color to be printed separetelly. that is why we need to use vectors and not flat images, so the colors can be separated and printed one by one.</p>
<p>ps. I write this blog in English willing to practice my Eglish writting skills. I will appreciate if you post a comment either with fixes or pieces of advice.</p>
]]></content:encoded>
			<wfw:commentRss>http://dattein.com/blog/how-to-produce-t-shirts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Arduino potentiometer sensor</title>
		<link>http://dattein.com/blog/arduino-potentiometer-sensor/</link>
		<comments>http://dattein.com/blog/arduino-potentiometer-sensor/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 19:05:05 +0000</pubDate>
		<dc:creator>fsamir</dc:creator>
				<category><![CDATA[Arduino]]></category>

		<guid isPermaLink="false">http://dattein.com/blog/?p=447</guid>
		<description><![CDATA[Plug it and Arduino  read rotation ! 
This post is a copy of the Original post on EBay. I am replicating it here because ended items on Ebay are not indexed by Google, the author&#8217;s page is written in Chinese and doesn&#8217;t contains the Source code. If you are the author and you are obset with [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-family: Arial,Helvetica,sans-serif;"><strong><span style="color: #15bd97; font-size: x-big;">Plug it and Arduino  read rotation ! </span></strong></span></p>
<blockquote><p>This post is a copy of the <a href="http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&amp;item=200403947599">Original post on EBay</a>. I am replicating it here because ended items on Ebay are not indexed by Google, the <a href="http://www.flamingoeda.com">author&#8217;s page</a> is written in Chinese and doesn&#8217;t contains the Source code. If you are the author and you are obset with this, please get in touch.</p></blockquote>
<p><span style="font-family: Arial,Helvetica,sans-serif;">This Potentiometer module is a simple knob that provides a variable resistance, which we can read into the Arduino board as an analog value. By turning the shaft of the potentiometer, we change the input signal to analog pin. </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Building interactive work is as easy as piling bricks, just plug it to our Arduino Sensor Shield with a buckled cable, and make it looks professional and neat.<br />
</span><img src="http://i636.photobucket.com/albums/uu89/pokaralake/Arduino_Potentiometer_module_0.jpg" alt="" width="388" height="285" /></p>
<p><span id="more-447"></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">The code below controls frequency of on and off of a LED light , </span></p>
<pre class="c-sharp">int potPin = 4;    // pin for potentiometer
int ledPin = 13;   // pin for LED
int val = 0;       

void setup() {
  pinMode(ledPin, OUTPUT);  // state ledPin as an OUTPUT
}

void loop() {
  val = analogRead(potPin);
  digitalWrite(ledPin, HIGH);
  delay(val);
  digitalWrite(ledPin, LOW);
  delay(val);
}</pre>
<p><img src="http://i636.photobucket.com/albums/uu89/pokaralake/Arduino_Potentiometer_module_2.jpg" alt="" width="388" height="285" /></p>
<p><img src="http://i636.photobucket.com/albums/uu89/pokaralake/Arduino_Potentiometer_module_1.jpg" alt="" /></p>
<p><a href="http://dattein.com/blog/wp-content/uploads/2009/12/PotentiometerSensor.zip">PotentiometerSensor</a> Source code</p>
]]></content:encoded>
			<wfw:commentRss>http://dattein.com/blog/arduino-potentiometer-sensor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
