Showing posts with label ruby. Show all posts
Showing posts with label ruby. Show all posts

Monday, February 23, 2009

Amsterdam.rb meeting tonight

Location
The event will be held at the Amsterdam office of TTY Internet Solutions, which you can find here

Schedule
19:00 - doors open
19:30 - Jeroen van Dijk - UML-based scaffolding
19:50 - Martijn van Excel - openstreetmap.org
20:20 - break
20:35 - Ola Bini presenting Ioke
21:10 - TTY - About quality
21:30 - break
21:45 - Phusion's Ninh Bui & Hongli Lai - design by contract
22:10 - Axel Roest about rubycocoa
22:30 / 23:30 - drinks

This will be a exciting night out for ruby geeks in Amsterdam! I look forward to see and hear Ola Bini and the Phusion crew above all others.

I will try to write a post-meeting post with any interesting stuff that comes out of it. Stay tuned...

Wednesday, March 19, 2008

1000.times better

Short code post. Just the story of how do you get someone looking into Ruby when they had already dismissed it as a fad. You know, the hype can blind you.

So the situation arrived when a friend needed to have a particular chunk of XML repeated 1000 times. No more, no less. Sounds stupid but it's just an oversimplified anecdote.

When he asked me for a quick script to do it for him, I saw an opportunity to show how Ruby would be a good tool for this job (insert promo here). Being a "show, don't tell" kind of guy, this was the code I presented him.


def thousand_repeater(string, repeats =1000)
repeats.times do
print "#{string}\n"
end
end


Not too fancy by any means. You just have to call it with the string you want, optionally provide the number of times you want it repeated and that's pretty much it.

Ex.: thousand_repeater "hello",3


The thing that got to him was actually the ability that Ruby gives you of doing something like "1000.times", compared to the more familiar (at least for him)

for(i=1; i<1000; i++)


Thats it.

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.

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.

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.

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)

Wednesday, April 04, 2007

Long time no see

I was forced to observe the shutdown day for over a week (not really, but i'll get back to that) because my Macbook died on me.

It's never a good experience to be away from your mac, but to deal with the Apple support around here one must be prepared for the worst.

From telling me that the customer service guy wouldn't reply my e-mails because he had personal problems (hey that's funny,i have a personal problem too! MY MAC IS BROKEN! what a coincidence) to taking some 20 phone calls to finally get some answers (I have witnesses. And they're still laughing) i've seen it all with these guys.

If we consider that a large part of Apple sales come from mac owners showing off the “superior hardware and the user experience a mac gets you” to their friends and coworkers (I myself am responsible for at least 4 switchers over the past 6 months), one should expect a better level of emphasis on customer satisfaction right?

Thankfully I still have my trusty Asus laptop that managed to deliver the daily fix of web surfing, and getting most of my work done so I really didn't had to be offline for so long. I was just too negative to write anything useful.

Anyway the XVI Jornadas de Informática an event hosted at UBI went by, and this year at least I heard something about what happened there. In Ruby in Portuguese website there are even some of the presentations given there available for download.

My humble 2 cents however would be to manage to get some more publicity before it happens.

While on the subject of great events happening in this little
fascist square of dirt by the sea, the fifth national encounter on Open Technologies will be happening in Lisbon on the 19th, and although the organization is hosted by Sybase and seems to be very professional and extremely interesting, my favorite Solaris Admin - slash -Farmer boy already managed to find a bug on the event page.

Also, today I'm going to my first Perl Mongers tech meeting and I'm hopping that I'll be able to learn something from those guys, 'cos the Perl I know wouldn't move the proverbial mountain.