Tuesday, August 14, 2007

that's cool

Quicky:

Are you using OS X to develop the next big Rails app and need ImageMagick, RMagick and friends?

Well, just point your browser to rubyforge and download the rmagick-osx-installer package, unzip it and read the fine manual. If you have all the pre-requisites, "sudo run" the installer script and then... go out for a coffee.

When you're back you'll have the following log in your terminal windows:

libpng was installed successfully
libjpeg was installed successfully
ghostscript was installed successfully
ghostscript-fonts-std was installed successfully
FreeType was installed successfully
libwmf was installed successfully
ImageMagick was installed successfully
RMagick was installed successfully
Removing rm_install_tmp directory...Done

That simple.

Thursday, August 02, 2007

Rediscovering the desktop

As you might have noticed, I've been on a rather long break from my blogging activity, and again this was due to my Mac being broken. Again.

It's not like I didn't have a replacement (my old trusty Asus M6N), but as I've said before, i get depressed when my Mac brakes. And it just happens oh so many times.

Anyway, the downside, apart from the depression bit, was that I missed the opportunity of ego-blogging about the brand new Ruby-Lang Portuguese site .I'm very proud of being a part of the amazing team behind it, and sincere kudos must go out to Emanuel and Franc.

On the upside I had the chance of rediscovering Linux on the laptop!
I'm lucky that my Asus is a pretty linux-compatible, but with the new Ubuntu 7.04, everything just works. That includes wireless, the extra (media) buttons, the compiz powered desktop effects, the works.

Now, I've been known to prefer Suse/Novel over any Debian based system for users and user-grade hardware, but Ubuntu has been making such an extraordinary evolution that it has (for all that I care) become the de facto distro for desktop use. It just gives you roughly 70% you'll need from the first boot, and the rest you'll get with Automatix. For a little more specific usage needs, the excellent Aptitude app will do the trick. You'll never get so much for so little!

