Archive

Archive for the ‘ruby’ Category

Quiz

January 12th, 2011 No comments

We found a small bug in our codebase the other days, which led to a funny discussion about how PHP acts in different situations.

Try look at the following example. What will $i be?

$i = 10;
$i = $i + 2 + $i = $i + 5;
echo $i;

Give an answer before you plot it in the console :)

Ruby will give the same answer:

i = 10
i = i + 2 + i = i + 5
puts i

Here is another one:

$d = 0;
$d = 2 + $d == $d = $d + 2;
echo $d;
Categories: PHP, ruby Tags:

JAOO 2008

April 3rd, 2008 2 comments

Thursday and Wednesday I attended the JAOO conference in Copenhagen. It was a pure Ruby conference with lots of exiting speakers, such as "Matz", Dave Thomas and Michael Koziarski. Unfortunately DHH wasn’t there. I don’t know why because it would have been very obvious, but there were some other guys from the Rails core team. Some of the most interesting speaks was about:

  • Hobo – an extension for Ruby on Rails which makes prototype web developing extremely easy and quick. I’m looking forward to try this framework, especially their DRYML (Don’t Repeat Yourselves Markup Language) which enables the view to be simple and aesthetic.
  • REST – Stefan Tilkov made a nice presentation about REST and how to make your Rails app RESTful.
  • Metaprogramming – Dave Thomas had a good talk where he explained the "self" concept in Ruby.

 JAOO is really well organized and the speaks are at a high standard. Next conference is in Oslo and it is also a Ruby Fools conference. Check out the future events at www.jaoo.dk

Categories: ruby, web developing Tags: , , ,

Test new plugin

January 17th, 2008 1 comment

Just want to test a new plugin that should make source code nice and readable. Here is some RoR code:

def list
products = Product.find(:all, :conditions => {:color => "red"})
end

Nice.. it works… Testing PHP code..

function hello($name){
  echo "Hello ".$name;
}
Categories: ruby Tags: