best / worst comment

An old thread a stackoverflow, asked for “What is the best comment in source code you have ever encountered?“. Some answers are must-read :

// Dear maintainer:
// Once you are done trying to 'optimize' this routine,
// and have realized what a terrible mistake that was,
// please increment the following counter as a warning
// to the next guy:
// total_hours_wasted_here = 42


// somedev1 -  6/7/02 Adding temporary tracking of Login screen
// somedev2 -  5/22/07 Temporary my ass

Reset Log4j configuration

import org.apache.log4j.LogManager;
import org.apache.log4j.PropertyConfigurator;
// reset la configuration existante
// application de notre configuration

Javadocs from org.apache.log4j.Hierarchy class:

Reset all values contained in this hierarchy instance to their
default. This removes all appenders from all categories, sets
the level of all non-root categories to null,
sets their additivity flag to true and sets the level
of the root logger to Level DEBUG. Moreover,
message disabling is set its default “off” value.

Existing categories are not removed. They are just reset.

This method should be used sparingly and with care as it will
block all logging until it is completed.

     @since 0.8.5

Books – links

  • Hacker Shelf : mostly online, some books are available on pdf
  • IT eBooks : available as PDF , some books are available for online reading
  • Pro – Git :The entire Pro Git book, written by Scott Chacon and published by Apress
  • LinuxTopia : Mostly online administration books
  • FreeTechBooks :  Online Computer Science and Programming books
  • FreeComputerBooks : Computer, Mathematics, Technical Books.
  • LivresPourTous [French]:  miscellaneous books
  • JSBooks : A list of JavaScript related ebooks available online
  • PythonBooks : A list of Pyhton related ebooks available online
  • Sonatype Books :  ebooks about maven