<?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>reinventar &#187; Programming</title>
	<atom:link href="http://reinventar.com/tag/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://reinventar.com</link>
	<description>now with double the colour and flavor!</description>
	<lastBuildDate>Wed, 28 Jul 2010 14:52:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Remaking MBNet at Codebits</title>
		<link>http://reinventar.com/2009/12/remaking-mbnet-at-codebits/</link>
		<comments>http://reinventar.com/2009/12/remaking-mbnet-at-codebits/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 15:10:29 +0000</pubDate>
		<dc:creator>psousa</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[codebits]]></category>
		<category><![CDATA[mbnet]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://reinventar.com/?p=775</guid>
		<description><![CDATA[We&#8217;re participating once again on Codebits this year with the help of Bauke Schildt on the design. We&#8217;ve decided to try something diferent and create a proof-of-concept remake of the MBNet platform to show how it can be improved and adapted for todays time. MBNet is a portuguese service where you can create temporary virtual [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.thinkorange.pt">We&#8217;re</a> participating once again on <a href="http://www.codebits.eu">Codebits</a> this year with the help of <a href="http://www.schildt.nl">Bauke Schildt </a>on the design.</p>
<p>We&#8217;ve decided to try something diferent and create a proof-of-concept remake of the MBNet platform to show how it can be improved and adapted for todays time.</p>
<div class="wide"><img class="alignleft size-medium wp-image-779" title="popup" src="http://reinventar.com/wp-content/uploads/2009/12/popup-236x300.png" alt="popup" width="236" height="300" /></div>
<p><span id="more-775"></span></p>
<p><a href="http://www.mbnet.pt">MBNet</a> is a portuguese service where you can create temporary virtual VISA cards with any amount of money you want. Yes, it&#8217;s very useful and important but the service isn&#8217;t updated since 2005.</p>
<p>So our objectives were:</p>
<ul>
<li>KISS!</li>
<li> Adapt design for todays needs</li>
<li>Better organization of information</li>
<li>Make use of stored data about your payments.</li>
</ul>
<p>We took care in simplifying some steps (like the payments pop-up) and improving the usefulness of the data that exists in the platform.</p>
<p>So now, you should be able to sort, filter and browse your data and use different visualization statistics.</p>
<div class="wide"><img class="alignleft size-medium wp-image-780" title="info" src="http://reinventar.com/wp-content/uploads/2009/12/info-300x55.png" alt="info" width="300" height="55" /></div>
<p>Project is done in Ruby on Rails, Mysql and jQuery. HTML/CSS is done using the 960gs. All in 24 hours. Some things are not completely functional. It&#8217;s a proof-of-concept. ;)</p>
<p>You can view the project online at <a href="http://mbnet.heroku.com" target="_blank">mbnet.heroku.com</a>.</p>
<p>Here&#8217;s some screenshots:</p>

<a href='http://reinventar.com/2009/12/remaking-mbnet-at-codebits/mbnet_statistics/' title='mbnet_statistics'><img width="150" height="150" src="http://reinventar.com/wp-content/uploads/2009/12/mbnet_statistics-150x150.jpg" class="attachment-thumbnail" alt="mbnet_statistics" title="mbnet_statistics" /></a>
<a href='http://reinventar.com/2009/12/remaking-mbnet-at-codebits/mbnet_transactions/' title='mbnet_transactions'><img width="150" height="150" src="http://reinventar.com/wp-content/uploads/2009/12/mbnet_transactions-150x150.jpg" class="attachment-thumbnail" alt="mbnet_transactions" title="mbnet_transactions" /></a>
<a href='http://reinventar.com/2009/12/remaking-mbnet-at-codebits/simple_mbnet/' title='simple_mbnet'><img width="150" height="150" src="http://reinventar.com/wp-content/uploads/2009/12/simple_mbnet-150x150.jpg" class="attachment-thumbnail" alt="simple_mbnet" title="simple_mbnet" /></a>
<a href='http://reinventar.com/2009/12/remaking-mbnet-at-codebits/popup/' title='popup'><img width="150" height="150" src="http://reinventar.com/wp-content/uploads/2009/12/popup-150x150.png" class="attachment-thumbnail" alt="popup" title="popup" /></a>
<a href='http://reinventar.com/2009/12/remaking-mbnet-at-codebits/info/' title='info'><img width="150" height="150" src="http://reinventar.com/wp-content/uploads/2009/12/info-150x150.png" class="attachment-thumbnail" alt="info" title="info" /></a>

]]></content:encoded>
			<wfw:commentRss>http://reinventar.com/2009/12/remaking-mbnet-at-codebits/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Upload files using Paperclip on Ruby on Rails</title>
		<link>http://reinventar.com/2009/03/upload-files-with-paperclip-on-ruby-on-rails/</link>
		<comments>http://reinventar.com/2009/03/upload-files-with-paperclip-on-ruby-on-rails/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 10:25:15 +0000</pubDate>
		<dc:creator>psousa</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[file upload]]></category>
		<category><![CDATA[paperclip]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://reinventar.com/?p=543</guid>
		<description><![CDATA[Paperclip is an awesome plugin to handle file uploads in Ruby on Rails. I&#8217;ve been using in a couple of projects lately and I thought I&#8217;d talk a bit about it. First of all, you need to install the plugin on your project by doing: script/plugin install git://github.com/thoughtbot/paperclip.git from your project main directory. After this, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://thoughtbot.com/projects/paperclip">Paperclip</a> is an awesome plugin to handle file uploads in Ruby on Rails. I&#8217;ve been using in a couple of projects lately and I thought I&#8217;d talk a bit about it.</p>
<p>First of all, you need to install the plugin on your project by doing:</p>
<pre><code>script/plugin install git://github.com/thoughtbot/paperclip.git</code></pre>
<p>from your project main directory. After this, usage is very simple.</p>
<p>Let&#8217;s imagine I have a user model and I want to have a avatar attribute to include a picture of the user and let&#8217;s say we want that avatar to be resized to 3 different sizes (120&#215;120, 48&#215;48 and 26&#215;26). Paperclip does this using ImageMagick.</p>
<p>We&#8217;re first going to create a migration to hold all this information:</p>
<pre><code>class AddAttachmentsAvatarToUser &lt; ActiveRecord::Migration
  def self.up
    add_column :users, :avatar_file_name, :string
    add_column :users, :avatar_content_type, :string
    add_column :users, :avatar_file_size, :integer
    add_column :users, :avatar_updated_at, :datetime
  end

  def self.down
    remove_column :users, :avatar_updated_at
    remove_column :users, :avatar_file_name
    remove_column :users, :avatar_content_type
    remove_column :users, :avatar_file_size
  end
end</code></pre>
<p>Then we define the attribute in the model:</p>
<pre><code>
class User &lt; ActiveRecord::Base
has_attached_file :avatar, :styles =&gt; { :large =&gt; "120x120&gt;", :medium =&gt; "48x48&gt;", :thumb =&gt; "26x26&gt;" }
end
</code></pre>
<p>Here&#8217;s an example on how your form should be:</p>
<pre><code>&lt;% form_for :user, @user, :url =&gt; user_path, :html =&gt; { :multipart =&gt; true } do |form| %&gt;
    &lt;%= form.file_field :avatar %&gt;
  &lt;% end %&gt;</code></pre>
<p>Your controller doesn&#8217;t have to do anything specific to handle the avatar, just save the user as usual.</p>
<pre><code>  def create
    @user = User.create( params[:user] )
  end</code></pre>
<p>And finally, if you want to show the avatar in your view, here&#8217;s some examples:</p>
<pre><code>  &lt;%= image_tag @user.avatar.url %&gt;
  &lt;%= image_tag @user.avatar.url(:medium) %&gt;
  &lt;%= image_tag @user.avatar.url(:thumb) %&gt;</code></pre>
<p>That wasn&#8217;t very difficult. There&#8217;s some advance stuff you can do with <a href="http://thoughtbot.com/projects/paperclip">Paperclip</a>, like<a href="http://almosteffortless.com/2008/12/11/easy-upload-via-url-with-paperclip/"> upload via a URL</a> or upload your files to Amazon&#8217;s S3 or define post processing operations on your files.</p>
<p>So get creative and use it in your projects. :)</p>
<p>Update:<a href="http://thewebfellas.com/blog/2008/11/2/goodbye-attachment_fu-hello-paperclip"> The WebFellas</a> have a very deep and interesting article about Paperclip, <a href="http://thewebfellas.com/blog/2008/11/2/goodbye-attachment_fu-hello-paperclip">check it out</a>.</p>
<p><a href="http://bookworms.sapo.pt"><img class="alignleft size-full wp-image-544" title="picture-52" src="http://reinventar.com/wp-content/uploads/2009/03/picture-52.png" alt="picture-52" width="468" height="320" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://reinventar.com/2009/03/upload-files-with-paperclip-on-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Performance on Rails Barcamp pt 08</title>
		<link>http://reinventar.com/2008/09/performance-on-rails-barcamp-pt-08/</link>
		<comments>http://reinventar.com/2008/09/performance-on-rails-barcamp-pt-08/#comments</comments>
		<pubDate>Sat, 06 Sep 2008 18:19:13 +0000</pubDate>
		<dc:creator>psousa</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[barcamp08]]></category>
		<category><![CDATA[barcamppt]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://reinventar.com/?p=305</guid>
		<description><![CDATA[I just finished my presentation on Barcamp pt 08 which is held again in Coimbra. Although I was a bit nervous I think it went ok. The topic I choose was Performance on Ruby on Rails where I talked about the different issues surrounding getting the most performance out of your Ruby applications. I spoke [...]]]></description>
			<content:encoded><![CDATA[<p>I just finished my presentation on <a href="http://www.barcamppt.org/" target="_blank">Barcamp pt 08</a> which is held again in Coimbra. Although I was a bit nervous I think it went ok.</p>
<p><img class="size-full wp-image-306 alignleft" title="barcamp08" src="http://reinventar.com/wp-content/uploads/2008/09/barcamp08.png" alt="" width="205" height="130" /><br />
The topic I choose was Performance on Ruby on Rails where I talked about the different issues surrounding getting the most performance out of your Ruby applications.</p>
<p>I spoke about all the types of Caching, including the recent changes in Rails 2.1 and other tips for optimization which could be abstracted to other languages.</p>
<p>I think I managed to explain the different ways the Rails framework has to help optimize your web applications. You can see the slides from <a href="http://www.slideshare.net/psousa/performance-on-rails-barcamp-pt-08-presentation" target="_blank">Performance on Rails on SlideShare</a>.</p>
<p>I&#8217;m hoping forward for the other sessions, there&#8217;s some very interesting topics like scrumm, mysql optimization and others. See you there.</p>
<p>Update: I&#8217;ve uploaded my photos from the event to my <a href="http://flickr.com/photos/psousa/tags/barcamp08/" target="_blank">Flickr profile</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://reinventar.com/2008/09/performance-on-rails-barcamp-pt-08/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Opera Web Standards Curriculum</title>
		<link>http://reinventar.com/2008/08/opera-web-standards-curriculum/</link>
		<comments>http://reinventar.com/2008/08/opera-web-standards-curriculum/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 10:53:10 +0000</pubDate>
		<dc:creator>psousa</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[campaigns]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[web standards]]></category>

		<guid isPermaLink="false">http://reinventar.com/?p=265</guid>
		<description><![CDATA[Opera published the Web Standards Curriculum, a series of articles which were released in association with the Yahoo! Developer Network, the goal is to: teach you standards-based web development, including HTML, CSS, design principles and background theory, and JavaScript basics.  I find the initiative very positive, there&#8217;s already 23 articles and 30 more are coming until the [...]]]></description>
			<content:encoded><![CDATA[<p>Opera published the <a href="http://dev.opera.com/articles/view/1-introduction-to-the-web-standards-cur/">Web Standards Curriculum</a>, a series of articles which were released in association with the <a href="http://developer.yahoo.com/">Yahoo! Developer Network</a>, the goal is to:</p>
<blockquote><p>teach you standards-based web development, including HTML, CSS, design principles and background theory, and JavaScript basics. </p></blockquote>
<p>I find the initiative very positive, there&#8217;s already 23 articles and 30 more are coming until the end of the year. Very nice!</p>
<p><img class="alignnone size-full wp-image-268" title="save the developers" src="http://reinventar.com/wp-content/uploads/2008/08/pic2.png" alt="" width="360" height="130" /></p>
<p>Another worthwhile campaign is <a title="http://www.savethedevelopers.org/" href="http://www.savethedevelopers.org/" target="_blank">&#8220;Save the Developers&#8221;</a> which focuses on assisting and encouraging users in upgrading their Internet Explorer 6 web browser. On the long run it will also help developers who have to spend time making hacks and tweaks for designs to work properly in IE 6 (damn you!).</p>
<p>So upgrade now to a decent browser and help us save the developers. :)</p>
]]></content:encoded>
			<wfw:commentRss>http://reinventar.com/2008/08/opera-web-standards-curriculum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
