Second RubyConf in Uruguay – 11th and 12th November

Posted by Gabriela Isnardi on November 01, 2011

We are sponsoring one of the greatest technology events here in Uruguay. The Second RubyConf taking place within less than two weeks, the 11th and 12th November 2011, where many IT experts from all over the world get together in order to be immersed in this dynamic world and and up to date get with the latest trends of Ruby and Agile methodologies.

RubyConf Uruguay 2011

We are hungry for knowledge and refreshment, and we all want to be on the same train.

Please welcome all the new members to this awesome community. And help spreading the news, but even more important, do not miss the opportunity to meet the experts, discuss the future of RoR, and be Rail!

 

If you are going to San Francisco…Be sure to wear Moove-IT shirt…

Posted by Gabriela Isnardi on August 31, 2011

We have been to the top 10 places to visit in the US. From a business perspective, Silicon Valley is the place to go. We share the same passion as the area of the world’s largest technology corporations and high-tech firms: Great Ruby on Rails design & development work. Outsourcing has never been so much fun here in Uruguay. And now our Schools friends are wearing Moove-IT shirts, so we are virtually present—though also planning to re- meet in the flesh soon…

Thanks to Howard Kao, Lane Lillquist, Michael Staton, Nick Punt, and Daniel Jabbour from Inigral!

 

 

From South America with love, working offshore

 

Ruby + Rails + Agile – sharing presentations

Posted by Martin Cabrera on July 09, 2011

The last Wednesday we made a workshop in the ORT University.
Pablo Ifran, Gianfranco Zas, Ariel Ludueña and I

We share the presentations to everybody

All_in_One_Agile_Development (in spanish)

Ruby_and_Rails (in spanish)

Workshop of Ruby + Ruby on Rails + SCRUM at ORT University – July 6, 2011

Posted by Martin Cabrera on June 28, 2011

Moove-IT is now part of the Ruby on Rails Workshops and Conferences around the world.

Even when Ruby seems to be the most popular modern programming language in America, there was nowhere in Uruguay you could actually learn it. Moove-IT will give you a heads up on this exciting language and Rails framework on July 6, 2011 (please see ad below).

This will be the first in a series of workshops focusing on Ruby, RoR, Scrum and hands on training exercises.

We are so proud to have made so much progress working with this technology and methodology that we feel the need to contribute to the local Ruby community.

Join us! Be part.

From Silicon Valley to Moove-IT 1

Posted by Gabriela Isnardi on February 17, 2011

We are doing a good job, that’s right, but Michael Staton and Howard Kao from Inigral did not exactly decide to move to Uruguay and work from here now on, they just paid us a one week visit, and worked with us like any other member of the Moove-iT team. The Schools project is exciting itself, but having Howard and Michael here made us feel it even closer, and the boundaries between Inigral and Moove-iT were sort of a blur, for good.

Correct me if I am wrong, but I am really positive we have made them feel at home.

We worked for a week straight, but we also had time to have fun.
No doubts about it, having visitors from around the globe is always refreshing and truly motivating…

Let me tell you why.

We conduct daily meeting with clients from different countries. Most of the times we use skype, and we are about 4 or 5 people in the same room, talking in English, though our primary language is Spanish. On the other end, there is a person whose native language is generally English, but who is normally thousands of miles away, many Fahrenheits apart and only a few hours ahead or behind us. We rarely use a camera, so we do not even know what the room he or she is in looks like.

I believe that the third dimension is definitely more important than we might think. And being in the same room with someone whose voice is extremely familiar to us, and has been part of our work lives for over an year, but whose looks, posture or gestures we used to have little or no idea about is just fantastic. We shared this sort of energy and connection you could only generate when meeting in person.

The truth is we all love to put a name to a face.

And this time we had two new faces to look at, to talk to and to laugh with. In the flesh we met Michael and Howard.

THANK YOU!

Rules Engine – Java(Drools) & Ruby(ruleby)

Posted by Martin Cabrera on December 03, 2010

Today we made one presentation with the whole team of moove-it about rules engine in Java and Ruby.

We talk about Drools and ruleby.

We share the presentation …

Sass why is useful