Anyway, here's a little list of apps I've been (re)discovering:
Aptana + RadRails (Netbeans, eat your heart out!. Thankfully its cross-platform);
F-Spot (will give iPhone a run for its money any day);
Songbird (think iTunes minus clutter);
Gnome-Launch-Box (it's a Quicksilver clone, gets the job done);

And a list of what I miss:
Integrated Dictionary just a shortcut away;
Textmate (it was growing on me...);
Dashboard (what? I love eye candy...);

That's not so bad is it?

Tuesday, July 03, 2007

Making the enterprise see red - part I

Ruby trough Rails has been a poster-child for the so called web 2.0, but in the enterprise level the adoption rate hasn't been all that remarkable.

Rather than go trough an extensive diatribe about how adoption rates in the enterprise for just about any open source technology is always necessarily slow, because no self respecting OSS programmer plays golf, I'll just list some of the perceived weaknesses and shortcoming usually attributed to Ruby.
- Contrary to Perl, it doesn't come installed by default on just about every Unix-like OS;
- The treathing model used is week;
- Rails doesn't scale;
- It's just a fad, and it will go away before it matures;
- Poor Unicode support;
- No single good IDE and Text Editors are soo 80's;
- Nobody wants to learn yet another language especially when there is close to 0 employability for it;

While most of these are (at least to some extent) true, there are many projects that aim at overcoming them. And Ruby itself is still just version 1.8.6 at this point.

One such project seems to be catching enough wind behind it so that it could drive Ruby into mass (wishful thinking here...) adoption. JRuby.

Now, one might expect that the "J" would stand for Japanese, but remarkably it stands for Java. Isn't that ironic? Ruby is sometimes hailed as "What programmers should be using to still have time for a personal life" contrary to Java's "Write once. Then again, Just one more time... Ok, call your mom and cancel dinner" motto.

Jruby (which just recently reached the 1.0 mark) is a pure Java implementation of Ruby, and it's developed by Thomas Enebo and Charles Nutter with Ola Bini also being credited here and there, and, to some extent, sponsored by SUN. It aims at being more that just another implementation of Ruby (not that there are many...) which means that while still programming in pure Ruby, a coder can now enjoy the following added benefits:
- Java's scaling capabilities since Ruby code now runs inside a JVM which means parallelization in multi-processor setups ;
- An optimized Database connectivity with JDBC;
- Same level of Java's Unicode support;
- Garbage Collection handled by Java. (don't we all appreciate that?);
- A great IDE (Netbeans 6. Packed with all typical goodies plus code completion and a Swing Form Builder, it just might be the VB6 of the XXI century), plus a pretty good one (XCode + a hack);
- Access to those millions of lines of code in Java classes;

And last but not least : Integration. This is the one that's going bring it home.

With Jruby and a rails plugin called GoldSpike (previously rails-integration) we're a simple rake command away from turning any Rails app into a standard WAR file, which in turn can be deployed in either Tomcat or Glassfish or presumably just about any other applet container.

What this means is, in an enterprise environment where you have all these layers (think MVC in different LAN segments) set up and where any innovation is foreseen as potentially disruptive if not outright forbidden, we can easily introduce Ruby and Rails code, and from a manager's point of view its a win-win situation where the developers get things done faster, and the implemented structure is maintained without any hiccups. And they still get Sun's level of support.

In parts II and III I'll be showing some code and examples of rapid deployment with JRuby.

Monday, June 11, 2007

The Automator

I've always been one to dislike repetitive tasks. I think it's partially because I find it hard to concentrate for a long time on tedious chores and partially because I fear getting carpel tunnel syndrome.

Just this weekend my "disability" was put to the test. I found myself going trough 8 GB of assorted files (note to self: do _not_ label zipped backups "stuff"...) trying to find a couple of pictures I wanted my girlfriend to see. I didn't know the filenames (note to self: rename the pictures I like because PIC00731 or DSC00239 aren't real _names_) or the time stamps.

Know, if I was "doing" Windows, I would pull out one of my 50+ lines VBS's, but that wouldn't get me no lollypop. I might had tried a bash-slash-perl trick to move only a couple of selected filetypes onto a new folder, but that wouldn't get me too far either since I would still need at least one more action to open all of them. And my girlfriend would leave before waiting for me to get the script right....

The solution ended up being my new favorite Mac OSX app. Automator.

Automator comes bundled with OSX 10.4 and basically it's a tool that provides you with a way to visually set up a group of actions that get a specific job done. And they call it a workflow, which pretty much sums it up.

Although you would use it to build a program, the programming background needed to use is zero, and the learning curve is neglectable.

After analyzing my specific needs, I came up with this list of necessary steps:
1 - specify the main folder;
2 - get the folder contents, repeating for each of the subfolders;
3 - filter the specified finder items by file type;
4 - decide what to do with them, in this case, I wanted to open the images in Preview so i could see them and find the ones I really needed.

And this was what I got:

Not bad huh?

By selecting and dragging the specific actions from the action list on the left to the right side pane and then changing a couple of options I was done! I saved it as an Application, runned it and 2 minutes later I was seeing the images trough Preview's Slideshow feature.

Wednesday, June 06, 2007

tiananmen e o "massacre" de berlin. em perspectiva


Fez esta semana anos que estudantes e outros bebados se juntaram numa manifestação sem precedentes na praça de Tiananmen para gritar pelo benfica e lutar pela democracia na china. Também fez anos a Angelina Jolie, mais merecedora de manifestações e apelos, mas muito menos interessante enquanto fenomeno social.

Em Rostock esta semana houve (uma vez mais) confrontos numa manifestação organizada como protesto anti-globalização, o que prova que quase vinte anos depois e a quase meio mundo de distancia, um pais moderno e democratico também consegue atiçar a policia sobre jovens manifestantes e tudo em nome da defesa daquilo em que acreditam. Se não é a ordem e disciplina chinesa, então que seja a democracia capitalista ocidental.


Este semana morreu um blogger, um fotografo, um amigo, um professor, um ser humano de fazer corar de humildade qualquer palerma que se ache com alguma piada ou que julgue perceber alguma coisa sobre alguma coisa.

Não há ninguem que tenha frequentado o IADE (ou que conheça alguém que tenha frequentado o IADE) que não tenha ouvido falar do Prof. Roberto.

A sua perda é irreparavel, mais de 600 comentários no seu ultimo post e a multidão no seu velório ontem á noite dão-me razão. Muitos mais nunca o esquecerão.

morabeza roberto!

Saturday, May 26, 2007

On job offers and career management pt II - The end is the beginning is the end

Well, after much consideration and hearing lots of opinions (which I respectfully considered and discarded) I've decided to stay at my current job for now.

You know, sometimes it's not just about the money for me. I would miss the friends I've made (I can't believe I keep calling my coworkers "friends") and I would miss Solaris. And AIX, and Informix and Perl and... and to be completely honest, the offer wasn't all that you know? I mean, I actually heard the words "We only sell Microsoft technologies because if we didn't they would badmouth us to our potential costumers" and _that_ is something I want to stay away from.

And yeah, the title of this post is a reference to "batman and robin", because that's how I feel sometimes when I'm working with likes of "no-time-to-blog"er, penantes, "still offline" sab and "blogui? isso não é da SUN não" alex.

...And I _do_ mean the fellowship part, not the homosexual connoted male in tights thing, ok???

Thursday, May 24, 2007

+1

Tuesday Penantes switched.

I'm counting the number of "converts" I've brought into the light ... does anybody know how many I'll need so I get a free toy from Steve?

Tuesday, May 15, 2007

Some people are just... different!


"As the climate grows more and more desperate for record labels, their answer to their mostly self-inflicted wounds seems to be to screw the consumer over even more. A couple of examples that quickly come to mind:

* The ABSURD retail pricing of Year Zero in Australia. Shame on you, UMG. Year Zero is selling for $34.99 Australian dollars ($29.10 US). No wonder people steal music. Avril Lavigne's record in the same store was $21.99 ($18.21 US).
By the way, when I asked a label rep about this his response was: "It's because we know you have a real core audience that will pay whatever it costs when you put something out - you know, true fans. It's the pop stuff we have to discount to get people to buy."
So... I guess as a reward for being a "true fan" you get ripped off.

* The dreaded EURO Maxi-single. Nothing but a consumer rip-off that I've been talked into my whole career. No more.

The point is, I am trying my best to make sure the music and items NIN puts in the marketplace have value, substance and are worth you considering purchasing. I am not allowing Capital G to be repackaged into several configurations that result in you getting ripped off.

We are planning a full-length remix collection of substance that will be announced soon."


Posted by Trent Reznor, as seen on : http://www.nin.com/tr/default.aspx

Saturday, May 12, 2007

FARM project (*)

You might have heard me drool about having helped implement the first Rails app at work.

If you read this blog regularly, you might even know that this was a project done in collaboration with penantes.

Now, what has been missing is an overview of the technology used and a brief explanation thereof.

The project itself is little more that a web-based front-end to penantes's voodoo-like perl scripts and it's purpose is solely of giving interested parties a better view of the spell's script's results.

Well, we had an old Dell Poweredge laying around, so that was the machine used. It had an ancient implementation of Red Hat 8 (actually. I think it was vd who installed it) so that had to go. Not so much because it was old, but because it was Red Hat. And no noticeable services running around so a clean install it would be.

For OS we chose FreeBSD. We wasn't our first choice, but Ubuntu didn't correctly recognize the SCSI controllers and the openSolaris DVD was well...a DVD, and Debian 4 was late. The machine at this time didn't have a working network connection and only a CD drive for media. Since FreeBSD is a distant cousin from both Solaris and Mac (I just had to bring this up) it was the next best thing.

The install was easy enough and the software available was pretty much all we needed.
For web serving we have Apache, for database we used Mysql, and has i've said, we used Rails for development. And apart from configuring Apache with fcgid which is a hole new post subject, everything runs just fine for now.

Recommended reading Rails on FreeBSD wiki page.

(*) in case you didn't notice....
FreeBSD
Apache
Rails
Mysql

27th birthday

My favorite birthday presents:







Wednesday, May 02, 2007

i can't do what???

09F911029D74E35BD84156C5635688C0

or if you prefer...

0x09F911029D74E35BD84156C5635688C0

Sunday, April 29, 2007

On job offers and career management (edited)

Recently i've been reading a fellow *'s musings on job searching and expectations and focus on career management, and although I mostly agree with his opinions and objectives, I can't stop but wondering if I (or most people, for that matter) can afford to be as straightforward as he seems to be.

In my career, and up until some 6 months ago, I've been mostly involved with Microsoft products and technologies. I've developed, administrated and and maintained applications, databases, systems and networks. However, Linux and Open Source in general have been my hobby and, i dare say, passion for the last 8 years or so. Cutting a long story short, in a Windows world I'm (somewhat) highly valued, but in a Unix\Linux context, I'm bound to be considered a junior staff member for a couple of years more.

Now, if the job title doesn't really bother me, the difference in wage is staggering. Enough to make me consider a jump back.

All this is only important when I'm faced with a difficult decision like I am right now.

I've managed to get a good deal of respect and appreciation on my current job, I've been involved with some very interesting technologies and have been given the chance to use Open Source technologies and am currently in the process of finishing up my first professional (cof...cof...) Ruby on Rails application, but the wage is ridiculous.

On the other hand, I have an offer to get back to a development only a sysadmin only position, but using .Net and other mostly Microsoft technologies. The pay is good, the challenge is well, challenging and the work environment as far as I could gather so far is very good. On the downside there will be plenty of grey suits and ties in my future. And a senior colleague who thinks rails is amateurish. But the boss says I can use whatever technologies I see fit to get the job done. And they both actually read my resume. And want _me_ to work for them.

Well, as you might have guessed the wage is the only thing that's making me consider the change, and the love for open technologies the only thing thats keeping me back.

In a ideal scenario I would refuse the change hands down, but these are not ideal times, so I'll have to sleep on it and hope for the strength to make the best decision.

Well things change quickly when you let them. There was a sysadmin position available too, and although I refused the developer job, I'll most likely be accepting the later. Stay tuned....

If only we had known earlier...

As seen on The freedom blog...

"Linux hackers! They aren’t smart enough to scare Bill Gates… and they certainly aren’t smart enough to scare Jesus. Did you know that He protects this website too? I prayed it, and it happened! All attacks rebuffed! All sin kept far from these pages.
Thank you Lord!"

By the way, did you know that if you use Ubuntu Christian Edition you can stop daemons with the command "Exorcize!" ? And that you can use "bless" whenever a program fails to start? Just beware not to issue a "chmod 666" , or you'll go to hell!!

Oh @wathever, forgive them, for they are funny. Seriously, I thought that sarcasm was beyond americans.

Thursday, April 26, 2007

What caught my eye this week

Brand of the year:


Google, witch you know already so I wont link to their site, was recognized this week as the the world's top-ranked brand.

In only 10 years, Google's Sergey and Lary managed to top decades old brands such as General Electric, Coca-Cola or even IBM.

Entering a realm occupied by only a few other companies whose brand became a synonym with their product (think Gillette) Google is an example of entrepreneurship. If you doubt it, you can always google it up. :o)

Blog of the month:


Following a tip from a new friend I've been enthusiastically reading a blog from a fellow rubyist. It's called Ruby on Windows, and as you might guess it's about using Ruby as a scripting and automation tool on MS Windows OSs. It provides some great examples and code samples witch got me thinking about replacing my vb scripts at work.

This is a great example of how to integrate an open technology with a closed system.

Wednesday, April 18, 2007

Year Zero. A final surprise?

Year Zero, Nine Inch Nails new album was officially released today. And a few more surprises came with it.

After hearing it on repeat for about 3 hours, when i finally removed the cd from my macbook, the CD had turned from grayish into white revealing some binary code that (after some googling) "I" discovered could be translated to a link to another secret site!

And i though that it was just my macbook going _Extra_ hot this time!!

This is the beginning....

Tuesday, April 17, 2007

Thursday, April 12, 2007

Old School To-Do List

I figure that if I write down my tasks, I'll be forced (by punishment of public embarrassment) to _really_ do them. This will hopefully get me out of LMP(*) and into GTD mode.

To Do:
- Install Edubuntu on a old iMac G3 to offer as a birthday present to my 6 year old cousin;
- Finnish reading Everyday Scripting with Ruby;
- Create a script to automate data extraction and transformation and creation of Excel graphics at work;
- Replace a myriad of Judoscript, Groovy, bash and Perl scripts with well documented Ruby scripts at work (It will look good in my resumé.. "the guy who introduced #a banking institution# to ruby");
- (finally) Take the admission exams for College;
- Help in the translation of www.ruby-lang.org to Portuguese;



(*)LMP .: Last Minute Panic - the major driving force for lazy creative geeks :o)

