Posts

Showing posts from 2009

Getting NetBeans to do Anti-Aliasing

I changed desktop environment from KDE to none when Gentoo marked KDE 4 as stable. Don't get me wrong: it has nothing to do with KDE 4 itself. The problem is that my computer is rather old and it was already getting a little slow with KDE 3.5. KDE 4 is heavier and slower bringing me to the tipping point. No, GNOME is not the answer: I switched from GNOME to KDE when GNOME got too bloated and don't get me started with mono... Now I'm using openbox , considering wmii or enlightenment but not a full desktop. I added adesklets to the mix, conky , tint2 and yeahconsole and I'm ready to work. A couple of days ago a colleague had issues with NetBeans on Gentoo, specifically the fonts had no anti-aliasing, hinting, whatever you want to call it. I tried it today because I was using NetBeans to do some PHP coding. Well, I had the same problem. After some investigation I finally found a way to get it back to work without running KDE or GNOME and I though of sharing it here ho

CMake Cross-Compiling

I don't know if I already mentioned, but I'm writing and ODBC driver at work. A colleague of mine proposed that the driver is open sourced since it is not our main business. I hope it is, but I'm keeping my hopes high. In the mean time I can share what I have learnt. The driver is an ODBC-RESTful bridge, that is, ODBC requests are transformed into HTTP Restful requests. Although the initial goal of the driver was to be Linux only we had to change it because of the wonderful reporting tool chosen. So I had to port it to Windows. I wont go on the tiny details on how to write portable C code (basically using #ifdefs ) but on using CMake and cross-compiling. You see I went and tried to use Microsoft Visual Studio Express, the latest version, but the compiler was so slow, the IDE was, well, horrible and the Operating System is a stone in my shoe, even if executed in a virtual machine. So I decided to put MinGW to a good use and cross compile, that is, to compile on linux a win

Back to C: CMake and CUnit

I'm back at programming in C. I proposed something 8 months ago at work that was totally ignore. Now my boss wants me to do it because the other alternatives have totally failed. The idea is to implement an ODBC Driver. If I have the time I'll put a tutorial here on how to do that on Linux. But back to the point of this entry. This small guide will help you create a simple project using CMake to build it and cunit to test it. Yes, I believe in test driven development, no matter the language. Let's imagine a simple project that produces an executable that prints the result of 2 + 3 (I know, lame but sufficient for this example). To make it easier to test I split the application. The functions will go into a library and there will be a source file that starts the program. The library header file is called "lib.h" (extra points for originality). Here are its contents: int add(int a, int b) ; The implementation is on the lib.c file as follows: int add(int a, int b)

LOL - "Server Too Busy"

Image
This just happened to me today. What is more interesting is that this is an unhandled exception. So, the server being to busy is not something that they should predict and allow the application to handle, they just make you wait and then throw this at you. Don't you just love these products.

The Plan

It has been some time since I last posted here but I cam across this gem that I had to share. The tile is " The Plan ": In the beginning was The Plan. And then came The Assumptions. And The Assumptions were without form. And The Plan was without substance. And a terrible darkness fell upon the face of the Workers. And they spoke among themselves, saying "It is a crock of shit, and it stinks." And the Workers went unto their Supervisors and said loudly "It is a bucket of dung, and we cannot live with the smell." Whereupon the Supervisors went unto their Managers and didst say "It is a container of excrement, and it is very strong, such that none may abide by it." The Managers went quickly up into the temple and seeing there the Directors of the company, went unto them, saying in pious voices "It is a vessel of fertiliser, and none may abide its strength." After much feasting and lewd revellry, the Directors spoke among themselves, saying

Helping out OpenStreeMap

It has been a while since I have last posted but I hope to do it more often. Don't ask me why. I guess that if you are in the bottom you loose all will to do anything. But a two weeks vacation and a few changes in both my personal and professional life and I'm starting to see the light at the end of tunnel. But that is enough drama, on to the goal of this entry. I made my very first contribution to the OpenStreetMap . Think of it like a Wiki that is a map of the whole world. Since my country doesn't have a nice coverage I decided to hack my GPS to track my trips and share them. Then I edited my first roads (two fully and a part of one) and they are already appearing on the site. Next step is to add more roads. Want to help out? You don't even have to edit the roads. Just trace your trips and upload them they will help others since the more information the more accurate the map will be.