<?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" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="en-US">
  <id>tag:blog.codegram.com,2005:/feed</id>
  <link rel="alternate" type="text/html" href="http://blog.codegram.com" />
  
  <title>Codegram Blog</title>
  <updated>2012-03-12T10:43:34Z</updated>
  <icon>http://codegram-web.s3.amazonaws.com/favicon.png</icon>
  <logo>http://codegram-web.s3.amazonaws.com/images/logo.png</logo>
  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/codegram" /><feedburner:info uri="codegram" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry>
    <id>tag:blog.codegram.com,2005:Post/32</id>
    <published>2012-03-12T10:43:34Z</published>
    <updated>2012-03-12T10:44:05Z</updated>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/codegram/~3/bd45_U_-aC0/this-weeks-talks-bdd-best-practices-and-antipatterns-and-brew-your-own-coffeescript" />
    <title>This week's talks: "BDD best practices and antipatterns" and "Brew your own coffee...script"</title>
    <summary>This week's talks have been hosted by Oriol Gual(@oriolgual) and Txus (@txustice)</summary>
    <content type="html">&lt;p&gt;Check out this week's internal talk slides at Codegram:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://talks.codegram.com/bdd-best-practices-and-antipatterns"&gt;BDD best practices and antipatterns&lt;/a&gt;: &lt;a href="http://twitter.com/oriolgual"&gt;Oriol Gual&lt;/a&gt; goes through some best practices that every BDD adopter should consider, and what anti-patterns should be avoided.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://talks.codegram.com/brew-your-own-coffeescript"&gt;Brew your own coffee...script&lt;/a&gt;: &lt;a href="http://twitter.com/txustice"&gt;Txus&lt;/a&gt; shows us how to build a simple transcompiler (like CoffeeScript) in Ruby.&lt;/li&gt;
&lt;/ul&gt;

&lt;img src="http://feeds.feedburner.com/~r/codegram/~4/bd45_U_-aC0" height="1" width="1"/&gt;</content>
    <author>
      <name>Josep M. Bach</name>
    </author>
  <feedburner:origLink>http://blog.codegram.com/2012/3/this-weeks-talks-bdd-best-practices-and-antipatterns-and-brew-your-own-coffeescript</feedburner:origLink></entry>
  <entry>
    <id>tag:blog.codegram.com,2005:Post/31</id>
    <published>2012-02-27T10:57:55Z</published>
    <updated>2012-02-27T13:29:43Z</updated>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/codegram/~3/uS4RhxVU8xI/this-weeks-talks-encoding-messages-in-a-noiseless-channel-and-http-authentication-methods" />
    <title>This week's talks: "Encoding messages in a noiseless channel" and "HTTP authentication methods"</title>
    <summary>This week's talks have been hosted by Marc Riera (@mrcasals) and Josep Jaume Rey (@josepjaume)</summary>
    <content type="html">&lt;p&gt;Check out this week's internal talk slides at Codegram:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://talks.codegram.com/encoding-for-noiseless-channels"&gt;Encoding messages in a noiseless channel&lt;/a&gt;: &lt;a href="http://twitter.com/mrcasals"&gt;Marc Riera&lt;/a&gt; explained to us how to construct an optimal, unique message encoding using the Huffman algorithm.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://talks.codegram.com/http-authentication-methods"&gt;HTTP authentication methods&lt;/a&gt;: &lt;a href="http://twitter.com/josepjaume"&gt;Josep Jaume&lt;/a&gt; walked us among several http authentication methods, explaining some of their vulnerabilities.&lt;/li&gt;
&lt;/ul&gt;

&lt;img src="http://feeds.feedburner.com/~r/codegram/~4/uS4RhxVU8xI" height="1" width="1"/&gt;</content>
    <author>
      <name>Josep Jaume Rey</name>
    </author>
  <feedburner:origLink>http://blog.codegram.com/2012/2/this-weeks-talks-encoding-messages-in-a-noiseless-channel-and-http-authentication-methods</feedburner:origLink></entry>
  <entry>
    <id>tag:blog.codegram.com,2005:Post/30</id>
    <published>2012-02-14T16:12:55Z</published>
    <updated>2012-02-14T16:13:18Z</updated>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/codegram/~3/K9kaHB37qcc/linting-the-hell-out-of-your-ruby-classes-with-pelusa" />
    <title>Linting the hell out of your Ruby classes with Pelusa</title>
    <summary>Gain new insights about your code thanks to static analysis</summary>
    <content type="html">&lt;p&gt;As you might know, yesterday morning we had Monday talks at the office! Oriol talked about &lt;a href="http://talks.codegram.com/object-oriented-nirvana"&gt;Object Oriented Nirvana&lt;/a&gt;, inspired by an &lt;a href="http://binstock.blogspot.com/2008/04/perfecting-oos-small-classes-and-short.html"&gt;old post&lt;/a&gt; about how to improve Object Oriented skills by using certain constraints while you're coding.&lt;/p&gt;

