Blog
Posted by Stijn Pint on Aug 20, 2008
You all probably know the Rails helper function ‘cycle’, most commonly used to specify alternating classes when iterating over a collection :
<% for item in @items %>
<tr class=<%=cycle('even', 'odd')%>>
<td><%= item.name %></td>
</tr>
<% end %>
Well, apparently it is even more usefull than I thought,
and it was simply a matter of reading the rails documentation ...
Continue Reading…
Posted by Stijn Pint on Jul 07, 2008
Last week, while I was writing the following expression for like the 1000th time, it struck me…
name = Product.find_by_code('code') ? Product.find_by_code('code').name : nil
WTH am I doing writing this crazy, long, duplication bloated one-liner in ruby ? YES, in RUBY ! That ’s just plain WRONG!
There just HAS to be some great, DRYer, magic, aaaah’s and oooooh’s generating, no-longer-than-5-characters expression that handles this!
So instead of bashing my laptop against the wall I IM’d my colleague and local ruby-guru Peter.
Continue Reading…
Posted by Stijn Pint on Jun 17, 2008
In this short tutorial I’ll describe an easy way to make your Rails application even more enterprise-ready ;-)
For our latest project, our customer asked to change the authentication module, they wanted to be able to use their Active Directory credentials to enter the application.
So, we have an existing rails application :
What do we need :
- User should be able to keep using the old login system (at least temporarily, until all users are ‘upgraded’)
- User should be able to login with his LDAP credentitals
Continue Reading…
Posted by Peter Vanbroekhoven on Apr 21, 2008
At XaoP, we have recently started checking out Amazon’s EC2. Although
the use of virtualization technology is hardly new in hosting
technologies, Amazon’s take on it offers extra flexibility for
developers to exploit.
Continue Reading…
Posted by Tim Brys on Apr 01, 2008
Some time ago, we pointed out a serious memory problem when using libxml-ruby. We found a solution, but recently Ben Lam told us about another way to solve this. Details inside.
Continue Reading…
Posted by Stijn Van Vreckem on Mar 30, 2008
I don't know about you, but I had a pretty inspiring weekend.
First of all, I checked out the two significant new features of EC2 - Elastic IP Addresses and Availability Zones - which help you to run reliable web sites and other applications within Amazon EC2.
Then I watched the IPhone SDK for Web developers video.
I started to test the ReviewNG DRP application via Safari on the IPhone Simulator.
The application works pretty well on the IPhone, but it would be even better if it could work in full screen.
Unfortunately, the full screen mode is not working in my release of the simulator.
Continue Reading…
Posted by Stijn Pint on Feb 18, 2008
SVN is great, or maybe I have to say, version control is great.
It makes sure your code doesn’t get lost, keeps track of all the changes, makes collaboration easy, allows for efficient project management (linking changesets to tickets) and so on.
But for all these advantages to be really usefull, you should constantly commit your changes to the repository: bug/ticket closed => commit, feature implemented => commit, plugin/library updated => commit, ...
Problem: you probably don’t have constant access to your SVN repository. You might be on the bus, SVN is blocked by your client’s firewall,...
In comes GIT, and more specific, GIT-SVN.
Continue Reading…
Posted by Tim Brys on Feb 05, 2008
Internship
In December, my internship at XAOP for the Erasmus Hogeschool Brussel was concluded with success. I was rewarded with an iPod Touch 16GB.
DOCPublisher
After my internship, I was offered to continue working at XAOP on Saturdays. Given the unique experience this job offers me, I gladly accepted. My primary occupation is the further development of DOCPublisher. To clarify the concept of DOCPublisher, we published a document describing the usage of DOCPublisher .
Continue Reading…
Posted by Stijn Pint on Jan 29, 2008
For one of our current Ruby on Rails applications, we only had a simple login system, based on the acts_as_authenticated plugin.
However, there was a growing need to have some kind of (basic) permission system.
We wanted to keep it as lightweight as possible and came up with the following solution.
This tutorial starts from an existing project that is already using the acts_as_authenticated plugin for the user accounts.
Continue Reading…
Posted by Peter Vanbroekhoven on Dec 15, 2007
In their continuing effort to promote Ruby in Belgium, The Belgian Ruby User Group is organizing a Ruby and Rails developer’s room at Fosdem 2008 on 23 and 24 February 2008. Fosdem, or the Free and Open Source Developers’ European Meeting, is a non-commercial event organized by the Free and Open Source Software (FOSS) community, for this community, and is devoted to bringing developers together and inspire the synergy that binds them.
Continue Reading…
Posted by Tim Brys on Nov 09, 2007
Deploy
As you may notice, a new tab called “Docs” has appeared above. This means we put a first version of docpublisher in production.
Continue Reading…
Posted by Tim Brys on Oct 26, 2007
Docpublisher is nearing it's first internal release, so a lot of
testing has been done this week.
Continue Reading…
Posted by Tim Brys on Oct 19, 2007
Deploying
Some days ago, we deployed the docpublisher for the first time. After q
uite a long session of installing and configuring, there still seemed to be someth
ing amiss. We called it a day and decided to continue the next morning. Sadly, nex
t morning, we found that our Apache had cra
shed during the night. It was not a nice sight: blood, limbs and ruby-code everywh
ere. We cleaned everything up and decided to test the deployed docpublisher on ano
ther server…
Continue Reading…
Posted by Stijn Van Vreckem on Oct 07, 2007
On 3rd of October 2007, XAOP organized and hosted the first Belgian Ruby User Group(BRUG) meeting.
More than 20 individuals interested in developing, promoting, fostering, strengthening, and improving the Ruby programming language and Ruby community attended this meeting.
Interested to become a member ? Sign up to the mailinglist.
If you were unable to attend :
Continue Reading…
Posted by Stijn Pint on Dec 15, 2007
I started using Netbeans about two months ago for Ruby and Ruby on Rails development. Before, I was working in Eclipse with the RadRails plugin and it’s not very likely I’ll ever go back to it. It was good, but Netbeans is just a little bit better in everything.
But that ’s not what this post is about, in fact, there was a feature that I couldn’t get to work in Netbeans: the database browsing from within the IDE, and more specific for an Oracle database.
Today I gave it another try and guess what, it’s working now :-).
It turned out to be pretty easy, but I suppose I’m not the only one who is having difficulties with this, so here ’s how I did it:
Continue Reading…
Posted by Peter Vanbroekhoven on Sep 13, 2007
The main Ruby event every Rubyist world-wide has been waiting for all year is coming up. The Seventh International Ruby Conference, also known as RubyConf 2007, will be held in Charlotte, North Carolina, USA on November 2-4.
This year’s agenda is impressive to say the least; three days of plenary sessions in the morning, two tracks and a workshop or clinic running concurrently in the afternoon. Imagine starting your day with talks from the main developers of the three most promising alternate Ruby implementation, and ending it with Matz’s keynote speech which, as tradition dictates, will allow us a glimpse of his vision on the future of Ruby. With Ruby 2.0 coming up Real Soon Now™, this is a most exciting time for us Ruby lovers.
Every person of authority in the Ruby community is going to be there. This is where Ruby’s future is decided. This is where Ruby history is made. This is where XaoP just has to be too. So we can’t but send our own delegation there to absorb all the Ruby goodness and bring it back with us to Belgium. See you in Charlotte, maybe!
Continue Reading…
Posted by Peter Vanbroekhoven on Sep 03, 2007
Posted by Peter Vanbroekhoven on 09/03/2007
Something great is on the brink of happening. Something all of Ruby speaking Belgium has been waiting for. A void in our Ruby loving heart is about to be filled. If you listen carefully, you can hear the joyful whistle of this joyous event speeding towards you. No, I’m not talking about the convoy of Coca-Cola® trucks, I’m talking about the first ever Belgian Ruby User Group meeting.
XaoP has taken it upon itself to organize the first Belgian Ruby User Group, or BRUG meeting. This is the occasion for Ruby users to meet kindred spirits, to indulge in general nerdiness with a strong focus on Ruby and Rails, to share all of Ruby’s goodness with people who know how to appreciate it. And the DateTime we are going to be doing all that on is Wednesday, October 3 at 19h.
The program for our first meeting will consist of bonding, a presentation on metaprogramming in Ruby, and sandwiches. Future activities may include working on projects in groups, pair programming, and pizza. If this sounds like fun, head over to the brug-talk mailing list where we hang out outside BRUG meetings and join us. If we are to put Ruby on the Belgian map, if we are to build a bridge between Ruby and our tiny country, then we need all of you Ruby enthusiasts to join what we hope will be a vibrant community so we can show everyone that Ruby lives here in Belgium!
Continue Reading…
Posted by Stijn Pint on Jul 26, 2007
I ran into a small problem today while making an ajax based filter for a table. (Kinda like this example: http://dev.nozav.org/ajaxtable )
I want this query to be case IN-sensitive ofcourse, but in Oracle this is apparently not so by default.
Continue Reading…
Posted by Peter Vanbroekhoven on Sep 24, 2007
Organizing the source code of your library or application well is
extremely important. Well laid-out source code helps maintainability
and readability, both very important aspects of software that is to
last. Class oriented source organization was made popular by Java and
adopted by Ruby on Rails, and is an accepted industry standard. Ruby
code organization is file oriented. This allows most any code
organization a programmer could want, opening the road to—god
forbid—even better organizations. This article focuses on
aspect oriented code organization.
Continue Reading…
Posted by Tim Brys on Oct 12, 2007
Where are my memories?
After last week’s cool segfaults, I now encountered a more subtle
problem: a large memory leak. Again, the problem’s cause lies deep within l
ibxml-ruby and ruby-xslt.
Continue Reading…