nunojob:~ dscape/08$ echo The Black Sheep

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 (30.842.400€)

Mesmo que existisse a oferta do software, seria um presente envenenado cobrado várias vezes à economia portuguesa no futuro a médio e longo prazo.

Em http://blog.softwarelivre.sapo.pt/2007/06/05/que-casamento-e-este/

Agora as mesmas contas usando uma qualquer distribuição Linux e Open-Office:

240 mil vezes zero = zero euros (linux)

240 mil vezes zero = zero euros (open-office)

total: zero euros

poupança possível do estado: 91 milhões de euros (dos vossos bolsos)

Eu até falei de como os portugueses são tão lorpas que são roubados quando compram estes computadores e nem sequer notam. Mas esqueci-me destes pormenores fantásticos, ainda são mais roubados nos impostos que pagam por causa de promaiores como este. Peço desculpa, é que usar qualquer palavra com menor quando estam envolvidos 91 milhões parece mal.

É de referir que a Microsoft – segundo consta – fez um descontinho. Obrigado Microsoft! ;) Sempre tão simpáticos. Portanto sim provavelmente as verbas são inflacionadas, mas isso é da responsabilidade do autor do artigo e não minha. Eu só fiz as contas – com alguma dificuldade admito – do linux!

[EDIT: Vi neste post o teste de literacia digital das novas oportunidades. Peço que o façam e constatem que são todos uns iliterados porque aposto que poucos vão conseguir acabar a avaliação. E vejam lá que alguns de vocês – como eu! – são engenheiros informáticos. Que vergonha! :(]

Advertisements

DB2 Rocks

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"
qs.first.question_text.lstrip
=> "Which of the following is the correct syntax to set the DB2COMM variable to TCPIP?\n  "

If DB2 was had a good DB2 driver and a ActivePureXML (or something adapter) it would so f*ckin rock. Just look at the sample. And the dynamic nature of ruby would enable the flexibility of xml documents.

Please IBM please. DB2 for mac and decent support on Ruby. Don’t make me write things like this no more:

# Once again fixing IBM_DB bugs the ugly way
# with_scope anyone?
add_index :'ots_schema.users', :login

or

t.column :document, :xml

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), Steve decided to do what any other frustrated programmer would do: he ported Rails to JavaScript. Line by line. In 6 months. Working 2000 hours. Steve is a coding stud.

From: Steve Yegge ported Rails to JavaScript

In this six months Steve could have contributed to the rails core and improved the framework to a great extent. If he found security issues like the article refers than he should have fixed them in rails. I cannot even begin to understand why he didn’t by the way. Or at least reported them.

My conclusion of seeing that google allowed a employee to waste 6 months of work because they don’t want to increase the number of languages that must be supported by their infrastructure is that Google is Dumb.

Steve seems like a smart guy so if I was told to rewrite Ruby on Rails by an employer I cannot understand why he didn’t – at the very least – refused to do so and pointed out how stupid it was to reinvent the wheel. I simply hate javascript and love ruby. I think javascript is the worst thing there is in the internet. That’s one of the reasons I decided to take a chance on XForms. Well but that’s a personal opinion and has nothing to do with the case!
The question is:

So will this bring something new to the web?

Yes! But it’s not that this wheel is great and the other was flat. It can bring something but just because Google has the power to do that, in any language they decide to use. They have the man power to go beyond what rails offer.

But does this make the decision less dumb?

No. They could do it in rails and improve a great open source product.
Or is it that hard for engineers at google to learn a new language??

has_one :through

Finally we will be able to refactor our ugly code when we have this situation (changeset 9067):

class User < ActiveRecord::Base
  has_many :channels
end
&#91;/sourcecode&#93;

&#91;sourcecode language="ruby"&#93;class Channel < ActiveRecord::Base
  belongs_to :network
  belongs_to :user
end
&#91;/sourcecode&#93;

&#91;sourcecode language="ruby"&#93;class Group < ActiveRecord::Base
  has_many :channels
  has_one :network, 
    :through => :channels,
    :conditions => ['channels.alive? = ?', true]
end

Another good news is that the RubyForge place for the OTS project was finally approved. So guess I will be doing some work on it this afternoon.

links for 2008-03-23

links for 2008-03-22

links for 2008-03-19