&lt;p&gt;Then I got immediately interested on how to automate this, and knowing how easy is dealing with the Rubinius' Abstract Syntax Tree, I decided to give it a try and develop a tool that statically analyzes Ruby code to gain insights from it.&lt;/p&gt;

&lt;p&gt;But what does it mean "statical analysis"? It means that this tool won't run any of your code at all, it just inspects it like you would as a developer, by looking at it. Since code is nothing more than nodes inside nodes, you can easily identify certain patterns that you consider wrong or desirable (for example, having &lt;em&gt;else&lt;/em&gt; clauses in &lt;em&gt;ifs&lt;/em&gt;, nesting blocks, or just using the word "foo" in actual programs). By traversing the AST, you can analyze parts of the code that don't fit your particular style or code quality requirements (actually with a little more work you could programmatically change those parts, i.e. automatic refactoring). I find this really cool!&lt;/p&gt;

&lt;p&gt;The tool I've been working for the last couple of days is something along these lines (excluding, for now, the automatic refactoring part).&lt;/p&gt;

&lt;h3&gt;Introducing Pelusa - a Ruby Lint to improve your OO skills&lt;/h3&gt;

&lt;p&gt;Pelusa (which is Spanish for the word &lt;em&gt;lint&lt;/em&gt;) is a static analysis tool and framework to inspect your code style and notify you about possible red flags or missing best practices. Above all pelusa doesn't run your code -- it just analyzes it syntactically to gain superficial insights about it, and raise red flags when needed.&lt;/p&gt;

&lt;p&gt;Although Pelusa needs Rubinius to run, due to how easy it is to work with a Ruby AST with it, it doesn't mean that you have to run your application or Ruby code on Rubinius. Since it's a static analysis tool, pelusa doesn't care what your code runs on, it just looks at it and tells you stuff.&lt;/p&gt;

&lt;p&gt;If you're curious, it looks like this (running on it's own code base, oh inception):&lt;/p&gt;

&lt;p&gt;&lt;img src="http://f.cl.ly/items/3Z341M0q2u1K242m0144/%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202012-02-14%20%D0%B2%203.29.38%20PM.png" alt="" /&gt;&lt;/p&gt;

&lt;h3&gt;Find the default lint checks too Taliban for your tastes?&lt;/h3&gt;

&lt;p&gt;These are just guides, so you're free to fork the project and add/remove lints as you like.
The fact that I've started with those &lt;em&gt;doesn't mean&lt;/em&gt; that any of us thinks these are the true and only practices of Object Orientation, it's just a set of constraints that are fun to follow to achieve a mindset shift in the long run, or just to explore new styles.&lt;/p&gt;

&lt;p&gt;One of the next features will be easy composability of lints, so you can remove those you don't like and add custom ones that fit your team's style or quality standards :)&lt;/p&gt;

&lt;h3&gt;Pelusa as a static analysis framework&lt;/h3&gt;

&lt;p&gt;With Pelusa, writing your own lints becomes very easy. Check out some of the
default lints under the &lt;code&gt;lib/pelusa/lint/&lt;/code&gt; directory in the &lt;a href="http://github.com/codegram/pelusa"&gt;Github repo&lt;/a&gt;. Rolling your own style has never been easier!&lt;/p&gt;

&lt;h3&gt;Conclusion&lt;/h3&gt;

&lt;p&gt;My point by doing this was mainly exploring static analysis with Ruby, since I've never done it before, but also proving a point: good development tools are not only for statically typed languages! With a little imagination we can leverage our skills to make life better, or at least more interesting, for Ruby developers as well.&lt;/p&gt;

