Skip to content

Tag: book

Selected extracts from Socrates defense

Selected extracts from Socrates defense as described in Apology by Plato.

And I must beg of you to grant me one favor, which is this – If you hear me using the same words in my defense which I have been in the habit of using, and which most of you may have heard in the agora, and at the tables of the money-changers, or anywhere else, I would ask you not to be surprised at this, and not to interrupt me. For I am more than seventy years of age, and this is the first time that I have ever appeared in a court of law, and I am quite a stranger to the ways of the place; and therefore I would have you regard me as if I were really a stranger, whom you would excuse if he spoke in his native tongue, and after the fashion of his country; – that I think is not an unfair request. Never mind the manner, which may or may not be good; but think only of the justice of my cause, and give heed to that: let the judge decide justly and the speaker speak truly.

Well, although I do not suppose that either of us knows anything really beautiful and good, I am better off than he is – for he knows nothing, and thinks that he knows. I neither know nor think that I know.

Still I have a favor to ask of them. When my sons are grown up, I would ask you, O my friends, to punish them; and I would have you trouble them, as I have troubled you, if they seem to care about riches, or anything, more than about virtue; or if they pretend to be something when they are really nothing, – then reprove them, as I have reproved you, for not caring about that for which they ought to care, and thinking that they are something when they are really nothing. And if you do this, I and my sons will have received justice at your hands.

The hour of departure has arrived, and we go our ways – I to die, and you to live. Which is better God only knows.

The full Apology of Plato can be found here.

Ruby: A Simple Example of Meta Programming

A really cool piece of code I read today in the book Ruby on Rails: Up and Running.

class Talker
  def method_missing(method)
     if method.to_s =~ /say_/
       puts $'
     end
  end
end
 
t = Talker.new
 
t.say_hello
t.say_something
t.say_goodbye

And running

$ ruby Talker.rb
hello
something
goodbye

But why do that when we have parameters? Because you can do some methods really dynamic with a clear semantic, just looking for them you know are they are doing.

More books

More books to my shelf.

Livros novos

  • Ruby On Rails, Executando. Desenvolvimento Rápido para a Web. Bruce A. Tate & Curt Hibbs.
  • Ruby, conhecendo a linguagem. Eustáqui Rangel de Oliveira Jr.
  • JavaFX Script. Dynamic Java Scripting for Rich Internet/Clien-Side Applications. James L. Weaver.

First I’ll take a look … JavaFX, of course. :)

ps: The JavaFX book I win as a prize for naming the SDN Channel podcast, CampusCast. Thanks Edu that bring it to me from USA. ;)