Catching Fire - Suzanne Collins

February 2nd, 2012

Finished book 2 of the Hunger Games trilogy over the holidays.  I’ll try to keep the spoilers to a minimum; but some details will come out.

<short plot summary with spoilers - so don’t read if you don’t want any idea of what happens>
So, this book takes off right after the end of the first book.  Katniss and Peeta are taking their victory tours around the different districts and then return home.  All throughout the districts, unrest is beginning to grow and they see Katniss as something of a touchstone or symbol for this rebellion despite the fact that she’s not trying to appear or play into these ideas.  She returns home to her district and begins life in the victors village.  Meanwhile, every 25 years, the Capitol unveils another Hunger games called the ‘quarter quell’.  This being the 75th year since the rebellion, so it’s a quell year and quell years have special rules.  This year, the combatants in the arena don’t come from tributes - but from the roster of previous victors.  This means that Katniss has to come back to the arena.  She does so, and the ending sees a dramatic end to the games that results in disruption of them and the survivors being yanked from them either by the capitol or the rebel forces.
<summary end>

I found this book an organic continuation of the previous book.  Style and voice were nearly identical.  So, if you liked the first one, you’ll like this one too - maybe more so.  I did find that the Hunger games that occurs in this episode to be unique in its challenges and style.  Very creative and imaginative - and maybe even better than the first one really. But don’t expect any differences in how it’s told or develops from a story reading or style of character point of view.  It will feel just like reading the first one.

If I had any gripes at this point - it would be about Katniss character development.  I had hope we’d get more answers after the first book and become more emotionally attached to her as she struggles with this adult-making decisions.  Instead, I found myself becoming increasingly bored/frustrated/irritated with her at times.  She waffles continually between her feelings for Peeta and Gale, between obeying the Capitol to joining the rebellion, about what she was even doing with the berries in the arena, about ….every major plot point.  In the end, she doesn’t even choose/make decisive or clear decisions on most of these really important points in this book.  In the ones she does choose, it feels more like a decision between what externally looks better to downright ‘flip of the coin’ type of deciding than anything else.  I just wasn’t convinced by the logic behind the choices she made or believed the inner dialog as she worked it out.  She questions her own motivations so much at times that it doesn’t sound like any choice is made at all.  There were times that it seemed kind of obvious why she had made certain decisions - but she just wouldn’t admit them to herself.  And the author didn’t either.  Maybe this is what being a teenage girl is about; but it makes for some tedious reading and makes her appear to be a much less ‘likeable’ character who is making a real stand for something or growing markedly to adulthood by having to mature through them.  Maybe someone could enlighten me, but maybe this is just because the book is suffering from ‘middle-trilogy book’ syndrome in which you want to keep things going, but make sure you have enough for the last book.

Overall, I’d give the book a solid C+/B- for being a good, quick read and having good arena scenes.  At 9 discs, it made for about a week and a half of commute-time listening.

I’ve already started on the final book, Mockingjay - and we’ll see where that goes.

Sony MDR-V6 headphone replacement ear pads

February 1st, 2012

After 5+ years of using these continually award-winning $120 headphones, the covering on the ear pads we’re starting to flake off and leave little black flakes around.  A common problem.  At under $7/each - and designed for easy replacement - getting replacement earpads was considerably cheaper than getting a new set of headphones.  Finding replacement pads, however, was somewhat difficult.  People had 3rd party pads, but the last replacement set I bought previously didn’t last much more than a year.  I went to Sony’s store, but didn’t have much luck finding them on their parts site.  Anyway, jumped on chat and got the skinny:

https://servicesales.sel.sony.com/ecom/accessories/web/productSearch.do
Once you’re there, please choose any of the items below (remote, adapter, etc). Then it will lead you to a new page and on the upper right hand there is a search box in which you can enter a search by part number.  Enter the part number and on the drop down menu, please choose “part number”.

Sony part number: 211566803
MDR-V6 headphone replacement ear pads - 211566803

They’ll show up as super-generic: PAD, EAR, but should be what you need.  Or at least I hope, since I just ordered them. :)

A Wise Man’s Fear - Patrick Rothfuss

January 10th, 2012

So, I just finished book 2 of Rothfuss’ trilogy - A Wise Man’s Fear (3rd has not yet been released).  It’s 30% bigger than the first at 993 pages (vs 672); and at 43 hours and 18 minutes of listening, it took better than a month to ‘read’ on my commute.  So, was it worth it?  Well…sort of.  I’ll quote the best description I saw of it on Amazon. “It’s kind of a mess.  An engrossing, brilliant, hot and swanky mess, but a mess just the same.”

