Mostrando postagens com marcador Open Source. Mostrar todas as postagens
Mostrando postagens com marcador Open Source. Mostrar todas as postagens

segunda-feira, 14 de abril de 2014

A few things I've learned with Ruby and Rails

The past 3 months have been a heavy storm with hail rain and everything, still there is always a bright side on life events.

During my last job at Code Miner I had the pleasure to work with:
  • Ruby on Rails (and the huge amount of things that come along with it)
  • Good professionals
This short time lead me to decide to share my small knowledge with the others that may struggle, like I did at some points. 

So first things first: Ruby on Rails. This pack made it appearance several times in all those years and deserves a cool place in things you would like to learn or at least should learn.

The Ruby and the Rails community, along with my teammates, taught me lots of new skills and improved old ones, so let's get to the sweeties.

1 - Debug, debug... and.... did I said debug?

The most important thing to learn when programming in any language is how to debug your code. Ruby has this quite good Gem to help you: pry

All you have to do to use it is requiring: require 'pry' then you add binding.pry anywhere on your code and ta-da! when you run your app it will stop at that command and from this time on there is access to code variables, next steps and a few more useful things (take a look at github)

2 - My precious! My gems, gollum gollum

You probably already heard that cliche line: Don't reinvent the wheel.

Ruby has those precious libraries of working software called Gems. 
Need something to debug your code? Bam: Pry gem. 
Need something to parse xml? Boom: Nokogiri gem.
Need some background processing? Pow: Sidekiq gem.
Need your sidekiq jobs to be scheduled? Bang: Sidetiq gem.

There is a huge sort of gems sitting there just waiting to help in solving pesky problems so you can focus on creating an awesome app. Oh and there is a lot of them dedicated directly to Rails like the famous ActiveAdmin.

Ruby Toolbox and Ruby Gems may help you finding the ones you need.

3 - Did you saw that bug?

Sadly Test Driven Development (TDD) isn't used as much as it should be and  I can understand that. 

Most of  the non TDD teams have lots of excuses but almost none of them spent or want to spend enough time using it, otherwise they would see how beautiful and useful it is.

TDD has proven worthy to me after much struggling still with objective-c in iOS world, which community is not so visibly into it. 

Here is 4 reasons why I love it:

1. Bugs reduction and faster bug finding:

The first happens because you're thinking ahead, you need a way to check your code output even before it exists. The later happens because when changes are made you know what is the desired output.

2. Improves code readability and quality

It's hard to believe, but you tend to be more careful with what you're writing since you and others will be getting back to the tests a thousand of times. 

Since you're being more careful with the code it's architecture will receive a boost, be prepared to read tons of articles/book on the subject.

3.  Changes the way you see refactoring

You start to hate when its difficult to test your code, and that will be more often than you think. Refactoring begins to be more clear and this feeling fades away  before you know.

Besides with a good testing suite refactoring  will be easier and delightful.

4. Working in teams is nicer

Hey have you never hated that hard to use friend's code? Now if you have tests you probably will just have to run them a few times and there you go. 

4. Everyone loves free candies, but do you give them too?

This one is short, we all love to use open source projects (yep Gems for example), but most of us don't have the guts to contribute.

Hey no one will shove you off if you're really helping, just give it a try. Oh and those beautiful projects of yours, release them properly as Open Source too, who knows, maybe you get some katas for that attitude.

I didn't learned this here with Ruby, but this feeling is stronger amongst its community.

This absolutely isn't all the things I wanted to share, there is more, but I think this is enough to my purpose, to give you a glimpse of the good things from the many which will improve yourself as a programmer when you enter, even for a moment, in the Ruby and Rails world.

By the way, I can't address how fulfilling is working with a great team, so if you have the chance of doing this please just go for it.

terça-feira, 27 de dezembro de 2011

Who said developers can`t draw?

When you`re indie or in short of good designers or both you start to get your drawings done yourself or by another developer or non-designer role in the team (if there is any team), but you always say ok it`s good enough this way but the truth is that the art bad, really bad...
That happens because most of us don`t improve our arts skills or at least don`t try a little bit harder.

"SpriteAttack" on 2D Game Art For Programmers from a artist try to lead us in the right tracks. Bellow are two images that I made based on his tutorials.



Before you leave this post download Inkscape, its the software used in the tutorials, is supported in Windows, Linux and Mac OS oh and is free (open source ;D)... Is very easy to use, better than gimp in my opinion and for those who are used to Illustrator, Photoshop or Paint.NET is a even easier to work tool. Put it on your dev-tool-belt right away private!

Go on now and give it a try, the worst that can happen is having some fun.

domingo, 21 de novembro de 2010

What is RockMelt?

The short answser: a social integrated browser. Kinda complicated? In fact is easier than  people think.

I got an invite to RockMelt and before downloading it my thought was: "Just another browser....." but when I opened it I found much more than a browser.

First it is based on Chromium ( the Google Chrome Open Source Project ), to me this means a lot because is light for the computer and pretty clean. And besides that I'm a developer, so we (devs) can get in the project and see it inside or even help.

Second, it's integrated with facebook and with everything that have an rss feeder. The facebook integration is perceived when you try to open RockMelt as it asks your account, after that it shows your logged friends on the left and if you click then you use facebook IM feature, for me that is DAMN COOL!!!!!
 On the right twitter and your facebook account are added by default, but is here that you can add your favorite rss feed, another DAMN COOL feature.

The third and last thing I want to talk about is the Share button, this nice button between the address field and the search field adds the possibility of spreading anything you're seeing to your other social media connected to RockMelt, in its case facebook and twitter as far as I know.

RockMelt got other nice features but I didn't get deep enough to talk about them.

Now back to the question "What is RockMelt?" we can re-write the answser "It is a damn cool amazing best browser with social media integrated in it, where I can share things with my friends and get my reading feeds faster"

Maybe I'm overating or just maybe it's going to rock the house.  Oh and just to remember that it requires invitation to download, but that is not a problem, ask in facebook/twitter or access RockMelt

quarta-feira, 3 de setembro de 2008

Browser Novo.....

Foi lançado mais um browser para a guerra da web, nosso amado Google (mesmo apoiando firefox) teve seus motivos e resolveu lançar o Chrome, e esse que vos fala está utilizando este novo browser para postar. Parece uma junção de várias funcionalidades interessantes dos outros navegadores e mais um montão de coisas novas e sim funciona bem pra caramba e até que é bem leve.
Do ponto de vista do usuário ainda não é possível afirmar se o browser sobe até as estrelas ou afunda no oceano, no entanto acredito que possívelmente será uma opção bem utilizada.
Para os programadores fica uma discussão muito forte sobre o V8, o engine para javascript do Google que opera dentro do Chrome, será que ele vai atrapalhar nossas vidas na hora de criar aplicações webs provocando mais um if(navegadorX) código tal; ou será uma ferramenta a mais que em certo ponto pode apenas ser mais uma ou ajudar em algum sentido?
O V8 é a engine Javascript open source do Google, ele foi escrito em C++ e implementa ECMAScript, o legal é que ele pode rodar dentro de outras aplicações C++ por ser standalone =D
Visitem: