Posts

Announcing MapPrint 1.0.0

I'm proud to announce that the first stable version of MapPrint is out! You can read all about it here: github.com/afast/map_print The motivation behind this gem was to provide a way of exporting maps to png or pdf. But not only the map, but also GeoJSON on the map and images/texts around it. On top of simple text and images, it has the ability to add a scalebar and a legend to show the references of what is being printed on the map. Go ahead and take a look, there are a few examples and an in-depth explanation in the wiki.

Caleidoscopio de dos naciones

Países hay muchos Pero prefiero a dos Copas hay muchas Cuatro, tienen los dos Norte y Sur Disciplina  y Corazón A veces glamour A veces pasión Blanco y Negro por el pasado Por la gloria es el dorado De Azul el cielo pintado Rojo pasión! O estoy errado? Así mi corazón está pintado Muchos creen que dividido Pero no esta separado Es como metal fundido

Keep sidekiq running using monit

Image
As an application grows it starts taking care of more and more work. At some point the first task comes that needs to be processed in background and one of the usual suspects for ruby is sidekiq. Now, did it ever happen to you that you get it all up and running on the server and next thing you know it's down and you get error reports that stuff ain't working? Meet monit, a tool that'll let you get ahead of trouble. It automatically restarts programs when down and can even send emails upon failures. Install monit Depending on your package manager this may differ: apt-get install monit yum install monit brew install monit Configure monit Edit  /etc/monit.conf or  /etc/monitrc Uncomment(or add) these lines: set httpd port 2812 and use address localhost allow localhost Add sidekiq entry Create the file /etc/monit.d/sidekiq.monitrc with: check process sidekiq_application_production0 with pidfile /path/to/shared/tmp/pids/side...

Export to Excel with spreadsheet gem

While using the spreadsheet gem to export data to a Microsoft Excel file I encountered various problems and lack of proper documentation forced me to dig pretty deep. So here are a few tips you might find useful. The gem works with a workbook object and worksheets in this workbook. To get started: workbook = Spreadsheet::Workbook.new sheet1 = workbook.create_worksheet name: worksheetname To write a row of data as usually is done in reports you can use: sheet1.row(1).replace [ 'col1', 'col2', 'col3'] Rows and Columns are 0 based, so col1 would be printed on A2 (Excel coords). Now to the beauty of it all, formatting, first of all, create a format: bold = Spreadsheet::Format.new :weight => :bold bold20 = Spreadsheet::Format.new :weight => :bold, size: 20 nobold20 = Spreadsheet::Format.new size: 20 bold_grey_bg = Spreadsheet::Format.new pattern_bg_color: :cyan, weight: :bold, pattern: 1, pattern_fg_color: :black Use :weight to set bold,...

It's all about timing baby!

Image
Image: Suat Eman / FreeDigitalPhotos.net Yeah, it's about timing. There was a problem in one of our projects at moove-it related to slow processing. There is a daemon spawning new threads to process certain new entries to the database. The entries come from a different system, that's the reason for this program which processes each new entry. Sometimes at certain hours of a day there are peaks in the entries to the database and the process will fall behind by about 20.000 entries or more. So we started analyzing the code to understand what was happening and why it took so long. We noted that each new thread the daemon spawned took about 5 seconds to complete its task. As we narrowed the measurement we came up with some code that took 5 seconds to execute but it only involved access to the database. So thanks to Aaron Patterson's ( @tenderlove ) talk at RubyConf Uruguay about "Who makes the best asado" where he talked about rails and how it manages threads ...

Changing jobs

By the end of 2010 I asked my girlfriend to marry me. She said yes and so my life started to change. Specially my perspective of life changed. I meditated a lot about my future, what I wanted to do, where I wanted my family to live and my children to grow up. I started thinking a lot about my job. And so, during the last months of 2010 and the first of 2011, I was more and more convinced that I wanted something different for my career. I was working at Artech using GeneXus for web development. GeneXus is a great tool for web developing and it uses a 4th generation language. It is declarative and focuses on the knowledge of the business and you can generate to a lot of languages like java, .net, ruby, etc. For more info: genexus.com My personal problem with this tool is that I never felt completely in control. I will not discuss whether it was because of bugs in the tool or my ignorance using it. But still, I accumulated stress because things that should be easy weren't and some...

Video de la Massi

El trailer hecho pa la Maxi 2011

Android phone solves Rubik’s cube in 12.5 seconds

Image
November 11, 2010 A Lego Mindstorms robotics kit controlled by an HTC Nexus One smartphone successfully untangled a Rubik’s Cube puzzle in 12.5 seconds at a ARM developer conference in Silicon Valley. Here is a video of it solving a cube. Source: Device Guru

Sumo UY - Robi

Categoria IEEE Open en el sumo robotico.

Sumo UY

Durante el campeonato de sumo robótico hubo una demostración de destreza futbolística de parte de un humanoide bautizado Forlán! Aquí les dejo un video donde claramente se ve un derroche de talento! jeje

First Robotics Assignment

A couple of videos, the first of our robot and the second of another group. Enjoy!!! And here comes the robot of another group, go Junior!!!

First Robotics Assignment - getting close!!

