Archive for March, 2008

Contas

Há coisas que nunca são demais mostrar. Mesmo que antigas. Sobre o programa novas oportunidades:

240 mil licenças de Microsoft Windows Vista Home BasicN Português DVD, 256,57€, resultam em mais de 61 milhões de Euros (61.576.800€)
240 mil licenças de Microsoft Office Home and Student 2007 Português OEM, 128,51€, resultam em mais de 30 milhões de Euros [...]

DB2 Rocks

[sourcecode language="ruby"]qs = Question.find_by_sql
“select X.* from ots_schema.questions,” +
“XMLTABLE (\’$d/question\’ passing document as \”d\” ” +
“COLUMNS question_text VARCHAR(200)” +
“PATH \’question_text\’) as X”[/sourcecode]
[sourcecode language="ruby"]qs.first.question_text.lstrip
=> “Which of the following is the correct syntax to set the DB2COMM variable to TCPIP?\n “[/sourcecode]
If DB2 was had a good DB2 [...]

Google reinvents the wheel

About porting Ruby on Rails to Javascript:
In an effort to increase developer productivity at Google, Steve tried to convince the company to adopt Rails (and consequently Ruby) as a programming language. When that fell on deaf ears (Google really does not want to increase the number of languages that must be supported by their infrastructure), [...]

has_one :through

Finally we will be able to refactor our ugly code when we have this situation (changeset 9067):
[sourcecode language="ruby"]class User < ActiveRecord::Base
has_many :channels
end
[/sourcecode]
[sourcecode language="ruby"]class Channel < ActiveRecord::Base
belongs_to :network
belongs_to :user
end
[/sourcecode]
[sourcecode language="ruby"]class Group < ActiveRecord::Base
has_many :channels
has_one :network,
:through => :channels,
:conditions => [...]

links for 2008-03-23

Serving Images From A Database – MySQL-dump
(tags: mysql database images performance web server architecture lighttpd)

[Rails] Calling view helpers from your controller – Lars Pind
module ActionView module Helpers module TextHelper module_function :pluralize, :truncate end end end
(tags: rails helpers controller rubyonrails development views)

UI-patterns.com
(tags: ui patterns design usability webdesign interface reference web)

Instant video; Custom video solutions for your [...]

links for 2008-03-22

Google Code University – Google Code
(tags: google education tutorial ajax tutorials development code python java c++)

links for 2008-03-19

Understanding Ruby blocks, Procs and methods
A very good post on ruby. If you haven’t tried Ruby yet just install it and test this.
If you don’t love it by the end of the article… Your mad :X
(tags: ruby blocks tutorial functional proc development closures yield lambda)

Things – task management on the Mac
(tags: gtd mac software [...]

Valid and Well-formed XML Documents in Ruby on Rails

If your working with DB2 on Rails you probably need to check if the xml document is – at least – well formed.
I found a neat plugin called validates-xml that uses REXML to see if documents are well formed.
To install it simply
[sourcecode language="ruby"]svn co http://validates-xml.googlecode.com/svn/trunk/ validates-xml-read-only[/sourcecode]
And copy that folder to vendor/plugins.
You can easily integrate schema [...]

Yet Another Ruby on Rails Web Application – Teaser

links for 2008-03-16

Ruby on Rails Security Project — Exploring the Security of Rails and friends.
(tags: rails security rubyonrails ruby blog programming development mysql)