Moved to www.regedor.com

This is my last post here.

I have a new web site!
You can find my writings at: http://www.regedor.com/writings

Subscribe it here: http://feeds.feedburner.com/regedor

Contact Day Sonae

More than 11000 university students registered in “Rede Contacto”, the social network created by Sonae (Sonae is a retail company, the largest private employer in Portugal). The aim is to start a innovative recruitment process of young graduates with high potential. For months, students are challenged to perform various tasks (online quizzes, questionnaires, etc). That allows the participants to accumulate points that grant access to Dia Contacto (Contact Day).

I was one of the lucky 60 selected students. I was invited to spend a full day getting to know Sonae. I accepted the invitation. What can I say now? It made me have a very positive image of Sonae.

In the morning, they showed us the facilities, the whole team was friendly, and everything seemed well organized. They even provided a free lunch (It was good, not too posh, a quick stand-up buffet). After lunch, we listen to the top officers (Eng. Belmiro, Eng. Paul, Dr. Luís Reis). I really liked their proximity and the stories told. Furthermore, I compliment the emphasis given to the company’s values​​, although the talk about it was a bit too long. In my opinion, there is no need to write values on walls. Values are defined through the committed actions.

Also during the afternoon, the students formed teams and played games. The performances of students were being assessed throughout all day. The challenges seemed too simple, for masters degree students with some professional experience. I believe that this day was primarily designed for post-bolonha graduates, a student can now finish a degree with only 19 years, sometimes maturity may call into question. The main element of assessment was the willingness to be part of Sonae. Anyway, it was an inspiring day for people desirous to start a professional career.

Overall, it was a nice experience. Sonae +1

Analysing and Measuring Open Source Projects

Thousands of open source software projects are available for collaboration in platforms like Github or Sourceforge.
However, there is no systematic information about the quality of those projects.

Few users have the ability to assess the quality of a project by looking at source code.
With that in mind, a system capable of automatically analysing and producing reports about a given Open Source Sofware Project would enable users to make better choices,
and developers to further improve their software.

Furthermore, I am, currently, writing my master thesis and will engage myself to create an application capable of automatic analyse and measure GitHub public projects.

Shutdown Timer

This is a simple tip. Go to the terminal and type:

sudo shutdown -h +45

After that your system will shut down in 45 minutes.
You can also specify the exact time:

sudo shutdown -h 22:30

If you want to cancel the shutdown timer you should use the flag “-c”:

sudo shutdown -c

You can also use the flag “-r” or “-s”, to reboot or make the system sleep.
Read man shutdown for further documentation.

Create XML schema from XML file

Suppose you want to create a xsd based on an “example.xml” structure.
After download and extract trang you can run it with:

java -jar /trang.jar example.xml example.xsd

The “example.xsd” file generated may not be exactly what you need, but most of the time it is a good starting point.

To validate a xml file, for instance “example.xml”, against an xsd file,
“example.xsd”, you can use the following command:

xmllint --schema form.xsd ~/form.xml

ActionMailler and Gmail (no plugins)

Last week I had some problems while trying to configure the ActionMailler with Gmail. I already have some applications in production mode recurring to this system, but this one, using ruby 1.8.7 and rails 2.3.3 gave me some trouble. Gmail requires TLS, older versions of ruby and rails do not support that, the work around was a pluging to enhance it(for example ActionMailerTLS). If you are using Ruby 1.8.7 and Rails 2.2.1, or later versions, you don’t need any plugin, you only need to follow my instructions.

Add the following lines in your config/enviroments/production.rb

config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = YAML.load File.open("#{RAILS_ROOT}/config/mailer.yml")

And then create the yaml file config/mailer.yml :

---
  :enable_starttls_auto: true # This is how you tell ActionMailler to use tls
  :address: smtp.gmail.com
  :port: 587
  :domain: gmail.com
  :user_name: my_username #You should type your username, you should not include the "@gmail.com".
  :password: my_password #You should type your password
  :authentication: :plain

That’s it!

Now take a look in this notifier class example:

class Notifier < ActionMailer::Base
  def activation_instructions(user)
    @recipients  = "#{user.email}"
    #@from        = "Miguel <my_username@gmail.com>" # Doesn't work anymore 
    @from        = "my_username@gmail.com"
    @subject     = "[Card-Sorting] "
    @sent_on     = Time.now
    @subject    += "Important"
    @body[:user] = user
  end
end

There is a lack of backward compatible. Due to some changes in the latest versions you cannot use that syntax anymore, if you are upgrading from old versions be careful, you should only simply specify your email to get it correctly parsed.

Gato Fedorento – Esmiúça os Sufrágios

Apenas uma referencia para quem me pediu os links:
1º Episódio – part1, part2, part3 (José Sócrates)
2º Episódio – part1, part2, part3 (Manuela Ferreira Leite)
3º Episódio – part1, part2, part3 (Paulo Portas)
4º Episódio – part1, part2, part3 (Francisco Louçã)
5º Episódio – part1, part2, part3 (Paulo Rangel)
6º Episódio – part1, part2, part3 (Jerónimo de Sousa )
7º Episódio – part1, part2, part3 (Joana Amaral DIas )
8º Episódio – part1, part2 (Ministro Teixeira dos Santos )
9º Episódio – part1, part2, part3 (Maria José Nogueira Pinto )
10º Episódio – part1, part2 (Garcia Pereira )
11º Episódio – part1, part2, part3 (António Costa )
12º Episódio – part1, part2, part3 (Pedro Santana Lopes)
13º Episódio – part1, part2, part3 (Rui Rio)
14º Episódio – part1, part2, part3 (Luis Filipe Menezes)
15º Episódio – part1, part2, part3 (Mário Soares)
16º Episódio – part1, part2, part3 (Pedro Passos Coelho)
17º Episódio – part1, part2, part3 (Elisa Ferreira)
18º Episódio – part1, part2, part3 (Marques Mendes)
19º Episódio – part1, part2, part3 (António Marinho Pinto)
20º Episódio – part1, part2, part3 (Nuno Melo)
21º Episódio – part1, part2, part3 (Jorge Coelho)
22º Episódio – part1, part2, part3 (Francisco Moita Flores)
23º Episódio – part1, part2, part3 (Mário Lino)
24º Episódio – part1, part2, part3 (General Ramalho Eanes)
25º Episódio – part1, part2, part3 (Bernardino Soares)
26º Episódio – part1, part2, part3 (Marcelo Rebelo de Sousa)
27º Episódio – part1, part2, part3 (Francisco Assis, José Pedro Aguiar Branco)
28º Episódio – part1, part2, part3, part4 (José Alberto de Carvalho, Julio Magalhães, Rodrigo Guedes de Carvalho)

My friends twitter updates on Google Reader

I was trying to get this working, but Twitter RSS feeds now require authentication, and Google Reader does not support authentication.
A service called http://freemyfeed.com can strip away the authentication from the feed, and gives you a new RSS feed that you can then supply to Google Reader or IGoogle.

Change default user shell

Example of how to use chsh command to change current user shell to bash:

chsh -s /bin/bash

Git push to remote

Just a note, this is the way to push the current branch to a branch on a remote git repository using ssh trough non default port:

git push ssh://remote_user@domain.com:remote_port/~/remote_repository remote_branch

Next Page »



Follow

Get every new post delivered to your Inbox.