Thursday, April 05, 2007

The begining of the end (of record labels)

Nine Inch Nails made their _entire_ album available on their website!
Even the almighty RIAA can't stop them now

Art is resistance!

Perl Tech Meeting

Yesterday I went to my first Perl Tech Meeting and I can't stress enough how geeky those guys are.

Having lots of easy going, funny intelligent people talking about something they like is always fun, but this was actually very informative, since there were some tech talks that covered areas such as better debugging, replacing bash with perl, using C to improve Perl scripts benchmarks (dam, this guy was awesome!).

I specially enjoyed meeting Francisco Cabrita hearing Miguel Duarte and José Castro and some others whose names elude me right now.

Anyway, thanks to SAB(offline for _way_ too long) and Penantes for the invite.

May the Camel be with you!

Wednesday, April 04, 2007

Free tech support

One of the nicest things about being involved with customer support is being able to hear in first hand _real_ users fears and doubts.

Today i received an e-mail (at work) from a customer contemplating "migrating to a Ubuntu / Firefox solution" (his words) from Windows / IE and he was wondering if it would be safe to use our on-line banking service.

Yes it is. The only side effect is that the web app will work better in Firefox.

And since I am in a good mood, I will send him my personal e-mail for any tech support questions he might have in his migration.

It feels good to help a customer. :o)