Book 2 continues the story of Kvothe - a young man enrolled in an university dedicated to arcane arts such as sympathy (magic), crafting of magical items, etc.  However, in this installment, he ventures out into the world.  He journeys to the court of the uber-rich Maer Alveron (line of Vintish kings), he journeys to the Fea world, visits the Adem and has many other adventures. It’s quite a ride.

The good:
Well written and has engrossing and really imaginative bits.  The battle Kvothe has with the bandits has to be one of the most fantastic tellings of how a D&D style magician would do battle.  Honestly, it’s worth the read alone despite being bloody and dark.  Some of the court adventures in Severen are quite entertaining and original.  You’ll read the whole thing, and should well enjoy it.

The bad :
It is simply not the best storytelling at times.  While Rothfuss is a good writer, the story takes some jarring jumps and is beginning to put pants on Kvothe I’m not sure he could/should be wearing.  He spends too much time on some boring parts and far too little on the really important parts.  For example, after a drudgery of pages about a search for bandits, there is an amazing battle scene. In like 2 more pages they then run into a mythical fae creature and he quite literally runs off to 50 pages of sex-romp in the fairy world only to return and immediately go to Adem for a very different story line.  Yet there is very little ‘internal’ growth of Kvothe.  The jumps are jarring and it feels almost like Rothfuss is just trying to hit everything on a shopping list as opposed to a really flowing story that shows how Kvothe is evolving.  There is also an over-abundance of sex.
Sex by itself doesn’t bother me so much if it’s handled well, but it’s becoming part of a pattern of distasteful….smugness to the writing of our adventurer Kvothe.  He is an amazing lover with knowledge of fae lovemaking techniques.  He’s a minstrel who’s songs woo queenly maidens.  He learns swordplay from the best fighters in the world.  The list goes on as Rothfuss tries to take the street kid and make him into the best…everything.  It’s honestly getting a bit unbelievable because we never hear Kvothe’s internal workings when he goes from killing a dozen men right into a month-long fae orgy.
At times, I almost hear the author being a nerdy kid imagining what ‘the best’ looks like.  Problem is, the ‘best’ in reality doesn’t look like this.  True greatness looks more like a Frodo or Aragorn from Lord of the Rings.  People with greatness of character often discover that greatness through trial and tribulation by doing the good, beautiful, and right despite challenges to do otherwise.  They touch upon great truths via these struggles.  Kvothe’s is more like greatness externally draped on a character as a cloak and feels as sterile as a list of things on a resume.  It doesn’t really fit when we see nothing of inner growth or struggle in Kvothe to suggest he has the character of greatness or the heroic.

So, would I recommend the book - yes - with conditions.  I give it a C+.  It’s still got some great storytelling in it, and very imaginative parts.  But you’ll have jarring jumps, an author who is kind of throwing in the kitchen sink to build up the resume of a somewhat unbelievable uber-character.  I’m honestly not sure what the third book will bring - but I sense it will not end well.  I think Rothfuss over-promised a character that is a ‘legend’ and he’s fighting to get that character from the streets to the stuff of legends in too short a time.  Unfortunately, he’s doing it by throwing everything in at once instead of a the more believable/organic growth. We want to see the core struggles and relate/learn about becoming ‘great’, but Kvothe has little of this subtlety and what there is of it is a little stilted. So, enjoy the story but expect plenty of flaws.

Photoshop ctrl+shift+alt+~

December 18th, 2011

More tidbits of findings that I’m saving on my page in case they can’t be found again.  In previous version of Photoshop, they had an awesome shortcut for selecting highlights:

ctrl+shift+alt+~

However, since CS4, that hasn’t worked. I have had a dickens of a time finding the new key as this selection operation isn’t available via the menus - so I didn’t even know what the operation was called so I could Google it.  Then I found this link that told me what the new combination is:

ctrl-alt-2

This is a super-handy shortcut for some of the operations I do when balancing the brightness in a photo without losing the shadows.  Now you know - and knowing is half the battle!

Skype crashing after about 5 seconds of call

December 18th, 2011

Lord I love things that make sense.

If you’re experiencing Skype crashing after about 5 seconds of audio, then try this:  It worked for me.

Find and delete the shared.xml file in the Skype data folder located here:
C:\Users\%username%\AppData\Roaming\Skype

How that does ANYTHING is beyond me, but it did work.

