Quand les montagnes se transforment en briques

En janvier j’ai eu la chance de partir grimper en Chine sur des falaises dont j’avais entendu parler depuis longtemps. Après avoir atterri à Hong-Kong, j’ai pris la direction de Shenzhen, puis de Guiyang pour atteindre Getu Hé, la région où nous nous étions donnés rendez-vous avec mes partenaires d’expé. Durant ce trajet j’ai pris conscience de la politique menée par la Chine pour développer ses villes.
OLYMPUS DIGITAL CAMERA
Ce pays a une grande population et la pauvreté des campagnes poussent de plus en plus de gens à migrer vers les villes. Nous assistons donc à un exode rural massif. On ne parle pas de quelques milliers de nouveaux habitants par an et par ville, mais de plusieurs millions de personnes. Il y a donc une frénésie qui s’est développée autour de la bulle immobilière des grandes villes. Des gratte-ciels poussent comme des champignons, avant même de savoir s’ils seront remplis par l’exode rural. Ils sont construits à une telle vitesse qu’aucune planification de l’aménagement du territoire n’a été faite, pas plus qu’une réflexion concernant le respect de l’environnement. Le but est d’aller vite et ça se sent. C’est mal isolé, mal conçu, mais c’est pas cher …
Continue reading

Lint : a code quality tool for your development environment

As to ensure the quality of the code that is added to the project, we ask all the developers to setup a code quality tool on their development environment to enhance the overall code.

Install pylint

Make sure you are in the development environment and run :

pip install pylint git-pylint-commit-hook

The command pylint and git-pylint-commit-hook will now be accessible in your system.

install jslint

For this, you’ll need to have NodeJS installed on you computer as well as NPM (Node Package Management tool).
First you’ll have to install the latest version of NodeJS on your computer :

sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install python-software-properties python g++ make nodejs

Then install jslint and jshint

npm config set registry http://registry.npmjs.org/
sudo npm install jslint -g
sudo npm install jshint -g

https://github.com/reid/node-jslint
After running those commands, the jshint binary should be available in the directory /usr/local/bin/jshint

Setup git hook

In your repository, you’ll need to edit the file (or create it) .git/hooks/pre-commit with the following :

#!/usr/bin/env bash
./tools/pre-commit

In the root folder of your repository, make sure that you have the following files :

.jshintrc

//http://www.jshint.com/docs/options/
//http://jslinterrors.com/
{
  "asi": false,
  "expr": true,
  "loopfunc": true,
  "curly": false,
  "evil": true,
  "white": true,
  "undef": true,
  "node": true,
  "camelcase": false,
  "eqeqeq": true,
  "indent": 4,
  "quotmark": "double",
  "unused": false,
  "trailing": true,
  "maxlen": 100,
  "white": true,
  "globals": {
    "$": false,
    "jQuery": false,
    "angular": false,
    "console": false,
    "require": false
  }
}

.jshintignore

node_modules
cpwp/cwp/public/lib

.pylintrc

Click to see the file : .pylintrc
And this is it. Now with this you should be ready to commit

Setup lint in Eclipse

For python you can enable pylint inside Eclipse to have code assist with usefull tips.
Go in Window > Preferences > PyDev > PyLint
Capture du 2014-04-14 15:13:02

Setup lint in Vim

Here are a few links to setup the Lint environment in Vim :
pylint.vim : compiler plugin for python style checking tool
Jshint2.vim : Lightweight, customizable and functional Vim plugin for JSHint integration.
Syntastic : Syntax checking hacks for vim

Listening for peace

In this TED Talk, the presenter tells us how important listening is. In our world we are not listening enough to our pairs. We are focused, concentrated, deconcetrated, multi-tasking all the time. But the consequence of that is misunderstanding, which can lead to violence and pain.
Recently I felt frustrated because I wanted to tell someone what I was thinking about something he did. My aim was to help him to improve but he was not really listening … even if he was saying « yes, yes, yes ». I felt bad afterwards and in the end I was almost angry of not being listened to. So in this little life experience, I felt how it is important to give your attention to others.
In the following talk, you’ll receive 5 little exercises to improve your ability to listen. Starting from now, I’ll try to apply them ! If you wish to join the effort, I added the list of exercises on the bottom of this articles.

5 exercises :

  • Silence : 3 minutes of silence a day to recalibrate and be able to listen to silence again
  • The Mixer : listen to how many channels of noise you can hear in a noisy environment
  • Savouring : listen to everyday sounds to find out the hidden choir
  • Listening positions : adapt your listening position according to what you are listening to and playing with those filters :
    • Active / Passive
    • Reductive / Expansive
    • Critical / Empathic
  • RASA : if you are leader, spouse, friend, parent, teacher :
    • Recieve : pay attention to the person
    • Appreciate : making little noises like « hmm », « ah », « ok »
    • Summarize : Using the word « so, you said that … », « if I’m right you think that … »
    • Ask : To make sure you understood well

Good listening 😉