&lt;p&gt;What do &lt;em&gt;you&lt;/em&gt; think? Would you use this kind of tooling in your everyday job?&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/codegram/~4/K9kaHB37qcc" height="1" width="1"/&gt;</content>
    <author>
      <name>Josep M. Bach</name>
    </author>
  <feedburner:origLink>http://blog.codegram.com/2012/2/linting-the-hell-out-of-your-ruby-classes-with-pelusa</feedburner:origLink></entry>
  <entry>
    <id>tag:blog.codegram.com,2005:Post/29</id>
    <published>2012-02-13T10:46:44Z</published>
    <updated>2012-02-13T10:59:26Z</updated>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/codegram/~3/lUA0rU6ogVU/this-weeks-talks-creating-basic-chrome-extensions-and-object-oriented-nirvana" />
    <title>This week's talks: "Creating basic Chrome extensions" and "Object Oriented Nirvana"</title>
    <summary>This week's talks have been hosted by Oriol Gual (@oriolgual) and Marc Divins (@mdivins)</summary>
    <content type="html">&lt;p&gt;Check out this week's internal talk slides at Codegram:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://talks.codegram.com/creating-basic-chrome-extensions"&gt;Basic Chrome Extensions&lt;/a&gt;: &lt;a href="http://twitter.com/mdivins"&gt;Marc Divins&lt;/a&gt; introduced us to the creation of some extensions. &lt;em&gt;Warning&lt;/em&gt;: Intense trolling ahead!&lt;/li&gt;
&lt;li&gt;&lt;a href="http://talks.codegram.com/object-oriented-nirvana"&gt;Object Oriented Nirvana&lt;/a&gt;: &lt;a href="http://twitter.com/oriolgual"&gt;Oriol Gual&lt;/a&gt; refactored some of our &lt;a href="http://github.com/codegram/spinach"&gt;Spinach&lt;/a&gt; codebase by applying some Object Orientation's best practices taken from &lt;a href="http://www.amazon.com/ThoughtWorks-Anthology-Technology-Innovation-Programmers/dp/193435614X?ie=UTF8&amp;amp;s=books&amp;amp;qid=1209017123&amp;amp;sr=8-1"&gt;The ThoughtWorks Anthology&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;img src="http://feeds.feedburner.com/~r/codegram/~4/lUA0rU6ogVU" height="1" width="1"/&gt;</content>
    <author>
      <name>Josep Jaume Rey</name>
    </author>
  <feedburner:origLink>http://blog.codegram.com/2012/2/this-weeks-talks-creating-basic-chrome-extensions-and-object-oriented-nirvana</feedburner:origLink></entry>
  <entry>
    <id>tag:blog.codegram.com,2005:Post/28</id>
    <published>2012-02-06T12:16:29Z</published>
    <updated>2012-02-06T12:17:20Z</updated>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/codegram/~3/xMTJnixegs4/introducing-monday-talks-at-codegram" />
    <title>Introducing Monday Talks at Codegram</title>
    <summary>Sharing knowledge through weekly talks about software and computer science</summary>
    <content type="html">&lt;p&gt;We've been noticing an increasing knowledge specialization ever since we doubled our team earlier last year, going from the 3 cofounders to a team of 6 people. This is a natural process, but sharing knowledge has become a bit trickier. As a company we sell knowledge, thus it's our most valuable asset &amp;mdash; and sharing it among the team (and outside it) is crucial to increase our value.&lt;/p&gt;

&lt;p&gt;Although we do have a set of common places to share knowledge (from an internal Google Groups site to various link-sharing tools), achieving the same level of specialization in all the fields is a hard task.&lt;/p&gt;

&lt;p&gt;Given this, we had an idea: why don't we prepare weekly talks about software and computer science in general, and expose them to our peers every Monday? So we did this: Monday Talks is about sharing knowledge with your peers, improving your public speaking skills, and most importantly &amp;mdash; having fun while doing it!&lt;/p&gt;

&lt;p&gt;We've &lt;a href="http://talks.codegram.com"&gt;set up a site&lt;/a&gt; where we publicly upload the slides for our talks.&lt;/p&gt;

&lt;p&gt;Also, if you want us to give an extended version of any of this talks at your company or university, with more examples, bibliography and Q&amp;amp;A, &lt;a href="http://codegram.com/contact"&gt;contact us&lt;/a&gt; :)&lt;/p&gt;

&lt;h3&gt;This week's talks&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Josep Jaume: &lt;a href="http://talks.codegram.com/heroku-buildpacks"&gt;Heroku Buildpacks: Heroku for everything&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Txus: &lt;a href="http://talks.codegram.com/building-a-vm-in-ruby"&gt;Building a VM in Ruby&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;img src="http://feeds.feedburner.com/~r/codegram/~4/xMTJnixegs4" height="1" width="1"/&gt;</content>
    <author>
      <name>Josep M. Bach</name>
    </author>
  <feedburner:origLink>http://blog.codegram.com/2012/2/introducing-monday-talks-at-codegram</feedburner:origLink></entry>
</feed>

