Alter comments query to order by DESC

Drupal ordinary comment listing under nodes are ordered earliest first.(created ASC)
If you need to make it DESC, without using views:

/* Implements hook_query_TAG_alter().
* * Alter comments query to order by DESC as well as the default ASC. */
function CUSTOM_query_comment_filter_alter(QueryAlterableInterface $query) {
$orderby = &$query->getOrderBy(); 
$expressions = &$query->getExpressions(); 
// Sorting for threaded comments.
if (isset($orderby['torder'])) {  
// Get rid of the expressions that prepare the threads for ASC ordering.
    // Simply order by the thread field.
$orderby['c.thread'] = 'DESC';  
// Sorting for flat comments.  
$direction = 'DESC';
    if (isset(
$orderby['c.cid'])) {
$orderby['c.created'] = $direction;
$orderby['c.cid'] = $direction;

Surprisingly complex. Maybe should just use views...