Image
Here you can see the scenario. The robot has to take one cube of each color an put them in line on the right side. At the end there should be 12 lines of cubes of different colors on the right side. Here are two robots. At the bottom is one following the black line and sensing distance to detect the presence of cubes. Above is one trying to load some cubes. Each robot has to do the work by itself, but while we try each group tries its robot on different places. A look from above. The robot on the left is sensing the color of the cubes and the robot on the right is following the black line.  This robot took 3 cubes and is taking them to the other side.

Windows 7 vs Ubuntu 10.04

PC Pro has performed a comprehensive test of Windows 7 vs Ubuntu 10.04 . They've tested and scored the two operating systems on a number of criteria, including usability, bundled apps, performance, compatibility and business. The final result is much closer than you might expect. 'Ubuntu is clearly an operating system on the rise,' PC Pro concludes. 'If we repeat this feature in a year's time, will it have closed the gap? We wouldn't bet against it' Source:  PCPro - read through slashdot

First robot build with Lego Mindstorms NXT 2.0

My first robot build with Lego Mindstorms, created with a group as an assignment of a University subject. As it is our first time it does very little, it just manages to stay in the dohjo by detecting the white line. Also if it detects an object it attempts to load it and carry it to the border to unload it. It uses an ultrasonic sensor to detect this objects. It has a color sensor 1 cm above the ground to detect the white line. It also has contact sensors at the back but we didn't use them, although we planned to. On the video below you can see two runs. The first time I forgot to connect the color sensor, so you can see that the robots bumps out of the dohjo. The second time the color sensor is connected. You can see the light shining on the floor on the left side of the robot. Well, hope you enjoy!

Samsung Galaxy Tablet Coming In September

There are also rumors of a 7" mini iPad . But nothing's for sure. The Tab will run on Android 2.2 and feature full Web-browsing and video calling. The short clip also implies that the Galaxy Tab will sport an HD screen for video, Flash support (something it seems the iPad will never have), support for e-books, possible GPS navigation, and PC linking. Source: PCMag

Memory leaks in C/C++

I've been programming in C/C++ lately and after hours searching for the origin of some segmentation faults and memory corruptions I started searching for a tool to track my memory usage. Meaning I wanted to know what happened with the new's and if I'm deleting everything. After a preliminary search I didn't find the right thing I was looking for, a program for linux (ubuntu) 64 bits, easy to use and for free. Nonetheless I came across an answer to a post suggesting to override the new and delete operations with ones that would allocate/free the memory but also print the number of bytes being allocated/freed to a file. I tried that but the operations are not that easy to replace, so what I did instead is the following. First I created a new file stream: std::ofstream fileMem; fileMem.open("mem.txt"); fileMem.close(); The open and close commands are at the start and end of the main() procedure respectively. Note that this will replace the file mem.txt eve...

Mesianismo Revanchista

Ex presidente de la República Mesianismo revanchista Julio María Sanguinetti  La tan discutida ley de Caducidad fue aprobada por una amplia mayoría parlamentaria en diciembre de 1986 y, sometida a un referéndum, la ciudadanía la ratificó el 16 de abril de 1989. Veinte años más tarde, en ocasión de la elección de noviembre de 2009, se volvió a proponer su nulidad y el cuerpo electoral ratificó nuevamente la ley. O sea que no existe norma con mayor legitimidad, formal y sustancial, en la historia de nuestro derecho.  Dos pronunciamientos del cuerpo superior de la soberanía nacional, deberían cerrar definitivamente todo debate. Por esa razón, el constitucionalista más respetado del Frente Amplio, al que representó en el Senado en el período pasado, el Prof. José Korseniak, dice: "Yo enseño hace 40 años en la Facultad de Derecho que el artículo 82 de la Constitución dice que la Nación, que es la soberana, ejerce directamente su soberanía a través del cuerpo elector...

Nunca más

Nunca más El de hoy es un triste aniversario, uno de esos que las nuevas generaciones deben conocer y que nadie debiera olvidar. Se cumplen 40 años de un atentado de los tupamaros que tuvo trágicas consecuencias. El 31 de julio de 1970, este grupo alzado contra el gobierno constitucional del Uruguay secuestró a cuatro extranjeros. Tres eran diplomáticos, los estadounidenses Nathan Rosenfeld y Michael Gordon Jones, en tanto el tercero era el cónsul de Brasil, Aloysio Dias Gomide. El cuarto secuestrado era Dan Mitrione, un agente estadounidense que asesoraba a la policía uruguaya. El caso más conocido es el de este último puesto que fue asesinado de cuatro balazos, cuando estaba malherido, de brazos atados a la espalda y ojos vendados. Los tupamaros no pudieron desplegar la misma ferocidad con los otros dos estadounidenses puesto que ambos lograron fugarse -uno de ellos lanzándose desde una camioneta en marcha- y burlar a sus captores. En cuanto al cónsul Dias Gomide, su p...

Google Pac Man

Image
For everyone who still wants to play Google's Pac Man, you can access it here

Ninjas Rescue Student From Muggers

Image
A group of assailants got a little more than they bargained for when an entire ninja school came to their victim's rescue . A 27-year-old German exchange student was being mugged in an alley near Ninja Senshi Ryu, when a ninja student noticed the commotion. The sensei along with the rest of the students rushed out to help. "You should have seen their faces when they saw us in ninja gear coming towards them," the school's sensei, Kaylan Soto, told the Herald. It's good to see ninjas working on their brand. When I was a kid they were mostly shurikens, smoke, and attitude. Source: slashdot.org