Book Review: The Hunger Games

November 16th, 2011

Time for audio book review #2. I finished the audiobook version of ‘The Hunger Games’.  The first of a trilogy by Suzanne Collins.

undefined

It’s a futuristic tale told in the dystopian future country Panem; built in the remains of North America.  Years ago, the 12 districts of North America fought with the Capital, and lost.  As part of their surrender terms, each district must send one boy and one girl to appear in the annual Hunger Games - a televised fight to the death of 24 contestants until only 1 remains as victor.  Katniss is from the poor, coal producing district 12 (which is likely old Appalachia by its description). Through a turn of events, Katniss is elected as this year’s representative for the games.  She’s a scrappy, tom-boyish girl who knows how to bow hunt (it’s illegal, but it’s the only way to keep her family fed after their father died in the mines).  The rest of the story is how the bloody games, and relationship with fellow tribute Peeta (a baker’s son that showed her kindness many years ago), progress over the days in the wilderness where the competition is set.

First off, this book was written for young adults.  So don’t expect a lot of adult themes and a little more on the ’simple’ side of word/dialogs/story development.  I know if I’d read this as a kid, I probably would have loved it; and I wouldn’t say I was at all disappointed as an adult.  It held my interest for the 9 hours it took to get through the audiobook version.

The story itself follows much in the lines with such stories as The Running Man or Deathrace 2000.  We’re going to follow Katniss through her brutal and poor life in her beaten district.  Her selection, the crazy lead-up to the games in which she’s dressed up, paraded around, interviewed on television, and treated something like royalty.  This is all to gain ’sponsors’ who can buy expensive gifts to help particular contestants during the actual battle.  Then in they go, and the latter half of the book is all about what they do in the piece of wilderness controlled by the game makers to maximize excitement over the days as the battles unfold.  None of the battles (save 1 which I’m wondering how they’ll show on the movie) are overly bloody or brutal - but there is definitely violence - toned to a young-adult level of course.  You won’t have people attacking each other with chainsaws; but death does abound.

Overall, it was an imaginative book worth the 9 hours of listening - or about 2 weeks of commuting in audiobook time. :)  I have to say I was pleasantly uplifted by this book after having read The Golden Compass series - which left a very poor taste in my mouth for ‘modern’ young-adult sci-fi literature.  There is still plenty of good social commentary (poverty and police-states of the districts, the brutality and dehumanizing treatment of the less fortunate by the rich and bored, children being forced into adult roles of supporting and raising families as well as turned into killers, etc), but none of it is so preachy it becomes a theme in itself.  It’s the story is what moves the plot forward, and it’s a good story.  In fact, in Collin’s descriptions of the things Katniss  sees in the capital, I even got a few ideas for software projects I’d like to try out/experiment with.  Not bad sci-fi.  There were some times when I wanted to put a boot in the rear of Katniss’ character as she waffles between being a hard-as-nails competitor, and second-triple-and-quadruple guessing herself as to other people’s motivations.  Some of the ways the fights turn out are a touch unbelievable (she gets a strange reprieve from death at one point that left me pondering for a long time before I could even feel ok with it) and the author does give her some cheats/lucky breaks; but nothing so egregious as to disrupt the story. It ends on a bit of a hanging note; which is fine considering it’s part 1 of a trilogy. But there were a few themes like Katniss’ small shows of defiance to the Capitol’s games/rule that are started in this book, but don’t go too far.  I’m hoping those themes are picked up in the next books, as I’ve already reserved the audio versions of books 2 and 3 from the library.

A final, interesting observation.  While I was ‘reading’ through the book, there were some definite themes that I don’t think male sci-fi writers would have put in, or spent as much time on.  In fact, the whole bits during the run-up to the games themselves were the most revealing to me.  Suzanne Collins spends longer with themes like the dresses Katniss wears, the waxing/hair-plucking/’beautification’, the clothing designers and interview show, and the confused feelings/trying to figure out the motivations of others that Katniss has were noticeably different than things I’ve read by other male sci-fi writers.  It’s doubtful someone like Ray Bradbury would have spent as much time with those details/parts.  While they didn’t particularly change the story IMHO, they were just a noticeable…difference of tone that made me appreciate how many sci-fi stories are by male writers.

Fortuitous timing, as the movie is just about to be released.  So far, trailers seem to show it’s a near-exact transfer of the book.  Which is a refreshing change of Hollywood’s usual pace of b*stardizing most good books/stories/childhood toys. While some of the production values look a little low, I know I’ll watch it at some point; and get the next two books in this trilogy.

