Tuesday, 31 August 2010

Book Review - The Shadow Of The Bear (Regina Doman)

The Shadow of the Bear

by Regina Doman
The Shadow of the Bear


When Bear, a mysterious young man, lands on Blanche and Rose Brier's doorstep in New York City, the two sisters have conflicting opinions on whether or not he is dangerous. Even as Blanche learns to trust him, her fears that Bear's friendship threatens their family prove terrifyingly true. A modern retelling of the classic Brothers Grimm fairytale.

Read more on Amazon...

Personal Review

This book is a classic - one that I've read many times and will read again. The adaptation of the fairy tale "Snow White and Rose Red" is set in modern New York City, and fits in very well with this environment. But don't think this is just a children's fairy tale - anyone who has read Chesterton or is versed in classical literature will appreciate the quotes that come up throughout the story in casual conversation. The characters are engaging and varied - some are drug dealers, some classical poets, while others appear to be both! And surprisingly all the dialog sounds natural, despite dealing in some depth with many aspects of faith and life.

Some of the topics covered in a unique and realistic manner include modesty, judging people, revenge and peer pressure. You might think that having such a strong Christian moral the storyline would be weak - quite the opposite! The action and events in this story themselves make for a great read, the moral values simply add to this book's appeal.
Anyone from early teens on would definitely enjoy reading this book, although older teens would have a greater appreciation of the relationship aspects. This book is suitable for younger readers than Waking Rose or The Midnight Dancers (which deal with relationships at a higher level).

Violence (6/10) Rating: 6/10

There are some moderately violent scenes in this book. However, the level of violence seems appropriate to the story, and adds a level of realism without being overly graphic.

Some of the violent aspects include:
  • A gang of boys attack a boy and girl, and the girl is thrown to the ground
  • One character is nearly asphyxiated
  • A girl is forced into a car, and held against her will
  • People are held at gunpoint several times
  • One character is shot and wounded (not life-threatening)
  • A character threatens suicide
Anyone from early teens onward should be able to handle the level violence in this book. More conservative parents might wish to read the book first though, to be sure.

Immorality (6/10) Rating: 6/10

One of the major themes of this book is drug dealing. While innocent characters are sometimes suspected of illicit dealings, it's always very clear that using or handling drugs is wrong.

Some high school students are smoking cigarettes without permission or adult supervision. These are students with a bad reputation, and it's obvious that what they're doing is wrong.

In once scence, a boy is alone with a girl and tries to force a kiss (nothing further ensues though). This particular issue is handled very well, and later on in the book the girl gives a marvelous treatise on morality and character.

Language (1/10) Rating: 1/10

The language is exceptionally clean throughout this book, a remarkable achievement considering some of the characters involved.

SN Themes (3/10) Rating: 3/10

The characters' moral struggles feature prominently in this book, but no real supernatural themes. A Catholic church is regarded as "sacred" but this feature isn't dwelt on. There is a brief scene where the number "666" is used by the "bad guy".

Overall, the story is very light on supernatural elements, despite it's strong moral content. It's written as a fairy tale, and can be read as such.

Catholic Perspective

Catholics will love this book. The author has portrayed strong Catholic values in a way that makes sense. Anyone who comes from a Catholic background will find a lot to relate to.

But The Shadow Of The Bear also has strong appeal for Christians of any kind. The characters are current-day teenagers with many of the real-world challenges faced in this role. The specifically Catholic aspects aren't overbearing - they're just part of the characters' lives. Overall, this is a refreshing and energising book for any young Christian. It shows that belief in God is not irrelevant or boring,  and can even lead to adventure!

Read more on Amazon...

Monday, 30 August 2010

Symfony 'String could not be parsed as XML'

I was receiving this error on my symfony project (using the sfWhoIsOnline plugin):

[28-Aug-2010 21:50:54] PHP Fatal error:  Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/xxxxxxx/plugins/sfWhoIsOnlinePlugin/lib/sfWhoIsOnlineUserFacade.class.php:38
Stack trace:
#0 /home/xxxxxxx/plugins/sfWhoIsOnlinePlugin/lib/sfWhoIsOnlineUserFacade.class.php(38): SimpleXMLElement->__construct('')
#1 /home/xxxxxxx/plugins/sfWhoIsOnlinePlugin/lib/filter/sfWhoIsOnlineFilter.class.php(14): sfWhoIsOnlineUserFacade::registerUser(Object(myUser))
#2 /home/xxxxxxx/cache/frontend/prod/config/config_core_compile.yml.php(1026): sfWhoIsOnlineFilter->execute(Object(sfFilterChain))
#3 /home/xxxxxxx/plugins/sfDoctrineGuardPlugin/lib/sfGuardRememberMeFilter.class.php(56): sfFilterChain->execute()
#4 /home/xxxxxxx/cache/frontend/prod/config/config_core_compile.yml.php(1026): sfGuardRememberMeFilter->execute(Object(sfFilterChain))
#5 /home/xxxxxxx/cache/frontend/prod/config/config_core_compile.yml.php(990): sfFilterChain->execute()
#6 /home/xxxxxxx/cache/frontend/prod/config/config_core_compile.yml.php(1026): sfRenderingFilt in /home/xxxxxxx/plugins/sfWhoIsOnlinePlugin/lib/sfWhoIsOnlineUserFacade.class.php on line 38
[29-Aug-2010 00:06:48] String could not be parsed as XML
[29-Aug-2010 02:14:47] String could not be parsed as XML

Turns out, SimpleXMLElement can't handle empty strings or badly encoded documents well. As a patch of sorts, I replaced the code at line 38 in the sfWhoIsOnlineUserFacade class with the following lines (original lines in bold):

/* Begin Hack to fix error 'String could not be parsed as XML' */
try {
  $xml = new SimpleXMLElement($xmlString);    // <-- Original line 38   
$instance->fromXml($xml);                // <-- Original line 39
} catch (Exception $e) {
  sfContext::getInstance()->getLogger()->crit('sfWhoIsOnline failed to create SimpleXMLElement');
  sfContext::getInstance()->getLogger()->crit('xmlString: '.$xmlString);
/* End Hack */


Sunday, 22 August 2010

Undelete a Linux file

Undelete! | Atomic Object, Software Design & Development:
How to undelete a file removed with the 'rm' command on Linux
"grep -a -B 25 -A 100 'some string in the file' /dev/sda1 > results.txt

Thursday, 19 August 2010

Install phploc on openSuSE 11.3 [HOWTO]

Once you've got PEAR installed, run these commands (as root):

pear channel-discover pear.phpunit.de
pear channel-discover components.ez.no
pear install phpunit/phploc

At first I was getting errors:

phpunit/File_Iterator requires PEAR Installer (version >= 1.9.1), installed version is 1.9.0
phpunit/phploc requires package "phpunit/File_Iterator" (version >= 1.2.0)
No valid packages found
install failed

But running:

pear upgrade-all

fixed all the errors.

Monday, 9 August 2010

Use ssh-copy-id on a non-default port

ssh-copy-id has known problems with handling non-standard ports (e.g. connecting to a different port than 22). To overcome this issue, use a command like:

$ ssh-copy-id "user@host -p 6842"