Posted by Pablo Ifran on November 26, 2010

Sass is used for generating css files based on his own syntax, it’s very useful because allows you to avoid repeating code across the different scss files using import (allows you to import code from other scss file), or mixins(scss functions). Also, allows you to write varibles, for using in different scss, this makes easier to do different templates based on colors or images for example.

_sprites.scss

@mixin sprite_for($image_class, $x, $y, $image: "/images/sprite_image.png") {
  .sprite_image.#{$image_class} {
    background: transparent url($image) no-repeat scroll $x $y;
    height:16px;
    width:16px;
  }
}
_images.scss
$my_sprite_image_path: "/images/my_sprite_image_path.png";

default.scss

@import "sprites", "images";

@include sprite_for("my_image", 0, 0, $my_sprite_image_path);

That generates

default.css

  .sprite_image.my_image {
    background: transparent url(/images/my_sprite_image_path.png) no-repeat scroll 0 0;
    height:16px;
    width:16px;
  }

So, this is best sorted using this method, because you have the image path in a single file and you use it in other files only by importing the file with the images path, it’s also simpler to remove an image because you only need to find the references to that variable and delete them.

The sass framework also allows you to use the DRY principle because you can write nested selector, I’ll show you with an example:

default.scss

.some_class {
  width: 100px;
  .some_other_class {
    display: block;
  }
}

default.css

.some_class {width:100px;}
.some_class .some_other_class {display:block;}

Doesn’t affect the performance because it generates a css file at development time.

It also allows you to benefit from some of the advantages of css 3 right now.

Juggernaut: Chat on Rails

Posted by ivan.etchart on November 19, 2010