Overall, I give the book a solid B for being a good story.

Name of the Wind - Patrick Rothfuss

November 10th, 2011

Been on an audio-book kick most of this year.  I’ve got a 30 min commute each way to/from work each day - so why not get some awesome audio books in?  I’ll start up with reviews of the ones I’ve listened to thus far.

Finished listening to The Name of the Wind by Patrick Rothfuss about 2-3 months ago.  It’s a pretty hefty ‘read’ - coming in at 22 hours (672 pages) of listening.  But, considering I get about an hour of listening per day, it only took about a month of commuting.

Why try to re-invent the reviews on Amazon?  I just pulled the quotes I saw that sound like what I read:

Set in an unnamed imaginary world, Kvothe (”pronounced nearly the same as ‘Quothe’ “), the hero and villain of a thousand tales, is presumed dead but actually now lives as the simple proprietor of the Waystone Inn. Prompted by a biographer who realizes his true identity, Kvothe starts to tell his life story. This is the riveting first-person narrative of Kvothe, a young man who grows to be one of the most notorious magicians his world has ever seen. From his childhood in a troupe of traveling players, to years spent as a near-feral orphan in a crime-riddled city, to his daringly brazen yet successful bid to enter a legendary school of magic, The Name of the Wind is a masterpiece that transports readers into the body and mind of a wizard. Kvothe is driven by twin imperatives—his desire to learn the higher magic of naming and his need to discover as much as possible about the Chandrian, the demons of legend who murdered his family.

That is just about the best description I could come up with.  As for the storytelling, there are a few patterns of Rothfuss’s writing who’s repetition begins to make you feel like he got a bit lazy (like the fact this kid has the absolute WORST luck in the same way several times - which always end with him out of money).  He also gives Kvothe some lucky breaks and coincidences that feel a bit like cheats, but those are very minor points.  Overall, there’s very little to gripe about.   It’s certainly not as epic and grand a tale as Tolken; with grand battles and deep theological / philosophical underpinnings and imagery.  You won’t walk away from the story feeling like you want to ponder again and again the deeper meanings, but its originality and story make up for any loss of the gradious.  No, this is the story of a kid growing up under crazy circumstances and struggles his way through in a really unique world.

The coolest point has to to be one of the most amazing and well-thought out descriptions of how a wizard/magician of the D&D/fantasy sort works internally.  The descriptions, realism, and imaginative mechanics of how magic is done as Kvothe re-tells his stories is truly captivating and original.  None of this ‘he waves his wand and poof’.  Rothfuss has thought out a definite system of how the ‘magic’ happens - and that alone is enough to make this worth reading this book.  In fact, I was told this was ney-on required reading for any dungeon master or DM wizard character.

Overall, I give this a solid A-.  It’s not a sweeping epic - but it’s originality and story will keep you to the end.  I took a breather with a different genre of book after this one, but have already started his second book in the series if that gives you any clue to it’s goodness.

Halloween!

November 1st, 2011

Had some great fun giving candy out to the kiddies in the neighborhood.  Also put up my usual window display - which got rave reviews!

Why _CrtDumpMemoryLeaks can make you think you’re leaking memory - but you’re not

October 27th, 2011

I just spent an hour or two tracking down the last 16-byte memory leak in a project that I was working on. What it turned out to be was actually something EXPLICITLY cited in the Microsoft reference manual as having been fixed.  Yet it turned out not to be.

I had finished instrumenting my code for CRT memory reporting.  This is normally very handy as it tells you exactly what lines of code are actually leaking, how much, and dumps the actual data that’s leaking.  It requires you instrument your headers as described here <http://msdn.microsoft.com/en-us/library/x98tx3cf.aspx>


// this goes before ANY other includes in ALL your headers
#define _CRTDBG_MAP_ALLOC
#include
#include


main()
{
_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); // tells leak detector to dump report at any program exit
_CrtSetBreakAlloc(18); // set breakpoint on a specific allocation number
}

With all this done, you can run the program, and then see this output in the output window of your Visual Studio output:

Detected memory leaks!
Dumping objects ->
C:\PROGRAM FILES\VISUAL STUDIO\MyProjects\leaktest\leaktest.cpp(20) : {18}
normal block at 0x00780E80, 64 bytes long.
Data: < > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
Object dump complete.

