Tuesday, March 13, 2012


WHY I USE GEDIT FOR RUBY PROGRAMING AND WHY YOU SHOULD TO

                When it comes to text editors for Ruby, the most popular one are w/o a doubt TextMate and VIM, but I’ve been using GEdit for a project in the place I work after I releases Notepad++ wasn’t the editor for me, so here are the reasons I use GEdit for Ruby programming, order is not important.

1.- Multiplatform and open source: It is available on Linux, OSX and Windows, it is open source and of course won’t cost you money.

2.- It’s pluggin architecture: GEdit can be extensible with plugins, you can make your own or install the ones available over the internet, there are several of useful plugins, like the integration with a version control system, terminal,  save sessions, etc.



3.- The themes: You can use any of the default themes or install more, there are a variety of dark, white and pastel themes, it doesn’t fall short in this area.

4.- Code completition: Yes, there is auto completition in GEdit, it is very handy and saves a lot of key strokes, I wouldn´t change this feature for anything.


5.- Code snippets: GEdit is a very Ruby friendly editor and code snippets is a probe, just type “def” and GEdit will write the end and put the cursor at the beginning of the method name, type “do” and it will but the “end”,  it will also put the closing quotation marks in a string, it is just amazing, and you can even add your own snippets.

6.- Tabbed interface: This is a must have for every serious editor, but it doesn’t stop there, it can also show the documents on a side pane, or you can see the structure of a whole folder, is up to you to deside.

7.- Bookmarks: It comes with bookmarks so you can navigate to every part of the document you want.

8.- Save sessions: You can save your sessions and open them later, useful when managing projects with docents of files.

9.- Rails pluggin: With the rails plugin GEdit becomes an even more powerful editor exclusive for your rails applications.

10.- Spell checker: Yes, very handy.

Try it http://live.gnome.org/Gedit

Saturday, January 21, 2012

Firebird speed RUBY vs DELPHI vs .NET

I did some comparitions selecting 1000, 10000 and 100000 with Ruby Fb gem, Delphi Fibplus and the FB .NET driver, here is the result:
ROWS RUBY DELPHI .NET
1000 0.12 0.47 0.09
10000 0.94 0.48 0.53
100000 10.95 3.79 5.53



The results are on milliseconds, the table is from a production database with 40 fields and about 3 million records, as you can see, native code is still the king, .NET result are quite good, but Ruby is quite dissapointing handling lots of data.

Saturday, October 23, 2010

BEWARE FIREBIRD EMBEDDED/ ASP.NET DEVELOPERS

I was struggling with this problem in one of my ASP.NET pages, it was going to be the first time I use Firebird Embedded with ASP.NET. In the development machine everything were find but in the production machine I had an "Access denied" exception, so I changed from Firebird Embedded to Firebird server and everything worked fine, but I had this new problem, some of our customers use Firebird 2.1 and my web page needs Firebird 2.5, so I had to find a solution for my FB Embedded problem, What I did was to give privileges to the IIS user to the c:\windows\System32 folder and everything worked.
So part of the problem was solved, but giving privileges to system32 was not righ and unconfortable, it helped in the first couple of deployments but I wasn't happy at all with the solution, I was even thinking in use SQLite for the job but I know FB so well and I must say is pretty awesome so I had to solve the problem.

After looking a litle deeper I find the root of the problem, my Firebird.Data.FirebirdClient.dll was compiled in Debug mode and in this mode it creates a file named DynamicAssembly.dll, the code is in FbClientFactory.cs line 229, the code looks like this:

#if (DEBUG)
Assembly ab = (AssemblyBuilder) tb.Assembly;
ab.Save("DynamicAssembly.dll");
#endif

So the solution was easy, I recompiled Firebird.Data.FirebirdClient.dll in release mode and everything was solved. Im now a pretty happy man.

So you wonder why I compile the library my self? That's becuase I made some modifications to the constructors, that's the wonderful thing of OpenSource and FB in special, you just have to download the source and recompile it.

I hope this helps to anyone using FB Embedded with ASP.NET.

Friday, October 12, 2007

Hoy me entere que voy a ser papá.

Será mi primer hijo/hija.

Que felicidad.