To implement chat on Rails we need the Juggernaut gem. The newest version of Juggernaut is build upon nodeJS.
1. Install Juggernaut:
First, install nodejs (http://nodejs.org), redis (http:/code.google.com/p/redis/) and Juggernaut gem (gem install juggernaut).
Then download server git clone …
2. Integrate with Rails to implement chat!
After Juggernaut gem is installed, add it to environment.rb:
config.gem "juggernaut"
Suppose you have a system with user authentication, the idea is to generate an environment where you’re able to chat with other users and see to what extent features can be added in order to create an awesome chat!
Note: Providing a step by step guide to create a working chat isn’t the idea of this tutorial. It’s to show different possibilites to develop on
Juggernaut.

Connecting to Juggernaut from Rails

It’s necessary to add the file WebSocketMain.swf to the public folder. This hasn’t to be exactly this way, you can change its location, but if you do, then you’ll have to change the WEB_SOCKET_SWF_LOCATION, due to an issue with Firefox (… for further information visit juggernaut git page).
Juggernaut serves every file necessary for running by default, so you can leave them on the server where Jaggernaut is installed and configure everything in your client (mainly due to Firefox) in order to avoid adding extra files to your project.
Add to your view this line:
<script src="http://localhost:8080/application.js" type="text/javascript" charset="utf-8"></script>
Note : you can add this file in another way or eventually add it to your project if you want.
Inside another script tag:

var jugger = new Juggernaut;
** Connection events provided by Juggernaut
Juggernaut provides you with three different events : Connect, Disconnect o Reconnect.
jugger.on("connect - disconnect - reconnect", callback)
You can use this events to implement whatever function you want to execute, i.e. alerting when a client has connected:
jug.on("connect", function() {alert("I'm connected!!");});
At this point you have the connection of your client ready, you can test it, you have to start Juggernaut. * First run redis :
./redis-server redis.conf

(whereever you have installed it) *

Then go to the folder where you’ve downloaded the server to and run juggernaut:
node server.js
Let’s chat!
Now that we have everything going, would be a good time to start chatting.
First you need to subscribe to a channe. Inside the channel you’ll be able to connect and user messages scope is restricted to channel.
Then :
 jug.subscribe("name_or_channel_id", function(data) { .. here you'll handle all messages coming from channel ... })
Clarifying a bit… with this function we subscribe to the channel and can pass a function as a parameter to handle data coming from it, i.e. any user’s messages, let’s give an example:
First you need to have a div tag with an id (id_div), what you want is to append a list element containing message content to the div element everytime someone sends a message.
jug.subscribe("name_or_channel_id", function(data){
var li = $("<li />");
li.text(data);
$("#id_div").append(li);
});
You can have a div or textearea element, adding text to a textarea element is relatively simpler, it’s enough to do

textarea.value += (data + "\n");

but you’ll lose customizing power. li elements can be enriched with style, making the chat more attractive.

You’ve received data and added to a div element, but you’re still unable to send data. Let’s setup a form:
<% form_remote_tag(:url => path_to_send_message_method, :success => "$('#msg_body').value=''" do >
<= text_field_tag 'msg_body', '', :size => '50' >
<= submit_tag 'Send Message' >
<% end %>
And the method :
def send_message
Juggernaut.publish("name_or_channel_id", parse_chat_message(params[:msg_body], current_user))
end
parse_chat_message? … Yes, before publishing data, you can process it and why not modify it a bit.
def parse_chat_message(msg, user)
return "#{user.login} says: #{msg}"
end
We are sending information to Juggernaut with this format : ‘usuario says: something’
Done!, you have your server up and running, and know how to send and receive data, there’s nothing else to try.
Extras:
Private chat case :*

You can’t call a chat a chat if you can’t have a private conversation with someone. A good way of implementing this, is subscribing your users to a particular chatroom identified by user’s id. Simple add another subscribe:
 jug.subscribe("name_or_channel_id", function(data){ .. handle private message .. }
The receiving user must be able to subscribe to your chat and send messages to you.
To achive that, you should write a function that when you click on the user you want to send a private message to, subscribes to its chatroom and allows you to send messages to the user. This can be implemented in many different ways! You’ll have to simply make your choice according to your needs!

Rails security

Posted by Pablo Ifran on October 14, 2010

When you are working with svn (pulling your project from the svn to the web server) and you want to deploy a system into production with apache (mod_rails), you must filter the svn folders (to prevent that other users view your svn files).

To do that task, you must add the following lines to the apache configuration.


<DirectoryMatch "^/.*/\.svn/">
  ErrorDocument 403 /404.html
  Order allow,deny
  Deny from all
  Satisfy All
</DirectoryMatch>

Improving the ruby Array class without degrade performance

Posted by Pablo Ifran on April 06, 2009

Improving the ruby Array class

Many times, when you are iterating over an array you want to know the last or the first element to do something. Unfortunately ruby don’t provide any method to help you doing this task.
So, if you want a trick to do this, you can add this few lines in a rails project inside an initalizer.

Put this code in initializers/array.rb

class Array

  #     array.each_with_first {|item, first| block }   ->   array
  #
  #
  # Call a block ones per element, passing
  # the element and the first element of the array as parameters.
  #
  #    a = [ "a", "b", "c" ]
  #    a.each_with_first {|x, f| print "#{x} -- #{f} | " }
  #
  # produces:
  #
  #    a -- a | b -- a | c -- a |
  #
  def each_with_first(&block)
    first = self.first

    self.each do |element|
      yield element, first
    end
  end

  #     array.each_with_last {|item, last| block }   ->   array
  #
  #
  # Call a block ones per element, passing
  # the element and the last element of the array as parameters.
  #
  #    a = [ "a", "b", "c" ]
  #    a.each_with_last {|x, f| print "#{x} -- #{f} | " }
  #
  # produces:
  #
  #    a -- c | b -- c | c -- c |
  #
  def each_with_last(&block)
    last = self.last

    self.each do |element|
      yield element, last
    end
  end

  #     array.each_with_first_and_last {|item, first, last| block }   ->   array
  #
  #
  # Call a block ones per element, passing
  # the element, the first and the last element of the array as parameters.
  #
  #    a = [ "a", "b", "c" ]
  #    a.each_with_last {|x, f, l| print "#{x} -- #{f} -- #{l} | " }
  #
  # produces:
  #
  #    a -- a -- c | b -- a -- c | c -- a -- c |
  #
  def each_with_first_and_last(&block)
    first = self.first
    last = self.last

    self.each do |element|
      yield element, first, last
    end
  end

end