Further, if you use the _CrtSetBreakAlloc() with the allocation number ({18}in this case), when the program starts up in debug mode the debugger will automatically stop on that allocation. You can then look at the call stack and get a great idea of whats leaking and why. Overall, it’s very handy and helped me track down all my leaks.

Well, the problem I had was that I had fixed all the leaks but 2.  When I set the breakpoint on these two leaks, however, the breakpoint never fired.  The program just started right up without stopping on that allocation.

I reduced the code down until I was down to just main() that dumped the memory and exited.   The problem was that it STILL reported the leak!  I added a fake leak, and the VERY first allocation in the program had a higher allocation number than the allocations that were supposedly leaking.  This seems to imply quite strongly that the leak is happening BEFORE I actually even get into the program.  What??  How is that possible?

Well, there are a few things that get allocated for you before your program starts.  Fixed-sized arrays, (int array[10];) string literals, and static variables are all objects that are allocated on the stack (as opposed to the heap), which is often allocated at load time. When I looked at all the static allocations in my program, I saw this:


class Bar
{
...
private:
static std::string m_name;
static std::string m_value;
}

Do you see any problem?  I didn’t - at first. The problem is that std::string is actually an STL object that has a constructor. But because they are static, they are allocated at load time. Which means their constructors are likely being called during load time BEFORE the main() is hit.  We make the assumption that the corresponding destructors are called after main exits, but this presents a problem.  Apparently, the CRT memory tracking starts right as the program starts.  It’s supposed to ignore any CRT allocation (ones made by the standard C libraries).  Apparently these static allocations by STL objects are captured.  Since we report leaks BEFORE we hit the program exit, we haven’t actually hit the destructors for those static strings yet.  Those allocations are still reported as active - and hence ‘leaked’.  I only caught this because there had previously been a leak of another set of static string objects - but I’d initialized those strings with actual string literals.  The leak dumped the memory and I recognized the leaked strings.

You can further test this theory by setting the m_name/m_value strings to something, and watch the dump command display those strings.  Yet another clue is that the value of an uninitialized string consists of a number that appears to be a memory address (while the addresses change each run, other allocations in that run have roughly the same addresses), and a bunch of zeros. This likely corresponds to a pointer to the character buffer, and an int that indicates size. This is further confirmed by the fact the leaks are 8 bytes each in x86 build, and 16 bytes on a x64 build. This corresponds to the sizeof(int)+sizeof(void*) sizes on the respective builds.

Solution:
The solution is to ignore what is (likely) a false report, or change the static std::string objects to static std::string* pointers. Then make a static initializer/destructor that news/deletes those string objects. This means the memory is allocated on the stack, and comes/goes in the scope of the program. The other thing you do is file a bug with Microsoft and put a few comments on the documentation website that indicates the statics are still leaking and they haven’t really fixed it yet. :)

Links:
Bug report I submitted with response here 
<https://connect.microsoft.com/VisualStudio/feedback/details/697181/crt-memory-leak-detection-routines-still-report-statically-allocated-stl-objects-as-leaks#tabs>

MS article about CRT memory debug operations that says this bug had been fixed.
http://msdn.microsoft.com/en-us/library/x98tx3cf.aspx

When the less-obvious solution is best

October 26th, 2011

Sometimes more really isn’t the answer.

Case and point - dishes at your house.  I saw this picture and college days of yore flooded back:

At one bachelor flat I lived at - our sink often looked like this.  We had 4 guys living in one house, and dishes weren’t a high-priority item.  So, they tended to pile up and then nobody seemed to remember who dirtied what and an endless cycle of blame and avoidance resulted.

The solution: throw out all the extra dishes.  Instead, there was *exactly 1* set of silverware, plate, and glass for each person.  Further, each one was color-coded.  Red plate/cup/silverware was Bob’s.  Green was Fred’s, etc.  That meant if you wanted to eat something, then you had to have washed your stuff to do so.  It also meant if you left your dirty dishes around - the culprit was immediately identifiable.  The first benefit was that with only 4 plates in the house, a ‘pile’ of them never got very big.  The second was that very quickly the innocents were vindicated, and slobs were identified. (We still had a full set of ‘nice’ dishes for when people came over for a dinner - but they were in a separate cupboard.  Anyone seen using those individually would be berated furiously).   The system worked like a charm and there was nary an argument about dishes for the rest of the time I lived there.

I think this is a corollary to many a home-owner’s observation that your possessions naturally expand to fit the space you have.   Or maybe Apple’s design philosophy that sometimes its the limitations you put on the usage of the device that actually allow easier and higher functionality.