La vie en Ruby

0
Digg me

Recently I have been testing two libraries in Ruby.

I wanted to graph stocks at different resolutions (in fact with different sampling intervals) and for this I used Scruffy. It outputs SVG charts by default but can actually output any format supported by RMagick, so that includes PNG and JPG too.

I get the stock information from Yahoo Finance and pre-process it with OpenOffice . The first outputs of the stock price were quite bad for me as Scruffy plots a thick line and thick data points too by default. Therefore, instead of having a nice thin line, I had a thicker one, made unreadable by the very numerous data points which appeared as a series of blobs.

I emailed Brasten about this to ask how these blobs and the lines could be reduced, but had no answer. He must be busy. Scruffy is Open-Source, so I had a look inside the Scruffy Ruby code and made my own changes to solve the problem. Result: nice thin lines with no blobs.

This is made possible by the fact that Scruffy is free, Open-Source, and additionally, written in Ruby. Therefore, even code which I have not written myself remains easily readable and modifiable. The downside for me is that since it is a one-man project, it is sometimes difficult to get support. But it would be much more of a problem if the project didn’t have the three above-mentioned characteristics.

scRUBYt!The next library I stumbled upon was ScRUBYt! after reading a few texts on screen scraping. ScRUBYt! is a powerful tool and relies on both HPricot and WWW::Mechanize.

Speaking of libraries, I also started writing small one for OpenOffice automation in Ruby. I am doing it through OLE on Windows, since there are no Ruby-UNO implementations yet that would allow direct automation of OpenOffice with Ruby.

ActiveStateOne new IDE by Vancouver-based ActiveStateKomodo Edit 4.0 beta – came in handy for my tests with the libraries. But I also relied on RDE as usual. I noticed two things with Komodo Edit 4.0 beta:

1. Sometimes, with multi-file projects, the left pane showing the project tree would just clear up.

2. Antonio Cangiano, a Ruby enthusiast who works at the IBM Toronto Software Lab pointed out that Komodo Edit 4.0 beta doesn’t know how to run your Ruby file out-of-the-box. He describes how he managed to assign a key to do just that on his blog. From there I recorded a new macro to enable automatic Save + Run and assigned it to F6, which is something I am used to within RDE (it’s F5 for RDE). Incidentally, Antonio did the same thing too.

Komodo Edit 4.0 beta’s IDE is slick and it’s a pleasure to develop with it.

—-

Today I received a Skype call from my good friend Thierry Sourbier, who recently came to Calgary on assignment. We were talking after 10 years. We had met at INSA de Rennes, Brittany, France while doing our Systems/Software Engineering course. We caught up with each other’s lives, and it was good to see that he is still very active within his various interest groups.

He managed to spur me on with the Montreal Tech League and shared his experience as a very successful community builder with his pet project and site OnlineTri which is about Triathlons.

He succeeds in all this while also being a husband and a father of two. Thierry is intelligent and dedicated, and it was a great pleasure to speak to him after all these years – ten precisely. I’m impressed to see how he manages all these activities – Business and Systems Engineering, Photography, Triathlons, Community Building, Married life with children. Way to go, Thierry!

And thanks for the ideas for the MTL!

  • Share/Bookmark
 
0
Digg me

OOO logo

OpenOffice.org 2.0, the Free and Open Source productivity tool, has just been released.

Seize this opportunity of using the best free tool for the enterprise and for personal productivity by heading to OpenOffice.org and downloading it for your platform.

OOO includes:
1. Writer - an excellent word processor
2. Calc - a fabulous spreadsheet manager
3. Impress - a superb presentation manager
4. Draw - the OOO drawing tool
5. Base - a brilliant database module for developing your data-drive applications
6. Math - tool to create and edit scientific equations and formulas

Imagine all your enterprise documents in a standard, open format so that you will never be trapped in vendor-lock in.

Imagine not having to regularly being forced to purchase expensive new licenses at the whim and fancy of the same vendor – who for no apparent reason except making boatloads of cash instead of focusing on caring for the customer – changes its file format so that previous versions of their files are incompatible with their new software.

Imagine a more secure, stable and robust set of office productivity tools which is developed and supported by a worldwide community.

OOO has a truly Open format by default – OpenDocument. It also uses standard XML. Dot not mistake other XML formats by some vendors to be as open despite their using ‘Open’ in the format name.

OOO has had native PDF export for three years already. Compatibility with existing documents is excellent so that you can easily migrate all your proprietary format documents safely into OpenDocument. It’s a Fire-and-Forget affair.

Read more about the features at the OOO site here (with thumbnails) and here.

Today, boost your enterprise profits by saving on unnecessary expenses: combine the GNU/Linux O.S. with OpenOffice.org 2.0 for a free, fast, open source, and secure Information Systems asset based on Open Standards.

The fact that there are Standards being preserved by a Consortium means that your documents are safe and you have a guarantee that the Open format will remain accessible and free.

Download OOO, open the spreadsheet application named Calc and then start comparing the immediate savings you can achieve by multiplying the number of seats of Linux and OOO you would need in your enterprise by the cost of the Linux and OOO licenses.

Or just remember that their licenses allow you to use and reuse them on as many computers as you wish for $0.00.

Don’t forget to factor in the training costs, which are minimal, together with the support costs, and the benefits are immediately visible.

Start now, make the smart choice for your productivity and your bottom line.

Use OpenOffice.org

  • Share/Bookmark